Skip to content

readRepositoryExportStream

readRepositoryExportStream(source, session, expected, options?): AsyncGenerator<{ wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "shape"; shapes: object[]; } | { wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "thing" | "collection"; shapes: object[]; } | { wref: string; durableId: string; version: number; active: true; data: Record<string, unknown>; kind: "assertion"; shapes: object[]; about: { wref: string; v?: number; durableId: string; }; affirmed: object[]; } | { wref: string; durableId: string; version: number; kind: "shape" | "thing" | "assertion" | "collection"; 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.

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

RepositoryExportSession

RepositoryExportExpectation

RepositoryExportSegmentOptions = {}

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