Skip to content

readRepositoryExportStream

readRepositoryExportStream(source, session, expected, options?): AsyncGenerator<{ wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "thing"; shapes: string[]; collections?: object[]; about?: { wref: string; v?: number; durableId: string; }; affirmed?: object[]; } | { wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "shape"; shapes: string[]; retracted?: true; } | { wref: string; durableId: string; version: number; kind: "thing" | "shape"; active: false; }>

Read one HTTP response body as export records, verifying it against the session as it goes: header continuity, per-line canonical decode, the rolling digest, and finally the trailer.

AsyncIterable<Uint8Array<unknown>, any, any> | ReadableStream<Uint8Array<unknown>>

RepositoryExportSession

RepositoryExportExpectation

RepositoryExportSegmentOptions = {}

AsyncGenerator<{ wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "thing"; shapes: string[]; collections?: object[]; about?: { wref: string; v?: number; durableId: string; }; affirmed?: object[]; } | { wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "shape"; shapes: string[]; retracted?: true; } | { wref: string; durableId: string; version: number; kind: "thing" | "shape"; active: false; }>