import { type DispatchOutboundWebhooksResult, type OutboundWebhookStoreOptions, type ReconcileOutboundWebhooksResult } from "./outbound-webhooks.js"; export declare const DEFAULT_OUTBOUND_WEBHOOK_WORKER_INTERVAL_MS = 5000; export declare const MIN_OUTBOUND_WEBHOOK_WORKER_INTERVAL_MS = 250; export declare const MAX_OUTBOUND_WEBHOOK_WORKER_INTERVAL_MS = 90000; export declare const DEFAULT_OUTBOUND_WEBHOOK_WORKER_FAILURE_LIMIT = 5; export declare const DEFAULT_OUTBOUND_WEBHOOK_WORKER_FAILURE_BACKOFF_MS = 1000; export declare const MIN_OUTBOUND_WEBHOOK_WORKER_FAILURE_BACKOFF_MS = 250; export declare const MAX_OUTBOUND_WEBHOOK_WORKER_FAILURE_BACKOFF_MS = 30000; export declare const DEFAULT_OUTBOUND_WEBHOOK_WORKER_HEARTBEAT_INTERVAL_MS = 30000; export declare const MIN_OUTBOUND_WEBHOOK_WORKER_HEARTBEAT_INTERVAL_MS = 250; export declare const MAX_OUTBOUND_WEBHOOK_WORKER_HEARTBEAT_INTERVAL_MS = 60000; export interface RunOutboundWebhookWorkerOptions { store: OutboundWebhookStoreOptions; signal?: AbortSignal; workerId?: string; intervalMs?: number; dispatchLimit?: number; reconcileLimit?: number; fetcher?: typeof fetch; resolveSecret?: (secretRef: string) => string | undefined; onTick?: (result: OutboundWebhookWorkerTickResult) => void; onTickError?: (result: OutboundWebhookWorkerTickError) => void; failureLimit?: number; failureBackoffMs?: number; heartbeatIntervalMs?: number; } export interface OutboundWebhookWorkerTickResult { reconcile: ReconcileOutboundWebhooksResult; dispatch: DispatchOutboundWebhooksResult; completedAt: string; } export interface OutboundWebhookWorkerTickError { error: string; consecutiveFailures: number; retryInMs: number; failedAt: string; } export interface RunOutboundWebhookWorkerResult { workerId: string; startedAt: string; stoppedAt: string; ticks: number; claimed: number; succeeded: number; retried: number; exhausted: number; } /** * Run a lease-safe long-lived outbox worker. The worker records durable * heartbeats, reconciles abandoned leases before each dispatch batch, and * marks its final state during graceful shutdown. */ export declare function runOutboundWebhookWorker(options: RunOutboundWebhookWorkerOptions): Promise;