@tearleads/client-sdk 0.1.14 → 0.1.16

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.
Files changed (354) hide show
  1. package/client/Tearleads.d.ts +2 -0
  2. package/client/Tearleads.js +1 -0
  3. package/client/Tearleads.js.map +1 -1
  4. package/client/containerContents.js +2 -1
  5. package/client/containerContents.js.map +1 -1
  6. package/client/index.d.ts +1 -1
  7. package/client/index.js.map +1 -1
  8. package/client/organizations/index.d.ts +4 -42
  9. package/client/organizations/index.js +13 -0
  10. package/client/organizations/index.js.map +1 -1
  11. package/client/organizations/organizationGroupNameHydration.js +8 -1
  12. package/client/organizations/organizationGroupNameHydration.js.map +1 -1
  13. package/client/organizations/organizationsTypes.d.ts +47 -0
  14. package/client/organizations/organizationsTypes.js +2 -0
  15. package/client/organizations/organizationsTypes.js.map +1 -0
  16. package/client/organizations/principalMutationRecovery.d.ts +16 -0
  17. package/client/organizations/principalMutationRecovery.js +23 -0
  18. package/client/organizations/principalMutationRecovery.js.map +1 -0
  19. package/client/organizations/principalMutationScope.js +7 -2
  20. package/client/organizations/principalMutationScope.js.map +1 -1
  21. package/client/principalMutationApi.d.ts +24 -0
  22. package/client/principalMutationApi.js +108 -0
  23. package/client/principalMutationApi.js.map +1 -0
  24. package/client/principalMutationDeadline.js +23 -0
  25. package/client/principalMutationDeadline.js.map +1 -0
  26. package/client/workflowRuntime.d.ts +3 -1
  27. package/client/workflowRuntime.js +44 -5
  28. package/client/workflowRuntime.js.map +1 -1
  29. package/data/documents/blob/shared/types.d.ts +4 -0
  30. package/data/documents/blob/shared/types.js.map +1 -1
  31. package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js +2 -0
  32. package/data/keyingProjectionVerification/accessManifestCheckpointEnforcement.js.map +1 -1
  33. package/data/keyingProjectionVerification/checkpointContext.d.ts +2 -1
  34. package/data/keyingProjectionVerification/checkpointContext.js +22 -0
  35. package/data/keyingProjectionVerification/checkpointContext.js.map +1 -1
  36. package/data/keyingProjectionVerification/containerDestinationVerification.js +11 -1
  37. package/data/keyingProjectionVerification/containerDestinationVerification.js.map +1 -1
  38. package/data/keyingProjectionVerification/containerManifestVerification.js.map +1 -1
  39. package/data/keyingProjectionVerification/containerPathVerification.js.map +1 -1
  40. package/data/keyingProjectionVerification/containerProjectionVerification.d.ts +3 -2
  41. package/data/keyingProjectionVerification/containerProjectionVerification.js +10 -11
  42. package/data/keyingProjectionVerification/containerProjectionVerification.js.map +1 -1
  43. package/data/keyingProjectionVerification/documentManifestPolicies.js.map +1 -1
  44. package/data/keyingProjectionVerification/documentManifestVerification.js.map +1 -1
  45. package/data/keyingProjectionVerification/documentProjectionVerification.d.ts +2 -3
  46. package/data/keyingProjectionVerification/documentProjectionVerification.js +4 -0
  47. package/data/keyingProjectionVerification/documentProjectionVerification.js.map +1 -1
  48. package/data/keyingProjectionVerification/mergeProjectionPolicyEvidence.js +14 -12
  49. package/data/keyingProjectionVerification/mergeProjectionPolicyEvidence.js.map +1 -1
  50. package/data/keyingProjectionVerification/organizationFounderBinding.js.map +1 -1
  51. package/data/keyingProjectionVerification/projectionAuthorizationEvidence.js +33 -6
  52. package/data/keyingProjectionVerification/projectionAuthorizationEvidence.js.map +1 -1
  53. package/data/keyingProjectionVerification/projectionLifetimes.js +13 -0
  54. package/data/keyingProjectionVerification/projectionLifetimes.js.map +1 -0
  55. package/data/keyingProjectionVerification/projectionPolicyEvidence.js +19 -66
  56. package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +1 -1
  57. package/data/keyingProjectionVerification/types.d.ts +13 -2
  58. package/data/keyingProjectionVerification/types.js +15 -0
  59. package/data/keyingProjectionVerification/types.js.map +1 -1
  60. package/data/persistence/keyingCheckpointAdvancePersistence.js +4 -1
  61. package/data/persistence/keyingCheckpointAdvancePersistence.js.map +1 -1
  62. package/data/persistence/organizationFounderPersistence.js +2 -2
  63. package/data/persistence/organizationFounderPersistence.js.map +1 -1
  64. package/data/persistence/principalAuthorizationCheckpoints.js +29 -0
  65. package/data/persistence/principalAuthorizationCheckpoints.js.map +1 -0
  66. package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +27 -0
  67. package/data/persistence/principalCurrentAcknowledgementPersistence.js +109 -0
  68. package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -0
  69. package/data/persistence/principalGrantRetirementPersistence.d.ts +3 -3
  70. package/data/persistence/principalGrantRetirementPersistence.js +4 -1
  71. package/data/persistence/principalGrantRetirementPersistence.js.map +1 -1
  72. package/data/persistence/principalHistoryEvidencePersistence.d.ts +30 -0
  73. package/data/persistence/principalHistoryPrefixPersistence.d.ts +24 -0
  74. package/data/persistence/principalHistoryPrefixPersistence.js +6 -2
  75. package/data/persistence/principalHistoryPrefixPersistence.js.map +1 -1
  76. package/data/persistence/principalHistoryStagePersistence.d.ts +21 -0
  77. package/data/persistence/principalKeyEnvelopeCandidates.js +12 -1
  78. package/data/persistence/principalKeyEnvelopeCandidates.js.map +1 -1
  79. package/data/persistence/principalMutationJournalPersistence.d.ts +19 -0
  80. package/data/persistence/principalMutationJournalPersistence.js +53 -0
  81. package/data/persistence/principalMutationJournalPersistence.js.map +1 -0
  82. package/data/persistence/verifiedPrincipalPolicyBundle.js +7 -51
  83. package/data/persistence/verifiedPrincipalPolicyBundle.js.map +1 -1
  84. package/data/persistence/verifiedPrincipalPolicyCurrent.js +56 -0
  85. package/data/persistence/verifiedPrincipalPolicyCurrent.js.map +1 -0
  86. package/data/principals/principalHistoryRuntime.js +12 -0
  87. package/data/principals/principalHistoryRuntime.js.map +1 -0
  88. package/data/principals/principalHistoryStageProtection.js +2 -12
  89. package/data/principals/principalHistoryStageProtection.js.map +1 -1
  90. package/data/principals/principalMutationJournal.d.ts +26 -0
  91. package/data/principals/principalMutationJournal.js +90 -0
  92. package/data/principals/principalMutationJournal.js.map +1 -0
  93. package/data/principals/principalMutationJournalRecord.d.ts +8 -0
  94. package/data/principals/principalMutationJournalRecord.js +25 -0
  95. package/data/principals/principalMutationJournalRecord.js.map +1 -0
  96. package/data/principals/principalPolicyEvidence.d.ts +2 -2
  97. package/data/principals/principalPolicyEvidence.js.map +1 -1
  98. package/data/sqlite/principalHistoryEvidenceSchema.d.ts +308 -0
  99. package/data/sqlite/principalHistoryStageSchema.d.ts +119 -0
  100. package/data/sqlite/principalHistoryStageSchema.js +3 -0
  101. package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
  102. package/data/sqlite/principalMutationJournalSchema.d.ts +85 -0
  103. package/data/sqlite/principalMutationJournalSchema.js +13 -0
  104. package/data/sqlite/principalMutationJournalSchema.js.map +1 -0
  105. package/data/sqlite/schema.d.ts +83 -0
  106. package/data/sqlite/schema.js +3 -0
  107. package/data/sqlite/schema.js.map +1 -1
  108. package/index.d.ts +5 -5
  109. package/index.js +2 -2
  110. package/index.js.map +1 -1
  111. package/internal/api-client/ApiCache.d.ts +54 -0
  112. package/internal/api-client/ApiClient.d.ts +255 -309
  113. package/internal/api-client/ApiClient.js +15 -6
  114. package/internal/api-client/ApiClient.js.map +1 -1
  115. package/internal/api-client/index.d.ts +1 -0
  116. package/internal/api-client/index.js.map +1 -1
  117. package/internal/api-client/principalHistoryDeadline.js +20 -0
  118. package/internal/api-client/principalHistoryDeadline.js.map +1 -0
  119. package/internal/api-client/principalHistoryRequest.js +59 -22
  120. package/internal/api-client/principalHistoryRequest.js.map +1 -1
  121. package/internal/api-client/principalHistoryRequestContext.js +18 -5
  122. package/internal/api-client/principalHistoryRequestContext.js.map +1 -1
  123. package/internal/api-client/principalPolicyRequests.d.ts +799 -0
  124. package/internal/api-client/principalPolicyRequests.js +9 -4
  125. package/internal/api-client/principalPolicyRequests.js.map +1 -1
  126. package/internal/api-client/projectionPolicyHistoryPages.d.ts +9 -0
  127. package/internal/api-client/projectionPolicyHistoryPages.js +88 -0
  128. package/internal/api-client/projectionPolicyHistoryPages.js.map +1 -0
  129. package/internal/api-client/writerProjectionRequests.js +26 -0
  130. package/internal/api-client/writerProjectionRequests.js.map +1 -0
  131. package/internal/crypto/index.d.ts +1 -1
  132. package/internal/crypto/index.js +1 -1
  133. package/internal/crypto/index.js.map +1 -1
  134. package/internal/crypto/keying/index.d.ts +2 -0
  135. package/internal/crypto/keying/index.js +2 -0
  136. package/internal/crypto/keying/index.js.map +1 -1
  137. package/internal/crypto/keying/principalPolicyCurrent.d.ts +1 -1
  138. package/internal/crypto/keying/principalPolicyCurrent.js +3 -3
  139. package/internal/crypto/keying/principalPolicyCurrent.js.map +1 -1
  140. package/internal/crypto/keying/principalPolicyCurrentEvidence.js +16 -0
  141. package/internal/crypto/keying/principalPolicyCurrentEvidence.js.map +1 -0
  142. package/internal/crypto/keying/principalPolicyCurrentMutation.d.ts +10 -0
  143. package/internal/crypto/keying/principalPolicyCurrentMutation.js +51 -0
  144. package/internal/crypto/keying/principalPolicyCurrentMutation.js.map +1 -0
  145. package/internal/crypto/keying/principalPolicyCurrentSuccessor.d.ts +10 -0
  146. package/internal/crypto/keying/principalPolicyCurrentSuccessor.js +60 -0
  147. package/internal/crypto/keying/principalPolicyCurrentSuccessor.js.map +1 -0
  148. package/internal/crypto/keying/principalPolicyHistory.js +8 -1
  149. package/internal/crypto/keying/principalPolicyHistory.js.map +1 -1
  150. package/internal/crypto/keying/principalPolicyHistoryReferences.js +1 -1
  151. package/internal/crypto/keying/principalPolicyHistoryReferences.js.map +1 -1
  152. package/internal/crypto/keying/principalPolicyHistoryTypes.d.ts +7 -2
  153. package/internal/crypto/keying/principalPolicyHistoryTypes.js +6 -3
  154. package/internal/crypto/keying/principalPolicyHistoryTypes.js.map +1 -1
  155. package/internal/crypto/projectionHistorySlots.js +0 -4
  156. package/internal/crypto/projectionHistorySlots.js.map +1 -1
  157. package/internal/validators/operation/index.d.ts +1 -0
  158. package/internal/validators/operation/index.js +1 -0
  159. package/internal/validators/operation/index.js.map +1 -1
  160. package/internal/validators/operation/principals.d.ts +38 -16
  161. package/internal/validators/operation/principals.js +11 -5
  162. package/internal/validators/operation/principals.js.map +1 -1
  163. package/internal/validators/operation/projectionPolicyHistory.d.ts +512 -0
  164. package/internal/validators/operation/projectionPolicyHistory.js +37 -0
  165. package/internal/validators/operation/projectionPolicyHistory.js.map +1 -0
  166. package/internal/validators/operation/registry.d.ts +2 -0
  167. package/internal/validators/operation/registry.js +2 -0
  168. package/internal/validators/operation/registry.js.map +1 -1
  169. package/internal/validators/operation/writerProjections.d.ts +178 -1224
  170. package/internal/validators/operation/writerProjections.js +9 -2
  171. package/internal/validators/operation/writerProjections.js.map +1 -1
  172. package/internal/validators/response/container.d.ts +84 -612
  173. package/internal/validators/response/documentMutation.d.ts +84 -612
  174. package/internal/validators/response/index.d.ts +1 -0
  175. package/internal/validators/response/index.js +1 -0
  176. package/internal/validators/response/index.js.map +1 -1
  177. package/internal/validators/response/organizationBilling.d.ts +1 -0
  178. package/internal/validators/response/organizationBilling.js +1 -1
  179. package/internal/validators/response/organizationBilling.js.map +1 -1
  180. package/internal/validators/response/principalHistoryPreparation.js +28 -1
  181. package/internal/validators/response/principalHistoryPreparation.js.map +1 -1
  182. package/internal/validators/response/principalPolicySnapshotPage.d.ts +388 -0
  183. package/internal/validators/response/principalPolicySnapshotPage.js +24 -0
  184. package/internal/validators/response/principalPolicySnapshotPage.js.map +1 -0
  185. package/internal/validators/response/projectionPolicyEvidence.d.ts +85 -613
  186. package/internal/validators/response/projectionPolicyEvidence.js +10 -5
  187. package/internal/validators/response/projectionPolicyEvidence.js.map +1 -1
  188. package/package.json +1 -1
  189. package/stores/documents/documentStore/attachmentHydration.js +3 -0
  190. package/stores/documents/documentStore/attachmentHydration.js.map +1 -1
  191. package/stores/documents/documentStore/syncDetachedAttachments.js +3 -0
  192. package/stores/documents/documentStore/syncDetachedAttachments.js.map +1 -1
  193. package/workflows/blobs/decrypt.d.ts +1 -1
  194. package/workflows/blobs/decrypt.js +3 -1
  195. package/workflows/blobs/decrypt.js.map +1 -1
  196. package/workflows/blobs/detach.js +6 -1
  197. package/workflows/blobs/detach.js.map +1 -1
  198. package/workflows/blobs/hydrate.d.ts +3 -1
  199. package/workflows/blobs/hydrate.js +2 -0
  200. package/workflows/blobs/hydrate.js.map +1 -1
  201. package/workflows/blobs/retainedAttachmentVerification.js +2 -0
  202. package/workflows/blobs/retainedAttachmentVerification.js.map +1 -1
  203. package/workflows/container-contents/container-state/createAdoption.js +2 -0
  204. package/workflows/container-contents/container-state/createAdoption.js.map +1 -1
  205. package/workflows/container-contents/container-state/createWithMetadata.js +7 -39
  206. package/workflows/container-contents/container-state/createWithMetadata.js.map +1 -1
  207. package/workflows/container-contents/container-state/createWithMetadataPlan.js +68 -0
  208. package/workflows/container-contents/container-state/createWithMetadataPlan.js.map +1 -0
  209. package/workflows/container-contents/remoteContainerState.js +3 -1
  210. package/workflows/container-contents/remoteContainerState.js.map +1 -1
  211. package/workflows/container-contents/remoteHydration/verifiedDestination.js +3 -0
  212. package/workflows/container-contents/remoteHydration/verifiedDestination.js.map +1 -1
  213. package/workflows/container-contents/runtime.d.ts +3 -0
  214. package/workflows/container-contents/runtime.js +7 -6
  215. package/workflows/container-contents/runtime.js.map +1 -1
  216. package/workflows/containers/child/share.js +4 -0
  217. package/workflows/containers/child/share.js.map +1 -1
  218. package/workflows/containers/child/sharePrincipalPolicy.d.ts +1 -0
  219. package/workflows/containers/child/sharePrincipalPolicy.js.map +1 -1
  220. package/workflows/documents/create.d.ts +2 -15
  221. package/workflows/documents/create.js +9 -64
  222. package/workflows/documents/create.js.map +1 -1
  223. package/workflows/documents/createProjection.d.ts +14 -0
  224. package/workflows/documents/createProjection.js +26 -0
  225. package/workflows/documents/createProjection.js.map +1 -0
  226. package/workflows/documents/createResponse.js +49 -0
  227. package/workflows/documents/createResponse.js.map +1 -0
  228. package/workflows/documents/linkSetBlobRewraps.js +2 -0
  229. package/workflows/documents/linkSetBlobRewraps.js.map +1 -1
  230. package/workflows/documents/runtime.d.ts +3 -0
  231. package/workflows/documents/runtime.js +3 -2
  232. package/workflows/documents/runtime.js.map +1 -1
  233. package/workflows/documents/syncFailureClassification.js +3 -1
  234. package/workflows/documents/syncFailureClassification.js.map +1 -1
  235. package/workflows/organizations/acknowledgedDirectoryBindings.js +18 -0
  236. package/workflows/organizations/acknowledgedDirectoryBindings.js.map +1 -0
  237. package/workflows/organizations/currentGroupMetadataAuthority.js +32 -0
  238. package/workflows/organizations/currentGroupMetadataAuthority.js.map +1 -0
  239. package/workflows/organizations/currentOrganizationAuthority.js +88 -0
  240. package/workflows/organizations/currentOrganizationAuthority.js.map +1 -0
  241. package/workflows/organizations/currentOrganizationGroupNames.js +68 -0
  242. package/workflows/organizations/currentOrganizationGroupNames.js.map +1 -0
  243. package/workflows/organizations/currentPolicyMutationAcknowledgement.js +65 -0
  244. package/workflows/organizations/currentPolicyMutationAcknowledgement.js.map +1 -0
  245. package/workflows/organizations/deleteOrganizationGroup.js +1 -0
  246. package/workflows/organizations/deleteOrganizationGroup.js.map +1 -1
  247. package/workflows/organizations/groupCreation.js +1 -0
  248. package/workflows/organizations/groupCreation.js.map +1 -1
  249. package/workflows/organizations/groupMetadataAccess.d.ts +2 -2
  250. package/workflows/organizations/groupMetadataAccess.js +1 -1
  251. package/workflows/organizations/groupMetadataAccess.js.map +1 -1
  252. package/workflows/organizations/groupMetadataBinding.js.map +1 -1
  253. package/workflows/organizations/groupMetadataContainerAuthority.js +2 -47
  254. package/workflows/organizations/groupMetadataContainerAuthority.js.map +1 -1
  255. package/workflows/organizations/groupMetadataRootBinding.js +51 -0
  256. package/workflows/organizations/groupMetadataRootBinding.js.map +1 -0
  257. package/workflows/organizations/groupMetadataRuntime.js +20 -9
  258. package/workflows/organizations/groupMetadataRuntime.js.map +1 -1
  259. package/workflows/organizations/groupMutationAuthorization.js.map +1 -1
  260. package/workflows/organizations/groupPolicyMutationAcknowledgement.js +9 -75
  261. package/workflows/organizations/groupPolicyMutationAcknowledgement.js.map +1 -1
  262. package/workflows/organizations/groupPolicyMutationContext.d.ts +5 -13
  263. package/workflows/organizations/groupPolicyMutationContext.js +1 -0
  264. package/workflows/organizations/groupPolicyMutationContext.js.map +1 -1
  265. package/workflows/organizations/groupPolicyMutationEvidence.d.ts +26 -0
  266. package/workflows/organizations/groupPolicyMutationEvidence.js +64 -0
  267. package/workflows/organizations/groupPolicyMutationEvidence.js.map +1 -0
  268. package/workflows/organizations/groupPolicyMutationHead.js.map +1 -1
  269. package/workflows/organizations/groupPolicyRequests.js +69 -63
  270. package/workflows/organizations/groupPolicyRequests.js.map +1 -1
  271. package/workflows/organizations/index.d.ts +6 -0
  272. package/workflows/organizations/index.js +5 -0
  273. package/workflows/organizations/index.js.map +1 -1
  274. package/workflows/organizations/organizationGroupNames.js +7 -0
  275. package/workflows/organizations/organizationGroupNames.js.map +1 -1
  276. package/workflows/organizations/principalCurrentPublicationSeal.js +51 -0
  277. package/workflows/organizations/principalCurrentPublicationSeal.js.map +1 -0
  278. package/workflows/organizations/principalMutationJournalLane.js +26 -0
  279. package/workflows/organizations/principalMutationJournalLane.js.map +1 -0
  280. package/workflows/organizations/principalMutationJournalManagement.d.ts +26 -0
  281. package/workflows/organizations/principalMutationJournalManagement.js +104 -0
  282. package/workflows/organizations/principalMutationJournalManagement.js.map +1 -0
  283. package/workflows/organizations/principalMutationJournalSession.d.ts +26 -0
  284. package/workflows/organizations/principalMutationJournalSession.js +85 -0
  285. package/workflows/organizations/principalMutationJournalSession.js.map +1 -0
  286. package/workflows/organizations/principalMutationReceipt.js +21 -0
  287. package/workflows/organizations/principalMutationReceipt.js.map +1 -0
  288. package/workflows/organizations/principalPolicyReceiptArtifacts.js +74 -0
  289. package/workflows/organizations/principalPolicyReceiptArtifacts.js.map +1 -0
  290. package/workflows/organizations/principalPolicyRequest.d.ts +5 -4
  291. package/workflows/organizations/principalPolicyRequest.js.map +1 -1
  292. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.d.ts +21 -0
  293. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +155 -0
  294. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +1 -0
  295. package/workflows/principals/index.d.ts +2 -0
  296. package/workflows/principals/index.js +1 -0
  297. package/workflows/principals/index.js.map +1 -1
  298. package/workflows/principals/policyVerification.js.map +1 -1
  299. package/workflows/principals/principalCurrentRecoveryBatch.js +14 -0
  300. package/workflows/principals/principalCurrentRecoveryBatch.js.map +1 -0
  301. package/workflows/principals/principalHistoryRecoveryAuthority.js +20 -0
  302. package/workflows/principals/principalHistoryRecoveryAuthority.js.map +1 -0
  303. package/workflows/principals/principalHistoryRecoveryStage.js +1 -1
  304. package/workflows/principals/principalHistoryRecoveryStage.js.map +1 -1
  305. package/workflows/principals/principalHistoryRecoveryTypes.d.ts +3 -3
  306. package/workflows/principals/principalHistoryRecoveryTypes.js.map +1 -1
  307. package/workflows/principals/principalHistoryRecoveryVerification.js +6 -1
  308. package/workflows/principals/principalHistoryRecoveryVerification.js.map +1 -1
  309. package/workflows/principals/principalRecoveryDirectory.d.ts +1 -1
  310. package/workflows/principals/principalRecoveryDirectory.js +29 -4
  311. package/workflows/principals/principalRecoveryDirectory.js.map +1 -1
  312. package/workflows/principals/principalRecoveryDiscoveryPage.js +36 -0
  313. package/workflows/principals/principalRecoveryDiscoveryPage.js.map +1 -0
  314. package/workflows/principals/principalRecoveryLocalPreference.js +28 -0
  315. package/workflows/principals/principalRecoveryLocalPreference.js.map +1 -0
  316. package/workflows/principals/principalRecoveryMemo.d.ts +16 -0
  317. package/workflows/principals/principalRecoveryMemo.js +88 -16
  318. package/workflows/principals/principalRecoveryMemo.js.map +1 -1
  319. package/workflows/principals/principalRecoveryOutage.js +1 -1
  320. package/workflows/principals/principalRecoveryOutage.js.map +1 -1
  321. package/workflows/principals/publicPrincipalHistoryAuthority.js +60 -0
  322. package/workflows/principals/publicPrincipalHistoryAuthority.js.map +1 -0
  323. package/workflows/principals/publicPrincipalHistoryPage.js +87 -0
  324. package/workflows/principals/publicPrincipalHistoryPage.js.map +1 -0
  325. package/workflows/principals/publicPrincipalHistoryProgress.js +178 -0
  326. package/workflows/principals/publicPrincipalHistoryProgress.js.map +1 -0
  327. package/workflows/principals/publicPrincipalHistoryTypes.d.ts +39 -0
  328. package/workflows/principals/publicPrincipalHistoryTypes.js +2 -0
  329. package/workflows/principals/publicPrincipalHistoryTypes.js.map +1 -0
  330. package/workflows/principals/publicProjectionDirectory.js +40 -0
  331. package/workflows/principals/publicProjectionDirectory.js.map +1 -0
  332. package/workflows/principals/publicProjectionPrincipal.js +53 -0
  333. package/workflows/principals/publicProjectionPrincipal.js.map +1 -0
  334. package/workflows/principals/recoverCurrentOrganizationPolicy.js +33 -0
  335. package/workflows/principals/recoverCurrentOrganizationPolicy.js.map +1 -0
  336. package/workflows/principals/recoverPrincipalPolicyHistory.js +4 -1
  337. package/workflows/principals/recoverPrincipalPolicyHistory.js.map +1 -1
  338. package/workflows/principals/recoverProjectionPolicyHistory.d.ts +9 -0
  339. package/workflows/principals/recoverProjectionPolicyHistory.js +98 -0
  340. package/workflows/principals/recoverProjectionPolicyHistory.js.map +1 -0
  341. package/workflows/principals/recoverPublicPrincipalHistory.js +176 -0
  342. package/workflows/principals/recoverPublicPrincipalHistory.js.map +1 -0
  343. package/workflows/principals/recoverScopedPrincipalPolicyHistory.d.ts +2 -1
  344. package/workflows/principals/recoverScopedPrincipalPolicyHistory.js +15 -20
  345. package/workflows/principals/recoverScopedPrincipalPolicyHistory.js.map +1 -1
  346. package/workflows/principals/runtimePolicyRecovery.js +16 -9
  347. package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
  348. package/workflows/principals/runtimePolicyWarmer.js +2 -0
  349. package/workflows/principals/runtimePolicyWarmer.js.map +1 -1
  350. package/workflows/principals/runtimeProjectionPolicyRecovery.js +56 -0
  351. package/workflows/principals/runtimeProjectionPolicyRecovery.js.map +1 -0
  352. package/workflows/principals/selectPublicPrincipalHistory.js +90 -0
  353. package/workflows/principals/selectPublicPrincipalHistory.js.map +1 -0
  354. package/workflows/registration/provisioningBootstrapBuilders.d.ts +21 -153
@@ -1,6 +1,7 @@
1
1
  import { commitOrganizationGroupPolicyOperation, putPrincipalPolicyOperation, } from "../validators/operation/index.js";
2
2
  import { principalHistoryRequest } from "./principalHistoryRequest.js";
3
3
  import { collectPrincipalPolicyPages, readPrincipalPolicyPages, } from "./principalPolicyPages.js";
4
+ import { readProjectionPolicyHistoryPages } from "./projectionPolicyHistoryPages.js";
4
5
  import { dedupedRequest } from "./requestInternals.js";
5
6
  import { commitOrganizationGroupPolicy, putPrincipalPolicy, } from "./routes/principals/policy.js";
6
7
  export class PrincipalPolicyRequests {
@@ -12,6 +13,9 @@ export class PrincipalPolicyRequests {
12
13
  this.cache = cache;
13
14
  this.clearWriterProjectionCaches = clearWriterProjectionCaches;
14
15
  }
16
+ publicPages(source, options = {}) {
17
+ return readProjectionPolicyHistoryPages(this.runtime, source, options);
18
+ }
15
19
  pages(principalType, principalId, options = {}) {
16
20
  return readPrincipalPolicyPages(this.runtime, principalType, principalId, options);
17
21
  }
@@ -23,7 +27,10 @@ export class PrincipalPolicyRequests {
23
27
  ? request()
24
28
  : dedupedRequest(this.cache, key, request);
25
29
  }
26
- put(principalType, principalId, input, options = {}) {
30
+ put(...args) {
31
+ return this.putResult(...args).then((result) => result.ok ? result.data : null);
32
+ }
33
+ putResult(principalType, principalId, input, options = {}) {
27
34
  const key = JSON.stringify([principalType, principalId]);
28
35
  this.cache.delete(key);
29
36
  return principalHistoryRequest(this.runtime, {
@@ -36,9 +43,7 @@ export class PrincipalPolicyRequests {
36
43
  ...options,
37
44
  },
38
45
  operation: putPrincipalPolicyOperation,
39
- })
40
- .then((result) => (result.ok ? result.data : null))
41
- .finally(() => this.cache.delete(key));
46
+ }).finally(() => this.cache.delete(key));
42
47
  }
43
48
  async commitResult(organizationId, groupId, input, options = {}) {
44
49
  const groupKey = JSON.stringify(["group", groupId]);
@@ -1 +1 @@
1
- {"version":3,"file":"principalPolicyRequests.js","sourceRoot":"","sources":["principalPolicyRequests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,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CAAC,cAAc,EAAE,OAAO,CAAC;gBACjE,SAAS,EAAE,6BAA6B,CAAC,UAAU;gBACnD,MAAM,EAAE,6BAA6B,CAAC,MAAM;gBAC5C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gBAC3B,OAAO,EAAE;oBACP,qCAAqC,EAAE,cAAc;oBACrD,GAAG,OAAO;iBACX;gBACD,SAAS,EAAE,sCAAsC;aAClD,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACnC,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;CACF","sourcesContent":["import {\n commitOrganizationGroupPolicyOperation,\n putPrincipalPolicyOperation,\n} from \"@tearleads/validators/operation\";\nimport type {\n CommitOrganizationGroupPolicyRequest,\n OrganizationPrincipalPolicyRequest,\n} from \"@tearleads/validators/request\";\nimport type { PrincipalPolicyBundleResponse } from \"@tearleads/validators/response\";\nimport type { BoundedCache } from \"./ApiCache\";\nimport type { ApiRequestRuntime } from \"./apiRequestRuntime\";\nimport { principalHistoryRequest } from \"./principalHistoryRequest\";\nimport {\n collectPrincipalPolicyPages,\n type PrincipalPolicyPageReadOptions,\n readPrincipalPolicyPages,\n} from \"./principalPolicyPages\";\nimport { dedupedRequest } from \"./requestInternals\";\nimport {\n commitOrganizationGroupPolicy,\n putPrincipalPolicy,\n} from \"./routes/principals/policy\";\nimport type { RequestResultOptions } from \"./types\";\n\nexport class PrincipalPolicyRequests {\n constructor(\n private readonly runtime: ApiRequestRuntime,\n private readonly cache: BoundedCache<\n Promise<PrincipalPolicyBundleResponse | null>\n >,\n private readonly clearWriterProjectionCaches: () => void,\n ) {}\n\n pages(\n principalType: \"group\" | \"organization\",\n principalId: string,\n options: PrincipalPolicyPageReadOptions = {},\n ) {\n return readPrincipalPolicyPages(\n this.runtime,\n principalType,\n principalId,\n options,\n );\n }\n\n get(\n principalType: \"group\" | \"organization\",\n principalId: string,\n options: RequestResultOptions = {},\n ) {\n const request = () =>\n collectPrincipalPolicyPages(\n this.runtime,\n principalType,\n principalId,\n options,\n );\n const key = JSON.stringify([principalType, principalId]);\n // Cancellation, reporting and renewal preferences belong to their caller.\n return Object.keys(options).length > 0\n ? request()\n : dedupedRequest(this.cache, key, request);\n }\n\n put(\n principalType: \"organization\",\n principalId: string,\n input: OrganizationPrincipalPolicyRequest,\n options: RequestResultOptions = {},\n ) {\n const key = JSON.stringify([principalType, principalId]);\n this.cache.delete(key);\n return principalHistoryRequest(this.runtime, {\n path: putPrincipalPolicy.path(principalType, principalId),\n validator: putPrincipalPolicy.isResponse,\n method: putPrincipalPolicy.method,\n body: JSON.stringify(input),\n options: {\n expectedPaymentRequiredOrganizationId: principalId,\n ...options,\n },\n operation: putPrincipalPolicyOperation,\n })\n .then((result) => (result.ok ? result.data : null))\n .finally(() => this.cache.delete(key));\n }\n\n async commitResult(\n organizationId: string,\n groupId: string,\n input: CommitOrganizationGroupPolicyRequest,\n options: RequestResultOptions = {},\n ) {\n const groupKey = JSON.stringify([\"group\", groupId]);\n const organizationKey = JSON.stringify([\"organization\", organizationId]);\n this.cache.delete(groupKey);\n this.cache.delete(organizationKey);\n try {\n return await principalHistoryRequest(this.runtime, {\n path: commitOrganizationGroupPolicy.path(organizationId, groupId),\n validator: commitOrganizationGroupPolicy.isResponse,\n method: commitOrganizationGroupPolicy.method,\n body: JSON.stringify(input),\n options: {\n expectedPaymentRequiredOrganizationId: organizationId,\n ...options,\n },\n operation: commitOrganizationGroupPolicyOperation,\n });\n } finally {\n this.cache.delete(groupKey);\n this.cache.delete(organizationKey);\n this.clearWriterProjectionCaches();\n }\n }\n}\n"]}
1
+ {"version":3,"file":"principalPolicyRequests.js","sourceRoot":"","sources":["principalPolicyRequests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sCAAsC,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AAC,cAAc,EAAE,cAAc,CAAC,CAAC,CAAC;QACzE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC5B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;QACnC,IAAI,CAAC;YACH,OAAO,MAAM,uBAAuB,CAAC,IAAI,CAAC,OAAO,EAAE;gBACjD,IAAI,EAAE,6BAA6B,CAAC,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC;gBACjE,SAAS,EAAE,6BAA6B,CAAC,UAAU;gBACnD,MAAM,EAAE,6BAA6B,CAAC,MAAM;gBAC5C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;gBAC3B,OAAO,EAAE;oBACP,qCAAqC,EAAE,cAAc;oBACrD,GAAG,OAAO;iBACX;gBACD,SAAS,EAAE,sCAAsC;aAClD,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAC5B,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC;YACnC,IAAI,CAAC,2BAA2B,EAAE,CAAC;QACrC,CAAC;IACH,CAAC;CACF","sourcesContent":["import {\n commitOrganizationGroupPolicyOperation,\n putPrincipalPolicyOperation,\n} from \"@tearleads/validators/operation\";\nimport type {\n CommitOrganizationGroupPolicyRequest,\n OrganizationPrincipalPolicyRequest,\n} from \"@tearleads/validators/request\";\nimport type { PrincipalPolicyBundleResponse } from \"@tearleads/validators/response\";\nimport type { BoundedCache } from \"./ApiCache\";\nimport type { ApiRequestRuntime } from \"./apiRequestRuntime\";\nimport { principalHistoryRequest } from \"./principalHistoryRequest\";\nimport {\n collectPrincipalPolicyPages,\n type PrincipalPolicyPageReadOptions,\n readPrincipalPolicyPages,\n} from \"./principalPolicyPages\";\nimport { readProjectionPolicyHistoryPages } from \"./projectionPolicyHistoryPages\";\nimport { dedupedRequest } from \"./requestInternals\";\nimport {\n commitOrganizationGroupPolicy,\n putPrincipalPolicy,\n} from \"./routes/principals/policy\";\nimport type { RequestResultOptions } from \"./types\";\n\nexport class PrincipalPolicyRequests {\n constructor(\n private readonly runtime: ApiRequestRuntime,\n private readonly cache: BoundedCache<\n Promise<PrincipalPolicyBundleResponse | null>\n >,\n private readonly clearWriterProjectionCaches: () => void,\n ) {}\n\n publicPages(\n source: Parameters<typeof readProjectionPolicyHistoryPages>[1],\n options: Parameters<typeof readProjectionPolicyHistoryPages>[2] = {},\n ) {\n return readProjectionPolicyHistoryPages(this.runtime, source, options);\n }\n\n pages(\n principalType: \"group\" | \"organization\",\n principalId: string,\n options: PrincipalPolicyPageReadOptions = {},\n ) {\n return readPrincipalPolicyPages(\n this.runtime,\n principalType,\n principalId,\n options,\n );\n }\n\n get(\n principalType: \"group\" | \"organization\",\n principalId: string,\n options: RequestResultOptions = {},\n ) {\n const request = () =>\n collectPrincipalPolicyPages(\n this.runtime,\n principalType,\n principalId,\n options,\n );\n const key = JSON.stringify([principalType, principalId]);\n // Cancellation, reporting and renewal preferences belong to their caller.\n return Object.keys(options).length > 0\n ? request()\n : dedupedRequest(this.cache, key, request);\n }\n\n put(...args: Parameters<PrincipalPolicyRequests[\"putResult\"]>) {\n return this.putResult(...args).then((result) =>\n result.ok ? result.data : null,\n );\n }\n\n putResult(\n principalType: \"organization\",\n principalId: string,\n input: OrganizationPrincipalPolicyRequest,\n options: RequestResultOptions = {},\n ) {\n const key = JSON.stringify([principalType, principalId]);\n this.cache.delete(key);\n return principalHistoryRequest(this.runtime, {\n path: putPrincipalPolicy.path(principalType, principalId),\n validator: putPrincipalPolicy.isResponse,\n method: putPrincipalPolicy.method,\n body: JSON.stringify(input),\n options: {\n expectedPaymentRequiredOrganizationId: principalId,\n ...options,\n },\n operation: putPrincipalPolicyOperation,\n }).finally(() => this.cache.delete(key));\n }\n\n async commitResult(\n organizationId: string,\n groupId: string,\n input: CommitOrganizationGroupPolicyRequest,\n options: RequestResultOptions = {},\n ) {\n const groupKey = JSON.stringify([\"group\", groupId]);\n const organizationKey = JSON.stringify([\"organization\", organizationId]);\n this.cache.delete(groupKey);\n this.cache.delete(organizationKey);\n try {\n return await principalHistoryRequest(this.runtime, {\n path: commitOrganizationGroupPolicy.path(organizationId, groupId),\n validator: commitOrganizationGroupPolicy.isResponse,\n method: commitOrganizationGroupPolicy.method,\n body: JSON.stringify(input),\n options: {\n expectedPaymentRequiredOrganizationId: organizationId,\n ...options,\n },\n operation: commitOrganizationGroupPolicyOperation,\n });\n } finally {\n this.cache.delete(groupKey);\n this.cache.delete(organizationKey);\n this.clearWriterProjectionCaches();\n }\n }\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import { type PrincipalPolicyHistorySourceResponse, type PrincipalPolicySnapshotPageResponse } from "../validators/response/index.js";
2
+ import type { ApiRequestRuntime } from "./apiRequestRuntime.js";
3
+ import type { RequestResult, RequestResultOptions } from "./types.js";
4
+ export interface ProjectionPolicyHistoryReadOptions extends RequestResultOptions {
5
+ /** Only skip a prefix already authenticated by the caller. */
6
+ readonly afterVersion?: number | undefined;
7
+ }
8
+ /** One bounded public page at a time. Only the caller authenticates its contents. */
9
+ export declare function readProjectionPolicyHistoryPages(runtime: ApiRequestRuntime, input: PrincipalPolicyHistorySourceResponse, options?: ProjectionPolicyHistoryReadOptions): AsyncGenerator<RequestResult<PrincipalPolicySnapshotPageResponse>, void>;
@@ -0,0 +1,88 @@
1
+ import { serializeKeyingCanonicalJson } from "../crypto/index.js";
2
+ import { getProjectionPolicyHistoryOperation, operationRequestPathWithQuery, } from "../validators/operation/index.js";
3
+ import { isPrincipalPolicySnapshotPageResponse, PrincipalPolicyHistorySourceResponseSchema, } from "../validators/response/index.js";
4
+ import { principalHistoryRequest } from "./principalHistoryRequest.js";
5
+ import { PrincipalHistoryRequestContext } from "./principalHistoryRequestContext.js";
6
+ function validPage(page, source, after) {
7
+ const head = source.head;
8
+ const state = page.currentState;
9
+ const through = after + page.previousStates.length;
10
+ return (state.principalType === head.principalType &&
11
+ state.principalId === head.principalId &&
12
+ state.version === head.version &&
13
+ state.stateHash === head.stateHash &&
14
+ state.keyEpoch === head.keyEpoch &&
15
+ state.keyFingerprint === head.keyFingerprint &&
16
+ page.historyPage.afterVersion === after &&
17
+ through < head.version &&
18
+ page.previousStates.every(({ state: entry }, index) => entry.version === after + index + 1 &&
19
+ entry.principalType === head.principalType &&
20
+ entry.principalId === head.principalId) &&
21
+ (page.historyPage.nextAfterVersion === null
22
+ ? through === head.version - 1
23
+ : through > after &&
24
+ through < head.version - 1 &&
25
+ page.historyPage.nextAfterVersion === through));
26
+ }
27
+ /** One bounded public page at a time. Only the caller authenticates its contents. */
28
+ export async function* readProjectionPolicyHistoryPages(runtime, input, options = {}) {
29
+ const parsed = PrincipalPolicyHistorySourceResponseSchema.safeParse(input);
30
+ let afterVersion = options.afterVersion ?? 0;
31
+ const invalid = (message, status = null) => runtime.responseRequest.reportFailure({
32
+ kind: "shape",
33
+ message,
34
+ method: "GET",
35
+ options,
36
+ path: "/principals/history",
37
+ status,
38
+ statusText: "",
39
+ });
40
+ if (!parsed.success ||
41
+ !Number.isSafeInteger(afterVersion) ||
42
+ afterVersion < 0 ||
43
+ afterVersion >= parsed.data.head.version) {
44
+ yield invalid("Invalid projection history source or cursor");
45
+ return;
46
+ }
47
+ const source = structuredClone(parsed.data);
48
+ const context = new PrincipalHistoryRequestContext(runtime, "GET", "/principals/history", options);
49
+ let pinnedBytes;
50
+ while (true) {
51
+ const path = operationRequestPathWithQuery(getProjectionPolicyHistoryOperation, {}, { grant: source.grant, afterVersion });
52
+ const result = await principalHistoryRequest(runtime, {
53
+ path,
54
+ validator: isPrincipalPolicySnapshotPageResponse,
55
+ method: "GET",
56
+ operation: getProjectionPolicyHistoryOperation,
57
+ options,
58
+ context,
59
+ });
60
+ if (!result.ok) {
61
+ yield result;
62
+ return;
63
+ }
64
+ const page = result.data;
65
+ const bytes = serializeKeyingCanonicalJson({
66
+ currentState: page.currentState,
67
+ currentProjection: page.currentProjection,
68
+ currentGrants: page.currentGrants,
69
+ });
70
+ if (!validPage(page, source, afterVersion) ||
71
+ (pinnedBytes !== undefined && bytes !== pinnedBytes)) {
72
+ yield invalid("Projection history page changed its head, order, or cursor", 200);
73
+ return;
74
+ }
75
+ pinnedBytes ??= bytes;
76
+ context.afterReadPage();
77
+ const next = page.historyPage.nextAfterVersion;
78
+ yield result;
79
+ if (context.cancelled()) {
80
+ yield context.failure();
81
+ return;
82
+ }
83
+ if (next === null)
84
+ return;
85
+ afterVersion = next;
86
+ }
87
+ }
88
+ //# sourceMappingURL=projectionPolicyHistoryPages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projectionPolicyHistoryPages.js","sourceRoot":"","sources":["projectionPolicyHistoryPages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,mBAAmB,CAAC;AACjE,OAAO,EACL,mCAAmC,EACnC,6BAA6B,GAC9B,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,qCAAqC,EAErC,0CAA0C,GAE3C,MAAM,gCAAgC,CAAC;AAExC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AASlF,SAAS,SAAS,CAChB,IAAyC,EACzC,MAA4C,EAC5C,KAAa;IAEb,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IACzB,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,CAAC;IAChC,MAAM,OAAO,GAAG,KAAK,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC;IACnD,OAAO,CACL,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC,aAAa;QAC1C,KAAK,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW;QACtC,KAAK,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO;QAC9B,KAAK,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS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AAM,OAAO,CACX,4DAA4D,EAC5D,GAAG,CACJ,CAAC;YACF,OAAO;QACT,CAAC;QACD,WAAW,KAAK,KAAK,CAAC;QACtB,OAAO,CAAC,aAAa,EAAE,CAAC;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,CAAC;QAC/C,MAAM,MAAM,CAAC;QACb,IAAI,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC;YACxB,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;YACxB,OAAO;QACT,CAAC;QACD,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO;QAC1B,YAAY,GAAG,IAAI,CAAC;IACtB,CAAC;AACH,CAAC","sourcesContent":["import { serializeKeyingCanonicalJson } from \"@tearleads/crypto\";\nimport {\n getProjectionPolicyHistoryOperation,\n operationRequestPathWithQuery,\n} from \"@tearleads/validators/operation\";\nimport {\n isPrincipalPolicySnapshotPageResponse,\n type PrincipalPolicyHistorySourceResponse,\n PrincipalPolicyHistorySourceResponseSchema,\n type PrincipalPolicySnapshotPageResponse,\n} from \"@tearleads/validators/response\";\nimport type { ApiRequestRuntime } from \"./apiRequestRuntime\";\nimport { principalHistoryRequest } from \"./principalHistoryRequest\";\nimport { PrincipalHistoryRequestContext } from \"./principalHistoryRequestContext\";\nimport type { RequestResult, RequestResultOptions } from \"./types\";\n\nexport interface ProjectionPolicyHistoryReadOptions\n extends RequestResultOptions {\n /** Only skip a prefix already authenticated by the caller. */\n readonly afterVersion?: number | undefined;\n}\n\nfunction validPage(\n page: PrincipalPolicySnapshotPageResponse,\n source: PrincipalPolicyHistorySourceResponse,\n after: number,\n): boolean {\n const head = source.head;\n const state = page.currentState;\n const through = after + page.previousStates.length;\n return (\n state.principalType === head.principalType &&\n state.principalId === head.principalId &&\n state.version === head.version &&\n state.stateHash === head.stateHash &&\n state.keyEpoch === head.keyEpoch &&\n state.keyFingerprint === head.keyFingerprint &&\n page.historyPage.afterVersion === after &&\n through < head.version &&\n page.previousStates.every(\n ({ state: entry }, index) =>\n entry.version === after + index + 1 &&\n entry.principalType === head.principalType &&\n entry.principalId === head.principalId,\n ) &&\n (page.historyPage.nextAfterVersion === null\n ? through === head.version - 1\n : through > after &&\n through < head.version - 1 &&\n page.historyPage.nextAfterVersion === through)\n );\n}\n\n/** One bounded public page at a time. Only the caller authenticates its contents. */\nexport async function* readProjectionPolicyHistoryPages(\n runtime: ApiRequestRuntime,\n input: PrincipalPolicyHistorySourceResponse,\n options: ProjectionPolicyHistoryReadOptions = {},\n): AsyncGenerator<RequestResult<PrincipalPolicySnapshotPageResponse>, void> {\n const parsed = PrincipalPolicyHistorySourceResponseSchema.safeParse(input);\n let afterVersion = options.afterVersion ?? 0;\n const invalid = (message: string, status: number | null = null) =>\n runtime.responseRequest.reportFailure({\n kind: \"shape\",\n message,\n method: \"GET\",\n options,\n path: \"/principals/history\",\n status,\n statusText: \"\",\n });\n if (\n !parsed.success ||\n !Number.isSafeInteger(afterVersion) ||\n afterVersion < 0 ||\n afterVersion >= parsed.data.head.version\n ) {\n yield invalid(\"Invalid projection history source or cursor\");\n return;\n }\n const source = structuredClone(parsed.data);\n const context = new PrincipalHistoryRequestContext(\n runtime,\n \"GET\",\n \"/principals/history\",\n options,\n );\n let pinnedBytes: string | undefined;\n while (true) {\n const path = operationRequestPathWithQuery(\n getProjectionPolicyHistoryOperation,\n {},\n { grant: source.grant, afterVersion },\n );\n const result = await principalHistoryRequest(runtime, {\n path,\n validator: isPrincipalPolicySnapshotPageResponse,\n method: \"GET\",\n operation: getProjectionPolicyHistoryOperation,\n options,\n context,\n });\n if (!result.ok) {\n yield result;\n return;\n }\n const page = result.data;\n const bytes = serializeKeyingCanonicalJson({\n currentState: page.currentState,\n currentProjection: page.currentProjection,\n currentGrants: page.currentGrants,\n });\n if (\n !validPage(page, source, afterVersion) ||\n (pinnedBytes !== undefined && bytes !== pinnedBytes)\n ) {\n yield invalid(\n \"Projection history page changed its head, order, or cursor\",\n 200,\n );\n return;\n }\n pinnedBytes ??= bytes;\n context.afterReadPage();\n const next = page.historyPage.nextAfterVersion;\n yield result;\n if (context.cancelled()) {\n yield context.failure();\n return;\n }\n if (next === null) return;\n afterVersion = next;\n }\n}\n"]}
@@ -0,0 +1,26 @@
1
+ import { getContainerWriterProjectionOperation, getDocumentWriterProjectionOperation, } from "../validators/operation/index.js";
2
+ import { principalHistoryRequest } from "./principalHistoryRequest.js";
3
+ /** Preparation and body deadlines sit inside projection-history negotiation. */
4
+ export function writerProjectionRequests(runtime) {
5
+ const requestResult = (path, validator, method, body, options, operation) => {
6
+ if (method === "GET" &&
7
+ (operation.id === "containers.writerProjection.get" ||
8
+ operation.id === "documents.writerProjection.get"))
9
+ return principalHistoryRequest(runtime, {
10
+ path,
11
+ validator,
12
+ method,
13
+ options: options ?? {},
14
+ operation: operation.id === "containers.writerProjection.get"
15
+ ? getContainerWriterProjectionOperation
16
+ : getDocumentWriterProjectionOperation,
17
+ });
18
+ return runtime.requestResult(path, validator, method, body, options, operation);
19
+ };
20
+ const request = async (...args) => {
21
+ const result = await requestResult(...args);
22
+ return result.ok ? result.data : null;
23
+ };
24
+ return { request, requestResult };
25
+ }
26
+ //# sourceMappingURL=writerProjectionRequests.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"writerProjectionRequests.js","sourceRoot":"","sources":["writerProjectionRequests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qCAAqC,EACrC,oCAAoC,GACrC,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAGpE,gFAAgF;AAChF,MAAM,UAAU,wBAAwB,CAAC,OAA0B;IAIjE,MAAM,aAAa,GAA6B,CAC9C,IAAI,EACJ,SAAS,EACT,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,EACT,EAAE;QACF,IACE,MAAM,KAAK,KAAK;YAChB,CAAC,SAAS,CAAC,EAAE,KAAK,iCAAiC;gBACjD,SAAS,CAAC,EAAE,KAAK,gCAAgC,CAAC;YAEpD,OAAO,uBAAuB,CAAC,OAAO,EAAE;gBACtC,IAAI;gBACJ,SAAS;gBACT,MAAM;gBACN,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,SAAS,EACP,SAAS,CAAC,EAAE,KAAK,iCAAiC;oBAChD,CAAC,CAAC,qCAAqC;oBACvC,CAAC,CAAC,oCAAoC;aAC3C,CAAC,CAAC;QACL,OAAO,OAAO,CAAC,aAAa,CAC1B,IAAI,EACJ,SAAS,EACT,MAAM,EACN,IAAI,EACJ,OAAO,EACP,SAAS,CACV,CAAC;IACJ,CAAC,CAAC;IACF,MAAM,OAAO,GAAuB,KAAK,EAAE,GAAG,IAAI,EAAE,EAAE;QACpD,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,GAAG,IAAI,CAAC,CAAC;QAC5C,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IACxC,CAAC,CAAC;IACF,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC;AACpC,CAAC","sourcesContent":["import {\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n} from \"@tearleads/validators/operation\";\nimport type { ApiRequestRuntime } from \"./apiRequestRuntime\";\nimport { principalHistoryRequest } from \"./principalHistoryRequest\";\nimport type { OperationRequestFn, OperationRequestResultFn } from \"./types\";\n\n/** Preparation and body deadlines sit inside projection-history negotiation. */\nexport function writerProjectionRequests(runtime: ApiRequestRuntime): {\n request: OperationRequestFn;\n requestResult: OperationRequestResultFn;\n} {\n const requestResult: OperationRequestResultFn = (\n path,\n validator,\n method,\n body,\n options,\n operation,\n ) => {\n if (\n method === \"GET\" &&\n (operation.id === \"containers.writerProjection.get\" ||\n operation.id === \"documents.writerProjection.get\")\n )\n return principalHistoryRequest(runtime, {\n path,\n validator,\n method,\n options: options ?? {},\n operation:\n operation.id === \"containers.writerProjection.get\"\n ? getContainerWriterProjectionOperation\n : getDocumentWriterProjectionOperation,\n });\n return runtime.requestResult(\n path,\n validator,\n method,\n body,\n options,\n operation,\n );\n };\n const request: OperationRequestFn = async (...args) => {\n const result = await requestResult(...args);\n return result.ok ? result.data : null;\n };\n return { request, requestResult };\n}\n"]}
@@ -20,7 +20,7 @@ export { bytesToHex, hexToBytes } from "./hex.js";
20
20
  export { createIdentitySeedPhrase, createIdentitySeedPhraseFromEntropy, generateIdentityKeyPairsFromSeedPhrase, IDENTITY_SEED_PHRASE_DERIVATION_SUITE, IDENTITY_SEED_PHRASE_ENTROPY_BYTES, IDENTITY_SEED_PHRASE_STRENGTH_BITS, IDENTITY_SEED_PHRASE_WORDS, type IdentitySeedPhraseKeyPairs, normalizeIdentitySeedPhrase, validateIdentitySeedPhrase, } from "./identitySeedPhrase.js";
21
21
  export { createIncrementalSha256, type IncrementalSha256, } from "./incrementalSha256.js";
22
22
  export type { AccessEvent, AccessEventType, AccessManifest, AccessManifestCheckpoint, AccessManifestTransparencyLeaf, AccessObjectKind, AnyVerifiedAccessManifest, AnyVerifiedPrincipalPolicy, AttachmentAccessEventBody, AttachmentBindAccessEventBody, AttachmentDetachAccessEventBody, BlobAccessManifest, BlobContentKeyTarget, ContainerAccessEventBody, ContainerAccessKeyState, ContainerAccessLevel, ContainerAccessManifest, ContainerAccessManifestState, ContainerAccessStructural, ContainerCreateAccessEventBody, ContainerDirectGrant, ContainerGrantAccessEventBody, ContainerGrantPrincipalHead, ContainerGrantSubjectType, ContainerKekKeyring, ContainerKekKeyringEntry, ContainerKekPredecessorBridge, ContainerKekRecipientTarget, ContainerKekTarget, ContainerKeyEpoch, ContainerKeyWrap, ContainerMoveAccessEventBody, ContainerReciteAccessEventBody, ContainerRekeyAccessEventBody, ContainerRevokeAccessEventBody, ContainerUserRecipientKey, ContentObjectKind, ContentRecordEncryptionSuite, ContentRecordNonceDomain, DeriveBlobKekTargetsInput, DeriveContainerKekRecipientTargetsInput, DeriveDocumentKekTargetsInput, DocumentAccessEventBody, DocumentContentKeyTarget, DocumentContentRecordMetadataInput, DocumentLinkAccessEventBody, DocumentLinkSetManifestState, DocumentLinkSetStructural, DocumentPurgeAccessEventBody, DocumentUnlinkAccessEventBody, IdentityStateCheckpoint, IdentityStateHead, IdentityStateTransparencyLeaf, KekRecipientKind, KeyingCanonicalJson, KeyingHashDomain, KeyingLocalCheckpointStore, KeyingVerificationCode, KeyingVerificationResult, ManagedPrincipalKind, PrincipalHistoryIndexNode, PrincipalPolicyAuthorization, PrincipalPolicyBundle, PrincipalPolicyCheckpoint, PrincipalPolicyCurrent, PrincipalPolicyExternalAuthority, PrincipalPolicyExternalAuthorityState, PrincipalPolicyHistoryInput, PrincipalPolicyHistoryPage, PrincipalPolicyHistoryProgressOptions, PrincipalPolicyHistoryReferenceProof, PrincipalPolicyHistoryVerifier, PrincipalPolicyMemberEnvelopes, PrincipalPolicyPayload, PrincipalPolicySignedState, PrincipalPolicySignerPublicKey, PrincipalPolicySnapshot, PrincipalPolicyStateChainEntry, PrincipalPolicyTransitionMismatch, PrincipalPolicyTransitionMismatchCode, PrincipalPolicyTransparencyLeaf, ReferencedPrincipalHead, SignedTransparencyTreeHead, TransparencyConsistencyProof, TransparencyInclusionProof, TransparencyLeaf, TransparencyLeafKind, TransparencyTreeCheckpoint, UnsignedAccessEvent, UnsignedTransparencyTreeHead, UnsignedWriteHeader, VerifiedAccessEvent, VerifiedAccessManifest, VerifiedAccessManifestCheckpointEvidence, VerifiedAccessManifestSnapshot, VerifiedAttachmentBinding, VerifiedAttachmentDetach, VerifiedBlobKekTargets, VerifiedContainerAccessManifest, VerifiedContainerKekState, VerifiedContainerParentEdge, VerifiedDocumentKekTargets, VerifiedDocumentLinkSetManifest, VerifiedDocumentLinkSetSnapshot, VerifiedDocumentLinkSetStateEvidence, VerifiedIdentityState, VerifiedPrincipalPolicy, VerifiedPrincipalPolicyCurrent, VerifiedPrincipalPolicyHistory, VerifiedPrincipalPolicySelection, VerifiedPrincipalPolicySnapshot, VerifiedTransparencyProof, VerifiedTransparencyTreeHead, VerifiedWriteHeader, VerifyAccessEventInput, VerifyAccessManifestInput, VerifyAttachmentBindingEventInput, VerifyAttachmentDetachEventInput, VerifyContainerAccessManifestInput, VerifyContainerKekStateInput, VerifyContainerParentEdgeInput, VerifyDocumentLinkSetManifestInput, VerifyDocumentPurgeEventInput, VerifyIdentityStateCheckpointInput, VerifyPrincipalPolicyBundleInput, VerifyPrincipalPolicySnapshotInput, VerifySignedTransparencyTreeHeadInput, VerifyTransparencyConsistencyProofInput, VerifyTransparencyInclusionProofInput, VerifyTransparencyProofInput, VerifyWriteHeaderInput, WriteHeader, } from "./keying.js";
23
- export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
23
+ export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
24
24
  export { organizationReplacementAuthorizationPayload, organizationReplacementSigningBytes, signOrganizationReplacementAuthorization, type VerifiedOrganizationReplacementAuthorization, verifyOrganizationReplacementAuthorization, } from "./organizationReplacement.js";
25
25
  export { computePrincipalContainerGrantRoot, normalizePrincipalContainerGrants, } from "./principalContainerGrants.js";
26
26
  export { computePrincipalMemberEnvelopesRoot, normalizePrincipalStateMemberEnvelopes, PrincipalMemberEnvelopeValidationError, } from "./principalMemberEnvelopes.js";
@@ -14,7 +14,7 @@ export { decryptGroupMetadata, encodeBuiltinGroupMetadata, encryptGroupMetadata,
14
14
  export { bytesToHex, hexToBytes } from "./hex.js";
15
15
  export { createIdentitySeedPhrase, createIdentitySeedPhraseFromEntropy, generateIdentityKeyPairsFromSeedPhrase, IDENTITY_SEED_PHRASE_DERIVATION_SUITE, IDENTITY_SEED_PHRASE_ENTROPY_BYTES, IDENTITY_SEED_PHRASE_STRENGTH_BITS, IDENTITY_SEED_PHRASE_WORDS, normalizeIdentitySeedPhrase, validateIdentitySeedPhrase, } from "./identitySeedPhrase.js";
16
16
  export { createIncrementalSha256, } from "./incrementalSha256.js";
17
- export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
17
+ export { ACCESS_MANIFEST_VERIFICATION_REVISION, accessManifestCheckpointFromManifest, accessManifestTransparencyLeaf, assertSealedContainerKekKeyringLength, BLOB_CONTENT_KEY_WRAP_SUITE, CONTAINER_KEK_KEYRING_ENTRY_BYTES, CONTAINER_KEK_KEYRING_FORMAT_VERSION, CONTAINER_KEK_KEYRING_HEADER_BYTES, CONTAINER_KEK_KEYRING_SEAL_SUITE, CONTAINER_KEK_MATERIAL_ID_PREFIX, CONTAINER_KEK_PARENT_WRAP_SUITE, CONTAINER_KEK_PREDECESSOR_WRAP_SUITE, CONTAINER_KEK_USER_WRAP_SUITE, CONTENT_RECORD_ENCRYPTION_SUITE, computeAccessEventBodyHash, computeAccessEventHash, computeAccessManifestHash, computeBlobAccessManifestHash, computeBlobContentKeyTargetHash, computeContainerAccessKeyTargetHash, computeContainerAccessStructuralHash, computeContainerDirectGrantRoot, computeContainerKekKeyringHash, computeContainerKekMaterialId, computeContainerKekPredecessorBridgeHash, computeContainerKekRecipientTargetHash, computeContainerKeyEpochHash, computeContentRecordNonceDomainHash, computeDocumentContentKeyTargetHash, computeDocumentContentRecordCiphertextHash, computeDocumentContentRecordMetadataHash, computeDocumentContentRecordPlaintextHash, computeDocumentLinkSetGrantRoot, computeDocumentLinkSetKeyTargetHash, computeDocumentLinkSetStructuralHash, computeKeyingDomainHash, computeTransparencyLeafHash, computeTransparencyMerkleRoot, computeWriteHeaderHash, createContainerKekPredecessorBridge, createPrincipalHistoryIndexProof, createPrincipalPolicyHistoryVerifier, createTransparencyConsistencyProof, createTransparencyInclusionProof, DOCUMENT_CONTENT_KEY_WRAP_SUITE, deriveBlobKekTargets, deriveContainerAccessManifest, deriveContainerKekRecipientTargets, deriveContainerKekWrappingPublicKey, deriveDocumentKekTargets, deriveDocumentLinkSetManifest, derivePrincipalRecipientKeyEpochId, documentContentRecordMetadata, expectedSealedContainerKekKeyringBytes, getPrincipalPolicyTransitionMismatch, getPrincipalPolicyTransitionMismatchReason, identityStateTransparencyLeaf, isContainerKekMaterialId, isKeyingVerificationCode, KEYING_VERIFICATION_CODES, KeyingVerificationError, MAX_CONTAINER_KEY_EPOCH, MAX_CONTAINER_RECITATION_EPOCH, makeVerifiedAccessEvent, makeVerifiedBlobKekTargets, makeVerifiedContainerAccessManifest, makeVerifiedContainerKekState, makeVerifiedDocumentKekTargets, makeVerifiedDocumentLinkSetManifest, makeVerifiedDocumentLinkSetSnapshot, makeVerifiedPrincipalPolicy, normalizeAttachmentAccessEventBody, normalizeContainerAccessEventBody, normalizeContainerKekKeyring, normalizeContainerKekPredecessorBridge, normalizeDocumentAccessEventBody, normalizeDocumentPurgeAccessEventBody, openContainerKekKeyring, PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT, PRINCIPAL_HISTORY_VERIFICATION_REVISION, principalHistoryIndexLeaf, principalPolicyMatchesReference, principalPolicyTransparencyLeaf, resolveContainerPathUserAccessLevel, resolveContainerStatePathUserAccessLevel, resolveHistoricalContainerPathUserAccessLevel, resolvePrincipalHistoryIndexProof, restorePrincipalPolicyHistoryVerifier, sealContainerKekKeyring, selectPrincipalPolicyAuthorization, serializeKeyingCanonicalJson, signAccessEvent, signTransparencyTreeHead, signWriteHeader, unwrapContainerKekParentWrap, unwrapContainerKekPredecessorBridge, verifyAccessManifest, verifyAccessManifestLocalCheckpoint, verifyAccessManifestSnapshot, verifyAttachmentBindingEvent, verifyAttachmentDetachEvent, verifyContainerAccessManifest, verifyContainerKekKeyringEntry, verifyContainerKekState, verifyContainerParentEdge, verifyDocumentLinkSetManifest, verifyDocumentLinkSetSnapshot, verifyDocumentPurgeEvent, verifyIdentityStateCheckpoint, verifyPrincipalPolicyBundle, verifyPrincipalPolicyBundleAgainstHistory, verifyPrincipalPolicyCheckpoint, verifyPrincipalPolicyCurrent, verifyPrincipalPolicyCurrentMutation, verifyPrincipalPolicyCurrentSuccessor, verifyPrincipalPolicyHistoryReferences, verifyPrincipalPolicySnapshot, verifySignedAccessEvent, verifySignedTransparencyTreeHead, verifyTransparencyConsistencyProof, verifyTransparencyInclusionProof, verifyTransparencyProof, verifyWriteHeader, } from "./keying.js";
18
18
  export { organizationReplacementAuthorizationPayload, organizationReplacementSigningBytes, signOrganizationReplacementAuthorization, verifyOrganizationReplacementAuthorization, } from "./organizationReplacement.js";
19
19
  export { computePrincipalContainerGrantRoot, normalizePrincipalContainerGrants, } from "./principalContainerGrants.js";
20
20
  export { computePrincipalMemberEnvelopesRoot, normalizePrincipalStateMemberEnvelopes, PrincipalMemberEnvelopeValidationError, } from "./principalMemberEnvelopes.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,OAAO,EACL,8BAA8B,EAC9B,mBAAmB,EACnB,yBAAyB,EACzB,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,0BAA0B,EAC1B,4BAA4B,EAC5B,qBAAqB,EACrB,8BAA8B,EAC9B,iBAAiB,EACjB,0BAA0B,EAC1B,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,oBAAoB,EACpB,yBAAyB,EACzB,yBAAyB,EACzB,qBAAqB,EACrB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,aAAa,CAAC;AAKrB,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,gBAAgB,EAChB,cAAc,GACf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAE5E,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,2BAA2B,EAC3B,2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C,mCAAmC,EACnC,wCAAwC,EAExC,0CAA0C,GAC3C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,kCAAkC,EAClC,iCAAiC,GAClC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,mCAAmC,EACnC,sCAAsC,EACtC,sCAAsC,GACvC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,8BAA8B,EAC9B,mCAAmC,GACpC,MAAM,kCAAkC,CAAC;AAiB1C,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,yBAAyB,EACzB,0CAA0C,EAC1C,gCAAgC,EAChC,+BAA+B,EAC/B,yBAAyB,EACzB,mCAAmC,EACnC,8BAA8B,EAC9B,+BAA+B,EAC/B,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EAExB,qBAAqB,EAErB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,aAAa,CAAC","sourcesContent":["export { BlobEnvelopeError } from \"./blobEnvelopeError\";\nexport type {\n BlobEnvelopeHeaderRecord,\n BlobEnvelopeRecord,\n} from \"./blobEnvelopeReader\";\nexport {\n MAX_BLOB_ENVELOPE_HEADER_BYTES,\n parseBlobEnvelopeV2,\n parseBlobEnvelopeV2Header,\n readBlobEnvelopeHeaderByteLength,\n} from \"./blobEnvelopeReader\";\nexport type { BlobEnvelopeV2Header } from \"./blobEnvelopeV2\";\nexport {\n BLOB_CHUNK_SIZE_BYTES,\n BLOB_ENCRYPTED_BYTES_FORMAT,\n BLOB_ENCRYPTED_BYTES_VERSION,\n BLOB_ENVELOPE_MAGIC_BYTES,\n BLOB_ENVELOPE_PREFIX_BYTES,\n blobChunkPlaintextByteLength,\n computeBlobChunkCount,\n computeBlobEncryptedByteLength,\n deriveBlobChunkIv,\n encodeBlobEnvelopeV2Header,\n joinBlobPartBytes,\n MAX_BLOB_CHUNK_COUNT,\n normalizeBlobChunkSize,\n} from \"./blobEnvelopeV2\";\nexport { compareCanonicalStrings } from \"./canonicalOrdering\";\nexport {\n AUTH_CHALLENGE_BYTES,\n AUTH_CHALLENGE_HEX_LENGTH,\n authChallengeSigningBytes,\n CHALLENGE_TTL_SECONDS,\n canonicalAuthOrigin,\n generateChallenge,\n} from \"./challenge\";\nexport type {\n ContentKeyEnvelopeKind,\n ContentKeyWrapBinding,\n} from \"./contentKeyEnvelope\";\nexport {\n ContentKeyEnvelopeError,\n decodeContentKeyEnvelope,\n unwrapContentKey,\n wrapContentKey,\n} from \"./contentKeyEnvelope\";\nexport { decryptAsRecipient } from \"./encapsulation/decryptAsRecipient\";\nexport { encryptForRecipients } from \"./encapsulation/encryptForRecipients\";\nexport type { EncapsulationKeyPair } from \"./encapsulation/generateKeyPair\";\nexport {\n generateKemKeyPair,\n generateKemSeedAndKeyPair,\n ML_KEM1024_CIPHERTEXT_BYTES,\n ML_KEM1024_PUBLIC_KEY_BYTES,\n ML_KEM1024_SECRET_KEY_BYTES,\n ML_KEM1024_SEED_BYTES,\n} from \"./encapsulation/generateKeyPair\";\nexport type { EncryptedEnvelope, RecipientEntry } from \"./encapsulation/types\";\nexport { unwrapDek } from \"./encapsulation/unwrapDek\";\nexport { wrapDekForRecipients } from \"./encapsulation/wrapDek\";\nexport { toFingerprint } from \"./fingerprint\";\nexport {\n decryptGroupMetadata,\n encodeBuiltinGroupMetadata,\n encryptGroupMetadata,\n type GroupMetadata,\n type GroupMetadataKey,\n readGroupMetadata,\n} from \"./groupMetadata\";\nexport { bytesToHex, hexToBytes } from \"./hex\";\nexport {\n createIdentitySeedPhrase,\n createIdentitySeedPhraseFromEntropy,\n generateIdentityKeyPairsFromSeedPhrase,\n IDENTITY_SEED_PHRASE_DERIVATION_SUITE,\n IDENTITY_SEED_PHRASE_ENTROPY_BYTES,\n IDENTITY_SEED_PHRASE_STRENGTH_BITS,\n IDENTITY_SEED_PHRASE_WORDS,\n type IdentitySeedPhraseKeyPairs,\n normalizeIdentitySeedPhrase,\n validateIdentitySeedPhrase,\n} from \"./identitySeedPhrase\";\nexport {\n createIncrementalSha256,\n type IncrementalSha256,\n} from \"./incrementalSha256\";\nexport type {\n AccessEvent,\n AccessEventType,\n AccessManifest,\n AccessManifestCheckpoint,\n AccessManifestTransparencyLeaf,\n AccessObjectKind,\n AnyVerifiedAccessManifest,\n AnyVerifiedPrincipalPolicy,\n AttachmentAccessEventBody,\n AttachmentBindAccessEventBody,\n AttachmentDetachAccessEventBody,\n BlobAccessManifest,\n BlobContentKeyTarget,\n ContainerAccessEventBody,\n ContainerAccessKeyState,\n ContainerAccessLevel,\n ContainerAccessManifest,\n ContainerAccessManifestState,\n ContainerAccessStructural,\n ContainerCreateAccessEventBody,\n ContainerDirectGrant,\n ContainerGrantAccessEventBody,\n ContainerGrantPrincipalHead,\n ContainerGrantSubjectType,\n ContainerKekKeyring,\n ContainerKekKeyringEntry,\n ContainerKekPredecessorBridge,\n ContainerKekRecipientTarget,\n ContainerKekTarget,\n ContainerKeyEpoch,\n ContainerKeyWrap,\n ContainerMoveAccessEventBody,\n ContainerReciteAccessEventBody,\n ContainerRekeyAccessEventBody,\n ContainerRevokeAccessEventBody,\n ContainerUserRecipientKey,\n ContentObjectKind,\n ContentRecordEncryptionSuite,\n ContentRecordNonceDomain,\n DeriveBlobKekTargetsInput,\n DeriveContainerKekRecipientTargetsInput,\n DeriveDocumentKekTargetsInput,\n DocumentAccessEventBody,\n DocumentContentKeyTarget,\n DocumentContentRecordMetadataInput,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentLinkSetStructural,\n DocumentPurgeAccessEventBody,\n DocumentUnlinkAccessEventBody,\n IdentityStateCheckpoint,\n IdentityStateHead,\n IdentityStateTransparencyLeaf,\n KekRecipientKind,\n KeyingCanonicalJson,\n KeyingHashDomain,\n KeyingLocalCheckpointStore,\n KeyingVerificationCode,\n KeyingVerificationResult,\n ManagedPrincipalKind,\n PrincipalHistoryIndexNode,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyCurrent,\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryReferenceProof,\n PrincipalPolicyHistoryVerifier,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n PrincipalPolicyTransparencyLeaf,\n ReferencedPrincipalHead,\n SignedTransparencyTreeHead,\n TransparencyConsistencyProof,\n TransparencyInclusionProof,\n TransparencyLeaf,\n TransparencyLeafKind,\n TransparencyTreeCheckpoint,\n UnsignedAccessEvent,\n UnsignedTransparencyTreeHead,\n UnsignedWriteHeader,\n VerifiedAccessEvent,\n VerifiedAccessManifest,\n VerifiedAccessManifestCheckpointEvidence,\n VerifiedAccessManifestSnapshot,\n VerifiedAttachmentBinding,\n VerifiedAttachmentDetach,\n VerifiedBlobKekTargets,\n VerifiedContainerAccessManifest,\n VerifiedContainerKekState,\n VerifiedContainerParentEdge,\n VerifiedDocumentKekTargets,\n VerifiedDocumentLinkSetManifest,\n VerifiedDocumentLinkSetSnapshot,\n VerifiedDocumentLinkSetStateEvidence,\n VerifiedIdentityState,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicyCurrent,\n VerifiedPrincipalPolicyHistory,\n VerifiedPrincipalPolicySelection,\n VerifiedPrincipalPolicySnapshot,\n VerifiedTransparencyProof,\n VerifiedTransparencyTreeHead,\n VerifiedWriteHeader,\n VerifyAccessEventInput,\n VerifyAccessManifestInput,\n VerifyAttachmentBindingEventInput,\n VerifyAttachmentDetachEventInput,\n VerifyContainerAccessManifestInput,\n VerifyContainerKekStateInput,\n VerifyContainerParentEdgeInput,\n VerifyDocumentLinkSetManifestInput,\n VerifyDocumentPurgeEventInput,\n VerifyIdentityStateCheckpointInput,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n VerifySignedTransparencyTreeHeadInput,\n VerifyTransparencyConsistencyProofInput,\n VerifyTransparencyInclusionProofInput,\n VerifyTransparencyProofInput,\n VerifyWriteHeaderInput,\n WriteHeader,\n} from \"./keying\";\nexport {\n ACCESS_MANIFEST_VERIFICATION_REVISION,\n accessManifestCheckpointFromManifest,\n accessManifestTransparencyLeaf,\n assertSealedContainerKekKeyringLength,\n BLOB_CONTENT_KEY_WRAP_SUITE,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n CONTAINER_KEK_KEYRING_SEAL_SUITE,\n CONTAINER_KEK_MATERIAL_ID_PREFIX,\n CONTAINER_KEK_PARENT_WRAP_SUITE,\n CONTAINER_KEK_PREDECESSOR_WRAP_SUITE,\n CONTAINER_KEK_USER_WRAP_SUITE,\n CONTENT_RECORD_ENCRYPTION_SUITE,\n computeAccessEventBodyHash,\n computeAccessEventHash,\n computeAccessManifestHash,\n computeBlobAccessManifestHash,\n computeBlobContentKeyTargetHash,\n computeContainerAccessKeyTargetHash,\n computeContainerAccessStructuralHash,\n computeContainerDirectGrantRoot,\n computeContainerKekKeyringHash,\n computeContainerKekMaterialId,\n computeContainerKekPredecessorBridgeHash,\n computeContainerKekRecipientTargetHash,\n computeContainerKeyEpochHash,\n computeContentRecordNonceDomainHash,\n computeDocumentContentKeyTargetHash,\n computeDocumentContentRecordCiphertextHash,\n computeDocumentContentRecordMetadataHash,\n computeDocumentContentRecordPlaintextHash,\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n computeKeyingDomainHash,\n computeTransparencyLeafHash,\n computeTransparencyMerkleRoot,\n computeWriteHeaderHash,\n createContainerKekPredecessorBridge,\n createPrincipalHistoryIndexProof,\n createPrincipalPolicyHistoryVerifier,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n DOCUMENT_CONTENT_KEY_WRAP_SUITE,\n deriveBlobKekTargets,\n deriveContainerAccessManifest,\n deriveContainerKekRecipientTargets,\n deriveContainerKekWrappingPublicKey,\n deriveDocumentKekTargets,\n deriveDocumentLinkSetManifest,\n derivePrincipalRecipientKeyEpochId,\n documentContentRecordMetadata,\n expectedSealedContainerKekKeyringBytes,\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n identityStateTransparencyLeaf,\n isContainerKekMaterialId,\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n KeyingVerificationError,\n MAX_CONTAINER_KEY_EPOCH,\n MAX_CONTAINER_RECITATION_EPOCH,\n makeVerifiedAccessEvent,\n makeVerifiedBlobKekTargets,\n makeVerifiedContainerAccessManifest,\n makeVerifiedContainerKekState,\n makeVerifiedDocumentKekTargets,\n makeVerifiedDocumentLinkSetManifest,\n makeVerifiedDocumentLinkSetSnapshot,\n makeVerifiedPrincipalPolicy,\n normalizeAttachmentAccessEventBody,\n normalizeContainerAccessEventBody,\n normalizeContainerKekKeyring,\n normalizeContainerKekPredecessorBridge,\n normalizeDocumentAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n openContainerKekKeyring,\n PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT,\n PRINCIPAL_HISTORY_VERIFICATION_REVISION,\n principalHistoryIndexLeaf,\n principalPolicyMatchesReference,\n principalPolicyTransparencyLeaf,\n resolveContainerPathUserAccessLevel,\n resolveContainerStatePathUserAccessLevel,\n resolveHistoricalContainerPathUserAccessLevel,\n resolvePrincipalHistoryIndexProof,\n restorePrincipalPolicyHistoryVerifier,\n sealContainerKekKeyring,\n selectPrincipalPolicyAuthorization,\n serializeKeyingCanonicalJson,\n signAccessEvent,\n signTransparencyTreeHead,\n signWriteHeader,\n unwrapContainerKekParentWrap,\n unwrapContainerKekPredecessorBridge,\n verifyAccessManifest,\n verifyAccessManifestLocalCheckpoint,\n verifyAccessManifestSnapshot,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n verifyContainerAccessManifest,\n verifyContainerKekKeyringEntry,\n verifyContainerKekState,\n verifyContainerParentEdge,\n verifyDocumentLinkSetManifest,\n verifyDocumentLinkSetSnapshot,\n verifyDocumentPurgeEvent,\n verifyIdentityStateCheckpoint,\n verifyPrincipalPolicyBundle,\n verifyPrincipalPolicyBundleAgainstHistory,\n verifyPrincipalPolicyCheckpoint,\n verifyPrincipalPolicyCurrent,\n verifyPrincipalPolicyHistoryReferences,\n verifyPrincipalPolicySnapshot,\n verifySignedAccessEvent,\n verifySignedTransparencyTreeHead,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n verifyTransparencyProof,\n verifyWriteHeader,\n} from \"./keying\";\nexport {\n organizationReplacementAuthorizationPayload,\n organizationReplacementSigningBytes,\n signOrganizationReplacementAuthorization,\n type VerifiedOrganizationReplacementAuthorization,\n verifyOrganizationReplacementAuthorization,\n} from \"./organizationReplacement\";\nexport {\n computePrincipalContainerGrantRoot,\n normalizePrincipalContainerGrants,\n} from \"./principalContainerGrants\";\nexport {\n computePrincipalMemberEnvelopesRoot,\n normalizePrincipalStateMemberEnvelopes,\n PrincipalMemberEnvelopeValidationError,\n} from \"./principalMemberEnvelopes\";\nexport type { PrincipalPolicyValidationErrorCode } from \"./principalPolicyValidationError\";\nexport {\n PrincipalPolicyValidationError,\n throwPrincipalPolicyValidationError,\n} from \"./principalPolicyValidationError\";\nexport type {\n ManagedRecipientPrincipalType,\n PrincipalContainerGrant,\n PrincipalContainerGrantAccessLevel,\n PrincipalProjectionMember,\n PrincipalProjectionRole,\n PrincipalStateExternalAuthority,\n PrincipalStateHeaderInput,\n PrincipalStateMember,\n PrincipalStateMemberEnvelope,\n PrincipalStateMembershipMode,\n PrincipalStatePayloadCipherSuite,\n PrincipalStateSigningInput,\n SignedPrincipalState,\n UnsignedPrincipalState,\n} from \"./principalState\";\nexport {\n buildPrincipalStateSigningInput,\n computePrincipalMembershipRoot,\n computePrincipalProjectionRoot,\n computePrincipalStateHash,\n computePrincipalStatePayloadCiphertextHash,\n derivePrincipalProjectionMembers,\n isManagedRecipientPrincipalType,\n isPrincipalProjectionRole,\n normalizePrincipalProjectionMembers,\n normalizePrincipalStateMembers,\n serializeUnsignedPrincipalState,\n signPrincipalState,\n} from \"./principalState\";\nexport {\n verifySignedPrincipalState,\n verifySignedPrincipalStateResult,\n} from \"./principalStateVerification\";\nexport {\n captureProjectionHistory,\n type HistoryProjection,\n omitProjectionHistory,\n type RetainedProjectionHistory,\n restoreProjectionHistory,\n} from \"./projectionHistory\";\nexport type { SigningKeyPair } from \"./signing/generateKeyPair\";\nexport {\n generateSigningKeyPair,\n generateSigningSeedAndKeyPair,\n ML_DSA87_PUBLIC_KEY_BYTES,\n ML_DSA87_SECRET_KEY_BYTES,\n ML_DSA87_SIGNATURE_BYTES,\n} from \"./signing/generateKeyPair\";\nexport { sign } from \"./signing/sign\";\nexport { verify } from \"./signing/verify\";\nexport type { SymmetricCiphertext } from \"./symmetric\";\nexport {\n AES_256_KEY_BYTES,\n AES_GCM_IV_BYTES,\n AES_GCM_TAG_BYTES,\n assertAesGcmIv,\n createAesGcmIv,\n decryptWithDek,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B1C,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,8BAA8B,EAC9B,yBAAyB,EACzB,0CAA0C,EAC1C,gCAAgC,EAChC,+BAA+B,EAC/B,yBAAyB,EACzB,mCAAmC,EACnC,8BAA8B,EAC9B,+BAA+B,EAC/B,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,0BAA0B,EAC1B,gCAAgC,GACjC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,wBAAwB,EAExB,qBAAqB,EAErB,wBAAwB,GACzB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,yBAAyB,EACzB,yBAAyB,EACzB,wBAAwB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE1C,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,GACf,MAAM,aAAa,CAAC","sourcesContent":["export { BlobEnvelopeError } from \"./blobEnvelopeError\";\nexport type {\n BlobEnvelopeHeaderRecord,\n BlobEnvelopeRecord,\n} from \"./blobEnvelopeReader\";\nexport {\n MAX_BLOB_ENVELOPE_HEADER_BYTES,\n parseBlobEnvelopeV2,\n parseBlobEnvelopeV2Header,\n readBlobEnvelopeHeaderByteLength,\n} from \"./blobEnvelopeReader\";\nexport type { BlobEnvelopeV2Header } from \"./blobEnvelopeV2\";\nexport {\n BLOB_CHUNK_SIZE_BYTES,\n BLOB_ENCRYPTED_BYTES_FORMAT,\n BLOB_ENCRYPTED_BYTES_VERSION,\n BLOB_ENVELOPE_MAGIC_BYTES,\n BLOB_ENVELOPE_PREFIX_BYTES,\n blobChunkPlaintextByteLength,\n computeBlobChunkCount,\n computeBlobEncryptedByteLength,\n deriveBlobChunkIv,\n encodeBlobEnvelopeV2Header,\n joinBlobPartBytes,\n MAX_BLOB_CHUNK_COUNT,\n normalizeBlobChunkSize,\n} from \"./blobEnvelopeV2\";\nexport { compareCanonicalStrings } from \"./canonicalOrdering\";\nexport {\n AUTH_CHALLENGE_BYTES,\n AUTH_CHALLENGE_HEX_LENGTH,\n authChallengeSigningBytes,\n CHALLENGE_TTL_SECONDS,\n canonicalAuthOrigin,\n generateChallenge,\n} from \"./challenge\";\nexport type {\n ContentKeyEnvelopeKind,\n ContentKeyWrapBinding,\n} from \"./contentKeyEnvelope\";\nexport {\n ContentKeyEnvelopeError,\n decodeContentKeyEnvelope,\n unwrapContentKey,\n wrapContentKey,\n} from \"./contentKeyEnvelope\";\nexport { decryptAsRecipient } from \"./encapsulation/decryptAsRecipient\";\nexport { encryptForRecipients } from \"./encapsulation/encryptForRecipients\";\nexport type { EncapsulationKeyPair } from \"./encapsulation/generateKeyPair\";\nexport {\n generateKemKeyPair,\n generateKemSeedAndKeyPair,\n ML_KEM1024_CIPHERTEXT_BYTES,\n ML_KEM1024_PUBLIC_KEY_BYTES,\n ML_KEM1024_SECRET_KEY_BYTES,\n ML_KEM1024_SEED_BYTES,\n} from \"./encapsulation/generateKeyPair\";\nexport type { EncryptedEnvelope, RecipientEntry } from \"./encapsulation/types\";\nexport { unwrapDek } from \"./encapsulation/unwrapDek\";\nexport { wrapDekForRecipients } from \"./encapsulation/wrapDek\";\nexport { toFingerprint } from \"./fingerprint\";\nexport {\n decryptGroupMetadata,\n encodeBuiltinGroupMetadata,\n encryptGroupMetadata,\n type GroupMetadata,\n type GroupMetadataKey,\n readGroupMetadata,\n} from \"./groupMetadata\";\nexport { bytesToHex, hexToBytes } from \"./hex\";\nexport {\n createIdentitySeedPhrase,\n createIdentitySeedPhraseFromEntropy,\n generateIdentityKeyPairsFromSeedPhrase,\n IDENTITY_SEED_PHRASE_DERIVATION_SUITE,\n IDENTITY_SEED_PHRASE_ENTROPY_BYTES,\n IDENTITY_SEED_PHRASE_STRENGTH_BITS,\n IDENTITY_SEED_PHRASE_WORDS,\n type IdentitySeedPhraseKeyPairs,\n normalizeIdentitySeedPhrase,\n validateIdentitySeedPhrase,\n} from \"./identitySeedPhrase\";\nexport {\n createIncrementalSha256,\n type IncrementalSha256,\n} from \"./incrementalSha256\";\nexport type {\n AccessEvent,\n AccessEventType,\n AccessManifest,\n AccessManifestCheckpoint,\n AccessManifestTransparencyLeaf,\n AccessObjectKind,\n AnyVerifiedAccessManifest,\n AnyVerifiedPrincipalPolicy,\n AttachmentAccessEventBody,\n AttachmentBindAccessEventBody,\n AttachmentDetachAccessEventBody,\n BlobAccessManifest,\n BlobContentKeyTarget,\n ContainerAccessEventBody,\n ContainerAccessKeyState,\n ContainerAccessLevel,\n ContainerAccessManifest,\n ContainerAccessManifestState,\n ContainerAccessStructural,\n ContainerCreateAccessEventBody,\n ContainerDirectGrant,\n ContainerGrantAccessEventBody,\n ContainerGrantPrincipalHead,\n ContainerGrantSubjectType,\n ContainerKekKeyring,\n ContainerKekKeyringEntry,\n ContainerKekPredecessorBridge,\n ContainerKekRecipientTarget,\n ContainerKekTarget,\n ContainerKeyEpoch,\n ContainerKeyWrap,\n ContainerMoveAccessEventBody,\n ContainerReciteAccessEventBody,\n ContainerRekeyAccessEventBody,\n ContainerRevokeAccessEventBody,\n ContainerUserRecipientKey,\n ContentObjectKind,\n ContentRecordEncryptionSuite,\n ContentRecordNonceDomain,\n DeriveBlobKekTargetsInput,\n DeriveContainerKekRecipientTargetsInput,\n DeriveDocumentKekTargetsInput,\n DocumentAccessEventBody,\n DocumentContentKeyTarget,\n DocumentContentRecordMetadataInput,\n DocumentLinkAccessEventBody,\n DocumentLinkSetManifestState,\n DocumentLinkSetStructural,\n DocumentPurgeAccessEventBody,\n DocumentUnlinkAccessEventBody,\n IdentityStateCheckpoint,\n IdentityStateHead,\n IdentityStateTransparencyLeaf,\n KekRecipientKind,\n KeyingCanonicalJson,\n KeyingHashDomain,\n KeyingLocalCheckpointStore,\n KeyingVerificationCode,\n KeyingVerificationResult,\n ManagedPrincipalKind,\n PrincipalHistoryIndexNode,\n PrincipalPolicyAuthorization,\n PrincipalPolicyBundle,\n PrincipalPolicyCheckpoint,\n PrincipalPolicyCurrent,\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryReferenceProof,\n PrincipalPolicyHistoryVerifier,\n PrincipalPolicyMemberEnvelopes,\n PrincipalPolicyPayload,\n PrincipalPolicySignedState,\n PrincipalPolicySignerPublicKey,\n PrincipalPolicySnapshot,\n PrincipalPolicyStateChainEntry,\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n PrincipalPolicyTransparencyLeaf,\n ReferencedPrincipalHead,\n SignedTransparencyTreeHead,\n TransparencyConsistencyProof,\n TransparencyInclusionProof,\n TransparencyLeaf,\n TransparencyLeafKind,\n TransparencyTreeCheckpoint,\n UnsignedAccessEvent,\n UnsignedTransparencyTreeHead,\n UnsignedWriteHeader,\n VerifiedAccessEvent,\n VerifiedAccessManifest,\n VerifiedAccessManifestCheckpointEvidence,\n VerifiedAccessManifestSnapshot,\n VerifiedAttachmentBinding,\n VerifiedAttachmentDetach,\n VerifiedBlobKekTargets,\n VerifiedContainerAccessManifest,\n VerifiedContainerKekState,\n VerifiedContainerParentEdge,\n VerifiedDocumentKekTargets,\n VerifiedDocumentLinkSetManifest,\n VerifiedDocumentLinkSetSnapshot,\n VerifiedDocumentLinkSetStateEvidence,\n VerifiedIdentityState,\n VerifiedPrincipalPolicy,\n VerifiedPrincipalPolicyCurrent,\n VerifiedPrincipalPolicyHistory,\n VerifiedPrincipalPolicySelection,\n VerifiedPrincipalPolicySnapshot,\n VerifiedTransparencyProof,\n VerifiedTransparencyTreeHead,\n VerifiedWriteHeader,\n VerifyAccessEventInput,\n VerifyAccessManifestInput,\n VerifyAttachmentBindingEventInput,\n VerifyAttachmentDetachEventInput,\n VerifyContainerAccessManifestInput,\n VerifyContainerKekStateInput,\n VerifyContainerParentEdgeInput,\n VerifyDocumentLinkSetManifestInput,\n VerifyDocumentPurgeEventInput,\n VerifyIdentityStateCheckpointInput,\n VerifyPrincipalPolicyBundleInput,\n VerifyPrincipalPolicySnapshotInput,\n VerifySignedTransparencyTreeHeadInput,\n VerifyTransparencyConsistencyProofInput,\n VerifyTransparencyInclusionProofInput,\n VerifyTransparencyProofInput,\n VerifyWriteHeaderInput,\n WriteHeader,\n} from \"./keying\";\nexport {\n ACCESS_MANIFEST_VERIFICATION_REVISION,\n accessManifestCheckpointFromManifest,\n accessManifestTransparencyLeaf,\n assertSealedContainerKekKeyringLength,\n BLOB_CONTENT_KEY_WRAP_SUITE,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n CONTAINER_KEK_KEYRING_SEAL_SUITE,\n CONTAINER_KEK_MATERIAL_ID_PREFIX,\n CONTAINER_KEK_PARENT_WRAP_SUITE,\n CONTAINER_KEK_PREDECESSOR_WRAP_SUITE,\n CONTAINER_KEK_USER_WRAP_SUITE,\n CONTENT_RECORD_ENCRYPTION_SUITE,\n computeAccessEventBodyHash,\n computeAccessEventHash,\n computeAccessManifestHash,\n computeBlobAccessManifestHash,\n computeBlobContentKeyTargetHash,\n computeContainerAccessKeyTargetHash,\n computeContainerAccessStructuralHash,\n computeContainerDirectGrantRoot,\n computeContainerKekKeyringHash,\n computeContainerKekMaterialId,\n computeContainerKekPredecessorBridgeHash,\n computeContainerKekRecipientTargetHash,\n computeContainerKeyEpochHash,\n computeContentRecordNonceDomainHash,\n computeDocumentContentKeyTargetHash,\n computeDocumentContentRecordCiphertextHash,\n computeDocumentContentRecordMetadataHash,\n computeDocumentContentRecordPlaintextHash,\n computeDocumentLinkSetGrantRoot,\n computeDocumentLinkSetKeyTargetHash,\n computeDocumentLinkSetStructuralHash,\n computeKeyingDomainHash,\n computeTransparencyLeafHash,\n computeTransparencyMerkleRoot,\n computeWriteHeaderHash,\n createContainerKekPredecessorBridge,\n createPrincipalHistoryIndexProof,\n createPrincipalPolicyHistoryVerifier,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n DOCUMENT_CONTENT_KEY_WRAP_SUITE,\n deriveBlobKekTargets,\n deriveContainerAccessManifest,\n deriveContainerKekRecipientTargets,\n deriveContainerKekWrappingPublicKey,\n deriveDocumentKekTargets,\n deriveDocumentLinkSetManifest,\n derivePrincipalRecipientKeyEpochId,\n documentContentRecordMetadata,\n expectedSealedContainerKekKeyringBytes,\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n identityStateTransparencyLeaf,\n isContainerKekMaterialId,\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n KeyingVerificationError,\n MAX_CONTAINER_KEY_EPOCH,\n MAX_CONTAINER_RECITATION_EPOCH,\n makeVerifiedAccessEvent,\n makeVerifiedBlobKekTargets,\n makeVerifiedContainerAccessManifest,\n makeVerifiedContainerKekState,\n makeVerifiedDocumentKekTargets,\n makeVerifiedDocumentLinkSetManifest,\n makeVerifiedDocumentLinkSetSnapshot,\n makeVerifiedPrincipalPolicy,\n normalizeAttachmentAccessEventBody,\n normalizeContainerAccessEventBody,\n normalizeContainerKekKeyring,\n normalizeContainerKekPredecessorBridge,\n normalizeDocumentAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n openContainerKekKeyring,\n PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT,\n PRINCIPAL_HISTORY_VERIFICATION_REVISION,\n principalHistoryIndexLeaf,\n principalPolicyMatchesReference,\n principalPolicyTransparencyLeaf,\n resolveContainerPathUserAccessLevel,\n resolveContainerStatePathUserAccessLevel,\n resolveHistoricalContainerPathUserAccessLevel,\n resolvePrincipalHistoryIndexProof,\n restorePrincipalPolicyHistoryVerifier,\n sealContainerKekKeyring,\n selectPrincipalPolicyAuthorization,\n serializeKeyingCanonicalJson,\n signAccessEvent,\n signTransparencyTreeHead,\n signWriteHeader,\n unwrapContainerKekParentWrap,\n unwrapContainerKekPredecessorBridge,\n verifyAccessManifest,\n verifyAccessManifestLocalCheckpoint,\n verifyAccessManifestSnapshot,\n verifyAttachmentBindingEvent,\n verifyAttachmentDetachEvent,\n verifyContainerAccessManifest,\n verifyContainerKekKeyringEntry,\n verifyContainerKekState,\n verifyContainerParentEdge,\n verifyDocumentLinkSetManifest,\n verifyDocumentLinkSetSnapshot,\n verifyDocumentPurgeEvent,\n verifyIdentityStateCheckpoint,\n verifyPrincipalPolicyBundle,\n verifyPrincipalPolicyBundleAgainstHistory,\n verifyPrincipalPolicyCheckpoint,\n verifyPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrentMutation,\n verifyPrincipalPolicyCurrentSuccessor,\n verifyPrincipalPolicyHistoryReferences,\n verifyPrincipalPolicySnapshot,\n verifySignedAccessEvent,\n verifySignedTransparencyTreeHead,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n verifyTransparencyProof,\n verifyWriteHeader,\n} from \"./keying\";\nexport {\n organizationReplacementAuthorizationPayload,\n organizationReplacementSigningBytes,\n signOrganizationReplacementAuthorization,\n type VerifiedOrganizationReplacementAuthorization,\n verifyOrganizationReplacementAuthorization,\n} from \"./organizationReplacement\";\nexport {\n computePrincipalContainerGrantRoot,\n normalizePrincipalContainerGrants,\n} from \"./principalContainerGrants\";\nexport {\n computePrincipalMemberEnvelopesRoot,\n normalizePrincipalStateMemberEnvelopes,\n PrincipalMemberEnvelopeValidationError,\n} from \"./principalMemberEnvelopes\";\nexport type { PrincipalPolicyValidationErrorCode } from \"./principalPolicyValidationError\";\nexport {\n PrincipalPolicyValidationError,\n throwPrincipalPolicyValidationError,\n} from \"./principalPolicyValidationError\";\nexport type {\n ManagedRecipientPrincipalType,\n PrincipalContainerGrant,\n PrincipalContainerGrantAccessLevel,\n PrincipalProjectionMember,\n PrincipalProjectionRole,\n PrincipalStateExternalAuthority,\n PrincipalStateHeaderInput,\n PrincipalStateMember,\n PrincipalStateMemberEnvelope,\n PrincipalStateMembershipMode,\n PrincipalStatePayloadCipherSuite,\n PrincipalStateSigningInput,\n SignedPrincipalState,\n UnsignedPrincipalState,\n} from \"./principalState\";\nexport {\n buildPrincipalStateSigningInput,\n computePrincipalMembershipRoot,\n computePrincipalProjectionRoot,\n computePrincipalStateHash,\n computePrincipalStatePayloadCiphertextHash,\n derivePrincipalProjectionMembers,\n isManagedRecipientPrincipalType,\n isPrincipalProjectionRole,\n normalizePrincipalProjectionMembers,\n normalizePrincipalStateMembers,\n serializeUnsignedPrincipalState,\n signPrincipalState,\n} from \"./principalState\";\nexport {\n verifySignedPrincipalState,\n verifySignedPrincipalStateResult,\n} from \"./principalStateVerification\";\nexport {\n captureProjectionHistory,\n type HistoryProjection,\n omitProjectionHistory,\n type RetainedProjectionHistory,\n restoreProjectionHistory,\n} from \"./projectionHistory\";\nexport type { SigningKeyPair } from \"./signing/generateKeyPair\";\nexport {\n generateSigningKeyPair,\n generateSigningSeedAndKeyPair,\n ML_DSA87_PUBLIC_KEY_BYTES,\n ML_DSA87_SECRET_KEY_BYTES,\n ML_DSA87_SIGNATURE_BYTES,\n} from \"./signing/generateKeyPair\";\nexport { sign } from \"./signing/sign\";\nexport { verify } from \"./signing/verify\";\nexport type { SymmetricCiphertext } from \"./symmetric\";\nexport {\n AES_256_KEY_BYTES,\n AES_GCM_IV_BYTES,\n AES_GCM_TAG_BYTES,\n assertAesGcmIv,\n createAesGcmIv,\n decryptWithDek,\n encryptWithDek,\n} from \"./symmetric\";\n"]}
@@ -15,6 +15,8 @@ export { type DocumentPurgeAccessEventBody, normalizeDocumentPurgeAccessEventBod
15
15
  export * from "./principalPolicy.js";
16
16
  export { verifyPrincipalPolicyBundleAgainstHistory } from "./principalPolicyBundleHistory.js";
17
17
  export { type PrincipalPolicyCurrent, type VerifiedPrincipalPolicyCurrent, verifyPrincipalPolicyCurrent, } from "./principalPolicyCurrent.js";
18
+ export { verifyPrincipalPolicyCurrentMutation } from "./principalPolicyCurrentMutation.js";
19
+ export { verifyPrincipalPolicyCurrentSuccessor } from "./principalPolicyCurrentSuccessor.js";
18
20
  export type { PrincipalPolicyExternalAuthority, PrincipalPolicyExternalAuthorityState, } from "./principalPolicyExternalAuthorityTypes.js";
19
21
  export { createPrincipalPolicyHistoryVerifier, restorePrincipalPolicyHistoryVerifier, } from "./principalPolicyHistory.js";
20
22
  export type { PrincipalHistoryIndexNode } from "./principalPolicyHistoryIndex.js";
@@ -15,6 +15,8 @@ export { normalizeDocumentPurgeAccessEventBody, verifyDocumentPurgeEvent, } from
15
15
  export * from "./principalPolicy.js";
16
16
  export { verifyPrincipalPolicyBundleAgainstHistory } from "./principalPolicyBundleHistory.js";
17
17
  export { verifyPrincipalPolicyCurrent, } from "./principalPolicyCurrent.js";
18
+ export { verifyPrincipalPolicyCurrentMutation } from "./principalPolicyCurrentMutation.js";
19
+ export { verifyPrincipalPolicyCurrentSuccessor } from "./principalPolicyCurrentSuccessor.js";
18
20
  export { createPrincipalPolicyHistoryVerifier, restorePrincipalPolicyHistoryVerifier, } from "./principalPolicyHistory.js";
19
21
  export { createPrincipalHistoryIndexProof, principalHistoryIndexLeaf, resolvePrincipalHistoryIndexProof, } from "./principalPolicyHistoryIndex.js";
20
22
  export { PRINCIPAL_HISTORY_VERIFICATION_REVISION } from "./principalPolicyHistoryPage.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,0BAA0B,CAAC;AACzC,OAAO,EAAE,qCAAqC,EAAE,MAAM,sCAAsC,CAAC;AAC7F,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7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AAgC,GACjC,MAAM,oBAAoB,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./accessEvent\";\nexport * from \"./accessManifestSnapshot\";\nexport { ACCESS_MANIFEST_VERIFICATION_REVISION } from \"./accessManifestVerificationRevision\";\nexport * from \"./canonical\";\nexport * from \"./checkpoints\";\nexport * from \"./containerAccess\";\nexport { MAX_CONTAINER_RECITATION_EPOCH } from \"./containerAccessReciteBody\";\nexport * from \"./containerKek\";\nexport {\n assertSealedContainerKekKeyringLength,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n computeContainerKekKeyringHash,\n expectedSealedContainerKekKeyringBytes,\n normalizeContainerKekKeyring,\n openContainerKekKeyring,\n sealContainerKekKeyring,\n verifyContainerKekKeyringEntry,\n} from \"./containerKekKeyring\";\nexport {\n computeContainerKekPredecessorBridgeHash,\n createContainerKekPredecessorBridge,\n normalizeContainerKekPredecessorBridge,\n unwrapContainerKekPredecessorBridge,\n} from \"./containerKekPredecessor\";\nexport {\n deriveContainerKekWrappingPublicKey,\n unwrapContainerKekParentWrap,\n} from \"./containerKekWrapping\";\nexport { resolveContainerStatePathUserAccessLevel } from \"./containerPathAccess\";\nexport * from \"./documentAccess\";\nexport {\n type DocumentPurgeAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n type VerifyDocumentPurgeEventInput,\n verifyDocumentPurgeEvent,\n} from \"./documentPurge\";\nexport * from \"./principalPolicy\";\nexport { verifyPrincipalPolicyBundleAgainstHistory } from \"./principalPolicyBundleHistory\";\nexport {\n type PrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrent,\n} from \"./principalPolicyCurrent\";\nexport type {\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n} from \"./principalPolicyExternalAuthorityTypes\";\nexport {\n createPrincipalPolicyHistoryVerifier,\n restorePrincipalPolicyHistoryVerifier,\n} from \"./principalPolicyHistory\";\nexport type { PrincipalHistoryIndexNode } from \"./principalPolicyHistoryIndex\";\nexport {\n createPrincipalHistoryIndexProof,\n principalHistoryIndexLeaf,\n resolvePrincipalHistoryIndexProof,\n} from \"./principalPolicyHistoryIndex\";\nexport { PRINCIPAL_HISTORY_VERIFICATION_REVISION } from \"./principalPolicyHistoryPage\";\nexport type { PrincipalPolicyHistoryReferenceProof } from \"./principalPolicyHistoryReferences\";\nexport { verifyPrincipalPolicyHistoryReferences } from \"./principalPolicyHistoryReferences\";\nexport type {\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryVerifier,\n VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nexport { PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT } from \"./principalPolicyHistoryTypes\";\nexport {\n selectPrincipalPolicyAuthorization,\n type VerifiedPrincipalPolicySelection,\n} from \"./principalPolicySelection\";\nexport type {\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n} from \"./principalPolicyTransition\";\nexport {\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n} from \"./principalPolicyTransition\";\nexport * from \"./transparency\";\nexport {\n type VerifyTransparencyConsistencyProofInput,\n type VerifyTransparencyInclusionProofInput,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n} from \"./transparencyProofs\";\nexport {\n computeTransparencyMerkleRoot,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n} from \"./transparencyTree\";\nexport * from \"./types\";\nexport {\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n} from \"./verificationError\";\nexport * from \"./writeHeader\";\n"]}
1
+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AE,MAAM,8BAA8B,CAAC;AAEvF,OAAO,EAAE,sCAAsC,EAAE,MAAM,oCAAoC,CAAC;AAQ5F,OAAO,EAAE,kCAAkC,EAAE,MAAM,+BAA+B,CAAC;AACnF,OAAO,EACL,kCAAkC,GAEnC,MAAM,4BAA4B,CAAC;AAKpC,OAAO,EACL,oCAAoC,EACpC,0CAA0C,GAC3C,MAAM,6BAA6B,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,OAAO,EAGL,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,kCAAkC,EAClC,gCAAgC,GACjC,MAAM,oBAAoB,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,qBAAqB,CAAC;AAC7B,cAAc,eAAe,CAAC","sourcesContent":["export * from \"./accessEvent\";\nexport * from \"./accessManifestSnapshot\";\nexport { ACCESS_MANIFEST_VERIFICATION_REVISION } from \"./accessManifestVerificationRevision\";\nexport * from \"./canonical\";\nexport * from \"./checkpoints\";\nexport * from \"./containerAccess\";\nexport { MAX_CONTAINER_RECITATION_EPOCH } from \"./containerAccessReciteBody\";\nexport * from \"./containerKek\";\nexport {\n assertSealedContainerKekKeyringLength,\n CONTAINER_KEK_KEYRING_ENTRY_BYTES,\n CONTAINER_KEK_KEYRING_FORMAT_VERSION,\n CONTAINER_KEK_KEYRING_HEADER_BYTES,\n computeContainerKekKeyringHash,\n expectedSealedContainerKekKeyringBytes,\n normalizeContainerKekKeyring,\n openContainerKekKeyring,\n sealContainerKekKeyring,\n verifyContainerKekKeyringEntry,\n} from \"./containerKekKeyring\";\nexport {\n computeContainerKekPredecessorBridgeHash,\n createContainerKekPredecessorBridge,\n normalizeContainerKekPredecessorBridge,\n unwrapContainerKekPredecessorBridge,\n} from \"./containerKekPredecessor\";\nexport {\n deriveContainerKekWrappingPublicKey,\n unwrapContainerKekParentWrap,\n} from \"./containerKekWrapping\";\nexport { resolveContainerStatePathUserAccessLevel } from \"./containerPathAccess\";\nexport * from \"./documentAccess\";\nexport {\n type DocumentPurgeAccessEventBody,\n normalizeDocumentPurgeAccessEventBody,\n type VerifyDocumentPurgeEventInput,\n verifyDocumentPurgeEvent,\n} from \"./documentPurge\";\nexport * from \"./principalPolicy\";\nexport { verifyPrincipalPolicyBundleAgainstHistory } from \"./principalPolicyBundleHistory\";\nexport {\n type PrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n verifyPrincipalPolicyCurrent,\n} from \"./principalPolicyCurrent\";\nexport { verifyPrincipalPolicyCurrentMutation } from \"./principalPolicyCurrentMutation\";\nexport { verifyPrincipalPolicyCurrentSuccessor } from \"./principalPolicyCurrentSuccessor\";\nexport type {\n PrincipalPolicyExternalAuthority,\n PrincipalPolicyExternalAuthorityState,\n} from \"./principalPolicyExternalAuthorityTypes\";\nexport {\n createPrincipalPolicyHistoryVerifier,\n restorePrincipalPolicyHistoryVerifier,\n} from \"./principalPolicyHistory\";\nexport type { PrincipalHistoryIndexNode } from \"./principalPolicyHistoryIndex\";\nexport {\n createPrincipalHistoryIndexProof,\n principalHistoryIndexLeaf,\n resolvePrincipalHistoryIndexProof,\n} from \"./principalPolicyHistoryIndex\";\nexport { PRINCIPAL_HISTORY_VERIFICATION_REVISION } from \"./principalPolicyHistoryPage\";\nexport type { PrincipalPolicyHistoryReferenceProof } from \"./principalPolicyHistoryReferences\";\nexport { verifyPrincipalPolicyHistoryReferences } from \"./principalPolicyHistoryReferences\";\nexport type {\n PrincipalPolicyHistoryInput,\n PrincipalPolicyHistoryPage,\n PrincipalPolicyHistoryProgressOptions,\n PrincipalPolicyHistoryVerifier,\n VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nexport { PRINCIPAL_HISTORY_PAGE_ENTRY_LIMIT } from \"./principalPolicyHistoryTypes\";\nexport {\n selectPrincipalPolicyAuthorization,\n type VerifiedPrincipalPolicySelection,\n} from \"./principalPolicySelection\";\nexport type {\n PrincipalPolicyTransitionMismatch,\n PrincipalPolicyTransitionMismatchCode,\n} from \"./principalPolicyTransition\";\nexport {\n getPrincipalPolicyTransitionMismatch,\n getPrincipalPolicyTransitionMismatchReason,\n} from \"./principalPolicyTransition\";\nexport * from \"./transparency\";\nexport {\n type VerifyTransparencyConsistencyProofInput,\n type VerifyTransparencyInclusionProofInput,\n verifyTransparencyConsistencyProof,\n verifyTransparencyInclusionProof,\n} from \"./transparencyProofs\";\nexport {\n computeTransparencyMerkleRoot,\n createTransparencyConsistencyProof,\n createTransparencyInclusionProof,\n} from \"./transparencyTree\";\nexport * from \"./types\";\nexport {\n isKeyingVerificationCode,\n KEYING_VERIFICATION_CODES,\n} from \"./verificationError\";\nexport * from \"./writeHeader\";\n"]}
@@ -1,5 +1,5 @@
1
1
  import { type VerifiedPrincipalPolicyHistory } from "./principalPolicyHistoryTypes.js";
2
- import { type PrincipalPolicyCurrent, type VerifiedPrincipalPolicyCurrent } from "./principalPolicyTypes.js";
2
+ import type { PrincipalPolicyCurrent, VerifiedPrincipalPolicyCurrent } from "./principalPolicyTypes.js";
3
3
  import type { KeyingVerificationResult } from "./types.js";
4
4
  export type { PrincipalPolicyCurrent, VerifiedPrincipalPolicyCurrent, } from "./principalPolicyTypes.js";
5
5
  /**
@@ -1,9 +1,9 @@
1
1
  import { normalizePrincipalPolicyStateChainEntry } from "./principalPolicyChainEntry.js";
2
+ import { issueVerifiedPrincipalPolicyCurrent } from "./principalPolicyCurrentEvidence.js";
2
3
  import { ownVerifiedPrincipalPolicyHistory, } from "./principalPolicyHistoryTypes.js";
3
4
  import { verifyPrincipalPolicyMemberEnvelopes } from "./principalPolicyMemberEnvelopes.js";
4
5
  import { verifyPrincipalPolicyPayload } from "./principalPolicyPayload.js";
5
6
  import { principalPolicyStateMatchesReference } from "./principalPolicyReference.js";
6
- import { makeVerifiedPrincipalPolicyCurrent, } from "./principalPolicyTypes.js";
7
7
  import { runVerifier, throwVerification } from "./shared.js";
8
8
  // Adapt owned readonly evidence to the mutable arrays in policy result types.
9
9
  function mutableEntry(entry) {
@@ -35,7 +35,7 @@ export function verifyPrincipalPolicyCurrent(input) {
35
35
  throwVerification("hash_mismatch", "current principal policy does not match verified history");
36
36
  await verifyPrincipalPolicyPayload({ bundle: current });
37
37
  await verifyPrincipalPolicyMemberEnvelopes({ bundle: current });
38
- return makeVerifiedPrincipalPolicyCurrent({
38
+ return issueVerifiedPrincipalPolicyCurrent({
39
39
  principalType: entry.state.principalType,
40
40
  principalId: entry.state.principalId,
41
41
  version: entry.state.version,
@@ -51,7 +51,7 @@ export function verifyPrincipalPolicyCurrent(input) {
51
51
  version: entry.state.version,
52
52
  stateHash: entry.state.stateHash,
53
53
  },
54
- });
54
+ }, history.latestAuthority);
55
55
  });
56
56
  }
57
57
  //# sourceMappingURL=principalPolicyCurrent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"principalPolicyCurrent.js","sourceRoot":"","sources":["principalPolicyCurrent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EACL,iCAAiC,GAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,oCAAoC,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EACL,kCAAkC,GAGnC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAW1D,8EAA8E;AAC9E,SAAS,YAAY,CAAC,KAAqC;IACzD,OAAO;QACL,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC;QACnC,UAAU,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,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EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;YAC5B,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ;YAC9B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;YAChC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,eAAe,EAAE,QAAQ;YACzB,UAAU,EAAE;gBACV,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;gBACxC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW;gBACpC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;gBAC5B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;aACjC;SACF,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { normalizePrincipalPolicyStateChainEntry } from \"./principalPolicyChainEntry\";\nimport {\n ownVerifiedPrincipalPolicyHistory,\n type VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nimport { verifyPrincipalPolicyMemberEnvelopes } from \"./principalPolicyMemberEnvelopes\";\nimport { verifyPrincipalPolicyPayload } from \"./principalPolicyPayload\";\nimport { principalPolicyStateMatchesReference } from \"./principalPolicyReference\";\nimport {\n makeVerifiedPrincipalPolicyCurrent,\n type PrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n} from \"./principalPolicyTypes\";\nimport { runVerifier, throwVerification } from \"./shared\";\nimport type {\n KeyingVerificationResult,\n PrincipalPolicyStateChainEntry,\n} from \"./types\";\n\nexport type {\n PrincipalPolicyCurrent,\n VerifiedPrincipalPolicyCurrent,\n} from \"./principalPolicyTypes\";\n\n// Adapt owned readonly evidence to the mutable arrays in policy result types.\nfunction mutableEntry(entry: PrincipalPolicyStateChainEntry) {\n return {\n state: structuredClone(entry.state),\n projection: entry.projection.map((member) => ({ ...member })),\n grants: entry.grants.map((grant) => ({ ...grant })),\n };\n}\n\n/**\n * Authenticate current keying artifacts against a prefix already verified by\n * this runtime. The returned history contains only explicitly retained entries.\n */\nexport function verifyPrincipalPolicyCurrent(input: {\n readonly current: PrincipalPolicyCurrent;\n readonly history: VerifiedPrincipalPolicyHistory;\n}): Promise<KeyingVerificationResult<VerifiedPrincipalPolicyCurrent>> {\n return runVerifier(async () => {\n const current = structuredClone(input.current);\n const history = ownVerifiedPrincipalPolicyHistory(input.history);\n const expected = history.currentEntry;\n const retained = history.retainedEntries.map(mutableEntry);\n const entry = await normalizePrincipalPolicyStateChainEntry({\n state: current.currentState,\n projection: current.currentProjection,\n grants: current.currentGrants,\n });\n // The state hash commits the signed header, not its signature bytes. Keep\n // both tied to the accepted entry when validating rows read from storage.\n if (\n !principalPolicyStateMatchesReference(entry.state, expected.state) ||\n entry.state.signature !== expected.state.signature\n )\n throwVerification(\n \"hash_mismatch\",\n \"current principal policy does not match verified history\",\n );\n await verifyPrincipalPolicyPayload({ bundle: current });\n await verifyPrincipalPolicyMemberEnvelopes({ bundle: current });\n return makeVerifiedPrincipalPolicyCurrent({\n principalType: entry.state.principalType,\n principalId: entry.state.principalId,\n version: entry.state.version,\n keyEpoch: entry.state.keyEpoch,\n stateHash: entry.state.stateHash,\n state: entry.state,\n projection: entry.projection,\n grants: entry.grants,\n retainedHistory: retained,\n checkpoint: {\n principalType: entry.state.principalType,\n principalId: entry.state.principalId,\n version: entry.state.version,\n stateHash: entry.state.stateHash,\n },\n });\n });\n}\n"]}
1
+ {"version":3,"file":"principalPolicyCurrent.js","sourceRoot":"","sources":["principalPolicyCurrent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uCAAuC,EAAE,MAAM,6BAA6B,CAAC;AACtF,OAAO,EAAE,mCAAmC,EAAE,MAAM,kCAAkC,CAAC;AACvF,OAAO,EACL,iCAAiC,GAElC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,oCAAoC,EAAE,MAAM,kCAAkC,CAA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K,CAAC,SAAS,KAAK,QAAQ,CAAC,KAAK,CAAC,SAAS;YAElD,iBAAiB,CACf,eAAe,EACf,0DAA0D,CAC3D,CAAC;QACJ,MAAM,4BAA4B,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QACxD,MAAM,oCAAoC,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;QAChE,OAAO,mCAAmC,CACxC;YACE,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;YACxC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW;YACpC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;YAC5B,QAAQ,EAAE,KAAK,CAAC,KAAK,CAAC,QAAQ;YAC9B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;YAChC,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,eAAe,EAAE,QAAQ;YACzB,UAAU,EAAE;gBACV,aAAa,EAAE,KAAK,CAAC,KAAK,CAAC,aAAa;gBACxC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,WAAW;gBACpC,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO;gBAC5B,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,SAAS;aACjC;SACF,EACD,OAAO,CAAC,eAAe,CACxB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { normalizePrincipalPolicyStateChainEntry } from \"./principalPolicyChainEntry\";\nimport { issueVerifiedPrincipalPolicyCurrent } from \"./principalPolicyCurrentEvidence\";\nimport {\n ownVerifiedPrincipalPolicyHistory,\n type VerifiedPrincipalPolicyHistory,\n} from \"./principalPolicyHistoryTypes\";\nimport { verifyPrincipalPolicyMemberEnvelopes } from \"./principalPolicyMemberEnvelopes\";\nimport { verifyPrincipalPolicyPayload } from \"./principalPolicyPayload\";\nimport { principalPolicyStateMatchesReference } from \"./principalPolicyReference\";\nimport type {\n PrincipalPolicyCurrent,\n VerifiedPrincipalPolicyCurrent,\n} from \"./principalPolicyTypes\";\nimport { runVerifier, throwVerification } from \"./shared\";\nimport type {\n KeyingVerificationResult,\n PrincipalPolicyStateChainEntry,\n} from \"./types\";\n\nexport type {\n PrincipalPolicyCurrent,\n VerifiedPrincipalPolicyCurrent,\n} from \"./principalPolicyTypes\";\n\n// Adapt owned readonly evidence to the mutable arrays in policy result types.\nfunction mutableEntry(entry: PrincipalPolicyStateChainEntry) {\n return {\n state: structuredClone(entry.state),\n projection: entry.projection.map((member) => ({ ...member })),\n grants: entry.grants.map((grant) => ({ ...grant })),\n };\n}\n\n/**\n * Authenticate current keying artifacts against a prefix already verified by\n * this runtime. The returned history contains only explicitly retained entries.\n */\nexport function verifyPrincipalPolicyCurrent(input: {\n readonly current: PrincipalPolicyCurrent;\n readonly history: VerifiedPrincipalPolicyHistory;\n}): Promise<KeyingVerificationResult<VerifiedPrincipalPolicyCurrent>> {\n return runVerifier(async () => {\n const current = structuredClone(input.current);\n const history = ownVerifiedPrincipalPolicyHistory(input.history);\n const expected = history.currentEntry;\n const retained = history.retainedEntries.map(mutableEntry);\n const entry = await normalizePrincipalPolicyStateChainEntry({\n state: current.currentState,\n projection: current.currentProjection,\n grants: current.currentGrants,\n });\n // The state hash commits the signed header, not its signature bytes. Keep\n // both tied to the accepted entry when validating rows read from storage.\n if (\n !principalPolicyStateMatchesReference(entry.state, expected.state) ||\n entry.state.signature !== expected.state.signature\n )\n throwVerification(\n \"hash_mismatch\",\n \"current principal policy does not match verified history\",\n );\n await verifyPrincipalPolicyPayload({ bundle: current });\n await verifyPrincipalPolicyMemberEnvelopes({ bundle: current });\n return issueVerifiedPrincipalPolicyCurrent(\n {\n principalType: entry.state.principalType,\n principalId: entry.state.principalId,\n version: entry.state.version,\n keyEpoch: entry.state.keyEpoch,\n stateHash: entry.state.stateHash,\n state: entry.state,\n projection: entry.projection,\n grants: entry.grants,\n retainedHistory: retained,\n checkpoint: {\n principalType: entry.state.principalType,\n principalId: entry.state.principalId,\n version: entry.state.version,\n stateHash: entry.state.stateHash,\n },\n },\n history.latestAuthority,\n );\n });\n}\n"]}
@@ -0,0 +1,16 @@
1
+ import { makeVerifiedPrincipalPolicyCurrent, } from "./principalPolicyTypes.js";
2
+ import { throwVerification } from "./shared.js";
3
+ const issued = new WeakMap();
4
+ /** Keep the verified predecessor and historical authority cursor private. */
5
+ export function issueVerifiedPrincipalPolicyCurrent(value, latestAuthority) {
6
+ const result = makeVerifiedPrincipalPolicyCurrent(value);
7
+ issued.set(result, structuredClone({ policy: value, latestAuthority }));
8
+ return result;
9
+ }
10
+ export function ownVerifiedPrincipalPolicyCurrent(policy) {
11
+ const snapshot = issued.get(policy);
12
+ if (!snapshot)
13
+ throwVerification("invalid_shape", "current policy must come from a local verifier");
14
+ return structuredClone(snapshot);
15
+ }
16
+ //# sourceMappingURL=principalPolicyCurrentEvidence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"principalPolicyCurrentEvidence.js","sourceRoot":"","sources":["principalPolicyCurrentEvidence.ts"],"names":[],"mappings":"AACA,OAAO,EACL,kCAAkC,GAEnC,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAG7C,MAAM,MAAM,GAAG,IAAI,OAAO,EAMvB,CAAC;AAEJ,6EAA6E;AAC7E,MAAM,UAAU,mCAAmC,CACjD,KAAmB,EACnB,eAAuD;IAEvD,MAAM,MAAM,GAAG,kCAAkC,CAAC,KAAK,CAAC,CAAC;IACzD,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,EAAE,CAAC,CAAC,CAAC;IACxE,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,MAAsC;IAEtC,MAAM,QAAQ,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACpC,IAAI,CAAC,QAAQ;QACX,iBAAiB,CACf,eAAe,EACf,gDAAgD,CACjD,CAAC;IACJ,OAAO,eAAe,CAAC,QAAQ,CAAC,CAAC;AACnC,CAAC","sourcesContent":["import type { PrincipalStateExternalAuthority } from \"../principalState\";\nimport {\n makeVerifiedPrincipalPolicyCurrent,\n type VerifiedPrincipalPolicyCurrent,\n} from \"./principalPolicyTypes\";\nimport { throwVerification } from \"./shared\";\n\ntype CurrentValue = Parameters<typeof makeVerifiedPrincipalPolicyCurrent>[0];\nconst issued = new WeakMap<\n VerifiedPrincipalPolicyCurrent,\n {\n policy: CurrentValue;\n latestAuthority: PrincipalStateExternalAuthority | null;\n }\n>();\n\n/** Keep the verified predecessor and historical authority cursor private. */\nexport function issueVerifiedPrincipalPolicyCurrent(\n value: CurrentValue,\n latestAuthority: PrincipalStateExternalAuthority | null,\n): VerifiedPrincipalPolicyCurrent {\n const result = makeVerifiedPrincipalPolicyCurrent(value);\n issued.set(result, structuredClone({ policy: value, latestAuthority }));\n return result;\n}\n\nexport function ownVerifiedPrincipalPolicyCurrent(\n policy: VerifiedPrincipalPolicyCurrent,\n) {\n const snapshot = issued.get(policy);\n if (!snapshot)\n throwVerification(\n \"invalid_shape\",\n \"current policy must come from a local verifier\",\n );\n return structuredClone(snapshot);\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { PrincipalPolicyExternalAuthority } from "./principalPolicyExternalAuthorityTypes.js";
2
+ import type { PrincipalPolicyCurrent, VerifiedPrincipalPolicyCurrent } from "./principalPolicyTypes.js";
3
+ import type { KeyingVerificationResult } from "./types.js";
4
+ /** Bind a group's current artifacts and next signer to privately issued evidence. */
5
+ export declare function verifyPrincipalPolicyCurrentMutation(input: {
6
+ readonly current: PrincipalPolicyCurrent;
7
+ readonly policy: VerifiedPrincipalPolicyCurrent;
8
+ readonly signerUserId: string;
9
+ readonly externalAuthority?: PrincipalPolicyExternalAuthority | undefined;
10
+ }): Promise<KeyingVerificationResult<VerifiedPrincipalPolicyCurrent>>;
@@ -0,0 +1,51 @@
1
+ import { normalizePrincipalPolicyStateChainEntry } from "./principalPolicyChainEntry.js";
2
+ import { issueVerifiedPrincipalPolicyCurrent, ownVerifiedPrincipalPolicyCurrent, } from "./principalPolicyCurrentEvidence.js";
3
+ import { createPrincipalPolicyExternalAuthorityVerifier, externalAuthorityIncludesAdminSigner, verifyPrincipalPolicyExternalAuthorityProgress, } from "./principalPolicyExternalAuthority.js";
4
+ import { verifyPrincipalPolicyMemberEnvelopes } from "./principalPolicyMemberEnvelopes.js";
5
+ import { verifyPrincipalPolicyPayload } from "./principalPolicyPayload.js";
6
+ import { principalPolicyStateMatchesReference } from "./principalPolicyReference.js";
7
+ import { runVerifier, throwVerification } from "./shared.js";
8
+ /** Bind a group's current artifacts and next signer to privately issued evidence. */
9
+ export function verifyPrincipalPolicyCurrentMutation(input) {
10
+ return runVerifier(async () => {
11
+ const prior = ownVerifiedPrincipalPolicyCurrent(input.policy);
12
+ const current = structuredClone(input.current);
13
+ const externalAuthority = structuredClone(input.externalAuthority);
14
+ const signerUserId = input.signerUserId;
15
+ const entry = await normalizePrincipalPolicyStateChainEntry({
16
+ state: current.currentState,
17
+ projection: current.currentProjection,
18
+ grants: current.currentGrants,
19
+ });
20
+ if (!principalPolicyStateMatchesReference(entry.state, prior.policy.state) ||
21
+ entry.state.signature !== prior.policy.state.signature)
22
+ throwVerification("hash_mismatch", "current artifacts differ from issued policy evidence");
23
+ if (entry.state.principalType !== "group")
24
+ throwVerification("object_mismatch", "group mutation requires a group policy");
25
+ await verifyPrincipalPolicyPayload({ bundle: current });
26
+ await verifyPrincipalPolicyMemberEnvelopes({ bundle: current });
27
+ if (!entry.projection.some((member) => member.userId === signerUserId && member.role === "admin")) {
28
+ const authority = createPrincipalPolicyExternalAuthorityVerifier({
29
+ authority: externalAuthority,
30
+ });
31
+ authority.latestReference = prior.latestAuthority;
32
+ const next = {
33
+ state: {
34
+ signerUserId,
35
+ externalAuthority: externalAuthority?.currentHead ?? null,
36
+ },
37
+ };
38
+ verifyPrincipalPolicyExternalAuthorityProgress({
39
+ entry: next,
40
+ verifier: authority,
41
+ });
42
+ if (!externalAuthorityIncludesAdminSigner({
43
+ entry: next,
44
+ verifier: authority,
45
+ }))
46
+ throwVerification("unauthorized", "group mutation signer is not an authority admin");
47
+ }
48
+ return issueVerifiedPrincipalPolicyCurrent(prior.policy, prior.latestAuthority);
49
+ });
50
+ }
51
+ //# sourceMappingURL=principalPolicyCurrentMutation.js.map