OpenSDK

SDK Features

All features generated in TypeScript SDKs by OpenSDK.

OpenSDK generates a complete TypeScript SDK with up to 14 feature modules, depending on what the API supports. Features are auto-detected from the spec.

Generated Modules

ModuleFileDescription
Clientsrc/client.tsMain client class with typed methods for every endpoint
Typessrc/types.tsClient configuration interface
Modelssrc/models.tsTypeScript interfaces for all schemas
Authsrc/auth.tsAPI key, Bearer, Basic, or OAuth 2.0 (with PKCE + refresh)
Retrysrc/retry.tsExponential backoff with jitter for retryable endpoints
Errorssrc/errors.tsTyped error classes (timeout, auth, rate limit, not found)
Paginationsrc/pagination.tsCursor, offset, and page-based async generators
Streamingsrc/streaming.tsEventStream class for SSE with async iteration
Multipartsrc/multipart.tsFormData builder for file upload endpoints
Idempotencysrc/idempotency.tsAuto-generated idempotency keys for safe retries
Interceptorssrc/interceptors.tsRequest/response hooks (before, after, error)
Typed Errorssrc/typed-errors.tsPer-status-code error classes from endpoint error definitions
Environmentssrc/environments.tsNamed environment presets (production, staging, sandbox)
Indexsrc/index.tsBarrel export of all active modules

Feature Detection

Features are auto-detected from the API spec:

  • Auth -- security schemes in the spec
  • Pagination -- cursor, offset, limit, or page query parameters
  • Retries -- endpoints marked as retryable or safe HTTP methods
  • Streaming -- text/event-stream response content type
  • Multipart -- multipart/form-data request body
  • Idempotency -- endpoints with idempotency header annotations
  • Typed errors -- endpoints with error response schemas
  • Environments -- multiple server URLs in the spec
  • Timeouts -- per-endpoint timeout annotations

SDK Output Structure

my-sdk/
  src/
    client.ts
    types.ts
    models.ts
    auth.ts
    retry.ts
    errors.ts
    pagination.ts
    streaming.ts
    interceptors.ts
    index.ts
  package.json
  tsconfig.json

Every generated SDK is a standalone TypeScript package. Run npm run build to compile, or import directly with a bundler.

On this page