Skip to content

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/sdk

Configure 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:

ExportPurpose
@logbook/sdk/clientAPI client with methods
@logbook/sdk/typesTypeScript types
@logbook/sdk/axiosPre-configured Axios instance

Versioning

The SDK version tracks the API version. When the API changes:

  1. API team regenerates swagger.json
  2. SDK team runs pnpm generate
  3. New version is published

Next Steps

Built with VitePress