Skip to content

TypeScript SDK

A typed client for the Overlane API, generated from the OpenAPI document: one method per operation, typed errors, retries for rate-limited reads, and webhook verification.

Updated View as MarkdownOpen in ChatGPTOpen in Claude

The SDK is generated from the OpenAPI document, not written by hand, so it has exactly the operations the API has and the types its contracts define. It lives in the repository at packages/sdk as @overlane/sdk. It has no runtime dependencies and uses only fetch and Web Crypto. It is tested in Node 22 and in the Cloudflare Workers runtime.

The SDK reference lists every method by area, with its signature.

Use it

import { Overlane, OverlaneApiError } from "@overlane/sdk";

const overlane = new Overlane({ apiKey: process.env.OVERLANE_KEY });

const { tenantId } = await overlane.meGet();
const { connectors } = await overlane.connectorsList({ tenantId });
const issues = await overlane.issuesList({ tenantId, projectId: "proj-1" });

try {
  await overlane.connectorsAction({ tenantId, provider: "slack", action: "post_message", body: { input: { channel: "C01GENERAL", text: "Build passed" } } });
} catch (error) {
  if (error instanceof OverlaneApiError && error.code === "autonomy_approval_required") {
    // The refusal names the class and the subject to approve; an independent agent or a person answers, then retry with the approval ID.
    approvalNeeded = error.body.error.approval.subject;
  }
}

Each method takes the path parameters, an optional query and a body, and returns the typed response. The second argument is { approvalId, signal }: pass the approval ID when the autonomy gate asks for one.

Names

A method is named after the route it calls: the route issues.list is issuesList, connectors.action is connectorsAction, apikeys.create is apikeysCreate. A route that accepts several methods adds the method, such as codeUploadPost. Path parameters are named after the thing in the path: issueId, webhookId, apiKeyId. OPERATIONS lists every operation with its method, path and route ID.

Errors and retries

A non-2xx answer throws OverlaneApiError with status, code, hint, retryable, retryAfterSeconds and the parsed body. A read that was rate limited or hit a server error is retried up to twice (change it with maxRetries), waiting for Retry-After when the API sends it. A write is never retried by the SDK: use the request ID or event ID the operation takes to repeat it safely.

Version

The client sends Overlane-Version with the version it was generated from, which is exported as API_VERSION. Pass version to pin another one.

const pinned = new Overlane({ apiKey: process.env.OVERLANE_KEY, version: "2026-10-10" });

Verify webhooks

import { verifyWebhook } from "@overlane/sdk";

const problem = await verifyWebhook(secret, rawBody, signatureHeader);
if (problem !== null) throw new Error("bad signature");

See Webhooks for replay and ordering rules.

Reproducible

The SDK sources are checked in. Generating them again from the same document changes nothing, and a test fails when the document, the route tables and the generated client disagree.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close

Overlane Agent

Ask about the docs. Answers are quoted from the pages, with links. This panel cannot change anything.

    Questions are answered in your browser from the docs index. Nothing you type here is stored or sent anywhere.