@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.
- package/data/containers/shared/principalPolicies.js +8 -12
- package/data/containers/shared/principalPolicies.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +73 -3
- package/internal/api-client/apiRequestMetrics.d.ts +18 -4
- package/internal/api-client/apiRequestMetrics.js +55 -5
- package/internal/api-client/apiRequestMetrics.js.map +1 -1
- package/internal/api-client/durationSampleWindow.d.ts +26 -0
- package/internal/api-client/durationSampleWindow.js +42 -0
- package/internal/api-client/durationSampleWindow.js.map +1 -0
- package/internal/api-client/measureApiRequest.js +9 -4
- package/internal/api-client/measureApiRequest.js.map +1 -1
- package/internal/api-client/serverTiming.d.ts +12 -0
- package/internal/api-client/serverTiming.js +49 -0
- package/internal/api-client/serverTiming.js.map +1 -0
- package/internal/validators/documentCreateSeedRefinements.js +9 -0
- package/internal/validators/documentCreateSeedRefinements.js.map +1 -0
- package/internal/validators/operation/attachments.d.ts +48 -8
- package/internal/validators/operation/auth.d.ts +576 -76
- package/internal/validators/operation/containerMutations.d.ts +619 -44
- package/internal/validators/operation/containerMutations.js +7 -1
- package/internal/validators/operation/containerMutations.js.map +1 -1
- package/internal/validators/operation/documentMutations.d.ts +428 -12
- package/internal/validators/operation/documentMutations.js +6 -1
- package/internal/validators/operation/documentMutations.js.map +1 -1
- package/internal/validators/operation/documentSync.d.ts +33 -13
- package/internal/validators/operation/organizations.d.ts +648 -88
- package/internal/validators/operation/principals.d.ts +96 -16
- package/internal/validators/request/blob.d.ts +48 -8
- package/internal/validators/request/container.d.ts +96 -16
- package/internal/validators/request/container.js +5 -2
- package/internal/validators/request/container.js.map +1 -1
- package/internal/validators/request/containerMetadata.d.ts +409 -16
- package/internal/validators/request/containerMetadata.js +20 -3
- package/internal/validators/request/containerMetadata.js.map +1 -1
- package/internal/validators/request/document.d.ts +631 -10
- package/internal/validators/request/document.js +19 -1
- package/internal/validators/request/document.js.map +1 -1
- package/internal/validators/request/documentCreateSeed.js +35 -0
- package/internal/validators/request/documentCreateSeed.js.map +1 -0
- package/internal/validators/request/documentSyncSchema.d.ts +24 -4
- package/internal/validators/request/documentSyncSchema.js +2 -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 +96 -16
- package/internal/validators/request/organizationProvisioning.d.ts +1456 -246
- package/internal/validators/request/organizationProvisioning.js +9 -22
- package/internal/validators/request/organizationProvisioning.js.map +1 -1
- package/internal/validators/request/principal.d.ts +120 -20
- package/internal/validators/request/principalPolicyRef.d.ts +42 -0
- package/internal/validators/request/principalPolicyRef.js +19 -0
- package/internal/validators/request/principalPolicyRef.js.map +1 -0
- package/internal/validators/request/registration.d.ts +456 -76
- package/internal/validators/response/containerMetadata.d.ts +20 -0
- package/internal/validators/response/documentMutation.d.ts +43 -0
- package/internal/validators/response/documentMutation.js +12 -1
- package/internal/validators/response/documentMutation.js.map +1 -1
- package/internal/validators/response/documentSyncSchema.d.ts +13 -9
- package/internal/validators/response/documentSyncSchema.js +23 -18
- package/internal/validators/response/documentSyncSchema.js.map +1 -1
- package/internal/validators/response/index.d.ts +1 -1
- package/internal/validators/response/index.js.map +1 -1
- package/internal/validators/response/organizationProvisioning.d.ts +350 -0
- package/internal/validators/response/registration.d.ts +120 -0
- package/internal/validators/util/containerLimits.d.ts +8 -0
- package/internal/validators/util/containerLimits.js +8 -0
- package/internal/validators/util/containerLimits.js.map +1 -1
- package/package.json +1 -1
- package/stores/container-contents/containerState/containerStatePersistence.js +2 -0
- package/stores/container-contents/containerState/containerStatePersistence.js.map +1 -1
- package/stores/container-contents/remoteEvents/remoteEventSync.js +1 -1
- package/stores/container-contents/remoteEvents/remoteEventSync.js.map +1 -1
- package/stores/container-contents/state.js +2 -0
- package/stores/container-contents/state.js.map +1 -1
- package/stores/container-contents/syncAgent/syncAgentTypes.d.ts +5 -0
- package/stores/container-contents/syncAgent/syncAgentTypes.js.map +1 -1
- package/stores/documents/documentStore/sync/createdDocumentPersistence.js +71 -0
- package/stores/documents/documentStore/sync/createdDocumentPersistence.js.map +1 -0
- package/stores/documents/documentStore/sync/index.js +13 -2
- package/stores/documents/documentStore/sync/index.js.map +1 -1
- package/stores/documents/documentStore/sync/syncRemoteSignals.js +21 -3
- package/stores/documents/documentStore/sync/syncRemoteSignals.js.map +1 -1
- package/stores/documents/documentStore/sync/syncSeededCreate.js +50 -0
- package/stores/documents/documentStore/sync/syncSeededCreate.js.map +1 -0
- package/stores/documents/documentStore/sync/syncShared.js +16 -8
- package/stores/documents/documentStore/sync/syncShared.js.map +1 -1
- package/workflows/container-contents/container-state/create/createIntentSeed.js +60 -0
- package/workflows/container-contents/container-state/create/createIntentSeed.js.map +1 -0
- package/workflows/container-contents/container-state/create/createIntentSync.js +18 -19
- package/workflows/container-contents/container-state/create/createIntentSync.js.map +1 -1
- package/workflows/container-contents/container-state/create/createWithMetadata.js +43 -6
- package/workflows/container-contents/container-state/create/createWithMetadata.js.map +1 -1
- package/workflows/container-contents/container-state/create/createWithMetadataPlan.js +5 -1
- package/workflows/container-contents/container-state/create/createWithMetadataPlan.js.map +1 -1
- package/workflows/container-contents/container-state/remote.js +15 -0
- package/workflows/container-contents/container-state/remote.js.map +1 -1
- package/workflows/container-contents/container-state/types.js.map +1 -1
- package/workflows/container-contents/metadata/metadataEvents.d.ts +7 -1
- package/workflows/container-contents/metadata/metadataEvents.js +8 -2
- package/workflows/container-contents/metadata/metadataEvents.js.map +1 -1
- package/workflows/container-contents/remoteHydration/types.d.ts +3 -0
- package/workflows/container-contents/remoteHydration/types.js.map +1 -1
- package/workflows/containers/child/mutationRequestCore.js +2 -2
- package/workflows/containers/child/mutationRequestCore.js.map +1 -1
- package/workflows/containers/child/recitePlan.js +2 -2
- package/workflows/containers/child/recitePlan.js.map +1 -1
- package/workflows/containers/root/create.js +17 -28
- package/workflows/containers/root/create.js.map +1 -1
- package/workflows/containers/root/initialGroupPolicy.js +0 -23
- package/workflows/containers/root/initialGroupPolicy.js.map +1 -1
- package/workflows/documents/create/index.d.ts +7 -0
- package/workflows/documents/create/index.js +40 -2
- package/workflows/documents/create/index.js.map +1 -1
- package/workflows/documents/index.d.ts +1 -0
- package/workflows/documents/index.js +1 -0
- package/workflows/documents/index.js.map +1 -1
- package/workflows/documents/sync/initialSync.d.ts +39 -0
- package/workflows/documents/sync/initialSync.js +39 -6
- package/workflows/documents/sync/initialSync.js.map +1 -1
- package/workflows/documents/syncFailures/syncPolicyRepair.js +2 -8
- package/workflows/documents/syncFailures/syncPolicyRepair.js.map +1 -1
- package/workflows/registration/provisioningBootstrapBuilders.d.ts +12 -2
|
@@ -95,6 +95,11 @@ export declare const ContainerCreateWithMetadataDocumentResponseSchema: z.ZodTyp
|
|
|
95
95
|
targets: Record<string, unknown>[];
|
|
96
96
|
};
|
|
97
97
|
id: string;
|
|
98
|
+
initialSync?: {
|
|
99
|
+
commitLsn: string | null;
|
|
100
|
+
commitLsnMode: "tracked" | "untracked";
|
|
101
|
+
acceptedOutgoingUpdateIds: string[];
|
|
102
|
+
} | undefined;
|
|
98
103
|
};
|
|
99
104
|
}, {
|
|
100
105
|
container: {
|
|
@@ -192,6 +197,11 @@ export declare const ContainerCreateWithMetadataDocumentResponseSchema: z.ZodTyp
|
|
|
192
197
|
targets: Record<string, unknown>[];
|
|
193
198
|
};
|
|
194
199
|
id: string;
|
|
200
|
+
initialSync?: {
|
|
201
|
+
commitLsn: string | null;
|
|
202
|
+
commitLsnMode: "tracked" | "untracked";
|
|
203
|
+
acceptedOutgoingUpdateIds: string[];
|
|
204
|
+
} | undefined;
|
|
195
205
|
};
|
|
196
206
|
}, z.core.$ZodTypeInternals<{
|
|
197
207
|
container: {
|
|
@@ -289,6 +299,11 @@ export declare const ContainerCreateWithMetadataDocumentResponseSchema: z.ZodTyp
|
|
|
289
299
|
targets: Record<string, unknown>[];
|
|
290
300
|
};
|
|
291
301
|
id: string;
|
|
302
|
+
initialSync?: {
|
|
303
|
+
commitLsn: string | null;
|
|
304
|
+
commitLsnMode: "tracked" | "untracked";
|
|
305
|
+
acceptedOutgoingUpdateIds: string[];
|
|
306
|
+
} | undefined;
|
|
292
307
|
};
|
|
293
308
|
}, {
|
|
294
309
|
container: {
|
|
@@ -386,6 +401,11 @@ export declare const ContainerCreateWithMetadataDocumentResponseSchema: z.ZodTyp
|
|
|
386
401
|
targets: Record<string, unknown>[];
|
|
387
402
|
};
|
|
388
403
|
id: string;
|
|
404
|
+
initialSync?: {
|
|
405
|
+
commitLsn: string | null;
|
|
406
|
+
commitLsnMode: "tracked" | "untracked";
|
|
407
|
+
acceptedOutgoingUpdateIds: string[];
|
|
408
|
+
} | undefined;
|
|
389
409
|
};
|
|
390
410
|
}>>;
|
|
391
411
|
export type ContainerCreateWithMetadataDocumentResponse = z.infer<typeof ContainerCreateWithMetadataDocumentResponseSchema>;
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { type DocumentContentKeyBundleResponse, type DocumentKekTargetsResponse, type DocumentSyncResponse } from "./documentSyncSchema.js";
|
|
3
3
|
export { type DocumentContentKeyBundleResponse, DocumentContentKeyBundleResponseSchema, type DocumentContentKeyTargetEnvelopeResponse, DocumentContentKeyTargetEnvelopeResponseSchema, type DocumentKekTargetsResponse, DocumentKekTargetsResponseSchema, type DocumentSyncPullPageResponse, DocumentSyncPullPageResponseSchema, type DocumentSyncResponse, DocumentSyncResponseSchema, type DocumentSyncUpdateResponse, DocumentSyncUpdateResponseSchema, } from "./documentSyncSchema.js";
|
|
4
|
+
/**
|
|
5
|
+
* What the create transaction committed of a seed: the accepted update id and
|
|
6
|
+
* the commit position a following sync reads from, as a sync response reports
|
|
7
|
+
* them.
|
|
8
|
+
*/
|
|
9
|
+
export declare const DocumentCreateSeedResponseSchema: z.ZodType<{
|
|
10
|
+
commitLsn: string | null;
|
|
11
|
+
commitLsnMode: "tracked" | "untracked";
|
|
12
|
+
acceptedOutgoingUpdateIds: string[];
|
|
13
|
+
}, {
|
|
14
|
+
commitLsn: string | null;
|
|
15
|
+
commitLsnMode: "tracked" | "untracked";
|
|
16
|
+
acceptedOutgoingUpdateIds: string[];
|
|
17
|
+
}, z.core.$ZodTypeInternals<{
|
|
18
|
+
commitLsn: string | null;
|
|
19
|
+
commitLsnMode: "tracked" | "untracked";
|
|
20
|
+
acceptedOutgoingUpdateIds: string[];
|
|
21
|
+
}, {
|
|
22
|
+
commitLsn: string | null;
|
|
23
|
+
commitLsnMode: "tracked" | "untracked";
|
|
24
|
+
acceptedOutgoingUpdateIds: string[];
|
|
25
|
+
}>>;
|
|
26
|
+
export type DocumentCreateSeedResponse = z.infer<typeof DocumentCreateSeedResponseSchema>;
|
|
4
27
|
export declare const DocumentCreateResponseSchema: z.ZodType<{
|
|
5
28
|
accessManifest: {
|
|
6
29
|
event: {
|
|
@@ -36,6 +59,11 @@ export declare const DocumentCreateResponseSchema: z.ZodType<{
|
|
|
36
59
|
targets: Record<string, unknown>[];
|
|
37
60
|
};
|
|
38
61
|
id: string;
|
|
62
|
+
initialSync?: {
|
|
63
|
+
commitLsn: string | null;
|
|
64
|
+
commitLsnMode: "tracked" | "untracked";
|
|
65
|
+
acceptedOutgoingUpdateIds: string[];
|
|
66
|
+
} | undefined;
|
|
39
67
|
}, {
|
|
40
68
|
accessManifest: {
|
|
41
69
|
event: {
|
|
@@ -71,6 +99,11 @@ export declare const DocumentCreateResponseSchema: z.ZodType<{
|
|
|
71
99
|
targets: Record<string, unknown>[];
|
|
72
100
|
};
|
|
73
101
|
id: string;
|
|
102
|
+
initialSync?: {
|
|
103
|
+
commitLsn: string | null;
|
|
104
|
+
commitLsnMode: "tracked" | "untracked";
|
|
105
|
+
acceptedOutgoingUpdateIds: string[];
|
|
106
|
+
} | undefined;
|
|
74
107
|
}, z.core.$ZodTypeInternals<{
|
|
75
108
|
accessManifest: {
|
|
76
109
|
event: {
|
|
@@ -106,6 +139,11 @@ export declare const DocumentCreateResponseSchema: z.ZodType<{
|
|
|
106
139
|
targets: Record<string, unknown>[];
|
|
107
140
|
};
|
|
108
141
|
id: string;
|
|
142
|
+
initialSync?: {
|
|
143
|
+
commitLsn: string | null;
|
|
144
|
+
commitLsnMode: "tracked" | "untracked";
|
|
145
|
+
acceptedOutgoingUpdateIds: string[];
|
|
146
|
+
} | undefined;
|
|
109
147
|
}, {
|
|
110
148
|
accessManifest: {
|
|
111
149
|
event: {
|
|
@@ -141,6 +179,11 @@ export declare const DocumentCreateResponseSchema: z.ZodType<{
|
|
|
141
179
|
targets: Record<string, unknown>[];
|
|
142
180
|
};
|
|
143
181
|
id: string;
|
|
182
|
+
initialSync?: {
|
|
183
|
+
commitLsn: string | null;
|
|
184
|
+
commitLsnMode: "tracked" | "untracked";
|
|
185
|
+
acceptedOutgoingUpdateIds: string[];
|
|
186
|
+
} | undefined;
|
|
144
187
|
}>>;
|
|
145
188
|
export type DocumentCreateResponse = z.infer<typeof DocumentCreateResponseSchema>;
|
|
146
189
|
export declare const DocumentLinkSetMutationResponseSchema: z.ZodType<{
|
|
@@ -4,16 +4,27 @@ import { arraySchema, loosePlainObject, nonEmptyArraySchema, nonEmptyStringSchem
|
|
|
4
4
|
import { AccessEventBundleWireResponseSchema, AccessManifestBundleWireResponseSchema, } from "../util/index.js";
|
|
5
5
|
import { writerProjectionManifestBundlesRefinement } from "../writerProjectionRefinements.js";
|
|
6
6
|
import { ContainerKeyingPathResponseSchema, ContainerKeyingPathWireResponseSchema, } from "./container.js";
|
|
7
|
-
import { DocumentContentKeyBundleResponseSchema, DocumentKekTargetsResponseSchema, DocumentSyncResponseSchema, } from "./documentSyncSchema.js";
|
|
7
|
+
import { commitLsnResponseShape, DocumentContentKeyBundleResponseSchema, DocumentKekTargetsResponseSchema, DocumentSyncResponseSchema, } from "./documentSyncSchema.js";
|
|
8
8
|
import { containerKeyingPathReferences, ManifestBundlesSchema, ManifestHashReferenceSchema, OmittedManifestBundlesSchema, refineManifestBundleReferences, } from "./manifestBundleReferences.js";
|
|
9
9
|
import { ProjectionPolicyEvidenceResponseSchema } from "./projectionPolicyEvidence.js";
|
|
10
10
|
export { DocumentContentKeyBundleResponseSchema, DocumentContentKeyTargetEnvelopeResponseSchema, DocumentKekTargetsResponseSchema, DocumentSyncPullPageResponseSchema, DocumentSyncResponseSchema, DocumentSyncUpdateResponseSchema, } from "./documentSyncSchema.js";
|
|
11
|
+
/**
|
|
12
|
+
* What the create transaction committed of a seed: the accepted update id and
|
|
13
|
+
* the commit position a following sync reads from, as a sync response reports
|
|
14
|
+
* them.
|
|
15
|
+
*/
|
|
16
|
+
export const DocumentCreateSeedResponseSchema = loosePlainObject({
|
|
17
|
+
acceptedOutgoingUpdateIds: arraySchema(nonEmptyStringSchema, 1),
|
|
18
|
+
...commitLsnResponseShape,
|
|
19
|
+
});
|
|
11
20
|
export const DocumentCreateResponseSchema = loosePlainObject({
|
|
12
21
|
accessManifest: AccessManifestBundleWireResponseSchema,
|
|
13
22
|
contentKeyBundle: DocumentContentKeyBundleResponseSchema,
|
|
14
23
|
createdAt: z.string(),
|
|
15
24
|
documentKekTargets: DocumentKekTargetsResponseSchema,
|
|
16
25
|
id: z.string(),
|
|
26
|
+
/** Present exactly when the request carried a seed. */
|
|
27
|
+
initialSync: DocumentCreateSeedResponseSchema.optional(),
|
|
17
28
|
});
|
|
18
29
|
export const DocumentLinkSetMutationResponseSchema = loosePlainObject({
|
|
19
30
|
accessManifest: AccessManifestBundleWireResponseSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentMutation.js","sourceRoot":"","sources":["documentMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,WAAW,EACX,gBAAgB,EACh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,KAAc;IAEd,OAAO,0BAA0B,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7D,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,KAAc;IAEd,OAAO,sCAAsC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,KAAc;IAEd,OAAO,0CAA0C,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaRuntimeRefinements } from \"../jsonSchema\";\nimport {\n arraySchema,\n loosePlainObject,\n nonEmptyArraySchema,\n nonEmptyStringSchema,\n} from \"../schema\";\nimport {\n AccessEventBundleWireResponseSchema,\n AccessManifestBundleWireResponseSchema,\n} from \"../util\";\nimport { writerProjectionManifestBundlesRefinement } from \"../writerProjectionRefinements\";\nimport {\n ContainerKeyingPathResponseSchema,\n ContainerKeyingPathWireResponseSchema,\n} from \"./container\";\nimport {\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n} from \"./documentSyncSchema\";\nimport {\n containerKeyingPathReferences,\n ManifestBundlesSchema,\n ManifestHashReferenceSchema,\n OmittedManifestBundlesSchema,\n refineManifestBundleReferences,\n} from \"./manifestBundleReferences\";\nimport { ProjectionPolicyEvidenceResponseSchema } from \"./projectionPolicyEvidence\";\n\nexport {\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentContentKeyTargetEnvelopeResponse,\n DocumentContentKeyTargetEnvelopeResponseSchema,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentSyncPullPageResponse,\n DocumentSyncPullPageResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n type DocumentSyncUpdateResponse,\n DocumentSyncUpdateResponseSchema,\n} from \"./documentSyncSchema\";\n\nexport const DocumentCreateResponseSchema = loosePlainObject({\n accessManifest: AccessManifestBundleWireResponseSchema,\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n createdAt: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n id: z.string(),\n});\n\nexport type DocumentCreateResponse = z.infer<\n typeof DocumentCreateResponseSchema\n>;\n\nexport const DocumentLinkSetMutationResponseSchema = loosePlainObject({\n accessManifest: AccessManifestBundleWireResponseSchema,\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n documentKekTargets: DocumentKekTargetsResponseSchema,\n id: z.string(),\n});\n\nexport type DocumentLinkSetMutationResponse = z.infer<\n typeof DocumentLinkSetMutationResponseSchema\n>;\n\nconst documentPurgeProofShape = {\n authorizingContainerPath: nonEmptyArraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentContainerManifestHistory: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentId: nonEmptyStringSchema,\n documentManifest: AccessManifestBundleWireResponseSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(AccessManifestBundleWireResponseSchema),\n ),\n documentManifestPredecessors: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n purgeEvent: AccessEventBundleWireResponseSchema,\n purgedAt: nonEmptyStringSchema,\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n} as const;\n\nexport const DocumentPurgeProofResponseSchema = loosePlainObject(\n documentPurgeProofShape,\n);\n\nexport type DocumentPurgeProofResponse = z.infer<\n typeof DocumentPurgeProofResponseSchema\n>;\n\nexport const DocumentPurgeResponseSchema = loosePlainObject({\n ...documentPurgeProofShape,\n reclaimedBlobStorageKeys: arraySchema(z.string()),\n});\n\nexport type DocumentPurgeResponse = z.infer<typeof DocumentPurgeResponseSchema>;\n\nexport const DocumentWriterProjectionResponseSchema = loosePlainObject({\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n authorizingContainerPaths: nonEmptyArraySchema(\n ContainerKeyingPathResponseSchema,\n ),\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n /** Present only when the stored content-key bundle targets stale KEKs. */\n contentKeyBundleStale: z.literal(true).optional(),\n documentContainerManifestHistory: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n documentManifest: AccessManifestBundleWireResponseSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(AccessManifestBundleWireResponseSchema),\n ),\n documentManifestHistory: arraySchema(AccessManifestBundleWireResponseSchema),\n});\n\nexport type DocumentWriterProjectionResponse = z.infer<\n typeof DocumentWriterProjectionResponseSchema\n>;\n\nfunction documentWriterProjectionReferences(projection: {\n readonly authorizingContainerPaths: unknown;\n readonly documentContainerManifestHistory: unknown;\n readonly documentManifest: unknown;\n readonly documentManifestContainerPaths: unknown;\n readonly documentManifestHistory: unknown;\n}): unknown[] {\n const listed = (value: unknown): unknown[] =>\n Array.isArray(value) ? value : [];\n return [\n projection.documentManifest,\n ...listed(projection.documentManifestHistory),\n ...listed(projection.documentContainerManifestHistory),\n ...listed(projection.documentManifestContainerPaths).flatMap(listed),\n ...listed(projection.authorizingContainerPaths).flatMap(\n containerKeyingPathReferences,\n ),\n ];\n}\n\n/** The served shape; see ContainerWriterProjectionWireResponseSchema. */\nexport const DocumentWriterProjectionWireResponseSchema =\n registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n bundles: ManifestBundlesSchema,\n omittedBundles: OmittedManifestBundlesSchema,\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n authorizingContainerPaths: nonEmptyArraySchema(\n ContainerKeyingPathWireResponseSchema,\n ),\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n /** Present only when the stored content-key bundle targets stale KEKs. */\n contentKeyBundleStale: z.literal(true).optional(),\n documentContainerManifestHistory: arraySchema(\n ManifestHashReferenceSchema,\n ),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n documentManifest: ManifestHashReferenceSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(ManifestHashReferenceSchema),\n ),\n documentManifestHistory: arraySchema(ManifestHashReferenceSchema),\n }).superRefine((projection, context) =>\n refineManifestBundleReferences(\n projection,\n documentWriterProjectionReferences(projection),\n context,\n ),\n ),\n [writerProjectionManifestBundlesRefinement],\n );\n\nexport type DocumentWriterProjectionWireResponse = z.infer<\n typeof DocumentWriterProjectionWireResponseSchema\n>;\n\n/**\n * Derives the KEK-target summary that corresponds to a content-key bundle,\n * preserving the bundle's served target order. Both the API (for stale-bundle\n * read-only sync responses) and clients (for plans built against a stale\n * bundle) must derive this identically so response/plan state comparisons\n * hold byte-for-byte.\n */\nexport function documentKekTargetsFromContentKeyBundle(\n bundle: DocumentContentKeyBundleResponse,\n): DocumentKekTargetsResponse {\n const targets = bundle.targets.map((target) => ({\n containerId: target.containerId,\n containerManifestHash: target.containerManifestHash,\n containerKeyEpochId: target.containerKeyEpochId,\n containerKeyEpoch: target.containerKeyEpoch,\n }));\n\n return {\n documentId: bundle.documentId,\n documentKeyTargetHash: bundle.targetHash,\n linkSetManifestHash: bundle.linkSetManifestHash,\n linkedContainerKeyEpochIds: targets.map(\n (target) => target.containerKeyEpochId,\n ),\n linkedContainerManifestHashes: targets.map(\n (target) => target.containerManifestHash,\n ),\n targets,\n };\n}\n\nexport function isDocumentKekTargetsResponse(\n value: unknown,\n): value is DocumentKekTargetsResponse {\n return DocumentKekTargetsResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentContentKeyBundleResponse(\n value: unknown,\n): value is DocumentContentKeyBundleResponse {\n return DocumentContentKeyBundleResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentCreateResponse(\n value: unknown,\n): value is DocumentCreateResponse {\n return DocumentCreateResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentLinkSetMutationResponse(\n value: unknown,\n): value is DocumentLinkSetMutationResponse {\n return DocumentLinkSetMutationResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentPurgeResponse(\n value: unknown,\n): value is DocumentPurgeResponse {\n return DocumentPurgeResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentPurgeProofResponse(\n value: unknown,\n): value is DocumentPurgeProofResponse {\n return DocumentPurgeProofResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentSyncResponse(\n value: unknown,\n): value is DocumentSyncResponse {\n return DocumentSyncResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentWriterProjectionResponse(\n value: unknown,\n): value is DocumentWriterProjectionResponse {\n return DocumentWriterProjectionResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentWriterProjectionWireResponse(\n value: unknown,\n): value is DocumentWriterProjectionWireResponse {\n return DocumentWriterProjectionWireResponseSchema.safeParse(value).success;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"documentMutation.js","sourceRoot":"","sources":["documentMutation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,mCAAmC,EACnC,sCAAsC,GACvC,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,yCAAyC,EAAE,MAAM,gCAAgC,CAAC;AAC3F,OAAO,EACL,iCAAiC,EACjC,qCAAqC,GACtC,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,sBAAsB,EAEtB,sCAAsC,EAEtC,gCAAgC,EAEhC,0BAA0B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,2BAA2B,EAC3B,4BAA4B,EAC5B,8BAA8B,GAC/B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,sCAAsC,EAAE,MAAM,4BAA4B,CAAC;AAEpF,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,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { registerJsonSchemaRuntimeRefinements } from \"../jsonSchema\";\nimport {\n arraySchema,\n loosePlainObject,\n nonEmptyArraySchema,\n nonEmptyStringSchema,\n} from \"../schema\";\nimport {\n AccessEventBundleWireResponseSchema,\n AccessManifestBundleWireResponseSchema,\n} from \"../util\";\nimport { writerProjectionManifestBundlesRefinement } from \"../writerProjectionRefinements\";\nimport {\n ContainerKeyingPathResponseSchema,\n ContainerKeyingPathWireResponseSchema,\n} from \"./container\";\nimport {\n commitLsnResponseShape,\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n} from \"./documentSyncSchema\";\nimport {\n containerKeyingPathReferences,\n ManifestBundlesSchema,\n ManifestHashReferenceSchema,\n OmittedManifestBundlesSchema,\n refineManifestBundleReferences,\n} from \"./manifestBundleReferences\";\nimport { ProjectionPolicyEvidenceResponseSchema } from \"./projectionPolicyEvidence\";\n\nexport {\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentContentKeyTargetEnvelopeResponse,\n DocumentContentKeyTargetEnvelopeResponseSchema,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentSyncPullPageResponse,\n DocumentSyncPullPageResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n type DocumentSyncUpdateResponse,\n DocumentSyncUpdateResponseSchema,\n} from \"./documentSyncSchema\";\n\n/**\n * What the create transaction committed of a seed: the accepted update id and\n * the commit position a following sync reads from, as a sync response reports\n * them.\n */\nexport const DocumentCreateSeedResponseSchema = loosePlainObject({\n acceptedOutgoingUpdateIds: arraySchema(nonEmptyStringSchema, 1),\n ...commitLsnResponseShape,\n});\n\nexport type DocumentCreateSeedResponse = z.infer<\n typeof DocumentCreateSeedResponseSchema\n>;\n\nexport const DocumentCreateResponseSchema = loosePlainObject({\n accessManifest: AccessManifestBundleWireResponseSchema,\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n createdAt: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n id: z.string(),\n /** Present exactly when the request carried a seed. */\n initialSync: DocumentCreateSeedResponseSchema.optional(),\n});\n\nexport type DocumentCreateResponse = z.infer<\n typeof DocumentCreateResponseSchema\n>;\n\nexport const DocumentLinkSetMutationResponseSchema = loosePlainObject({\n accessManifest: AccessManifestBundleWireResponseSchema,\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n documentKekTargets: DocumentKekTargetsResponseSchema,\n id: z.string(),\n});\n\nexport type DocumentLinkSetMutationResponse = z.infer<\n typeof DocumentLinkSetMutationResponseSchema\n>;\n\nconst documentPurgeProofShape = {\n authorizingContainerPath: nonEmptyArraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentContainerManifestHistory: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentId: nonEmptyStringSchema,\n documentManifest: AccessManifestBundleWireResponseSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(AccessManifestBundleWireResponseSchema),\n ),\n documentManifestPredecessors: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n purgeEvent: AccessEventBundleWireResponseSchema,\n purgedAt: nonEmptyStringSchema,\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n} as const;\n\nexport const DocumentPurgeProofResponseSchema = loosePlainObject(\n documentPurgeProofShape,\n);\n\nexport type DocumentPurgeProofResponse = z.infer<\n typeof DocumentPurgeProofResponseSchema\n>;\n\nexport const DocumentPurgeResponseSchema = loosePlainObject({\n ...documentPurgeProofShape,\n reclaimedBlobStorageKeys: arraySchema(z.string()),\n});\n\nexport type DocumentPurgeResponse = z.infer<typeof DocumentPurgeResponseSchema>;\n\nexport const DocumentWriterProjectionResponseSchema = loosePlainObject({\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n authorizingContainerPaths: nonEmptyArraySchema(\n ContainerKeyingPathResponseSchema,\n ),\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n /** Present only when the stored content-key bundle targets stale KEKs. */\n contentKeyBundleStale: z.literal(true).optional(),\n documentContainerManifestHistory: arraySchema(\n AccessManifestBundleWireResponseSchema,\n ),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n documentManifest: AccessManifestBundleWireResponseSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(AccessManifestBundleWireResponseSchema),\n ),\n documentManifestHistory: arraySchema(AccessManifestBundleWireResponseSchema),\n});\n\nexport type DocumentWriterProjectionResponse = z.infer<\n typeof DocumentWriterProjectionResponseSchema\n>;\n\nfunction documentWriterProjectionReferences(projection: {\n readonly authorizingContainerPaths: unknown;\n readonly documentContainerManifestHistory: unknown;\n readonly documentManifest: unknown;\n readonly documentManifestContainerPaths: unknown;\n readonly documentManifestHistory: unknown;\n}): unknown[] {\n const listed = (value: unknown): unknown[] =>\n Array.isArray(value) ? value : [];\n return [\n projection.documentManifest,\n ...listed(projection.documentManifestHistory),\n ...listed(projection.documentContainerManifestHistory),\n ...listed(projection.documentManifestContainerPaths).flatMap(listed),\n ...listed(projection.authorizingContainerPaths).flatMap(\n containerKeyingPathReferences,\n ),\n ];\n}\n\n/** The served shape; see ContainerWriterProjectionWireResponseSchema. */\nexport const DocumentWriterProjectionWireResponseSchema =\n registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n bundles: ManifestBundlesSchema,\n omittedBundles: OmittedManifestBundlesSchema,\n policyEvidence: ProjectionPolicyEvidenceResponseSchema,\n authorizingContainerPaths: nonEmptyArraySchema(\n ContainerKeyingPathWireResponseSchema,\n ),\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n /** Present only when the stored content-key bundle targets stale KEKs. */\n contentKeyBundleStale: z.literal(true).optional(),\n documentContainerManifestHistory: arraySchema(\n ManifestHashReferenceSchema,\n ),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n documentManifest: ManifestHashReferenceSchema,\n documentManifestContainerPaths: arraySchema(\n arraySchema(ManifestHashReferenceSchema),\n ),\n documentManifestHistory: arraySchema(ManifestHashReferenceSchema),\n }).superRefine((projection, context) =>\n refineManifestBundleReferences(\n projection,\n documentWriterProjectionReferences(projection),\n context,\n ),\n ),\n [writerProjectionManifestBundlesRefinement],\n );\n\nexport type DocumentWriterProjectionWireResponse = z.infer<\n typeof DocumentWriterProjectionWireResponseSchema\n>;\n\n/**\n * Derives the KEK-target summary that corresponds to a content-key bundle,\n * preserving the bundle's served target order. Both the API (for stale-bundle\n * read-only sync responses) and clients (for plans built against a stale\n * bundle) must derive this identically so response/plan state comparisons\n * hold byte-for-byte.\n */\nexport function documentKekTargetsFromContentKeyBundle(\n bundle: DocumentContentKeyBundleResponse,\n): DocumentKekTargetsResponse {\n const targets = bundle.targets.map((target) => ({\n containerId: target.containerId,\n containerManifestHash: target.containerManifestHash,\n containerKeyEpochId: target.containerKeyEpochId,\n containerKeyEpoch: target.containerKeyEpoch,\n }));\n\n return {\n documentId: bundle.documentId,\n documentKeyTargetHash: bundle.targetHash,\n linkSetManifestHash: bundle.linkSetManifestHash,\n linkedContainerKeyEpochIds: targets.map(\n (target) => target.containerKeyEpochId,\n ),\n linkedContainerManifestHashes: targets.map(\n (target) => target.containerManifestHash,\n ),\n targets,\n };\n}\n\nexport function isDocumentKekTargetsResponse(\n value: unknown,\n): value is DocumentKekTargetsResponse {\n return DocumentKekTargetsResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentContentKeyBundleResponse(\n value: unknown,\n): value is DocumentContentKeyBundleResponse {\n return DocumentContentKeyBundleResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentCreateResponse(\n value: unknown,\n): value is DocumentCreateResponse {\n return DocumentCreateResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentLinkSetMutationResponse(\n value: unknown,\n): value is DocumentLinkSetMutationResponse {\n return DocumentLinkSetMutationResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentPurgeResponse(\n value: unknown,\n): value is DocumentPurgeResponse {\n return DocumentPurgeResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentPurgeProofResponse(\n value: unknown,\n): value is DocumentPurgeProofResponse {\n return DocumentPurgeProofResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentSyncResponse(\n value: unknown,\n): value is DocumentSyncResponse {\n return DocumentSyncResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentWriterProjectionResponse(\n value: unknown,\n): value is DocumentWriterProjectionResponse {\n return DocumentWriterProjectionResponseSchema.safeParse(value).success;\n}\n\nexport function isDocumentWriterProjectionWireResponse(\n value: unknown,\n): value is DocumentWriterProjectionWireResponse {\n return DocumentWriterProjectionWireResponseSchema.safeParse(value).success;\n}\n"]}
|
|
@@ -209,10 +209,11 @@ export declare const DocumentSyncPullPageResponseSchema: z.ZodType<{
|
|
|
209
209
|
nextCursor: string | null;
|
|
210
210
|
}>>;
|
|
211
211
|
export type DocumentSyncPullPageResponse = z.infer<typeof DocumentSyncPullPageResponseSchema>;
|
|
212
|
+
export declare const commitLsnResponseShape: {
|
|
213
|
+
commitLsn: z.ZodNullable<z.ZodString>;
|
|
214
|
+
commitLsnMode: z.ZodUnion<readonly [z.ZodLiteral<"tracked">, z.ZodLiteral<"untracked">]>;
|
|
215
|
+
};
|
|
212
216
|
export declare const DocumentSyncResponseSchema: z.ZodType<{
|
|
213
|
-
acceptedOutgoingUpdateIds: string[];
|
|
214
|
-
commitLsn: string | null;
|
|
215
|
-
commitLsnMode: "tracked" | "untracked";
|
|
216
217
|
contentKeyBundle: {
|
|
217
218
|
contentKeyEpoch: number;
|
|
218
219
|
documentId: string;
|
|
@@ -275,10 +276,10 @@ export declare const DocumentSyncResponseSchema: z.ZodType<{
|
|
|
275
276
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
276
277
|
sourceVersionVector?: string | undefined;
|
|
277
278
|
}[];
|
|
278
|
-
}, {
|
|
279
|
-
acceptedOutgoingUpdateIds: string[];
|
|
280
279
|
commitLsn: string | null;
|
|
281
280
|
commitLsnMode: "tracked" | "untracked";
|
|
281
|
+
acceptedOutgoingUpdateIds: string[];
|
|
282
|
+
}, {
|
|
282
283
|
contentKeyBundle: {
|
|
283
284
|
contentKeyEpoch: number;
|
|
284
285
|
documentId: string;
|
|
@@ -341,10 +342,10 @@ export declare const DocumentSyncResponseSchema: z.ZodType<{
|
|
|
341
342
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
342
343
|
sourceVersionVector?: string | undefined;
|
|
343
344
|
}[];
|
|
344
|
-
}, z.core.$ZodTypeInternals<{
|
|
345
|
-
acceptedOutgoingUpdateIds: string[];
|
|
346
345
|
commitLsn: string | null;
|
|
347
346
|
commitLsnMode: "tracked" | "untracked";
|
|
347
|
+
acceptedOutgoingUpdateIds: string[];
|
|
348
|
+
}, z.core.$ZodTypeInternals<{
|
|
348
349
|
contentKeyBundle: {
|
|
349
350
|
contentKeyEpoch: number;
|
|
350
351
|
documentId: string;
|
|
@@ -407,10 +408,10 @@ export declare const DocumentSyncResponseSchema: z.ZodType<{
|
|
|
407
408
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
408
409
|
sourceVersionVector?: string | undefined;
|
|
409
410
|
}[];
|
|
410
|
-
}, {
|
|
411
|
-
acceptedOutgoingUpdateIds: string[];
|
|
412
411
|
commitLsn: string | null;
|
|
413
412
|
commitLsnMode: "tracked" | "untracked";
|
|
413
|
+
acceptedOutgoingUpdateIds: string[];
|
|
414
|
+
}, {
|
|
414
415
|
contentKeyBundle: {
|
|
415
416
|
contentKeyEpoch: number;
|
|
416
417
|
documentId: string;
|
|
@@ -473,5 +474,8 @@ export declare const DocumentSyncResponseSchema: z.ZodType<{
|
|
|
473
474
|
checkpointPayloadKind?: "full_history_snapshot" | undefined;
|
|
474
475
|
sourceVersionVector?: string | undefined;
|
|
475
476
|
}[];
|
|
477
|
+
commitLsn: string | null;
|
|
478
|
+
commitLsnMode: "tracked" | "untracked";
|
|
479
|
+
acceptedOutgoingUpdateIds: string[];
|
|
476
480
|
}>>;
|
|
477
481
|
export type DocumentSyncResponse = z.infer<typeof DocumentSyncResponseSchema>;
|
|
@@ -96,10 +96,30 @@ function addHistoricalContentKeyBundleIssues(response, context) {
|
|
|
96
96
|
seenEpochs.add(contentKeyEpoch);
|
|
97
97
|
});
|
|
98
98
|
}
|
|
99
|
-
export const
|
|
100
|
-
acceptedOutgoingUpdateIds: arraySchema(z.string(), MAX_DOCUMENT_SYNC_OUTGOING_UPDATES),
|
|
99
|
+
export const commitLsnResponseShape = {
|
|
101
100
|
commitLsn: z.string().nullable(),
|
|
102
101
|
commitLsnMode: z.union([z.literal("tracked"), z.literal("untracked")]),
|
|
102
|
+
};
|
|
103
|
+
/** The 0/0 sentinel and the untracked mode imply each other. */
|
|
104
|
+
function addCommitLsnIssues(response, context) {
|
|
105
|
+
if (response.commitLsnMode === "untracked" && response.commitLsn !== "0/0") {
|
|
106
|
+
context.addIssue({
|
|
107
|
+
code: "custom",
|
|
108
|
+
message: "untracked commit LSN must use the 0/0 sentinel",
|
|
109
|
+
path: ["commitLsn"],
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
if (response.commitLsn === "0/0" && response.commitLsnMode !== "untracked") {
|
|
113
|
+
context.addIssue({
|
|
114
|
+
code: "custom",
|
|
115
|
+
message: "0/0 commit LSN must be declared untracked",
|
|
116
|
+
path: ["commitLsnMode"],
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
export const DocumentSyncResponseSchema = registerJsonSchemaRuntimeRefinements(loosePlainObject({
|
|
121
|
+
acceptedOutgoingUpdateIds: arraySchema(z.string(), MAX_DOCUMENT_SYNC_OUTGOING_UPDATES),
|
|
122
|
+
...commitLsnResponseShape,
|
|
103
123
|
contentKeyBundle: DocumentContentKeyBundleResponseSchema,
|
|
104
124
|
contentKeyBundles: arraySchema(DocumentContentKeyBundleResponseSchema),
|
|
105
125
|
documentId: z.string(),
|
|
@@ -115,22 +135,7 @@ export const DocumentSyncResponseSchema = registerJsonSchemaRuntimeRefinements(l
|
|
|
115
135
|
path: ["pullPage", "nextCursor"],
|
|
116
136
|
});
|
|
117
137
|
}
|
|
118
|
-
|
|
119
|
-
response.commitLsn !== "0/0") {
|
|
120
|
-
context.addIssue({
|
|
121
|
-
code: "custom",
|
|
122
|
-
message: "untracked commit LSN must use the 0/0 sentinel",
|
|
123
|
-
path: ["commitLsn"],
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
if (response.commitLsn === "0/0" &&
|
|
127
|
-
response.commitLsnMode !== "untracked") {
|
|
128
|
-
context.addIssue({
|
|
129
|
-
code: "custom",
|
|
130
|
-
message: "0/0 commit LSN must be declared untracked",
|
|
131
|
-
path: ["commitLsnMode"],
|
|
132
|
-
});
|
|
133
|
-
}
|
|
138
|
+
addCommitLsnIssues(response, context);
|
|
134
139
|
addHistoricalContentKeyBundleIssues(response, context);
|
|
135
140
|
}), [
|
|
136
141
|
documentSyncResponseCommitLsnModeRefinement,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"documentSyncSchema.js","sourceRoot":"","sources":["documentSyncSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oCAAoC,EACpC,gDAAgD,EAChD,sCAAsC,EACtC,8CAA8C,GAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,2CAA2C,EAC3C,+CAA+C,EAC/C,+CAA+C,EAC/C,sCAAsC,EACtC,sCAAsC,GACvC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,oCAAoC,EAAE,MAAM,eAAe,CAAC;AACrE,OAAO,EACL,WAAW,EACX,2BAA2B,EAC3B,gBAAgB,EAChB,mBAAmB,EACnB,oBAAoB,EACpB,i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AE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC,EACF;IACE,2CAA2C;IAC3C,+CAA+C;IAC/C,sCAAsC;IACtC,+CAA+C;CAChD,CACF,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n classifyDocumentSyncCheckpointFields,\n DOCUMENT_SYNC_CHECKPOINT_FIELD_SET_ISSUE_MESSAGE,\n DOCUMENT_SYNC_ROTATION_CHECKPOINT_KIND,\n DOCUMENT_SYNC_ROTATION_CHECKPOINT_PAYLOAD_KIND,\n} from \"../documentSyncCheckpoint\";\nimport {\n documentSyncResponseCommitLsnModeRefinement,\n documentSyncResponseCommitLsnSentinelRefinement,\n documentSyncResponseHistoricalBundlesRefinement,\n documentSyncResponsePullPageRefinement,\n documentSyncResponseRotationRefinement,\n} from \"../documentSyncRefinements\";\nimport { registerJsonSchemaRuntimeRefinements } from \"../jsonSchema\";\nimport {\n arraySchema,\n boundedNonEmptyStringSchema,\n loosePlainObject,\n nonEmptyArraySchema,\n nonEmptyStringSchema,\n plainObjectSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport {\n MAX_DOCUMENT_SYNC_OUTGOING_UPDATES,\n MAX_DOCUMENT_SYNC_PULL_CURSOR_LENGTH,\n MAX_DOCUMENT_SYNC_RESPONSE_PAGE_UPDATES,\n} from \"../util/documentSyncLimits\";\n\nexport const DocumentContentKeyTargetEnvelopeResponseSchema = loosePlainObject({\n containerId: nonEmptyStringSchema,\n containerKeyEpoch: positiveIntegerSchema,\n containerKeyEpochId: nonEmptyStringSchema,\n containerManifestHash: nonEmptyStringSchema,\n wrappedKey: nonEmptyStringSchema,\n wrappingMetadata: plainObjectSchema,\n});\n\nexport type DocumentContentKeyTargetEnvelopeResponse = z.infer<\n typeof DocumentContentKeyTargetEnvelopeResponseSchema\n>;\n\nconst DocumentContentKeyTargetResponseSchema = loosePlainObject({\n containerId: nonEmptyStringSchema,\n containerKeyEpoch: positiveIntegerSchema,\n containerKeyEpochId: nonEmptyStringSchema,\n containerManifestHash: nonEmptyStringSchema,\n});\n\nexport const DocumentKekTargetsResponseSchema = loosePlainObject({\n documentId: z.string(),\n documentKeyTargetHash: nonEmptyStringSchema,\n linkedContainerKeyEpochIds: nonEmptyArraySchema(nonEmptyStringSchema),\n linkedContainerManifestHashes: nonEmptyArraySchema(nonEmptyStringSchema),\n linkSetManifestHash: nonEmptyStringSchema,\n targets: nonEmptyArraySchema(plainObjectSchema),\n});\n\nexport type DocumentKekTargetsResponse = z.infer<\n typeof DocumentKekTargetsResponseSchema\n>;\n\nexport const DocumentContentKeyBundleResponseSchema = loosePlainObject({\n contentKeyEpoch: positiveIntegerSchema,\n documentId: z.string(),\n linkSetManifestHash: nonEmptyStringSchema,\n targetHash: nonEmptyStringSchema,\n targets: nonEmptyArraySchema(DocumentContentKeyTargetEnvelopeResponseSchema),\n});\n\nexport type DocumentContentKeyBundleResponse = z.infer<\n typeof DocumentContentKeyBundleResponseSchema\n>;\n\nexport const DocumentSyncUpdateResponseSchema =\n registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n accessEpoch: positiveIntegerSchema,\n authorizationTargets: nonEmptyArraySchema(\n DocumentContentKeyTargetResponseSchema,\n ),\n authorFingerprint: z.string(),\n checkpointKind: z\n .literal(DOCUMENT_SYNC_ROTATION_CHECKPOINT_KIND)\n .optional(),\n checkpointPayloadKind: z\n .literal(DOCUMENT_SYNC_ROTATION_CHECKPOINT_PAYLOAD_KIND)\n .optional(),\n createdAt: z.string(),\n documentId: z.string(),\n encryptedData: z.string(),\n id: z.string(),\n partialEndVersionVector: z.string(),\n partialStartVersionVector: z.string(),\n plaintextHash: nonEmptyStringSchema,\n sourceVersionVector: z.string().min(1).optional(),\n writeHeader: plainObjectSchema,\n }).superRefine((update, context) => {\n if (classifyDocumentSyncCheckpointFields(update) === \"invalid\") {\n context.addIssue({\n code: \"custom\",\n message: DOCUMENT_SYNC_CHECKPOINT_FIELD_SET_ISSUE_MESSAGE,\n });\n }\n }),\n [documentSyncResponseRotationRefinement],\n );\n\nexport type DocumentSyncUpdateResponse = z.infer<\n typeof DocumentSyncUpdateResponseSchema\n>;\n\nexport const DocumentSyncPullPageResponseSchema = loosePlainObject({\n hasMore: z.boolean(),\n nextCursor: boundedNonEmptyStringSchema(\n MAX_DOCUMENT_SYNC_PULL_CURSOR_LENGTH,\n ).nullable(),\n});\n\nexport type DocumentSyncPullPageResponse = z.infer<\n typeof DocumentSyncPullPageResponseSchema\n>;\n\nfunction contentKeyEpochOf(bundle: unknown): number | null {\n if (typeof bundle !== \"object\" || bundle === null) return null;\n const contentKeyEpoch: unknown = Reflect.get(bundle, \"contentKeyEpoch\");\n return typeof contentKeyEpoch === \"number\" ? contentKeyEpoch : null;\n}\n\n/**\n * The current epoch's bundle travels only as `contentKeyBundle`, so the array\n * holds the distinct older epochs that served updates cite. Field issues do not\n * stop this object refinement, so it judges only epochs that parsed.\n */\nfunction addHistoricalContentKeyBundleIssues(\n response: {\n readonly contentKeyBundle: unknown;\n readonly contentKeyBundles: unknown;\n },\n context: z.RefinementCtx,\n): void {\n const currentEpoch = contentKeyEpochOf(response.contentKeyBundle);\n if (currentEpoch === null || !Array.isArray(response.contentKeyBundles)) {\n return;\n }\n const seenEpochs = new Set<number>();\n // forEach skips holes exactly as arraySchema's item validation does.\n response.contentKeyBundles.forEach((bundle: unknown, index: number) => {\n const contentKeyEpoch = contentKeyEpochOf(bundle);\n if (contentKeyEpoch === null) return;\n if (contentKeyEpoch >= currentEpoch || seenEpochs.has(contentKeyEpoch)) {\n context.addIssue({\n code: \"custom\",\n message:\n \"content-key bundles must be distinct epochs older than contentKeyBundle\",\n path: [\"contentKeyBundles\", index, \"contentKeyEpoch\"],\n });\n }\n seenEpochs.add(contentKeyEpoch);\n });\n}\n\nexport const DocumentSyncResponseSchema = registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n acceptedOutgoingUpdateIds: arraySchema(\n z.string(),\n MAX_DOCUMENT_SYNC_OUTGOING_UPDATES,\n ),\n commitLsn: z.string().nullable(),\n commitLsnMode: z.union([z.literal(\"tracked\"), z.literal(\"untracked\")]),\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n contentKeyBundles: arraySchema(DocumentContentKeyBundleResponseSchema),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n pullPage: DocumentSyncPullPageResponseSchema,\n updates: arraySchema(\n DocumentSyncUpdateResponseSchema,\n MAX_DOCUMENT_SYNC_RESPONSE_PAGE_UPDATES,\n ),\n }).superRefine((response, context) => {\n if (\n response.pullPage !== undefined &&\n response.pullPage.hasMore !== (response.pullPage.nextCursor !== null)\n ) {\n context.addIssue({\n code: \"custom\",\n message: \"pull page continuation does not match hasMore\",\n path: [\"pullPage\", \"nextCursor\"],\n });\n }\n if (\n response.commitLsnMode === \"untracked\" &&\n response.commitLsn !== \"0/0\"\n ) {\n context.addIssue({\n code: \"custom\",\n message: \"untracked commit LSN must use the 0/0 sentinel\",\n path: [\"commitLsn\"],\n });\n }\n if (\n response.commitLsn === \"0/0\" &&\n response.commitLsnMode !== \"untracked\"\n ) {\n context.addIssue({\n code: \"custom\",\n message: \"0/0 commit LSN must be declared untracked\",\n path: [\"commitLsnMode\"],\n });\n }\n addHistoricalContentKeyBundleIssues(response, context);\n }),\n [\n documentSyncResponseCommitLsnModeRefinement,\n documentSyncResponseCommitLsnSentinelRefinement,\n documentSyncResponsePullPageRefinement,\n documentSyncResponseHistoricalBundlesRefinement,\n ],\n);\n\nexport type DocumentSyncResponse = z.infer<typeof DocumentSyncResponseSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"documentSyncSchema.js","sourceRoot":"","sources":["documentSyncSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,oCAAoC,EACpC,gDAAgD,EAChD,sCAAsC,EACtC,8CAA8C,GAC/C,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,2CAA2C,EAC3C,+CAA+C,EAC/C,+CAA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;IACnC,IACE,QAAQ,CAAC,QAAQ,KAAK,SAAS;QAC/B,QAAQ,CAAC,QAAQ,CAAC,OAAO,KAAK,CAAC,QAAQ,CAAC,QAAQ,CAAC,UAAU,KAAK,IAAI,CAAC,EACrE,CAAC;QACD,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,+CAA+C;YACxD,IAAI,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;SACjC,CAAC,CAAC;IACL,CAAC;IACD,kBAAkB,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IACtC,mCAAmC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AACzD,CAAC,CAAC,EACF;IACE,2CAA2C;IAC3C,+CAA+C;IAC/C,sCAAsC;IACtC,+CAA+C;CAChD,CACF,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n classifyDocumentSyncCheckpointFields,\n DOCUMENT_SYNC_CHECKPOINT_FIELD_SET_ISSUE_MESSAGE,\n DOCUMENT_SYNC_ROTATION_CHECKPOINT_KIND,\n DOCUMENT_SYNC_ROTATION_CHECKPOINT_PAYLOAD_KIND,\n} from \"../documentSyncCheckpoint\";\nimport {\n documentSyncResponseCommitLsnModeRefinement,\n documentSyncResponseCommitLsnSentinelRefinement,\n documentSyncResponseHistoricalBundlesRefinement,\n documentSyncResponsePullPageRefinement,\n documentSyncResponseRotationRefinement,\n} from \"../documentSyncRefinements\";\nimport { registerJsonSchemaRuntimeRefinements } from \"../jsonSchema\";\nimport {\n arraySchema,\n boundedNonEmptyStringSchema,\n loosePlainObject,\n nonEmptyArraySchema,\n nonEmptyStringSchema,\n plainObjectSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport {\n MAX_DOCUMENT_SYNC_OUTGOING_UPDATES,\n MAX_DOCUMENT_SYNC_PULL_CURSOR_LENGTH,\n MAX_DOCUMENT_SYNC_RESPONSE_PAGE_UPDATES,\n} from \"../util/documentSyncLimits\";\n\nexport const DocumentContentKeyTargetEnvelopeResponseSchema = loosePlainObject({\n containerId: nonEmptyStringSchema,\n containerKeyEpoch: positiveIntegerSchema,\n containerKeyEpochId: nonEmptyStringSchema,\n containerManifestHash: nonEmptyStringSchema,\n wrappedKey: nonEmptyStringSchema,\n wrappingMetadata: plainObjectSchema,\n});\n\nexport type DocumentContentKeyTargetEnvelopeResponse = z.infer<\n typeof DocumentContentKeyTargetEnvelopeResponseSchema\n>;\n\nconst DocumentContentKeyTargetResponseSchema = loosePlainObject({\n containerId: nonEmptyStringSchema,\n containerKeyEpoch: positiveIntegerSchema,\n containerKeyEpochId: nonEmptyStringSchema,\n containerManifestHash: nonEmptyStringSchema,\n});\n\nexport const DocumentKekTargetsResponseSchema = loosePlainObject({\n documentId: z.string(),\n documentKeyTargetHash: nonEmptyStringSchema,\n linkedContainerKeyEpochIds: nonEmptyArraySchema(nonEmptyStringSchema),\n linkedContainerManifestHashes: nonEmptyArraySchema(nonEmptyStringSchema),\n linkSetManifestHash: nonEmptyStringSchema,\n targets: nonEmptyArraySchema(plainObjectSchema),\n});\n\nexport type DocumentKekTargetsResponse = z.infer<\n typeof DocumentKekTargetsResponseSchema\n>;\n\nexport const DocumentContentKeyBundleResponseSchema = loosePlainObject({\n contentKeyEpoch: positiveIntegerSchema,\n documentId: z.string(),\n linkSetManifestHash: nonEmptyStringSchema,\n targetHash: nonEmptyStringSchema,\n targets: nonEmptyArraySchema(DocumentContentKeyTargetEnvelopeResponseSchema),\n});\n\nexport type DocumentContentKeyBundleResponse = z.infer<\n typeof DocumentContentKeyBundleResponseSchema\n>;\n\nexport const DocumentSyncUpdateResponseSchema =\n registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n accessEpoch: positiveIntegerSchema,\n authorizationTargets: nonEmptyArraySchema(\n DocumentContentKeyTargetResponseSchema,\n ),\n authorFingerprint: z.string(),\n checkpointKind: z\n .literal(DOCUMENT_SYNC_ROTATION_CHECKPOINT_KIND)\n .optional(),\n checkpointPayloadKind: z\n .literal(DOCUMENT_SYNC_ROTATION_CHECKPOINT_PAYLOAD_KIND)\n .optional(),\n createdAt: z.string(),\n documentId: z.string(),\n encryptedData: z.string(),\n id: z.string(),\n partialEndVersionVector: z.string(),\n partialStartVersionVector: z.string(),\n plaintextHash: nonEmptyStringSchema,\n sourceVersionVector: z.string().min(1).optional(),\n writeHeader: plainObjectSchema,\n }).superRefine((update, context) => {\n if (classifyDocumentSyncCheckpointFields(update) === \"invalid\") {\n context.addIssue({\n code: \"custom\",\n message: DOCUMENT_SYNC_CHECKPOINT_FIELD_SET_ISSUE_MESSAGE,\n });\n }\n }),\n [documentSyncResponseRotationRefinement],\n );\n\nexport type DocumentSyncUpdateResponse = z.infer<\n typeof DocumentSyncUpdateResponseSchema\n>;\n\nexport const DocumentSyncPullPageResponseSchema = loosePlainObject({\n hasMore: z.boolean(),\n nextCursor: boundedNonEmptyStringSchema(\n MAX_DOCUMENT_SYNC_PULL_CURSOR_LENGTH,\n ).nullable(),\n});\n\nexport type DocumentSyncPullPageResponse = z.infer<\n typeof DocumentSyncPullPageResponseSchema\n>;\n\nfunction contentKeyEpochOf(bundle: unknown): number | null {\n if (typeof bundle !== \"object\" || bundle === null) return null;\n const contentKeyEpoch: unknown = Reflect.get(bundle, \"contentKeyEpoch\");\n return typeof contentKeyEpoch === \"number\" ? contentKeyEpoch : null;\n}\n\n/**\n * The current epoch's bundle travels only as `contentKeyBundle`, so the array\n * holds the distinct older epochs that served updates cite. Field issues do not\n * stop this object refinement, so it judges only epochs that parsed.\n */\nfunction addHistoricalContentKeyBundleIssues(\n response: {\n readonly contentKeyBundle: unknown;\n readonly contentKeyBundles: unknown;\n },\n context: z.RefinementCtx,\n): void {\n const currentEpoch = contentKeyEpochOf(response.contentKeyBundle);\n if (currentEpoch === null || !Array.isArray(response.contentKeyBundles)) {\n return;\n }\n const seenEpochs = new Set<number>();\n // forEach skips holes exactly as arraySchema's item validation does.\n response.contentKeyBundles.forEach((bundle: unknown, index: number) => {\n const contentKeyEpoch = contentKeyEpochOf(bundle);\n if (contentKeyEpoch === null) return;\n if (contentKeyEpoch >= currentEpoch || seenEpochs.has(contentKeyEpoch)) {\n context.addIssue({\n code: \"custom\",\n message:\n \"content-key bundles must be distinct epochs older than contentKeyBundle\",\n path: [\"contentKeyBundles\", index, \"contentKeyEpoch\"],\n });\n }\n seenEpochs.add(contentKeyEpoch);\n });\n}\n\nexport const commitLsnResponseShape = {\n commitLsn: z.string().nullable(),\n commitLsnMode: z.union([z.literal(\"tracked\"), z.literal(\"untracked\")]),\n};\n\n/** The 0/0 sentinel and the untracked mode imply each other. */\nfunction addCommitLsnIssues(\n response: {\n readonly commitLsn: string | null;\n readonly commitLsnMode: \"tracked\" | \"untracked\";\n },\n context: z.RefinementCtx,\n): void {\n if (response.commitLsnMode === \"untracked\" && response.commitLsn !== \"0/0\") {\n context.addIssue({\n code: \"custom\",\n message: \"untracked commit LSN must use the 0/0 sentinel\",\n path: [\"commitLsn\"],\n });\n }\n if (response.commitLsn === \"0/0\" && response.commitLsnMode !== \"untracked\") {\n context.addIssue({\n code: \"custom\",\n message: \"0/0 commit LSN must be declared untracked\",\n path: [\"commitLsnMode\"],\n });\n }\n}\n\nexport const DocumentSyncResponseSchema = registerJsonSchemaRuntimeRefinements(\n loosePlainObject({\n acceptedOutgoingUpdateIds: arraySchema(\n z.string(),\n MAX_DOCUMENT_SYNC_OUTGOING_UPDATES,\n ),\n ...commitLsnResponseShape,\n contentKeyBundle: DocumentContentKeyBundleResponseSchema,\n contentKeyBundles: arraySchema(DocumentContentKeyBundleResponseSchema),\n documentId: z.string(),\n documentKekTargets: DocumentKekTargetsResponseSchema,\n pullPage: DocumentSyncPullPageResponseSchema,\n updates: arraySchema(\n DocumentSyncUpdateResponseSchema,\n MAX_DOCUMENT_SYNC_RESPONSE_PAGE_UPDATES,\n ),\n }).superRefine((response, context) => {\n if (\n response.pullPage !== undefined &&\n response.pullPage.hasMore !== (response.pullPage.nextCursor !== null)\n ) {\n context.addIssue({\n code: \"custom\",\n message: \"pull page continuation does not match hasMore\",\n path: [\"pullPage\", \"nextCursor\"],\n });\n }\n addCommitLsnIssues(response, context);\n addHistoricalContentKeyBundleIssues(response, context);\n }),\n [\n documentSyncResponseCommitLsnModeRefinement,\n documentSyncResponseCommitLsnSentinelRefinement,\n documentSyncResponsePullPageRefinement,\n documentSyncResponseHistoricalBundlesRefinement,\n ],\n);\n\nexport type DocumentSyncResponse = z.infer<typeof DocumentSyncResponseSchema>;\n"]}
|
|
@@ -12,7 +12,7 @@ export { CONTAINER_NOT_FOUND_ERROR_CODE, type ContainerNotFoundErrorResponse, Co
|
|
|
12
12
|
export { isListContainerParentLanesResponse, type ListContainerParentLanesResponse, ListContainerParentLanesResponseSchema, } from "./containerParentLanes.js";
|
|
13
13
|
export { CONTAINER_UNAVAILABLE_ERROR_CODE, type ContainerUnavailableErrorCode, } from "./containerUnavailableError.js";
|
|
14
14
|
export { type ContainerDocumentSummary, ContainerDocumentSummaryResponseSchema, type ContainerDocumentSyncTombstone, ContainerDocumentSyncTombstoneResponseSchema, type DocumentEditAttributionRangeResponse, DocumentEditAttributionRangeResponseSchema, type DocumentEditAttributionResponse, DocumentEditAttributionResponseSchema, type DocumentEditAttributionSegmentResponse, DocumentEditAttributionSegmentResponseSchema, isDocumentEditAttributionResponse, isListDocumentEditAttributionRangesResponse, type ListContainerDocumentsResponse, ListContainerDocumentsResponseSchema, type ListDocumentEditAttributionRangesResponse, ListDocumentEditAttributionRangesResponseSchema, } from "./document.js";
|
|
15
|
-
export { type DocumentContentKeyBundleResponse, DocumentContentKeyBundleResponseSchema, type DocumentContentKeyTargetEnvelopeResponse, DocumentContentKeyTargetEnvelopeResponseSchema, type DocumentCreateResponse, DocumentCreateResponseSchema, type DocumentKekTargetsResponse, DocumentKekTargetsResponseSchema, type DocumentLinkSetMutationResponse, DocumentLinkSetMutationResponseSchema, type DocumentPurgeProofResponse, DocumentPurgeProofResponseSchema, type DocumentPurgeResponse, DocumentPurgeResponseSchema, type DocumentSyncPullPageResponse, DocumentSyncPullPageResponseSchema, type DocumentSyncResponse, DocumentSyncResponseSchema, type DocumentSyncUpdateResponse, DocumentSyncUpdateResponseSchema, type DocumentWriterProjectionResponse, DocumentWriterProjectionResponseSchema, type DocumentWriterProjectionWireResponse, DocumentWriterProjectionWireResponseSchema, documentKekTargetsFromContentKeyBundle, isDocumentContentKeyBundleResponse, isDocumentCreateResponse, isDocumentKekTargetsResponse, isDocumentLinkSetMutationResponse, isDocumentPurgeProofResponse, isDocumentPurgeResponse, isDocumentSyncResponse, isDocumentWriterProjectionResponse, isDocumentWriterProjectionWireResponse, } from "./documentMutation.js";
|
|
15
|
+
export { type DocumentContentKeyBundleResponse, DocumentContentKeyBundleResponseSchema, type DocumentContentKeyTargetEnvelopeResponse, DocumentContentKeyTargetEnvelopeResponseSchema, type DocumentCreateResponse, DocumentCreateResponseSchema, type DocumentCreateSeedResponse, type DocumentKekTargetsResponse, DocumentKekTargetsResponseSchema, type DocumentLinkSetMutationResponse, DocumentLinkSetMutationResponseSchema, type DocumentPurgeProofResponse, DocumentPurgeProofResponseSchema, type DocumentPurgeResponse, DocumentPurgeResponseSchema, type DocumentSyncPullPageResponse, DocumentSyncPullPageResponseSchema, type DocumentSyncResponse, DocumentSyncResponseSchema, type DocumentSyncUpdateResponse, DocumentSyncUpdateResponseSchema, type DocumentWriterProjectionResponse, DocumentWriterProjectionResponseSchema, type DocumentWriterProjectionWireResponse, DocumentWriterProjectionWireResponseSchema, documentKekTargetsFromContentKeyBundle, isDocumentContentKeyBundleResponse, isDocumentCreateResponse, isDocumentKekTargetsResponse, isDocumentLinkSetMutationResponse, isDocumentPurgeProofResponse, isDocumentPurgeResponse, isDocumentSyncResponse, isDocumentWriterProjectionResponse, isDocumentWriterProjectionWireResponse, } from "./documentMutation.js";
|
|
16
16
|
export { DOCUMENT_MUTATION_ERROR_CODES, DocumentMutationBehaviorErrorCodeSchema, type DocumentMutationErrorCode, DocumentMutationErrorCodeSchema, type DocumentMutationFailureResponse, DocumentMutationFailureResponseSchema, } from "./documentMutationError.js";
|
|
17
17
|
export { DOCUMENT_NOT_FOUND_ERROR_CODE, DOCUMENT_PROJECTION_ERROR_CODES, DOCUMENT_SYNC_ERROR_CODES, type DocumentNotFoundErrorCode, type DocumentNotFoundErrorResponse, DocumentNotFoundErrorResponseSchema, type DocumentProjectionErrorCode, DocumentProjectionErrorCodeSchema, type DocumentSyncErrorCode, DocumentSyncErrorCodeSchema, type DocumentSyncErrorResponse, DocumentSyncErrorResponseSchema, type DocumentSyncStateStaleErrorResponse, DocumentSyncStateStaleErrorResponseSchema, type DocumentWriterProjectionErrorResponse, DocumentWriterProjectionErrorResponseSchema, isDocumentSyncErrorCode, isDocumentSyncErrorResponse, isDocumentSyncStateStaleErrorResponse, } from "./documentSyncError.js";
|
|
18
18
|
export { type ErrorResponse, ErrorResponseSchema, isErrorResponse, } from "./error.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kCAAkC,GACnC,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,4BAA4B,EAE5B,uBAAuB,EAEvB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EAEzB,0BAA0B,EAC1B,mBAAmB,EAEnB,sBAAsB,EAEtB,4BAA4B,EAE5B,0BAA0B,EAE1B,yBAAyB,EAEzB,2BAA2B,EAG3B,2BAA2B,EAE3B,6BAA6B,GAC9B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EAEvB,+BAA+B,EAE/B,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OA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BAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EAEf,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC","sourcesContent":["export {\n type AccessManifestBundleWireResponse,\n isAccessManifestBundleWireResponse,\n} from \"../util\";\nexport {\n type EffectiveAccessLevel,\n EffectiveAccessLevelSchema,\n isEffectiveAccessLevel,\n} from \"./accessLevel\";\nexport {\n type ChallengeErrorResponse,\n ChallengeErrorResponseSchema,\n type ChallengeResponse,\n ChallengeResponseSchema,\n type DestroySessionResponse,\n DestroySessionResponseSchema,\n isChallengeErrorResponse,\n isChallengeResponse,\n isDestroySessionResponse,\n isListSessionsResponse,\n isSessionRefreshRequiredFailure,\n isUserIdentityResponse,\n isUserSessionResponse,\n isVerifyResponse,\n isWebSocketTicketResponse,\n type ListSessionsResponse,\n ListSessionsResponseSchema,\n SESSION_ERROR_CODES,\n type SessionErrorCode,\n SessionErrorCodeSchema,\n type SessionFailureResponse,\n SessionFailureResponseSchema,\n type UserIdentityResponse,\n UserIdentityResponseSchema,\n type UserSessionResponse,\n UserSessionResponseSchema,\n type VerifyFailureResponse,\n VerifyFailureResponseSchema,\n type VerifyResponse,\n type VerifySuccessResponse,\n VerifySuccessResponseSchema,\n type WebSocketTicketResponse,\n WebSocketTicketResponseSchema,\n} from \"./auth\";\nexport {\n isRevenueCatWebhookResponse,\n isStripeWebhookResponse,\n type RevenueCatWebhookResponse,\n RevenueCatWebhookResponseSchema,\n type StripeWebhookResponse,\n StripeWebhookResponseSchema,\n} from \"./billingWebhooks\";\nexport {\n type BlobAttachmentBindResponse,\n BlobAttachmentBindResponseSchema,\n type BlobAttachmentDetachResponse,\n BlobAttachmentDetachResponseSchema,\n type BlobAttachmentSummary,\n BlobAttachmentSummarySchema,\n type BlobContentKeyBundleResponse,\n BlobContentKeyBundleResponseSchema,\n type BlobContentKeyTargetEnvelopeResponse,\n BlobContentKeyTargetEnvelopeResponseSchema,\n type BlobKekTargetsResponse,\n BlobKekTargetsResponseSchema,\n type InitiateMultipartBlobStageResponse,\n InitiateMultipartBlobStageResponseSchema,\n isBlobAttachmentBindResponse,\n isBlobAttachmentDetachResponse,\n isInitiateMultipartBlobStageResponse,\n isListDocumentAttachmentsResponse,\n isMultipartBlobStageStatusResponse,\n isUploadMultipartBlobPartResponse,\n type ListDocumentAttachmentsResponse,\n ListDocumentAttachmentsResponseSchema,\n type MultipartBlobStagePart,\n MultipartBlobStagePartSchema,\n type MultipartBlobStageStatusResponse,\n MultipartBlobStageStatusResponseSchema,\n type UploadMultipartBlobPartResponse,\n UploadMultipartBlobPartResponseSchema,\n} from \"./blob\";\nexport {\n BLOB_MUTATION_ERROR_CODES,\n type BlobMutationErrorCode,\n type BlobMutationFailureResponse,\n BlobMutationFailureResponseSchema,\n} from \"./blobMutationError\";\nexport {\n CONTAINER_PROJECTION_STATE_INVALID_ERROR_CODE,\n type ContainerDeleteResponse,\n ContainerDeleteResponseSchema,\n type ContainerKekKeyringWireResponse,\n type ContainerKekLogEpochResponse,\n ContainerKekLogEpochResponseSchema,\n type ContainerKekLogResponse,\n ContainerKekLogResponseSchema,\n type ContainerKekResponse,\n type ContainerKeyingPathResponse,\n ContainerKeyingPathResponseSchema,\n type ContainerMutationResponse,\n ContainerMutationResponseSchema,\n type ContainerReciteResponse,\n ContainerReciteResponseSchema,\n type ContainerRotationResponse,\n ContainerRotationResponseSchema,\n type ContainerSummary,\n ContainerSummaryResponseSchema,\n type ContainerSyncTombstone,\n ContainerSyncTombstoneResponseSchema,\n ContainerWriterProjectionErrorResponseSchema,\n type ContainerWriterProjectionResponse,\n ContainerWriterProjectionResponseSchema,\n type ContainerWriterProjectionWireResponse,\n ContainerWriterProjectionWireResponseSchema,\n isContainerDeleteResponse,\n isContainerKekLogResponse,\n isContainerMutationResponse,\n isContainerReciteResponse,\n isContainerRotationResponse,\n isContainerWriterProjectionResponse,\n isContainerWriterProjectionWireResponse,\n isListContainersResponse,\n type ListContainersResponse,\n ListContainersResponseSchema,\n} from \"./container\";\nexport type { ListContainerDocumentLanesResponse } from \"./containerDocumentLanes\";\nexport {\n type ContainerCreateWithMetadataDocumentResponse,\n ContainerCreateWithMetadataDocumentResponseSchema,\n isContainerCreateWithMetadataDocumentResponse,\n} from \"./containerMetadata\";\nexport {\n CONTAINER_MUTATION_ERROR_CODES,\n ContainerMutationBehaviorErrorCodeSchema,\n type ContainerMutationErrorCode,\n ContainerMutationErrorCodeSchema,\n type ContainerMutationFailureResponse,\n ContainerMutationFailureResponseSchema,\n} from \"./containerMutationError\";\nexport {\n CONTAINER_NOT_FOUND_ERROR_CODE,\n type ContainerNotFoundErrorResponse,\n ContainerNotFoundErrorResponseSchema,\n} from \"./containerNotFoundError\";\nexport {\n isListContainerParentLanesResponse,\n type ListContainerParentLanesResponse,\n ListContainerParentLanesResponseSchema,\n} from \"./containerParentLanes\";\nexport {\n CONTAINER_UNAVAILABLE_ERROR_CODE,\n type ContainerUnavailableErrorCode,\n} from \"./containerUnavailableError\";\nexport {\n type ContainerDocumentSummary,\n ContainerDocumentSummaryResponseSchema,\n type ContainerDocumentSyncTombstone,\n ContainerDocumentSyncTombstoneResponseSchema,\n type DocumentEditAttributionRangeResponse,\n DocumentEditAttributionRangeResponseSchema,\n type DocumentEditAttributionResponse,\n DocumentEditAttributionResponseSchema,\n type DocumentEditAttributionSegmentResponse,\n DocumentEditAttributionSegmentResponseSchema,\n isDocumentEditAttributionResponse,\n isListDocumentEditAttributionRangesResponse,\n type ListContainerDocumentsResponse,\n ListContainerDocumentsResponseSchema,\n type ListDocumentEditAttributionRangesResponse,\n ListDocumentEditAttributionRangesResponseSchema,\n} from \"./document\";\nexport {\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentContentKeyTargetEnvelopeResponse,\n DocumentContentKeyTargetEnvelopeResponseSchema,\n type DocumentCreateResponse,\n DocumentCreateResponseSchema,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentLinkSetMutationResponse,\n DocumentLinkSetMutationResponseSchema,\n type DocumentPurgeProofResponse,\n DocumentPurgeProofResponseSchema,\n type DocumentPurgeResponse,\n DocumentPurgeResponseSchema,\n type DocumentSyncPullPageResponse,\n DocumentSyncPullPageResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n type DocumentSyncUpdateResponse,\n DocumentSyncUpdateResponseSchema,\n type DocumentWriterProjectionResponse,\n DocumentWriterProjectionResponseSchema,\n type DocumentWriterProjectionWireResponse,\n DocumentWriterProjectionWireResponseSchema,\n documentKekTargetsFromContentKeyBundle,\n isDocumentContentKeyBundleResponse,\n isDocumentCreateResponse,\n isDocumentKekTargetsResponse,\n isDocumentLinkSetMutationResponse,\n isDocumentPurgeProofResponse,\n isDocumentPurgeResponse,\n isDocumentSyncResponse,\n isDocumentWriterProjectionResponse,\n isDocumentWriterProjectionWireResponse,\n} from \"./documentMutation\";\nexport {\n DOCUMENT_MUTATION_ERROR_CODES,\n DocumentMutationBehaviorErrorCodeSchema,\n type DocumentMutationErrorCode,\n DocumentMutationErrorCodeSchema,\n type DocumentMutationFailureResponse,\n DocumentMutationFailureResponseSchema,\n} from \"./documentMutationError\";\nexport {\n DOCUMENT_NOT_FOUND_ERROR_CODE,\n DOCUMENT_PROJECTION_ERROR_CODES,\n DOCUMENT_SYNC_ERROR_CODES,\n type DocumentNotFoundErrorCode,\n type DocumentNotFoundErrorResponse,\n DocumentNotFoundErrorResponseSchema,\n type DocumentProjectionErrorCode,\n DocumentProjectionErrorCodeSchema,\n type DocumentSyncErrorCode,\n DocumentSyncErrorCodeSchema,\n type DocumentSyncErrorResponse,\n DocumentSyncErrorResponseSchema,\n type DocumentSyncStateStaleErrorResponse,\n DocumentSyncStateStaleErrorResponseSchema,\n type DocumentWriterProjectionErrorResponse,\n DocumentWriterProjectionErrorResponseSchema,\n isDocumentSyncErrorCode,\n isDocumentSyncErrorResponse,\n isDocumentSyncStateStaleErrorResponse,\n} from \"./documentSyncError\";\nexport {\n type ErrorResponse,\n ErrorResponseSchema,\n isErrorResponse,\n} from \"./error\";\nexport {\n type HealthResponse,\n HealthResponseSchema,\n isHealthResponse,\n} from \"./health\";\nexport {\n MULTIPART_BLOB_STAGE_ERROR_CODES,\n type MultipartBlobStageConflictErrorResponse,\n MultipartBlobStageConflictErrorResponseSchema,\n type MultipartBlobStageErrorCode,\n type MultipartBlobStageExpiredErrorResponse,\n MultipartBlobStageExpiredErrorResponseSchema,\n type MultipartBlobStageNotFoundErrorResponse,\n MultipartBlobStageNotFoundErrorResponseSchema,\n} from \"./multipartBlobStageError\";\nexport {\n type CreateOrganizationGroupResponse,\n CreateOrganizationGroupResponseSchema,\n type DeleteOrganizationGroupResponse,\n DeleteOrganizationGroupResponseSchema,\n isCreateOrganizationGroupResponse,\n isDeleteOrganizationGroupResponse,\n isListOrganizationGroupsResponse,\n isOrganizationContainerGrantResponse,\n isOrganizationContainerGrantSubjectType,\n isOrganizationContainerGrantsResponse,\n isOrganizationDirectoryResponse,\n isOrganizationDirectoryUserResponse,\n isOrganizationGroupContainerAccessLevel,\n isOrganizationGroupContainerResponse,\n isOrganizationGroupContainersResponse,\n isOrganizationGroupCurrentStateResponse,\n isOrganizationGroupMemberResponse,\n isOrganizationGroupMembersResponse,\n isOrganizationGroupSummaryResponse,\n isOrganizationProfileResponse,\n isOrganizationUserDetailGrantsResponse,\n isOrganizationUserDetailResponse,\n type ListOrganizationGroupsResponse,\n ListOrganizationGroupsResponseSchema,\n type OrganizationContainerGrantResponse,\n OrganizationContainerGrantResponseSchema,\n type OrganizationContainerGrantSubjectType,\n type OrganizationContainerGrantsResponse,\n OrganizationContainerGrantsResponseSchema,\n type OrganizationDirectoryResponse,\n OrganizationDirectoryResponseSchema,\n type OrganizationDirectoryUserResponse,\n OrganizationDirectoryUserResponseSchema,\n type OrganizationGroupContainerAccessLevel,\n type OrganizationGroupContainerResponse,\n OrganizationGroupContainerResponseSchema,\n type OrganizationGroupContainersResponse,\n OrganizationGroupContainersResponseSchema,\n type OrganizationGroupCurrentStateResponse,\n OrganizationGroupCurrentStateResponseSchema,\n type OrganizationGroupMemberResponse,\n OrganizationGroupMemberResponseSchema,\n type OrganizationGroupMembersResponse,\n OrganizationGroupMembersResponseSchema,\n type OrganizationGroupSummaryResponse,\n OrganizationGroupSummaryResponseSchema,\n type OrganizationProfileResponse,\n OrganizationProfileResponseSchema,\n type OrganizationRole,\n type OrganizationRosterStatus,\n type OrganizationUserDetailGrantsResponse,\n OrganizationUserDetailGrantsResponseSchema,\n type OrganizationUserDetailResponse,\n OrganizationUserDetailResponseSchema,\n} from \"./organization\";\nexport {\n type BillingErrorResponse,\n BillingErrorResponseSchema,\n isOrganizationBillingProvider,\n isOrganizationBillingResponse,\n isOrganizationBillingStatus,\n isPaymentRequiredErrorResponse,\n type OrganizationBillingProvider,\n OrganizationBillingProviderSchema,\n type OrganizationBillingResponse,\n OrganizationBillingResponseSchema,\n type OrganizationBillingStatus,\n OrganizationBillingStatusSchema,\n type OrganizationBillingSubscriptionSource,\n OrganizationBillingSubscriptionSourceSchema,\n type PaymentRequiredErrorResponse,\n PaymentRequiredErrorResponseSchema,\n} from \"./organizationBilling\";\nexport {\n isOrganizationBillingHistoryResponse,\n type OrganizationBillingHistoryCategory,\n OrganizationBillingHistoryCategorySchema,\n type OrganizationBillingHistoryEntry,\n OrganizationBillingHistoryEntrySchema,\n type OrganizationBillingHistoryEnvironment,\n OrganizationBillingHistoryEnvironmentSchema,\n type OrganizationBillingHistoryOutcome,\n OrganizationBillingHistoryOutcomeSchema,\n type OrganizationBillingHistoryProvider,\n OrganizationBillingHistoryProviderSchema,\n type OrganizationBillingHistoryResponse,\n OrganizationBillingHistoryResponseSchema,\n} from \"./organizationBillingHistory\";\nexport {\n isOrganizationBillingManagementUrlResponse,\n type OrganizationBillingManagementUrlResponse,\n OrganizationBillingManagementUrlResponseSchema,\n} from \"./organizationBillingManagementUrl\";\nexport {\n isOrganizationDataUsageResponse,\n ORGANIZATION_DOCUMENT_USAGE_CATEGORIES,\n type OrganizationBlobDataUsageResponse,\n type OrganizationDataUsageResponse,\n OrganizationDataUsageResponseSchema,\n type OrganizationDocumentDataUsageResponse,\n type OrganizationDocumentUsageCategory,\n type OrganizationDocumentUsageCategoryBreakdown,\n} from \"./organizationDataUsage\";\nexport {\n isOrganizationNativePurchaseEligibilityResponse,\n type OrganizationNativePurchaseEligibilityResponse,\n OrganizationNativePurchaseEligibilityResponseSchema,\n type OrganizationNativePurchaseIneligibilityReason,\n OrganizationNativePurchaseIneligibilityReasonSchema,\n} from \"./organizationNativePurchaseEligibility\";\nexport {\n type OrganizationPolicyHistoryResponse,\n OrganizationPolicyHistoryResponseSchema,\n PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE,\n} from \"./organizationPolicyHistory\";\nexport {\n ORGANIZATION_PRESENTATION_ERROR_CODES,\n type OrganizationPresentationErrorCode,\n OrganizationPresentationErrorCodeSchema,\n type OrganizationPresentationFailureResponse,\n OrganizationPresentationFailureResponseSchema,\n} from \"./organizationPresentationError\";\nexport {\n type CreateOrganizationResponse,\n CreateOrganizationResponseSchema,\n isCreateOrganizationResponse,\n isOrganizationProvisioningResponse,\n type OrganizationProvisioningResponse,\n OrganizationProvisioningResponseSchema,\n} from \"./organizationProvisioning\";\nexport {\n isOrganizationReadModelResponse,\n type OrganizationReadModelDeltaResponse,\n type OrganizationReadModelDirectoryResponse,\n type OrganizationReadModelGrantsResponse,\n type OrganizationReadModelGroupMemberResponse,\n type OrganizationReadModelGroupMembershipResponse,\n type OrganizationReadModelGroupMembershipsResponse,\n type OrganizationReadModelOrganizationPolicyResponse,\n type OrganizationReadModelResponse,\n OrganizationReadModelResponseSchema,\n type OrganizationReadModelSnapshotResponse,\n} from \"./organizationReadModel\";\nexport {\n ORGANIZATION_READ_MODEL_ERROR_CODES,\n type OrganizationReadModelErrorCode,\n OrganizationReadModelErrorCodeSchema,\n type OrganizationReadModelFailureResponse,\n OrganizationReadModelFailureResponseSchema,\n} from \"./organizationReadModelError\";\nexport {\n CommitOrganizationGroupPolicyConflictResponseSchema,\n type CommitOrganizationGroupPolicyResponse,\n CommitOrganizationGroupPolicyResponseSchema,\n type CurrentPrincipalMemberEnvelopesResponse,\n CurrentPrincipalMemberEnvelopesResponseSchema,\n isCommitOrganizationGroupPolicyResponse,\n isCurrentPrincipalMemberEnvelopesResponse,\n isPrincipalPolicyBundleResponse,\n isPrincipalPolicyMutationResponse,\n isPrincipalPolicyStaleErrorResponse,\n isPrincipalPolicyStateChainEntryResponse,\n isPrincipalStatePayloadResponse,\n isPrincipalStateResponse,\n type PrincipalContainerGrantResponse,\n PrincipalContainerGrantResponseSchema,\n type PrincipalMemberEnvelopeResponse,\n PrincipalMemberEnvelopeResponseSchema,\n type PrincipalPolicyBundleResponse,\n PrincipalPolicyBundleResponseSchema,\n type PrincipalPolicyErrorResponse,\n PrincipalPolicyErrorResponseSchema,\n type PrincipalPolicyMutationResponse,\n PrincipalPolicyMutationResponseSchema,\n type PrincipalPolicySnapshotResponse,\n PrincipalPolicySnapshotResponseSchema,\n type PrincipalPolicyStaleErrorResponse,\n PrincipalPolicyStaleErrorResponseSchema,\n type PrincipalPolicyStateChainEntryResponse,\n PrincipalPolicyStateChainEntryResponseSchema,\n type PrincipalProjectionMemberResponse,\n PrincipalProjectionMemberResponseSchema,\n type PrincipalStateExternalAuthorityResponse,\n PrincipalStateExternalAuthorityResponseSchema,\n type PrincipalStatePayloadResponse,\n PrincipalStatePayloadResponseSchema,\n type PrincipalStateResponse,\n PrincipalStateResponseSchema,\n} from \"./principal\";\nexport {\n isPrincipalPolicyPageResponse,\n type PrincipalPolicyPageResponse,\n PrincipalPolicyPageResponseSchema,\n} from \"./principalPolicyPage\";\nexport {\n isPrincipalPolicySnapshotPageResponse,\n type PrincipalPolicyHistorySourceResponse,\n PrincipalPolicyHistorySourceResponseSchema,\n type PrincipalPolicySnapshotPageResponse,\n PrincipalPolicySnapshotPageResponseSchema,\n} from \"./principalPolicySnapshotPage\";\nexport {\n isReferencedPrincipalStateResponse,\n type ReferencedPrincipalStateResponse,\n ReferencedPrincipalStateResponseSchema,\n} from \"./principalReference\";\nexport {\n type ProjectionPolicyEvidenceResponse,\n ProjectionPolicyEvidenceResponseSchema,\n} from \"./projectionPolicyEvidence\";\nexport {\n isRegistrationResponse,\n type RegistrationResponse,\n RegistrationResponseSchema,\n} from \"./registration\";\nexport {\n isRootIdentitiesResponse,\n isRootIdentityDetailResponse,\n isRootIdentityOrganizationsResponse,\n type RootIdentitiesResponse,\n RootIdentitiesResponseSchema,\n type RootIdentityDetailResponse,\n RootIdentityDetailResponseSchema,\n type RootIdentityOrganizationBillingResponse,\n RootIdentityOrganizationBillingResponseSchema,\n type RootIdentityOrganizationResponse,\n RootIdentityOrganizationResponseSchema,\n type RootIdentityOrganizationsResponse,\n RootIdentityOrganizationsResponseSchema,\n type RootIdentitySessionResponse,\n RootIdentitySessionResponseSchema,\n type RootIdentitySummaryResponse,\n RootIdentitySummaryResponseSchema,\n} from \"./root\";\nexport {\n type RootDataUsageReportResponse,\n RootDataUsageReportResponseSchema,\n type RootOrganizationDetailResponse,\n RootOrganizationDetailResponseSchema,\n type RootOrganizationIdentitiesResponse,\n RootOrganizationIdentitiesResponseSchema,\n type RootOrganizationIdentityResponse,\n RootOrganizationIdentityResponseSchema,\n type RootOrganizationSummaryResponse,\n RootOrganizationSummaryResponseSchema,\n type RootOrganizationsResponse,\n RootOrganizationsResponseSchema,\n} from \"./rootOrganizations\";\nexport {\n isStripeCancelResponse,\n isStripeCheckoutIntentResponse,\n isStripeCheckoutOptionsResponse,\n isStripeCheckoutSessionResponse,\n isStripePortalResponse,\n type StripeCancelResponse,\n StripeCancelResponseSchema,\n type StripeCheckoutIntentResponse,\n StripeCheckoutIntentResponseSchema,\n type StripeCheckoutOptionsResponse,\n StripeCheckoutOptionsResponseSchema,\n type StripeCheckoutSessionResponse,\n StripeCheckoutSessionResponseSchema,\n type StripePortalResponse,\n StripePortalResponseSchema,\n type StripeSyncOptionResponse,\n StripeSyncOptionResponseSchema,\n} from \"./stripeCheckout\";\nexport {\n isSyncWatermark,\n type SyncWatermark,\n SyncWatermarkSchema,\n} from \"./syncWatermark\";\nexport {\n decodeContainerWriterProjection,\n decodeDocumentWriterProjection,\n encodeContainerWriterProjection,\n encodeDocumentWriterProjection,\n} from \"./writerProjectionWire\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,kCAAkC,GACnC,MAAM,SAAS,CAAC;AACjB,OAAO,EAEL,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,OAAO,EAEL,4BAA4B,EAE5B,uBAAuB,EAEvB,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,+BAA+B,EAC/B,sBAAsB,EACtB,qBAAqB,EACrB,gBAAgB,EAChB,yBAAyB,EAEzB,0BAA0B,EAC1B,mBAAmB,EAEnB,sBAAsB,EAEtB,4BAA4B,EAE5B,0BAA0B,EAE1B,yBAAyB,EAEzB,2BAA2B,EAG3B,2BAA2B,EAE3B,6BAA6B,GAC9B,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,2BAA2B,EAC3B,uBAAuB,EAEvB,+BAA+B,EAE/B,2BAA2B,GAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAEL,gCAAgC,EAEhC,kCAAkC,EAElC,2BAA2B,EAE3B,kCAAkC,EAElC,0CAA0C,EAE1C,4BAA4B,EAE5B,wCAAwC,EACxC,4BAA4B,EAC5B,8BAA8B,EAC9B,oCAAoC,EACpC,iCAAiC,EACjC,kCAAkC,EAClC,iCAAiC,EAEjC,qCAAqC,EAErC,4BAA4B,EAE5B,sCAAsC,EAEtC,qCAAqC,GACtC,MAAM,QAAQ,CAAC;AA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C,EAE5C,uCAAuC,EAEvC,6CAA6C,EAE7C,mCAAmC,EAEnC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,6BAA6B,EAE7B,iCAAiC,GAClC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qCAAqC,EAErC,0CAA0C,EAE1C,yCAAyC,GAC1C,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kCAAkC,EAElC,sCAAsC,GACvC,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAEL,sCAAsC,GACvC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EAEtB,0BAA0B,GAC3B,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,wBAAwB,EACxB,4BAA4B,EAC5B,mCAAmC,EAEnC,4BAA4B,EAE5B,gCAAgC,EAEhC,6CAA6C,EAE7C,sCAAsC,EAEtC,uCAAuC,EAEvC,iCAAiC,EAEjC,iCAAiC,GAClC,MAAM,QAAQ,CAAC;AAChB,OAAO,EAEL,iCAAiC,EAEjC,oCAAoC,EAEpC,wCAAwC,EAExC,sCAAsC,EAEtC,qCAAqC,EAErC,+BAA+B,GAChC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,sBAAsB,EACtB,8BAA8B,EAC9B,+BAA+B,EAC/B,+BAA+B,EAC/B,sBAAsB,EAEtB,0BAA0B,EAE1B,kCAAkC,EAElC,mCAAmC,EAEnC,mCAAmC,EAEnC,0BAA0B,EAE1B,8BAA8B,GAC/B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,eAAe,EAEf,mBAAmB,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,+BAA+B,EAC/B,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,GAC/B,MAAM,wBAAwB,CAAC","sourcesContent":["export {\n type AccessManifestBundleWireResponse,\n isAccessManifestBundleWireResponse,\n} from \"../util\";\nexport {\n type EffectiveAccessLevel,\n EffectiveAccessLevelSchema,\n isEffectiveAccessLevel,\n} from \"./accessLevel\";\nexport {\n type ChallengeErrorResponse,\n ChallengeErrorResponseSchema,\n type ChallengeResponse,\n ChallengeResponseSchema,\n type DestroySessionResponse,\n DestroySessionResponseSchema,\n isChallengeErrorResponse,\n isChallengeResponse,\n isDestroySessionResponse,\n isListSessionsResponse,\n isSessionRefreshRequiredFailure,\n isUserIdentityResponse,\n isUserSessionResponse,\n isVerifyResponse,\n isWebSocketTicketResponse,\n type ListSessionsResponse,\n ListSessionsResponseSchema,\n SESSION_ERROR_CODES,\n type SessionErrorCode,\n SessionErrorCodeSchema,\n type SessionFailureResponse,\n SessionFailureResponseSchema,\n type UserIdentityResponse,\n UserIdentityResponseSchema,\n type UserSessionResponse,\n UserSessionResponseSchema,\n type VerifyFailureResponse,\n VerifyFailureResponseSchema,\n type VerifyResponse,\n type VerifySuccessResponse,\n VerifySuccessResponseSchema,\n type WebSocketTicketResponse,\n WebSocketTicketResponseSchema,\n} from \"./auth\";\nexport {\n isRevenueCatWebhookResponse,\n isStripeWebhookResponse,\n type RevenueCatWebhookResponse,\n RevenueCatWebhookResponseSchema,\n type StripeWebhookResponse,\n StripeWebhookResponseSchema,\n} from \"./billingWebhooks\";\nexport {\n type BlobAttachmentBindResponse,\n BlobAttachmentBindResponseSchema,\n type BlobAttachmentDetachResponse,\n BlobAttachmentDetachResponseSchema,\n type BlobAttachmentSummary,\n BlobAttachmentSummarySchema,\n type BlobContentKeyBundleResponse,\n BlobContentKeyBundleResponseSchema,\n type BlobContentKeyTargetEnvelopeResponse,\n BlobContentKeyTargetEnvelopeResponseSchema,\n type BlobKekTargetsResponse,\n BlobKekTargetsResponseSchema,\n type InitiateMultipartBlobStageResponse,\n InitiateMultipartBlobStageResponseSchema,\n isBlobAttachmentBindResponse,\n isBlobAttachmentDetachResponse,\n isInitiateMultipartBlobStageResponse,\n isListDocumentAttachmentsResponse,\n isMultipartBlobStageStatusResponse,\n isUploadMultipartBlobPartResponse,\n type ListDocumentAttachmentsResponse,\n ListDocumentAttachmentsResponseSchema,\n type MultipartBlobStagePart,\n MultipartBlobStagePartSchema,\n type MultipartBlobStageStatusResponse,\n MultipartBlobStageStatusResponseSchema,\n type UploadMultipartBlobPartResponse,\n UploadMultipartBlobPartResponseSchema,\n} from \"./blob\";\nexport {\n BLOB_MUTATION_ERROR_CODES,\n type BlobMutationErrorCode,\n type BlobMutationFailureResponse,\n BlobMutationFailureResponseSchema,\n} from \"./blobMutationError\";\nexport {\n CONTAINER_PROJECTION_STATE_INVALID_ERROR_CODE,\n type ContainerDeleteResponse,\n ContainerDeleteResponseSchema,\n type ContainerKekKeyringWireResponse,\n type ContainerKekLogEpochResponse,\n ContainerKekLogEpochResponseSchema,\n type ContainerKekLogResponse,\n ContainerKekLogResponseSchema,\n type ContainerKekResponse,\n type ContainerKeyingPathResponse,\n ContainerKeyingPathResponseSchema,\n type ContainerMutationResponse,\n ContainerMutationResponseSchema,\n type ContainerReciteResponse,\n ContainerReciteResponseSchema,\n type ContainerRotationResponse,\n ContainerRotationResponseSchema,\n type ContainerSummary,\n ContainerSummaryResponseSchema,\n type ContainerSyncTombstone,\n ContainerSyncTombstoneResponseSchema,\n ContainerWriterProjectionErrorResponseSchema,\n type ContainerWriterProjectionResponse,\n ContainerWriterProjectionResponseSchema,\n type ContainerWriterProjectionWireResponse,\n ContainerWriterProjectionWireResponseSchema,\n isContainerDeleteResponse,\n isContainerKekLogResponse,\n isContainerMutationResponse,\n isContainerReciteResponse,\n isContainerRotationResponse,\n isContainerWriterProjectionResponse,\n isContainerWriterProjectionWireResponse,\n isListContainersResponse,\n type ListContainersResponse,\n ListContainersResponseSchema,\n} from \"./container\";\nexport type { ListContainerDocumentLanesResponse } from \"./containerDocumentLanes\";\nexport {\n type ContainerCreateWithMetadataDocumentResponse,\n ContainerCreateWithMetadataDocumentResponseSchema,\n isContainerCreateWithMetadataDocumentResponse,\n} from \"./containerMetadata\";\nexport {\n CONTAINER_MUTATION_ERROR_CODES,\n ContainerMutationBehaviorErrorCodeSchema,\n type ContainerMutationErrorCode,\n ContainerMutationErrorCodeSchema,\n type ContainerMutationFailureResponse,\n ContainerMutationFailureResponseSchema,\n} from \"./containerMutationError\";\nexport {\n CONTAINER_NOT_FOUND_ERROR_CODE,\n type ContainerNotFoundErrorResponse,\n ContainerNotFoundErrorResponseSchema,\n} from \"./containerNotFoundError\";\nexport {\n isListContainerParentLanesResponse,\n type ListContainerParentLanesResponse,\n ListContainerParentLanesResponseSchema,\n} from \"./containerParentLanes\";\nexport {\n CONTAINER_UNAVAILABLE_ERROR_CODE,\n type ContainerUnavailableErrorCode,\n} from \"./containerUnavailableError\";\nexport {\n type ContainerDocumentSummary,\n ContainerDocumentSummaryResponseSchema,\n type ContainerDocumentSyncTombstone,\n ContainerDocumentSyncTombstoneResponseSchema,\n type DocumentEditAttributionRangeResponse,\n DocumentEditAttributionRangeResponseSchema,\n type DocumentEditAttributionResponse,\n DocumentEditAttributionResponseSchema,\n type DocumentEditAttributionSegmentResponse,\n DocumentEditAttributionSegmentResponseSchema,\n isDocumentEditAttributionResponse,\n isListDocumentEditAttributionRangesResponse,\n type ListContainerDocumentsResponse,\n ListContainerDocumentsResponseSchema,\n type ListDocumentEditAttributionRangesResponse,\n ListDocumentEditAttributionRangesResponseSchema,\n} from \"./document\";\nexport {\n type DocumentContentKeyBundleResponse,\n DocumentContentKeyBundleResponseSchema,\n type DocumentContentKeyTargetEnvelopeResponse,\n DocumentContentKeyTargetEnvelopeResponseSchema,\n type DocumentCreateResponse,\n DocumentCreateResponseSchema,\n type DocumentCreateSeedResponse,\n type DocumentKekTargetsResponse,\n DocumentKekTargetsResponseSchema,\n type DocumentLinkSetMutationResponse,\n DocumentLinkSetMutationResponseSchema,\n type DocumentPurgeProofResponse,\n DocumentPurgeProofResponseSchema,\n type DocumentPurgeResponse,\n DocumentPurgeResponseSchema,\n type DocumentSyncPullPageResponse,\n DocumentSyncPullPageResponseSchema,\n type DocumentSyncResponse,\n DocumentSyncResponseSchema,\n type DocumentSyncUpdateResponse,\n DocumentSyncUpdateResponseSchema,\n type DocumentWriterProjectionResponse,\n DocumentWriterProjectionResponseSchema,\n type DocumentWriterProjectionWireResponse,\n DocumentWriterProjectionWireResponseSchema,\n documentKekTargetsFromContentKeyBundle,\n isDocumentContentKeyBundleResponse,\n isDocumentCreateResponse,\n isDocumentKekTargetsResponse,\n isDocumentLinkSetMutationResponse,\n isDocumentPurgeProofResponse,\n isDocumentPurgeResponse,\n isDocumentSyncResponse,\n isDocumentWriterProjectionResponse,\n isDocumentWriterProjectionWireResponse,\n} from \"./documentMutation\";\nexport {\n DOCUMENT_MUTATION_ERROR_CODES,\n DocumentMutationBehaviorErrorCodeSchema,\n type DocumentMutationErrorCode,\n DocumentMutationErrorCodeSchema,\n type DocumentMutationFailureResponse,\n DocumentMutationFailureResponseSchema,\n} from \"./documentMutationError\";\nexport {\n DOCUMENT_NOT_FOUND_ERROR_CODE,\n DOCUMENT_PROJECTION_ERROR_CODES,\n DOCUMENT_SYNC_ERROR_CODES,\n type DocumentNotFoundErrorCode,\n type DocumentNotFoundErrorResponse,\n DocumentNotFoundErrorResponseSchema,\n type DocumentProjectionErrorCode,\n DocumentProjectionErrorCodeSchema,\n type DocumentSyncErrorCode,\n DocumentSyncErrorCodeSchema,\n type DocumentSyncErrorResponse,\n DocumentSyncErrorResponseSchema,\n type DocumentSyncStateStaleErrorResponse,\n DocumentSyncStateStaleErrorResponseSchema,\n type DocumentWriterProjectionErrorResponse,\n DocumentWriterProjectionErrorResponseSchema,\n isDocumentSyncErrorCode,\n isDocumentSyncErrorResponse,\n isDocumentSyncStateStaleErrorResponse,\n} from \"./documentSyncError\";\nexport {\n type ErrorResponse,\n ErrorResponseSchema,\n isErrorResponse,\n} from \"./error\";\nexport {\n type HealthResponse,\n HealthResponseSchema,\n isHealthResponse,\n} from \"./health\";\nexport {\n MULTIPART_BLOB_STAGE_ERROR_CODES,\n type MultipartBlobStageConflictErrorResponse,\n MultipartBlobStageConflictErrorResponseSchema,\n type MultipartBlobStageErrorCode,\n type MultipartBlobStageExpiredErrorResponse,\n MultipartBlobStageExpiredErrorResponseSchema,\n type MultipartBlobStageNotFoundErrorResponse,\n MultipartBlobStageNotFoundErrorResponseSchema,\n} from \"./multipartBlobStageError\";\nexport {\n type CreateOrganizationGroupResponse,\n CreateOrganizationGroupResponseSchema,\n type DeleteOrganizationGroupResponse,\n DeleteOrganizationGroupResponseSchema,\n isCreateOrganizationGroupResponse,\n isDeleteOrganizationGroupResponse,\n isListOrganizationGroupsResponse,\n isOrganizationContainerGrantResponse,\n isOrganizationContainerGrantSubjectType,\n isOrganizationContainerGrantsResponse,\n isOrganizationDirectoryResponse,\n isOrganizationDirectoryUserResponse,\n isOrganizationGroupContainerAccessLevel,\n isOrganizationGroupContainerResponse,\n isOrganizationGroupContainersResponse,\n isOrganizationGroupCurrentStateResponse,\n isOrganizationGroupMemberResponse,\n isOrganizationGroupMembersResponse,\n isOrganizationGroupSummaryResponse,\n isOrganizationProfileResponse,\n isOrganizationUserDetailGrantsResponse,\n isOrganizationUserDetailResponse,\n type ListOrganizationGroupsResponse,\n ListOrganizationGroupsResponseSchema,\n type OrganizationContainerGrantResponse,\n OrganizationContainerGrantResponseSchema,\n type OrganizationContainerGrantSubjectType,\n type OrganizationContainerGrantsResponse,\n OrganizationContainerGrantsResponseSchema,\n type OrganizationDirectoryResponse,\n OrganizationDirectoryResponseSchema,\n type OrganizationDirectoryUserResponse,\n OrganizationDirectoryUserResponseSchema,\n type OrganizationGroupContainerAccessLevel,\n type OrganizationGroupContainerResponse,\n OrganizationGroupContainerResponseSchema,\n type OrganizationGroupContainersResponse,\n OrganizationGroupContainersResponseSchema,\n type OrganizationGroupCurrentStateResponse,\n OrganizationGroupCurrentStateResponseSchema,\n type OrganizationGroupMemberResponse,\n OrganizationGroupMemberResponseSchema,\n type OrganizationGroupMembersResponse,\n OrganizationGroupMembersResponseSchema,\n type OrganizationGroupSummaryResponse,\n OrganizationGroupSummaryResponseSchema,\n type OrganizationProfileResponse,\n OrganizationProfileResponseSchema,\n type OrganizationRole,\n type OrganizationRosterStatus,\n type OrganizationUserDetailGrantsResponse,\n OrganizationUserDetailGrantsResponseSchema,\n type OrganizationUserDetailResponse,\n OrganizationUserDetailResponseSchema,\n} from \"./organization\";\nexport {\n type BillingErrorResponse,\n BillingErrorResponseSchema,\n isOrganizationBillingProvider,\n isOrganizationBillingResponse,\n isOrganizationBillingStatus,\n isPaymentRequiredErrorResponse,\n type OrganizationBillingProvider,\n OrganizationBillingProviderSchema,\n type OrganizationBillingResponse,\n OrganizationBillingResponseSchema,\n type OrganizationBillingStatus,\n OrganizationBillingStatusSchema,\n type OrganizationBillingSubscriptionSource,\n OrganizationBillingSubscriptionSourceSchema,\n type PaymentRequiredErrorResponse,\n PaymentRequiredErrorResponseSchema,\n} from \"./organizationBilling\";\nexport {\n isOrganizationBillingHistoryResponse,\n type OrganizationBillingHistoryCategory,\n OrganizationBillingHistoryCategorySchema,\n type OrganizationBillingHistoryEntry,\n OrganizationBillingHistoryEntrySchema,\n type OrganizationBillingHistoryEnvironment,\n OrganizationBillingHistoryEnvironmentSchema,\n type OrganizationBillingHistoryOutcome,\n OrganizationBillingHistoryOutcomeSchema,\n type OrganizationBillingHistoryProvider,\n OrganizationBillingHistoryProviderSchema,\n type OrganizationBillingHistoryResponse,\n OrganizationBillingHistoryResponseSchema,\n} from \"./organizationBillingHistory\";\nexport {\n isOrganizationBillingManagementUrlResponse,\n type OrganizationBillingManagementUrlResponse,\n OrganizationBillingManagementUrlResponseSchema,\n} from \"./organizationBillingManagementUrl\";\nexport {\n isOrganizationDataUsageResponse,\n ORGANIZATION_DOCUMENT_USAGE_CATEGORIES,\n type OrganizationBlobDataUsageResponse,\n type OrganizationDataUsageResponse,\n OrganizationDataUsageResponseSchema,\n type OrganizationDocumentDataUsageResponse,\n type OrganizationDocumentUsageCategory,\n type OrganizationDocumentUsageCategoryBreakdown,\n} from \"./organizationDataUsage\";\nexport {\n isOrganizationNativePurchaseEligibilityResponse,\n type OrganizationNativePurchaseEligibilityResponse,\n OrganizationNativePurchaseEligibilityResponseSchema,\n type OrganizationNativePurchaseIneligibilityReason,\n OrganizationNativePurchaseIneligibilityReasonSchema,\n} from \"./organizationNativePurchaseEligibility\";\nexport {\n type OrganizationPolicyHistoryResponse,\n OrganizationPolicyHistoryResponseSchema,\n PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE,\n} from \"./organizationPolicyHistory\";\nexport {\n ORGANIZATION_PRESENTATION_ERROR_CODES,\n type OrganizationPresentationErrorCode,\n OrganizationPresentationErrorCodeSchema,\n type OrganizationPresentationFailureResponse,\n OrganizationPresentationFailureResponseSchema,\n} from \"./organizationPresentationError\";\nexport {\n type CreateOrganizationResponse,\n CreateOrganizationResponseSchema,\n isCreateOrganizationResponse,\n isOrganizationProvisioningResponse,\n type OrganizationProvisioningResponse,\n OrganizationProvisioningResponseSchema,\n} from \"./organizationProvisioning\";\nexport {\n isOrganizationReadModelResponse,\n type OrganizationReadModelDeltaResponse,\n type OrganizationReadModelDirectoryResponse,\n type OrganizationReadModelGrantsResponse,\n type OrganizationReadModelGroupMemberResponse,\n type OrganizationReadModelGroupMembershipResponse,\n type OrganizationReadModelGroupMembershipsResponse,\n type OrganizationReadModelOrganizationPolicyResponse,\n type OrganizationReadModelResponse,\n OrganizationReadModelResponseSchema,\n type OrganizationReadModelSnapshotResponse,\n} from \"./organizationReadModel\";\nexport {\n ORGANIZATION_READ_MODEL_ERROR_CODES,\n type OrganizationReadModelErrorCode,\n OrganizationReadModelErrorCodeSchema,\n type OrganizationReadModelFailureResponse,\n OrganizationReadModelFailureResponseSchema,\n} from \"./organizationReadModelError\";\nexport {\n CommitOrganizationGroupPolicyConflictResponseSchema,\n type CommitOrganizationGroupPolicyResponse,\n CommitOrganizationGroupPolicyResponseSchema,\n type CurrentPrincipalMemberEnvelopesResponse,\n CurrentPrincipalMemberEnvelopesResponseSchema,\n isCommitOrganizationGroupPolicyResponse,\n isCurrentPrincipalMemberEnvelopesResponse,\n isPrincipalPolicyBundleResponse,\n isPrincipalPolicyMutationResponse,\n isPrincipalPolicyStaleErrorResponse,\n isPrincipalPolicyStateChainEntryResponse,\n isPrincipalStatePayloadResponse,\n isPrincipalStateResponse,\n type PrincipalContainerGrantResponse,\n PrincipalContainerGrantResponseSchema,\n type PrincipalMemberEnvelopeResponse,\n PrincipalMemberEnvelopeResponseSchema,\n type PrincipalPolicyBundleResponse,\n PrincipalPolicyBundleResponseSchema,\n type PrincipalPolicyErrorResponse,\n PrincipalPolicyErrorResponseSchema,\n type PrincipalPolicyMutationResponse,\n PrincipalPolicyMutationResponseSchema,\n type PrincipalPolicySnapshotResponse,\n PrincipalPolicySnapshotResponseSchema,\n type PrincipalPolicyStaleErrorResponse,\n PrincipalPolicyStaleErrorResponseSchema,\n type PrincipalPolicyStateChainEntryResponse,\n PrincipalPolicyStateChainEntryResponseSchema,\n type PrincipalProjectionMemberResponse,\n PrincipalProjectionMemberResponseSchema,\n type PrincipalStateExternalAuthorityResponse,\n PrincipalStateExternalAuthorityResponseSchema,\n type PrincipalStatePayloadResponse,\n PrincipalStatePayloadResponseSchema,\n type PrincipalStateResponse,\n PrincipalStateResponseSchema,\n} from \"./principal\";\nexport {\n isPrincipalPolicyPageResponse,\n type PrincipalPolicyPageResponse,\n PrincipalPolicyPageResponseSchema,\n} from \"./principalPolicyPage\";\nexport {\n isPrincipalPolicySnapshotPageResponse,\n type PrincipalPolicyHistorySourceResponse,\n PrincipalPolicyHistorySourceResponseSchema,\n type PrincipalPolicySnapshotPageResponse,\n PrincipalPolicySnapshotPageResponseSchema,\n} from \"./principalPolicySnapshotPage\";\nexport {\n isReferencedPrincipalStateResponse,\n type ReferencedPrincipalStateResponse,\n ReferencedPrincipalStateResponseSchema,\n} from \"./principalReference\";\nexport {\n type ProjectionPolicyEvidenceResponse,\n ProjectionPolicyEvidenceResponseSchema,\n} from \"./projectionPolicyEvidence\";\nexport {\n isRegistrationResponse,\n type RegistrationResponse,\n RegistrationResponseSchema,\n} from \"./registration\";\nexport {\n isRootIdentitiesResponse,\n isRootIdentityDetailResponse,\n isRootIdentityOrganizationsResponse,\n type RootIdentitiesResponse,\n RootIdentitiesResponseSchema,\n type RootIdentityDetailResponse,\n RootIdentityDetailResponseSchema,\n type RootIdentityOrganizationBillingResponse,\n RootIdentityOrganizationBillingResponseSchema,\n type RootIdentityOrganizationResponse,\n RootIdentityOrganizationResponseSchema,\n type RootIdentityOrganizationsResponse,\n RootIdentityOrganizationsResponseSchema,\n type RootIdentitySessionResponse,\n RootIdentitySessionResponseSchema,\n type RootIdentitySummaryResponse,\n RootIdentitySummaryResponseSchema,\n} from \"./root\";\nexport {\n type RootDataUsageReportResponse,\n RootDataUsageReportResponseSchema,\n type RootOrganizationDetailResponse,\n RootOrganizationDetailResponseSchema,\n type RootOrganizationIdentitiesResponse,\n RootOrganizationIdentitiesResponseSchema,\n type RootOrganizationIdentityResponse,\n RootOrganizationIdentityResponseSchema,\n type RootOrganizationSummaryResponse,\n RootOrganizationSummaryResponseSchema,\n type RootOrganizationsResponse,\n RootOrganizationsResponseSchema,\n} from \"./rootOrganizations\";\nexport {\n isStripeCancelResponse,\n isStripeCheckoutIntentResponse,\n isStripeCheckoutOptionsResponse,\n isStripeCheckoutSessionResponse,\n isStripePortalResponse,\n type StripeCancelResponse,\n StripeCancelResponseSchema,\n type StripeCheckoutIntentResponse,\n StripeCheckoutIntentResponseSchema,\n type StripeCheckoutOptionsResponse,\n StripeCheckoutOptionsResponseSchema,\n type StripeCheckoutSessionResponse,\n StripeCheckoutSessionResponseSchema,\n type StripePortalResponse,\n StripePortalResponseSchema,\n type StripeSyncOptionResponse,\n StripeSyncOptionResponseSchema,\n} from \"./stripeCheckout\";\nexport {\n isSyncWatermark,\n type SyncWatermark,\n SyncWatermarkSchema,\n} from \"./syncWatermark\";\nexport {\n decodeContainerWriterProjection,\n decodeDocumentWriterProjection,\n encodeContainerWriterProjection,\n encodeDocumentWriterProjection,\n} from \"./writerProjectionWire\";\n"]}
|