@tearleads/client-sdk 0.1.259 → 0.1.261
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/blobs/attachments/types.d.ts +3 -1
- package/data/blobs/attachments/types.js.map +1 -1
- package/data/documents/documentContent.d.ts +1 -0
- package/data/documents/documentContent.js +8 -0
- package/data/documents/documentContent.js.map +1 -1
- package/data/persistence/documents/internal/createDocumentWithHistoryCheckpoint.js +1 -0
- package/data/persistence/documents/internal/createDocumentWithHistoryCheckpoint.js.map +1 -1
- package/data/persistence/documents/internal/discardDocument.js +6 -1
- package/data/persistence/documents/internal/discardDocument.js.map +1 -1
- package/data/persistence/documents/internal/documentMutationPersistence.js +1 -0
- package/data/persistence/documents/internal/documentMutationPersistence.js.map +1 -1
- package/data/persistence/documents/internal/documentRows.js +3 -0
- package/data/persistence/documents/internal/documentRows.js.map +1 -1
- package/data/persistence/documents/types.d.ts +2 -0
- package/data/persistence/documents/types.js.map +1 -1
- package/data/sqlite/migrations/localSchemaMigrations.js +9 -0
- package/data/sqlite/migrations/localSchemaMigrations.js.map +1 -1
- package/data/sqlite/schema/documentProjectionSchema.js +12 -2
- package/data/sqlite/schema/documentProjectionSchema.js.map +1 -1
- package/package.json +1 -1
- package/workflows/blobs/hydration/hydrate.js +3 -1
- package/workflows/blobs/hydration/hydrate.js.map +1 -1
- package/workflows/container-contents/info/blobInfo.js +38 -124
- package/workflows/container-contents/info/blobInfo.js.map +1 -1
- package/workflows/container-contents/info/blobInfoReferenceQuery.js +109 -0
- package/workflows/container-contents/info/blobInfoReferenceQuery.js.map +1 -0
- package/workflows/documents/attachments/attachmentFilenameBackfill.d.ts +2 -0
- package/workflows/documents/attachments/attachmentFilenameBackfill.js +65 -0
- package/workflows/documents/attachments/attachmentFilenameBackfill.js.map +1 -0
- package/workflows/documents/create/documentCreationPersistence.js +6 -8
- package/workflows/documents/create/documentCreationPersistence.js.map +1 -1
- package/workflows/documents/documentMutationCommit.js +13 -18
- package/workflows/documents/documentMutationCommit.js.map +1 -1
- package/workflows/documents/historyContent.d.ts +1 -0
- package/workflows/documents/historyContent.js +14 -8
- package/workflows/documents/historyContent.js.map +1 -1
- package/workflows/documents/index.d.ts +1 -0
- package/workflows/documents/index.js +1 -0
- package/workflows/documents/index.js.map +1 -1
|
@@ -41,16 +41,22 @@ export async function mergePersistedDocumentHistory(input) {
|
|
|
41
41
|
*/
|
|
42
42
|
export async function loadPersistedDocumentContent(input) {
|
|
43
43
|
const history = await input.persistence.loadHistoryRestoreState(input.execSql, input.localId);
|
|
44
|
-
|
|
44
|
+
return restorePersistedDocumentContent(history);
|
|
45
|
+
}
|
|
46
|
+
export async function restorePersistedDocumentContent(history) {
|
|
47
|
+
if (!history)
|
|
45
48
|
return null;
|
|
46
|
-
}
|
|
47
49
|
const doc = await createDocument(await getScopedPeerSeed(DOCUMENTS_APP_KIND));
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
try {
|
|
51
|
+
// A tail-only state has no birth checkpoint. Replay its rows on the empty document.
|
|
52
|
+
if (history.snapshot)
|
|
53
|
+
importSnapshot(doc, base64ToBytes(history.snapshot));
|
|
54
|
+
importDocumentHistoryTailUpdates(doc, history.tailUpdates.map((update) => update.updateData));
|
|
55
|
+
return doc;
|
|
56
|
+
}
|
|
57
|
+
catch (error) {
|
|
58
|
+
doc.free();
|
|
59
|
+
throw error;
|
|
52
60
|
}
|
|
53
|
-
importDocumentHistoryTailUpdates(doc, history.tailUpdates.map((update) => update.updateData));
|
|
54
|
-
return doc;
|
|
55
61
|
}
|
|
56
62
|
//# sourceMappingURL=historyContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"historyContent.js","sourceRoot":"","sources":["historyContent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,cAAc,EACd,a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AAC;AACH,CAAC","sourcesContent":["import { base64ToBytes } from \"@tearleads/encoding\";\nimport {\n createDocument,\n getImportBlobMetadata,\n importSnapshot,\n importUpdates,\n} from \"@tearleads/loro\";\nimport {\n DOCUMENTS_APP_KIND,\n type DocumentsPersistence,\n} from \"../../data/persistence/documents/documentsPersistence\";\nimport type { ExecSql } from \"../../data/sqlite/sqlSchema\";\nimport { getScopedPeerSeed } from \"../../data/sync/crdtPeerSeed\";\n\n/**\n * Import durable-history tail rows into a document. Rotation baselines travel\n * through the tail as snapshot-mode blobs, which importUpdates would silently\n * ignore — import them individually.\n */\nexport function importDocumentHistoryTailUpdates(\n doc: Parameters<typeof importSnapshot>[0],\n tailUpdates: readonly string[],\n): void {\n const ordinaryUpdates: Uint8Array[] = [];\n for (const encoded of tailUpdates) {\n const bytes = base64ToBytes(encoded);\n if (getImportBlobMetadata(bytes).mode === \"snapshot\") {\n importSnapshot(doc, bytes);\n } else {\n ordinaryUpdates.push(bytes);\n }\n }\n if (ordinaryUpdates.length > 0) {\n importUpdates(doc, ordinaryUpdates);\n }\n}\n\n/** Merge the latest durable checkpoint and tail into an already-live pane. */\nexport async function mergePersistedDocumentHistory(input: {\n doc: Parameters<typeof importSnapshot>[0];\n execSql: ExecSql;\n localId: string;\n persistence: DocumentsPersistence;\n}): Promise<void> {\n const history = await input.persistence.loadHistoryRestoreState(\n input.execSql,\n input.localId,\n );\n if (!history) return;\n if (history.snapshot.length > 0) {\n importSnapshot(input.doc, base64ToBytes(history.snapshot));\n }\n importDocumentHistoryTailUpdates(\n input.doc,\n history.tailUpdates.map((update) => update.updateData),\n );\n}\n\n/**\n * Load a persisted document's content into a fresh detached document from the\n * durable full-history state (checkpoint + tail) — the only persisted content\n * source. Returns null when the document has no checkpoint yet (a discovered\n * shell that has not hydrated). For store-less readers (diagnostics, profile\n * lookups); the document store restores through its own initialization path.\n */\nexport async function loadPersistedDocumentContent(input: {\n execSql: ExecSql;\n localId: string;\n persistence: DocumentsPersistence;\n}): Promise<Awaited<ReturnType<typeof createDocument>> | null> {\n const history = await input.persistence.loadHistoryRestoreState(\n input.execSql,\n input.localId,\n );\n return restorePersistedDocumentContent(history);\n}\n\nexport async function restorePersistedDocumentContent(\n history: Awaited<ReturnType<DocumentsPersistence[\"loadHistoryRestoreState\"]>>,\n): Promise<Awaited<ReturnType<typeof createDocument>> | null> {\n if (!history) return null;\n const doc = await createDocument(await getScopedPeerSeed(DOCUMENTS_APP_KIND));\n try {\n // A tail-only state has no birth checkpoint. Replay its rows on the empty document.\n if (history.snapshot) importSnapshot(doc, base64ToBytes(history.snapshot));\n importDocumentHistoryTailUpdates(\n doc,\n history.tailUpdates.map((update) => update.updateData),\n );\n return doc;\n } catch (error) {\n doc.free();\n throw error;\n }\n}\n"]}
|
|
@@ -11,6 +11,7 @@ export { DOCUMENT_HISTORY_COMPACTION_MAX_BYTES, DOCUMENT_HISTORY_COMPACTION_MAX_
|
|
|
11
11
|
export type { ExecSql } from "../../data/sqlite/sqlSchema.js";
|
|
12
12
|
export { settleOutgoingPassAndDecideReArm } from "../../data/sync/outgoingUpdateSettlement.js";
|
|
13
13
|
export { didRegainSyncPrerequisites, isDatabaseUnavailableError, } from "../../data/sync/syncCoordinator.js";
|
|
14
|
+
export { backfillDocumentAttachmentNames } from "./attachments/attachmentFilenameBackfill.js";
|
|
14
15
|
export { deleteLocalDocumentAttachment, deletePendingDocumentAttachment, markLocalDocumentAttachmentDetached, saveLocalDocumentAttachments, savePendingDocumentAttachment, } from "./attachments/attachmentPersistence.js";
|
|
15
16
|
export { runSerializedDocumentBlobMutation } from "./attachments/blobMutationLock.js";
|
|
16
17
|
export { reclaimDocumentOrphanBlobs } from "./attachments/orphanBlobReclaims.js";
|
|
@@ -8,6 +8,7 @@ export { DocumentRecordRepository } from "../../data/persistence/documents/recor
|
|
|
8
8
|
export { DOCUMENT_HISTORY_COMPACTION_MAX_BYTES, DOCUMENT_HISTORY_COMPACTION_MAX_ROWS, } from "../../data/persistence/documents/records/documentHistoryPersistence.js";
|
|
9
9
|
export { settleOutgoingPassAndDecideReArm } from "../../data/sync/outgoingUpdateSettlement.js";
|
|
10
10
|
export { didRegainSyncPrerequisites, isDatabaseUnavailableError, } from "../../data/sync/syncCoordinator.js";
|
|
11
|
+
export { backfillDocumentAttachmentNames } from "./attachments/attachmentFilenameBackfill.js";
|
|
11
12
|
export { deleteLocalDocumentAttachment, deletePendingDocumentAttachment, markLocalDocumentAttachmentDetached, saveLocalDocumentAttachments, savePendingDocumentAttachment, } from "./attachments/attachmentPersistence.js";
|
|
12
13
|
export { runSerializedDocumentBlobMutation } from "./attachments/blobMutationLock.js";
|
|
13
14
|
export { reclaimDocumentOrphanBlobs } from "./attachments/orphanBlobReclaims.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,8BAA8B,GAC/B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,wCAAwC,EAAE,MAAM,uCAAuC,CAAC;AACjG,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,OAAO,EAAE,+BAA+B,EAAE,MAAM,4DAA4D,CAAC;AAE7G,OAAO,EAGL,kCAAkC,EAClC,iCAAiC,GAClC,MAAM,8DAA8D,CAAC;AACtE,OAAO,EAEL,kCAAkC,EAClC,oBAAoB,GACrB,MAAM,iDAAiD,CAAC;AASzD,OAAO,EAAE,wBAAwB,EAAE,MAAM,0CAA0C,CAAC;AACpF,OAAO,EACL,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,qEAAqE,CAAC;AAE7E,OAAO,EAAE,gCAAgC,EAAE,MAAM,0CAA0C,CAAC;AAC5F,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,6BAA6B,EAC7B,+BAA+B,EAC/B,mCAAmC,EACnC,4BAA4B,EAC5B,6BAA6B,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OAAO,EACL,mCAAmC,EACnC,iCAAiC,GAElC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,uCAAuC,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EAAE,qCAAqC,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export {\n unwrapContainerKekPath,\n unwrapDocumentContentKeyTarget,\n} from \"../../data/documents/shared/projection\";\nexport { persistedDocumentCreateStateFromResponse } from \"../../data/documents/shared/responses\";\nexport { deriveStableDocumentId } from \"../../data/documents/shared/stableDocumentId\";\nexport { selectDocumentSyncOutgoingBatch } from \"../../data/documents/shared/sync/documentSyncOutgoingBatch\";\nexport type { SyncRemoteDocumentResult } from \"../../data/documents/shared/sync/documentSyncTypes\";\nexport {\n type DocumentSyncUpdateIsolationError,\n type IncomingDocumentSyncUpdateValidator,\n isDocumentSyncUpdateIsolationError,\n validateDocumentSyncUpdateImports,\n} from \"../../data/documents/shared/sync/documentSyncUpdateIsolation\";\nexport {\n type DocumentSyncPullContinuation,\n documentSyncPullContinuationsEqual,\n readPullContinuation,\n} from \"../../data/documents/shared/sync/syncPagination\";\nexport type {\n CreateRemoteDocumentResult,\n DocumentCreateAuthor,\n DocumentLinkSetFailureHandler,\n DocumentLinkSetMutationFailure,\n DocumentRotationProofMode,\n RelinkRemoteDocumentResult,\n} from \"../../data/documents/shared/types\";\nexport { DocumentRecordRepository } from \"../../data/persistence/documents/records\";\nexport {\n DOCUMENT_HISTORY_COMPACTION_MAX_BYTES,\n DOCUMENT_HISTORY_COMPACTION_MAX_ROWS,\n} from \"../../data/persistence/documents/records/documentHistoryPersistence\";\nexport type { ExecSql } from \"../../data/sqlite/sqlSchema\";\nexport { settleOutgoingPassAndDecideReArm } from \"../../data/sync/outgoingUpdateSettlement\";\nexport {\n didRegainSyncPrerequisites,\n isDatabaseUnavailableError,\n} from \"../../data/sync/syncCoordinator\";\nexport {\n deleteLocalDocumentAttachment,\n deletePendingDocumentAttachment,\n markLocalDocumentAttachmentDetached,\n saveLocalDocumentAttachments,\n savePendingDocumentAttachment,\n} from \"./attachments/attachmentPersistence\";\nexport { runSerializedDocumentBlobMutation } from \"./attachments/blobMutationLock\";\nexport { reclaimDocumentOrphanBlobs } from \"./attachments/orphanBlobReclaims\";\nexport { resolveDocumentCreateAuthor } from \"./author\";\nexport {\n buildMaterializedDocumentCreatePlan,\n documentWriterProjectionFromCreateResponse,\n} from \"./create\";\nexport type { CreateRemoteDocumentRequest } from \"./create/remoteDocumentCreateRequest\";\nexport {\n type DocumentHistory,\n type DocumentHistoryStop,\n type DocumentHistoryVersion,\n type DocumentHistoryVersionEntry,\n type DocumentHistoryView,\n openDocumentHistory,\n} from \"./history/documentHistory\";\nexport {\n type DocumentHistoryChange,\n type DocumentHistoryRowChange,\n type DocumentHistoryTextChange,\n isEmptyDocumentHistoryChange,\n} from \"./history/documentHistoryChange\";\nexport {\n importDocumentHistoryTailUpdates,\n loadPersistedDocumentContent,\n mergePersistedDocumentHistory,\n} from \"./historyContent\";\nexport { buildMaterializedDocumentLinkSetMutationPlan } from \"./linkSet\";\nexport {\n createLinkSetAttachmentReuse,\n type LinkSetAttachmentReuse,\n} from \"./linkSet/linkSetBlobRewraps\";\nexport {\n enqueuePendingDocumentUpdate,\n listPendingDocumentUpdates,\n} from \"./pendingUpdatePersistence\";\nexport {\n type AttachmentRemovalRows,\n type AttachmentStagingRows,\n DOCUMENTS_APP_KIND,\n type DocumentBirthResult,\n type DocumentRecord,\n type DocumentsPersistence,\n defaultDocumentsPersistence,\n type LocalAttachmentRecord,\n loadPersistedDocumentStoreState,\n type PendingAttachmentRecord,\n type PendingAttachmentUploadIdentity,\n type PendingUpdateInsert,\n type PendingUpdateRecord,\n persistDocumentState,\n type QueuedPendingUpdateRecord,\n type RelinkPersistedDocumentInput,\n runSerializedSqlMutation,\n} from \"./persistence\";\nexport {\n createDocumentProjectionUserKeyResolver,\n type DocumentProjectionKeyRuntime,\n type DocumentProjectionUserKeyResolver,\n didDocumentProjectionKeyRuntimeChange,\n} from \"./projectionKeys\";\nexport { buildDocumentPurgeRequest } from \"./purge\";\nexport {\n type DiscardedDocumentShellResult,\n deletePersistedDocument,\n discardPersistedDocumentToShell,\n} from \"./purge/persistedDocumentRemoval\";\nexport type { RemoteDocumentServiceApi } from \"./remote/remoteDocumentCollaborators\";\nexport { RemoteDocumentService } from \"./remote/remoteDocumentService\";\nexport {\n createDocumentsWorkflowRuntime,\n createDocumentsWorkflowRuntimeFromSnapshot,\n type DocumentsWorkflowRuntime,\n type DocumentsWorkflowRuntimeGroups,\n type DocumentsWorkflowRuntimeInfra,\n type DocumentsWorkflowRuntimeInput,\n type DocumentsWorkflowRuntimeInputGroups,\n type DocumentsWorkflowRuntimeSnapshot,\n} from \"./runtime\";\nexport { documentCreateSeedCandidate } from \"./sync/initialSync\";\nexport type { SyncRemoteDocumentRequest } from \"./sync/remoteDocumentSyncPass\";\nexport type { DocumentSyncContainerRekeyBuilder } from \"./sync/syncAttemptState\";\nexport {\n type DocumentSyncLane,\n registerDocumentSyncLane,\n requestDocumentSyncLaneAndWait,\n} from \"./sync/syncLane\";\nexport {\n DOCUMENT_SYNC_TRACE_FRAGMENT,\n DOCUMENT_SYNC_TRACE_PATTERN,\n} from \"./sync/syncTrace\";\nexport {\n describeDocumentRevalidationFailure,\n describeDocumentSyncSubmitFailure,\n type TerminalSubmitFailureHandler,\n} from \"./syncFailures/syncFailureClassification\";\nexport { shouldClearDocumentSyncFailureAfterPass } from \"./syncFailures/syncFailureClearance\";\nexport { DocumentRawHistoryUnavailableError } from \"./syncPlan/syncContentKeys\";\nexport type { RekeyPendingUpdate } from \"./syncRekeys/syncRecoveryRekey\";\nexport { createDocumentWriterPublicKeyResolver } from \"./writerKeys\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,8BAA8B,G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AM,8BAA8B,CAAC;AACtC,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAC3B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAGL,kBAAkB,EAIlB,2BAA2B,EAE3B,+BAA+B,EAK/B,oBAAoB,EAGpB,wBAAwB,GACzB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,uCAAuC,EAGvC,qCAAqC,GACtC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAEL,uBAAuB,EACvB,+BAA+B,GAChC,MAAM,kCAAkC,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,8BAA8B,EAC9B,0CAA0C,GAO3C,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAC;AAGjE,OAAO,EAEL,wBAAwB,EACxB,8BAA8B,GAC/B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,4BAA4B,EAC5B,2BAA2B,GAC5B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,mCAAmC,EACnC,iCAAiC,GAElC,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,uCAAuC,EAAE,MAAM,qCAAqC,CAAC;AAC9F,OAAO,EAAE,kCAAkC,EAAE,MAAM,4BAA4B,CAAC;AAEhF,OAAO,EAAE,qCAAqC,EAAE,MAAM,cAAc,CAAC","sourcesContent":["export {\n unwrapContainerKekPath,\n unwrapDocumentContentKeyTarget,\n} from \"../../data/documents/shared/projection\";\nexport { persistedDocumentCreateStateFromResponse } from \"../../data/documents/shared/responses\";\nexport { deriveStableDocumentId } from \"../../data/documents/shared/stableDocumentId\";\nexport { selectDocumentSyncOutgoingBatch } from \"../../data/documents/shared/sync/documentSyncOutgoingBatch\";\nexport type { SyncRemoteDocumentResult } from \"../../data/documents/shared/sync/documentSyncTypes\";\nexport {\n type DocumentSyncUpdateIsolationError,\n type IncomingDocumentSyncUpdateValidator,\n isDocumentSyncUpdateIsolationError,\n validateDocumentSyncUpdateImports,\n} from \"../../data/documents/shared/sync/documentSyncUpdateIsolation\";\nexport {\n type DocumentSyncPullContinuation,\n documentSyncPullContinuationsEqual,\n readPullContinuation,\n} from \"../../data/documents/shared/sync/syncPagination\";\nexport type {\n CreateRemoteDocumentResult,\n DocumentCreateAuthor,\n DocumentLinkSetFailureHandler,\n DocumentLinkSetMutationFailure,\n DocumentRotationProofMode,\n RelinkRemoteDocumentResult,\n} from \"../../data/documents/shared/types\";\nexport { DocumentRecordRepository } from \"../../data/persistence/documents/records\";\nexport {\n DOCUMENT_HISTORY_COMPACTION_MAX_BYTES,\n DOCUMENT_HISTORY_COMPACTION_MAX_ROWS,\n} from \"../../data/persistence/documents/records/documentHistoryPersistence\";\nexport type { ExecSql } from \"../../data/sqlite/sqlSchema\";\nexport { settleOutgoingPassAndDecideReArm } from \"../../data/sync/outgoingUpdateSettlement\";\nexport {\n didRegainSyncPrerequisites,\n isDatabaseUnavailableError,\n} from \"../../data/sync/syncCoordinator\";\nexport { backfillDocumentAttachmentNames } from \"./attachments/attachmentFilenameBackfill\";\nexport {\n deleteLocalDocumentAttachment,\n deletePendingDocumentAttachment,\n markLocalDocumentAttachmentDetached,\n saveLocalDocumentAttachments,\n savePendingDocumentAttachment,\n} from \"./attachments/attachmentPersistence\";\nexport { runSerializedDocumentBlobMutation } from \"./attachments/blobMutationLock\";\nexport { reclaimDocumentOrphanBlobs } from \"./attachments/orphanBlobReclaims\";\nexport { resolveDocumentCreateAuthor } from \"./author\";\nexport {\n buildMaterializedDocumentCreatePlan,\n documentWriterProjectionFromCreateResponse,\n} from \"./create\";\nexport type { CreateRemoteDocumentRequest } from \"./create/remoteDocumentCreateRequest\";\nexport {\n type DocumentHistory,\n type DocumentHistoryStop,\n type DocumentHistoryVersion,\n type DocumentHistoryVersionEntry,\n type DocumentHistoryView,\n openDocumentHistory,\n} from \"./history/documentHistory\";\nexport {\n type DocumentHistoryChange,\n type DocumentHistoryRowChange,\n type DocumentHistoryTextChange,\n isEmptyDocumentHistoryChange,\n} from \"./history/documentHistoryChange\";\nexport {\n importDocumentHistoryTailUpdates,\n loadPersistedDocumentContent,\n mergePersistedDocumentHistory,\n} from \"./historyContent\";\nexport { buildMaterializedDocumentLinkSetMutationPlan } from \"./linkSet\";\nexport {\n createLinkSetAttachmentReuse,\n type LinkSetAttachmentReuse,\n} from \"./linkSet/linkSetBlobRewraps\";\nexport {\n enqueuePendingDocumentUpdate,\n listPendingDocumentUpdates,\n} from \"./pendingUpdatePersistence\";\nexport {\n type AttachmentRemovalRows,\n type AttachmentStagingRows,\n DOCUMENTS_APP_KIND,\n type DocumentBirthResult,\n type DocumentRecord,\n type DocumentsPersistence,\n defaultDocumentsPersistence,\n type LocalAttachmentRecord,\n loadPersistedDocumentStoreState,\n type PendingAttachmentRecord,\n type PendingAttachmentUploadIdentity,\n type PendingUpdateInsert,\n type PendingUpdateRecord,\n persistDocumentState,\n type QueuedPendingUpdateRecord,\n type RelinkPersistedDocumentInput,\n runSerializedSqlMutation,\n} from \"./persistence\";\nexport {\n createDocumentProjectionUserKeyResolver,\n type DocumentProjectionKeyRuntime,\n type DocumentProjectionUserKeyResolver,\n didDocumentProjectionKeyRuntimeChange,\n} from \"./projectionKeys\";\nexport { buildDocumentPurgeRequest } from \"./purge\";\nexport {\n type DiscardedDocumentShellResult,\n deletePersistedDocument,\n discardPersistedDocumentToShell,\n} from \"./purge/persistedDocumentRemoval\";\nexport type { RemoteDocumentServiceApi } from \"./remote/remoteDocumentCollaborators\";\nexport { RemoteDocumentService } from \"./remote/remoteDocumentService\";\nexport {\n createDocumentsWorkflowRuntime,\n createDocumentsWorkflowRuntimeFromSnapshot,\n type DocumentsWorkflowRuntime,\n type DocumentsWorkflowRuntimeGroups,\n type DocumentsWorkflowRuntimeInfra,\n type DocumentsWorkflowRuntimeInput,\n type DocumentsWorkflowRuntimeInputGroups,\n type DocumentsWorkflowRuntimeSnapshot,\n} from \"./runtime\";\nexport { documentCreateSeedCandidate } from \"./sync/initialSync\";\nexport type { SyncRemoteDocumentRequest } from \"./sync/remoteDocumentSyncPass\";\nexport type { DocumentSyncContainerRekeyBuilder } from \"./sync/syncAttemptState\";\nexport {\n type DocumentSyncLane,\n registerDocumentSyncLane,\n requestDocumentSyncLaneAndWait,\n} from \"./sync/syncLane\";\nexport {\n DOCUMENT_SYNC_TRACE_FRAGMENT,\n DOCUMENT_SYNC_TRACE_PATTERN,\n} from \"./sync/syncTrace\";\nexport {\n describeDocumentRevalidationFailure,\n describeDocumentSyncSubmitFailure,\n type TerminalSubmitFailureHandler,\n} from \"./syncFailures/syncFailureClassification\";\nexport { shouldClearDocumentSyncFailureAfterPass } from \"./syncFailures/syncFailureClearance\";\nexport { DocumentRawHistoryUnavailableError } from \"./syncPlan/syncContentKeys\";\nexport type { RekeyPendingUpdate } from \"./syncRekeys/syncRecoveryRekey\";\nexport { createDocumentWriterPublicKeyResolver } from \"./writerKeys\";\n"]}
|