TypeScript
TypeScript SDK
Type-safe SDK with full generics support and IntelliSense.
$npm install @appneural/sdk
Full TypeScript definitionsGeneric type parametersDiscriminated union error typesAuto-complete for all methodsCompile-time validationSource maps included
Code
Get started in minutes.
initialization.ts
import { AppneuralClient, type WorkflowRun, type AppConfig } from "@appneural/sdk";
const config: AppConfig = {
apiKey: process.env.APPNEURAL_API_KEY!,
environment: "production",
};
const client = new AppneuralClient(config);authentication.ts
// Type-safe OAuth configuration
const client = new AppneuralClient({
oauth: {
clientId: process.env.APPNEURAL_CLIENT_ID!,
clientSecret: process.env.APPNEURAL_CLIENT_SECRET!,
scopes: ["workflows:read", "workflows:write", "identity:admin"] as const,
},
});usage example.ts
// Fully typed workflow trigger
const run: WorkflowRun = await client.workflows.trigger<{
documentUrl: string;
validationRules: string[];
}>({
workflowId: "wf_invoice_audit_01",
input: {
documentUrl: "https://storage.example.com/invoices/inv_001.pdf",
validationRules: ["vat_matching"],
},
});Configuration
SDK options.
| Option | Type | Description |
|---|---|---|
| apiKey | string | Your API key |
| environment | 'production' | 'sandbox' | Target environment |
| timeout | number | Request timeout in ms |
| retries | number | Max retry attempts |
Best Practices
Recommended patterns.
Use strict mode in tsconfig.json
Leverage generic types for input/output
Use discriminated unions for error handling
Enable source maps for debugging
Enterprise Intelligence
Get started with TypeScript SDK.
Type-safe SDK with full generics support and IntelliSense.
Scope and availability confirmed individually · Written terms define the engagement