js-bao-wss-client / DocumentSnapshotsAPI
Interface: DocumentSnapshotsAPI
Snapshot builds of a large document. Accessed as client.documents.snapshots.
A large document's records live in a base snapshot plus the overlays sealed since it, and the server rebuilds that base as the document grows. These reads are the window onto what it built and whether it verified.
Methods
build()
build(
documentId):Promise<DocumentSnapshotRequest>
Snapshot the document now, instead of waiting for the size or age trigger.
Seals the epoch the document is writing to and starts the base build that seal arms; the answer names the epoch that was sealed and the build, so DocumentSnapshotsAPI.get can follow it. An epoch that carries nothing is not sealed at all and the answer says so.
Requires the permission a bulk load requires — a document grant at read-write or above, or an app admin — not merely read access.
Parameters
documentId
string
The large document to snapshot
Returns
Promise<DocumentSnapshotRequest>
get()
get(
documentId,buildId):Promise<DocumentSnapshotBuild>
One build, with its verification result and its stage timings.
Parameters
documentId
string
The document the build belongs to
buildId
string
The build to read
Returns
Promise<DocumentSnapshotBuild>
list()
list(
documentId,options?):Promise<DocumentSnapshotPage>
A document's snapshot builds, newest first.
Parameters
documentId
string
The document whose builds to list
options?
Page size and cursor
cursor?
string
limit?
number
Returns
Promise<DocumentSnapshotPage>