@magmamath/frontend-config 1.0.22 → 1.0.23-rc.1
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/dist/index.d.mts +82 -85
- package/dist/index.d.ts +82 -85
- package/dist/index.js +407 -429
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +408 -425
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -4
package/dist/index.d.mts
CHANGED
|
@@ -88,7 +88,6 @@ declare enum LoginSource {
|
|
|
88
88
|
MY_LOGIN = 9
|
|
89
89
|
}
|
|
90
90
|
declare enum SSO {
|
|
91
|
-
APPLE = "APPLE",
|
|
92
91
|
GOOGLE = "GOOGLE",
|
|
93
92
|
MICROSOFT = "MICROSOFT",
|
|
94
93
|
CLEVER = "CLEVER",
|
|
@@ -104,11 +103,6 @@ declare enum ApiRegion {
|
|
|
104
103
|
MAIN = "MAIN",
|
|
105
104
|
CANADA = "CANADA"
|
|
106
105
|
}
|
|
107
|
-
declare enum QRCodeSize {
|
|
108
|
-
DEFAULT = "default",
|
|
109
|
-
MEDIUM = "medium",
|
|
110
|
-
LARGE = "large"
|
|
111
|
-
}
|
|
112
106
|
|
|
113
107
|
declare enum MatrixMode {
|
|
114
108
|
SKILL = "SKILL",
|
|
@@ -119,73 +113,6 @@ type IconProps = {
|
|
|
119
113
|
size?: number;
|
|
120
114
|
};
|
|
121
115
|
|
|
122
|
-
type SSOConfig<E> = Readonly<{
|
|
123
|
-
name: string;
|
|
124
|
-
icon: ComponentType<IconProps>;
|
|
125
|
-
type: SSO;
|
|
126
|
-
loginSource: LoginSource;
|
|
127
|
-
ownUrl?: boolean;
|
|
128
|
-
getUrl: (envs: E) => string;
|
|
129
|
-
}>;
|
|
130
|
-
|
|
131
|
-
type RegionSpecificVars = {
|
|
132
|
-
API_URL: string;
|
|
133
|
-
AUTH_WEB_URL: string;
|
|
134
|
-
CDN_HOST: string;
|
|
135
|
-
DISTRICT_WEB_URL: string;
|
|
136
|
-
LOGGLY_TAG: string;
|
|
137
|
-
MAGMAMATH_URL: string;
|
|
138
|
-
SOCKET_URL: string;
|
|
139
|
-
STUDENTS_WEB_URL: string;
|
|
140
|
-
TEACHERS_WEB_URL: string;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
type StudentsWebCommon = {
|
|
144
|
-
GOOGLE_API_KEY: string;
|
|
145
|
-
DESMOS_API_KEY: string;
|
|
146
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
147
|
-
MYSCRIPT_APPLICATION_KEY: string;
|
|
148
|
-
MYSCRIPT_HMAC_KEY: string;
|
|
149
|
-
MYSCRIPT_HOST: string;
|
|
150
|
-
MYSCRIPT_SOCKET_KEY: string;
|
|
151
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
152
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
153
|
-
};
|
|
154
|
-
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
155
|
-
type StudentsWebVarsPreset = {
|
|
156
|
-
[key in Locale]: {
|
|
157
|
-
[key in Environment]: StudentsWebVars;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
type TeachersWebCommon = {
|
|
162
|
-
MYSCRIPT_HOST: string;
|
|
163
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
164
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
165
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
166
|
-
INTERCOM_APP_ID: string;
|
|
167
|
-
CLARITY_PROJECT_ID: string;
|
|
168
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
169
|
-
};
|
|
170
|
-
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
171
|
-
type TeachersWebVarsPreset = {
|
|
172
|
-
[key in Locale]: {
|
|
173
|
-
[key in Environment]: TeachersWebVars;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
type DistrictCommon = {
|
|
178
|
-
INTERCOM_APP_ID: string;
|
|
179
|
-
CLARITY_PROJECT_ID: string;
|
|
180
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
181
|
-
};
|
|
182
|
-
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
183
|
-
type DistrictWebVarsPreset = {
|
|
184
|
-
[key in Locale]: {
|
|
185
|
-
[key in Environment]: DistrictDashboardVars;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
|
|
189
116
|
type SSO_UK = {
|
|
190
117
|
GOOGLE_AUTH: string;
|
|
191
118
|
MICROSOFT_AUTH: string;
|
|
@@ -223,6 +150,18 @@ type Prettify<T> = T extends Function ? T : {
|
|
|
223
150
|
[K in keyof T]: T[K];
|
|
224
151
|
};
|
|
225
152
|
|
|
153
|
+
type RegionSpecificVars = {
|
|
154
|
+
API_URL: string;
|
|
155
|
+
AUTH_WEB_URL: string;
|
|
156
|
+
CDN_HOST: string;
|
|
157
|
+
DISTRICT_WEB_URL: string;
|
|
158
|
+
LOGGLY_TAG: string;
|
|
159
|
+
MAGMAMATH_URL: string;
|
|
160
|
+
SOCKET_URL: string;
|
|
161
|
+
STUDENTS_WEB_URL: string;
|
|
162
|
+
TEACHERS_WEB_URL: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
226
165
|
type AuthWebVars<T extends SSOVariant> = Prettify<AuthWebBaseVars & T>;
|
|
227
166
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
228
167
|
TOS_URL: string;
|
|
@@ -250,6 +189,61 @@ type AuthWebVarsPreset = {
|
|
|
250
189
|
};
|
|
251
190
|
};
|
|
252
191
|
|
|
192
|
+
type SSOConfig<T extends SSOVariant> = Readonly<{
|
|
193
|
+
name: string;
|
|
194
|
+
icon: ComponentType<IconProps>;
|
|
195
|
+
type: SSO;
|
|
196
|
+
loginSource: LoginSource;
|
|
197
|
+
getUrl: (envs: AuthWebVars<T>) => string;
|
|
198
|
+
ownUrl?: boolean;
|
|
199
|
+
}>;
|
|
200
|
+
|
|
201
|
+
type StudentsWebCommon = {
|
|
202
|
+
GOOGLE_API_KEY: string;
|
|
203
|
+
DESMOS_API_KEY: string;
|
|
204
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
205
|
+
MYSCRIPT_APPLICATION_KEY: string;
|
|
206
|
+
MYSCRIPT_HMAC_KEY: string;
|
|
207
|
+
MYSCRIPT_HOST: string;
|
|
208
|
+
MYSCRIPT_SOCKET_KEY: string;
|
|
209
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
210
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
211
|
+
};
|
|
212
|
+
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
213
|
+
type StudentsWebVarsPreset = {
|
|
214
|
+
[key in Locale]: {
|
|
215
|
+
[key in Environment]: StudentsWebVars;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
type TeachersWebCommon = {
|
|
220
|
+
MYSCRIPT_HOST: string;
|
|
221
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
222
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
223
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
224
|
+
INTERCOM_APP_ID: string;
|
|
225
|
+
CLARITY_PROJECT_ID: string;
|
|
226
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
227
|
+
};
|
|
228
|
+
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
229
|
+
type TeachersWebVarsPreset = {
|
|
230
|
+
[key in Locale]: {
|
|
231
|
+
[key in Environment]: TeachersWebVars;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
type DistrictCommon = {
|
|
236
|
+
INTERCOM_APP_ID: string;
|
|
237
|
+
CLARITY_PROJECT_ID: string;
|
|
238
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
239
|
+
};
|
|
240
|
+
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
241
|
+
type DistrictWebVarsPreset = {
|
|
242
|
+
[key in Locale]: {
|
|
243
|
+
[key in Environment]: DistrictDashboardVars;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
|
|
253
247
|
type MobileCommon = {
|
|
254
248
|
DESMOS_API_KEY: string;
|
|
255
249
|
USER_AGENT: string;
|
|
@@ -260,13 +254,9 @@ type MobileCommon = {
|
|
|
260
254
|
MYSCRIPT_SOCKET_KEY: string;
|
|
261
255
|
MYSCRIPT_REST_APP_KEY: string;
|
|
262
256
|
MYSCRIPT_REST_HMAC_KEY: string;
|
|
263
|
-
GOOGLE_API_KEY: string;
|
|
264
|
-
GOOGLE_TEXT_TO_SPEECH_URL: string;
|
|
265
|
-
GOOGLE_TRANSLATE_URL: string;
|
|
266
257
|
};
|
|
267
258
|
type MobileBaseVars = {
|
|
268
259
|
TEACHERS_WEB_URL: string;
|
|
269
|
-
AUTH_WEB_URL: string;
|
|
270
260
|
API_URL: string;
|
|
271
261
|
CDN_HOST: string;
|
|
272
262
|
SOCKET_URL: string;
|
|
@@ -438,18 +428,18 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
438
428
|
};
|
|
439
429
|
};
|
|
440
430
|
|
|
441
|
-
type
|
|
431
|
+
type AuthWebLocaleConfig<T extends SSOVariant> = {
|
|
442
432
|
path: string;
|
|
443
433
|
shortCode: string;
|
|
444
434
|
icon: ComponentType<IconProps>;
|
|
445
435
|
sources: {
|
|
446
436
|
signUp: {
|
|
447
|
-
list: SSOConfig<
|
|
437
|
+
list: SSOConfig<T>[];
|
|
448
438
|
};
|
|
449
439
|
signIn: {
|
|
450
440
|
withOnboarding: boolean;
|
|
451
|
-
|
|
452
|
-
list: SSOConfig<
|
|
441
|
+
largeQRCode: boolean;
|
|
442
|
+
list: SSOConfig<T>[];
|
|
453
443
|
};
|
|
454
444
|
};
|
|
455
445
|
isPrimaryRegion: boolean;
|
|
@@ -485,13 +475,13 @@ type LocalePreset = {
|
|
|
485
475
|
[key in Locale]: DistrictLocaleConfig;
|
|
486
476
|
};
|
|
487
477
|
[Platform.AUTH_WEB]: {
|
|
488
|
-
[key in Locale]:
|
|
478
|
+
[key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
|
|
489
479
|
};
|
|
490
480
|
[Platform.WEB_ADMIN]: {
|
|
491
481
|
[key in Locale]: WebAdminLocaleConfig;
|
|
492
482
|
};
|
|
493
483
|
[Platform.MOBILE]: {
|
|
494
|
-
[key in Locale]:
|
|
484
|
+
[key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
|
|
495
485
|
};
|
|
496
486
|
};
|
|
497
487
|
type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
|
|
@@ -529,9 +519,16 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
529
519
|
readonly onEnvsChange: (cb: (cfg: EnvironmentVars<P>) => void) => effector.Subscription;
|
|
530
520
|
readonly onLocaleChange: (cb: (cfg: LocaleConfig<P, L>) => void) => effector.Subscription;
|
|
531
521
|
readonly getPresets: () => {
|
|
532
|
-
envPreset:
|
|
522
|
+
envPreset: Readonly<{
|
|
523
|
+
STUDENTS: StudentsWebVarsPreset;
|
|
524
|
+
TEACHERS: TeachersWebVarsPreset;
|
|
525
|
+
DISTRICT: DistrictWebVarsPreset;
|
|
526
|
+
AUTH_WEB: AuthWebVarsPreset;
|
|
527
|
+
WEB_ADMIN: WebAdminVarsPreset;
|
|
528
|
+
MOBILE: MobileVarsPreset;
|
|
529
|
+
}>;
|
|
533
530
|
localePreset: LocalePreset;
|
|
534
531
|
};
|
|
535
532
|
}
|
|
536
533
|
|
|
537
|
-
export { ApiRegion, AppConfigManager,
|
|
534
|
+
export { ApiRegion, AppConfigManager, DateFormat, DateLocale, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, SSO, type SSOConfig, Source, buildTargetToEnvironment };
|
package/dist/index.d.ts
CHANGED
|
@@ -88,7 +88,6 @@ declare enum LoginSource {
|
|
|
88
88
|
MY_LOGIN = 9
|
|
89
89
|
}
|
|
90
90
|
declare enum SSO {
|
|
91
|
-
APPLE = "APPLE",
|
|
92
91
|
GOOGLE = "GOOGLE",
|
|
93
92
|
MICROSOFT = "MICROSOFT",
|
|
94
93
|
CLEVER = "CLEVER",
|
|
@@ -104,11 +103,6 @@ declare enum ApiRegion {
|
|
|
104
103
|
MAIN = "MAIN",
|
|
105
104
|
CANADA = "CANADA"
|
|
106
105
|
}
|
|
107
|
-
declare enum QRCodeSize {
|
|
108
|
-
DEFAULT = "default",
|
|
109
|
-
MEDIUM = "medium",
|
|
110
|
-
LARGE = "large"
|
|
111
|
-
}
|
|
112
106
|
|
|
113
107
|
declare enum MatrixMode {
|
|
114
108
|
SKILL = "SKILL",
|
|
@@ -119,73 +113,6 @@ type IconProps = {
|
|
|
119
113
|
size?: number;
|
|
120
114
|
};
|
|
121
115
|
|
|
122
|
-
type SSOConfig<E> = Readonly<{
|
|
123
|
-
name: string;
|
|
124
|
-
icon: ComponentType<IconProps>;
|
|
125
|
-
type: SSO;
|
|
126
|
-
loginSource: LoginSource;
|
|
127
|
-
ownUrl?: boolean;
|
|
128
|
-
getUrl: (envs: E) => string;
|
|
129
|
-
}>;
|
|
130
|
-
|
|
131
|
-
type RegionSpecificVars = {
|
|
132
|
-
API_URL: string;
|
|
133
|
-
AUTH_WEB_URL: string;
|
|
134
|
-
CDN_HOST: string;
|
|
135
|
-
DISTRICT_WEB_URL: string;
|
|
136
|
-
LOGGLY_TAG: string;
|
|
137
|
-
MAGMAMATH_URL: string;
|
|
138
|
-
SOCKET_URL: string;
|
|
139
|
-
STUDENTS_WEB_URL: string;
|
|
140
|
-
TEACHERS_WEB_URL: string;
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
type StudentsWebCommon = {
|
|
144
|
-
GOOGLE_API_KEY: string;
|
|
145
|
-
DESMOS_API_KEY: string;
|
|
146
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
147
|
-
MYSCRIPT_APPLICATION_KEY: string;
|
|
148
|
-
MYSCRIPT_HMAC_KEY: string;
|
|
149
|
-
MYSCRIPT_HOST: string;
|
|
150
|
-
MYSCRIPT_SOCKET_KEY: string;
|
|
151
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
152
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
153
|
-
};
|
|
154
|
-
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
155
|
-
type StudentsWebVarsPreset = {
|
|
156
|
-
[key in Locale]: {
|
|
157
|
-
[key in Environment]: StudentsWebVars;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
type TeachersWebCommon = {
|
|
162
|
-
MYSCRIPT_HOST: string;
|
|
163
|
-
MYSCRIPT_REST_APP_KEY: string;
|
|
164
|
-
MYSCRIPT_REST_HMAC_KEY: string;
|
|
165
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
166
|
-
INTERCOM_APP_ID: string;
|
|
167
|
-
CLARITY_PROJECT_ID: string;
|
|
168
|
-
LOGGLY_CUSTOMER_TOKEN: string;
|
|
169
|
-
};
|
|
170
|
-
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
171
|
-
type TeachersWebVarsPreset = {
|
|
172
|
-
[key in Locale]: {
|
|
173
|
-
[key in Environment]: TeachersWebVars;
|
|
174
|
-
};
|
|
175
|
-
};
|
|
176
|
-
|
|
177
|
-
type DistrictCommon = {
|
|
178
|
-
INTERCOM_APP_ID: string;
|
|
179
|
-
CLARITY_PROJECT_ID: string;
|
|
180
|
-
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
181
|
-
};
|
|
182
|
-
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
183
|
-
type DistrictWebVarsPreset = {
|
|
184
|
-
[key in Locale]: {
|
|
185
|
-
[key in Environment]: DistrictDashboardVars;
|
|
186
|
-
};
|
|
187
|
-
};
|
|
188
|
-
|
|
189
116
|
type SSO_UK = {
|
|
190
117
|
GOOGLE_AUTH: string;
|
|
191
118
|
MICROSOFT_AUTH: string;
|
|
@@ -223,6 +150,18 @@ type Prettify<T> = T extends Function ? T : {
|
|
|
223
150
|
[K in keyof T]: T[K];
|
|
224
151
|
};
|
|
225
152
|
|
|
153
|
+
type RegionSpecificVars = {
|
|
154
|
+
API_URL: string;
|
|
155
|
+
AUTH_WEB_URL: string;
|
|
156
|
+
CDN_HOST: string;
|
|
157
|
+
DISTRICT_WEB_URL: string;
|
|
158
|
+
LOGGLY_TAG: string;
|
|
159
|
+
MAGMAMATH_URL: string;
|
|
160
|
+
SOCKET_URL: string;
|
|
161
|
+
STUDENTS_WEB_URL: string;
|
|
162
|
+
TEACHERS_WEB_URL: string;
|
|
163
|
+
};
|
|
164
|
+
|
|
226
165
|
type AuthWebVars<T extends SSOVariant> = Prettify<AuthWebBaseVars & T>;
|
|
227
166
|
type AuthWebBaseVars = Omit<RegionSpecificVars, 'CDN_HOST' | 'LOGGLY_TAG' | 'SOCKET_URL'> & {
|
|
228
167
|
TOS_URL: string;
|
|
@@ -250,6 +189,61 @@ type AuthWebVarsPreset = {
|
|
|
250
189
|
};
|
|
251
190
|
};
|
|
252
191
|
|
|
192
|
+
type SSOConfig<T extends SSOVariant> = Readonly<{
|
|
193
|
+
name: string;
|
|
194
|
+
icon: ComponentType<IconProps>;
|
|
195
|
+
type: SSO;
|
|
196
|
+
loginSource: LoginSource;
|
|
197
|
+
getUrl: (envs: AuthWebVars<T>) => string;
|
|
198
|
+
ownUrl?: boolean;
|
|
199
|
+
}>;
|
|
200
|
+
|
|
201
|
+
type StudentsWebCommon = {
|
|
202
|
+
GOOGLE_API_KEY: string;
|
|
203
|
+
DESMOS_API_KEY: string;
|
|
204
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
205
|
+
MYSCRIPT_APPLICATION_KEY: string;
|
|
206
|
+
MYSCRIPT_HMAC_KEY: string;
|
|
207
|
+
MYSCRIPT_HOST: string;
|
|
208
|
+
MYSCRIPT_SOCKET_KEY: string;
|
|
209
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
210
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
211
|
+
};
|
|
212
|
+
type StudentsWebVars = RegionSpecificVars & StudentsWebCommon;
|
|
213
|
+
type StudentsWebVarsPreset = {
|
|
214
|
+
[key in Locale]: {
|
|
215
|
+
[key in Environment]: StudentsWebVars;
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
|
|
219
|
+
type TeachersWebCommon = {
|
|
220
|
+
MYSCRIPT_HOST: string;
|
|
221
|
+
MYSCRIPT_REST_APP_KEY: string;
|
|
222
|
+
MYSCRIPT_REST_HMAC_KEY: string;
|
|
223
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
224
|
+
INTERCOM_APP_ID: string;
|
|
225
|
+
CLARITY_PROJECT_ID: string;
|
|
226
|
+
LOGGLY_CUSTOMER_TOKEN: string;
|
|
227
|
+
};
|
|
228
|
+
type TeachersWebVars = RegionSpecificVars & TeachersWebCommon;
|
|
229
|
+
type TeachersWebVarsPreset = {
|
|
230
|
+
[key in Locale]: {
|
|
231
|
+
[key in Environment]: TeachersWebVars;
|
|
232
|
+
};
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
type DistrictCommon = {
|
|
236
|
+
INTERCOM_APP_ID: string;
|
|
237
|
+
CLARITY_PROJECT_ID: string;
|
|
238
|
+
PROBLEM_IMAGE_SIZE_LIMIT: number;
|
|
239
|
+
};
|
|
240
|
+
type DistrictDashboardVars = Omit<RegionSpecificVars, 'SOCKET_URL'> & DistrictCommon;
|
|
241
|
+
type DistrictWebVarsPreset = {
|
|
242
|
+
[key in Locale]: {
|
|
243
|
+
[key in Environment]: DistrictDashboardVars;
|
|
244
|
+
};
|
|
245
|
+
};
|
|
246
|
+
|
|
253
247
|
type MobileCommon = {
|
|
254
248
|
DESMOS_API_KEY: string;
|
|
255
249
|
USER_AGENT: string;
|
|
@@ -260,13 +254,9 @@ type MobileCommon = {
|
|
|
260
254
|
MYSCRIPT_SOCKET_KEY: string;
|
|
261
255
|
MYSCRIPT_REST_APP_KEY: string;
|
|
262
256
|
MYSCRIPT_REST_HMAC_KEY: string;
|
|
263
|
-
GOOGLE_API_KEY: string;
|
|
264
|
-
GOOGLE_TEXT_TO_SPEECH_URL: string;
|
|
265
|
-
GOOGLE_TRANSLATE_URL: string;
|
|
266
257
|
};
|
|
267
258
|
type MobileBaseVars = {
|
|
268
259
|
TEACHERS_WEB_URL: string;
|
|
269
|
-
AUTH_WEB_URL: string;
|
|
270
260
|
API_URL: string;
|
|
271
261
|
CDN_HOST: string;
|
|
272
262
|
SOCKET_URL: string;
|
|
@@ -438,18 +428,18 @@ type DistrictLocaleConfig = CommonLocaleConfig & {
|
|
|
438
428
|
};
|
|
439
429
|
};
|
|
440
430
|
|
|
441
|
-
type
|
|
431
|
+
type AuthWebLocaleConfig<T extends SSOVariant> = {
|
|
442
432
|
path: string;
|
|
443
433
|
shortCode: string;
|
|
444
434
|
icon: ComponentType<IconProps>;
|
|
445
435
|
sources: {
|
|
446
436
|
signUp: {
|
|
447
|
-
list: SSOConfig<
|
|
437
|
+
list: SSOConfig<T>[];
|
|
448
438
|
};
|
|
449
439
|
signIn: {
|
|
450
440
|
withOnboarding: boolean;
|
|
451
|
-
|
|
452
|
-
list: SSOConfig<
|
|
441
|
+
largeQRCode: boolean;
|
|
442
|
+
list: SSOConfig<T>[];
|
|
453
443
|
};
|
|
454
444
|
};
|
|
455
445
|
isPrimaryRegion: boolean;
|
|
@@ -485,13 +475,13 @@ type LocalePreset = {
|
|
|
485
475
|
[key in Locale]: DistrictLocaleConfig;
|
|
486
476
|
};
|
|
487
477
|
[Platform.AUTH_WEB]: {
|
|
488
|
-
[key in Locale]:
|
|
478
|
+
[key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
|
|
489
479
|
};
|
|
490
480
|
[Platform.WEB_ADMIN]: {
|
|
491
481
|
[key in Locale]: WebAdminLocaleConfig;
|
|
492
482
|
};
|
|
493
483
|
[Platform.MOBILE]: {
|
|
494
|
-
[key in Locale]:
|
|
484
|
+
[key in Locale]: AuthWebLocaleConfig<SSOByLocale[key]>;
|
|
495
485
|
};
|
|
496
486
|
};
|
|
497
487
|
type LocaleConfig<P extends Platform, L extends Locale> = LocalePreset[P][L];
|
|
@@ -529,9 +519,16 @@ declare class AppConfigManager<P extends Platform, L extends Locale> {
|
|
|
529
519
|
readonly onEnvsChange: (cb: (cfg: EnvironmentVars<P>) => void) => effector.Subscription;
|
|
530
520
|
readonly onLocaleChange: (cb: (cfg: LocaleConfig<P, L>) => void) => effector.Subscription;
|
|
531
521
|
readonly getPresets: () => {
|
|
532
|
-
envPreset:
|
|
522
|
+
envPreset: Readonly<{
|
|
523
|
+
STUDENTS: StudentsWebVarsPreset;
|
|
524
|
+
TEACHERS: TeachersWebVarsPreset;
|
|
525
|
+
DISTRICT: DistrictWebVarsPreset;
|
|
526
|
+
AUTH_WEB: AuthWebVarsPreset;
|
|
527
|
+
WEB_ADMIN: WebAdminVarsPreset;
|
|
528
|
+
MOBILE: MobileVarsPreset;
|
|
529
|
+
}>;
|
|
533
530
|
localePreset: LocalePreset;
|
|
534
531
|
};
|
|
535
532
|
}
|
|
536
533
|
|
|
537
|
-
export { ApiRegion, AppConfigManager,
|
|
534
|
+
export { ApiRegion, AppConfigManager, DateFormat, DateLocale, type EnvPreset, Environment, type EnvironmentVars, Locale, LoginSource, MatrixMode, Platform, PlatformBuildTarget, SSO, type SSOConfig, Source, buildTargetToEnvironment };
|