@seshn/sdk 0.1.0
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 +67 -0
- package/dist/index.cjs +701 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +823 -0
- package/dist/index.d.ts +823 -0
- package/dist/index.js +650 -0
- package/dist/index.js.map +1 -0
- package/package.json +55 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# @seshn/sdk
|
|
2
|
+
|
|
3
|
+
TypeScript SDK for the [Seshn](https://seshn.net) booking API — headless booking infrastructure for service businesses.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @seshn/sdk
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quickstart
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { Seshn } from "@seshn/sdk";
|
|
15
|
+
|
|
16
|
+
const seshn = new Seshn("sk_test_...", {
|
|
17
|
+
baseUrl: "https://api.seshn.net",
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
// Check availability
|
|
21
|
+
const slots = await seshn.availability.list({
|
|
22
|
+
serviceId: "svc_...",
|
|
23
|
+
date: "2026-04-01",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
// Book a slot
|
|
27
|
+
const booking = await seshn.bookings.create({
|
|
28
|
+
serviceId: "svc_...",
|
|
29
|
+
resourceId: "res_...",
|
|
30
|
+
contactId: "con_...",
|
|
31
|
+
startTime: "2026-04-01T10:00:00Z",
|
|
32
|
+
endTime: "2026-04-01T11:00:00Z",
|
|
33
|
+
seats: 1,
|
|
34
|
+
});
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Resources
|
|
38
|
+
|
|
39
|
+
The SDK covers every Seshn API resource:
|
|
40
|
+
|
|
41
|
+
- `seshn.availability` — Check slot availability
|
|
42
|
+
- `seshn.bookings` — Create, update, cancel bookings
|
|
43
|
+
- `seshn.bookingSeries` — Manage recurring bookings
|
|
44
|
+
- `seshn.contacts` — Customer records
|
|
45
|
+
- `seshn.services` — Service types and configuration
|
|
46
|
+
- `seshn.resources` — Staff, rooms, equipment
|
|
47
|
+
- `seshn.locations` — Business locations
|
|
48
|
+
- `seshn.payments` — Stripe payment flows
|
|
49
|
+
- `seshn.entitlements` — Credit/package management
|
|
50
|
+
- `seshn.waitlist` — Waitlist with auto-promotion
|
|
51
|
+
- `seshn.webhooks` — Webhook endpoint management
|
|
52
|
+
- `seshn.apiKeys` — API key management
|
|
53
|
+
- `seshn.auditLog` — Activity audit trail
|
|
54
|
+
- `seshn.users` — User/team management
|
|
55
|
+
- `seshn.organizations` — Org setup
|
|
56
|
+
|
|
57
|
+
## Sandbox mode
|
|
58
|
+
|
|
59
|
+
Use a `sk_test_` key to work in sandbox mode — no real charges, seeded test data.
|
|
60
|
+
|
|
61
|
+
## Docs
|
|
62
|
+
|
|
63
|
+
Full API documentation: [seshn.net/docs](https://seshn.net/docs)
|
|
64
|
+
|
|
65
|
+
## License
|
|
66
|
+
|
|
67
|
+
MIT
|