@tearleads/client-sdk 0.1.86 → 0.1.88
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/Tearleads.js +1 -1
- package/Tearleads.js.map +1 -1
- package/client/containerContents/documentDiscovery.js +16 -2
- package/client/containerContents/documentDiscovery.js.map +1 -1
- package/client/containerContents/index.d.ts +1 -1
- package/client/containerContents/index.js +1 -0
- package/client/containerContents/index.js.map +1 -1
- package/client/index.d.ts +1 -1
- package/client/index.js.map +1 -1
- package/client/organizations/index.d.ts +4 -2
- package/client/organizations/index.js +6 -3
- package/client/organizations/index.js.map +1 -1
- package/client/organizations/organizationMemberships.d.ts +30 -0
- package/client/organizations/organizationMemberships.js +132 -0
- package/client/organizations/organizationMemberships.js.map +1 -0
- package/client/organizations/organizationsTypes.d.ts +3 -0
- package/client/organizations/organizationsTypes.js.map +1 -1
- package/data/persistence/container-contents/containerStructuralRepair.js +19 -14
- package/data/persistence/container-contents/containerStructuralRepair.js.map +1 -1
- package/data/persistence/container-contents/exclusiveDocumentPlacements.js +60 -0
- package/data/persistence/container-contents/exclusiveDocumentPlacements.js.map +1 -0
- package/data/sqlite/schema/index.d.ts +71 -0
- package/data/sqlite/schema/index.js +3 -0
- package/data/sqlite/schema/index.js.map +1 -1
- package/data/sqlite/schema/organizationSyncPauseSchema.js +32 -0
- package/data/sqlite/schema/organizationSyncPauseSchema.js.map +1 -0
- package/data/sync/organizationSyncPauses.d.ts +59 -0
- package/data/sync/organizationSyncPauses.js +149 -0
- package/data/sync/organizationSyncPauses.js.map +1 -0
- package/index.d.ts +2 -2
- package/index.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +11 -2
- package/internal/api-client/ApiClient.js +9 -1
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/routes/organizations/memberships.js +17 -0
- package/internal/api-client/routes/organizations/memberships.js.map +1 -0
- package/internal/validators/operation/index.d.ts +1 -0
- package/internal/validators/operation/index.js +1 -0
- package/internal/validators/operation/index.js.map +1 -1
- package/internal/validators/operation/organizationMemberships.d.ts +240 -0
- package/internal/validators/operation/organizationMemberships.js +51 -0
- package/internal/validators/operation/organizationMemberships.js.map +1 -0
- package/internal/validators/operation/registry.d.ts +3 -0
- package/internal/validators/operation/registry.js +3 -0
- package/internal/validators/operation/registry.js.map +1 -1
- package/internal/validators/realtime/index.js +1 -1
- package/internal/validators/realtime/index.js.map +1 -1
- package/internal/validators/realtime/wsInvalidationHints.js +8 -0
- package/internal/validators/realtime/wsInvalidationHints.js.map +1 -1
- package/internal/validators/request/index.d.ts +1 -1
- package/internal/validators/request/index.js +1 -1
- package/internal/validators/request/index.js.map +1 -1
- package/internal/validators/request/organization.d.ts +6 -0
- package/internal/validators/request/organization.js +7 -0
- package/internal/validators/request/organization.js.map +1 -1
- package/internal/validators/response/index.d.ts +1 -0
- package/internal/validators/response/index.js +1 -0
- package/internal/validators/response/index.js.map +1 -1
- package/internal/validators/response/organizationMembership.d.ts +56 -0
- package/internal/validators/response/organizationMembership.js +26 -0
- package/internal/validators/response/organizationMembership.js.map +1 -0
- package/package.json +1 -1
- package/stores/container-contents/containerContentsStore.d.ts +1 -1
- package/stores/container-contents/containerContentsStore.js +2 -0
- package/stores/container-contents/containerContentsStore.js.map +1 -1
- package/stores/container-contents/operations/forgetOrganizationContentOperation.js +76 -0
- package/stores/container-contents/operations/forgetOrganizationContentOperation.js.map +1 -0
- package/stores/container-contents/types.d.ts +6 -0
- package/stores/container-contents/types.js.map +1 -1
- package/stores/documents/documentStore/attachments/attachmentRemoval.js +3 -4
- package/stores/documents/documentStore/attachments/attachmentRemoval.js.map +1 -1
- package/stores/documents/documentStore/attachments/index.js +5 -7
- package/stores/documents/documentStore/attachments/index.js.map +1 -1
- package/stores/documents/documentStore/index.js +16 -12
- package/stores/documents/documentStore/index.js.map +1 -1
- package/stores/documents/documentStore/initialization/index.js +9 -0
- package/stores/documents/documentStore/initialization/index.js.map +1 -1
- package/stores/documents/documentStore/mutations.js +5 -7
- package/stores/documents/documentStore/mutations.js.map +1 -1
- package/stores/documents/documentStore/rotation/index.js +2 -1
- package/stores/documents/documentStore/rotation/index.js.map +1 -1
- package/stores/documents/documentStore/rows/index.js +3 -4
- package/stores/documents/documentStore/rows/index.js.map +1 -1
- package/stores/documents/documentStore/state.js +18 -0
- package/stores/documents/documentStore/state.js.map +1 -1
- package/stores/documents/documentStore/sync/index.js +5 -2
- package/stores/documents/documentStore/sync/index.js.map +1 -1
- package/stores/documents/registry.d.ts +32 -0
- package/stores/documents/registry.js +79 -4
- package/stores/documents/registry.js.map +1 -1
- package/stores/documents/removedDocumentStore.js +38 -0
- package/stores/documents/removedDocumentStore.js.map +1 -0
- package/stores/documents/types.d.ts +2 -0
- package/stores/documents/types.js.map +1 -1
- package/sync/reconciliation/service.js +2 -2
- package/sync/reconciliation/service.js.map +1 -1
- package/sync/reconciliation/serviceTypes.d.ts +8 -1
- package/sync/reconciliation/serviceTypes.js.map +1 -1
- package/workflows/container-contents/pendingWrites/index.d.ts +5 -0
- package/workflows/container-contents/pendingWrites/index.js +7 -0
- package/workflows/container-contents/pendingWrites/index.js.map +1 -1
- package/workflows/container-contents/remoteHydration/index.js +7 -1
- package/workflows/container-contents/remoteHydration/index.js.map +1 -1
- package/workflows/container-contents/remoteHydration/remoteContainers/organizationSyncPauseFilter.js +13 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/organizationSyncPauseFilter.js.map +1 -0
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerPageHydration.js +13 -2
- package/workflows/container-contents/remoteHydration/remoteContainers/remoteContainerPageHydration.js.map +1 -1
- package/workflows/container-contents/syncPause/discoveryGuard.js +31 -0
- package/workflows/container-contents/syncPause/discoveryGuard.js.map +1 -0
- package/workflows/container-contents/syncPause/documentRemoval.js +154 -0
- package/workflows/container-contents/syncPause/documentRemoval.js.map +1 -0
- package/workflows/organizations/index.d.ts +1 -0
- package/workflows/organizations/index.js +1 -0
- package/workflows/organizations/index.js.map +1 -1
- package/workflows/organizations/memberships/organizationMemberships.d.ts +84 -0
- package/workflows/organizations/memberships/organizationMemberships.js +95 -0
- package/workflows/organizations/memberships/organizationMemberships.js.map +1 -0
- package/workflows/organizations/readModel/listLocalOrganizations.d.ts +14 -7
- package/workflows/organizations/readModel/listLocalOrganizations.js +58 -38
- package/workflows/organizations/readModel/listLocalOrganizations.js.map +1 -1
- package/workflows/sync/index.d.ts +1 -0
- package/workflows/sync/index.js +1 -0
- package/workflows/sync/index.js.map +1 -1
|
@@ -1432,6 +1432,11 @@ export declare const UpdateOrganizationRosterEntryRequestSchema: z.ZodType<{
|
|
|
1432
1432
|
profileDocumentId: string | null;
|
|
1433
1433
|
}>>;
|
|
1434
1434
|
export type UpdateOrganizationRosterEntryRequest = z.infer<typeof UpdateOrganizationRosterEntryRequestSchema>;
|
|
1435
|
+
/** The session user's own choice for one organization they belong to. */
|
|
1436
|
+
export declare const UpdateOrganizationMembershipRequestSchema: z.ZodObject<{
|
|
1437
|
+
syncPaused: z.ZodBoolean;
|
|
1438
|
+
}, z.core.$strict>;
|
|
1439
|
+
export type UpdateOrganizationMembershipRequest = z.infer<typeof UpdateOrganizationMembershipRequestSchema>;
|
|
1435
1440
|
export declare const UpdateOrganizationProfileRequestSchema: z.ZodType<{
|
|
1436
1441
|
profileDocumentId: string | null;
|
|
1437
1442
|
}, {
|
|
@@ -1446,4 +1451,5 @@ export declare function isCreateOrganizationGroupRequest(value: unknown): value
|
|
|
1446
1451
|
export declare function isCreateOrganizationGroupWithPolicyRequest(value: unknown): value is CreateOrganizationGroupWithPolicyRequest;
|
|
1447
1452
|
export declare function isDeleteOrganizationGroupRequest(value: unknown): value is DeleteOrganizationGroupRequest;
|
|
1448
1453
|
export declare function isUpdateOrganizationRosterEntryRequest(value: unknown): value is UpdateOrganizationRosterEntryRequest;
|
|
1454
|
+
export declare function isUpdateOrganizationMembershipRequest(value: unknown): value is UpdateOrganizationMembershipRequest;
|
|
1449
1455
|
export declare function isUpdateOrganizationProfileRequest(value: unknown): value is UpdateOrganizationProfileRequest;
|
|
@@ -19,6 +19,10 @@ export const OrganizationReadModelQuerySchema = loosePlainObject({
|
|
|
19
19
|
export const UpdateOrganizationRosterEntryRequestSchema = loosePlainObject({
|
|
20
20
|
profileDocumentId: uuidV4StringSchema.nullable(),
|
|
21
21
|
});
|
|
22
|
+
/** The session user's own choice for one organization they belong to. */
|
|
23
|
+
export const UpdateOrganizationMembershipRequestSchema = z.strictObject({
|
|
24
|
+
syncPaused: z.boolean(),
|
|
25
|
+
});
|
|
22
26
|
export const UpdateOrganizationProfileRequestSchema = loosePlainObject({
|
|
23
27
|
profileDocumentId: uuidV4StringSchema.nullable(),
|
|
24
28
|
});
|
|
@@ -35,6 +39,9 @@ export function isDeleteOrganizationGroupRequest(value) {
|
|
|
35
39
|
export function isUpdateOrganizationRosterEntryRequest(value) {
|
|
36
40
|
return UpdateOrganizationRosterEntryRequestSchema.safeParse(value).success;
|
|
37
41
|
}
|
|
42
|
+
export function isUpdateOrganizationMembershipRequest(value) {
|
|
43
|
+
return UpdateOrganizationMembershipRequestSchema.safeParse(value).success;
|
|
44
|
+
}
|
|
38
45
|
export function isUpdateOrganizationProfileRequest(value) {
|
|
39
46
|
return UpdateOrganizationProfileRequestSchema.safeParse(value).success;
|
|
40
47
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EACL,wCAAwC,EACxC,+BAA+B,GAChC,MAAM,aAAa,CAAC;AAErB,MAAM,mCAAmC,GAAG;IAC1C,OAAO,EAAE,kBAAkB;IAC3B,kBAAkB,EAAE,+BAA+B;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,YA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cesContent":["import { z } from \"zod\";\nimport { loosePlainObject, uuidV4StringSchema } from \"../schema\";\nimport {\n OrganizationPrincipalPolicyRequestSchema,\n PutPrincipalPolicyRequestSchema,\n} from \"./principal\";\n\nconst CreateOrganizationGroupRequestShape = {\n groupId: uuidV4StringSchema,\n initialGroupPolicy: PutPrincipalPolicyRequestSchema,\n};\n\nexport const CreateOrganizationGroupRequestSchema = z.strictObject(\n CreateOrganizationGroupRequestShape,\n);\n\nexport const CreateOrganizationGroupWithPolicyRequestSchema = z.strictObject({\n ...CreateOrganizationGroupRequestShape,\n organizationPolicy: OrganizationPrincipalPolicyRequestSchema,\n});\n\nexport type CreateOrganizationGroupRequest = z.infer<\n typeof CreateOrganizationGroupRequestSchema\n>;\n\nexport type CreateOrganizationGroupWithPolicyRequest = z.infer<\n typeof CreateOrganizationGroupWithPolicyRequestSchema\n>;\n\nexport const DeleteOrganizationGroupRequestSchema = loosePlainObject({\n organizationPolicy: OrganizationPrincipalPolicyRequestSchema,\n});\n\nexport type DeleteOrganizationGroupRequest = z.infer<\n typeof DeleteOrganizationGroupRequestSchema\n>;\n\nexport const OrganizationReadModelQuerySchema = loosePlainObject({\n cursor: z.string().optional(),\n});\n\nexport type OrganizationReadModelQuery = z.infer<\n typeof OrganizationReadModelQuerySchema\n>;\n\nexport const UpdateOrganizationRosterEntryRequestSchema = loosePlainObject({\n profileDocumentId: uuidV4StringSchema.nullable(),\n});\n\nexport type UpdateOrganizationRosterEntryRequest = z.infer<\n typeof UpdateOrganizationRosterEntryRequestSchema\n>;\n\nexport const UpdateOrganizationProfileRequestSchema = loosePlainObject({\n profileDocumentId: uuidV4StringSchema.nullable(),\n});\n\nexport type UpdateOrganizationProfileRequest = z.infer<\n typeof UpdateOrganizationProfileRequestSchema\n>;\n\nexport function isCreateOrganizationGroupRequest(\n value: unknown,\n): value is CreateOrganizationGroupRequest {\n return CreateOrganizationGroupRequestSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupWithPolicyRequest(\n value: unknown,\n): value is CreateOrganizationGroupWithPolicyRequest {\n return CreateOrganizationGroupWithPolicyRequestSchema.safeParse(value)\n .success;\n}\n\nexport function isDeleteOrganizationGroupRequest(\n value: unknown,\n): value is DeleteOrganizationGroupRequest {\n return DeleteOrganizationGroupRequestSchema.safeParse(value).success;\n}\n\nexport function isUpdateOrganizationRosterEntryRequest(\n value: unknown,\n): value is UpdateOrganizationRosterEntryRequest {\n return UpdateOrganizationRosterEntryRequestSchema.safeParse(value).success;\n}\n\nexport function isUpdateOrganizationProfileRequest(\n value: unknown,\n): value is UpdateOrganizationProfileRequest {\n return UpdateOrganizationProfileRequestSchema.safeParse(value).success;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AACjE,OAAO,EACL,wCAAwC,EACxC,+BAA+B,GAChC,MAAM,aAAa,CAAC;AAErB,MAAM,mCAAmC,GAAG;IAC1C,OAAO,EAAE,kBAAkB;IAC3B,kBAAkB,EAAE,+BAA+B;CACpD,CAAC;AAEF,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC,YAAY,CAChE,mCAAmC,CACpC,CAAC;AAEF,MAAM,CAAC,MAAM,8CAA8C,GAAG,CAAC,CAAC,YAAY,CAAC;IAC3E,GAAG,mCAAmC;IACtC,kBAAkB,EAAE,wCAAwC;CAC7D,CAAC,CAAC;AAUH,MAAM,CAAC,MAAM,oCAAoC,GAAG,gBAAgB,CAAC;IACnE,kBAAkB,EAAE,wCAAwC;CAC7D,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,gCAAgC,GAAG,gBAAgB,CAAC;IAC/D,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC9B,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,0CAA0C,GAAG,gBAAgB,CAAC;IACzE,iBAAiB,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAMH,yEAAyE;AACzE,MAAM,CAAC,MAAM,yCAAyC,GAAG,CAAC,CAAC,YAAY,CAAC;IACtE,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,sCAAsC,GAAG,gBAAgB,CAAC;IACrE,iBAAiB,EAAE,kBAAkB,CAAC,QAAQ,EAAE;CACjD,CAAC,CAAC;AAMH,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,0CAA0C,CACxD,KAAc;IAEd,OAAO,8CAA8C,CAAC,SAAS,CAAC,KAAK,CAAC;SACnE,OAAO,CAAC;AACb,CAAC;AAED,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,KAAc;IAEd,OAAO,0CAA0C,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,qCAAqC,CACnD,KAAc;IAEd,OAAO,yCAAyC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,kCAAkC,CAChD,KAAc;IAEd,OAAO,sCAAsC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACzE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { loosePlainObject, uuidV4StringSchema } from \"../schema\";\nimport {\n OrganizationPrincipalPolicyRequestSchema,\n PutPrincipalPolicyRequestSchema,\n} from \"./principal\";\n\nconst CreateOrganizationGroupRequestShape = {\n groupId: uuidV4StringSchema,\n initialGroupPolicy: PutPrincipalPolicyRequestSchema,\n};\n\nexport const CreateOrganizationGroupRequestSchema = z.strictObject(\n CreateOrganizationGroupRequestShape,\n);\n\nexport const CreateOrganizationGroupWithPolicyRequestSchema = z.strictObject({\n ...CreateOrganizationGroupRequestShape,\n organizationPolicy: OrganizationPrincipalPolicyRequestSchema,\n});\n\nexport type CreateOrganizationGroupRequest = z.infer<\n typeof CreateOrganizationGroupRequestSchema\n>;\n\nexport type CreateOrganizationGroupWithPolicyRequest = z.infer<\n typeof CreateOrganizationGroupWithPolicyRequestSchema\n>;\n\nexport const DeleteOrganizationGroupRequestSchema = loosePlainObject({\n organizationPolicy: OrganizationPrincipalPolicyRequestSchema,\n});\n\nexport type DeleteOrganizationGroupRequest = z.infer<\n typeof DeleteOrganizationGroupRequestSchema\n>;\n\nexport const OrganizationReadModelQuerySchema = loosePlainObject({\n cursor: z.string().optional(),\n});\n\nexport type OrganizationReadModelQuery = z.infer<\n typeof OrganizationReadModelQuerySchema\n>;\n\nexport const UpdateOrganizationRosterEntryRequestSchema = loosePlainObject({\n profileDocumentId: uuidV4StringSchema.nullable(),\n});\n\nexport type UpdateOrganizationRosterEntryRequest = z.infer<\n typeof UpdateOrganizationRosterEntryRequestSchema\n>;\n\n/** The session user's own choice for one organization they belong to. */\nexport const UpdateOrganizationMembershipRequestSchema = z.strictObject({\n syncPaused: z.boolean(),\n});\n\nexport type UpdateOrganizationMembershipRequest = z.infer<\n typeof UpdateOrganizationMembershipRequestSchema\n>;\n\nexport const UpdateOrganizationProfileRequestSchema = loosePlainObject({\n profileDocumentId: uuidV4StringSchema.nullable(),\n});\n\nexport type UpdateOrganizationProfileRequest = z.infer<\n typeof UpdateOrganizationProfileRequestSchema\n>;\n\nexport function isCreateOrganizationGroupRequest(\n value: unknown,\n): value is CreateOrganizationGroupRequest {\n return CreateOrganizationGroupRequestSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupWithPolicyRequest(\n value: unknown,\n): value is CreateOrganizationGroupWithPolicyRequest {\n return CreateOrganizationGroupWithPolicyRequestSchema.safeParse(value)\n .success;\n}\n\nexport function isDeleteOrganizationGroupRequest(\n value: unknown,\n): value is DeleteOrganizationGroupRequest {\n return DeleteOrganizationGroupRequestSchema.safeParse(value).success;\n}\n\nexport function isUpdateOrganizationRosterEntryRequest(\n value: unknown,\n): value is UpdateOrganizationRosterEntryRequest {\n return UpdateOrganizationRosterEntryRequestSchema.safeParse(value).success;\n}\n\nexport function isUpdateOrganizationMembershipRequest(\n value: unknown,\n): value is UpdateOrganizationMembershipRequest {\n return UpdateOrganizationMembershipRequestSchema.safeParse(value).success;\n}\n\nexport function isUpdateOrganizationProfileRequest(\n value: unknown,\n): value is UpdateOrganizationProfileRequest {\n return UpdateOrganizationProfileRequestSchema.safeParse(value).success;\n}\n"]}
|
|
@@ -23,6 +23,7 @@ export { type BillingErrorResponse, BillingErrorResponseSchema, isOrganizationBi
|
|
|
23
23
|
export { isOrganizationBillingHistoryResponse, type OrganizationBillingHistoryCategory, OrganizationBillingHistoryCategorySchema, type OrganizationBillingHistoryEntry, OrganizationBillingHistoryEntrySchema, type OrganizationBillingHistoryEnvironment, OrganizationBillingHistoryEnvironmentSchema, type OrganizationBillingHistoryOutcome, OrganizationBillingHistoryOutcomeSchema, type OrganizationBillingHistoryProvider, OrganizationBillingHistoryProviderSchema, type OrganizationBillingHistoryResponse, OrganizationBillingHistoryResponseSchema, } from "./organizationBillingHistory.js";
|
|
24
24
|
export { isOrganizationBillingManagementUrlResponse, type OrganizationBillingManagementUrlResponse, OrganizationBillingManagementUrlResponseSchema, } from "./organizationBillingManagementUrl.js";
|
|
25
25
|
export { isOrganizationDataUsageResponse, ORGANIZATION_DOCUMENT_USAGE_CATEGORIES, type OrganizationBlobDataUsageResponse, type OrganizationDataUsageResponse, OrganizationDataUsageResponseSchema, type OrganizationDocumentDataUsageResponse, type OrganizationDocumentUsageCategory, type OrganizationDocumentUsageCategoryBreakdown, } from "./organizationDataUsage.js";
|
|
26
|
+
export { isOrganizationMembershipResponse, isOrganizationMembershipsResponse, type OrganizationMembershipResponse, OrganizationMembershipResponseSchema, type OrganizationMembershipsResponse, OrganizationMembershipsResponseSchema, } from "./organizationMembership.js";
|
|
26
27
|
export { isOrganizationNativePurchaseEligibilityResponse, type OrganizationNativePurchaseEligibilityResponse, OrganizationNativePurchaseEligibilityResponseSchema, type OrganizationNativePurchaseIneligibilityReason, OrganizationNativePurchaseIneligibilityReasonSchema, } from "./organizationNativePurchaseEligibility.js";
|
|
27
28
|
export { type OrganizationPolicyHistoryResponse, OrganizationPolicyHistoryResponseSchema, PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE, } from "./organizationPolicyHistory.js";
|
|
28
29
|
export { ORGANIZATION_PRESENTATION_ERROR_CODES, type OrganizationPresentationErrorCode, OrganizationPresentationErrorCodeSchema, type OrganizationPresentationFailureResponse, OrganizationPresentationFailureResponseSchema, } from "./organizationPresentationError.js";
|
|
@@ -22,6 +22,7 @@ export { BillingErrorResponseSchema, isOrganizationBillingProvider, isOrganizati
|
|
|
22
22
|
export { isOrganizationBillingHistoryResponse, OrganizationBillingHistoryCategorySchema, OrganizationBillingHistoryEntrySchema, OrganizationBillingHistoryEnvironmentSchema, OrganizationBillingHistoryOutcomeSchema, OrganizationBillingHistoryProviderSchema, OrganizationBillingHistoryResponseSchema, } from "./organizationBillingHistory.js";
|
|
23
23
|
export { isOrganizationBillingManagementUrlResponse, OrganizationBillingManagementUrlResponseSchema, } from "./organizationBillingManagementUrl.js";
|
|
24
24
|
export { isOrganizationDataUsageResponse, ORGANIZATION_DOCUMENT_USAGE_CATEGORIES, OrganizationDataUsageResponseSchema, } from "./organizationDataUsage.js";
|
|
25
|
+
export { isOrganizationMembershipResponse, isOrganizationMembershipsResponse, OrganizationMembershipResponseSchema, OrganizationMembershipsResponseSchema, } from "./organizationMembership.js";
|
|
25
26
|
export { isOrganizationNativePurchaseEligibilityResponse, OrganizationNativePurchaseEligibilityResponseSchema, OrganizationNativePurchaseIneligibilityReasonSchema, } from "./organizationNativePurchaseEligibility.js";
|
|
26
27
|
export { OrganizationPolicyHistoryResponseSchema, PRINCIPAL_DISPLAY_HISTORY_PAGE_SIZE, } from "./organizationPolicyHistory.js";
|
|
27
28
|
export { ORGANIZATION_PRESENTATION_ERROR_CODES, OrganizationPresentationErrorCodeSchema, OrganizationPresentationFailureResponseSchema, } from "./organizationPresentationError.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,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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vC,4CAA4C,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"]}
|
|
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;AAChB,OAAO,EACL,yBAAyB,EAGzB,iCAAiC,GAClC,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,6CAA6C,EAE7C,6BAA6B,EAG7B,kCAAkC,EAElC,6BAA6B,EAG7B,iCAAiC,EAEjC,+BAA+B,EAE/B,6BAA6B,EAE7B,+BAA+B,EAE/B,8BAA8B,EAE9B,oCAAoC,EACpC,4CAA4C,EAE5C,uCAA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C/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 isOrganizationMembershipResponse,\n isOrganizationMembershipsResponse,\n type OrganizationMembershipResponse,\n OrganizationMembershipResponseSchema,\n type OrganizationMembershipsResponse,\n OrganizationMembershipsResponseSchema,\n} from \"./organizationMembership\";\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"]}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* One organization the session user belongs to, as the user's own conduit to
|
|
4
|
+
* it. This is product state, not access authority: signed group policies and
|
|
5
|
+
* container grants decide access. `syncPaused` is the user's own choice to stop
|
|
6
|
+
* this organization's content syncing to their devices; it changes nothing on
|
|
7
|
+
* the server's access path. `isPersonalOrganizationOwner` marks the user's
|
|
8
|
+
* personal organization, which cannot be paused.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OrganizationMembershipResponseSchema: z.ZodType<{
|
|
11
|
+
isPersonalOrganizationOwner: boolean;
|
|
12
|
+
organizationId: string;
|
|
13
|
+
syncPaused: boolean;
|
|
14
|
+
}, {
|
|
15
|
+
isPersonalOrganizationOwner: boolean;
|
|
16
|
+
organizationId: string;
|
|
17
|
+
syncPaused: boolean;
|
|
18
|
+
}, z.core.$ZodTypeInternals<{
|
|
19
|
+
isPersonalOrganizationOwner: boolean;
|
|
20
|
+
organizationId: string;
|
|
21
|
+
syncPaused: boolean;
|
|
22
|
+
}, {
|
|
23
|
+
isPersonalOrganizationOwner: boolean;
|
|
24
|
+
organizationId: string;
|
|
25
|
+
syncPaused: boolean;
|
|
26
|
+
}>>;
|
|
27
|
+
export type OrganizationMembershipResponse = z.infer<typeof OrganizationMembershipResponseSchema>;
|
|
28
|
+
/** Every organization whose roster lists the session user as active. */
|
|
29
|
+
export declare const OrganizationMembershipsResponseSchema: z.ZodType<{
|
|
30
|
+
memberships: {
|
|
31
|
+
isPersonalOrganizationOwner: boolean;
|
|
32
|
+
organizationId: string;
|
|
33
|
+
syncPaused: boolean;
|
|
34
|
+
}[];
|
|
35
|
+
}, {
|
|
36
|
+
memberships: {
|
|
37
|
+
isPersonalOrganizationOwner: boolean;
|
|
38
|
+
organizationId: string;
|
|
39
|
+
syncPaused: boolean;
|
|
40
|
+
}[];
|
|
41
|
+
}, z.core.$ZodTypeInternals<{
|
|
42
|
+
memberships: {
|
|
43
|
+
isPersonalOrganizationOwner: boolean;
|
|
44
|
+
organizationId: string;
|
|
45
|
+
syncPaused: boolean;
|
|
46
|
+
}[];
|
|
47
|
+
}, {
|
|
48
|
+
memberships: {
|
|
49
|
+
isPersonalOrganizationOwner: boolean;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
syncPaused: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
}>>;
|
|
54
|
+
export type OrganizationMembershipsResponse = z.infer<typeof OrganizationMembershipsResponseSchema>;
|
|
55
|
+
export declare function isOrganizationMembershipResponse(value: unknown): value is OrganizationMembershipResponse;
|
|
56
|
+
export declare function isOrganizationMembershipsResponse(value: unknown): value is OrganizationMembershipsResponse;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { arraySchema, loosePlainObject } from "../schema.js";
|
|
3
|
+
/**
|
|
4
|
+
* One organization the session user belongs to, as the user's own conduit to
|
|
5
|
+
* it. This is product state, not access authority: signed group policies and
|
|
6
|
+
* container grants decide access. `syncPaused` is the user's own choice to stop
|
|
7
|
+
* this organization's content syncing to their devices; it changes nothing on
|
|
8
|
+
* the server's access path. `isPersonalOrganizationOwner` marks the user's
|
|
9
|
+
* personal organization, which cannot be paused.
|
|
10
|
+
*/
|
|
11
|
+
export const OrganizationMembershipResponseSchema = loosePlainObject({
|
|
12
|
+
isPersonalOrganizationOwner: z.boolean(),
|
|
13
|
+
organizationId: z.string(),
|
|
14
|
+
syncPaused: z.boolean(),
|
|
15
|
+
});
|
|
16
|
+
/** Every organization whose roster lists the session user as active. */
|
|
17
|
+
export const OrganizationMembershipsResponseSchema = loosePlainObject({
|
|
18
|
+
memberships: arraySchema(OrganizationMembershipResponseSchema),
|
|
19
|
+
});
|
|
20
|
+
export function isOrganizationMembershipResponse(value) {
|
|
21
|
+
return OrganizationMembershipResponseSchema.safeParse(value).success;
|
|
22
|
+
}
|
|
23
|
+
export function isOrganizationMembershipsResponse(value) {
|
|
24
|
+
return OrganizationMembershipsResponseSchema.safeParse(value).success;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=organizationMembership.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"organizationMembership.js","sourceRoot":"","sources":["organizationMembership.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE1D;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,gBAAgB,CAAC;IACnE,2BAA2B,EAAE,CAAC,CAAC,OAAO,EAAE;IACxC,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE;IAC1B,UAAU,EAAE,CAAC,CAAC,OAAO,EAAE;CACxB,CAAC,CAAC;AAMH,wEAAwE;AACxE,MAAM,CAAC,MAAM,qCAAqC,GAAG,gBAAgB,CAAC;IACpE,WAAW,EAAE,WAAW,CAAC,oCAAoC,CAAC;CAC/D,CAAC,CAAC;AAMH,MAAM,UAAU,gCAAgC,CAC9C,KAAc;IAEd,OAAO,oCAAoC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,iCAAiC,CAC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport { arraySchema, loosePlainObject } from \"../schema\";\n\n/**\n * One organization the session user belongs to, as the user's own conduit to\n * it. This is product state, not access authority: signed group policies and\n * container grants decide access. `syncPaused` is the user's own choice to stop\n * this organization's content syncing to their devices; it changes nothing on\n * the server's access path. `isPersonalOrganizationOwner` marks the user's\n * personal organization, which cannot be paused.\n */\nexport const OrganizationMembershipResponseSchema = loosePlainObject({\n isPersonalOrganizationOwner: z.boolean(),\n organizationId: z.string(),\n syncPaused: z.boolean(),\n});\n\nexport type OrganizationMembershipResponse = z.infer<\n typeof OrganizationMembershipResponseSchema\n>;\n\n/** Every organization whose roster lists the session user as active. */\nexport const OrganizationMembershipsResponseSchema = loosePlainObject({\n memberships: arraySchema(OrganizationMembershipResponseSchema),\n});\n\nexport type OrganizationMembershipsResponse = z.infer<\n typeof OrganizationMembershipsResponseSchema\n>;\n\nexport function isOrganizationMembershipResponse(\n value: unknown,\n): value is OrganizationMembershipResponse {\n return OrganizationMembershipResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationMembershipsResponse(\n value: unknown,\n): value is OrganizationMembershipsResponse {\n return OrganizationMembershipsResponseSchema.safeParse(value).success;\n}\n"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import type { DomainScope } from "../../data/shared/domainScope.js";
|
|
|
2
2
|
import { type ContainerContentsPersistence } from "../../workflows/container-contents/containerPersistence.js";
|
|
3
3
|
import { type ContainerContentsStoreRuntime, createContainerContentsStoreSyncAgent } from "./syncAgent/index.js";
|
|
4
4
|
import type { ContainerContentsStore, ContainerContentsStoreOptions, ContainerContentsStoreState } from "./types.js";
|
|
5
|
-
type ContainerWriteMethods = Pick<ContainerContentsStore, "createChild" | "deleteContainer" | "emptyTrash" | "ensureSystemContainer" | "moveContainer" | "prepareGroupRewrap" | "purgeContainer" | "renameContainer" | "setContainerIcon" | "shareWithGroup" | "shareWithUser">;
|
|
5
|
+
type ContainerWriteMethods = Pick<ContainerContentsStore, "createChild" | "deleteContainer" | "emptyTrash" | "ensureSystemContainer" | "forgetOrganizationContent" | "moveContainer" | "prepareGroupRewrap" | "purgeContainer" | "renameContainer" | "setContainerIcon" | "shareWithGroup" | "shareWithUser">;
|
|
6
6
|
export declare function createContainerWriteMethods(state: ContainerContentsStoreState, syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>): ContainerWriteMethods;
|
|
7
7
|
export declare function createContainerContentsStore(initialRuntime: ContainerContentsStoreRuntime, persistence?: ContainerContentsPersistence, options?: ContainerContentsStoreOptions): ContainerContentsStore;
|
|
8
8
|
export declare function getOrCreateContainerContentsStore(domainScope: DomainScope, runtime: ContainerContentsStoreRuntime, options?: ContainerContentsStoreOptions): ContainerContentsStore;
|
|
@@ -3,6 +3,7 @@ import { defaultContainerContentsPersistence, } from "../../workflows/container-
|
|
|
3
3
|
import { persistContainerState } from "./containerState/containerStatePersistence.js";
|
|
4
4
|
import { createChildContainer, deleteContainer, ensureSystemContainer, moveContainer, renameContainer, } from "./operations/index.js";
|
|
5
5
|
import { emptyTrash } from "./operations/emptyTrashOperation.js";
|
|
6
|
+
import { createForgetOrganizationContentMethod } from "./operations/forgetOrganizationContentOperation.js";
|
|
6
7
|
import { prepareContainerGroupRewrap, verifyContainerGroupRewrapCurrent, } from "./operations/groupRewrapOperation.js";
|
|
7
8
|
import { purgeContainer } from "./operations/purgeContainerOperation.js";
|
|
8
9
|
import { chainPurgeAfterScopeMoves } from "./operations/purgeMoveSettlementOperation.js";
|
|
@@ -120,6 +121,7 @@ export function createContainerWriteMethods(state, syncAgent) {
|
|
|
120
121
|
purgeContainer: (containerId, options) => chainPurgeAfterScopeMoves(state, syncAgent, containerId, options, (isCurrent) => purgeContainer(state, syncAgent, containerId, options, isCurrent)),
|
|
121
122
|
emptyTrash: (trashContainerId, options) => chainPurgeAfterScopeMoves(state, syncAgent, trashContainerId, options, (isCurrent) => emptyTrash(state, syncAgent, trashContainerId, options, isCurrent)),
|
|
122
123
|
ensureSystemContainer: createEnsureSystemContainerMethod(state, syncAgent),
|
|
124
|
+
forgetOrganizationContent: createForgetOrganizationContentMethod(state, chainContainerWrite),
|
|
123
125
|
moveContainer: (containerId, parentId) => chainContainerWrite(state, (isCurrent) => moveContainer(state, syncAgent, containerId, parentId, isCurrent), [containerId, parentId], containerId),
|
|
124
126
|
prepareGroupRewrap: createPrepareGroupRewrapMethod(state, syncAgent),
|
|
125
127
|
renameContainer: (containerId, name) => chainContainerWrite(state, (isCurrent) => renameContainer(state, syncAgent, containerId, name, isCurrent), [containerId]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"containerContentsStore.js","sourceRoot":"","sources":["containerContentsStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oEAAoE,CAAC;AACxH,OAAO,EAEL,mCAAmC,GACpC,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAClC,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,2CAA2C,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,sBAAsB,GACvB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,+BAA+B,EAAE,MAAM,kCAAkC,CAAC;AACnF,OAAO,EAAE,wBAAwB,EAAE,MAAM,iCAAiC,CAAC;AAC3E,OAAO,EAAE,+BAA+B,EAAE,MAAM,gCAAgC,CAAC;AACjF,OAAO,EACL,iCAAiC,EACjC,iCAAiC,EACjC,+BAA+B,EAC/B,uCAAuC,EACvC,mCAAmC,GACpC,MAAM,SAAS,CAAC;AACjB,OAAO,EAGL,qCAAqC,GACtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAC;AAOlF,MAAM,8BAA8B,GAAG,IAAI,OAAO,EAG/C,CAAC;AAQJ,SAAS,kCAAkC,CACzC,KAAkC,EAClC,SAA0C,EAC1C,OAAsC;IAEtC,IAAI,UAAU,IAAI,OAAO,EAA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AE3C,MAAM,aAAa,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IACtE,IAAI,aAAa,EAAE,CAAC;QAClB,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACrC,OAAO,aAAa,CAAC,KAAK,CAAC;IAC7B,CAAC;IAED,MAAM,SAAS,GAAG,iCAAiC,CACjD,OAAO,EACP,mCAAmC,EACnC,OAAO,CACR,CAAC;IACF,8BAA8B,CAAC,GAAG,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;IAC3D,OAAO,SAAS,CAAC,KAAK,CAAC;AACzB,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,WAAwB;IAExB,MAAM,KAAK,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC/B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { DomainScope } from \"../../data/shared/domainScope\";\nimport { getCachedContainerWriterProjection } from \"../../workflows/container-contents/container-state/projectionCache\";\nimport {\n type ContainerContentsPersistence,\n defaultContainerContentsPersistence,\n} from \"../../workflows/container-contents/containerPersistence\";\nimport { persistContainerState } from \"./containerState/containerStatePersistence\";\nimport {\n createChildContainer,\n deleteContainer,\n ensureSystemContainer,\n moveContainer,\n renameContainer,\n} from \"./operations\";\nimport { emptyTrash } from \"./operations/emptyTrashOperation\";\nimport {\n prepareContainerGroupRewrap,\n verifyContainerGroupRewrapCurrent,\n} from \"./operations/groupRewrapOperation\";\nimport { purgeContainer } from \"./operations/purgeContainerOperation\";\nimport { chainPurgeAfterScopeMoves } from \"./operations/purgeMoveSettlementOperation\";\nimport { setContainerIcon } from \"./operations/setContainerIconOperation\";\nimport {\n shareContainerWithGroup,\n shareContainerWithUser,\n} from \"./operations/shareOperations\";\nimport { invalidateRemoteContainerWrites } from \"./remoteWrites/remoteWriteGuards\";\nimport { chainRemoteContainerTask } from \"./remoteWrites/remoteWriteQueue\";\nimport { captureContainerWriteGeneration } from \"./remoteWrites/writeGeneration\";\nimport {\n createContainerContentsStoreState,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStorePersistence,\n updateContainerContentsStoreRuntime,\n} from \"./state\";\nimport {\n type ContainerContentsStoreRuntime,\n type ContainerContentsStoreSyncAgent,\n createContainerContentsStoreSyncAgent,\n} from \"./syncAgent\";\nimport { findRootContainerState } from \"./systemContainers/systemContainerLookup\";\nimport type {\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerContentsStoreState,\n} from \"./types\";\n\nconst containerContentsStoresByScope = new WeakMap<\n DomainScope,\n ContainerContentsStoreEntry\n>();\n\ninterface ContainerContentsStoreEntry {\n requestDocumentPriming: () => void;\n store: ContainerContentsStore;\n updateOptions: (options: ContainerContentsStoreOptions) => void;\n}\n\nfunction applyContainerContentsStoreOptions(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n options: ContainerContentsStoreOptions,\n): void {\n if (\"logLabel\" in options) {\n state.logLabel = options.logLabel;\n }\n\n if (\"persistence\" in options) {\n updateContainerContentsStorePersistence(\n state,\n options.persistence ?? defaultContainerContentsPersistence,\n syncAgent,\n );\n }\n}\n\nfunction getCachedContainerWriterProjectionForStore(\n state: ContainerContentsStoreState,\n containerId: string,\n) {\n const containerState = state.containersById.get(containerId);\n return containerState\n ? getCachedContainerWriterProjection(containerState)\n : null;\n}\n\nfunction createContainerContentsStoreSyncHost(\n state: ContainerContentsStoreState,\n): Parameters<typeof createContainerContentsStoreSyncAgent>[0][\"host\"] {\n return {\n persistContainerState: (\n containerState,\n patch,\n updateView,\n saveOptions,\n mutationOptions,\n ) =>\n persistContainerState(state, containerState, {\n patch,\n updateView,\n saveOptions,\n ...mutationOptions,\n }),\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n },\n updateSnapshot: () => updateContainerContentsSnapshot(state),\n };\n}\n\n// null marks an unknown mutation scope; [] delegates invalidation to actual writes.\nfunction chainContainerWrite(\n state: ContainerContentsStoreState,\n work: (isCurrent: () => boolean) => ContainerContentsStoreState[\"writeChain\"],\n changedIds: readonly string[] | null = null,\n movedId?: string,\n): ContainerContentsStoreState[\"writeChain\"] {\n const isCurrent = captureContainerWriteGeneration(state);\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n state.writeChain = state.writeChain\n .catch(() => null)\n .then(() => {\n if (!isCurrent()) return null;\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n return work(isCurrent);\n })\n .then((node) => (isCurrent() ? node : null));\n return state.writeChain;\n}\n\ntype ContainerWriteMethods = Pick<\n ContainerContentsStore,\n | \"createChild\"\n | \"deleteContainer\"\n | \"emptyTrash\"\n | \"ensureSystemContainer\"\n | \"moveContainer\"\n | \"prepareGroupRewrap\"\n | \"purgeContainer\"\n | \"renameContainer\"\n | \"setContainerIcon\"\n | \"shareWithGroup\"\n | \"shareWithUser\"\n>;\n\n// The group-rewrap builder verifies any required existing grant before capturing\n// the container KEK, then returns a check/rewrap pair. A verified non-match is\n// distinct from an unavailable preparation so security-critical callers can\n// no-op unrelated groups without failing open for a real grant.\nfunction createPrepareGroupRewrapMethod(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerContentsStore[\"prepareGroupRewrap\"] {\n return async (containerId, groupId, accessLevel, options) => {\n const preparation = await chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n prepareContainerGroupRewrap(\n state,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n );\n return preparation?.status === \"prepared\"\n ? {\n isCurrent: (\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n ) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n verifyContainerGroupRewrapCurrent(\n state,\n containerId,\n groupId,\n accessLevel,\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n isCurrent,\n ),\n containerId,\n ),\n rewrap: () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n {\n ...options,\n knownContainerKeks: preparation.knownContainerKeks,\n // A prepared re-wrap is grant-preserving by definition, so\n // it never mints a grant and never needs the chosen name.\n requireExistingGrant: true,\n },\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n status: \"prepared\" as const,\n }\n : (preparation ?? null);\n };\n}\n\nfunction createContainerSharingMethods(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): Pick<ContainerWriteMethods, \"shareWithUser\" | \"shareWithGroup\"> {\n return {\n shareWithUser: (containerId, userId) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithUser(\n state,\n syncAgent,\n containerId,\n userId,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n shareWithGroup: (containerId, groupId, accessLevel, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n };\n}\n\nfunction createDeleteContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"deleteContainer\"] {\n return (containerId) => {\n const current = captureContainerWriteGeneration(state);\n const remoteDelete = () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n deleteContainer(state, syncAgent, containerId, isCurrent),\n containerId,\n ).then((node) => node !== null);\n if (state.containersById.get(containerId)?.record.documentId)\n return remoteDelete();\n let promoted = false;\n return chainContainerWrite(\n state,\n (isCurrent) => {\n // Promotion can win while this local operation was queued. Hand it to\n // the remote queue after releasing the local chain, before any HTTP I/O.\n promoted = Boolean(\n state.containersById.get(containerId)?.record.documentId,\n );\n return promoted\n ? Promise.resolve(null)\n : deleteContainer(state, syncAgent, containerId, isCurrent);\n },\n [containerId],\n ).then((node) => (promoted && current() ? remoteDelete() : node !== null));\n };\n}\n\nfunction createEnsureSystemContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"ensureSystemContainer\"] {\n return (systemSlot, name, options) => {\n const work = (isCurrent: () => boolean) =>\n ensureSystemContainer(\n state,\n syncAgent,\n systemSlot,\n name,\n options,\n isCurrent,\n );\n const rootId = findRootContainerState(state)?.container.id;\n return options?.deferRemoteBootstrap\n ? chainContainerWrite(state, work, [])\n : chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n work,\n rootId ? { rootId, systemSlot } : undefined,\n );\n };\n}\n\nexport function createContainerWriteMethods(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerWriteMethods {\n return {\n ...createContainerSharingMethods(state, syncAgent),\n createChild: (parentId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n createChildContainer(state, syncAgent, parentId, name, isCurrent),\n [parentId],\n ),\n deleteContainer: createDeleteContainerMethod(state, syncAgent),\n purgeContainer: (containerId, options) =>\n chainPurgeAfterScopeMoves(\n state,\n syncAgent,\n containerId,\n options,\n (isCurrent) =>\n purgeContainer(state, syncAgent, containerId, options, isCurrent),\n ),\n emptyTrash: (trashContainerId, options) =>\n chainPurgeAfterScopeMoves(\n state,\n syncAgent,\n trashContainerId,\n options,\n (isCurrent) =>\n emptyTrash(state, syncAgent, trashContainerId, options, isCurrent),\n ),\n ensureSystemContainer: createEnsureSystemContainerMethod(state, syncAgent),\n moveContainer: (containerId, parentId) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n moveContainer(state, syncAgent, containerId, parentId, isCurrent),\n [containerId, parentId],\n containerId,\n ),\n prepareGroupRewrap: createPrepareGroupRewrapMethod(state, syncAgent),\n renameContainer: (containerId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n renameContainer(state, syncAgent, containerId, name, isCurrent),\n [containerId],\n ),\n setContainerIcon: (containerId, icon) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n setContainerIcon(state, syncAgent, containerId, icon, isCurrent),\n [containerId],\n ),\n };\n}\n\nfunction createContainerContentsStoreEntry(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStoreEntry {\n const state = createContainerContentsStoreState(\n initialRuntime,\n options.persistence ?? persistence,\n options.logLabel,\n );\n const syncAgent = createContainerContentsStoreSyncAgent({\n host: createContainerContentsStoreSyncHost(state),\n state,\n });\n const writeMethods = createContainerWriteMethods(state, syncAgent);\n\n return {\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n syncAgent.scheduleSync();\n },\n store: {\n ...writeMethods,\n refresh: () => syncAgent.refresh({ resetAllLaneWatermarks: true }),\n refreshRootLane: (options) => syncAgent.refreshRootLane(options),\n // Force an on-demand local SQLite re-read (see the interface doc): arm the\n // gate refreshLocalContainerStates otherwise requires, which the runtime\n // auto-arms only on a context transition an on-demand caller cannot rely on.\n refreshLocalContainers: () => {\n state.localContainersNeedRefresh = true;\n return syncAgent.refreshLocalContainers();\n },\n requestSync: () => syncAgent.scheduleSync(),\n getCachedContainerWriterProjection: (containerId) =>\n getCachedContainerWriterProjectionForStore(state, containerId),\n getSnapshot: () => state.snapshot,\n subscribe: (listener) =>\n subscribeToContainerContentsStore(state, listener),\n updateRuntime: (runtime) =>\n updateContainerContentsStoreRuntime(state, runtime, syncAgent),\n },\n updateOptions: (nextOptions) =>\n applyContainerContentsStoreOptions(state, syncAgent, nextOptions),\n };\n}\n\nexport function createContainerContentsStore(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n return createContainerContentsStoreEntry(initialRuntime, persistence, options)\n .store;\n}\n\nexport function getOrCreateContainerContentsStore(\n domainScope: DomainScope,\n runtime: ContainerContentsStoreRuntime,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n const existingEntry = containerContentsStoresByScope.get(domainScope);\n if (existingEntry) {\n existingEntry.updateOptions(options);\n return existingEntry.store;\n }\n\n const nextEntry = createContainerContentsStoreEntry(\n runtime,\n defaultContainerContentsPersistence,\n options,\n );\n containerContentsStoresByScope.set(domainScope, nextEntry);\n return nextEntry.store;\n}\n\n/**\n * Arm the next structural pass's document-priming scan for a domain scope.\n * Priming normally re-arms only on store creation and topology changes, so a\n * caller that just tore down a document's local state uses this to have the\n * still-listed server document re-created without waiting for an app\n * restart. Returns false when the scope has no container-contents store yet;\n * the startup priming pass covers that case.\n */\nexport function requestContainerContentsDocumentPriming(\n domainScope: DomainScope,\n): boolean {\n const entry = containerContentsStoresByScope.get(domainScope);\n if (!entry) {\n return false;\n }\n\n entry.requestDocumentPriming();\n return true;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"containerContentsStore.js","sourceRoot":"","sources":["containerContentsStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kCAAkC,EAAE,MAAM,oEAAoE,CAAC;AACxH,OAAO,EAEL,mCAAmC,GACpC,MAAM,yDAAyD,CAAC;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,qBAAqB,EACrB,aAAa,EACb,eAAe,GAChB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,qCAAqC,EAAE,MAAM,iDAAiD,CAAC;AACxG,OAAO,EACL,2BAA2B,EAC3B,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;;;;;;;GAOG;AACH,MAAM,UAAU,uCAAuC,CACrD,WAAwB;IAExB,MAAM,KAAK,GAAG,8BAA8B,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;IAC9D,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,KAAK,CAAC;IACf,CAAC;IAED,KAAK,CAAC,sBAAsB,EAAE,CAAC;IAC/B,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { DomainScope } from \"../../data/shared/domainScope\";\nimport { getCachedContainerWriterProjection } from \"../../workflows/container-contents/container-state/projectionCache\";\nimport {\n type ContainerContentsPersistence,\n defaultContainerContentsPersistence,\n} from \"../../workflows/container-contents/containerPersistence\";\nimport { persistContainerState } from \"./containerState/containerStatePersistence\";\nimport {\n createChildContainer,\n deleteContainer,\n ensureSystemContainer,\n moveContainer,\n renameContainer,\n} from \"./operations\";\nimport { emptyTrash } from \"./operations/emptyTrashOperation\";\nimport { createForgetOrganizationContentMethod } from \"./operations/forgetOrganizationContentOperation\";\nimport {\n prepareContainerGroupRewrap,\n verifyContainerGroupRewrapCurrent,\n} from \"./operations/groupRewrapOperation\";\nimport { purgeContainer } from \"./operations/purgeContainerOperation\";\nimport { chainPurgeAfterScopeMoves } from \"./operations/purgeMoveSettlementOperation\";\nimport { setContainerIcon } from \"./operations/setContainerIconOperation\";\nimport {\n shareContainerWithGroup,\n shareContainerWithUser,\n} from \"./operations/shareOperations\";\nimport { invalidateRemoteContainerWrites } from \"./remoteWrites/remoteWriteGuards\";\nimport { chainRemoteContainerTask } from \"./remoteWrites/remoteWriteQueue\";\nimport { captureContainerWriteGeneration } from \"./remoteWrites/writeGeneration\";\nimport {\n createContainerContentsStoreState,\n subscribeToContainerContentsStore,\n updateContainerContentsSnapshot,\n updateContainerContentsStorePersistence,\n updateContainerContentsStoreRuntime,\n} from \"./state\";\nimport {\n type ContainerContentsStoreRuntime,\n type ContainerContentsStoreSyncAgent,\n createContainerContentsStoreSyncAgent,\n} from \"./syncAgent\";\nimport { findRootContainerState } from \"./systemContainers/systemContainerLookup\";\nimport type {\n ContainerContentsStore,\n ContainerContentsStoreOptions,\n ContainerContentsStoreState,\n} from \"./types\";\n\nconst containerContentsStoresByScope = new WeakMap<\n DomainScope,\n ContainerContentsStoreEntry\n>();\n\ninterface ContainerContentsStoreEntry {\n requestDocumentPriming: () => void;\n store: ContainerContentsStore;\n updateOptions: (options: ContainerContentsStoreOptions) => void;\n}\n\nfunction applyContainerContentsStoreOptions(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n options: ContainerContentsStoreOptions,\n): void {\n if (\"logLabel\" in options) {\n state.logLabel = options.logLabel;\n }\n\n if (\"persistence\" in options) {\n updateContainerContentsStorePersistence(\n state,\n options.persistence ?? defaultContainerContentsPersistence,\n syncAgent,\n );\n }\n}\n\nfunction getCachedContainerWriterProjectionForStore(\n state: ContainerContentsStoreState,\n containerId: string,\n) {\n const containerState = state.containersById.get(containerId);\n return containerState\n ? getCachedContainerWriterProjection(containerState)\n : null;\n}\n\nfunction createContainerContentsStoreSyncHost(\n state: ContainerContentsStoreState,\n): Parameters<typeof createContainerContentsStoreSyncAgent>[0][\"host\"] {\n return {\n persistContainerState: (\n containerState,\n patch,\n updateView,\n saveOptions,\n mutationOptions,\n ) =>\n persistContainerState(state, containerState, {\n patch,\n updateView,\n saveOptions,\n ...mutationOptions,\n }),\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n },\n updateSnapshot: () => updateContainerContentsSnapshot(state),\n };\n}\n\n// null marks an unknown mutation scope; [] delegates invalidation to actual writes.\nfunction chainContainerWrite(\n state: ContainerContentsStoreState,\n work: (isCurrent: () => boolean) => ContainerContentsStoreState[\"writeChain\"],\n changedIds: readonly string[] | null = null,\n movedId?: string,\n): ContainerContentsStoreState[\"writeChain\"] {\n const isCurrent = captureContainerWriteGeneration(state);\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n state.writeChain = state.writeChain\n .catch(() => null)\n .then(() => {\n if (!isCurrent()) return null;\n invalidateRemoteContainerWrites(state, changedIds, movedId);\n return work(isCurrent);\n })\n .then((node) => (isCurrent() ? node : null));\n return state.writeChain;\n}\n\ntype ContainerWriteMethods = Pick<\n ContainerContentsStore,\n | \"createChild\"\n | \"deleteContainer\"\n | \"emptyTrash\"\n | \"ensureSystemContainer\"\n | \"forgetOrganizationContent\"\n | \"moveContainer\"\n | \"prepareGroupRewrap\"\n | \"purgeContainer\"\n | \"renameContainer\"\n | \"setContainerIcon\"\n | \"shareWithGroup\"\n | \"shareWithUser\"\n>;\n\n// The group-rewrap builder verifies any required existing grant before capturing\n// the container KEK, then returns a check/rewrap pair. A verified non-match is\n// distinct from an unavailable preparation so security-critical callers can\n// no-op unrelated groups without failing open for a real grant.\nfunction createPrepareGroupRewrapMethod(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerContentsStore[\"prepareGroupRewrap\"] {\n return async (containerId, groupId, accessLevel, options) => {\n const preparation = await chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n prepareContainerGroupRewrap(\n state,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n );\n return preparation?.status === \"prepared\"\n ? {\n isCurrent: (\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n ) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n verifyContainerGroupRewrapCurrent(\n state,\n containerId,\n groupId,\n accessLevel,\n expectedGroupHead,\n expectedContainerId,\n expectedOrganizationId,\n isCurrent,\n ),\n containerId,\n ),\n rewrap: () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n {\n ...options,\n knownContainerKeks: preparation.knownContainerKeks,\n // A prepared re-wrap is grant-preserving by definition, so\n // it never mints a grant and never needs the chosen name.\n requireExistingGrant: true,\n },\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n status: \"prepared\" as const,\n }\n : (preparation ?? null);\n };\n}\n\nfunction createContainerSharingMethods(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): Pick<ContainerWriteMethods, \"shareWithUser\" | \"shareWithGroup\"> {\n return {\n shareWithUser: (containerId, userId) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithUser(\n state,\n syncAgent,\n containerId,\n userId,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n shareWithGroup: (containerId, groupId, accessLevel, options) =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n false,\n (isCurrent) =>\n shareContainerWithGroup(\n state,\n syncAgent,\n containerId,\n groupId,\n accessLevel,\n options,\n isCurrent,\n ),\n containerId,\n { preserveResultOnLocalWrite: true },\n ),\n };\n}\n\nfunction createDeleteContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"deleteContainer\"] {\n return (containerId) => {\n const current = captureContainerWriteGeneration(state);\n const remoteDelete = () =>\n chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n (isCurrent) =>\n deleteContainer(state, syncAgent, containerId, isCurrent),\n containerId,\n ).then((node) => node !== null);\n if (state.containersById.get(containerId)?.record.documentId)\n return remoteDelete();\n let promoted = false;\n return chainContainerWrite(\n state,\n (isCurrent) => {\n // Promotion can win while this local operation was queued. Hand it to\n // the remote queue after releasing the local chain, before any HTTP I/O.\n promoted = Boolean(\n state.containersById.get(containerId)?.record.documentId,\n );\n return promoted\n ? Promise.resolve(null)\n : deleteContainer(state, syncAgent, containerId, isCurrent);\n },\n [containerId],\n ).then((node) => (promoted && current() ? remoteDelete() : node !== null));\n };\n}\n\nfunction createEnsureSystemContainerMethod(\n state: ContainerContentsStoreState,\n syncAgent: ContainerContentsStoreSyncAgent,\n): ContainerContentsStore[\"ensureSystemContainer\"] {\n return (systemSlot, name, options) => {\n const work = (isCurrent: () => boolean) =>\n ensureSystemContainer(\n state,\n syncAgent,\n systemSlot,\n name,\n options,\n isCurrent,\n );\n const rootId = findRootContainerState(state)?.container.id;\n return options?.deferRemoteBootstrap\n ? chainContainerWrite(state, work, [])\n : chainRemoteContainerTask(\n state,\n syncAgent,\n null,\n work,\n rootId ? { rootId, systemSlot } : undefined,\n );\n };\n}\n\nexport function createContainerWriteMethods(\n state: ContainerContentsStoreState,\n syncAgent: ReturnType<typeof createContainerContentsStoreSyncAgent>,\n): ContainerWriteMethods {\n return {\n ...createContainerSharingMethods(state, syncAgent),\n createChild: (parentId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n createChildContainer(state, syncAgent, parentId, name, isCurrent),\n [parentId],\n ),\n deleteContainer: createDeleteContainerMethod(state, syncAgent),\n purgeContainer: (containerId, options) =>\n chainPurgeAfterScopeMoves(\n state,\n syncAgent,\n containerId,\n options,\n (isCurrent) =>\n purgeContainer(state, syncAgent, containerId, options, isCurrent),\n ),\n emptyTrash: (trashContainerId, options) =>\n chainPurgeAfterScopeMoves(\n state,\n syncAgent,\n trashContainerId,\n options,\n (isCurrent) =>\n emptyTrash(state, syncAgent, trashContainerId, options, isCurrent),\n ),\n ensureSystemContainer: createEnsureSystemContainerMethod(state, syncAgent),\n forgetOrganizationContent: createForgetOrganizationContentMethod(\n state,\n chainContainerWrite,\n ),\n moveContainer: (containerId, parentId) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n moveContainer(state, syncAgent, containerId, parentId, isCurrent),\n [containerId, parentId],\n containerId,\n ),\n prepareGroupRewrap: createPrepareGroupRewrapMethod(state, syncAgent),\n renameContainer: (containerId, name) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n renameContainer(state, syncAgent, containerId, name, isCurrent),\n [containerId],\n ),\n setContainerIcon: (containerId, icon) =>\n chainContainerWrite(\n state,\n (isCurrent) =>\n setContainerIcon(state, syncAgent, containerId, icon, isCurrent),\n [containerId],\n ),\n };\n}\n\nfunction createContainerContentsStoreEntry(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStoreEntry {\n const state = createContainerContentsStoreState(\n initialRuntime,\n options.persistence ?? persistence,\n options.logLabel,\n );\n const syncAgent = createContainerContentsStoreSyncAgent({\n host: createContainerContentsStoreSyncHost(state),\n state,\n });\n const writeMethods = createContainerWriteMethods(state, syncAgent);\n\n return {\n requestDocumentPriming: () => {\n state.documentStoresNeedPriming = true;\n syncAgent.scheduleSync();\n },\n store: {\n ...writeMethods,\n refresh: () => syncAgent.refresh({ resetAllLaneWatermarks: true }),\n refreshRootLane: (options) => syncAgent.refreshRootLane(options),\n // Force an on-demand local SQLite re-read (see the interface doc): arm the\n // gate refreshLocalContainerStates otherwise requires, which the runtime\n // auto-arms only on a context transition an on-demand caller cannot rely on.\n refreshLocalContainers: () => {\n state.localContainersNeedRefresh = true;\n return syncAgent.refreshLocalContainers();\n },\n requestSync: () => syncAgent.scheduleSync(),\n getCachedContainerWriterProjection: (containerId) =>\n getCachedContainerWriterProjectionForStore(state, containerId),\n getSnapshot: () => state.snapshot,\n subscribe: (listener) =>\n subscribeToContainerContentsStore(state, listener),\n updateRuntime: (runtime) =>\n updateContainerContentsStoreRuntime(state, runtime, syncAgent),\n },\n updateOptions: (nextOptions) =>\n applyContainerContentsStoreOptions(state, syncAgent, nextOptions),\n };\n}\n\nexport function createContainerContentsStore(\n initialRuntime: ContainerContentsStoreRuntime,\n persistence: ContainerContentsPersistence = defaultContainerContentsPersistence,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n return createContainerContentsStoreEntry(initialRuntime, persistence, options)\n .store;\n}\n\nexport function getOrCreateContainerContentsStore(\n domainScope: DomainScope,\n runtime: ContainerContentsStoreRuntime,\n options: ContainerContentsStoreOptions = {},\n): ContainerContentsStore {\n const existingEntry = containerContentsStoresByScope.get(domainScope);\n if (existingEntry) {\n existingEntry.updateOptions(options);\n return existingEntry.store;\n }\n\n const nextEntry = createContainerContentsStoreEntry(\n runtime,\n defaultContainerContentsPersistence,\n options,\n );\n containerContentsStoresByScope.set(domainScope, nextEntry);\n return nextEntry.store;\n}\n\n/**\n * Arm the next structural pass's document-priming scan for a domain scope.\n * Priming normally re-arms only on store creation and topology changes, so a\n * caller that just tore down a document's local state uses this to have the\n * still-listed server document re-created without waiting for an app\n * restart. Returns false when the scope has no container-contents store yet;\n * the startup priming pass covers that case.\n */\nexport function requestContainerContentsDocumentPriming(\n domainScope: DomainScope,\n): boolean {\n const entry = containerContentsStoresByScope.get(domainScope);\n if (!entry) {\n return false;\n }\n\n entry.requestDocumentPriming();\n return true;\n}\n"]}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { removeOrganizationContentUnlessPending } from "../../../workflows/container-contents/syncPause/documentRemoval.js";
|
|
2
|
+
import { reclaimDocumentOrphanBlobs } from "../../../workflows/documents/index.js";
|
|
3
|
+
import { getOrCreateOrganizationSyncPauses, isRetainedWhileSyncPaused, } from "../../../workflows/sync/index.js";
|
|
4
|
+
import { emitPersistedDocumentDeletion, hasQueuedDocumentStoreWrites, restoreDocumentStore, retireDocumentStore, } from "../../documents/registry.js";
|
|
5
|
+
import { updateContainerContentsSnapshot } from "../state.js";
|
|
6
|
+
/** The local containers forgetting an organization's content removes. */
|
|
7
|
+
function listForgettableOrganizationContainerIds(state, organizationId) {
|
|
8
|
+
return [...state.containersById.values()].flatMap(({ container }) => container.organizationId === organizationId &&
|
|
9
|
+
!isRetainedWhileSyncPaused(container)
|
|
10
|
+
? [container.id]
|
|
11
|
+
: []);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Removes one organization's content from this device after its sync was
|
|
15
|
+
* paused: every container except its retained metadata root, and every
|
|
16
|
+
* document placed only in those containers. Nothing changes on the server, so
|
|
17
|
+
* resuming downloads it again.
|
|
18
|
+
*
|
|
19
|
+
* Unsynced work is never removed: the removal refuses while any pending write
|
|
20
|
+
* touches the organization, checked under the same lock as the deletions, and
|
|
21
|
+
* while an open store holds edits for any of its documents that have not
|
|
22
|
+
* reached SQLite. It also refuses the session's active organization, whose
|
|
23
|
+
* root the session still writes to. Returns whether nothing is left to retry.
|
|
24
|
+
*/
|
|
25
|
+
async function forgetOrganizationContent(state, organizationId, isCurrent) {
|
|
26
|
+
if (state.runtime.infra.dbStatus !== "ready" || !state.snapshot.ready) {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
if (state.runtime.auth.organizationId === organizationId)
|
|
30
|
+
return false;
|
|
31
|
+
const containerIds = listForgettableOrganizationContainerIds(state, organizationId);
|
|
32
|
+
const { documentProjectors, execSql } = state.runtime.infra;
|
|
33
|
+
const { domainScope } = state.runtime.state;
|
|
34
|
+
// Switching into the organization mid-removal stops it before any deletion.
|
|
35
|
+
const stillCurrent = () => isCurrent() && state.runtime.auth.organizationId !== organizationId;
|
|
36
|
+
await state.persistence.ensureSchema(execSql);
|
|
37
|
+
const pauses = getOrCreateOrganizationSyncPauses(domainScope);
|
|
38
|
+
const removal = await removeOrganizationContentUnlessPending({
|
|
39
|
+
containerIds,
|
|
40
|
+
deleteContainers: (lockedExecSql, removals) => state.persistence.deleteContainers(lockedExecSql, removals, {
|
|
41
|
+
stillCurrent,
|
|
42
|
+
}),
|
|
43
|
+
documentProjectors,
|
|
44
|
+
execSql,
|
|
45
|
+
hasQueuedWrites: (localId) => hasQueuedDocumentStoreWrites(domainScope, localId),
|
|
46
|
+
organizationId,
|
|
47
|
+
restoreDocument: (localId) => restoreDocumentStore(domainScope, localId),
|
|
48
|
+
retireDocument: (localId) => retireDocumentStore(domainScope, localId, () => pauses.isOrganizationPaused(organizationId)),
|
|
49
|
+
stillCurrent,
|
|
50
|
+
});
|
|
51
|
+
for (const localId of removal.deletedLocalIds) {
|
|
52
|
+
emitPersistedDocumentDeletion(domainScope, localId);
|
|
53
|
+
}
|
|
54
|
+
if (removal.deletedLocalIds.length > 0) {
|
|
55
|
+
void reclaimDocumentOrphanBlobs(state.runtime);
|
|
56
|
+
}
|
|
57
|
+
for (const containerId of removal.deletedContainerIds) {
|
|
58
|
+
state.containersById.delete(containerId);
|
|
59
|
+
}
|
|
60
|
+
if (removal.deletedContainerIds.length > 0 && state.initialized) {
|
|
61
|
+
updateContainerContentsSnapshot(state);
|
|
62
|
+
}
|
|
63
|
+
return removal.status === "removed";
|
|
64
|
+
}
|
|
65
|
+
/** Runs `forgetOrganizationContent` in the store's container write chain. */
|
|
66
|
+
export function createForgetOrganizationContentMethod(state, chainContainerWrite) {
|
|
67
|
+
return async (organizationId) => {
|
|
68
|
+
let forgotten = false;
|
|
69
|
+
await chainContainerWrite(state, async (isCurrent) => {
|
|
70
|
+
forgotten = await forgetOrganizationContent(state, organizationId, isCurrent);
|
|
71
|
+
return null;
|
|
72
|
+
}, listForgettableOrganizationContainerIds(state, organizationId));
|
|
73
|
+
return forgotten;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=forgetOrganizationContentOperation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"forgetOrganizationContentOperation.js","sourceRoot":"","sources":["forgetOrganizationContentOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sCAAsC,EAAE,MAAM,iEAAiE,CAAC;AACzH,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC1E,OAAO,EACL,iCAAiC,EACjC,yBAAyB,GAC1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC5B,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,+BAA+B,EAAE,MAAM,UAAU,CAAC;AAG3D,yEAAyE;AACzE,SAAS,uCAAuC,CAC9C,KAA0D,EAC1D,cAAsB;IAEtB,OAAO,CAAC,GAA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AAK,EACL,KAAK,EAAE,SAAS,EAAE,EAAE;YAClB,SAAS,GAAG,MAAM,yBAAyB,CACzC,KAAK,EACL,cAAc,EACd,SAAS,CACV,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC,EACD,uCAAuC,CAAC,KAAK,EAAE,cAAc,CAAC,CAC/D,CAAC;QACF,OAAO,SAAS,CAAC;IACnB,CAAC,CAAC;AACJ,CAAC","sourcesContent":["import { removeOrganizationContentUnlessPending } from \"../../../workflows/container-contents/syncPause/documentRemoval\";\nimport { reclaimDocumentOrphanBlobs } from \"../../../workflows/documents\";\nimport {\n getOrCreateOrganizationSyncPauses,\n isRetainedWhileSyncPaused,\n} from \"../../../workflows/sync\";\nimport {\n emitPersistedDocumentDeletion,\n hasQueuedDocumentStoreWrites,\n restoreDocumentStore,\n retireDocumentStore,\n} from \"../../documents/registry\";\nimport type { ContainerWriteGuard } from \"../remoteWrites/writeGeneration\";\nimport { updateContainerContentsSnapshot } from \"../state\";\nimport type { ContainerContentsStoreState } from \"../types\";\n\n/** The local containers forgetting an organization's content removes. */\nfunction listForgettableOrganizationContainerIds(\n state: Pick<ContainerContentsStoreState, \"containersById\">,\n organizationId: string,\n): string[] {\n return [...state.containersById.values()].flatMap(({ container }) =>\n container.organizationId === organizationId &&\n !isRetainedWhileSyncPaused(container)\n ? [container.id]\n : [],\n );\n}\n\n/**\n * Removes one organization's content from this device after its sync was\n * paused: every container except its retained metadata root, and every\n * document placed only in those containers. Nothing changes on the server, so\n * resuming downloads it again.\n *\n * Unsynced work is never removed: the removal refuses while any pending write\n * touches the organization, checked under the same lock as the deletions, and\n * while an open store holds edits for any of its documents that have not\n * reached SQLite. It also refuses the session's active organization, whose\n * root the session still writes to. Returns whether nothing is left to retry.\n */\nasync function forgetOrganizationContent(\n state: ContainerContentsStoreState,\n organizationId: string,\n isCurrent: ContainerWriteGuard,\n): Promise<boolean> {\n if (state.runtime.infra.dbStatus !== \"ready\" || !state.snapshot.ready) {\n return false;\n }\n if (state.runtime.auth.organizationId === organizationId) return false;\n const containerIds = listForgettableOrganizationContainerIds(\n state,\n organizationId,\n );\n const { documentProjectors, execSql } = state.runtime.infra;\n const { domainScope } = state.runtime.state;\n // Switching into the organization mid-removal stops it before any deletion.\n const stillCurrent = () =>\n isCurrent() && state.runtime.auth.organizationId !== organizationId;\n await state.persistence.ensureSchema(execSql);\n const pauses = getOrCreateOrganizationSyncPauses(domainScope);\n const removal = await removeOrganizationContentUnlessPending({\n containerIds,\n deleteContainers: (lockedExecSql, removals) =>\n state.persistence.deleteContainers(lockedExecSql, removals, {\n stillCurrent,\n }),\n documentProjectors,\n execSql,\n hasQueuedWrites: (localId) =>\n hasQueuedDocumentStoreWrites(domainScope, localId),\n organizationId,\n restoreDocument: (localId) => restoreDocumentStore(domainScope, localId),\n retireDocument: (localId) =>\n retireDocumentStore(domainScope, localId, () =>\n pauses.isOrganizationPaused(organizationId),\n ),\n stillCurrent,\n });\n for (const localId of removal.deletedLocalIds) {\n emitPersistedDocumentDeletion(domainScope, localId);\n }\n if (removal.deletedLocalIds.length > 0) {\n void reclaimDocumentOrphanBlobs(state.runtime);\n }\n for (const containerId of removal.deletedContainerIds) {\n state.containersById.delete(containerId);\n }\n if (removal.deletedContainerIds.length > 0 && state.initialized) {\n updateContainerContentsSnapshot(state);\n }\n return removal.status === \"removed\";\n}\n\ntype ContainerWriteChain = (\n state: ContainerContentsStoreState,\n work: (isCurrent: () => boolean) => ContainerContentsStoreState[\"writeChain\"],\n changedIds: readonly string[],\n) => ContainerContentsStoreState[\"writeChain\"];\n\n/** Runs `forgetOrganizationContent` in the store's container write chain. */\nexport function createForgetOrganizationContentMethod(\n state: ContainerContentsStoreState,\n chainContainerWrite: ContainerWriteChain,\n): (organizationId: string) => Promise<boolean> {\n return async (organizationId) => {\n let forgotten = false;\n await chainContainerWrite(\n state,\n async (isCurrent) => {\n forgotten = await forgetOrganizationContent(\n state,\n organizationId,\n isCurrent,\n );\n return null;\n },\n listForgettableOrganizationContainerIds(state, organizationId),\n );\n return forgotten;\n };\n}\n"]}
|
|
@@ -53,6 +53,12 @@ export interface ContainerContentsStore {
|
|
|
53
53
|
moveContainer: (containerId: string, parentId: string) => Promise<ContainerNode | null>;
|
|
54
54
|
purgeContainer: (containerId: string, options?: PurgeOptions) => Promise<boolean>;
|
|
55
55
|
emptyTrash: (trashContainerId: string, options?: PurgeOptions) => Promise<boolean>;
|
|
56
|
+
/**
|
|
57
|
+
* Removes a paused organization's content from this device: every container
|
|
58
|
+
* except its metadata root, and every document placed only in them. Local
|
|
59
|
+
* only; the caller first confirms the organization has no unsynced writes.
|
|
60
|
+
*/
|
|
61
|
+
forgetOrganizationContent: (organizationId: string) => Promise<boolean>;
|
|
56
62
|
prepareGroupRewrap: (containerId: string, groupId: string, accessLevel: ContainerContentsShareAccessLevel, options?: {
|
|
57
63
|
requireExistingGrant?: boolean;
|
|
58
64
|
} | undefined) => Promise<ContainerGroupRewrapPreparation | null>;
|