Host-owned durable queue. Browser storage lives in the optional ./browser entrypoint.
- Package
@sheetwrite/core
- Source
packages/core/src/sync.ts#L33
Members 4
load
load(documentId: string, options: PendingCommitLoadOptionsinterface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}interface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}interface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}Mandatory bounds for one durable pending-commit restore.API reference →): Promise<readonly PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →[]>;
put
put(commit: PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →, signal?: AbortSignal): Promise<void>;
remove
remove(documentId: string, clientMutationId: string, signal?: AbortSignal): Promise<void>;
replace Atomically replaces one document queue only if its ordered IDs still match the caller's expected view.
replace( documentId: string, expectedClientMutationIds: readonly string[], commits: readonly PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →[], signal?: AbortSignal, ): Promise<void>;
Declaration
View full TypeScript declaration
export interface PendingCommitStorage {
options: PendingCommitLoadOptionsinterface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}interface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}interface PendingCommitLoadOptions {
signal?: AbortSignal;
maxRecords: number;
maxOperations: number;
maxBytes: number;
}Mandatory bounds for one durable pending-commit restore.API reference →, ): Promise<readonly PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →[]>; put(commit: PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →, signal?: AbortSignal): Promise<void>; clientMutationId: string,
expectedClientMutationIds: readonly string[],
commits: readonly PendingCommitinterface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}interface PendingCommit {
documentId: string;
baseVersion: number;
clientMutationId: string;
readonly operations: readonly DocumentOp[];
}Immutable local operation batch awaiting a host acknowledgement.API reference →[],