@stackframe/stack-shared 2.5.35 → 2.6.0

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.
Files changed (38) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/interface/clientInterface.d.ts +14 -11
  3. package/dist/interface/clientInterface.js +35 -16
  4. package/dist/interface/crud/current-user.d.ts +6 -6
  5. package/dist/interface/crud/current-user.js +2 -2
  6. package/dist/interface/crud/projects.d.ts +26 -12
  7. package/dist/interface/crud/projects.js +3 -0
  8. package/dist/interface/crud/team-member-profiles.d.ts +6 -6
  9. package/dist/interface/crud/users.d.ts +16 -12
  10. package/dist/interface/crud/users.js +3 -0
  11. package/dist/interface/webhooks.d.ts +8 -4
  12. package/dist/known-errors.d.ts +8 -0
  13. package/dist/known-errors.js +10 -0
  14. package/dist/schema-fields.d.ts +6 -2
  15. package/dist/schema-fields.js +63 -5
  16. package/dist/utils/jwt.d.ts +1 -1
  17. package/dist/utils/jwt.js +2 -2
  18. package/dist/utils/oauth.d.ts +2 -2
  19. package/dist/utils/oauth.js +1 -1
  20. package/package.json +4 -2
  21. package/dist/interface/crud-deprecated/api-keys.d.ts +0 -134
  22. package/dist/interface/crud-deprecated/api-keys.js +0 -61
  23. package/dist/interface/crud-deprecated/current-user.d.ts +0 -127
  24. package/dist/interface/crud-deprecated/current-user.js +0 -49
  25. package/dist/interface/crud-deprecated/email-templates.d.ts +0 -75
  26. package/dist/interface/crud-deprecated/email-templates.js +0 -41
  27. package/dist/interface/crud-deprecated/oauth.d.ts +0 -24
  28. package/dist/interface/crud-deprecated/oauth.js +0 -12
  29. package/dist/interface/crud-deprecated/projects.d.ts +0 -440
  30. package/dist/interface/crud-deprecated/projects.js +0 -109
  31. package/dist/interface/crud-deprecated/team-memberships.d.ts +0 -22
  32. package/dist/interface/crud-deprecated/team-memberships.js +0 -22
  33. package/dist/interface/crud-deprecated/team-permissions.d.ts +0 -129
  34. package/dist/interface/crud-deprecated/team-permissions.js +0 -83
  35. package/dist/interface/crud-deprecated/teams.d.ts +0 -126
  36. package/dist/interface/crud-deprecated/teams.js +0 -78
  37. package/dist/interface/crud-deprecated/users.d.ts +0 -199
  38. package/dist/interface/crud-deprecated/users.js +0 -75
@@ -1,440 +0,0 @@
1
- import { CrudTypeOf } from "../../crud";
2
- export declare const projectsCrudAdminReadSchema: import("yup").ObjectSchema<{
3
- id: string;
4
- display_name: string;
5
- description: string | null | undefined;
6
- created_at_millis: number;
7
- user_count: number;
8
- is_production_mode: NonNullable<boolean | undefined>;
9
- config: {
10
- id: string;
11
- allow_localhost: NonNullable<boolean | undefined>;
12
- credential_enabled: NonNullable<boolean | undefined>;
13
- magic_link_enabled: NonNullable<boolean | undefined>;
14
- oauth_providers: {
15
- client_id?: string | undefined;
16
- client_secret?: string | undefined;
17
- type: NonNullable<"shared" | "standard" | undefined>;
18
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
19
- enabled: NonNullable<boolean | undefined>;
20
- }[];
21
- domains: {
22
- domain: string;
23
- handler_path: string;
24
- }[];
25
- email_config: {
26
- host?: string | undefined;
27
- port?: number | undefined;
28
- username?: string | undefined;
29
- password?: string | undefined;
30
- sender_name?: string | undefined;
31
- sender_email?: string | undefined;
32
- type: NonNullable<"shared" | "standard" | undefined>;
33
- };
34
- team_creator_default_permissions: {
35
- id: string;
36
- }[];
37
- team_member_default_permissions: {
38
- id: string;
39
- }[];
40
- };
41
- }, import("yup").AnyObject, {
42
- id: undefined;
43
- display_name: undefined;
44
- description: undefined;
45
- created_at_millis: undefined;
46
- user_count: undefined;
47
- is_production_mode: undefined;
48
- config: {
49
- id: undefined;
50
- allow_localhost: undefined;
51
- credential_enabled: undefined;
52
- magic_link_enabled: undefined;
53
- oauth_providers: undefined;
54
- domains: undefined;
55
- email_config: {
56
- type: undefined;
57
- host: undefined;
58
- port: undefined;
59
- username: undefined;
60
- password: undefined;
61
- sender_name: undefined;
62
- sender_email: undefined;
63
- };
64
- team_creator_default_permissions: undefined;
65
- team_member_default_permissions: undefined;
66
- };
67
- }, "">;
68
- export declare const projectsCrudClientReadSchema: import("yup").ObjectSchema<{
69
- id: string;
70
- display_name: string;
71
- config: {
72
- credential_enabled: NonNullable<boolean | undefined>;
73
- magic_link_enabled: NonNullable<boolean | undefined>;
74
- oauth_providers: {
75
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
76
- }[];
77
- };
78
- }, import("yup").AnyObject, {
79
- id: undefined;
80
- display_name: undefined;
81
- config: {
82
- credential_enabled: undefined;
83
- magic_link_enabled: undefined;
84
- oauth_providers: undefined;
85
- };
86
- }, "">;
87
- export declare const projectsCrudAdminUpdateSchema: import("yup").ObjectSchema<{
88
- display_name: string | undefined;
89
- description: string | null | undefined;
90
- is_production_mode: boolean | undefined;
91
- config: {
92
- allow_localhost?: boolean | undefined;
93
- credential_enabled?: boolean | undefined;
94
- magic_link_enabled?: boolean | undefined;
95
- oauth_providers?: {
96
- client_id?: string | undefined;
97
- client_secret?: string | undefined;
98
- type: NonNullable<"shared" | "standard" | undefined>;
99
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
100
- enabled: NonNullable<boolean | undefined>;
101
- }[] | undefined;
102
- domains?: {
103
- domain: string;
104
- handler_path: string;
105
- }[] | undefined;
106
- email_config?: {
107
- host?: string | undefined;
108
- port?: number | undefined;
109
- username?: string | undefined;
110
- password?: string | undefined;
111
- sender_name?: string | undefined;
112
- sender_email?: string | undefined;
113
- type: NonNullable<"shared" | "standard" | undefined>;
114
- } | undefined;
115
- create_team_on_sign_up?: boolean | undefined;
116
- team_creator_default_permissions?: {
117
- id: string;
118
- }[] | undefined;
119
- team_member_default_permissions?: {
120
- id: string;
121
- }[] | undefined;
122
- } | undefined;
123
- }, import("yup").AnyObject, {
124
- display_name: undefined;
125
- description: undefined;
126
- is_production_mode: undefined;
127
- config: undefined;
128
- }, "">;
129
- export declare const projectsCrudAdminCreateSchema: import("yup").ObjectSchema<{
130
- display_name: string;
131
- description: string | null | undefined;
132
- is_production_mode: boolean | undefined;
133
- config: {
134
- allow_localhost?: boolean | undefined;
135
- credential_enabled?: boolean | undefined;
136
- magic_link_enabled?: boolean | undefined;
137
- oauth_providers?: {
138
- client_id?: string | undefined;
139
- client_secret?: string | undefined;
140
- type: NonNullable<"shared" | "standard" | undefined>;
141
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
142
- enabled: NonNullable<boolean | undefined>;
143
- }[] | undefined;
144
- domains?: {
145
- domain: string;
146
- handler_path: string;
147
- }[] | undefined;
148
- email_config?: {
149
- host?: string | undefined;
150
- port?: number | undefined;
151
- username?: string | undefined;
152
- password?: string | undefined;
153
- sender_name?: string | undefined;
154
- sender_email?: string | undefined;
155
- type: NonNullable<"shared" | "standard" | undefined>;
156
- } | undefined;
157
- create_team_on_sign_up?: boolean | undefined;
158
- team_creator_default_permissions?: {
159
- id: string;
160
- }[] | undefined;
161
- team_member_default_permissions?: {
162
- id: string;
163
- }[] | undefined;
164
- } | undefined;
165
- } & {
166
- display_name: string;
167
- }, import("yup").AnyObject, {
168
- display_name: undefined;
169
- description: undefined;
170
- is_production_mode: undefined;
171
- config: undefined;
172
- }, "">;
173
- export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
174
- clientReadSchema: import("yup").ObjectSchema<{
175
- id: string;
176
- display_name: string;
177
- config: {
178
- credential_enabled: NonNullable<boolean | undefined>;
179
- magic_link_enabled: NonNullable<boolean | undefined>;
180
- oauth_providers: {
181
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
182
- }[];
183
- };
184
- }, import("yup").AnyObject, {
185
- id: undefined;
186
- display_name: undefined;
187
- config: {
188
- credential_enabled: undefined;
189
- magic_link_enabled: undefined;
190
- oauth_providers: undefined;
191
- };
192
- }, "">;
193
- adminReadSchema: import("yup").ObjectSchema<{
194
- id: string;
195
- display_name: string;
196
- description: string | null | undefined;
197
- created_at_millis: number;
198
- user_count: number;
199
- is_production_mode: NonNullable<boolean | undefined>;
200
- config: {
201
- id: string;
202
- allow_localhost: NonNullable<boolean | undefined>;
203
- credential_enabled: NonNullable<boolean | undefined>;
204
- magic_link_enabled: NonNullable<boolean | undefined>;
205
- oauth_providers: {
206
- client_id?: string | undefined;
207
- client_secret?: string | undefined;
208
- type: NonNullable<"shared" | "standard" | undefined>;
209
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
210
- enabled: NonNullable<boolean | undefined>;
211
- }[];
212
- domains: {
213
- domain: string;
214
- handler_path: string;
215
- }[];
216
- email_config: {
217
- host?: string | undefined;
218
- port?: number | undefined;
219
- username?: string | undefined;
220
- password?: string | undefined;
221
- sender_name?: string | undefined;
222
- sender_email?: string | undefined;
223
- type: NonNullable<"shared" | "standard" | undefined>;
224
- };
225
- team_creator_default_permissions: {
226
- id: string;
227
- }[];
228
- team_member_default_permissions: {
229
- id: string;
230
- }[];
231
- };
232
- }, import("yup").AnyObject, {
233
- id: undefined;
234
- display_name: undefined;
235
- description: undefined;
236
- created_at_millis: undefined;
237
- user_count: undefined;
238
- is_production_mode: undefined;
239
- config: {
240
- id: undefined;
241
- allow_localhost: undefined;
242
- credential_enabled: undefined;
243
- magic_link_enabled: undefined;
244
- oauth_providers: undefined;
245
- domains: undefined;
246
- email_config: {
247
- type: undefined;
248
- host: undefined;
249
- port: undefined;
250
- username: undefined;
251
- password: undefined;
252
- sender_name: undefined;
253
- sender_email: undefined;
254
- };
255
- team_creator_default_permissions: undefined;
256
- team_member_default_permissions: undefined;
257
- };
258
- }, "">;
259
- adminUpdateSchema: import("yup").ObjectSchema<{
260
- display_name: string | undefined;
261
- description: string | null | undefined;
262
- is_production_mode: boolean | undefined;
263
- config: {
264
- allow_localhost?: boolean | undefined;
265
- credential_enabled?: boolean | undefined;
266
- magic_link_enabled?: boolean | undefined;
267
- oauth_providers?: {
268
- client_id?: string | undefined;
269
- client_secret?: string | undefined;
270
- type: NonNullable<"shared" | "standard" | undefined>;
271
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
272
- enabled: NonNullable<boolean | undefined>;
273
- }[] | undefined;
274
- domains?: {
275
- domain: string;
276
- handler_path: string;
277
- }[] | undefined;
278
- email_config?: {
279
- host?: string | undefined;
280
- port?: number | undefined;
281
- username?: string | undefined;
282
- password?: string | undefined;
283
- sender_name?: string | undefined;
284
- sender_email?: string | undefined;
285
- type: NonNullable<"shared" | "standard" | undefined>;
286
- } | undefined;
287
- create_team_on_sign_up?: boolean | undefined;
288
- team_creator_default_permissions?: {
289
- id: string;
290
- }[] | undefined;
291
- team_member_default_permissions?: {
292
- id: string;
293
- }[] | undefined;
294
- } | undefined;
295
- }, import("yup").AnyObject, {
296
- display_name: undefined;
297
- description: undefined;
298
- is_production_mode: undefined;
299
- config: undefined;
300
- }, "">;
301
- docs: {
302
- clientRead: {
303
- summary: string;
304
- description: string;
305
- tags: string[];
306
- };
307
- adminRead: {
308
- summary: string;
309
- description: string;
310
- tags: string[];
311
- };
312
- adminUpdate: {
313
- summary: string;
314
- description: string;
315
- tags: string[];
316
- };
317
- };
318
- }>;
319
- export type ProjectsCrud = CrudTypeOf<typeof projectsCrud>;
320
- export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOptions<{
321
- clientReadSchema: import("yup").ObjectSchema<{
322
- id: string;
323
- display_name: string;
324
- description: string | null | undefined;
325
- created_at_millis: number;
326
- user_count: number;
327
- is_production_mode: NonNullable<boolean | undefined>;
328
- config: {
329
- id: string;
330
- allow_localhost: NonNullable<boolean | undefined>;
331
- credential_enabled: NonNullable<boolean | undefined>;
332
- magic_link_enabled: NonNullable<boolean | undefined>;
333
- oauth_providers: {
334
- client_id?: string | undefined;
335
- client_secret?: string | undefined;
336
- type: NonNullable<"shared" | "standard" | undefined>;
337
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
338
- enabled: NonNullable<boolean | undefined>;
339
- }[];
340
- domains: {
341
- domain: string;
342
- handler_path: string;
343
- }[];
344
- email_config: {
345
- host?: string | undefined;
346
- port?: number | undefined;
347
- username?: string | undefined;
348
- password?: string | undefined;
349
- sender_name?: string | undefined;
350
- sender_email?: string | undefined;
351
- type: NonNullable<"shared" | "standard" | undefined>;
352
- };
353
- team_creator_default_permissions: {
354
- id: string;
355
- }[];
356
- team_member_default_permissions: {
357
- id: string;
358
- }[];
359
- };
360
- }, import("yup").AnyObject, {
361
- id: undefined;
362
- display_name: undefined;
363
- description: undefined;
364
- created_at_millis: undefined;
365
- user_count: undefined;
366
- is_production_mode: undefined;
367
- config: {
368
- id: undefined;
369
- allow_localhost: undefined;
370
- credential_enabled: undefined;
371
- magic_link_enabled: undefined;
372
- oauth_providers: undefined;
373
- domains: undefined;
374
- email_config: {
375
- type: undefined;
376
- host: undefined;
377
- port: undefined;
378
- username: undefined;
379
- password: undefined;
380
- sender_name: undefined;
381
- sender_email: undefined;
382
- };
383
- team_creator_default_permissions: undefined;
384
- team_member_default_permissions: undefined;
385
- };
386
- }, "">;
387
- clientCreateSchema: import("yup").ObjectSchema<{
388
- display_name: string;
389
- description: string | null | undefined;
390
- is_production_mode: boolean | undefined;
391
- config: {
392
- allow_localhost?: boolean | undefined;
393
- credential_enabled?: boolean | undefined;
394
- magic_link_enabled?: boolean | undefined;
395
- oauth_providers?: {
396
- client_id?: string | undefined;
397
- client_secret?: string | undefined;
398
- type: NonNullable<"shared" | "standard" | undefined>;
399
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined>;
400
- enabled: NonNullable<boolean | undefined>;
401
- }[] | undefined;
402
- domains?: {
403
- domain: string;
404
- handler_path: string;
405
- }[] | undefined;
406
- email_config?: {
407
- host?: string | undefined;
408
- port?: number | undefined;
409
- username?: string | undefined;
410
- password?: string | undefined;
411
- sender_name?: string | undefined;
412
- sender_email?: string | undefined;
413
- type: NonNullable<"shared" | "standard" | undefined>;
414
- } | undefined;
415
- create_team_on_sign_up?: boolean | undefined;
416
- team_creator_default_permissions?: {
417
- id: string;
418
- }[] | undefined;
419
- team_member_default_permissions?: {
420
- id: string;
421
- }[] | undefined;
422
- } | undefined;
423
- } & {
424
- display_name: string;
425
- }, import("yup").AnyObject, {
426
- display_name: undefined;
427
- description: undefined;
428
- is_production_mode: undefined;
429
- config: undefined;
430
- }, "">;
431
- docs: {
432
- clientList: {
433
- hidden: true;
434
- };
435
- clientCreate: {
436
- hidden: true;
437
- };
438
- };
439
- }>;
440
- export type InternalProjectsCrud = CrudTypeOf<typeof internalProjectsCrud>;
@@ -1,109 +0,0 @@
1
- import { createCrud } from "../../crud";
2
- import * as schemaFields from "../../schema-fields";
3
- import { yupArray, yupObject, yupRequiredWhen, yupString } from "../../schema-fields";
4
- const teamPermissionSchema = yupObject({
5
- id: yupString().required(),
6
- }).required();
7
- const oauthProviderSchema = yupObject({
8
- id: schemaFields.oauthIdSchema.required(),
9
- enabled: schemaFields.oauthEnabledSchema.required(),
10
- type: schemaFields.oauthTypeSchema.required(),
11
- client_id: yupRequiredWhen(schemaFields.oauthClientIdSchema, 'type', 'standard'),
12
- client_secret: yupRequiredWhen(schemaFields.oauthClientSecretSchema, 'type', 'standard'),
13
- });
14
- const emailConfigSchema = yupObject({
15
- type: schemaFields.emailTypeSchema.required(),
16
- host: yupRequiredWhen(schemaFields.emailHostSchema, 'type', 'standard'),
17
- port: yupRequiredWhen(schemaFields.emailPortSchema, 'type', 'standard'),
18
- username: yupRequiredWhen(schemaFields.emailUsernameSchema, 'type', 'standard'),
19
- password: yupRequiredWhen(schemaFields.emailPasswordSchema, 'type', 'standard'),
20
- sender_name: yupRequiredWhen(schemaFields.emailSenderNameSchema, 'type', 'standard'),
21
- sender_email: yupRequiredWhen(schemaFields.emailSenderEmailSchema, 'type', 'standard'),
22
- });
23
- const domainSchema = yupObject({
24
- domain: schemaFields.projectTrustedDomainSchema.required(),
25
- handler_path: schemaFields.handlerPathSchema.required(),
26
- });
27
- export const projectsCrudAdminReadSchema = yupObject({
28
- id: schemaFields.projectIdSchema.required(),
29
- display_name: schemaFields.projectDisplayNameSchema.required(),
30
- description: schemaFields.projectDescriptionSchema.optional(),
31
- created_at_millis: schemaFields.projectCreatedAtMillisSchema.required(),
32
- user_count: schemaFields.projectUserCountSchema.required(),
33
- is_production_mode: schemaFields.projectIsProductionModeSchema.required(),
34
- config: yupObject({
35
- id: schemaFields.projectConfigIdSchema.required(),
36
- allow_localhost: schemaFields.projectAllowLocalhostSchema.required(),
37
- credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
38
- magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
39
- oauth_providers: yupArray(oauthProviderSchema.required()).required(),
40
- domains: yupArray(domainSchema.required()).required(),
41
- email_config: emailConfigSchema.required(),
42
- team_creator_default_permissions: yupArray(teamPermissionSchema.required()).required(),
43
- team_member_default_permissions: yupArray(teamPermissionSchema.required()).required(),
44
- }).required(),
45
- }).required();
46
- export const projectsCrudClientReadSchema = yupObject({
47
- id: schemaFields.projectIdSchema.required(),
48
- display_name: schemaFields.projectDisplayNameSchema.required(),
49
- config: yupObject({
50
- credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
51
- magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
52
- oauth_providers: yupArray(yupObject({
53
- id: schemaFields.oauthIdSchema.required(),
54
- }).required()).required(),
55
- }).required(),
56
- }).required();
57
- export const projectsCrudAdminUpdateSchema = yupObject({
58
- display_name: schemaFields.projectDisplayNameSchema.optional(),
59
- description: schemaFields.projectDescriptionSchema.optional(),
60
- is_production_mode: schemaFields.projectIsProductionModeSchema.optional(),
61
- config: yupObject({
62
- credential_enabled: schemaFields.projectCredentialEnabledSchema.optional(),
63
- magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.optional(),
64
- allow_localhost: schemaFields.projectAllowLocalhostSchema.optional(),
65
- create_team_on_sign_up: schemaFields.projectCreateTeamOnSignUpSchema.optional(),
66
- email_config: emailConfigSchema.optional().default(undefined),
67
- domains: yupArray(domainSchema.required()).optional().default(undefined),
68
- oauth_providers: yupArray(oauthProviderSchema.required()).optional().default(undefined),
69
- team_creator_default_permissions: yupArray(teamPermissionSchema.required()).optional(),
70
- team_member_default_permissions: yupArray(teamPermissionSchema.required()).optional(),
71
- }).optional().default(undefined),
72
- }).required();
73
- export const projectsCrudAdminCreateSchema = projectsCrudAdminUpdateSchema.concat(yupObject({
74
- display_name: schemaFields.projectDisplayNameSchema.required(),
75
- }).required());
76
- export const projectsCrud = createCrud({
77
- clientReadSchema: projectsCrudClientReadSchema,
78
- adminReadSchema: projectsCrudAdminReadSchema,
79
- adminUpdateSchema: projectsCrudAdminUpdateSchema,
80
- docs: {
81
- clientRead: {
82
- summary: 'Get the current project',
83
- description: 'Get the current project information including display name, oauth providers and authentication methods. Useful for display the available login options to the user.',
84
- tags: ['Projects'],
85
- },
86
- adminRead: {
87
- summary: 'Get the current project',
88
- description: 'Get the current project information and configuration including display name, oauth providers, email configuration, etc.',
89
- tags: ['Projects'],
90
- },
91
- adminUpdate: {
92
- summary: 'Update the current project',
93
- description: 'Update the current project information and configuration including display name, oauth providers, email configuration, etc.',
94
- tags: ['Projects'],
95
- },
96
- },
97
- });
98
- export const internalProjectsCrud = createCrud({
99
- clientReadSchema: projectsCrudAdminReadSchema,
100
- clientCreateSchema: projectsCrudAdminCreateSchema,
101
- docs: {
102
- clientList: {
103
- hidden: true,
104
- },
105
- clientCreate: {
106
- hidden: true,
107
- },
108
- },
109
- });
@@ -1,22 +0,0 @@
1
- import { CrudTypeOf } from "../../crud";
2
- export declare const teamMembershipsCrudServerReadSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
3
- export declare const teamMembershipsCrudServerCreateSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
4
- export declare const teamMembershipsCrudServerDeleteSchema: import("yup").MixedSchema<{} | undefined, import("yup").AnyObject, undefined, "">;
5
- export declare const teamMembershipsCrud: import("../../crud").CrudSchemaFromOptions<{
6
- serverReadSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
7
- serverCreateSchema: import("yup").ObjectSchema<{}, import("yup").AnyObject, {}, "">;
8
- serverDeleteSchema: import("yup").MixedSchema<{} | undefined, import("yup").AnyObject, undefined, "">;
9
- docs: {
10
- serverCreate: {
11
- summary: string;
12
- description: string;
13
- tags: string[];
14
- };
15
- serverDelete: {
16
- summary: string;
17
- description: string;
18
- tags: string[];
19
- };
20
- };
21
- }>;
22
- export type TeamMembershipsCrud = CrudTypeOf<typeof teamMembershipsCrud>;
@@ -1,22 +0,0 @@
1
- import { createCrud } from "../../crud";
2
- import { yupMixed, yupObject } from "../../schema-fields";
3
- export const teamMembershipsCrudServerReadSchema = yupObject({}).required();
4
- export const teamMembershipsCrudServerCreateSchema = yupObject({}).required();
5
- export const teamMembershipsCrudServerDeleteSchema = yupMixed();
6
- export const teamMembershipsCrud = createCrud({
7
- serverReadSchema: teamMembershipsCrudServerReadSchema,
8
- serverCreateSchema: teamMembershipsCrudServerCreateSchema,
9
- serverDeleteSchema: teamMembershipsCrudServerDeleteSchema,
10
- docs: {
11
- serverCreate: {
12
- summary: "Add a user to a team",
13
- description: "",
14
- tags: ["Teams"],
15
- },
16
- serverDelete: {
17
- summary: "Remove a user from a team",
18
- description: "",
19
- tags: ["Teams"],
20
- },
21
- },
22
- });