@tearleads/client-sdk 0.1.61 → 0.1.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/containerContents/documentDiscovery.js +5 -5
- package/client/containerContents/documentDiscovery.js.map +1 -1
- package/client/containerContents/index.d.ts +7 -7
- package/client/containerContents/index.js +7 -7
- package/client/containerContents/index.js.map +1 -1
- package/client/containerContents/types.d.ts +6 -6
- package/client/containerContents/types.js.map +1 -1
- package/client/deviceFirst/index.js +2 -2
- package/client/deviceFirst/index.js.map +1 -1
- package/client/organizations/currentPrincipalMutations.js +5 -5
- package/client/organizations/currentPrincipalMutations.js.map +1 -1
- package/client/organizations/organizationDataUsage.js +1 -1
- package/client/organizations/organizationDataUsage.js.map +1 -1
- package/client/organizations/organizationGroupHistory.js +1 -1
- package/client/organizations/organizationGroupHistory.js.map +1 -1
- package/client/organizations/organizationGroupNameHydration.js +3 -3
- package/client/organizations/organizationGroupNameHydration.js.map +1 -1
- package/client/organizations/organizationHistory.js +2 -2
- package/client/organizations/organizationHistory.js.map +1 -1
- package/client/organizations/organizationReadModels.js +1 -1
- package/client/organizations/organizationReadModels.js.map +1 -1
- package/client/organizations/principalContainerMutations.js +1 -1
- package/client/organizations/principalContainerMutations.js.map +1 -1
- package/client/organizations/principalMutationRecovery.js.map +1 -1
- package/client/organizations/principalMutations.js +5 -5
- package/client/organizations/principalMutations.js.map +1 -1
- package/client/runtime/principalMutationApi.d.ts +1 -1
- package/client/runtime/principalMutationApi.js +2 -2
- package/client/runtime/principalMutationApi.js.map +1 -1
- package/client/runtime/principalMutationDispatch.js +1 -1
- package/client/runtime/principalMutationDispatch.js.map +1 -1
- package/client/session/index.js +1 -1
- package/client/session/index.js.map +1 -1
- package/client/session/sessionOrganizationCreation.js +1 -1
- package/client/session/sessionOrganizationCreation.js.map +1 -1
- package/client/session/sessionPurgeRecovery.js +2 -2
- package/client/session/sessionPurgeRecovery.js.map +1 -1
- package/package.json +1 -1
- package/stores/container-contents/containerStatePersistence.js +1 -1
- package/stores/container-contents/documentRecovery.js +2 -2
- package/stores/container-contents/documentRecovery.js.map +1 -1
- package/stores/container-contents/documentWork.js.map +1 -1
- package/stores/container-contents/localRefresh.js +2 -2
- package/stores/container-contents/localRefresh.js.map +1 -1
- package/stores/container-contents/operations.js +2 -2
- package/stores/container-contents/operations.js.map +1 -1
- package/stores/container-contents/remoteContainerIngestion.js +1 -1
- package/stores/container-contents/remoteEventSync.js +1 -1
- package/stores/container-contents/remoteHydrationRequest.js +1 -1
- package/stores/container-contents/setContainerIconOperation.js +2 -2
- package/stores/container-contents/setContainerIconOperation.js.map +1 -1
- package/stores/container-contents/shareOperations.js +1 -1
- package/stores/container-contents/startupHydration.js +1 -1
- package/stores/container-contents/syncAgent.d.ts +2 -2
- package/stores/container-contents/syncAgentTypes.d.ts +1 -1
- package/stores/container-contents/syncLaneIteration.js +2 -2
- package/stores/container-contents/syncLaneIteration.js.map +1 -1
- package/stores/container-contents/systemContainerIcon.js +1 -1
- package/stores/container-contents/systemContainerIcon.js.map +1 -1
- package/stores/documents/documentStore/attachmentHydrationCommit.js +1 -1
- package/stores/documents/documentStore/attachmentHydrationCommit.js.map +1 -1
- package/stores/documents/documentStore/attachmentUploadAttempt.js +1 -1
- package/stores/documents/documentStore/syncRemoteSignals.js +1 -1
- package/stores/documents/documentStore/syncRemoteSignals.js.map +1 -1
- package/stores/documents/documentStore/syncShared.js +1 -1
- package/stores/documents/documentStore/syncShared.js.map +1 -1
- package/workflows/blobs/detach.js +1 -1
- package/workflows/blobs/detach.js.map +1 -1
- package/workflows/blobs/hydration/blobChunkDecryption.js +34 -0
- package/workflows/blobs/hydration/blobChunkDecryption.js.map +1 -0
- package/workflows/blobs/hydration/decrypt.d.ts +12 -0
- package/workflows/blobs/hydration/decrypt.js +246 -0
- package/workflows/blobs/hydration/decrypt.js.map +1 -0
- package/workflows/blobs/hydration/hydrate.d.ts +56 -0
- package/workflows/blobs/hydration/hydrate.js +190 -0
- package/workflows/blobs/hydration/hydrate.js.map +1 -0
- package/workflows/blobs/hydration/hydrationResults.js +23 -0
- package/workflows/blobs/hydration/hydrationResults.js.map +1 -0
- package/workflows/blobs/index.d.ts +3 -3
- package/workflows/blobs/index.js +3 -3
- package/workflows/blobs/index.js.map +1 -1
- package/workflows/blobs/upload/automaticMultipartUpload.js +9 -0
- package/workflows/blobs/upload/automaticMultipartUpload.js.map +1 -0
- package/workflows/blobs/upload/index.d.ts +10 -0
- package/workflows/blobs/upload/index.js +243 -0
- package/workflows/blobs/upload/index.js.map +1 -0
- package/workflows/blobs/upload/multipartFirstParts.js +82 -0
- package/workflows/blobs/upload/multipartFirstParts.js.map +1 -0
- package/workflows/blobs/upload/multipartStageFailures.js +36 -0
- package/workflows/blobs/upload/multipartStageFailures.js.map +1 -0
- package/workflows/blobs/upload/multipartStageResolution.js.map +1 -0
- package/workflows/blobs/upload/multipartUpload.js +274 -0
- package/workflows/blobs/upload/multipartUpload.js.map +1 -0
- package/workflows/blobs/verification/attachmentBindingVerification.js +49 -0
- package/workflows/blobs/verification/attachmentBindingVerification.js.map +1 -0
- package/workflows/blobs/verification/attachmentDecryptor.js +41 -0
- package/workflows/blobs/verification/attachmentDecryptor.js.map +1 -0
- package/workflows/blobs/verification/attachmentKeyAuthenticator.js +68 -0
- package/workflows/blobs/verification/attachmentKeyAuthenticator.js.map +1 -0
- package/workflows/blobs/verification/retainedAttachmentVerification.js +40 -0
- package/workflows/blobs/verification/retainedAttachmentVerification.js.map +1 -0
- package/workflows/blobs/verification/verifiedWrapScope.js +20 -0
- package/workflows/blobs/verification/verifiedWrapScope.js.map +1 -0
- package/workflows/blobs/verification/writerProjection.js +29 -0
- package/workflows/blobs/verification/writerProjection.js.map +1 -0
- package/workflows/container-contents/attribution/documentAttributionRanges.d.ts +26 -0
- package/workflows/container-contents/attribution/documentCharacterBlame.js +33 -0
- package/workflows/container-contents/attribution/documentCharacterBlame.js.map +1 -0
- package/workflows/container-contents/attribution/documentFieldBlame.js +26 -0
- package/workflows/container-contents/attribution/documentFieldBlame.js.map +1 -0
- package/workflows/container-contents/container-state/createIntentSync.js +1 -1
- package/workflows/container-contents/container-state/createIntentSync.js.map +1 -1
- package/workflows/container-contents/container-state/moveIntentSync.js +1 -1
- package/workflows/container-contents/container-state/moveIntentSync.js.map +1 -1
- package/workflows/container-contents/container-state/purgeTree.js +2 -2
- package/workflows/container-contents/container-state/purgeTree.js.map +1 -1
- package/workflows/container-contents/container-state/purgeTreeContainerDeletion.js.map +1 -1
- package/workflows/container-contents/container-state/remote.js +1 -1
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/sharePersistence.js +2 -2
- package/workflows/container-contents/container-state/sharePersistence.js.map +1 -1
- package/workflows/container-contents/documentDiscovery/containerDocumentListing.js +106 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js +65 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryApply.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryCandidates.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryEvidence.js +91 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryEvidence.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryInputs.js +85 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryInputs.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryLanes.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryTypes.d.ts +160 -0
- package/workflows/container-contents/documentDiscovery/documentDiscoveryTypes.js.map +1 -0
- package/workflows/container-contents/documentDiscovery/index.d.ts +12 -0
- package/workflows/container-contents/documentDiscovery/index.js +183 -0
- package/workflows/container-contents/documentDiscovery/index.js.map +1 -0
- package/workflows/container-contents/documentLinks/availableDocumentLinkIntent.js +32 -0
- package/workflows/container-contents/documentLinks/availableDocumentLinkIntent.js.map +1 -0
- package/workflows/container-contents/documentLinks/deferredDocumentLinks.js +9 -0
- package/workflows/container-contents/documentLinks/deferredDocumentLinks.js.map +1 -0
- package/workflows/container-contents/documentLinks/documentLinkIntent.js +82 -0
- package/workflows/container-contents/documentLinks/documentLinkIntent.js.map +1 -0
- package/workflows/container-contents/documentLinks/documentLocalRelink.js.map +1 -0
- package/workflows/container-contents/documentLinks/index.d.ts +64 -0
- package/workflows/container-contents/documentLinks/index.js +264 -0
- package/workflows/container-contents/documentLinks/index.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveDeniedReplay.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveFailure.js +35 -0
- package/workflows/container-contents/documentMove/documentMoveFailure.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntent.js +77 -0
- package/workflows/container-contents/documentMove/documentMoveIntent.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentErrors.js +17 -0
- package/workflows/container-contents/documentMove/documentMoveIntentErrors.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSettlement.js +25 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSettlement.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSync.js +346 -0
- package/workflows/container-contents/documentMove/documentMoveIntentSync.js.map +1 -0
- package/workflows/container-contents/documentMove/documentMoveVanishedRefresh.js +100 -0
- package/workflows/container-contents/documentMove/documentMoveVanishedRefresh.js.map +1 -0
- package/workflows/container-contents/documentPriming/documentHydrationProbe.js +146 -0
- package/workflows/container-contents/documentPriming/documentHydrationProbe.js.map +1 -0
- package/workflows/container-contents/documentPriming/documentRuntimeTargetSync.js.map +1 -0
- package/workflows/container-contents/documentPriming/index.js +245 -0
- package/workflows/container-contents/documentPriming/index.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentStructure.d.ts +53 -0
- package/workflows/container-contents/documentQueries/documentStructure.js +183 -0
- package/workflows/container-contents/documentQueries/documentStructure.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentStructureTypes.d.ts +32 -0
- package/workflows/container-contents/documentQueries/documentStructureTypes.js.map +1 -0
- package/workflows/container-contents/documentQueries/documentSubtreeQueries.js +169 -0
- package/workflows/container-contents/documentQueries/documentSubtreeQueries.js.map +1 -0
- package/workflows/container-contents/documentQueries/index.d.ts +62 -0
- package/workflows/container-contents/documentQueries/index.js +212 -0
- package/workflows/container-contents/documentQueries/index.js.map +1 -0
- package/workflows/container-contents/documentQueries/orphanedDocumentSql.js +39 -0
- package/workflows/container-contents/documentQueries/orphanedDocumentSql.js.map +1 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.d.ts +12 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.js +42 -0
- package/workflows/container-contents/documentQueries/pendingDownloads.js.map +1 -0
- package/workflows/container-contents/documentQueries/sql.js +1 -1
- package/workflows/container-contents/documentQueries/sql.js.map +1 -1
- package/workflows/container-contents/index.d.ts +13 -13
- package/workflows/container-contents/index.js +11 -11
- package/workflows/container-contents/index.js.map +1 -1
- package/workflows/container-contents/info/blobInfo.d.ts +6 -0
- package/workflows/container-contents/info/blobInfo.js +323 -0
- package/workflows/container-contents/info/blobInfo.js.map +1 -0
- package/workflows/container-contents/info/blobInfoTypes.d.ts +48 -0
- package/workflows/container-contents/info/blobInfoTypes.js.map +1 -0
- package/workflows/container-contents/info/containerInfo.d.ts +77 -0
- package/workflows/container-contents/info/containerInfo.js +200 -0
- package/workflows/container-contents/info/containerInfo.js.map +1 -0
- package/workflows/container-contents/info/documentInfo.d.ts +18 -0
- package/workflows/container-contents/info/documentInfo.js +306 -0
- package/workflows/container-contents/info/documentInfo.js.map +1 -0
- package/workflows/container-contents/info/documentInfoTypes.d.ts +92 -0
- package/workflows/container-contents/info/documentInfoTypes.js.map +1 -0
- package/workflows/container-contents/metadata/index.d.ts +25 -0
- package/workflows/container-contents/metadata/index.js +217 -0
- package/workflows/container-contents/metadata/index.js.map +1 -0
- package/workflows/container-contents/metadata/metadataEvents.d.ts +7 -0
- package/workflows/container-contents/metadata/metadataEvents.js +47 -0
- package/workflows/container-contents/metadata/metadataEvents.js.map +1 -0
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js +40 -0
- package/workflows/container-contents/metadata/metadataIncomingUpdateIsolation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.d.ts +75 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.js +177 -0
- package/workflows/container-contents/metadata/metadataMutationPreparation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataPersistence.d.ts +34 -0
- package/workflows/container-contents/metadata/metadataPersistence.js +254 -0
- package/workflows/container-contents/metadata/metadataPersistence.js.map +1 -0
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js +65 -0
- package/workflows/container-contents/metadata/metadataPullContinuationInvalidation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataReadState.d.ts +2 -0
- package/workflows/container-contents/metadata/metadataReadState.js.map +1 -0
- package/workflows/container-contents/metadata/metadataRecord.js +43 -0
- package/workflows/container-contents/metadata/metadataRecord.js.map +1 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.d.ts +38 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.js +91 -0
- package/workflows/container-contents/metadata/metadataRemoteSync.js.map +1 -0
- package/workflows/container-contents/metadata/metadataStateInstallation.d.ts +3 -0
- package/workflows/container-contents/metadata/metadataStateInstallation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataStateIsolation.js +80 -0
- package/workflows/container-contents/metadata/metadataStateIsolation.js.map +1 -0
- package/workflows/container-contents/metadata/metadataSyncErrors.js +41 -0
- package/workflows/container-contents/metadata/metadataSyncErrors.js.map +1 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.d.ts +13 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.js +27 -0
- package/workflows/container-contents/metadata/metadataSyncSettlement.js.map +1 -0
- package/workflows/container-contents/metadata/metadataTypes.d.ts +54 -0
- package/workflows/container-contents/metadata/metadataTypes.js.map +1 -0
- package/workflows/container-contents/pendingWrites/aggregation.js.map +1 -1
- package/workflows/container-contents/pendingWrites/deferredTails.js.map +1 -1
- package/workflows/container-contents/pendingWrites/index.d.ts +26 -0
- package/workflows/container-contents/pendingWrites/index.js +116 -0
- package/workflows/container-contents/pendingWrites/index.js.map +1 -0
- package/workflows/container-contents/projectionGeneration.js.map +1 -1
- package/workflows/container-contents/projectionView.js +1 -1
- package/workflows/container-contents/projectionView.js.map +1 -1
- package/workflows/container-contents/recovery/folderRecovery.d.ts +19 -0
- package/workflows/container-contents/recovery/folderRecovery.js +32 -0
- package/workflows/container-contents/recovery/folderRecovery.js.map +1 -0
- package/workflows/container-contents/recovery/staleRootRecovery.js +111 -0
- package/workflows/container-contents/recovery/staleRootRecovery.js.map +1 -0
- package/workflows/container-contents/remoteHydration/completeHydration.js +1 -1
- package/workflows/container-contents/remoteHydration/completeHydration.js.map +1 -1
- package/workflows/container-contents/remoteHydration/destinationRootReload.js +1 -1
- package/workflows/container-contents/remoteHydration/destinationRootReload.js.map +1 -1
- package/workflows/container-contents/remoteHydration/heldContainerRebind.js +1 -1
- package/workflows/container-contents/remoteHydration/heldContainerRebind.js.map +1 -1
- package/workflows/container-contents/remoteHydration/index.d.ts +28 -0
- package/workflows/container-contents/remoteHydration/index.js +302 -0
- package/workflows/container-contents/remoteHydration/index.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js +244 -0
- package/workflows/container-contents/remoteHydration/remoteContainerPageHydration.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainerState.js +263 -0
- package/workflows/container-contents/remoteHydration/remoteContainerState.js.map +1 -0
- package/workflows/container-contents/remoteHydration/types.d.ts +1 -1
- package/workflows/container-contents/remoteHydration/verifiedDestination.js +1 -1
- package/workflows/container-contents/remoteHydration/verifiedDestination.js.map +1 -1
- package/workflows/container-contents/tombstones/documentPurge.d.ts +37 -0
- package/workflows/container-contents/tombstones/documentPurge.js +136 -0
- package/workflows/container-contents/tombstones/documentPurge.js.map +1 -0
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js +173 -0
- package/workflows/container-contents/tombstones/documentTombstoneEvidence.js.map +1 -0
- package/workflows/container-contents/tombstones/documentTombstoneGate.js +94 -0
- package/workflows/container-contents/tombstones/documentTombstoneGate.js.map +1 -0
- package/workflows/containers/child/currentShareGrantMutation.js +5 -5
- package/workflows/containers/child/currentShareGrantMutation.js.map +1 -1
- package/workflows/containers/child/currentSharePrincipalPolicy.js +5 -5
- package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js +1 -1
- package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -1
- package/workflows/containers/child/share.d.ts +1 -1
- package/workflows/containers/child/share.js +4 -4
- package/workflows/containers/child/share.js.map +1 -1
- package/workflows/containers/child/sharePrincipalPolicy.d.ts +1 -1
- package/workflows/containers/child/sharePrincipalPolicy.js +2 -2
- package/workflows/containers/child/sharePrincipalPolicy.js.map +1 -1
- package/workflows/documents/attachments/attachmentPersistence.d.ts +58 -0
- package/workflows/documents/attachments/attachmentPersistence.js.map +1 -0
- package/workflows/documents/attachments/blobMutationLock.d.ts +8 -0
- package/workflows/documents/attachments/blobMutationLock.js +35 -0
- package/workflows/documents/attachments/blobMutationLock.js.map +1 -0
- package/workflows/documents/attachments/orphanBlobReclaimState.js.map +1 -0
- package/workflows/documents/attachments/orphanBlobReclaims.d.ts +6 -0
- package/workflows/documents/attachments/orphanBlobReclaims.js +143 -0
- package/workflows/documents/attachments/orphanBlobReclaims.js.map +1 -0
- package/workflows/documents/authorAccessFailure.js.map +1 -1
- package/workflows/documents/create/createAdoption.js +100 -0
- package/workflows/documents/create/createAdoption.js.map +1 -0
- package/workflows/documents/create/createProjection.d.ts +14 -0
- package/workflows/documents/create/createProjectionFetch.d.ts +27 -0
- package/workflows/documents/create/createProjectionFetch.js.map +1 -0
- package/workflows/documents/create/createResponse.js +49 -0
- package/workflows/documents/create/createResponse.js.map +1 -0
- package/workflows/documents/create/documentCreationPersistence.js +16 -0
- package/workflows/documents/create/documentCreationPersistence.js.map +1 -0
- package/workflows/documents/create/index.d.ts +56 -0
- package/workflows/documents/create/index.js +258 -0
- package/workflows/documents/create/index.js.map +1 -0
- package/workflows/documents/documentMutationCommit.js +1 -1
- package/workflows/documents/documentMutationCommit.js.map +1 -1
- package/workflows/documents/index.d.ts +17 -17
- package/workflows/documents/index.js +14 -14
- package/workflows/documents/index.js.map +1 -1
- package/workflows/documents/linkSet/index.d.ts +20 -0
- package/workflows/documents/linkSet/index.js +290 -0
- package/workflows/documents/linkSet/index.js.map +1 -0
- package/workflows/documents/linkSet/linkSetAuthority.js +61 -0
- package/workflows/documents/linkSet/linkSetAuthority.js.map +1 -0
- package/workflows/documents/linkSet/linkSetBlobRewraps.js +143 -0
- package/workflows/documents/linkSet/linkSetBlobRewraps.js.map +1 -0
- package/workflows/documents/linkSet/linkSetProjectionSeed.js +119 -0
- package/workflows/documents/linkSet/linkSetProjectionSeed.js.map +1 -0
- package/workflows/documents/linkSet/linkSetRemote.d.ts +23 -0
- package/workflows/documents/linkSet/linkSetRemote.js +187 -0
- package/workflows/documents/linkSet/linkSetRemote.js.map +1 -0
- package/workflows/documents/purge/index.d.ts +53 -0
- package/workflows/documents/purge/index.js +204 -0
- package/workflows/documents/purge/index.js.map +1 -0
- package/workflows/documents/purge/persistedDocumentRemoval.d.ts +44 -0
- package/workflows/documents/purge/persistedDocumentRemoval.js +70 -0
- package/workflows/documents/purge/persistedDocumentRemoval.js.map +1 -0
- package/workflows/documents/purge/subtreePurgeScope.d.ts +8 -0
- package/workflows/documents/purge/subtreePurgeScope.js +18 -0
- package/workflows/documents/purge/subtreePurgeScope.js.map +1 -0
- package/workflows/documents/rotationBaseline.js +1 -1
- package/workflows/documents/rotationBaseline.js.map +1 -1
- package/workflows/documents/sync/index.d.ts +4 -0
- package/workflows/documents/sync/index.js +287 -0
- package/workflows/documents/sync/index.js.map +1 -0
- package/workflows/documents/sync/initialSync.js +65 -0
- package/workflows/documents/sync/initialSync.js.map +1 -0
- package/workflows/documents/sync/readOnlyProjectionFailure.js +30 -0
- package/workflows/documents/sync/readOnlyProjectionFailure.js.map +1 -0
- package/workflows/documents/sync/readOnlySync.d.ts +71 -0
- package/workflows/documents/sync/readOnlySync.js +269 -0
- package/workflows/documents/sync/readOnlySync.js.map +1 -0
- package/workflows/documents/sync/reportDocumentSyncQuarantine.js.map +1 -0
- package/workflows/documents/sync/syncAttemptPlanning.js +79 -0
- package/workflows/documents/sync/syncAttemptPlanning.js.map +1 -0
- package/workflows/documents/sync/syncAttemptState.d.ts +27 -0
- package/workflows/documents/sync/syncAttemptState.js.map +1 -0
- package/workflows/documents/sync/syncLane.d.ts +20 -0
- package/workflows/documents/sync/syncLane.js +94 -0
- package/workflows/documents/sync/syncLane.js.map +1 -0
- package/workflows/documents/sync/syncResponseResult.js +134 -0
- package/workflows/documents/sync/syncResponseResult.js.map +1 -0
- package/workflows/documents/sync/syncSubmittedResult.js +119 -0
- package/workflows/documents/sync/syncSubmittedResult.js.map +1 -0
- package/workflows/documents/sync/syncTrace.js +148 -0
- package/workflows/documents/syncFailures/index.js +252 -0
- package/workflows/documents/syncFailures/index.js.map +1 -0
- package/workflows/documents/syncFailures/syncAbandon.js +51 -0
- package/workflows/documents/syncFailures/syncAbandon.js.map +1 -0
- package/workflows/documents/syncFailures/syncFailureClassification.d.ts +74 -0
- package/workflows/documents/syncFailures/syncFailureClassification.js +122 -0
- package/workflows/documents/syncFailures/syncFailureClassification.js.map +1 -0
- package/workflows/documents/syncFailures/syncPolicyRepair.js +50 -0
- package/workflows/documents/syncFailures/syncPolicyRepair.js.map +1 -0
- package/workflows/documents/syncFailures/syncRepairAbandon.js.map +1 -0
- package/workflows/documents/syncFailures/syncRepairAccess.js +42 -0
- package/workflows/documents/syncFailures/syncRepairAccess.js.map +1 -0
- package/workflows/documents/syncPlan/syncContentKeys.d.ts +39 -0
- package/workflows/documents/syncPlan/syncContentKeys.js +254 -0
- package/workflows/documents/syncPlan/syncContentKeys.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanIdentity.js +203 -0
- package/workflows/documents/syncPlan/syncPlanIdentity.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanMaterial.js +306 -0
- package/workflows/documents/syncPlan/syncPlanMaterial.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanProjection.js.map +1 -0
- package/workflows/documents/syncPlan/syncPlanRequestBounds.js +54 -0
- package/workflows/documents/syncPlan/syncPlanRequestBounds.js.map +1 -0
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js +119 -0
- package/workflows/documents/syncRekeys/syncAutomaticContainerRekeys.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyPreparation.js +227 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyPreparation.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js +79 -0
- package/workflows/documents/syncRekeys/syncContainerRekeyProjection.js.map +1 -0
- package/workflows/documents/syncRekeys/syncContainerRekeys.js +72 -0
- package/workflows/documents/syncRekeys/syncContainerRekeys.js.map +1 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.d.ts +70 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.js +120 -0
- package/workflows/documents/syncRekeys/syncRecoveryRekey.js.map +1 -0
- package/workflows/documents/syncRekeys/syncRekeyCommit.js +18 -0
- package/workflows/organizations/groupMetadata/currentGroupMetadataAuthority.js +53 -0
- package/workflows/organizations/groupMetadata/currentGroupMetadataAuthority.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.d.ts +33 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js +114 -0
- package/workflows/organizations/groupMetadata/groupMetadataAccess.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataBinding.js +19 -0
- package/workflows/organizations/groupMetadata/groupMetadataBinding.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js +41 -0
- package/workflows/organizations/groupMetadata/groupMetadataContainerAuthority.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataErrors.js +40 -0
- package/workflows/organizations/groupMetadata/groupMetadataRootBinding.js +51 -0
- package/workflows/organizations/groupMetadata/groupMetadataRootBinding.js.map +1 -0
- package/workflows/organizations/groupMetadata/groupMetadataRuntime.js +47 -0
- package/workflows/organizations/groupMetadata/groupMetadataRuntime.js.map +1 -0
- package/workflows/organizations/groupMetadata/runtimeGroupMetadataAuthority.js +16 -0
- package/workflows/organizations/groupMetadata/runtimeGroupMetadataAuthority.js.map +1 -0
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js +72 -0
- package/workflows/organizations/groupNames/currentOrganizationGroupNames.js.map +1 -0
- package/workflows/organizations/groupNames/groupMembershipName.d.ts +8 -0
- package/workflows/organizations/groupNames/groupMembershipName.js +18 -0
- package/workflows/organizations/groupNames/groupMembershipName.js.map +1 -0
- package/workflows/organizations/groupNames/groupNameUniqueness.js +151 -0
- package/workflows/organizations/groupNames/groupNameUniqueness.js.map +1 -0
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js +48 -0
- package/workflows/organizations/groupNames/organizationGroupNamePolicies.js.map +1 -0
- package/workflows/organizations/groupNames/organizationGroupNames.js +13 -0
- package/workflows/organizations/groupNames/organizationGroupNames.js.map +1 -0
- package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js +139 -0
- package/workflows/organizations/groupPolicy/commitCurrentGroupPolicyMutation.js.map +1 -0
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js +79 -0
- package/workflows/organizations/groupPolicy/currentGroupPolicyMutationContext.js.map +1 -0
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js +65 -0
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js +174 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.d.ts +58 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js +166 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationContext.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.d.ts +26 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js +64 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationEvidence.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyMutationHead.js +26 -0
- package/workflows/organizations/groupPolicy/groupPolicyRequests.js +181 -0
- package/workflows/organizations/groupPolicy/groupPolicyRequests.js.map +1 -0
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js +74 -0
- package/workflows/organizations/groupPolicy/groupPolicyVerification.js.map +1 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.d.ts +22 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.js +71 -0
- package/workflows/organizations/groupPolicy/submitGroupPolicyCommit.js.map +1 -0
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js +85 -0
- package/workflows/organizations/groups/createCurrentOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js +35 -0
- package/workflows/organizations/groups/deleteCurrentOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.d.ts +19 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.js +75 -0
- package/workflows/organizations/groups/deleteOrganizationGroup.js.map +1 -0
- package/workflows/organizations/groups/groupCreation.d.ts +21 -0
- package/workflows/organizations/groups/groupCreation.js +68 -0
- package/workflows/organizations/groups/groupCreation.js.map +1 -0
- package/workflows/organizations/groups/organizationGroupDirectory.js +153 -0
- package/workflows/organizations/groups/organizationGroupDirectory.js.map +1 -0
- package/workflows/organizations/index.d.ts +13 -13
- package/workflows/organizations/index.js +12 -12
- package/workflows/organizations/index.js.map +1 -1
- package/workflows/organizations/policyHistory/groupPolicyHistoryPage.js.map +1 -0
- package/workflows/organizations/policyHistory/loadPolicyHistoryDetails.js +78 -0
- package/workflows/organizations/policyHistory/loadPolicyHistoryDetails.js.map +1 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryDetails.js +110 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryDetails.js.map +1 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js +67 -0
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryAccessDenial.js +19 -0
- package/workflows/organizations/policyHistory/policyHistoryAccessDenial.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryCache.js +42 -0
- package/workflows/organizations/policyHistory/policyHistoryCache.js.map +1 -0
- package/workflows/organizations/policyHistory/policyHistoryReadModel.d.ts +9 -0
- package/workflows/organizations/policyHistory/policyHistoryTypes.d.ts +58 -0
- package/workflows/organizations/principalMutations/acknowledgedDirectoryBindings.js +18 -0
- package/workflows/organizations/principalMutations/acknowledgedDirectoryBindings.js.map +1 -0
- package/workflows/organizations/principalMutations/currentGroupMutationReferences.js +35 -0
- package/workflows/organizations/principalMutations/currentGroupMutationReferences.js.map +1 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationAuthority.js +16 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationAuthority.js.map +1 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationRetention.js +64 -0
- package/workflows/organizations/principalMutations/currentOrganizationMutationRetention.js.map +1 -0
- package/workflows/organizations/principalMutations/currentPrincipalMutationLease.js +39 -0
- package/workflows/organizations/principalMutations/currentPrincipalMutationLease.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.d.ts +26 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.js +104 -0
- package/workflows/organizations/principalMutations/principalMutationJournalManagement.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.d.ts +26 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.js +85 -0
- package/workflows/organizations/principalMutations/principalMutationJournalSession.js.map +1 -0
- package/workflows/organizations/principalMutations/principalMutationReceipt.js +28 -0
- package/workflows/organizations/principalMutations/principalMutationReceipt.js.map +1 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.d.ts +5 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.js +36 -0
- package/workflows/organizations/principalMutations/principalOperationReceipt.js.map +1 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.d.ts +6 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.js +20 -0
- package/workflows/organizations/principalMutations/retainAcknowledgedPrincipalCurrents.js.map +1 -0
- package/workflows/organizations/principalMutations/runtimeCurrentGroupMutation.js +113 -0
- package/workflows/organizations/principalMutations/runtimeCurrentGroupMutation.js.map +1 -0
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js +48 -0
- package/workflows/organizations/principalMutations/runtimeCurrentOrganizationMutation.js.map +1 -0
- package/workflows/organizations/principalPolicy/index.d.ts +98 -0
- package/workflows/organizations/principalPolicy/index.js +256 -0
- package/workflows/organizations/principalPolicy/index.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyApi.d.ts +33 -0
- package/workflows/organizations/principalPolicy/principalPolicyApi.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js +74 -0
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyRecipients.js +43 -0
- package/workflows/organizations/principalPolicy/principalPolicyRecipients.js.map +1 -0
- package/workflows/organizations/principalPolicy/principalPolicyRequest.d.ts +68 -0
- package/workflows/organizations/principalPolicy/principalPolicyRequest.js +176 -0
- package/workflows/organizations/provisioning/createOrganization.d.ts +62 -0
- package/workflows/organizations/provisioning/createOrganization.js +128 -0
- package/workflows/organizations/provisioning/createOrganization.js.map +1 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.d.ts +36 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.js +205 -0
- package/workflows/organizations/provisioning/organizationProvisioningAttempt.js.map +1 -0
- package/workflows/organizations/provisioning/organizationReplacementVerification.js +26 -0
- package/workflows/organizations/provisioning/organizationReplacementVerification.js.map +1 -0
- package/workflows/organizations/readModel/dataUsageReadModel.d.ts +19 -0
- package/workflows/organizations/readModel/dataUsageReadModel.js +64 -0
- package/workflows/organizations/readModel/dataUsageReadModel.js.map +1 -0
- package/workflows/organizations/readModel/index.d.ts +70 -0
- package/workflows/organizations/readModel/index.js +10 -0
- package/workflows/organizations/readModel/index.js.map +1 -0
- package/workflows/organizations/readModel/listLocalOrganizations.d.ts +20 -0
- package/workflows/organizations/readModel/listLocalOrganizations.js +137 -0
- package/workflows/organizations/readModel/listLocalOrganizations.js.map +1 -0
- package/workflows/organizations/readModel/localReadModelDetails.d.ts +25 -0
- package/workflows/organizations/readModel/localReadModelDetails.js +182 -0
- package/workflows/organizations/readModel/localReadModelDetails.js.map +1 -0
- package/workflows/organizations/readModel/organizationPresentationAccessState.js +173 -0
- package/workflows/organizations/readModel/organizationPresentationAccessState.js.map +1 -0
- package/workflows/organizations/readModel/organizationPresentationFailures.js +7 -0
- package/workflows/organizations/readModel/readModelProjection.d.ts +29 -0
- package/workflows/organizations/readModel/readModelProjection.js +255 -0
- package/workflows/organizations/readModel/readModelProjection.js.map +1 -0
- package/workflows/organizations/rematerialization/authoredPrincipalPolicyWarmer.js +25 -0
- package/workflows/organizations/rematerialization/authoredPrincipalPolicyWarmer.js.map +1 -0
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js +31 -0
- package/workflows/organizations/rematerialization/precedingPrincipalRematerialization.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js +321 -0
- package/workflows/organizations/rematerialization/principalContainerRematerialization.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js +77 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationPlanning.js.map +1 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js +79 -0
- package/workflows/organizations/rematerialization/principalContainerRematerializationTargets.js.map +1 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.d.ts +33 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js +140 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalCurrents.js.map +1 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.d.ts +39 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js +87 -0
- package/workflows/principals/acknowledgements/acknowledgedPrincipalPredecessor.js.map +1 -0
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js +84 -0
- package/workflows/principals/acknowledgements/initialPrincipalCurrentPublication.js.map +1 -0
- package/workflows/principals/acknowledgements/principalAcknowledgementChecks.d.ts +30 -0
- package/workflows/principals/acknowledgements/principalCurrentPublicationSeal.js +51 -0
- package/workflows/principals/acknowledgements/principalCurrentPublicationSeal.js.map +1 -0
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js +68 -0
- package/workflows/principals/acknowledgements/reconcileAcknowledgedPrincipalCurrent.js.map +1 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.d.ts +10 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js +119 -0
- package/workflows/principals/historyRecovery/loadRecoveredPrincipalHistoryPage.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryAuthority.js +20 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryAuthority.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js +69 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryPrefix.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js +68 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryReferences.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js +61 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryStage.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.d.ts +35 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.js +16 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryTypes.js.map +1 -0
- package/workflows/principals/historyRecovery/principalHistoryRecoveryVerification.js +29 -0
- package/workflows/principals/historyRecovery/recoverCurrentOrganizationPolicy.js +38 -0
- package/workflows/principals/historyRecovery/recoverCurrentOrganizationPolicy.js.map +1 -0
- package/workflows/principals/historyRecovery/recoverPrincipalHistoryPage.js +31 -0
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js +295 -0
- package/workflows/principals/historyRecovery/recoverPrincipalPolicyHistory.js.map +1 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.d.ts +27 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.js +163 -0
- package/workflows/principals/historyRecovery/recoverScopedPrincipalPolicyHistory.js.map +1 -0
- package/workflows/principals/index.d.ts +6 -6
- package/workflows/principals/index.js +6 -6
- package/workflows/principals/index.js.map +1 -1
- package/workflows/principals/policyCache/index.d.ts +20 -0
- package/workflows/principals/policyCache/index.js +242 -0
- package/workflows/principals/policyCache/index.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js +39 -0
- package/workflows/principals/policyCache/principalPolicyCacheAdvance.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js +149 -0
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js.map +1 -0
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js +67 -0
- package/workflows/principals/policyCache/principalPolicyOrganizationScope.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryAuthority.js +60 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryAuthority.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js +88 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryPage.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js +179 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryProgress.js.map +1 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.d.ts +41 -0
- package/workflows/principals/publicHistory/publicPrincipalHistoryTypes.js.map +1 -0
- package/workflows/principals/publicHistory/publicProjectionDirectory.js +40 -0
- package/workflows/principals/publicHistory/publicProjectionDirectory.js.map +1 -0
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js +54 -0
- package/workflows/principals/publicHistory/publicProjectionPrincipal.js.map +1 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.d.ts +9 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.js +98 -0
- package/workflows/principals/publicHistory/recoverProjectionPolicyHistory.js.map +1 -0
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js +178 -0
- package/workflows/principals/publicHistory/recoverPublicPrincipalHistory.js.map +1 -0
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js +96 -0
- package/workflows/principals/publicHistory/selectPublicPrincipalHistory.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalCurrentRecoveryBatch.js +14 -0
- package/workflows/principals/recoveryOperation/principalCurrentRecoveryBatch.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.d.ts +10 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js +127 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDirectory.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryDiscoveryPage.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryLocalPreference.js +30 -0
- package/workflows/principals/recoveryOperation/principalRecoveryLocalPreference.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.d.ts +21 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.js +178 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemo.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js +33 -0
- package/workflows/principals/recoveryOperation/principalRecoveryMemoValidity.js.map +1 -0
- package/workflows/principals/recoveryOperation/principalRecoveryOutage.js +40 -0
- package/workflows/principals/recoveryOperation/principalRecoveryOutage.js.map +1 -0
- package/workflows/principals/runtimePolicyRecovery.js +3 -3
- package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
- package/workflows/principals/runtimeProjectionPolicyRecovery.js +3 -3
- package/workflows/principals/runtimeProjectionPolicyRecovery.js.map +1 -1
- package/workflows/registration/organizationProvisioningArtifacts.d.ts +1 -1
- package/workflows/registration/provisionedPrincipalHistory.js +1 -1
- package/workflows/registration/provisionedPrincipalHistory.js.map +1 -1
- package/workflows/registration/provisionedProfileDocument.js +1 -1
- package/workflows/registration/provisionedProfileDocument.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.js +2 -2
- package/workflows/registration/provisioningBootstrapBuilders.js.map +1 -1
- package/workflows/registration/registerIdentity.js +2 -2
- package/workflows/registration/registerIdentity.js.map +1 -1
- package/workflows/sync/remoteReset.js +1 -1
- package/workflows/sync/remoteReset.js.map +1 -1
- package/workflows/blobs/attachmentBindingVerification.js +0 -49
- package/workflows/blobs/attachmentBindingVerification.js.map +0 -1
- package/workflows/blobs/attachmentDecryptor.js +0 -41
- package/workflows/blobs/attachmentDecryptor.js.map +0 -1
- package/workflows/blobs/attachmentKeyAuthenticator.js +0 -68
- package/workflows/blobs/attachmentKeyAuthenticator.js.map +0 -1
- package/workflows/blobs/automaticMultipartUpload.js +0 -9
- package/workflows/blobs/automaticMultipartUpload.js.map +0 -1
- package/workflows/blobs/blobChunkDecryption.js +0 -34
- package/workflows/blobs/blobChunkDecryption.js.map +0 -1
- package/workflows/blobs/decrypt.d.ts +0 -12
- package/workflows/blobs/decrypt.js +0 -246
- package/workflows/blobs/decrypt.js.map +0 -1
- package/workflows/blobs/hydrate.d.ts +0 -56
- package/workflows/blobs/hydrate.js +0 -190
- package/workflows/blobs/hydrate.js.map +0 -1
- package/workflows/blobs/hydrationResults.js +0 -23
- package/workflows/blobs/hydrationResults.js.map +0 -1
- package/workflows/blobs/multipartFirstParts.js +0 -82
- package/workflows/blobs/multipartFirstParts.js.map +0 -1
- package/workflows/blobs/multipartStageFailures.js +0 -36
- package/workflows/blobs/multipartStageFailures.js.map +0 -1
- package/workflows/blobs/multipartStageResolution.js.map +0 -1
- package/workflows/blobs/multipartUpload.js +0 -274
- package/workflows/blobs/multipartUpload.js.map +0 -1
- package/workflows/blobs/retainedAttachmentVerification.js +0 -40
- package/workflows/blobs/retainedAttachmentVerification.js.map +0 -1
- package/workflows/blobs/upload.d.ts +0 -10
- package/workflows/blobs/upload.js +0 -243
- package/workflows/blobs/upload.js.map +0 -1
- package/workflows/blobs/verifiedWrapScope.js +0 -20
- package/workflows/blobs/verifiedWrapScope.js.map +0 -1
- package/workflows/blobs/writerProjection.js +0 -29
- package/workflows/blobs/writerProjection.js.map +0 -1
- package/workflows/container-contents/availableDocumentLinkIntent.js +0 -32
- package/workflows/container-contents/availableDocumentLinkIntent.js.map +0 -1
- package/workflows/container-contents/blobInfo.d.ts +0 -6
- package/workflows/container-contents/blobInfo.js +0 -323
- package/workflows/container-contents/blobInfo.js.map +0 -1
- package/workflows/container-contents/blobInfoTypes.d.ts +0 -48
- package/workflows/container-contents/blobInfoTypes.js.map +0 -1
- package/workflows/container-contents/containerDocumentListing.js +0 -106
- package/workflows/container-contents/containerInfo.d.ts +0 -77
- package/workflows/container-contents/containerInfo.js +0 -200
- package/workflows/container-contents/containerInfo.js.map +0 -1
- package/workflows/container-contents/deferredDocumentLinks.js +0 -9
- package/workflows/container-contents/deferredDocumentLinks.js.map +0 -1
- package/workflows/container-contents/documentAttributionRanges.d.ts +0 -26
- package/workflows/container-contents/documentCharacterBlame.js +0 -33
- package/workflows/container-contents/documentCharacterBlame.js.map +0 -1
- package/workflows/container-contents/documentDiscovery.d.ts +0 -12
- package/workflows/container-contents/documentDiscovery.js +0 -183
- package/workflows/container-contents/documentDiscovery.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryApply.js +0 -65
- package/workflows/container-contents/documentDiscoveryApply.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryCandidates.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryEvidence.js +0 -91
- package/workflows/container-contents/documentDiscoveryEvidence.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryInputs.js +0 -85
- package/workflows/container-contents/documentDiscoveryInputs.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryLanes.js.map +0 -1
- package/workflows/container-contents/documentDiscoveryTypes.d.ts +0 -160
- package/workflows/container-contents/documentDiscoveryTypes.js.map +0 -1
- package/workflows/container-contents/documentFieldBlame.js +0 -26
- package/workflows/container-contents/documentFieldBlame.js.map +0 -1
- package/workflows/container-contents/documentHydrationProbe.js +0 -146
- package/workflows/container-contents/documentHydrationProbe.js.map +0 -1
- package/workflows/container-contents/documentInfo.d.ts +0 -18
- package/workflows/container-contents/documentInfo.js +0 -306
- package/workflows/container-contents/documentInfo.js.map +0 -1
- package/workflows/container-contents/documentInfoTypes.d.ts +0 -92
- package/workflows/container-contents/documentInfoTypes.js.map +0 -1
- package/workflows/container-contents/documentLinkIntent.js +0 -82
- package/workflows/container-contents/documentLinkIntent.js.map +0 -1
- package/workflows/container-contents/documentLinks.d.ts +0 -64
- package/workflows/container-contents/documentLinks.js +0 -264
- package/workflows/container-contents/documentLinks.js.map +0 -1
- package/workflows/container-contents/documentLocalRelink.js.map +0 -1
- package/workflows/container-contents/documentMoveDeniedReplay.js.map +0 -1
- package/workflows/container-contents/documentMoveFailure.js +0 -35
- package/workflows/container-contents/documentMoveFailure.js.map +0 -1
- package/workflows/container-contents/documentMoveIntent.js +0 -77
- package/workflows/container-contents/documentMoveIntent.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentErrors.js +0 -17
- package/workflows/container-contents/documentMoveIntentErrors.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentSettlement.js +0 -25
- package/workflows/container-contents/documentMoveIntentSettlement.js.map +0 -1
- package/workflows/container-contents/documentMoveIntentSync.js +0 -346
- package/workflows/container-contents/documentMoveIntentSync.js.map +0 -1
- package/workflows/container-contents/documentMoveVanishedRefresh.js +0 -100
- package/workflows/container-contents/documentMoveVanishedRefresh.js.map +0 -1
- package/workflows/container-contents/documentPriming.js +0 -245
- package/workflows/container-contents/documentPriming.js.map +0 -1
- package/workflows/container-contents/documentPurge.d.ts +0 -37
- package/workflows/container-contents/documentPurge.js +0 -136
- package/workflows/container-contents/documentPurge.js.map +0 -1
- package/workflows/container-contents/documentQueries.d.ts +0 -62
- package/workflows/container-contents/documentQueries.js +0 -212
- package/workflows/container-contents/documentQueries.js.map +0 -1
- package/workflows/container-contents/documentRuntimeTargetSync.js.map +0 -1
- package/workflows/container-contents/documentStructure.d.ts +0 -53
- package/workflows/container-contents/documentStructure.js +0 -183
- package/workflows/container-contents/documentStructure.js.map +0 -1
- package/workflows/container-contents/documentStructureTypes.d.ts +0 -32
- package/workflows/container-contents/documentStructureTypes.js.map +0 -1
- package/workflows/container-contents/documentSubtreeQueries.js +0 -169
- package/workflows/container-contents/documentSubtreeQueries.js.map +0 -1
- package/workflows/container-contents/documentTombstoneEvidence.js +0 -173
- package/workflows/container-contents/documentTombstoneEvidence.js.map +0 -1
- package/workflows/container-contents/documentTombstoneGate.js +0 -94
- package/workflows/container-contents/documentTombstoneGate.js.map +0 -1
- package/workflows/container-contents/folderRecovery.d.ts +0 -19
- package/workflows/container-contents/folderRecovery.js +0 -32
- package/workflows/container-contents/folderRecovery.js.map +0 -1
- package/workflows/container-contents/metadata.d.ts +0 -25
- package/workflows/container-contents/metadata.js +0 -217
- package/workflows/container-contents/metadata.js.map +0 -1
- package/workflows/container-contents/metadataEvents.d.ts +0 -7
- package/workflows/container-contents/metadataEvents.js +0 -47
- package/workflows/container-contents/metadataEvents.js.map +0 -1
- package/workflows/container-contents/metadataIncomingUpdateIsolation.js +0 -40
- package/workflows/container-contents/metadataIncomingUpdateIsolation.js.map +0 -1
- package/workflows/container-contents/metadataMutationPreparation.d.ts +0 -75
- package/workflows/container-contents/metadataMutationPreparation.js +0 -177
- package/workflows/container-contents/metadataMutationPreparation.js.map +0 -1
- package/workflows/container-contents/metadataPersistence.d.ts +0 -34
- package/workflows/container-contents/metadataPersistence.js +0 -254
- package/workflows/container-contents/metadataPersistence.js.map +0 -1
- package/workflows/container-contents/metadataPullContinuationInvalidation.js +0 -65
- package/workflows/container-contents/metadataPullContinuationInvalidation.js.map +0 -1
- package/workflows/container-contents/metadataReadState.d.ts +0 -2
- package/workflows/container-contents/metadataReadState.js.map +0 -1
- package/workflows/container-contents/metadataRecord.js +0 -43
- package/workflows/container-contents/metadataRecord.js.map +0 -1
- package/workflows/container-contents/metadataRemoteSync.d.ts +0 -38
- package/workflows/container-contents/metadataRemoteSync.js +0 -91
- package/workflows/container-contents/metadataRemoteSync.js.map +0 -1
- package/workflows/container-contents/metadataStateInstallation.d.ts +0 -3
- package/workflows/container-contents/metadataStateInstallation.js.map +0 -1
- package/workflows/container-contents/metadataStateIsolation.js +0 -80
- package/workflows/container-contents/metadataStateIsolation.js.map +0 -1
- package/workflows/container-contents/metadataSyncErrors.js +0 -41
- package/workflows/container-contents/metadataSyncErrors.js.map +0 -1
- package/workflows/container-contents/metadataSyncSettlement.d.ts +0 -13
- package/workflows/container-contents/metadataSyncSettlement.js +0 -27
- package/workflows/container-contents/metadataSyncSettlement.js.map +0 -1
- package/workflows/container-contents/metadataTypes.d.ts +0 -54
- package/workflows/container-contents/metadataTypes.js.map +0 -1
- package/workflows/container-contents/orphanedDocumentSql.js +0 -39
- package/workflows/container-contents/orphanedDocumentSql.js.map +0 -1
- package/workflows/container-contents/pendingDownloads.d.ts +0 -12
- package/workflows/container-contents/pendingDownloads.js +0 -42
- package/workflows/container-contents/pendingDownloads.js.map +0 -1
- package/workflows/container-contents/pendingWrites.d.ts +0 -26
- package/workflows/container-contents/pendingWrites.js +0 -116
- package/workflows/container-contents/pendingWrites.js.map +0 -1
- package/workflows/container-contents/remoteContainerPageHydration.js +0 -244
- package/workflows/container-contents/remoteContainerPageHydration.js.map +0 -1
- package/workflows/container-contents/remoteContainerState.js +0 -263
- package/workflows/container-contents/remoteContainerState.js.map +0 -1
- package/workflows/container-contents/remoteHydration.d.ts +0 -28
- package/workflows/container-contents/remoteHydration.js +0 -302
- package/workflows/container-contents/remoteHydration.js.map +0 -1
- package/workflows/container-contents/staleRootRecovery.js +0 -111
- package/workflows/container-contents/staleRootRecovery.js.map +0 -1
- package/workflows/documents/attachmentPersistence.d.ts +0 -58
- package/workflows/documents/attachmentPersistence.js.map +0 -1
- package/workflows/documents/blobMutationLock.d.ts +0 -8
- package/workflows/documents/blobMutationLock.js +0 -35
- package/workflows/documents/blobMutationLock.js.map +0 -1
- package/workflows/documents/create.d.ts +0 -56
- package/workflows/documents/create.js +0 -258
- package/workflows/documents/create.js.map +0 -1
- package/workflows/documents/createAdoption.js +0 -100
- package/workflows/documents/createAdoption.js.map +0 -1
- package/workflows/documents/createProjection.d.ts +0 -14
- package/workflows/documents/createProjectionFetch.d.ts +0 -27
- package/workflows/documents/createProjectionFetch.js.map +0 -1
- package/workflows/documents/createResponse.js +0 -49
- package/workflows/documents/createResponse.js.map +0 -1
- package/workflows/documents/documentCreationPersistence.js +0 -16
- package/workflows/documents/documentCreationPersistence.js.map +0 -1
- package/workflows/documents/initialSync.js +0 -65
- package/workflows/documents/initialSync.js.map +0 -1
- package/workflows/documents/linkSet.d.ts +0 -20
- package/workflows/documents/linkSet.js +0 -290
- package/workflows/documents/linkSet.js.map +0 -1
- package/workflows/documents/linkSetAuthority.js +0 -61
- package/workflows/documents/linkSetAuthority.js.map +0 -1
- package/workflows/documents/linkSetBlobRewraps.js +0 -143
- package/workflows/documents/linkSetBlobRewraps.js.map +0 -1
- package/workflows/documents/linkSetProjectionSeed.js +0 -119
- package/workflows/documents/linkSetProjectionSeed.js.map +0 -1
- package/workflows/documents/linkSetRemote.d.ts +0 -23
- package/workflows/documents/linkSetRemote.js +0 -187
- package/workflows/documents/linkSetRemote.js.map +0 -1
- package/workflows/documents/orphanBlobReclaimState.js.map +0 -1
- package/workflows/documents/orphanBlobReclaims.d.ts +0 -6
- package/workflows/documents/orphanBlobReclaims.js +0 -143
- package/workflows/documents/orphanBlobReclaims.js.map +0 -1
- package/workflows/documents/persistedDocumentRemoval.d.ts +0 -44
- package/workflows/documents/persistedDocumentRemoval.js +0 -70
- package/workflows/documents/persistedDocumentRemoval.js.map +0 -1
- package/workflows/documents/purge.d.ts +0 -53
- package/workflows/documents/purge.js +0 -204
- package/workflows/documents/purge.js.map +0 -1
- package/workflows/documents/readOnlyProjectionFailure.js +0 -30
- package/workflows/documents/readOnlyProjectionFailure.js.map +0 -1
- package/workflows/documents/readOnlySync.d.ts +0 -71
- package/workflows/documents/readOnlySync.js +0 -269
- package/workflows/documents/readOnlySync.js.map +0 -1
- package/workflows/documents/reportDocumentSyncQuarantine.js.map +0 -1
- package/workflows/documents/subtreePurgeScope.d.ts +0 -8
- package/workflows/documents/subtreePurgeScope.js +0 -18
- package/workflows/documents/subtreePurgeScope.js.map +0 -1
- package/workflows/documents/sync.d.ts +0 -4
- package/workflows/documents/sync.js +0 -287
- package/workflows/documents/sync.js.map +0 -1
- package/workflows/documents/syncAbandon.js +0 -51
- package/workflows/documents/syncAbandon.js.map +0 -1
- package/workflows/documents/syncAttemptPlanning.js +0 -79
- package/workflows/documents/syncAttemptPlanning.js.map +0 -1
- package/workflows/documents/syncAttemptState.d.ts +0 -27
- package/workflows/documents/syncAttemptState.js.map +0 -1
- package/workflows/documents/syncAutomaticContainerRekeys.js +0 -119
- package/workflows/documents/syncAutomaticContainerRekeys.js.map +0 -1
- package/workflows/documents/syncContainerRekeyPreparation.js +0 -227
- package/workflows/documents/syncContainerRekeyPreparation.js.map +0 -1
- package/workflows/documents/syncContainerRekeyProjection.js +0 -79
- package/workflows/documents/syncContainerRekeyProjection.js.map +0 -1
- package/workflows/documents/syncContainerRekeys.js +0 -72
- package/workflows/documents/syncContainerRekeys.js.map +0 -1
- package/workflows/documents/syncContentKeys.d.ts +0 -39
- package/workflows/documents/syncContentKeys.js +0 -254
- package/workflows/documents/syncContentKeys.js.map +0 -1
- package/workflows/documents/syncFailureClassification.d.ts +0 -74
- package/workflows/documents/syncFailureClassification.js +0 -122
- package/workflows/documents/syncFailureClassification.js.map +0 -1
- package/workflows/documents/syncFailures.js +0 -252
- package/workflows/documents/syncFailures.js.map +0 -1
- package/workflows/documents/syncLane.d.ts +0 -20
- package/workflows/documents/syncLane.js +0 -94
- package/workflows/documents/syncLane.js.map +0 -1
- package/workflows/documents/syncPlanIdentity.js +0 -203
- package/workflows/documents/syncPlanIdentity.js.map +0 -1
- package/workflows/documents/syncPlanMaterial.js +0 -306
- package/workflows/documents/syncPlanMaterial.js.map +0 -1
- package/workflows/documents/syncPlanProjection.js.map +0 -1
- package/workflows/documents/syncPlanRequestBounds.js +0 -54
- package/workflows/documents/syncPlanRequestBounds.js.map +0 -1
- package/workflows/documents/syncPolicyRepair.js +0 -50
- package/workflows/documents/syncPolicyRepair.js.map +0 -1
- package/workflows/documents/syncRecoveryRekey.d.ts +0 -70
- package/workflows/documents/syncRecoveryRekey.js +0 -120
- package/workflows/documents/syncRecoveryRekey.js.map +0 -1
- package/workflows/documents/syncRekeyCommit.js +0 -18
- package/workflows/documents/syncRepairAbandon.js.map +0 -1
- package/workflows/documents/syncRepairAccess.js +0 -42
- package/workflows/documents/syncRepairAccess.js.map +0 -1
- package/workflows/documents/syncResponseResult.js +0 -134
- package/workflows/documents/syncResponseResult.js.map +0 -1
- package/workflows/documents/syncSubmittedResult.js +0 -119
- package/workflows/documents/syncSubmittedResult.js.map +0 -1
- package/workflows/documents/syncTrace.js +0 -148
- package/workflows/organizations/acknowledgedDirectoryBindings.js +0 -18
- package/workflows/organizations/acknowledgedDirectoryBindings.js.map +0 -1
- package/workflows/organizations/authoredPrincipalPolicyWarmer.js +0 -25
- package/workflows/organizations/authoredPrincipalPolicyWarmer.js.map +0 -1
- package/workflows/organizations/commitCurrentGroupPolicyMutation.js +0 -139
- package/workflows/organizations/commitCurrentGroupPolicyMutation.js.map +0 -1
- package/workflows/organizations/createCurrentOrganizationGroup.js +0 -85
- package/workflows/organizations/createCurrentOrganizationGroup.js.map +0 -1
- package/workflows/organizations/createOrganization.d.ts +0 -62
- package/workflows/organizations/createOrganization.js +0 -128
- package/workflows/organizations/createOrganization.js.map +0 -1
- package/workflows/organizations/currentGroupMetadataAuthority.js +0 -53
- package/workflows/organizations/currentGroupMetadataAuthority.js.map +0 -1
- package/workflows/organizations/currentGroupMutationReferences.js +0 -35
- package/workflows/organizations/currentGroupMutationReferences.js.map +0 -1
- package/workflows/organizations/currentGroupPolicyMutationContext.js +0 -79
- package/workflows/organizations/currentGroupPolicyMutationContext.js.map +0 -1
- package/workflows/organizations/currentOrganizationGroupNames.js +0 -72
- package/workflows/organizations/currentOrganizationGroupNames.js.map +0 -1
- package/workflows/organizations/currentOrganizationMutationAuthority.js +0 -16
- package/workflows/organizations/currentOrganizationMutationAuthority.js.map +0 -1
- package/workflows/organizations/currentOrganizationMutationRetention.js +0 -64
- package/workflows/organizations/currentOrganizationMutationRetention.js.map +0 -1
- package/workflows/organizations/currentPolicyMutationAcknowledgement.js +0 -65
- package/workflows/organizations/currentPolicyMutationAcknowledgement.js.map +0 -1
- package/workflows/organizations/currentPrincipalMutationLease.js +0 -39
- package/workflows/organizations/currentPrincipalMutationLease.js.map +0 -1
- package/workflows/organizations/dataUsageReadModel.d.ts +0 -19
- package/workflows/organizations/dataUsageReadModel.js +0 -64
- package/workflows/organizations/dataUsageReadModel.js.map +0 -1
- package/workflows/organizations/deleteCurrentOrganizationGroup.js +0 -35
- package/workflows/organizations/deleteCurrentOrganizationGroup.js.map +0 -1
- package/workflows/organizations/deleteOrganizationGroup.d.ts +0 -19
- package/workflows/organizations/deleteOrganizationGroup.js +0 -75
- package/workflows/organizations/deleteOrganizationGroup.js.map +0 -1
- package/workflows/organizations/groupCreation.d.ts +0 -21
- package/workflows/organizations/groupCreation.js +0 -68
- package/workflows/organizations/groupCreation.js.map +0 -1
- package/workflows/organizations/groupMembershipName.d.ts +0 -8
- package/workflows/organizations/groupMembershipName.js +0 -18
- package/workflows/organizations/groupMembershipName.js.map +0 -1
- package/workflows/organizations/groupMetadataAccess.d.ts +0 -33
- package/workflows/organizations/groupMetadataAccess.js +0 -114
- package/workflows/organizations/groupMetadataAccess.js.map +0 -1
- package/workflows/organizations/groupMetadataBinding.js +0 -19
- package/workflows/organizations/groupMetadataBinding.js.map +0 -1
- package/workflows/organizations/groupMetadataContainerAuthority.js +0 -41
- package/workflows/organizations/groupMetadataContainerAuthority.js.map +0 -1
- package/workflows/organizations/groupMetadataErrors.js +0 -40
- package/workflows/organizations/groupMetadataRootBinding.js +0 -51
- package/workflows/organizations/groupMetadataRootBinding.js.map +0 -1
- package/workflows/organizations/groupMetadataRuntime.js +0 -47
- package/workflows/organizations/groupMetadataRuntime.js.map +0 -1
- package/workflows/organizations/groupNameUniqueness.js +0 -151
- package/workflows/organizations/groupNameUniqueness.js.map +0 -1
- package/workflows/organizations/groupPolicyHistoryPage.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationAcknowledgement.js +0 -174
- package/workflows/organizations/groupPolicyMutationAcknowledgement.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationContext.d.ts +0 -58
- package/workflows/organizations/groupPolicyMutationContext.js +0 -166
- package/workflows/organizations/groupPolicyMutationContext.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationEvidence.d.ts +0 -26
- package/workflows/organizations/groupPolicyMutationEvidence.js +0 -64
- package/workflows/organizations/groupPolicyMutationEvidence.js.map +0 -1
- package/workflows/organizations/groupPolicyMutationHead.js +0 -26
- package/workflows/organizations/groupPolicyRequests.js +0 -181
- package/workflows/organizations/groupPolicyRequests.js.map +0 -1
- package/workflows/organizations/groupPolicyVerification.js +0 -74
- package/workflows/organizations/groupPolicyVerification.js.map +0 -1
- package/workflows/organizations/listLocalOrganizations.d.ts +0 -20
- package/workflows/organizations/listLocalOrganizations.js +0 -137
- package/workflows/organizations/listLocalOrganizations.js.map +0 -1
- package/workflows/organizations/loadPolicyHistoryDetails.js +0 -78
- package/workflows/organizations/loadPolicyHistoryDetails.js.map +0 -1
- package/workflows/organizations/localReadModelDetails.d.ts +0 -25
- package/workflows/organizations/localReadModelDetails.js +0 -182
- package/workflows/organizations/localReadModelDetails.js.map +0 -1
- package/workflows/organizations/organizationGroupDirectory.js +0 -153
- package/workflows/organizations/organizationGroupDirectory.js.map +0 -1
- package/workflows/organizations/organizationGroupNamePolicies.js +0 -48
- package/workflows/organizations/organizationGroupNamePolicies.js.map +0 -1
- package/workflows/organizations/organizationGroupNames.js +0 -13
- package/workflows/organizations/organizationGroupNames.js.map +0 -1
- package/workflows/organizations/organizationPolicyHistoryDetails.js +0 -110
- package/workflows/organizations/organizationPolicyHistoryDetails.js.map +0 -1
- package/workflows/organizations/organizationPolicyHistoryVerification.js +0 -67
- package/workflows/organizations/organizationPolicyHistoryVerification.js.map +0 -1
- package/workflows/organizations/organizationPresentationAccessState.js +0 -173
- package/workflows/organizations/organizationPresentationAccessState.js.map +0 -1
- package/workflows/organizations/organizationPresentationFailures.js +0 -7
- package/workflows/organizations/organizationProvisioningAttempt.d.ts +0 -36
- package/workflows/organizations/organizationProvisioningAttempt.js +0 -205
- package/workflows/organizations/organizationProvisioningAttempt.js.map +0 -1
- package/workflows/organizations/organizationReplacementVerification.js +0 -26
- package/workflows/organizations/organizationReplacementVerification.js.map +0 -1
- package/workflows/organizations/policyHistoryAccessDenial.js +0 -19
- package/workflows/organizations/policyHistoryAccessDenial.js.map +0 -1
- package/workflows/organizations/policyHistoryCache.js +0 -42
- package/workflows/organizations/policyHistoryCache.js.map +0 -1
- package/workflows/organizations/policyHistoryReadModel.d.ts +0 -9
- package/workflows/organizations/policyHistoryTypes.d.ts +0 -58
- package/workflows/organizations/precedingPrincipalRematerialization.js +0 -31
- package/workflows/organizations/precedingPrincipalRematerialization.js.map +0 -1
- package/workflows/organizations/principalContainerRematerialization.js +0 -321
- package/workflows/organizations/principalContainerRematerialization.js.map +0 -1
- package/workflows/organizations/principalContainerRematerializationPlanning.js +0 -77
- package/workflows/organizations/principalContainerRematerializationPlanning.js.map +0 -1
- package/workflows/organizations/principalContainerRematerializationTargets.js +0 -79
- package/workflows/organizations/principalContainerRematerializationTargets.js.map +0 -1
- package/workflows/organizations/principalMutationJournalManagement.d.ts +0 -26
- package/workflows/organizations/principalMutationJournalManagement.js +0 -104
- package/workflows/organizations/principalMutationJournalManagement.js.map +0 -1
- package/workflows/organizations/principalMutationJournalSession.d.ts +0 -26
- package/workflows/organizations/principalMutationJournalSession.js +0 -85
- package/workflows/organizations/principalMutationJournalSession.js.map +0 -1
- package/workflows/organizations/principalMutationReceipt.js +0 -28
- package/workflows/organizations/principalMutationReceipt.js.map +0 -1
- package/workflows/organizations/principalOperationReceipt.d.ts +0 -5
- package/workflows/organizations/principalOperationReceipt.js +0 -36
- package/workflows/organizations/principalOperationReceipt.js.map +0 -1
- package/workflows/organizations/principalPolicy.d.ts +0 -98
- package/workflows/organizations/principalPolicy.js +0 -256
- package/workflows/organizations/principalPolicy.js.map +0 -1
- package/workflows/organizations/principalPolicyApi.d.ts +0 -33
- package/workflows/organizations/principalPolicyApi.js.map +0 -1
- package/workflows/organizations/principalPolicyReceiptArtifacts.js +0 -74
- package/workflows/organizations/principalPolicyReceiptArtifacts.js.map +0 -1
- package/workflows/organizations/principalPolicyRecipients.js +0 -43
- package/workflows/organizations/principalPolicyRecipients.js.map +0 -1
- package/workflows/organizations/principalPolicyRequest.d.ts +0 -68
- package/workflows/organizations/principalPolicyRequest.js +0 -176
- package/workflows/organizations/readModel.d.ts +0 -70
- package/workflows/organizations/readModel.js +0 -10
- package/workflows/organizations/readModel.js.map +0 -1
- package/workflows/organizations/readModelProjection.d.ts +0 -29
- package/workflows/organizations/readModelProjection.js +0 -255
- package/workflows/organizations/readModelProjection.js.map +0 -1
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.d.ts +0 -6
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +0 -20
- package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +0 -1
- package/workflows/organizations/runtimeCurrentGroupMutation.js +0 -113
- package/workflows/organizations/runtimeCurrentGroupMutation.js.map +0 -1
- package/workflows/organizations/runtimeCurrentOrganizationMutation.js +0 -48
- package/workflows/organizations/runtimeCurrentOrganizationMutation.js.map +0 -1
- package/workflows/organizations/runtimeGroupMetadataAuthority.js +0 -16
- package/workflows/organizations/runtimeGroupMetadataAuthority.js.map +0 -1
- package/workflows/organizations/submitGroupPolicyCommit.d.ts +0 -22
- package/workflows/organizations/submitGroupPolicyCommit.js +0 -71
- package/workflows/organizations/submitGroupPolicyCommit.js.map +0 -1
- package/workflows/principals/acknowledgedPrincipalCurrents.d.ts +0 -33
- package/workflows/principals/acknowledgedPrincipalCurrents.js +0 -140
- package/workflows/principals/acknowledgedPrincipalCurrents.js.map +0 -1
- package/workflows/principals/acknowledgedPrincipalPredecessor.d.ts +0 -39
- package/workflows/principals/acknowledgedPrincipalPredecessor.js +0 -87
- package/workflows/principals/acknowledgedPrincipalPredecessor.js.map +0 -1
- package/workflows/principals/initialPrincipalCurrentPublication.js +0 -84
- package/workflows/principals/initialPrincipalCurrentPublication.js.map +0 -1
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -10
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +0 -119
- package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +0 -1
- package/workflows/principals/policyCache.d.ts +0 -20
- package/workflows/principals/policyCache.js +0 -242
- package/workflows/principals/policyCache.js.map +0 -1
- package/workflows/principals/principalAcknowledgementChecks.d.ts +0 -30
- package/workflows/principals/principalCurrentPublicationSeal.js +0 -51
- package/workflows/principals/principalCurrentPublicationSeal.js.map +0 -1
- package/workflows/principals/principalCurrentRecoveryBatch.js +0 -14
- package/workflows/principals/principalCurrentRecoveryBatch.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryAuthority.js +0 -20
- package/workflows/principals/principalHistoryRecoveryAuthority.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryPrefix.js +0 -69
- package/workflows/principals/principalHistoryRecoveryPrefix.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryReferences.js +0 -68
- package/workflows/principals/principalHistoryRecoveryReferences.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryStage.js +0 -61
- package/workflows/principals/principalHistoryRecoveryStage.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryTypes.d.ts +0 -35
- package/workflows/principals/principalHistoryRecoveryTypes.js +0 -16
- package/workflows/principals/principalHistoryRecoveryTypes.js.map +0 -1
- package/workflows/principals/principalHistoryRecoveryVerification.js +0 -29
- package/workflows/principals/principalPolicyCacheAdvance.js +0 -39
- package/workflows/principals/principalPolicyCacheAdvance.js.map +0 -1
- package/workflows/principals/principalPolicyCacheValidation.js +0 -149
- package/workflows/principals/principalPolicyCacheValidation.js.map +0 -1
- package/workflows/principals/principalPolicyOrganizationScope.js +0 -67
- package/workflows/principals/principalPolicyOrganizationScope.js.map +0 -1
- package/workflows/principals/principalRecoveryDirectory.d.ts +0 -10
- package/workflows/principals/principalRecoveryDirectory.js +0 -127
- package/workflows/principals/principalRecoveryDirectory.js.map +0 -1
- package/workflows/principals/principalRecoveryDiscoveryPage.js.map +0 -1
- package/workflows/principals/principalRecoveryLocalPreference.js +0 -30
- package/workflows/principals/principalRecoveryLocalPreference.js.map +0 -1
- package/workflows/principals/principalRecoveryMemo.d.ts +0 -21
- package/workflows/principals/principalRecoveryMemo.js +0 -178
- package/workflows/principals/principalRecoveryMemo.js.map +0 -1
- package/workflows/principals/principalRecoveryMemoValidity.js +0 -33
- package/workflows/principals/principalRecoveryMemoValidity.js.map +0 -1
- package/workflows/principals/principalRecoveryOutage.js +0 -40
- package/workflows/principals/principalRecoveryOutage.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryAuthority.js +0 -60
- package/workflows/principals/publicPrincipalHistoryAuthority.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryPage.js +0 -88
- package/workflows/principals/publicPrincipalHistoryPage.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryProgress.js +0 -179
- package/workflows/principals/publicPrincipalHistoryProgress.js.map +0 -1
- package/workflows/principals/publicPrincipalHistoryTypes.d.ts +0 -41
- package/workflows/principals/publicPrincipalHistoryTypes.js.map +0 -1
- package/workflows/principals/publicProjectionDirectory.js +0 -40
- package/workflows/principals/publicProjectionDirectory.js.map +0 -1
- package/workflows/principals/publicProjectionPrincipal.js +0 -54
- package/workflows/principals/publicProjectionPrincipal.js.map +0 -1
- package/workflows/principals/reconcileAcknowledgedPrincipalCurrent.js +0 -68
- package/workflows/principals/reconcileAcknowledgedPrincipalCurrent.js.map +0 -1
- package/workflows/principals/recoverCurrentOrganizationPolicy.js +0 -38
- package/workflows/principals/recoverCurrentOrganizationPolicy.js.map +0 -1
- package/workflows/principals/recoverPrincipalHistoryPage.js +0 -31
- package/workflows/principals/recoverPrincipalPolicyHistory.js +0 -295
- package/workflows/principals/recoverPrincipalPolicyHistory.js.map +0 -1
- package/workflows/principals/recoverProjectionPolicyHistory.d.ts +0 -9
- package/workflows/principals/recoverProjectionPolicyHistory.js +0 -98
- package/workflows/principals/recoverProjectionPolicyHistory.js.map +0 -1
- package/workflows/principals/recoverPublicPrincipalHistory.js +0 -178
- package/workflows/principals/recoverPublicPrincipalHistory.js.map +0 -1
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.d.ts +0 -27
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.js +0 -163
- package/workflows/principals/recoverScopedPrincipalPolicyHistory.js.map +0 -1
- package/workflows/principals/selectPublicPrincipalHistory.js +0 -96
- package/workflows/principals/selectPublicPrincipalHistory.js.map +0 -1
- /package/workflows/blobs/{readAttachmentTransfer.js → hydration/readAttachmentTransfer.js} +0 -0
- /package/workflows/blobs/{readAttachmentTransfer.js.map → hydration/readAttachmentTransfer.js.map} +0 -0
- /package/workflows/blobs/{multipartStageResolution.js → upload/multipartStageResolution.js} +0 -0
- /package/workflows/container-contents/{documentAttributionRanges.js → attribution/documentAttributionRanges.js} +0 -0
- /package/workflows/container-contents/{documentAttributionRanges.js.map → attribution/documentAttributionRanges.js.map} +0 -0
- /package/workflows/container-contents/{containerDocumentListing.js.map → documentDiscovery/containerDocumentListing.js.map} +0 -0
- /package/workflows/container-contents/{documentDiscoveryCandidates.js → documentDiscovery/documentDiscoveryCandidates.js} +0 -0
- /package/workflows/container-contents/{documentDiscoveryLanes.js → documentDiscovery/documentDiscoveryLanes.js} +0 -0
- /package/workflows/container-contents/{documentDiscoveryTypes.js → documentDiscovery/documentDiscoveryTypes.js} +0 -0
- /package/workflows/container-contents/{documentHeadScope.js → documentDiscovery/documentHeadScope.js} +0 -0
- /package/workflows/container-contents/{documentHeadScope.js.map → documentDiscovery/documentHeadScope.js.map} +0 -0
- /package/workflows/container-contents/{documentLocalRelink.js → documentLinks/documentLocalRelink.js} +0 -0
- /package/workflows/container-contents/{documentMoveDeniedReplay.js → documentMove/documentMoveDeniedReplay.js} +0 -0
- /package/workflows/container-contents/{documentMoveUnlinkIds.js → documentMove/documentMoveUnlinkIds.js} +0 -0
- /package/workflows/container-contents/{documentMoveUnlinkIds.js.map → documentMove/documentMoveUnlinkIds.js.map} +0 -0
- /package/workflows/container-contents/{documentRuntimeTargetSync.js → documentPriming/documentRuntimeTargetSync.js} +0 -0
- /package/workflows/container-contents/{documentStructureTypes.js → documentQueries/documentStructureTypes.js} +0 -0
- /package/workflows/container-contents/{blobInfoRows.js → info/blobInfoRows.js} +0 -0
- /package/workflows/container-contents/{blobInfoRows.js.map → info/blobInfoRows.js.map} +0 -0
- /package/workflows/container-contents/{blobInfoTypes.js → info/blobInfoTypes.js} +0 -0
- /package/workflows/container-contents/{documentInfoTypes.js → info/documentInfoTypes.js} +0 -0
- /package/workflows/container-contents/{metadataReadState.js → metadata/metadataReadState.js} +0 -0
- /package/workflows/container-contents/{metadataStateInstallation.js → metadata/metadataStateInstallation.js} +0 -0
- /package/workflows/container-contents/{metadataSyncFollowup.js → metadata/metadataSyncFollowup.js} +0 -0
- /package/workflows/container-contents/{metadataSyncFollowup.js.map → metadata/metadataSyncFollowup.js.map} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.d.ts → metadata/metadataSyncRegistrations.d.ts} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.js → metadata/metadataSyncRegistrations.js} +0 -0
- /package/workflows/container-contents/{metadataSyncRegistrations.js.map → metadata/metadataSyncRegistrations.js.map} +0 -0
- /package/workflows/container-contents/{metadataTypes.js → metadata/metadataTypes.js} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.d.ts → pendingWrites/pendingWritesTypes.d.ts} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.js → pendingWrites/pendingWritesTypes.js} +0 -0
- /package/workflows/container-contents/{pendingWritesTypes.js.map → pendingWrites/pendingWritesTypes.js.map} +0 -0
- /package/workflows/container-contents/{remoteHydrationLog.js → remoteHydration/remoteHydrationLog.js} +0 -0
- /package/workflows/container-contents/{remoteHydrationLog.js.map → remoteHydration/remoteHydrationLog.js.map} +0 -0
- /package/workflows/documents/{attachmentPersistence.js → attachments/attachmentPersistence.js} +0 -0
- /package/workflows/documents/{orphanBlobReclaimState.js → attachments/orphanBlobReclaimState.js} +0 -0
- /package/workflows/documents/{createProjection.js → create/createProjection.js} +0 -0
- /package/workflows/documents/{createProjection.js.map → create/createProjection.js.map} +0 -0
- /package/workflows/documents/{createProjectionFetch.js → create/createProjectionFetch.js} +0 -0
- /package/workflows/documents/{reportDocumentSyncQuarantine.js → sync/reportDocumentSyncQuarantine.js} +0 -0
- /package/workflows/documents/{syncAttemptState.js → sync/syncAttemptState.js} +0 -0
- /package/workflows/documents/{syncTrace.d.ts → sync/syncTrace.d.ts} +0 -0
- /package/workflows/documents/{syncTrace.js.map → sync/syncTrace.js.map} +0 -0
- /package/workflows/documents/{syncFailureClearance.d.ts → syncFailures/syncFailureClearance.d.ts} +0 -0
- /package/workflows/documents/{syncFailureClearance.js → syncFailures/syncFailureClearance.js} +0 -0
- /package/workflows/documents/{syncFailureClearance.js.map → syncFailures/syncFailureClearance.js.map} +0 -0
- /package/workflows/documents/{syncRepairAbandon.js → syncFailures/syncRepairAbandon.js} +0 -0
- /package/workflows/documents/{syncPlanProjection.js → syncPlan/syncPlanProjection.js} +0 -0
- /package/workflows/documents/{syncRekeyCommit.js.map → syncRekeys/syncRekeyCommit.js.map} +0 -0
- /package/workflows/organizations/{groupMetadataErrors.js.map → groupMetadata/groupMetadataErrors.js.map} +0 -0
- /package/workflows/organizations/{groupMutationAuthorization.js → groupPolicy/groupMutationAuthorization.js} +0 -0
- /package/workflows/organizations/{groupMutationAuthorization.js.map → groupPolicy/groupMutationAuthorization.js.map} +0 -0
- /package/workflows/organizations/{groupPolicyMutationHead.js.map → groupPolicy/groupPolicyMutationHead.js.map} +0 -0
- /package/workflows/organizations/{groupPolicyHistoryPage.js → policyHistory/groupPolicyHistoryPage.js} +0 -0
- /package/workflows/organizations/{policyHistoryReadModel.js → policyHistory/policyHistoryReadModel.js} +0 -0
- /package/workflows/organizations/{policyHistoryReadModel.js.map → policyHistory/policyHistoryReadModel.js.map} +0 -0
- /package/workflows/organizations/{policyHistoryTypes.js → policyHistory/policyHistoryTypes.js} +0 -0
- /package/workflows/organizations/{policyHistoryTypes.js.map → policyHistory/policyHistoryTypes.js.map} +0 -0
- /package/workflows/organizations/{principalPolicyApi.js → principalPolicy/principalPolicyApi.js} +0 -0
- /package/workflows/organizations/{principalPolicyRequest.js.map → principalPolicy/principalPolicyRequest.js.map} +0 -0
- /package/workflows/organizations/{organizationPresentationFailures.js.map → readModel/organizationPresentationFailures.js.map} +0 -0
- /package/workflows/principals/{principalAcknowledgementChecks.js → acknowledgements/principalAcknowledgementChecks.js} +0 -0
- /package/workflows/principals/{principalAcknowledgementChecks.js.map → acknowledgements/principalAcknowledgementChecks.js.map} +0 -0
- /package/workflows/principals/{principalHistoryRecoveryVerification.js.map → historyRecovery/principalHistoryRecoveryVerification.js.map} +0 -0
- /package/workflows/principals/{recoverPrincipalHistoryPage.js.map → historyRecovery/recoverPrincipalHistoryPage.js.map} +0 -0
- /package/workflows/principals/{recoverPrincipalPolicyHistory.d.ts → historyRecovery/recoverPrincipalPolicyHistory.d.ts} +0 -0
- /package/workflows/principals/{principalPolicyCacheScope.js → policyCache/principalPolicyCacheScope.js} +0 -0
- /package/workflows/principals/{principalPolicyCacheScope.js.map → policyCache/principalPolicyCacheScope.js.map} +0 -0
- /package/workflows/principals/{publicPrincipalHistoryTypes.js → publicHistory/publicPrincipalHistoryTypes.js} +0 -0
- /package/workflows/principals/{principalRecoveryDiscoveryPage.js → recoveryOperation/principalRecoveryDiscoveryPage.js} +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { eq } from "drizzle-orm";
|
|
2
|
+
import { getTargetContainerContext, readContainerState, } from "../../../data/containers/shared/projection.js";
|
|
3
|
+
import { ensureContainerTables } from "../../../data/persistence/containers/containerPersistence.js";
|
|
4
|
+
import { containerContentsSyncLane, containerParentSyncLane, containerSyncWatermarkLaneKey, sqlContainerSyncWatermarkPersistence, } from "../../../data/persistence/containers/containerSyncWatermarkPersistence.js";
|
|
5
|
+
import { containers } from "../../../data/sqlite/schema.js";
|
|
6
|
+
import { getClientSQLitePersistenceRuntime } from "../../../data/sqlite/sqlitePersistenceRuntime.js";
|
|
7
|
+
function sortContainerInfoGrants(grants) {
|
|
8
|
+
return [...grants].sort((left, right) => `${left.subjectType}:${left.subjectId}`.localeCompare(`${right.subjectType}:${right.subjectId}`));
|
|
9
|
+
}
|
|
10
|
+
function toContainerInfoGrant(grant) {
|
|
11
|
+
return {
|
|
12
|
+
accessLevel: grant.accessLevel,
|
|
13
|
+
subjectId: grant.subjectId,
|
|
14
|
+
subjectType: grant.subjectType,
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
function getContainerInfoGrantRows(projection) {
|
|
18
|
+
const rows = projection.path.flatMap((bundle) => {
|
|
19
|
+
const state = readContainerState(bundle);
|
|
20
|
+
return state.directGrants.map((grant) => ({
|
|
21
|
+
...toContainerInfoGrant(grant),
|
|
22
|
+
inherited: state.containerId !== projection.containerId,
|
|
23
|
+
sourceContainerId: state.containerId,
|
|
24
|
+
}));
|
|
25
|
+
});
|
|
26
|
+
return sortContainerInfoGrants(rows);
|
|
27
|
+
}
|
|
28
|
+
function getContainerInfoPathEntries(projection) {
|
|
29
|
+
return projection.path.map((bundle, index) => {
|
|
30
|
+
const state = readContainerState(bundle);
|
|
31
|
+
const kek = projection.containerKeks[index];
|
|
32
|
+
if (!kek) {
|
|
33
|
+
throw new Error("Container projection path and KEKs are inconsistent");
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
containerId: state.containerId,
|
|
37
|
+
containerKeyEpoch: kek.containerKeyEpoch,
|
|
38
|
+
containerKeyEpochId: kek.containerKeyEpochId,
|
|
39
|
+
directGrantCount: state.directGrants.length,
|
|
40
|
+
eventHash: state.eventHash,
|
|
41
|
+
keyEpochHash: kek.keyEpochHash,
|
|
42
|
+
keyTargetHash: kek.keyTargetHash,
|
|
43
|
+
manifestHash: bundle.manifestHash,
|
|
44
|
+
manifestHistoryCount: kek.containerManifestHistory.length,
|
|
45
|
+
parentContainerId: state.parentContainerId,
|
|
46
|
+
parentManifestHash: state.parentManifestHash,
|
|
47
|
+
recipientTargetCount: kek.recipientTargets.length,
|
|
48
|
+
referencedPrincipalCount: state.referencedPrincipalHeads.length,
|
|
49
|
+
wrapCount: kek.wraps.length,
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
function getContainerInfoSecurityDetails(projection) {
|
|
54
|
+
const path = getContainerInfoPathEntries(projection);
|
|
55
|
+
const targetPathEntry = path.at(-1);
|
|
56
|
+
const targetKek = projection.containerKeks.at(-1);
|
|
57
|
+
if (!targetPathEntry || !targetKek) {
|
|
58
|
+
throw new Error("Container projection is empty");
|
|
59
|
+
}
|
|
60
|
+
return {
|
|
61
|
+
currentContainerKeyEpoch: targetPathEntry.containerKeyEpoch,
|
|
62
|
+
currentContainerKeyEpochId: targetPathEntry.containerKeyEpochId,
|
|
63
|
+
currentManifestHash: targetPathEntry.manifestHash,
|
|
64
|
+
currentManifestHistoryCount: targetPathEntry.manifestHistoryCount,
|
|
65
|
+
currentParentContainerKeyEpochId: targetKek.parentContainerKeyEpochId,
|
|
66
|
+
currentReferencedPrincipalCount: targetPathEntry.referencedPrincipalCount,
|
|
67
|
+
path,
|
|
68
|
+
pathLength: path.length,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
function getContainerSyncCursorDefinitions(input) {
|
|
72
|
+
return [
|
|
73
|
+
{
|
|
74
|
+
label: "Parent Listing",
|
|
75
|
+
lane: containerParentSyncLane(input.parentId),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
label: "Child Containers",
|
|
79
|
+
lane: containerParentSyncLane(input.containerId),
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
label: "Documents",
|
|
83
|
+
lane: containerContentsSyncLane(input.containerId),
|
|
84
|
+
},
|
|
85
|
+
];
|
|
86
|
+
}
|
|
87
|
+
async function loadContainerSyncCursors(input) {
|
|
88
|
+
const cursorDefinitions = getContainerSyncCursorDefinitions(input);
|
|
89
|
+
let records = [];
|
|
90
|
+
if (input.execSql) {
|
|
91
|
+
await sqlContainerSyncWatermarkPersistence.ensureSchema(input.execSql);
|
|
92
|
+
records = await sqlContainerSyncWatermarkPersistence.loadWatermarkRecords(input.execSql, cursorDefinitions.map(({ lane }) => lane));
|
|
93
|
+
}
|
|
94
|
+
return cursorDefinitions.map((definition, index) => {
|
|
95
|
+
const { laneId, laneKind } = containerSyncWatermarkLaneKey(definition.lane);
|
|
96
|
+
const record = records[index] ?? null;
|
|
97
|
+
return {
|
|
98
|
+
label: definition.label,
|
|
99
|
+
laneId,
|
|
100
|
+
laneKind,
|
|
101
|
+
savedAt: record?.updatedAt ?? null,
|
|
102
|
+
watermarkId: record?.watermark.id ?? null,
|
|
103
|
+
watermarkUpdatedAt: record?.watermark.updatedAt ?? null,
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
async function loadLocalContainerInfoRecord(input) {
|
|
108
|
+
const fallback = {
|
|
109
|
+
hasSyncedContainer: false,
|
|
110
|
+
localCreatedAt: null,
|
|
111
|
+
localUpdatedAt: null,
|
|
112
|
+
organizationId: null,
|
|
113
|
+
parentId: input.parentId,
|
|
114
|
+
};
|
|
115
|
+
if (!input.execSql) {
|
|
116
|
+
return fallback;
|
|
117
|
+
}
|
|
118
|
+
await ensureContainerTables(input.execSql);
|
|
119
|
+
const { db } = getClientSQLitePersistenceRuntime(input.execSql);
|
|
120
|
+
const rows = await db
|
|
121
|
+
.select({
|
|
122
|
+
localCreatedAt: containers.localCreatedAt,
|
|
123
|
+
localUpdatedAt: containers.localUpdatedAt,
|
|
124
|
+
metadataDocumentId: containers.metadataDocumentId,
|
|
125
|
+
organizationId: containers.organizationId,
|
|
126
|
+
parentId: containers.parentId,
|
|
127
|
+
})
|
|
128
|
+
.from(containers)
|
|
129
|
+
.where(eq(containers.id, input.containerId))
|
|
130
|
+
.limit(1);
|
|
131
|
+
const row = rows[0];
|
|
132
|
+
if (!row) {
|
|
133
|
+
return fallback;
|
|
134
|
+
}
|
|
135
|
+
return {
|
|
136
|
+
hasSyncedContainer: typeof row.metadataDocumentId === "string" &&
|
|
137
|
+
row.metadataDocumentId.length > 0,
|
|
138
|
+
localCreatedAt: row.localCreatedAt,
|
|
139
|
+
localUpdatedAt: row.localUpdatedAt,
|
|
140
|
+
organizationId: row.organizationId,
|
|
141
|
+
parentId: row.parentId,
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function shouldLoadRemoteContainerInfo(input) {
|
|
145
|
+
switch (input.remoteInfoMode) {
|
|
146
|
+
case "always":
|
|
147
|
+
return true;
|
|
148
|
+
case "if-synced":
|
|
149
|
+
return input.localContainerInfo.hasSyncedContainer;
|
|
150
|
+
case "never":
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
export async function loadContainerInfo(input) {
|
|
155
|
+
const localContainerInfo = await loadLocalContainerInfoRecord({
|
|
156
|
+
containerId: input.containerId,
|
|
157
|
+
execSql: input.execSql ?? null,
|
|
158
|
+
parentId: input.parentId ?? null,
|
|
159
|
+
});
|
|
160
|
+
const local = {
|
|
161
|
+
createdAt: localContainerInfo.localCreatedAt,
|
|
162
|
+
updatedAt: localContainerInfo.localUpdatedAt,
|
|
163
|
+
};
|
|
164
|
+
if (!shouldLoadRemoteContainerInfo({
|
|
165
|
+
localContainerInfo,
|
|
166
|
+
remoteInfoMode: input.remoteInfoMode ?? "always",
|
|
167
|
+
})) {
|
|
168
|
+
return {
|
|
169
|
+
local,
|
|
170
|
+
remoteInfo: null,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
const [projection, groups, syncCursors] = await Promise.all([
|
|
174
|
+
input.containerProjection
|
|
175
|
+
? Promise.resolve(input.containerProjection)
|
|
176
|
+
: input.apiClient.getContainerWriterProjection(input.containerId),
|
|
177
|
+
input.loadOrganizationGroups(),
|
|
178
|
+
loadContainerSyncCursors({
|
|
179
|
+
containerId: input.containerId,
|
|
180
|
+
execSql: input.execSql ?? null,
|
|
181
|
+
parentId: localContainerInfo.parentId,
|
|
182
|
+
}),
|
|
183
|
+
]);
|
|
184
|
+
if (!projection) {
|
|
185
|
+
throw new Error("Container info could not be loaded.");
|
|
186
|
+
}
|
|
187
|
+
const target = getTargetContainerContext(projection);
|
|
188
|
+
const state = readContainerState(target.manifest);
|
|
189
|
+
return {
|
|
190
|
+
local,
|
|
191
|
+
remoteInfo: {
|
|
192
|
+
grantRows: getContainerInfoGrantRows(projection),
|
|
193
|
+
grants: sortContainerInfoGrants(state.directGrants.map(toContainerInfoGrant)),
|
|
194
|
+
groups: [...groups],
|
|
195
|
+
security: getContainerInfoSecurityDetails(projection),
|
|
196
|
+
syncCursors,
|
|
197
|
+
},
|
|
198
|
+
};
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=containerInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"containerInfo.js","sourceRoot":"","sources":["containerInfo.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EACL,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,2DAA2D,CAAC;AAClG,OAAO,EAEL,yBAAyB,EACzB,uBAAuB,EACvB,6BAA6B,EAC7B,oCAAoC,GACrC,MAAM,wEAAwE,CAAC;AAChF,OAAO,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AACzD,OAAO,EAAE,iCAAiC,EAAE,MAAM,+CAA+C,CAAC;AAwFlG,SAAS,uBAAuB,CAC9B,MAAoB;IAEpB,OAAO,CAAC,GAAG,MAAM,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CACtC,GAAG,IAAI,CAAC,WAAW,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC,aAAa,CACnD,GAAG,KAAK,CAAC,WAAW,IAAI,KAAK,CAAC,SAAS,EAAE,CAC1C,CACF,CAAC;AACJ,CAAC;AAED,SAAS,oBAAoB,CAAC,KAAyB;IACrD,OAAO;QACL,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,WAAW,EAAE,KAAK,CAAC,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,CAAC;IAED,MAAM,MAAM,GAAG,yBAAyB,CAAC,UAAU,CAAC,CAAC;IACrD,MAAM,KAAK,GAAG,kBAAkB,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAElD,OAAO;QACL,KAAK;QACL,UAAU,EAAE;YACV,SAAS,EAAE,yBAAyB,CAAC,UAAU,CAAC;YAChD,MAAM,EAAE,uBAAuB,CAC7B,KAAK,CAAC,YAAY,CAAC,GAAG,CAAC,oBAAoB,CAAC,CAC7C;YACD,MAAM,EAAE,CAAC,GAAG,MAAM,CAAC;YACnB,QAAQ,EAAE,+BAA+B,CAAC,UAAU,CAAC;YACrD,WAAW;SACZ;KACF,CAAC;AACJ,CAAC","sourcesContent":["import type {\n ContainerAccessLevel,\n ContainerGrantSubjectType,\n} from \"@tearleads/crypto\";\nimport type { ContainerWriterProjectionResponse } from \"@tearleads/validators/response\";\nimport { eq } from \"drizzle-orm\";\nimport {\n getTargetContainerContext,\n readContainerState,\n} from \"../../../data/containers/shared/projection\";\nimport { ensureContainerTables } from \"../../../data/persistence/containers/containerPersistence\";\nimport {\n type ContainerSyncWatermarkLane,\n containerContentsSyncLane,\n containerParentSyncLane,\n containerSyncWatermarkLaneKey,\n sqlContainerSyncWatermarkPersistence,\n} from \"../../../data/persistence/containers/containerSyncWatermarkPersistence\";\nimport { containers } from \"../../../data/sqlite/schema\";\nimport { getClientSQLitePersistenceRuntime } from \"../../../data/sqlite/sqlitePersistenceRuntime\";\nimport type { ExecSql } from \"../../../data/sqlite/sqlSchema\";\nimport type { OrganizationGroupSummary } from \"../../organizations/readModel\";\n\nexport type ContainerShareAccessLevel = ContainerAccessLevel;\n\nexport interface ContainerInfoGrant {\n accessLevel: ContainerAccessLevel;\n subjectId: string;\n subjectType: ContainerGrantSubjectType;\n}\n\nexport interface ContainerInfoGrantRow extends ContainerInfoGrant {\n inherited: boolean;\n sourceContainerId: string;\n}\n\nexport interface ContainerInfoSyncCursor {\n label: string;\n laneId: string;\n laneKind: string;\n savedAt: string | null;\n watermarkId: string | null;\n watermarkUpdatedAt: string | null;\n}\n\nexport interface ContainerInfoPathEntry {\n containerId: string;\n containerKeyEpoch: number;\n containerKeyEpochId: string;\n directGrantCount: number;\n eventHash: string;\n keyEpochHash: string;\n keyTargetHash: string;\n manifestHash: string;\n manifestHistoryCount: number;\n parentContainerId: string | null;\n parentManifestHash: string | null;\n recipientTargetCount: number;\n referencedPrincipalCount: number;\n wrapCount: number;\n}\n\nexport interface ContainerInfoSecurityDetails {\n currentContainerKeyEpoch: number;\n currentContainerKeyEpochId: string;\n currentManifestHash: string;\n currentManifestHistoryCount: number;\n currentParentContainerKeyEpochId: string | null;\n currentReferencedPrincipalCount: number;\n path: ContainerInfoPathEntry[];\n pathLength: number;\n}\n\nexport interface ContainerInfoRemoteDetails {\n grantRows: ContainerInfoGrantRow[];\n grants: ContainerInfoGrant[];\n groups: OrganizationGroupSummary[];\n security?: ContainerInfoSecurityDetails;\n syncCursors: ContainerInfoSyncCursor[];\n}\n\nexport interface ContainerInfoLocalDetails {\n createdAt: string | null;\n updatedAt: string | null;\n}\n\nexport interface ContainerInfo {\n local: ContainerInfoLocalDetails;\n remoteInfo: ContainerInfoRemoteDetails | null;\n}\n\ninterface ContainerInfoApi {\n getContainerWriterProjection: (\n containerId: string,\n ) => Promise<ContainerWriterProjectionResponse | null>;\n}\n\nexport type ContainerInfoRemoteMode = \"always\" | \"if-synced\" | \"never\";\n\ninterface LocalContainerInfoRecord {\n hasSyncedContainer: boolean;\n localCreatedAt: string | null;\n localUpdatedAt: string | null;\n organizationId: string | null;\n parentId: string | null;\n}\n\nfunction sortContainerInfoGrants<T extends ContainerInfoGrant>(\n grants: readonly T[],\n): T[] {\n return [...grants].sort((left, right) =>\n `${left.subjectType}:${left.subjectId}`.localeCompare(\n `${right.subjectType}:${right.subjectId}`,\n ),\n );\n}\n\nfunction toContainerInfoGrant(grant: ContainerInfoGrant): ContainerInfoGrant {\n return {\n accessLevel: grant.accessLevel,\n subjectId: grant.subjectId,\n subjectType: grant.subjectType,\n };\n}\n\nfunction getContainerInfoGrantRows(\n projection: ContainerWriterProjectionResponse,\n): ContainerInfoGrantRow[] {\n const rows = projection.path.flatMap((bundle) => {\n const state = readContainerState(bundle);\n\n return state.directGrants.map((grant) => ({\n ...toContainerInfoGrant(grant),\n inherited: state.containerId !== projection.containerId,\n sourceContainerId: state.containerId,\n }));\n });\n\n return sortContainerInfoGrants(rows);\n}\n\nfunction getContainerInfoPathEntries(\n projection: ContainerWriterProjectionResponse,\n): ContainerInfoPathEntry[] {\n return projection.path.map((bundle, index) => {\n const state = readContainerState(bundle);\n const kek = projection.containerKeks[index];\n if (!kek) {\n throw new Error(\"Container projection path and KEKs are inconsistent\");\n }\n\n return {\n containerId: state.containerId,\n containerKeyEpoch: kek.containerKeyEpoch,\n containerKeyEpochId: kek.containerKeyEpochId,\n directGrantCount: state.directGrants.length,\n eventHash: state.eventHash,\n keyEpochHash: kek.keyEpochHash,\n keyTargetHash: kek.keyTargetHash,\n manifestHash: bundle.manifestHash,\n manifestHistoryCount: kek.containerManifestHistory.length,\n parentContainerId: state.parentContainerId,\n parentManifestHash: state.parentManifestHash,\n recipientTargetCount: kek.recipientTargets.length,\n referencedPrincipalCount: state.referencedPrincipalHeads.length,\n wrapCount: kek.wraps.length,\n };\n });\n}\n\nfunction getContainerInfoSecurityDetails(\n projection: ContainerWriterProjectionResponse,\n): ContainerInfoSecurityDetails {\n const path = getContainerInfoPathEntries(projection);\n const targetPathEntry = path.at(-1);\n const targetKek = projection.containerKeks.at(-1);\n if (!targetPathEntry || !targetKek) {\n throw new Error(\"Container projection is empty\");\n }\n\n return {\n currentContainerKeyEpoch: targetPathEntry.containerKeyEpoch,\n currentContainerKeyEpochId: targetPathEntry.containerKeyEpochId,\n currentManifestHash: targetPathEntry.manifestHash,\n currentManifestHistoryCount: targetPathEntry.manifestHistoryCount,\n currentParentContainerKeyEpochId: targetKek.parentContainerKeyEpochId,\n currentReferencedPrincipalCount: targetPathEntry.referencedPrincipalCount,\n path,\n pathLength: path.length,\n };\n}\n\ninterface ContainerInfoSyncCursorDefinition {\n label: string;\n lane: ContainerSyncWatermarkLane;\n}\n\nfunction getContainerSyncCursorDefinitions(input: {\n containerId: string;\n parentId: string | null;\n}): ContainerInfoSyncCursorDefinition[] {\n return [\n {\n label: \"Parent Listing\",\n lane: containerParentSyncLane(input.parentId),\n },\n {\n label: \"Child Containers\",\n lane: containerParentSyncLane(input.containerId),\n },\n {\n label: \"Documents\",\n lane: containerContentsSyncLane(input.containerId),\n },\n ];\n}\n\nasync function loadContainerSyncCursors(input: {\n containerId: string;\n execSql: ExecSql | null;\n parentId: string | null;\n}): Promise<ContainerInfoSyncCursor[]> {\n const cursorDefinitions = getContainerSyncCursorDefinitions(input);\n let records: Awaited<\n ReturnType<typeof sqlContainerSyncWatermarkPersistence.loadWatermarkRecords>\n > = [];\n if (input.execSql) {\n await sqlContainerSyncWatermarkPersistence.ensureSchema(input.execSql);\n records = await sqlContainerSyncWatermarkPersistence.loadWatermarkRecords(\n input.execSql,\n cursorDefinitions.map(({ lane }) => lane),\n );\n }\n\n return cursorDefinitions.map((definition, index) => {\n const { laneId, laneKind } = containerSyncWatermarkLaneKey(definition.lane);\n const record = records[index] ?? null;\n\n return {\n label: definition.label,\n laneId,\n laneKind,\n savedAt: record?.updatedAt ?? null,\n watermarkId: record?.watermark.id ?? null,\n watermarkUpdatedAt: record?.watermark.updatedAt ?? null,\n };\n });\n}\n\nasync function loadLocalContainerInfoRecord(input: {\n containerId: string;\n execSql: ExecSql | null;\n parentId: string | null;\n}): Promise<LocalContainerInfoRecord> {\n const fallback: LocalContainerInfoRecord = {\n hasSyncedContainer: false,\n localCreatedAt: null,\n localUpdatedAt: null,\n organizationId: null,\n parentId: input.parentId,\n };\n\n if (!input.execSql) {\n return fallback;\n }\n\n await ensureContainerTables(input.execSql);\n\n const { db } = getClientSQLitePersistenceRuntime(input.execSql);\n const rows = await db\n .select({\n localCreatedAt: containers.localCreatedAt,\n localUpdatedAt: containers.localUpdatedAt,\n metadataDocumentId: containers.metadataDocumentId,\n organizationId: containers.organizationId,\n parentId: containers.parentId,\n })\n .from(containers)\n .where(eq(containers.id, input.containerId))\n .limit(1);\n const row = rows[0];\n\n if (!row) {\n return fallback;\n }\n\n return {\n hasSyncedContainer:\n typeof row.metadataDocumentId === \"string\" &&\n row.metadataDocumentId.length > 0,\n localCreatedAt: row.localCreatedAt,\n localUpdatedAt: row.localUpdatedAt,\n organizationId: row.organizationId,\n parentId: row.parentId,\n };\n}\n\nfunction shouldLoadRemoteContainerInfo(input: {\n localContainerInfo: LocalContainerInfoRecord;\n remoteInfoMode: ContainerInfoRemoteMode;\n}): boolean {\n switch (input.remoteInfoMode) {\n case \"always\":\n return true;\n case \"if-synced\":\n return input.localContainerInfo.hasSyncedContainer;\n case \"never\":\n return false;\n }\n}\n\nexport async function loadContainerInfo(input: {\n apiClient: ContainerInfoApi;\n containerId: string;\n containerProjection?: ContainerWriterProjectionResponse | null | undefined;\n execSql?: ExecSql | null;\n loadOrganizationGroups: () => Promise<\n ReadonlyArray<OrganizationGroupSummary>\n >;\n parentId?: string | null;\n remoteInfoMode?: ContainerInfoRemoteMode | undefined;\n}): Promise<ContainerInfo> {\n const localContainerInfo = await loadLocalContainerInfoRecord({\n containerId: input.containerId,\n execSql: input.execSql ?? null,\n parentId: input.parentId ?? null,\n });\n const local = {\n createdAt: localContainerInfo.localCreatedAt,\n updatedAt: localContainerInfo.localUpdatedAt,\n };\n\n if (\n !shouldLoadRemoteContainerInfo({\n localContainerInfo,\n remoteInfoMode: input.remoteInfoMode ?? \"always\",\n })\n ) {\n return {\n local,\n remoteInfo: null,\n };\n }\n\n const [projection, groups, syncCursors] = await Promise.all([\n input.containerProjection\n ? Promise.resolve(input.containerProjection)\n : input.apiClient.getContainerWriterProjection(input.containerId),\n input.loadOrganizationGroups(),\n loadContainerSyncCursors({\n containerId: input.containerId,\n execSql: input.execSql ?? null,\n parentId: localContainerInfo.parentId,\n }),\n ]);\n\n if (!projection) {\n throw new Error(\"Container info could not be loaded.\");\n }\n\n const target = getTargetContainerContext(projection);\n const state = readContainerState(target.manifest);\n\n return {\n local,\n remoteInfo: {\n grantRows: getContainerInfoGrantRows(projection),\n grants: sortContainerInfoGrants(\n state.directGrants.map(toContainerInfoGrant),\n ),\n groups: [...groups],\n security: getContainerInfoSecurityDetails(projection),\n syncCursors,\n },\n };\n}\n"]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { DocumentEditAttributionResponse, DocumentWriterProjectionResponse, ListDocumentAttachmentsResponse } from "../../../internal/validators/response/index.js";
|
|
2
|
+
import type { SecurityIncidentReporter } from "../../../data/shared/securityIncidents.js";
|
|
3
|
+
import type { ExecSql } from "../../../data/sqlite/sqlSchema.js";
|
|
4
|
+
import type { DocumentInfo, DocumentInfoRemoteMode } from "./documentInfoTypes.js";
|
|
5
|
+
export type { DocumentInfo, DocumentInfoAttachment, DocumentInfoAuthorizingContainerPath, DocumentInfoLocalDetails, DocumentInfoRemoteAttachmentBinding, DocumentInfoRemoteDetails, DocumentInfoRemoteMode, } from "./documentInfoTypes.js";
|
|
6
|
+
interface DocumentInfoApi {
|
|
7
|
+
getDocumentEditAttribution: (documentId: string, requestKey?: string) => Promise<DocumentEditAttributionResponse | null>;
|
|
8
|
+
getDocumentWriterProjection: (documentId: string) => Promise<DocumentWriterProjectionResponse | null>;
|
|
9
|
+
listDocumentAttachments: (documentId: string) => Promise<ListDocumentAttachmentsResponse | null>;
|
|
10
|
+
}
|
|
11
|
+
export declare function loadDocumentInfo(input: {
|
|
12
|
+
apiClient: DocumentInfoApi;
|
|
13
|
+
attributionRequestKey?: string | undefined;
|
|
14
|
+
execSql?: ExecSql | null;
|
|
15
|
+
localId: string;
|
|
16
|
+
reportSecurityIncident: SecurityIncidentReporter;
|
|
17
|
+
remoteInfoMode?: DocumentInfoRemoteMode | undefined;
|
|
18
|
+
}): Promise<DocumentInfo>;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
import { bytesToBase64 } from "../../../internal/encoding/index.js";
|
|
2
|
+
import { exportFullHistorySnapshot } from "../../../internal/loro/index.js";
|
|
3
|
+
import { and, eq, isNull } from "drizzle-orm";
|
|
4
|
+
import { DEFAULT_DOCUMENT_KIND } from "../../../data/documents/documentConstants.js";
|
|
5
|
+
import { summarizeDocumentContributors, } from "../../../data/documents/editAttribution.js";
|
|
6
|
+
import { reportAndRethrowKeyingVerificationError } from "../../../data/keyingProjectionVerification/error.js";
|
|
7
|
+
import { sqlDocumentsPersistence } from "../../../data/persistence/documents/documentsPersistence.js";
|
|
8
|
+
import { documentAttachmentBlobProjection, documentPendingAttachments, documentProjection, } from "../../../data/sqlite/schema.js";
|
|
9
|
+
import { getClientSQLitePersistenceRuntime } from "../../../data/sqlite/sqlitePersistenceRuntime.js";
|
|
10
|
+
import { loadPersistedDocumentContent } from "../../documents/historyContent.js";
|
|
11
|
+
import { computeDocumentBlame } from "../attribution/documentCharacterBlame.js";
|
|
12
|
+
import { computeFieldBlame } from "../attribution/documentFieldBlame.js";
|
|
13
|
+
function readRecordString(value, key) {
|
|
14
|
+
if (!value || typeof value !== "object") {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
const nextValue = Reflect.get(value, key);
|
|
18
|
+
return typeof nextValue === "string" && nextValue.length > 0
|
|
19
|
+
? nextValue
|
|
20
|
+
: null;
|
|
21
|
+
}
|
|
22
|
+
function readRecordNumber(value, key) {
|
|
23
|
+
if (!value || typeof value !== "object") {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
const nextValue = Reflect.get(value, key);
|
|
27
|
+
return typeof nextValue === "number" && Number.isFinite(nextValue)
|
|
28
|
+
? nextValue
|
|
29
|
+
: null;
|
|
30
|
+
}
|
|
31
|
+
function readRecordArrayLength(value, key) {
|
|
32
|
+
if (!value || typeof value !== "object") {
|
|
33
|
+
return null;
|
|
34
|
+
}
|
|
35
|
+
const nextValue = Reflect.get(value, key);
|
|
36
|
+
return Array.isArray(nextValue) ? nextValue.length : null;
|
|
37
|
+
}
|
|
38
|
+
function readStoredManifestHash(value) {
|
|
39
|
+
if (!value) {
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
try {
|
|
43
|
+
const parsed = JSON.parse(value);
|
|
44
|
+
return readRecordString(parsed, "manifestHash");
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function mapPendingAttachmentRow(row) {
|
|
51
|
+
return {
|
|
52
|
+
attachmentKind: "pending",
|
|
53
|
+
blobId: null,
|
|
54
|
+
byteLength: row.byteLength,
|
|
55
|
+
createdAt: row.createdAt,
|
|
56
|
+
localId: row.localId,
|
|
57
|
+
mimeType: row.mimeType,
|
|
58
|
+
name: row.name,
|
|
59
|
+
slotId: row.slotId,
|
|
60
|
+
storageKey: row.storageKey,
|
|
61
|
+
updatedAt: null,
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
function mapLocalAttachmentRow(row) {
|
|
65
|
+
return {
|
|
66
|
+
attachmentKind: "local",
|
|
67
|
+
blobId: row.blobId,
|
|
68
|
+
byteLength: row.byteLength,
|
|
69
|
+
createdAt: null,
|
|
70
|
+
localId: row.localId,
|
|
71
|
+
mimeType: row.mimeType,
|
|
72
|
+
name: null,
|
|
73
|
+
slotId: row.slotId,
|
|
74
|
+
storageKey: row.storageKey,
|
|
75
|
+
updatedAt: row.updatedAt,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
async function loadDocumentInfoAttachments(input) {
|
|
79
|
+
const { db } = getClientSQLitePersistenceRuntime(input.execSql);
|
|
80
|
+
const [pendingRows, localRows] = await Promise.all([
|
|
81
|
+
db
|
|
82
|
+
.select({
|
|
83
|
+
byteLength: documentPendingAttachments.byteLength,
|
|
84
|
+
createdAt: documentPendingAttachments.createdAt,
|
|
85
|
+
localId: documentPendingAttachments.localId,
|
|
86
|
+
mimeType: documentPendingAttachments.mimeType,
|
|
87
|
+
name: documentPendingAttachments.name,
|
|
88
|
+
slotId: documentPendingAttachments.slotId,
|
|
89
|
+
storageKey: documentPendingAttachments.storageKey,
|
|
90
|
+
})
|
|
91
|
+
.from(documentPendingAttachments)
|
|
92
|
+
.where(eq(documentPendingAttachments.localId, input.localId))
|
|
93
|
+
.orderBy(documentPendingAttachments.createdAt, documentPendingAttachments.slotId),
|
|
94
|
+
db
|
|
95
|
+
.select({
|
|
96
|
+
blobId: documentAttachmentBlobProjection.blobId,
|
|
97
|
+
byteLength: documentAttachmentBlobProjection.byteLength,
|
|
98
|
+
localId: documentAttachmentBlobProjection.localId,
|
|
99
|
+
mimeType: documentAttachmentBlobProjection.mimeType,
|
|
100
|
+
slotId: documentAttachmentBlobProjection.slotId,
|
|
101
|
+
storageKey: documentAttachmentBlobProjection.storageKey,
|
|
102
|
+
updatedAt: documentAttachmentBlobProjection.updatedAt,
|
|
103
|
+
})
|
|
104
|
+
.from(documentAttachmentBlobProjection)
|
|
105
|
+
.where(and(eq(documentAttachmentBlobProjection.localId, input.localId),
|
|
106
|
+
// Unlinked slots keep their row as a pending-detach marker; the
|
|
107
|
+
// document no longer has the attachment, so do not report it.
|
|
108
|
+
isNull(documentAttachmentBlobProjection.detachedAt)))
|
|
109
|
+
.orderBy(documentAttachmentBlobProjection.updatedAt, documentAttachmentBlobProjection.slotId),
|
|
110
|
+
]);
|
|
111
|
+
return [
|
|
112
|
+
...pendingRows.map(mapPendingAttachmentRow),
|
|
113
|
+
...localRows.map(mapLocalAttachmentRow),
|
|
114
|
+
];
|
|
115
|
+
}
|
|
116
|
+
async function loadLocalDocumentInfo(input) {
|
|
117
|
+
const fallback = {
|
|
118
|
+
attachments: [],
|
|
119
|
+
contentSnapshot: null,
|
|
120
|
+
local: {
|
|
121
|
+
accessEpoch: null,
|
|
122
|
+
accessStateHash: null,
|
|
123
|
+
containerId: null,
|
|
124
|
+
documentId: null,
|
|
125
|
+
documentKind: null,
|
|
126
|
+
hasContentKeyBundle: false,
|
|
127
|
+
hasDocumentKekTargets: false,
|
|
128
|
+
hasDocumentManifestBundle: false,
|
|
129
|
+
lastCommitLsn: null,
|
|
130
|
+
localDocumentManifestHash: null,
|
|
131
|
+
localId: input.localId,
|
|
132
|
+
pendingAttachmentByteLength: 0,
|
|
133
|
+
pendingAttachmentCount: 0,
|
|
134
|
+
pendingUpdateCount: 0,
|
|
135
|
+
title: null,
|
|
136
|
+
updatedAt: null,
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
if (!input.execSql) {
|
|
140
|
+
return fallback;
|
|
141
|
+
}
|
|
142
|
+
await sqlDocumentsPersistence.ensureSchema(input.execSql);
|
|
143
|
+
const { db } = getClientSQLitePersistenceRuntime(input.execSql);
|
|
144
|
+
const [document, pendingUpdates, attachments, projectionRows, contentDoc] = await Promise.all([
|
|
145
|
+
sqlDocumentsPersistence.loadDocument(input.execSql, input.localId),
|
|
146
|
+
sqlDocumentsPersistence.listPendingUpdates(input.execSql, input.localId),
|
|
147
|
+
loadDocumentInfoAttachments({
|
|
148
|
+
execSql: input.execSql,
|
|
149
|
+
localId: input.localId,
|
|
150
|
+
}),
|
|
151
|
+
db
|
|
152
|
+
.select({ updatedAt: documentProjection.updatedAt })
|
|
153
|
+
.from(documentProjection)
|
|
154
|
+
.where(eq(documentProjection.localId, input.localId))
|
|
155
|
+
.limit(1),
|
|
156
|
+
loadPersistedDocumentContent({
|
|
157
|
+
execSql: input.execSql,
|
|
158
|
+
localId: input.localId,
|
|
159
|
+
persistence: sqlDocumentsPersistence,
|
|
160
|
+
}).catch(() => null),
|
|
161
|
+
]);
|
|
162
|
+
if (!document) {
|
|
163
|
+
return fallback;
|
|
164
|
+
}
|
|
165
|
+
const pendingAttachments = attachments.filter((attachment) => attachment.attachmentKind === "pending");
|
|
166
|
+
return {
|
|
167
|
+
attachments,
|
|
168
|
+
// Blame reads op-level provenance out of a serialized snapshot; export the
|
|
169
|
+
// durable-history content for it. Degrades to null (blame unavailable)
|
|
170
|
+
// rather than failing the Info panel.
|
|
171
|
+
contentSnapshot: contentDoc
|
|
172
|
+
? bytesToBase64(exportFullHistorySnapshot(contentDoc))
|
|
173
|
+
: null,
|
|
174
|
+
local: {
|
|
175
|
+
accessEpoch: document.accessEpoch,
|
|
176
|
+
accessStateHash: document.accessStateHash ?? null,
|
|
177
|
+
containerId: document.containerId,
|
|
178
|
+
documentId: document.documentId,
|
|
179
|
+
documentKind: document.documentKind ?? DEFAULT_DOCUMENT_KIND,
|
|
180
|
+
hasContentKeyBundle: Boolean(document.contentKeyBundle),
|
|
181
|
+
hasDocumentKekTargets: Boolean(document.documentKekTargets),
|
|
182
|
+
hasDocumentManifestBundle: Boolean(document.documentManifestBundle),
|
|
183
|
+
lastCommitLsn: document.lastCommitLsn ?? null,
|
|
184
|
+
localDocumentManifestHash: readStoredManifestHash(document.documentManifestBundle),
|
|
185
|
+
localId: document.id,
|
|
186
|
+
pendingAttachmentByteLength: pendingAttachments.reduce((total, attachment) => total + attachment.byteLength, 0),
|
|
187
|
+
pendingAttachmentCount: pendingAttachments.length,
|
|
188
|
+
pendingUpdateCount: pendingUpdates.length,
|
|
189
|
+
title: document.title ?? null,
|
|
190
|
+
updatedAt: projectionRows[0]?.updatedAt ?? null,
|
|
191
|
+
},
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function shouldLoadRemoteDocumentInfo(input) {
|
|
195
|
+
return input.remoteInfoMode !== "never" && Boolean(input.local.documentId);
|
|
196
|
+
}
|
|
197
|
+
function mapAttachmentBinding(binding) {
|
|
198
|
+
return {
|
|
199
|
+
bindingId: binding.bindingId,
|
|
200
|
+
blobId: binding.blobId,
|
|
201
|
+
slotId: binding.slotId,
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
function mapAuthorizingContainerPath(projection) {
|
|
205
|
+
const leafBundle = projection.path.at(-1);
|
|
206
|
+
const leafKek = projection.containerKeks.at(-1);
|
|
207
|
+
return {
|
|
208
|
+
containerId: projection.containerId,
|
|
209
|
+
containerKeyEpoch: leafKek?.containerKeyEpoch ?? null,
|
|
210
|
+
containerKeyEpochId: leafKek?.containerKeyEpochId ?? null,
|
|
211
|
+
leafManifestHash: leafBundle?.manifestHash ?? null,
|
|
212
|
+
organizationId: projection.organizationId,
|
|
213
|
+
pathLength: projection.path.length,
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function getDocumentInfoRemoteDetails(input) {
|
|
217
|
+
const { attachmentBindings, attribution, blameRanges, characterBlame, contributors, fieldBlame, projection, } = input;
|
|
218
|
+
const manifestState = projection.documentManifest.state;
|
|
219
|
+
const manifest = projection.documentManifest.manifest;
|
|
220
|
+
return {
|
|
221
|
+
activeAttachmentBindings: attachmentBindings.map(mapAttachmentBinding),
|
|
222
|
+
attributionRevision: attribution?.attributionRevision ?? null,
|
|
223
|
+
attributionStatus: attribution
|
|
224
|
+
? attribution.truncated
|
|
225
|
+
? "truncated"
|
|
226
|
+
: "available"
|
|
227
|
+
: "unavailable",
|
|
228
|
+
attributionSegments: attribution?.segments ?? [],
|
|
229
|
+
authorizingContainerPaths: projection.authorizingContainerPaths.map(mapAuthorizingContainerPath),
|
|
230
|
+
blameRanges,
|
|
231
|
+
characterBlame,
|
|
232
|
+
fieldBlame,
|
|
233
|
+
contentKeyEpoch: projection.contentKeyBundle.contentKeyEpoch,
|
|
234
|
+
contentKeyTargetCount: projection.contentKeyBundle.targets.length,
|
|
235
|
+
contentKeyTargetHash: projection.contentKeyBundle.targetHash,
|
|
236
|
+
contributors,
|
|
237
|
+
currentManifestHash: projection.documentManifest.manifestHash,
|
|
238
|
+
documentContainerManifestHistoryCount: projection.documentContainerManifestHistory.length,
|
|
239
|
+
documentKekTargetCount: projection.documentKekTargets.targets.length,
|
|
240
|
+
documentKeyTargetHash: projection.documentKekTargets.documentKeyTargetHash,
|
|
241
|
+
documentManifestContainerPathCount: projection.documentManifestContainerPaths.length,
|
|
242
|
+
documentManifestHistoryCount: projection.documentManifestHistory.length,
|
|
243
|
+
linkedContainerKeyEpochCount: projection.documentKekTargets.linkedContainerKeyEpochIds.length,
|
|
244
|
+
linkedContainerManifestCount: projection.documentKekTargets.linkedContainerManifestHashes.length,
|
|
245
|
+
linkSetManifestHash: projection.documentKekTargets.linkSetManifestHash,
|
|
246
|
+
manifestEpoch: readRecordNumber(manifest, "epoch"),
|
|
247
|
+
previousManifestHash: readRecordString(manifestState, "previousManifestHash"),
|
|
248
|
+
referencedPrincipalCount: readRecordArrayLength(manifest, "referencedPrincipalHeads"),
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
export async function loadDocumentInfo(input) {
|
|
252
|
+
const { attachments, contentSnapshot, local } = await loadLocalDocumentInfo({
|
|
253
|
+
execSql: input.execSql ?? null,
|
|
254
|
+
localId: input.localId,
|
|
255
|
+
});
|
|
256
|
+
if (!shouldLoadRemoteDocumentInfo({
|
|
257
|
+
local,
|
|
258
|
+
remoteInfoMode: input.remoteInfoMode ?? "if-synced",
|
|
259
|
+
}) ||
|
|
260
|
+
!local.documentId) {
|
|
261
|
+
return { attachments, local, remoteInfo: null };
|
|
262
|
+
}
|
|
263
|
+
const attributionPromise = input.apiClient
|
|
264
|
+
.getDocumentEditAttribution(local.documentId, input.attributionRequestKey)
|
|
265
|
+
.catch(async (error) => {
|
|
266
|
+
await reportAndRethrowKeyingVerificationError(error, input.reportSecurityIncident, {
|
|
267
|
+
objectId: local.documentId ?? input.localId,
|
|
268
|
+
objectKind: "document",
|
|
269
|
+
operation: "document.info.attribution",
|
|
270
|
+
});
|
|
271
|
+
return null;
|
|
272
|
+
});
|
|
273
|
+
const [projection, attachmentBindings, attribution] = await Promise.all([
|
|
274
|
+
input.apiClient.getDocumentWriterProjection(local.documentId),
|
|
275
|
+
input.apiClient.listDocumentAttachments(local.documentId),
|
|
276
|
+
// Attribution is supplementary: a rejection (network/server) must not block
|
|
277
|
+
// the rest of the document-info load, so swallow it to null (no contributors).
|
|
278
|
+
attributionPromise,
|
|
279
|
+
]);
|
|
280
|
+
if (!projection) {
|
|
281
|
+
throw new Error(`Document info projection was unavailable for local document ${input.localId} with remote document ${local.documentId}.`);
|
|
282
|
+
}
|
|
283
|
+
const attributionComplete = attribution && !attribution.truncated;
|
|
284
|
+
const attributionSegments = attribution?.segments ?? [];
|
|
285
|
+
const blame = attributionComplete
|
|
286
|
+
? computeDocumentBlame(contentSnapshot, attributionSegments)
|
|
287
|
+
: null;
|
|
288
|
+
return {
|
|
289
|
+
attachments,
|
|
290
|
+
local,
|
|
291
|
+
remoteInfo: getDocumentInfoRemoteDetails({
|
|
292
|
+
attachmentBindings: attachmentBindings ?? [],
|
|
293
|
+
attribution,
|
|
294
|
+
blameRanges: blame?.blameRanges ?? null,
|
|
295
|
+
characterBlame: blame?.characterBlame ?? null,
|
|
296
|
+
contributors: attributionComplete
|
|
297
|
+
? summarizeDocumentContributors(attributionSegments)
|
|
298
|
+
: [],
|
|
299
|
+
fieldBlame: attributionComplete
|
|
300
|
+
? computeFieldBlame(contentSnapshot, attributionSegments)
|
|
301
|
+
: null,
|
|
302
|
+
projection,
|
|
303
|
+
}),
|
|
304
|
+
};
|
|
305
|
+
}
|
|
306
|
+
//# sourceMappingURL=documentInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentInfo.js","sourceRoot":"","sources":["documentInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAQ5D,OAAO,EAAE,GAAG,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAKL,6BAA6B,GAC9B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,uCAAuC,EAAE,MAAM,kDAAkD,CAAC;AAC3G,OAAO,EAAE,uBAAuB,EAAE,MAA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YAC7C,YAAY,EAAE,mBAAmB;gBAC/B,CAAC,CAAC,6BAA6B,CAAC,mBAAmB,CAAC;gBACpD,CAAC,CAAC,EAAE;YACN,UAAU,EAAE,mBAAmB;gBAC7B,CAAC,CAAC,iBAAiB,CAAC,eAAe,EAAE,mBAAmB,CAAC;gBACzD,CAAC,CAAC,IAAI;YACR,UAAU;SACX,CAAC;KACH,CAAC;AACJ,CAAC","sourcesContent":["import { bytesToBase64 } from \"@tearleads/encoding\";\nimport { exportFullHistorySnapshot } from \"@tearleads/loro\";\nimport type {\n BlobAttachmentSummary,\n ContainerKeyingPathResponse,\n DocumentEditAttributionResponse,\n DocumentWriterProjectionResponse,\n ListDocumentAttachmentsResponse,\n} from \"@tearleads/validators/response\";\nimport { and, eq, isNull } from \"drizzle-orm\";\nimport { DEFAULT_DOCUMENT_KIND } from \"../../../data/documents/documentConstants\";\nimport {\n type DocumentBlameRange,\n type DocumentCharacterBlameSummary,\n type DocumentContributor,\n type DocumentFieldBlame,\n summarizeDocumentContributors,\n} from \"../../../data/documents/editAttribution\";\nimport { reportAndRethrowKeyingVerificationError } from \"../../../data/keyingProjectionVerification/error\";\nimport { sqlDocumentsPersistence } from \"../../../data/persistence/documents/documentsPersistence\";\nimport type { SecurityIncidentReporter } from \"../../../data/shared/securityIncidents\";\nimport {\n documentAttachmentBlobProjection,\n documentPendingAttachments,\n documentProjection,\n} from \"../../../data/sqlite/schema\";\nimport { getClientSQLitePersistenceRuntime } from \"../../../data/sqlite/sqlitePersistenceRuntime\";\nimport type { ExecSql } from \"../../../data/sqlite/sqlSchema\";\nimport { loadPersistedDocumentContent } from \"../../documents/historyContent\";\nimport { computeDocumentBlame } from \"../attribution/documentCharacterBlame\";\nimport { computeFieldBlame } from \"../attribution/documentFieldBlame\";\nimport type {\n DocumentInfo,\n DocumentInfoAttachment,\n DocumentInfoAuthorizingContainerPath,\n DocumentInfoLocalDetails,\n DocumentInfoRemoteAttachmentBinding,\n DocumentInfoRemoteDetails,\n DocumentInfoRemoteMode,\n} from \"./documentInfoTypes\";\n\nexport type {\n DocumentInfo,\n DocumentInfoAttachment,\n DocumentInfoAuthorizingContainerPath,\n DocumentInfoLocalDetails,\n DocumentInfoRemoteAttachmentBinding,\n DocumentInfoRemoteDetails,\n DocumentInfoRemoteMode,\n} from \"./documentInfoTypes\";\n\ninterface DocumentInfoApi {\n getDocumentEditAttribution: (\n documentId: string,\n requestKey?: string,\n ) => Promise<DocumentEditAttributionResponse | null>;\n getDocumentWriterProjection: (\n documentId: string,\n ) => Promise<DocumentWriterProjectionResponse | null>;\n listDocumentAttachments: (\n documentId: string,\n ) => Promise<ListDocumentAttachmentsResponse | null>;\n}\n\ninterface PendingAttachmentInfoRow {\n byteLength: number;\n createdAt: string;\n localId: string;\n mimeType: string | null;\n name: string;\n slotId: string;\n storageKey: string;\n}\n\ninterface LocalAttachmentInfoRow {\n blobId: string | null;\n byteLength: number;\n localId: string;\n mimeType: string | null;\n slotId: string;\n storageKey: string;\n updatedAt: string;\n}\n\nfunction readRecordString(value: unknown, key: string): string | null {\n if (!value || typeof value !== \"object\") {\n return null;\n }\n\n const nextValue = Reflect.get(value, key);\n return typeof nextValue === \"string\" && nextValue.length > 0\n ? nextValue\n : null;\n}\n\nfunction readRecordNumber(value: unknown, key: string): number | null {\n if (!value || typeof value !== \"object\") {\n return null;\n }\n\n const nextValue = Reflect.get(value, key);\n return typeof nextValue === \"number\" && Number.isFinite(nextValue)\n ? nextValue\n : null;\n}\n\nfunction readRecordArrayLength(value: unknown, key: string): number | null {\n if (!value || typeof value !== \"object\") {\n return null;\n }\n\n const nextValue = Reflect.get(value, key);\n return Array.isArray(nextValue) ? nextValue.length : null;\n}\n\nfunction readStoredManifestHash(\n value: string | null | undefined,\n): string | null {\n if (!value) {\n return null;\n }\n\n try {\n const parsed: unknown = JSON.parse(value);\n return readRecordString(parsed, \"manifestHash\");\n } catch {\n return null;\n }\n}\n\nfunction mapPendingAttachmentRow(\n row: PendingAttachmentInfoRow,\n): DocumentInfoAttachment {\n return {\n attachmentKind: \"pending\",\n blobId: null,\n byteLength: row.byteLength,\n createdAt: row.createdAt,\n localId: row.localId,\n mimeType: row.mimeType,\n name: row.name,\n slotId: row.slotId,\n storageKey: row.storageKey,\n updatedAt: null,\n };\n}\n\nfunction mapLocalAttachmentRow(\n row: LocalAttachmentInfoRow,\n): DocumentInfoAttachment {\n return {\n attachmentKind: \"local\",\n blobId: row.blobId,\n byteLength: row.byteLength,\n createdAt: null,\n localId: row.localId,\n mimeType: row.mimeType,\n name: null,\n slotId: row.slotId,\n storageKey: row.storageKey,\n updatedAt: row.updatedAt,\n };\n}\n\nasync function loadDocumentInfoAttachments(input: {\n execSql: ExecSql;\n localId: string;\n}): Promise<DocumentInfoAttachment[]> {\n const { db } = getClientSQLitePersistenceRuntime(input.execSql);\n const [pendingRows, localRows] = await Promise.all([\n db\n .select({\n byteLength: documentPendingAttachments.byteLength,\n createdAt: documentPendingAttachments.createdAt,\n localId: documentPendingAttachments.localId,\n mimeType: documentPendingAttachments.mimeType,\n name: documentPendingAttachments.name,\n slotId: documentPendingAttachments.slotId,\n storageKey: documentPendingAttachments.storageKey,\n })\n .from(documentPendingAttachments)\n .where(eq(documentPendingAttachments.localId, input.localId))\n .orderBy(\n documentPendingAttachments.createdAt,\n documentPendingAttachments.slotId,\n ),\n db\n .select({\n blobId: documentAttachmentBlobProjection.blobId,\n byteLength: documentAttachmentBlobProjection.byteLength,\n localId: documentAttachmentBlobProjection.localId,\n mimeType: documentAttachmentBlobProjection.mimeType,\n slotId: documentAttachmentBlobProjection.slotId,\n storageKey: documentAttachmentBlobProjection.storageKey,\n updatedAt: documentAttachmentBlobProjection.updatedAt,\n })\n .from(documentAttachmentBlobProjection)\n .where(\n and(\n eq(documentAttachmentBlobProjection.localId, input.localId),\n // Unlinked slots keep their row as a pending-detach marker; the\n // document no longer has the attachment, so do not report it.\n isNull(documentAttachmentBlobProjection.detachedAt),\n ),\n )\n .orderBy(\n documentAttachmentBlobProjection.updatedAt,\n documentAttachmentBlobProjection.slotId,\n ),\n ]);\n\n return [\n ...pendingRows.map(mapPendingAttachmentRow),\n ...localRows.map(mapLocalAttachmentRow),\n ];\n}\n\nasync function loadLocalDocumentInfo(input: {\n execSql: ExecSql | null;\n localId: string;\n}): Promise<{\n attachments: DocumentInfoAttachment[];\n contentSnapshot: string | null;\n local: DocumentInfoLocalDetails;\n}> {\n const fallback = {\n attachments: [],\n contentSnapshot: null,\n local: {\n accessEpoch: null,\n accessStateHash: null,\n containerId: null,\n documentId: null,\n documentKind: null,\n hasContentKeyBundle: false,\n hasDocumentKekTargets: false,\n hasDocumentManifestBundle: false,\n lastCommitLsn: null,\n localDocumentManifestHash: null,\n localId: input.localId,\n pendingAttachmentByteLength: 0,\n pendingAttachmentCount: 0,\n pendingUpdateCount: 0,\n title: null,\n updatedAt: null,\n },\n };\n\n if (!input.execSql) {\n return fallback;\n }\n\n await sqlDocumentsPersistence.ensureSchema(input.execSql);\n const { db } = getClientSQLitePersistenceRuntime(input.execSql);\n const [document, pendingUpdates, attachments, projectionRows, contentDoc] =\n await Promise.all([\n sqlDocumentsPersistence.loadDocument(input.execSql, input.localId),\n sqlDocumentsPersistence.listPendingUpdates(input.execSql, input.localId),\n loadDocumentInfoAttachments({\n execSql: input.execSql,\n localId: input.localId,\n }),\n db\n .select({ updatedAt: documentProjection.updatedAt })\n .from(documentProjection)\n .where(eq(documentProjection.localId, input.localId))\n .limit(1),\n loadPersistedDocumentContent({\n execSql: input.execSql,\n localId: input.localId,\n persistence: sqlDocumentsPersistence,\n }).catch(() => null),\n ]);\n\n if (!document) {\n return fallback;\n }\n\n const pendingAttachments = attachments.filter(\n (attachment) => attachment.attachmentKind === \"pending\",\n );\n\n return {\n attachments,\n // Blame reads op-level provenance out of a serialized snapshot; export the\n // durable-history content for it. Degrades to null (blame unavailable)\n // rather than failing the Info panel.\n contentSnapshot: contentDoc\n ? bytesToBase64(exportFullHistorySnapshot(contentDoc))\n : null,\n local: {\n accessEpoch: document.accessEpoch,\n accessStateHash: document.accessStateHash ?? null,\n containerId: document.containerId,\n documentId: document.documentId,\n documentKind: document.documentKind ?? DEFAULT_DOCUMENT_KIND,\n hasContentKeyBundle: Boolean(document.contentKeyBundle),\n hasDocumentKekTargets: Boolean(document.documentKekTargets),\n hasDocumentManifestBundle: Boolean(document.documentManifestBundle),\n lastCommitLsn: document.lastCommitLsn ?? null,\n localDocumentManifestHash: readStoredManifestHash(\n document.documentManifestBundle,\n ),\n localId: document.id,\n pendingAttachmentByteLength: pendingAttachments.reduce(\n (total, attachment) => total + attachment.byteLength,\n 0,\n ),\n pendingAttachmentCount: pendingAttachments.length,\n pendingUpdateCount: pendingUpdates.length,\n title: document.title ?? null,\n updatedAt: projectionRows[0]?.updatedAt ?? null,\n },\n };\n}\n\nfunction shouldLoadRemoteDocumentInfo(input: {\n local: DocumentInfoLocalDetails;\n remoteInfoMode: DocumentInfoRemoteMode;\n}): boolean {\n return input.remoteInfoMode !== \"never\" && Boolean(input.local.documentId);\n}\n\nfunction mapAttachmentBinding(\n binding: BlobAttachmentSummary,\n): DocumentInfoRemoteAttachmentBinding {\n return {\n bindingId: binding.bindingId,\n blobId: binding.blobId,\n slotId: binding.slotId,\n };\n}\n\nfunction mapAuthorizingContainerPath(\n projection: ContainerKeyingPathResponse,\n): DocumentInfoAuthorizingContainerPath {\n const leafBundle = projection.path.at(-1);\n const leafKek = projection.containerKeks.at(-1);\n\n return {\n containerId: projection.containerId,\n containerKeyEpoch: leafKek?.containerKeyEpoch ?? null,\n containerKeyEpochId: leafKek?.containerKeyEpochId ?? null,\n leafManifestHash: leafBundle?.manifestHash ?? null,\n organizationId: projection.organizationId,\n pathLength: projection.path.length,\n };\n}\n\nfunction getDocumentInfoRemoteDetails(input: {\n attachmentBindings: ReadonlyArray<BlobAttachmentSummary>;\n attribution: DocumentEditAttributionResponse | null;\n blameRanges: DocumentBlameRange[] | null;\n characterBlame: DocumentCharacterBlameSummary | null;\n contributors: DocumentContributor[];\n fieldBlame: DocumentFieldBlame[] | null;\n projection: DocumentWriterProjectionResponse;\n}): DocumentInfoRemoteDetails {\n const {\n attachmentBindings,\n attribution,\n blameRanges,\n characterBlame,\n contributors,\n fieldBlame,\n projection,\n } = input;\n const manifestState = projection.documentManifest.state;\n const manifest = projection.documentManifest.manifest;\n\n return {\n activeAttachmentBindings: attachmentBindings.map(mapAttachmentBinding),\n attributionRevision: attribution?.attributionRevision ?? null,\n attributionStatus: attribution\n ? attribution.truncated\n ? \"truncated\"\n : \"available\"\n : \"unavailable\",\n attributionSegments: attribution?.segments ?? [],\n authorizingContainerPaths: projection.authorizingContainerPaths.map(\n mapAuthorizingContainerPath,\n ),\n blameRanges,\n characterBlame,\n fieldBlame,\n contentKeyEpoch: projection.contentKeyBundle.contentKeyEpoch,\n contentKeyTargetCount: projection.contentKeyBundle.targets.length,\n contentKeyTargetHash: projection.contentKeyBundle.targetHash,\n contributors,\n currentManifestHash: projection.documentManifest.manifestHash,\n documentContainerManifestHistoryCount:\n projection.documentContainerManifestHistory.length,\n documentKekTargetCount: projection.documentKekTargets.targets.length,\n documentKeyTargetHash: projection.documentKekTargets.documentKeyTargetHash,\n documentManifestContainerPathCount:\n projection.documentManifestContainerPaths.length,\n documentManifestHistoryCount: projection.documentManifestHistory.length,\n linkedContainerKeyEpochCount:\n projection.documentKekTargets.linkedContainerKeyEpochIds.length,\n linkedContainerManifestCount:\n projection.documentKekTargets.linkedContainerManifestHashes.length,\n linkSetManifestHash: projection.documentKekTargets.linkSetManifestHash,\n manifestEpoch: readRecordNumber(manifest, \"epoch\"),\n previousManifestHash: readRecordString(\n manifestState,\n \"previousManifestHash\",\n ),\n referencedPrincipalCount: readRecordArrayLength(\n manifest,\n \"referencedPrincipalHeads\",\n ),\n };\n}\n\nexport async function loadDocumentInfo(input: {\n apiClient: DocumentInfoApi;\n attributionRequestKey?: string | undefined;\n execSql?: ExecSql | null;\n localId: string;\n reportSecurityIncident: SecurityIncidentReporter;\n remoteInfoMode?: DocumentInfoRemoteMode | undefined;\n}): Promise<DocumentInfo> {\n const { attachments, contentSnapshot, local } = await loadLocalDocumentInfo({\n execSql: input.execSql ?? null,\n localId: input.localId,\n });\n\n if (\n !shouldLoadRemoteDocumentInfo({\n local,\n remoteInfoMode: input.remoteInfoMode ?? \"if-synced\",\n }) ||\n !local.documentId\n ) {\n return { attachments, local, remoteInfo: null };\n }\n\n const attributionPromise = input.apiClient\n .getDocumentEditAttribution(local.documentId, input.attributionRequestKey)\n .catch(async (error: unknown) => {\n await reportAndRethrowKeyingVerificationError(\n error,\n input.reportSecurityIncident,\n {\n objectId: local.documentId ?? input.localId,\n objectKind: \"document\",\n operation: \"document.info.attribution\",\n },\n );\n return null;\n });\n const [projection, attachmentBindings, attribution] = await Promise.all([\n input.apiClient.getDocumentWriterProjection(local.documentId),\n input.apiClient.listDocumentAttachments(local.documentId),\n // Attribution is supplementary: a rejection (network/server) must not block\n // the rest of the document-info load, so swallow it to null (no contributors).\n attributionPromise,\n ]);\n\n if (!projection) {\n throw new Error(\n `Document info projection was unavailable for local document ${input.localId} with remote document ${local.documentId}.`,\n );\n }\n\n const attributionComplete = attribution && !attribution.truncated;\n const attributionSegments = attribution?.segments ?? [];\n const blame = attributionComplete\n ? computeDocumentBlame(contentSnapshot, attributionSegments)\n : null;\n return {\n attachments,\n local,\n remoteInfo: getDocumentInfoRemoteDetails({\n attachmentBindings: attachmentBindings ?? [],\n attribution,\n blameRanges: blame?.blameRanges ?? null,\n characterBlame: blame?.characterBlame ?? null,\n contributors: attributionComplete\n ? summarizeDocumentContributors(attributionSegments)\n : [],\n fieldBlame: attributionComplete\n ? computeFieldBlame(contentSnapshot, attributionSegments)\n : null,\n projection,\n }),\n };\n}\n"]}
|