Languages
TypeScript
The TypeScript SDK publishes to npm and ships with full type definitions generated from your spec.
Install
npm install @your-org/api-clientOptions
Set these per language in SDK Studio. A per-language value overrides the project-wide default.
| Option | Values | Default |
|---|---|---|
| HTTP engine | fetch, axios | fetch |
| Callbacks | omit, include | omit |
| Client style | functions, namespaced, class, class-namespaced | functions |
| Argument style | object, positional | object |
| Namespace | tags, path | tags |
| Doc comments | full, minimal | full |
| File header | omit, include | omit |
| Usage example | full, concise | full |
HTTP engine
// Native fetch — no dependencies
await fetch(url, init);The default. Zero dependencies, works in Node 18+, browsers, Deno, Bun, and edge runtimes.
fetch keeps the package dependency-free, which matters more to a consumer than it does to you. An SDK that drags axios into a browser bundle is a cost your users pay on every page load.
Callbacks
include emits callback-style variants alongside the promise-based methods. Only worth it for consumers on codebases that predate promises.
Package name
npm is scoped or unscoped:
@acme/api scoped, recommended
acme-api unscopedScoped names are namespaced to your org, so they can't be squatted and read unambiguously.
npm does not allow renaming, and refuses to republish a deleted version. Get it right before the first release. See Publishing.
What callers write
import { AcmeClient } from "@acme/api";
const client = new AcmeClient({ token: process.env.ACME_TOKEN });
for await (const user of client.users.list({ limit: 100 })) {
console.log(user.id);
}Types come from the spec, so a renamed field surfaces as a compile error rather than an undefined at runtime.