@stackframe/stack-shared 2.8.25 → 2.8.27

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 (124) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/config/format.d.mts +20 -5
  3. package/dist/config/format.d.ts +20 -5
  4. package/dist/config/format.js +39 -14
  5. package/dist/config/format.js.map +1 -1
  6. package/dist/config/schema.d.mts +795 -317
  7. package/dist/config/schema.d.ts +795 -317
  8. package/dist/config/schema.js +471 -84
  9. package/dist/config/schema.js.map +1 -1
  10. package/dist/crud.d.mts +1 -0
  11. package/dist/crud.d.ts +1 -0
  12. package/dist/esm/config/format.js +37 -14
  13. package/dist/esm/config/format.js.map +1 -1
  14. package/dist/esm/config/schema.js +460 -80
  15. package/dist/esm/config/schema.js.map +1 -1
  16. package/dist/esm/helpers/emails.js +136 -30
  17. package/dist/esm/helpers/emails.js.map +1 -1
  18. package/dist/esm/interface/admin-interface.js +19 -29
  19. package/dist/esm/interface/admin-interface.js.map +1 -1
  20. package/dist/esm/known-errors.js +24 -1
  21. package/dist/esm/known-errors.js.map +1 -1
  22. package/dist/esm/schema-fields.js +92 -27
  23. package/dist/esm/schema-fields.js.map +1 -1
  24. package/dist/esm/utils/currencies.js +52 -0
  25. package/dist/esm/utils/currencies.js.map +1 -0
  26. package/dist/esm/utils/dates.js +55 -1
  27. package/dist/esm/utils/dates.js.map +1 -1
  28. package/dist/esm/utils/errors.js.map +1 -1
  29. package/dist/esm/utils/objects.js +2 -0
  30. package/dist/esm/utils/objects.js.map +1 -1
  31. package/dist/esm/utils/strings.js +4 -0
  32. package/dist/esm/utils/strings.js.map +1 -1
  33. package/dist/esm/utils/types.js +45 -0
  34. package/dist/esm/utils/types.js.map +1 -1
  35. package/dist/helpers/emails.d.mts +32 -6
  36. package/dist/helpers/emails.d.ts +32 -6
  37. package/dist/helpers/emails.js +138 -30
  38. package/dist/helpers/emails.js.map +1 -1
  39. package/dist/helpers/password.d.mts +1 -0
  40. package/dist/helpers/password.d.ts +1 -0
  41. package/dist/helpers/production-mode.d.mts +1 -0
  42. package/dist/helpers/production-mode.d.ts +1 -0
  43. package/dist/index.d.mts +2 -2
  44. package/dist/index.d.ts +2 -2
  45. package/dist/interface/admin-interface.d.mts +8 -8
  46. package/dist/interface/admin-interface.d.ts +8 -8
  47. package/dist/interface/admin-interface.js +19 -29
  48. package/dist/interface/admin-interface.js.map +1 -1
  49. package/dist/interface/client-interface.d.mts +1 -0
  50. package/dist/interface/client-interface.d.ts +1 -0
  51. package/dist/interface/crud/connected-accounts.d.mts +1 -0
  52. package/dist/interface/crud/connected-accounts.d.ts +1 -0
  53. package/dist/interface/crud/contact-channels.d.mts +1 -0
  54. package/dist/interface/crud/contact-channels.d.ts +1 -0
  55. package/dist/interface/crud/current-user.d.mts +1 -0
  56. package/dist/interface/crud/current-user.d.ts +1 -0
  57. package/dist/interface/crud/email-templates.d.mts +1 -0
  58. package/dist/interface/crud/email-templates.d.ts +1 -0
  59. package/dist/interface/crud/emails.d.mts +1 -0
  60. package/dist/interface/crud/emails.d.ts +1 -0
  61. package/dist/interface/crud/internal-api-keys.d.mts +1 -0
  62. package/dist/interface/crud/internal-api-keys.d.ts +1 -0
  63. package/dist/interface/crud/notification-preferences.d.mts +1 -0
  64. package/dist/interface/crud/notification-preferences.d.ts +1 -0
  65. package/dist/interface/crud/oauth-providers.d.mts +5 -4
  66. package/dist/interface/crud/oauth-providers.d.ts +5 -4
  67. package/dist/interface/crud/project-api-keys.d.mts +3 -2
  68. package/dist/interface/crud/project-api-keys.d.ts +3 -2
  69. package/dist/interface/crud/project-permissions.d.mts +1 -0
  70. package/dist/interface/crud/project-permissions.d.ts +1 -0
  71. package/dist/interface/crud/projects.d.mts +8 -7
  72. package/dist/interface/crud/projects.d.ts +8 -7
  73. package/dist/interface/crud/sessions.d.mts +1 -0
  74. package/dist/interface/crud/sessions.d.ts +1 -0
  75. package/dist/interface/crud/svix-token.d.mts +1 -0
  76. package/dist/interface/crud/svix-token.d.ts +1 -0
  77. package/dist/interface/crud/team-invitation-details.d.mts +1 -0
  78. package/dist/interface/crud/team-invitation-details.d.ts +1 -0
  79. package/dist/interface/crud/team-invitation.d.mts +1 -0
  80. package/dist/interface/crud/team-invitation.d.ts +1 -0
  81. package/dist/interface/crud/team-member-profiles.d.mts +1 -0
  82. package/dist/interface/crud/team-member-profiles.d.ts +1 -0
  83. package/dist/interface/crud/team-memberships.d.mts +1 -0
  84. package/dist/interface/crud/team-memberships.d.ts +1 -0
  85. package/dist/interface/crud/team-permissions.d.mts +1 -0
  86. package/dist/interface/crud/team-permissions.d.ts +1 -0
  87. package/dist/interface/crud/teams.d.mts +1 -0
  88. package/dist/interface/crud/teams.d.ts +1 -0
  89. package/dist/interface/crud/users.d.mts +1 -0
  90. package/dist/interface/crud/users.d.ts +1 -0
  91. package/dist/interface/server-interface.d.mts +1 -0
  92. package/dist/interface/server-interface.d.ts +1 -0
  93. package/dist/known-errors.d.mts +6 -0
  94. package/dist/known-errors.d.ts +6 -0
  95. package/dist/known-errors.js +24 -1
  96. package/dist/known-errors.js.map +1 -1
  97. package/dist/schema-fields.d.mts +39 -8
  98. package/dist/schema-fields.d.ts +39 -8
  99. package/dist/schema-fields.js +101 -27
  100. package/dist/schema-fields.js.map +1 -1
  101. package/dist/utils/currencies.d.mts +39 -0
  102. package/dist/utils/currencies.d.ts +39 -0
  103. package/dist/utils/currencies.js +78 -0
  104. package/dist/utils/currencies.js.map +1 -0
  105. package/dist/utils/dates.d.mts +5 -1
  106. package/dist/utils/dates.d.ts +5 -1
  107. package/dist/utils/dates.js +58 -2
  108. package/dist/utils/dates.js.map +1 -1
  109. package/dist/utils/errors.d.mts +9 -0
  110. package/dist/utils/errors.d.ts +9 -0
  111. package/dist/utils/errors.js.map +1 -1
  112. package/dist/utils/objects.d.mts +23 -8
  113. package/dist/utils/objects.d.ts +23 -8
  114. package/dist/utils/objects.js +2 -0
  115. package/dist/utils/objects.js.map +1 -1
  116. package/dist/utils/strings.d.mts +3 -1
  117. package/dist/utils/strings.d.ts +3 -1
  118. package/dist/utils/strings.js +5 -0
  119. package/dist/utils/strings.js.map +1 -1
  120. package/dist/utils/types.d.mts +73 -2
  121. package/dist/utils/types.d.ts +73 -2
  122. package/dist/utils/types.js +54 -0
  123. package/dist/utils/types.js.map +1 -1
  124. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const emailConfigSchema: yup.ObjectSchema<{
6
7
  type: "shared" | "standard";
@@ -56,8 +57,8 @@ declare const projectsCrudAdminReadSchema: yup.ObjectSchema<{
56
57
  client_secret?: string | undefined;
57
58
  facebook_config_id?: string | undefined;
58
59
  microsoft_tenant_id?: string | undefined;
59
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
60
60
  type: "shared" | "standard";
61
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
61
62
  provider_config_id: string;
62
63
  }[];
63
64
  enabled_oauth_providers: {
@@ -175,8 +176,8 @@ declare const projectsCrudAdminUpdateSchema: yup.ObjectSchema<{
175
176
  client_secret?: string | undefined;
176
177
  facebook_config_id?: string | undefined;
177
178
  microsoft_tenant_id?: string | undefined;
178
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
179
179
  type: "shared" | "standard";
180
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
180
181
  }[] | undefined;
181
182
  domains?: {
182
183
  domain: string;
@@ -229,8 +230,8 @@ declare const projectsCrudAdminCreateSchema: yup.ObjectSchema<{
229
230
  client_secret?: string | undefined;
230
231
  facebook_config_id?: string | undefined;
231
232
  microsoft_tenant_id?: string | undefined;
232
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
233
233
  type: "shared" | "standard";
234
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
234
235
  }[] | undefined;
235
236
  domains?: {
236
237
  domain: string;
@@ -330,8 +331,8 @@ declare const projectsCrud: CrudSchemaFromOptions<{
330
331
  client_secret?: string | undefined;
331
332
  facebook_config_id?: string | undefined;
332
333
  microsoft_tenant_id?: string | undefined;
333
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
334
334
  type: "shared" | "standard";
335
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
335
336
  provider_config_id: string;
336
337
  }[];
337
338
  enabled_oauth_providers: {
@@ -418,8 +419,8 @@ declare const projectsCrud: CrudSchemaFromOptions<{
418
419
  client_secret?: string | undefined;
419
420
  facebook_config_id?: string | undefined;
420
421
  microsoft_tenant_id?: string | undefined;
421
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
422
422
  type: "shared" | "standard";
423
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
423
424
  }[] | undefined;
424
425
  domains?: {
425
426
  domain: string;
@@ -495,8 +496,8 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
495
496
  client_secret?: string | undefined;
496
497
  facebook_config_id?: string | undefined;
497
498
  microsoft_tenant_id?: string | undefined;
498
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
499
499
  type: "shared" | "standard";
500
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
500
501
  provider_config_id: string;
501
502
  }[];
502
503
  enabled_oauth_providers: {
@@ -583,8 +584,8 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
583
584
  client_secret?: string | undefined;
584
585
  facebook_config_id?: string | undefined;
585
586
  microsoft_tenant_id?: string | undefined;
586
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
587
587
  type: "shared" | "standard";
588
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
588
589
  }[] | undefined;
589
590
  domains?: {
590
591
  domain: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const emailConfigSchema: yup.ObjectSchema<{
6
7
  type: "shared" | "standard";
@@ -56,8 +57,8 @@ declare const projectsCrudAdminReadSchema: yup.ObjectSchema<{
56
57
  client_secret?: string | undefined;
57
58
  facebook_config_id?: string | undefined;
58
59
  microsoft_tenant_id?: string | undefined;
59
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
60
60
  type: "shared" | "standard";
61
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
61
62
  provider_config_id: string;
62
63
  }[];
63
64
  enabled_oauth_providers: {
@@ -175,8 +176,8 @@ declare const projectsCrudAdminUpdateSchema: yup.ObjectSchema<{
175
176
  client_secret?: string | undefined;
176
177
  facebook_config_id?: string | undefined;
177
178
  microsoft_tenant_id?: string | undefined;
178
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
179
179
  type: "shared" | "standard";
180
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
180
181
  }[] | undefined;
181
182
  domains?: {
182
183
  domain: string;
@@ -229,8 +230,8 @@ declare const projectsCrudAdminCreateSchema: yup.ObjectSchema<{
229
230
  client_secret?: string | undefined;
230
231
  facebook_config_id?: string | undefined;
231
232
  microsoft_tenant_id?: string | undefined;
232
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
233
233
  type: "shared" | "standard";
234
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
234
235
  }[] | undefined;
235
236
  domains?: {
236
237
  domain: string;
@@ -330,8 +331,8 @@ declare const projectsCrud: CrudSchemaFromOptions<{
330
331
  client_secret?: string | undefined;
331
332
  facebook_config_id?: string | undefined;
332
333
  microsoft_tenant_id?: string | undefined;
333
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
334
334
  type: "shared" | "standard";
335
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
335
336
  provider_config_id: string;
336
337
  }[];
337
338
  enabled_oauth_providers: {
@@ -418,8 +419,8 @@ declare const projectsCrud: CrudSchemaFromOptions<{
418
419
  client_secret?: string | undefined;
419
420
  facebook_config_id?: string | undefined;
420
421
  microsoft_tenant_id?: string | undefined;
421
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
422
422
  type: "shared" | "standard";
423
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
423
424
  }[] | undefined;
424
425
  domains?: {
425
426
  domain: string;
@@ -495,8 +496,8 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
495
496
  client_secret?: string | undefined;
496
497
  facebook_config_id?: string | undefined;
497
498
  microsoft_tenant_id?: string | undefined;
498
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
499
499
  type: "shared" | "standard";
500
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
500
501
  provider_config_id: string;
501
502
  }[];
502
503
  enabled_oauth_providers: {
@@ -583,8 +584,8 @@ declare const adminUserProjectsCrud: CrudSchemaFromOptions<{
583
584
  client_secret?: string | undefined;
584
585
  facebook_config_id?: string | undefined;
585
586
  microsoft_tenant_id?: string | undefined;
586
- id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
587
587
  type: "shared" | "standard";
588
+ id: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "twitch";
588
589
  }[] | undefined;
589
590
  domains?: {
590
591
  domain: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const sessionsCrudServerCreateSchema: yup.ObjectSchema<{
6
7
  user_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const sessionsCrudServerCreateSchema: yup.ObjectSchema<{
6
7
  user_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const svixTokenAdminReadSchema: yup.ObjectSchema<{
6
7
  token: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const svixTokenAdminReadSchema: yup.ObjectSchema<{
6
7
  token: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamInvitationDetailsClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamInvitationDetailsClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamInvitationDetailsClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamInvitationDetailsClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamMemberProfilesCrudClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamMemberProfilesCrudClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamMembershipsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamMembershipsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  team_id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamPermissionsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamPermissionsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const teamsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const teamsCrudClientReadSchema: yup.ObjectSchema<{
6
7
  id: string;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.mjs';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.mjs';
4
+ import '../../utils/strings.mjs';
4
5
 
5
6
  declare const usersCrudServerUpdateSchema: yup.ObjectSchema<{
6
7
  display_name: string | null | undefined;
@@ -1,6 +1,7 @@
1
1
  import { CrudSchemaFromOptions, CrudTypeOf } from '../../crud.js';
2
2
  import * as yup from 'yup';
3
3
  import '../../utils/types.js';
4
+ import '../../utils/strings.js';
4
5
 
5
6
  declare const usersCrudServerUpdateSchema: yup.ObjectSchema<{
6
7
  display_name: string | null | undefined;
@@ -22,6 +22,7 @@ import '@simplewebauthn/types';
22
22
  import './crud/project-api-keys.mjs';
23
23
  import '../crud.mjs';
24
24
  import '../utils/types.mjs';
25
+ import '../utils/strings.mjs';
25
26
  import './crud/projects.mjs';
26
27
 
27
28
  type ServerAuthApplicationOptions = (ClientInterfaceOptions & ({
@@ -22,6 +22,7 @@ import '@simplewebauthn/types';
22
22
  import './crud/project-api-keys.js';
23
23
  import '../crud.js';
24
24
  import '../utils/types.js';
25
+ import '../utils/strings.js';
25
26
  import './crud/projects.js';
26
27
 
27
28
  type ServerAuthApplicationOptions = (ClientInterfaceOptions & ({
@@ -264,6 +264,9 @@ declare const KnownErrors: {
264
264
  ProjectNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"PROJECT_NOT_FOUND">, [projectId: string]> & {
265
265
  errorCode: "PROJECT_NOT_FOUND";
266
266
  };
267
+ CurrentProjectNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"CURRENT_PROJECT_NOT_FOUND">, [projectId: string]> & {
268
+ errorCode: "CURRENT_PROJECT_NOT_FOUND";
269
+ };
267
270
  BranchDoesNotExist: KnownErrorConstructor<KnownError & KnownErrorBrand<"BRANCH_DOES_NOT_EXIST">, [branchId: string]> & {
268
271
  errorCode: "BRANCH_DOES_NOT_EXIST";
269
272
  };
@@ -456,6 +459,9 @@ declare const KnownErrors: {
456
459
  EmailRenderingError: KnownErrorConstructor<KnownError & KnownErrorBrand<"EMAIL_RENDERING_ERROR">, [error: string]> & {
457
460
  errorCode: "EMAIL_RENDERING_ERROR";
458
461
  };
462
+ RequiresCustomEmailServer: KnownErrorConstructor<KnownError & KnownErrorBrand<"REQUIRES_CUSTOM_EMAIL_SERVER">, []> & {
463
+ errorCode: "REQUIRES_CUSTOM_EMAIL_SERVER";
464
+ };
459
465
  };
460
466
 
461
467
  export { type AbstractKnownErrorConstructor, KnownError, type KnownErrorConstructor, type KnownErrorJson, KnownErrors };
@@ -264,6 +264,9 @@ declare const KnownErrors: {
264
264
  ProjectNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"PROJECT_NOT_FOUND">, [projectId: string]> & {
265
265
  errorCode: "PROJECT_NOT_FOUND";
266
266
  };
267
+ CurrentProjectNotFound: KnownErrorConstructor<KnownError & KnownErrorBrand<"CURRENT_PROJECT_NOT_FOUND">, [projectId: string]> & {
268
+ errorCode: "CURRENT_PROJECT_NOT_FOUND";
269
+ };
267
270
  BranchDoesNotExist: KnownErrorConstructor<KnownError & KnownErrorBrand<"BRANCH_DOES_NOT_EXIST">, [branchId: string]> & {
268
271
  errorCode: "BRANCH_DOES_NOT_EXIST";
269
272
  };
@@ -456,6 +459,9 @@ declare const KnownErrors: {
456
459
  EmailRenderingError: KnownErrorConstructor<KnownError & KnownErrorBrand<"EMAIL_RENDERING_ERROR">, [error: string]> & {
457
460
  errorCode: "EMAIL_RENDERING_ERROR";
458
461
  };
462
+ RequiresCustomEmailServer: KnownErrorConstructor<KnownError & KnownErrorBrand<"REQUIRES_CUSTOM_EMAIL_SERVER">, []> & {
463
+ errorCode: "REQUIRES_CUSTOM_EMAIL_SERVER";
464
+ };
459
465
  };
460
466
 
461
467
  export { type AbstractKnownErrorConstructor, KnownError, type KnownErrorConstructor, type KnownErrorJson, KnownErrors };
@@ -538,6 +538,18 @@ var ProjectNotFound = createKnownErrorConstructor(
538
538
  },
539
539
  (json) => [json.project_id]
540
540
  );
541
+ var CurrentProjectNotFound = createKnownErrorConstructor(
542
+ KnownError,
543
+ "CURRENT_PROJECT_NOT_FOUND",
544
+ (projectId) => [
545
+ 400,
546
+ `The current project with ID ${projectId} was not found. Please check the value of the x-stack-project-id header.`,
547
+ {
548
+ project_id: projectId
549
+ }
550
+ ],
551
+ (json) => [json.project_id]
552
+ );
541
553
  var BranchDoesNotExist = createKnownErrorConstructor(
542
554
  KnownError,
543
555
  "BRANCH_DOES_NOT_EXIST",
@@ -1193,6 +1205,15 @@ var EmailRenderingError = createKnownErrorConstructor(
1193
1205
  ],
1194
1206
  (json) => [json.error]
1195
1207
  );
1208
+ var RequiresCustomEmailServer = createKnownErrorConstructor(
1209
+ KnownError,
1210
+ "REQUIRES_CUSTOM_EMAIL_SERVER",
1211
+ () => [
1212
+ 400,
1213
+ `This action requires a custom SMTP server. Please edit your email server configuration and try again.`
1214
+ ],
1215
+ () => []
1216
+ );
1196
1217
  var KnownErrors = {
1197
1218
  CannotDeleteCurrentSession,
1198
1219
  UnsupportedError,
@@ -1243,6 +1264,7 @@ var KnownErrors = {
1243
1264
  ApiKeyNotFound,
1244
1265
  PublicApiKeyCannotBeRevoked,
1245
1266
  ProjectNotFound,
1267
+ CurrentProjectNotFound,
1246
1268
  BranchDoesNotExist,
1247
1269
  SignUpNotEnabled,
1248
1270
  PasswordAuthenticationNotEnabled,
@@ -1300,7 +1322,8 @@ var KnownErrors = {
1300
1322
  ApiKeyExpired,
1301
1323
  ApiKeyRevoked,
1302
1324
  WrongApiKeyType,
1303
- EmailRenderingError
1325
+ EmailRenderingError,
1326
+ RequiresCustomEmailServer
1304
1327
  };
1305
1328
  var knownErrorCodes = /* @__PURE__ */ new Set();
1306
1329
  for (const [_, KnownError2] of Object.entries(KnownErrors)) {