import type { WebhookRow } from '../types/index.js'; export type WebhookTarget = { webhook: WebhookRow; /** Pending deliveries for this webhook (cached, see `webhookCache`). */ pending: number; }; export type MatchResult = { /** Webhooks that should get a delivery for this event. */ matched: WebhookRow[]; /** Webhooks that wanted it but are at the pending ceiling (backlog guard). */ saturated: WebhookRow[]; }; /** * Which webhooks should receive an event with this topic. Pure: the caller * supplies the cached targets and the ceiling. */ export declare function matchWebhooks(targets: WebhookTarget[], topic: string, ceiling: number): MatchResult;