@beepsdev/sdk 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +42 -0
- package/dist/index.cjs +811 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +612 -0
- package/dist/index.d.ts +612 -0
- package/dist/index.js +767 -0
- package/dist/index.js.map +1 -0
- package/package.json +41 -0
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# @beepsdev/sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the beeps.dev API.
|
|
4
|
+
|
|
5
|
+
## Sign up at beeps.dev
|
|
6
|
+
|
|
7
|
+
- [Documentation](https://beeps.dev): Full documentation site
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
pnpm add @beepsdev/sdk
|
|
12
|
+
|
|
13
|
+
## Basic Usage
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
import { BeepsClient } from "@beepsdev/sdk";
|
|
17
|
+
|
|
18
|
+
const beeps = new BeepsClient({
|
|
19
|
+
apiKey: process.env.BEEPS_API_KEY!
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const relay = await beeps.relay.create({
|
|
23
|
+
name: "mycompany primary on-call relay",
|
|
24
|
+
description: "this is our primary rotation",
|
|
25
|
+
externalKey: "mycompany::relay::primary"
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Members
|
|
30
|
+
|
|
31
|
+
List organization members to resolve emails to user IDs for schedule management.
|
|
32
|
+
|
|
33
|
+
```
|
|
34
|
+
const members = await beeps.member.list();
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Errors
|
|
38
|
+
|
|
39
|
+
By default methods throw typed errors (AuthError, ValidationError, NotFoundError, RateLimitError, ServerError, NetworkError, HttpError).
|
|
40
|
+
Use the safe variants to avoid try/catch:
|
|
41
|
+
|
|
42
|
+
const { data, error } = await beeps.relay.createSafe({...});
|