Latitude 10 docs

The TypeScript package

An ESM package with strict types and no runtime dependencies. It uses the standard fetch, so it runs on Node.js 20+, Deno, Bun, Cloudflare Workers and in browsers, and it never calls Latitude 10.

Its files

FileWhat it holds
package.jsonThe name and version, "type": "module" and "engines": { "node": ">=20" }.
src/client.tsThe client class, named by clientName.
src/resources/The operations, grouped by tag, a method each.
src/models.tsThe types from your document's schemas.
src/core.tsThe runtime, the same file in every SDK we generate. It holds no text from your document.
src/index.tsWhat the package exports.
README.mdInstall, use, each resource's methods, errors and retries.
GENERATION.mdHow it was generated, and anything skipped.
CHANGELOG.mdWhat changed in each version.
LICENSEMIT, in the holder's name.
tsconfig.jsonThe build settings.

Auth

The client takes apiKeys by security scheme name, bearerToken as a string or a function it asks before every request, so you can refresh it, or username and password for basic auth. Each operation sends the first of its schemes the client has credentials for.

Retries and timeouts

  • Connection errors, timeouts, 408, 429 and 5xx are retried with backoff, and Retry-After is honoured.
  • POST and PATCH are retried only with an idempotency key: idempotencyKey in a call's options, or one made for you when the operation declares an Idempotency-Key header.
  • Set maxRetries and timeoutMs on the client or per call, and pass signal to cancel.

Errors

A response outside 2xx throws an APIError with status, headers, body and requestId, as one of BadRequestError, AuthenticationError, PermissionDeniedError, NotFoundError, ConflictError, UnprocessableEntityError, RateLimitError or InternalServerError. A network failure throws APIConnectionError, a timeout APITimeoutError. All of them extend the client's own error class.

Every method also has a …WithResponse sibling that returns { data, response }, for the headers and the status.

Pagination

An operation that pages, by cursor, offset or page number, returns a page you can await for the first page, or walk with for await for every item of every page. OpenAPI extensions says how a paging operation is found, and GENERATION.md says which methods page.

Where this comes from

  • app/sdk/_lib/typescript/emit.ts
  • app/sdk/_lib/typescript/runtime/core.ts
  • app/sdk/_lib/model.ts
  • tests/fixtures/sdk/petstore/expected/README.md