@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
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncPlanProjection.js","sourceRoot":"","sources":["syncPlanProjection.ts"],"names":[],"mappings":"AAUA,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AAYjC,SAAS,mCAAmC,CAC1C,QAAoC,EACpC,gBAAkD;IAElD,IAAI,CAAC,QAAQ,CAAC,2BAA2B;QAAE,OAAO,gBAAgB,CAAC;IACnE,MAAM,gBAAgB,GAAG;QACvB,GAAG,gBAAgB;QACnB,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,kBAAkB,EAAE,QAAQ,CAAC,kBAAkB;QAC/C,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;KAC5C,CAAC;IACF,OAAO,gBAAgB,CAAC,qBAAqB,CAAC;IAC9C,OAAO,gBAAgB,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,KAOpD;IACC,MAAM,aAAa,GAAG,KAAK,CAAC,mBAAmB;QAC7C,CAAC,CAAC;YACE,GAAG,KAAK,CAAC,QAAQ;YACjB,2BAA2B,EAAE,KAAK,CAAC,mBAAmB;SACvD;QACH,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC;IACnB,MAAM,IAAI,GAAG,4BAA4B,CACvC,aAAa,EACb,KAAK,CAAC,QAAQ,CAAC,6BAA6B,CAC7C,CAAC;IACF,OAAO,4BAA4B,CACjC,KAAK,CAAC,QAAQ,EACd,IAAI,EACJ,mCAAmC,CAAC,KAAK,CAAC,QAAQ,EAAE,KAAK,CAAC,gBAAgB,CAAC,CAC5E,CAAC;AACJ,CAAC","sourcesContent":["import type {\n DocumentCreateResponse,\n DocumentSyncResponse,\n DocumentWriterProjectionResponse,\n} from \"@tearleads/validators/response\";\nimport type {\n DocumentSyncPlan,\n MaterializedDocumentSyncPlan,\n} from \"../../data/documents/shared/types\";\nimport type { DocumentWriterProjectionAuthorization } from \"../../data/keyingProjectionVerification\";\nimport {\n boundDocumentSyncPlanRequest,\n materializedDocumentSyncPlan,\n} from \"./syncPlanRequestBounds\";\n\ninterface SyncPlanProjectionMaterial {\n readonly contentKey: Uint8Array;\n readonly contentKeyBundle: DocumentCreateResponse[\"contentKeyBundle\"];\n readonly documentKekTargets: DocumentSyncResponse[\"documentKekTargets\"];\n readonly documentManifest: DocumentCreateResponse[\"accessManifest\"];\n readonly healedStaleContentKeyBundle: boolean;\n readonly heldBackPendingUpdateIds: readonly string[];\n readonly staleRecoveryBaselineUpdateId?: string | undefined;\n}\n\nfunction writerProjectionAfterContentKeyHeal(\n material: SyncPlanProjectionMaterial,\n writerProjection: DocumentWriterProjectionResponse,\n): DocumentWriterProjectionResponse {\n if (!material.healedStaleContentKeyBundle) return writerProjection;\n const healedProjection = {\n ...writerProjection,\n contentKeyBundle: material.contentKeyBundle,\n documentKekTargets: material.documentKekTargets,\n documentManifest: material.documentManifest,\n };\n delete healedProjection.contentKeyBundleStale;\n return healedProjection;\n}\n\nexport function finalizeMaterializedDocumentSyncPlan(input: {\n readonly basePlan: DocumentSyncPlan;\n readonly material: SyncPlanProjectionMaterial;\n readonly writerAuthorization:\n | DocumentWriterProjectionAuthorization\n | undefined;\n readonly writerProjection: DocumentWriterProjectionResponse;\n}): MaterializedDocumentSyncPlan {\n const unboundedPlan = input.writerAuthorization\n ? {\n ...input.basePlan,\n documentWriterAuthorization: input.writerAuthorization,\n }\n : input.basePlan;\n const plan = boundDocumentSyncPlanRequest(\n unboundedPlan,\n input.material.staleRecoveryBaselineUpdateId,\n );\n return materializedDocumentSyncPlan(\n input.material,\n plan,\n writerProjectionAfterContentKeyHeal(input.material, input.writerProjection),\n );\n}\n"]}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { limitDocumentSyncRequestBytes } from "../../data/sync/documentSyncOutgoingBatch.js";
|
|
2
|
-
export function boundDocumentSyncPlanRequest(plan, requiredOutgoingUpdateId) {
|
|
3
|
-
const request = limitDocumentSyncRequestBytes(plan.request, {
|
|
4
|
-
requiredOutgoingUpdateId,
|
|
5
|
-
});
|
|
6
|
-
return request === plan.request ? plan : { ...plan, request };
|
|
7
|
-
}
|
|
8
|
-
export function materializedDocumentSyncPlan(material, plan, writerProjection) {
|
|
9
|
-
return {
|
|
10
|
-
contentKey: material.contentKey,
|
|
11
|
-
healedStaleContentKeyBundle: material.healedStaleContentKeyBundle,
|
|
12
|
-
heldBackPendingUpdateIds: material.heldBackPendingUpdateIds,
|
|
13
|
-
plan,
|
|
14
|
-
writerProjection,
|
|
15
|
-
...(material.staleRecoveryBaselineUpdateId === undefined
|
|
16
|
-
? {}
|
|
17
|
-
: {
|
|
18
|
-
staleRecoveryBaselineUpdateId: material.staleRecoveryBaselineUpdateId,
|
|
19
|
-
}),
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export function recoverablePendingUpdates(pendingUpdates, materializedPlan) {
|
|
23
|
-
const submittedIds = new Set(materializedPlan.plan.request.outgoingUpdates.map((update) => update.id));
|
|
24
|
-
const recoverableIds = new Set([
|
|
25
|
-
...submittedIds,
|
|
26
|
-
...materializedPlan.heldBackPendingUpdateIds,
|
|
27
|
-
]);
|
|
28
|
-
return pendingUpdates.filter((update) => recoverableIds.has(update.id));
|
|
29
|
-
}
|
|
30
|
-
export function hasDeferredPendingUpdatesAfterSubmit(input) {
|
|
31
|
-
if (input.exhaustedPendingUpdateCount > 0) {
|
|
32
|
-
return false;
|
|
33
|
-
}
|
|
34
|
-
const madeDurableProgress = input.acceptedRecoveryBaseline ||
|
|
35
|
-
input.settledPendingUpdateIds.length > 0 ||
|
|
36
|
-
input.rekeyedPendingUpdateIds.length > 0;
|
|
37
|
-
if (!madeDurableProgress) {
|
|
38
|
-
return false;
|
|
39
|
-
}
|
|
40
|
-
const settledPendingUpdateIds = new Set(input.settledPendingUpdateIds);
|
|
41
|
-
return (input.rekeyedPendingUpdateIds.length > 0 ||
|
|
42
|
-
input.pendingUpdateIds.some((updateId) => !settledPendingUpdateIds.has(updateId)));
|
|
43
|
-
}
|
|
44
|
-
export function responseAcceptedRecoveryBaseline(materializedPlan, response) {
|
|
45
|
-
const recoveryBaselineId = materializedPlan.staleRecoveryBaselineUpdateId;
|
|
46
|
-
return (recoveryBaselineId !== undefined &&
|
|
47
|
-
response.acceptedOutgoingUpdateIds.includes(recoveryBaselineId));
|
|
48
|
-
}
|
|
49
|
-
export function acceptedHeldBackPendingUpdateIds(materializedPlan, response) {
|
|
50
|
-
return responseAcceptedRecoveryBaseline(materializedPlan, response)
|
|
51
|
-
? materializedPlan.heldBackPendingUpdateIds
|
|
52
|
-
: [];
|
|
53
|
-
}
|
|
54
|
-
//# sourceMappingURL=syncPlanRequestBounds.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncPlanRequestBounds.js","sourceRoot":"","sources":["syncPlanRequestBounds.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AC1E,CAAC;AAED,MAAM,UAAU,oCAAoC,CAAC,KAMpD;IACC,IAAI,KAAK,CAAC,2BAA2B,GAAG,CAAC,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,mBAAmB,GACvB,KAAK,CAAC,wBAAwB;QAC9B,KAAK,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC;QACxC,KAAK,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC,CAAC;IAC3C,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,uBAAuB,CAAC,CAAC;IACvE,OAAO,CACL,KAAK,CAAC,uBAAuB,CAAC,MAAM,GAAG,CAAC;QACxC,KAAK,CAAC,gBAAgB,CAAC,IAAI,CACzB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,uBAAuB,CAAC,GAAG,CAAC,QAAQ,CAAC,CACrD,CACF,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,gBAA8C,EAC9C,QAA8B;IAE9B,MAAM,kBAAkB,GAAG,gBAAgB,CAAC,6BAA6B,CAAC;IAC1E,OAAO,CACL,kBAAkB,KAAK,SAAS;QAChC,QAAQ,CAAC,yBAAyB,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAChE,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,gBAA8C,EAC9C,QAA8B;IAE9B,OAAO,gCAAgC,CAAC,gBAAgB,EAAE,QAAQ,CAAC;QACjE,CAAC,CAAC,gBAAgB,CAAC,wBAAwB;QAC3C,CAAC,CAAC,EAAE,CAAC;AACT,CAAC","sourcesContent":["import type { DocumentSyncResponse } from \"@tearleads/validators/response\";\nimport type { MaterializedDocumentSyncPlan } from \"../../data/documents/shared/types\";\nimport type { PendingUpdateRecord } from \"../../data/sqlite/documentPersistence\";\nimport { limitDocumentSyncRequestBytes } from \"../../data/sync/documentSyncOutgoingBatch\";\n\ninterface SyncPlanMaterial {\n readonly contentKey: Uint8Array;\n readonly healedStaleContentKeyBundle: boolean;\n readonly heldBackPendingUpdateIds: readonly string[];\n readonly staleRecoveryBaselineUpdateId?: string | undefined;\n}\n\nexport function boundDocumentSyncPlanRequest(\n plan: MaterializedDocumentSyncPlan[\"plan\"],\n requiredOutgoingUpdateId: string | undefined,\n): MaterializedDocumentSyncPlan[\"plan\"] {\n const request = limitDocumentSyncRequestBytes(plan.request, {\n requiredOutgoingUpdateId,\n });\n return request === plan.request ? plan : { ...plan, request };\n}\n\nexport function materializedDocumentSyncPlan(\n material: SyncPlanMaterial,\n plan: MaterializedDocumentSyncPlan[\"plan\"],\n writerProjection: MaterializedDocumentSyncPlan[\"writerProjection\"],\n): MaterializedDocumentSyncPlan {\n return {\n contentKey: material.contentKey,\n healedStaleContentKeyBundle: material.healedStaleContentKeyBundle,\n heldBackPendingUpdateIds: material.heldBackPendingUpdateIds,\n plan,\n writerProjection,\n ...(material.staleRecoveryBaselineUpdateId === undefined\n ? {}\n : {\n staleRecoveryBaselineUpdateId: material.staleRecoveryBaselineUpdateId,\n }),\n };\n}\n\nexport function recoverablePendingUpdates(\n pendingUpdates: readonly PendingUpdateRecord[],\n materializedPlan: MaterializedDocumentSyncPlan,\n): PendingUpdateRecord[] {\n const submittedIds = new Set(\n materializedPlan.plan.request.outgoingUpdates.map((update) => update.id),\n );\n const recoverableIds = new Set([\n ...submittedIds,\n ...materializedPlan.heldBackPendingUpdateIds,\n ]);\n return pendingUpdates.filter((update) => recoverableIds.has(update.id));\n}\n\nexport function hasDeferredPendingUpdatesAfterSubmit(input: {\n acceptedRecoveryBaseline: boolean;\n exhaustedPendingUpdateCount: number;\n pendingUpdateIds: readonly string[];\n rekeyedPendingUpdateIds: readonly string[];\n settledPendingUpdateIds: readonly string[];\n}): boolean {\n if (input.exhaustedPendingUpdateCount > 0) {\n return false;\n }\n\n const madeDurableProgress =\n input.acceptedRecoveryBaseline ||\n input.settledPendingUpdateIds.length > 0 ||\n input.rekeyedPendingUpdateIds.length > 0;\n if (!madeDurableProgress) {\n return false;\n }\n\n const settledPendingUpdateIds = new Set(input.settledPendingUpdateIds);\n return (\n input.rekeyedPendingUpdateIds.length > 0 ||\n input.pendingUpdateIds.some(\n (updateId) => !settledPendingUpdateIds.has(updateId),\n )\n );\n}\n\nexport function responseAcceptedRecoveryBaseline(\n materializedPlan: MaterializedDocumentSyncPlan,\n response: DocumentSyncResponse,\n): boolean {\n const recoveryBaselineId = materializedPlan.staleRecoveryBaselineUpdateId;\n return (\n recoveryBaselineId !== undefined &&\n response.acceptedOutgoingUpdateIds.includes(recoveryBaselineId)\n );\n}\n\nexport function acceptedHeldBackPendingUpdateIds(\n materializedPlan: MaterializedDocumentSyncPlan,\n response: DocumentSyncResponse,\n): readonly string[] {\n return responseAcceptedRecoveryBaseline(materializedPlan, response)\n ? materializedPlan.heldBackPendingUpdateIds\n : [];\n}\n"]}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { KeyingVerificationError } from "../../internal/crypto/index.js";
|
|
2
|
-
import { isRetryableDocumentSyncConflict } from "../../data/documents/shared/responses.js";
|
|
3
|
-
import { recoverPrincipalPolicyRepair } from "../principals/policyRepair.js";
|
|
4
|
-
function principalIdentityKey(principalType, principalId) {
|
|
5
|
-
return `${principalType}:${principalId}`;
|
|
6
|
-
}
|
|
7
|
-
function requestedRepairPrincipalIdentities(plan) {
|
|
8
|
-
const identities = new Set();
|
|
9
|
-
for (const rekey of plan.request.containerRekeys ?? []) {
|
|
10
|
-
for (const policy of rekey.principalPolicies) {
|
|
11
|
-
const principalType = Reflect.get(policy, "principalType");
|
|
12
|
-
const principalId = Reflect.get(policy, "principalId");
|
|
13
|
-
if ((principalType === "group" || principalType === "organization") &&
|
|
14
|
-
typeof principalId === "string" &&
|
|
15
|
-
principalId.length > 0) {
|
|
16
|
-
identities.add(principalIdentityKey(principalType, principalId));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return identities;
|
|
21
|
-
}
|
|
22
|
-
function assertDocumentSyncPolicyRepairHeadsRequested(input) {
|
|
23
|
-
const requested = requestedRepairPrincipalIdentities(input.plan);
|
|
24
|
-
for (const head of input.heads) {
|
|
25
|
-
const { principalId, principalType } = head;
|
|
26
|
-
if (!requested.has(principalIdentityKey(principalType, principalId))) {
|
|
27
|
-
throw new KeyingVerificationError("object_mismatch", "Document sync policy repair head principal was not requested");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
export async function recoverDocumentSyncPolicyRepair(input) {
|
|
32
|
-
const heads = input.failure.stalePrincipalHeads;
|
|
33
|
-
const resolve = input.warmReferencedPrincipalPolicies?.resolveReference;
|
|
34
|
-
if (!isRetryableDocumentSyncConflict(input.failure) ||
|
|
35
|
-
(input.plan.request.containerRekeys?.length ?? 0) === 0 ||
|
|
36
|
-
!heads ||
|
|
37
|
-
heads.length === 0 ||
|
|
38
|
-
!resolve ||
|
|
39
|
-
input.stillCurrent?.() === false) {
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
assertDocumentSyncPolicyRepairHeadsRequested({ heads, plan: input.plan });
|
|
43
|
-
await recoverPrincipalPolicyRepair({
|
|
44
|
-
heads,
|
|
45
|
-
warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,
|
|
46
|
-
organizationId: input.plan.organizationId,
|
|
47
|
-
stillCurrent: input.stillCurrent,
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=syncPolicyRepair.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncPolicyRepair.js","sourceRoot":"","sources":["syncPolicyRepair.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAE5D,OAAO,EAAE,+BAA+B,EAAE,MAAM,uCAAuC,CAAC;AAO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,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,+BAA+B,CAAC,KAKrD;IACC,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,+BAA+B,EAAE,gBAAgB,CAAC;IACxE,IACE,CAAC,+BAA+B,CAAC,KAAK,CAAC,OAAO,CAAC;QAC/C,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,eAAe,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC;QACvD,CAAC,KAAK;QACN,KAAK,CAAC,MAAM,KAAK,CAAC;QAClB,CAAC,OAAO;QACR,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,KAAK,EAChC,CAAC;QACD,OAAO;IACT,CAAC;IAED,4CAA4C,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;IAC1E,MAAM,4BAA4B,CAAC;QACjC,KAAK;QACL,+BAA+B,EAAE,KAAK,CAAC,+BAA+B;QACtE,cAAc,EAAE,KAAK,CAAC,IAAI,CAAC,cAAc;QACzC,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { KeyingVerificationError } from \"@tearleads/crypto\";\nimport type { ReferencedPrincipalStateResponse } from \"@tearleads/validators/response\";\nimport { isRetryableDocumentSyncConflict } from \"../../data/documents/shared/responses\";\nimport type {\n DocumentSyncPlan,\n DocumentSyncSubmitFailure,\n} from \"../../data/documents/shared/types\";\nimport type { ReferencedPrincipalPolicyWarmer } from \"../../data/keyingProjectionVerification\";\n\nimport { recoverPrincipalPolicyRepair } from \"../principals/policyRepair\";\n\ntype ManagedPrincipalType = \"group\" | \"organization\";\n\nfunction principalIdentityKey(\n principalType: ManagedPrincipalType,\n principalId: string,\n): string {\n return `${principalType}:${principalId}`;\n}\n\nfunction requestedRepairPrincipalIdentities(\n plan: DocumentSyncPlan,\n): Set<string> {\n const identities = new Set<string>();\n for (const rekey of plan.request.containerRekeys ?? []) {\n for (const policy of rekey.principalPolicies) {\n const principalType = Reflect.get(policy, \"principalType\");\n const principalId = Reflect.get(policy, \"principalId\");\n if (\n (principalType === \"group\" || principalType === \"organization\") &&\n typeof principalId === \"string\" &&\n principalId.length > 0\n ) {\n identities.add(principalIdentityKey(principalType, principalId));\n }\n }\n }\n return identities;\n}\n\nfunction assertDocumentSyncPolicyRepairHeadsRequested(input: {\n readonly heads: readonly ReferencedPrincipalStateResponse[];\n readonly plan: DocumentSyncPlan;\n}): void {\n const requested = requestedRepairPrincipalIdentities(input.plan);\n for (const head of input.heads) {\n const { principalId, principalType } = head;\n if (!requested.has(principalIdentityKey(principalType, principalId))) {\n throw new KeyingVerificationError(\n \"object_mismatch\",\n \"Document sync policy repair head principal was not requested\",\n );\n }\n }\n}\n\nexport async function recoverDocumentSyncPolicyRepair(input: {\n failure: DocumentSyncSubmitFailure;\n plan: DocumentSyncPlan;\n stillCurrent?: (() => boolean) | undefined;\n warmReferencedPrincipalPolicies?: ReferencedPrincipalPolicyWarmer | undefined;\n}): Promise<void> {\n const heads = input.failure.stalePrincipalHeads;\n const resolve = input.warmReferencedPrincipalPolicies?.resolveReference;\n if (\n !isRetryableDocumentSyncConflict(input.failure) ||\n (input.plan.request.containerRekeys?.length ?? 0) === 0 ||\n !heads ||\n heads.length === 0 ||\n !resolve ||\n input.stillCurrent?.() === false\n ) {\n return;\n }\n\n assertDocumentSyncPolicyRepairHeadsRequested({ heads, plan: input.plan });\n await recoverPrincipalPolicyRepair({\n heads,\n warmReferencedPrincipalPolicies: input.warmReferencedPrincipalPolicies,\n organizationId: input.plan.organizationId,\n stillCurrent: input.stillCurrent,\n });\n}\n"]}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import type { DocumentSyncResponse } from "../../internal/validators/response/index.js";
|
|
2
|
-
import type { DocumentSyncSubmitFailure } from "../../data/documents/shared/types.js";
|
|
3
|
-
import { type PendingUpdateRecord } from "../../data/sqlite/documentPersistence.js";
|
|
4
|
-
import { type ExecSql } from "../../data/sqlite/sqlSchema.js";
|
|
5
|
-
export type RekeyPendingUpdate = (execSql: ExecSql, id: string) => Promise<string | null>;
|
|
6
|
-
interface DecryptedSyncUpdate {
|
|
7
|
-
id: string;
|
|
8
|
-
partialEndVersionVector: string;
|
|
9
|
-
partialStartVersionVector: string;
|
|
10
|
-
updateData: Uint8Array;
|
|
11
|
-
}
|
|
12
|
-
export declare function settledPendingUpdateIdsFromSync(input: {
|
|
13
|
-
decryptedUpdates: readonly DecryptedSyncUpdate[];
|
|
14
|
-
recoveryPendingUpdatesById: ReadonlyMap<string, PendingUpdateRecord>;
|
|
15
|
-
response: DocumentSyncResponse;
|
|
16
|
-
}): string[];
|
|
17
|
-
/**
|
|
18
|
-
* A read-only recovery sync settles a conflicted pending update only when the
|
|
19
|
-
* response carries it — but the server's frontier filter omits spans the
|
|
20
|
-
* request's localVersionVector already covers, which a locally-applied
|
|
21
|
-
* pending update always is. Left alone, the conflicted id is resubmitted (and
|
|
22
|
-
* 409s the whole outgoing batch) forever: a lost ack leaves the server
|
|
23
|
-
* holding the original ciphertext, and every rebuild encrypts with a fresh
|
|
24
|
-
* IV, so a byte-identical retry can never be reproduced. Re-key what
|
|
25
|
-
* recovery could not settle so the next sync pass submits the same ops under
|
|
26
|
-
* a conflict-free id; the server-side copy stays harmless because CRDT
|
|
27
|
-
* update import is idempotent.
|
|
28
|
-
*
|
|
29
|
-
* Re-keying goes through the caller's persistence implementation when given
|
|
30
|
-
* (defaulting to the built-in pending-update table) and reports only ids
|
|
31
|
-
* whose row actually changed, so a record living in some other queue never
|
|
32
|
-
* counts as progress. Returns the fresh ids so callers can treat re-keying
|
|
33
|
-
* as settlement-like progress and schedule the pass that submits them.
|
|
34
|
-
*
|
|
35
|
-
* A row whose persisted rekeyCount has reached the bound is not re-keyed
|
|
36
|
-
* again: it is reported as exhausted so the caller can surface a terminal
|
|
37
|
-
* failure instead of feeding an unbounded conflict loop that survives
|
|
38
|
-
* restarts (each session's in-memory lane cap resets, this bound does not).
|
|
39
|
-
*/
|
|
40
|
-
export declare function rekeyUnsettledRecoveryPendingUpdates(input: {
|
|
41
|
-
execSql: ExecSql;
|
|
42
|
-
recoveryPendingUpdatesById: ReadonlyMap<string, PendingUpdateRecord>;
|
|
43
|
-
rekeyPendingUpdate?: RekeyPendingUpdate | undefined;
|
|
44
|
-
settledPendingUpdateIds: readonly string[];
|
|
45
|
-
stillCurrent?: (() => boolean) | undefined;
|
|
46
|
-
}): Promise<{
|
|
47
|
-
exhaustedPendingUpdateIds: string[];
|
|
48
|
-
rekeyedPendingUpdateIds: string[];
|
|
49
|
-
}>;
|
|
50
|
-
/**
|
|
51
|
-
* Re-key what recovery could not settle and surface exhausted rows through
|
|
52
|
-
* the caller's terminal-failure handler. The exhausted count is also
|
|
53
|
-
* returned so the sync result can carry it: a pass that recorded this
|
|
54
|
-
* failure must not read as clean to callers that clear recorded failures
|
|
55
|
-
* on success.
|
|
56
|
-
*/
|
|
57
|
-
export declare function rekeyAndReportUnsettledRecoveryPendingUpdates(input: Parameters<typeof rekeyUnsettledRecoveryPendingUpdates>[0] & {
|
|
58
|
-
onTerminalSubmitFailure?: ((failure: DocumentSyncSubmitFailure) => Promise<void> | void) | undefined;
|
|
59
|
-
}): Promise<{
|
|
60
|
-
exhaustedPendingUpdateCount: number;
|
|
61
|
-
rekeyedPendingUpdateIds: string[];
|
|
62
|
-
}>;
|
|
63
|
-
/**
|
|
64
|
-
* Terminal failure recorded when conflict recovery gives up on pending
|
|
65
|
-
* updates whose persisted re-key bound is exhausted. Shaped like a submit
|
|
66
|
-
* failure so the existing write-queue surface (recordDocumentSyncFailure via
|
|
67
|
-
* onTerminalSubmitFailure) explains the stuck write without new plumbing.
|
|
68
|
-
*/
|
|
69
|
-
export declare function rekeyLimitSubmitFailure(exhaustedCount: number): DocumentSyncSubmitFailure;
|
|
70
|
-
export {};
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { base64ToBytes } from "../../internal/encoding/index.js";
|
|
2
|
-
import { MAX_PENDING_UPDATE_REKEYS, rekeyDocumentPendingUpdate, } from "../../data/sqlite/documentPersistence.js";
|
|
3
|
-
import { getClientSQLitePersistenceRuntime } from "../../data/sqlite/sqlitePersistenceRuntime.js";
|
|
4
|
-
import { runSerializedSqlMutation, } from "../../data/sqlite/sqlSchema.js";
|
|
5
|
-
function bytesEqual(left, right) {
|
|
6
|
-
return (left.byteLength === right.byteLength &&
|
|
7
|
-
left.every((value, index) => value === right[index]));
|
|
8
|
-
}
|
|
9
|
-
function pendingUpdateMatchesDecryptedUpdate(pendingUpdate, decryptedUpdate) {
|
|
10
|
-
if (pendingUpdate.partialStartVersionVector !==
|
|
11
|
-
decryptedUpdate.partialStartVersionVector ||
|
|
12
|
-
pendingUpdate.partialEndVersionVector !==
|
|
13
|
-
decryptedUpdate.partialEndVersionVector) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return bytesEqual(base64ToBytes(pendingUpdate.updateData), decryptedUpdate.updateData);
|
|
17
|
-
}
|
|
18
|
-
export function settledPendingUpdateIdsFromSync(input) {
|
|
19
|
-
const settled = new Set(input.response.acceptedOutgoingUpdateIds);
|
|
20
|
-
for (const update of input.decryptedUpdates) {
|
|
21
|
-
const pendingUpdate = input.recoveryPendingUpdatesById.get(update.id);
|
|
22
|
-
if (pendingUpdate &&
|
|
23
|
-
pendingUpdateMatchesDecryptedUpdate(pendingUpdate, update)) {
|
|
24
|
-
settled.add(update.id);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
return [...settled];
|
|
28
|
-
}
|
|
29
|
-
/**
|
|
30
|
-
* A read-only recovery sync settles a conflicted pending update only when the
|
|
31
|
-
* response carries it — but the server's frontier filter omits spans the
|
|
32
|
-
* request's localVersionVector already covers, which a locally-applied
|
|
33
|
-
* pending update always is. Left alone, the conflicted id is resubmitted (and
|
|
34
|
-
* 409s the whole outgoing batch) forever: a lost ack leaves the server
|
|
35
|
-
* holding the original ciphertext, and every rebuild encrypts with a fresh
|
|
36
|
-
* IV, so a byte-identical retry can never be reproduced. Re-key what
|
|
37
|
-
* recovery could not settle so the next sync pass submits the same ops under
|
|
38
|
-
* a conflict-free id; the server-side copy stays harmless because CRDT
|
|
39
|
-
* update import is idempotent.
|
|
40
|
-
*
|
|
41
|
-
* Re-keying goes through the caller's persistence implementation when given
|
|
42
|
-
* (defaulting to the built-in pending-update table) and reports only ids
|
|
43
|
-
* whose row actually changed, so a record living in some other queue never
|
|
44
|
-
* counts as progress. Returns the fresh ids so callers can treat re-keying
|
|
45
|
-
* as settlement-like progress and schedule the pass that submits them.
|
|
46
|
-
*
|
|
47
|
-
* A row whose persisted rekeyCount has reached the bound is not re-keyed
|
|
48
|
-
* again: it is reported as exhausted so the caller can surface a terminal
|
|
49
|
-
* failure instead of feeding an unbounded conflict loop that survives
|
|
50
|
-
* restarts (each session's in-memory lane cap resets, this bound does not).
|
|
51
|
-
*/
|
|
52
|
-
export async function rekeyUnsettledRecoveryPendingUpdates(input) {
|
|
53
|
-
const rekeyPendingUpdate = input.rekeyPendingUpdate ?? rekeyDocumentPendingUpdate;
|
|
54
|
-
const settled = new Set(input.settledPendingUpdateIds);
|
|
55
|
-
const rekeyedPendingUpdateIds = [];
|
|
56
|
-
const exhaustedPendingUpdateIds = [];
|
|
57
|
-
for (const [pendingUpdateId, record] of input.recoveryPendingUpdatesById) {
|
|
58
|
-
if (input.stillCurrent?.() === false)
|
|
59
|
-
break;
|
|
60
|
-
if (settled.has(pendingUpdateId)) {
|
|
61
|
-
continue;
|
|
62
|
-
}
|
|
63
|
-
// Known multi-tab limitation: the count is the row as loaded at pass
|
|
64
|
-
// start, so a sibling tab that settle-deleted the row can make this
|
|
65
|
-
// record a failure for work that no longer exists. The stale failure is
|
|
66
|
-
// transient — the document's next clean pass clears it.
|
|
67
|
-
if ((record.rekeyCount ?? 0) >= MAX_PENDING_UPDATE_REKEYS) {
|
|
68
|
-
exhaustedPendingUpdateIds.push(pendingUpdateId);
|
|
69
|
-
continue;
|
|
70
|
-
}
|
|
71
|
-
const outcome = await runSerializedSqlMutation(input.execSql, (lockedExecSql) => getClientSQLitePersistenceRuntime(lockedExecSql).guardedTransaction(async () => input.stillCurrent?.() === false
|
|
72
|
-
? null
|
|
73
|
-
: rekeyPendingUpdate(lockedExecSql, pendingUpdateId), () => input.stillCurrent?.() !== false));
|
|
74
|
-
if (!outcome.committed)
|
|
75
|
-
break;
|
|
76
|
-
const nextId = outcome.result;
|
|
77
|
-
if (nextId !== null) {
|
|
78
|
-
rekeyedPendingUpdateIds.push(nextId);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
if (input.stillCurrent?.() === false) {
|
|
82
|
-
return { exhaustedPendingUpdateIds: [], rekeyedPendingUpdateIds: [] };
|
|
83
|
-
}
|
|
84
|
-
return { exhaustedPendingUpdateIds, rekeyedPendingUpdateIds };
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Re-key what recovery could not settle and surface exhausted rows through
|
|
88
|
-
* the caller's terminal-failure handler. The exhausted count is also
|
|
89
|
-
* returned so the sync result can carry it: a pass that recorded this
|
|
90
|
-
* failure must not read as clean to callers that clear recorded failures
|
|
91
|
-
* on success.
|
|
92
|
-
*/
|
|
93
|
-
export async function rekeyAndReportUnsettledRecoveryPendingUpdates(input) {
|
|
94
|
-
const { exhaustedPendingUpdateIds, rekeyedPendingUpdateIds } = await rekeyUnsettledRecoveryPendingUpdates(input);
|
|
95
|
-
if (input.stillCurrent?.() === false) {
|
|
96
|
-
return { exhaustedPendingUpdateCount: 0, rekeyedPendingUpdateIds: [] };
|
|
97
|
-
}
|
|
98
|
-
if (exhaustedPendingUpdateIds.length > 0) {
|
|
99
|
-
await input.onTerminalSubmitFailure?.(rekeyLimitSubmitFailure(exhaustedPendingUpdateIds.length));
|
|
100
|
-
}
|
|
101
|
-
return {
|
|
102
|
-
exhaustedPendingUpdateCount: exhaustedPendingUpdateIds.length,
|
|
103
|
-
rekeyedPendingUpdateIds,
|
|
104
|
-
};
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Terminal failure recorded when conflict recovery gives up on pending
|
|
108
|
-
* updates whose persisted re-key bound is exhausted. Shaped like a submit
|
|
109
|
-
* failure so the existing write-queue surface (recordDocumentSyncFailure via
|
|
110
|
-
* onTerminalSubmitFailure) explains the stuck write without new plumbing.
|
|
111
|
-
*/
|
|
112
|
-
export function rekeyLimitSubmitFailure(exhaustedCount) {
|
|
113
|
-
return {
|
|
114
|
-
message: `Update conflict recovery gave up after ${MAX_PENDING_UPDATE_REKEYS} re-key attempts (${exhaustedCount} update${exhaustedCount === 1 ? "" : "s"})`,
|
|
115
|
-
ok: false,
|
|
116
|
-
report: () => { },
|
|
117
|
-
status: null,
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
//# sourceMappingURL=syncRecoveryRekey.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncRecoveryRekey.js","sourceRoot":"","sources":["syncRecoveryRekey.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EACL,yBAAyB,EAEzB,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,iCAAiC,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,EAEL,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAcrC,SAAS,UAAU,CAAC,IAAgB,EAAE,KAAiB;IACrD,OAAO,CACL,IAAI,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU;QACpC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,KAAK,KAAK,KAAK,CAAC,KAAK,CAAC,CAAC,CACrD,CAAC;AACJ,CAAC;AAED,SAAS,mCAAmC,CAC1C,aAAkC,EACl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AAC,KAAK,CAAC,CAAC;IACpD,IAAI,KAAK,CAAC,YAAY,EAAE,EAAE,KAAK,KAAK,EAAE,CAAC;QACrC,OAAO,EAAE,2BAA2B,EAAE,CAAC,EAAE,uBAAuB,EAAE,EAAE,EAAE,CAAC;IACzE,CAAC;IACD,IAAI,yBAAyB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,MAAM,KAAK,CAAC,uBAAuB,EAAE,CACnC,uBAAuB,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAC1D,CAAC;IACJ,CAAC;IACD,OAAO;QACL,2BAA2B,EAAE,yBAAyB,CAAC,MAAM;QAC7D,uBAAuB;KACxB,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,uBAAuB,CACrC,cAAsB;IAEtB,OAAO;QACL,OAAO,EAAE,0CAA0C,yBAAyB,qBAAqB,cAAc,UAAU,cAAc,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,GAAG;QAC3J,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;QAChB,MAAM,EAAE,IAAI;KACb,CAAC;AACJ,CAAC","sourcesContent":["import { base64ToBytes } from \"@tearleads/encoding\";\nimport type { DocumentSyncResponse } from \"@tearleads/validators/response\";\nimport type { DocumentSyncSubmitFailure } from \"../../data/documents/shared/types\";\nimport {\n MAX_PENDING_UPDATE_REKEYS,\n type PendingUpdateRecord,\n rekeyDocumentPendingUpdate,\n} from \"../../data/sqlite/documentPersistence\";\nimport { getClientSQLitePersistenceRuntime } from \"../../data/sqlite/sqlitePersistenceRuntime\";\nimport {\n type ExecSql,\n runSerializedSqlMutation,\n} from \"../../data/sqlite/sqlSchema\";\n\nexport type RekeyPendingUpdate = (\n execSql: ExecSql,\n id: string,\n) => Promise<string | null>;\n\ninterface DecryptedSyncUpdate {\n id: string;\n partialEndVersionVector: string;\n partialStartVersionVector: string;\n updateData: Uint8Array;\n}\n\nfunction bytesEqual(left: Uint8Array, right: Uint8Array): boolean {\n return (\n left.byteLength === right.byteLength &&\n left.every((value, index) => value === right[index])\n );\n}\n\nfunction pendingUpdateMatchesDecryptedUpdate(\n pendingUpdate: PendingUpdateRecord,\n decryptedUpdate: Omit<DecryptedSyncUpdate, \"id\">,\n): boolean {\n if (\n pendingUpdate.partialStartVersionVector !==\n decryptedUpdate.partialStartVersionVector ||\n pendingUpdate.partialEndVersionVector !==\n decryptedUpdate.partialEndVersionVector\n ) {\n return false;\n }\n\n return bytesEqual(\n base64ToBytes(pendingUpdate.updateData),\n decryptedUpdate.updateData,\n );\n}\n\nexport function settledPendingUpdateIdsFromSync(input: {\n decryptedUpdates: readonly DecryptedSyncUpdate[];\n recoveryPendingUpdatesById: ReadonlyMap<string, PendingUpdateRecord>;\n response: DocumentSyncResponse;\n}): string[] {\n const settled = new Set(input.response.acceptedOutgoingUpdateIds);\n\n for (const update of input.decryptedUpdates) {\n const pendingUpdate = input.recoveryPendingUpdatesById.get(update.id);\n if (\n pendingUpdate &&\n pendingUpdateMatchesDecryptedUpdate(pendingUpdate, update)\n ) {\n settled.add(update.id);\n }\n }\n\n return [...settled];\n}\n\n/**\n * A read-only recovery sync settles a conflicted pending update only when the\n * response carries it — but the server's frontier filter omits spans the\n * request's localVersionVector already covers, which a locally-applied\n * pending update always is. Left alone, the conflicted id is resubmitted (and\n * 409s the whole outgoing batch) forever: a lost ack leaves the server\n * holding the original ciphertext, and every rebuild encrypts with a fresh\n * IV, so a byte-identical retry can never be reproduced. Re-key what\n * recovery could not settle so the next sync pass submits the same ops under\n * a conflict-free id; the server-side copy stays harmless because CRDT\n * update import is idempotent.\n *\n * Re-keying goes through the caller's persistence implementation when given\n * (defaulting to the built-in pending-update table) and reports only ids\n * whose row actually changed, so a record living in some other queue never\n * counts as progress. Returns the fresh ids so callers can treat re-keying\n * as settlement-like progress and schedule the pass that submits them.\n *\n * A row whose persisted rekeyCount has reached the bound is not re-keyed\n * again: it is reported as exhausted so the caller can surface a terminal\n * failure instead of feeding an unbounded conflict loop that survives\n * restarts (each session's in-memory lane cap resets, this bound does not).\n */\nexport async function rekeyUnsettledRecoveryPendingUpdates(input: {\n execSql: ExecSql;\n recoveryPendingUpdatesById: ReadonlyMap<string, PendingUpdateRecord>;\n rekeyPendingUpdate?: RekeyPendingUpdate | undefined;\n settledPendingUpdateIds: readonly string[];\n stillCurrent?: (() => boolean) | undefined;\n}): Promise<{\n exhaustedPendingUpdateIds: string[];\n rekeyedPendingUpdateIds: string[];\n}> {\n const rekeyPendingUpdate =\n input.rekeyPendingUpdate ?? rekeyDocumentPendingUpdate;\n const settled = new Set(input.settledPendingUpdateIds);\n const rekeyedPendingUpdateIds: string[] = [];\n const exhaustedPendingUpdateIds: string[] = [];\n for (const [pendingUpdateId, record] of input.recoveryPendingUpdatesById) {\n if (input.stillCurrent?.() === false) break;\n if (settled.has(pendingUpdateId)) {\n continue;\n }\n // Known multi-tab limitation: the count is the row as loaded at pass\n // start, so a sibling tab that settle-deleted the row can make this\n // record a failure for work that no longer exists. The stale failure is\n // transient — the document's next clean pass clears it.\n if ((record.rekeyCount ?? 0) >= MAX_PENDING_UPDATE_REKEYS) {\n exhaustedPendingUpdateIds.push(pendingUpdateId);\n continue;\n }\n const outcome = await runSerializedSqlMutation(\n input.execSql,\n (lockedExecSql) =>\n getClientSQLitePersistenceRuntime(lockedExecSql).guardedTransaction(\n async () =>\n input.stillCurrent?.() === false\n ? null\n : rekeyPendingUpdate(lockedExecSql, pendingUpdateId),\n () => input.stillCurrent?.() !== false,\n ),\n );\n if (!outcome.committed) break;\n const nextId = outcome.result;\n if (nextId !== null) {\n rekeyedPendingUpdateIds.push(nextId);\n }\n }\n if (input.stillCurrent?.() === false) {\n return { exhaustedPendingUpdateIds: [], rekeyedPendingUpdateIds: [] };\n }\n return { exhaustedPendingUpdateIds, rekeyedPendingUpdateIds };\n}\n\n/**\n * Re-key what recovery could not settle and surface exhausted rows through\n * the caller's terminal-failure handler. The exhausted count is also\n * returned so the sync result can carry it: a pass that recorded this\n * failure must not read as clean to callers that clear recorded failures\n * on success.\n */\nexport async function rekeyAndReportUnsettledRecoveryPendingUpdates(\n input: Parameters<typeof rekeyUnsettledRecoveryPendingUpdates>[0] & {\n onTerminalSubmitFailure?:\n | ((failure: DocumentSyncSubmitFailure) => Promise<void> | void)\n | undefined;\n },\n): Promise<{\n exhaustedPendingUpdateCount: number;\n rekeyedPendingUpdateIds: string[];\n}> {\n const { exhaustedPendingUpdateIds, rekeyedPendingUpdateIds } =\n await rekeyUnsettledRecoveryPendingUpdates(input);\n if (input.stillCurrent?.() === false) {\n return { exhaustedPendingUpdateCount: 0, rekeyedPendingUpdateIds: [] };\n }\n if (exhaustedPendingUpdateIds.length > 0) {\n await input.onTerminalSubmitFailure?.(\n rekeyLimitSubmitFailure(exhaustedPendingUpdateIds.length),\n );\n }\n return {\n exhaustedPendingUpdateCount: exhaustedPendingUpdateIds.length,\n rekeyedPendingUpdateIds,\n };\n}\n\n/**\n * Terminal failure recorded when conflict recovery gives up on pending\n * updates whose persisted re-key bound is exhausted. Shaped like a submit\n * failure so the existing write-queue surface (recordDocumentSyncFailure via\n * onTerminalSubmitFailure) explains the stuck write without new plumbing.\n */\nexport function rekeyLimitSubmitFailure(\n exhaustedCount: number,\n): DocumentSyncSubmitFailure {\n return {\n message: `Update conflict recovery gave up after ${MAX_PENDING_UPDATE_REKEYS} re-key attempts (${exhaustedCount} update${exhaustedCount === 1 ? \"\" : \"s\"})`,\n ok: false,\n report: () => {},\n status: null,\n };\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { serializeKeyingCanonicalJson, toFingerprint } from "../../internal/crypto/index.js";
|
|
2
|
-
const textEncoder = new TextEncoder();
|
|
3
|
-
/**
|
|
4
|
-
* Identifies one logical inline-rekey flush across plan rematerialization.
|
|
5
|
-
* Rotation baselines and signed rekey events can be freshly randomized on a
|
|
6
|
-
* retry. The durable FIFO head and pre-rekey projection stay stable even when
|
|
7
|
-
* a new local edit is appended to the queue after a response is lost.
|
|
8
|
-
*/
|
|
9
|
-
export async function computeInlineRekeyCommitId(input) {
|
|
10
|
-
return toFingerprint(textEncoder.encode(serializeKeyingCanonicalJson({
|
|
11
|
-
domain: "tearleads.document-sync.inline-rekey-commit",
|
|
12
|
-
documentId: input.projection.documentId,
|
|
13
|
-
headPendingUpdateId: input.headPendingUpdateId,
|
|
14
|
-
predecessorTargetHash: input.projection.documentKekTargets.documentKeyTargetHash,
|
|
15
|
-
version: 1,
|
|
16
|
-
})));
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=syncRekeyCommit.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncRepairAbandon.js","sourceRoot":"","sources":["syncRepairAbandon.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;GAUG;AACH,MAAM,OAAO,oCAAqC,SAAQ,KAAK;IACxC;IAArB,YAAqB,MAAmC;QACtD,KAAK,CAAC,uCAAuC,MAAM,EAAE,CAAC,CAAC;QADpC,WAAM,GAAN,MAAM,CAA6B;QAEtD,IAAI,CAAC,IAAI,GAAG,sCAAsC,CAAC;IACrD,CAAC;CACF;AAED,iFAAiF;AACjF,MAAM,OAAO,oCAAqC,SAAQ,KAAK;IAC7D;QACE,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAChE,IAAI,CAAC,IAAI,GAAG,sCAAsC,CAAC;IACrD,CAAC;CACF","sourcesContent":["import type { AncestorRepairAbandonReason } from \"./syncTrace\";\n\n/**\n * A repair that cannot proceed for a routine reason: the organization's writes\n * are gated, the server refused the rekey, a peer rotated an ancestor mid-pass,\n * the refreshed projection was unavailable, or the pass exhausted its repair\n * budget. None is a defect, so the sync lane abandons the attempt rather than\n * reporting a failed run; the next trigger re-plans from a fresh projection.\n *\n * Lives apart from both the planner and the preparation loop: each throws it,\n * and preparation already imports the planner, so declaring it in either would\n * close a dependency cycle.\n */\nexport class DocumentAncestorRepairAbandonedError extends Error {\n constructor(readonly reason: AncestorRepairAbandonReason) {\n super(`Document ancestor repair abandoned: ${reason}`);\n this.name = \"DocumentAncestorRepairAbandonedError\";\n }\n}\n\n/** A refreshed projection needs durable preparation before another pure plan. */\nexport class DocumentSyncPreparationRequiredError extends Error {\n constructor() {\n super(\"Document sync requires a new ancestor preparation step\");\n this.name = \"DocumentSyncPreparationRequiredError\";\n }\n}\n"]}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { resolveContainerPathUserAccessLevel } from "../../internal/crypto/index.js";
|
|
2
|
-
import { requireProjectionUserKeyResolver, verifyDocumentWriterProjectionAuthorization, } from "../../data/keyingProjectionVerification/index.js";
|
|
3
|
-
/** A repair refusal on one link does not revoke write access through another. */
|
|
4
|
-
export async function hasOtherLinkedWriteAccess(sync, projection, inaccessibleContainerId) {
|
|
5
|
-
if (projection.authorizingContainerPaths.length < 2)
|
|
6
|
-
return false;
|
|
7
|
-
const verified = await verifyDocumentWriterProjectionAuthorization({
|
|
8
|
-
execSql: sync.execSql,
|
|
9
|
-
persistVerificationCheckpoints: false,
|
|
10
|
-
projection,
|
|
11
|
-
resolveUserKey: requireProjectionUserKeyResolver(sync.resolveProjectionUserKey, "Document linked repair access"),
|
|
12
|
-
stillCurrent: sync.stillCurrent,
|
|
13
|
-
warmReferencedPrincipalPolicies: sync.warmReferencedPrincipalPolicies,
|
|
14
|
-
});
|
|
15
|
-
const document = verified.documentManifestByHash.get(projection.documentManifest.manifestHash);
|
|
16
|
-
if (!document ||
|
|
17
|
-
document.state.documentId !== sync.documentId ||
|
|
18
|
-
document.state.organizationId !== sync.author.organizationId)
|
|
19
|
-
return false;
|
|
20
|
-
// The map also contains historical paths. Only the verified current paths
|
|
21
|
-
// named by this projection may establish present write authority.
|
|
22
|
-
return projection.authorizingContainerPaths.some((candidate) => {
|
|
23
|
-
const headHash = candidate.path.at(-1)?.manifestHash;
|
|
24
|
-
const path = headHash
|
|
25
|
-
? verified.containerPathByManifestHash.get(headHash)
|
|
26
|
-
: undefined;
|
|
27
|
-
const leaf = path?.at(-1);
|
|
28
|
-
if (!path ||
|
|
29
|
-
!leaf ||
|
|
30
|
-
leaf.state.containerId === inaccessibleContainerId ||
|
|
31
|
-
leaf.state.organizationId !== document.state.organizationId ||
|
|
32
|
-
!document.state.linkedContainerIds.includes(leaf.state.containerId))
|
|
33
|
-
return false;
|
|
34
|
-
const access = resolveContainerPathUserAccessLevel({
|
|
35
|
-
path,
|
|
36
|
-
principalPolicies: verified.principalPolicies,
|
|
37
|
-
userId: sync.author.signerUserId,
|
|
38
|
-
});
|
|
39
|
-
return access === "write" || access === "admin";
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
//# sourceMappingURL=syncRepairAccess.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncRepairAccess.js","sourceRoot":"","sources":["syncRepairAccess.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EACL,gCAAgC,EAChC,2CAA2C,GAC5C,MAAM,yCAAyC,CAAC;AAGjD,iFAAiF;AACjF,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAC7C,IAA6B,EAC7B,UAA4C,EAC5C,uBAA+B;IAE/B,IAAI,UAAU,CAAC,yBAAyB,CAAC,MAAM,GAAG,CAAC;QAAE,OAAO,KAAK,CAAC;IAClE,MAAM,QAAQ,GAAG,MAAM,2CAA2C,CAAC;QACjE,OAAO,EAAE,IAAI,CAAC,OAAO;QACrB,8BAA8B,EAAE,KAAK;QACrC,UAAU;QACV,cAAc,EAAE,gCAAgC,CAC9C,IAAI,CAAC,wBAAwB,EAC7B,+BAA+B,CAChC;QACD,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,+BAA+B,EAAE,IAAI,CAAC,+BAA+B;KACtE,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,QAAQ,CAAC,sBAAsB,CAAC,GAAG,CAClD,UAAU,CAAC,g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ionResponse } from \"@tearleads/validators/response\";\nimport {\n requireProjectionUserKeyResolver,\n verifyDocumentWriterProjectionAuthorization,\n} from \"../../data/keyingProjectionVerification\";\nimport type { SyncRemoteDocumentInput } from \"./readOnlySync\";\n\n/** A repair refusal on one link does not revoke write access through another. */\nexport async function hasOtherLinkedWriteAccess(\n sync: SyncRemoteDocumentInput,\n projection: DocumentWriterProjectionResponse,\n inaccessibleContainerId: string,\n): Promise<boolean> {\n if (projection.authorizingContainerPaths.length < 2) return false;\n const verified = await verifyDocumentWriterProjectionAuthorization({\n execSql: sync.execSql,\n persistVerificationCheckpoints: false,\n projection,\n resolveUserKey: requireProjectionUserKeyResolver(\n sync.resolveProjectionUserKey,\n \"Document linked repair access\",\n ),\n stillCurrent: sync.stillCurrent,\n warmReferencedPrincipalPolicies: sync.warmReferencedPrincipalPolicies,\n });\n const document = verified.documentManifestByHash.get(\n projection.documentManifest.manifestHash,\n );\n if (\n !document ||\n document.state.documentId !== sync.documentId ||\n document.state.organizationId !== sync.author.organizationId\n )\n return false;\n // The map also contains historical paths. Only the verified current paths\n // named by this projection may establish present write authority.\n return projection.authorizingContainerPaths.some((candidate) => {\n const headHash = candidate.path.at(-1)?.manifestHash;\n const path = headHash\n ? verified.containerPathByManifestHash.get(headHash)\n : undefined;\n const leaf = path?.at(-1);\n if (\n !path ||\n !leaf ||\n leaf.state.containerId === inaccessibleContainerId ||\n leaf.state.organizationId !== document.state.organizationId ||\n !document.state.linkedContainerIds.includes(leaf.state.containerId)\n )\n return false;\n const access = resolveContainerPathUserAccessLevel({\n path,\n principalPolicies: verified.principalPolicies,\n userId: sync.author.signerUserId,\n });\n return access === \"write\" || access === \"admin\";\n });\n}\n"]}
|
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { KeyingVerificationError } from "../../internal/crypto/index.js";
|
|
2
|
-
import { decryptDocumentSyncUpdatesByEpoch } from "../../data/documents/shared/crypto.js";
|
|
3
|
-
import { isolateDocumentSyncBatchError, } from "../../data/documents/shared/documentSyncUpdateIsolation.js";
|
|
4
|
-
import { assertDocumentWriterProjectionConsistent } from "../../data/documents/shared/projection.js";
|
|
5
|
-
import { DocumentSyncResponseUpdateContentKeyError, persistedDocumentSyncStateFromResponse, } from "../../data/documents/shared/responses.js";
|
|
6
|
-
import { projectionVerificationOptions } from "../../data/documents/shared/types.js";
|
|
7
|
-
import { unwrapDocumentSyncResponseContentKeys } from "./syncContentKeys.js";
|
|
8
|
-
import { acceptedHeldBackPendingUpdateIds, responseAcceptedRecoveryBaseline, } from "./syncPlanRequestBounds.js";
|
|
9
|
-
import { rekeyAndReportUnsettledRecoveryPendingUpdates, settledPendingUpdateIdsFromSync, } from "./syncRecoveryRekey.js";
|
|
10
|
-
function isolateContentKeyResponseFailure(error, response) {
|
|
11
|
-
if (!(error instanceof DocumentSyncResponseUpdateContentKeyError) ||
|
|
12
|
-
response.updates.length === 0) {
|
|
13
|
-
throw error;
|
|
14
|
-
}
|
|
15
|
-
throw isolateDocumentSyncBatchError({
|
|
16
|
-
cause: new KeyingVerificationError("invalid_shape", error.message),
|
|
17
|
-
stage: "content_key",
|
|
18
|
-
updateIds: response.updates.map((update) => update.id),
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
/** @internal Exercises poison precedence for the decryptable subset of a raw page. */
|
|
22
|
-
export async function validateDecryptableRawHistorySiblings(input) {
|
|
23
|
-
if (input.updates.length === 0)
|
|
24
|
-
return;
|
|
25
|
-
const decryptedUpdates = await decryptDocumentSyncUpdatesByEpoch({
|
|
26
|
-
contentKeysByEpoch: input.contentKeysByEpoch,
|
|
27
|
-
documentId: input.documentId,
|
|
28
|
-
organizationId: input.organizationId,
|
|
29
|
-
updates: input.updates,
|
|
30
|
-
});
|
|
31
|
-
// The current wire contract authenticates each update's operation range but
|
|
32
|
-
// not its exact dependency set. An unresolved import therefore cannot prove
|
|
33
|
-
// that the missing parent belongs to an unavailable sibling; preserve the
|
|
34
|
-
// isolation failure instead of downgrading unrelated poison to availability.
|
|
35
|
-
await input.validateIncomingUpdates({
|
|
36
|
-
decryptedUpdates,
|
|
37
|
-
response: { ...input.response, updates: [...input.updates] },
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
async function resolveVerifiedResponseState(input) {
|
|
41
|
-
const { plan } = input.materializedPlan;
|
|
42
|
-
let persistedState;
|
|
43
|
-
try {
|
|
44
|
-
persistedState = await persistedDocumentSyncStateFromResponse(plan, input.response, {
|
|
45
|
-
resolveWriterPublicKey: input.resolveWriterPublicKey,
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
catch (error) {
|
|
49
|
-
// Missing or future bundles are response-integrity failures. They must be
|
|
50
|
-
// poison-isolated before key availability is considered, because the
|
|
51
|
-
// referenced update has not yet authenticated against a bundle.
|
|
52
|
-
isolateContentKeyResponseFailure(error, input.response);
|
|
53
|
-
}
|
|
54
|
-
if ((plan.request.containerRekeys?.length ?? 0) > 0) {
|
|
55
|
-
await assertDocumentWriterProjectionConsistent(input.writerProjection, {
|
|
56
|
-
allowStaleContentKeyBundle: true,
|
|
57
|
-
execSql: input.execSql,
|
|
58
|
-
stillCurrent: input.stillCurrent,
|
|
59
|
-
...projectionVerificationOptions(input),
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
const contentKeysByEpoch = await unwrapDocumentSyncResponseContentKeys({
|
|
63
|
-
currentContentKey: input.materializedPlan.contentKey,
|
|
64
|
-
currentContentKeyEpoch: plan.contentKeyEpoch,
|
|
65
|
-
execSql: input.execSql,
|
|
66
|
-
historyMode: plan.request.historyMode,
|
|
67
|
-
onRawHistoryUnavailable: async ({ contentKeysByEpoch, updates }) => validateDecryptableRawHistorySiblings({
|
|
68
|
-
contentKeysByEpoch,
|
|
69
|
-
documentId: plan.documentId,
|
|
70
|
-
organizationId: plan.organizationId,
|
|
71
|
-
response: input.response,
|
|
72
|
-
updates,
|
|
73
|
-
validateIncomingUpdates: input.validateIncomingUpdates,
|
|
74
|
-
}),
|
|
75
|
-
response: input.response,
|
|
76
|
-
targetSecretKey: input.targetSecretKey,
|
|
77
|
-
writerProjection: input.writerProjection,
|
|
78
|
-
...projectionVerificationOptions(input),
|
|
79
|
-
});
|
|
80
|
-
return { contentKeysByEpoch, persistedState };
|
|
81
|
-
}
|
|
82
|
-
export async function syncRemoteDocumentResultFromResponse(input) {
|
|
83
|
-
const { plan } = input.materializedPlan;
|
|
84
|
-
const { contentKeysByEpoch, persistedState } = await resolveVerifiedResponseState(input);
|
|
85
|
-
const decryptedUpdates = await decryptDocumentSyncUpdatesByEpoch({
|
|
86
|
-
contentKeysByEpoch,
|
|
87
|
-
documentId: plan.documentId,
|
|
88
|
-
organizationId: plan.organizationId,
|
|
89
|
-
updates: input.response.updates,
|
|
90
|
-
});
|
|
91
|
-
await input.validateIncomingUpdates({
|
|
92
|
-
decryptedUpdates,
|
|
93
|
-
response: input.response,
|
|
94
|
-
});
|
|
95
|
-
const recoveryBaselineId = input.materializedPlan.staleRecoveryBaselineUpdateId;
|
|
96
|
-
const acceptedRecoveryBaseline = responseAcceptedRecoveryBaseline(input.materializedPlan, input.response);
|
|
97
|
-
// Two heal-specific corrections: the synthetic heal baseline matches no
|
|
98
|
-
// pending-queue row, so its ack must not count as a settled pending update;
|
|
99
|
-
// and checkpoints the heal held back ARE settled by it — the committed
|
|
100
|
-
// covering baseline subsumes their full-history content, and resubmitting
|
|
101
|
-
// them post-heal could become the LATEST baseline at the healed epoch and
|
|
102
|
-
// shrink the redirect's coverage below the pre-heal frontier.
|
|
103
|
-
const settledPendingUpdateIds = [
|
|
104
|
-
...settledPendingUpdateIdsFromSync({
|
|
105
|
-
decryptedUpdates,
|
|
106
|
-
recoveryPendingUpdatesById: input.recoveryPendingUpdatesById,
|
|
107
|
-
response: input.response,
|
|
108
|
-
}).filter((updateId) => updateId !== recoveryBaselineId),
|
|
109
|
-
...acceptedHeldBackPendingUpdateIds(input.materializedPlan, input.response),
|
|
110
|
-
];
|
|
111
|
-
const { exhaustedPendingUpdateCount, rekeyedPendingUpdateIds } = await rekeyAndReportUnsettledRecoveryPendingUpdates({
|
|
112
|
-
execSql: input.execSql,
|
|
113
|
-
onTerminalSubmitFailure: input.onTerminalSubmitFailure,
|
|
114
|
-
recoveryPendingUpdatesById: input.recoveryPendingUpdatesById,
|
|
115
|
-
rekeyPendingUpdate: input.rekeyPendingUpdate,
|
|
116
|
-
settledPendingUpdateIds,
|
|
117
|
-
stillCurrent: input.stillCurrent,
|
|
118
|
-
});
|
|
119
|
-
return {
|
|
120
|
-
exhaustedPendingUpdateCount,
|
|
121
|
-
contentKey: input.materializedPlan.contentKey,
|
|
122
|
-
decryptedUpdates,
|
|
123
|
-
hasDeferredPendingUpdates: false,
|
|
124
|
-
hasIncompletePull: false,
|
|
125
|
-
persistedState,
|
|
126
|
-
plan,
|
|
127
|
-
rekeyedPendingUpdateIds,
|
|
128
|
-
response: input.response,
|
|
129
|
-
settledPendingUpdateIds,
|
|
130
|
-
acceptedRecoveryBaseline,
|
|
131
|
-
writerProjection: input.writerProjection,
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
//# sourceMappingURL=syncResponseResult.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"syncResponseResult.js","sourceRoot":"","sources":["syncResponseResult.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAK5D,OAAO,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,EAEL,6BAA6B,GAC9B,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,wCAAwC,EAAE,MAAM,wCAAwC,CAAC;AAClG,OAAO,EACL,yCAAyC,EACzC,sCAAsC,GACvC,MAAM,uCAAuC,CAAC;AAM/C,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAOlF,OAAO,EAAE,qCAAqC,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACL,gCAAgC,EAChC,gCAAgC,GACj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CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC;KAC5E,CAAC;IACF,MAAM,EAAE,2BAA2B,EAAE,uBAAuB,EAAE,GAC5D,MAAM,6CAA6C,CAAC;QAClD,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;QACtD,0BAA0B,EAAE,KAAK,CAAC,0BAA0B;QAC5D,kBAAkB,EAAE,KAAK,CAAC,kBAAkB;QAC5C,uBAAuB;QACvB,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC,CAAC;IAEL,OAAO;QACL,2BAA2B;QAC3B,UAAU,EAAE,KAAK,CAAC,gBAAgB,CAAC,UAAU;QAC7C,gBAAgB;QAChB,yBAAyB,EAAE,KAAK;QAChC,iBAAiB,EAAE,KAAK;QACxB,cAAc;QACd,IAAI;QACJ,uBAAuB;QACvB,QAAQ,EAAE,KAAK,CAAC,QAAQ;QACxB,uBAAuB;QACvB,wBAAwB;QACxB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KACzC,CAAC;AACJ,CAAC","sourcesContent":["import { KeyingVerificationError } from \"@tearleads/crypto\";\nimport type {\n DocumentSyncResponse,\n DocumentWriterProjectionResponse,\n} from \"@tearleads/validators/response\";\nimport { decryptDocumentSyncUpdatesByEpoch } from \"../../data/documents/shared/crypto\";\nimport {\n type IncomingDocumentSyncUpdateValidator,\n isolateDocumentSyncBatchError,\n} from \"../../data/documents/shared/documentSyncUpdateIsolation\";\nimport { assertDocumentWriterProjectionConsistent } from \"../../data/documents/shared/projection\";\nimport {\n DocumentSyncResponseUpdateContentKeyError,\n persistedDocumentSyncStateFromResponse,\n} from \"../../data/documents/shared/responses\";\nimport type {\n DocumentWriterPublicKeyResolver,\n MaterializedDocumentSyncPlan,\n SyncRemoteDocumentResult,\n} from \"../../data/documents/shared/types\";\nimport { projectionVerificationOptions } from \"../../data/documents/shared/types\";\nimport type {\n ProjectionUserKeyResolver,\n ReferencedPrincipalPolicyWarmer,\n} from \"../../data/keyingProjectionVerification\";\nimport type { PendingUpdateRecord } from \"../../data/sqlite/documentPersistence\";\nimport type { ExecSql } from \"../../data/sqlite/sqlSchema\";\nimport { unwrapDocumentSyncResponseContentKeys } from \"./syncContentKeys\";\nimport type { TerminalSubmitFailureHandler } from \"./syncFailureClassification\";\nimport {\n acceptedHeldBackPendingUpdateIds,\n responseAcceptedRecoveryBaseline,\n} from \"./syncPlanRequestBounds\";\nimport {\n type RekeyPendingUpdate,\n rekeyAndReportUnsettledRecoveryPendingUpdates,\n settledPendingUpdateIdsFromSync,\n} from \"./syncRecoveryRekey\";\n\nfunction isolateContentKeyResponseFailure(\n error: unknown,\n response: DocumentSyncResponse,\n): never {\n if (\n !(error instanceof DocumentSyncResponseUpdateContentKeyError) ||\n response.updates.length === 0\n ) {\n throw error;\n }\n throw isolateDocumentSyncBatchError({\n cause: new KeyingVerificationError(\"invalid_shape\", error.message),\n stage: \"content_key\",\n updateIds: response.updates.map((update) => update.id),\n });\n}\n\ntype SyncRemoteDocumentResultInput = {\n execSql: ExecSql;\n materializedPlan: MaterializedDocumentSyncPlan;\n onTerminalSubmitFailure?: TerminalSubmitFailureHandler | undefined;\n recoveryPendingUpdatesById: ReadonlyMap<string, PendingUpdateRecord>;\n rekeyPendingUpdate?: RekeyPendingUpdate | undefined;\n resolveProjectionUserKey: ProjectionUserKeyResolver;\n warmReferencedPrincipalPolicies?: ReferencedPrincipalPolicyWarmer | undefined;\n resolveWriterPublicKey: DocumentWriterPublicKeyResolver;\n response: DocumentSyncResponse;\n stillCurrent?: (() => boolean) | undefined;\n targetSecretKey: Uint8Array;\n validateIncomingUpdates: IncomingDocumentSyncUpdateValidator;\n writerProjection: DocumentWriterProjectionResponse;\n};\n\n/** @internal Exercises poison precedence for the decryptable subset of a raw page. */\nexport async function validateDecryptableRawHistorySiblings(input: {\n contentKeysByEpoch: ReadonlyMap<number, Uint8Array>;\n documentId: string;\n organizationId: string;\n response: DocumentSyncResponse;\n updates: readonly DocumentSyncResponse[\"updates\"][number][];\n validateIncomingUpdates: IncomingDocumentSyncUpdateValidator;\n}): Promise<void> {\n if (input.updates.length === 0) return;\n const decryptedUpdates = await decryptDocumentSyncUpdatesByEpoch({\n contentKeysByEpoch: input.contentKeysByEpoch,\n documentId: input.documentId,\n organizationId: input.organizationId,\n updates: input.updates,\n });\n // The current wire contract authenticates each update's operation range but\n // not its exact dependency set. An unresolved import therefore cannot prove\n // that the missing parent belongs to an unavailable sibling; preserve the\n // isolation failure instead of downgrading unrelated poison to availability.\n await input.validateIncomingUpdates({\n decryptedUpdates,\n response: { ...input.response, updates: [...input.updates] },\n });\n}\n\nasync function resolveVerifiedResponseState(\n input: SyncRemoteDocumentResultInput,\n) {\n const { plan } = input.materializedPlan;\n let persistedState: Awaited<\n ReturnType<typeof persistedDocumentSyncStateFromResponse>\n >;\n try {\n persistedState = await persistedDocumentSyncStateFromResponse(\n plan,\n input.response,\n {\n resolveWriterPublicKey: input.resolveWriterPublicKey,\n },\n );\n } catch (error) {\n // Missing or future bundles are response-integrity failures. They must be\n // poison-isolated before key availability is considered, because the\n // referenced update has not yet authenticated against a bundle.\n isolateContentKeyResponseFailure(error, input.response);\n }\n if ((plan.request.containerRekeys?.length ?? 0) > 0) {\n await assertDocumentWriterProjectionConsistent(input.writerProjection, {\n allowStaleContentKeyBundle: true,\n execSql: input.execSql,\n stillCurrent: input.stillCurrent,\n ...projectionVerificationOptions(input),\n });\n }\n const contentKeysByEpoch = await unwrapDocumentSyncResponseContentKeys({\n currentContentKey: input.materializedPlan.contentKey,\n currentContentKeyEpoch: plan.contentKeyEpoch,\n execSql: input.execSql,\n historyMode: plan.request.historyMode,\n onRawHistoryUnavailable: async ({ contentKeysByEpoch, updates }) =>\n validateDecryptableRawHistorySiblings({\n contentKeysByEpoch,\n documentId: plan.documentId,\n organizationId: plan.organizationId,\n response: input.response,\n updates,\n validateIncomingUpdates: input.validateIncomingUpdates,\n }),\n response: input.response,\n targetSecretKey: input.targetSecretKey,\n writerProjection: input.writerProjection,\n ...projectionVerificationOptions(input),\n });\n return { contentKeysByEpoch, persistedState };\n}\n\nexport async function syncRemoteDocumentResultFromResponse(\n input: SyncRemoteDocumentResultInput,\n): Promise<SyncRemoteDocumentResult> {\n const { plan } = input.materializedPlan;\n const { contentKeysByEpoch, persistedState } =\n await resolveVerifiedResponseState(input);\n const decryptedUpdates = await decryptDocumentSyncUpdatesByEpoch({\n contentKeysByEpoch,\n documentId: plan.documentId,\n organizationId: plan.organizationId,\n updates: input.response.updates,\n });\n await input.validateIncomingUpdates({\n decryptedUpdates,\n response: input.response,\n });\n const recoveryBaselineId =\n input.materializedPlan.staleRecoveryBaselineUpdateId;\n const acceptedRecoveryBaseline = responseAcceptedRecoveryBaseline(\n input.materializedPlan,\n input.response,\n );\n // Two heal-specific corrections: the synthetic heal baseline matches no\n // pending-queue row, so its ack must not count as a settled pending update;\n // and checkpoints the heal held back ARE settled by it — the committed\n // covering baseline subsumes their full-history content, and resubmitting\n // them post-heal could become the LATEST baseline at the healed epoch and\n // shrink the redirect's coverage below the pre-heal frontier.\n const settledPendingUpdateIds = [\n ...settledPendingUpdateIdsFromSync({\n decryptedUpdates,\n recoveryPendingUpdatesById: input.recoveryPendingUpdatesById,\n response: input.response,\n }).filter((updateId) => updateId !== recoveryBaselineId),\n ...acceptedHeldBackPendingUpdateIds(input.materializedPlan, input.response),\n ];\n const { exhaustedPendingUpdateCount, rekeyedPendingUpdateIds } =\n await rekeyAndReportUnsettledRecoveryPendingUpdates({\n execSql: input.execSql,\n onTerminalSubmitFailure: input.onTerminalSubmitFailure,\n recoveryPendingUpdatesById: input.recoveryPendingUpdatesById,\n rekeyPendingUpdate: input.rekeyPendingUpdate,\n settledPendingUpdateIds,\n stillCurrent: input.stillCurrent,\n });\n\n return {\n exhaustedPendingUpdateCount,\n contentKey: input.materializedPlan.contentKey,\n decryptedUpdates,\n hasDeferredPendingUpdates: false,\n hasIncompletePull: false,\n persistedState,\n plan,\n rekeyedPendingUpdateIds,\n response: input.response,\n settledPendingUpdateIds,\n acceptedRecoveryBaseline,\n writerProjection: input.writerProjection,\n };\n}\n"]}
|