SDK reference
Every public symbol of @dukkan.one/app-sdk, one page per entry point, generated from the package's own types.
On this page
This reference lists every exported function, class, interface, type and constant of @dukkan.one/app-sdk, grouped by entry point. It is generated from the package's TypeScript declarations and TSDoc through the compiler, so a signature here is the signature the package ships. Guides live under App SDK; the Nuxt module's own surface is in The Nuxt module.
Install#
npm install @dukkan.one/app-sdkNode.js 18.17 or newer, Cloudflare Workers, Bun and Deno. ESM and CommonJS, with types.
Entry points#
| Import from | Contents |
|---|---|
@dukkan.one/app-sdk |
The client, the token manager, errors, retry and pagination helpers, plus every symbol below re-exported. |
@dukkan.one/app-sdk/oauth |
PKCE, the consent URL, the code exchange and the refresh grant. |
@dukkan.one/app-sdk/webhooks |
Signature verification, the envelope schema, typed events and the receiver. |
@dukkan.one/app-sdk/tokens |
The TokenStore contract, the in-memory and key-value adapters, the AES-GCM sealer. |
@dukkan.one/app-sdk/tokens/postgres |
The Postgres adapter for postgres.js clients. |
@dukkan.one/app-sdk/idempotency |
Idempotency-Key helpers, canonical JSON, the inbox contract. |
@dukkan.one/app-sdk/commerce |
Money, order transitions, totals reconciliation, unfulfilled lines, refunds, sync by updated_at. |
@dukkan.one/app-sdk/config |
The dukkan.app.toml schema and the version surface. |
@dukkan.one/app-sdk/testing |
Sample envelopes, delivery signing and fetch stubs for your tests. |
@dukkan.one/app-sdk/contract |
Runtime constants generated from the OpenAPI document. |
Versioning#
The package follows semantic versioning. Within a major version the surface only grows, mirroring the platform's additive v1 policy (API reference). The dated platform revision a build was generated against is PLATFORM_API_VERSION in the contract entry point; a newer server answers with its own date in X-Dukkan-Api-Version and the client reports the drift through onApiVersionDrift without failing.
Until 1.0.0 the packages are published under the next dist-tag: npm install @dukkan.one/app-sdk@next.