DeltaBaseSubscription
API reference for DeltaBaseSubscription
Variable: DeltaBaseSubscription
Section titled “Variable: DeltaBaseSubscription”
constDeltaBaseSubscription:Handler<(this,id,props) =>Promise<DeltaBaseSubscriptionResource>>
Manage a DeltaBase webhook subscription as an Alchemy resource.
v1 is intentionally webhook-only. That matches the stable subscriber shape in the public DeltaBase SDK today and avoids pretending queue or workflow subscribers are production-ready before they are.
Example
Section titled “Example”import { DeltaBaseSubscription } from '@delta-base/alchemy';
await DeltaBaseSubscription('users-projection', { baseUrl: process.env.DELTABASE_URL ?? 'https://api.delta-base.com', apiKey: process.env.DELTABASE_API_KEY ?? '', eventStoreName: 'auth-service', eventFilter: ['user.created', 'user.deleted'], webhook: { url: 'https://example.com/api/projections/users/events', headers: { Authorization: `Bearer ${process.env.PROJECTION_AUTH_TOKEN ?? ''}`, }, },});