import { Pipe, PipeOutput, PipeInput } from 'valleyed'; import { D as Db } from '../db-C8YY1yTO.js'; import '../core-BrkNSwvc.js'; import 'mongodb'; import '../kafka-Cf-TUJgv.js'; import '../overrides-6Hxg764S.js'; type EventDefinition

, R> = { pipe: P; handle: (payload: PipeOutput

, context: EventContext) => R | Promise; sync?: (result: R, payload: PipeOutput

, context: EventContext) => void; async?: (result: R, payload: PipeOutput

, context: EventContext) => void; }; type EventContext = { key: string; by: string | undefined; at: Date; firstRun: boolean; }; type EventDoc = { key: string; name: string; ts: number; body: unknown; steps: { status: 'start' | 'sync' | 'async'; ts: number; }[]; by?: string; }; type Context = Partial>; declare class EventAudit { #private; private db; private table; private definitions; private asyncQueue; constructor(db: Db, dbName: string); replay(from?: Date): Promise; rerun(key: string): Promise; register

, R>(name: string, def: EventDefinition): (payload: PipeInput

, context: Context) => Promise; } export { EventAudit, type EventContext, type EventDefinition, type EventDoc };