import { OutboxAdapter, AuditEvent } from "@authhero/adapter-interfaces";
/**
 * Interface for outbox event destinations.
 * Each destination transforms audit events into its own format and delivers them.
 *
 * Destinations may implement `accepts(event)` to filter which events they
 * handle (e.g. the logs destination only accepts log-shaped events, while a
 * webhook destination only accepts `hook.*` events). If `accepts` is absent,
 * the destination receives every event.
 */
export interface EventDestination {
    name: string;
    accepts?(event: AuditEvent): boolean;
    transform(event: AuditEvent): unknown;
    deliver(events: unknown[]): Promise<void>;
}
/**
 * Process specific outbox events by their IDs.
 * Used by per-request processing where each request handles only its own events.
 * Claims events first to prevent concurrent processing by drain workers.
 */
export declare function processOutboxEvents(outbox: OutboxAdapter, ids: string[], destinations: EventDestination[], options?: {
    maxRetries?: number;
}): Promise<void>;
/**
 * Drain unprocessed events from the outbox and deliver to all destinations.
 * Intended for cron/scheduled use to sweep up events that failed per-request processing.
 * Uses claim mechanism for safe multi-worker execution.
 */
export declare function drainOutbox(outbox: OutboxAdapter, destinations: EventDestination[], options?: {
    batchSize?: number;
    maxRetries?: number;
    retentionDays?: number;
}): Promise<void>;
