@tearleads/client-sdk 0.1.19 → 0.1.20

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 (211) hide show
  1. package/client/organizations/index.js +2 -2
  2. package/client/organizations/index.js.map +1 -1
  3. package/client/organizations/organizationHistory.js +66 -0
  4. package/client/organizations/organizationHistory.js.map +1 -0
  5. package/client/organizations/organizationReadModels.d.ts +1 -1
  6. package/client/organizations/organizationReadModels.js +7 -27
  7. package/client/organizations/organizationReadModels.js.map +1 -1
  8. package/client/organizations/organizationsTypes.d.ts +1 -1
  9. package/client/organizations/organizationsTypes.js.map +1 -1
  10. package/data/containers/shared/types.d.ts +2 -2
  11. package/data/containers/shared/types.js.map +1 -1
  12. package/data/documents/shared/syncSubmitFailure.d.ts +2 -2
  13. package/data/documents/shared/syncSubmitFailure.js.map +1 -1
  14. package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js +34 -8
  15. package/data/keyingProjectionVerification/documentPurgeCheckpointCurrency.js.map +1 -1
  16. package/data/keyingProjectionVerification/documentPurgeDocumentChainVerification.js.map +1 -1
  17. package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js +17 -0
  18. package/data/keyingProjectionVerification/documentPurgePolicyCheckpoints.js.map +1 -0
  19. package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js +55 -0
  20. package/data/keyingProjectionVerification/documentPurgePolicyCurrency.js.map +1 -0
  21. package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js +25 -13
  22. package/data/keyingProjectionVerification/documentPurgePrincipalEvidence.js.map +1 -1
  23. package/data/keyingProjectionVerification/documentPurgeProofVerification.d.ts +5 -3
  24. package/data/keyingProjectionVerification/documentPurgeProofVerification.js +52 -8
  25. package/data/keyingProjectionVerification/documentPurgeProofVerification.js.map +1 -1
  26. package/data/keyingProjectionVerification/projectionPolicyEvidence.js.map +1 -1
  27. package/data/keyingProjectionVerification/types.d.ts +4 -0
  28. package/data/keyingProjectionVerification/types.js.map +1 -1
  29. package/data/persistence/principalAuthorizationCheckpoints.js +1 -1
  30. package/data/persistence/principalAuthorizationCheckpoints.js.map +1 -1
  31. package/data/persistence/principalCurrentAcknowledgementPersistence.d.ts +1 -0
  32. package/data/persistence/principalCurrentAcknowledgementPersistence.js +58 -12
  33. package/data/persistence/principalCurrentAcknowledgementPersistence.js.map +1 -1
  34. package/data/persistence/principalHistoryEvidencePersistence.d.ts +2 -0
  35. package/data/persistence/principalHistoryEvidencePersistence.js +2 -0
  36. package/data/persistence/principalHistoryEvidencePersistence.js.map +1 -1
  37. package/data/persistence/principalHistoryIncompleteRetention.js +32 -0
  38. package/data/persistence/principalHistoryIncompleteRetention.js.map +1 -0
  39. package/data/persistence/principalHistoryNodeRetention.js +76 -0
  40. package/data/persistence/principalHistoryNodeRetention.js.map +1 -0
  41. package/data/persistence/principalHistoryPrefixPersistence.d.ts +1 -0
  42. package/data/persistence/principalHistoryPrefixPersistence.js +30 -1
  43. package/data/persistence/principalHistoryPrefixPersistence.js.map +1 -1
  44. package/data/persistence/principalHistoryRootOwnership.js +71 -0
  45. package/data/persistence/principalHistoryRootOwnership.js.map +1 -0
  46. package/data/persistence/principalHistoryStagePersistence.js +45 -0
  47. package/data/persistence/principalHistoryStagePersistence.js.map +1 -1
  48. package/data/persistence/principalHistoryStageRetention.js +44 -0
  49. package/data/persistence/principalHistoryStageRetention.js.map +1 -0
  50. package/data/persistence/principalHistoryUnpublishedRetention.js +71 -0
  51. package/data/persistence/principalHistoryUnpublishedRetention.js.map +1 -0
  52. package/data/persistence/principalKeyEnvelopeArchivePersistence.js +63 -0
  53. package/data/persistence/principalKeyEnvelopeArchivePersistence.js.map +1 -0
  54. package/data/persistence/principalKeyEnvelopeCandidates.js +10 -1
  55. package/data/persistence/principalKeyEnvelopeCandidates.js.map +1 -1
  56. package/data/sqlite/principalHistoryEvidenceSchema.js +2 -0
  57. package/data/sqlite/principalHistoryEvidenceSchema.js.map +1 -1
  58. package/data/sqlite/principalHistoryNodeRetentionSchema.js +30 -0
  59. package/data/sqlite/principalHistoryNodeRetentionSchema.js.map +1 -0
  60. package/data/sqlite/principalHistoryRetentionSchema.js +40 -0
  61. package/data/sqlite/principalHistoryRetentionSchema.js.map +1 -0
  62. package/data/sqlite/principalHistoryStageSchema.js +2 -0
  63. package/data/sqlite/principalHistoryStageSchema.js.map +1 -1
  64. package/data/sqlite/schema.d.ts +453 -0
  65. package/data/sqlite/schema.js +6 -0
  66. package/data/sqlite/schema.js.map +1 -1
  67. package/data/sqlite/sqliteCommitGuards.js +49 -0
  68. package/data/sqlite/sqliteCommitGuards.js.map +1 -0
  69. package/data/sqlite/sqlitePersistenceRuntime.js +14 -2
  70. package/data/sqlite/sqlitePersistenceRuntime.js.map +1 -1
  71. package/index.d.ts +3 -1
  72. package/index.js.map +1 -1
  73. package/internal/api-client/ApiClient.d.ts +60 -137
  74. package/internal/api-client/ApiClient.js +7 -5
  75. package/internal/api-client/ApiClient.js.map +1 -1
  76. package/internal/api-client/apiRequestRuntime.js +7 -7
  77. package/internal/api-client/apiRequestRuntime.js.map +1 -1
  78. package/internal/api-client/documentPurge.js +25 -0
  79. package/internal/api-client/documentPurge.js.map +1 -0
  80. package/internal/api-client/organizationPolicyHistory.d.ts +53 -0
  81. package/internal/api-client/organizationPolicyHistory.js +15 -0
  82. package/internal/api-client/organizationPolicyHistory.js.map +1 -0
  83. package/internal/api-client/requestInternals.js +4 -4
  84. package/internal/api-client/requestInternals.js.map +1 -1
  85. package/internal/api-client/types.d.ts +2 -2
  86. package/internal/api-client/types.js.map +1 -1
  87. package/internal/crypto/keying/principalPolicyHistory.js +4 -0
  88. package/internal/crypto/keying/principalPolicyHistory.js.map +1 -1
  89. package/internal/crypto/keying/principalPolicyHistoryTypes.d.ts +2 -0
  90. package/internal/crypto/keying/principalPolicyHistoryTypes.js.map +1 -1
  91. package/internal/validators/operation/containerMutations.d.ts +448 -6528
  92. package/internal/validators/operation/documentMutations.d.ts +323 -579
  93. package/internal/validators/operation/documentMutations.js +22 -4
  94. package/internal/validators/operation/documentMutations.js.map +1 -1
  95. package/internal/validators/operation/documentSync.d.ts +26 -406
  96. package/internal/validators/operation/organizationPolicyHistory.d.ts +188 -310
  97. package/internal/validators/operation/organizationPolicyHistory.js +17 -3
  98. package/internal/validators/operation/organizationPolicyHistory.js.map +1 -1
  99. package/internal/validators/response/containerMutationError.d.ts +28 -408
  100. package/internal/validators/response/documentMutation.d.ts +232 -544
  101. package/internal/validators/response/documentMutation.js +1 -2
  102. package/internal/validators/response/documentMutation.js.map +1 -1
  103. package/internal/validators/response/documentSyncError.d.ts +26 -406
  104. package/internal/validators/response/documentSyncError.js +4 -3
  105. package/internal/validators/response/documentSyncError.js.map +1 -1
  106. package/internal/validators/response/index.d.ts +1 -1
  107. package/internal/validators/response/index.js +1 -1
  108. package/internal/validators/response/index.js.map +1 -1
  109. package/internal/validators/response/organizationPolicyHistory.d.ts +127 -309
  110. package/internal/validators/response/organizationPolicyHistory.js +10 -4
  111. package/internal/validators/response/organizationPolicyHistory.js.map +1 -1
  112. package/internal/validators/response/principal.d.ts +28 -408
  113. package/internal/validators/response/principal.js +3 -1
  114. package/internal/validators/response/principal.js.map +1 -1
  115. package/internal/validators/util/index.d.ts +1 -1
  116. package/internal/validators/util/index.js +1 -1
  117. package/internal/validators/util/index.js.map +1 -1
  118. package/internal/validators/util/principalHistoryWire.d.ts +2 -0
  119. package/internal/validators/util/principalHistoryWire.js +2 -0
  120. package/internal/validators/util/principalHistoryWire.js.map +1 -1
  121. package/package.json +1 -1
  122. package/workflows/container-contents/container-state/createWithMetadata.js +19 -49
  123. package/workflows/container-contents/container-state/createWithMetadata.js.map +1 -1
  124. package/workflows/container-contents/container-state/groupGrantVerification.js +29 -0
  125. package/workflows/container-contents/container-state/groupGrantVerification.js.map +1 -1
  126. package/workflows/container-contents/container-state/groupShareEpoch.js +33 -0
  127. package/workflows/container-contents/container-state/groupShareEpoch.js.map +1 -0
  128. package/workflows/container-contents/container-state/remote.js +4 -1
  129. package/workflows/container-contents/container-state/remote.js.map +1 -1
  130. package/workflows/container-contents/container-state/share.js +2 -24
  131. package/workflows/container-contents/container-state/share.js.map +1 -1
  132. package/workflows/container-contents/documentTombstoneEvidence.js +23 -12
  133. package/workflows/container-contents/documentTombstoneEvidence.js.map +1 -1
  134. package/workflows/containers/child/create.js +1 -3
  135. package/workflows/containers/child/create.js.map +1 -1
  136. package/workflows/containers/child/createSubmission.d.ts +1 -3
  137. package/workflows/containers/child/createSubmission.js +13 -15
  138. package/workflows/containers/child/createSubmission.js.map +1 -1
  139. package/workflows/containers/child/currentShareGrantMutation.js +82 -0
  140. package/workflows/containers/child/currentShareGrantMutation.js.map +1 -0
  141. package/workflows/containers/child/currentSharePrincipalPolicy.js +83 -0
  142. package/workflows/containers/child/currentSharePrincipalPolicy.js.map +1 -0
  143. package/workflows/containers/child/mutationSubmit.js +1 -1
  144. package/workflows/containers/child/mutationSubmit.js.map +1 -1
  145. package/workflows/containers/child/runtimeCurrentGroupShare.js +82 -0
  146. package/workflows/containers/child/runtimeCurrentGroupShare.js.map +1 -0
  147. package/workflows/containers/child/share.js +1 -14
  148. package/workflows/containers/child/share.js.map +1 -1
  149. package/workflows/containers/child/shareProjection.js +15 -0
  150. package/workflows/containers/child/shareProjection.js.map +1 -0
  151. package/workflows/documents/purge.d.ts +3 -0
  152. package/workflows/documents/purge.js +13 -0
  153. package/workflows/documents/purge.js.map +1 -1
  154. package/workflows/documents/sync.js +2 -0
  155. package/workflows/documents/sync.js.map +1 -1
  156. package/workflows/documents/syncFailures.js +2 -2
  157. package/workflows/documents/syncFailures.js.map +1 -1
  158. package/workflows/documents/syncPolicyRepair.js +15 -13
  159. package/workflows/documents/syncPolicyRepair.js.map +1 -1
  160. package/workflows/organizations/initialPrincipalCurrentPublication.js +2 -0
  161. package/workflows/organizations/initialPrincipalCurrentPublication.js.map +1 -1
  162. package/workflows/organizations/loadPolicyHistoryDetails.js +31 -32
  163. package/workflows/organizations/loadPolicyHistoryDetails.js.map +1 -1
  164. package/workflows/organizations/organizationPolicyHistoryDetails.js +37 -15
  165. package/workflows/organizations/organizationPolicyHistoryDetails.js.map +1 -1
  166. package/workflows/organizations/organizationPolicyHistoryVerification.js +56 -69
  167. package/workflows/organizations/organizationPolicyHistoryVerification.js.map +1 -1
  168. package/workflows/organizations/policyHistoryCache.js +5 -2
  169. package/workflows/organizations/policyHistoryCache.js.map +1 -1
  170. package/workflows/organizations/policyHistoryTypes.d.ts +1 -0
  171. package/workflows/organizations/policyHistoryTypes.js.map +1 -1
  172. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js +4 -1
  173. package/workflows/organizations/retainAcknowledgedPrincipalCurrents.js.map +1 -1
  174. package/workflows/principals/loadRecoveredPrincipalHistoryPage.d.ts +0 -1
  175. package/workflows/principals/loadRecoveredPrincipalHistoryPage.js +1 -2
  176. package/workflows/principals/loadRecoveredPrincipalHistoryPage.js.map +1 -1
  177. package/workflows/principals/policyRepair.js +38 -0
  178. package/workflows/principals/policyRepair.js.map +1 -0
  179. package/workflows/principals/policyRepairBudget.d.ts +2 -2
  180. package/workflows/principals/policyRepairBudget.js +3 -3
  181. package/workflows/principals/policyRepairBudget.js.map +1 -1
  182. package/workflows/principals/principalHistoryRecoveryPrefix.js +4 -0
  183. package/workflows/principals/principalHistoryRecoveryPrefix.js.map +1 -1
  184. package/workflows/principals/principalRecoveryLocalPreference.js +3 -2
  185. package/workflows/principals/principalRecoveryLocalPreference.js.map +1 -1
  186. package/workflows/principals/publicPrincipalHistoryPage.js +1 -0
  187. package/workflows/principals/publicPrincipalHistoryPage.js.map +1 -1
  188. package/workflows/principals/publicPrincipalHistoryProgress.js +1 -0
  189. package/workflows/principals/publicPrincipalHistoryProgress.js.map +1 -1
  190. package/workflows/principals/publicPrincipalHistoryTypes.d.ts +2 -0
  191. package/workflows/principals/publicPrincipalHistoryTypes.js.map +1 -1
  192. package/workflows/principals/publicProjectionPrincipal.js +1 -0
  193. package/workflows/principals/publicProjectionPrincipal.js.map +1 -1
  194. package/workflows/principals/recoverPrincipalHistoryPage.js +2 -1
  195. package/workflows/principals/recoverPrincipalHistoryPage.js.map +1 -1
  196. package/workflows/principals/recoverPrincipalPolicyHistory.js +1 -0
  197. package/workflows/principals/recoverPrincipalPolicyHistory.js.map +1 -1
  198. package/workflows/principals/recoverPublicPrincipalHistory.js +2 -0
  199. package/workflows/principals/recoverPublicPrincipalHistory.js.map +1 -1
  200. package/workflows/principals/runtimePolicyRecovery.js +2 -1
  201. package/workflows/principals/runtimePolicyRecovery.js.map +1 -1
  202. package/workflows/principals/selectPublicPrincipalHistory.js +21 -15
  203. package/workflows/principals/selectPublicPrincipalHistory.js.map +1 -1
  204. package/workflows/sync/remoteResetPrincipalScope.js +6 -0
  205. package/workflows/sync/remoteResetPrincipalScope.js.map +1 -1
  206. package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js +0 -208
  207. package/data/keyingProjectionVerification/principalPolicySnapshotVerification.js.map +0 -1
  208. package/data/keyingProjectionVerification/snapshotVerificationCache.js +0 -39
  209. package/data/keyingProjectionVerification/snapshotVerificationCache.js.map +0 -1
  210. package/workflows/containers/child/policyRepair.js +0 -23
  211. package/workflows/containers/child/policyRepair.js.map +0 -1
@@ -18,426 +18,46 @@ export declare const ContainerMutationFailureResponseSchema: z.ZodUnion<readonly
18
18
  }, z.core.$loose>, z.ZodType<{
19
19
  code: "principal_policy_stale";
20
20
  error: string;
21
- principalPolicies: {
22
- previousStates: {
23
- grants: {
24
- accessLevel: "admin" | "read" | "write";
25
- containerId: string;
26
- }[];
27
- projection: {
28
- role: "member" | "admin";
29
- userId: string;
30
- }[];
31
- state: {
32
- createdAt: string;
33
- encapsulationPublicKey: string;
34
- externalAuthority: {
35
- keyEpoch: number;
36
- keyFingerprint: string;
37
- principalId: string;
38
- principalType: "group";
39
- stateHash: string;
40
- version: number;
41
- } | null;
42
- grantCount: number;
43
- grantRoot: string;
44
- keyEpoch: number;
45
- keyFingerprint: string;
46
- memberCount: number;
47
- memberEnvelopesRoot: string;
48
- membershipMode: "projection";
49
- membershipRoot: string;
50
- payloadCiphertextHash: string;
51
- prevStateHash: string | null;
52
- principalId: string;
53
- principalType: "group" | "organization";
54
- projectionRoot: string;
55
- signature: string;
56
- signedAt: string;
57
- signerUserId: string;
58
- signerUserKeyFingerprint: string;
59
- stateHash: string;
60
- version: number;
61
- };
62
- }[];
63
- currentGrants: {
64
- accessLevel: "admin" | "read" | "write";
65
- containerId: string;
66
- }[];
67
- currentMemberEnvelopes: {
68
- envelopes: {
69
- kemCipherText: string;
70
- memberKeyFingerprint: string;
71
- userId: string;
72
- wrappedKey: string;
73
- }[];
74
- epoch: number;
75
- principalId: string;
76
- principalType: "group" | "organization";
77
- stateHash: string;
78
- };
79
- currentPayload: {
80
- cipherSuite: "aes-256-gcm";
81
- ciphertext: string;
82
- ciphertextHash: string;
83
- createdAt: string;
84
- principalId: string;
85
- principalType: "group" | "organization";
86
- stateHash: string;
87
- };
88
- currentProjection: {
89
- role: "member" | "admin";
90
- userId: string;
91
- }[];
92
- currentState: {
93
- createdAt: string;
94
- encapsulationPublicKey: string;
95
- externalAuthority: {
96
- keyEpoch: number;
97
- keyFingerprint: string;
98
- principalId: string;
99
- principalType: "group";
100
- stateHash: string;
101
- version: number;
102
- } | null;
103
- grantCount: number;
104
- grantRoot: string;
105
- keyEpoch: number;
106
- keyFingerprint: string;
107
- memberCount: number;
108
- memberEnvelopesRoot: string;
109
- membershipMode: "projection";
110
- membershipRoot: string;
111
- payloadCiphertextHash: string;
112
- prevStateHash: string | null;
113
- principalId: string;
114
- principalType: "group" | "organization";
115
- projectionRoot: string;
116
- signature: string;
117
- signedAt: string;
118
- signerUserId: string;
119
- signerUserKeyFingerprint: string;
120
- stateHash: string;
121
- version: number;
122
- };
21
+ principalHeads: {
22
+ keyEpoch: number;
23
+ keyFingerprint: string;
24
+ principalId: string;
25
+ principalType: "group" | "organization";
26
+ stateHash: string;
27
+ version: number;
123
28
  }[];
124
29
  }, {
125
30
  code: "principal_policy_stale";
126
31
  error: string;
127
- principalPolicies: {
128
- previousStates: {
129
- grants: {
130
- accessLevel: "admin" | "read" | "write";
131
- containerId: string;
132
- }[];
133
- projection: {
134
- role: "member" | "admin";
135
- userId: string;
136
- }[];
137
- state: {
138
- createdAt: string;
139
- encapsulationPublicKey: string;
140
- externalAuthority: {
141
- keyEpoch: number;
142
- keyFingerprint: string;
143
- principalId: string;
144
- principalType: "group";
145
- stateHash: string;
146
- version: number;
147
- } | null;
148
- grantCount: number;
149
- grantRoot: string;
150
- keyEpoch: number;
151
- keyFingerprint: string;
152
- memberCount: number;
153
- memberEnvelopesRoot: string;
154
- membershipMode: "projection";
155
- membershipRoot: string;
156
- payloadCiphertextHash: string;
157
- prevStateHash: string | null;
158
- principalId: string;
159
- principalType: "group" | "organization";
160
- projectionRoot: string;
161
- signature: string;
162
- signedAt: string;
163
- signerUserId: string;
164
- signerUserKeyFingerprint: string;
165
- stateHash: string;
166
- version: number;
167
- };
168
- }[];
169
- currentGrants: {
170
- accessLevel: "admin" | "read" | "write";
171
- containerId: string;
172
- }[];
173
- currentMemberEnvelopes: {
174
- envelopes: {
175
- kemCipherText: string;
176
- memberKeyFingerprint: string;
177
- userId: string;
178
- wrappedKey: string;
179
- }[];
180
- epoch: number;
181
- principalId: string;
182
- principalType: "group" | "organization";
183
- stateHash: string;
184
- };
185
- currentPayload: {
186
- cipherSuite: "aes-256-gcm";
187
- ciphertext: string;
188
- ciphertextHash: string;
189
- createdAt: string;
190
- principalId: string;
191
- principalType: "group" | "organization";
192
- stateHash: string;
193
- };
194
- currentProjection: {
195
- role: "member" | "admin";
196
- userId: string;
197
- }[];
198
- currentState: {
199
- createdAt: string;
200
- encapsulationPublicKey: string;
201
- externalAuthority: {
202
- keyEpoch: number;
203
- keyFingerprint: string;
204
- principalId: string;
205
- principalType: "group";
206
- stateHash: string;
207
- version: number;
208
- } | null;
209
- grantCount: number;
210
- grantRoot: string;
211
- keyEpoch: number;
212
- keyFingerprint: string;
213
- memberCount: number;
214
- memberEnvelopesRoot: string;
215
- membershipMode: "projection";
216
- membershipRoot: string;
217
- payloadCiphertextHash: string;
218
- prevStateHash: string | null;
219
- principalId: string;
220
- principalType: "group" | "organization";
221
- projectionRoot: string;
222
- signature: string;
223
- signedAt: string;
224
- signerUserId: string;
225
- signerUserKeyFingerprint: string;
226
- stateHash: string;
227
- version: number;
228
- };
32
+ principalHeads: {
33
+ keyEpoch: number;
34
+ keyFingerprint: string;
35
+ principalId: string;
36
+ principalType: "group" | "organization";
37
+ stateHash: string;
38
+ version: number;
229
39
  }[];
230
40
  }, z.core.$ZodTypeInternals<{
231
41
  code: "principal_policy_stale";
232
42
  error: string;
233
- principalPolicies: {
234
- previousStates: {
235
- grants: {
236
- accessLevel: "admin" | "read" | "write";
237
- containerId: string;
238
- }[];
239
- projection: {
240
- role: "member" | "admin";
241
- userId: string;
242
- }[];
243
- state: {
244
- createdAt: string;
245
- encapsulationPublicKey: string;
246
- externalAuthority: {
247
- keyEpoch: number;
248
- keyFingerprint: string;
249
- principalId: string;
250
- principalType: "group";
251
- stateHash: string;
252
- version: number;
253
- } | null;
254
- grantCount: number;
255
- grantRoot: string;
256
- keyEpoch: number;
257
- keyFingerprint: string;
258
- memberCount: number;
259
- memberEnvelopesRoot: string;
260
- membershipMode: "projection";
261
- membershipRoot: string;
262
- payloadCiphertextHash: string;
263
- prevStateHash: string | null;
264
- principalId: string;
265
- principalType: "group" | "organization";
266
- projectionRoot: string;
267
- signature: string;
268
- signedAt: string;
269
- signerUserId: string;
270
- signerUserKeyFingerprint: string;
271
- stateHash: string;
272
- version: number;
273
- };
274
- }[];
275
- currentGrants: {
276
- accessLevel: "admin" | "read" | "write";
277
- containerId: string;
278
- }[];
279
- currentMemberEnvelopes: {
280
- envelopes: {
281
- kemCipherText: string;
282
- memberKeyFingerprint: string;
283
- userId: string;
284
- wrappedKey: string;
285
- }[];
286
- epoch: number;
287
- principalId: string;
288
- principalType: "group" | "organization";
289
- stateHash: string;
290
- };
291
- currentPayload: {
292
- cipherSuite: "aes-256-gcm";
293
- ciphertext: string;
294
- ciphertextHash: string;
295
- createdAt: string;
296
- principalId: string;
297
- principalType: "group" | "organization";
298
- stateHash: string;
299
- };
300
- currentProjection: {
301
- role: "member" | "admin";
302
- userId: string;
303
- }[];
304
- currentState: {
305
- createdAt: string;
306
- encapsulationPublicKey: string;
307
- externalAuthority: {
308
- keyEpoch: number;
309
- keyFingerprint: string;
310
- principalId: string;
311
- principalType: "group";
312
- stateHash: string;
313
- version: number;
314
- } | null;
315
- grantCount: number;
316
- grantRoot: string;
317
- keyEpoch: number;
318
- keyFingerprint: string;
319
- memberCount: number;
320
- memberEnvelopesRoot: string;
321
- membershipMode: "projection";
322
- membershipRoot: string;
323
- payloadCiphertextHash: string;
324
- prevStateHash: string | null;
325
- principalId: string;
326
- principalType: "group" | "organization";
327
- projectionRoot: string;
328
- signature: string;
329
- signedAt: string;
330
- signerUserId: string;
331
- signerUserKeyFingerprint: string;
332
- stateHash: string;
333
- version: number;
334
- };
43
+ principalHeads: {
44
+ keyEpoch: number;
45
+ keyFingerprint: string;
46
+ principalId: string;
47
+ principalType: "group" | "organization";
48
+ stateHash: string;
49
+ version: number;
335
50
  }[];
336
51
  }, {
337
52
  code: "principal_policy_stale";
338
53
  error: string;
339
- principalPolicies: {
340
- previousStates: {
341
- grants: {
342
- accessLevel: "admin" | "read" | "write";
343
- containerId: string;
344
- }[];
345
- projection: {
346
- role: "member" | "admin";
347
- userId: string;
348
- }[];
349
- state: {
350
- createdAt: string;
351
- encapsulationPublicKey: string;
352
- externalAuthority: {
353
- keyEpoch: number;
354
- keyFingerprint: string;
355
- principalId: string;
356
- principalType: "group";
357
- stateHash: string;
358
- version: number;
359
- } | null;
360
- grantCount: number;
361
- grantRoot: string;
362
- keyEpoch: number;
363
- keyFingerprint: string;
364
- memberCount: number;
365
- memberEnvelopesRoot: string;
366
- membershipMode: "projection";
367
- membershipRoot: string;
368
- payloadCiphertextHash: string;
369
- prevStateHash: string | null;
370
- principalId: string;
371
- principalType: "group" | "organization";
372
- projectionRoot: string;
373
- signature: string;
374
- signedAt: string;
375
- signerUserId: string;
376
- signerUserKeyFingerprint: string;
377
- stateHash: string;
378
- version: number;
379
- };
380
- }[];
381
- currentGrants: {
382
- accessLevel: "admin" | "read" | "write";
383
- containerId: string;
384
- }[];
385
- currentMemberEnvelopes: {
386
- envelopes: {
387
- kemCipherText: string;
388
- memberKeyFingerprint: string;
389
- userId: string;
390
- wrappedKey: string;
391
- }[];
392
- epoch: number;
393
- principalId: string;
394
- principalType: "group" | "organization";
395
- stateHash: string;
396
- };
397
- currentPayload: {
398
- cipherSuite: "aes-256-gcm";
399
- ciphertext: string;
400
- ciphertextHash: string;
401
- createdAt: string;
402
- principalId: string;
403
- principalType: "group" | "organization";
404
- stateHash: string;
405
- };
406
- currentProjection: {
407
- role: "member" | "admin";
408
- userId: string;
409
- }[];
410
- currentState: {
411
- createdAt: string;
412
- encapsulationPublicKey: string;
413
- externalAuthority: {
414
- keyEpoch: number;
415
- keyFingerprint: string;
416
- principalId: string;
417
- principalType: "group";
418
- stateHash: string;
419
- version: number;
420
- } | null;
421
- grantCount: number;
422
- grantRoot: string;
423
- keyEpoch: number;
424
- keyFingerprint: string;
425
- memberCount: number;
426
- memberEnvelopesRoot: string;
427
- membershipMode: "projection";
428
- membershipRoot: string;
429
- payloadCiphertextHash: string;
430
- prevStateHash: string | null;
431
- principalId: string;
432
- principalType: "group" | "organization";
433
- projectionRoot: string;
434
- signature: string;
435
- signedAt: string;
436
- signerUserId: string;
437
- signerUserKeyFingerprint: string;
438
- stateHash: string;
439
- version: number;
440
- };
54
+ principalHeads: {
55
+ keyEpoch: number;
56
+ keyFingerprint: string;
57
+ principalId: string;
58
+ principalType: "group" | "organization";
59
+ stateHash: string;
60
+ version: number;
441
61
  }[];
442
62
  }>>]>;
443
63
  export type ContainerMutationFailureResponse = z.infer<typeof ContainerMutationFailureResponseSchema>;