@stackframe/stack-shared 2.8.25 → 2.8.28
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 +18 -0
- package/dist/config/format.d.mts +20 -5
- package/dist/config/format.d.ts +20 -5
- package/dist/config/format.js +39 -14
- package/dist/config/format.js.map +1 -1
- package/dist/config/schema.d.mts +795 -317
- package/dist/config/schema.d.ts +795 -317
- package/dist/config/schema.js +471 -84
- package/dist/config/schema.js.map +1 -1
- package/dist/crud.d.mts +1 -0
- package/dist/crud.d.ts +1 -0
- package/dist/esm/config/format.js +37 -14
- package/dist/esm/config/format.js.map +1 -1
- package/dist/esm/config/schema.js +460 -80
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/helpers/emails.js +164 -34
- package/dist/esm/helpers/emails.js.map +1 -1
- package/dist/esm/interface/admin-interface.js +41 -38
- package/dist/esm/interface/admin-interface.js.map +1 -1
- package/dist/esm/interface/crud/config.js +40 -0
- package/dist/esm/interface/crud/config.js.map +1 -0
- package/dist/esm/interface/server-interface.js +26 -0
- package/dist/esm/interface/server-interface.js.map +1 -1
- package/dist/esm/known-errors.js +24 -1
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.js +92 -27
- package/dist/esm/schema-fields.js.map +1 -1
- package/dist/esm/utils/currencies.js +52 -0
- package/dist/esm/utils/currencies.js.map +1 -0
- package/dist/esm/utils/dates.js +55 -1
- package/dist/esm/utils/dates.js.map +1 -1
- package/dist/esm/utils/errors.js.map +1 -1
- package/dist/esm/utils/esbuild.js +15 -11
- package/dist/esm/utils/esbuild.js.map +1 -1
- package/dist/esm/utils/objects.js +2 -0
- package/dist/esm/utils/objects.js.map +1 -1
- package/dist/esm/utils/promises.js +24 -13
- package/dist/esm/utils/promises.js.map +1 -1
- package/dist/esm/utils/strings.js +4 -0
- package/dist/esm/utils/strings.js.map +1 -1
- package/dist/esm/utils/telemetry.js +39 -0
- package/dist/esm/utils/telemetry.js.map +1 -0
- package/dist/esm/utils/types.js +45 -0
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/helpers/emails.d.mts +32 -6
- package/dist/helpers/emails.d.ts +32 -6
- package/dist/helpers/emails.js +166 -34
- package/dist/helpers/emails.js.map +1 -1
- package/dist/helpers/password.d.mts +1 -0
- package/dist/helpers/password.d.ts +1 -0
- package/dist/helpers/production-mode.d.mts +1 -0
- package/dist/helpers/production-mode.d.ts +1 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/interface/admin-interface.d.mts +13 -14
- package/dist/interface/admin-interface.d.ts +13 -14
- package/dist/interface/admin-interface.js +41 -38
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/client-interface.d.mts +1 -0
- package/dist/interface/client-interface.d.ts +1 -0
- package/dist/interface/crud/config.d.mts +49 -0
- package/dist/interface/crud/config.d.ts +49 -0
- package/dist/interface/crud/config.js +79 -0
- package/dist/interface/crud/config.js.map +1 -0
- package/dist/interface/crud/connected-accounts.d.mts +1 -0
- package/dist/interface/crud/connected-accounts.d.ts +1 -0
- package/dist/interface/crud/contact-channels.d.mts +1 -0
- package/dist/interface/crud/contact-channels.d.ts +1 -0
- package/dist/interface/crud/current-user.d.mts +1 -0
- package/dist/interface/crud/current-user.d.ts +1 -0
- package/dist/interface/crud/email-templates.d.mts +1 -0
- package/dist/interface/crud/email-templates.d.ts +1 -0
- package/dist/interface/crud/emails.d.mts +1 -0
- package/dist/interface/crud/emails.d.ts +1 -0
- package/dist/interface/crud/internal-api-keys.d.mts +1 -0
- package/dist/interface/crud/internal-api-keys.d.ts +1 -0
- package/dist/interface/crud/notification-preferences.d.mts +1 -0
- package/dist/interface/crud/notification-preferences.d.ts +1 -0
- package/dist/interface/crud/oauth-providers.d.mts +5 -4
- package/dist/interface/crud/oauth-providers.d.ts +5 -4
- package/dist/interface/crud/project-api-keys.d.mts +3 -2
- package/dist/interface/crud/project-api-keys.d.ts +3 -2
- package/dist/interface/crud/project-permissions.d.mts +1 -0
- package/dist/interface/crud/project-permissions.d.ts +1 -0
- package/dist/interface/crud/projects.d.mts +8 -7
- package/dist/interface/crud/projects.d.ts +8 -7
- package/dist/interface/crud/sessions.d.mts +1 -0
- package/dist/interface/crud/sessions.d.ts +1 -0
- package/dist/interface/crud/svix-token.d.mts +1 -0
- package/dist/interface/crud/svix-token.d.ts +1 -0
- package/dist/interface/crud/team-invitation-details.d.mts +1 -0
- package/dist/interface/crud/team-invitation-details.d.ts +1 -0
- package/dist/interface/crud/team-invitation.d.mts +1 -0
- package/dist/interface/crud/team-invitation.d.ts +1 -0
- package/dist/interface/crud/team-member-profiles.d.mts +1 -0
- package/dist/interface/crud/team-member-profiles.d.ts +1 -0
- package/dist/interface/crud/team-memberships.d.mts +1 -0
- package/dist/interface/crud/team-memberships.d.ts +1 -0
- package/dist/interface/crud/team-permissions.d.mts +1 -0
- package/dist/interface/crud/team-permissions.d.ts +1 -0
- package/dist/interface/crud/teams.d.mts +1 -0
- package/dist/interface/crud/teams.d.ts +1 -0
- package/dist/interface/crud/users.d.mts +1 -0
- package/dist/interface/crud/users.d.ts +1 -0
- package/dist/interface/server-interface.d.mts +10 -0
- package/dist/interface/server-interface.d.ts +10 -0
- package/dist/interface/server-interface.js +26 -0
- package/dist/interface/server-interface.js.map +1 -1
- package/dist/known-errors.d.mts +6 -0
- package/dist/known-errors.d.ts +6 -0
- package/dist/known-errors.js +24 -1
- package/dist/known-errors.js.map +1 -1
- package/dist/schema-fields.d.mts +39 -8
- package/dist/schema-fields.d.ts +39 -8
- package/dist/schema-fields.js +101 -27
- package/dist/schema-fields.js.map +1 -1
- package/dist/utils/currencies.d.mts +39 -0
- package/dist/utils/currencies.d.ts +39 -0
- package/dist/utils/currencies.js +78 -0
- package/dist/utils/currencies.js.map +1 -0
- package/dist/utils/dates.d.mts +5 -1
- package/dist/utils/dates.d.ts +5 -1
- package/dist/utils/dates.js +58 -2
- package/dist/utils/dates.js.map +1 -1
- package/dist/utils/errors.d.mts +12 -1
- package/dist/utils/errors.d.ts +12 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/esbuild.js +15 -11
- package/dist/utils/esbuild.js.map +1 -1
- package/dist/utils/objects.d.mts +23 -8
- package/dist/utils/objects.d.ts +23 -8
- package/dist/utils/objects.js +2 -0
- package/dist/utils/objects.js.map +1 -1
- package/dist/utils/promises.d.mts +5 -1
- package/dist/utils/promises.d.ts +5 -1
- package/dist/utils/promises.js +24 -12
- package/dist/utils/promises.js.map +1 -1
- package/dist/utils/strings.d.mts +3 -1
- package/dist/utils/strings.d.ts +3 -1
- package/dist/utils/strings.js +5 -0
- package/dist/utils/strings.js.map +1 -1
- package/dist/utils/telemetry.d.mts +13 -0
- package/dist/utils/telemetry.d.ts +13 -0
- package/dist/utils/telemetry.js +66 -0
- package/dist/utils/telemetry.js.map +1 -0
- package/dist/utils/types.d.mts +73 -2
- package/dist/utils/types.d.ts +73 -2
- package/dist/utils/types.js +54 -0
- package/dist/utils/types.js.map +1 -1
- package/package.json +2 -1
package/dist/config/schema.d.ts
CHANGED
|
@@ -1,90 +1,107 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { DeepMerge
|
|
3
|
-
import {
|
|
2
|
+
import { DeepMerge } from '../utils/objects.js';
|
|
3
|
+
import { Result } from '../utils/results.js';
|
|
4
|
+
import { Expand, IsUnion, CollapseObjectUnion } from '../utils/types.js';
|
|
5
|
+
import { Config, NormalizesTo } from './format.js';
|
|
6
|
+
import '../utils/strings.js';
|
|
4
7
|
|
|
5
8
|
declare const configLevels: readonly ["project", "branch", "environment", "organization"];
|
|
6
9
|
type ConfigLevel = typeof configLevels[number];
|
|
10
|
+
declare module "yup" {
|
|
11
|
+
interface CustomSchemaMetadata {
|
|
12
|
+
stackConfigCanNoLongerBeOverridden?: true;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
7
15
|
/**
|
|
8
16
|
* All fields that can be overridden at this level.
|
|
9
17
|
*/
|
|
10
18
|
declare const projectConfigSchema: yup.ObjectSchema<{
|
|
11
19
|
sourceOfTruth: {
|
|
12
|
-
type
|
|
20
|
+
type: "hosted";
|
|
13
21
|
} | {
|
|
14
|
-
type
|
|
22
|
+
type: "neon";
|
|
15
23
|
connectionStrings: Record<string, string>;
|
|
16
24
|
} | {
|
|
17
|
-
type
|
|
25
|
+
type: "postgres";
|
|
18
26
|
connectionString: string;
|
|
19
|
-
}
|
|
27
|
+
};
|
|
20
28
|
}, yup.AnyObject, {
|
|
21
29
|
sourceOfTruth: undefined;
|
|
22
30
|
}, "">;
|
|
23
|
-
declare const branchConfigSchema: yup.
|
|
31
|
+
declare const branchConfigSchema: yup.Schema<Omit<Omit<{
|
|
32
|
+
sourceOfTruth: {
|
|
33
|
+
type: "hosted";
|
|
34
|
+
} | {
|
|
35
|
+
type: "neon";
|
|
36
|
+
connectionStrings: Record<string, string>;
|
|
37
|
+
} | {
|
|
38
|
+
type: "postgres";
|
|
39
|
+
connectionString: string;
|
|
40
|
+
};
|
|
41
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
42
|
+
domains: {
|
|
43
|
+
allowLocalhost?: boolean | undefined;
|
|
44
|
+
};
|
|
45
|
+
teams: {
|
|
46
|
+
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
47
|
+
allowClientTeamCreation?: boolean | undefined;
|
|
48
|
+
};
|
|
24
49
|
rbac: {
|
|
25
|
-
permissions
|
|
50
|
+
permissions: Record<string, {
|
|
26
51
|
description?: string | undefined;
|
|
27
52
|
scope?: "team" | "project" | undefined;
|
|
28
53
|
containedPermissionIds?: Record<string, true | undefined> | undefined;
|
|
29
|
-
} | undefined
|
|
30
|
-
defaultPermissions
|
|
31
|
-
teamCreator
|
|
32
|
-
teamMember
|
|
33
|
-
signUp
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
teams: {
|
|
37
|
-
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
38
|
-
allowClientTeamCreation?: boolean | undefined;
|
|
39
|
-
} | undefined;
|
|
40
|
-
users: {
|
|
41
|
-
allowClientUserDeletion?: boolean | undefined;
|
|
42
|
-
} | undefined;
|
|
54
|
+
} | undefined>;
|
|
55
|
+
defaultPermissions: {
|
|
56
|
+
teamCreator: Record<string, true | undefined>;
|
|
57
|
+
teamMember: Record<string, true | undefined>;
|
|
58
|
+
signUp: Record<string, true | undefined>;
|
|
59
|
+
};
|
|
60
|
+
};
|
|
43
61
|
apiKeys: {
|
|
44
|
-
enabled
|
|
62
|
+
enabled: {
|
|
45
63
|
user?: boolean | undefined;
|
|
46
64
|
team?: boolean | undefined;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
domains: {
|
|
50
|
-
allowLocalhost?: boolean | undefined;
|
|
51
|
-
} | undefined;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
52
67
|
auth: {
|
|
53
|
-
password?: {
|
|
54
|
-
allowSignIn?: boolean | undefined;
|
|
55
|
-
} | undefined;
|
|
56
68
|
allowSignUp?: boolean | undefined;
|
|
57
|
-
|
|
69
|
+
password: {
|
|
58
70
|
allowSignIn?: boolean | undefined;
|
|
59
|
-
}
|
|
60
|
-
|
|
71
|
+
};
|
|
72
|
+
otp: {
|
|
61
73
|
allowSignIn?: boolean | undefined;
|
|
62
|
-
}
|
|
63
|
-
|
|
74
|
+
};
|
|
75
|
+
passkey: {
|
|
76
|
+
allowSignIn?: boolean | undefined;
|
|
77
|
+
};
|
|
78
|
+
oauth: {
|
|
64
79
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
65
|
-
providers
|
|
80
|
+
providers: Record<string, {
|
|
66
81
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
67
82
|
allowSignIn?: boolean | undefined;
|
|
68
83
|
allowConnectedAccounts?: boolean | undefined;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
84
|
+
}>;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
users: {
|
|
88
|
+
allowClientUserDeletion?: boolean | undefined;
|
|
89
|
+
};
|
|
72
90
|
emails: {
|
|
73
|
-
|
|
74
|
-
|
|
91
|
+
selectedThemeId?: string | undefined;
|
|
92
|
+
themes: Record<string, {
|
|
75
93
|
displayName: string;
|
|
76
94
|
tsxSource: string;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
95
|
+
}>;
|
|
96
|
+
templates: Record<string, {
|
|
97
|
+
themeId?: string | false | undefined;
|
|
80
98
|
displayName: string;
|
|
81
99
|
tsxSource: string;
|
|
82
|
-
|
|
83
|
-
subject: string;
|
|
84
|
-
}> | undefined;
|
|
100
|
+
}>;
|
|
85
101
|
};
|
|
86
|
-
}, yup.AnyObject, {
|
|
102
|
+
}, yup.AnyObject, Omit<Omit<{
|
|
87
103
|
sourceOfTruth: undefined;
|
|
104
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
88
105
|
rbac: {
|
|
89
106
|
permissions: undefined;
|
|
90
107
|
defaultPermissions: {
|
|
@@ -126,139 +143,120 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
126
143
|
};
|
|
127
144
|
};
|
|
128
145
|
emails: {
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
146
|
+
selectedThemeId: undefined;
|
|
147
|
+
themes: undefined;
|
|
148
|
+
templates: undefined;
|
|
132
149
|
};
|
|
133
150
|
}, "">;
|
|
134
|
-
declare const environmentConfigSchema: yup.
|
|
151
|
+
declare const environmentConfigSchema: yup.Schema<Omit<NonNullable<Omit<Omit<{
|
|
152
|
+
sourceOfTruth: {
|
|
153
|
+
type: "hosted";
|
|
154
|
+
} | {
|
|
155
|
+
type: "neon";
|
|
156
|
+
connectionStrings: Record<string, string>;
|
|
157
|
+
} | {
|
|
158
|
+
type: "postgres";
|
|
159
|
+
connectionString: string;
|
|
160
|
+
};
|
|
161
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
162
|
+
domains: {
|
|
163
|
+
allowLocalhost?: boolean | undefined;
|
|
164
|
+
};
|
|
165
|
+
teams: {
|
|
166
|
+
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
167
|
+
allowClientTeamCreation?: boolean | undefined;
|
|
168
|
+
};
|
|
135
169
|
rbac: {
|
|
136
|
-
permissions
|
|
170
|
+
permissions: Record<string, {
|
|
137
171
|
description?: string | undefined;
|
|
138
172
|
scope?: "team" | "project" | undefined;
|
|
139
173
|
containedPermissionIds?: Record<string, true | undefined> | undefined;
|
|
140
|
-
} | undefined
|
|
141
|
-
defaultPermissions
|
|
142
|
-
teamCreator
|
|
143
|
-
teamMember
|
|
144
|
-
signUp
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
teams: {
|
|
148
|
-
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
149
|
-
allowClientTeamCreation?: boolean | undefined;
|
|
150
|
-
} | undefined;
|
|
151
|
-
users: {
|
|
152
|
-
allowClientUserDeletion?: boolean | undefined;
|
|
153
|
-
} | undefined;
|
|
174
|
+
} | undefined>;
|
|
175
|
+
defaultPermissions: {
|
|
176
|
+
teamCreator: Record<string, true | undefined>;
|
|
177
|
+
teamMember: Record<string, true | undefined>;
|
|
178
|
+
signUp: Record<string, true | undefined>;
|
|
179
|
+
};
|
|
180
|
+
};
|
|
154
181
|
apiKeys: {
|
|
155
|
-
enabled
|
|
182
|
+
enabled: {
|
|
156
183
|
user?: boolean | undefined;
|
|
157
184
|
team?: boolean | undefined;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
allowLocalhost?: boolean | undefined;
|
|
162
|
-
}, "trustedDomains"> & {
|
|
163
|
-
trustedDomains?: Record<string, {
|
|
164
|
-
baseUrl?: string | undefined;
|
|
165
|
-
handlerPath?: string | undefined;
|
|
166
|
-
}> | undefined;
|
|
167
|
-
}) | undefined;
|
|
168
|
-
auth: (Omit<{
|
|
169
|
-
password?: {
|
|
170
|
-
allowSignIn?: boolean | undefined;
|
|
171
|
-
} | undefined;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
auth: {
|
|
172
188
|
allowSignUp?: boolean | undefined;
|
|
173
|
-
|
|
189
|
+
password: {
|
|
174
190
|
allowSignIn?: boolean | undefined;
|
|
175
|
-
}
|
|
176
|
-
|
|
191
|
+
};
|
|
192
|
+
otp: {
|
|
177
193
|
allowSignIn?: boolean | undefined;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
allowSignIn?: boolean | undefined;
|
|
184
|
-
allowConnectedAccounts?: boolean | undefined;
|
|
185
|
-
}> | undefined;
|
|
186
|
-
} | undefined;
|
|
187
|
-
}, "oauth"> & {
|
|
188
|
-
oauth?: (Omit<{
|
|
194
|
+
};
|
|
195
|
+
passkey: {
|
|
196
|
+
allowSignIn?: boolean | undefined;
|
|
197
|
+
};
|
|
198
|
+
oauth: {
|
|
189
199
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
190
|
-
providers
|
|
200
|
+
providers: Record<string, {
|
|
191
201
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
192
202
|
allowSignIn?: boolean | undefined;
|
|
193
203
|
allowConnectedAccounts?: boolean | undefined;
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
facebookConfigId?: string | undefined;
|
|
204
|
-
microsoftTenantId?: string | undefined;
|
|
205
|
-
}> | undefined;
|
|
206
|
-
}) | undefined;
|
|
207
|
-
}) | undefined;
|
|
208
|
-
emails: Omit<{
|
|
209
|
-
theme?: string | undefined;
|
|
210
|
-
themeList?: Record<string, {
|
|
204
|
+
}>;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
users: {
|
|
208
|
+
allowClientUserDeletion?: boolean | undefined;
|
|
209
|
+
};
|
|
210
|
+
emails: {
|
|
211
|
+
selectedThemeId?: string | undefined;
|
|
212
|
+
themes: Record<string, {
|
|
211
213
|
displayName: string;
|
|
212
214
|
tsxSource: string;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
|
|
215
|
+
}>;
|
|
216
|
+
templates: Record<string, {
|
|
217
|
+
themeId?: string | false | undefined;
|
|
216
218
|
displayName: string;
|
|
217
219
|
tsxSource: string;
|
|
218
|
-
|
|
219
|
-
subject: string;
|
|
220
|
-
}> | undefined;
|
|
221
|
-
}, never> & {
|
|
222
|
-
server: {
|
|
223
|
-
host?: string | undefined;
|
|
224
|
-
port?: number | undefined;
|
|
225
|
-
username?: string | undefined;
|
|
226
|
-
password?: string | undefined;
|
|
227
|
-
isShared?: boolean | undefined;
|
|
228
|
-
senderName?: string | undefined;
|
|
229
|
-
senderEmail?: string | undefined;
|
|
230
|
-
};
|
|
220
|
+
}>;
|
|
231
221
|
};
|
|
232
|
-
} & {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
222
|
+
}>, "domains" | "auth" | "emails"> & {
|
|
223
|
+
domains: Omit<{
|
|
224
|
+
allowLocalhost?: boolean | undefined;
|
|
225
|
+
}, "trustedDomains"> & {
|
|
226
|
+
trustedDomains: Record<string, {
|
|
227
|
+
baseUrl?: string | undefined;
|
|
228
|
+
handlerPath?: string | undefined;
|
|
229
|
+
}>;
|
|
230
|
+
};
|
|
231
|
+
auth: Omit<{
|
|
237
232
|
allowSignUp?: boolean | undefined;
|
|
238
|
-
|
|
233
|
+
password: {
|
|
239
234
|
allowSignIn?: boolean | undefined;
|
|
240
|
-
}
|
|
241
|
-
|
|
235
|
+
};
|
|
236
|
+
otp: {
|
|
242
237
|
allowSignIn?: boolean | undefined;
|
|
243
|
-
}
|
|
244
|
-
|
|
238
|
+
};
|
|
239
|
+
passkey: {
|
|
240
|
+
allowSignIn?: boolean | undefined;
|
|
241
|
+
};
|
|
242
|
+
oauth: {
|
|
245
243
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
246
|
-
providers
|
|
244
|
+
providers: Record<string, {
|
|
247
245
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
248
246
|
allowSignIn?: boolean | undefined;
|
|
249
247
|
allowConnectedAccounts?: boolean | undefined;
|
|
250
|
-
}
|
|
251
|
-
}
|
|
248
|
+
}>;
|
|
249
|
+
};
|
|
252
250
|
}, "oauth"> & {
|
|
253
|
-
oauth
|
|
251
|
+
oauth: Omit<{
|
|
254
252
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
255
|
-
providers
|
|
253
|
+
providers: Record<string, {
|
|
256
254
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
257
255
|
allowSignIn?: boolean | undefined;
|
|
258
256
|
allowConnectedAccounts?: boolean | undefined;
|
|
259
|
-
}
|
|
260
|
-
},
|
|
261
|
-
providers
|
|
257
|
+
}>;
|
|
258
|
+
}, "providers"> & {
|
|
259
|
+
providers: Record<string, {
|
|
262
260
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
263
261
|
clientId?: string | undefined;
|
|
264
262
|
clientSecret?: string | undefined;
|
|
@@ -267,23 +265,21 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
267
265
|
isShared?: boolean | undefined;
|
|
268
266
|
facebookConfigId?: string | undefined;
|
|
269
267
|
microsoftTenantId?: string | undefined;
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|
|
268
|
+
}>;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
273
271
|
emails: Omit<{
|
|
274
|
-
|
|
275
|
-
|
|
272
|
+
selectedThemeId?: string | undefined;
|
|
273
|
+
themes: Record<string, {
|
|
276
274
|
displayName: string;
|
|
277
275
|
tsxSource: string;
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
|
|
276
|
+
}>;
|
|
277
|
+
templates: Record<string, {
|
|
278
|
+
themeId?: string | false | undefined;
|
|
281
279
|
displayName: string;
|
|
282
280
|
tsxSource: string;
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
}> | undefined;
|
|
286
|
-
}, never> & {
|
|
281
|
+
}>;
|
|
282
|
+
}, "server"> & {
|
|
287
283
|
server: {
|
|
288
284
|
host?: string | undefined;
|
|
289
285
|
port?: number | undefined;
|
|
@@ -294,16 +290,9 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
294
290
|
senderEmail?: string | undefined;
|
|
295
291
|
};
|
|
296
292
|
};
|
|
297
|
-
|
|
298
|
-
allowLocalhost?: boolean | undefined;
|
|
299
|
-
}, "trustedDomains"> & {
|
|
300
|
-
trustedDomains?: Record<string, {
|
|
301
|
-
baseUrl?: string | undefined;
|
|
302
|
-
handlerPath?: string | undefined;
|
|
303
|
-
}> | undefined;
|
|
304
|
-
}) | undefined;
|
|
305
|
-
}, yup.AnyObject, {
|
|
293
|
+
}, yup.AnyObject, Omit<NonNullable<Omit<Omit<{
|
|
306
294
|
sourceOfTruth: undefined;
|
|
295
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
307
296
|
rbac: {
|
|
308
297
|
permissions: undefined;
|
|
309
298
|
defaultPermissions: {
|
|
@@ -326,7 +315,33 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
326
315
|
};
|
|
327
316
|
};
|
|
328
317
|
domains: {
|
|
318
|
+
allowLocalhost: undefined;
|
|
319
|
+
};
|
|
320
|
+
auth: {
|
|
321
|
+
allowSignUp: undefined;
|
|
322
|
+
password: {
|
|
323
|
+
allowSignIn: undefined;
|
|
324
|
+
};
|
|
325
|
+
otp: {
|
|
326
|
+
allowSignIn: undefined;
|
|
327
|
+
};
|
|
328
|
+
passkey: {
|
|
329
|
+
allowSignIn: undefined;
|
|
330
|
+
};
|
|
331
|
+
oauth: {
|
|
332
|
+
accountMergeStrategy: undefined;
|
|
333
|
+
providers: undefined;
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
emails: {
|
|
337
|
+
selectedThemeId: undefined;
|
|
338
|
+
themes: undefined;
|
|
339
|
+
templates: undefined;
|
|
340
|
+
};
|
|
341
|
+
}>, "domains" | "auth" | "emails"> & {
|
|
342
|
+
auth: Omit<NonNullable<Omit<Omit<{
|
|
329
343
|
sourceOfTruth: undefined;
|
|
344
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
330
345
|
rbac: {
|
|
331
346
|
permissions: undefined;
|
|
332
347
|
defaultPermissions: {
|
|
@@ -368,13 +383,66 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
368
383
|
};
|
|
369
384
|
};
|
|
370
385
|
emails: {
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
386
|
+
selectedThemeId: undefined;
|
|
387
|
+
themes: undefined;
|
|
388
|
+
templates: undefined;
|
|
389
|
+
};
|
|
390
|
+
}>, "oauth"> & {
|
|
391
|
+
oauth: Omit<NonNullable<Omit<Omit<{
|
|
392
|
+
sourceOfTruth: undefined;
|
|
393
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
394
|
+
rbac: {
|
|
395
|
+
permissions: undefined;
|
|
396
|
+
defaultPermissions: {
|
|
397
|
+
teamCreator: undefined;
|
|
398
|
+
teamMember: undefined;
|
|
399
|
+
signUp: undefined;
|
|
400
|
+
};
|
|
401
|
+
};
|
|
402
|
+
teams: {
|
|
403
|
+
createPersonalTeamOnSignUp: undefined;
|
|
404
|
+
allowClientTeamCreation: undefined;
|
|
405
|
+
};
|
|
406
|
+
users: {
|
|
407
|
+
allowClientUserDeletion: undefined;
|
|
408
|
+
};
|
|
409
|
+
apiKeys: {
|
|
410
|
+
enabled: {
|
|
411
|
+
team: undefined;
|
|
412
|
+
user: undefined;
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
domains: {
|
|
416
|
+
allowLocalhost: undefined;
|
|
417
|
+
};
|
|
418
|
+
auth: {
|
|
419
|
+
allowSignUp: undefined;
|
|
420
|
+
password: {
|
|
421
|
+
allowSignIn: undefined;
|
|
422
|
+
};
|
|
423
|
+
otp: {
|
|
424
|
+
allowSignIn: undefined;
|
|
425
|
+
};
|
|
426
|
+
passkey: {
|
|
427
|
+
allowSignIn: undefined;
|
|
428
|
+
};
|
|
429
|
+
oauth: {
|
|
430
|
+
accountMergeStrategy: undefined;
|
|
431
|
+
providers: undefined;
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
emails: {
|
|
435
|
+
selectedThemeId: undefined;
|
|
436
|
+
themes: undefined;
|
|
437
|
+
templates: undefined;
|
|
438
|
+
};
|
|
439
|
+
}>, "providers"> & {
|
|
440
|
+
providers: undefined;
|
|
374
441
|
};
|
|
375
442
|
};
|
|
376
|
-
|
|
443
|
+
emails: Omit<NonNullable<Omit<Omit<{
|
|
377
444
|
sourceOfTruth: undefined;
|
|
445
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
378
446
|
rbac: {
|
|
379
447
|
permissions: undefined;
|
|
380
448
|
defaultPermissions: {
|
|
@@ -416,13 +484,24 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
416
484
|
};
|
|
417
485
|
};
|
|
418
486
|
emails: {
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
487
|
+
selectedThemeId: undefined;
|
|
488
|
+
themes: undefined;
|
|
489
|
+
templates: undefined;
|
|
490
|
+
};
|
|
491
|
+
}>, "server"> & {
|
|
492
|
+
server: {
|
|
493
|
+
isShared: undefined;
|
|
494
|
+
host: undefined;
|
|
495
|
+
port: undefined;
|
|
496
|
+
username: undefined;
|
|
497
|
+
password: undefined;
|
|
498
|
+
senderName: undefined;
|
|
499
|
+
senderEmail: undefined;
|
|
422
500
|
};
|
|
423
501
|
};
|
|
424
|
-
|
|
502
|
+
domains: Omit<NonNullable<Omit<Omit<{
|
|
425
503
|
sourceOfTruth: undefined;
|
|
504
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
426
505
|
rbac: {
|
|
427
506
|
permissions: undefined;
|
|
428
507
|
defaultPermissions: {
|
|
@@ -464,75 +543,123 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
464
543
|
};
|
|
465
544
|
};
|
|
466
545
|
emails: {
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
546
|
+
selectedThemeId: undefined;
|
|
547
|
+
themes: undefined;
|
|
548
|
+
templates: undefined;
|
|
470
549
|
};
|
|
550
|
+
}>, "trustedDomains"> & {
|
|
551
|
+
trustedDomains: undefined;
|
|
471
552
|
};
|
|
472
553
|
}, "">;
|
|
473
|
-
declare const organizationConfigSchema: yup.
|
|
554
|
+
declare const organizationConfigSchema: yup.Schema<Omit<NonNullable<Omit<NonNullable<Omit<Omit<{
|
|
555
|
+
sourceOfTruth: {
|
|
556
|
+
type: "hosted";
|
|
557
|
+
} | {
|
|
558
|
+
type: "neon";
|
|
559
|
+
connectionStrings: Record<string, string>;
|
|
560
|
+
} | {
|
|
561
|
+
type: "postgres";
|
|
562
|
+
connectionString: string;
|
|
563
|
+
};
|
|
564
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
565
|
+
domains: {
|
|
566
|
+
allowLocalhost?: boolean | undefined;
|
|
567
|
+
};
|
|
568
|
+
teams: {
|
|
569
|
+
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
570
|
+
allowClientTeamCreation?: boolean | undefined;
|
|
571
|
+
};
|
|
474
572
|
rbac: {
|
|
475
|
-
permissions
|
|
573
|
+
permissions: Record<string, {
|
|
476
574
|
description?: string | undefined;
|
|
477
575
|
scope?: "team" | "project" | undefined;
|
|
478
576
|
containedPermissionIds?: Record<string, true | undefined> | undefined;
|
|
479
|
-
} | undefined
|
|
480
|
-
defaultPermissions
|
|
481
|
-
teamCreator
|
|
482
|
-
teamMember
|
|
483
|
-
signUp
|
|
484
|
-
}
|
|
485
|
-
}
|
|
486
|
-
teams: {
|
|
487
|
-
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
488
|
-
allowClientTeamCreation?: boolean | undefined;
|
|
489
|
-
} | undefined;
|
|
490
|
-
users: {
|
|
491
|
-
allowClientUserDeletion?: boolean | undefined;
|
|
492
|
-
} | undefined;
|
|
577
|
+
} | undefined>;
|
|
578
|
+
defaultPermissions: {
|
|
579
|
+
teamCreator: Record<string, true | undefined>;
|
|
580
|
+
teamMember: Record<string, true | undefined>;
|
|
581
|
+
signUp: Record<string, true | undefined>;
|
|
582
|
+
};
|
|
583
|
+
};
|
|
493
584
|
apiKeys: {
|
|
494
|
-
enabled
|
|
585
|
+
enabled: {
|
|
495
586
|
user?: boolean | undefined;
|
|
496
587
|
team?: boolean | undefined;
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
|
|
588
|
+
};
|
|
589
|
+
};
|
|
590
|
+
auth: {
|
|
591
|
+
allowSignUp?: boolean | undefined;
|
|
592
|
+
password: {
|
|
593
|
+
allowSignIn?: boolean | undefined;
|
|
594
|
+
};
|
|
595
|
+
otp: {
|
|
596
|
+
allowSignIn?: boolean | undefined;
|
|
597
|
+
};
|
|
598
|
+
passkey: {
|
|
599
|
+
allowSignIn?: boolean | undefined;
|
|
600
|
+
};
|
|
601
|
+
oauth: {
|
|
602
|
+
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
603
|
+
providers: Record<string, {
|
|
604
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
605
|
+
allowSignIn?: boolean | undefined;
|
|
606
|
+
allowConnectedAccounts?: boolean | undefined;
|
|
607
|
+
}>;
|
|
608
|
+
};
|
|
609
|
+
};
|
|
610
|
+
users: {
|
|
611
|
+
allowClientUserDeletion?: boolean | undefined;
|
|
612
|
+
};
|
|
613
|
+
emails: {
|
|
614
|
+
selectedThemeId?: string | undefined;
|
|
615
|
+
themes: Record<string, {
|
|
616
|
+
displayName: string;
|
|
617
|
+
tsxSource: string;
|
|
618
|
+
}>;
|
|
619
|
+
templates: Record<string, {
|
|
620
|
+
themeId?: string | false | undefined;
|
|
621
|
+
displayName: string;
|
|
622
|
+
tsxSource: string;
|
|
623
|
+
}>;
|
|
624
|
+
};
|
|
625
|
+
}>, "domains" | "auth" | "emails"> & {
|
|
626
|
+
domains: Omit<{
|
|
500
627
|
allowLocalhost?: boolean | undefined;
|
|
501
628
|
}, "trustedDomains"> & {
|
|
502
|
-
trustedDomains
|
|
629
|
+
trustedDomains: Record<string, {
|
|
503
630
|
baseUrl?: string | undefined;
|
|
504
631
|
handlerPath?: string | undefined;
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
auth:
|
|
508
|
-
password?: {
|
|
509
|
-
allowSignIn?: boolean | undefined;
|
|
510
|
-
} | undefined;
|
|
632
|
+
}>;
|
|
633
|
+
};
|
|
634
|
+
auth: Omit<{
|
|
511
635
|
allowSignUp?: boolean | undefined;
|
|
512
|
-
|
|
636
|
+
password: {
|
|
513
637
|
allowSignIn?: boolean | undefined;
|
|
514
|
-
}
|
|
515
|
-
|
|
638
|
+
};
|
|
639
|
+
otp: {
|
|
516
640
|
allowSignIn?: boolean | undefined;
|
|
517
|
-
}
|
|
518
|
-
|
|
641
|
+
};
|
|
642
|
+
passkey: {
|
|
643
|
+
allowSignIn?: boolean | undefined;
|
|
644
|
+
};
|
|
645
|
+
oauth: {
|
|
519
646
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
520
|
-
providers
|
|
647
|
+
providers: Record<string, {
|
|
521
648
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
522
649
|
allowSignIn?: boolean | undefined;
|
|
523
650
|
allowConnectedAccounts?: boolean | undefined;
|
|
524
|
-
}
|
|
525
|
-
}
|
|
651
|
+
}>;
|
|
652
|
+
};
|
|
526
653
|
}, "oauth"> & {
|
|
527
|
-
oauth
|
|
654
|
+
oauth: Omit<{
|
|
528
655
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
529
|
-
providers
|
|
656
|
+
providers: Record<string, {
|
|
530
657
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
531
658
|
allowSignIn?: boolean | undefined;
|
|
532
659
|
allowConnectedAccounts?: boolean | undefined;
|
|
533
|
-
}
|
|
534
|
-
},
|
|
535
|
-
providers
|
|
660
|
+
}>;
|
|
661
|
+
}, "providers"> & {
|
|
662
|
+
providers: Record<string, {
|
|
536
663
|
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
537
664
|
clientId?: string | undefined;
|
|
538
665
|
clientSecret?: string | undefined;
|
|
@@ -541,23 +668,21 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
541
668
|
isShared?: boolean | undefined;
|
|
542
669
|
facebookConfigId?: string | undefined;
|
|
543
670
|
microsoftTenantId?: string | undefined;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
}
|
|
671
|
+
}>;
|
|
672
|
+
};
|
|
673
|
+
};
|
|
547
674
|
emails: Omit<{
|
|
548
|
-
|
|
549
|
-
|
|
675
|
+
selectedThemeId?: string | undefined;
|
|
676
|
+
themes: Record<string, {
|
|
550
677
|
displayName: string;
|
|
551
678
|
tsxSource: string;
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
|
|
679
|
+
}>;
|
|
680
|
+
templates: Record<string, {
|
|
681
|
+
themeId?: string | false | undefined;
|
|
555
682
|
displayName: string;
|
|
556
683
|
tsxSource: string;
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
}> | undefined;
|
|
560
|
-
}, never> & {
|
|
684
|
+
}>;
|
|
685
|
+
}, "server"> & {
|
|
561
686
|
server: {
|
|
562
687
|
host?: string | undefined;
|
|
563
688
|
port?: number | undefined;
|
|
@@ -568,8 +693,9 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
568
693
|
senderEmail?: string | undefined;
|
|
569
694
|
};
|
|
570
695
|
};
|
|
571
|
-
} & {}, yup.AnyObject, {
|
|
696
|
+
}>, never> & {}, yup.AnyObject, Omit<NonNullable<Omit<NonNullable<Omit<Omit<{
|
|
572
697
|
sourceOfTruth: undefined;
|
|
698
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
573
699
|
rbac: {
|
|
574
700
|
permissions: undefined;
|
|
575
701
|
defaultPermissions: {
|
|
@@ -592,7 +718,33 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
592
718
|
};
|
|
593
719
|
};
|
|
594
720
|
domains: {
|
|
721
|
+
allowLocalhost: undefined;
|
|
722
|
+
};
|
|
723
|
+
auth: {
|
|
724
|
+
allowSignUp: undefined;
|
|
725
|
+
password: {
|
|
726
|
+
allowSignIn: undefined;
|
|
727
|
+
};
|
|
728
|
+
otp: {
|
|
729
|
+
allowSignIn: undefined;
|
|
730
|
+
};
|
|
731
|
+
passkey: {
|
|
732
|
+
allowSignIn: undefined;
|
|
733
|
+
};
|
|
734
|
+
oauth: {
|
|
735
|
+
accountMergeStrategy: undefined;
|
|
736
|
+
providers: undefined;
|
|
737
|
+
};
|
|
738
|
+
};
|
|
739
|
+
emails: {
|
|
740
|
+
selectedThemeId: undefined;
|
|
741
|
+
themes: undefined;
|
|
742
|
+
templates: undefined;
|
|
743
|
+
};
|
|
744
|
+
}>, "domains" | "auth" | "emails"> & {
|
|
745
|
+
auth: Omit<NonNullable<Omit<Omit<{
|
|
595
746
|
sourceOfTruth: undefined;
|
|
747
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
596
748
|
rbac: {
|
|
597
749
|
permissions: undefined;
|
|
598
750
|
defaultPermissions: {
|
|
@@ -634,13 +786,66 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
634
786
|
};
|
|
635
787
|
};
|
|
636
788
|
emails: {
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
789
|
+
selectedThemeId: undefined;
|
|
790
|
+
themes: undefined;
|
|
791
|
+
templates: undefined;
|
|
792
|
+
};
|
|
793
|
+
}>, "oauth"> & {
|
|
794
|
+
oauth: Omit<NonNullable<Omit<Omit<{
|
|
795
|
+
sourceOfTruth: undefined;
|
|
796
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
797
|
+
rbac: {
|
|
798
|
+
permissions: undefined;
|
|
799
|
+
defaultPermissions: {
|
|
800
|
+
teamCreator: undefined;
|
|
801
|
+
teamMember: undefined;
|
|
802
|
+
signUp: undefined;
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
teams: {
|
|
806
|
+
createPersonalTeamOnSignUp: undefined;
|
|
807
|
+
allowClientTeamCreation: undefined;
|
|
808
|
+
};
|
|
809
|
+
users: {
|
|
810
|
+
allowClientUserDeletion: undefined;
|
|
811
|
+
};
|
|
812
|
+
apiKeys: {
|
|
813
|
+
enabled: {
|
|
814
|
+
team: undefined;
|
|
815
|
+
user: undefined;
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
domains: {
|
|
819
|
+
allowLocalhost: undefined;
|
|
820
|
+
};
|
|
821
|
+
auth: {
|
|
822
|
+
allowSignUp: undefined;
|
|
823
|
+
password: {
|
|
824
|
+
allowSignIn: undefined;
|
|
825
|
+
};
|
|
826
|
+
otp: {
|
|
827
|
+
allowSignIn: undefined;
|
|
828
|
+
};
|
|
829
|
+
passkey: {
|
|
830
|
+
allowSignIn: undefined;
|
|
831
|
+
};
|
|
832
|
+
oauth: {
|
|
833
|
+
accountMergeStrategy: undefined;
|
|
834
|
+
providers: undefined;
|
|
835
|
+
};
|
|
836
|
+
};
|
|
837
|
+
emails: {
|
|
838
|
+
selectedThemeId: undefined;
|
|
839
|
+
themes: undefined;
|
|
840
|
+
templates: undefined;
|
|
841
|
+
};
|
|
842
|
+
}>, "providers"> & {
|
|
843
|
+
providers: undefined;
|
|
640
844
|
};
|
|
641
845
|
};
|
|
642
|
-
|
|
846
|
+
emails: Omit<NonNullable<Omit<Omit<{
|
|
643
847
|
sourceOfTruth: undefined;
|
|
848
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
644
849
|
rbac: {
|
|
645
850
|
permissions: undefined;
|
|
646
851
|
defaultPermissions: {
|
|
@@ -682,13 +887,24 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
682
887
|
};
|
|
683
888
|
};
|
|
684
889
|
emails: {
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
890
|
+
selectedThemeId: undefined;
|
|
891
|
+
themes: undefined;
|
|
892
|
+
templates: undefined;
|
|
893
|
+
};
|
|
894
|
+
}>, "server"> & {
|
|
895
|
+
server: {
|
|
896
|
+
isShared: undefined;
|
|
897
|
+
host: undefined;
|
|
898
|
+
port: undefined;
|
|
899
|
+
username: undefined;
|
|
900
|
+
password: undefined;
|
|
901
|
+
senderName: undefined;
|
|
902
|
+
senderEmail: undefined;
|
|
688
903
|
};
|
|
689
904
|
};
|
|
690
|
-
|
|
905
|
+
domains: Omit<NonNullable<Omit<Omit<{
|
|
691
906
|
sourceOfTruth: undefined;
|
|
907
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
692
908
|
rbac: {
|
|
693
909
|
permissions: undefined;
|
|
694
910
|
defaultPermissions: {
|
|
@@ -730,73 +946,97 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
730
946
|
};
|
|
731
947
|
};
|
|
732
948
|
emails: {
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
949
|
+
selectedThemeId: undefined;
|
|
950
|
+
themes: undefined;
|
|
951
|
+
templates: undefined;
|
|
736
952
|
};
|
|
953
|
+
}>, "trustedDomains"> & {
|
|
954
|
+
trustedDomains: undefined;
|
|
737
955
|
};
|
|
738
|
-
}, "">;
|
|
956
|
+
}>, never> & {}, "">;
|
|
957
|
+
declare function migrateConfigOverride(type: "project" | "branch" | "environment" | "organization", oldUnmigratedConfigOverride: any): any;
|
|
739
958
|
declare const projectConfigDefaults: {
|
|
740
|
-
sourceOfTruth: {
|
|
741
|
-
type: "hosted";
|
|
959
|
+
readonly sourceOfTruth: {
|
|
960
|
+
readonly type: "hosted";
|
|
961
|
+
readonly connectionStrings: undefined;
|
|
962
|
+
readonly connectionString: undefined;
|
|
742
963
|
};
|
|
743
964
|
};
|
|
744
965
|
declare const branchConfigDefaults: {};
|
|
745
966
|
declare const environmentConfigDefaults: {};
|
|
746
967
|
declare const organizationConfigDefaults: {
|
|
747
|
-
rbac: {
|
|
748
|
-
permissions: (key: string) => {
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
968
|
+
readonly rbac: {
|
|
969
|
+
readonly permissions: (key: string) => {
|
|
970
|
+
containedPermissionIds: (key: string) => undefined;
|
|
971
|
+
description: undefined;
|
|
972
|
+
scope: undefined;
|
|
973
|
+
};
|
|
974
|
+
readonly defaultPermissions: {
|
|
975
|
+
readonly teamCreator: (key: string) => undefined;
|
|
976
|
+
readonly teamMember: (key: string) => undefined;
|
|
977
|
+
readonly signUp: (key: string) => undefined;
|
|
753
978
|
};
|
|
754
979
|
};
|
|
755
|
-
apiKeys: {
|
|
756
|
-
enabled: {
|
|
757
|
-
team: false;
|
|
758
|
-
user: false;
|
|
980
|
+
readonly apiKeys: {
|
|
981
|
+
readonly enabled: {
|
|
982
|
+
readonly team: false;
|
|
983
|
+
readonly user: false;
|
|
759
984
|
};
|
|
760
985
|
};
|
|
761
|
-
teams: {
|
|
762
|
-
createPersonalTeamOnSignUp: false;
|
|
763
|
-
allowClientTeamCreation: false;
|
|
986
|
+
readonly teams: {
|
|
987
|
+
readonly createPersonalTeamOnSignUp: false;
|
|
988
|
+
readonly allowClientTeamCreation: false;
|
|
764
989
|
};
|
|
765
|
-
users: {
|
|
766
|
-
allowClientUserDeletion: false;
|
|
990
|
+
readonly users: {
|
|
991
|
+
readonly allowClientUserDeletion: false;
|
|
767
992
|
};
|
|
768
|
-
domains: {
|
|
769
|
-
allowLocalhost: false;
|
|
770
|
-
trustedDomains: (key: string) => {
|
|
771
|
-
|
|
993
|
+
readonly domains: {
|
|
994
|
+
readonly allowLocalhost: false;
|
|
995
|
+
readonly trustedDomains: (key: string) => {
|
|
996
|
+
readonly baseUrl: undefined;
|
|
997
|
+
readonly handlerPath: "/handler";
|
|
772
998
|
};
|
|
773
999
|
};
|
|
774
|
-
auth: {
|
|
775
|
-
allowSignUp: true;
|
|
776
|
-
password: {
|
|
777
|
-
allowSignIn: false;
|
|
1000
|
+
readonly auth: {
|
|
1001
|
+
readonly allowSignUp: true;
|
|
1002
|
+
readonly password: {
|
|
1003
|
+
readonly allowSignIn: false;
|
|
778
1004
|
};
|
|
779
|
-
otp: {
|
|
780
|
-
allowSignIn: false;
|
|
1005
|
+
readonly otp: {
|
|
1006
|
+
readonly allowSignIn: false;
|
|
781
1007
|
};
|
|
782
|
-
passkey: {
|
|
783
|
-
allowSignIn: false;
|
|
1008
|
+
readonly passkey: {
|
|
1009
|
+
readonly allowSignIn: false;
|
|
784
1010
|
};
|
|
785
|
-
oauth: {
|
|
786
|
-
accountMergeStrategy: "link_method";
|
|
787
|
-
providers: (key: string) => {
|
|
1011
|
+
readonly oauth: {
|
|
1012
|
+
readonly accountMergeStrategy: "link_method";
|
|
1013
|
+
readonly providers: (key: string) => {
|
|
1014
|
+
type: undefined;
|
|
788
1015
|
isShared: true;
|
|
789
1016
|
allowSignIn: false;
|
|
790
1017
|
allowConnectedAccounts: false;
|
|
1018
|
+
clientId: undefined;
|
|
1019
|
+
clientSecret: undefined;
|
|
1020
|
+
facebookConfigId: undefined;
|
|
1021
|
+
microsoftTenantId: undefined;
|
|
791
1022
|
};
|
|
792
1023
|
};
|
|
793
1024
|
};
|
|
794
|
-
emails: {
|
|
795
|
-
server: {
|
|
796
|
-
isShared: true;
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
1025
|
+
readonly emails: {
|
|
1026
|
+
readonly server: {
|
|
1027
|
+
readonly isShared: true;
|
|
1028
|
+
readonly host: undefined;
|
|
1029
|
+
readonly port: undefined;
|
|
1030
|
+
readonly username: undefined;
|
|
1031
|
+
readonly password: undefined;
|
|
1032
|
+
readonly senderName: undefined;
|
|
1033
|
+
readonly senderEmail: undefined;
|
|
1034
|
+
};
|
|
1035
|
+
readonly selectedThemeId: "1df07ae6-abf3-4a40-83a5-a1a2cbe336ac";
|
|
1036
|
+
readonly themes: ((key: string) => {
|
|
1037
|
+
displayName: string;
|
|
1038
|
+
tsxSource: string;
|
|
1039
|
+
}) & {
|
|
800
1040
|
"1df07ae6-abf3-4a40-83a5-a1a2cbe336ac": {
|
|
801
1041
|
displayName: string;
|
|
802
1042
|
tsxSource: string;
|
|
@@ -806,48 +1046,286 @@ declare const organizationConfigDefaults: {
|
|
|
806
1046
|
tsxSource: string;
|
|
807
1047
|
};
|
|
808
1048
|
};
|
|
809
|
-
|
|
1049
|
+
readonly templates: ((key: string) => {
|
|
1050
|
+
displayName: string;
|
|
1051
|
+
tsxSource: string;
|
|
1052
|
+
themeId: undefined;
|
|
1053
|
+
}) & {
|
|
810
1054
|
"e7d009ce-8d47-4528-b245-5bf119f2ffa3": {
|
|
811
1055
|
displayName: string;
|
|
812
|
-
description: string;
|
|
813
|
-
variables: string[];
|
|
814
|
-
subject: string;
|
|
815
1056
|
tsxSource: string;
|
|
1057
|
+
themeId: undefined;
|
|
1058
|
+
};
|
|
1059
|
+
"a70fb3a4-56c1-4e42-af25-49d25603abd0": {
|
|
1060
|
+
displayName: string;
|
|
1061
|
+
tsxSource: string;
|
|
1062
|
+
themeId: undefined;
|
|
1063
|
+
};
|
|
1064
|
+
"822687fe-8d0a-4467-a0d1-416b6e639478": {
|
|
1065
|
+
displayName: string;
|
|
1066
|
+
tsxSource: string;
|
|
1067
|
+
themeId: undefined;
|
|
1068
|
+
};
|
|
1069
|
+
"e84de395-2076-4831-9c19-8e9a96a868e4": {
|
|
1070
|
+
displayName: string;
|
|
1071
|
+
tsxSource: string;
|
|
1072
|
+
themeId: undefined;
|
|
1073
|
+
};
|
|
1074
|
+
"066dd73c-36da-4fd0-b6d6-ebf87683f8bc": {
|
|
1075
|
+
displayName: string;
|
|
1076
|
+
tsxSource: string;
|
|
1077
|
+
themeId: undefined;
|
|
816
1078
|
};
|
|
817
1079
|
};
|
|
818
1080
|
};
|
|
819
1081
|
};
|
|
820
|
-
type
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
type
|
|
835
|
-
|
|
1082
|
+
type ReplaceFunctionsWithObjects<T> = T & (T extends (arg: infer K extends string) => infer R ? Record<K, R> & object : unknown);
|
|
1083
|
+
type DeepReplaceFunctionsWithObjects<T> = T extends object ? {
|
|
1084
|
+
[K in keyof ReplaceFunctionsWithObjects<T>]: DeepReplaceFunctionsWithObjects<ReplaceFunctionsWithObjects<T>[K]>;
|
|
1085
|
+
} : T;
|
|
1086
|
+
type ApplyDefaults<D extends object | ((key: string) => unknown), C extends object> = {} extends D ? C : DeepMerge<DeepReplaceFunctionsWithObjects<D>, C>;
|
|
1087
|
+
declare function applyProjectDefaults<T extends ProjectRenderedConfigBeforeDefaults>(config: T): DeepMerge<{
|
|
1088
|
+
readonly sourceOfTruth: {
|
|
1089
|
+
readonly type: "hosted";
|
|
1090
|
+
readonly connectionStrings: undefined;
|
|
1091
|
+
readonly connectionString: undefined;
|
|
1092
|
+
};
|
|
1093
|
+
}, T>;
|
|
1094
|
+
declare function applyBranchDefaults<T extends BranchRenderedConfigBeforeDefaults>(config: T): DeepMerge<{
|
|
1095
|
+
readonly sourceOfTruth: {
|
|
1096
|
+
readonly type: "hosted";
|
|
1097
|
+
readonly connectionStrings: undefined;
|
|
1098
|
+
readonly connectionString: undefined;
|
|
1099
|
+
};
|
|
1100
|
+
}, T>;
|
|
1101
|
+
declare function applyEnvironmentDefaults<T extends EnvironmentRenderedConfigBeforeDefaults>(config: T): ApplyDefaults<typeof environmentConfigDefaults, ApplyDefaults<typeof branchConfigDefaults, ApplyDefaults<typeof projectConfigDefaults, T>>>;
|
|
1102
|
+
declare function applyOrganizationDefaults(config: OrganizationRenderedConfigBeforeDefaults): ApplyDefaults<typeof organizationConfigDefaults, ApplyDefaults<typeof environmentConfigDefaults, ApplyDefaults<typeof branchConfigDefaults, ApplyDefaults<typeof projectConfigDefaults, OrganizationRenderedConfigBeforeDefaults>>>>;
|
|
1103
|
+
declare function sanitizeProjectConfig<T extends ProjectRenderedConfigBeforeSanitization>(config: T): Promise<T & {
|
|
1104
|
+
sourceOfTruth: {
|
|
1105
|
+
readonly type: "neon";
|
|
1106
|
+
readonly connectionStrings: {
|
|
1107
|
+
readonly [x: string]: string;
|
|
1108
|
+
};
|
|
1109
|
+
readonly connectionString?: undefined;
|
|
1110
|
+
} | {
|
|
1111
|
+
readonly type: "postgres";
|
|
1112
|
+
readonly connectionString: string;
|
|
1113
|
+
readonly connectionStrings?: undefined;
|
|
1114
|
+
} | {
|
|
1115
|
+
readonly type: "hosted";
|
|
1116
|
+
readonly connectionStrings?: undefined;
|
|
1117
|
+
readonly connectionString?: undefined;
|
|
1118
|
+
};
|
|
1119
|
+
}>;
|
|
1120
|
+
declare function sanitizeBranchConfig<T extends BranchRenderedConfigBeforeSanitization>(config: T): Promise<T & {
|
|
1121
|
+
sourceOfTruth: {
|
|
1122
|
+
readonly type: "neon";
|
|
1123
|
+
readonly connectionStrings: {
|
|
1124
|
+
readonly [x: string]: string;
|
|
1125
|
+
};
|
|
1126
|
+
readonly connectionString?: undefined;
|
|
1127
|
+
} | {
|
|
1128
|
+
readonly type: "postgres";
|
|
1129
|
+
readonly connectionString: string;
|
|
1130
|
+
readonly connectionStrings?: undefined;
|
|
1131
|
+
} | {
|
|
1132
|
+
readonly type: "hosted";
|
|
1133
|
+
readonly connectionStrings?: undefined;
|
|
1134
|
+
readonly connectionString?: undefined;
|
|
1135
|
+
};
|
|
1136
|
+
}>;
|
|
1137
|
+
declare function sanitizeEnvironmentConfig<T extends EnvironmentRenderedConfigBeforeSanitization>(config: T): Promise<T & {
|
|
1138
|
+
sourceOfTruth: {
|
|
1139
|
+
readonly type: "neon";
|
|
1140
|
+
readonly connectionStrings: {
|
|
1141
|
+
readonly [x: string]: string;
|
|
1142
|
+
};
|
|
1143
|
+
readonly connectionString?: undefined;
|
|
1144
|
+
} | {
|
|
1145
|
+
readonly type: "postgres";
|
|
1146
|
+
readonly connectionString: string;
|
|
1147
|
+
readonly connectionStrings?: undefined;
|
|
1148
|
+
} | {
|
|
1149
|
+
readonly type: "hosted";
|
|
1150
|
+
readonly connectionStrings?: undefined;
|
|
1151
|
+
readonly connectionString?: undefined;
|
|
1152
|
+
};
|
|
1153
|
+
}>;
|
|
1154
|
+
declare function sanitizeOrganizationConfig(config: OrganizationRenderedConfigBeforeSanitization): Promise<{
|
|
1155
|
+
emails: {
|
|
1156
|
+
selectedThemeId: string;
|
|
1157
|
+
themes: {
|
|
1158
|
+
[x: string]: {
|
|
1159
|
+
displayName: string;
|
|
1160
|
+
tsxSource: string;
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
templates: {
|
|
1164
|
+
[x: string]: {
|
|
1165
|
+
displayName: string;
|
|
1166
|
+
tsxSource: string;
|
|
1167
|
+
themeId: string | false | undefined;
|
|
1168
|
+
};
|
|
1169
|
+
};
|
|
1170
|
+
server: {
|
|
1171
|
+
host: string | undefined;
|
|
1172
|
+
port: number | undefined;
|
|
1173
|
+
username: string | undefined;
|
|
1174
|
+
password: string | undefined;
|
|
1175
|
+
isShared: boolean;
|
|
1176
|
+
senderName: string | undefined;
|
|
1177
|
+
senderEmail: string | undefined;
|
|
1178
|
+
};
|
|
1179
|
+
};
|
|
1180
|
+
sourceOfTruth: {
|
|
1181
|
+
type: "hosted" | "neon" | "postgres";
|
|
1182
|
+
connectionStrings: {
|
|
1183
|
+
[x: string]: string | undefined;
|
|
1184
|
+
} | undefined;
|
|
1185
|
+
connectionString: string | undefined;
|
|
1186
|
+
} & ({
|
|
1187
|
+
readonly type: "neon";
|
|
1188
|
+
readonly connectionStrings: {
|
|
1189
|
+
readonly [x: string]: string;
|
|
1190
|
+
};
|
|
1191
|
+
readonly connectionString?: undefined;
|
|
1192
|
+
} | {
|
|
1193
|
+
readonly type: "postgres";
|
|
1194
|
+
readonly connectionString: string;
|
|
1195
|
+
readonly connectionStrings?: undefined;
|
|
1196
|
+
} | {
|
|
1197
|
+
readonly type: "hosted";
|
|
1198
|
+
readonly connectionStrings?: undefined;
|
|
1199
|
+
readonly connectionString?: undefined;
|
|
1200
|
+
});
|
|
1201
|
+
domains: {
|
|
1202
|
+
allowLocalhost: boolean;
|
|
1203
|
+
trustedDomains: {
|
|
1204
|
+
[x: string]: {
|
|
1205
|
+
baseUrl: string | undefined;
|
|
1206
|
+
handlerPath: string;
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
1209
|
+
};
|
|
1210
|
+
teams: {
|
|
1211
|
+
createPersonalTeamOnSignUp: boolean;
|
|
1212
|
+
allowClientTeamCreation: boolean;
|
|
1213
|
+
};
|
|
1214
|
+
rbac: {
|
|
1215
|
+
permissions: {
|
|
1216
|
+
[x: string]: {
|
|
1217
|
+
description: string | undefined;
|
|
1218
|
+
scope: "team" | "project" | undefined;
|
|
1219
|
+
containedPermissionIds: {
|
|
1220
|
+
[x: string]: true | undefined;
|
|
1221
|
+
};
|
|
1222
|
+
};
|
|
1223
|
+
};
|
|
1224
|
+
defaultPermissions: {
|
|
1225
|
+
teamCreator: {
|
|
1226
|
+
[x: string]: true | undefined;
|
|
1227
|
+
};
|
|
1228
|
+
teamMember: {
|
|
1229
|
+
[x: string]: true | undefined;
|
|
1230
|
+
};
|
|
1231
|
+
signUp: {
|
|
1232
|
+
[x: string]: true | undefined;
|
|
1233
|
+
};
|
|
1234
|
+
};
|
|
1235
|
+
};
|
|
1236
|
+
apiKeys: {
|
|
1237
|
+
enabled: {
|
|
1238
|
+
user: boolean;
|
|
1239
|
+
team: boolean;
|
|
1240
|
+
};
|
|
1241
|
+
};
|
|
1242
|
+
auth: {
|
|
1243
|
+
password: {
|
|
1244
|
+
allowSignIn: boolean;
|
|
1245
|
+
};
|
|
1246
|
+
allowSignUp: boolean;
|
|
1247
|
+
otp: {
|
|
1248
|
+
allowSignIn: boolean;
|
|
1249
|
+
};
|
|
1250
|
+
passkey: {
|
|
1251
|
+
allowSignIn: boolean;
|
|
1252
|
+
};
|
|
1253
|
+
oauth: {
|
|
1254
|
+
accountMergeStrategy: "link_method" | "raise_error" | "allow_duplicates";
|
|
1255
|
+
providers: {
|
|
1256
|
+
[x: string]: {
|
|
1257
|
+
type: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
1258
|
+
clientId: string | undefined;
|
|
1259
|
+
clientSecret: string | undefined;
|
|
1260
|
+
allowSignIn: boolean;
|
|
1261
|
+
allowConnectedAccounts: boolean;
|
|
1262
|
+
isShared: boolean;
|
|
1263
|
+
facebookConfigId: string | undefined;
|
|
1264
|
+
microsoftTenantId: string | undefined;
|
|
1265
|
+
};
|
|
1266
|
+
};
|
|
1267
|
+
};
|
|
1268
|
+
};
|
|
1269
|
+
users: {
|
|
1270
|
+
allowClientUserDeletion: boolean;
|
|
1271
|
+
};
|
|
1272
|
+
}>;
|
|
1273
|
+
/**
|
|
1274
|
+
* Does not require a base config, and hence solely relies on the override itself to validate the config. If it returns
|
|
1275
|
+
* no error, you know that the
|
|
1276
|
+
*
|
|
1277
|
+
* It's crucial that our DB never contains any configs that are not valid according to this function, as this would mean
|
|
1278
|
+
* that the config object does not satisfy the ValidatedToHaveNoConfigOverrideErrors type (which is used as an assumption
|
|
1279
|
+
* in a whole bunch of places in the code).
|
|
1280
|
+
*/
|
|
1281
|
+
declare function getConfigOverrideErrors<T extends yup.AnySchema>(schema: T, configOverride: unknown, options?: {
|
|
1282
|
+
allowPropertiesThatCanNoLongerBeOverridden?: boolean;
|
|
1283
|
+
}): Promise<Result<null, string>>;
|
|
1284
|
+
declare function assertNoConfigOverrideErrors<T extends yup.AnySchema>(schema: T, config: unknown, options?: {
|
|
1285
|
+
allowPropertiesThatCanNoLongerBeOverridden?: boolean;
|
|
1286
|
+
extraInfo?: any;
|
|
1287
|
+
}): Promise<void>;
|
|
1288
|
+
type _ValidatedToHaveNoConfigOverrideErrorsImpl<T> = IsUnion<T & object> extends true ? _ValidatedToHaveNoConfigOverrideErrorsImpl<CollapseObjectUnion<T & object> | Exclude<T, object>> : T extends object ? (T extends any[] ? T : {
|
|
1289
|
+
[K in keyof T]+?: _ValidatedToHaveNoConfigOverrideErrorsImpl<T[K]>;
|
|
1290
|
+
}) : T;
|
|
1291
|
+
type ValidatedToHaveNoConfigOverrideErrors<T extends yup.AnySchema> = _ValidatedToHaveNoConfigOverrideErrorsImpl<yup.InferType<T>>;
|
|
1292
|
+
/**
|
|
1293
|
+
* Checks whether there are any warnings in the incomplete config. A warning doesn't stop the config from being valid,
|
|
1294
|
+
* but may require action regardless.
|
|
1295
|
+
*
|
|
1296
|
+
* The DB can contain configs that are not valid according to this function, as long as they are valid according to
|
|
1297
|
+
* the getConfigOverrideErrors function. (This is necessary, because a changing base config may make an override invalid
|
|
1298
|
+
* that was previously valid.)
|
|
1299
|
+
*/
|
|
1300
|
+
declare function getIncompleteConfigWarnings<T extends yup.AnySchema>(schema: T, incompleteConfig: Config): Promise<Result<null, string>>;
|
|
1301
|
+
type ValidatedToHaveNoIncompleteConfigWarnings<T extends yup.AnySchema> = yup.InferType<T>;
|
|
1302
|
+
type ProjectConfigNormalizedOverride = Expand<ValidatedToHaveNoConfigOverrideErrors<typeof projectConfigSchema>>;
|
|
1303
|
+
type BranchConfigNormalizedOverride = Expand<ValidatedToHaveNoConfigOverrideErrors<typeof branchConfigSchema>>;
|
|
1304
|
+
type EnvironmentConfigNormalizedOverride = Expand<ValidatedToHaveNoConfigOverrideErrors<typeof environmentConfigSchema>>;
|
|
1305
|
+
type OrganizationConfigNormalizedOverride = Expand<ValidatedToHaveNoConfigOverrideErrors<typeof organizationConfigSchema>>;
|
|
836
1306
|
type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
|
|
837
1307
|
type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
|
|
838
1308
|
type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
|
|
839
1309
|
type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
|
|
840
|
-
type ProjectConfigOverrideOverride =
|
|
841
|
-
type BranchConfigOverrideOverride =
|
|
842
|
-
type EnvironmentConfigOverrideOverride =
|
|
843
|
-
type OrganizationConfigOverrideOverride =
|
|
844
|
-
type ProjectIncompleteConfig =
|
|
845
|
-
type BranchIncompleteConfig =
|
|
846
|
-
type EnvironmentIncompleteConfig =
|
|
847
|
-
type OrganizationIncompleteConfig =
|
|
848
|
-
type
|
|
849
|
-
type
|
|
850
|
-
type
|
|
851
|
-
type
|
|
1310
|
+
type ProjectConfigOverrideOverride = ProjectConfigOverride;
|
|
1311
|
+
type BranchConfigOverrideOverride = BranchConfigOverride;
|
|
1312
|
+
type EnvironmentConfigOverrideOverride = EnvironmentConfigOverride;
|
|
1313
|
+
type OrganizationConfigOverrideOverride = OrganizationConfigOverride;
|
|
1314
|
+
type ProjectIncompleteConfig = Expand<ProjectConfigNormalizedOverride>;
|
|
1315
|
+
type BranchIncompleteConfig = Expand<ProjectIncompleteConfig & BranchConfigNormalizedOverride>;
|
|
1316
|
+
type EnvironmentIncompleteConfig = Expand<BranchIncompleteConfig & EnvironmentConfigNormalizedOverride>;
|
|
1317
|
+
type OrganizationIncompleteConfig = Expand<EnvironmentIncompleteConfig & OrganizationConfigNormalizedOverride>;
|
|
1318
|
+
type ProjectRenderedConfigBeforeDefaults = Omit<ProjectIncompleteConfig, keyof BranchConfigNormalizedOverride | keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
|
|
1319
|
+
type BranchRenderedConfigBeforeDefaults = Omit<BranchIncompleteConfig, keyof EnvironmentConfigNormalizedOverride | keyof OrganizationConfigNormalizedOverride>;
|
|
1320
|
+
type EnvironmentRenderedConfigBeforeDefaults = Omit<EnvironmentIncompleteConfig, keyof OrganizationConfigNormalizedOverride>;
|
|
1321
|
+
type OrganizationRenderedConfigBeforeDefaults = OrganizationIncompleteConfig;
|
|
1322
|
+
type ProjectRenderedConfigBeforeSanitization = Expand<Awaited<ReturnType<typeof applyProjectDefaults<ProjectRenderedConfigBeforeDefaults>>>>;
|
|
1323
|
+
type BranchRenderedConfigBeforeSanitization = Expand<Awaited<ReturnType<typeof applyBranchDefaults<BranchRenderedConfigBeforeDefaults>>>>;
|
|
1324
|
+
type EnvironmentRenderedConfigBeforeSanitization = Expand<Awaited<ReturnType<typeof applyEnvironmentDefaults<EnvironmentRenderedConfigBeforeDefaults>>>>;
|
|
1325
|
+
type OrganizationRenderedConfigBeforeSanitization = Expand<Awaited<ReturnType<typeof applyOrganizationDefaults>>>;
|
|
1326
|
+
type ProjectRenderedConfig = Expand<Awaited<ReturnType<typeof sanitizeProjectConfig<ProjectRenderedConfigBeforeSanitization>>>>;
|
|
1327
|
+
type BranchRenderedConfig = Expand<Awaited<ReturnType<typeof sanitizeBranchConfig<BranchRenderedConfigBeforeSanitization>>>>;
|
|
1328
|
+
type EnvironmentRenderedConfig = Expand<Awaited<ReturnType<typeof sanitizeEnvironmentConfig<EnvironmentRenderedConfigBeforeSanitization>>>>;
|
|
1329
|
+
type OrganizationRenderedConfig = Expand<Awaited<ReturnType<typeof sanitizeOrganizationConfig>>>;
|
|
852
1330
|
|
|
853
|
-
export { type
|
|
1331
|
+
export { type BranchConfigOverride, type BranchConfigOverrideOverride, type BranchIncompleteConfig, type BranchRenderedConfig, type ConfigLevel, type EnvironmentConfigOverride, type EnvironmentConfigOverrideOverride, type EnvironmentIncompleteConfig, type EnvironmentRenderedConfig, type OrganizationConfigOverride, type OrganizationConfigOverrideOverride, type OrganizationIncompleteConfig, type OrganizationRenderedConfig, type ProjectConfigOverride, type ProjectConfigOverrideOverride, type ProjectIncompleteConfig, type ProjectRenderedConfig, type ValidatedToHaveNoConfigOverrideErrors, type ValidatedToHaveNoIncompleteConfigWarnings, applyBranchDefaults, applyEnvironmentDefaults, applyOrganizationDefaults, applyProjectDefaults, assertNoConfigOverrideErrors, branchConfigSchema, configLevels, environmentConfigSchema, getConfigOverrideErrors, getIncompleteConfigWarnings, migrateConfigOverride, organizationConfigSchema, projectConfigSchema, sanitizeBranchConfig, sanitizeEnvironmentConfig, sanitizeOrganizationConfig, sanitizeProjectConfig };
|