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.
Parameters
Section titled “Parameters”source
Section titled “source”ReadableStream<Uint8Array<unknown>> | AsyncIterable<Uint8Array<unknown>, any, any>
session
Section titled “session”expected
Section titled “expected”RepositoryExportExpectation
options?
Section titled “options?”RepositoryExportSegmentOptions = {}
Returns
Section titled “Returns”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; }>