open-index/open-npm huggingface dataset:
npm package: @oncallsh/sdk
Description: TypeScript SDK for the oncall.sh API by beeps.
Latest version: 0.0.2

# @oncallsh/sdk

TypeScript SDK for the oncall.sh API by beeps.

## Sign up at oncall.sh

- [Documentation](https://oncall.sh): Full documentation site

## Install

pnpm add @oncallsh/sdk

## Basic Usage

```
import { OnCallClient } from "@oncallsh/sdk";

const oncall = new OnCallClient({
  apiKey: process.env.ONCALL_API_KEY!
});

const relay = await oncall.relay.create({
  name: "mycompany primary on-call relay",
  description: "this is our primary rotation",
  externalKey: "mycompany::relay::primary"
});
```

## Errors

By default methods throw typed errors (AuthError, ValidationError, NotFoundError, RateLimitError, ServerError, NetworkError, HttpError).
Use the safe variants to avoid try/catch:

const { data, error } = await oncall.relay.createSafe({...});