TypeScript SDK
The Logbook SDK is an auto-generated TypeScript client for the Logbook API, built using Kubb from the OpenAPI specification.
Overview
The SDK provides:
- Type-safe API client
- TypeScript types for all request/response models
- Pre-configured Axios instance
- Zero manual maintenance (regenerated from OpenAPI)
Installation
The SDK is published to the Buildkite package registry:
bash
npm install @logbook/sdkConfigure your .npmrc to access the registry (see your team lead for credentials).
Quick Start
typescript
import { createClient } from "@logbook/sdk/client"
const client = createClient({
baseUrl: "https://api.logbook.so",
})
// Set auth token
client.setAuthToken(token)
// Make API calls
const books = await client.books.list()
const book = await client.books.get("book-id")Package Structure
The SDK exports three entry points:
| Export | Purpose |
|---|---|
@logbook/sdk/client | API client with methods |
@logbook/sdk/types | TypeScript types |
@logbook/sdk/axios | Pre-configured Axios instance |
Versioning
The SDK version tracks the API version. When the API changes:
- API team regenerates
swagger.json - SDK team runs
pnpm generate - New version is published
Next Steps
- Generating - How to regenerate the SDK
- Exports - Detailed export documentation
- Usage - Integration examples