@stackframe/stack-shared 2.8.21 → 2.8.25
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 +24 -0
- package/dist/config/schema.d.mts +121 -25
- package/dist/config/schema.d.ts +121 -25
- package/dist/config/schema.js +10 -4
- package/dist/config/schema.js.map +1 -1
- package/dist/esm/config/schema.js +10 -4
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/helpers/emails.js +79 -0
- package/dist/esm/helpers/emails.js.map +1 -0
- package/dist/esm/interface/admin-interface.js +104 -3
- package/dist/esm/interface/admin-interface.js.map +1 -1
- package/dist/esm/interface/client-interface.js +41 -0
- package/dist/esm/interface/client-interface.js.map +1 -1
- package/dist/esm/interface/crud/{oauth.js → connected-accounts.js} +2 -2
- package/dist/esm/interface/crud/connected-accounts.js.map +1 -0
- package/dist/esm/interface/crud/oauth-providers.js +87 -0
- package/dist/esm/interface/crud/oauth-providers.js.map +1 -0
- package/dist/esm/interface/crud/projects.js +7 -5
- package/dist/esm/interface/crud/projects.js.map +1 -1
- package/dist/esm/interface/server-interface.js +51 -0
- package/dist/esm/interface/server-interface.js.map +1 -1
- package/dist/esm/known-errors.js +23 -8
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.js +32 -1
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/utils/esbuild.js +66 -47
- package/dist/esm/utils/esbuild.js.map +1 -1
- package/dist/esm/utils/oauth.js +1 -1
- package/dist/esm/utils/oauth.js.map +1 -1
- package/dist/esm/utils/react.js +26 -4
- package/dist/esm/utils/react.js.map +1 -1
- package/dist/helpers/emails.d.mts +24 -0
- package/dist/helpers/emails.d.ts +24 -0
- package/dist/helpers/emails.js +108 -0
- package/dist/helpers/emails.js.map +1 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/interface/admin-interface.d.mts +50 -3
- package/dist/interface/admin-interface.d.ts +50 -3
- package/dist/interface/admin-interface.js +104 -3
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/client-interface.d.mts +24 -1
- package/dist/interface/client-interface.d.ts +24 -1
- package/dist/interface/client-interface.js +41 -0
- package/dist/interface/client-interface.js.map +1 -1
- package/dist/interface/crud/{oauth.js → connected-accounts.js} +5 -5
- package/dist/interface/crud/connected-accounts.js.map +1 -0
- package/dist/interface/crud/oauth-providers.d.mts +172 -0
- package/dist/interface/crud/oauth-providers.d.ts +172 -0
- package/dist/interface/crud/oauth-providers.js +107 -0
- package/dist/interface/crud/oauth-providers.js.map +1 -0
- package/dist/interface/crud/project-api-keys.d.mts +2 -2
- package/dist/interface/crud/project-api-keys.d.ts +2 -2
- package/dist/interface/crud/projects.d.mts +22 -19
- package/dist/interface/crud/projects.d.ts +22 -19
- package/dist/interface/crud/projects.js +5 -3
- package/dist/interface/crud/projects.js.map +1 -1
- package/dist/interface/server-interface.d.mts +45 -1
- package/dist/interface/server-interface.d.ts +45 -1
- package/dist/interface/server-interface.js +51 -0
- package/dist/interface/server-interface.js.map +1 -1
- package/dist/known-errors.d.mts +5 -2
- package/dist/known-errors.d.ts +5 -2
- package/dist/known-errors.js +23 -8
- package/dist/known-errors.js.map +1 -1
- package/dist/schema-fields.d.mts +21 -4
- package/dist/schema-fields.d.ts +21 -4
- package/dist/schema-fields.js +40 -1
- package/dist/schema-fields.js.map +1 -1
- package/dist/utils/esbuild.d.mts +3 -0
- package/dist/utils/esbuild.d.ts +3 -0
- package/dist/utils/esbuild.js +66 -47
- package/dist/utils/esbuild.js.map +1 -1
- package/dist/utils/oauth.d.mts +2 -2
- package/dist/utils/oauth.d.ts +2 -2
- package/dist/utils/oauth.js +1 -1
- package/dist/utils/oauth.js.map +1 -1
- package/dist/utils/react.d.mts +21 -4
- package/dist/utils/react.d.ts +21 -4
- package/dist/utils/react.js +28 -5
- package/dist/utils/react.js.map +1 -1
- package/dist/utils/types.d.mts +3 -2
- package/dist/utils/types.d.ts +3 -2
- package/dist/utils/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/esm/interface/crud/oauth.js.map +0 -1
- package/dist/interface/crud/oauth.js.map +0 -1
- /package/dist/interface/crud/{oauth.d.mts → connected-accounts.d.mts} +0 -0
- /package/dist/interface/crud/{oauth.d.ts → connected-accounts.d.ts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @stackframe/stack-shared
|
|
2
2
|
|
|
3
|
+
## 2.8.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Various changes
|
|
8
|
+
|
|
9
|
+
## 2.8.24
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Various changes
|
|
14
|
+
|
|
15
|
+
## 2.8.23
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Various changes
|
|
20
|
+
|
|
21
|
+
## 2.8.22
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Various changes
|
|
26
|
+
|
|
3
27
|
## 2.8.21
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
package/dist/config/schema.d.mts
CHANGED
|
@@ -63,13 +63,26 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
63
63
|
oauth?: {
|
|
64
64
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
65
65
|
providers?: Record<string, {
|
|
66
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
66
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
67
67
|
allowSignIn?: boolean | undefined;
|
|
68
68
|
allowConnectedAccounts?: boolean | undefined;
|
|
69
69
|
}> | undefined;
|
|
70
70
|
} | undefined;
|
|
71
71
|
} | undefined;
|
|
72
|
-
emails: {
|
|
72
|
+
emails: {
|
|
73
|
+
theme?: string | undefined;
|
|
74
|
+
themeList?: Record<string, {
|
|
75
|
+
displayName: string;
|
|
76
|
+
tsxSource: string;
|
|
77
|
+
}> | undefined;
|
|
78
|
+
templateList?: Record<string, {
|
|
79
|
+
description: string;
|
|
80
|
+
displayName: string;
|
|
81
|
+
tsxSource: string;
|
|
82
|
+
variables: string[];
|
|
83
|
+
subject: string;
|
|
84
|
+
}> | undefined;
|
|
85
|
+
};
|
|
73
86
|
}, yup.AnyObject, {
|
|
74
87
|
sourceOfTruth: undefined;
|
|
75
88
|
rbac: {
|
|
@@ -112,7 +125,11 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
112
125
|
providers: undefined;
|
|
113
126
|
};
|
|
114
127
|
};
|
|
115
|
-
emails: {
|
|
128
|
+
emails: {
|
|
129
|
+
theme: undefined;
|
|
130
|
+
themeList: undefined;
|
|
131
|
+
templateList: undefined;
|
|
132
|
+
};
|
|
116
133
|
}, "">;
|
|
117
134
|
declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
118
135
|
rbac: {
|
|
@@ -162,7 +179,7 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
162
179
|
oauth?: {
|
|
163
180
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
164
181
|
providers?: Record<string, {
|
|
165
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
182
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
166
183
|
allowSignIn?: boolean | undefined;
|
|
167
184
|
allowConnectedAccounts?: boolean | undefined;
|
|
168
185
|
}> | undefined;
|
|
@@ -171,13 +188,13 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
171
188
|
oauth?: (Omit<{
|
|
172
189
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
173
190
|
providers?: Record<string, {
|
|
174
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
191
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
175
192
|
allowSignIn?: boolean | undefined;
|
|
176
193
|
allowConnectedAccounts?: boolean | undefined;
|
|
177
194
|
}> | undefined;
|
|
178
195
|
}, never> & {
|
|
179
196
|
providers?: Record<string, {
|
|
180
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
197
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
181
198
|
clientId?: string | undefined;
|
|
182
199
|
clientSecret?: string | undefined;
|
|
183
200
|
allowSignIn?: boolean | undefined;
|
|
@@ -188,8 +205,20 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
188
205
|
}> | undefined;
|
|
189
206
|
}) | undefined;
|
|
190
207
|
}) | undefined;
|
|
191
|
-
emails: Omit<{
|
|
192
|
-
theme?:
|
|
208
|
+
emails: Omit<{
|
|
209
|
+
theme?: string | undefined;
|
|
210
|
+
themeList?: Record<string, {
|
|
211
|
+
displayName: string;
|
|
212
|
+
tsxSource: string;
|
|
213
|
+
}> | undefined;
|
|
214
|
+
templateList?: Record<string, {
|
|
215
|
+
description: string;
|
|
216
|
+
displayName: string;
|
|
217
|
+
tsxSource: string;
|
|
218
|
+
variables: string[];
|
|
219
|
+
subject: string;
|
|
220
|
+
}> | undefined;
|
|
221
|
+
}, never> & {
|
|
193
222
|
server: {
|
|
194
223
|
host?: string | undefined;
|
|
195
224
|
port?: number | undefined;
|
|
@@ -215,7 +244,7 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
215
244
|
oauth?: {
|
|
216
245
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
217
246
|
providers?: Record<string, {
|
|
218
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
247
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
219
248
|
allowSignIn?: boolean | undefined;
|
|
220
249
|
allowConnectedAccounts?: boolean | undefined;
|
|
221
250
|
}> | undefined;
|
|
@@ -224,13 +253,13 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
224
253
|
oauth?: (Omit<{
|
|
225
254
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
226
255
|
providers?: Record<string, {
|
|
227
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
256
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
228
257
|
allowSignIn?: boolean | undefined;
|
|
229
258
|
allowConnectedAccounts?: boolean | undefined;
|
|
230
259
|
}> | undefined;
|
|
231
260
|
}, never> & {
|
|
232
261
|
providers?: Record<string, {
|
|
233
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
262
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
234
263
|
clientId?: string | undefined;
|
|
235
264
|
clientSecret?: string | undefined;
|
|
236
265
|
allowSignIn?: boolean | undefined;
|
|
@@ -241,8 +270,20 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
241
270
|
}> | undefined;
|
|
242
271
|
}) | undefined;
|
|
243
272
|
}) | undefined;
|
|
244
|
-
emails: Omit<{
|
|
245
|
-
theme?:
|
|
273
|
+
emails: Omit<{
|
|
274
|
+
theme?: string | undefined;
|
|
275
|
+
themeList?: Record<string, {
|
|
276
|
+
displayName: string;
|
|
277
|
+
tsxSource: string;
|
|
278
|
+
}> | undefined;
|
|
279
|
+
templateList?: Record<string, {
|
|
280
|
+
description: string;
|
|
281
|
+
displayName: string;
|
|
282
|
+
tsxSource: string;
|
|
283
|
+
variables: string[];
|
|
284
|
+
subject: string;
|
|
285
|
+
}> | undefined;
|
|
286
|
+
}, never> & {
|
|
246
287
|
server: {
|
|
247
288
|
host?: string | undefined;
|
|
248
289
|
port?: number | undefined;
|
|
@@ -326,7 +367,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
326
367
|
providers: undefined;
|
|
327
368
|
};
|
|
328
369
|
};
|
|
329
|
-
emails: {
|
|
370
|
+
emails: {
|
|
371
|
+
theme: undefined;
|
|
372
|
+
themeList: undefined;
|
|
373
|
+
templateList: undefined;
|
|
374
|
+
};
|
|
330
375
|
};
|
|
331
376
|
auth: {
|
|
332
377
|
sourceOfTruth: undefined;
|
|
@@ -370,7 +415,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
370
415
|
providers: undefined;
|
|
371
416
|
};
|
|
372
417
|
};
|
|
373
|
-
emails: {
|
|
418
|
+
emails: {
|
|
419
|
+
theme: undefined;
|
|
420
|
+
themeList: undefined;
|
|
421
|
+
templateList: undefined;
|
|
422
|
+
};
|
|
374
423
|
};
|
|
375
424
|
emails: {
|
|
376
425
|
sourceOfTruth: undefined;
|
|
@@ -414,7 +463,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
414
463
|
providers: undefined;
|
|
415
464
|
};
|
|
416
465
|
};
|
|
417
|
-
emails: {
|
|
466
|
+
emails: {
|
|
467
|
+
theme: undefined;
|
|
468
|
+
themeList: undefined;
|
|
469
|
+
templateList: undefined;
|
|
470
|
+
};
|
|
418
471
|
};
|
|
419
472
|
}, "">;
|
|
420
473
|
declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
@@ -465,7 +518,7 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
465
518
|
oauth?: {
|
|
466
519
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
467
520
|
providers?: Record<string, {
|
|
468
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
521
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
469
522
|
allowSignIn?: boolean | undefined;
|
|
470
523
|
allowConnectedAccounts?: boolean | undefined;
|
|
471
524
|
}> | undefined;
|
|
@@ -474,13 +527,13 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
474
527
|
oauth?: (Omit<{
|
|
475
528
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
476
529
|
providers?: Record<string, {
|
|
477
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
530
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
478
531
|
allowSignIn?: boolean | undefined;
|
|
479
532
|
allowConnectedAccounts?: boolean | undefined;
|
|
480
533
|
}> | undefined;
|
|
481
534
|
}, never> & {
|
|
482
535
|
providers?: Record<string, {
|
|
483
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
536
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
484
537
|
clientId?: string | undefined;
|
|
485
538
|
clientSecret?: string | undefined;
|
|
486
539
|
allowSignIn?: boolean | undefined;
|
|
@@ -491,8 +544,20 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
491
544
|
}> | undefined;
|
|
492
545
|
}) | undefined;
|
|
493
546
|
}) | undefined;
|
|
494
|
-
emails: Omit<{
|
|
495
|
-
theme?:
|
|
547
|
+
emails: Omit<{
|
|
548
|
+
theme?: string | undefined;
|
|
549
|
+
themeList?: Record<string, {
|
|
550
|
+
displayName: string;
|
|
551
|
+
tsxSource: string;
|
|
552
|
+
}> | undefined;
|
|
553
|
+
templateList?: Record<string, {
|
|
554
|
+
description: string;
|
|
555
|
+
displayName: string;
|
|
556
|
+
tsxSource: string;
|
|
557
|
+
variables: string[];
|
|
558
|
+
subject: string;
|
|
559
|
+
}> | undefined;
|
|
560
|
+
}, never> & {
|
|
496
561
|
server: {
|
|
497
562
|
host?: string | undefined;
|
|
498
563
|
port?: number | undefined;
|
|
@@ -568,7 +633,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
568
633
|
providers: undefined;
|
|
569
634
|
};
|
|
570
635
|
};
|
|
571
|
-
emails: {
|
|
636
|
+
emails: {
|
|
637
|
+
theme: undefined;
|
|
638
|
+
themeList: undefined;
|
|
639
|
+
templateList: undefined;
|
|
640
|
+
};
|
|
572
641
|
};
|
|
573
642
|
auth: {
|
|
574
643
|
sourceOfTruth: undefined;
|
|
@@ -612,7 +681,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
612
681
|
providers: undefined;
|
|
613
682
|
};
|
|
614
683
|
};
|
|
615
|
-
emails: {
|
|
684
|
+
emails: {
|
|
685
|
+
theme: undefined;
|
|
686
|
+
themeList: undefined;
|
|
687
|
+
templateList: undefined;
|
|
688
|
+
};
|
|
616
689
|
};
|
|
617
690
|
emails: {
|
|
618
691
|
sourceOfTruth: undefined;
|
|
@@ -656,7 +729,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
656
729
|
providers: undefined;
|
|
657
730
|
};
|
|
658
731
|
};
|
|
659
|
-
emails: {
|
|
732
|
+
emails: {
|
|
733
|
+
theme: undefined;
|
|
734
|
+
themeList: undefined;
|
|
735
|
+
templateList: undefined;
|
|
736
|
+
};
|
|
660
737
|
};
|
|
661
738
|
}, "">;
|
|
662
739
|
declare const projectConfigDefaults: {
|
|
@@ -718,7 +795,26 @@ declare const organizationConfigDefaults: {
|
|
|
718
795
|
server: {
|
|
719
796
|
isShared: true;
|
|
720
797
|
};
|
|
721
|
-
theme:
|
|
798
|
+
theme: string;
|
|
799
|
+
themeList: {
|
|
800
|
+
"1df07ae6-abf3-4a40-83a5-a1a2cbe336ac": {
|
|
801
|
+
displayName: string;
|
|
802
|
+
tsxSource: string;
|
|
803
|
+
};
|
|
804
|
+
"a0172b5d-cff0-463b-83bb-85124697373a": {
|
|
805
|
+
displayName: string;
|
|
806
|
+
tsxSource: string;
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
templateList: {
|
|
810
|
+
"e7d009ce-8d47-4528-b245-5bf119f2ffa3": {
|
|
811
|
+
displayName: string;
|
|
812
|
+
description: string;
|
|
813
|
+
variables: string[];
|
|
814
|
+
subject: string;
|
|
815
|
+
tsxSource: string;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
722
818
|
};
|
|
723
819
|
};
|
|
724
820
|
type DeepReplaceAllowFunctionsForObjects<T> = T extends object ? {
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -63,13 +63,26 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
63
63
|
oauth?: {
|
|
64
64
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
65
65
|
providers?: Record<string, {
|
|
66
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
66
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
67
67
|
allowSignIn?: boolean | undefined;
|
|
68
68
|
allowConnectedAccounts?: boolean | undefined;
|
|
69
69
|
}> | undefined;
|
|
70
70
|
} | undefined;
|
|
71
71
|
} | undefined;
|
|
72
|
-
emails: {
|
|
72
|
+
emails: {
|
|
73
|
+
theme?: string | undefined;
|
|
74
|
+
themeList?: Record<string, {
|
|
75
|
+
displayName: string;
|
|
76
|
+
tsxSource: string;
|
|
77
|
+
}> | undefined;
|
|
78
|
+
templateList?: Record<string, {
|
|
79
|
+
description: string;
|
|
80
|
+
displayName: string;
|
|
81
|
+
tsxSource: string;
|
|
82
|
+
variables: string[];
|
|
83
|
+
subject: string;
|
|
84
|
+
}> | undefined;
|
|
85
|
+
};
|
|
73
86
|
}, yup.AnyObject, {
|
|
74
87
|
sourceOfTruth: undefined;
|
|
75
88
|
rbac: {
|
|
@@ -112,7 +125,11 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
112
125
|
providers: undefined;
|
|
113
126
|
};
|
|
114
127
|
};
|
|
115
|
-
emails: {
|
|
128
|
+
emails: {
|
|
129
|
+
theme: undefined;
|
|
130
|
+
themeList: undefined;
|
|
131
|
+
templateList: undefined;
|
|
132
|
+
};
|
|
116
133
|
}, "">;
|
|
117
134
|
declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
118
135
|
rbac: {
|
|
@@ -162,7 +179,7 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
162
179
|
oauth?: {
|
|
163
180
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
164
181
|
providers?: Record<string, {
|
|
165
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
182
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
166
183
|
allowSignIn?: boolean | undefined;
|
|
167
184
|
allowConnectedAccounts?: boolean | undefined;
|
|
168
185
|
}> | undefined;
|
|
@@ -171,13 +188,13 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
171
188
|
oauth?: (Omit<{
|
|
172
189
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
173
190
|
providers?: Record<string, {
|
|
174
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
191
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
175
192
|
allowSignIn?: boolean | undefined;
|
|
176
193
|
allowConnectedAccounts?: boolean | undefined;
|
|
177
194
|
}> | undefined;
|
|
178
195
|
}, never> & {
|
|
179
196
|
providers?: Record<string, {
|
|
180
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
197
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
181
198
|
clientId?: string | undefined;
|
|
182
199
|
clientSecret?: string | undefined;
|
|
183
200
|
allowSignIn?: boolean | undefined;
|
|
@@ -188,8 +205,20 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
188
205
|
}> | undefined;
|
|
189
206
|
}) | undefined;
|
|
190
207
|
}) | undefined;
|
|
191
|
-
emails: Omit<{
|
|
192
|
-
theme?:
|
|
208
|
+
emails: Omit<{
|
|
209
|
+
theme?: string | undefined;
|
|
210
|
+
themeList?: Record<string, {
|
|
211
|
+
displayName: string;
|
|
212
|
+
tsxSource: string;
|
|
213
|
+
}> | undefined;
|
|
214
|
+
templateList?: Record<string, {
|
|
215
|
+
description: string;
|
|
216
|
+
displayName: string;
|
|
217
|
+
tsxSource: string;
|
|
218
|
+
variables: string[];
|
|
219
|
+
subject: string;
|
|
220
|
+
}> | undefined;
|
|
221
|
+
}, never> & {
|
|
193
222
|
server: {
|
|
194
223
|
host?: string | undefined;
|
|
195
224
|
port?: number | undefined;
|
|
@@ -215,7 +244,7 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
215
244
|
oauth?: {
|
|
216
245
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
217
246
|
providers?: Record<string, {
|
|
218
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
247
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
219
248
|
allowSignIn?: boolean | undefined;
|
|
220
249
|
allowConnectedAccounts?: boolean | undefined;
|
|
221
250
|
}> | undefined;
|
|
@@ -224,13 +253,13 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
224
253
|
oauth?: (Omit<{
|
|
225
254
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
226
255
|
providers?: Record<string, {
|
|
227
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
256
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
228
257
|
allowSignIn?: boolean | undefined;
|
|
229
258
|
allowConnectedAccounts?: boolean | undefined;
|
|
230
259
|
}> | undefined;
|
|
231
260
|
}, never> & {
|
|
232
261
|
providers?: Record<string, {
|
|
233
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
262
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
234
263
|
clientId?: string | undefined;
|
|
235
264
|
clientSecret?: string | undefined;
|
|
236
265
|
allowSignIn?: boolean | undefined;
|
|
@@ -241,8 +270,20 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
241
270
|
}> | undefined;
|
|
242
271
|
}) | undefined;
|
|
243
272
|
}) | undefined;
|
|
244
|
-
emails: Omit<{
|
|
245
|
-
theme?:
|
|
273
|
+
emails: Omit<{
|
|
274
|
+
theme?: string | undefined;
|
|
275
|
+
themeList?: Record<string, {
|
|
276
|
+
displayName: string;
|
|
277
|
+
tsxSource: string;
|
|
278
|
+
}> | undefined;
|
|
279
|
+
templateList?: Record<string, {
|
|
280
|
+
description: string;
|
|
281
|
+
displayName: string;
|
|
282
|
+
tsxSource: string;
|
|
283
|
+
variables: string[];
|
|
284
|
+
subject: string;
|
|
285
|
+
}> | undefined;
|
|
286
|
+
}, never> & {
|
|
246
287
|
server: {
|
|
247
288
|
host?: string | undefined;
|
|
248
289
|
port?: number | undefined;
|
|
@@ -326,7 +367,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
326
367
|
providers: undefined;
|
|
327
368
|
};
|
|
328
369
|
};
|
|
329
|
-
emails: {
|
|
370
|
+
emails: {
|
|
371
|
+
theme: undefined;
|
|
372
|
+
themeList: undefined;
|
|
373
|
+
templateList: undefined;
|
|
374
|
+
};
|
|
330
375
|
};
|
|
331
376
|
auth: {
|
|
332
377
|
sourceOfTruth: undefined;
|
|
@@ -370,7 +415,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
370
415
|
providers: undefined;
|
|
371
416
|
};
|
|
372
417
|
};
|
|
373
|
-
emails: {
|
|
418
|
+
emails: {
|
|
419
|
+
theme: undefined;
|
|
420
|
+
themeList: undefined;
|
|
421
|
+
templateList: undefined;
|
|
422
|
+
};
|
|
374
423
|
};
|
|
375
424
|
emails: {
|
|
376
425
|
sourceOfTruth: undefined;
|
|
@@ -414,7 +463,11 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
414
463
|
providers: undefined;
|
|
415
464
|
};
|
|
416
465
|
};
|
|
417
|
-
emails: {
|
|
466
|
+
emails: {
|
|
467
|
+
theme: undefined;
|
|
468
|
+
themeList: undefined;
|
|
469
|
+
templateList: undefined;
|
|
470
|
+
};
|
|
418
471
|
};
|
|
419
472
|
}, "">;
|
|
420
473
|
declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
@@ -465,7 +518,7 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
465
518
|
oauth?: {
|
|
466
519
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
467
520
|
providers?: Record<string, {
|
|
468
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
521
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
469
522
|
allowSignIn?: boolean | undefined;
|
|
470
523
|
allowConnectedAccounts?: boolean | undefined;
|
|
471
524
|
}> | undefined;
|
|
@@ -474,13 +527,13 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
474
527
|
oauth?: (Omit<{
|
|
475
528
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
476
529
|
providers?: Record<string, {
|
|
477
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
530
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
478
531
|
allowSignIn?: boolean | undefined;
|
|
479
532
|
allowConnectedAccounts?: boolean | undefined;
|
|
480
533
|
}> | undefined;
|
|
481
534
|
}, never> & {
|
|
482
535
|
providers?: Record<string, {
|
|
483
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
536
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
484
537
|
clientId?: string | undefined;
|
|
485
538
|
clientSecret?: string | undefined;
|
|
486
539
|
allowSignIn?: boolean | undefined;
|
|
@@ -491,8 +544,20 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
491
544
|
}> | undefined;
|
|
492
545
|
}) | undefined;
|
|
493
546
|
}) | undefined;
|
|
494
|
-
emails: Omit<{
|
|
495
|
-
theme?:
|
|
547
|
+
emails: Omit<{
|
|
548
|
+
theme?: string | undefined;
|
|
549
|
+
themeList?: Record<string, {
|
|
550
|
+
displayName: string;
|
|
551
|
+
tsxSource: string;
|
|
552
|
+
}> | undefined;
|
|
553
|
+
templateList?: Record<string, {
|
|
554
|
+
description: string;
|
|
555
|
+
displayName: string;
|
|
556
|
+
tsxSource: string;
|
|
557
|
+
variables: string[];
|
|
558
|
+
subject: string;
|
|
559
|
+
}> | undefined;
|
|
560
|
+
}, never> & {
|
|
496
561
|
server: {
|
|
497
562
|
host?: string | undefined;
|
|
498
563
|
port?: number | undefined;
|
|
@@ -568,7 +633,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
568
633
|
providers: undefined;
|
|
569
634
|
};
|
|
570
635
|
};
|
|
571
|
-
emails: {
|
|
636
|
+
emails: {
|
|
637
|
+
theme: undefined;
|
|
638
|
+
themeList: undefined;
|
|
639
|
+
templateList: undefined;
|
|
640
|
+
};
|
|
572
641
|
};
|
|
573
642
|
auth: {
|
|
574
643
|
sourceOfTruth: undefined;
|
|
@@ -612,7 +681,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
612
681
|
providers: undefined;
|
|
613
682
|
};
|
|
614
683
|
};
|
|
615
|
-
emails: {
|
|
684
|
+
emails: {
|
|
685
|
+
theme: undefined;
|
|
686
|
+
themeList: undefined;
|
|
687
|
+
templateList: undefined;
|
|
688
|
+
};
|
|
616
689
|
};
|
|
617
690
|
emails: {
|
|
618
691
|
sourceOfTruth: undefined;
|
|
@@ -656,7 +729,11 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
656
729
|
providers: undefined;
|
|
657
730
|
};
|
|
658
731
|
};
|
|
659
|
-
emails: {
|
|
732
|
+
emails: {
|
|
733
|
+
theme: undefined;
|
|
734
|
+
themeList: undefined;
|
|
735
|
+
templateList: undefined;
|
|
736
|
+
};
|
|
660
737
|
};
|
|
661
738
|
}, "">;
|
|
662
739
|
declare const projectConfigDefaults: {
|
|
@@ -718,7 +795,26 @@ declare const organizationConfigDefaults: {
|
|
|
718
795
|
server: {
|
|
719
796
|
isShared: true;
|
|
720
797
|
};
|
|
721
|
-
theme:
|
|
798
|
+
theme: string;
|
|
799
|
+
themeList: {
|
|
800
|
+
"1df07ae6-abf3-4a40-83a5-a1a2cbe336ac": {
|
|
801
|
+
displayName: string;
|
|
802
|
+
tsxSource: string;
|
|
803
|
+
};
|
|
804
|
+
"a0172b5d-cff0-463b-83bb-85124697373a": {
|
|
805
|
+
displayName: string;
|
|
806
|
+
tsxSource: string;
|
|
807
|
+
};
|
|
808
|
+
};
|
|
809
|
+
templateList: {
|
|
810
|
+
"e7d009ce-8d47-4528-b245-5bf119f2ffa3": {
|
|
811
|
+
displayName: string;
|
|
812
|
+
description: string;
|
|
813
|
+
variables: string[];
|
|
814
|
+
subject: string;
|
|
815
|
+
tsxSource: string;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
722
818
|
};
|
|
723
819
|
};
|
|
724
820
|
type DeepReplaceAllowFunctionsForObjects<T> = T extends object ? {
|
package/dist/config/schema.js
CHANGED
|
@@ -46,6 +46,7 @@ var schemaFields = __toESM(require("../schema-fields.js"));
|
|
|
46
46
|
var import_schema_fields = require("../schema-fields.js");
|
|
47
47
|
var import_oauth = require("../utils/oauth.js");
|
|
48
48
|
var import_objects = require("../utils/objects.js");
|
|
49
|
+
var import_emails = require("../helpers/emails.js");
|
|
49
50
|
var configLevels = ["project", "branch", "environment", "organization"];
|
|
50
51
|
var permissionRegex = /^\$?[a-z0-9_:]+$/;
|
|
51
52
|
var customPermissionRegex = /^[a-z0-9_:]+$/;
|
|
@@ -133,7 +134,11 @@ var branchConfigSchema = projectConfigSchema.omit(["sourceOfTruth"]).concat((0,
|
|
|
133
134
|
apiKeys: branchApiKeysSchema,
|
|
134
135
|
domains: branchDomain,
|
|
135
136
|
auth: branchAuthSchema,
|
|
136
|
-
emails: (0, import_schema_fields.yupObject)({
|
|
137
|
+
emails: (0, import_schema_fields.yupObject)({
|
|
138
|
+
theme: schemaFields.emailThemeSchema.optional(),
|
|
139
|
+
themeList: schemaFields.emailThemeListSchema.optional(),
|
|
140
|
+
templateList: schemaFields.emailTemplateListSchema.optional()
|
|
141
|
+
})
|
|
137
142
|
}));
|
|
138
143
|
var environmentConfigSchema = branchConfigSchema.concat((0, import_schema_fields.yupObject)({
|
|
139
144
|
auth: branchConfigSchema.getNested("auth").concat((0, import_schema_fields.yupObject)({
|
|
@@ -162,8 +167,7 @@ var environmentConfigSchema = branchConfigSchema.concat((0, import_schema_fields
|
|
|
162
167
|
password: schemaFields.emailPasswordSchema.optional().nonEmpty(),
|
|
163
168
|
senderName: schemaFields.emailSenderNameSchema.optional().nonEmpty(),
|
|
164
169
|
senderEmail: schemaFields.emailSenderEmailSchema.optional().nonEmpty()
|
|
165
|
-
})
|
|
166
|
-
theme: schemaFields.emailThemeSchema.optional()
|
|
170
|
+
})
|
|
167
171
|
}).optional()),
|
|
168
172
|
domains: branchConfigSchema.getNested("domains").concat((0, import_schema_fields.yupObject)({
|
|
169
173
|
trustedDomains: (0, import_schema_fields.yupRecord)(
|
|
@@ -235,7 +239,9 @@ var organizationConfigDefaults = {
|
|
|
235
239
|
server: {
|
|
236
240
|
isShared: true
|
|
237
241
|
},
|
|
238
|
-
theme:
|
|
242
|
+
theme: import_emails.DEFAULT_EMAIL_THEME_ID,
|
|
243
|
+
themeList: import_emails.DEFAULT_EMAIL_THEMES,
|
|
244
|
+
templateList: import_emails.DEFAULT_EMAIL_TEMPLATES
|
|
239
245
|
}
|
|
240
246
|
};
|
|
241
247
|
function applyDefaults(defaults, config) {
|