@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.
@@ -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: NonNullable<boolean | undefined>;
8
+ is_production_mode: boolean;
9
9
  config: {
10
10
  id: string;
11
- allow_localhost: NonNullable<boolean | undefined>;
12
- sign_up_enabled: NonNullable<boolean | undefined>;
13
- credential_enabled: NonNullable<boolean | undefined>;
14
- magic_link_enabled: NonNullable<boolean | undefined>;
15
- passkey_enabled: NonNullable<boolean | undefined>;
16
- legacy_global_jwt_signing: NonNullable<boolean | undefined>;
17
- client_team_creation_enabled: NonNullable<boolean | undefined>;
18
- client_user_deletion_enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
25
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
26
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
42
+ type: "shared" | "standard";
43
43
  };
44
- create_team_on_sign_up: NonNullable<boolean | undefined>;
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: NonNullable<boolean | undefined>;
91
- credential_enabled: NonNullable<boolean | undefined>;
92
- magic_link_enabled: NonNullable<boolean | undefined>;
93
- passkey_enabled: NonNullable<boolean | undefined>;
94
- client_team_creation_enabled: NonNullable<boolean | undefined>;
95
- client_user_deletion_enabled: NonNullable<boolean | undefined>;
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: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
132
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
133
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
181
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
182
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
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: NonNullable<boolean | undefined>;
220
- credential_enabled: NonNullable<boolean | undefined>;
221
- magic_link_enabled: NonNullable<boolean | undefined>;
222
- passkey_enabled: NonNullable<boolean | undefined>;
223
- client_team_creation_enabled: NonNullable<boolean | undefined>;
224
- client_user_deletion_enabled: NonNullable<boolean | undefined>;
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: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
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: NonNullable<boolean | undefined>;
248
+ is_production_mode: boolean;
249
249
  config: {
250
250
  id: string;
251
- allow_localhost: NonNullable<boolean | undefined>;
252
- sign_up_enabled: NonNullable<boolean | undefined>;
253
- credential_enabled: NonNullable<boolean | undefined>;
254
- magic_link_enabled: NonNullable<boolean | undefined>;
255
- passkey_enabled: NonNullable<boolean | undefined>;
256
- legacy_global_jwt_signing: NonNullable<boolean | undefined>;
257
- client_team_creation_enabled: NonNullable<boolean | undefined>;
258
- client_user_deletion_enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
265
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
266
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
282
+ type: "shared" | "standard";
283
283
  };
284
- create_team_on_sign_up: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
345
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
346
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
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: NonNullable<boolean | undefined>;
407
+ is_production_mode: boolean;
408
408
  config: {
409
409
  id: string;
410
- allow_localhost: NonNullable<boolean | undefined>;
411
- sign_up_enabled: NonNullable<boolean | undefined>;
412
- credential_enabled: NonNullable<boolean | undefined>;
413
- magic_link_enabled: NonNullable<boolean | undefined>;
414
- passkey_enabled: NonNullable<boolean | undefined>;
415
- legacy_global_jwt_signing: NonNullable<boolean | undefined>;
416
- client_team_creation_enabled: NonNullable<boolean | undefined>;
417
- client_user_deletion_enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
424
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
425
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
441
+ type: "shared" | "standard";
442
442
  };
443
- create_team_on_sign_up: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
504
- id: NonNullable<"google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined>;
505
- enabled: NonNullable<boolean | undefined>;
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: NonNullable<"shared" | "standard" | undefined>;
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, yupRequiredWhen, yupString } from "../../schema-fields";
3
+ import { yupArray, yupObject, yupDefinedWhen, yupString } from "../../schema-fields";
4
4
  const teamPermissionSchema = yupObject({
5
- id: yupString().required(),
6
- }).required();
5
+ id: yupString().defined(),
6
+ }).defined();
7
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'),
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.required(),
18
+ id: schemaFields.oauthIdSchema.defined(),
19
19
  });
20
20
  const emailConfigSchema = yupObject({
21
- type: schemaFields.emailTypeSchema.required(),
22
- host: yupRequiredWhen(schemaFields.emailHostSchema, 'type', 'standard'),
23
- port: yupRequiredWhen(schemaFields.emailPortSchema, 'type', 'standard'),
24
- username: yupRequiredWhen(schemaFields.emailUsernameSchema, 'type', 'standard'),
25
- password: yupRequiredWhen(schemaFields.emailPasswordSchema, 'type', 'standard'),
26
- sender_name: yupRequiredWhen(schemaFields.emailSenderNameSchema, 'type', 'standard'),
27
- sender_email: yupRequiredWhen(schemaFields.emailSenderEmailSchema, 'type', 'standard'),
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.required(),
31
- handler_path: schemaFields.handlerPathSchema.required(),
30
+ domain: schemaFields.projectTrustedDomainSchema.defined(),
31
+ handler_path: schemaFields.handlerPathSchema.defined(),
32
32
  });
33
33
  export const projectsCrudAdminReadSchema = yupObject({
34
- id: schemaFields.projectIdSchema.required(),
35
- display_name: schemaFields.projectDisplayNameSchema.required(),
34
+ id: schemaFields.projectIdSchema.defined(),
35
+ display_name: schemaFields.projectDisplayNameSchema.defined(),
36
36
  description: schemaFields.projectDescriptionSchema.nonNullable().defined(),
37
- created_at_millis: schemaFields.projectCreatedAtMillisSchema.required(),
38
- user_count: schemaFields.projectUserCountSchema.required(),
39
- is_production_mode: schemaFields.projectIsProductionModeSchema.required(),
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.required(),
42
- allow_localhost: schemaFields.projectAllowLocalhostSchema.required(),
43
- sign_up_enabled: schemaFields.projectSignUpEnabledSchema.required(),
44
- credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
45
- magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
46
- passkey_enabled: schemaFields.projectPasskeyEnabledSchema.required(),
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().required(),
49
- client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.required(),
50
- client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.required(),
51
- oauth_providers: yupArray(oauthProviderSchema.required()).required(),
52
- enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.required()).required().meta({ openapiField: { hidden: true } }),
53
- domains: yupArray(domainSchema.required()).required(),
54
- email_config: emailConfigSchema.required(),
55
- create_team_on_sign_up: schemaFields.projectCreateTeamOnSignUpSchema.required(),
56
- team_creator_default_permissions: yupArray(teamPermissionSchema.required()).required(),
57
- team_member_default_permissions: yupArray(teamPermissionSchema.required()).required(),
58
- }).required(),
59
- }).required();
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.required(),
62
- display_name: schemaFields.projectDisplayNameSchema.required(),
61
+ id: schemaFields.projectIdSchema.defined(),
62
+ display_name: schemaFields.projectDisplayNameSchema.defined(),
63
63
  config: yupObject({
64
- sign_up_enabled: schemaFields.projectSignUpEnabledSchema.required(),
65
- credential_enabled: schemaFields.projectCredentialEnabledSchema.required(),
66
- magic_link_enabled: schemaFields.projectMagicLinkEnabledSchema.required(),
67
- passkey_enabled: schemaFields.projectPasskeyEnabledSchema.required(),
68
- client_team_creation_enabled: schemaFields.projectClientTeamCreationEnabledSchema.required(),
69
- client_user_deletion_enabled: schemaFields.projectClientUserDeletionEnabledSchema.required(),
70
- enabled_oauth_providers: yupArray(enabledOAuthProviderSchema.required()).required().meta({ openapiField: { hidden: true } }),
71
- }).required(),
72
- }).required();
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.required()).optional().default(undefined),
88
- oauth_providers: yupArray(oauthProviderSchema.required()).optional().default(undefined),
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.required()).optional(),
91
- team_member_default_permissions: yupArray(teamPermissionSchema.required()).optional(),
90
+ team_creator_default_permissions: yupArray(teamPermissionSchema.defined()).optional(),
91
+ team_member_default_permissions: yupArray(teamPermissionSchema.defined()).optional(),
92
92
  }).optional().default(undefined),
93
- }).required();
93
+ }).defined();
94
94
  export const projectsCrudAdminCreateSchema = projectsCrudAdminUpdateSchema.concat(yupObject({
95
- display_name: schemaFields.projectDisplayNameSchema.required(),
96
- }).required());
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().required(),
5
- }).required();
6
- export const svixTokenAdminCreateSchema = yupObject({}).required();
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.required(),
6
- team_display_name: schemaFields.teamDisplayNameSchema.required(),
7
- }).required();
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<NonNullable<{
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: NonNullable<boolean | undefined>;
33
- primary_email_auth_enabled: NonNullable<boolean | undefined>;
34
- passkey_auth_enabled: NonNullable<boolean | undefined>;
35
- otp_auth_enabled: NonNullable<boolean | undefined>;
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: NonNullable<boolean | undefined>;
47
+ has_password: boolean;
48
48
  last_active_at_millis: number;
49
- auth_with_email: NonNullable<boolean | undefined>;
50
- requires_totp_mfa: NonNullable<boolean | undefined>;
49
+ auth_with_email: boolean;
50
+ requires_totp_mfa: boolean;
51
51
  };
52
- }>, import("yup").AnyObject, {
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<NonNullable<{
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: NonNullable<boolean | undefined>;
126
- primary_email_auth_enabled: NonNullable<boolean | undefined>;
127
- passkey_auth_enabled: NonNullable<boolean | undefined>;
128
- otp_auth_enabled: NonNullable<boolean | undefined>;
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: NonNullable<boolean | undefined>;
140
+ has_password: boolean;
141
141
  last_active_at_millis: number;
142
- auth_with_email: NonNullable<boolean | undefined>;
143
- requires_totp_mfa: NonNullable<boolean | undefined>;
142
+ auth_with_email: boolean;
143
+ requires_totp_mfa: boolean;
144
144
  };
145
- }>, import("yup").AnyObject, {
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.required(),
7
- user_id: schemaFields.userIdSchema.required(),
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
- }).required();
10
+ }).defined();
11
11
  export const teamMemberProfilesCrudServerReadSchema = teamMemberProfilesCrudClientReadSchema.concat(yupObject({
12
- user: usersCrudServerReadSchema.required(),
13
- })).required();
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
- }).required();
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().required(),
5
- user_id: yupString().required(),
6
- }).required();
7
- export const teamMembershipsCrudServerCreateSchema = yupObject({}).required();
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