@tearleads/client-sdk 0.1.88 → 0.1.89
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/client/index.d.ts +1 -1
- package/client/index.js.map +1 -1
- package/client/organizations/index.d.ts +1 -1
- package/client/organizations/index.js +9 -5
- package/client/organizations/index.js.map +1 -1
- package/client/organizations/organizationMemberships.d.ts +12 -1
- package/client/organizations/organizationMemberships.js +36 -2
- package/client/organizations/organizationMemberships.js.map +1 -1
- package/client/organizations/organizationReadModels.d.ts +7 -1
- package/client/organizations/organizationReadModels.js +15 -6
- package/client/organizations/organizationReadModels.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelPersistence.js +14 -0
- package/data/persistence/organizations/organizationReadModelPersistence.js.map +1 -1
- package/data/persistence/organizations/organizationReadModelProjection.js +12 -0
- package/data/persistence/organizations/organizationReadModelProjection.js.map +1 -1
- package/data/sqlite/schema/index.d.ts +19 -0
- package/data/sqlite/schema/organizationReadModelSchema.js +2 -0
- package/data/sqlite/schema/organizationReadModelSchema.js.map +1 -1
- package/data/sqlite/schema/organizationReadModelTableRegistry.d.ts +19 -0
- package/index.d.ts +1 -1
- package/index.js.map +1 -1
- package/internal/api-client/ApiClient.d.ts +10 -0
- package/internal/api-client/ApiClient.js +8 -2
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/routes/organizations/memberships.js +20 -1
- package/internal/api-client/routes/organizations/memberships.js.map +1 -1
- package/internal/crypto/index.d.ts +1 -0
- package/internal/crypto/index.js +1 -0
- package/internal/crypto/index.js.map +1 -1
- package/internal/crypto/organizationLeaveRequest.d.ts +13 -0
- package/internal/crypto/organizationLeaveRequest.js +39 -0
- package/internal/crypto/organizationLeaveRequest.js.map +1 -0
- package/internal/validators/operation/index.d.ts +1 -1
- package/internal/validators/operation/index.js +1 -1
- package/internal/validators/operation/index.js.map +1 -1
- package/internal/validators/operation/organizationMemberships.d.ts +263 -0
- package/internal/validators/operation/organizationMemberships.js +42 -0
- package/internal/validators/operation/organizationMemberships.js.map +1 -1
- package/internal/validators/operation/organizations.d.ts +48 -0
- package/internal/validators/operation/registry.d.ts +3 -1
- package/internal/validators/operation/registry.js +3 -1
- package/internal/validators/operation/registry.js.map +1 -1
- package/internal/validators/response/organization.d.ts +82 -0
- package/internal/validators/response/organization.js +6 -0
- package/internal/validators/response/organization.js.map +1 -1
- package/internal/validators/response/organizationMembership.d.ts +12 -2
- package/internal/validators/response/organizationMembership.js +5 -2
- package/internal/validators/response/organizationMembership.js.map +1 -1
- package/internal/validators/response/organizationReadModel.d.ts +60 -0
- package/internal/validators/util/index.d.ts +1 -0
- package/internal/validators/util/index.js +1 -0
- package/internal/validators/util/index.js.map +1 -1
- package/internal/validators/util/organizationLeaveRequest.d.ts +15 -0
- package/internal/validators/util/organizationLeaveRequest.js +22 -0
- package/internal/validators/util/organizationLeaveRequest.js.map +1 -0
- package/package.json +1 -1
- package/workflows/organizations/index.d.ts +2 -0
- package/workflows/organizations/index.js +2 -0
- package/workflows/organizations/index.js.map +1 -1
- package/workflows/organizations/memberships/leaveRequest.d.ts +31 -0
- package/workflows/organizations/memberships/leaveRequest.js +20 -0
- package/workflows/organizations/memberships/leaveRequest.js.map +1 -0
- package/workflows/organizations/memberships/leaveRequestVerification.d.ts +15 -0
- package/workflows/organizations/memberships/leaveRequestVerification.js +46 -0
- package/workflows/organizations/memberships/leaveRequestVerification.js.map +1 -0
|
@@ -2,6 +2,7 @@ import { z } from "zod";
|
|
|
2
2
|
import { isUpdateOrganizationMembershipRequest, UpdateOrganizationMembershipRequestSchema, } from "../request/index.js";
|
|
3
3
|
import { ErrorResponseSchema, isOrganizationMembershipResponse, isOrganizationMembershipsResponse, OrganizationMembershipResponseSchema, OrganizationMembershipsResponseSchema, SessionFailureResponseSchema, } from "../response/index.js";
|
|
4
4
|
import { uuidV4StringSchema } from "../schema.js";
|
|
5
|
+
import { isOrganizationLeaveRequest, OrganizationLeaveRequestSchema, } from "../util/organizationLeaveRequest.js";
|
|
5
6
|
import { defineJsonOperation } from "./definition.js";
|
|
6
7
|
/**
|
|
7
8
|
* The session user's conduit to the organizations they belong to: one row per
|
|
@@ -45,6 +46,47 @@ export const updateOrganizationMembershipOperation = defineJsonOperation({
|
|
|
45
46
|
200: OrganizationMembershipResponseSchema,
|
|
46
47
|
},
|
|
47
48
|
});
|
|
49
|
+
/**
|
|
50
|
+
* Files the session user's signed request to leave one organization. It is a
|
|
51
|
+
* request, not a removal: an administrator acts on it by signing the member's
|
|
52
|
+
* removal, which clears it.
|
|
53
|
+
*/
|
|
54
|
+
export const requestOrganizationLeaveOperation = defineJsonOperation({
|
|
55
|
+
auth: "session",
|
|
56
|
+
body: OrganizationLeaveRequestSchema,
|
|
57
|
+
failureResponses: {
|
|
58
|
+
400: ErrorResponseSchema,
|
|
59
|
+
401: SessionFailureResponseSchema,
|
|
60
|
+
404: ErrorResponseSchema,
|
|
61
|
+
409: ErrorResponseSchema,
|
|
62
|
+
500: ErrorResponseSchema,
|
|
63
|
+
},
|
|
64
|
+
failureStatuses: [400, 401, 404, 409, 500],
|
|
65
|
+
id: "organizationMemberships.leaveRequest.put",
|
|
66
|
+
method: "PUT",
|
|
67
|
+
params: OrganizationMembershipPathParamsSchema,
|
|
68
|
+
path: "/organization-memberships/{organizationId}/leave-request",
|
|
69
|
+
responses: {
|
|
70
|
+
200: OrganizationMembershipResponseSchema,
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
export const withdrawOrganizationLeaveRequestOperation = defineJsonOperation({
|
|
74
|
+
auth: "session",
|
|
75
|
+
failureResponses: {
|
|
76
|
+
401: SessionFailureResponseSchema,
|
|
77
|
+
404: ErrorResponseSchema,
|
|
78
|
+
500: ErrorResponseSchema,
|
|
79
|
+
},
|
|
80
|
+
failureStatuses: [401, 404, 500],
|
|
81
|
+
id: "organizationMemberships.leaveRequest.delete",
|
|
82
|
+
method: "DELETE",
|
|
83
|
+
params: OrganizationMembershipPathParamsSchema,
|
|
84
|
+
path: "/organization-memberships/{organizationId}/leave-request",
|
|
85
|
+
responses: {
|
|
86
|
+
200: OrganizationMembershipResponseSchema,
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
export const isRequestOrganizationLeaveOperationRequest = isOrganizationLeaveRequest;
|
|
48
90
|
export const isListOrganizationMembershipsOperationResponse = isOrganizationMembershipsResponse;
|
|
49
91
|
export const isUpdateOrganizationMembershipOperationRequest = isUpdateOrganizationMembershipRequest;
|
|
50
92
|
export const isUpdateOrganizationMembershipOperationResponse = isOrganizationMembershipResponse;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organizationMemberships.js","sourceRoot":"","sources":["organizationMemberships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,iCAAiC,EACjC,oCAAoC,EACpC,qCAAqC,EACrC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEnD;;;;GAIG;AACH,MAAM,CAAC,MAAM,sCAAsC,GAAG,CAAC,CAAC,YAAY,CAAC;IACnE,cAAc,EAAE,kBAAkB;CACnC,CAAC,CAAC;AAMH,MAAM,CAAC,MAAM,oCAAoC,GAAG,mBAAmB,CAAC;IACtE,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,CAAC;IAC3B,EAAE,EAAE,8BAA8B;IAClC,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC;IAC1B,IAAI,EAAE,2BAA2B;IACjC,SAAS,EAAE;QACT,GAAG,EAAE,qCAAqC;KAC3C;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,qCAAqC,GAAG,mBAAmB,CAAC;IACvE,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,yCAAyC;IAC/C,gBAAgB,EAAE;QAChB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1C,EAAE,EAAE,gCAAgC;IACpC,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,sCAAsC;IAC9C,IAAI,EAAE,4CAA4C;IAClD,SAAS,EAAE;QACT,GAAG,EAAE,oCAAoC;KAC1C;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,8CAA8C,GACzD,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,8CAA8C,GACzD,qCAAqC,CAAC;AACxC,MAAM,CAAC,MAAM,+CAA+C,GAC1D,gCAAgC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n isUpdateOrganizationMembershipRequest,\n UpdateOrganizationMembershipRequestSchema,\n} from \"../request\";\nimport {\n ErrorResponseSchema,\n isOrganizationMembershipResponse,\n isOrganizationMembershipsResponse,\n OrganizationMembershipResponseSchema,\n OrganizationMembershipsResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport { uuidV4StringSchema } from \"../schema\";\nimport { defineJsonOperation } from \"./definition\";\n\n/**\n * The session user's conduit to the organizations they belong to: one row per\n * active roster entry, carrying the user's own choices. Each operation reads or\n * writes only the session user's rows, so it needs no organization role.\n */\nexport const OrganizationMembershipPathParamsSchema = z.strictObject({\n organizationId: uuidV4StringSchema,\n});\n\nexport type OrganizationMembershipPathParams = z.infer<\n typeof OrganizationMembershipPathParamsSchema\n>;\n\nexport const listOrganizationMembershipsOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"organizationMemberships.list\",\n method: \"GET\",\n params: z.strictObject({}),\n path: \"/organization-memberships\",\n responses: {\n 200: OrganizationMembershipsResponseSchema,\n },\n});\n\nexport const updateOrganizationMembershipOperation = defineJsonOperation({\n auth: \"session\",\n body: UpdateOrganizationMembershipRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 404, 409, 500],\n id: \"organizationMemberships.update\",\n method: \"PUT\",\n params: OrganizationMembershipPathParamsSchema,\n path: \"/organization-memberships/{organizationId}\",\n responses: {\n 200: OrganizationMembershipResponseSchema,\n },\n});\n\nexport const isListOrganizationMembershipsOperationResponse =\n isOrganizationMembershipsResponse;\nexport const isUpdateOrganizationMembershipOperationRequest =\n isUpdateOrganizationMembershipRequest;\nexport const isUpdateOrganizationMembershipOperationResponse =\n isOrganizationMembershipResponse;\n"]}
|
|
1
|
+
{"version":3,"file":"organizationMemberships.js","sourceRoot":"","sources":["organizationMemberships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,qCAAqC,EACrC,yCAAyC,GAC1C,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,mBAAmB,EACnB,gCAAgC,EAChC,iCAAiC,EACjC,oCAAoC,EACpC,qCAAqC,EACrC,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAE,mBAAm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QACxB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAC1C,EAAE,EAAE,0CAA0C;IAC9C,MAAM,EAAE,KAAK;IACb,MAAM,EAAE,sCAAsC;IAC9C,IAAI,EAAE,0DAA0D;IAChE,SAAS,EAAE;QACT,GAAG,EAAE,oCAAoC;KAC1C;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,yCAAyC,GAAG,mBAAmB,CAAC;IAC3E,IAAI,EAAE,SAAS;IACf,gBAAgB,EAAE;QAChB,GAAG,EAAE,4BAA4B;QACjC,GAAG,EAAE,mBAAmB;QACxB,GAAG,EAAE,mBAAmB;KACzB;IACD,eAAe,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;IAChC,EAAE,EAAE,6CAA6C;IACjD,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,sCAAsC;IAC9C,IAAI,EAAE,0DAA0D;IAChE,SAAS,EAAE;QACT,GAAG,EAAE,oCAAoC;KAC1C;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,0CAA0C,GACrD,0BAA0B,CAAC;AAC7B,MAAM,CAAC,MAAM,8CAA8C,GACzD,iCAAiC,CAAC;AACpC,MAAM,CAAC,MAAM,8CAA8C,GACzD,qCAAqC,CAAC;AACxC,MAAM,CAAC,MAAM,+CAA+C,GAC1D,gCAAgC,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n isUpdateOrganizationMembershipRequest,\n UpdateOrganizationMembershipRequestSchema,\n} from \"../request\";\nimport {\n ErrorResponseSchema,\n isOrganizationMembershipResponse,\n isOrganizationMembershipsResponse,\n OrganizationMembershipResponseSchema,\n OrganizationMembershipsResponseSchema,\n SessionFailureResponseSchema,\n} from \"../response\";\nimport { uuidV4StringSchema } from \"../schema\";\nimport {\n isOrganizationLeaveRequest,\n OrganizationLeaveRequestSchema,\n} from \"../util/organizationLeaveRequest\";\nimport { defineJsonOperation } from \"./definition\";\n\n/**\n * The session user's conduit to the organizations they belong to: one row per\n * active roster entry, carrying the user's own choices. Each operation reads or\n * writes only the session user's rows, so it needs no organization role.\n */\nexport const OrganizationMembershipPathParamsSchema = z.strictObject({\n organizationId: uuidV4StringSchema,\n});\n\nexport type OrganizationMembershipPathParams = z.infer<\n typeof OrganizationMembershipPathParamsSchema\n>;\n\nexport const listOrganizationMembershipsOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 500],\n id: \"organizationMemberships.list\",\n method: \"GET\",\n params: z.strictObject({}),\n path: \"/organization-memberships\",\n responses: {\n 200: OrganizationMembershipsResponseSchema,\n },\n});\n\nexport const updateOrganizationMembershipOperation = defineJsonOperation({\n auth: \"session\",\n body: UpdateOrganizationMembershipRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 404, 409, 500],\n id: \"organizationMemberships.update\",\n method: \"PUT\",\n params: OrganizationMembershipPathParamsSchema,\n path: \"/organization-memberships/{organizationId}\",\n responses: {\n 200: OrganizationMembershipResponseSchema,\n },\n});\n\n/**\n * Files the session user's signed request to leave one organization. It is a\n * request, not a removal: an administrator acts on it by signing the member's\n * removal, which clears it.\n */\nexport const requestOrganizationLeaveOperation = defineJsonOperation({\n auth: \"session\",\n body: OrganizationLeaveRequestSchema,\n failureResponses: {\n 400: ErrorResponseSchema,\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 409: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [400, 401, 404, 409, 500],\n id: \"organizationMemberships.leaveRequest.put\",\n method: \"PUT\",\n params: OrganizationMembershipPathParamsSchema,\n path: \"/organization-memberships/{organizationId}/leave-request\",\n responses: {\n 200: OrganizationMembershipResponseSchema,\n },\n});\n\nexport const withdrawOrganizationLeaveRequestOperation = defineJsonOperation({\n auth: \"session\",\n failureResponses: {\n 401: SessionFailureResponseSchema,\n 404: ErrorResponseSchema,\n 500: ErrorResponseSchema,\n },\n failureStatuses: [401, 404, 500],\n id: \"organizationMemberships.leaveRequest.delete\",\n method: \"DELETE\",\n params: OrganizationMembershipPathParamsSchema,\n path: \"/organization-memberships/{organizationId}/leave-request\",\n responses: {\n 200: OrganizationMembershipResponseSchema,\n },\n});\n\nexport const isRequestOrganizationLeaveOperationRequest =\n isOrganizationLeaveRequest;\nexport const isListOrganizationMembershipsOperationResponse =\n isOrganizationMembershipsResponse;\nexport const isUpdateOrganizationMembershipOperationRequest =\n isUpdateOrganizationMembershipRequest;\nexport const isUpdateOrganizationMembershipOperationResponse =\n isOrganizationMembershipResponse;\n"]}
|
|
@@ -7454,6 +7454,12 @@ export declare const getOrganizationReadModelOperation: Omit<{
|
|
|
7454
7454
|
isPersonalOrganizationOwner: boolean;
|
|
7455
7455
|
isSelf: boolean;
|
|
7456
7456
|
joinedAt: string;
|
|
7457
|
+
leaveRequest: {
|
|
7458
|
+
organizationId: string;
|
|
7459
|
+
userId: string;
|
|
7460
|
+
requestedAt: string;
|
|
7461
|
+
signature: string;
|
|
7462
|
+
} | null;
|
|
7457
7463
|
profileDocumentId: string | null;
|
|
7458
7464
|
signingKeyFingerprint: string;
|
|
7459
7465
|
signingPublicKey: string;
|
|
@@ -7469,6 +7475,12 @@ export declare const getOrganizationReadModelOperation: Omit<{
|
|
|
7469
7475
|
isPersonalOrganizationOwner: boolean;
|
|
7470
7476
|
isSelf: boolean;
|
|
7471
7477
|
joinedAt: string;
|
|
7478
|
+
leaveRequest: {
|
|
7479
|
+
organizationId: string;
|
|
7480
|
+
userId: string;
|
|
7481
|
+
requestedAt: string;
|
|
7482
|
+
signature: string;
|
|
7483
|
+
} | null;
|
|
7472
7484
|
profileDocumentId: string | null;
|
|
7473
7485
|
signingKeyFingerprint: string;
|
|
7474
7486
|
signingPublicKey: string;
|
|
@@ -7595,6 +7607,12 @@ export declare const getOrganizationReadModelOperation: Omit<{
|
|
|
7595
7607
|
isPersonalOrganizationOwner: boolean;
|
|
7596
7608
|
isSelf: boolean;
|
|
7597
7609
|
joinedAt: string;
|
|
7610
|
+
leaveRequest: {
|
|
7611
|
+
organizationId: string;
|
|
7612
|
+
userId: string;
|
|
7613
|
+
requestedAt: string;
|
|
7614
|
+
signature: string;
|
|
7615
|
+
} | null;
|
|
7598
7616
|
profileDocumentId: string | null;
|
|
7599
7617
|
signingKeyFingerprint: string;
|
|
7600
7618
|
signingPublicKey: string;
|
|
@@ -7610,6 +7628,12 @@ export declare const getOrganizationReadModelOperation: Omit<{
|
|
|
7610
7628
|
isPersonalOrganizationOwner: boolean;
|
|
7611
7629
|
isSelf: boolean;
|
|
7612
7630
|
joinedAt: string;
|
|
7631
|
+
leaveRequest: {
|
|
7632
|
+
organizationId: string;
|
|
7633
|
+
userId: string;
|
|
7634
|
+
requestedAt: string;
|
|
7635
|
+
signature: string;
|
|
7636
|
+
} | null;
|
|
7613
7637
|
profileDocumentId: string | null;
|
|
7614
7638
|
signingKeyFingerprint: string;
|
|
7615
7639
|
signingPublicKey: string;
|
|
@@ -10749,6 +10773,12 @@ export declare const updateOrganizationRosterEntryOperation: Omit<{
|
|
|
10749
10773
|
isPersonalOrganizationOwner: boolean;
|
|
10750
10774
|
isSelf: boolean;
|
|
10751
10775
|
joinedAt: string;
|
|
10776
|
+
leaveRequest: {
|
|
10777
|
+
organizationId: string;
|
|
10778
|
+
userId: string;
|
|
10779
|
+
requestedAt: string;
|
|
10780
|
+
signature: string;
|
|
10781
|
+
} | null;
|
|
10752
10782
|
profileDocumentId: string | null;
|
|
10753
10783
|
signingKeyFingerprint: string;
|
|
10754
10784
|
signingPublicKey: string;
|
|
@@ -10764,6 +10794,12 @@ export declare const updateOrganizationRosterEntryOperation: Omit<{
|
|
|
10764
10794
|
isPersonalOrganizationOwner: boolean;
|
|
10765
10795
|
isSelf: boolean;
|
|
10766
10796
|
joinedAt: string;
|
|
10797
|
+
leaveRequest: {
|
|
10798
|
+
organizationId: string;
|
|
10799
|
+
userId: string;
|
|
10800
|
+
requestedAt: string;
|
|
10801
|
+
signature: string;
|
|
10802
|
+
} | null;
|
|
10767
10803
|
profileDocumentId: string | null;
|
|
10768
10804
|
signingKeyFingerprint: string;
|
|
10769
10805
|
signingPublicKey: string;
|
|
@@ -10779,6 +10815,12 @@ export declare const updateOrganizationRosterEntryOperation: Omit<{
|
|
|
10779
10815
|
isPersonalOrganizationOwner: boolean;
|
|
10780
10816
|
isSelf: boolean;
|
|
10781
10817
|
joinedAt: string;
|
|
10818
|
+
leaveRequest: {
|
|
10819
|
+
organizationId: string;
|
|
10820
|
+
userId: string;
|
|
10821
|
+
requestedAt: string;
|
|
10822
|
+
signature: string;
|
|
10823
|
+
} | null;
|
|
10782
10824
|
profileDocumentId: string | null;
|
|
10783
10825
|
signingKeyFingerprint: string;
|
|
10784
10826
|
signingPublicKey: string;
|
|
@@ -10794,6 +10836,12 @@ export declare const updateOrganizationRosterEntryOperation: Omit<{
|
|
|
10794
10836
|
isPersonalOrganizationOwner: boolean;
|
|
10795
10837
|
isSelf: boolean;
|
|
10796
10838
|
joinedAt: string;
|
|
10839
|
+
leaveRequest: {
|
|
10840
|
+
organizationId: string;
|
|
10841
|
+
userId: string;
|
|
10842
|
+
requestedAt: string;
|
|
10843
|
+
signature: string;
|
|
10844
|
+
} | null;
|
|
10797
10845
|
profileDocumentId: string | null;
|
|
10798
10846
|
signingKeyFingerprint: string;
|
|
10799
10847
|
signingPublicKey: string;
|
|
@@ -13,7 +13,7 @@ import { getHealthOperation } from "./health.js";
|
|
|
13
13
|
import { getMultipartBlobStageOperation, initiateMultipartBlobStageOperation } from "./multipartBlobs.js";
|
|
14
14
|
import { authorizeMultipartBlobPartUploadOperation } from "./multipartPartUploads.js";
|
|
15
15
|
import { claimNativeOrganizationSubscriptionOperation, getOrganizationBillingHistoryOperation, getOrganizationBillingManagementUrlOperation, getOrganizationBillingOperation, getOrganizationNativePurchaseEligibilityOperation, startOrganizationTrialOperation } from "./organizationBilling.js";
|
|
16
|
-
import { listOrganizationMembershipsOperation, updateOrganizationMembershipOperation } from "./organizationMemberships.js";
|
|
16
|
+
import { listOrganizationMembershipsOperation, requestOrganizationLeaveOperation, updateOrganizationMembershipOperation, withdrawOrganizationLeaveRequestOperation } from "./organizationMemberships.js";
|
|
17
17
|
import { getOrganizationPolicyHistoryOperation } from "./organizationPolicyHistory.js";
|
|
18
18
|
import { createOrganizationGroupOperation, createOrganizationOperation, deleteOrganizationGroupOperation, getOrganizationDataUsageOperation, getOrganizationReadModelOperation, listOrganizationGroupMembersOperation, updateOrganizationProfileOperation, updateOrganizationRosterEntryOperation } from "./organizations.js";
|
|
19
19
|
import { commitOrganizationGroupPolicyOperation, getPrincipalPolicyOperation, putPrincipalPolicyOperation } from "./principals.js";
|
|
@@ -86,6 +86,8 @@ export declare const protocolOperations: readonly [
|
|
|
86
86
|
typeof updateOrganizationRosterEntryOperation,
|
|
87
87
|
typeof listOrganizationMembershipsOperation,
|
|
88
88
|
typeof updateOrganizationMembershipOperation,
|
|
89
|
+
typeof requestOrganizationLeaveOperation,
|
|
90
|
+
typeof withdrawOrganizationLeaveRequestOperation,
|
|
89
91
|
typeof getPrincipalPolicyOperation,
|
|
90
92
|
typeof getProjectionPolicyHistoryOperation,
|
|
91
93
|
typeof commitOrganizationGroupPolicyOperation,
|
|
@@ -13,7 +13,7 @@ import { getHealthOperation } from "./health.js";
|
|
|
13
13
|
import { getMultipartBlobStageOperation, initiateMultipartBlobStageOperation, } from "./multipartBlobs.js";
|
|
14
14
|
import { authorizeMultipartBlobPartUploadOperation } from "./multipartPartUploads.js";
|
|
15
15
|
import { claimNativeOrganizationSubscriptionOperation, getOrganizationBillingHistoryOperation, getOrganizationBillingManagementUrlOperation, getOrganizationBillingOperation, getOrganizationNativePurchaseEligibilityOperation, startOrganizationTrialOperation, } from "./organizationBilling.js";
|
|
16
|
-
import { listOrganizationMembershipsOperation, updateOrganizationMembershipOperation, } from "./organizationMemberships.js";
|
|
16
|
+
import { listOrganizationMembershipsOperation, requestOrganizationLeaveOperation, updateOrganizationMembershipOperation, withdrawOrganizationLeaveRequestOperation, } from "./organizationMemberships.js";
|
|
17
17
|
import { getOrganizationPolicyHistoryOperation } from "./organizationPolicyHistory.js";
|
|
18
18
|
import { createOrganizationGroupOperation, createOrganizationOperation, deleteOrganizationGroupOperation, getOrganizationDataUsageOperation, getOrganizationReadModelOperation, listOrganizationGroupMembersOperation, updateOrganizationProfileOperation, updateOrganizationRosterEntryOperation, } from "./organizations.js";
|
|
19
19
|
import { commitOrganizationGroupPolicyOperation, getPrincipalPolicyOperation, putPrincipalPolicyOperation, } from "./principals.js";
|
|
@@ -88,6 +88,8 @@ export const protocolOperations = [
|
|
|
88
88
|
updateOrganizationRosterEntryOperation,
|
|
89
89
|
listOrganizationMembershipsOperation,
|
|
90
90
|
updateOrganizationMembershipOperation,
|
|
91
|
+
requestOrganizationLeaveOperation,
|
|
92
|
+
withdrawOrganizationLeaveRequestOperation,
|
|
91
93
|
getPrincipalPolicyOperation,
|
|
92
94
|
getProjectionPolicyHistoryOperation,
|
|
93
95
|
commitOrganizationGroupPolicyOperation,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,QAAQ,CAAC;AAChB,OAAO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AC3B,+BAA+B;IAC/B,sCAAsC;IACtC,4CAA4C;IAC5C,iDAAiD;IACjD,4CAA4C;IAC5C,+BAA+B;IAC/B,iCAAiC;IACjC,6BAA6B;IAC7B,oCAAoC;IACpC,2BAA2B;IAC3B,iCAAiC;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,qCAAqC;IACrC,gCAAgC;IAChC,gCAAgC;IAChC,qCAAqC;IACrC,kCAAkC;IAClC,sCAAsC;IACtC,oCAAoC;IACpC,qCAAqC;IACrC,2BAA2B;IAC3B,mCAAmC;IACnC,sCAAsC;IACtC,2BAA2B;IAC3B,2BAA2B;IAC3B,8BAA8B;IAC9B,qCAAqC;IACrC,gCAAgC;IAChC,4BAA4B;IAC5B,uCAAuC;IACvC,wBAAwB;IACxB,sCAAsC;IACtC,qBAAqB;CACtB,CAAC","sourcesContent":["import {\n bindBlobAttachmentOperation,\n detachBlobAttachmentOperation,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nimport {\n challengeOperation,\n destroySessionOperation,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nimport {\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n} from \"./billingWebhooks\";\nimport {\n getBlobBytesOperation,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nimport { getBlobDownloadOperation } from \"./blobDownloads\";\nimport {\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nimport {\n getContainerKekLogOperation,\n listContainerDocumentLanesOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nimport { getContainerReplacementAuthorizationsOperation } from \"./containerReplacement\";\nimport {\n getDocumentAttributionOperation,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nimport {\n createDocumentOperation,\n getDocumentPurgeProofOperation,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nimport { documentSyncOperation } from \"./documentSync\";\nimport { getHealthOperation } from \"./health\";\nimport {\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n} from \"./multipartBlobs\";\nimport { authorizeMultipartBlobPartUploadOperation } from \"./multipartPartUploads\";\nimport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nimport {\n listOrganizationMembershipsOperation,\n updateOrganizationMembershipOperation,\n} from \"./organizationMemberships\";\nimport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nimport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n listOrganizationGroupMembersOperation,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nimport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nimport { getProjectionPolicyHistoryOperation } from \"./projectionPolicyHistory\";\nimport {\n getRootIdentityOperation,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n} from \"./root\";\nimport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n} from \"./rootOrganizations\";\nimport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n} from \"./stripeCheckout\";\nimport {\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n} from \"./writerProjections\";\n\n// Name each imported operation type instead of expanding every Zod schema in\n// the emitted declaration; the exact readonly tuple and runtime order stay intact.\nexport const protocolOperations: readonly [\n typeof getContainerReplacementAuthorizationsOperation,\n typeof getHealthOperation,\n typeof challengeOperation,\n typeof destroySessionOperation,\n typeof listSessionsOperation,\n typeof logoutOperation,\n typeof registerOperation,\n typeof userIdentityOperation,\n typeof verifyOperation,\n typeof webSocketTicketOperation,\n typeof getBlobBytesOperation,\n typeof getBlobDownloadOperation,\n typeof receiveRevenueCatWebhookOperation,\n typeof receiveStripeWebhookOperation,\n typeof bindBlobAttachmentOperation,\n typeof detachBlobAttachmentOperation,\n typeof initiateMultipartBlobStageOperation,\n typeof getMultipartBlobStageOperation,\n typeof authorizeMultipartBlobPartUploadOperation,\n typeof uploadMultipartBlobPartBytesOperation,\n typeof listDocumentAttachmentsOperation,\n typeof getDocumentAttributionOperation,\n typeof listDocumentAttributionRangesOperation,\n typeof createDocumentOperation,\n typeof getDocumentPurgeProofOperation,\n typeof linkDocumentOperation,\n typeof purgeDocumentOperation,\n typeof unlinkDocumentOperation,\n typeof getContainerKekLogOperation,\n typeof listContainerDocumentLanesOperation,\n typeof listContainerParentLanesOperation,\n typeof createContainerOperation,\n typeof createContainerWithMetadataDocumentOperation,\n typeof deleteContainerOperation,\n typeof moveContainerOperation,\n typeof reciteContainerOperation,\n typeof rekeyContainerOperation,\n typeof revokeContainerOperation,\n typeof shareContainerOperation,\n typeof getContainerWriterProjectionOperation,\n typeof getDocumentWriterProjectionOperation,\n typeof createOrganizationOperation,\n typeof getOrganizationBillingOperation,\n typeof getOrganizationBillingHistoryOperation,\n typeof getOrganizationBillingManagementUrlOperation,\n typeof getOrganizationNativePurchaseEligibilityOperation,\n typeof claimNativeOrganizationSubscriptionOperation,\n typeof startOrganizationTrialOperation,\n typeof getStripeCheckoutOptionsOperation,\n typeof createStripeCheckoutOperation,\n typeof createStripeCheckoutSessionOperation,\n typeof createStripePortalOperation,\n typeof cancelStripeSubscriptionOperation,\n typeof getOrganizationDataUsageOperation,\n typeof getOrganizationReadModelOperation,\n typeof getOrganizationPolicyHistoryOperation,\n typeof createOrganizationGroupOperation,\n typeof deleteOrganizationGroupOperation,\n typeof listOrganizationGroupMembersOperation,\n typeof updateOrganizationProfileOperation,\n typeof updateOrganizationRosterEntryOperation,\n typeof listOrganizationMembershipsOperation,\n typeof updateOrganizationMembershipOperation,\n typeof getPrincipalPolicyOperation,\n typeof getProjectionPolicyHistoryOperation,\n typeof commitOrganizationGroupPolicyOperation,\n typeof putPrincipalPolicyOperation,\n typeof listRootIdentitiesOperation,\n typeof listRootOrganizationsOperation,\n typeof getRootOrganizationDataUsageOperation,\n typeof listRootDataUsageReportOperation,\n typeof getRootOrganizationOperation,\n typeof listRootOrganizationIdentitiesOperation,\n typeof getRootIdentityOperation,\n typeof listRootIdentityOrganizationsOperation,\n typeof documentSyncOperation,\n] = [\n getContainerReplacementAuthorizationsOperation,\n getHealthOperation,\n challengeOperation,\n destroySessionOperation,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n getBlobBytesOperation,\n getBlobDownloadOperation,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n bindBlobAttachmentOperation,\n detachBlobAttachmentOperation,\n initiateMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n authorizeMultipartBlobPartUploadOperation,\n uploadMultipartBlobPartBytesOperation,\n listDocumentAttachmentsOperation,\n getDocumentAttributionOperation,\n listDocumentAttributionRangesOperation,\n createDocumentOperation,\n getDocumentPurgeProofOperation,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n getContainerKekLogOperation,\n listContainerDocumentLanesOperation,\n listContainerParentLanesOperation,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n createOrganizationOperation,\n getOrganizationBillingOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n claimNativeOrganizationSubscriptionOperation,\n startOrganizationTrialOperation,\n getStripeCheckoutOptionsOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n cancelStripeSubscriptionOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n getOrganizationPolicyHistoryOperation,\n createOrganizationGroupOperation,\n deleteOrganizationGroupOperation,\n listOrganizationGroupMembersOperation,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n listOrganizationMembershipsOperation,\n updateOrganizationMembershipOperation,\n getPrincipalPolicyOperation,\n getProjectionPolicyHistoryOperation,\n commitOrganizationGroupPolicyOperation,\n putPrincipalPolicyOperation,\n listRootIdentitiesOperation,\n listRootOrganizationsOperation,\n getRootOrganizationDataUsageOperation,\n listRootDataUsageReportOperation,\n getRootOrganizationOperation,\n listRootOrganizationIdentitiesOperation,\n getRootIdentityOperation,\n listRootIdentityOrganizationsOperation,\n documentSyncOperation,\n];\n"]}
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["registry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,EAC3B,6BAA6B,EAC7B,gCAAgC,GACjC,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EACf,wBAAwB,GACzB,MAAM,QAAQ,CAAC;AAChB,OAAO,EACL,iCAAiC,EACjC,6BAA6B,GAC9B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,qBAAqB,EACrB,qCAAqC,GACtC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EACL,w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C;IACjC,iCAAiC;IACjC,iCAAiC;IACjC,qCAAqC;IACrC,gCAAgC;IAChC,gCAAgC;IAChC,qCAAqC;IACrC,kCAAkC;IAClC,sCAAsC;IACtC,oCAAoC;IACpC,qCAAqC;IACrC,iCAAiC;IACjC,yCAAyC;IACzC,2BAA2B;IAC3B,mCAAmC;IACnC,sCAAsC;IACtC,2BAA2B;IAC3B,2BAA2B;IAC3B,8BAA8B;IAC9B,qCAAqC;IACrC,gCAAgC;IAChC,4BAA4B;IAC5B,uCAAuC;IACvC,wBAAwB;IACxB,sCAAsC;IACtC,qBAAqB;CACtB,CAAC","sourcesContent":["import {\n bindBlobAttachmentOperation,\n detachBlobAttachmentOperation,\n listDocumentAttachmentsOperation,\n} from \"./attachments\";\nimport {\n challengeOperation,\n destroySessionOperation,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n} from \"./auth\";\nimport {\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n} from \"./billingWebhooks\";\nimport {\n getBlobBytesOperation,\n uploadMultipartBlobPartBytesOperation,\n} from \"./blobBytes\";\nimport { getBlobDownloadOperation } from \"./blobDownloads\";\nimport {\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n} from \"./containerMutations\";\nimport {\n getContainerKekLogOperation,\n listContainerDocumentLanesOperation,\n listContainerParentLanesOperation,\n} from \"./containerReads\";\nimport { getContainerReplacementAuthorizationsOperation } from \"./containerReplacement\";\nimport {\n getDocumentAttributionOperation,\n listDocumentAttributionRangesOperation,\n} from \"./documentAttribution\";\nimport {\n createDocumentOperation,\n getDocumentPurgeProofOperation,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n} from \"./documentMutations\";\nimport { documentSyncOperation } from \"./documentSync\";\nimport { getHealthOperation } from \"./health\";\nimport {\n getMultipartBlobStageOperation,\n initiateMultipartBlobStageOperation,\n} from \"./multipartBlobs\";\nimport { authorizeMultipartBlobPartUploadOperation } from \"./multipartPartUploads\";\nimport {\n claimNativeOrganizationSubscriptionOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationBillingOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n startOrganizationTrialOperation,\n} from \"./organizationBilling\";\nimport {\n listOrganizationMembershipsOperation,\n requestOrganizationLeaveOperation,\n updateOrganizationMembershipOperation,\n withdrawOrganizationLeaveRequestOperation,\n} from \"./organizationMemberships\";\nimport { getOrganizationPolicyHistoryOperation } from \"./organizationPolicyHistory\";\nimport {\n createOrganizationGroupOperation,\n createOrganizationOperation,\n deleteOrganizationGroupOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n listOrganizationGroupMembersOperation,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n} from \"./organizations\";\nimport {\n commitOrganizationGroupPolicyOperation,\n getPrincipalPolicyOperation,\n putPrincipalPolicyOperation,\n} from \"./principals\";\nimport { getProjectionPolicyHistoryOperation } from \"./projectionPolicyHistory\";\nimport {\n getRootIdentityOperation,\n listRootIdentitiesOperation,\n listRootIdentityOrganizationsOperation,\n} from \"./root\";\nimport {\n getRootOrganizationDataUsageOperation,\n getRootOrganizationOperation,\n listRootDataUsageReportOperation,\n listRootOrganizationIdentitiesOperation,\n listRootOrganizationsOperation,\n} from \"./rootOrganizations\";\nimport {\n cancelStripeSubscriptionOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n getStripeCheckoutOptionsOperation,\n} from \"./stripeCheckout\";\nimport {\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n} from \"./writerProjections\";\n\n// Name each imported operation type instead of expanding every Zod schema in\n// the emitted declaration; the exact readonly tuple and runtime order stay intact.\nexport const protocolOperations: readonly [\n typeof getContainerReplacementAuthorizationsOperation,\n typeof getHealthOperation,\n typeof challengeOperation,\n typeof destroySessionOperation,\n typeof listSessionsOperation,\n typeof logoutOperation,\n typeof registerOperation,\n typeof userIdentityOperation,\n typeof verifyOperation,\n typeof webSocketTicketOperation,\n typeof getBlobBytesOperation,\n typeof getBlobDownloadOperation,\n typeof receiveRevenueCatWebhookOperation,\n typeof receiveStripeWebhookOperation,\n typeof bindBlobAttachmentOperation,\n typeof detachBlobAttachmentOperation,\n typeof initiateMultipartBlobStageOperation,\n typeof getMultipartBlobStageOperation,\n typeof authorizeMultipartBlobPartUploadOperation,\n typeof uploadMultipartBlobPartBytesOperation,\n typeof listDocumentAttachmentsOperation,\n typeof getDocumentAttributionOperation,\n typeof listDocumentAttributionRangesOperation,\n typeof createDocumentOperation,\n typeof getDocumentPurgeProofOperation,\n typeof linkDocumentOperation,\n typeof purgeDocumentOperation,\n typeof unlinkDocumentOperation,\n typeof getContainerKekLogOperation,\n typeof listContainerDocumentLanesOperation,\n typeof listContainerParentLanesOperation,\n typeof createContainerOperation,\n typeof createContainerWithMetadataDocumentOperation,\n typeof deleteContainerOperation,\n typeof moveContainerOperation,\n typeof reciteContainerOperation,\n typeof rekeyContainerOperation,\n typeof revokeContainerOperation,\n typeof shareContainerOperation,\n typeof getContainerWriterProjectionOperation,\n typeof getDocumentWriterProjectionOperation,\n typeof createOrganizationOperation,\n typeof getOrganizationBillingOperation,\n typeof getOrganizationBillingHistoryOperation,\n typeof getOrganizationBillingManagementUrlOperation,\n typeof getOrganizationNativePurchaseEligibilityOperation,\n typeof claimNativeOrganizationSubscriptionOperation,\n typeof startOrganizationTrialOperation,\n typeof getStripeCheckoutOptionsOperation,\n typeof createStripeCheckoutOperation,\n typeof createStripeCheckoutSessionOperation,\n typeof createStripePortalOperation,\n typeof cancelStripeSubscriptionOperation,\n typeof getOrganizationDataUsageOperation,\n typeof getOrganizationReadModelOperation,\n typeof getOrganizationPolicyHistoryOperation,\n typeof createOrganizationGroupOperation,\n typeof deleteOrganizationGroupOperation,\n typeof listOrganizationGroupMembersOperation,\n typeof updateOrganizationProfileOperation,\n typeof updateOrganizationRosterEntryOperation,\n typeof listOrganizationMembershipsOperation,\n typeof updateOrganizationMembershipOperation,\n typeof requestOrganizationLeaveOperation,\n typeof withdrawOrganizationLeaveRequestOperation,\n typeof getPrincipalPolicyOperation,\n typeof getProjectionPolicyHistoryOperation,\n typeof commitOrganizationGroupPolicyOperation,\n typeof putPrincipalPolicyOperation,\n typeof listRootIdentitiesOperation,\n typeof listRootOrganizationsOperation,\n typeof getRootOrganizationDataUsageOperation,\n typeof listRootDataUsageReportOperation,\n typeof getRootOrganizationOperation,\n typeof listRootOrganizationIdentitiesOperation,\n typeof getRootIdentityOperation,\n typeof listRootIdentityOrganizationsOperation,\n typeof documentSyncOperation,\n] = [\n getContainerReplacementAuthorizationsOperation,\n getHealthOperation,\n challengeOperation,\n destroySessionOperation,\n listSessionsOperation,\n logoutOperation,\n registerOperation,\n userIdentityOperation,\n verifyOperation,\n webSocketTicketOperation,\n getBlobBytesOperation,\n getBlobDownloadOperation,\n receiveRevenueCatWebhookOperation,\n receiveStripeWebhookOperation,\n bindBlobAttachmentOperation,\n detachBlobAttachmentOperation,\n initiateMultipartBlobStageOperation,\n getMultipartBlobStageOperation,\n authorizeMultipartBlobPartUploadOperation,\n uploadMultipartBlobPartBytesOperation,\n listDocumentAttachmentsOperation,\n getDocumentAttributionOperation,\n listDocumentAttributionRangesOperation,\n createDocumentOperation,\n getDocumentPurgeProofOperation,\n linkDocumentOperation,\n purgeDocumentOperation,\n unlinkDocumentOperation,\n getContainerKekLogOperation,\n listContainerDocumentLanesOperation,\n listContainerParentLanesOperation,\n createContainerOperation,\n createContainerWithMetadataDocumentOperation,\n deleteContainerOperation,\n moveContainerOperation,\n reciteContainerOperation,\n rekeyContainerOperation,\n revokeContainerOperation,\n shareContainerOperation,\n getContainerWriterProjectionOperation,\n getDocumentWriterProjectionOperation,\n createOrganizationOperation,\n getOrganizationBillingOperation,\n getOrganizationBillingHistoryOperation,\n getOrganizationBillingManagementUrlOperation,\n getOrganizationNativePurchaseEligibilityOperation,\n claimNativeOrganizationSubscriptionOperation,\n startOrganizationTrialOperation,\n getStripeCheckoutOptionsOperation,\n createStripeCheckoutOperation,\n createStripeCheckoutSessionOperation,\n createStripePortalOperation,\n cancelStripeSubscriptionOperation,\n getOrganizationDataUsageOperation,\n getOrganizationReadModelOperation,\n getOrganizationPolicyHistoryOperation,\n createOrganizationGroupOperation,\n deleteOrganizationGroupOperation,\n listOrganizationGroupMembersOperation,\n updateOrganizationProfileOperation,\n updateOrganizationRosterEntryOperation,\n listOrganizationMembershipsOperation,\n updateOrganizationMembershipOperation,\n requestOrganizationLeaveOperation,\n withdrawOrganizationLeaveRequestOperation,\n getPrincipalPolicyOperation,\n getProjectionPolicyHistoryOperation,\n commitOrganizationGroupPolicyOperation,\n putPrincipalPolicyOperation,\n listRootIdentitiesOperation,\n listRootOrganizationsOperation,\n getRootOrganizationDataUsageOperation,\n listRootDataUsageReportOperation,\n getRootOrganizationOperation,\n listRootOrganizationIdentitiesOperation,\n getRootIdentityOperation,\n listRootIdentityOrganizationsOperation,\n documentSyncOperation,\n];\n"]}
|
|
@@ -16,6 +16,16 @@ export declare const OrganizationDirectoryUserResponseShape: {
|
|
|
16
16
|
isPersonalOrganizationOwner: z.ZodBoolean;
|
|
17
17
|
isSelf: z.ZodBoolean;
|
|
18
18
|
joinedAt: z.ZodString;
|
|
19
|
+
/**
|
|
20
|
+
* The member's pending signed request to leave, which an administrator
|
|
21
|
+
* verifies against `signingPublicKey` before acting on it.
|
|
22
|
+
*/
|
|
23
|
+
leaveRequest: z.ZodNullable<z.ZodObject<{
|
|
24
|
+
organizationId: z.ZodCustom<string, string>;
|
|
25
|
+
userId: z.ZodCustom<string, string>;
|
|
26
|
+
requestedAt: z.ZodString;
|
|
27
|
+
signature: z.ZodString;
|
|
28
|
+
}, z.core.$strict>>;
|
|
19
29
|
profileDocumentId: z.ZodNullable<z.ZodString>;
|
|
20
30
|
signingKeyFingerprint: z.ZodString;
|
|
21
31
|
signingPublicKey: z.ZodString;
|
|
@@ -32,6 +42,12 @@ export declare const OrganizationDirectoryUserResponseSchema: z.ZodType<{
|
|
|
32
42
|
isPersonalOrganizationOwner: boolean;
|
|
33
43
|
isSelf: boolean;
|
|
34
44
|
joinedAt: string;
|
|
45
|
+
leaveRequest: {
|
|
46
|
+
organizationId: string;
|
|
47
|
+
userId: string;
|
|
48
|
+
requestedAt: string;
|
|
49
|
+
signature: string;
|
|
50
|
+
} | null;
|
|
35
51
|
profileDocumentId: string | null;
|
|
36
52
|
signingKeyFingerprint: string;
|
|
37
53
|
signingPublicKey: string;
|
|
@@ -47,6 +63,12 @@ export declare const OrganizationDirectoryUserResponseSchema: z.ZodType<{
|
|
|
47
63
|
isPersonalOrganizationOwner: boolean;
|
|
48
64
|
isSelf: boolean;
|
|
49
65
|
joinedAt: string;
|
|
66
|
+
leaveRequest: {
|
|
67
|
+
organizationId: string;
|
|
68
|
+
userId: string;
|
|
69
|
+
requestedAt: string;
|
|
70
|
+
signature: string;
|
|
71
|
+
} | null;
|
|
50
72
|
profileDocumentId: string | null;
|
|
51
73
|
signingKeyFingerprint: string;
|
|
52
74
|
signingPublicKey: string;
|
|
@@ -62,6 +84,12 @@ export declare const OrganizationDirectoryUserResponseSchema: z.ZodType<{
|
|
|
62
84
|
isPersonalOrganizationOwner: boolean;
|
|
63
85
|
isSelf: boolean;
|
|
64
86
|
joinedAt: string;
|
|
87
|
+
leaveRequest: {
|
|
88
|
+
organizationId: string;
|
|
89
|
+
userId: string;
|
|
90
|
+
requestedAt: string;
|
|
91
|
+
signature: string;
|
|
92
|
+
} | null;
|
|
65
93
|
profileDocumentId: string | null;
|
|
66
94
|
signingKeyFingerprint: string;
|
|
67
95
|
signingPublicKey: string;
|
|
@@ -77,6 +105,12 @@ export declare const OrganizationDirectoryUserResponseSchema: z.ZodType<{
|
|
|
77
105
|
isPersonalOrganizationOwner: boolean;
|
|
78
106
|
isSelf: boolean;
|
|
79
107
|
joinedAt: string;
|
|
108
|
+
leaveRequest: {
|
|
109
|
+
organizationId: string;
|
|
110
|
+
userId: string;
|
|
111
|
+
requestedAt: string;
|
|
112
|
+
signature: string;
|
|
113
|
+
} | null;
|
|
80
114
|
profileDocumentId: string | null;
|
|
81
115
|
signingKeyFingerprint: string;
|
|
82
116
|
signingPublicKey: string;
|
|
@@ -103,6 +137,12 @@ export declare const OrganizationDirectoryResponseSchema: z.ZodType<{
|
|
|
103
137
|
isPersonalOrganizationOwner: boolean;
|
|
104
138
|
isSelf: boolean;
|
|
105
139
|
joinedAt: string;
|
|
140
|
+
leaveRequest: {
|
|
141
|
+
organizationId: string;
|
|
142
|
+
userId: string;
|
|
143
|
+
requestedAt: string;
|
|
144
|
+
signature: string;
|
|
145
|
+
} | null;
|
|
106
146
|
profileDocumentId: string | null;
|
|
107
147
|
signingKeyFingerprint: string;
|
|
108
148
|
signingPublicKey: string;
|
|
@@ -125,6 +165,12 @@ export declare const OrganizationDirectoryResponseSchema: z.ZodType<{
|
|
|
125
165
|
isPersonalOrganizationOwner: boolean;
|
|
126
166
|
isSelf: boolean;
|
|
127
167
|
joinedAt: string;
|
|
168
|
+
leaveRequest: {
|
|
169
|
+
organizationId: string;
|
|
170
|
+
userId: string;
|
|
171
|
+
requestedAt: string;
|
|
172
|
+
signature: string;
|
|
173
|
+
} | null;
|
|
128
174
|
profileDocumentId: string | null;
|
|
129
175
|
signingKeyFingerprint: string;
|
|
130
176
|
signingPublicKey: string;
|
|
@@ -147,6 +193,12 @@ export declare const OrganizationDirectoryResponseSchema: z.ZodType<{
|
|
|
147
193
|
isPersonalOrganizationOwner: boolean;
|
|
148
194
|
isSelf: boolean;
|
|
149
195
|
joinedAt: string;
|
|
196
|
+
leaveRequest: {
|
|
197
|
+
organizationId: string;
|
|
198
|
+
userId: string;
|
|
199
|
+
requestedAt: string;
|
|
200
|
+
signature: string;
|
|
201
|
+
} | null;
|
|
150
202
|
profileDocumentId: string | null;
|
|
151
203
|
signingKeyFingerprint: string;
|
|
152
204
|
signingPublicKey: string;
|
|
@@ -169,6 +221,12 @@ export declare const OrganizationDirectoryResponseSchema: z.ZodType<{
|
|
|
169
221
|
isPersonalOrganizationOwner: boolean;
|
|
170
222
|
isSelf: boolean;
|
|
171
223
|
joinedAt: string;
|
|
224
|
+
leaveRequest: {
|
|
225
|
+
organizationId: string;
|
|
226
|
+
userId: string;
|
|
227
|
+
requestedAt: string;
|
|
228
|
+
signature: string;
|
|
229
|
+
} | null;
|
|
172
230
|
profileDocumentId: string | null;
|
|
173
231
|
signingKeyFingerprint: string;
|
|
174
232
|
signingPublicKey: string;
|
|
@@ -1979,6 +2037,12 @@ export declare const OrganizationUserDetailResponseSchema: z.ZodType<{
|
|
|
1979
2037
|
isPersonalOrganizationOwner: boolean;
|
|
1980
2038
|
isSelf: boolean;
|
|
1981
2039
|
joinedAt: string;
|
|
2040
|
+
leaveRequest: {
|
|
2041
|
+
organizationId: string;
|
|
2042
|
+
userId: string;
|
|
2043
|
+
requestedAt: string;
|
|
2044
|
+
signature: string;
|
|
2045
|
+
} | null;
|
|
1982
2046
|
profileDocumentId: string | null;
|
|
1983
2047
|
signingKeyFingerprint: string;
|
|
1984
2048
|
signingPublicKey: string;
|
|
@@ -2046,6 +2110,12 @@ export declare const OrganizationUserDetailResponseSchema: z.ZodType<{
|
|
|
2046
2110
|
isPersonalOrganizationOwner: boolean;
|
|
2047
2111
|
isSelf: boolean;
|
|
2048
2112
|
joinedAt: string;
|
|
2113
|
+
leaveRequest: {
|
|
2114
|
+
organizationId: string;
|
|
2115
|
+
userId: string;
|
|
2116
|
+
requestedAt: string;
|
|
2117
|
+
signature: string;
|
|
2118
|
+
} | null;
|
|
2049
2119
|
profileDocumentId: string | null;
|
|
2050
2120
|
signingKeyFingerprint: string;
|
|
2051
2121
|
signingPublicKey: string;
|
|
@@ -2113,6 +2183,12 @@ export declare const OrganizationUserDetailResponseSchema: z.ZodType<{
|
|
|
2113
2183
|
isPersonalOrganizationOwner: boolean;
|
|
2114
2184
|
isSelf: boolean;
|
|
2115
2185
|
joinedAt: string;
|
|
2186
|
+
leaveRequest: {
|
|
2187
|
+
organizationId: string;
|
|
2188
|
+
userId: string;
|
|
2189
|
+
requestedAt: string;
|
|
2190
|
+
signature: string;
|
|
2191
|
+
} | null;
|
|
2116
2192
|
profileDocumentId: string | null;
|
|
2117
2193
|
signingKeyFingerprint: string;
|
|
2118
2194
|
signingPublicKey: string;
|
|
@@ -2180,6 +2256,12 @@ export declare const OrganizationUserDetailResponseSchema: z.ZodType<{
|
|
|
2180
2256
|
isPersonalOrganizationOwner: boolean;
|
|
2181
2257
|
isSelf: boolean;
|
|
2182
2258
|
joinedAt: string;
|
|
2259
|
+
leaveRequest: {
|
|
2260
|
+
organizationId: string;
|
|
2261
|
+
userId: string;
|
|
2262
|
+
requestedAt: string;
|
|
2263
|
+
signature: string;
|
|
2264
|
+
} | null;
|
|
2183
2265
|
profileDocumentId: string | null;
|
|
2184
2266
|
signingKeyFingerprint: string;
|
|
2185
2267
|
signingPublicKey: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { arraySchema, boundedPositiveIntegerSchema, loosePlainObject, nonEmptyStringSchema, nonNegativeIntegerSchema, positiveIntegerSchema, } from "../schema.js";
|
|
3
|
+
import { OrganizationLeaveRequestSchema } from "../util/organizationLeaveRequest.js";
|
|
3
4
|
import { PrincipalPolicyMutationResponseSchema } from "./principal.js";
|
|
4
5
|
const OrganizationRoleSchema = z.literal(["member", "admin"]);
|
|
5
6
|
const OrganizationRosterStatusSchema = z.literal(["active", "disabled"]);
|
|
@@ -21,6 +22,11 @@ export const OrganizationDirectoryUserResponseShape = {
|
|
|
21
22
|
isPersonalOrganizationOwner: z.boolean(),
|
|
22
23
|
isSelf: z.boolean(),
|
|
23
24
|
joinedAt: z.string(),
|
|
25
|
+
/**
|
|
26
|
+
* The member's pending signed request to leave, which an administrator
|
|
27
|
+
* verifies against `signingPublicKey` before acting on it.
|
|
28
|
+
*/
|
|
29
|
+
leaveRequest: OrganizationLeaveRequestSchema.nullable(),
|
|
24
30
|
profileDocumentId: z.string().nullable(),
|
|
25
31
|
signingKeyFingerprint: z.string(),
|
|
26
32
|
signingPublicKey: z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACL,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,sBAAsB,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;AAC9D,MAAM,8BAA8B,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC,CAAC;AACzE,MAAM,2CAA2C,GAAG,CAAC,CAAC,OAAO,CAAC;IAC5D,OAAO;IACP,MAAM;IACN,OAAO;CACR,CAAC,CAAC;AACH,MAAM,2CAA2C,GAAG,CAAC,CAAC,OAAO,CAAC;IAC5D,OAAO;IACP,MAAM;CACP,CAAC,CAAC;AAaH,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE;IACrB,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACjC,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACvC,2BAA2B,EAAE,CAAC,CAAC,MAAM,EAAE;IACvC,sBAAsB,EAAE,CAAC,CAAC,MAAM,EAAE;IAClC,2BAA2B,EAAE,CAAC,CAAC,OAAO,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CAAqC,CACnD,KAAc;IAEd,OAAO,yCAAyC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC5E,CAAC;AAED,MAAM,UAAU,sCAAsC,CACpD,KAAc;IAEd,OAAO,0CAA0C,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AAC7E,CAAC;AAED,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;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 {\n arraySchema,\n boundedPositiveIntegerSchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport { PrincipalPolicyMutationResponseSchema } from \"./principal\";\n\nconst OrganizationRoleSchema = z.literal([\"member\", \"admin\"]);\nconst OrganizationRosterStatusSchema = z.literal([\"active\", \"disabled\"]);\nconst OrganizationGroupContainerAccessLevelSchema = z.literal([\n \"admin\",\n \"read\",\n \"write\",\n]);\nconst OrganizationContainerGrantSubjectTypeSchema = z.literal([\n \"group\",\n \"user\",\n]);\n\nexport type OrganizationRole = z.infer<typeof OrganizationRoleSchema>;\nexport type OrganizationRosterStatus = z.infer<\n typeof OrganizationRosterStatusSchema\n>;\nexport type OrganizationGroupContainerAccessLevel = z.infer<\n typeof OrganizationGroupContainerAccessLevelSchema\n>;\nexport type OrganizationContainerGrantSubjectType = z.infer<\n typeof OrganizationContainerGrantSubjectTypeSchema\n>;\n\nexport const OrganizationDirectoryUserResponseShape = {\n createdAt: z.string(),\n disabledAt: z.string().nullable(),\n disabledByUserId: z.string().nullable(),\n encapsulationKeyFingerprint: z.string(),\n encapsulationPublicKey: z.string(),\n isPersonalOrganizationOwner: z.boolean(),\n isSelf: z.boolean(),\n joinedAt: z.string(),\n profileDocumentId: z.string().nullable(),\n signingKeyFingerprint: z.string(),\n signingPublicKey: z.string(),\n status: OrganizationRosterStatusSchema,\n updatedAt: z.string(),\n userId: z.string(),\n};\n\nexport const OrganizationDirectoryUserResponseSchema = loosePlainObject(\n OrganizationDirectoryUserResponseShape,\n);\n\nexport type OrganizationDirectoryUserResponse = z.infer<\n typeof OrganizationDirectoryUserResponseSchema\n>;\n\nexport const OrganizationDirectoryCurrentUserResponseShape = {\n isOrgAdmin: z.boolean(),\n};\n\nconst OrganizationDirectoryCurrentUserResponseSchema = loosePlainObject(\n OrganizationDirectoryCurrentUserResponseShape,\n);\n\nexport const OrganizationDirectoryResponseSchema = loosePlainObject({\n currentUser: OrganizationDirectoryCurrentUserResponseSchema,\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n users: arraySchema(OrganizationDirectoryUserResponseSchema),\n});\n\nexport type OrganizationDirectoryResponse = z.infer<\n typeof OrganizationDirectoryResponseSchema\n>;\n\nexport const OrganizationProfileResponseSchema = loosePlainObject({\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n});\n\nexport type OrganizationProfileResponse = z.infer<\n typeof OrganizationProfileResponseSchema\n>;\n\nexport const OrganizationGroupCurrentStateResponseShape = {\n keyEpoch: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n keyFingerprint: nonEmptyStringSchema,\n memberCount: nonNegativeIntegerSchema,\n stateHash: z.string(),\n version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n};\n\nexport const OrganizationGroupCurrentStateResponseSchema = loosePlainObject(\n OrganizationGroupCurrentStateResponseShape,\n);\n\nexport type OrganizationGroupCurrentStateResponse = z.infer<\n typeof OrganizationGroupCurrentStateResponseSchema\n>;\n\nexport const OrganizationGroupSummaryResponseShape = {\n createdAt: z.string(),\n currentState: OrganizationGroupCurrentStateResponseSchema.nullable(),\n groupId: z.string(),\n isBuiltin: z.boolean(),\n organizationId: z.string(),\n};\n\nexport const OrganizationGroupSummaryResponseSchema = loosePlainObject(\n OrganizationGroupSummaryResponseShape,\n);\n\nexport type OrganizationGroupSummaryResponse = z.infer<\n typeof OrganizationGroupSummaryResponseSchema\n>;\n\nexport const CreateOrganizationGroupResponseSchema = loosePlainObject({\n group: OrganizationGroupSummaryResponseSchema,\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n});\n\nexport type CreateOrganizationGroupResponse = z.infer<\n typeof CreateOrganizationGroupResponseSchema\n>;\n\nexport const DeleteOrganizationGroupResponseSchema = loosePlainObject({\n deleted: z.literal(true),\n groupId: z.string(),\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n organizationId: z.string(),\n});\n\nexport type DeleteOrganizationGroupResponse = z.infer<\n typeof DeleteOrganizationGroupResponseSchema\n>;\n\nexport const ListOrganizationGroupsResponseSchema = loosePlainObject({\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n memberGroupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type ListOrganizationGroupsResponse = z.infer<\n typeof ListOrganizationGroupsResponseSchema\n>;\n\nexport const OrganizationGroupMemberResponseShape = {\n encapsulationKeyFingerprint: z.string().nullable(),\n encapsulationPublicKey: z.string().nullable(),\n role: OrganizationRoleSchema,\n signingKeyFingerprint: z.string().nullable(),\n signingPublicKey: z.string().nullable(),\n userId: z.string(),\n};\n\nexport const OrganizationGroupMemberResponseSchema = loosePlainObject(\n OrganizationGroupMemberResponseShape,\n);\n\nexport type OrganizationGroupMemberResponse = z.infer<\n typeof OrganizationGroupMemberResponseSchema\n>;\n\nexport const OrganizationGroupMembersResponseSchema = loosePlainObject({\n groupId: z.string(),\n members: arraySchema(OrganizationGroupMemberResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupMembersResponse = z.infer<\n typeof OrganizationGroupMembersResponseSchema\n>;\n\nconst OrganizationGroupContainerResponseShape = {\n accessLevel: OrganizationGroupContainerAccessLevelSchema,\n containerId: z.string(),\n createdAt: z.string(),\n depth: nonNegativeIntegerSchema,\n isBuiltin: z.boolean(),\n metadataAccessEpoch: positiveIntegerSchema,\n metadataAccessStateHash: nonEmptyStringSchema,\n metadataDocumentId: z.string().nullable(),\n parentId: z.string().nullable(),\n updatedAt: z.string(),\n};\n\nexport const OrganizationGroupContainerResponseSchema = loosePlainObject(\n OrganizationGroupContainerResponseShape,\n);\n\nexport type OrganizationGroupContainerResponse = z.infer<\n typeof OrganizationGroupContainerResponseSchema\n>;\n\nexport const OrganizationGroupContainersResponseSchema = loosePlainObject({\n containers: arraySchema(OrganizationGroupContainerResponseSchema),\n groupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupContainersResponse = z.infer<\n typeof OrganizationGroupContainersResponseSchema\n>;\n\nexport const OrganizationContainerGrantResponseShape = {\n ...OrganizationGroupContainerResponseShape,\n groupId: z.string().nullable(),\n signingKeyFingerprint: z.string().nullable(),\n subjectId: z.string(),\n subjectType: OrganizationContainerGrantSubjectTypeSchema,\n userId: z.string().nullable(),\n};\n\nexport const OrganizationContainerGrantResponseSchema = loosePlainObject(\n OrganizationContainerGrantResponseShape,\n);\n\nexport type OrganizationContainerGrantResponse = z.infer<\n typeof OrganizationContainerGrantResponseSchema\n>;\n\nexport const OrganizationContainerGrantsResponseSchema = loosePlainObject({\n grants: arraySchema(OrganizationContainerGrantResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationContainerGrantsResponse = z.infer<\n typeof OrganizationContainerGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailGrantsResponseSchema = loosePlainObject({\n directGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n groupGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n});\n\nexport type OrganizationUserDetailGrantsResponse = z.infer<\n typeof OrganizationUserDetailGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailResponseSchema = loosePlainObject({\n grants: OrganizationUserDetailGrantsResponseSchema,\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n organizationId: z.string(),\n user: OrganizationDirectoryUserResponseSchema,\n});\n\nexport type OrganizationUserDetailResponse = z.infer<\n typeof OrganizationUserDetailResponseSchema\n>;\n\nexport function isOrganizationGroupContainerAccessLevel(\n value: string,\n): value is OrganizationGroupContainerAccessLevel {\n return OrganizationGroupContainerAccessLevelSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantSubjectType(\n value: string,\n): value is OrganizationContainerGrantSubjectType {\n return OrganizationContainerGrantSubjectTypeSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryUserResponse(\n value: unknown,\n): value is OrganizationDirectoryUserResponse {\n return OrganizationDirectoryUserResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryResponse(\n value: unknown,\n): value is OrganizationDirectoryResponse {\n return OrganizationDirectoryResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationProfileResponse(\n value: unknown,\n): value is OrganizationProfileResponse {\n return OrganizationProfileResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupCurrentStateResponse(\n value: unknown,\n): value is OrganizationGroupCurrentStateResponse {\n return OrganizationGroupCurrentStateResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupSummaryResponse(\n value: unknown,\n): value is OrganizationGroupSummaryResponse {\n return OrganizationGroupSummaryResponseSchema.safeParse(value).success;\n}\n\nexport function isListOrganizationGroupsResponse(\n value: unknown,\n): value is ListOrganizationGroupsResponse {\n return ListOrganizationGroupsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMemberResponse(\n value: unknown,\n): value is OrganizationGroupMemberResponse {\n return OrganizationGroupMemberResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMembersResponse(\n value: unknown,\n): value is OrganizationGroupMembersResponse {\n return OrganizationGroupMembersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainerResponse(\n value: unknown,\n): value is OrganizationGroupContainerResponse {\n return OrganizationGroupContainerResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainersResponse(\n value: unknown,\n): value is OrganizationGroupContainersResponse {\n return OrganizationGroupContainersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantResponse(\n value: unknown,\n): value is OrganizationContainerGrantResponse {\n return OrganizationContainerGrantResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantsResponse(\n value: unknown,\n): value is OrganizationContainerGrantsResponse {\n return OrganizationContainerGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailGrantsResponse(\n value: unknown,\n): value is OrganizationUserDetailGrantsResponse {\n return OrganizationUserDetailGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailResponse(\n value: unknown,\n): value is OrganizationUserDetailResponse {\n return OrganizationUserDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupResponse(\n value: unknown,\n): value is CreateOrganizationGroupResponse {\n return CreateOrganizationGroupResponseSchema.safeParse(value).success;\n}\n\nexport function isDeleteOrganizationGroupResponse(\n value: unknown,\n): value is DeleteOrganizationGroupResponse {\n return DeleteOrganizationGroupResponseSchema.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,EACL,WAAW,EACX,4BAA4B,EAC5B,gBAAgB,EAChB,oBAAoB,EACpB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,qCAAqC,EAAE,MAAM,aAAa,CAAC;AAEpE,MAAM,sBAAsB,GAAG,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AC/C,KAAc;IAEd,OAAO,qCAAqC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;AACxE,CAAC","sourcesContent":["import { z } from \"zod\";\nimport {\n arraySchema,\n boundedPositiveIntegerSchema,\n loosePlainObject,\n nonEmptyStringSchema,\n nonNegativeIntegerSchema,\n positiveIntegerSchema,\n} from \"../schema\";\nimport { OrganizationLeaveRequestSchema } from \"../util/organizationLeaveRequest\";\nimport { PrincipalPolicyMutationResponseSchema } from \"./principal\";\n\nconst OrganizationRoleSchema = z.literal([\"member\", \"admin\"]);\nconst OrganizationRosterStatusSchema = z.literal([\"active\", \"disabled\"]);\nconst OrganizationGroupContainerAccessLevelSchema = z.literal([\n \"admin\",\n \"read\",\n \"write\",\n]);\nconst OrganizationContainerGrantSubjectTypeSchema = z.literal([\n \"group\",\n \"user\",\n]);\n\nexport type OrganizationRole = z.infer<typeof OrganizationRoleSchema>;\nexport type OrganizationRosterStatus = z.infer<\n typeof OrganizationRosterStatusSchema\n>;\nexport type OrganizationGroupContainerAccessLevel = z.infer<\n typeof OrganizationGroupContainerAccessLevelSchema\n>;\nexport type OrganizationContainerGrantSubjectType = z.infer<\n typeof OrganizationContainerGrantSubjectTypeSchema\n>;\n\nexport const OrganizationDirectoryUserResponseShape = {\n createdAt: z.string(),\n disabledAt: z.string().nullable(),\n disabledByUserId: z.string().nullable(),\n encapsulationKeyFingerprint: z.string(),\n encapsulationPublicKey: z.string(),\n isPersonalOrganizationOwner: z.boolean(),\n isSelf: z.boolean(),\n joinedAt: z.string(),\n /**\n * The member's pending signed request to leave, which an administrator\n * verifies against `signingPublicKey` before acting on it.\n */\n leaveRequest: OrganizationLeaveRequestSchema.nullable(),\n profileDocumentId: z.string().nullable(),\n signingKeyFingerprint: z.string(),\n signingPublicKey: z.string(),\n status: OrganizationRosterStatusSchema,\n updatedAt: z.string(),\n userId: z.string(),\n};\n\nexport const OrganizationDirectoryUserResponseSchema = loosePlainObject(\n OrganizationDirectoryUserResponseShape,\n);\n\nexport type OrganizationDirectoryUserResponse = z.infer<\n typeof OrganizationDirectoryUserResponseSchema\n>;\n\nexport const OrganizationDirectoryCurrentUserResponseShape = {\n isOrgAdmin: z.boolean(),\n};\n\nconst OrganizationDirectoryCurrentUserResponseSchema = loosePlainObject(\n OrganizationDirectoryCurrentUserResponseShape,\n);\n\nexport const OrganizationDirectoryResponseSchema = loosePlainObject({\n currentUser: OrganizationDirectoryCurrentUserResponseSchema,\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n users: arraySchema(OrganizationDirectoryUserResponseSchema),\n});\n\nexport type OrganizationDirectoryResponse = z.infer<\n typeof OrganizationDirectoryResponseSchema\n>;\n\nexport const OrganizationProfileResponseSchema = loosePlainObject({\n organizationId: z.string(),\n profileDocumentId: z.string().nullable(),\n});\n\nexport type OrganizationProfileResponse = z.infer<\n typeof OrganizationProfileResponseSchema\n>;\n\nexport const OrganizationGroupCurrentStateResponseShape = {\n keyEpoch: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n keyFingerprint: nonEmptyStringSchema,\n memberCount: nonNegativeIntegerSchema,\n stateHash: z.string(),\n version: boundedPositiveIntegerSchema(Number.MAX_SAFE_INTEGER),\n};\n\nexport const OrganizationGroupCurrentStateResponseSchema = loosePlainObject(\n OrganizationGroupCurrentStateResponseShape,\n);\n\nexport type OrganizationGroupCurrentStateResponse = z.infer<\n typeof OrganizationGroupCurrentStateResponseSchema\n>;\n\nexport const OrganizationGroupSummaryResponseShape = {\n createdAt: z.string(),\n currentState: OrganizationGroupCurrentStateResponseSchema.nullable(),\n groupId: z.string(),\n isBuiltin: z.boolean(),\n organizationId: z.string(),\n};\n\nexport const OrganizationGroupSummaryResponseSchema = loosePlainObject(\n OrganizationGroupSummaryResponseShape,\n);\n\nexport type OrganizationGroupSummaryResponse = z.infer<\n typeof OrganizationGroupSummaryResponseSchema\n>;\n\nexport const CreateOrganizationGroupResponseSchema = loosePlainObject({\n group: OrganizationGroupSummaryResponseSchema,\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n});\n\nexport type CreateOrganizationGroupResponse = z.infer<\n typeof CreateOrganizationGroupResponseSchema\n>;\n\nexport const DeleteOrganizationGroupResponseSchema = loosePlainObject({\n deleted: z.literal(true),\n groupId: z.string(),\n organizationPolicy: PrincipalPolicyMutationResponseSchema,\n organizationId: z.string(),\n});\n\nexport type DeleteOrganizationGroupResponse = z.infer<\n typeof DeleteOrganizationGroupResponseSchema\n>;\n\nexport const ListOrganizationGroupsResponseSchema = loosePlainObject({\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n memberGroupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type ListOrganizationGroupsResponse = z.infer<\n typeof ListOrganizationGroupsResponseSchema\n>;\n\nexport const OrganizationGroupMemberResponseShape = {\n encapsulationKeyFingerprint: z.string().nullable(),\n encapsulationPublicKey: z.string().nullable(),\n role: OrganizationRoleSchema,\n signingKeyFingerprint: z.string().nullable(),\n signingPublicKey: z.string().nullable(),\n userId: z.string(),\n};\n\nexport const OrganizationGroupMemberResponseSchema = loosePlainObject(\n OrganizationGroupMemberResponseShape,\n);\n\nexport type OrganizationGroupMemberResponse = z.infer<\n typeof OrganizationGroupMemberResponseSchema\n>;\n\nexport const OrganizationGroupMembersResponseSchema = loosePlainObject({\n groupId: z.string(),\n members: arraySchema(OrganizationGroupMemberResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupMembersResponse = z.infer<\n typeof OrganizationGroupMembersResponseSchema\n>;\n\nconst OrganizationGroupContainerResponseShape = {\n accessLevel: OrganizationGroupContainerAccessLevelSchema,\n containerId: z.string(),\n createdAt: z.string(),\n depth: nonNegativeIntegerSchema,\n isBuiltin: z.boolean(),\n metadataAccessEpoch: positiveIntegerSchema,\n metadataAccessStateHash: nonEmptyStringSchema,\n metadataDocumentId: z.string().nullable(),\n parentId: z.string().nullable(),\n updatedAt: z.string(),\n};\n\nexport const OrganizationGroupContainerResponseSchema = loosePlainObject(\n OrganizationGroupContainerResponseShape,\n);\n\nexport type OrganizationGroupContainerResponse = z.infer<\n typeof OrganizationGroupContainerResponseSchema\n>;\n\nexport const OrganizationGroupContainersResponseSchema = loosePlainObject({\n containers: arraySchema(OrganizationGroupContainerResponseSchema),\n groupId: z.string(),\n organizationId: z.string(),\n});\n\nexport type OrganizationGroupContainersResponse = z.infer<\n typeof OrganizationGroupContainersResponseSchema\n>;\n\nexport const OrganizationContainerGrantResponseShape = {\n ...OrganizationGroupContainerResponseShape,\n groupId: z.string().nullable(),\n signingKeyFingerprint: z.string().nullable(),\n subjectId: z.string(),\n subjectType: OrganizationContainerGrantSubjectTypeSchema,\n userId: z.string().nullable(),\n};\n\nexport const OrganizationContainerGrantResponseSchema = loosePlainObject(\n OrganizationContainerGrantResponseShape,\n);\n\nexport type OrganizationContainerGrantResponse = z.infer<\n typeof OrganizationContainerGrantResponseSchema\n>;\n\nexport const OrganizationContainerGrantsResponseSchema = loosePlainObject({\n grants: arraySchema(OrganizationContainerGrantResponseSchema),\n organizationId: z.string(),\n});\n\nexport type OrganizationContainerGrantsResponse = z.infer<\n typeof OrganizationContainerGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailGrantsResponseSchema = loosePlainObject({\n directGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n groupGrants: arraySchema(OrganizationContainerGrantResponseSchema),\n});\n\nexport type OrganizationUserDetailGrantsResponse = z.infer<\n typeof OrganizationUserDetailGrantsResponseSchema\n>;\n\nexport const OrganizationUserDetailResponseSchema = loosePlainObject({\n grants: OrganizationUserDetailGrantsResponseSchema,\n groups: arraySchema(OrganizationGroupSummaryResponseSchema),\n organizationId: z.string(),\n user: OrganizationDirectoryUserResponseSchema,\n});\n\nexport type OrganizationUserDetailResponse = z.infer<\n typeof OrganizationUserDetailResponseSchema\n>;\n\nexport function isOrganizationGroupContainerAccessLevel(\n value: string,\n): value is OrganizationGroupContainerAccessLevel {\n return OrganizationGroupContainerAccessLevelSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantSubjectType(\n value: string,\n): value is OrganizationContainerGrantSubjectType {\n return OrganizationContainerGrantSubjectTypeSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryUserResponse(\n value: unknown,\n): value is OrganizationDirectoryUserResponse {\n return OrganizationDirectoryUserResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationDirectoryResponse(\n value: unknown,\n): value is OrganizationDirectoryResponse {\n return OrganizationDirectoryResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationProfileResponse(\n value: unknown,\n): value is OrganizationProfileResponse {\n return OrganizationProfileResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupCurrentStateResponse(\n value: unknown,\n): value is OrganizationGroupCurrentStateResponse {\n return OrganizationGroupCurrentStateResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupSummaryResponse(\n value: unknown,\n): value is OrganizationGroupSummaryResponse {\n return OrganizationGroupSummaryResponseSchema.safeParse(value).success;\n}\n\nexport function isListOrganizationGroupsResponse(\n value: unknown,\n): value is ListOrganizationGroupsResponse {\n return ListOrganizationGroupsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMemberResponse(\n value: unknown,\n): value is OrganizationGroupMemberResponse {\n return OrganizationGroupMemberResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupMembersResponse(\n value: unknown,\n): value is OrganizationGroupMembersResponse {\n return OrganizationGroupMembersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainerResponse(\n value: unknown,\n): value is OrganizationGroupContainerResponse {\n return OrganizationGroupContainerResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationGroupContainersResponse(\n value: unknown,\n): value is OrganizationGroupContainersResponse {\n return OrganizationGroupContainersResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantResponse(\n value: unknown,\n): value is OrganizationContainerGrantResponse {\n return OrganizationContainerGrantResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationContainerGrantsResponse(\n value: unknown,\n): value is OrganizationContainerGrantsResponse {\n return OrganizationContainerGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailGrantsResponse(\n value: unknown,\n): value is OrganizationUserDetailGrantsResponse {\n return OrganizationUserDetailGrantsResponseSchema.safeParse(value).success;\n}\n\nexport function isOrganizationUserDetailResponse(\n value: unknown,\n): value is OrganizationUserDetailResponse {\n return OrganizationUserDetailResponseSchema.safeParse(value).success;\n}\n\nexport function isCreateOrganizationGroupResponse(\n value: unknown,\n): value is CreateOrganizationGroupResponse {\n return CreateOrganizationGroupResponseSchema.safeParse(value).success;\n}\n\nexport function isDeleteOrganizationGroupResponse(\n value: unknown,\n): value is DeleteOrganizationGroupResponse {\n return DeleteOrganizationGroupResponseSchema.safeParse(value).success;\n}\n"]}
|
|
@@ -4,23 +4,29 @@ import { z } from "zod";
|
|
|
4
4
|
* it. This is product state, not access authority: signed group policies and
|
|
5
5
|
* container grants decide access. `syncPaused` is the user's own choice to stop
|
|
6
6
|
* this organization's content syncing to their devices; it changes nothing on
|
|
7
|
-
* the server's access path. `
|
|
8
|
-
*
|
|
7
|
+
* the server's access path. `leaveRequestedAt` is when the user asked the
|
|
8
|
+
* organization's administrators to remove them, or null.
|
|
9
|
+
* `isPersonalOrganizationOwner` marks the user's personal organization, which
|
|
10
|
+
* can be neither paused nor left.
|
|
9
11
|
*/
|
|
10
12
|
export declare const OrganizationMembershipResponseSchema: z.ZodType<{
|
|
11
13
|
isPersonalOrganizationOwner: boolean;
|
|
14
|
+
leaveRequestedAt: string | null;
|
|
12
15
|
organizationId: string;
|
|
13
16
|
syncPaused: boolean;
|
|
14
17
|
}, {
|
|
15
18
|
isPersonalOrganizationOwner: boolean;
|
|
19
|
+
leaveRequestedAt: string | null;
|
|
16
20
|
organizationId: string;
|
|
17
21
|
syncPaused: boolean;
|
|
18
22
|
}, z.core.$ZodTypeInternals<{
|
|
19
23
|
isPersonalOrganizationOwner: boolean;
|
|
24
|
+
leaveRequestedAt: string | null;
|
|
20
25
|
organizationId: string;
|
|
21
26
|
syncPaused: boolean;
|
|
22
27
|
}, {
|
|
23
28
|
isPersonalOrganizationOwner: boolean;
|
|
29
|
+
leaveRequestedAt: string | null;
|
|
24
30
|
organizationId: string;
|
|
25
31
|
syncPaused: boolean;
|
|
26
32
|
}>>;
|
|
@@ -29,24 +35,28 @@ export type OrganizationMembershipResponse = z.infer<typeof OrganizationMembersh
|
|
|
29
35
|
export declare const OrganizationMembershipsResponseSchema: z.ZodType<{
|
|
30
36
|
memberships: {
|
|
31
37
|
isPersonalOrganizationOwner: boolean;
|
|
38
|
+
leaveRequestedAt: string | null;
|
|
32
39
|
organizationId: string;
|
|
33
40
|
syncPaused: boolean;
|
|
34
41
|
}[];
|
|
35
42
|
}, {
|
|
36
43
|
memberships: {
|
|
37
44
|
isPersonalOrganizationOwner: boolean;
|
|
45
|
+
leaveRequestedAt: string | null;
|
|
38
46
|
organizationId: string;
|
|
39
47
|
syncPaused: boolean;
|
|
40
48
|
}[];
|
|
41
49
|
}, z.core.$ZodTypeInternals<{
|
|
42
50
|
memberships: {
|
|
43
51
|
isPersonalOrganizationOwner: boolean;
|
|
52
|
+
leaveRequestedAt: string | null;
|
|
44
53
|
organizationId: string;
|
|
45
54
|
syncPaused: boolean;
|
|
46
55
|
}[];
|
|
47
56
|
}, {
|
|
48
57
|
memberships: {
|
|
49
58
|
isPersonalOrganizationOwner: boolean;
|
|
59
|
+
leaveRequestedAt: string | null;
|
|
50
60
|
organizationId: string;
|
|
51
61
|
syncPaused: boolean;
|
|
52
62
|
}[];
|
|
@@ -5,11 +5,14 @@ import { arraySchema, loosePlainObject } from "../schema.js";
|
|
|
5
5
|
* it. This is product state, not access authority: signed group policies and
|
|
6
6
|
* container grants decide access. `syncPaused` is the user's own choice to stop
|
|
7
7
|
* this organization's content syncing to their devices; it changes nothing on
|
|
8
|
-
* the server's access path. `
|
|
9
|
-
*
|
|
8
|
+
* the server's access path. `leaveRequestedAt` is when the user asked the
|
|
9
|
+
* organization's administrators to remove them, or null.
|
|
10
|
+
* `isPersonalOrganizationOwner` marks the user's personal organization, which
|
|
11
|
+
* can be neither paused nor left.
|
|
10
12
|
*/
|
|
11
13
|
export const OrganizationMembershipResponseSchema = loosePlainObject({
|
|
12
14
|
isPersonalOrganizationOwner: z.boolean(),
|
|
15
|
+
leaveRequestedAt: z.string().nullable(),
|
|
13
16
|
organizationId: z.string(),
|
|
14
17
|
syncPaused: z.boolean(),
|
|
15
18
|
});
|