export interface HistoryExportStorageOptions { dbPath?: string; } import { type HistoryExportRecord, type HistoryExportSelection } from './delivery-contracts.js'; export interface HistoryExportLimits { max_batch_records: number; max_batch_bytes: number; max_scan_records: number; } export declare const DEFAULT_EXPORT_LIMITS: HistoryExportLimits; export interface HistoryExportHandle { snapshot_id: string; cursor: string; expires_at_ms: number; } export interface HistoryExportPage { schema_version: number; origin_id: string; records: HistoryExportRecord[]; next_cursor: string | null; } export interface HistoryExportOptions extends HistoryExportStorageOptions { /** Resolved page limits. When set, `publishedLimits` is not read. */ limits?: HistoryExportLimits; /** A delivery receipt, or the `GET /v1/delivery/limits` body. */ publishedLimits?: unknown; ttlMs?: number; signal?: AbortSignal; } /** Page limits for a published delivery receipt or `GET /v1/delivery/limits` body. * * A positive integer `maxRecords` is the page's record cap, clamped to the * native maximum. Anything else leaves the page at {@link DEFAULT_EXPORT_LIMITS}. * `maxRequestBytes` counts the decoded HTTP body, not this page's JSON, so * the byte cap stays 1 MiB. */ export declare function exportLimitsFromPublished(published?: unknown): HistoryExportLimits; /** A consistent snapshot of the store as it stands now. */ export declare function beginHistoryExport(selection: HistoryExportSelection, options?: HistoryExportOptions): Promise; export declare function readHistoryExportPage(cursor: string, options?: HistoryExportStorageOptions): Promise; export declare function closeHistoryExport(snapshotId: string, options?: HistoryExportStorageOptions): Promise; /** Records carry the change feed's identity and revision for each row, its * provenance, and the row as stored. Closing/breaking the iterator releases its * snapshot. A snapshot is the store as it stood when it began, and lives in * this process until closed or expired; the cursor of the page just read * serves that page again. */ export declare function exportHistory(selection: HistoryExportSelection, options?: HistoryExportOptions): AsyncGenerator; /** Each chunk is one complete NDJSON record. Success means export completed, * not that a downstream process or remote service durably accepted it. */ export declare function exportHistoryNdjson(selection: HistoryExportSelection, options?: HistoryExportOptions): AsyncGenerator; //# sourceMappingURL=history-export.d.ts.map