@stackframe/stack-shared 2.8.22 → 2.8.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +30 -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 +816 -294
- package/dist/config/schema.d.ts +816 -294
- package/dist/config/schema.js +471 -82
- 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 -78
- package/dist/esm/config/schema.js.map +1 -1
- package/dist/esm/helpers/emails.js +185 -0
- package/dist/esm/helpers/emails.js.map +1 -0
- package/dist/esm/interface/admin-interface.js +58 -36
- 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 +34 -1
- package/dist/esm/known-errors.js.map +1 -1
- package/dist/esm/schema-fields.js +112 -24
- 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 +14 -4
- 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/objects.js +2 -0
- package/dist/esm/utils/objects.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/types.js +45 -0
- package/dist/esm/utils/types.js.map +1 -1
- package/dist/helpers/emails.d.mts +50 -0
- package/dist/helpers/emails.d.ts +50 -0
- package/dist/helpers/emails.js +216 -0
- package/dist/helpers/emails.js.map +1 -0
- 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 +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/interface/admin-interface.d.mts +24 -15
- package/dist/interface/admin-interface.d.ts +24 -15
- package/dist/interface/admin-interface.js +58 -36
- package/dist/interface/admin-interface.js.map +1 -1
- package/dist/interface/client-interface.d.mts +25 -1
- package/dist/interface/client-interface.d.ts +25 -1
- package/dist/interface/client-interface.js +41 -0
- package/dist/interface/client-interface.js.map +1 -1
- package/dist/interface/crud/{oauth.d.mts → connected-accounts.d.mts} +1 -0
- package/dist/interface/crud/{oauth.d.ts → connected-accounts.d.ts} +1 -0
- 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/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 +173 -0
- package/dist/interface/crud/oauth-providers.d.ts +173 -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 +1 -0
- package/dist/interface/crud/project-api-keys.d.ts +1 -0
- 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 +16 -12
- package/dist/interface/crud/projects.d.ts +16 -12
- package/dist/interface/crud/projects.js +5 -3
- package/dist/interface/crud/projects.js.map +1 -1
- 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 +46 -1
- package/dist/interface/server-interface.d.ts +46 -1
- package/dist/interface/server-interface.js +51 -0
- package/dist/interface/server-interface.js.map +1 -1
- package/dist/known-errors.d.mts +9 -0
- package/dist/known-errors.d.ts +9 -0
- package/dist/known-errors.js +34 -1
- package/dist/known-errors.js.map +1 -1
- package/dist/schema-fields.d.mts +51 -7
- package/dist/schema-fields.d.ts +51 -7
- package/dist/schema-fields.js +128 -24
- 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 +9 -0
- package/dist/utils/errors.d.ts +9 -0
- package/dist/utils/errors.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 +14 -4
- 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/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/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/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 +1 -1
- package/dist/esm/helpers/email-themes.js +0 -45
- package/dist/esm/helpers/email-themes.js.map +0 -1
- package/dist/esm/interface/crud/oauth.js.map +0 -1
- package/dist/helpers/email-themes.d.mts +0 -13
- package/dist/helpers/email-themes.d.ts +0 -13
- package/dist/helpers/email-themes.js +0 -71
- package/dist/helpers/email-themes.js.map +0 -1
- package/dist/interface/crud/oauth.js.map +0 -1
package/dist/config/schema.d.mts
CHANGED
|
@@ -1,83 +1,107 @@
|
|
|
1
1
|
import * as yup from 'yup';
|
|
2
|
-
import { DeepMerge
|
|
3
|
-
import {
|
|
2
|
+
import { DeepMerge } from '../utils/objects.mjs';
|
|
3
|
+
import { Result } from '../utils/results.mjs';
|
|
4
|
+
import { Expand, IsUnion, CollapseObjectUnion } from '../utils/types.mjs';
|
|
5
|
+
import { Config, NormalizesTo } from './format.mjs';
|
|
6
|
+
import '../utils/strings.mjs';
|
|
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
|
|
66
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
80
|
+
providers: Record<string, {
|
|
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, {
|
|
93
|
+
displayName: string;
|
|
94
|
+
tsxSource: string;
|
|
95
|
+
}>;
|
|
96
|
+
templates: Record<string, {
|
|
97
|
+
themeId?: string | false | undefined;
|
|
75
98
|
displayName: string;
|
|
76
99
|
tsxSource: string;
|
|
77
|
-
}
|
|
100
|
+
}>;
|
|
78
101
|
};
|
|
79
|
-
}, yup.AnyObject, {
|
|
102
|
+
}, yup.AnyObject, Omit<Omit<{
|
|
80
103
|
sourceOfTruth: undefined;
|
|
104
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
81
105
|
rbac: {
|
|
82
106
|
permissions: undefined;
|
|
83
107
|
defaultPermissions: {
|
|
@@ -119,132 +143,121 @@ declare const branchConfigSchema: yup.ObjectSchema<{} & {
|
|
|
119
143
|
};
|
|
120
144
|
};
|
|
121
145
|
emails: {
|
|
122
|
-
|
|
123
|
-
|
|
146
|
+
selectedThemeId: undefined;
|
|
147
|
+
themes: undefined;
|
|
148
|
+
templates: undefined;
|
|
124
149
|
};
|
|
125
150
|
}, "">;
|
|
126
|
-
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
|
+
};
|
|
127
169
|
rbac: {
|
|
128
|
-
permissions
|
|
170
|
+
permissions: Record<string, {
|
|
129
171
|
description?: string | undefined;
|
|
130
172
|
scope?: "team" | "project" | undefined;
|
|
131
173
|
containedPermissionIds?: Record<string, true | undefined> | undefined;
|
|
132
|
-
} | undefined
|
|
133
|
-
defaultPermissions
|
|
134
|
-
teamCreator
|
|
135
|
-
teamMember
|
|
136
|
-
signUp
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
teams: {
|
|
140
|
-
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
141
|
-
allowClientTeamCreation?: boolean | undefined;
|
|
142
|
-
} | undefined;
|
|
143
|
-
users: {
|
|
144
|
-
allowClientUserDeletion?: boolean | undefined;
|
|
145
|
-
} | 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
|
+
};
|
|
146
181
|
apiKeys: {
|
|
147
|
-
enabled
|
|
182
|
+
enabled: {
|
|
148
183
|
user?: boolean | undefined;
|
|
149
184
|
team?: boolean | undefined;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
allowLocalhost?: boolean | undefined;
|
|
154
|
-
}, "trustedDomains"> & {
|
|
155
|
-
trustedDomains?: Record<string, {
|
|
156
|
-
baseUrl?: string | undefined;
|
|
157
|
-
handlerPath?: string | undefined;
|
|
158
|
-
}> | undefined;
|
|
159
|
-
}) | undefined;
|
|
160
|
-
auth: (Omit<{
|
|
161
|
-
password?: {
|
|
162
|
-
allowSignIn?: boolean | undefined;
|
|
163
|
-
} | undefined;
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
auth: {
|
|
164
188
|
allowSignUp?: boolean | undefined;
|
|
165
|
-
|
|
189
|
+
password: {
|
|
166
190
|
allowSignIn?: boolean | undefined;
|
|
167
|
-
}
|
|
168
|
-
|
|
191
|
+
};
|
|
192
|
+
otp: {
|
|
169
193
|
allowSignIn?: boolean | undefined;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
allowSignIn?: boolean | undefined;
|
|
176
|
-
allowConnectedAccounts?: boolean | undefined;
|
|
177
|
-
}> | undefined;
|
|
178
|
-
} | undefined;
|
|
179
|
-
}, "oauth"> & {
|
|
180
|
-
oauth?: (Omit<{
|
|
194
|
+
};
|
|
195
|
+
passkey: {
|
|
196
|
+
allowSignIn?: boolean | undefined;
|
|
197
|
+
};
|
|
198
|
+
oauth: {
|
|
181
199
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
182
|
-
providers
|
|
183
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
200
|
+
providers: Record<string, {
|
|
201
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
184
202
|
allowSignIn?: boolean | undefined;
|
|
185
203
|
allowConnectedAccounts?: boolean | undefined;
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
facebookConfigId?: string | undefined;
|
|
196
|
-
microsoftTenantId?: string | undefined;
|
|
197
|
-
}> | undefined;
|
|
198
|
-
}) | undefined;
|
|
199
|
-
}) | undefined;
|
|
200
|
-
emails: Omit<{
|
|
201
|
-
theme?: string | undefined;
|
|
202
|
-
themeList?: Record<string, {
|
|
204
|
+
}>;
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
users: {
|
|
208
|
+
allowClientUserDeletion?: boolean | undefined;
|
|
209
|
+
};
|
|
210
|
+
emails: {
|
|
211
|
+
selectedThemeId?: string | undefined;
|
|
212
|
+
themes: Record<string, {
|
|
203
213
|
displayName: string;
|
|
204
214
|
tsxSource: string;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
password?: string | undefined;
|
|
212
|
-
isShared?: boolean | undefined;
|
|
213
|
-
senderName?: string | undefined;
|
|
214
|
-
senderEmail?: string | undefined;
|
|
215
|
-
};
|
|
215
|
+
}>;
|
|
216
|
+
templates: Record<string, {
|
|
217
|
+
themeId?: string | false | undefined;
|
|
218
|
+
displayName: string;
|
|
219
|
+
tsxSource: string;
|
|
220
|
+
}>;
|
|
216
221
|
};
|
|
217
|
-
} & {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
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<{
|
|
222
232
|
allowSignUp?: boolean | undefined;
|
|
223
|
-
|
|
233
|
+
password: {
|
|
224
234
|
allowSignIn?: boolean | undefined;
|
|
225
|
-
}
|
|
226
|
-
|
|
235
|
+
};
|
|
236
|
+
otp: {
|
|
227
237
|
allowSignIn?: boolean | undefined;
|
|
228
|
-
}
|
|
229
|
-
|
|
238
|
+
};
|
|
239
|
+
passkey: {
|
|
240
|
+
allowSignIn?: boolean | undefined;
|
|
241
|
+
};
|
|
242
|
+
oauth: {
|
|
230
243
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
231
|
-
providers
|
|
232
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
244
|
+
providers: Record<string, {
|
|
245
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
233
246
|
allowSignIn?: boolean | undefined;
|
|
234
247
|
allowConnectedAccounts?: boolean | undefined;
|
|
235
|
-
}
|
|
236
|
-
}
|
|
248
|
+
}>;
|
|
249
|
+
};
|
|
237
250
|
}, "oauth"> & {
|
|
238
|
-
oauth
|
|
251
|
+
oauth: Omit<{
|
|
239
252
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
240
|
-
providers
|
|
241
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
253
|
+
providers: Record<string, {
|
|
254
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
242
255
|
allowSignIn?: boolean | undefined;
|
|
243
256
|
allowConnectedAccounts?: boolean | undefined;
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
providers
|
|
247
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
257
|
+
}>;
|
|
258
|
+
}, "providers"> & {
|
|
259
|
+
providers: Record<string, {
|
|
260
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
248
261
|
clientId?: string | undefined;
|
|
249
262
|
clientSecret?: string | undefined;
|
|
250
263
|
allowSignIn?: boolean | undefined;
|
|
@@ -252,16 +265,21 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
252
265
|
isShared?: boolean | undefined;
|
|
253
266
|
facebookConfigId?: string | undefined;
|
|
254
267
|
microsoftTenantId?: string | undefined;
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
}
|
|
268
|
+
}>;
|
|
269
|
+
};
|
|
270
|
+
};
|
|
258
271
|
emails: Omit<{
|
|
259
|
-
|
|
260
|
-
|
|
272
|
+
selectedThemeId?: string | undefined;
|
|
273
|
+
themes: Record<string, {
|
|
261
274
|
displayName: string;
|
|
262
275
|
tsxSource: string;
|
|
263
|
-
}
|
|
264
|
-
|
|
276
|
+
}>;
|
|
277
|
+
templates: Record<string, {
|
|
278
|
+
themeId?: string | false | undefined;
|
|
279
|
+
displayName: string;
|
|
280
|
+
tsxSource: string;
|
|
281
|
+
}>;
|
|
282
|
+
}, "server"> & {
|
|
265
283
|
server: {
|
|
266
284
|
host?: string | undefined;
|
|
267
285
|
port?: number | undefined;
|
|
@@ -272,16 +290,9 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
272
290
|
senderEmail?: string | undefined;
|
|
273
291
|
};
|
|
274
292
|
};
|
|
275
|
-
|
|
276
|
-
allowLocalhost?: boolean | undefined;
|
|
277
|
-
}, "trustedDomains"> & {
|
|
278
|
-
trustedDomains?: Record<string, {
|
|
279
|
-
baseUrl?: string | undefined;
|
|
280
|
-
handlerPath?: string | undefined;
|
|
281
|
-
}> | undefined;
|
|
282
|
-
}) | undefined;
|
|
283
|
-
}, yup.AnyObject, {
|
|
293
|
+
}, yup.AnyObject, Omit<NonNullable<Omit<Omit<{
|
|
284
294
|
sourceOfTruth: undefined;
|
|
295
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
285
296
|
rbac: {
|
|
286
297
|
permissions: undefined;
|
|
287
298
|
defaultPermissions: {
|
|
@@ -304,7 +315,33 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
304
315
|
};
|
|
305
316
|
};
|
|
306
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<{
|
|
307
343
|
sourceOfTruth: undefined;
|
|
344
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
308
345
|
rbac: {
|
|
309
346
|
permissions: undefined;
|
|
310
347
|
defaultPermissions: {
|
|
@@ -346,12 +383,66 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
346
383
|
};
|
|
347
384
|
};
|
|
348
385
|
emails: {
|
|
349
|
-
|
|
350
|
-
|
|
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;
|
|
351
441
|
};
|
|
352
442
|
};
|
|
353
|
-
|
|
443
|
+
emails: Omit<NonNullable<Omit<Omit<{
|
|
354
444
|
sourceOfTruth: undefined;
|
|
445
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
355
446
|
rbac: {
|
|
356
447
|
permissions: undefined;
|
|
357
448
|
defaultPermissions: {
|
|
@@ -393,12 +484,24 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
393
484
|
};
|
|
394
485
|
};
|
|
395
486
|
emails: {
|
|
396
|
-
|
|
397
|
-
|
|
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;
|
|
398
500
|
};
|
|
399
501
|
};
|
|
400
|
-
|
|
502
|
+
domains: Omit<NonNullable<Omit<Omit<{
|
|
401
503
|
sourceOfTruth: undefined;
|
|
504
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
402
505
|
rbac: {
|
|
403
506
|
permissions: undefined;
|
|
404
507
|
defaultPermissions: {
|
|
@@ -440,75 +543,124 @@ declare const environmentConfigSchema: yup.ObjectSchema<{
|
|
|
440
543
|
};
|
|
441
544
|
};
|
|
442
545
|
emails: {
|
|
443
|
-
|
|
444
|
-
|
|
546
|
+
selectedThemeId: undefined;
|
|
547
|
+
themes: undefined;
|
|
548
|
+
templates: undefined;
|
|
445
549
|
};
|
|
550
|
+
}>, "trustedDomains"> & {
|
|
551
|
+
trustedDomains: undefined;
|
|
446
552
|
};
|
|
447
553
|
}, "">;
|
|
448
|
-
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
|
+
};
|
|
449
572
|
rbac: {
|
|
450
|
-
permissions
|
|
573
|
+
permissions: Record<string, {
|
|
451
574
|
description?: string | undefined;
|
|
452
575
|
scope?: "team" | "project" | undefined;
|
|
453
576
|
containedPermissionIds?: Record<string, true | undefined> | undefined;
|
|
454
|
-
} | undefined
|
|
455
|
-
defaultPermissions
|
|
456
|
-
teamCreator
|
|
457
|
-
teamMember
|
|
458
|
-
signUp
|
|
459
|
-
}
|
|
460
|
-
}
|
|
461
|
-
teams: {
|
|
462
|
-
createPersonalTeamOnSignUp?: boolean | undefined;
|
|
463
|
-
allowClientTeamCreation?: boolean | undefined;
|
|
464
|
-
} | undefined;
|
|
465
|
-
users: {
|
|
466
|
-
allowClientUserDeletion?: boolean | undefined;
|
|
467
|
-
} | 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
|
+
};
|
|
468
584
|
apiKeys: {
|
|
469
|
-
enabled
|
|
585
|
+
enabled: {
|
|
470
586
|
user?: boolean | undefined;
|
|
471
587
|
team?: boolean | undefined;
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
|
|
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<{
|
|
475
627
|
allowLocalhost?: boolean | undefined;
|
|
476
628
|
}, "trustedDomains"> & {
|
|
477
|
-
trustedDomains
|
|
629
|
+
trustedDomains: Record<string, {
|
|
478
630
|
baseUrl?: string | undefined;
|
|
479
631
|
handlerPath?: string | undefined;
|
|
480
|
-
}
|
|
481
|
-
}
|
|
482
|
-
auth:
|
|
483
|
-
password?: {
|
|
484
|
-
allowSignIn?: boolean | undefined;
|
|
485
|
-
} | undefined;
|
|
632
|
+
}>;
|
|
633
|
+
};
|
|
634
|
+
auth: Omit<{
|
|
486
635
|
allowSignUp?: boolean | undefined;
|
|
487
|
-
|
|
636
|
+
password: {
|
|
488
637
|
allowSignIn?: boolean | undefined;
|
|
489
|
-
}
|
|
490
|
-
|
|
638
|
+
};
|
|
639
|
+
otp: {
|
|
491
640
|
allowSignIn?: boolean | undefined;
|
|
492
|
-
}
|
|
493
|
-
|
|
641
|
+
};
|
|
642
|
+
passkey: {
|
|
643
|
+
allowSignIn?: boolean | undefined;
|
|
644
|
+
};
|
|
645
|
+
oauth: {
|
|
494
646
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
495
|
-
providers
|
|
496
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
647
|
+
providers: Record<string, {
|
|
648
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
497
649
|
allowSignIn?: boolean | undefined;
|
|
498
650
|
allowConnectedAccounts?: boolean | undefined;
|
|
499
|
-
}
|
|
500
|
-
}
|
|
651
|
+
}>;
|
|
652
|
+
};
|
|
501
653
|
}, "oauth"> & {
|
|
502
|
-
oauth
|
|
654
|
+
oauth: Omit<{
|
|
503
655
|
accountMergeStrategy?: "link_method" | "raise_error" | "allow_duplicates" | undefined;
|
|
504
|
-
providers
|
|
505
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
656
|
+
providers: Record<string, {
|
|
657
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
506
658
|
allowSignIn?: boolean | undefined;
|
|
507
659
|
allowConnectedAccounts?: boolean | undefined;
|
|
508
|
-
}
|
|
509
|
-
},
|
|
510
|
-
providers
|
|
511
|
-
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | undefined;
|
|
660
|
+
}>;
|
|
661
|
+
}, "providers"> & {
|
|
662
|
+
providers: Record<string, {
|
|
663
|
+
type?: "google" | "github" | "microsoft" | "spotify" | "facebook" | "discord" | "gitlab" | "bitbucket" | "linkedin" | "apple" | "x" | "twitch" | undefined;
|
|
512
664
|
clientId?: string | undefined;
|
|
513
665
|
clientSecret?: string | undefined;
|
|
514
666
|
allowSignIn?: boolean | undefined;
|
|
@@ -516,16 +668,21 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
516
668
|
isShared?: boolean | undefined;
|
|
517
669
|
facebookConfigId?: string | undefined;
|
|
518
670
|
microsoftTenantId?: string | undefined;
|
|
519
|
-
}
|
|
520
|
-
}
|
|
521
|
-
}
|
|
671
|
+
}>;
|
|
672
|
+
};
|
|
673
|
+
};
|
|
522
674
|
emails: Omit<{
|
|
523
|
-
|
|
524
|
-
|
|
675
|
+
selectedThemeId?: string | undefined;
|
|
676
|
+
themes: Record<string, {
|
|
525
677
|
displayName: string;
|
|
526
678
|
tsxSource: string;
|
|
527
|
-
}
|
|
528
|
-
|
|
679
|
+
}>;
|
|
680
|
+
templates: Record<string, {
|
|
681
|
+
themeId?: string | false | undefined;
|
|
682
|
+
displayName: string;
|
|
683
|
+
tsxSource: string;
|
|
684
|
+
}>;
|
|
685
|
+
}, "server"> & {
|
|
529
686
|
server: {
|
|
530
687
|
host?: string | undefined;
|
|
531
688
|
port?: number | undefined;
|
|
@@ -536,8 +693,9 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
536
693
|
senderEmail?: string | undefined;
|
|
537
694
|
};
|
|
538
695
|
};
|
|
539
|
-
} & {}, yup.AnyObject, {
|
|
696
|
+
}>, never> & {}, yup.AnyObject, Omit<NonNullable<Omit<NonNullable<Omit<Omit<{
|
|
540
697
|
sourceOfTruth: undefined;
|
|
698
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
541
699
|
rbac: {
|
|
542
700
|
permissions: undefined;
|
|
543
701
|
defaultPermissions: {
|
|
@@ -560,7 +718,33 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
560
718
|
};
|
|
561
719
|
};
|
|
562
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<{
|
|
563
746
|
sourceOfTruth: undefined;
|
|
747
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
564
748
|
rbac: {
|
|
565
749
|
permissions: undefined;
|
|
566
750
|
defaultPermissions: {
|
|
@@ -602,12 +786,66 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
602
786
|
};
|
|
603
787
|
};
|
|
604
788
|
emails: {
|
|
605
|
-
|
|
606
|
-
|
|
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;
|
|
607
844
|
};
|
|
608
845
|
};
|
|
609
|
-
|
|
846
|
+
emails: Omit<NonNullable<Omit<Omit<{
|
|
610
847
|
sourceOfTruth: undefined;
|
|
848
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
611
849
|
rbac: {
|
|
612
850
|
permissions: undefined;
|
|
613
851
|
defaultPermissions: {
|
|
@@ -649,12 +887,24 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
649
887
|
};
|
|
650
888
|
};
|
|
651
889
|
emails: {
|
|
652
|
-
|
|
653
|
-
|
|
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;
|
|
654
903
|
};
|
|
655
904
|
};
|
|
656
|
-
|
|
905
|
+
domains: Omit<NonNullable<Omit<Omit<{
|
|
657
906
|
sourceOfTruth: undefined;
|
|
907
|
+
}, string>, "domains" | "teams" | "rbac" | "apiKeys" | "auth" | "users" | "emails"> & {
|
|
658
908
|
rbac: {
|
|
659
909
|
permissions: undefined;
|
|
660
910
|
defaultPermissions: {
|
|
@@ -696,72 +946,97 @@ declare const organizationConfigSchema: yup.ObjectSchema<{
|
|
|
696
946
|
};
|
|
697
947
|
};
|
|
698
948
|
emails: {
|
|
699
|
-
|
|
700
|
-
|
|
949
|
+
selectedThemeId: undefined;
|
|
950
|
+
themes: undefined;
|
|
951
|
+
templates: undefined;
|
|
701
952
|
};
|
|
953
|
+
}>, "trustedDomains"> & {
|
|
954
|
+
trustedDomains: undefined;
|
|
702
955
|
};
|
|
703
|
-
}, "">;
|
|
956
|
+
}>, never> & {}, "">;
|
|
957
|
+
declare function migrateConfigOverride(type: "project" | "branch" | "environment" | "organization", oldUnmigratedConfigOverride: any): any;
|
|
704
958
|
declare const projectConfigDefaults: {
|
|
705
|
-
sourceOfTruth: {
|
|
706
|
-
type: "hosted";
|
|
959
|
+
readonly sourceOfTruth: {
|
|
960
|
+
readonly type: "hosted";
|
|
961
|
+
readonly connectionStrings: undefined;
|
|
962
|
+
readonly connectionString: undefined;
|
|
707
963
|
};
|
|
708
964
|
};
|
|
709
965
|
declare const branchConfigDefaults: {};
|
|
710
966
|
declare const environmentConfigDefaults: {};
|
|
711
967
|
declare const organizationConfigDefaults: {
|
|
712
|
-
rbac: {
|
|
713
|
-
permissions: (key: string) => {
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
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;
|
|
718
978
|
};
|
|
719
979
|
};
|
|
720
|
-
apiKeys: {
|
|
721
|
-
enabled: {
|
|
722
|
-
team: false;
|
|
723
|
-
user: false;
|
|
980
|
+
readonly apiKeys: {
|
|
981
|
+
readonly enabled: {
|
|
982
|
+
readonly team: false;
|
|
983
|
+
readonly user: false;
|
|
724
984
|
};
|
|
725
985
|
};
|
|
726
|
-
teams: {
|
|
727
|
-
createPersonalTeamOnSignUp: false;
|
|
728
|
-
allowClientTeamCreation: false;
|
|
986
|
+
readonly teams: {
|
|
987
|
+
readonly createPersonalTeamOnSignUp: false;
|
|
988
|
+
readonly allowClientTeamCreation: false;
|
|
729
989
|
};
|
|
730
|
-
users: {
|
|
731
|
-
allowClientUserDeletion: false;
|
|
990
|
+
readonly users: {
|
|
991
|
+
readonly allowClientUserDeletion: false;
|
|
732
992
|
};
|
|
733
|
-
domains: {
|
|
734
|
-
allowLocalhost: false;
|
|
735
|
-
trustedDomains: (key: string) => {
|
|
736
|
-
|
|
993
|
+
readonly domains: {
|
|
994
|
+
readonly allowLocalhost: false;
|
|
995
|
+
readonly trustedDomains: (key: string) => {
|
|
996
|
+
readonly baseUrl: undefined;
|
|
997
|
+
readonly handlerPath: "/handler";
|
|
737
998
|
};
|
|
738
999
|
};
|
|
739
|
-
auth: {
|
|
740
|
-
allowSignUp: true;
|
|
741
|
-
password: {
|
|
742
|
-
allowSignIn: false;
|
|
1000
|
+
readonly auth: {
|
|
1001
|
+
readonly allowSignUp: true;
|
|
1002
|
+
readonly password: {
|
|
1003
|
+
readonly allowSignIn: false;
|
|
743
1004
|
};
|
|
744
|
-
otp: {
|
|
745
|
-
allowSignIn: false;
|
|
1005
|
+
readonly otp: {
|
|
1006
|
+
readonly allowSignIn: false;
|
|
746
1007
|
};
|
|
747
|
-
passkey: {
|
|
748
|
-
allowSignIn: false;
|
|
1008
|
+
readonly passkey: {
|
|
1009
|
+
readonly allowSignIn: false;
|
|
749
1010
|
};
|
|
750
|
-
oauth: {
|
|
751
|
-
accountMergeStrategy: "link_method";
|
|
752
|
-
providers: (key: string) => {
|
|
1011
|
+
readonly oauth: {
|
|
1012
|
+
readonly accountMergeStrategy: "link_method";
|
|
1013
|
+
readonly providers: (key: string) => {
|
|
1014
|
+
type: undefined;
|
|
753
1015
|
isShared: true;
|
|
754
1016
|
allowSignIn: false;
|
|
755
1017
|
allowConnectedAccounts: false;
|
|
1018
|
+
clientId: undefined;
|
|
1019
|
+
clientSecret: undefined;
|
|
1020
|
+
facebookConfigId: undefined;
|
|
1021
|
+
microsoftTenantId: undefined;
|
|
756
1022
|
};
|
|
757
1023
|
};
|
|
758
1024
|
};
|
|
759
|
-
emails: {
|
|
760
|
-
server: {
|
|
761
|
-
isShared: true;
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
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
|
+
}) & {
|
|
765
1040
|
"1df07ae6-abf3-4a40-83a5-a1a2cbe336ac": {
|
|
766
1041
|
displayName: string;
|
|
767
1042
|
tsxSource: string;
|
|
@@ -771,39 +1046,286 @@ declare const organizationConfigDefaults: {
|
|
|
771
1046
|
tsxSource: string;
|
|
772
1047
|
};
|
|
773
1048
|
};
|
|
1049
|
+
readonly templates: ((key: string) => {
|
|
1050
|
+
displayName: string;
|
|
1051
|
+
tsxSource: string;
|
|
1052
|
+
themeId: undefined;
|
|
1053
|
+
}) & {
|
|
1054
|
+
"e7d009ce-8d47-4528-b245-5bf119f2ffa3": {
|
|
1055
|
+
displayName: string;
|
|
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;
|
|
1078
|
+
};
|
|
1079
|
+
};
|
|
774
1080
|
};
|
|
775
1081
|
};
|
|
776
|
-
type
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
type
|
|
791
|
-
|
|
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>>;
|
|
792
1306
|
type ProjectConfigOverride = NormalizesTo<ProjectConfigNormalizedOverride>;
|
|
793
1307
|
type BranchConfigOverride = NormalizesTo<BranchConfigNormalizedOverride>;
|
|
794
1308
|
type EnvironmentConfigOverride = NormalizesTo<EnvironmentConfigNormalizedOverride>;
|
|
795
1309
|
type OrganizationConfigOverride = NormalizesTo<OrganizationConfigNormalizedOverride>;
|
|
796
|
-
type ProjectConfigOverrideOverride =
|
|
797
|
-
type BranchConfigOverrideOverride =
|
|
798
|
-
type EnvironmentConfigOverrideOverride =
|
|
799
|
-
type OrganizationConfigOverrideOverride =
|
|
800
|
-
type ProjectIncompleteConfig =
|
|
801
|
-
type BranchIncompleteConfig =
|
|
802
|
-
type EnvironmentIncompleteConfig =
|
|
803
|
-
type OrganizationIncompleteConfig =
|
|
804
|
-
type
|
|
805
|
-
type
|
|
806
|
-
type
|
|
807
|
-
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>>>;
|
|
808
1330
|
|
|
809
|
-
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 };
|