@stackframe/stack-shared 2.6.23 → 2.6.24
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/CHANGELOG.md +7 -0
- package/dist/interface/crud/api-keys.d.ts +3 -3
- package/dist/interface/crud/api-keys.js +14 -14
- package/dist/interface/crud/contact-channels.d.ts +10 -10
- package/dist/interface/crud/contact-channels.js +14 -14
- package/dist/interface/crud/current-user.d.ts +13 -13
- package/dist/interface/crud/current-user.js +1 -1
- package/dist/interface/crud/email-templates.d.ts +10 -10
- package/dist/interface/crud/email-templates.js +10 -10
- package/dist/interface/crud/oauth.js +3 -3
- package/dist/interface/crud/projects.d.ts +75 -75
- package/dist/interface/crud/projects.js +59 -59
- package/dist/interface/crud/svix-token.js +3 -3
- package/dist/interface/crud/team-invitation-details.js +3 -3
- package/dist/interface/crud/team-member-profiles.d.ts +18 -18
- package/dist/interface/crud/team-member-profiles.js +6 -6
- package/dist/interface/crud/team-memberships.js +4 -4
- package/dist/interface/crud/team-permissions.js +11 -11
- package/dist/interface/crud/teams.js +13 -13
- package/dist/interface/crud/users.d.ts +28 -28
- package/dist/interface/crud/users.js +23 -23
- package/dist/interface/webhooks.d.ts +14 -14
- package/dist/schema-fields.d.ts +11 -3
- package/dist/schema-fields.js +28 -13
- package/dist/utils/ips.d.ts +4 -0
- package/dist/utils/ips.js +9 -0
- package/package.json +3 -2
|
@@ -5,28 +5,28 @@ export declare const projectsCrudAdminReadSchema: import("yup").ObjectSchema<{
|
|
|
5
5
|
description: string;
|
|
6
6
|
created_at_millis: number;
|
|
7
7
|
user_count: number;
|
|
8
|
-
is_production_mode:
|
|
8
|
+
is_production_mode: boolean;
|
|
9
9
|
config: {
|
|
10
10
|
id: string;
|
|
11
|
-
allow_localhost:
|
|
12
|
-
sign_up_enabled:
|
|
13
|
-
credential_enabled:
|
|
14
|
-
magic_link_enabled:
|
|
15
|
-
passkey_enabled:
|
|
16
|
-
legacy_global_jwt_signing:
|
|
17
|
-
client_team_creation_enabled:
|
|
18
|
-
client_user_deletion_enabled:
|
|
11
|
+
allow_localhost: boolean;
|
|
12
|
+
sign_up_enabled: boolean;
|
|
13
|
+
credential_enabled: boolean;
|
|
14
|
+
magic_link_enabled: boolean;
|
|
15
|
+
passkey_enabled: boolean;
|
|
16
|
+
legacy_global_jwt_signing: boolean;
|
|
17
|
+
client_team_creation_enabled: boolean;
|
|
18
|
+
client_user_deletion_enabled: boolean;
|
|
19
19
|
oauth_providers: {
|
|
20
20
|
client_id?: string | undefined;
|
|
21
21
|
client_secret?: string | undefined;
|
|
22
22
|
facebook_config_id?: string | undefined;
|
|
23
23
|
microsoft_tenant_id?: string | undefined;
|
|
24
|
-
type:
|
|
25
|
-
id:
|
|
26
|
-
enabled:
|
|
24
|
+
type: "shared" | "standard";
|
|
25
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
26
|
+
enabled: boolean;
|
|
27
27
|
}[];
|
|
28
28
|
enabled_oauth_providers: {
|
|
29
|
-
id:
|
|
29
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
30
30
|
}[];
|
|
31
31
|
domains: {
|
|
32
32
|
domain: string;
|
|
@@ -39,9 +39,9 @@ export declare const projectsCrudAdminReadSchema: import("yup").ObjectSchema<{
|
|
|
39
39
|
password?: string | undefined;
|
|
40
40
|
sender_name?: string | undefined;
|
|
41
41
|
sender_email?: string | undefined;
|
|
42
|
-
type:
|
|
42
|
+
type: "shared" | "standard";
|
|
43
43
|
};
|
|
44
|
-
create_team_on_sign_up:
|
|
44
|
+
create_team_on_sign_up: boolean;
|
|
45
45
|
team_creator_default_permissions: {
|
|
46
46
|
id: string;
|
|
47
47
|
}[];
|
|
@@ -87,14 +87,14 @@ export declare const projectsCrudClientReadSchema: import("yup").ObjectSchema<{
|
|
|
87
87
|
id: string;
|
|
88
88
|
display_name: string;
|
|
89
89
|
config: {
|
|
90
|
-
sign_up_enabled:
|
|
91
|
-
credential_enabled:
|
|
92
|
-
magic_link_enabled:
|
|
93
|
-
passkey_enabled:
|
|
94
|
-
client_team_creation_enabled:
|
|
95
|
-
client_user_deletion_enabled:
|
|
90
|
+
sign_up_enabled: boolean;
|
|
91
|
+
credential_enabled: boolean;
|
|
92
|
+
magic_link_enabled: boolean;
|
|
93
|
+
passkey_enabled: boolean;
|
|
94
|
+
client_team_creation_enabled: boolean;
|
|
95
|
+
client_user_deletion_enabled: boolean;
|
|
96
96
|
enabled_oauth_providers: {
|
|
97
|
-
id:
|
|
97
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
98
98
|
}[];
|
|
99
99
|
};
|
|
100
100
|
}, import("yup").AnyObject, {
|
|
@@ -128,9 +128,9 @@ export declare const projectsCrudAdminUpdateSchema: import("yup").ObjectSchema<{
|
|
|
128
128
|
client_secret?: string | undefined;
|
|
129
129
|
facebook_config_id?: string | undefined;
|
|
130
130
|
microsoft_tenant_id?: string | undefined;
|
|
131
|
-
type:
|
|
132
|
-
id:
|
|
133
|
-
enabled:
|
|
131
|
+
type: "shared" | "standard";
|
|
132
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
133
|
+
enabled: boolean;
|
|
134
134
|
}[] | undefined;
|
|
135
135
|
domains?: {
|
|
136
136
|
domain: string;
|
|
@@ -143,7 +143,7 @@ export declare const projectsCrudAdminUpdateSchema: import("yup").ObjectSchema<{
|
|
|
143
143
|
password?: string | undefined;
|
|
144
144
|
sender_name?: string | undefined;
|
|
145
145
|
sender_email?: string | undefined;
|
|
146
|
-
type:
|
|
146
|
+
type: "shared" | "standard";
|
|
147
147
|
} | undefined;
|
|
148
148
|
create_team_on_sign_up?: boolean | undefined;
|
|
149
149
|
team_creator_default_permissions?: {
|
|
@@ -177,9 +177,9 @@ export declare const projectsCrudAdminCreateSchema: import("yup").ObjectSchema<{
|
|
|
177
177
|
client_secret?: string | undefined;
|
|
178
178
|
facebook_config_id?: string | undefined;
|
|
179
179
|
microsoft_tenant_id?: string | undefined;
|
|
180
|
-
type:
|
|
181
|
-
id:
|
|
182
|
-
enabled:
|
|
180
|
+
type: "shared" | "standard";
|
|
181
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
182
|
+
enabled: boolean;
|
|
183
183
|
}[] | undefined;
|
|
184
184
|
domains?: {
|
|
185
185
|
domain: string;
|
|
@@ -192,7 +192,7 @@ export declare const projectsCrudAdminCreateSchema: import("yup").ObjectSchema<{
|
|
|
192
192
|
password?: string | undefined;
|
|
193
193
|
sender_name?: string | undefined;
|
|
194
194
|
sender_email?: string | undefined;
|
|
195
|
-
type:
|
|
195
|
+
type: "shared" | "standard";
|
|
196
196
|
} | undefined;
|
|
197
197
|
create_team_on_sign_up?: boolean | undefined;
|
|
198
198
|
team_creator_default_permissions?: {
|
|
@@ -216,14 +216,14 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
216
216
|
id: string;
|
|
217
217
|
display_name: string;
|
|
218
218
|
config: {
|
|
219
|
-
sign_up_enabled:
|
|
220
|
-
credential_enabled:
|
|
221
|
-
magic_link_enabled:
|
|
222
|
-
passkey_enabled:
|
|
223
|
-
client_team_creation_enabled:
|
|
224
|
-
client_user_deletion_enabled:
|
|
219
|
+
sign_up_enabled: boolean;
|
|
220
|
+
credential_enabled: boolean;
|
|
221
|
+
magic_link_enabled: boolean;
|
|
222
|
+
passkey_enabled: boolean;
|
|
223
|
+
client_team_creation_enabled: boolean;
|
|
224
|
+
client_user_deletion_enabled: boolean;
|
|
225
225
|
enabled_oauth_providers: {
|
|
226
|
-
id:
|
|
226
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
227
227
|
}[];
|
|
228
228
|
};
|
|
229
229
|
}, import("yup").AnyObject, {
|
|
@@ -245,28 +245,28 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
245
245
|
description: string;
|
|
246
246
|
created_at_millis: number;
|
|
247
247
|
user_count: number;
|
|
248
|
-
is_production_mode:
|
|
248
|
+
is_production_mode: boolean;
|
|
249
249
|
config: {
|
|
250
250
|
id: string;
|
|
251
|
-
allow_localhost:
|
|
252
|
-
sign_up_enabled:
|
|
253
|
-
credential_enabled:
|
|
254
|
-
magic_link_enabled:
|
|
255
|
-
passkey_enabled:
|
|
256
|
-
legacy_global_jwt_signing:
|
|
257
|
-
client_team_creation_enabled:
|
|
258
|
-
client_user_deletion_enabled:
|
|
251
|
+
allow_localhost: boolean;
|
|
252
|
+
sign_up_enabled: boolean;
|
|
253
|
+
credential_enabled: boolean;
|
|
254
|
+
magic_link_enabled: boolean;
|
|
255
|
+
passkey_enabled: boolean;
|
|
256
|
+
legacy_global_jwt_signing: boolean;
|
|
257
|
+
client_team_creation_enabled: boolean;
|
|
258
|
+
client_user_deletion_enabled: boolean;
|
|
259
259
|
oauth_providers: {
|
|
260
260
|
client_id?: string | undefined;
|
|
261
261
|
client_secret?: string | undefined;
|
|
262
262
|
facebook_config_id?: string | undefined;
|
|
263
263
|
microsoft_tenant_id?: string | undefined;
|
|
264
|
-
type:
|
|
265
|
-
id:
|
|
266
|
-
enabled:
|
|
264
|
+
type: "shared" | "standard";
|
|
265
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
266
|
+
enabled: boolean;
|
|
267
267
|
}[];
|
|
268
268
|
enabled_oauth_providers: {
|
|
269
|
-
id:
|
|
269
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
270
270
|
}[];
|
|
271
271
|
domains: {
|
|
272
272
|
domain: string;
|
|
@@ -279,9 +279,9 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
279
279
|
password?: string | undefined;
|
|
280
280
|
sender_name?: string | undefined;
|
|
281
281
|
sender_email?: string | undefined;
|
|
282
|
-
type:
|
|
282
|
+
type: "shared" | "standard";
|
|
283
283
|
};
|
|
284
|
-
create_team_on_sign_up:
|
|
284
|
+
create_team_on_sign_up: boolean;
|
|
285
285
|
team_creator_default_permissions: {
|
|
286
286
|
id: string;
|
|
287
287
|
}[];
|
|
@@ -341,9 +341,9 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
341
341
|
client_secret?: string | undefined;
|
|
342
342
|
facebook_config_id?: string | undefined;
|
|
343
343
|
microsoft_tenant_id?: string | undefined;
|
|
344
|
-
type:
|
|
345
|
-
id:
|
|
346
|
-
enabled:
|
|
344
|
+
type: "shared" | "standard";
|
|
345
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
346
|
+
enabled: boolean;
|
|
347
347
|
}[] | undefined;
|
|
348
348
|
domains?: {
|
|
349
349
|
domain: string;
|
|
@@ -356,7 +356,7 @@ export declare const projectsCrud: import("../../crud").CrudSchemaFromOptions<{
|
|
|
356
356
|
password?: string | undefined;
|
|
357
357
|
sender_name?: string | undefined;
|
|
358
358
|
sender_email?: string | undefined;
|
|
359
|
-
type:
|
|
359
|
+
type: "shared" | "standard";
|
|
360
360
|
} | undefined;
|
|
361
361
|
create_team_on_sign_up?: boolean | undefined;
|
|
362
362
|
team_creator_default_permissions?: {
|
|
@@ -404,28 +404,28 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
404
404
|
description: string;
|
|
405
405
|
created_at_millis: number;
|
|
406
406
|
user_count: number;
|
|
407
|
-
is_production_mode:
|
|
407
|
+
is_production_mode: boolean;
|
|
408
408
|
config: {
|
|
409
409
|
id: string;
|
|
410
|
-
allow_localhost:
|
|
411
|
-
sign_up_enabled:
|
|
412
|
-
credential_enabled:
|
|
413
|
-
magic_link_enabled:
|
|
414
|
-
passkey_enabled:
|
|
415
|
-
legacy_global_jwt_signing:
|
|
416
|
-
client_team_creation_enabled:
|
|
417
|
-
client_user_deletion_enabled:
|
|
410
|
+
allow_localhost: boolean;
|
|
411
|
+
sign_up_enabled: boolean;
|
|
412
|
+
credential_enabled: boolean;
|
|
413
|
+
magic_link_enabled: boolean;
|
|
414
|
+
passkey_enabled: boolean;
|
|
415
|
+
legacy_global_jwt_signing: boolean;
|
|
416
|
+
client_team_creation_enabled: boolean;
|
|
417
|
+
client_user_deletion_enabled: boolean;
|
|
418
418
|
oauth_providers: {
|
|
419
419
|
client_id?: string | undefined;
|
|
420
420
|
client_secret?: string | undefined;
|
|
421
421
|
facebook_config_id?: string | undefined;
|
|
422
422
|
microsoft_tenant_id?: string | undefined;
|
|
423
|
-
type:
|
|
424
|
-
id:
|
|
425
|
-
enabled:
|
|
423
|
+
type: "shared" | "standard";
|
|
424
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
425
|
+
enabled: boolean;
|
|
426
426
|
}[];
|
|
427
427
|
enabled_oauth_providers: {
|
|
428
|
-
id:
|
|
428
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
429
429
|
}[];
|
|
430
430
|
domains: {
|
|
431
431
|
domain: string;
|
|
@@ -438,9 +438,9 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
438
438
|
password?: string | undefined;
|
|
439
439
|
sender_name?: string | undefined;
|
|
440
440
|
sender_email?: string | undefined;
|
|
441
|
-
type:
|
|
441
|
+
type: "shared" | "standard";
|
|
442
442
|
};
|
|
443
|
-
create_team_on_sign_up:
|
|
443
|
+
create_team_on_sign_up: boolean;
|
|
444
444
|
team_creator_default_permissions: {
|
|
445
445
|
id: string;
|
|
446
446
|
}[];
|
|
@@ -500,9 +500,9 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
500
500
|
client_secret?: string | undefined;
|
|
501
501
|
facebook_config_id?: string | undefined;
|
|
502
502
|
microsoft_tenant_id?: string | undefined;
|
|
503
|
-
type:
|
|
504
|
-
id:
|
|
505
|
-
enabled:
|
|
503
|
+
type: "shared" | "standard";
|
|
504
|
+
id: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x";
|
|
505
|
+
enabled: boolean;
|
|
506
506
|
}[] | undefined;
|
|
507
507
|
domains?: {
|
|
508
508
|
domain: string;
|
|
@@ -515,7 +515,7 @@ export declare const internalProjectsCrud: import("../../crud").CrudSchemaFromOp
|
|
|
515
515
|
password?: string | undefined;
|
|
516
516
|
sender_name?: string | undefined;
|
|
517
517
|
sender_email?: string | undefined;
|
|
518
|
-
type:
|
|
518
|
+
type: "shared" | "standard";
|
|
519
519
|
} | undefined;
|
|
520
520
|
create_team_on_sign_up?: boolean | undefined;
|
|
521
521
|
team_creator_default_permissions?: {
|
|
@@ -1,75 +1,75 @@
|
|
|
1
1
|
import { createCrud } from "../../crud";
|
|
2
2
|
import * as schemaFields from "../../schema-fields";
|
|
3
|
-
import { yupArray, yupObject,
|
|
3
|
+
import { yupArray, yupObject, yupDefinedWhen, yupString } from "../../schema-fields";
|
|
4
4
|
const teamPermissionSchema = yupObject({
|
|
5
|
-
id: yupString().
|
|
6
|
-
}).
|
|
5
|
+
id: yupString().defined(),
|
|
6
|
+
}).defined();
|
|
7
7
|
const oauthProviderSchema = yupObject({
|
|
8
|
-
id: schemaFields.oauthIdSchema.
|
|
9
|
-
enabled: schemaFields.oauthEnabledSchema.
|
|
10
|
-
type: schemaFields.oauthTypeSchema.
|
|
11
|
-
client_id:
|
|
12
|
-
client_secret:
|
|
8
|
+
id: schemaFields.oauthIdSchema.defined(),
|
|
9
|
+
enabled: schemaFields.oauthEnabledSchema.defined(),
|
|
10
|
+
type: schemaFields.oauthTypeSchema.defined(),
|
|
11
|
+
client_id: yupDefinedWhen(schemaFields.oauthClientIdSchema, 'type', 'standard'),
|
|
12
|
+
client_secret: yupDefinedWhen(schemaFields.oauthClientSecretSchema, 'type', 'standard'),
|
|
13
13
|
// extra params
|
|
14
14
|
facebook_config_id: yupString().optional().meta({ openapiField: { description: 'This parameter is the configuration id for Facebook business login (for things like ads and marketing).' } }),
|
|
15
15
|
microsoft_tenant_id: yupString().optional().meta({ openapiField: { description: 'This parameter is the Microsoft tenant id for Microsoft directory' } }),
|
|
16
16
|
});
|
|
17
17
|
const enabledOAuthProviderSchema = yupObject({
|
|
18
|
-
id: schemaFields.oauthIdSchema.
|
|
18
|
+
id: schemaFields.oauthIdSchema.defined(),
|
|
19
19
|
});
|
|
20
20
|
const emailConfigSchema = yupObject({
|
|
21
|
-
type: schemaFields.emailTypeSchema.
|
|
22
|
-
host:
|
|
23
|
-
port:
|
|
24
|
-
username:
|
|
25
|
-
password:
|
|
26
|
-
sender_name:
|
|
27
|
-
sender_email:
|
|
21
|
+
type: schemaFields.emailTypeSchema.defined(),
|
|
22
|
+
host: yupDefinedWhen(schemaFields.emailHostSchema, 'type', 'standard'),
|
|
23
|
+
port: yupDefinedWhen(schemaFields.emailPortSchema, 'type', 'standard'),
|
|
24
|
+
username: yupDefinedWhen(schemaFields.emailUsernameSchema, 'type', 'standard'),
|
|
25
|
+
password: yupDefinedWhen(schemaFields.emailPasswordSchema, 'type', 'standard'),
|
|
26
|
+
sender_name: yupDefinedWhen(schemaFields.emailSenderNameSchema, 'type', 'standard'),
|
|
27
|
+
sender_email: yupDefinedWhen(schemaFields.emailSenderEmailSchema, 'type', 'standard'),
|
|
28
28
|
});
|
|
29
29
|
const domainSchema = yupObject({
|
|
30
|
-
domain: schemaFields.projectTrustedDomainSchema.
|
|
31
|
-
handler_path: schemaFields.handlerPathSchema.
|
|
30
|
+
domain: schemaFields.projectTrustedDomainSchema.defined(),
|
|
31
|
+
handler_path: schemaFields.handlerPathSchema.defined(),
|
|
32
32
|
});
|
|
33
33
|
export const projectsCrudAdminReadSchema = yupObject({
|
|
34
|
-
id: schemaFields.projectIdSchema.
|
|
35
|
-
display_name: schemaFields.projectDisplayNameSchema.
|
|
34
|
+
id: schemaFields.projectIdSchema.defined(),
|
|
35
|
+
display_name: schemaFields.projectDisplayNameSchema.defined(),
|
|
36
36
|
description: schemaFields.projectDescriptionSchema.nonNullable().defined(),
|
|
37
|
-
created_at_millis: schemaFields.projectCreatedAtMillisSchema.
|
|
38
|
-
user_count: schemaFields.projectUserCountSchema.
|
|
39
|
-
is_production_mode: schemaFields.projectIsProductionModeSchema.
|
|
37
|
+
created_at_millis: schemaFields.projectCreatedAtMillisSchema.defined(),
|
|
38
|
+
user_count: schemaFields.projectUserCountSchema.defined(),
|
|
39
|
+
is_production_mode: schemaFields.projectIsProductionModeSchema.defined(),
|
|
40
40
|
config: yupObject({
|
|
41
|
-
id: schemaFields.projectConfigIdSchema.
|
|
42
|
-
allow_localhost: schemaFields.projectAllowLocalhostSchema.
|
|
43
|
-
sign_up_enabled: schemaFields.projectSignUpEnabledSchema.
|
|
44
|
-
credential_enabled: schemaFields.projectCredentialEnabledSchema.
|
|
45
|
-
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.
|
|
46
|
-
passkey_enabled: schemaFields.projectPasskeyEnabledSchema.
|
|
41
|
+
id: schemaFields.projectConfigIdSchema.defined(),
|
|
42
|
+
allow_localhost: schemaFields.projectAllowLocalhostSchema.defined(),
|
|
43
|
+
sign_up_enabled: schemaFields.projectSignUpEnabledSchema.defined(),
|
|
44
|
+
credential_enabled: schemaFields.projectCredentialEnabledSchema.defined(),
|
|
45
|
+
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.defined(),
|
|
46
|
+
passkey_enabled: schemaFields.projectPasskeyEnabledSchema.defined(),
|
|
47
47
|
// TODO: remove this
|
|
48
|
-
legacy_global_jwt_signing: schemaFields.yupBoolean().
|
|
49
|
-
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.
|
|
50
|
-
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.
|
|
51
|
-
oauth_providers: yupArray(oauthProviderSchema.
|
|
52
|
-
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.
|
|
53
|
-
domains: yupArray(domainSchema.
|
|
54
|
-
email_config: emailConfigSchema.
|
|
55
|
-
create_team_on_sign_up: schemaFields.projectCreateTeamOnSignUpSchema.
|
|
56
|
-
team_creator_default_permissions: yupArray(teamPermissionSchema.
|
|
57
|
-
team_member_default_permissions: yupArray(teamPermissionSchema.
|
|
58
|
-
}).
|
|
59
|
-
}).
|
|
48
|
+
legacy_global_jwt_signing: schemaFields.yupBoolean().defined(),
|
|
49
|
+
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.defined(),
|
|
50
|
+
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.defined(),
|
|
51
|
+
oauth_providers: yupArray(oauthProviderSchema.defined()).defined(),
|
|
52
|
+
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.defined()).defined().meta({ openapiField: { hidden: true } }),
|
|
53
|
+
domains: yupArray(domainSchema.defined()).defined(),
|
|
54
|
+
email_config: emailConfigSchema.defined(),
|
|
55
|
+
create_team_on_sign_up: schemaFields.projectCreateTeamOnSignUpSchema.defined(),
|
|
56
|
+
team_creator_default_permissions: yupArray(teamPermissionSchema.defined()).defined(),
|
|
57
|
+
team_member_default_permissions: yupArray(teamPermissionSchema.defined()).defined(),
|
|
58
|
+
}).defined(),
|
|
59
|
+
}).defined();
|
|
60
60
|
export const projectsCrudClientReadSchema = yupObject({
|
|
61
|
-
id: schemaFields.projectIdSchema.
|
|
62
|
-
display_name: schemaFields.projectDisplayNameSchema.
|
|
61
|
+
id: schemaFields.projectIdSchema.defined(),
|
|
62
|
+
display_name: schemaFields.projectDisplayNameSchema.defined(),
|
|
63
63
|
config: yupObject({
|
|
64
|
-
sign_up_enabled: schemaFields.projectSignUpEnabledSchema.
|
|
65
|
-
credential_enabled: schemaFields.projectCredentialEnabledSchema.
|
|
66
|
-
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.
|
|
67
|
-
passkey_enabled: schemaFields.projectPasskeyEnabledSchema.
|
|
68
|
-
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.
|
|
69
|
-
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.
|
|
70
|
-
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.
|
|
71
|
-
}).
|
|
72
|
-
}).
|
|
64
|
+
sign_up_enabled: schemaFields.projectSignUpEnabledSchema.defined(),
|
|
65
|
+
credential_enabled: schemaFields.projectCredentialEnabledSchema.defined(),
|
|
66
|
+
magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.defined(),
|
|
67
|
+
passkey_enabled: schemaFields.projectPasskeyEnabledSchema.defined(),
|
|
68
|
+
client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.defined(),
|
|
69
|
+
client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.defined(),
|
|
70
|
+
enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.defined()).defined().meta({ openapiField: { hidden: true } }),
|
|
71
|
+
}).defined(),
|
|
72
|
+
}).defined();
|
|
73
73
|
export const projectsCrudAdminUpdateSchema = yupObject({
|
|
74
74
|
display_name: schemaFields.projectDisplayNameSchema.optional(),
|
|
75
75
|
description: schemaFields.projectDescriptionSchema.optional(),
|
|
@@ -84,16 +84,16 @@ export const projectsCrudAdminUpdateSchema = yupObject({
|
|
|
84
84
|
legacy_global_jwt_signing: schemaFields.yupBoolean().isFalse().optional(),
|
|
85
85
|
allow_localhost: schemaFields.projectAllowLocalhostSchema.optional(),
|
|
86
86
|
email_config: emailConfigSchema.optional().default(undefined),
|
|
87
|
-
domains: yupArray(domainSchema.
|
|
88
|
-
oauth_providers: yupArray(oauthProviderSchema.
|
|
87
|
+
domains: yupArray(domainSchema.defined()).optional().default(undefined),
|
|
88
|
+
oauth_providers: yupArray(oauthProviderSchema.defined()).optional().default(undefined),
|
|
89
89
|
create_team_on_sign_up: schemaFields.projectCreateTeamOnSignUpSchema.optional(),
|
|
90
|
-
team_creator_default_permissions: yupArray(teamPermissionSchema.
|
|
91
|
-
team_member_default_permissions: yupArray(teamPermissionSchema.
|
|
90
|
+
team_creator_default_permissions: yupArray(teamPermissionSchema.defined()).optional(),
|
|
91
|
+
team_member_default_permissions: yupArray(teamPermissionSchema.defined()).optional(),
|
|
92
92
|
}).optional().default(undefined),
|
|
93
|
-
}).
|
|
93
|
+
}).defined();
|
|
94
94
|
export const projectsCrudAdminCreateSchema = projectsCrudAdminUpdateSchema.concat(yupObject({
|
|
95
|
-
display_name: schemaFields.projectDisplayNameSchema.
|
|
96
|
-
}).
|
|
95
|
+
display_name: schemaFields.projectDisplayNameSchema.defined(),
|
|
96
|
+
}).defined());
|
|
97
97
|
export const projectsCrudAdminDeleteSchema = schemaFields.yupMixed();
|
|
98
98
|
export const projectsCrud = createCrud({
|
|
99
99
|
clientReadSchema: projectsCrudClientReadSchema,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { createCrud } from "../../crud";
|
|
2
2
|
import { yupObject, yupString } from "../../schema-fields";
|
|
3
3
|
export const svixTokenAdminReadSchema = yupObject({
|
|
4
|
-
token: yupString().
|
|
5
|
-
}).
|
|
6
|
-
export const svixTokenAdminCreateSchema = yupObject({}).
|
|
4
|
+
token: yupString().defined(),
|
|
5
|
+
}).defined();
|
|
6
|
+
export const svixTokenAdminCreateSchema = yupObject({}).defined();
|
|
7
7
|
export const svixTokenCrud = createCrud({
|
|
8
8
|
adminReadSchema: svixTokenAdminReadSchema,
|
|
9
9
|
adminCreateSchema: svixTokenAdminCreateSchema,
|
|
@@ -2,9 +2,9 @@ import { createCrud } from "../../crud";
|
|
|
2
2
|
import * as schemaFields from "../../schema-fields";
|
|
3
3
|
import { yupObject } from "../../schema-fields";
|
|
4
4
|
export const teamInvitationDetailsClientReadSchema = yupObject({
|
|
5
|
-
team_id: schemaFields.teamIdSchema.
|
|
6
|
-
team_display_name: schemaFields.teamDisplayNameSchema.
|
|
7
|
-
}).
|
|
5
|
+
team_id: schemaFields.teamIdSchema.defined(),
|
|
6
|
+
team_display_name: schemaFields.teamDisplayNameSchema.defined(),
|
|
7
|
+
}).defined();
|
|
8
8
|
export const teamInvitationDetailsCrud = createCrud({
|
|
9
9
|
clientReadSchema: teamInvitationDetailsClientReadSchema,
|
|
10
10
|
docs: {
|
|
@@ -10,7 +10,7 @@ export declare const teamMemberProfilesCrudClientReadSchema: import("yup").Objec
|
|
|
10
10
|
display_name: undefined;
|
|
11
11
|
profile_image_url: undefined;
|
|
12
12
|
}, "">;
|
|
13
|
-
export declare const teamMemberProfilesCrudServerReadSchema: import("yup").ObjectSchema<
|
|
13
|
+
export declare const teamMemberProfilesCrudServerReadSchema: import("yup").ObjectSchema<{
|
|
14
14
|
team_id: string;
|
|
15
15
|
user_id: string;
|
|
16
16
|
display_name: string | null;
|
|
@@ -29,10 +29,10 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
|
|
|
29
29
|
client_metadata: {} | null;
|
|
30
30
|
client_read_only_metadata: {} | null;
|
|
31
31
|
server_metadata: {} | null;
|
|
32
|
-
primary_email_verified:
|
|
33
|
-
primary_email_auth_enabled:
|
|
34
|
-
passkey_auth_enabled:
|
|
35
|
-
otp_auth_enabled:
|
|
32
|
+
primary_email_verified: boolean;
|
|
33
|
+
primary_email_auth_enabled: boolean;
|
|
34
|
+
passkey_auth_enabled: boolean;
|
|
35
|
+
otp_auth_enabled: boolean;
|
|
36
36
|
selected_team_id: string | null;
|
|
37
37
|
selected_team: {
|
|
38
38
|
client_metadata?: {} | null | undefined;
|
|
@@ -44,12 +44,12 @@ export declare const teamMemberProfilesCrudServerReadSchema: import("yup").Objec
|
|
|
44
44
|
profile_image_url: string | null;
|
|
45
45
|
} | null;
|
|
46
46
|
signed_up_at_millis: number;
|
|
47
|
-
has_password:
|
|
47
|
+
has_password: boolean;
|
|
48
48
|
last_active_at_millis: number;
|
|
49
|
-
auth_with_email:
|
|
50
|
-
requires_totp_mfa:
|
|
49
|
+
auth_with_email: boolean;
|
|
50
|
+
requires_totp_mfa: boolean;
|
|
51
51
|
};
|
|
52
|
-
}
|
|
52
|
+
}, import("yup").AnyObject, {
|
|
53
53
|
team_id: undefined;
|
|
54
54
|
user_id: undefined;
|
|
55
55
|
display_name: undefined;
|
|
@@ -103,7 +103,7 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
|
|
|
103
103
|
display_name: undefined;
|
|
104
104
|
profile_image_url: undefined;
|
|
105
105
|
}, "">;
|
|
106
|
-
serverReadSchema: import("yup").ObjectSchema<
|
|
106
|
+
serverReadSchema: import("yup").ObjectSchema<{
|
|
107
107
|
team_id: string;
|
|
108
108
|
user_id: string;
|
|
109
109
|
display_name: string | null;
|
|
@@ -122,10 +122,10 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
|
|
|
122
122
|
client_metadata: {} | null;
|
|
123
123
|
client_read_only_metadata: {} | null;
|
|
124
124
|
server_metadata: {} | null;
|
|
125
|
-
primary_email_verified:
|
|
126
|
-
primary_email_auth_enabled:
|
|
127
|
-
passkey_auth_enabled:
|
|
128
|
-
otp_auth_enabled:
|
|
125
|
+
primary_email_verified: boolean;
|
|
126
|
+
primary_email_auth_enabled: boolean;
|
|
127
|
+
passkey_auth_enabled: boolean;
|
|
128
|
+
otp_auth_enabled: boolean;
|
|
129
129
|
selected_team_id: string | null;
|
|
130
130
|
selected_team: {
|
|
131
131
|
client_metadata?: {} | null | undefined;
|
|
@@ -137,12 +137,12 @@ export declare const teamMemberProfilesCrud: import("../../crud").CrudSchemaFrom
|
|
|
137
137
|
profile_image_url: string | null;
|
|
138
138
|
} | null;
|
|
139
139
|
signed_up_at_millis: number;
|
|
140
|
-
has_password:
|
|
140
|
+
has_password: boolean;
|
|
141
141
|
last_active_at_millis: number;
|
|
142
|
-
auth_with_email:
|
|
143
|
-
requires_totp_mfa:
|
|
142
|
+
auth_with_email: boolean;
|
|
143
|
+
requires_totp_mfa: boolean;
|
|
144
144
|
};
|
|
145
|
-
}
|
|
145
|
+
}, import("yup").AnyObject, {
|
|
146
146
|
team_id: undefined;
|
|
147
147
|
user_id: undefined;
|
|
148
148
|
display_name: undefined;
|
|
@@ -3,18 +3,18 @@ import * as schemaFields from "../../schema-fields";
|
|
|
3
3
|
import { yupObject } from "../../schema-fields";
|
|
4
4
|
import { usersCrudServerReadSchema } from "./users";
|
|
5
5
|
export const teamMemberProfilesCrudClientReadSchema = yupObject({
|
|
6
|
-
team_id: schemaFields.teamIdSchema.
|
|
7
|
-
user_id: schemaFields.userIdSchema.
|
|
6
|
+
team_id: schemaFields.teamIdSchema.defined(),
|
|
7
|
+
user_id: schemaFields.userIdSchema.defined(),
|
|
8
8
|
display_name: schemaFields.teamMemberDisplayNameSchema.nullable().defined(),
|
|
9
9
|
profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().defined(),
|
|
10
|
-
}).
|
|
10
|
+
}).defined();
|
|
11
11
|
export const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({
|
|
12
|
-
user: usersCrudServerReadSchema.
|
|
13
|
-
})).
|
|
12
|
+
user: usersCrudServerReadSchema.defined(),
|
|
13
|
+
})).defined();
|
|
14
14
|
export const teamMemberProfilesCrudClientUpdateSchema = yupObject({
|
|
15
15
|
display_name: schemaFields.teamMemberDisplayNameSchema.optional(),
|
|
16
16
|
profile_image_url: schemaFields.teamMemberProfileImageUrlSchema.nullable().optional(),
|
|
17
|
-
}).
|
|
17
|
+
}).defined();
|
|
18
18
|
export const teamMemberProfilesCrud = createCrud({
|
|
19
19
|
clientReadSchema: teamMemberProfilesCrudClientReadSchema,
|
|
20
20
|
serverReadSchema: teamMemberProfilesCrudServerReadSchema,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createCrud } from "../../crud";
|
|
2
2
|
import { yupMixed, yupObject, yupString } from "../../schema-fields";
|
|
3
3
|
export const teamMembershipsCrudClientReadSchema = yupObject({
|
|
4
|
-
team_id: yupString().
|
|
5
|
-
user_id: yupString().
|
|
6
|
-
}).
|
|
7
|
-
export const teamMembershipsCrudServerCreateSchema = yupObject({}).
|
|
4
|
+
team_id: yupString().defined(),
|
|
5
|
+
user_id: yupString().defined(),
|
|
6
|
+
}).defined();
|
|
7
|
+
export const teamMembershipsCrudServerCreateSchema = yupObject({}).defined();
|
|
8
8
|
export const teamMembershipsCrudClientDeleteSchema = yupMixed();
|
|
9
9
|
export const teamMembershipsCrud = createCrud({
|
|
10
10
|
// Client
|