@tearleads/client-sdk 0.1.249 → 0.1.251
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/documents/shared/events.js +2 -1
- package/data/documents/shared/events.js.map +1 -1
- package/data/keyingProjectionVerification/principalPolicy/mergeProjectionPolicyEvidence.js +1 -4
- package/data/keyingProjectionVerification/principalPolicy/mergeProjectionPolicyEvidence.js.map +1 -1
- package/data/persistence/principalPolicy/heldOrganizationDirectories.js +6 -1
- package/data/persistence/principalPolicy/heldOrganizationDirectories.js.map +1 -1
- package/data/persistence/principalPolicy/principalPolicyBundleIntegrity.js +1 -1
- package/data/persistence/principalPolicy/principalPolicyBundleIntegrity.js.map +1 -1
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyCurrent.js +1 -5
- package/data/persistence/principalPolicy/verifiedPrincipalPolicyCurrent.js.map +1 -1
- package/data/principals/organizationGroupDirectoryRequest.js +0 -2
- package/data/principals/organizationGroupDirectoryRequest.js.map +1 -1
- package/data/principals/organizationPolicyRequest.js +0 -2
- package/data/principals/organizationPolicyRequest.js.map +1 -1
- package/data/principals/principalPolicyRequest.js +0 -2
- package/data/principals/principalPolicyRequest.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +0 -58
- package/internal/api-client/client/apiClientContext.d.ts +0 -30
- package/internal/api-client/client/documents.d.ts +0 -12
- package/internal/api-client/client/principalPolicies.d.ts +0 -18
- package/internal/api-client/client/writerProjections.d.ts +0 -12
- package/internal/api-client/heldDirectoryCitations.d.ts +8 -4
- package/internal/api-client/heldDirectoryCitations.js +6 -10
- package/internal/api-client/heldDirectoryCitations.js.map +1 -1
- package/internal/api-client/organizationPolicyHistory.d.ts +0 -6
- package/internal/api-client/principalPolicyRequests.d.ts +0 -18
- package/internal/api-client/verifiedManifestCitations.js +3 -3
- package/internal/api-client/verifiedManifestCitations.js.map +1 -1
- package/internal/crypto/index.d.ts +1 -1
- package/internal/crypto/index.js.map +1 -1
- package/internal/crypto/keying/principalPolicyPayload.js +2 -12
- package/internal/crypto/keying/principalPolicyPayload.js.map +1 -1
- package/internal/crypto/keying/principalPolicyTypes.d.ts +5 -6
- package/internal/crypto/keying/principalPolicyTypes.js.map +1 -1
- package/internal/crypto/principalState.d.ts +1 -1
- package/internal/crypto/principalState.js.map +1 -1
- package/internal/crypto/principalStateTypes.d.ts +0 -1
- package/internal/crypto/principalStateTypes.js.map +1 -1
- package/internal/validators/documentCreateSeedRefinements.js +2 -2
- package/internal/validators/documentCreateSeedRefinements.js.map +1 -1
- package/internal/validators/operation/auth.d.ts +50 -1727
- package/internal/validators/operation/auth.js +2 -2
- package/internal/validators/operation/auth.js.map +1 -1
- package/internal/validators/operation/containerMutations.d.ts +1 -294
- package/internal/validators/operation/containerMutations.js +2 -2
- package/internal/validators/operation/containerMutations.js.map +1 -1
- package/internal/validators/operation/documentMutations.d.ts +1 -342
- package/internal/validators/operation/documentMutations.js +2 -2
- package/internal/validators/operation/documentMutations.js.map +1 -1
- package/internal/validators/operation/organizationPolicyHistory.d.ts +0 -24
- package/internal/validators/operation/organizations.d.ts +50 -1751
- package/internal/validators/operation/organizations.js +2 -2
- package/internal/validators/operation/organizations.js.map +1 -1
- package/internal/validators/operation/principals.d.ts +0 -56
- package/internal/validators/operation/writerProjections.d.ts +0 -48
- package/internal/validators/organizationProvisioningRefinements.js +2 -2
- package/internal/validators/organizationProvisioningRefinements.js.map +1 -1
- package/internal/validators/request/containerMetadata.d.ts +0 -276
- package/internal/validators/request/containerMetadata.js +5 -4
- package/internal/validators/request/containerMetadata.js.map +1 -1
- package/internal/validators/request/document.d.ts +0 -277
- package/internal/validators/request/document.js +8 -4
- package/internal/validators/request/document.js.map +1 -1
- package/internal/validators/request/documentCreateSeed.d.ts +99 -0
- package/internal/validators/request/documentCreateSeed.js +132 -9
- package/internal/validators/request/documentCreateSeed.js.map +1 -1
- package/internal/validators/request/documentSyncSchema.d.ts +41 -0
- package/internal/validators/request/documentSyncSchema.js +1 -1
- package/internal/validators/request/documentSyncSchema.js.map +1 -1
- package/internal/validators/request/index.d.ts +1 -0
- package/internal/validators/request/index.js +1 -0
- package/internal/validators/request/index.js.map +1 -1
- package/internal/validators/request/organization.d.ts +0 -32
- package/internal/validators/request/organizationProvisioning.d.ts +263 -5639
- package/internal/validators/request/organizationProvisioning.js +10 -4
- package/internal/validators/request/organizationProvisioning.js.map +1 -1
- package/internal/validators/request/principal.d.ts +4 -48
- package/internal/validators/request/principal.js +4 -2
- package/internal/validators/request/principal.js.map +1 -1
- package/internal/validators/request/registration.d.ts +71 -1727
- package/internal/validators/response/container.d.ts +0 -48
- package/internal/validators/response/documentMutation.d.ts +0 -96
- package/internal/validators/response/organizationPolicyHistory.d.ts +0 -24
- package/internal/validators/response/policyEvidenceWire.d.ts +5 -3
- package/internal/validators/response/policyEvidenceWire.js +6 -4
- package/internal/validators/response/policyEvidenceWire.js.map +1 -1
- package/internal/validators/response/principal.d.ts +0 -48
- package/internal/validators/response/principalPolicyPage.d.ts +0 -48
- package/internal/validators/response/principalSnapshot.d.ts +4 -24
- package/internal/validators/response/principalSnapshot.js +4 -6
- package/internal/validators/response/principalSnapshot.js.map +1 -1
- package/internal/validators/response/projectionPolicyEvidence.d.ts +0 -48
- package/package.json +1 -1
- package/workflows/container-contents/container-state/create/createWithMetadata.js +6 -3
- package/workflows/container-contents/container-state/create/createWithMetadata.js.map +1 -1
- package/workflows/documents/create/index.js +4 -4
- package/workflows/documents/create/index.js.map +1 -1
- package/workflows/documents/sync/initialSync.d.ts +26 -11
- package/workflows/documents/sync/initialSync.js +32 -12
- package/workflows/documents/sync/initialSync.js.map +1 -1
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js +1 -6
- package/workflows/organizations/groupPolicy/currentPolicyMutationAcknowledgement.js.map +1 -1
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js +1 -6
- package/workflows/organizations/groupPolicy/groupPolicyMutationAcknowledgement.js.map +1 -1
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js +4 -6
- package/workflows/organizations/policyHistory/organizationPolicyHistoryVerification.js.map +1 -1
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js +1 -7
- package/workflows/organizations/principalPolicy/principalPolicyReceiptArtifacts.js.map +1 -1
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js +0 -13
- package/workflows/principals/policyCache/principalPolicyCacheValidation.js.map +1 -1
- package/workflows/principals/publicHistory/publicProjectionDirectory.js +4 -5
- package/workflows/principals/publicHistory/publicProjectionDirectory.js.map +1 -1
- package/workflows/registration/provisionedProfileDocument.js +2 -2
- package/workflows/registration/provisionedProfileDocument.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +0 -74
- package/workflows/registration/provisioningBootstrapBuilders.js +3 -3
- package/workflows/registration/provisioningBootstrapBuilders.js.map +1 -1
- package/workflows/registration/registrationPrincipalPolicyPersistence.js +1 -7
- package/workflows/registration/registrationPrincipalPolicyPersistence.js.map +1 -1
|
@@ -28,12 +28,7 @@ export declare const createDocumentOperation: Omit<{
|
|
|
28
28
|
};
|
|
29
29
|
event: Record<string, unknown>;
|
|
30
30
|
expectedManifestHash: string;
|
|
31
|
-
manifest: Record<string, unknown>;
|
|
32
31
|
initialSync?: {
|
|
33
|
-
contentKeyEpoch: number;
|
|
34
|
-
expectedLinkSetManifestHash: string;
|
|
35
|
-
expectedTargetHash: string;
|
|
36
|
-
localVersionVector: string | null;
|
|
37
32
|
outgoingUpdates: {
|
|
38
33
|
encryptedData: string;
|
|
39
34
|
id: string;
|
|
@@ -45,69 +40,6 @@ export declare const createDocumentOperation: Omit<{
|
|
|
45
40
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
46
41
|
sourceVersionVector?: string | undefined;
|
|
47
42
|
}[];
|
|
48
|
-
supportsPullPagination: true;
|
|
49
|
-
authorizingContainerPathRefs?: {
|
|
50
|
-
containerId: string;
|
|
51
|
-
manifestHash: string;
|
|
52
|
-
}[][] | undefined;
|
|
53
|
-
containerRekeys?: {
|
|
54
|
-
body: unknown;
|
|
55
|
-
event: Record<string, unknown>;
|
|
56
|
-
expectedManifestHash: string;
|
|
57
|
-
keyEpoch: Record<string, unknown>;
|
|
58
|
-
keyring: Record<string, unknown> | null;
|
|
59
|
-
predecessorBridge: Record<string, unknown> | null;
|
|
60
|
-
principalPolicyRefs: {
|
|
61
|
-
principalType: "group" | "organization";
|
|
62
|
-
principalId: string;
|
|
63
|
-
version: number;
|
|
64
|
-
stateHash: string;
|
|
65
|
-
}[];
|
|
66
|
-
wraps: Record<string, unknown>[];
|
|
67
|
-
containerManifestHistoryRefs?: {
|
|
68
|
-
containerId: string;
|
|
69
|
-
manifestHash: string;
|
|
70
|
-
}[] | undefined;
|
|
71
|
-
destinationParentContainerPathRefs?: {
|
|
72
|
-
containerId: string;
|
|
73
|
-
manifestHash: string;
|
|
74
|
-
}[] | undefined;
|
|
75
|
-
parentContainerPathRefs?: {
|
|
76
|
-
containerId: string;
|
|
77
|
-
manifestHash: string;
|
|
78
|
-
}[] | undefined;
|
|
79
|
-
parentKekRef?: {
|
|
80
|
-
containerId: string;
|
|
81
|
-
containerKeyEpochId: string;
|
|
82
|
-
keyEpochHash: string;
|
|
83
|
-
} | null | undefined;
|
|
84
|
-
previousContainerPathRefs?: {
|
|
85
|
-
containerId: string;
|
|
86
|
-
manifestHash: string;
|
|
87
|
-
}[] | undefined;
|
|
88
|
-
previousManifestRef?: {
|
|
89
|
-
containerId: string;
|
|
90
|
-
manifestHash: string;
|
|
91
|
-
} | null | undefined;
|
|
92
|
-
userRecipientKeys?: Record<string, unknown>[] | undefined;
|
|
93
|
-
}[] | undefined;
|
|
94
|
-
contentKeyBundle?: {
|
|
95
|
-
contentKeyEpoch: number;
|
|
96
|
-
linkSetManifestHash: string;
|
|
97
|
-
targetHash: string;
|
|
98
|
-
targets: {
|
|
99
|
-
containerId: string;
|
|
100
|
-
containerKeyEpoch: number;
|
|
101
|
-
containerKeyEpochId: string;
|
|
102
|
-
containerManifestHash: string;
|
|
103
|
-
wrappedKey: string;
|
|
104
|
-
wrappingMetadata: Record<string, unknown>;
|
|
105
|
-
}[];
|
|
106
|
-
} | undefined;
|
|
107
|
-
historyMode?: "raw" | undefined;
|
|
108
|
-
inlineRekeyCommitId?: string | undefined;
|
|
109
|
-
minLsn?: string | undefined;
|
|
110
|
-
pullCursor?: string | undefined;
|
|
111
43
|
} | undefined;
|
|
112
44
|
authorizingContainerPathRefs?: {
|
|
113
45
|
containerId: string;
|
|
@@ -175,12 +107,7 @@ export declare const createDocumentOperation: Omit<{
|
|
|
175
107
|
};
|
|
176
108
|
event: Record<string, unknown>;
|
|
177
109
|
expectedManifestHash: string;
|
|
178
|
-
manifest: Record<string, unknown>;
|
|
179
110
|
initialSync?: {
|
|
180
|
-
contentKeyEpoch: number;
|
|
181
|
-
expectedLinkSetManifestHash: string;
|
|
182
|
-
expectedTargetHash: string;
|
|
183
|
-
localVersionVector: string | null;
|
|
184
111
|
outgoingUpdates: {
|
|
185
112
|
encryptedData: string;
|
|
186
113
|
id: string;
|
|
@@ -192,69 +119,6 @@ export declare const createDocumentOperation: Omit<{
|
|
|
192
119
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
193
120
|
sourceVersionVector?: string | undefined;
|
|
194
121
|
}[];
|
|
195
|
-
supportsPullPagination: true;
|
|
196
|
-
authorizingContainerPathRefs?: {
|
|
197
|
-
containerId: string;
|
|
198
|
-
manifestHash: string;
|
|
199
|
-
}[][] | undefined;
|
|
200
|
-
containerRekeys?: {
|
|
201
|
-
body: unknown;
|
|
202
|
-
event: Record<string, unknown>;
|
|
203
|
-
expectedManifestHash: string;
|
|
204
|
-
keyEpoch: Record<string, unknown>;
|
|
205
|
-
keyring: Record<string, unknown> | null;
|
|
206
|
-
predecessorBridge: Record<string, unknown> | null;
|
|
207
|
-
principalPolicyRefs: {
|
|
208
|
-
principalType: "group" | "organization";
|
|
209
|
-
principalId: string;
|
|
210
|
-
version: number;
|
|
211
|
-
stateHash: string;
|
|
212
|
-
}[];
|
|
213
|
-
wraps: Record<string, unknown>[];
|
|
214
|
-
containerManifestHistoryRefs?: {
|
|
215
|
-
containerId: string;
|
|
216
|
-
manifestHash: string;
|
|
217
|
-
}[] | undefined;
|
|
218
|
-
destinationParentContainerPathRefs?: {
|
|
219
|
-
containerId: string;
|
|
220
|
-
manifestHash: string;
|
|
221
|
-
}[] | undefined;
|
|
222
|
-
parentContainerPathRefs?: {
|
|
223
|
-
containerId: string;
|
|
224
|
-
manifestHash: string;
|
|
225
|
-
}[] | undefined;
|
|
226
|
-
parentKekRef?: {
|
|
227
|
-
containerId: string;
|
|
228
|
-
containerKeyEpochId: string;
|
|
229
|
-
keyEpochHash: string;
|
|
230
|
-
} | null | undefined;
|
|
231
|
-
previousContainerPathRefs?: {
|
|
232
|
-
containerId: string;
|
|
233
|
-
manifestHash: string;
|
|
234
|
-
}[] | undefined;
|
|
235
|
-
previousManifestRef?: {
|
|
236
|
-
containerId: string;
|
|
237
|
-
manifestHash: string;
|
|
238
|
-
} | null | undefined;
|
|
239
|
-
userRecipientKeys?: Record<string, unknown>[] | undefined;
|
|
240
|
-
}[] | undefined;
|
|
241
|
-
contentKeyBundle?: {
|
|
242
|
-
contentKeyEpoch: number;
|
|
243
|
-
linkSetManifestHash: string;
|
|
244
|
-
targetHash: string;
|
|
245
|
-
targets: {
|
|
246
|
-
containerId: string;
|
|
247
|
-
containerKeyEpoch: number;
|
|
248
|
-
containerKeyEpochId: string;
|
|
249
|
-
containerManifestHash: string;
|
|
250
|
-
wrappedKey: string;
|
|
251
|
-
wrappingMetadata: Record<string, unknown>;
|
|
252
|
-
}[];
|
|
253
|
-
} | undefined;
|
|
254
|
-
historyMode?: "raw" | undefined;
|
|
255
|
-
inlineRekeyCommitId?: string | undefined;
|
|
256
|
-
minLsn?: string | undefined;
|
|
257
|
-
pullCursor?: string | undefined;
|
|
258
122
|
} | undefined;
|
|
259
123
|
authorizingContainerPathRefs?: {
|
|
260
124
|
containerId: string;
|
|
@@ -322,12 +186,7 @@ export declare const createDocumentOperation: Omit<{
|
|
|
322
186
|
};
|
|
323
187
|
event: Record<string, unknown>;
|
|
324
188
|
expectedManifestHash: string;
|
|
325
|
-
manifest: Record<string, unknown>;
|
|
326
189
|
initialSync?: {
|
|
327
|
-
contentKeyEpoch: number;
|
|
328
|
-
expectedLinkSetManifestHash: string;
|
|
329
|
-
expectedTargetHash: string;
|
|
330
|
-
localVersionVector: string | null;
|
|
331
190
|
outgoingUpdates: {
|
|
332
191
|
encryptedData: string;
|
|
333
192
|
id: string;
|
|
@@ -339,69 +198,6 @@ export declare const createDocumentOperation: Omit<{
|
|
|
339
198
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
340
199
|
sourceVersionVector?: string | undefined;
|
|
341
200
|
}[];
|
|
342
|
-
supportsPullPagination: true;
|
|
343
|
-
authorizingContainerPathRefs?: {
|
|
344
|
-
containerId: string;
|
|
345
|
-
manifestHash: string;
|
|
346
|
-
}[][] | undefined;
|
|
347
|
-
containerRekeys?: {
|
|
348
|
-
body: unknown;
|
|
349
|
-
event: Record<string, unknown>;
|
|
350
|
-
expectedManifestHash: string;
|
|
351
|
-
keyEpoch: Record<string, unknown>;
|
|
352
|
-
keyring: Record<string, unknown> | null;
|
|
353
|
-
predecessorBridge: Record<string, unknown> | null;
|
|
354
|
-
principalPolicyRefs: {
|
|
355
|
-
principalType: "group" | "organization";
|
|
356
|
-
principalId: string;
|
|
357
|
-
version: number;
|
|
358
|
-
stateHash: string;
|
|
359
|
-
}[];
|
|
360
|
-
wraps: Record<string, unknown>[];
|
|
361
|
-
containerManifestHistoryRefs?: {
|
|
362
|
-
containerId: string;
|
|
363
|
-
manifestHash: string;
|
|
364
|
-
}[] | undefined;
|
|
365
|
-
destinationParentContainerPathRefs?: {
|
|
366
|
-
containerId: string;
|
|
367
|
-
manifestHash: string;
|
|
368
|
-
}[] | undefined;
|
|
369
|
-
parentContainerPathRefs?: {
|
|
370
|
-
containerId: string;
|
|
371
|
-
manifestHash: string;
|
|
372
|
-
}[] | undefined;
|
|
373
|
-
parentKekRef?: {
|
|
374
|
-
containerId: string;
|
|
375
|
-
containerKeyEpochId: string;
|
|
376
|
-
keyEpochHash: string;
|
|
377
|
-
} | null | undefined;
|
|
378
|
-
previousContainerPathRefs?: {
|
|
379
|
-
containerId: string;
|
|
380
|
-
manifestHash: string;
|
|
381
|
-
}[] | undefined;
|
|
382
|
-
previousManifestRef?: {
|
|
383
|
-
containerId: string;
|
|
384
|
-
manifestHash: string;
|
|
385
|
-
} | null | undefined;
|
|
386
|
-
userRecipientKeys?: Record<string, unknown>[] | undefined;
|
|
387
|
-
}[] | undefined;
|
|
388
|
-
contentKeyBundle?: {
|
|
389
|
-
contentKeyEpoch: number;
|
|
390
|
-
linkSetManifestHash: string;
|
|
391
|
-
targetHash: string;
|
|
392
|
-
targets: {
|
|
393
|
-
containerId: string;
|
|
394
|
-
containerKeyEpoch: number;
|
|
395
|
-
containerKeyEpochId: string;
|
|
396
|
-
containerManifestHash: string;
|
|
397
|
-
wrappedKey: string;
|
|
398
|
-
wrappingMetadata: Record<string, unknown>;
|
|
399
|
-
}[];
|
|
400
|
-
} | undefined;
|
|
401
|
-
historyMode?: "raw" | undefined;
|
|
402
|
-
inlineRekeyCommitId?: string | undefined;
|
|
403
|
-
minLsn?: string | undefined;
|
|
404
|
-
pullCursor?: string | undefined;
|
|
405
201
|
} | undefined;
|
|
406
202
|
authorizingContainerPathRefs?: {
|
|
407
203
|
containerId: string;
|
|
@@ -469,12 +265,7 @@ export declare const createDocumentOperation: Omit<{
|
|
|
469
265
|
};
|
|
470
266
|
event: Record<string, unknown>;
|
|
471
267
|
expectedManifestHash: string;
|
|
472
|
-
manifest: Record<string, unknown>;
|
|
473
268
|
initialSync?: {
|
|
474
|
-
contentKeyEpoch: number;
|
|
475
|
-
expectedLinkSetManifestHash: string;
|
|
476
|
-
expectedTargetHash: string;
|
|
477
|
-
localVersionVector: string | null;
|
|
478
269
|
outgoingUpdates: {
|
|
479
270
|
encryptedData: string;
|
|
480
271
|
id: string;
|
|
@@ -486,69 +277,6 @@ export declare const createDocumentOperation: Omit<{
|
|
|
486
277
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
487
278
|
sourceVersionVector?: string | undefined;
|
|
488
279
|
}[];
|
|
489
|
-
supportsPullPagination: true;
|
|
490
|
-
authorizingContainerPathRefs?: {
|
|
491
|
-
containerId: string;
|
|
492
|
-
manifestHash: string;
|
|
493
|
-
}[][] | undefined;
|
|
494
|
-
containerRekeys?: {
|
|
495
|
-
body: unknown;
|
|
496
|
-
event: Record<string, unknown>;
|
|
497
|
-
expectedManifestHash: string;
|
|
498
|
-
keyEpoch: Record<string, unknown>;
|
|
499
|
-
keyring: Record<string, unknown> | null;
|
|
500
|
-
predecessorBridge: Record<string, unknown> | null;
|
|
501
|
-
principalPolicyRefs: {
|
|
502
|
-
principalType: "group" | "organization";
|
|
503
|
-
principalId: string;
|
|
504
|
-
version: number;
|
|
505
|
-
stateHash: string;
|
|
506
|
-
}[];
|
|
507
|
-
wraps: Record<string, unknown>[];
|
|
508
|
-
containerManifestHistoryRefs?: {
|
|
509
|
-
containerId: string;
|
|
510
|
-
manifestHash: string;
|
|
511
|
-
}[] | undefined;
|
|
512
|
-
destinationParentContainerPathRefs?: {
|
|
513
|
-
containerId: string;
|
|
514
|
-
manifestHash: string;
|
|
515
|
-
}[] | undefined;
|
|
516
|
-
parentContainerPathRefs?: {
|
|
517
|
-
containerId: string;
|
|
518
|
-
manifestHash: string;
|
|
519
|
-
}[] | undefined;
|
|
520
|
-
parentKekRef?: {
|
|
521
|
-
containerId: string;
|
|
522
|
-
containerKeyEpochId: string;
|
|
523
|
-
keyEpochHash: string;
|
|
524
|
-
} | null | undefined;
|
|
525
|
-
previousContainerPathRefs?: {
|
|
526
|
-
containerId: string;
|
|
527
|
-
manifestHash: string;
|
|
528
|
-
}[] | undefined;
|
|
529
|
-
previousManifestRef?: {
|
|
530
|
-
containerId: string;
|
|
531
|
-
manifestHash: string;
|
|
532
|
-
} | null | undefined;
|
|
533
|
-
userRecipientKeys?: Record<string, unknown>[] | undefined;
|
|
534
|
-
}[] | undefined;
|
|
535
|
-
contentKeyBundle?: {
|
|
536
|
-
contentKeyEpoch: number;
|
|
537
|
-
linkSetManifestHash: string;
|
|
538
|
-
targetHash: string;
|
|
539
|
-
targets: {
|
|
540
|
-
containerId: string;
|
|
541
|
-
containerKeyEpoch: number;
|
|
542
|
-
containerKeyEpochId: string;
|
|
543
|
-
containerManifestHash: string;
|
|
544
|
-
wrappedKey: string;
|
|
545
|
-
wrappingMetadata: Record<string, unknown>;
|
|
546
|
-
}[];
|
|
547
|
-
} | undefined;
|
|
548
|
-
historyMode?: "raw" | undefined;
|
|
549
|
-
inlineRekeyCommitId?: string | undefined;
|
|
550
|
-
minLsn?: string | undefined;
|
|
551
|
-
pullCursor?: string | undefined;
|
|
552
280
|
} | undefined;
|
|
553
281
|
authorizingContainerPathRefs?: {
|
|
554
282
|
containerId: string;
|
|
@@ -739,29 +467,8 @@ export declare const createDocumentOperation: Omit<{
|
|
|
739
467
|
}>>;
|
|
740
468
|
};
|
|
741
469
|
readonly runtimeRefinements: readonly [{
|
|
742
|
-
readonly description: "a document create seed must contain exactly one outgoing update and no container rekeys, and
|
|
470
|
+
readonly description: "a document create seed must contain exactly one outgoing update and no container rekeys, and with the create's content-key bundle and target path form a valid document sync that serializes within the document sync request limit";
|
|
743
471
|
readonly id: "request.document-create-seed";
|
|
744
|
-
}, {
|
|
745
|
-
readonly description: "inlineRekeyCommitId must be present exactly when containerRekeys is non-empty";
|
|
746
|
-
readonly id: "request.inline-rekey-commit-marker";
|
|
747
|
-
}, {
|
|
748
|
-
readonly description: "authorizingContainerPathRefs is required when outgoingUpdates is non-empty";
|
|
749
|
-
readonly id: "request.authorizing-paths-for-writes";
|
|
750
|
-
}, {
|
|
751
|
-
readonly description: "containerRekeys may be non-empty only when outgoingUpdates is non-empty";
|
|
752
|
-
readonly id: "request.container-rekeys-require-write";
|
|
753
|
-
}, {
|
|
754
|
-
readonly description: "outgoing update ids must be unique within the request";
|
|
755
|
-
readonly id: "request.unique-outgoing-update-ids";
|
|
756
|
-
}, {
|
|
757
|
-
readonly description: "a request carrying pullCursor must not contain outgoing updates, container rekeys, a content-key bundle, or authorizing paths";
|
|
758
|
-
readonly id: "request.pull-continuation-read-only";
|
|
759
|
-
}, {
|
|
760
|
-
readonly description: "historyMode \"raw\" must not be combined with outgoing updates, container rekeys, a content-key bundle, or authorizing paths";
|
|
761
|
-
readonly id: "request.raw-history-read-only";
|
|
762
|
-
}, {
|
|
763
|
-
readonly description: "historyMode \"raw\" requires localVersionVector to be null so the complete retained history is requested";
|
|
764
|
-
readonly id: "request.raw-history-null-frontier";
|
|
765
472
|
}, {
|
|
766
473
|
readonly description: "checkpointKind, checkpointPayloadKind, and sourceVersionVector must be absent together or form a rotation baseline";
|
|
767
474
|
readonly id: "request.rotation-checkpoint-fields";
|
|
@@ -2086,13 +1793,7 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
2086
1793
|
version: number;
|
|
2087
1794
|
};
|
|
2088
1795
|
payload: {
|
|
2089
|
-
cipherSuite: "aes-256-gcm";
|
|
2090
1796
|
ciphertext: string;
|
|
2091
|
-
ciphertextHash: string;
|
|
2092
|
-
createdAt: string;
|
|
2093
|
-
principalId: string;
|
|
2094
|
-
principalType: "group" | "organization";
|
|
2095
|
-
stateHash: string;
|
|
2096
1797
|
};
|
|
2097
1798
|
}[];
|
|
2098
1799
|
groups: {
|
|
@@ -2188,13 +1889,7 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
2188
1889
|
version: number;
|
|
2189
1890
|
};
|
|
2190
1891
|
payload: {
|
|
2191
|
-
cipherSuite: "aes-256-gcm";
|
|
2192
1892
|
ciphertext: string;
|
|
2193
|
-
ciphertextHash: string;
|
|
2194
|
-
createdAt: string;
|
|
2195
|
-
principalId: string;
|
|
2196
|
-
principalType: "group" | "organization";
|
|
2197
|
-
stateHash: string;
|
|
2198
1893
|
};
|
|
2199
1894
|
}[];
|
|
2200
1895
|
groups: {
|
|
@@ -2290,13 +1985,7 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
2290
1985
|
version: number;
|
|
2291
1986
|
};
|
|
2292
1987
|
payload: {
|
|
2293
|
-
cipherSuite: "aes-256-gcm";
|
|
2294
1988
|
ciphertext: string;
|
|
2295
|
-
ciphertextHash: string;
|
|
2296
|
-
createdAt: string;
|
|
2297
|
-
principalId: string;
|
|
2298
|
-
principalType: "group" | "organization";
|
|
2299
|
-
stateHash: string;
|
|
2300
1989
|
};
|
|
2301
1990
|
}[];
|
|
2302
1991
|
groups: {
|
|
@@ -2392,13 +2081,7 @@ export declare const purgeDocumentOperation: Omit<{
|
|
|
2392
2081
|
version: number;
|
|
2393
2082
|
};
|
|
2394
2083
|
payload: {
|
|
2395
|
-
cipherSuite: "aes-256-gcm";
|
|
2396
2084
|
ciphertext: string;
|
|
2397
|
-
ciphertextHash: string;
|
|
2398
|
-
createdAt: string;
|
|
2399
|
-
principalId: string;
|
|
2400
|
-
principalType: "group" | "organization";
|
|
2401
|
-
stateHash: string;
|
|
2402
2085
|
};
|
|
2403
2086
|
}[];
|
|
2404
2087
|
groups: {
|
|
@@ -2695,13 +2378,7 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
2695
2378
|
version: number;
|
|
2696
2379
|
};
|
|
2697
2380
|
payload: {
|
|
2698
|
-
cipherSuite: "aes-256-gcm";
|
|
2699
2381
|
ciphertext: string;
|
|
2700
|
-
ciphertextHash: string;
|
|
2701
|
-
createdAt: string;
|
|
2702
|
-
principalId: string;
|
|
2703
|
-
principalType: "group" | "organization";
|
|
2704
|
-
stateHash: string;
|
|
2705
2382
|
};
|
|
2706
2383
|
}[];
|
|
2707
2384
|
groups: {
|
|
@@ -2796,13 +2473,7 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
2796
2473
|
version: number;
|
|
2797
2474
|
};
|
|
2798
2475
|
payload: {
|
|
2799
|
-
cipherSuite: "aes-256-gcm";
|
|
2800
2476
|
ciphertext: string;
|
|
2801
|
-
ciphertextHash: string;
|
|
2802
|
-
createdAt: string;
|
|
2803
|
-
principalId: string;
|
|
2804
|
-
principalType: "group" | "organization";
|
|
2805
|
-
stateHash: string;
|
|
2806
2477
|
};
|
|
2807
2478
|
}[];
|
|
2808
2479
|
groups: {
|
|
@@ -2897,13 +2568,7 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
2897
2568
|
version: number;
|
|
2898
2569
|
};
|
|
2899
2570
|
payload: {
|
|
2900
|
-
cipherSuite: "aes-256-gcm";
|
|
2901
2571
|
ciphertext: string;
|
|
2902
|
-
ciphertextHash: string;
|
|
2903
|
-
createdAt: string;
|
|
2904
|
-
principalId: string;
|
|
2905
|
-
principalType: "group" | "organization";
|
|
2906
|
-
stateHash: string;
|
|
2907
2572
|
};
|
|
2908
2573
|
}[];
|
|
2909
2574
|
groups: {
|
|
@@ -2998,13 +2663,7 @@ export declare const getDocumentPurgeProofOperation: Omit<{
|
|
|
2998
2663
|
version: number;
|
|
2999
2664
|
};
|
|
3000
2665
|
payload: {
|
|
3001
|
-
cipherSuite: "aes-256-gcm";
|
|
3002
2666
|
ciphertext: string;
|
|
3003
|
-
ciphertextHash: string;
|
|
3004
|
-
createdAt: string;
|
|
3005
|
-
principalId: string;
|
|
3006
|
-
principalType: "group" | "organization";
|
|
3007
|
-
stateHash: string;
|
|
3008
2667
|
};
|
|
3009
2668
|
}[];
|
|
3010
2669
|
groups: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { documentCreateSeedRefinement } from "../documentCreateSeedRefinements.js";
|
|
3
|
-
import { documentLinkSetPathRefinement, documentSyncRequestRotationRefinement,
|
|
3
|
+
import { documentLinkSetPathRefinement, documentSyncRequestRotationRefinement, } from "../documentSyncRefinements.js";
|
|
4
4
|
import { registerJsonSchemaFragment } from "../jsonSchema.js";
|
|
5
5
|
import { DocumentCreateRequestSchema, DocumentLinkSetMutationRequestSchema, DocumentPurgeRequestSchema, isDocumentCreateRequest, isDocumentLinkSetMutationRequest, isDocumentPurgeRequest, } from "../request/index.js";
|
|
6
6
|
import { DocumentCreateResponseSchema, DocumentLinkSetMutationResponseSchema, DocumentMutationFailureResponseSchema, DocumentPurgeProofResponseSchema, DocumentPurgeResponseSchema, ErrorResponseSchema, isDocumentCreateResponse, isDocumentLinkSetMutationResponse, isDocumentPurgeProofResponse, isDocumentPurgeResponse, PaymentRequiredErrorResponseSchema, SessionFailureResponseSchema, } from "../response/index.js";
|
|
@@ -40,7 +40,7 @@ export const createDocumentOperation = defineJsonOperation({
|
|
|
40
40
|
responses: { 200: DocumentCreateResponseSchema },
|
|
41
41
|
runtimeRefinements: [
|
|
42
42
|
documentCreateSeedRefinement,
|
|
43
|
-
|
|
43
|
+
documentSyncRequestRotationRefinement,
|
|
44
44
|
],
|
|
45
45
|
});
|
|
46
46
|
function defineDocumentLinkSetMutationOperation(input) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentMutations.js","sourceRoot":"","sources":["documentMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,EACrC,qCAAqC,GACtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,qCAAqC,EACrC,gCAAgC,EAChC,2BAA2B,EAC3B,mBAAmB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AAM,yCAAyC,GACpD,gCAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,0CAA0C,GACrD,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,gCAAgC,GAAG,uBAAuB,CAAC;AACxE,MAAM,CAAC,MAAM,wCAAwC,GACnD,4BAA4B,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { documentCreateSeedRefinement } from \"../documentCreateSeedRefinements\";\nimport {\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n documentSyncRequestRuntimeRefinements,\n} from \"../documentSyncRefinements\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport {\n DocumentCreateRequestSchema,\n DocumentLinkSetMutationRequestSchema,\n DocumentPurgeRequestSchema,\n isDocumentCreateRequest,\n isDocumentLinkSetMutationRequest,\n isDocumentPurgeRequest,\n} from \"../request\";\nimport {\n DocumentCreateResponseSchema,\n DocumentLinkSetMutationResponseSchema,\n DocumentMutationFailureResponseSchema,\n DocumentPurgeProofResponseSchema,\n DocumentPurgeResponseSchema,\n ErrorResponseSchema,\n isDocumentCreateResponse,\n isDocumentLinkSetMutationResponse,\n isDocumentPurgeProofResponse,\n isDocumentPurgeResponse,\n PaymentRequiredErrorResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport {\n PrincipalHistoryPreparationFailureResponseSchema,\n PrincipalHistoryPreparationResponseSchema,\n principalHistoryRollbackRefinement,\n} from \"../response/principalHistoryPreparation\";\nimport { defineJsonOperation } from \"./definition\";\nimport { DocumentSyncPathParamsSchema } from \"./documentSync\";\n\nconst EmptyDocumentMutationPathParamsSchema = z.strictObject({});\n\nexport const DocumentMutationPathParamsSchema = DocumentSyncPathParamsSchema;\n\nexport type DocumentMutationPathParams = z.infer<\n typeof DocumentMutationPathParamsSchema\n>;\n\nconst checkpointManifestHashQuerySchema = registerJsonSchemaFragment(\n z.string().min(1).max(6_500),\n { maxLength: 6_500, minLength: 1, type: \"string\" },\n);\n\nexport const DocumentPurgeProofQuerySchema = z.strictObject({\n documentCheckpointManifestHash: checkpointManifestHashQuerySchema.optional(),\n});\n\nexport type DocumentPurgeProofQuery = z.infer<\n typeof DocumentPurgeProofQuerySchema\n>;\n\nconst documentMutationFailureResponses = {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 402: PaymentRequiredErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: DocumentMutationFailureResponseSchema,\n 409: DocumentMutationFailureResponseSchema,\n 500: ErrorResponseSchema,\n 503: ErrorResponseSchema,\n} as const;\n\nconst documentMutationFailureStatuses = [\n 400, 401, 402, 403, 404, 409, 500, 503,\n] as const;\n\nexport const createDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentCreateRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.create\",\n summary: \"Create a document\",\n description:\n \"Creates a document from a signed document access event, its document link-set manifest, and its content-key bundle, optionally committing the document's first encrypted update in the same transaction. Requires write access to the target container through an authorizing container path. A retry of a create that already committed returns 409 `document_manifest_already_exists`, which lets the client adopt it.\",\n method: \"POST\",\n params: EmptyDocumentMutationPathParamsSchema,\n path: \"/documents\",\n responses: { 200: DocumentCreateResponseSchema },\n runtimeRefinements: [\n documentCreateSeedRefinement,\n ...documentSyncRequestRuntimeRefinements,\n ],\n});\n\nfunction defineDocumentLinkSetMutationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: DocumentLinkSetMutationRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: input.path,\n responses: { 200: DocumentLinkSetMutationResponseSchema },\n runtimeRefinements: [\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n ],\n });\n}\n\nexport const linkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.link\",\n summary: \"Link a document to a container\",\n description:\n \"Links a document into another container through a signed `document.link` event, advancing its document link-set manifest and rewrapping the content keys of its attached blobs for the new container. Requires write access through the target and authorizing container paths. Stale heads or incomplete rewraps return 409 without changing the document.\",\n path: \"/documents/{documentId}/link\",\n});\n\nexport const unlinkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.unlink\",\n summary: \"Unlink a document from a container\",\n description:\n \"Removes a container from a document's link set through a signed `document.unlink` event and rotates the document content key. The request must carry a rotation baseline covering every committed update, unless the document has none. Requires write access; stale heads, a missing baseline, or incomplete rewraps return 409.\",\n path: \"/documents/{documentId}/unlink\",\n});\n\nconst documentPurgeFailureResponses = {\n ...documentMutationFailureResponses,\n 503: PrincipalHistoryPreparationFailureResponseSchema,\n} as const;\n\nconst preparationResponseDescriptions = {\n 202: \"The attempted operation rolled back. Retry the identical request to continue verification preparation.\",\n} as const;\n\nexport const purgeDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentPurgeRequestSchema,\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purge\",\n summary: \"Purge a document\",\n description:\n \"Permanently removes a document through a signed `document.purge` event that cites its exact current authorizing container path. Requires write access, a document linked to exactly one container, and a document that is not a container's metadata document. The server keeps the signed proof, and blobs only this document referenced enter the attachment-retention grace period; a 202 asks the client to retry the identical request after policy history is prepared.\",\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const getDocumentPurgeProofOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purgeProof\",\n summary: \"Get a document purge proof\",\n description:\n \"Returns the retained signed proof that a document was purged, so a device can verify the deletion before removing its local copy. Only callers who were authorized through the purge-time container path are served it; a 202 asks the client to retry the identical request after policy history is prepared.\",\n method: \"GET\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n query: DocumentPurgeProofQuerySchema,\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeProofResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const isCreateDocumentOperationRequest = isDocumentCreateRequest;\nexport const isCreateDocumentOperationResponse = isDocumentCreateResponse;\nexport const isDocumentLinkSetMutationOperationRequest =\n isDocumentLinkSetMutationRequest;\nexport const isDocumentLinkSetMutationOperationResponse =\n isDocumentLinkSetMutationResponse;\nexport const isPurgeDocumentOperationRequest = isDocumentPurgeRequest;\nexport const isPurgeDocumentOperationResponse = isDocumentPurgeResponse;\nexport const isGetDocumentPurgeProofOperationResponse =\n isDocumentPurgeProofResponse;\n"]}
|
|
1
|
+
{"version":3,"file":"documentMutations.js","sourceRoot":"","sources":["documentMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EACL,6BAA6B,EAC7B,qCAAqC,GACtC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EACL,2BAA2B,EAC3B,oCAAoC,EACpC,0BAA0B,EAC1B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,GACvB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,4BAA4B,EAC5B,qCAAqC,EACrC,qCAAqC,EACrC,gCAAgC,EAChC,2BAA2B,EAC3B,m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AAM,yCAAyC,GACpD,gCAAgC,CAAC;AACnC,MAAM,CAAC,MAAM,0CAA0C,GACrD,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,+BAA+B,GAAG,sBAAsB,CAAC;AACtE,MAAM,CAAC,MAAM,gCAAgC,GAAG,uBAAuB,CAAC;AACxE,MAAM,CAAC,MAAM,wCAAwC,GACnD,4BAA4B,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { documentCreateSeedRefinement } from \"../documentCreateSeedRefinements\";\nimport {\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n} from \"../documentSyncRefinements\";\nimport { registerJsonSchemaFragment } from \"../jsonSchema\";\nimport {\n DocumentCreateRequestSchema,\n DocumentLinkSetMutationRequestSchema,\n DocumentPurgeRequestSchema,\n isDocumentCreateRequest,\n isDocumentLinkSetMutationRequest,\n isDocumentPurgeRequest,\n} from \"../request\";\nimport {\n DocumentCreateResponseSchema,\n DocumentLinkSetMutationResponseSchema,\n DocumentMutationFailureResponseSchema,\n DocumentPurgeProofResponseSchema,\n DocumentPurgeResponseSchema,\n ErrorResponseSchema,\n isDocumentCreateResponse,\n isDocumentLinkSetMutationResponse,\n isDocumentPurgeProofResponse,\n isDocumentPurgeResponse,\n PaymentRequiredErrorResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport {\n PrincipalHistoryPreparationFailureResponseSchema,\n PrincipalHistoryPreparationResponseSchema,\n principalHistoryRollbackRefinement,\n} from \"../response/principalHistoryPreparation\";\nimport { defineJsonOperation } from \"./definition\";\nimport { DocumentSyncPathParamsSchema } from \"./documentSync\";\n\nconst EmptyDocumentMutationPathParamsSchema = z.strictObject({});\n\nexport const DocumentMutationPathParamsSchema = DocumentSyncPathParamsSchema;\n\nexport type DocumentMutationPathParams = z.infer<\n typeof DocumentMutationPathParamsSchema\n>;\n\nconst checkpointManifestHashQuerySchema = registerJsonSchemaFragment(\n z.string().min(1).max(6_500),\n { maxLength: 6_500, minLength: 1, type: \"string\" },\n);\n\nexport const DocumentPurgeProofQuerySchema = z.strictObject({\n documentCheckpointManifestHash: checkpointManifestHashQuerySchema.optional(),\n});\n\nexport type DocumentPurgeProofQuery = z.infer<\n typeof DocumentPurgeProofQuerySchema\n>;\n\nconst documentMutationFailureResponses = {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 402: PaymentRequiredErrorResponseSchema,\n 403: ErrorResponseSchema,\n 404: DocumentMutationFailureResponseSchema,\n 409: DocumentMutationFailureResponseSchema,\n 500: ErrorResponseSchema,\n 503: ErrorResponseSchema,\n} as const;\n\nconst documentMutationFailureStatuses = [\n 400, 401, 402, 403, 404, 409, 500, 503,\n] as const;\n\nexport const createDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentCreateRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.create\",\n summary: \"Create a document\",\n description:\n \"Creates a document from a signed document access event, its document link-set manifest, and its content-key bundle, optionally committing the document's first encrypted update in the same transaction. Requires write access to the target container through an authorizing container path. A retry of a create that already committed returns 409 `document_manifest_already_exists`, which lets the client adopt it.\",\n method: \"POST\",\n params: EmptyDocumentMutationPathParamsSchema,\n path: \"/documents\",\n responses: { 200: DocumentCreateResponseSchema },\n runtimeRefinements: [\n documentCreateSeedRefinement,\n documentSyncRequestRotationRefinement,\n ],\n});\n\nfunction defineDocumentLinkSetMutationOperation<\n const Id extends string,\n const Path extends `/${string}`,\n>(input: {\n readonly id: Id;\n readonly path: Path;\n readonly summary: string;\n readonly description: string;\n}) {\n return defineJsonOperation({\n auth: \"session\",\n body: DocumentLinkSetMutationRequestSchema,\n failureResponses: documentMutationFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: input.id,\n summary: input.summary,\n description: input.description,\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: input.path,\n responses: { 200: DocumentLinkSetMutationResponseSchema },\n runtimeRefinements: [\n documentLinkSetPathRefinement,\n documentSyncRequestRotationRefinement,\n ],\n });\n}\n\nexport const linkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.link\",\n summary: \"Link a document to a container\",\n description:\n \"Links a document into another container through a signed `document.link` event, advancing its document link-set manifest and rewrapping the content keys of its attached blobs for the new container. Requires write access through the target and authorizing container paths. Stale heads or incomplete rewraps return 409 without changing the document.\",\n path: \"/documents/{documentId}/link\",\n});\n\nexport const unlinkDocumentOperation = defineDocumentLinkSetMutationOperation({\n id: \"documents.unlink\",\n summary: \"Unlink a document from a container\",\n description:\n \"Removes a container from a document's link set through a signed `document.unlink` event and rotates the document content key. The request must carry a rotation baseline covering every committed update, unless the document has none. Requires write access; stale heads, a missing baseline, or incomplete rewraps return 409.\",\n path: \"/documents/{documentId}/unlink\",\n});\n\nconst documentPurgeFailureResponses = {\n ...documentMutationFailureResponses,\n 503: PrincipalHistoryPreparationFailureResponseSchema,\n} as const;\n\nconst preparationResponseDescriptions = {\n 202: \"The attempted operation rolled back. Retry the identical request to continue verification preparation.\",\n} as const;\n\nexport const purgeDocumentOperation = defineJsonOperation({\n auth: \"session\",\n body: DocumentPurgeRequestSchema,\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purge\",\n summary: \"Purge a document\",\n description:\n \"Permanently removes a document through a signed `document.purge` event that cites its exact current authorizing container path. Requires write access, a document linked to exactly one container, and a document that is not a container's metadata document. The server keeps the signed proof, and blobs only this document referenced enter the attachment-retention grace period; a 202 asks the client to retry the identical request after policy history is prepared.\",\n method: \"POST\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const getDocumentPurgeProofOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: documentPurgeFailureResponses,\n failureStatuses: documentMutationFailureStatuses,\n id: \"documents.purgeProof\",\n summary: \"Get a document purge proof\",\n description:\n \"Returns the retained signed proof that a document was purged, so a device can verify the deletion before removing its local copy. Only callers who were authorized through the purge-time container path are served it; a 202 asks the client to retry the identical request after policy history is prepared.\",\n method: \"GET\",\n params: DocumentMutationPathParamsSchema,\n path: \"/documents/{documentId}/purge\",\n query: DocumentPurgeProofQuerySchema,\n responseDescriptions: preparationResponseDescriptions,\n responses: {\n 200: DocumentPurgeProofResponseSchema,\n 202: PrincipalHistoryPreparationResponseSchema,\n },\n runtimeRefinements: [principalHistoryRollbackRefinement],\n});\n\nexport const isCreateDocumentOperationRequest = isDocumentCreateRequest;\nexport const isCreateDocumentOperationResponse = isDocumentCreateResponse;\nexport const isDocumentLinkSetMutationOperationRequest =\n isDocumentLinkSetMutationRequest;\nexport const isDocumentLinkSetMutationOperationResponse =\n isDocumentLinkSetMutationResponse;\nexport const isPurgeDocumentOperationRequest = isDocumentPurgeRequest;\nexport const isPurgeDocumentOperationResponse = isDocumentPurgeResponse;\nexport const isGetDocumentPurgeProofOperationResponse =\n isDocumentPurgeProofResponse;\n"]}
|
|
@@ -110,13 +110,7 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
110
110
|
version: number;
|
|
111
111
|
};
|
|
112
112
|
payload: {
|
|
113
|
-
cipherSuite: "aes-256-gcm";
|
|
114
113
|
ciphertext: string;
|
|
115
|
-
ciphertextHash: string;
|
|
116
|
-
createdAt: string;
|
|
117
|
-
principalId: string;
|
|
118
|
-
principalType: "group" | "organization";
|
|
119
|
-
stateHash: string;
|
|
120
114
|
};
|
|
121
115
|
}[];
|
|
122
116
|
groups: {
|
|
@@ -158,13 +152,7 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
158
152
|
version: number;
|
|
159
153
|
};
|
|
160
154
|
payload: {
|
|
161
|
-
cipherSuite: "aes-256-gcm";
|
|
162
155
|
ciphertext: string;
|
|
163
|
-
ciphertextHash: string;
|
|
164
|
-
createdAt: string;
|
|
165
|
-
principalId: string;
|
|
166
|
-
principalType: "group" | "organization";
|
|
167
|
-
stateHash: string;
|
|
168
156
|
};
|
|
169
157
|
}[];
|
|
170
158
|
groups: {
|
|
@@ -206,13 +194,7 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
206
194
|
version: number;
|
|
207
195
|
};
|
|
208
196
|
payload: {
|
|
209
|
-
cipherSuite: "aes-256-gcm";
|
|
210
197
|
ciphertext: string;
|
|
211
|
-
ciphertextHash: string;
|
|
212
|
-
createdAt: string;
|
|
213
|
-
principalId: string;
|
|
214
|
-
principalType: "group" | "organization";
|
|
215
|
-
stateHash: string;
|
|
216
198
|
};
|
|
217
199
|
}[];
|
|
218
200
|
groups: {
|
|
@@ -254,13 +236,7 @@ export declare const getOrganizationPolicyHistoryOperation: Omit<{
|
|
|
254
236
|
version: number;
|
|
255
237
|
};
|
|
256
238
|
payload: {
|
|
257
|
-
cipherSuite: "aes-256-gcm";
|
|
258
239
|
ciphertext: string;
|
|
259
|
-
ciphertextHash: string;
|
|
260
|
-
createdAt: string;
|
|
261
|
-
principalId: string;
|
|
262
|
-
principalType: "group" | "organization";
|
|
263
|
-
stateHash: string;
|
|
264
240
|
};
|
|
265
241
|
}[];
|
|
266
242
|
groups: {
|