Aevum Zenth SDK
The official TypeScript/JavaScript SDK for interacting with the Aevum Zenth global API network. Access 400+ divisional endpoints, unified telemetry, and cross-industry data pipelines with a single, type-safe interface.
Overview
The Aevum Zenth SDK abstracts the complexity of our distributed microservices architecture into a cohesive developer experience. Whether you're querying real-time energy grid metrics, submitting aerospace telemetry, or managing cross-border financial settlements, the SDK handles routing, retries, compression, and authentication automatically.
The SDK is optimized for Node.js 18+, modern browsers, and edge runtimes (Cloudflare Workers, Deno, Vercel Edge). Bundle size drops to ~14kb when tree-shaken.
Installation
Install via your preferred package manager:
npm install @aevumzenth/sdk
# or
yarn add @aevumzenth/sdk
# or
pnpm add @aevumzenth/sdk
Ensure your project targets ES2020+ for optimal async/await and optional chaining support.
Quick Start
Initialize the client and make your first request in under 30 seconds:
import { ZenthClient, QueryScope } from "@aevumzenth/sdk";
// 1. Initialize with your API key
const client = new ZenthClient({
apiKey: process.env.AEVUM_ZENTH_KEY,
region: "global",
timeout: 5000
});
async function main() {
try {
// 2. Query cross-divisional telemetry
const gridData = await client.query({
scope: QueryScope.ENERGY,
endpoint: "/v2/grid/status",
params: { zone: "EU-WEST-3", format: "compressed" }
});
console.log(`Grid Load: ${gridData.metrics.load} MW`);
} catch (err) {
client.logger.error("Query failed", err);
}
}
main();
All responses are fully typed. Intellisense will auto-complete endpoints, request shapes, and response structures based on your scope.
Authentication
The SDK supports three authentication methods, automatically selected based on your deployment environment:
| Method | Use Case | Configuration |
|---|---|---|
| API Key | Server-side, CI/CD, scripts | apiKey: "az_live_..." |
| OAuth2 / OIDC | Web apps, mobile, SSO integrations | oauth: { clientId, redirectUri } |
| Service Account | Microservices, internal tooling | serviceAccount: "path/to/key.json" |
Tokens are automatically rotated and cached. The SDK implements retry logic with exponential backoff for 401 and 429 responses.
Client Configuration
Advanced options for tuning network behavior, logging, and region routing:
const client = new ZenthClient({
// Authentication
apiKey: process.env.AEVUM_ZENTH_KEY,
// Network & Routing
region: "auto", // auto, global, us-east, eu-central, apac
timeout: 8000,
maxRetries: 3,
retryStrategy: "exponential", // exponential, linear, none
// Performance
compression: true,
keepAlive: true,
// Observability
logger: {
level: "warn",
format: "json"
}
});
Core Modules
ZenthClient
The primary interface. Handles connection pooling, request signing, and response parsing.
QueryScope
Enum defining divisional namespaces: ENERGY, AEROSPACE, HEALTH, FINANCE, LOGISTICS, RESEARCH.
EventStream
WebSocket-backed real-time subscription handler for live telemetry and market data. Supports backpressure and automatic reconnection.
const stream = client.stream(QueryScope.AEROSPACE, "/v1/orbital/telemetry");
stream.on("data", (packet) => {
console.log(`Altitude: ${packet.alt_km} km | Velocity: ${packet.vel_ms} m/s`);
});
stream.on("error", (err) => client.logger.warn("Stream interrupted", err));
// Graceful shutdown
process.on("SIGINT", () => stream.close());
Error Handling
All SDK errors extend ZenthError and include standard HTTP status codes, request IDs, and suggested retry delays.
import { ZenthError, ErrorCode } from "@aevumzenth/sdk";
try {
await client.execute(/* ... */);
} catch (err) {
if (err instanceof ZenthError) {
switch (err.code) {
case ErrorCode.RATE_LIMITED:
await new Promise(r => setTimeout(r, err.retryAfterMs));
break;
case ErrorCode.SCOPED_DENIED:
console.error("API key lacks divisional scope");
break;
default:
console.error("Unknown Zenth error", err);
}
}
}
API Reference
Complete type definitions and endpoint specifications are available in our interactive playground:
Visit docs.aevumzenth.com/api-reference for auto-generated OpenAPI specs, webhook schemas, and cross-divisional mapping guides.
Support & Community
- GitHub: Report bugs, request features, and browse source code
- Discord: Join the #sdk-general channel for real-time help
- Enterprise Support: Dedicated Slack channel & SLA-backed response times
- Status Page: Monitor global API uptime and maintenance windows
For urgent production incidents, contact sdk-support@aevumzenth.com with your request-id.