basalt / webhooks/src / webhookOutboxDispatch
Function: webhookOutboxDispatch()
> webhookOutboxDispatch(webhooks, options?): OutboxDispatch
Defined in: webhooks/src/outbox.ts:58
An OutboxDispatch that publishes an entry to the current webhook subscribers. Throws only if a delivery failed TRANSIENTLY (network, timeout, 5xx, 408/429), so the outbox retries; a retry skips endpoints that already accepted the entry and re-sends the same delivery id to the rest. Permanent failures are reported via onPermanentFailure and never re-queue the entry (re-dispatching them would only duplicate deliveries to healthy endpoints). An entry recorded without a tenant reaches only tenant-agnostic endpoints.
Each entry is dispatched in a fresh, tenant-less context scoped by the entry's OWN tenant: a relay flushed from inside a tenant's request must not let that request's ambient tenant (which dispatch gives precedence to) re-route other tenants' entries to the caller's endpoints.
Parameters
webhooks
options?
WebhookOutboxDispatchOptions = {}