/** * @module csv * * `CsvFile` — a single class implementing both {@link EventSource} * and {@link EventSink} so a CSV file on disk can be either side of * a transfer pipeline (ACT-1128 / #788). * * - As a source: streams one row at a time off a line interface; * the awaited per-event callback gives 1-event-in-flight * backpressure on reads. * - As a sink: serialized `WriteStream.write` await per row, * propagating I/O errors through the chunk callback. * * `commit` / `claim` / `subscribe` and the rest of `Store` are NOT * implemented — `CsvFile` is a transfer-only primitive, not a * store you'd run an Act app against. */ import type { Committed, EventSink, EventSource, Query, Schemas } from "./types/action.js"; /** * Construct a {@link CsvFile} from either a filesystem path (for * reading and/or writing through the OS) or an in-memory blob (a * pre-loaded CSV string, used by the inspector when a CSV arrives * over the wire via tRPC). * * Both modes share the same on-disk format, so the same blob shape * can be round-tripped through the transfer pipeline. */ export type CsvFileOptions = { path: string; } | { blob: string; }; export declare class CsvFile implements EventSource, EventSink { private readonly path; private readonly blob; constructor(options: CsvFileOptions); query(callback: (event: Committed) => void, _filter?: Query): Promise; restore(driver: (callback: (event: Committed) => Promise) => Promise): Promise; dispose(): Promise; } //# sourceMappingURL=csv.d.ts.map