This module is types only — no runtime code beyond tiny guards and the
schema-version constant, no dependencies. It is safe to import from the
publish hot path and the receiver. Runtime validation (which pulls in
valibot) lives in validation.
An application is the unit of tenancy — typically one of your customers. Endpoints, messages, and deliveries are all scoped to an application, and a portal token grants access to exactly one application.
A signing secret attached to an endpoint. Secrets are whsec_ + base64 per the Standard Webhooks spec. Rotation keeps the previous secret verifiable until expiresAt (the grace window); expired secrets are pruned lazily.
A published event for one application. The message is the receiver-facing unit: its id is the webhook-id header (stable across retries — receivers dedupe on it), and its payload is the data of the wire envelope.
The wire envelope receivers get — the Standard Webhooks recommended shape. type is the event type name, timestamp the event-occurred time, and data the published payload.
A duration for configuration options: either milliseconds as a number, or a human-friendly string such as "5s", "30m", "2h", "5d". Parsed by ./duration.durationToMs.