@stackframe/stack-shared 2.8.2 → 2.8.5

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 (40) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/config/format.d.ts +38 -0
  3. package/dist/config/format.js +224 -0
  4. package/dist/config/schema.d.ts +721 -0
  5. package/dist/config/schema.js +185 -0
  6. package/dist/crud.js +1 -1
  7. package/dist/interface/adminInterface.d.ts +7 -7
  8. package/dist/interface/adminInterface.js +7 -7
  9. package/dist/interface/clientInterface.d.ts +46 -4
  10. package/dist/interface/clientInterface.js +66 -2
  11. package/dist/interface/crud/current-user.d.ts +2 -2
  12. package/dist/interface/crud/{api-keys.d.ts → internal-api-keys.d.ts} +7 -7
  13. package/dist/interface/crud/{api-keys.js → internal-api-keys.js} +10 -10
  14. package/dist/interface/crud/project-api-keys.d.ts +188 -0
  15. package/dist/interface/crud/project-api-keys.js +76 -0
  16. package/dist/interface/crud/projects.d.ts +53 -20
  17. package/dist/interface/crud/projects.js +15 -5
  18. package/dist/interface/crud/team-member-profiles.d.ts +4 -4
  19. package/dist/interface/crud/users.d.ts +8 -8
  20. package/dist/interface/serverInterface.d.ts +2 -1
  21. package/dist/interface/serverInterface.js +4 -0
  22. package/dist/interface/webhooks.d.ts +2 -2
  23. package/dist/known-errors.d.ts +35 -1
  24. package/dist/known-errors.js +42 -4
  25. package/dist/schema-fields.d.ts +6 -5
  26. package/dist/schema-fields.js +36 -3
  27. package/dist/utils/api-keys.d.ts +23 -0
  28. package/dist/utils/api-keys.js +76 -0
  29. package/dist/utils/bytes.d.ts +3 -0
  30. package/dist/utils/bytes.js +55 -6
  31. package/dist/utils/caches.d.ts +10 -10
  32. package/dist/utils/hashes.d.ts +1 -1
  33. package/dist/utils/hashes.js +1 -3
  34. package/dist/utils/objects.d.ts +35 -2
  35. package/dist/utils/objects.js +128 -0
  36. package/dist/utils/promises.d.ts +1 -1
  37. package/dist/utils/promises.js +9 -10
  38. package/dist/utils/stores.d.ts +6 -6
  39. package/dist/utils/types.d.ts +17 -0
  40. package/package.json +2 -1
@@ -0,0 +1,721 @@
1
+ import * as yup from "yup";
2
+ import { DeepMerge } from "../utils/objects";
3
+ import { PrettifyType } from "../utils/types";
4
+ import { NormalizesTo } from "./format";
5
+ export declare const configLevels: readonly ["project", "branch", "environment", "organization"];
6
+ export type ConfigLevel = typeof configLevels[number];
7
+ /**
8
+ * All fields that can be overridden at this level.
9
+ */
10
+ export declare const projectConfigSchema: yup.ObjectSchema<{}, yup.AnyObject, {}, "">;
11
+ export declare const branchConfigSchema: yup.ObjectSchema<{} & {
12
+ rbac: {
13
+ permissions?: Record<string, {
14
+ description?: string | undefined;
15
+ scope?: "project" | "team" | undefined;
16
+ containedPermissionIds?: Record<string, true | undefined> | undefined;
17
+ } | undefined> | undefined;
18
+ defaultPermissions?: {
19
+ teamCreator?: Record<string, true | undefined> | undefined;
20
+ teamMember?: Record<string, true | undefined> | undefined;
21
+ signUp?: Record<string, true | undefined> | undefined;
22
+ } | undefined;
23
+ } | undefined;
24
+ teams: {
25
+ createPersonalTeamOnSignUp?: boolean | undefined;
26
+ allowClientTeamCreation?: boolean | undefined;
27
+ } | undefined;
28
+ users: {
29
+ allowClientUserDeletion?: boolean | undefined;
30
+ } | undefined;
31
+ apiKeys: {
32
+ enabled?: {
33
+ user?: boolean | undefined;
34
+ team?: boolean | undefined;
35
+ } | undefined;
36
+ } | undefined;
37
+ domains: {
38
+ allowLocalhost?: boolean | undefined;
39
+ } | undefined;
40
+ auth: {
41
+ password?: {
42
+ allowSignIn?: boolean | undefined;
43
+ } | undefined;
44
+ allowSignUp?: boolean | undefined;
45
+ otp?: {
46
+ allowSignIn?: boolean | undefined;
47
+ } | undefined;
48
+ passkey?: {
49
+ allowSignIn?: boolean | undefined;
50
+ } | undefined;
51
+ oauth?: {
52
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
53
+ providers?: Record<string, {
54
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
55
+ allowSignIn?: boolean | undefined;
56
+ allowConnectedAccounts?: boolean | undefined;
57
+ }> | undefined;
58
+ } | undefined;
59
+ } | undefined;
60
+ emails: {};
61
+ }, yup.AnyObject, {
62
+ rbac: {
63
+ permissions: undefined;
64
+ defaultPermissions: {
65
+ teamCreator: undefined;
66
+ teamMember: undefined;
67
+ signUp: undefined;
68
+ };
69
+ };
70
+ teams: {
71
+ createPersonalTeamOnSignUp: undefined;
72
+ allowClientTeamCreation: undefined;
73
+ };
74
+ users: {
75
+ allowClientUserDeletion: undefined;
76
+ };
77
+ apiKeys: {
78
+ enabled: {
79
+ team: undefined;
80
+ user: undefined;
81
+ };
82
+ };
83
+ domains: {
84
+ allowLocalhost: undefined;
85
+ };
86
+ auth: {
87
+ allowSignUp: undefined;
88
+ password: {
89
+ allowSignIn: undefined;
90
+ };
91
+ otp: {
92
+ allowSignIn: undefined;
93
+ };
94
+ passkey: {
95
+ allowSignIn: undefined;
96
+ };
97
+ oauth: {
98
+ accountMergeStrategy: undefined;
99
+ providers: undefined;
100
+ };
101
+ };
102
+ emails: {};
103
+ }, "">;
104
+ export declare const environmentConfigSchema: yup.ObjectSchema<{
105
+ rbac: {
106
+ permissions?: Record<string, {
107
+ description?: string | undefined;
108
+ scope?: "project" | "team" | undefined;
109
+ containedPermissionIds?: Record<string, true | undefined> | undefined;
110
+ } | undefined> | undefined;
111
+ defaultPermissions?: {
112
+ teamCreator?: Record<string, true | undefined> | undefined;
113
+ teamMember?: Record<string, true | undefined> | undefined;
114
+ signUp?: Record<string, true | undefined> | undefined;
115
+ } | undefined;
116
+ } | undefined;
117
+ teams: {
118
+ createPersonalTeamOnSignUp?: boolean | undefined;
119
+ allowClientTeamCreation?: boolean | undefined;
120
+ } | undefined;
121
+ users: {
122
+ allowClientUserDeletion?: boolean | undefined;
123
+ } | undefined;
124
+ apiKeys: {
125
+ enabled?: {
126
+ user?: boolean | undefined;
127
+ team?: boolean | undefined;
128
+ } | undefined;
129
+ } | undefined;
130
+ domains: (Omit<{
131
+ allowLocalhost?: boolean | undefined;
132
+ }, "trustedDomains"> & {
133
+ trustedDomains?: Record<string, {
134
+ baseUrl?: string | undefined;
135
+ handlerPath?: string | undefined;
136
+ }> | undefined;
137
+ }) | undefined;
138
+ auth: (Omit<{
139
+ password?: {
140
+ allowSignIn?: boolean | undefined;
141
+ } | undefined;
142
+ allowSignUp?: boolean | undefined;
143
+ otp?: {
144
+ allowSignIn?: boolean | undefined;
145
+ } | undefined;
146
+ passkey?: {
147
+ allowSignIn?: boolean | undefined;
148
+ } | undefined;
149
+ oauth?: {
150
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
151
+ providers?: Record<string, {
152
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
153
+ allowSignIn?: boolean | undefined;
154
+ allowConnectedAccounts?: boolean | undefined;
155
+ }> | undefined;
156
+ } | undefined;
157
+ }, "oauth"> & {
158
+ oauth?: (Omit<{
159
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
160
+ providers?: Record<string, {
161
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
162
+ allowSignIn?: boolean | undefined;
163
+ allowConnectedAccounts?: boolean | undefined;
164
+ }> | undefined;
165
+ }, never> & {
166
+ providers?: Record<string, {
167
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
168
+ clientId?: string | undefined;
169
+ clientSecret?: string | undefined;
170
+ allowSignIn?: boolean | undefined;
171
+ allowConnectedAccounts?: boolean | undefined;
172
+ isShared?: boolean | undefined;
173
+ facebookConfigId?: string | undefined;
174
+ microsoftTenantId?: string | undefined;
175
+ }> | undefined;
176
+ }) | undefined;
177
+ }) | undefined;
178
+ emails: Omit<{}, never> & {
179
+ server: {
180
+ host?: string | undefined;
181
+ port?: number | undefined;
182
+ username?: string | undefined;
183
+ password?: string | undefined;
184
+ isShared?: boolean | undefined;
185
+ senderName?: string | undefined;
186
+ senderEmail?: string | undefined;
187
+ };
188
+ };
189
+ } & {
190
+ auth: (Omit<{
191
+ password?: {
192
+ allowSignIn?: boolean | undefined;
193
+ } | undefined;
194
+ allowSignUp?: boolean | undefined;
195
+ otp?: {
196
+ allowSignIn?: boolean | undefined;
197
+ } | undefined;
198
+ passkey?: {
199
+ allowSignIn?: boolean | undefined;
200
+ } | undefined;
201
+ oauth?: {
202
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
203
+ providers?: Record<string, {
204
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
205
+ allowSignIn?: boolean | undefined;
206
+ allowConnectedAccounts?: boolean | undefined;
207
+ }> | undefined;
208
+ } | undefined;
209
+ }, "oauth"> & {
210
+ oauth?: (Omit<{
211
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
212
+ providers?: Record<string, {
213
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
214
+ allowSignIn?: boolean | undefined;
215
+ allowConnectedAccounts?: boolean | undefined;
216
+ }> | undefined;
217
+ }, never> & {
218
+ providers?: Record<string, {
219
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
220
+ clientId?: string | undefined;
221
+ clientSecret?: string | undefined;
222
+ allowSignIn?: boolean | undefined;
223
+ allowConnectedAccounts?: boolean | undefined;
224
+ isShared?: boolean | undefined;
225
+ facebookConfigId?: string | undefined;
226
+ microsoftTenantId?: string | undefined;
227
+ }> | undefined;
228
+ }) | undefined;
229
+ }) | undefined;
230
+ emails: Omit<{}, never> & {
231
+ server: {
232
+ host?: string | undefined;
233
+ port?: number | undefined;
234
+ username?: string | undefined;
235
+ password?: string | undefined;
236
+ isShared?: boolean | undefined;
237
+ senderName?: string | undefined;
238
+ senderEmail?: string | undefined;
239
+ };
240
+ };
241
+ domains: (Omit<{
242
+ allowLocalhost?: boolean | undefined;
243
+ }, "trustedDomains"> & {
244
+ trustedDomains?: Record<string, {
245
+ baseUrl?: string | undefined;
246
+ handlerPath?: string | undefined;
247
+ }> | undefined;
248
+ }) | undefined;
249
+ }, yup.AnyObject, {
250
+ rbac: {
251
+ permissions: undefined;
252
+ defaultPermissions: {
253
+ teamCreator: undefined;
254
+ teamMember: undefined;
255
+ signUp: undefined;
256
+ };
257
+ };
258
+ teams: {
259
+ createPersonalTeamOnSignUp: undefined;
260
+ allowClientTeamCreation: undefined;
261
+ };
262
+ users: {
263
+ allowClientUserDeletion: undefined;
264
+ };
265
+ apiKeys: {
266
+ enabled: {
267
+ team: undefined;
268
+ user: undefined;
269
+ };
270
+ };
271
+ domains: {
272
+ rbac: {
273
+ permissions: undefined;
274
+ defaultPermissions: {
275
+ teamCreator: undefined;
276
+ teamMember: undefined;
277
+ signUp: undefined;
278
+ };
279
+ };
280
+ teams: {
281
+ createPersonalTeamOnSignUp: undefined;
282
+ allowClientTeamCreation: undefined;
283
+ };
284
+ users: {
285
+ allowClientUserDeletion: undefined;
286
+ };
287
+ apiKeys: {
288
+ enabled: {
289
+ team: undefined;
290
+ user: undefined;
291
+ };
292
+ };
293
+ domains: {
294
+ allowLocalhost: undefined;
295
+ };
296
+ auth: {
297
+ allowSignUp: undefined;
298
+ password: {
299
+ allowSignIn: undefined;
300
+ };
301
+ otp: {
302
+ allowSignIn: undefined;
303
+ };
304
+ passkey: {
305
+ allowSignIn: undefined;
306
+ };
307
+ oauth: {
308
+ accountMergeStrategy: undefined;
309
+ providers: undefined;
310
+ };
311
+ };
312
+ emails: {};
313
+ };
314
+ auth: {
315
+ rbac: {
316
+ permissions: undefined;
317
+ defaultPermissions: {
318
+ teamCreator: undefined;
319
+ teamMember: undefined;
320
+ signUp: undefined;
321
+ };
322
+ };
323
+ teams: {
324
+ createPersonalTeamOnSignUp: undefined;
325
+ allowClientTeamCreation: undefined;
326
+ };
327
+ users: {
328
+ allowClientUserDeletion: undefined;
329
+ };
330
+ apiKeys: {
331
+ enabled: {
332
+ team: undefined;
333
+ user: undefined;
334
+ };
335
+ };
336
+ domains: {
337
+ allowLocalhost: undefined;
338
+ };
339
+ auth: {
340
+ allowSignUp: undefined;
341
+ password: {
342
+ allowSignIn: undefined;
343
+ };
344
+ otp: {
345
+ allowSignIn: undefined;
346
+ };
347
+ passkey: {
348
+ allowSignIn: undefined;
349
+ };
350
+ oauth: {
351
+ accountMergeStrategy: undefined;
352
+ providers: undefined;
353
+ };
354
+ };
355
+ emails: {};
356
+ };
357
+ emails: {
358
+ rbac: {
359
+ permissions: undefined;
360
+ defaultPermissions: {
361
+ teamCreator: undefined;
362
+ teamMember: undefined;
363
+ signUp: undefined;
364
+ };
365
+ };
366
+ teams: {
367
+ createPersonalTeamOnSignUp: undefined;
368
+ allowClientTeamCreation: undefined;
369
+ };
370
+ users: {
371
+ allowClientUserDeletion: undefined;
372
+ };
373
+ apiKeys: {
374
+ enabled: {
375
+ team: undefined;
376
+ user: undefined;
377
+ };
378
+ };
379
+ domains: {
380
+ allowLocalhost: undefined;
381
+ };
382
+ auth: {
383
+ allowSignUp: undefined;
384
+ password: {
385
+ allowSignIn: undefined;
386
+ };
387
+ otp: {
388
+ allowSignIn: undefined;
389
+ };
390
+ passkey: {
391
+ allowSignIn: undefined;
392
+ };
393
+ oauth: {
394
+ accountMergeStrategy: undefined;
395
+ providers: undefined;
396
+ };
397
+ };
398
+ emails: {};
399
+ };
400
+ }, "">;
401
+ export declare const organizationConfigSchema: yup.ObjectSchema<{
402
+ rbac: {
403
+ permissions?: Record<string, {
404
+ description?: string | undefined;
405
+ scope?: "project" | "team" | undefined;
406
+ containedPermissionIds?: Record<string, true | undefined> | undefined;
407
+ } | undefined> | undefined;
408
+ defaultPermissions?: {
409
+ teamCreator?: Record<string, true | undefined> | undefined;
410
+ teamMember?: Record<string, true | undefined> | undefined;
411
+ signUp?: Record<string, true | undefined> | undefined;
412
+ } | undefined;
413
+ } | undefined;
414
+ teams: {
415
+ createPersonalTeamOnSignUp?: boolean | undefined;
416
+ allowClientTeamCreation?: boolean | undefined;
417
+ } | undefined;
418
+ users: {
419
+ allowClientUserDeletion?: boolean | undefined;
420
+ } | undefined;
421
+ apiKeys: {
422
+ enabled?: {
423
+ user?: boolean | undefined;
424
+ team?: boolean | undefined;
425
+ } | undefined;
426
+ } | undefined;
427
+ domains: (Omit<{
428
+ allowLocalhost?: boolean | undefined;
429
+ }, "trustedDomains"> & {
430
+ trustedDomains?: Record<string, {
431
+ baseUrl?: string | undefined;
432
+ handlerPath?: string | undefined;
433
+ }> | undefined;
434
+ }) | undefined;
435
+ auth: (Omit<{
436
+ password?: {
437
+ allowSignIn?: boolean | undefined;
438
+ } | undefined;
439
+ allowSignUp?: boolean | undefined;
440
+ otp?: {
441
+ allowSignIn?: boolean | undefined;
442
+ } | undefined;
443
+ passkey?: {
444
+ allowSignIn?: boolean | undefined;
445
+ } | undefined;
446
+ oauth?: {
447
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
448
+ providers?: Record<string, {
449
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
450
+ allowSignIn?: boolean | undefined;
451
+ allowConnectedAccounts?: boolean | undefined;
452
+ }> | undefined;
453
+ } | undefined;
454
+ }, "oauth"> & {
455
+ oauth?: (Omit<{
456
+ accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
457
+ providers?: Record<string, {
458
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
459
+ allowSignIn?: boolean | undefined;
460
+ allowConnectedAccounts?: boolean | undefined;
461
+ }> | undefined;
462
+ }, never> & {
463
+ providers?: Record<string, {
464
+ type?: "apple" | "x" | "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | undefined;
465
+ clientId?: string | undefined;
466
+ clientSecret?: string | undefined;
467
+ allowSignIn?: boolean | undefined;
468
+ allowConnectedAccounts?: boolean | undefined;
469
+ isShared?: boolean | undefined;
470
+ facebookConfigId?: string | undefined;
471
+ microsoftTenantId?: string | undefined;
472
+ }> | undefined;
473
+ }) | undefined;
474
+ }) | undefined;
475
+ emails: Omit<{}, never> & {
476
+ server: {
477
+ host?: string | undefined;
478
+ port?: number | undefined;
479
+ username?: string | undefined;
480
+ password?: string | undefined;
481
+ isShared?: boolean | undefined;
482
+ senderName?: string | undefined;
483
+ senderEmail?: string | undefined;
484
+ };
485
+ };
486
+ } & {}, yup.AnyObject, {
487
+ rbac: {
488
+ permissions: undefined;
489
+ defaultPermissions: {
490
+ teamCreator: undefined;
491
+ teamMember: undefined;
492
+ signUp: undefined;
493
+ };
494
+ };
495
+ teams: {
496
+ createPersonalTeamOnSignUp: undefined;
497
+ allowClientTeamCreation: undefined;
498
+ };
499
+ users: {
500
+ allowClientUserDeletion: undefined;
501
+ };
502
+ apiKeys: {
503
+ enabled: {
504
+ team: undefined;
505
+ user: undefined;
506
+ };
507
+ };
508
+ domains: {
509
+ rbac: {
510
+ permissions: undefined;
511
+ defaultPermissions: {
512
+ teamCreator: undefined;
513
+ teamMember: undefined;
514
+ signUp: undefined;
515
+ };
516
+ };
517
+ teams: {
518
+ createPersonalTeamOnSignUp: undefined;
519
+ allowClientTeamCreation: undefined;
520
+ };
521
+ users: {
522
+ allowClientUserDeletion: undefined;
523
+ };
524
+ apiKeys: {
525
+ enabled: {
526
+ team: undefined;
527
+ user: undefined;
528
+ };
529
+ };
530
+ domains: {
531
+ allowLocalhost: undefined;
532
+ };
533
+ auth: {
534
+ allowSignUp: undefined;
535
+ password: {
536
+ allowSignIn: undefined;
537
+ };
538
+ otp: {
539
+ allowSignIn: undefined;
540
+ };
541
+ passkey: {
542
+ allowSignIn: undefined;
543
+ };
544
+ oauth: {
545
+ accountMergeStrategy: undefined;
546
+ providers: undefined;
547
+ };
548
+ };
549
+ emails: {};
550
+ };
551
+ auth: {
552
+ rbac: {
553
+ permissions: undefined;
554
+ defaultPermissions: {
555
+ teamCreator: undefined;
556
+ teamMember: undefined;
557
+ signUp: undefined;
558
+ };
559
+ };
560
+ teams: {
561
+ createPersonalTeamOnSignUp: undefined;
562
+ allowClientTeamCreation: undefined;
563
+ };
564
+ users: {
565
+ allowClientUserDeletion: undefined;
566
+ };
567
+ apiKeys: {
568
+ enabled: {
569
+ team: undefined;
570
+ user: undefined;
571
+ };
572
+ };
573
+ domains: {
574
+ allowLocalhost: undefined;
575
+ };
576
+ auth: {
577
+ allowSignUp: undefined;
578
+ password: {
579
+ allowSignIn: undefined;
580
+ };
581
+ otp: {
582
+ allowSignIn: undefined;
583
+ };
584
+ passkey: {
585
+ allowSignIn: undefined;
586
+ };
587
+ oauth: {
588
+ accountMergeStrategy: undefined;
589
+ providers: undefined;
590
+ };
591
+ };
592
+ emails: {};
593
+ };
594
+ emails: {
595
+ rbac: {
596
+ permissions: undefined;
597
+ defaultPermissions: {
598
+ teamCreator: undefined;
599
+ teamMember: undefined;
600
+ signUp: undefined;
601
+ };
602
+ };
603
+ teams: {
604
+ createPersonalTeamOnSignUp: undefined;
605
+ allowClientTeamCreation: undefined;
606
+ };
607
+ users: {
608
+ allowClientUserDeletion: undefined;
609
+ };
610
+ apiKeys: {
611
+ enabled: {
612
+ team: undefined;
613
+ user: undefined;
614
+ };
615
+ };
616
+ domains: {
617
+ allowLocalhost: undefined;
618
+ };
619
+ auth: {
620
+ allowSignUp: undefined;
621
+ password: {
622
+ allowSignIn: undefined;
623
+ };
624
+ otp: {
625
+ allowSignIn: undefined;
626
+ };
627
+ passkey: {
628
+ allowSignIn: undefined;
629
+ };
630
+ oauth: {
631
+ accountMergeStrategy: undefined;
632
+ providers: undefined;
633
+ };
634
+ };
635
+ emails: {};
636
+ };
637
+ }, "">;
638
+ export declare const projectConfigDefaults: {};
639
+ export declare const branchConfigDefaults: {};
640
+ export declare const environmentConfigDefaults: {};
641
+ export declare const organizationConfigDefaults: {
642
+ rbac: {
643
+ permissions: (key: string) => {};
644
+ defaultPermissions: {
645
+ teamCreator: {};
646
+ teamMember: {};
647
+ signUp: {};
648
+ };
649
+ };
650
+ apiKeys: {
651
+ enabled: {
652
+ team: false;
653
+ user: false;
654
+ };
655
+ };
656
+ teams: {
657
+ createPersonalTeamOnSignUp: false;
658
+ allowClientTeamCreation: false;
659
+ };
660
+ users: {
661
+ allowClientUserDeletion: false;
662
+ };
663
+ domains: {
664
+ allowLocalhost: false;
665
+ trustedDomains: (key: string) => {
666
+ handlerPath: string;
667
+ };
668
+ };
669
+ auth: {
670
+ allowSignUp: true;
671
+ password: {
672
+ allowSignIn: false;
673
+ };
674
+ otp: {
675
+ allowSignIn: false;
676
+ };
677
+ passkey: {
678
+ allowSignIn: false;
679
+ };
680
+ oauth: {
681
+ accountMergeStrategy: "link_method";
682
+ providers: (key: string) => {
683
+ allowSignIn: false;
684
+ allowConnectedAccounts: false;
685
+ };
686
+ };
687
+ };
688
+ emails: {
689
+ server: {
690
+ isShared: true;
691
+ };
692
+ };
693
+ };
694
+ export type DeepReplaceAllowFunctionsForObjects<T> = T extends object ? {
695
+ [K in keyof T]: DeepReplaceAllowFunctionsForObjects<T[K]>;
696
+ } | ((arg: keyof T) => DeepReplaceAllowFunctionsForObjects<T[keyof T]>) : T;
697
+ export type DeepReplaceFunctionsWithObjects<T> = T extends (arg: infer K extends string) => infer R ? DeepReplaceFunctionsWithObjects<Record<K, R>> : (T extends object ? {
698
+ [K in keyof T]: DeepReplaceFunctionsWithObjects<T[K]>;
699
+ } : T);
700
+ export type ApplyDefaults<D extends object | ((key: string) => unknown), C extends object> = DeepMerge<DeepReplaceFunctionsWithObjects<D>, C>;
701
+ export declare function applyDefaults<D extends object | ((key: string) => unknown), C extends object>(defaults: D, config: C): ApplyDefaults<D, C>;
702
+ export type ProjectConfigNormalizedOverride = yup.InferType<typeof projectConfigSchema>;
703
+ export type BranchConfigNormalizedOverride = yup.InferType<typeof branchConfigSchema>;
704
+ export type EnvironmentConfigNormalizedOverride = yup.InferType<typeof environmentConfigSchema>;
705
+ export type OrganizationConfigNormalizedOverride = yup.InferType<typeof organizationConfigSchema>;
706
+ export type ProjectConfigStrippedNormalizedOverride = Omit<ProjectConfigNormalizedOverride, keyof BranchConfigNormalizedOverride | keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
707
+ export type BranchConfigStrippedNormalizedOverride = Omit<BranchConfigNormalizedOverride, keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
708
+ export type EnvironmentConfigStrippedNormalizedOverride = Omit<EnvironmentConfigNormalizedOverride, keyof OrganizationConfigNormalizedOverride>;
709
+ export type OrganizationConfigStrippedNormalizedOverride = OrganizationConfigNormalizedOverride;
710
+ export type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
711
+ export type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
712
+ export type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
713
+ export type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
714
+ export type ProjectIncompleteConfig = ProjectConfigNormalizedOverride;
715
+ export type BranchIncompleteConfig = ProjectIncompleteConfig & BranchConfigNormalizedOverride;
716
+ export type EnvironmentIncompleteConfig = BranchIncompleteConfig & EnvironmentConfigNormalizedOverride;
717
+ export type OrganizationIncompleteConfig = EnvironmentIncompleteConfig & OrganizationConfigNormalizedOverride;
718
+ export type ProjectRenderedConfig = PrettifyType<ApplyDefaults<typeof projectConfigDefaults, ProjectConfigStrippedNormalizedOverride>>;
719
+ export type BranchRenderedConfig = PrettifyType<ProjectRenderedConfig & ApplyDefaults<typeof branchConfigDefaults, BranchConfigStrippedNormalizedOverride>>;
720
+ export type EnvironmentRenderedConfig = PrettifyType<BranchRenderedConfig & ApplyDefaults<typeof environmentConfigDefaults, EnvironmentConfigStrippedNormalizedOverride>>;
721
+ export type OrganizationRenderedConfig = PrettifyType<EnvironmentRenderedConfig & ApplyDefaults<typeof organizationConfigDefaults, OrganizationConfigStrippedNormalizedOverride>>;