JavaScript
Node.js SDK
Full-featured SDK for Node.js applications with TypeScript support.
$npm install @appneural/sdk
TypeScript definitions includedAutomatic retries with backoffStreaming event supportBuilt-in pagination helpersRequest/response interceptorsWebSocket support
Code
Get started in minutes.
initialization.ts
import { AppneuralClient } from "@appneural/sdk";
const client = new AppneuralClient({
apiKey: process.env.APPNEURAL_API_KEY,
environment: "production",
});authentication.ts
// API key authentication (recommended)
const client = new AppneuralClient({
apiKey: process.env.APPNEURAL_API_KEY,
});
// OAuth 2.0 authentication
const client = new AppneuralClient({
oauth: {
clientId: process.env.APPNEURAL_CLIENT_ID,
clientSecret: process.env.APPNEURAL_CLIENT_SECRET,
scopes: ["workflows:read", "workflows:write"],
},
});usage example.ts
// Trigger a workflow
const run = await client.workflows.trigger({
workflowId: "wf_invoice_audit_01",
input: {
documentUrl: "https://storage.example.com/invoices/inv_001.pdf",
validationRules: ["vat_matching", "vendor_verification"],
},
});
console.log(`Workflow started: ${run.id}`);
console.log(`Status: ${run.status}`);Configuration
SDK options.
| Option | Type | Description |
|---|---|---|
| apiKey | string | Your API key |
| environment | string | production | sandbox |
| timeout | number | Request timeout in ms (default: 30000) |
| retries | number | Max retry attempts (default: 3) |
Best Practices
Recommended patterns.
Store API keys in environment variables
Use TypeScript for type safety
Implement proper error handling
Use streaming for large datasets
Enable request logging in development
Enterprise Intelligence
Get started with Node.js SDK.
Full-featured SDK for Node.js applications with TypeScript support.
Scope and availability confirmed individually · Written terms define the engagement