Skip to content

basalt / webhooks/src / WebhookManagerOptions

Interface: WebhookManagerOptions ​

Defined in: webhooks/src/index.ts:210

Fan-out bounds for WebhookManager.dispatch. webhooksPlugin forwards them.

Extends ​

Properties ​

dispatchConcurrency? ​

> optional dispatchConcurrency?: number

Defined in: webhooks/src/index.ts:182

Most deliveries one dispatch runs at once. Default DEFAULT_DISPATCH_CONCURRENCY (16).

Inherited from ​

WebhookFanOutOptions.dispatchConcurrency


maxEndpointsPerDispatch? ​

> optional maxEndpointsPerDispatch?: number | false

Defined in: webhooks/src/index.ts:180

Most active endpoints ONE scope (a tenant, or the tenant-agnostic set) may have subscribed to one event. A dispatch that matches more refuses that scope entirely — none of its endpoints is sent to, each gets a failed result (retryable: false) — rather than silently picking some of them; other scopes of the same dispatch are unaffected. false disables the cap. Default DEFAULT_MAX_ENDPOINTS_PER_DISPATCH (100).

Inherited from ​

WebhookFanOutOptions.maxEndpointsPerDispatch


now? ​

> optional now?: () => number

Defined in: webhooks/src/index.ts:219

Clock in epoch ms, for the rotation grace window (tests). Default Date.now.

Returns ​

number


onFanOutExceeded? ​

> optional onFanOutExceeded?: (info) => void

Defined in: webhooks/src/index.ts:187

Called once per refused scope (alerting/metrics). Default: console.warn. Must not throw — an exception is logged and swallowed.

Parameters ​

info ​

WebhookFanOutExceeded

Returns ​

void

Inherited from ​

WebhookFanOutOptions.onFanOutExceeded


tenancyActive? ​

> optional tenancyActive?: () => boolean

Defined in: webhooks/src/index.ts:217

True when the app is multi-tenant. webhooksPlugin wires this to the 'tenancy:active' marker set by tenancyPlugin. When true, register, list and unregister refuse to run unscoped (no tenant) unless called with { system: true }.

Returns ​

boolean

Released under the MIT License.