@tearleads/client-sdk 0.1.68 → 0.1.71

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 (123) hide show
  1. package/data/containers/shared/principalPolicies.js +8 -12
  2. package/data/containers/shared/principalPolicies.js.map +1 -1
  3. package/internal/api-client/ApiClient.d.ts +73 -3
  4. package/internal/api-client/apiRequestMetrics.d.ts +18 -4
  5. package/internal/api-client/apiRequestMetrics.js +55 -5
  6. package/internal/api-client/apiRequestMetrics.js.map +1 -1
  7. package/internal/api-client/durationSampleWindow.d.ts +26 -0
  8. package/internal/api-client/durationSampleWindow.js +42 -0
  9. package/internal/api-client/durationSampleWindow.js.map +1 -0
  10. package/internal/api-client/measureApiRequest.js +9 -4
  11. package/internal/api-client/measureApiRequest.js.map +1 -1
  12. package/internal/api-client/serverTiming.d.ts +12 -0
  13. package/internal/api-client/serverTiming.js +49 -0
  14. package/internal/api-client/serverTiming.js.map +1 -0
  15. package/internal/validators/documentCreateSeedRefinements.js +9 -0
  16. package/internal/validators/documentCreateSeedRefinements.js.map +1 -0
  17. package/internal/validators/operation/attachments.d.ts +48 -8
  18. package/internal/validators/operation/auth.d.ts +576 -76
  19. package/internal/validators/operation/containerMutations.d.ts +619 -44
  20. package/internal/validators/operation/containerMutations.js +7 -1
  21. package/internal/validators/operation/containerMutations.js.map +1 -1
  22. package/internal/validators/operation/documentMutations.d.ts +428 -12
  23. package/internal/validators/operation/documentMutations.js +6 -1
  24. package/internal/validators/operation/documentMutations.js.map +1 -1
  25. package/internal/validators/operation/documentSync.d.ts +33 -13
  26. package/internal/validators/operation/organizations.d.ts +648 -88
  27. package/internal/validators/operation/principals.d.ts +96 -16
  28. package/internal/validators/request/blob.d.ts +48 -8
  29. package/internal/validators/request/container.d.ts +96 -16
  30. package/internal/validators/request/container.js +5 -2
  31. package/internal/validators/request/container.js.map +1 -1
  32. package/internal/validators/request/containerMetadata.d.ts +409 -16
  33. package/internal/validators/request/containerMetadata.js +20 -3
  34. package/internal/validators/request/containerMetadata.js.map +1 -1
  35. package/internal/validators/request/document.d.ts +631 -10
  36. package/internal/validators/request/document.js +19 -1
  37. package/internal/validators/request/document.js.map +1 -1
  38. package/internal/validators/request/documentCreateSeed.js +35 -0
  39. package/internal/validators/request/documentCreateSeed.js.map +1 -0
  40. package/internal/validators/request/documentSyncSchema.d.ts +24 -4
  41. package/internal/validators/request/documentSyncSchema.js +2 -1
  42. package/internal/validators/request/documentSyncSchema.js.map +1 -1
  43. package/internal/validators/request/index.d.ts +1 -0
  44. package/internal/validators/request/index.js +1 -0
  45. package/internal/validators/request/index.js.map +1 -1
  46. package/internal/validators/request/organization.d.ts +96 -16
  47. package/internal/validators/request/organizationProvisioning.d.ts +1456 -246
  48. package/internal/validators/request/organizationProvisioning.js +9 -22
  49. package/internal/validators/request/organizationProvisioning.js.map +1 -1
  50. package/internal/validators/request/principal.d.ts +120 -20
  51. package/internal/validators/request/principalPolicyRef.d.ts +42 -0
  52. package/internal/validators/request/principalPolicyRef.js +19 -0
  53. package/internal/validators/request/principalPolicyRef.js.map +1 -0
  54. package/internal/validators/request/registration.d.ts +456 -76
  55. package/internal/validators/response/containerMetadata.d.ts +20 -0
  56. package/internal/validators/response/documentMutation.d.ts +43 -0
  57. package/internal/validators/response/documentMutation.js +12 -1
  58. package/internal/validators/response/documentMutation.js.map +1 -1
  59. package/internal/validators/response/documentSyncSchema.d.ts +13 -9
  60. package/internal/validators/response/documentSyncSchema.js +23 -18
  61. package/internal/validators/response/documentSyncSchema.js.map +1 -1
  62. package/internal/validators/response/index.d.ts +1 -1
  63. package/internal/validators/response/index.js.map +1 -1
  64. package/internal/validators/response/organizationProvisioning.d.ts +350 -0
  65. package/internal/validators/response/registration.d.ts +120 -0
  66. package/internal/validators/util/containerLimits.d.ts +8 -0
  67. package/internal/validators/util/containerLimits.js +8 -0
  68. package/internal/validators/util/containerLimits.js.map +1 -1
  69. package/package.json +1 -1
  70. package/stores/container-contents/containerState/containerStatePersistence.js +2 -0
  71. package/stores/container-contents/containerState/containerStatePersistence.js.map +1 -1
  72. package/stores/container-contents/remoteEvents/remoteEventSync.js +1 -1
  73. package/stores/container-contents/remoteEvents/remoteEventSync.js.map +1 -1
  74. package/stores/container-contents/state.js +2 -0
  75. package/stores/container-contents/state.js.map +1 -1
  76. package/stores/container-contents/syncAgent/syncAgentTypes.d.ts +5 -0
  77. package/stores/container-contents/syncAgent/syncAgentTypes.js.map +1 -1
  78. package/stores/documents/documentStore/sync/createdDocumentPersistence.js +71 -0
  79. package/stores/documents/documentStore/sync/createdDocumentPersistence.js.map +1 -0
  80. package/stores/documents/documentStore/sync/index.js +13 -2
  81. package/stores/documents/documentStore/sync/index.js.map +1 -1
  82. package/stores/documents/documentStore/sync/syncRemoteSignals.js +21 -3
  83. package/stores/documents/documentStore/sync/syncRemoteSignals.js.map +1 -1
  84. package/stores/documents/documentStore/sync/syncSeededCreate.js +50 -0
  85. package/stores/documents/documentStore/sync/syncSeededCreate.js.map +1 -0
  86. package/stores/documents/documentStore/sync/syncShared.js +16 -8
  87. package/stores/documents/documentStore/sync/syncShared.js.map +1 -1
  88. package/workflows/container-contents/container-state/create/createIntentSeed.js +60 -0
  89. package/workflows/container-contents/container-state/create/createIntentSeed.js.map +1 -0
  90. package/workflows/container-contents/container-state/create/createIntentSync.js +18 -19
  91. package/workflows/container-contents/container-state/create/createIntentSync.js.map +1 -1
  92. package/workflows/container-contents/container-state/create/createWithMetadata.js +43 -6
  93. package/workflows/container-contents/container-state/create/createWithMetadata.js.map +1 -1
  94. package/workflows/container-contents/container-state/create/createWithMetadataPlan.js +5 -1
  95. package/workflows/container-contents/container-state/create/createWithMetadataPlan.js.map +1 -1
  96. package/workflows/container-contents/container-state/remote.js +15 -0
  97. package/workflows/container-contents/container-state/remote.js.map +1 -1
  98. package/workflows/container-contents/container-state/types.js.map +1 -1
  99. package/workflows/container-contents/metadata/metadataEvents.d.ts +7 -1
  100. package/workflows/container-contents/metadata/metadataEvents.js +8 -2
  101. package/workflows/container-contents/metadata/metadataEvents.js.map +1 -1
  102. package/workflows/container-contents/remoteHydration/types.d.ts +3 -0
  103. package/workflows/container-contents/remoteHydration/types.js.map +1 -1
  104. package/workflows/containers/child/mutationRequestCore.js +2 -2
  105. package/workflows/containers/child/mutationRequestCore.js.map +1 -1
  106. package/workflows/containers/child/recitePlan.js +2 -2
  107. package/workflows/containers/child/recitePlan.js.map +1 -1
  108. package/workflows/containers/root/create.js +17 -28
  109. package/workflows/containers/root/create.js.map +1 -1
  110. package/workflows/containers/root/initialGroupPolicy.js +0 -23
  111. package/workflows/containers/root/initialGroupPolicy.js.map +1 -1
  112. package/workflows/documents/create/index.d.ts +7 -0
  113. package/workflows/documents/create/index.js +40 -2
  114. package/workflows/documents/create/index.js.map +1 -1
  115. package/workflows/documents/index.d.ts +1 -0
  116. package/workflows/documents/index.js +1 -0
  117. package/workflows/documents/index.js.map +1 -1
  118. package/workflows/documents/sync/initialSync.d.ts +39 -0
  119. package/workflows/documents/sync/initialSync.js +39 -6
  120. package/workflows/documents/sync/initialSync.js.map +1 -1
  121. package/workflows/documents/syncFailures/syncPolicyRepair.js +2 -8
  122. package/workflows/documents/syncFailures/syncPolicyRepair.js.map +1 -1
  123. package/workflows/registration/provisioningBootstrapBuilders.d.ts +12 -2
@@ -18,7 +18,12 @@ export declare const documentCreateRequestShape: {
18
18
  keyring: Record<string, unknown> | null;
19
19
  manifest: Record<string, unknown>;
20
20
  predecessorBridge: Record<string, unknown> | null;
21
- principalPolicies: Record<string, unknown>[];
21
+ principalPolicyRefs: {
22
+ principalType: "group" | "organization";
23
+ principalId: string;
24
+ version: number;
25
+ stateHash: string;
26
+ }[];
22
27
  wraps: Record<string, unknown>[];
23
28
  containerManifestHistoryRefs?: {
24
29
  containerId: string;
@@ -50,7 +55,12 @@ export declare const documentCreateRequestShape: {
50
55
  keyring: Record<string, unknown> | null;
51
56
  manifest: Record<string, unknown>;
52
57
  predecessorBridge: Record<string, unknown> | null;
53
- principalPolicies: Record<string, unknown>[];
58
+ principalPolicyRefs: {
59
+ principalType: "group" | "organization";
60
+ principalId: string;
61
+ version: number;
62
+ stateHash: string;
63
+ }[];
54
64
  wraps: Record<string, unknown>[];
55
65
  containerManifestHistoryRefs?: {
56
66
  containerId: string;
@@ -135,6 +145,269 @@ export declare const documentCreateRequestShape: {
135
145
  manifestHash: string;
136
146
  }[]>>;
137
147
  };
148
+ /** A document create with no seed: a container's metadata document. */
149
+ export declare const DocumentCreateBaseRequestSchema: z.ZodType<{
150
+ body: unknown;
151
+ contentKeyBundle: {
152
+ contentKeyEpoch: number;
153
+ linkSetManifestHash: string;
154
+ targetHash: string;
155
+ targets: {
156
+ containerId: string;
157
+ containerKeyEpoch: number;
158
+ containerKeyEpochId: string;
159
+ containerManifestHash: string;
160
+ wrappedKey: string;
161
+ wrappingMetadata: Record<string, unknown>;
162
+ }[];
163
+ };
164
+ event: Record<string, unknown>;
165
+ expectedManifestHash: string;
166
+ manifest: Record<string, unknown>;
167
+ authorizingContainerPathRefs?: {
168
+ containerId: string;
169
+ manifestHash: string;
170
+ }[][] | undefined;
171
+ containerRekeys?: {
172
+ body: unknown;
173
+ event: Record<string, unknown>;
174
+ expectedManifestHash: string;
175
+ keyEpoch: Record<string, unknown>;
176
+ keyring: Record<string, unknown> | null;
177
+ manifest: Record<string, unknown>;
178
+ predecessorBridge: Record<string, unknown> | null;
179
+ principalPolicyRefs: {
180
+ principalType: "group" | "organization";
181
+ principalId: string;
182
+ version: number;
183
+ stateHash: string;
184
+ }[];
185
+ wraps: Record<string, unknown>[];
186
+ containerManifestHistoryRefs?: {
187
+ containerId: string;
188
+ manifestHash: string;
189
+ }[] | undefined;
190
+ destinationParentContainerPathRefs?: {
191
+ containerId: string;
192
+ manifestHash: string;
193
+ }[] | undefined;
194
+ parentContainerPathRefs?: {
195
+ containerId: string;
196
+ manifestHash: string;
197
+ }[] | undefined;
198
+ parentKekState?: Record<string, unknown> | null | undefined;
199
+ previousContainerPathRefs?: {
200
+ containerId: string;
201
+ manifestHash: string;
202
+ }[] | undefined;
203
+ previousManifestRef?: {
204
+ containerId: string;
205
+ manifestHash: string;
206
+ } | null | undefined;
207
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
208
+ }[] | undefined;
209
+ targetContainerPathRefs?: {
210
+ containerId: string;
211
+ manifestHash: string;
212
+ }[] | undefined;
213
+ }, {
214
+ body: unknown;
215
+ contentKeyBundle: {
216
+ contentKeyEpoch: number;
217
+ linkSetManifestHash: string;
218
+ targetHash: string;
219
+ targets: {
220
+ containerId: string;
221
+ containerKeyEpoch: number;
222
+ containerKeyEpochId: string;
223
+ containerManifestHash: string;
224
+ wrappedKey: string;
225
+ wrappingMetadata: Record<string, unknown>;
226
+ }[];
227
+ };
228
+ event: Record<string, unknown>;
229
+ expectedManifestHash: string;
230
+ manifest: Record<string, unknown>;
231
+ authorizingContainerPathRefs?: {
232
+ containerId: string;
233
+ manifestHash: string;
234
+ }[][] | undefined;
235
+ containerRekeys?: {
236
+ body: unknown;
237
+ event: Record<string, unknown>;
238
+ expectedManifestHash: string;
239
+ keyEpoch: Record<string, unknown>;
240
+ keyring: Record<string, unknown> | null;
241
+ manifest: Record<string, unknown>;
242
+ predecessorBridge: Record<string, unknown> | null;
243
+ principalPolicyRefs: {
244
+ principalType: "group" | "organization";
245
+ principalId: string;
246
+ version: number;
247
+ stateHash: string;
248
+ }[];
249
+ wraps: Record<string, unknown>[];
250
+ containerManifestHistoryRefs?: {
251
+ containerId: string;
252
+ manifestHash: string;
253
+ }[] | undefined;
254
+ destinationParentContainerPathRefs?: {
255
+ containerId: string;
256
+ manifestHash: string;
257
+ }[] | undefined;
258
+ parentContainerPathRefs?: {
259
+ containerId: string;
260
+ manifestHash: string;
261
+ }[] | undefined;
262
+ parentKekState?: Record<string, unknown> | null | undefined;
263
+ previousContainerPathRefs?: {
264
+ containerId: string;
265
+ manifestHash: string;
266
+ }[] | undefined;
267
+ previousManifestRef?: {
268
+ containerId: string;
269
+ manifestHash: string;
270
+ } | null | undefined;
271
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
272
+ }[] | undefined;
273
+ targetContainerPathRefs?: {
274
+ containerId: string;
275
+ manifestHash: string;
276
+ }[] | undefined;
277
+ }, z.core.$ZodTypeInternals<{
278
+ body: unknown;
279
+ contentKeyBundle: {
280
+ contentKeyEpoch: number;
281
+ linkSetManifestHash: string;
282
+ targetHash: string;
283
+ targets: {
284
+ containerId: string;
285
+ containerKeyEpoch: number;
286
+ containerKeyEpochId: string;
287
+ containerManifestHash: string;
288
+ wrappedKey: string;
289
+ wrappingMetadata: Record<string, unknown>;
290
+ }[];
291
+ };
292
+ event: Record<string, unknown>;
293
+ expectedManifestHash: string;
294
+ manifest: Record<string, unknown>;
295
+ authorizingContainerPathRefs?: {
296
+ containerId: string;
297
+ manifestHash: string;
298
+ }[][] | undefined;
299
+ containerRekeys?: {
300
+ body: unknown;
301
+ event: Record<string, unknown>;
302
+ expectedManifestHash: string;
303
+ keyEpoch: Record<string, unknown>;
304
+ keyring: Record<string, unknown> | null;
305
+ manifest: Record<string, unknown>;
306
+ predecessorBridge: Record<string, unknown> | null;
307
+ principalPolicyRefs: {
308
+ principalType: "group" | "organization";
309
+ principalId: string;
310
+ version: number;
311
+ stateHash: string;
312
+ }[];
313
+ wraps: Record<string, unknown>[];
314
+ containerManifestHistoryRefs?: {
315
+ containerId: string;
316
+ manifestHash: string;
317
+ }[] | undefined;
318
+ destinationParentContainerPathRefs?: {
319
+ containerId: string;
320
+ manifestHash: string;
321
+ }[] | undefined;
322
+ parentContainerPathRefs?: {
323
+ containerId: string;
324
+ manifestHash: string;
325
+ }[] | undefined;
326
+ parentKekState?: Record<string, unknown> | null | undefined;
327
+ previousContainerPathRefs?: {
328
+ containerId: string;
329
+ manifestHash: string;
330
+ }[] | undefined;
331
+ previousManifestRef?: {
332
+ containerId: string;
333
+ manifestHash: string;
334
+ } | null | undefined;
335
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
336
+ }[] | undefined;
337
+ targetContainerPathRefs?: {
338
+ containerId: string;
339
+ manifestHash: string;
340
+ }[] | undefined;
341
+ }, {
342
+ body: unknown;
343
+ contentKeyBundle: {
344
+ contentKeyEpoch: number;
345
+ linkSetManifestHash: string;
346
+ targetHash: string;
347
+ targets: {
348
+ containerId: string;
349
+ containerKeyEpoch: number;
350
+ containerKeyEpochId: string;
351
+ containerManifestHash: string;
352
+ wrappedKey: string;
353
+ wrappingMetadata: Record<string, unknown>;
354
+ }[];
355
+ };
356
+ event: Record<string, unknown>;
357
+ expectedManifestHash: string;
358
+ manifest: Record<string, unknown>;
359
+ authorizingContainerPathRefs?: {
360
+ containerId: string;
361
+ manifestHash: string;
362
+ }[][] | undefined;
363
+ containerRekeys?: {
364
+ body: unknown;
365
+ event: Record<string, unknown>;
366
+ expectedManifestHash: string;
367
+ keyEpoch: Record<string, unknown>;
368
+ keyring: Record<string, unknown> | null;
369
+ manifest: Record<string, unknown>;
370
+ predecessorBridge: Record<string, unknown> | null;
371
+ principalPolicyRefs: {
372
+ principalType: "group" | "organization";
373
+ principalId: string;
374
+ version: number;
375
+ stateHash: string;
376
+ }[];
377
+ wraps: Record<string, unknown>[];
378
+ containerManifestHistoryRefs?: {
379
+ containerId: string;
380
+ manifestHash: string;
381
+ }[] | undefined;
382
+ destinationParentContainerPathRefs?: {
383
+ containerId: string;
384
+ manifestHash: string;
385
+ }[] | undefined;
386
+ parentContainerPathRefs?: {
387
+ containerId: string;
388
+ manifestHash: string;
389
+ }[] | undefined;
390
+ parentKekState?: Record<string, unknown> | null | undefined;
391
+ previousContainerPathRefs?: {
392
+ containerId: string;
393
+ manifestHash: string;
394
+ }[] | undefined;
395
+ previousManifestRef?: {
396
+ containerId: string;
397
+ manifestHash: string;
398
+ } | null | undefined;
399
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
400
+ }[] | undefined;
401
+ targetContainerPathRefs?: {
402
+ containerId: string;
403
+ manifestHash: string;
404
+ }[] | undefined;
405
+ }>>;
406
+ /**
407
+ * `POST /documents`. The optional seed is the create's first queued update,
408
+ * committed in the create transaction under the same checks as a standalone
409
+ * sync, so a new document needs no follow-up sync round trip.
410
+ */
138
411
  export declare const DocumentCreateRequestSchema: z.ZodType<{
139
412
  body: unknown;
140
413
  contentKeyBundle: {
@@ -153,6 +426,83 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
153
426
  event: Record<string, unknown>;
154
427
  expectedManifestHash: string;
155
428
  manifest: Record<string, unknown>;
429
+ initialSync?: {
430
+ contentKeyEpoch: number;
431
+ expectedLinkSetManifestHash: string;
432
+ expectedTargetHash: string;
433
+ localVersionVector: string | null;
434
+ outgoingUpdates: {
435
+ encryptedData: string;
436
+ id: string;
437
+ partialEndVersionVector: string;
438
+ partialStartVersionVector: string;
439
+ plaintextHash: string;
440
+ writeHeader: Record<string, unknown>;
441
+ checkpointKind?: "rotate_baseline" | undefined;
442
+ checkpointPayloadKind?: "full_history_snapshot" | undefined;
443
+ sourceVersionVector?: string | undefined;
444
+ }[];
445
+ supportsPullPagination: true;
446
+ authorizingContainerPathRefs?: {
447
+ containerId: string;
448
+ manifestHash: string;
449
+ }[][] | undefined;
450
+ containerRekeys?: {
451
+ body: unknown;
452
+ event: Record<string, unknown>;
453
+ expectedManifestHash: string;
454
+ keyEpoch: Record<string, unknown>;
455
+ keyring: Record<string, unknown> | null;
456
+ manifest: Record<string, unknown>;
457
+ predecessorBridge: Record<string, unknown> | null;
458
+ principalPolicyRefs: {
459
+ principalType: "group" | "organization";
460
+ principalId: string;
461
+ version: number;
462
+ stateHash: string;
463
+ }[];
464
+ wraps: Record<string, unknown>[];
465
+ containerManifestHistoryRefs?: {
466
+ containerId: string;
467
+ manifestHash: string;
468
+ }[] | undefined;
469
+ destinationParentContainerPathRefs?: {
470
+ containerId: string;
471
+ manifestHash: string;
472
+ }[] | undefined;
473
+ parentContainerPathRefs?: {
474
+ containerId: string;
475
+ manifestHash: string;
476
+ }[] | undefined;
477
+ parentKekState?: Record<string, unknown> | null | undefined;
478
+ previousContainerPathRefs?: {
479
+ containerId: string;
480
+ manifestHash: string;
481
+ }[] | undefined;
482
+ previousManifestRef?: {
483
+ containerId: string;
484
+ manifestHash: string;
485
+ } | null | undefined;
486
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
487
+ }[] | undefined;
488
+ contentKeyBundle?: {
489
+ contentKeyEpoch: number;
490
+ linkSetManifestHash: string;
491
+ targetHash: string;
492
+ targets: {
493
+ containerId: string;
494
+ containerKeyEpoch: number;
495
+ containerKeyEpochId: string;
496
+ containerManifestHash: string;
497
+ wrappedKey: string;
498
+ wrappingMetadata: Record<string, unknown>;
499
+ }[];
500
+ } | undefined;
501
+ historyMode?: "raw" | undefined;
502
+ inlineRekeyCommitId?: string | undefined;
503
+ minLsn?: string | undefined;
504
+ pullCursor?: string | undefined;
505
+ } | undefined;
156
506
  authorizingContainerPathRefs?: {
157
507
  containerId: string;
158
508
  manifestHash: string;
@@ -165,7 +515,12 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
165
515
  keyring: Record<string, unknown> | null;
166
516
  manifest: Record<string, unknown>;
167
517
  predecessorBridge: Record<string, unknown> | null;
168
- principalPolicies: Record<string, unknown>[];
518
+ principalPolicyRefs: {
519
+ principalType: "group" | "organization";
520
+ principalId: string;
521
+ version: number;
522
+ stateHash: string;
523
+ }[];
169
524
  wraps: Record<string, unknown>[];
170
525
  containerManifestHistoryRefs?: {
171
526
  containerId: string;
@@ -212,6 +567,83 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
212
567
  event: Record<string, unknown>;
213
568
  expectedManifestHash: string;
214
569
  manifest: Record<string, unknown>;
570
+ initialSync?: {
571
+ contentKeyEpoch: number;
572
+ expectedLinkSetManifestHash: string;
573
+ expectedTargetHash: string;
574
+ localVersionVector: string | null;
575
+ outgoingUpdates: {
576
+ encryptedData: string;
577
+ id: string;
578
+ partialEndVersionVector: string;
579
+ partialStartVersionVector: string;
580
+ plaintextHash: string;
581
+ writeHeader: Record<string, unknown>;
582
+ checkpointKind?: "rotate_baseline" | undefined;
583
+ checkpointPayloadKind?: "full_history_snapshot" | undefined;
584
+ sourceVersionVector?: string | undefined;
585
+ }[];
586
+ supportsPullPagination: true;
587
+ authorizingContainerPathRefs?: {
588
+ containerId: string;
589
+ manifestHash: string;
590
+ }[][] | undefined;
591
+ containerRekeys?: {
592
+ body: unknown;
593
+ event: Record<string, unknown>;
594
+ expectedManifestHash: string;
595
+ keyEpoch: Record<string, unknown>;
596
+ keyring: Record<string, unknown> | null;
597
+ manifest: Record<string, unknown>;
598
+ predecessorBridge: Record<string, unknown> | null;
599
+ principalPolicyRefs: {
600
+ principalType: "group" | "organization";
601
+ principalId: string;
602
+ version: number;
603
+ stateHash: string;
604
+ }[];
605
+ wraps: Record<string, unknown>[];
606
+ containerManifestHistoryRefs?: {
607
+ containerId: string;
608
+ manifestHash: string;
609
+ }[] | undefined;
610
+ destinationParentContainerPathRefs?: {
611
+ containerId: string;
612
+ manifestHash: string;
613
+ }[] | undefined;
614
+ parentContainerPathRefs?: {
615
+ containerId: string;
616
+ manifestHash: string;
617
+ }[] | undefined;
618
+ parentKekState?: Record<string, unknown> | null | undefined;
619
+ previousContainerPathRefs?: {
620
+ containerId: string;
621
+ manifestHash: string;
622
+ }[] | undefined;
623
+ previousManifestRef?: {
624
+ containerId: string;
625
+ manifestHash: string;
626
+ } | null | undefined;
627
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
628
+ }[] | undefined;
629
+ contentKeyBundle?: {
630
+ contentKeyEpoch: number;
631
+ linkSetManifestHash: string;
632
+ targetHash: string;
633
+ targets: {
634
+ containerId: string;
635
+ containerKeyEpoch: number;
636
+ containerKeyEpochId: string;
637
+ containerManifestHash: string;
638
+ wrappedKey: string;
639
+ wrappingMetadata: Record<string, unknown>;
640
+ }[];
641
+ } | undefined;
642
+ historyMode?: "raw" | undefined;
643
+ inlineRekeyCommitId?: string | undefined;
644
+ minLsn?: string | undefined;
645
+ pullCursor?: string | undefined;
646
+ } | undefined;
215
647
  authorizingContainerPathRefs?: {
216
648
  containerId: string;
217
649
  manifestHash: string;
@@ -224,7 +656,12 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
224
656
  keyring: Record<string, unknown> | null;
225
657
  manifest: Record<string, unknown>;
226
658
  predecessorBridge: Record<string, unknown> | null;
227
- principalPolicies: Record<string, unknown>[];
659
+ principalPolicyRefs: {
660
+ principalType: "group" | "organization";
661
+ principalId: string;
662
+ version: number;
663
+ stateHash: string;
664
+ }[];
228
665
  wraps: Record<string, unknown>[];
229
666
  containerManifestHistoryRefs?: {
230
667
  containerId: string;
@@ -271,6 +708,83 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
271
708
  event: Record<string, unknown>;
272
709
  expectedManifestHash: string;
273
710
  manifest: Record<string, unknown>;
711
+ initialSync?: {
712
+ contentKeyEpoch: number;
713
+ expectedLinkSetManifestHash: string;
714
+ expectedTargetHash: string;
715
+ localVersionVector: string | null;
716
+ outgoingUpdates: {
717
+ encryptedData: string;
718
+ id: string;
719
+ partialEndVersionVector: string;
720
+ partialStartVersionVector: string;
721
+ plaintextHash: string;
722
+ writeHeader: Record<string, unknown>;
723
+ checkpointKind?: "rotate_baseline" | undefined;
724
+ checkpointPayloadKind?: "full_history_snapshot" | undefined;
725
+ sourceVersionVector?: string | undefined;
726
+ }[];
727
+ supportsPullPagination: true;
728
+ authorizingContainerPathRefs?: {
729
+ containerId: string;
730
+ manifestHash: string;
731
+ }[][] | undefined;
732
+ containerRekeys?: {
733
+ body: unknown;
734
+ event: Record<string, unknown>;
735
+ expectedManifestHash: string;
736
+ keyEpoch: Record<string, unknown>;
737
+ keyring: Record<string, unknown> | null;
738
+ manifest: Record<string, unknown>;
739
+ predecessorBridge: Record<string, unknown> | null;
740
+ principalPolicyRefs: {
741
+ principalType: "group" | "organization";
742
+ principalId: string;
743
+ version: number;
744
+ stateHash: string;
745
+ }[];
746
+ wraps: Record<string, unknown>[];
747
+ containerManifestHistoryRefs?: {
748
+ containerId: string;
749
+ manifestHash: string;
750
+ }[] | undefined;
751
+ destinationParentContainerPathRefs?: {
752
+ containerId: string;
753
+ manifestHash: string;
754
+ }[] | undefined;
755
+ parentContainerPathRefs?: {
756
+ containerId: string;
757
+ manifestHash: string;
758
+ }[] | undefined;
759
+ parentKekState?: Record<string, unknown> | null | undefined;
760
+ previousContainerPathRefs?: {
761
+ containerId: string;
762
+ manifestHash: string;
763
+ }[] | undefined;
764
+ previousManifestRef?: {
765
+ containerId: string;
766
+ manifestHash: string;
767
+ } | null | undefined;
768
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
769
+ }[] | undefined;
770
+ contentKeyBundle?: {
771
+ contentKeyEpoch: number;
772
+ linkSetManifestHash: string;
773
+ targetHash: string;
774
+ targets: {
775
+ containerId: string;
776
+ containerKeyEpoch: number;
777
+ containerKeyEpochId: string;
778
+ containerManifestHash: string;
779
+ wrappedKey: string;
780
+ wrappingMetadata: Record<string, unknown>;
781
+ }[];
782
+ } | undefined;
783
+ historyMode?: "raw" | undefined;
784
+ inlineRekeyCommitId?: string | undefined;
785
+ minLsn?: string | undefined;
786
+ pullCursor?: string | undefined;
787
+ } | undefined;
274
788
  authorizingContainerPathRefs?: {
275
789
  containerId: string;
276
790
  manifestHash: string;
@@ -283,7 +797,12 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
283
797
  keyring: Record<string, unknown> | null;
284
798
  manifest: Record<string, unknown>;
285
799
  predecessorBridge: Record<string, unknown> | null;
286
- principalPolicies: Record<string, unknown>[];
800
+ principalPolicyRefs: {
801
+ principalType: "group" | "organization";
802
+ principalId: string;
803
+ version: number;
804
+ stateHash: string;
805
+ }[];
287
806
  wraps: Record<string, unknown>[];
288
807
  containerManifestHistoryRefs?: {
289
808
  containerId: string;
@@ -330,6 +849,83 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
330
849
  event: Record<string, unknown>;
331
850
  expectedManifestHash: string;
332
851
  manifest: Record<string, unknown>;
852
+ initialSync?: {
853
+ contentKeyEpoch: number;
854
+ expectedLinkSetManifestHash: string;
855
+ expectedTargetHash: string;
856
+ localVersionVector: string | null;
857
+ outgoingUpdates: {
858
+ encryptedData: string;
859
+ id: string;
860
+ partialEndVersionVector: string;
861
+ partialStartVersionVector: string;
862
+ plaintextHash: string;
863
+ writeHeader: Record<string, unknown>;
864
+ checkpointKind?: "rotate_baseline" | undefined;
865
+ checkpointPayloadKind?: "full_history_snapshot" | undefined;
866
+ sourceVersionVector?: string | undefined;
867
+ }[];
868
+ supportsPullPagination: true;
869
+ authorizingContainerPathRefs?: {
870
+ containerId: string;
871
+ manifestHash: string;
872
+ }[][] | undefined;
873
+ containerRekeys?: {
874
+ body: unknown;
875
+ event: Record<string, unknown>;
876
+ expectedManifestHash: string;
877
+ keyEpoch: Record<string, unknown>;
878
+ keyring: Record<string, unknown> | null;
879
+ manifest: Record<string, unknown>;
880
+ predecessorBridge: Record<string, unknown> | null;
881
+ principalPolicyRefs: {
882
+ principalType: "group" | "organization";
883
+ principalId: string;
884
+ version: number;
885
+ stateHash: string;
886
+ }[];
887
+ wraps: Record<string, unknown>[];
888
+ containerManifestHistoryRefs?: {
889
+ containerId: string;
890
+ manifestHash: string;
891
+ }[] | undefined;
892
+ destinationParentContainerPathRefs?: {
893
+ containerId: string;
894
+ manifestHash: string;
895
+ }[] | undefined;
896
+ parentContainerPathRefs?: {
897
+ containerId: string;
898
+ manifestHash: string;
899
+ }[] | undefined;
900
+ parentKekState?: Record<string, unknown> | null | undefined;
901
+ previousContainerPathRefs?: {
902
+ containerId: string;
903
+ manifestHash: string;
904
+ }[] | undefined;
905
+ previousManifestRef?: {
906
+ containerId: string;
907
+ manifestHash: string;
908
+ } | null | undefined;
909
+ userRecipientKeys?: Record<string, unknown>[] | undefined;
910
+ }[] | undefined;
911
+ contentKeyBundle?: {
912
+ contentKeyEpoch: number;
913
+ linkSetManifestHash: string;
914
+ targetHash: string;
915
+ targets: {
916
+ containerId: string;
917
+ containerKeyEpoch: number;
918
+ containerKeyEpochId: string;
919
+ containerManifestHash: string;
920
+ wrappedKey: string;
921
+ wrappingMetadata: Record<string, unknown>;
922
+ }[];
923
+ } | undefined;
924
+ historyMode?: "raw" | undefined;
925
+ inlineRekeyCommitId?: string | undefined;
926
+ minLsn?: string | undefined;
927
+ pullCursor?: string | undefined;
928
+ } | undefined;
333
929
  authorizingContainerPathRefs?: {
334
930
  containerId: string;
335
931
  manifestHash: string;
@@ -342,7 +938,12 @@ export declare const DocumentCreateRequestSchema: z.ZodType<{
342
938
  keyring: Record<string, unknown> | null;
343
939
  manifest: Record<string, unknown>;
344
940
  predecessorBridge: Record<string, unknown> | null;
345
- principalPolicies: Record<string, unknown>[];
941
+ principalPolicyRefs: {
942
+ principalType: "group" | "organization";
943
+ principalId: string;
944
+ version: number;
945
+ stateHash: string;
946
+ }[];
346
947
  wraps: Record<string, unknown>[];
347
948
  containerManifestHistoryRefs?: {
348
949
  containerId: string;
@@ -407,7 +1008,12 @@ export declare const DocumentLinkSetMutationRequestSchema: z.ZodType<{
407
1008
  keyring: Record<string, unknown> | null;
408
1009
  manifest: Record<string, unknown>;
409
1010
  predecessorBridge: Record<string, unknown> | null;
410
- principalPolicies: Record<string, unknown>[];
1011
+ principalPolicyRefs: {
1012
+ principalType: "group" | "organization";
1013
+ principalId: string;
1014
+ version: number;
1015
+ stateHash: string;
1016
+ }[];
411
1017
  wraps: Record<string, unknown>[];
412
1018
  containerManifestHistoryRefs?: {
413
1019
  containerId: string;
@@ -477,7 +1083,12 @@ export declare const DocumentLinkSetMutationRequestSchema: z.ZodType<{
477
1083
  keyring: Record<string, unknown> | null;
478
1084
  manifest: Record<string, unknown>;
479
1085
  predecessorBridge: Record<string, unknown> | null;
480
- principalPolicies: Record<string, unknown>[];
1086
+ principalPolicyRefs: {
1087
+ principalType: "group" | "organization";
1088
+ principalId: string;
1089
+ version: number;
1090
+ stateHash: string;
1091
+ }[];
481
1092
  wraps: Record<string, unknown>[];
482
1093
  containerManifestHistoryRefs?: {
483
1094
  containerId: string;
@@ -547,7 +1158,12 @@ export declare const DocumentLinkSetMutationRequestSchema: z.ZodType<{
547
1158
  keyring: Record<string, unknown> | null;
548
1159
  manifest: Record<string, unknown>;
549
1160
  predecessorBridge: Record<string, unknown> | null;
550
- principalPolicies: Record<string, unknown>[];
1161
+ principalPolicyRefs: {
1162
+ principalType: "group" | "organization";
1163
+ principalId: string;
1164
+ version: number;
1165
+ stateHash: string;
1166
+ }[];
551
1167
  wraps: Record<string, unknown>[];
552
1168
  containerManifestHistoryRefs?: {
553
1169
  containerId: string;
@@ -617,7 +1233,12 @@ export declare const DocumentLinkSetMutationRequestSchema: z.ZodType<{
617
1233
  keyring: Record<string, unknown> | null;
618
1234
  manifest: Record<string, unknown>;
619
1235
  predecessorBridge: Record<string, unknown> | null;
620
- principalPolicies: Record<string, unknown>[];
1236
+ principalPolicyRefs: {
1237
+ principalType: "group" | "organization";
1238
+ principalId: string;
1239
+ version: number;
1240
+ stateHash: string;
1241
+ }[];
621
1242
  wraps: Record<string, unknown>[];
622
1243
  containerManifestHistoryRefs?: {
623
1244
  containerId: string;