@tearleads/client-sdk 0.1.87 → 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/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 +15 -8
- package/client/organizations/index.js.map +1 -1
- package/client/organizations/organizationMemberships.d.ts +41 -0
- package/client/organizations/organizationMemberships.js +166 -0
- package/client/organizations/organizationMemberships.js.map +1 -0
- package/client/organizations/organizationReadModels.d.ts +7 -1
- package/client/organizations/organizationReadModels.js +15 -6
- package/client/organizations/organizationReadModels.js.map +1 -1
- 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/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 +90 -0
- package/data/sqlite/schema/index.js +3 -0
- package/data/sqlite/schema/index.js.map +1 -1
- 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/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 +21 -2
- package/internal/api-client/ApiClient.js +15 -1
- package/internal/api-client/ApiClient.js.map +1 -1
- package/internal/api-client/routes/organizations/memberships.js +36 -0
- package/internal/api-client/routes/organizations/memberships.js.map +1 -0
- 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 -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 +503 -0
- package/internal/validators/operation/organizationMemberships.js +93 -0
- package/internal/validators/operation/organizationMemberships.js.map +1 -0
- package/internal/validators/operation/organizations.d.ts +48 -0
- package/internal/validators/operation/registry.d.ts +5 -0
- package/internal/validators/operation/registry.js +5 -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/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 +66 -0
- package/internal/validators/response/organizationMembership.js +29 -0
- package/internal/validators/response/organizationMembership.js.map +1 -0
- 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/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 +3 -0
- package/workflows/organizations/index.js +3 -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
- 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/sync/index.d.ts +1 -0
- package/workflows/sync/index.js +1 -0
- package/workflows/sync/index.js.map +1 -1
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { isUpdateOrganizationMembershipRequest } from "../request/index.js";
|
|
3
|
+
import { ErrorResponseSchema, isOrganizationMembershipResponse, isOrganizationMembershipsResponse } from "../response/index.js";
|
|
4
|
+
import { isOrganizationLeaveRequest } from "../util/organizationLeaveRequest.js";
|
|
5
|
+
/**
|
|
6
|
+
* The session user's conduit to the organizations they belong to: one row per
|
|
7
|
+
* active roster entry, carrying the user's own choices. Each operation reads or
|
|
8
|
+
* writes only the session user's rows, so it needs no organization role.
|
|
9
|
+
*/
|
|
10
|
+
export declare const OrganizationMembershipPathParamsSchema: z.ZodObject<{
|
|
11
|
+
organizationId: z.ZodCustom<string, string>;
|
|
12
|
+
}, z.core.$strict>;
|
|
13
|
+
export type OrganizationMembershipPathParams = z.infer<typeof OrganizationMembershipPathParamsSchema>;
|
|
14
|
+
export declare const listOrganizationMembershipsOperation: Omit<{
|
|
15
|
+
readonly auth: "session";
|
|
16
|
+
readonly failureResponses: {
|
|
17
|
+
readonly 401: z.ZodType<{
|
|
18
|
+
error: string;
|
|
19
|
+
code?: "session_refresh_required" | undefined;
|
|
20
|
+
}, {
|
|
21
|
+
error: string;
|
|
22
|
+
code?: "session_refresh_required" | undefined;
|
|
23
|
+
}, z.core.$ZodTypeInternals<{
|
|
24
|
+
error: string;
|
|
25
|
+
code?: "session_refresh_required" | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
error: string;
|
|
28
|
+
code?: "session_refresh_required" | undefined;
|
|
29
|
+
}>>;
|
|
30
|
+
readonly 500: z.ZodType<{
|
|
31
|
+
error: string;
|
|
32
|
+
}, {
|
|
33
|
+
error: string;
|
|
34
|
+
}, z.core.$ZodTypeInternals<{
|
|
35
|
+
error: string;
|
|
36
|
+
}, {
|
|
37
|
+
error: string;
|
|
38
|
+
}>>;
|
|
39
|
+
};
|
|
40
|
+
readonly failureStatuses: readonly [401, 500];
|
|
41
|
+
readonly id: "organizationMemberships.list";
|
|
42
|
+
readonly method: "GET";
|
|
43
|
+
readonly params: z.ZodObject<{}, z.core.$strict>;
|
|
44
|
+
readonly path: "/organization-memberships";
|
|
45
|
+
readonly responses: {
|
|
46
|
+
readonly 200: z.ZodType<{
|
|
47
|
+
memberships: {
|
|
48
|
+
isPersonalOrganizationOwner: boolean;
|
|
49
|
+
leaveRequestedAt: string | null;
|
|
50
|
+
organizationId: string;
|
|
51
|
+
syncPaused: boolean;
|
|
52
|
+
}[];
|
|
53
|
+
}, {
|
|
54
|
+
memberships: {
|
|
55
|
+
isPersonalOrganizationOwner: boolean;
|
|
56
|
+
leaveRequestedAt: string | null;
|
|
57
|
+
organizationId: string;
|
|
58
|
+
syncPaused: boolean;
|
|
59
|
+
}[];
|
|
60
|
+
}, z.core.$ZodTypeInternals<{
|
|
61
|
+
memberships: {
|
|
62
|
+
isPersonalOrganizationOwner: boolean;
|
|
63
|
+
leaveRequestedAt: string | null;
|
|
64
|
+
organizationId: string;
|
|
65
|
+
syncPaused: boolean;
|
|
66
|
+
}[];
|
|
67
|
+
}, {
|
|
68
|
+
memberships: {
|
|
69
|
+
isPersonalOrganizationOwner: boolean;
|
|
70
|
+
leaveRequestedAt: string | null;
|
|
71
|
+
organizationId: string;
|
|
72
|
+
syncPaused: boolean;
|
|
73
|
+
}[];
|
|
74
|
+
}>>;
|
|
75
|
+
};
|
|
76
|
+
}, "failureResponses" | "failureStatuses"> & {
|
|
77
|
+
readonly failureResponses: {
|
|
78
|
+
readonly 401: z.ZodType<{
|
|
79
|
+
error: string;
|
|
80
|
+
code?: "session_refresh_required" | undefined;
|
|
81
|
+
}, {
|
|
82
|
+
error: string;
|
|
83
|
+
code?: "session_refresh_required" | undefined;
|
|
84
|
+
}, z.core.$ZodTypeInternals<{
|
|
85
|
+
error: string;
|
|
86
|
+
code?: "session_refresh_required" | undefined;
|
|
87
|
+
}, {
|
|
88
|
+
error: string;
|
|
89
|
+
code?: "session_refresh_required" | undefined;
|
|
90
|
+
}>>;
|
|
91
|
+
readonly 500: z.ZodType<{
|
|
92
|
+
error: string;
|
|
93
|
+
}, {
|
|
94
|
+
error: string;
|
|
95
|
+
}, z.core.$ZodTypeInternals<{
|
|
96
|
+
error: string;
|
|
97
|
+
}, {
|
|
98
|
+
error: string;
|
|
99
|
+
}>>;
|
|
100
|
+
} & {
|
|
101
|
+
readonly 503: typeof ErrorResponseSchema;
|
|
102
|
+
};
|
|
103
|
+
readonly failureStatuses: readonly [401, 500] | readonly [401, 500, 503];
|
|
104
|
+
};
|
|
105
|
+
export declare const updateOrganizationMembershipOperation: Omit<{
|
|
106
|
+
readonly auth: "session";
|
|
107
|
+
readonly body: z.ZodObject<{
|
|
108
|
+
syncPaused: z.ZodBoolean;
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
readonly failureResponses: {
|
|
111
|
+
readonly 400: z.ZodType<{
|
|
112
|
+
error: string;
|
|
113
|
+
}, {
|
|
114
|
+
error: string;
|
|
115
|
+
}, z.core.$ZodTypeInternals<{
|
|
116
|
+
error: string;
|
|
117
|
+
}, {
|
|
118
|
+
error: string;
|
|
119
|
+
}>>;
|
|
120
|
+
readonly 401: z.ZodType<{
|
|
121
|
+
error: string;
|
|
122
|
+
code?: "session_refresh_required" | undefined;
|
|
123
|
+
}, {
|
|
124
|
+
error: string;
|
|
125
|
+
code?: "session_refresh_required" | undefined;
|
|
126
|
+
}, z.core.$ZodTypeInternals<{
|
|
127
|
+
error: string;
|
|
128
|
+
code?: "session_refresh_required" | undefined;
|
|
129
|
+
}, {
|
|
130
|
+
error: string;
|
|
131
|
+
code?: "session_refresh_required" | undefined;
|
|
132
|
+
}>>;
|
|
133
|
+
readonly 404: z.ZodType<{
|
|
134
|
+
error: string;
|
|
135
|
+
}, {
|
|
136
|
+
error: string;
|
|
137
|
+
}, z.core.$ZodTypeInternals<{
|
|
138
|
+
error: string;
|
|
139
|
+
}, {
|
|
140
|
+
error: string;
|
|
141
|
+
}>>;
|
|
142
|
+
readonly 409: z.ZodType<{
|
|
143
|
+
error: string;
|
|
144
|
+
}, {
|
|
145
|
+
error: string;
|
|
146
|
+
}, z.core.$ZodTypeInternals<{
|
|
147
|
+
error: string;
|
|
148
|
+
}, {
|
|
149
|
+
error: string;
|
|
150
|
+
}>>;
|
|
151
|
+
readonly 500: z.ZodType<{
|
|
152
|
+
error: string;
|
|
153
|
+
}, {
|
|
154
|
+
error: string;
|
|
155
|
+
}, z.core.$ZodTypeInternals<{
|
|
156
|
+
error: string;
|
|
157
|
+
}, {
|
|
158
|
+
error: string;
|
|
159
|
+
}>>;
|
|
160
|
+
};
|
|
161
|
+
readonly failureStatuses: readonly [400, 401, 404, 409, 500];
|
|
162
|
+
readonly id: "organizationMemberships.update";
|
|
163
|
+
readonly method: "PUT";
|
|
164
|
+
readonly params: z.ZodObject<{
|
|
165
|
+
organizationId: z.ZodCustom<string, string>;
|
|
166
|
+
}, z.core.$strict>;
|
|
167
|
+
readonly path: "/organization-memberships/{organizationId}";
|
|
168
|
+
readonly responses: {
|
|
169
|
+
readonly 200: z.ZodType<{
|
|
170
|
+
isPersonalOrganizationOwner: boolean;
|
|
171
|
+
leaveRequestedAt: string | null;
|
|
172
|
+
organizationId: string;
|
|
173
|
+
syncPaused: boolean;
|
|
174
|
+
}, {
|
|
175
|
+
isPersonalOrganizationOwner: boolean;
|
|
176
|
+
leaveRequestedAt: string | null;
|
|
177
|
+
organizationId: string;
|
|
178
|
+
syncPaused: boolean;
|
|
179
|
+
}, z.core.$ZodTypeInternals<{
|
|
180
|
+
isPersonalOrganizationOwner: boolean;
|
|
181
|
+
leaveRequestedAt: string | null;
|
|
182
|
+
organizationId: string;
|
|
183
|
+
syncPaused: boolean;
|
|
184
|
+
}, {
|
|
185
|
+
isPersonalOrganizationOwner: boolean;
|
|
186
|
+
leaveRequestedAt: string | null;
|
|
187
|
+
organizationId: string;
|
|
188
|
+
syncPaused: boolean;
|
|
189
|
+
}>>;
|
|
190
|
+
};
|
|
191
|
+
}, "failureResponses" | "failureStatuses"> & {
|
|
192
|
+
readonly failureResponses: {
|
|
193
|
+
readonly 400: z.ZodType<{
|
|
194
|
+
error: string;
|
|
195
|
+
}, {
|
|
196
|
+
error: string;
|
|
197
|
+
}, z.core.$ZodTypeInternals<{
|
|
198
|
+
error: string;
|
|
199
|
+
}, {
|
|
200
|
+
error: string;
|
|
201
|
+
}>>;
|
|
202
|
+
readonly 401: z.ZodType<{
|
|
203
|
+
error: string;
|
|
204
|
+
code?: "session_refresh_required" | undefined;
|
|
205
|
+
}, {
|
|
206
|
+
error: string;
|
|
207
|
+
code?: "session_refresh_required" | undefined;
|
|
208
|
+
}, z.core.$ZodTypeInternals<{
|
|
209
|
+
error: string;
|
|
210
|
+
code?: "session_refresh_required" | undefined;
|
|
211
|
+
}, {
|
|
212
|
+
error: string;
|
|
213
|
+
code?: "session_refresh_required" | undefined;
|
|
214
|
+
}>>;
|
|
215
|
+
readonly 404: z.ZodType<{
|
|
216
|
+
error: string;
|
|
217
|
+
}, {
|
|
218
|
+
error: string;
|
|
219
|
+
}, z.core.$ZodTypeInternals<{
|
|
220
|
+
error: string;
|
|
221
|
+
}, {
|
|
222
|
+
error: string;
|
|
223
|
+
}>>;
|
|
224
|
+
readonly 409: z.ZodType<{
|
|
225
|
+
error: string;
|
|
226
|
+
}, {
|
|
227
|
+
error: string;
|
|
228
|
+
}, z.core.$ZodTypeInternals<{
|
|
229
|
+
error: string;
|
|
230
|
+
}, {
|
|
231
|
+
error: string;
|
|
232
|
+
}>>;
|
|
233
|
+
readonly 500: z.ZodType<{
|
|
234
|
+
error: string;
|
|
235
|
+
}, {
|
|
236
|
+
error: string;
|
|
237
|
+
}, z.core.$ZodTypeInternals<{
|
|
238
|
+
error: string;
|
|
239
|
+
}, {
|
|
240
|
+
error: string;
|
|
241
|
+
}>>;
|
|
242
|
+
} & {
|
|
243
|
+
readonly 503: typeof ErrorResponseSchema;
|
|
244
|
+
};
|
|
245
|
+
readonly failureStatuses: readonly [400, 401, 404, 409, 500] | readonly [400, 401, 404, 409, 500, 503];
|
|
246
|
+
};
|
|
247
|
+
/**
|
|
248
|
+
* Files the session user's signed request to leave one organization. It is a
|
|
249
|
+
* request, not a removal: an administrator acts on it by signing the member's
|
|
250
|
+
* removal, which clears it.
|
|
251
|
+
*/
|
|
252
|
+
export declare const requestOrganizationLeaveOperation: Omit<{
|
|
253
|
+
readonly auth: "session";
|
|
254
|
+
readonly body: z.ZodObject<{
|
|
255
|
+
organizationId: z.ZodCustom<string, string>;
|
|
256
|
+
userId: z.ZodCustom<string, string>;
|
|
257
|
+
requestedAt: z.ZodString;
|
|
258
|
+
signature: z.ZodString;
|
|
259
|
+
}, z.core.$strict>;
|
|
260
|
+
readonly failureResponses: {
|
|
261
|
+
readonly 400: z.ZodType<{
|
|
262
|
+
error: string;
|
|
263
|
+
}, {
|
|
264
|
+
error: string;
|
|
265
|
+
}, z.core.$ZodTypeInternals<{
|
|
266
|
+
error: string;
|
|
267
|
+
}, {
|
|
268
|
+
error: string;
|
|
269
|
+
}>>;
|
|
270
|
+
readonly 401: z.ZodType<{
|
|
271
|
+
error: string;
|
|
272
|
+
code?: "session_refresh_required" | undefined;
|
|
273
|
+
}, {
|
|
274
|
+
error: string;
|
|
275
|
+
code?: "session_refresh_required" | undefined;
|
|
276
|
+
}, z.core.$ZodTypeInternals<{
|
|
277
|
+
error: string;
|
|
278
|
+
code?: "session_refresh_required" | undefined;
|
|
279
|
+
}, {
|
|
280
|
+
error: string;
|
|
281
|
+
code?: "session_refresh_required" | undefined;
|
|
282
|
+
}>>;
|
|
283
|
+
readonly 404: z.ZodType<{
|
|
284
|
+
error: string;
|
|
285
|
+
}, {
|
|
286
|
+
error: string;
|
|
287
|
+
}, z.core.$ZodTypeInternals<{
|
|
288
|
+
error: string;
|
|
289
|
+
}, {
|
|
290
|
+
error: string;
|
|
291
|
+
}>>;
|
|
292
|
+
readonly 409: z.ZodType<{
|
|
293
|
+
error: string;
|
|
294
|
+
}, {
|
|
295
|
+
error: string;
|
|
296
|
+
}, z.core.$ZodTypeInternals<{
|
|
297
|
+
error: string;
|
|
298
|
+
}, {
|
|
299
|
+
error: string;
|
|
300
|
+
}>>;
|
|
301
|
+
readonly 500: z.ZodType<{
|
|
302
|
+
error: string;
|
|
303
|
+
}, {
|
|
304
|
+
error: string;
|
|
305
|
+
}, z.core.$ZodTypeInternals<{
|
|
306
|
+
error: string;
|
|
307
|
+
}, {
|
|
308
|
+
error: string;
|
|
309
|
+
}>>;
|
|
310
|
+
};
|
|
311
|
+
readonly failureStatuses: readonly [400, 401, 404, 409, 500];
|
|
312
|
+
readonly id: "organizationMemberships.leaveRequest.put";
|
|
313
|
+
readonly method: "PUT";
|
|
314
|
+
readonly params: z.ZodObject<{
|
|
315
|
+
organizationId: z.ZodCustom<string, string>;
|
|
316
|
+
}, z.core.$strict>;
|
|
317
|
+
readonly path: "/organization-memberships/{organizationId}/leave-request";
|
|
318
|
+
readonly responses: {
|
|
319
|
+
readonly 200: z.ZodType<{
|
|
320
|
+
isPersonalOrganizationOwner: boolean;
|
|
321
|
+
leaveRequestedAt: string | null;
|
|
322
|
+
organizationId: string;
|
|
323
|
+
syncPaused: boolean;
|
|
324
|
+
}, {
|
|
325
|
+
isPersonalOrganizationOwner: boolean;
|
|
326
|
+
leaveRequestedAt: string | null;
|
|
327
|
+
organizationId: string;
|
|
328
|
+
syncPaused: boolean;
|
|
329
|
+
}, z.core.$ZodTypeInternals<{
|
|
330
|
+
isPersonalOrganizationOwner: boolean;
|
|
331
|
+
leaveRequestedAt: string | null;
|
|
332
|
+
organizationId: string;
|
|
333
|
+
syncPaused: boolean;
|
|
334
|
+
}, {
|
|
335
|
+
isPersonalOrganizationOwner: boolean;
|
|
336
|
+
leaveRequestedAt: string | null;
|
|
337
|
+
organizationId: string;
|
|
338
|
+
syncPaused: boolean;
|
|
339
|
+
}>>;
|
|
340
|
+
};
|
|
341
|
+
}, "failureResponses" | "failureStatuses"> & {
|
|
342
|
+
readonly failureResponses: {
|
|
343
|
+
readonly 400: z.ZodType<{
|
|
344
|
+
error: string;
|
|
345
|
+
}, {
|
|
346
|
+
error: string;
|
|
347
|
+
}, z.core.$ZodTypeInternals<{
|
|
348
|
+
error: string;
|
|
349
|
+
}, {
|
|
350
|
+
error: string;
|
|
351
|
+
}>>;
|
|
352
|
+
readonly 401: z.ZodType<{
|
|
353
|
+
error: string;
|
|
354
|
+
code?: "session_refresh_required" | undefined;
|
|
355
|
+
}, {
|
|
356
|
+
error: string;
|
|
357
|
+
code?: "session_refresh_required" | undefined;
|
|
358
|
+
}, z.core.$ZodTypeInternals<{
|
|
359
|
+
error: string;
|
|
360
|
+
code?: "session_refresh_required" | undefined;
|
|
361
|
+
}, {
|
|
362
|
+
error: string;
|
|
363
|
+
code?: "session_refresh_required" | undefined;
|
|
364
|
+
}>>;
|
|
365
|
+
readonly 404: z.ZodType<{
|
|
366
|
+
error: string;
|
|
367
|
+
}, {
|
|
368
|
+
error: string;
|
|
369
|
+
}, z.core.$ZodTypeInternals<{
|
|
370
|
+
error: string;
|
|
371
|
+
}, {
|
|
372
|
+
error: string;
|
|
373
|
+
}>>;
|
|
374
|
+
readonly 409: z.ZodType<{
|
|
375
|
+
error: string;
|
|
376
|
+
}, {
|
|
377
|
+
error: string;
|
|
378
|
+
}, z.core.$ZodTypeInternals<{
|
|
379
|
+
error: string;
|
|
380
|
+
}, {
|
|
381
|
+
error: string;
|
|
382
|
+
}>>;
|
|
383
|
+
readonly 500: z.ZodType<{
|
|
384
|
+
error: string;
|
|
385
|
+
}, {
|
|
386
|
+
error: string;
|
|
387
|
+
}, z.core.$ZodTypeInternals<{
|
|
388
|
+
error: string;
|
|
389
|
+
}, {
|
|
390
|
+
error: string;
|
|
391
|
+
}>>;
|
|
392
|
+
} & {
|
|
393
|
+
readonly 503: typeof ErrorResponseSchema;
|
|
394
|
+
};
|
|
395
|
+
readonly failureStatuses: readonly [400, 401, 404, 409, 500] | readonly [400, 401, 404, 409, 500, 503];
|
|
396
|
+
};
|
|
397
|
+
export declare const withdrawOrganizationLeaveRequestOperation: Omit<{
|
|
398
|
+
readonly auth: "session";
|
|
399
|
+
readonly failureResponses: {
|
|
400
|
+
readonly 401: z.ZodType<{
|
|
401
|
+
error: string;
|
|
402
|
+
code?: "session_refresh_required" | undefined;
|
|
403
|
+
}, {
|
|
404
|
+
error: string;
|
|
405
|
+
code?: "session_refresh_required" | undefined;
|
|
406
|
+
}, z.core.$ZodTypeInternals<{
|
|
407
|
+
error: string;
|
|
408
|
+
code?: "session_refresh_required" | undefined;
|
|
409
|
+
}, {
|
|
410
|
+
error: string;
|
|
411
|
+
code?: "session_refresh_required" | undefined;
|
|
412
|
+
}>>;
|
|
413
|
+
readonly 404: z.ZodType<{
|
|
414
|
+
error: string;
|
|
415
|
+
}, {
|
|
416
|
+
error: string;
|
|
417
|
+
}, z.core.$ZodTypeInternals<{
|
|
418
|
+
error: string;
|
|
419
|
+
}, {
|
|
420
|
+
error: string;
|
|
421
|
+
}>>;
|
|
422
|
+
readonly 500: z.ZodType<{
|
|
423
|
+
error: string;
|
|
424
|
+
}, {
|
|
425
|
+
error: string;
|
|
426
|
+
}, z.core.$ZodTypeInternals<{
|
|
427
|
+
error: string;
|
|
428
|
+
}, {
|
|
429
|
+
error: string;
|
|
430
|
+
}>>;
|
|
431
|
+
};
|
|
432
|
+
readonly failureStatuses: readonly [401, 404, 500];
|
|
433
|
+
readonly id: "organizationMemberships.leaveRequest.delete";
|
|
434
|
+
readonly method: "DELETE";
|
|
435
|
+
readonly params: z.ZodObject<{
|
|
436
|
+
organizationId: z.ZodCustom<string, string>;
|
|
437
|
+
}, z.core.$strict>;
|
|
438
|
+
readonly path: "/organization-memberships/{organizationId}/leave-request";
|
|
439
|
+
readonly responses: {
|
|
440
|
+
readonly 200: z.ZodType<{
|
|
441
|
+
isPersonalOrganizationOwner: boolean;
|
|
442
|
+
leaveRequestedAt: string | null;
|
|
443
|
+
organizationId: string;
|
|
444
|
+
syncPaused: boolean;
|
|
445
|
+
}, {
|
|
446
|
+
isPersonalOrganizationOwner: boolean;
|
|
447
|
+
leaveRequestedAt: string | null;
|
|
448
|
+
organizationId: string;
|
|
449
|
+
syncPaused: boolean;
|
|
450
|
+
}, z.core.$ZodTypeInternals<{
|
|
451
|
+
isPersonalOrganizationOwner: boolean;
|
|
452
|
+
leaveRequestedAt: string | null;
|
|
453
|
+
organizationId: string;
|
|
454
|
+
syncPaused: boolean;
|
|
455
|
+
}, {
|
|
456
|
+
isPersonalOrganizationOwner: boolean;
|
|
457
|
+
leaveRequestedAt: string | null;
|
|
458
|
+
organizationId: string;
|
|
459
|
+
syncPaused: boolean;
|
|
460
|
+
}>>;
|
|
461
|
+
};
|
|
462
|
+
}, "failureResponses" | "failureStatuses"> & {
|
|
463
|
+
readonly failureResponses: {
|
|
464
|
+
readonly 401: z.ZodType<{
|
|
465
|
+
error: string;
|
|
466
|
+
code?: "session_refresh_required" | undefined;
|
|
467
|
+
}, {
|
|
468
|
+
error: string;
|
|
469
|
+
code?: "session_refresh_required" | undefined;
|
|
470
|
+
}, z.core.$ZodTypeInternals<{
|
|
471
|
+
error: string;
|
|
472
|
+
code?: "session_refresh_required" | undefined;
|
|
473
|
+
}, {
|
|
474
|
+
error: string;
|
|
475
|
+
code?: "session_refresh_required" | undefined;
|
|
476
|
+
}>>;
|
|
477
|
+
readonly 404: z.ZodType<{
|
|
478
|
+
error: string;
|
|
479
|
+
}, {
|
|
480
|
+
error: string;
|
|
481
|
+
}, z.core.$ZodTypeInternals<{
|
|
482
|
+
error: string;
|
|
483
|
+
}, {
|
|
484
|
+
error: string;
|
|
485
|
+
}>>;
|
|
486
|
+
readonly 500: z.ZodType<{
|
|
487
|
+
error: string;
|
|
488
|
+
}, {
|
|
489
|
+
error: string;
|
|
490
|
+
}, z.core.$ZodTypeInternals<{
|
|
491
|
+
error: string;
|
|
492
|
+
}, {
|
|
493
|
+
error: string;
|
|
494
|
+
}>>;
|
|
495
|
+
} & {
|
|
496
|
+
readonly 503: typeof ErrorResponseSchema;
|
|
497
|
+
};
|
|
498
|
+
readonly failureStatuses: readonly [401, 404, 500] | readonly [401, 404, 500, 503];
|
|
499
|
+
};
|
|
500
|
+
export declare const isRequestOrganizationLeaveOperationRequest: typeof isOrganizationLeaveRequest;
|
|
501
|
+
export declare const isListOrganizationMembershipsOperationResponse: typeof isOrganizationMembershipsResponse;
|
|
502
|
+
export declare const isUpdateOrganizationMembershipOperationRequest: typeof isUpdateOrganizationMembershipRequest;
|
|
503
|
+
export declare const isUpdateOrganizationMembershipOperationResponse: typeof isOrganizationMembershipResponse;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { isUpdateOrganizationMembershipRequest, UpdateOrganizationMembershipRequestSchema, } from "../request/index.js";
|
|
3
|
+
import { ErrorResponseSchema, isOrganizationMembershipResponse, isOrganizationMembershipsResponse, OrganizationMembershipResponseSchema, OrganizationMembershipsResponseSchema, SessionFailureResponseSchema, } from "../response/index.js";
|
|
4
|
+
import { uuidV4StringSchema } from "../schema.js";
|
|
5
|
+
import { isOrganizationLeaveRequest, OrganizationLeaveRequestSchema, } from "../util/organizationLeaveRequest.js";
|
|
6
|
+
import { defineJsonOperation } from "./definition.js";
|
|
7
|
+
/**
|
|
8
|
+
* The session user's conduit to the organizations they belong to: one row per
|
|
9
|
+
* active roster entry, carrying the user's own choices. Each operation reads or
|
|
10
|
+
* writes only the session user's rows, so it needs no organization role.
|
|
11
|
+
*/
|
|
12
|
+
export const OrganizationMembershipPathParamsSchema = z.strictObject({
|
|
13
|
+
organizationId: uuidV4StringSchema,
|
|
14
|
+
});
|
|
15
|
+
export const listOrganizationMembershipsOperation = defineJsonOperation({
|
|
16
|
+
auth: "session",
|
|
17
|
+
failureResponses: {
|
|
18
|
+
401: SessionFailureResponseSchema,
|
|
19
|
+
500: ErrorResponseSchema,
|
|
20
|
+
},
|
|
21
|
+
failureStatuses: [401, 500],
|
|
22
|
+
id: "organizationMemberships.list",
|
|
23
|
+
method: "GET",
|
|
24
|
+
params: z.strictObject({}),
|
|
25
|
+
path: "/organization-memberships",
|
|
26
|
+
responses: {
|
|
27
|
+
200: OrganizationMembershipsResponseSchema,
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
export const updateOrganizationMembershipOperation = defineJsonOperation({
|
|
31
|
+
auth: "session",
|
|
32
|
+
body: UpdateOrganizationMembershipRequestSchema,
|
|
33
|
+
failureResponses: {
|
|
34
|
+
400: ErrorResponseSchema,
|
|
35
|
+
401: SessionFailureResponseSchema,
|
|
36
|
+
404: ErrorResponseSchema,
|
|
37
|
+
409: ErrorResponseSchema,
|
|
38
|
+
500: ErrorResponseSchema,
|
|
39
|
+
},
|
|
40
|
+
failureStatuses: [400, 401, 404, 409, 500],
|
|
41
|
+
id: "organizationMemberships.update",
|
|
42
|
+
method: "PUT",
|
|
43
|
+
params: OrganizationMembershipPathParamsSchema,
|
|
44
|
+
path: "/organization-memberships/{organizationId}",
|
|
45
|
+
responses: {
|
|
46
|
+
200: OrganizationMembershipResponseSchema,
|
|
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;
|
|
90
|
+
export const isListOrganizationMembershipsOperationResponse = isOrganizationMembershipsResponse;
|
|
91
|
+
export const isUpdateOrganizationMembershipOperationRequest = isUpdateOrganizationMembershipRequest;
|
|
92
|
+
export const isUpdateOrganizationMembershipOperationResponse = isOrganizationMembershipResponse;
|
|
93
|
+
//# sourceMappingURL=organizationMemberships.js.map
|
|
@@ -0,0 +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,EACL,0BAA0B,EAC1B,8BAA8B,GAC/B,MAAM,kCAAkC,CAAC;AAC1C,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;;;;GAIG;AACH,MAAM,CAAC,MAAM,iCAAiC,GAAG,mBAAmB,CAAC;IACnE,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,8BAA8B;IACpC,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,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"]}
|