import { StoredAuditEntry } from "./types.js"; import { AuditDb } from "./audit-db.js"; //#region src/audit/export.d.ts /** * Minimal writer abstraction. The framework deliberately does not * depend on Node's `stream` module here so consumers can pipe the * output to any sink (file, HTTP response, in-memory buffer). * * @stable */ interface AuditExportWriter { readonly write: (line: string) => void | Promise; } /** * Options for `exportAudit(...)`. * * @stable */ interface ExportAuditOptions { readonly fromSeq?: number; readonly toSeq?: number; readonly writer: AuditExportWriter; /** Predicate to filter individual entries. */ readonly include?: (entry: StoredAuditEntry) => boolean; } /** * Stream every entry in `[fromSeq, toSeq]` (inclusive) into `writer` * as JSONL. Each line is canonical JSON terminated by `\n`. * * Returns the number of lines written. * * @stable */ declare function exportAudit(db: AuditDb, options: ExportAuditOptions): Promise<{ readonly rows: number; }>; //#endregion export { AuditExportWriter, ExportAuditOptions, exportAudit }; //# sourceMappingURL=export.d.ts.map