import { N as NotificationEvent } from "./types.d-C7l7qdMG.js"; /** * Case-insensitive map of inbound request headers. Values may be a single string or * an array (mirroring `node:http` and `Headers`); verifiers normalise both forms. */ type WebhookHeaders = Record; /** * A provider inbound-webhook verifier: validates the request signature and normalises * the body into a {@link NotificationEvent}. */ interface WebhookVerifier { /** * Normalises a verified webhook body into a {@link NotificationEvent}. * @param body The raw request body (string). * @returns The normalised event, or `undefined` when the body is not a delivery event. */ parse: (body: string) => NotificationEvent | undefined; /** * Verifies the request signature against the shared secret. * @param payload The raw request body (string). * @param headers The inbound request headers. * @param secret The provider signing secret / auth token. * @returns `true` when the signature is valid. */ verify: (payload: string, headers: WebhookHeaders, secret: string) => Promise; } /** * Reads a header value case-insensitively, coercing array values to their first entry. * @param headers The inbound headers. * @param name The header name to read. * @returns The header value, or `undefined` when absent. */ declare const getHeader: (headers: WebhookHeaders, name: string) => string | undefined; export { WebhookHeaders as W, WebhookVerifier as a, getHeader as g };