/** * HTTP partner deliverer for outbox entries. * * Binding: outbound event → `POST` URL is **not** a Manifest `webhook` decl * (webhooks are inbound only). Hosts wire this into `runOutboxWorker` / * `drainOutboxOnce` with a per-event URL map. * * Delivery is at-least-once; partners MUST dedupe on `entryId`. */ import type { OutboxEntry } from './outbox-store'; import type { OutboxDeliver } from './worker'; /** Wildcard route key used when no event-specific URL is configured. */ export declare const HTTP_PARTNER_DEFAULT_ROUTE = "*"; export interface HttpPartnerDelivererOptions { /** * Event name → absolute HTTPS/HTTP URL. * Optional `*` key is the fallback when the event name is unmapped. */ routes: Record; /** Extra request headers (merged under Content-Type / Manifest headers). */ headers?: Record; /** * When set, sends `X-Manifest-Signature: sha256=` over the raw body * (HMAC-SHA256). Partners verify with the same secret. */ hmacSecret?: string; /** Injected fetch (tests). Defaults to global `fetch`. */ fetchFn?: typeof fetch; /** Abort slow partner calls (ms). Default: 30_000. */ timeoutMs?: number; } export interface HttpPartnerRequestBody { entryId: string; enqueuedAt: number; event: OutboxEntry['event']; } /** * Resolves partner URLs and POSTs outbox payloads. * Use {@link HttpPartnerDeliverer.asDeliver} with the outbox worker. */ export declare class HttpPartnerDeliverer { private readonly routes; private readonly headers; private readonly hmacSecret; private readonly fetchFn; private readonly timeoutMs; constructor(options: HttpPartnerDelivererOptions); /** Bound {@link OutboxDeliver} for `runOutboxWorker` / `drainOutboxOnce`. */ asDeliver(): OutboxDeliver; resolveUrl(eventName: string): string; deliver(entry: OutboxEntry): Promise; } /** Factory returning an {@link OutboxDeliver} callback. */ export declare function createHttpPartnerDeliverer(options: HttpPartnerDelivererOptions): OutboxDeliver; //# sourceMappingURL=http-partner-deliverer.d.ts.map