Typescript Sdk Reference
Install
npm install denpex-sdk
Modules
@denpex/client— typed REST client.@denpex/otlp— OTLP submission.@denpex/node-hook— optional instrumentation for Node.js.
Usage
import { DenpexClient } from "@denpex/client";
const client = new DenpexClient({
apiUrl: "https://api.denpex.ai",
token: "<token>",
tenantId: "<tenant>",
});
const incidents = await client.incidents.list({
state: "open",
limit: 25,
});
for (const inc of incidents.nodes) {
console.log(`${inc.severity}: ${inc.host} (${inc.id})`);
}
CLI
denpex incident list
denpex incident show <id>
denpex incident approve <id>
denpex checkpoint validate --path <path>
denpex rank map
Configuration
| Env var | Purpose |
|---|---|
DENPEX_TOKEN | Auth token |
DENPEX_TENANT | Tenant ID |
DENPEX_OTLP_ENDPOINT | OTLP HTTPS endpoint |
Compatibility
- Node 20+.
- ESM + CJS.
- TypeScript 5+.
Tests
denpex-sdk/tests/:
- 3 unit tests per module.
- 1 integration test against a mock server.