Installing
The TypeScript SDK can be installed via your favourite package manager, e.g.pnpm
Basic Usage
Importing and initialising
TheSailhouseClient
class from the package has everything we need to get started.
Provided you have generated a token, you can create a client from the class.
Sending an event
The client has an asyncpublish
method for sending data to a given topic.
JSON.stringify(...)
and we donβt want that to get messy.
Recieving events from a pull subscription
The client has agetEvents
method for pull subscriptions.
Admin Operations
The admin client provides methods for managing subscriptions programmatically.Registering Push Subscriptions
Rate Limiting and Deduplication
- Rate Limit: Controls delivery frequency using formats like β100/hβ (100 per hour), β10/mβ (10 per minute)
- Deduplication: Prevents duplicate deliveries within a time window using formats like β5mβ (5 minutes), β1hβ (1 hour)