TypeScript SDK
The SDK is a small typed client: every path, parameter and response is typed from the same definitions that validate requests, so it matches the API reference exactly.
Install
Section titled “Install”npm install @limitry/sdkMake a call
Section titled “Make a call”import { createClient, unwrap } from "@limitry/sdk";
const api = createClient({ token: process.env.API_KEY! });
const endpoints = unwrap(await api.GET("/workspace/webhook-endpoints"));for (const endpoint of endpoints.items) console.log(endpoint.url);- With an API key, every call acts in the key’s workspace.
- With a personal access token, name the workspace:
createClient({ token, workspace: "acme" }). unwrapreturns the data or throws anApiErrorcarrying the error envelope’scode,message,statusandrequestId.- Writes may send an idempotency key:
api.POST("/workspace/webhook-endpoints", { body, headers: { "idempotency-key": id } }).