import type { Queue } from './queue.js'; import type { ReadBatchResult } from './queue.js'; interface FlusherOptions { queue: Queue; dir: string; endpoint: string; } /** * The batch envelope that leaves the machine — the ONE definition of it. * * Named and exported so `privacy-doc-sync.test.ts` can derive the documented field list from the * thing that actually builds the request, rather than restating it. That file's own docstring * explains why a hardcoded list is the wrong guard ("a hardcoded list is blind by construction" * to a NEW field reaching the wire), and its batch-wrapper half was exactly such a list. * * `generation` is deliberately NOT here. It rides on each queued `QueueRecord` and groups the * batch, but is not transmitted — see the note on `bumpGeneration` for what it does and does not * do. If it is ever sent, this function is where that becomes visible. */ export declare function buildUploadBody(first: ReadBatchResult['records'][number], events: Record[]): Record; export declare class Flusher { #private; constructor(opts: FlusherOptions); get backoffActive(): boolean; start(): void; stop(): void; drain(): Promise; flush(): Promise; clearBackoff(): void; } export {}; //# sourceMappingURL=flusher.d.ts.map