@saazip/webhook-core
Sources:
packages/sdk/package.json|packages/sdk/src/index.ts
Purpose
Section titled “Purpose”The public package published as @saazip/webhook-core for endpoint registration and delivery orchestration from another backend.
What it gives you
Section titled “What it gives you”- a typed client for endpoint registration, delivery creation, listing, and replay
- re-exported contracts and domain primitives for downstream adopters
Use this when
Section titled “Use this when”- your product wants outbound webhooks behind one stable package boundary
- another backend should manage endpoints and deliveries without handwritten fetch code
Smallest useful setup
Section titled “Smallest useful setup”import { createWebhookCoreClient } from "@saazip/webhook-core";
const client = createWebhookCoreClient({ baseUrl: "http://127.0.0.1:3030", apiKey: process.env.WEBHOOK_CORE_API_KEY,});
const registration = await client.registerEndpoint({ tenantId: "tenant_demo", url: "https://example.com/webhooks/leads", eventTypes: ["lead.created"],});
await client.dispatch({ endpointId: registration.endpoint.id, tenantId: "tenant_demo", eventType: "lead.created", payload: { leadId: 'lead_123' },});Workspace details
Section titled “Workspace details”- Package name:
@saazip/webhook-core - Workspace path:
packages/sdk
Internal dependencies
Section titled “Internal dependencies”External dependencies
Section titled “External dependencies”openapi-fetch
Usually paired with
Section titled “Usually paired with”You still own
Section titled “You still own”- which domain events become outbound webhooks
- event payload design and subscription semantics in your product
Scripts
Section titled “Scripts”build:tsc -p tsconfig.jsontypecheck:tsc --noEmit -p tsconfig.jsonlint:biome check src package.json tsconfig.json