@tearleads/client-sdk 0.1.61 → 0.1.63
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/client/containerContents/documentDiscovery.js +5 -5
- package/client/containerContents/documentDiscovery.js.map +1 -1
- package/client/containerContents/index.d.ts +7 -7
- package/client/containerContents/index.js +7 -7
- package/client/containerContents/index.js.map +1 -1
- package/client/containerContents/types.d.ts +6 -6
- package/client/containerContents/types.js.map +1 -1
- package/client/deviceFirst/index.js +2 -2
- package/client/deviceFirst/index.js.map +1 -1
- package/client/organizations/currentPrincipalMutations.js +5 -5
- package/client/organizations/currentPrincipalMutations.js.map +1 -1
- package/client/organizations/organizationDataUsage.js +1 -1
- package/client/organizations/organizationDataUsage.js.map +1 -1
- package/client/organizations/organizationGroupHistory.js +1 -1
- package/client/organizations/organizationGroupHistory.js.map +1 -1
- package/client/organizations/organizationGroupNameHydration.js +3 -3
- package/client/organizations/organizationGroupNameHydration.js.map +1 -1
- package/client/organizations/organizationHistory.js +2 -2
- package/client/organizations/organizationHistory.js.map +1 -1
- package/client/organizations/organizationReadModels.js +1 -1
- package/client/organizations/organizationReadModels.js.map +1 -1
- package/client/organizations/principalContainerMutations.js +1 -1
- package/client/organizations/principalContainerMutations.js.map +1 -1
- package/client/organizations/principalMutationRecovery.js.map +1 -1
- package/client/organizations/principalMutations.js +5 -5
- package/client/organizations/principalMutations.js.map +1 -1
- package/client/runtime/principalMutationApi.d.ts +1 -1
- package/client/runtime/principalMutationApi.js +2 -2
- package/client/runtime/principalMutationApi.js.map +1 -1
- package/client/runtime/principalMutationDispatch.js +1 -1
- package/client/runtime/principalMutationDispatch.js.map +1 -1
- package/client/session/index.js +1 -1
- package/client/session/index.js.map +1 -1
- package/client/session/sessionOrganizationCreation.js +1 -1
- package/client/session/sessionOrganizationCreation.js.map +1 -1
- package/client/session/sessionPurgeRecovery.js +2 -2
- package/client/session/sessionPurgeRecovery.js.map +1 -1
- package/package.json +1 -1
- package/stores/container-contents/containerStatePersistence.js +1 -1
- package/stores/container-contents/documentRecovery.js +2 -2
- package/stores/container-contents/documentRecovery.js.map +1 -1
- package/stores/container-contents/documentWork.js.map +1 -1
- package/stores/container-contents/localRefresh.js +2 -2
- package/stores/container-contents/localRefresh.js.map +1 -1
- package/stores/container-contents/operations.js +2 -2
- package/stores/container-contents/operations.js.map +1 -1
- package/stores/container-contents/remoteContainerIngestion.js +1 -1
- package/stores/container-contents/remoteEventSync.js +1 -1
- package/stores/container-contents/remoteHydrationRequest.js +1 -1
- package/stores/container-contents/setContainerIconOperation.js +2 -2
- package/stores/container-contents/setContainerIconOperation.js.map +1 -1
- package/stores/container-contents/shareOperations.js +1 -1
- package/stores/container-contents/startupHydration.js +1 -1
- package/stores/container-contents/syncAgent.d.ts +2 -2
- package/stores/container-contents/syncAgentTypes.d.ts +1 -1
- package/stores/container-contents/syncLaneIteration.js +2 -2
- package/stores/container-contents/syncLaneIteration.js.map +1 -1
- package/stores/container-contents/systemContainerIcon.js +1 -1
- package/stores/container-contents/systemContainerIcon.js.map +1 -1
- package/stores/documents/documentStore/attachmentHydrationCommit.js +1 -1
- package/stores/documents/documentStore/attachmentHydrationCommit.js.map +1 -1
- package/stores/documents/documentStore/attachmentUploadAttempt.js +1 -1
- package/stores/documents/documentStore/syncRemoteSignals.js +1 -1
- package/stores/documents/documentStore/syncRemoteSignals.js.map +1 -1
- package/stores/documents/documentStore/syncShared.js +1 -1
- package/stores/documents/documentStore/syncShared.js.map +1 -1
- package/workflows/blobs/detach.js +1 -1
- package/workflows/blobs/detach.js.map +1 -1
- package/workflows/blobs/hydration/blobChunkDecryption.js +34 -0
- package/workflows/blobs/hydration/blobChunkDecryption.js.map +1 -0
- package/workflows/blobs/hydration/decrypt.d.ts +12 -0
- package/workflows/blobs/hydration/decrypt.js +246 -0
- package/workflows/blobs/hydration/decrypt.js.map +1 -0
- package/workflows/blobs/hydration/hydrate.d.ts +56 -0
- package/workflows/blobs/hydration/hydrate.js +190 -0
- package/workflows/blobs/hydration/hydrate.js.map +1 -0
- package/workflows/blobs/hydration/hydrationResults.js +23 -0
- package/workflows/blobs/hydration/hydrationResults.js.map +1 -0
- package/workflows/blobs/index.d.ts +3 -3
- package/workflows/blobs/index.js +3 -3
- package/workflows/blobs/index.js.map +1 -1
- package/workflows/blobs/upload/automaticMultipartUpload.js +9 -0
- package/workflows/blobs/upload/automaticMultipartUpload.js.map +1 -0
- package/workflows/blobs/upload/index.d.ts +10 -0
- package/workflows/blobs/upload/index.js +243 -0
- package/workflows/blobs/upload/index.js.map +1 -0
- package/workflows/blobs/upload/multipartFirstParts.js +82 -0
- package/workflows/blobs/upload/multipartFirstParts.js.map +1 -0
- package/workflows/blobs/upload/multipartStageFailures.js +36 -0
- package/workflows/blobs/upload/multipartStageFailures.js.map +1 -0
- package/workflows/blobs/upload/multipartStageResolution.js.map +1 -0
- package/workflows/blobs/upload/multipartUpload.js +274 -0
- package/workflows/blobs/upload/multipartUpload.js.map +1 -0
- package/workflows/blobs/verification/attachmentBindingVerification.js +49 -0
- package/workflows/blobs/verification/attachmentBindingVerification.js.map +1 -0
- package/workflows/blobs/verification/attachmentDecryptor.js +41 -0
- package/workflows/blobs/verification/attachmentDecryptor.js.map +1 -0
- package/workflows/blobs/verification/attachmentKeyAuthenticator.js +68 -0
- package/workflows/blobs/verification/attachmentKeyAuthenticator.js.map +1 -0
- package/workflows/blobs/verification/retainedAttachmentVerification.js +40 -0
- package/workflows/blobs/verification/retainedAttachmentVerification.js.map +1 -0
- package/workflows/blobs/verification/verifiedWrapScope.js +20 -0
- package/workflows/blobs/verification/verifiedWrapScope.js.map +1 -0
- package/workflows/blobs/verification/writerProjection.js +29 -0
- package/workflows/blobs/verification/writerProjection.js.map +1 -0
- package/workflows/container-contents/attribution/documentAttributionRanges.d.ts +26 -0
- package/workflows/container-contents/attribution/documentCharacterBlame.js +33 -0
- package/workflows/container-contents/attribution/documentCharacterBlame.js.map +1 -0
- package/workflows/container-contents/attribution/documentFieldBlame.js +26 -0
- package/workflows/container-contents/attribution/documentFieldBlame.js.map +1 -0
- package/workflows/container-contents/container-state/createIntentSync.js +1 -1
- package/workflows/container-contents/container-state/createIntentSync.js.map +1 -1
- package/workflows/container-contents/container-state/moveIntentSync.js +1 -1
- package/workflows/container-contents/container-state/moveIntentSync.js.map +1 -1
- package/workflows/container-contents/container-state/purgeTree.js +2 -2
- package/workflows/container-contents/container-state/purgeTree.js.map +1 -1
- package/workflows/container-contents/container-state/purgeTreeContainerDeletion.js.map +1 -1
- package/workflows/container-contents/container-state/remote.js +1 -1
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/sharePersistence.js +2 -2
- package/workflows/container-contents/container-state/sharePersistence.js.map +1 -1
- package/workflows/container-contents/documentDiscovery/containerDocumentListing.js +106 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js +65 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryCandidates.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryEvidence.js +91 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryEvidence.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryInputs.js +85 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryInputs.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryLanes.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryTypes.d.ts +160 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryTypes.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/index.d.ts +12 -0
- package/workflows/container-contents/documentDiscovery/index.js +183 -0
- package/workflows/container-contents/documentDiscovery/index.js.map +1 -0
- package/workflows/container-contents/documentLinks/availableDocumentLinkIntent.js +32 -0
- package/workflows/container-contents/documentLinks/availableDocumentLinkIntent.js.map +1 -0
- package/workflows/container-contents/documentLinks/deferredDocumentLinks.js +9 -0
- package/workflows/container-contents/documentLinks/deferredDocumentLinks.js.map +1 -0
- package/workflows/container-contents/documentLinks/documentLinkIntent.js +82 -0
- package/workflows/container-contents/documentLinks/documentLinkIntent.js.map +1 -0
- package/workflows/container-contents/documentLinks/documentLocalRelink.js.map +1 -0
- package/workflows/container-contents/documentLinks/index.d.ts +64 -0
- package/workflows/container-contents/documentLinks/index.js +264 -0
- package/workflows/container-contents/documentLinks/index.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveDeniedReplay.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveFailure.js +35 -0
- package/workflows/container-contents/documentMove/documentMoveFailure.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntent.js +77 -0
- package/workflows/container-contents/documentMove/documentMoveIntent.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentErrors.js +17 -0
- package/workflows/container-contents/documentMove/documentMoveIntentErrors.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSettlement.js +25 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSettlement.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSync.js +346 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSync.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveVanishedRefresh.js +100 -0
- package/workflows/container-contents/documentMove/documentMoveVanishedRefresh.js.map +1 -0
- package/workflows/container-contents/documentPriming/documentHydrationProbe.js +146 -0
- package/workflows/container-contents/documentPriming/documentHydrationProbe.js.map +1 -0
- package/workflows/container-contents/documentPriming/documentRuntimeTargetSync.js.map +1 -0
- package/workflows/container-contents/documentPriming/index.js +245 -0
- package/workflows/container-contents/documentPriming/index.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentStructure.d.ts +53 -0
- package/workflows/container-contents/documentQueries/documentStructure.js +183 -0
- package/workflows/container-contents/documentQueries/documentStructure.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentStructureTypes.d.ts +32 -0
- package/workflows/container-contents/documentQueries/documentStructureTypes.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentSubtreeQueries.js +169 -0
- package/workflows/container-contents/documentQueries/documentSubtreeQueries.js.map +1 -0
- package/workflows/container-contents/documentQueries/index.d.ts +62 -0
- package/workflows/container-contents/documentQueries/index.js +212 -0
- package/workflows/container-contents/documentQueries/index.js.map +1 -0
- package/workflows/container-contents/documentQueries/orphanedDocumentSql.js +39 -0
- package/workflows/container-contents/documentQueries/orphanedDocumentSql.js.map +1 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.d.ts +12 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.js +42 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.js.map +1 -0
- package/workflows/container-contents/documentQueries/sql.js +1 -1
- package/workflows/container-contents/documentQueries/sql.js.map +1 -1
- package/workflows/container-contents/index.d.ts +13 -13
- package/workflows/container-contents/index.js +11 -11
- package/workflows/container-contents/index.js.map +1 -1
- package/workflows/container-contents/info/blobInfo.d.ts +6 -0
- package/workflows/container-contents/info/blobInfo.js +323 -0
- package/workflows/container-contents/info/blobInfo.js.map +1 -0
- package/workflows/container-contents/info/blobInfoTypes.d.ts +48 -0
- package/workflows/container-contents/info/blobInfoTypes.js.map +1 -0
- package/workflows/container-contents/info/containerInfo.d.ts +77 -0
- package/workflows/container-contents/info/containerInfo.js +200 -0
- package/workflows/container-contents/info/containerInfo.js.map +1 -0
- package/workflows/container-contents/info/documentInfo.d.ts +18 -0
- package/workflows/container-contents/info/documentInfo.js +306 -0
- package/workflows/container-contents/info/documentInfo.js.map +1 -0
- package/workflows/container-contents/info/documentInfoTypes.d.ts +92 -0
- package/workflows/container-contents/info/documentInfoTypes.js.map +1 -0
- package/workflows/container-contents/metadata/index.d.ts +25 -0
- package/workflows/container-contents/metadata/index.js +217 -0
- package/workflows/container-contents/metadata/index.js.map +1 -0
- package/workflows/container-contents/metadata/metadataEvents.d.ts +7 -0
- package/workflows/container-contents/metadata/metadataEvents.js +47 -0
- package/workflows/container-contents/metadata/metadataEvents.js.map +1 -0
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js +40 -0
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.d.ts +75 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.js +177 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataPersistence.d.ts +34 -0
- package/workflows/container-contents/metadata/metadataPersistence.js +254 -0
- package/workflows/container-contents/metadata/metadataPersistence.js.map +1 -0
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js +65 -0
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataReadState.d.ts +2 -0
- package/workflows/container-contents/metadata/metadataReadState.js.map +1 -0
- package/workflows/container-contents/metadata/metadataRecord.js +43 -0
- package/workflows/container-contents/metadata/metadataRecord.js.map +1 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.d.ts +38 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.js +91 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.js.map +1 -0
- package/workflows/container-contents/metadata/metadataStateInstallation.d.ts +3 -0
- package/workflows/container-contents/metadata/metadataStateInstallation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataStateIsolation.js +80 -0
- package/workflows/container-contents/metadata/metadataStateIsolation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataSyncErrors.js +41 -0
- package/workflows/container-contents/metadata/metadataSyncErrors.js.map +1 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.d.ts +13 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.js +27 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.js.map +1 -0
- package/workflows/container-contents/metadata/metadataTypes.d.ts +54 -0
- package/workflows/container-contents/metadata/metadataTypes.js.map +1 -0
- package/workflows/container-contents/pendingWrites/aggregation.js.map +1 -1
- package/workflows/container-contents/pendingWrites/deferredTails.js.map +1 -1
- package/workflows/container-contents/pendingWrites/index.d.ts +26 -0
- package/workflows/container-contents/pendingWrites/index.js +116 -0
- package/workflows/container-contents/pendingWrites/index.js.map +1 -0
- package/workflows/container-contents/projectionGeneration.js.map +1 -1
- package/workflows/container-contents/projectionView.js +1 -1
- package/workflows/container-contents/projectionView.js.map +1 -1
- package/workflows/container-contents/recovery/folderRecovery.d.ts +19 -0
- package/workflows/container-contents/recovery/folderRecovery.js +32 -0
- package/workflows/container-contents/recovery/folderRecovery.js.map +1 -0
- package/workflows/container-contents/recovery/staleRootRecovery.js +111 -0
- package/workflows/container-contents/recovery/staleRootRecovery.js.map +1 -0
- package/workflows/container-contents/remoteHydration/completeHydration.js +1 -1
- package/workflows/container-contents/remoteHydration/completeHydration.js.map +1 -1
- package/workflows/container-contents/remoteHydration/destinationRootReload.js +1 -1
- package/workflows/container-contents/remoteHydration/destinationRootReload.js.map +1 -1
- package/workflows/container-contents/remoteHydration/heldContainerRebind.js +1 -1
- package/workflows/container-contents/remoteHydration/heldContainerRebind.js.map +1 -1
- package/workflows/container-contents/remoteHydration/index.d.ts +28 -0
- package/workflows/container-contents/remoteHydration/index.js +302 -0
- package/workflows/container-contents/remoteHydration/index.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js +244 -0
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainerState.js +263 -0
- package/workflows/container-contents/remoteHydration/remoteContainerState.js.map +1 -0
- package/workflows/container-contents/remoteHydration/types.d.ts +1 -1
- package/workflows/container-contents/remoteHydration/verifiedDestination.js +1 -1
- package/workflows/container-contents/remoteHydration/verifiedDestination.js.map +1 -1
- package/workflows/container-contents/tombstones/documentPurge.d.ts +37 -0
- package/workflows/container-contents/tombstones/documentPurge.js +136 -0
- package/workflows/container-contents/tombstones/documentPurge.js.map +1 -0
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js +173 -0
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js.map +1 -0
- package/workflows/container-contents/tombstones/documentTombstoneGate.js +94 -0
- package/workflows/container-contents/tombstones/documentTombstoneGate.js.map +1 -0
- package/workflows/containers/child/currentShareGrantMutation.js +5 -5
- package/workflows/containers/child/currentShareGrantMutation.js.map +1 -1
- package/workflows/containers/child/currentSharePrincipalPolicy.js +5 -5
- package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -1
- package/workflows/containers/child/share.d.ts +1 -1
- package/workflows/containers/child/share.js +4 -4
- package/workflows/containers/child/share.js.map +1 -1
- package/workflows/containers/child/sharePrincipalPolicy.d.ts +1 -1
- package/workflows/containers/child/sharePrincipalPolicy.js +2 -2
- package/workflows/containers/child/sharePrincipalPolicy.js.map +1 -1
- package/workflows/documents/attachments/attachmentPersistence.d.ts +58 -0
- package/workflows/documents/attachments/attachmentPersistence.js.map +1 -0
- package/workflows/documents/attachments/blobMutationLock.d.ts +8 -0
- package/workflows/documents/attachments/blobMutationLock.js +35 -0
- package/workflows/documents/attachments/blobMutationLock.js.map +1 -0
- package/workflows/documents/attachments/orphanBlobReclaimState.js.map +1 -0
- package/workflows/documents/attachments/orphanBlobReclaims.d.ts +6 -0
- package/workflows/documents/attachments/orphanBlobReclaims.js +143 -0
- package/workflows/documents/attachments/orphanBlobReclaims.js.map +1 -0
- package/workflows/documents/authorAccessFailure.js.map +1 -1
- package/workflows/documents/create/createAdoption.js +100 -0
- package/workflows/documents/create/createAdoption.js.map +1 -0
- package/workflows/documents/create/createProjection.d.ts +14 -0
- package/workflows/documents/create/createProjectionFetch.d.ts +27 -0
- package/workflows/documents/create/createProjectionFetch.js.map +1 -0
- package/workflows/documents/create/createResponse.js +49 -0
- package/workflows/documents/create/createResponse.js.map +1 -0
- package/workflows/documents/create/documentCreationPersistence.js +16 -0
- package/workflows/documents/create/documentCreationPersistence.js.map +1 -0
- package/workflows/documents/create/index.d.ts +56 -0
- package/workflows/documents/create/index.js +258 -0
- package/workflows/documents/create/index.js.map +1 -0
- package/workflows/documents/documentMutationCommit.js +1 -1
- package/workflows/documents/documentMutationCommit.js.map +1 -1
- package/workflows/documents/index.d.ts +17 -17
- package/workflows/documents/index.js +14 -14
- package/workflows/documents/index.js.map +1 -1
- package/workflows/documents/linkSet/index.d.ts +20 -0
- package/workflows/documents/linkSet/index.js +290 -0
- package/workflows/documents/linkSet/index.js.map +1 -0
- package/workflows/documents/linkSet/linkSetAuthority.js +61 -0
- package/workflows/documents/linkSet/linkSetAuthority.js.map +1 -0
- package/workflows/documents/linkSet/linkSetBlobRewraps.js +143 -0
- package/workflows/documents/linkSet/linkSetBlobRewraps.js.map +1 -0
- package/workflows/documents/linkSet/linkSetProjectionSeed.js +119 -0
- package/workflows/documents/linkSet/linkSetProjectionSeed.js.map +1 -0
- package/workflows/documents/linkSet/linkSetRemote.d.ts +23 -0
- package/workflows/documents/linkSet/linkSetRemote.js +187 -0
- package/workflows/documents/linkSet/linkSetRemote.js.map +1 -0
- package/workflows/documents/purge/index.d.ts +53 -0
- package/workflows/documents/purge/index.js +204 -0
- package/workflows/documents/purge/index.js.map +1 -0
- package/workflows/documents/purge/persistedDocumentRemoval.d.ts +44 -0
- package/workflows/documents/purge/persistedDocumentRemoval.js +70 -0
- package/workflows/documents/purge/persistedDocumentRemoval.js.map +1 -0
- package/workflows/documents/purge/subtreePurgeScope.d.ts +8 -0
- package/workflows/documents/purge/subtreePurgeScope.js +18 -0
- package/workflows/documents/purge/subtreePurgeScope.js.map +1 -0
- package/workflows/documents/rotationBaseline.js +1 -1
- package/workflows/documents/rotationBaseline.js.map +1 -1
- package/workflows/documents/sync/index.d.ts +4 -0
- package/workflows/documents/sync/index.js +287 -0
- package/workflows/documents/sync/index.js.map +1 -0
- package/workflows/documents/sync/initialSync.js +65 -0
- package/workflows/documents/sync/initialSync.js.map +1 -0
- package/workflows/documents/sync/readOnlyProjectionFailure.js +30 -0
- package/workflows/documents/sync/readOnlyProjectionFailure.js.map +1 -0
- package/workflows/documents/sync/readOnlySync.d.ts +71 -0
- package/workflows/documents/sync/readOnlySync.js +269 -0
- package/workflows/documents/sync/readOnlySync.js.map +1 -0
- package/workflows/documents/sync/reportDocumentSyncQuarantine.js.map +1 -0
- package/workflows/documents/sync/syncAttemptPlanning.js +79 -0
- package/workflows/documents/sync/syncAttemptPlanning.js.map +1 -0
- package/workflows/documents/sync/syncAttemptState.d.ts +27 -0
- package/workflows/documents/sync/syncAttemptState.js.map +1 -0
- package/workflows/documents/sync/syncLane.d.ts +20 -0
- package/workflows/documents/sync/syncLane.js +94 -0
- package/workflows/documents/sync/syncLane.js.map +1 -0
- package/workflows/documents/sync/syncResponseResult.js +134 -0
- package/workflows/documents/sync/syncResponseResult.js.map +1 -0
- package/workflows/documents/sync/syncSubmittedResult.js +119 -0
- package/workflows/documents/sync/syncSubmittedResult.js.map +1 -0
- package/workflows/documents/sync/syncTrace.js +148 -0
- package/workflows/documents/syncFailures/index.js +252 -0
- package/workflows/documents/syncFailures/index.js.map +1 -0
- package/workflows/documents/syncFailures/syncAbandon.js +51 -0
- package/workflows/documents/syncFailures/syncAbandon.js.map +1 -0
- package/workflows/documents/syncFailures/syncFailureClassification.d.ts +74 -0
- package/workflows/documents/syncFailures/syncFailureClassification.js +122 -0
- package/workflows/documents/syncFailures/syncFailureClassification.js.map +1 -0
- package/workflows/documents/syncFailures/syncPolicyRepair.js +50 -0
- package/workflows/documents/syncFailures/syncPolicyRepair.js.map +1 -0
- package/workflows/documents/syncFailures/syncRepairAbandon.js.map +1 -0
- package/workflows/documents/syncFailures/syncRepairAccess.js +42 -0
- package/workflows/documents/syncFailures/syncRepairAccess.js.map +1 -0
- package/workflows/documents/syncPlan/syncContentKeys.d.ts +39 -0
- package/workflows/documents/syncPlan/syncContentKeys.js +254 -0
- package/workflows/documents/syncPlan/syncContentKeys.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanIdentity.js +203 -0
- package/workflows/documents/syncPlan/syncPlanIdentity.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanMaterial.js +306 -0
- package/workflows/documents/syncPlan/syncPlanMaterial.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanProjection.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanRequestBounds.js +54 -0
- package/workflows/documents/syncPlan/syncPlanRequestBounds.js.map +1 -0
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js +119 -0
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyPreparation.js +227 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyPreparation.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js +79 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeys.js +72 -0
- package/workflows/documents/syncRekeys/syncContainerRekeys.js.map +1 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.d.ts +70 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.js +120 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.js.map +1 -0
- package/workflows/documents/syncRekeys/syncRekeyCommit.js +18 -0
- package/workflows/organizations/groupMetadata/currentGroupMetadataAuthority.js +53 -0
- package/workflows/organizations/groupMetadata/currentGroupMetadataAuthority.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.d.ts +33 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js +114 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataBinding.js +19 -0
- package/workflows/organizations/groupMetadata/groupMetadataBinding.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js +41 -0
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataErrors.js +40 -0
- package/workflows/organizations/groupMetadata/groupMetadataRootBinding.js +51 -0
- package/workflows/organizations/groupMetadata/groupMetadataRootBinding.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataRuntime.js +47 -0
- package/workflows/organizations/groupMetadata/groupMetadataRuntime.js.map +1 -0
- package/workflows/organizations/groupMetadata/runtimeGroupMetadataAuthority.js +16 -0
- package/workflows/organizations/groupMetadata/runtimeGroupMetadataAuthority.js.map +1 -0
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js +72 -0
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js.map +1 -0
- package/workflows/organizations/groupNames/groupMembershipName.d.ts +8 -0
- package/workflows/organizations/groupNames/groupMembershipName.js +18 -0
- package/workflows/organizations/groupNames/groupMembershipName.js.map +1 -0
- package/workflows/organizations/groupNames/groupNameUniqueness.js +151 -0
- package/workflows/organizations/groupNames/groupNameUniqueness.js.map +1 -0
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js +48 -0
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js.map +1 -0
- package/workflows/organizations/groupNames/organizationGroupNames.js +13 -0
- package/workflows/organizations/groupNames/organizationGroupNames.js.map +1 -0
- package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js +139 -0
- package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js.map +1 -0
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js +79 -0
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js.map +1 -0
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js +65 -0
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js +174 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.d.ts +58 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js +166 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.d.ts +26 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js +64 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationHead.js +26 -0
- package/workflows/organizations/groupPolicy/groupPolicyRequests.js +181 -0
- package/workflows/organizations/groupPolicy/groupPolicyRequests.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js +74 -0
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js.map +1 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.d.ts +22 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.js +71 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.js.map +1 -0
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js +85 -0
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js +35 -0
- package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.d.ts +19 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.js +75 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/groupCreation.d.ts +21 -0
- package/workflows/organizations/groups/groupCreation.js +68 -0
- package/workflows/organizations/groups/groupCreation.js.map +1 -0
- package/workflows/organizations/groups/organizationGroupDirectory.js +153 -0
- package/workflows/organizations/groups/organizationGroupDirectory.js.map +1 -0
- package/workflows/organizations/index.d.ts +13 -13
- package/workflows/organizations/index.js +12 -12
- package/workflows/organizations/index.js.map +1 -1
- package/workflows/organizations/policyHistory/groupPolicyHistoryPage.js.map +1 -0
- package/workflows/organizations/policyHistory/loadPolicyHistoryDetails.js +78 -0
- package/workflows/organizations/policyHistory/loadPolicyHistoryDetails.js.map +1 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryDetails.js +110 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryDetails.js.map +1 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js +67 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryAccessDenial.js +19 -0
- package/workflows/organizations/policyHistory/policyHistoryAccessDenial.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryCache.js +42 -0
- package/workflows/organizations/policyHistory/policyHistoryCache.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryReadModel.d.ts +9 -0
- package/workflows/organizations/policyHistory/policyHistoryTypes.d.ts +58 -0
- package/workflows/organizations/principalMutations/acknowledgedDirectoryBindings.js +18 -0
- package/workflows/organizations/principalMutations/acknowledgedDirectoryBindings.js.map +1 -0
- package/workflows/organizations/principalMutations/currentGroupMutationReferences.js +35 -0
- package/workflows/organizations/principalMutations/currentGroupMutationReferences.js.map +1 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationAuthority.js +16 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationAuthority.js.map +1 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationRetention.js +64 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationRetention.js.map +1 -0
- package/workflows/organizations/principalMutations/currentPrincipalMutationLease.js +39 -0
- package/workflows/organizations/principalMutations/currentPrincipalMutationLease.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.d.ts +26 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.js +104 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.d.ts +26 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.js +85 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationReceipt.js +28 -0
- package/workflows/organizations/principalMutations/principalMutationReceipt.js.map +1 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.d.ts +5 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.js +36 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.js.map +1 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.d.ts +6 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.js +20 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.js.map +1 -0
- package/workflows/organizations/principalMutations/runtimeCurrentGroupMutation.js +113 -0
- package/workflows/organizations/principalMutations/runtimeCurrentGroupMutation.js.map +1 -0
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js +48 -0
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js.map +1 -0
- package/workflows/organizations/principalPolicy/index.d.ts +98 -0
- package/workflows/organizations/principalPolicy/index.js +256 -0
- package/workflows/organizations/principalPolicy/index.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyApi.d.ts +33 -0
- package/workflows/organizations/principalPolicy/principalPolicyApi.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js +74 -0
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyRecipients.js +43 -0
- package/workflows/organizations/principalPolicy/principalPolicyRecipients.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyRequest.d.ts +68 -0
- package/workflows/organizations/principalPolicy/principalPolicyRequest.js +176 -0
- package/workflows/organizations/provisioning/createOrganization.d.ts +62 -0
- package/workflows/organizations/provisioning/createOrganization.js +128 -0
- package/workflows/organizations/provisioning/createOrganization.js.map +1 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.d.ts +36 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.js +205 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.js.map +1 -0
- package/workflows/organizations/provisioning/organizationReplacementVerification.js +26 -0
- package/workflows/organizations/provisioning/organizationReplacementVerification.js.map +1 -0
- package/workflows/organizations/readModel/dataUsageReadModel.d.ts +19 -0
- package/workflows/organizations/readModel/dataUsageReadModel.js +64 -0
- package/workflows/organizations/readModel/dataUsageReadModel.js.map +1 -0
- package/workflows/organizations/readModel/index.d.ts +70 -0
- package/workflows/organizations/readModel/index.js +10 -0
- package/workflows/organizations/readModel/index.js.map +1 -0
- package/workflows/organizations/readModel/listLocalOrganizations.d.ts +20 -0
- package/workflows/organizations/readModel/listLocalOrganizations.js +137 -0
- package/workflows/organizations/readModel/listLocalOrganizations.js.map +1 -0
- package/workflows/organizations/readModel/localReadModelDetails.d.ts +25 -0
- package/workflows/organizations/readModel/localReadModelDetails.js +182 -0
- package/workflows/organizations/readModel/localReadModelDetails.js.map +1 -0
- package/workflows/organizations/readModel/organizationPresentationAccessState.js +173 -0
- package/workflows/organizations/readModel/organizationPresentationAccessState.js.map +1 -0
- package/workflows/organizations/readModel/organizationPresentationFailures.js +7 -0
- package/workflows/organizations/readModel/readModelProjection.d.ts +29 -0
- package/workflows/organizations/readModel/readModelProjection.js +255 -0
- package/workflows/organizations/readModel/readModelProjection.js.map +1 -0
- package/workflows/organizations/rematerialization/authoredPrincipalPolicyWarmer.js +25 -0
- package/workflows/organizations/rematerialization/authoredPrincipalPolicyWarmer.js.map +1 -0
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js +31 -0
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js +321 -0
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js +77 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js +79 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js.map +1 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.d.ts +33 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js +140 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js.map +1 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.d.ts +39 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js +87 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js.map +1 -0
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js +84 -0
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js.map +1 -0
- package/workflows/principals/acknowledgements/principalAcknowledgementChecks.d.ts +30 -0
- package/workflows/principals/acknowledgements/principalCurrentPublicationSeal.js +51 -0
- package/workflows/principals/acknowledgements/principalCurrentPublicationSeal.js.map +1 -0
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js +68 -0
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js.map +1 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.d.ts +10 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js +119 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryAuthority.js +20 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryAuthority.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js +69 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js +68 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js +61 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.d.ts +35 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.js +16 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryVerification.js +29 -0
- package/workflows/principals/historyRecovery/recoverCurrentOrganizationPolicy.js +38 -0
- package/workflows/principals/historyRecovery/recoverCurrentOrganizationPolicy.js.map +1 -0
- package/workflows/principals/historyRecovery/recoverPrincipalHistoryPage.js +31 -0
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js +295 -0
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js.map +1 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.d.ts +27 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.js +163 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.js.map +1 -0
- package/workflows/principals/index.d.ts +6 -6
- package/workflows/principals/index.js +6 -6
- package/workflows/principals/index.js.map +1 -1
- package/workflows/principals/policyCache/index.d.ts +20 -0
- package/workflows/principals/policyCache/index.js +242 -0
- package/workflows/principals/policyCache/index.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js +39 -0
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js +149 -0
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js +67 -0
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryAuthority.js +60 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryAuthority.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js +88 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js +179 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.d.ts +41 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.js.map +1 -0
- package/workflows/principals/publicHistory/publicProjectionDirectory.js +40 -0
- package/workflows/principals/publicHistory/publicProjectionDirectory.js.map +1 -0
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js +54 -0
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js.map +1 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.d.ts +9 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.js +98 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.js.map +1 -0
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js +178 -0
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js.map +1 -0
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js +96 -0
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalCurrentRecoveryBatch.js +14 -0
- package/workflows/principals/recoveryOperation/principalCurrentRecoveryBatch.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.d.ts +10 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js +127 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDiscoveryPage.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryLocalPreference.js +30 -0
- package/workflows/principals/recoveryOperation/principalRecoveryLocalPreference.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.d.ts +21 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.js +178 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js +33 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryOutage.js +40 -0
- package/workflows/principals/recoveryOperation/principalRecoveryOutage.js.map +1 -0
- package/workflows/principals/runtimePolicyRecovery.js +3 -3
- package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
- package/workflows/principals/runtimeProjectionPolicyRecovery.js +3 -3
- package/workflows/principals/runtimeProjectionPolicyRecovery.js.map +1 -1
- package/workflows/registration/organizationProvisioningArtifacts.d.ts +1 -1
- package/workflows/registration/provisionedPrincipalHistory.js +1 -1
- package/workflows/registration/provisionedPrincipalHistory.js.map +1 -1
- package/workflows/registration/provisionedProfileDocument.js +1 -1
- package/workflows/registration/provisionedProfileDocument.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.js +2 -2
- package/workflows/registration/provisioningBootstrapBuilders.js.map +1 -1
- package/workflows/registration/registerIdentity.js +2 -2
- package/workflows/registration/registerIdentity.js.map +1 -1
- package/workflows/sync/remoteReset.js +1 -1
- package/workflows/sync/remoteReset.js.map +1 -1
- package/workflows/blobs/attachmentBindingVerification.js +0 -49
- package/workflows/blobs/attachmentBindingVerification.js.map +0 -1
- package/workflows/blobs/attachmentDecryptor.js +0 -41
- package/workflows/blobs/attachmentDecryptor.js.map +0 -1
- package/workflows/blobs/attachmentKeyAuthenticator.js +0 -68
- package/workflows/blobs/attachmentKeyAuthenticator.js.map +0 -1
- package/workflows/blobs/automaticMultipartUpload.js +0 -9
- package/workflows/blobs/automaticMultipartUpload.js.map +0 -1
- package/workflows/blobs/blobChunkDecryption.js +0 -34
- package/workflows/blobs/blobChunkDecryption.js.map +0 -1
- package/workflows/blobs/decrypt.d.ts +0 -12
- package/workflows/blobs/decrypt.js +0 -246
- package/workflows/blobs/decrypt.js.map +0 -1
- package/workflows/blobs/hydrate.d.ts +0 -56
- package/workflows/blobs/hydrate.js +0 -190
- package/workflows/blobs/hydrate.js.map +0 -1
- package/workflows/blobs/hydrationResults.js +0 -23
- package/workflows/blobs/hydrationResults.js.map +0 -1
- package/workflows/blobs/multipartFirstParts.js +0 -82
- package/workflows/blobs/multipartFirstParts.js.map +0 -1
- package/workflows/blobs/multipartStageFailures.js +0 -36
- package/workflows/blobs/multipartStageFailures.js.map +0 -1
- package/workflows/blobs/multipartStageResolution.js.map +0 -1
- package/workflows/blobs/multipartUpload.js +0 -274
- package/workflows/blobs/multipartUpload.js.map +0 -1
- package/workflows/blobs/retainedAttachmentVerification.js +0 -40
- package/workflows/blobs/retainedAttachmentVerification.js.map +0 -1
- package/workflows/blobs/upload.d.ts +0 -10
- package/workflows/blobs/upload.js +0 -243
- package/workflows/blobs/upload.js.map +0 -1
- package/workflows/blobs/verifiedWrapScope.js +0 -20
- package/workflows/blobs/verifiedWrapScope.js.map +0 -1
- package/workflows/blobs/writerProjection.js +0 -29
- package/workflows/blobs/writerProjection.js.map +0 -1
- package/workflows/container-contents/availableDocumentLinkIntent.js +0 -32
- package/workflows/container-contents/availableDocumentLinkIntent.js.map +0 -1
- package/workflows/container-contents/blobInfo.d.ts +0 -6
- package/workflows/container-contents/blobInfo.js +0 -323
- package/workflows/container-contents/blobInfo.js.map +0 -1
- package/workflows/container-contents/blobInfoTypes.d.ts +0 -48
- package/workflows/container-contents/blobInfoTypes.js.map +0 -1
- package/workflows/container-contents/containerDocumentListing.js +0 -106
- package/workflows/container-contents/containerInfo.d.ts +0 -77
- package/workflows/container-contents/containerInfo.js +0 -200
- package/workflows/container-contents/containerInfo.js.map +0 -1
- package/workflows/container-contents/deferredDocumentLinks.js +0 -9
- package/workflows/container-contents/deferredDocumentLinks.js.map +0 -1
- package/workflows/container-contents/documentAttributionRanges.d.ts +0 -26
- package/workflows/container-contents/documentCharacterBlame.js +0 -33
- package/workflows/container-contents/documentCharacterBlame.js.map +0 -1
- package/workflows/container-contents/documentDiscovery.d.ts +0 -12
- package/workflows/container-contents/documentDiscovery.js +0 -183
- package/workflows/container-contents/documentDiscovery.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryApply.js +0 -65
- package/workflows/container-contents/documentDiscoveryApply.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryCandidates.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryEvidence.js +0 -91
- package/workflows/container-contents/documentDiscoveryEvidence.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryInputs.js +0 -85
- package/workflows/container-contents/documentDiscoveryInputs.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryLanes.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryTypes.d.ts +0 -160
- package/workflows/container-contents/documentDiscoveryTypes.js.map +0 -1
- package/workflows/container-contents/documentFieldBlame.js +0 -26
- package/workflows/container-contents/documentFieldBlame.js.map +0 -1
- package/workflows/container-contents/documentHydrationProbe.js +0 -146
- package/workflows/container-contents/documentHydrationProbe.js.map +0 -1
- package/workflows/container-contents/documentInfo.d.ts +0 -18
- package/workflows/container-contents/documentInfo.js +0 -306
- package/workflows/container-contents/documentInfo.js.map +0 -1
- package/workflows/container-contents/documentInfoTypes.d.ts +0 -92
- package/workflows/container-contents/documentInfoTypes.js.map +0 -1
- package/workflows/container-contents/documentLinkIntent.js +0 -82
- package/workflows/container-contents/documentLinkIntent.js.map +0 -1
- package/workflows/container-contents/documentLinks.d.ts +0 -64
- package/workflows/container-contents/documentLinks.js +0 -264
- package/workflows/container-contents/documentLinks.js.map +0 -1
- package/workflows/container-contents/documentLocalRelink.js.map +0 -1
- package/workflows/container-contents/documentMoveDeniedReplay.js.map +0 -1
- package/workflows/container-contents/documentMoveFailure.js +0 -35
- package/workflows/container-contents/documentMoveFailure.js.map +0 -1
- package/workflows/container-contents/documentMoveIntent.js +0 -77
- package/workflows/container-contents/documentMoveIntent.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentErrors.js +0 -17
- package/workflows/container-contents/documentMoveIntentErrors.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentSettlement.js +0 -25
- package/workflows/container-contents/documentMoveIntentSettlement.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentSync.js +0 -346
- package/workflows/container-contents/documentMoveIntentSync.js.map +0 -1
- package/workflows/container-contents/documentMoveVanishedRefresh.js +0 -100
- package/workflows/container-contents/documentMoveVanishedRefresh.js.map +0 -1
- package/workflows/container-contents/documentPriming.js +0 -245
- package/workflows/container-contents/documentPriming.js.map +0 -1
- package/workflows/container-contents/documentPurge.d.ts +0 -37
- package/workflows/container-contents/documentPurge.js +0 -136
- package/workflows/container-contents/documentPurge.js.map +0 -1
- package/workflows/container-contents/documentQueries.d.ts +0 -62
- package/workflows/container-contents/documentQueries.js +0 -212
- package/workflows/container-contents/documentQueries.js.map +0 -1
- package/workflows/container-contents/documentRuntimeTargetSync.js.map +0 -1
- package/workflows/container-contents/documentStructure.d.ts +0 -53
- package/workflows/container-contents/documentStructure.js +0 -183
- package/workflows/container-contents/documentStructure.js.map +0 -1
- package/workflows/container-contents/documentStructureTypes.d.ts +0 -32
- package/workflows/container-contents/documentStructureTypes.js.map +0 -1
- package/workflows/container-contents/documentSubtreeQueries.js +0 -169
- package/workflows/container-contents/documentSubtreeQueries.js.map +0 -1
- package/workflows/container-contents/documentTombstoneEvidence.js +0 -173
- package/workflows/container-contents/documentTombstoneEvidence.js.map +0 -1
- package/workflows/container-contents/documentTombstoneGate.js +0 -94
- package/workflows/container-contents/documentTombstoneGate.js.map +0 -1
- package/workflows/container-contents/folderRecovery.d.ts +0 -19
- package/workflows/container-contents/folderRecovery.js +0 -32
- package/workflows/container-contents/folderRecovery.js.map +0 -1
- package/workflows/container-contents/metadata.d.ts +0 -25
- package/workflows/container-contents/metadata.js +0 -217
- package/workflows/container-contents/metadata.js.map +0 -1
- package/workflows/container-contents/metadataEvents.d.ts +0 -7
- package/workflows/container-contents/metadataEvents.js +0 -47
- package/workflows/container-contents/metadataEvents.js.map +0 -1
- package/workflows/container-contents/metadataIncomingUpdateIsolation.js +0 -40
- package/workflows/container-contents/metadataIncomingUpdateIsolation.js.map +0 -1
- package/workflows/container-contents/metadataMutationPreparation.d.ts +0 -75
- package/workflows/container-contents/metadataMutationPreparation.js +0 -177
- package/workflows/container-contents/metadataMutationPreparation.js.map +0 -1
- package/workflows/container-contents/metadataPersistence.d.ts +0 -34
- package/workflows/container-contents/metadataPersistence.js +0 -254
- package/workflows/container-contents/metadataPersistence.js.map +0 -1
- package/workflows/container-contents/metadataPullContinuationInvalidation.js +0 -65
- package/workflows/container-contents/metadataPullContinuationInvalidation.js.map +0 -1
- package/workflows/container-contents/metadataReadState.d.ts +0 -2
- package/workflows/container-contents/metadataReadState.js.map +0 -1
- package/workflows/container-contents/metadataRecord.js +0 -43
- package/workflows/container-contents/metadataRecord.js.map +0 -1
- package/workflows/container-contents/metadataRemoteSync.d.ts +0 -38
- package/workflows/container-contents/metadataRemoteSync.js +0 -91
- package/workflows/container-contents/metadataRemoteSync.js.map +0 -1
- package/workflows/container-contents/metadataStateInstallation.d.ts +0 -3
- package/workflows/container-contents/metadataStateInstallation.js.map +0 -1
- package/workflows/container-contents/metadataStateIsolation.js +0 -80
- package/workflows/container-contents/metadataStateIsolation.js.map +0 -1
- package/workflows/container-contents/metadataSyncErrors.js +0 -41
- package/workflows/container-contents/metadataSyncErrors.js.map +0 -1
- package/workflows/container-contents/metadataSyncSettlement.d.ts +0 -13
- package/workflows/container-contents/metadataSyncSettlement.js +0 -27
- package/workflows/container-contents/metadataSyncSettlement.js.map +0 -1
- package/workflows/container-contents/metadataTypes.d.ts +0 -54
- package/workflows/container-contents/metadataTypes.js.map +0 -1
- package/workflows/container-contents/orphanedDocumentSql.js +0 -39
- package/workflows/container-contents/orphanedDocumentSql.js.map +0 -1
- package/workflows/container-contents/pendingDownloads.d.ts +0 -12
- package/workflows/container-contents/pendingDownloads.js +0 -42
- package/workflows/container-contents/pendingDownloads.js.map +0 -1
- package/workflows/container-contents/pendingWrites.d.ts +0 -26
- package/workflows/container-contents/pendingWrites.js +0 -116
- package/workflows/container-contents/pendingWrites.js.map +0 -1
- package/workflows/container-contents/remoteContainerPageHydration.js +0 -244
- package/workflows/container-contents/remoteContainerPageHydration.js.map +0 -1
- package/workflows/container-contents/remoteContainerState.js +0 -263
- package/workflows/container-contents/remoteContainerState.js.map +0 -1
- package/workflows/container-contents/remoteHydration.d.ts +0 -28
- package/workflows/container-contents/remoteHydration.js +0 -302
- package/workflows/container-contents/remoteHydration.js.map +0 -1
- package/workflows/container-contents/staleRootRecovery.js +0 -111
- package/workflows/container-contents/staleRootRecovery.js.map +0 -1
- package/workflows/documents/attachmentPersistence.d.ts +0 -58
- package/workflows/documents/attachmentPersistence.js.map +0 -1
- package/workflows/documents/blobMutationLock.d.ts +0 -8
- package/workflows/documents/blobMutationLock.js +0 -35
- package/workflows/documents/blobMutationLock.js.map +0 -1
- package/workflows/documents/create.d.ts +0 -56
- package/workflows/documents/create.js +0 -258
- package/workflows/documents/create.js.map +0 -1
- package/workflows/documents/createAdoption.js +0 -100
- package/workflows/documents/createAdoption.js.map +0 -1
- package/workflows/documents/createProjection.d.ts +0 -14
- package/workflows/documents/createProjectionFetch.d.ts +0 -27
- package/workflows/documents/createProjectionFetch.js.map +0 -1
- package/workflows/documents/createResponse.js +0 -49
- package/workflows/documents/createResponse.js.map +0 -1
- package/workflows/documents/documentCreationPersistence.js +0 -16
- package/workflows/documents/documentCreationPersistence.js.map +0 -1
- package/workflows/documents/initialSync.js +0 -65
- package/workflows/documents/initialSync.js.map +0 -1
- package/workflows/documents/linkSet.d.ts +0 -20
- package/workflows/documents/linkSet.js +0 -290
- package/workflows/documents/linkSet.js.map +0 -1
- package/workflows/documents/linkSetAuthority.js +0 -61
- package/workflows/documents/linkSetAuthority.js.map +0 -1
- package/workflows/documents/linkSetBlobRewraps.js +0 -143
- package/workflows/documents/linkSetBlobRewraps.js.map +0 -1
- package/workflows/documents/linkSetProjectionSeed.js +0 -119
- package/workflows/documents/linkSetProjectionSeed.js.map +0 -1
- package/workflows/documents/linkSetRemote.d.ts +0 -23
- package/workflows/documents/linkSetRemote.js +0 -187
- package/workflows/documents/linkSetRemote.js.map +0 -1
- package/workflows/documents/orphanBlobReclaimState.js.map +0 -1
- package/workflows/documents/orphanBlobReclaims.d.ts +0 -6
- package/workflows/documents/orphanBlobReclaims.js +0 -143
- package/workflows/documents/orphanBlobReclaims.js.map +0 -1
- package/workflows/documents/persistedDocumentRemoval.d.ts +0 -44
- package/workflows/documents/persistedDocumentRemoval.js +0 -70
- package/workflows/documents/persistedDocumentRemoval.js.map +0 -1
- package/workflows/documents/purge.d.ts +0 -53
- package/workflows/documents/purge.js +0 -204
- package/workflows/documents/purge.js.map +0 -1
- package/workflows/documents/readOnlyProjectionFailure.js +0 -30
- package/workflows/documents/readOnlyProjectionFailure.js.map +0 -1
- package/workflows/documents/readOnlySync.d.ts +0 -71
- package/workflows/documents/readOnlySync.js +0 -269
- package/workflows/documents/readOnlySync.js.map +0 -1
- package/workflows/documents/reportDocumentSyncQuarantine.js.map +0 -1
- package/workflows/documents/subtreePurgeScope.d.ts +0 -8
- package/workflows/documents/subtreePurgeScope.js +0 -18
- package/workflows/documents/subtreePurgeScope.js.map +0 -1
- package/workflows/documents/sync.d.ts +0 -4
- package/workflows/documents/sync.js +0 -287
- package/workflows/documents/sync.js.map +0 -1
- package/workflows/documents/syncAbandon.js +0 -51
- package/workflows/documents/syncAbandon.js.map +0 -1
- package/workflows/documents/syncAttemptPlanning.js +0 -79
- package/workflows/documents/syncAttemptPlanning.js.map +0 -1
- package/workflows/documents/syncAttemptState.d.ts +0 -27
- package/workflows/documents/syncAttemptState.js.map +0 -1
- package/workflows/documents/syncAutomaticContainerRekeys.js +0 -119
- package/workflows/documents/syncAutomaticContainerRekeys.js.map +0 -1
- package/workflows/documents/syncContainerRekeyPreparation.js +0 -227
- package/workflows/documents/syncContainerRekeyPreparation.js.map +0 -1
- package/workflows/documents/syncContainerRekeyProjection.js +0 -79
- package/workflows/documents/syncContainerRekeyProjection.js.map +0 -1
- package/workflows/documents/syncContainerRekeys.js +0 -72
- package/workflows/documents/syncContainerRekeys.js.map +0 -1
- package/workflows/documents/syncContentKeys.d.ts +0 -39
- package/workflows/documents/syncContentKeys.js +0 -254
- package/workflows/documents/syncContentKeys.js.map +0 -1
- package/workflows/documents/syncFailureClassification.d.ts +0 -74
- package/workflows/documents/syncFailureClassification.js +0 -122
- package/workflows/documents/syncFailureClassification.js.map +0 -1
- package/workflows/documents/syncFailures.js +0 -252
- package/workflows/documents/syncFailures.js.map +0 -1
- package/workflows/documents/syncLane.d.ts +0 -20
- package/workflows/documents/syncLane.js +0 -94
- package/workflows/documents/syncLane.js.map +0 -1
- package/workflows/documents/syncPlanIdentity.js +0 -203
- package/workflows/documents/syncPlanIdentity.js.map +0 -1
- package/workflows/documents/syncPlanMaterial.js +0 -306
- package/workflows/documents/syncPlanMaterial.js.map +0 -1
- package/workflows/documents/syncPlanProjection.js.map +0 -1
- package/workflows/documents/syncPlanRequestBounds.js +0 -54
- package/workflows/documents/syncPlanRequestBounds.js.map +0 -1
- package/workflows/documents/syncPolicyRepair.js +0 -50
- package/workflows/documents/syncPolicyRepair.js.map +0 -1
- package/workflows/documents/syncRecoveryRekey.d.ts +0 -70
- package/workflows/documents/syncRecoveryRekey.js +0 -120
- package/workflows/documents/syncRecoveryRekey.js.map +0 -1
- package/workflows/documents/syncRekeyCommit.js +0 -18
- package/workflows/documents/syncRepairAbandon.js.map +0 -1
- package/workflows/documents/syncRepairAccess.js +0 -42
- package/workflows/documents/syncRepairAccess.js.map +0 -1
- package/workflows/documents/syncResponseResult.js +0 -134
- package/workflows/documents/syncResponseResult.js.map +0 -1
- package/workflows/documents/syncSubmittedResult.js +0 -119
- package/workflows/documents/syncSubmittedResult.js.map +0 -1
- package/workflows/documents/syncTrace.js +0 -148
- package/workflows/organizations/acknowledgedDirectoryBindings.js +0 -18
- package/workflows/organizations/acknowledgedDirectoryBindings.js.map +0 -1
- package/workflows/organizations/authoredPrincipalPolicyWarmer.js +0 -25
- package/workflows/organizations/authoredPrincipalPolicyWarmer.js.map +0 -1
- package/workflows/organizations/commitCurrentGroupPolicyMutation.js +0 -139
- package/workflows/organizations/commitCurrentGroupPolicyMutation.js.map +0 -1
- package/workflows/organizations/createCurrentOrganizationGroup.js +0 -85
- package/workflows/organizations/createCurrentOrganizationGroup.js.map +0 -1
- package/workflows/organizations/createOrganization.d.ts +0 -62
- package/workflows/organizations/createOrganization.js +0 -128
- package/workflows/organizations/createOrganization.js.map +0 -1
- package/workflows/organizations/currentGroupMetadataAuthority.js +0 -53
- package/workflows/organizations/currentGroupMetadataAuthority.js.map +0 -1
- package/workflows/organizations/currentGroupMutationReferences.js +0 -35
- package/workflows/organizations/currentGroupMutationReferences.js.map +0 -1
- package/workflows/organizations/currentGroupPolicyMutationContext.js +0 -79
- package/workflows/organizations/currentGroupPolicyMutationContext.js.map +0 -1
- package/workflows/organizations/currentOrganizationGroupNames.js +0 -72
- package/workflows/organizations/currentOrganizationGroupNames.js.map +0 -1
- package/workflows/organizations/currentOrganizationMutationAuthority.js +0 -16
- package/workflows/organizations/currentOrganizationMutationAuthority.js.map +0 -1
- package/workflows/organizations/currentOrganizationMutationRetention.js +0 -64
- package/workflows/organizations/currentOrganizationMutationRetention.js.map +0 -1
- package/workflows/organizations/currentPolicyMutationAcknowledgement.js +0 -65
- package/workflows/organizations/currentPolicyMutationAcknowledgement.js.map +0 -1
- package/workflows/organizations/currentPrincipalMutationLease.js +0 -39
- package/workflows/organizations/currentPrincipalMutationLease.js.map +0 -1
- package/workflows/organizations/dataUsageReadModel.d.ts +0 -19
- package/workflows/organizations/dataUsageReadModel.js +0 -64
- package/workflows/organizations/dataUsageReadModel.js.map +0 -1
- package/workflows/organizations/deleteCurrentOrganizationGroup.js +0 -35
- package/workflows/organizations/deleteCurrentOrganizationGroup.js.map +0 -1
- package/workflows/organizations/deleteOrganizationGroup.d.ts +0 -19
- package/workflows/organizations/deleteOrganizationGroup.js +0 -75
- package/workflows/organizations/deleteOrganizationGroup.js.map +0 -1
- package/workflows/organizations/groupCreation.d.ts +0 -21
- package/workflows/organizations/groupCreation.js +0 -68
- package/workflows/organizations/groupCreation.js.map +0 -1
- package/workflows/organizations/groupMembershipName.d.ts +0 -8
- package/workflows/organizations/groupMembershipName.js +0 -18
- package/workflows/organizations/groupMembershipName.js.map +0 -1
- package/workflows/organizations/groupMetadataAccess.d.ts +0 -33
- package/workflows/organizations/groupMetadataAccess.js +0 -114
- package/workflows/organizations/groupMetadataAccess.js.map +0 -1
- package/workflows/organizations/groupMetadataBinding.js +0 -19
- package/workflows/organizations/groupMetadataBinding.js.map +0 -1
- package/workflows/organizations/groupMetadataContainerAuthority.js +0 -41
- package/workflows/organizations/groupMetadataContainerAuthority.js.map +0 -1
- package/workflows/organizations/groupMetadataErrors.js +0 -40
- package/workflows/organizations/groupMetadataRootBinding.js +0 -51
- package/workflows/organizations/groupMetadataRootBinding.js.map +0 -1
- package/workflows/organizations/groupMetadataRuntime.js +0 -47
- package/workflows/organizations/groupMetadataRuntime.js.map +0 -1
- package/workflows/organizations/groupNameUniqueness.js +0 -151
- package/workflows/organizations/groupNameUniqueness.js.map +0 -1
- package/workflows/organizations/groupPolicyHistoryPage.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationAcknowledgement.js +0 -174
- package/workflows/organizations/groupPolicyMutationAcknowledgement.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationContext.d.ts +0 -58
- package/workflows/organizations/groupPolicyMutationContext.js +0 -166
- package/workflows/organizations/groupPolicyMutationContext.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationEvidence.d.ts +0 -26
- package/workflows/organizations/groupPolicyMutationEvidence.js +0 -64
- package/workflows/organizations/groupPolicyMutationEvidence.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationHead.js +0 -26
- package/workflows/organizations/groupPolicyRequests.js +0 -181
- package/workflows/organizations/groupPolicyRequests.js.map +0 -1
- package/workflows/organizations/groupPolicyVerification.js +0 -74
- package/workflows/organizations/groupPolicyVerification.js.map +0 -1
- package/workflows/organizations/listLocalOrganizations.d.ts +0 -20
- package/workflows/organizations/listLocalOrganizations.js +0 -137
- package/workflows/organizations/listLocalOrganizations.js.map +0 -1
- package/workflows/organizations/loadPolicyHistoryDetails.js +0 -78
- package/workflows/organizations/loadPolicyHistoryDetails.js.map +0 -1
- package/workflows/organizations/localReadModelDetails.d.ts +0 -25
- package/workflows/organizations/localReadModelDetails.js +0 -182
- package/workflows/organizations/localReadModelDetails.js.map +0 -1
- package/workflows/organizations/organizationGroupDirectory.js +0 -153
- package/workflows/organizations/organizationGroupDirectory.js.map +0 -1
- package/workflows/organizations/organizationGroupNamePolicies.js +0 -48
- package/workflows/organizations/organizationGroupNamePolicies.js.map +0 -1
- package/workflows/organizations/organizationGroupNames.js +0 -13
- package/workflows/organizations/organizationGroupNames.js.map +0 -1
- package/workflows/organizations/organizationPolicyHistoryDetails.js +0 -110
- package/workflows/organizations/organizationPolicyHistoryDetails.js.map +0 -1
- package/workflows/organizations/organizationPolicyHistoryVerification.js +0 -67
- package/workflows/organizations/organizationPolicyHistoryVerification.js.map +0 -1
- package/workflows/organizations/organizationPresentationAccessState.js +0 -173
- package/workflows/organizations/organizationPresentationAccessState.js.map +0 -1
- package/workflows/organizations/organizationPresentationFailures.js +0 -7
- package/workflows/organizations/organizationProvisioningAttempt.d.ts +0 -36
- package/workflows/organizations/organizationProvisioningAttempt.js +0 -205
- package/workflows/organizations/organizationProvisioningAttempt.js.map +0 -1
- package/workflows/organizations/organizationReplacementVerification.js +0 -26
- package/workflows/organizations/organizationReplacementVerification.js.map +0 -1
- package/workflows/organizations/policyHistoryAccessDenial.js +0 -19
- package/workflows/organizations/policyHistoryAccessDenial.js.map +0 -1
- package/workflows/organizations/policyHistoryCache.js +0 -42
- package/workflows/organizations/policyHistoryCache.js.map +0 -1
- package/workflows/organizations/policyHistoryReadModel.d.ts +0 -9
- package/workflows/organizations/policyHistoryTypes.d.ts +0 -58
- package/workflows/organizations/precedingPrincipalRematerialization.js +0 -31
- package/workflows/organizations/precedingPrincipalRematerialization.js.map +0 -1
- package/workflows/organizations/principalContainerRematerialization.js +0 -321
- package/workflows/organizations/principalContainerRematerialization.js.map +0 -1
- package/workflows/organizations/principalContainerRematerializationPlanning.js +0 -77
- package/workflows/organizations/principalContainerRematerializationPlanning.js.map +0 -1
- package/workflows/organizations/principalContainerRematerializationTargets.js +0 -79
- package/workflows/organizations/principalContainerRematerializationTargets.js.map +0 -1
- package/workflows/organizations/principalMutationJournalManagement.d.ts +0 -26
- package/workflows/organizations/principalMutationJournalManagement.js +0 -104
- package/workflows/organizations/principalMutationJournalManagement.js.map +0 -1
- package/workflows/organizations/principalMutationJournalSession.d.ts +0 -26
- package/workflows/organizations/principalMutationJournalSession.js +0 -85
- package/workflows/organizations/principalMutationJournalSession.js.map +0 -1
- package/workflows/organizations/principalMutationReceipt.js +0 -28
- package/workflows/organizations/principalMutationReceipt.js.map +0 -1
- package/workflows/organizations/principalOperationReceipt.d.ts +0 -5
- package/workflows/organizations/principalOperationReceipt.js +0 -36
- package/workflows/organizations/principalOperationReceipt.js.map +0 -1
- package/workflows/organizations/principalPolicy.d.ts +0 -98
- package/workflows/organizations/principalPolicy.js +0 -256
- package/workflows/organizations/principalPolicy.js.map +0 -1
- package/workflows/organizations/principalPolicyApi.d.ts +0 -33
- package/workflows/organizations/principalPolicyApi.js.map +0 -1
- package/workflows/organizations/principalPolicyReceiptArtifacts.js +0 -74
- package/workflows/organizations/principalPolicyReceiptArtifacts.js.map +0 -1
- package/workflows/organizations/principalPolicyRecipients.js +0 -43
- package/workflows/organizations/principalPolicyRecipients.js.map +0 -1
- package/workflows/organizations/principalPolicyRequest.d.ts +0 -68
- package/workflows/organizations/principalPolicyRequest.js +0 -176
- package/workflows/organizations/readModel.d.ts +0 -70
- package/workflows/organizations/readModel.js +0 -10
- package/workflows/organizations/readModel.js.map +0 -1
- package/workflows/organizations/readModelProjection.d.ts +0 -29
- package/workflows/organizations/readModelProjection.js +0 -255
- package/workflows/organizations/readModelProjection.js.map +0 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.d.ts +0 -6
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +0 -20
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +0 -1
- package/workflows/organizations/runtimeCurrentGroupMutation.js +0 -113
- package/workflows/organizations/runtimeCurrentGroupMutation.js.map +0 -1
- package/workflows/organizations/runtimeCurrentOrganizationMutation.js +0 -48
- package/workflows/organizations/runtimeCurrentOrganizationMutation.js.map +0 -1
- package/workflows/organizations/runtimeGroupMetadataAuthority.js +0 -16
- package/workflows/organizations/runtimeGroupMetadataAuthority.js.map +0 -1
- package/workflows/organizations/submitGroupPolicyCommit.d.ts +0 -22
- package/workflows/organizations/submitGroupPolicyCommit.js +0 -71
- package/workflows/organizations/submitGroupPolicyCommit.js.map +0 -1
- package/workflows/principals/acknowledgedPrincipalCurrents.d.ts +0 -33
- package/workflows/principals/acknowledgedPrincipalCurrents.js +0 -140
- package/workflows/principals/acknowledgedPrincipalCurrents.js.map +0 -1
- package/workflows/principals/acknowledgedPrincipalPredecessor.d.ts +0 -39
- package/workflows/principals/acknowledgedPrincipalPredecessor.js +0 -87
- package/workflows/principals/acknowledgedPrincipalPredecessor.js.map +0 -1
- package/workflows/principals/initialPrincipalCurrentPublication.js +0 -84
- package/workflows/principals/initialPrincipalCurrentPublication.js.map +0 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -10
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +0 -119
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +0 -1
- package/workflows/principals/policyCache.d.ts +0 -20
- package/workflows/principals/policyCache.js +0 -242
- package/workflows/principals/policyCache.js.map +0 -1
- package/workflows/principals/principalAcknowledgementChecks.d.ts +0 -30
- package/workflows/principals/principalCurrentPublicationSeal.js +0 -51
- package/workflows/principals/principalCurrentPublicationSeal.js.map +0 -1
- package/workflows/principals/principalCurrentRecoveryBatch.js +0 -14
- package/workflows/principals/principalCurrentRecoveryBatch.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryAuthority.js +0 -20
- package/workflows/principals/principalHistoryRecoveryAuthority.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryPrefix.js +0 -69
- package/workflows/principals/principalHistoryRecoveryPrefix.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryReferences.js +0 -68
- package/workflows/principals/principalHistoryRecoveryReferences.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryStage.js +0 -61
- package/workflows/principals/principalHistoryRecoveryStage.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryTypes.d.ts +0 -35
- package/workflows/principals/principalHistoryRecoveryTypes.js +0 -16
- package/workflows/principals/principalHistoryRecoveryTypes.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryVerification.js +0 -29
- package/workflows/principals/principalPolicyCacheAdvance.js +0 -39
- package/workflows/principals/principalPolicyCacheAdvance.js.map +0 -1
- package/workflows/principals/principalPolicyCacheValidation.js +0 -149
- package/workflows/principals/principalPolicyCacheValidation.js.map +0 -1
- package/workflows/principals/principalPolicyOrganizationScope.js +0 -67
- package/workflows/principals/principalPolicyOrganizationScope.js.map +0 -1
- package/workflows/principals/principalRecoveryDirectory.d.ts +0 -10
- package/workflows/principals/principalRecoveryDirectory.js +0 -127
- package/workflows/principals/principalRecoveryDirectory.js.map +0 -1
- package/workflows/principals/principalRecoveryDiscoveryPage.js.map +0 -1
- package/workflows/principals/principalRecoveryLocalPreference.js +0 -30
- package/workflows/principals/principalRecoveryLocalPreference.js.map +0 -1
- package/workflows/principals/principalRecoveryMemo.d.ts +0 -21
- package/workflows/principals/principalRecoveryMemo.js +0 -178
- package/workflows/principals/principalRecoveryMemo.js.map +0 -1
- package/workflows/principals/principalRecoveryMemoValidity.js +0 -33
- package/workflows/principals/principalRecoveryMemoValidity.js.map +0 -1
- package/workflows/principals/principalRecoveryOutage.js +0 -40
- package/workflows/principals/principalRecoveryOutage.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryAuthority.js +0 -60
- package/workflows/principals/publicPrincipalHistoryAuthority.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryPage.js +0 -88
- package/workflows/principals/publicPrincipalHistoryPage.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryProgress.js +0 -179
- package/workflows/principals/publicPrincipalHistoryProgress.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryTypes.d.ts +0 -41
- package/workflows/principals/publicPrincipalHistoryTypes.js.map +0 -1
- package/workflows/principals/publicProjectionDirectory.js +0 -40
- package/workflows/principals/publicProjectionDirectory.js.map +0 -1
- package/workflows/principals/publicProjectionPrincipal.js +0 -54
- package/workflows/principals/publicProjectionPrincipal.js.map +0 -1
- package/workflows/principals/reconcileAcknowledgedPrincipalCurrent.js +0 -68
- package/workflows/principals/reconcileAcknowledgedPrincipalCurrent.js.map +0 -1
- package/workflows/principals/recoverCurrentOrganizationPolicy.js +0 -38
- package/workflows/principals/recoverCurrentOrganizationPolicy.js.map +0 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js +0 -31
- package/workflows/principals/recoverPrincipalPolicyHistory.js +0 -295
- package/workflows/principals/recoverPrincipalPolicyHistory.js.map +0 -1
- package/workflows/principals/recoverProjectionPolicyHistory.d.ts +0 -9
- package/workflows/principals/recoverProjectionPolicyHistory.js +0 -98
- package/workflows/principals/recoverProjectionPolicyHistory.js.map +0 -1
- package/workflows/principals/recoverPublicPrincipalHistory.js +0 -178
- package/workflows/principals/recoverPublicPrincipalHistory.js.map +0 -1
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.d.ts +0 -27
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.js +0 -163
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.js.map +0 -1
- package/workflows/principals/selectPublicPrincipalHistory.js +0 -96
- package/workflows/principals/selectPublicPrincipalHistory.js.map +0 -1
- /package/workflows/blobs/{readAttachmentTransfer.js → hydration/readAttachmentTransfer.js} +0 -0
- /package/workflows/blobs/{readAttachmentTransfer.js.map → hydration/readAttachmentTransfer.js.map} +0 -0
- /package/workflows/blobs/{multipartStageResolution.js → upload/multipartStageResolution.js} +0 -0
- /package/workflows/container-contents/{documentAttributionRanges.js → attribution/documentAttributionRanges.js} +0 -0
- /package/workflows/container-contents/{documentAttributionRanges.js.map → attribution/documentAttributionRanges.js.map} +0 -0
- /package/workflows/container-contents/{containerDocumentListing.js.map → documentDiscovery/containerDocumentListing.js.map} +0 -0
- /package/workflows/container-contents/{documentDiscoveryCandidates.js → documentDiscovery/documentDiscoveryCandidates.js} +0 -0
- /package/workflows/container-contents/{documentDiscoveryLanes.js → documentDiscovery/documentDiscoveryLanes.js} +0 -0
- /package/workflows/container-contents/{documentDiscoveryTypes.js → documentDiscovery/documentDiscoveryTypes.js} +0 -0
- /package/workflows/container-contents/{documentHeadScope.js → documentDiscovery/documentHeadScope.js} +0 -0
- /package/workflows/container-contents/{documentHeadScope.js.map → documentDiscovery/documentHeadScope.js.map} +0 -0
- /package/workflows/container-contents/{documentLocalRelink.js → documentLinks/documentLocalRelink.js} +0 -0
- /package/workflows/container-contents/{documentMoveDeniedReplay.js → documentMove/documentMoveDeniedReplay.js} +0 -0
- /package/workflows/container-contents/{documentMoveUnlinkIds.js → documentMove/documentMoveUnlinkIds.js} +0 -0
- /package/workflows/container-contents/{documentMoveUnlinkIds.js.map → documentMove/documentMoveUnlinkIds.js.map} +0 -0
- /package/workflows/container-contents/{documentRuntimeTargetSync.js → documentPriming/documentRuntimeTargetSync.js} +0 -0
- /package/workflows/container-contents/{documentStructureTypes.js → documentQueries/documentStructureTypes.js} +0 -0
- /package/workflows/container-contents/{blobInfoRows.js → info/blobInfoRows.js} +0 -0
- /package/workflows/container-contents/{blobInfoRows.js.map → info/blobInfoRows.js.map} +0 -0
- /package/workflows/container-contents/{blobInfoTypes.js → info/blobInfoTypes.js} +0 -0
- /package/workflows/container-contents/{documentInfoTypes.js → info/documentInfoTypes.js} +0 -0
- /package/workflows/container-contents/{metadataReadState.js → metadata/metadataReadState.js} +0 -0
- /package/workflows/container-contents/{metadataStateInstallation.js → metadata/metadataStateInstallation.js} +0 -0
- /package/workflows/container-contents/{metadataSyncFollowup.js → metadata/metadataSyncFollowup.js} +0 -0
- /package/workflows/container-contents/{metadataSyncFollowup.js.map → metadata/metadataSyncFollowup.js.map} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.d.ts → metadata/metadataSyncRegistrations.d.ts} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.js → metadata/metadataSyncRegistrations.js} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.js.map → metadata/metadataSyncRegistrations.js.map} +0 -0
- /package/workflows/container-contents/{metadataTypes.js → metadata/metadataTypes.js} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.d.ts → pendingWrites/pendingWritesTypes.d.ts} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.js → pendingWrites/pendingWritesTypes.js} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.js.map → pendingWrites/pendingWritesTypes.js.map} +0 -0
- /package/workflows/container-contents/{remoteHydrationLog.js → remoteHydration/remoteHydrationLog.js} +0 -0
- /package/workflows/container-contents/{remoteHydrationLog.js.map → remoteHydration/remoteHydrationLog.js.map} +0 -0
- /package/workflows/documents/{attachmentPersistence.js → attachments/attachmentPersistence.js} +0 -0
- /package/workflows/documents/{orphanBlobReclaimState.js → attachments/orphanBlobReclaimState.js} +0 -0
- /package/workflows/documents/{createProjection.js → create/createProjection.js} +0 -0
- /package/workflows/documents/{createProjection.js.map → create/createProjection.js.map} +0 -0
- /package/workflows/documents/{createProjectionFetch.js → create/createProjectionFetch.js} +0 -0
- /package/workflows/documents/{reportDocumentSyncQuarantine.js → sync/reportDocumentSyncQuarantine.js} +0 -0
- /package/workflows/documents/{syncAttemptState.js → sync/syncAttemptState.js} +0 -0
- /package/workflows/documents/{syncTrace.d.ts → sync/syncTrace.d.ts} +0 -0
- /package/workflows/documents/{syncTrace.js.map → sync/syncTrace.js.map} +0 -0
- /package/workflows/documents/{syncFailureClearance.d.ts → syncFailures/syncFailureClearance.d.ts} +0 -0
- /package/workflows/documents/{syncFailureClearance.js → syncFailures/syncFailureClearance.js} +0 -0
- /package/workflows/documents/{syncFailureClearance.js.map → syncFailures/syncFailureClearance.js.map} +0 -0
- /package/workflows/documents/{syncRepairAbandon.js → syncFailures/syncRepairAbandon.js} +0 -0
- /package/workflows/documents/{syncPlanProjection.js → syncPlan/syncPlanProjection.js} +0 -0
- /package/workflows/documents/{syncRekeyCommit.js.map → syncRekeys/syncRekeyCommit.js.map} +0 -0
- /package/workflows/organizations/{groupMetadataErrors.js.map → groupMetadata/groupMetadataErrors.js.map} +0 -0
- /package/workflows/organizations/{groupMutationAuthorization.js → groupPolicy/groupMutationAuthorization.js} +0 -0
- /package/workflows/organizations/{groupMutationAuthorization.js.map → groupPolicy/groupMutationAuthorization.js.map} +0 -0
- /package/workflows/organizations/{groupPolicyMutationHead.js.map → groupPolicy/groupPolicyMutationHead.js.map} +0 -0
- /package/workflows/organizations/{groupPolicyHistoryPage.js → policyHistory/groupPolicyHistoryPage.js} +0 -0
- /package/workflows/organizations/{policyHistoryReadModel.js → policyHistory/policyHistoryReadModel.js} +0 -0
- /package/workflows/organizations/{policyHistoryReadModel.js.map → policyHistory/policyHistoryReadModel.js.map} +0 -0
- /package/workflows/organizations/{policyHistoryTypes.js → policyHistory/policyHistoryTypes.js} +0 -0
- /package/workflows/organizations/{policyHistoryTypes.js.map → policyHistory/policyHistoryTypes.js.map} +0 -0
- /package/workflows/organizations/{principalPolicyApi.js → principalPolicy/principalPolicyApi.js} +0 -0
- /package/workflows/organizations/{principalPolicyRequest.js.map → principalPolicy/principalPolicyRequest.js.map} +0 -0
- /package/workflows/organizations/{organizationPresentationFailures.js.map → readModel/organizationPresentationFailures.js.map} +0 -0
- /package/workflows/principals/{principalAcknowledgementChecks.js → acknowledgements/principalAcknowledgementChecks.js} +0 -0
- /package/workflows/principals/{principalAcknowledgementChecks.js.map → acknowledgements/principalAcknowledgementChecks.js.map} +0 -0
- /package/workflows/principals/{principalHistoryRecoveryVerification.js.map → historyRecovery/principalHistoryRecoveryVerification.js.map} +0 -0
- /package/workflows/principals/{recoverPrincipalHistoryPage.js.map → historyRecovery/recoverPrincipalHistoryPage.js.map} +0 -0
- /package/workflows/principals/{recoverPrincipalPolicyHistory.d.ts → historyRecovery/recoverPrincipalPolicyHistory.d.ts} +0 -0
- /package/workflows/principals/{principalPolicyCacheScope.js → policyCache/principalPolicyCacheScope.js} +0 -0
- /package/workflows/principals/{principalPolicyCacheScope.js.map → policyCache/principalPolicyCacheScope.js.map} +0 -0
- /package/workflows/principals/{publicPrincipalHistoryTypes.js → publicHistory/publicPrincipalHistoryTypes.js} +0 -0
- /package/workflows/principals/{principalRecoveryDiscoveryPage.js → recoveryOperation/principalRecoveryDiscoveryPage.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"persistedDocumentRemoval.js","sourceRoot":"","sources":["persistedDocumentRemoval.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAEL,gCAAgC,GACjC,MAAM,uCAAuC,CAAC;AAM/C,OAAO,EAEL,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,oCAAoC,EAAE,MAAM,gBAAgB,CAAC;AAEtE,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,KAqB7C;IACC,MAAM,kBAAkB,GAAG,gCAAgC,CACzD,KAAK,CAAC,kBAAkB,CACzB,CAAC;IACF,MAAM,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpD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,MAAM,kBAAkB,CAAC,oCAAoC,CAAC;gBAC5D,YAAY,EAAE,QAAQ,EAAE,YAAY,IAAI,qBAAqB;gBAC7D,OAAO,EAAE,aAAa;gBACtB,OAAO,EAAE,KAAK,CAAC,OAAO;aACvB,CAAC,CAAC;QACL,CAAC;QACD,KAAK,CAAC,mBAAmB,EAAE,EAAE,CAAC;QAC9B,OAAO,GAAG,IAAI,CAAC;IACjB,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AACjB,CAAC;AAID;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,KAMrD;IACC,MAAM,KAAK,CAAC,WAAW,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACpD,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,sBAAsB,EAAE,CAAC;QAC9C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,CAAC;IACD,OAAO,KAAK,CAAC,WAAW,CAAC,sBAAsB,CAC7C,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,OAAO,EACb,KAAK,CAAC,kBAAkB,EACxB,KAAK,CAAC,kBAAkB,CACzB,CAAC;AACJ,CAAC","sourcesContent":["import { DEFAULT_DOCUMENT_KIND } from \"../../../data/documents/documentConstants\";\nimport {\n type DocumentProjectorRegistryInput,\n resolveDocumentProjectorRegistry,\n} from \"../../../data/documents/documentKinds\";\nimport type {\n DiscardDocumentToShellResult,\n DocumentsPersistence,\n StoredDocumentRecord,\n} from \"../../../data/persistence/documents/documentsPersistence\";\nimport {\n type ExecSql,\n runSerializedSqlMutation,\n} from \"../../../data/sqlite/sqlSchema\";\nimport { ensureDocumentClientProjectionTables } from \"../persistence\";\n\nexport async function deletePersistedDocument(input: {\n /**\n * Runs in the same SQLite transaction as the matched document teardown.\n * Used to atomically pin a verified terminal purge proof.\n */\n beforeDeleteInTransaction?:\n | ((transactionExecSql: ExecSql) => Promise<void>)\n | undefined;\n canStartDurableMutation?: (() => boolean) | undefined;\n documentProjectors: DocumentProjectorRegistryInput;\n execSql: ExecSql;\n expectedRecord?: StoredDocumentRecord | undefined;\n localId: string;\n /**\n * Runs INSIDE the serialized mutation, after the deletes commit: callers\n * invalidate their in-memory store generation here so any failure handler\n * queued behind this mutation observes the invalidation and cannot\n * resurrect a row the deletion just removed.\n */\n onDeletedInMutation?: (() => void) | undefined;\n persistence: DocumentsPersistence;\n}): Promise<boolean> {\n const documentProjectors = resolveDocumentProjectorRegistry(\n input.documentProjectors,\n );\n await input.persistence.ensureSchema(input.execSql);\n await ensureDocumentClientProjectionTables({\n documentProjectors,\n execSql: input.execSql,\n });\n let deleted = false;\n await runSerializedSqlMutation(input.execSql, async (lockedExecSql) => {\n // The guard runs INSIDE the claimed mutation: the pre-claim answer can go\n // stale while the deletion waits behind another mutation (a store reset,\n // a replacement generation's persist), and deleting on the stale answer\n // would wipe rows the newer generation just wrote.\n if (input.canStartDurableMutation && !input.canStartDurableMutation()) {\n return;\n }\n if (input.expectedRecord) {\n const identityMatched = await input.persistence.deleteDocumentIfMatches(\n lockedExecSql,\n input.expectedRecord,\n (transactionExecSql) =>\n (async () => {\n await documentProjectors.deleteStoredDocumentClientProjection({\n documentKind:\n input.expectedRecord?.documentKind ?? DEFAULT_DOCUMENT_KIND,\n execSql: transactionExecSql,\n localId: input.localId,\n });\n await input.beforeDeleteInTransaction?.(transactionExecSql);\n })(),\n );\n if (!identityMatched) return;\n } else {\n if (input.beforeDeleteInTransaction) {\n throw new Error(\n \"Atomic document purge checkpointing requires an expected document record\",\n );\n }\n const existing = await input.persistence.loadDocument(\n lockedExecSql,\n input.localId,\n );\n await input.persistence.deleteDocument(lockedExecSql, input.localId);\n await documentProjectors.deleteStoredDocumentClientProjection({\n documentKind: existing?.documentKind ?? DEFAULT_DOCUMENT_KIND,\n execSql: lockedExecSql,\n localId: input.localId,\n });\n }\n input.onDeletedInMutation?.();\n deleted = true;\n });\n return deleted;\n}\n\nexport type DiscardedDocumentShellResult = DiscardDocumentToShellResult;\n\n/**\n * Convert a stuck document's local state to the freshly-discovered-share\n * shell. The persistence implementation owns the whole sequence — the\n * eligibility checks (local-only, unlinked, or move-pending documents are\n * refused), the row teardown, the document-kind client-projection clear, and\n * the shell upsert — and commits it as ONE transaction, so an interruption\n * leaves either the fully old or the fully shelled document (never, e.g., a\n * discarded contact whose projected fields stay visible). Implementations\n * without the full document schema do not offer the operation and refuse.\n *\n * Returns the reclaimable storage keys on success — the deleted rows were\n * the only durable pointers to those bytes, so the caller reclaims them.\n */\nexport async function discardPersistedDocumentToShell(input: {\n documentProjectors: DocumentProjectorRegistryInput;\n execSql: ExecSql;\n expectedDocumentId: string;\n localId: string;\n persistence: DocumentsPersistence;\n}): Promise<DiscardedDocumentShellResult> {\n await input.persistence.ensureSchema(input.execSql);\n if (!input.persistence.discardDocumentToShell) {\n return { discarded: false };\n }\n return input.persistence.discardDocumentToShell(\n input.execSql,\n input.localId,\n input.expectedDocumentId,\n input.documentProjectors,\n );\n}\n"]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { AccessManifestBundleWireResponse } from "../../../internal/validators/response/index.js";
|
|
2
|
+
/** The selected purge root and the parent the user selected it under. */
|
|
3
|
+
export interface SubtreePurgeRoot {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly parentId: string | null;
|
|
6
|
+
}
|
|
7
|
+
/** Check the exact verified path that the destructive request will cite. */
|
|
8
|
+
export declare function assertSubtreePurgePath(path: readonly AccessManifestBundleWireResponse[], root: SubtreePurgeRoot | undefined): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isPlainObject } from "../../../internal/validators/isPlainObject.js";
|
|
2
|
+
import { readManifestContainerId } from "../../../data/documents/shared/readers.js";
|
|
3
|
+
function readSignedParentContainerId(bundle) {
|
|
4
|
+
return isPlainObject(bundle.state)
|
|
5
|
+
? Reflect.get(bundle.state, "parentContainerId")
|
|
6
|
+
: undefined;
|
|
7
|
+
}
|
|
8
|
+
/** Check the exact verified path that the destructive request will cite. */
|
|
9
|
+
export function assertSubtreePurgePath(path, root) {
|
|
10
|
+
if (root === undefined)
|
|
11
|
+
return;
|
|
12
|
+
const rootBundle = path.find((bundle) => readManifestContainerId(bundle) === root.id);
|
|
13
|
+
// A valid move out of the selected subtree, or a settled restore of the
|
|
14
|
+
// selected root itself, is ordinary concurrent work.
|
|
15
|
+
if (!rootBundle || readSignedParentContainerId(rootBundle) !== root.parentId)
|
|
16
|
+
throw new Error("Document placement is outside the requested purge subtree");
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=subtreePurgeScope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subtreePurgeScope.js","sourceRoot":"","sources":["subtreePurgeScope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAQjF,SAAS,2BAA2B,CAClC,MAAwC;IAExC,OAAO,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;QAChC,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,EAAE,mBAAmB,CAAC;QAChD,CAAC,CAAC,SAAS,CAAC;AAChB,CAAC;AAED,4EAA4E;AAC5E,MAAM,UAAU,sBAAsB,CACpC,IAAiD,EACjD,IAAkC;IAElC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO;IAC/B,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAC1B,CAAC,MAAM,EAAE,EAAE,CAAC,uBAAuB,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC,EAAE,CACxD,CAAC;IACF,wEAAwE;IACxE,qDAAqD;IACrD,IAAI,CAAC,UAAU,IAAI,2BAA2B,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC,QAAQ;QAC1E,MAAM,IAAI,KAAK,CACb,2DAA2D,CAC5D,CAAC;AACN,CAAC","sourcesContent":["import { isPlainObject } from \"@tearleads/validators/isPlainObject\";\nimport type { AccessManifestBundleWireResponse } from \"@tearleads/validators/response\";\nimport { readManifestContainerId } from \"../../../data/documents/shared/readers\";\n\n/** The selected purge root and the parent the user selected it under. */\nexport interface SubtreePurgeRoot {\n readonly id: string;\n readonly parentId: string | null;\n}\n\nfunction readSignedParentContainerId(\n bundle: AccessManifestBundleWireResponse,\n): unknown {\n return isPlainObject(bundle.state)\n ? Reflect.get(bundle.state, \"parentContainerId\")\n : undefined;\n}\n\n/** Check the exact verified path that the destructive request will cite. */\nexport function assertSubtreePurgePath(\n path: readonly AccessManifestBundleWireResponse[],\n root: SubtreePurgeRoot | undefined,\n): void {\n if (root === undefined) return;\n const rootBundle = path.find(\n (bundle) => readManifestContainerId(bundle) === root.id,\n );\n // A valid move out of the selected subtree, or a settled restore of the\n // selected root itself, is ordinary concurrent work.\n if (!rootBundle || readSignedParentContainerId(rootBundle) !== root.parentId)\n throw new Error(\n \"Document placement is outside the requested purge subtree\",\n );\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { emptyVersionVector, getImportBlobMetadata, versionVectorsEqual, } from
|
|
|
2
2
|
import { createPendingUpdateFields } from "../../data/documents/documentSync.js";
|
|
3
3
|
import { importContentKeyMaterial } from "../../data/documents/shared/contentRecordKeys.js";
|
|
4
4
|
import { encryptDocumentPendingUpdate } from "../../data/documents/shared/crypto.js";
|
|
5
|
-
import { signDocumentOutgoingUpdate } from "./syncPlanIdentity.js";
|
|
5
|
+
import { signDocumentOutgoingUpdate } from "./syncPlan/syncPlanIdentity.js";
|
|
6
6
|
// A zero-span snapshot (empty document) yields no baseline; the unlink is
|
|
7
7
|
// sent without one and the server verifies the committed frontier is empty.
|
|
8
8
|
export async function completeLinkSetMutationRequest(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rotationBaseline.js","sourceRoot":"","sources":["rotationBaseline.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,kB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C,UAAU;QAC5B,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,MAAM,EAAE,aAAa;KACtB,CAAC,CAAC;IAEH,OAAO,0BAA0B,CAAC;QAChC,4BAA4B,EAAE,KAAK,CAAC,4BAA4B;QAChE,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,eAAe,EAAE,KAAK,CAAC,eAAe;QACtC,UAAU,EAAE,KAAK,CAAC,UAAU;QAC5B,2BAA2B,EAAE,KAAK,CAAC,2BAA2B;QAC9D,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;QAC5C,cAAc,EAAE,KAAK,CAAC,cAAc;QACpC,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,MAAM,EAAE;YACN,cAAc,EAAE,iBAAiB;YACjC,qBAAqB,EAAE,uBAAuB;YAC9C,cAAc,EAAE,SAAS,CAAC,cAAc;YACxC,eAAe,EAAE,SAAS,CAAC,eAAe;YAC1C,aAAa,EAAE,SAAS,CAAC,aAAa;YACtC,EAAE,EAAE,aAAa,CAAC,EAAE;YACpB,YAAY,EAAE,SAAS,CAAC,YAAY;YACpC,uBAAuB,EAAE,aAAa,CAAC,uBAAuB;YAC9D,yBAAyB,EAAE,aAAa,CAAC,yBAAyB;YAClE,aAAa,EAAE,SAAS,CAAC,aAAa;YACtC,mBAAmB,EAAE,QAAQ,CAAC,uBAAuB;SACtD;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n emptyVersionVector,\n getImportBlobMetadata,\n versionVectorsEqual,\n} from \"@tearleads/loro\";\nimport type {\n ContainerManifestRef,\n DocumentOutgoingUpdate,\n} from \"@tearleads/validators/request\";\nimport { createPendingUpdateFields } from \"../../data/documents/documentSync\";\nimport { importContentKeyMaterial } from \"../../data/documents/shared/contentRecordKeys\";\nimport { encryptDocumentPendingUpdate } from \"../../data/documents/shared/crypto\";\nimport type {\n DocumentCreateAuthor,\n DocumentLinkSetMutationOperation,\n MaterializedDocumentLinkSetMutationPlan,\n} from \"../../data/documents/shared/types\";\nimport { signDocumentOutgoingUpdate } from \"./syncPlan/syncPlanIdentity\";\n\n// A zero-span snapshot (empty document) yields no baseline; the unlink is\n// sent without one and the server verifies the committed frontier is empty.\nexport async function completeLinkSetMutationRequest(input: {\n author: DocumentCreateAuthor;\n materializedPlan: MaterializedDocumentLinkSetMutationPlan;\n operation: DocumentLinkSetMutationOperation;\n rotationSnapshot: Uint8Array | undefined;\n signedAt: string;\n}) {\n const rotationBaseline =\n input.operation === \"unlink\" && input.rotationSnapshot\n ? await buildDocumentRotationBaseline({\n authorizingContainerPathRefs:\n input.materializedPlan.plan.request.authorizingContainerPathRefs,\n author: input.author,\n contentKey: input.materializedPlan.contentKey,\n contentKeyEpoch: input.materializedPlan.plan.contentKeyEpoch,\n documentId: input.materializedPlan.plan.documentId,\n expectedLinkSetManifestHash: input.materializedPlan.plan.manifestHash,\n expectedTargetHash: input.materializedPlan.plan.targetHash,\n organizationId: input.materializedPlan.plan.state.organizationId,\n signedAt: input.signedAt,\n snapshot: input.rotationSnapshot,\n })\n : null;\n return rotationBaseline\n ? { ...input.materializedPlan.plan.request, rotationBaseline }\n : input.materializedPlan.plan.request;\n}\n\nexport async function buildDocumentRotationBaseline(input: {\n readonly authorizingContainerPathRefs: readonly (readonly ContainerManifestRef[])[];\n readonly author: DocumentCreateAuthor;\n readonly contentKey: Uint8Array;\n readonly contentKeyEpoch: number;\n readonly documentId: string;\n readonly expectedLinkSetManifestHash: string;\n readonly expectedTargetHash: string;\n readonly organizationId: string;\n readonly signedAt: string;\n readonly snapshot: Uint8Array;\n}): Promise<DocumentOutgoingUpdate | null> {\n const metadata = getImportBlobMetadata(input.snapshot);\n if (\n metadata.mode !== \"snapshot\" ||\n !versionVectorsEqual(\n metadata.partialStartVersionVector,\n emptyVersionVector(),\n )\n ) {\n throw new Error(\n \"Document unlink requires a full-history rotation snapshot\",\n );\n }\n const pendingFields = createPendingUpdateFields(\n input.snapshot,\n metadata.partialEndVersionVector,\n );\n if (!pendingFields) {\n // A document with no history serializes to a zero-span full-history\n // snapshot. There is nothing for a rotation baseline to cover, so the\n // unlink is submitted without one; the server independently proves the\n // committed frontier is empty before accepting it.\n return null;\n }\n const pendingUpdate = {\n id: crypto.randomUUID(),\n ...pendingFields,\n };\n const encrypted = await encryptDocumentPendingUpdate({\n contentKeyMaterial: await importContentKeyMaterial(input.contentKey),\n contentKeyEpoch: input.contentKeyEpoch,\n documentId: input.documentId,\n organizationId: input.organizationId,\n update: pendingUpdate,\n });\n\n return signDocumentOutgoingUpdate({\n authorizingContainerPathRefs: input.authorizingContainerPathRefs,\n author: input.author,\n contentKeyEpoch: input.contentKeyEpoch,\n documentId: input.documentId,\n expectedLinkSetManifestHash: input.expectedLinkSetManifestHash,\n expectedTargetHash: input.expectedTargetHash,\n organizationId: input.organizationId,\n signedAt: input.signedAt,\n update: {\n checkpointKind: \"rotate_baseline\",\n checkpointPayloadKind: \"full_history_snapshot\",\n ciphertextHash: encrypted.ciphertextHash,\n contentRecordId: encrypted.contentRecordId,\n encryptedData: encrypted.encryptedData,\n id: pendingUpdate.id,\n metadataHash: encrypted.metadataHash,\n partialEndVersionVector: pendingFields.partialEndVersionVector,\n partialStartVersionVector: pendingFields.partialStartVersionVector,\n plaintextHash: encrypted.plaintextHash,\n sourceVersionVector: metadata.partialEndVersionVector,\n },\n });\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SyncRemoteDocumentResult } from "../../../data/documents/shared/types.js";
|
|
2
|
+
import { type SyncRemoteDocumentInput } from "./readOnlySync.js";
|
|
3
|
+
export declare function hasDocumentUpdateEvent(events: ReadonlyArray<unknown>, documentId: string | null | undefined): boolean;
|
|
4
|
+
export declare function syncRemoteDocument(input: SyncRemoteDocumentInput): Promise<SyncRemoteDocumentResult | null>;
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { KeyingVerificationError } from "../../../internal/crypto/index.js";
|
|
2
|
+
import { isDocumentUpdateCreatedEvent } from "../../../data/documents/documentSync.js";
|
|
3
|
+
import { isDocumentSyncUpdateIsolationError } from "../../../data/documents/shared/documentSyncUpdateIsolation.js";
|
|
4
|
+
import { InvalidDocumentSyncPullContinuationError, } from "../../../data/documents/shared/syncPagination.js";
|
|
5
|
+
import { isProjectionVerificationCancelledError, requireProjectionUserKeyResolver, } from "../../../data/keyingProjectionVerification/index.js";
|
|
6
|
+
import { createVerifiedRemoteDocumentDeletionHandler } from "../purge/index.js";
|
|
7
|
+
import { assertRawContinuationCanRetry, resolveSyncAttemptWriterProjection, submitDocumentSyncAttemptIfAllowed, } from "../syncFailures/index.js";
|
|
8
|
+
import { abandonAfterRetryableConflicts, abandonBlockedSync, } from "../syncFailures/syncAbandon.js";
|
|
9
|
+
import { recoverablePendingUpdates } from "../syncPlan/syncPlanRequestBounds.js";
|
|
10
|
+
import { requireStandaloneAncestorRepairs } from "../syncRekeys/syncContainerRekeyPreparation.js";
|
|
11
|
+
import { tryPersistedReadOnlyDocumentSync, } from "./readOnlySync.js";
|
|
12
|
+
import { planDocumentSyncAttempt, projectionFailureHandler, } from "./syncAttemptPlanning.js";
|
|
13
|
+
import { resolveSubmittedDocumentSyncResult } from "./syncSubmittedResult.js";
|
|
14
|
+
export function hasDocumentUpdateEvent(events, documentId) {
|
|
15
|
+
if (!documentId)
|
|
16
|
+
return false;
|
|
17
|
+
return events.some((event) => isDocumentUpdateCreatedEvent(event) && event.documentId === documentId);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* A retryable stale-projection conflict means this writer projection is behind
|
|
21
|
+
* the server. Evict only this document so the next attempt re-derives targets.
|
|
22
|
+
*/
|
|
23
|
+
function evictStaleProjectionForRetry(input) {
|
|
24
|
+
input.apiClient.evictDocumentWriterProjection?.(input.documentId);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A pass may repair a covering-baseline rejection by regenerating queued
|
|
28
|
+
* rotation checkpoints — but only when there is something to regenerate FROM
|
|
29
|
+
* (a snapshot provider and queued checkpoint rows), the failed pass was not
|
|
30
|
+
* already a heal or a regeneration (whose fresh baseline proves this device
|
|
31
|
+
* is simply behind), and an attempt remains.
|
|
32
|
+
*/
|
|
33
|
+
function canRegenerateQueuedCheckpoints(input) {
|
|
34
|
+
return (!input.regenerateQueuedCheckpoints &&
|
|
35
|
+
!input.materializedPlan.healedStaleContentKeyBundle &&
|
|
36
|
+
input.sync.buildRotationSnapshot !== undefined &&
|
|
37
|
+
input.pendingUpdates.some((update) => update.sourceVersionVector != null));
|
|
38
|
+
}
|
|
39
|
+
async function submitPlannedSyncAttempt(args) {
|
|
40
|
+
try {
|
|
41
|
+
return await submitDocumentSyncAttemptIfAllowed({
|
|
42
|
+
apiClient: args.sync.apiClient,
|
|
43
|
+
attempt: args.attempt,
|
|
44
|
+
canRegenerateQueuedCheckpoints: canRegenerateQueuedCheckpoints({
|
|
45
|
+
materializedPlan: args.materializedPlan,
|
|
46
|
+
pendingUpdates: args.pendingUpdates,
|
|
47
|
+
regenerateQueuedCheckpoints: args.regenerateQueuedCheckpoints,
|
|
48
|
+
sync: args.sync,
|
|
49
|
+
}),
|
|
50
|
+
documentId: args.sync.documentId,
|
|
51
|
+
expectedCommitLsnMode: args.pullContinuation?.commitLsnMode,
|
|
52
|
+
isRemoteSyncBlocked: args.sync.isRemoteSyncBlocked,
|
|
53
|
+
maxAttempts: args.maxAttempts,
|
|
54
|
+
onInlineRepairRefused: () => requireStandaloneAncestorRepairs(args.sync),
|
|
55
|
+
onRemoteDocumentDeleted: args.sync.onRemoteDocumentDeleted,
|
|
56
|
+
onOutgoingUpdatesMaterialized: args.sync.onOutgoingUpdatesMaterialized,
|
|
57
|
+
onSyncTrace: args.sync.onSyncTrace,
|
|
58
|
+
onTerminalSubmitFailure: args.sync.onTerminalSubmitFailure,
|
|
59
|
+
pendingUpdates: args.pendingUpdates,
|
|
60
|
+
plan: args.materializedPlan.plan,
|
|
61
|
+
failureBlocksQueuedWrites: args.failureBlocksQueuedWrites,
|
|
62
|
+
stillCurrent: args.sync.stillCurrent,
|
|
63
|
+
warmReferencedPrincipalPolicies: args.sync.warmReferencedPrincipalPolicies,
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
catch (error) {
|
|
67
|
+
if (error instanceof InvalidDocumentSyncPullContinuationError &&
|
|
68
|
+
args.pullContinuation !== undefined &&
|
|
69
|
+
args.sync.historyMode !== "raw") {
|
|
70
|
+
return "retry";
|
|
71
|
+
}
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
function resolveAttemptProjection(input, failureBlocksQueuedWrites, reusableWriterProjection) {
|
|
76
|
+
return resolveSyncAttemptWriterProjection({
|
|
77
|
+
apiClient: input.apiClient,
|
|
78
|
+
documentId: input.documentId,
|
|
79
|
+
onRemoteDocumentDeleted: input.onRemoteDocumentDeleted,
|
|
80
|
+
onSyncAbandoned: input.onSyncAbandoned,
|
|
81
|
+
onSyncTrace: input.onSyncTrace,
|
|
82
|
+
onTerminalFailure: projectionFailureHandler(input, failureBlocksQueuedWrites),
|
|
83
|
+
reusableWriterProjection,
|
|
84
|
+
stillCurrent: input.stillCurrent,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
function resolveRemoteSyncProjectionUserKey(input) {
|
|
88
|
+
return requireProjectionUserKeyResolver(input.resolveProjectionUserKey, "Remote document sync");
|
|
89
|
+
}
|
|
90
|
+
async function invalidatePullCursor(input, pullContinuation) {
|
|
91
|
+
if (pullContinuation !== undefined) {
|
|
92
|
+
await input.onPullContinuationInvalidated?.(pullContinuation);
|
|
93
|
+
}
|
|
94
|
+
return undefined;
|
|
95
|
+
}
|
|
96
|
+
async function preparePersistedDocumentSync(input, resolveProjectionUserKey) {
|
|
97
|
+
let pullContinuation = input.pullContinuation;
|
|
98
|
+
try {
|
|
99
|
+
const persisted = await tryPersistedReadOnlyDocumentSync(input, resolveProjectionUserKey);
|
|
100
|
+
if (persisted?.kind === "completed")
|
|
101
|
+
return persisted;
|
|
102
|
+
if (persisted?.kind === "not_completed" && input.historyMode !== "raw") {
|
|
103
|
+
pullContinuation = await invalidatePullCursor(input, pullContinuation);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
catch (error) {
|
|
107
|
+
if (!(error instanceof InvalidDocumentSyncPullContinuationError) ||
|
|
108
|
+
pullContinuation === undefined ||
|
|
109
|
+
input.historyMode === "raw") {
|
|
110
|
+
throw error;
|
|
111
|
+
}
|
|
112
|
+
pullContinuation = await invalidatePullCursor(input, pullContinuation);
|
|
113
|
+
}
|
|
114
|
+
return { kind: "continue", pullContinuation };
|
|
115
|
+
}
|
|
116
|
+
function failureBlocksQueuedWrites(input) {
|
|
117
|
+
return (input.pendingUpdates.length > 0 || input.recoveryPendingUpdateCount > 0);
|
|
118
|
+
}
|
|
119
|
+
async function retryRemoteSyncAttempt(sync, continuation) {
|
|
120
|
+
evictStaleProjectionForRetry(sync);
|
|
121
|
+
return {
|
|
122
|
+
kind: "retry",
|
|
123
|
+
pullContinuation: await invalidatePullCursor(sync, continuation),
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
async function runRemoteDocumentSyncAttempt(input) {
|
|
127
|
+
if (input.sync.stillCurrent?.() === false) {
|
|
128
|
+
return { kind: "complete", result: null };
|
|
129
|
+
}
|
|
130
|
+
const blocksQueuedWrites = failureBlocksQueuedWrites({
|
|
131
|
+
pendingUpdates: input.state.pendingUpdates,
|
|
132
|
+
recoveryPendingUpdateCount: input.state.recoveryPendingUpdatesById.size,
|
|
133
|
+
});
|
|
134
|
+
const writerProjection = await resolveAttemptProjection(input.sync, blocksQueuedWrites, input.state.reusableWriterProjection);
|
|
135
|
+
if (input.sync.stillCurrent?.() === false || !writerProjection) {
|
|
136
|
+
return { kind: "complete", result: null };
|
|
137
|
+
}
|
|
138
|
+
const planned = await planDocumentSyncAttempt({
|
|
139
|
+
pendingUpdates: input.state.pendingUpdates,
|
|
140
|
+
pullContinuation: input.state.pullContinuation,
|
|
141
|
+
regenerateQueuedCheckpoints: input.state.regenerateQueuedCheckpoints,
|
|
142
|
+
sync: input.sync,
|
|
143
|
+
failureBlocksQueuedWrites: blocksQueuedWrites,
|
|
144
|
+
writerProjection,
|
|
145
|
+
});
|
|
146
|
+
if (planned === "retry") {
|
|
147
|
+
return retryRemoteSyncAttempt(input.sync, input.state.pullContinuation);
|
|
148
|
+
}
|
|
149
|
+
if (!planned || input.sync.stillCurrent?.() === false) {
|
|
150
|
+
return { kind: "complete", result: null };
|
|
151
|
+
}
|
|
152
|
+
const [materializedPlan] = planned;
|
|
153
|
+
const submitted = await submitPlannedSyncAttempt({
|
|
154
|
+
attempt: input.attempt,
|
|
155
|
+
materializedPlan,
|
|
156
|
+
maxAttempts: input.maxAttempts,
|
|
157
|
+
pendingUpdates: recoverablePendingUpdates(input.state.pendingUpdates, materializedPlan),
|
|
158
|
+
pullContinuation: input.state.pullContinuation,
|
|
159
|
+
regenerateQueuedCheckpoints: input.state.regenerateQueuedCheckpoints,
|
|
160
|
+
sync: input.sync,
|
|
161
|
+
failureBlocksQueuedWrites: blocksQueuedWrites,
|
|
162
|
+
});
|
|
163
|
+
if (input.sync.stillCurrent?.() === false || submitted === "cancelled") {
|
|
164
|
+
return { kind: "complete", result: null };
|
|
165
|
+
}
|
|
166
|
+
if (submitted === "retry") {
|
|
167
|
+
assertRawContinuationCanRetry(input.sync.historyMode, input.state.pullContinuation);
|
|
168
|
+
return retryRemoteSyncAttempt(input.sync, input.state.pullContinuation);
|
|
169
|
+
}
|
|
170
|
+
if (submitted === "blocked") {
|
|
171
|
+
abandonBlockedSync(input.sync);
|
|
172
|
+
return { kind: "complete", result: null };
|
|
173
|
+
}
|
|
174
|
+
if (submitted === "stop") {
|
|
175
|
+
input.sync.onSyncAbandoned?.("the sync submit failed terminally");
|
|
176
|
+
return { kind: "complete", result: null };
|
|
177
|
+
}
|
|
178
|
+
if (submitted.kind === "regenerate_queued_checkpoints") {
|
|
179
|
+
return { kind: "regenerate" };
|
|
180
|
+
}
|
|
181
|
+
if (submitted.kind === "recover_update_id_conflict") {
|
|
182
|
+
// A lost response may mean the server committed both this update id and an
|
|
183
|
+
// inline container rekey. Force the read-only recovery pass to observe that
|
|
184
|
+
// committed successor projection instead of reusing a cached predecessor.
|
|
185
|
+
evictStaleProjectionForRetry(input.sync);
|
|
186
|
+
return { kind: "recover", updates: submitted.recoveryPendingUpdatesById };
|
|
187
|
+
}
|
|
188
|
+
const result = await resolveSubmittedDocumentSyncResult({
|
|
189
|
+
materializedPlan,
|
|
190
|
+
pendingUpdateIds: input.pendingUpdateIds,
|
|
191
|
+
pullComplete: submitted.pullComplete,
|
|
192
|
+
recoveryPendingUpdatesById: input.state.recoveryPendingUpdatesById,
|
|
193
|
+
resolveProjectionUserKey: input.resolveProjectionUserKey,
|
|
194
|
+
response: submitted.response,
|
|
195
|
+
sync: input.sync,
|
|
196
|
+
writerProjection: materializedPlan.writerProjection,
|
|
197
|
+
});
|
|
198
|
+
return {
|
|
199
|
+
kind: "complete",
|
|
200
|
+
result: input.sync.stillCurrent?.() === false ? null : result,
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
async function syncRemoteDocumentInternal(input) {
|
|
204
|
+
if (input.stillCurrent?.() === false)
|
|
205
|
+
return null;
|
|
206
|
+
const resolveProjectionUserKey = resolveRemoteSyncProjectionUserKey(input);
|
|
207
|
+
const maxAttempts = 3;
|
|
208
|
+
let pendingUpdates = input.pendingUpdates ?? [];
|
|
209
|
+
const pendingUpdateIds = pendingUpdates.map((update) => update.id);
|
|
210
|
+
let recoveryPendingUpdatesById = new Map();
|
|
211
|
+
let regenerateQueuedCheckpoints = false;
|
|
212
|
+
let reusableWriterProjection = input.writerProjection ?? null;
|
|
213
|
+
const persistedSync = await preparePersistedDocumentSync(input, resolveProjectionUserKey);
|
|
214
|
+
if (input.stillCurrent?.() === false)
|
|
215
|
+
return null;
|
|
216
|
+
if (persistedSync.kind === "completed")
|
|
217
|
+
return persistedSync.result;
|
|
218
|
+
let pullContinuation = persistedSync.pullContinuation;
|
|
219
|
+
for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {
|
|
220
|
+
const outcome = await runRemoteDocumentSyncAttempt({
|
|
221
|
+
attempt,
|
|
222
|
+
maxAttempts,
|
|
223
|
+
pendingUpdateIds,
|
|
224
|
+
resolveProjectionUserKey,
|
|
225
|
+
state: {
|
|
226
|
+
pendingUpdates,
|
|
227
|
+
pullContinuation,
|
|
228
|
+
recoveryPendingUpdatesById,
|
|
229
|
+
regenerateQueuedCheckpoints,
|
|
230
|
+
reusableWriterProjection,
|
|
231
|
+
},
|
|
232
|
+
sync: input,
|
|
233
|
+
});
|
|
234
|
+
reusableWriterProjection = null;
|
|
235
|
+
if (outcome.kind === "complete")
|
|
236
|
+
return outcome.result;
|
|
237
|
+
if (outcome.kind === "retry") {
|
|
238
|
+
pullContinuation = outcome.pullContinuation;
|
|
239
|
+
if (input.stillCurrent?.() === false)
|
|
240
|
+
return null;
|
|
241
|
+
continue;
|
|
242
|
+
}
|
|
243
|
+
if (outcome.kind === "regenerate") {
|
|
244
|
+
regenerateQueuedCheckpoints = true;
|
|
245
|
+
continue;
|
|
246
|
+
}
|
|
247
|
+
recoveryPendingUpdatesById = outcome.updates;
|
|
248
|
+
pendingUpdates = [];
|
|
249
|
+
}
|
|
250
|
+
return abandonAfterRetryableConflicts(input);
|
|
251
|
+
}
|
|
252
|
+
export async function syncRemoteDocument(input) {
|
|
253
|
+
try {
|
|
254
|
+
return await syncRemoteDocumentInternal({
|
|
255
|
+
...input,
|
|
256
|
+
onRemoteDocumentDeleted: createVerifiedRemoteDocumentDeletionHandler({
|
|
257
|
+
apiClient: input.apiClient,
|
|
258
|
+
execSql: input.execSql,
|
|
259
|
+
expectedOrganizationId: input.author.organizationId,
|
|
260
|
+
onVerifiedDeletion: ({ commitPurgeProof, documentId }) => {
|
|
261
|
+
if (input.stillCurrent?.() === false)
|
|
262
|
+
return;
|
|
263
|
+
if (!input.onRemoteDocumentDeleted) {
|
|
264
|
+
throw new KeyingVerificationError("missing_dependency", "Remote document deletion requires atomic local teardown");
|
|
265
|
+
}
|
|
266
|
+
return input.onRemoteDocumentDeleted({
|
|
267
|
+
commitPurgeProof,
|
|
268
|
+
documentId,
|
|
269
|
+
});
|
|
270
|
+
},
|
|
271
|
+
resolveProjectionUserKey: input.resolveProjectionUserKey,
|
|
272
|
+
stillCurrent: input.stillCurrent,
|
|
273
|
+
warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,
|
|
274
|
+
}),
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
catch (error) {
|
|
278
|
+
if (isProjectionVerificationCancelledError(error))
|
|
279
|
+
return null;
|
|
280
|
+
if (input.stillCurrent?.() !== false &&
|
|
281
|
+
isDocumentSyncUpdateIsolationError(error)) {
|
|
282
|
+
await input.onIncomingUpdateIsolationFailure?.(error);
|
|
283
|
+
}
|
|
284
|
+
throw error;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,4BAA4B,EAAE,MAAM,sCAAsC,CAAC;AACpF,OAAO,EAAE,kCAAkC,EAAE,MAAM,4DAA4D,CAAC;AAChH,OAAO,EAEL,wCAAwC,GACzC,MAAM,+CAA+C,CAAC;AAKvD,OAAO,EACL,sCAAsC,EAEtC,gCAAgC,GACjC,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,2CAA2C,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,kCAAkC,GACnC,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,8BAA8B,EAC9B,kBAAkB,GACnB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCA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AE,KAAK,KAAK;wBAAE,OAAO;oBAC7C,IAAI,CAAC,KAAK,CAAC,uBAAuB,EAAE,CAAC;wBACnC,MAAM,IAAI,uBAAuB,CAC/B,oBAAoB,EACpB,yDAAyD,CAC1D,CAAC;oBACJ,CAAC;oBACD,OAAO,KAAK,CAAC,uBAAuB,CAAC;wBACnC,gBAAgB;wBAChB,UAAU;qBACX,CAAC,CAAC;gBACL,CAAC;gBACD,wBAAwB,EAAE,KAAK,CAAC,wBAAwB;gBACxD,YAAY,EAAE,KAAK,CAAC,YAAY;gBAChC,+BAA+B,EAAE,KAAK,CAAC,+BAA+B;aACvE,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,sCAAsC,CAAC,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QAC/D,IACE,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,KAAK;YAChC,kCAAkC,CAAC,KAAK,CAAC,EACzC,CAAC;YACD,MAAM,KAAK,CAAC,gCAAgC,EAAE,CAAC,KAAK,CAAC,CAAC;QACxD,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC","sourcesContent":["import { KeyingVerificationError } from \"@tearleads/crypto\";\nimport type { DocumentWriterProjectionResponse } from \"@tearleads/validators/response\";\nimport { isDocumentUpdateCreatedEvent } from \"../../../data/documents/documentSync\";\nimport { isDocumentSyncUpdateIsolationError } from \"../../../data/documents/shared/documentSyncUpdateIsolation\";\nimport {\n type DocumentSyncPullContinuation,\n InvalidDocumentSyncPullContinuationError,\n} from \"../../../data/documents/shared/syncPagination\";\nimport type {\n MaterializedDocumentSyncPlan,\n SyncRemoteDocumentResult,\n} from \"../../../data/documents/shared/types\";\nimport {\n isProjectionVerificationCancelledError,\n type ProjectionUserKeyResolver,\n requireProjectionUserKeyResolver,\n} from \"../../../data/keyingProjectionVerification\";\nimport type { PendingUpdateRecord } from \"../../../data/sqlite/documentPersistence\";\nimport { createVerifiedRemoteDocumentDeletionHandler } from \"../purge\";\nimport {\n assertRawContinuationCanRetry,\n resolveSyncAttemptWriterProjection,\n submitDocumentSyncAttemptIfAllowed,\n} from \"../syncFailures\";\nimport {\n abandonAfterRetryableConflicts,\n abandonBlockedSync,\n} from \"../syncFailures/syncAbandon\";\nimport { recoverablePendingUpdates } from \"../syncPlan/syncPlanRequestBounds\";\nimport { requireStandaloneAncestorRepairs } from \"../syncRekeys/syncContainerRekeyPreparation\";\nimport {\n type SyncRemoteDocumentInput,\n tryPersistedReadOnlyDocumentSync,\n} from \"./readOnlySync\";\nimport {\n planDocumentSyncAttempt,\n projectionFailureHandler,\n} from \"./syncAttemptPlanning\";\nimport type {\n RemoteDocumentSyncAttemptOutcome,\n RemoteDocumentSyncAttemptState,\n} from \"./syncAttemptState\";\nimport { resolveSubmittedDocumentSyncResult } from \"./syncSubmittedResult\";\n\nexport function hasDocumentUpdateEvent(\n events: ReadonlyArray<unknown>,\n documentId: string | null | undefined,\n): boolean {\n if (!documentId) return false;\n return events.some(\n (event) =>\n isDocumentUpdateCreatedEvent(event) && event.documentId === documentId,\n );\n}\n/**\n * A retryable stale-projection conflict means this writer projection is behind\n * the server. Evict only this document so the next attempt re-derives targets.\n */\nfunction evictStaleProjectionForRetry(input: SyncRemoteDocumentInput): void {\n input.apiClient.evictDocumentWriterProjection?.(input.documentId);\n}\n\n/**\n * A pass may repair a covering-baseline rejection by regenerating queued\n * rotation checkpoints — but only when there is something to regenerate FROM\n * (a snapshot provider and queued checkpoint rows), the failed pass was not\n * already a heal or a regeneration (whose fresh baseline proves this device\n * is simply behind), and an attempt remains.\n */\nfunction canRegenerateQueuedCheckpoints(input: {\n materializedPlan: MaterializedDocumentSyncPlan;\n pendingUpdates: readonly PendingUpdateRecord[];\n regenerateQueuedCheckpoints: boolean;\n sync: SyncRemoteDocumentInput;\n}): boolean {\n return (\n !input.regenerateQueuedCheckpoints &&\n !input.materializedPlan.healedStaleContentKeyBundle &&\n input.sync.buildRotationSnapshot !== undefined &&\n input.pendingUpdates.some((update) => update.sourceVersionVector != null)\n );\n}\n\nasync function submitPlannedSyncAttempt(args: {\n attempt: number;\n materializedPlan: MaterializedDocumentSyncPlan;\n maxAttempts: number;\n pendingUpdates: readonly PendingUpdateRecord[];\n pullContinuation?: DocumentSyncPullContinuation | undefined;\n regenerateQueuedCheckpoints: boolean;\n sync: SyncRemoteDocumentInput;\n failureBlocksQueuedWrites: boolean;\n}) {\n try {\n return await submitDocumentSyncAttemptIfAllowed({\n apiClient: args.sync.apiClient,\n attempt: args.attempt,\n canRegenerateQueuedCheckpoints: canRegenerateQueuedCheckpoints({\n materializedPlan: args.materializedPlan,\n pendingUpdates: args.pendingUpdates,\n regenerateQueuedCheckpoints: args.regenerateQueuedCheckpoints,\n sync: args.sync,\n }),\n documentId: args.sync.documentId,\n expectedCommitLsnMode: args.pullContinuation?.commitLsnMode,\n isRemoteSyncBlocked: args.sync.isRemoteSyncBlocked,\n maxAttempts: args.maxAttempts,\n onInlineRepairRefused: () => requireStandaloneAncestorRepairs(args.sync),\n onRemoteDocumentDeleted: args.sync.onRemoteDocumentDeleted,\n onOutgoingUpdatesMaterialized: args.sync.onOutgoingUpdatesMaterialized,\n onSyncTrace: args.sync.onSyncTrace,\n onTerminalSubmitFailure: args.sync.onTerminalSubmitFailure,\n pendingUpdates: args.pendingUpdates,\n plan: args.materializedPlan.plan,\n failureBlocksQueuedWrites: args.failureBlocksQueuedWrites,\n stillCurrent: args.sync.stillCurrent,\n warmReferencedPrincipalPolicies:\n args.sync.warmReferencedPrincipalPolicies,\n });\n } catch (error) {\n if (\n error instanceof InvalidDocumentSyncPullContinuationError &&\n args.pullContinuation !== undefined &&\n args.sync.historyMode !== \"raw\"\n ) {\n return \"retry\" as const;\n }\n throw error;\n }\n}\n\nfunction resolveAttemptProjection(\n input: SyncRemoteDocumentInput,\n failureBlocksQueuedWrites: boolean,\n reusableWriterProjection: DocumentWriterProjectionResponse | null,\n) {\n return resolveSyncAttemptWriterProjection({\n apiClient: input.apiClient,\n documentId: input.documentId,\n onRemoteDocumentDeleted: input.onRemoteDocumentDeleted,\n onSyncAbandoned: input.onSyncAbandoned,\n onSyncTrace: input.onSyncTrace,\n onTerminalFailure: projectionFailureHandler(\n input,\n failureBlocksQueuedWrites,\n ),\n reusableWriterProjection,\n stillCurrent: input.stillCurrent,\n });\n}\nfunction resolveRemoteSyncProjectionUserKey(input: SyncRemoteDocumentInput) {\n return requireProjectionUserKeyResolver(\n input.resolveProjectionUserKey,\n \"Remote document sync\",\n );\n}\n\nasync function invalidatePullCursor(\n input: SyncRemoteDocumentInput,\n pullContinuation: DocumentSyncPullContinuation | undefined,\n): Promise<undefined> {\n if (pullContinuation !== undefined) {\n await input.onPullContinuationInvalidated?.(pullContinuation);\n }\n return undefined;\n}\n\nasync function preparePersistedDocumentSync(\n input: SyncRemoteDocumentInput,\n resolveProjectionUserKey: ProjectionUserKeyResolver,\n): Promise<\n | { readonly kind: \"completed\"; result: SyncRemoteDocumentResult | null }\n | {\n readonly kind: \"continue\";\n pullContinuation: DocumentSyncPullContinuation | undefined;\n }\n> {\n let pullContinuation = input.pullContinuation;\n try {\n const persisted = await tryPersistedReadOnlyDocumentSync(\n input,\n resolveProjectionUserKey,\n );\n if (persisted?.kind === \"completed\") return persisted;\n if (persisted?.kind === \"not_completed\" && input.historyMode !== \"raw\") {\n pullContinuation = await invalidatePullCursor(input, pullContinuation);\n }\n } catch (error) {\n if (\n !(error instanceof InvalidDocumentSyncPullContinuationError) ||\n pullContinuation === undefined ||\n input.historyMode === \"raw\"\n ) {\n throw error;\n }\n pullContinuation = await invalidatePullCursor(input, pullContinuation);\n }\n return { kind: \"continue\", pullContinuation };\n}\n\nfunction failureBlocksQueuedWrites(input: {\n readonly pendingUpdates: readonly PendingUpdateRecord[];\n readonly recoveryPendingUpdateCount: number;\n}): boolean {\n return (\n input.pendingUpdates.length > 0 || input.recoveryPendingUpdateCount > 0\n );\n}\n\nasync function retryRemoteSyncAttempt(\n sync: SyncRemoteDocumentInput,\n continuation: DocumentSyncPullContinuation | undefined,\n): Promise<RemoteDocumentSyncAttemptOutcome> {\n evictStaleProjectionForRetry(sync);\n return {\n kind: \"retry\",\n pullContinuation: await invalidatePullCursor(sync, continuation),\n };\n}\n\nasync function runRemoteDocumentSyncAttempt(input: {\n attempt: number;\n maxAttempts: number;\n pendingUpdateIds: readonly string[];\n resolveProjectionUserKey: ProjectionUserKeyResolver;\n state: RemoteDocumentSyncAttemptState;\n sync: SyncRemoteDocumentInput;\n}): Promise<RemoteDocumentSyncAttemptOutcome> {\n if (input.sync.stillCurrent?.() === false) {\n return { kind: \"complete\", result: null };\n }\n const blocksQueuedWrites = failureBlocksQueuedWrites({\n pendingUpdates: input.state.pendingUpdates,\n recoveryPendingUpdateCount: input.state.recoveryPendingUpdatesById.size,\n });\n const writerProjection = await resolveAttemptProjection(\n input.sync,\n blocksQueuedWrites,\n input.state.reusableWriterProjection,\n );\n if (input.sync.stillCurrent?.() === false || !writerProjection) {\n return { kind: \"complete\", result: null };\n }\n const planned = await planDocumentSyncAttempt({\n pendingUpdates: input.state.pendingUpdates,\n pullContinuation: input.state.pullContinuation,\n regenerateQueuedCheckpoints: input.state.regenerateQueuedCheckpoints,\n sync: input.sync,\n failureBlocksQueuedWrites: blocksQueuedWrites,\n writerProjection,\n });\n if (planned === \"retry\") {\n return retryRemoteSyncAttempt(input.sync, input.state.pullContinuation);\n }\n if (!planned || input.sync.stillCurrent?.() === false) {\n return { kind: \"complete\", result: null };\n }\n const [materializedPlan] = planned;\n const submitted = await submitPlannedSyncAttempt({\n attempt: input.attempt,\n materializedPlan,\n maxAttempts: input.maxAttempts,\n pendingUpdates: recoverablePendingUpdates(\n input.state.pendingUpdates,\n materializedPlan,\n ),\n pullContinuation: input.state.pullContinuation,\n regenerateQueuedCheckpoints: input.state.regenerateQueuedCheckpoints,\n sync: input.sync,\n failureBlocksQueuedWrites: blocksQueuedWrites,\n });\n if (input.sync.stillCurrent?.() === false || submitted === \"cancelled\") {\n return { kind: \"complete\", result: null };\n }\n if (submitted === \"retry\") {\n assertRawContinuationCanRetry(\n input.sync.historyMode,\n input.state.pullContinuation,\n );\n return retryRemoteSyncAttempt(input.sync, input.state.pullContinuation);\n }\n if (submitted === \"blocked\") {\n abandonBlockedSync(input.sync);\n return { kind: \"complete\", result: null };\n }\n if (submitted === \"stop\") {\n input.sync.onSyncAbandoned?.(\"the sync submit failed terminally\");\n return { kind: \"complete\", result: null };\n }\n if (submitted.kind === \"regenerate_queued_checkpoints\") {\n return { kind: \"regenerate\" };\n }\n if (submitted.kind === \"recover_update_id_conflict\") {\n // A lost response may mean the server committed both this update id and an\n // inline container rekey. Force the read-only recovery pass to observe that\n // committed successor projection instead of reusing a cached predecessor.\n evictStaleProjectionForRetry(input.sync);\n return { kind: \"recover\", updates: submitted.recoveryPendingUpdatesById };\n }\n const result = await resolveSubmittedDocumentSyncResult({\n materializedPlan,\n pendingUpdateIds: input.pendingUpdateIds,\n pullComplete: submitted.pullComplete,\n recoveryPendingUpdatesById: input.state.recoveryPendingUpdatesById,\n resolveProjectionUserKey: input.resolveProjectionUserKey,\n response: submitted.response,\n sync: input.sync,\n writerProjection: materializedPlan.writerProjection,\n });\n return {\n kind: \"complete\",\n result: input.sync.stillCurrent?.() === false ? null : result,\n };\n}\n\nasync function syncRemoteDocumentInternal(\n input: SyncRemoteDocumentInput,\n): Promise<SyncRemoteDocumentResult | null> {\n if (input.stillCurrent?.() === false) return null;\n const resolveProjectionUserKey = resolveRemoteSyncProjectionUserKey(input);\n const maxAttempts = 3;\n let pendingUpdates = input.pendingUpdates ?? [];\n const pendingUpdateIds = pendingUpdates.map((update) => update.id);\n let recoveryPendingUpdatesById = new Map<string, PendingUpdateRecord>();\n let regenerateQueuedCheckpoints = false;\n let reusableWriterProjection = input.writerProjection ?? null;\n const persistedSync = await preparePersistedDocumentSync(\n input,\n resolveProjectionUserKey,\n );\n if (input.stillCurrent?.() === false) return null;\n if (persistedSync.kind === \"completed\") return persistedSync.result;\n let pullContinuation = persistedSync.pullContinuation;\n for (let attempt = 1; attempt <= maxAttempts; attempt += 1) {\n const outcome = await runRemoteDocumentSyncAttempt({\n attempt,\n maxAttempts,\n pendingUpdateIds,\n resolveProjectionUserKey,\n state: {\n pendingUpdates,\n pullContinuation,\n recoveryPendingUpdatesById,\n regenerateQueuedCheckpoints,\n reusableWriterProjection,\n },\n sync: input,\n });\n reusableWriterProjection = null;\n if (outcome.kind === \"complete\") return outcome.result;\n if (outcome.kind === \"retry\") {\n pullContinuation = outcome.pullContinuation;\n if (input.stillCurrent?.() === false) return null;\n continue;\n }\n if (outcome.kind === \"regenerate\") {\n regenerateQueuedCheckpoints = true;\n continue;\n }\n recoveryPendingUpdatesById = outcome.updates;\n pendingUpdates = [];\n }\n return abandonAfterRetryableConflicts(input);\n}\n\nexport async function syncRemoteDocument(\n input: SyncRemoteDocumentInput,\n): Promise<SyncRemoteDocumentResult | null> {\n try {\n return await syncRemoteDocumentInternal({\n ...input,\n onRemoteDocumentDeleted: createVerifiedRemoteDocumentDeletionHandler({\n apiClient: input.apiClient,\n execSql: input.execSql,\n expectedOrganizationId: input.author.organizationId,\n onVerifiedDeletion: ({ commitPurgeProof, documentId }) => {\n if (input.stillCurrent?.() === false) return;\n if (!input.onRemoteDocumentDeleted) {\n throw new KeyingVerificationError(\n \"missing_dependency\",\n \"Remote document deletion requires atomic local teardown\",\n );\n }\n return input.onRemoteDocumentDeleted({\n commitPurgeProof,\n documentId,\n });\n },\n resolveProjectionUserKey: input.resolveProjectionUserKey,\n stillCurrent: input.stillCurrent,\n warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,\n }),\n });\n } catch (error) {\n if (isProjectionVerificationCancelledError(error)) return null;\n if (\n input.stillCurrent?.() !== false &&\n isDocumentSyncUpdateIsolationError(error)\n ) {\n await input.onIncomingUpdateIsolationFailure?.(error);\n }\n throw error;\n }\n}\n"]}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { createPendingUpdateFields } from "../../../data/documents/documentSync.js";
|
|
2
|
+
import { importContentKeyMaterial } from "../../../data/documents/shared/contentRecordKeys.js";
|
|
3
|
+
import { encryptDocumentPendingUpdate } from "../../../data/documents/shared/crypto.js";
|
|
4
|
+
import { containerPathRefs } from "../../../data/documents/shared/projection.js";
|
|
5
|
+
import { signDocumentOutgoingUpdate } from "../syncPlan/syncPlanIdentity.js";
|
|
6
|
+
/**
|
|
7
|
+
* Builds the single encrypted initial write for a provisioned document. The
|
|
8
|
+
* server commits it with the organization and document manifest transaction.
|
|
9
|
+
*/
|
|
10
|
+
export async function buildInitialDocumentSyncRequest(input) {
|
|
11
|
+
const pendingFields = createPendingUpdateFields(input.initialUpdate);
|
|
12
|
+
if (!pendingFields) {
|
|
13
|
+
throw new Error("Initial document sync update is empty");
|
|
14
|
+
}
|
|
15
|
+
const documentId = input.materializedDocument.plan.documentId;
|
|
16
|
+
const contentKeyBundle = input.materializedDocument.plan.request.contentKeyBundle;
|
|
17
|
+
const pendingUpdate = {
|
|
18
|
+
id: crypto.randomUUID(),
|
|
19
|
+
...pendingFields,
|
|
20
|
+
};
|
|
21
|
+
const encrypted = await encryptDocumentPendingUpdate({
|
|
22
|
+
contentKeyMaterial: await importContentKeyMaterial(input.materializedDocument.contentKey),
|
|
23
|
+
contentKeyEpoch: contentKeyBundle.contentKeyEpoch,
|
|
24
|
+
documentId,
|
|
25
|
+
organizationId: input.containerProjection.organizationId,
|
|
26
|
+
update: pendingUpdate,
|
|
27
|
+
});
|
|
28
|
+
const outgoingUpdate = await signDocumentOutgoingUpdate({
|
|
29
|
+
authorizingContainerPathRefs: [
|
|
30
|
+
containerPathRefs(input.containerProjection.path),
|
|
31
|
+
],
|
|
32
|
+
author: input.author,
|
|
33
|
+
contentKeyEpoch: contentKeyBundle.contentKeyEpoch,
|
|
34
|
+
documentId,
|
|
35
|
+
expectedLinkSetManifestHash: contentKeyBundle.linkSetManifestHash,
|
|
36
|
+
expectedTargetHash: contentKeyBundle.targetHash,
|
|
37
|
+
organizationId: input.containerProjection.organizationId,
|
|
38
|
+
signedAt: new Date().toISOString(),
|
|
39
|
+
update: {
|
|
40
|
+
contentRecordId: encrypted.contentRecordId,
|
|
41
|
+
encryptedData: encrypted.encryptedData,
|
|
42
|
+
id: pendingUpdate.id,
|
|
43
|
+
partialEndVersionVector: pendingUpdate.partialEndVersionVector,
|
|
44
|
+
partialStartVersionVector: pendingUpdate.partialStartVersionVector,
|
|
45
|
+
metadataHash: encrypted.metadataHash,
|
|
46
|
+
ciphertextHash: encrypted.ciphertextHash,
|
|
47
|
+
plaintextHash: encrypted.plaintextHash,
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
authorizingContainerPathRefs: [
|
|
52
|
+
containerPathRefs(input.containerProjection.path),
|
|
53
|
+
],
|
|
54
|
+
contentKeyBundle,
|
|
55
|
+
contentKeyEpoch: contentKeyBundle.contentKeyEpoch,
|
|
56
|
+
expectedLinkSetManifestHash: contentKeyBundle.linkSetManifestHash,
|
|
57
|
+
expectedTargetHash: contentKeyBundle.targetHash,
|
|
58
|
+
// The provisioning device already holds this exact initialized snapshot,
|
|
59
|
+
// so it does not need the transaction response to echo the update back.
|
|
60
|
+
localVersionVector: pendingUpdate.partialEndVersionVector,
|
|
61
|
+
outgoingUpdates: [outgoingUpdate],
|
|
62
|
+
supportsPullPagination: true,
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=initialSync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"initialSync.js","sourceRoot":"","sources":["initialSync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,C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MAAM,EAAE;YACN,eAAe,EAAE,SAAS,CAAC,eAAe;YAC1C,aAAa,EAAE,SAAS,CAAC,aAAa;YACtC,EAAE,EAAE,aAAa,CAAC,EAAE;YACpB,uBAAuB,EAAE,aAAa,CAAC,uBAAuB;YAC9D,yBAAyB,EAAE,aAAa,CAAC,yBAAyB;YAClE,YAAY,EAAE,SAAS,CAAC,YAAY;YACpC,cAAc,EAAE,SAAS,CAAC,cAAc;YACxC,aAAa,EAAE,SAAS,CAAC,aAAa;SACvC;KACF,CAAC,CAAC;IAEH,OAAO;QACL,4BAA4B,EAAE;YAC5B,iBAAiB,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC;SAClD;QACD,gBAAgB;QAChB,eAAe,EAAE,gBAAgB,CAAC,eAAe;QACjD,2BAA2B,EAAE,gBAAgB,CAAC,mBAAmB;QACjE,kBAAkB,EAAE,gBAAgB,CAAC,UAAU;QAC/C,yEAAyE;QACzE,wEAAwE;QACxE,kBAAkB,EAAE,aAAa,CAAC,uBAAuB;QACzD,eAAe,EAAE,CAAC,cAAc,CAAC;QACjC,sBAAsB,EAAE,IAAI;KAC7B,CAAC;AACJ,CAAC","sourcesContent":["import type { DocumentSyncRequest } from \"@tearleads/validators/request\";\nimport type { ContainerWriterProjectionResponse } from \"@tearleads/validators/response\";\nimport { createPendingUpdateFields } from \"../../../data/documents/documentSync\";\nimport { importContentKeyMaterial } from \"../../../data/documents/shared/contentRecordKeys\";\nimport { encryptDocumentPendingUpdate } from \"../../../data/documents/shared/crypto\";\nimport { containerPathRefs } from \"../../../data/documents/shared/projection\";\nimport type {\n DocumentCreateAuthor,\n MaterializedDocumentCreatePlan,\n} from \"../../../data/documents/shared/types\";\nimport type { PendingUpdateRecord } from \"../../../data/sqlite/documentPersistence\";\nimport { signDocumentOutgoingUpdate } from \"../syncPlan/syncPlanIdentity\";\n\n/**\n * Builds the single encrypted initial write for a provisioned document. The\n * server commits it with the organization and document manifest transaction.\n */\nexport async function buildInitialDocumentSyncRequest(input: {\n readonly author: DocumentCreateAuthor;\n readonly containerProjection: ContainerWriterProjectionResponse;\n readonly initialUpdate: Uint8Array;\n readonly materializedDocument: MaterializedDocumentCreatePlan;\n}): Promise<DocumentSyncRequest> {\n const pendingFields = createPendingUpdateFields(input.initialUpdate);\n if (!pendingFields) {\n throw new Error(\"Initial document sync update is empty\");\n }\n\n const documentId = input.materializedDocument.plan.documentId;\n const contentKeyBundle =\n input.materializedDocument.plan.request.contentKeyBundle;\n const pendingUpdate: PendingUpdateRecord = {\n id: crypto.randomUUID(),\n ...pendingFields,\n };\n const encrypted = await encryptDocumentPendingUpdate({\n contentKeyMaterial: await importContentKeyMaterial(\n input.materializedDocument.contentKey,\n ),\n contentKeyEpoch: contentKeyBundle.contentKeyEpoch,\n documentId,\n organizationId: input.containerProjection.organizationId,\n update: pendingUpdate,\n });\n const outgoingUpdate = await signDocumentOutgoingUpdate({\n authorizingContainerPathRefs: [\n containerPathRefs(input.containerProjection.path),\n ],\n author: input.author,\n contentKeyEpoch: contentKeyBundle.contentKeyEpoch,\n documentId,\n expectedLinkSetManifestHash: contentKeyBundle.linkSetManifestHash,\n expectedTargetHash: contentKeyBundle.targetHash,\n organizationId: input.containerProjection.organizationId,\n signedAt: new Date().toISOString(),\n update: {\n contentRecordId: encrypted.contentRecordId,\n encryptedData: encrypted.encryptedData,\n id: pendingUpdate.id,\n partialEndVersionVector: pendingUpdate.partialEndVersionVector,\n partialStartVersionVector: pendingUpdate.partialStartVersionVector,\n metadataHash: encrypted.metadataHash,\n ciphertextHash: encrypted.ciphertextHash,\n plaintextHash: encrypted.plaintextHash,\n },\n });\n\n return {\n authorizingContainerPathRefs: [\n containerPathRefs(input.containerProjection.path),\n ],\n contentKeyBundle,\n contentKeyEpoch: contentKeyBundle.contentKeyEpoch,\n expectedLinkSetManifestHash: contentKeyBundle.linkSetManifestHash,\n expectedTargetHash: contentKeyBundle.targetHash,\n // The provisioning device already holds this exact initialized snapshot,\n // so it does not need the transaction response to echo the update back.\n localVersionVector: pendingUpdate.partialEndVersionVector,\n outgoingUpdates: [outgoingUpdate],\n supportsPullPagination: true,\n };\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { KeyingVerificationError } from "../../../internal/crypto/index.js";
|
|
2
|
+
import { isDocumentSyncUpdateIsolationError } from "../../../data/documents/shared/documentSyncUpdateIsolation.js";
|
|
3
|
+
import { rethrowKeyingVerificationError } from "../../../data/keyingProjectionVerification/error.js";
|
|
4
|
+
import { projectionIntegrityErrorCode } from "../syncFailures/syncFailureClassification.js";
|
|
5
|
+
import { DocumentRawHistoryUnavailableError } from "../syncPlan/syncContentKeys.js";
|
|
6
|
+
export const REFRESH_CACHED_PROJECTION = Symbol("refresh cached projection");
|
|
7
|
+
export function handleReadOnlyProjectionCompletionError(error, input) {
|
|
8
|
+
if (isDocumentSyncUpdateIsolationError(error)) {
|
|
9
|
+
throw error;
|
|
10
|
+
}
|
|
11
|
+
if (error instanceof DocumentRawHistoryUnavailableError) {
|
|
12
|
+
if (input.allowCachedProjectionRefresh) {
|
|
13
|
+
return error;
|
|
14
|
+
}
|
|
15
|
+
throw error;
|
|
16
|
+
}
|
|
17
|
+
if (input.allowCachedProjectionRefresh &&
|
|
18
|
+
error instanceof KeyingVerificationError &&
|
|
19
|
+
error.code === "invalid_shape") {
|
|
20
|
+
return REFRESH_CACHED_PROJECTION;
|
|
21
|
+
}
|
|
22
|
+
// The document-store `document.sync` boundary owns durable reporting; this
|
|
23
|
+
// helper only decides whether an ordinary projection miss is retryable.
|
|
24
|
+
rethrowKeyingVerificationError(error);
|
|
25
|
+
if (projectionIntegrityErrorCode(error) || input.historyMode === "raw") {
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=readOnlyProjectionFailure.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"readOnlyProjectionFailure.js","sourceRoot":"","sources":["readOnlyProjectionFailure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EAAE,kCAAkC,EAAE,MAAM,4DAA4D,CAAC;AAChH,OAAO,EAAE,8BAA8B,EAAE,MAAM,kDAAkD,CAAC;AAClG,OAAO,EAAE,4BAA4B,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,EAAE,kCAAkC,EAAE,MAAM,6BAA6B,CAAC;AAEjF,MAAM,CAAC,MAAM,yBAAyB,GAAG,MAAM,CAAC,2BAA2B,CAAC,CAAC;AAE7E,MAAM,UAAU,uCAAuC,CACrD,KAAc,EACd,KAGC;IAKD,IAAI,kCAAkC,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,MAAM,KAAK,CAAC;IACd,CAAC;IACD,IAAI,KAAK,YAAY,kCAAkC,EAAE,CAAC;QACxD,IAAI,KAAK,CAAC,4BAA4B,EAAE,CAAC;YACvC,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;IACD,IACE,KAAK,CAAC,4BAA4B;QAClC,KAAK,YAAY,uBAAuB;QACxC,KAAK,CAAC,IAAI,KAAK,eAAe,EAC9B,CAAC;QACD,OAAO,yBAAyB,CAAC;IACnC,CAAC;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,8BAA8B,CAAC,KAAK,CAAC,CAAC;IACtC,IAAI,4BAA4B,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,WAAW,KAAK,KAAK,EAAE,CAAC;QACvE,MAAM,KAAK,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import { KeyingVerificationError } from \"@tearleads/crypto\";\nimport { isDocumentSyncUpdateIsolationError } from \"../../../data/documents/shared/documentSyncUpdateIsolation\";\nimport { rethrowKeyingVerificationError } from \"../../../data/keyingProjectionVerification/error\";\nimport { projectionIntegrityErrorCode } from \"../syncFailures/syncFailureClassification\";\nimport { DocumentRawHistoryUnavailableError } from \"../syncPlan/syncContentKeys\";\n\nexport const REFRESH_CACHED_PROJECTION = Symbol(\"refresh cached projection\");\n\nexport function handleReadOnlyProjectionCompletionError(\n error: unknown,\n input: {\n allowCachedProjectionRefresh: boolean;\n historyMode?: \"raw\" | undefined;\n },\n):\n | DocumentRawHistoryUnavailableError\n | null\n | typeof REFRESH_CACHED_PROJECTION {\n if (isDocumentSyncUpdateIsolationError(error)) {\n throw error;\n }\n if (error instanceof DocumentRawHistoryUnavailableError) {\n if (input.allowCachedProjectionRefresh) {\n return error;\n }\n throw error;\n }\n if (\n input.allowCachedProjectionRefresh &&\n error instanceof KeyingVerificationError &&\n error.code === \"invalid_shape\"\n ) {\n return REFRESH_CACHED_PROJECTION;\n }\n // The document-store `document.sync` boundary owns durable reporting; this\n // helper only decides whether an ordinary projection miss is retryable.\n rethrowKeyingVerificationError(error);\n if (projectionIntegrityErrorCode(error) || input.historyMode === \"raw\") {\n throw error;\n }\n return null;\n}\n"]}
|