Skip to content

getcontrolroom/sdk-ts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Control Room TypeScript SDK

TypeScript client for the Control Room API. Generated from spec/openapi.yaml using hey-api/openapi-ts.

Installation

bun add @getcontrolroom/sdk-ts

Quick Start

import { createCRClient, listBookings } from "@getcontrolroom/sdk-ts";

const client = createCRClient({
  baseUrl: "https://api.controlroom.app",
  token: "your-bearer-token",
});

const { data } = await listBookings({ client });

Auth

Service-to-service (app → api, server-side only):

const client = createCRClient({
  baseUrl: "https://api.controlroom.app",
  userId: "usr_...",
  serviceSecret: process.env.CR_SERVICE_SECRET,
});

Bearer token (mobile clients, user sessions):

const client = createCRClient({
  baseUrl: "https://api.controlroom.app",
  token: "your-bearer-token",
});

Timeouts

Default timeout is 30 seconds. Override with timeoutMs:

const client = createCRClient({
  baseUrl: "https://api.controlroom.app",
  token: "your-token",
  timeoutMs: 10_000, // 10 seconds
});

Regenerating

Requires the spec at ../spec/openapi.yaml.

cd bedrock && make generate-ts

License

MIT — see LICENSE.


Built by Control Room · Developed by Clover Labs

About

TypeScript SDK for the Control Room API

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors