@xtandard/audit/sinks/webhook
Standard Webhooks sink: webhookSink() POSTs signed batches (or items),
verifiable by @xtandard/webhooks/receiver, Svix and the official
standardwebhooks libraries. Zero dependencies.
import { … } from "@xtandard/audit/sinks/webhook";Functions
Section titled “Functions”| Name | Summary |
|---|---|
batchWebhookId |
The webhook-id of a batch: the item’s own id when there is exactly one, otherwise bat_ + a SHA-256 prefix over the stream, tenant and item ids — stable across re-sends of the same batch. |
signWebhook |
Sign one message: v1, + base64(HMAC-SHA256(key, ${id}.${timestamp}.${body})). timestamp is unix seconds. |
webhookSink |
Create a Standard Webhooks-signed sink. |
Interfaces
Section titled “Interfaces”| Name | Summary |
|---|---|
WebhookSinkOptions |
Options for webhookSink. |
Variables
Section titled “Variables”| Name | Summary |
|---|---|
WEBHOOK_SECRET_PREFIX |
Prefix of a Standard Webhooks symmetric secret. |
Re-exports
Section titled “Re-exports”| Name | Documented on |
|---|---|
SinkFetch |
@xtandard/audit/sinks/datadog |
SinkHeaders |
@xtandard/audit/sinks/datadog |
SinkHttpError |
@xtandard/audit/sinks/datadog |