@@ -29,6 +29,8 @@ import {
29
29
PasswordPolicyConfig ,
30
30
EmailPrivacyConfig ,
31
31
EmailPrivacyAuthConfig ,
32
+ MobileLinksConfig ,
33
+ MobileLinksAuthConfig ,
32
34
} from './auth-config' ;
33
35
import { deepCopy } from '../utils/deep-copy' ;
34
36
@@ -60,6 +62,11 @@ export interface UpdateProjectConfigRequest {
60
62
* The email privacy configuration to update on the project
61
63
*/
62
64
emailPrivacyConfig ?: EmailPrivacyConfig ;
65
+
66
+ /**
67
+ * The mobile links configuration for the project
68
+ */
69
+ mobileLinksConfig ?: MobileLinksConfig ;
63
70
}
64
71
65
72
/**
@@ -71,6 +78,7 @@ export interface ProjectConfigServerResponse {
71
78
recaptchaConfig ?: RecaptchaAuthServerConfig ;
72
79
passwordPolicyConfig ?: PasswordPolicyAuthServerConfig ;
73
80
emailPrivacyConfig ?: EmailPrivacyConfig ;
81
+ mobileLinksConfig ?: MobileLinksConfig ;
74
82
}
75
83
76
84
/**
@@ -82,6 +90,7 @@ export interface ProjectConfigClientRequest {
82
90
recaptchaConfig ?: RecaptchaAuthServerConfig ;
83
91
passwordPolicyConfig ?: PasswordPolicyAuthServerConfig ;
84
92
emailPrivacyConfig ?: EmailPrivacyConfig ;
93
+ mobileLinksConfig ?: MobileLinksConfig ;
85
94
}
86
95
87
96
/**
@@ -128,6 +137,11 @@ export class ProjectConfig {
128
137
*/
129
138
public readonly emailPrivacyConfig ?: EmailPrivacyConfig ;
130
139
140
+ /**
141
+ * The mobile links configuration for the project
142
+ */
143
+ public readonly mobileLinksConfig ?: MobileLinksConfig
144
+
131
145
/**
132
146
* Validates a project config options object. Throws an error on failure.
133
147
*
@@ -146,6 +160,7 @@ export class ProjectConfig {
146
160
recaptchaConfig : true ,
147
161
passwordPolicyConfig : true ,
148
162
emailPrivacyConfig : true ,
163
+ mobileLinksConfig : true ,
149
164
}
150
165
// Check for unsupported top level attributes.
151
166
for ( const key in request ) {
@@ -179,6 +194,11 @@ export class ProjectConfig {
179
194
if ( typeof request . emailPrivacyConfig !== 'undefined' ) {
180
195
EmailPrivacyAuthConfig . validate ( request . emailPrivacyConfig ) ;
181
196
}
197
+
198
+ // Validate Mobile Links Config if provided.
199
+ if ( typeof request . mobileLinksConfig !== 'undefined' ) {
200
+ MobileLinksAuthConfig . validate ( request . mobileLinksConfig ) ;
201
+ }
182
202
}
183
203
184
204
/**
@@ -206,6 +226,9 @@ export class ProjectConfig {
206
226
if ( typeof configOptions . emailPrivacyConfig !== 'undefined' ) {
207
227
request . emailPrivacyConfig = configOptions . emailPrivacyConfig ;
208
228
}
229
+ if ( typeof configOptions . mobileLinksConfig !== 'undefined' ) {
230
+ request . mobileLinksConfig = configOptions . mobileLinksConfig ;
231
+ }
209
232
return request ;
210
233
}
211
234
@@ -234,6 +257,9 @@ export class ProjectConfig {
234
257
if ( typeof response . emailPrivacyConfig !== 'undefined' ) {
235
258
this . emailPrivacyConfig = response . emailPrivacyConfig ;
236
259
}
260
+ if ( typeof response . mobileLinksConfig !== 'undefined' ) {
261
+ this . mobileLinksConfig = response . mobileLinksConfig ;
262
+ }
237
263
}
238
264
/**
239
265
* Returns a JSON-serializable representation of this object.
@@ -248,6 +274,7 @@ export class ProjectConfig {
248
274
recaptchaConfig : deepCopy ( this . recaptchaConfig ) ,
249
275
passwordPolicyConfig : deepCopy ( this . passwordPolicyConfig ) ,
250
276
emailPrivacyConfig : deepCopy ( this . emailPrivacyConfig ) ,
277
+ mobileLinksConfig : deepCopy ( this . mobileLinksConfig ) ,
251
278
} ;
252
279
if ( typeof json . smsRegionConfig === 'undefined' ) {
253
280
delete json . smsRegionConfig ;
@@ -264,6 +291,9 @@ export class ProjectConfig {
264
291
if ( typeof json . emailPrivacyConfig === 'undefined' ) {
265
292
delete json . emailPrivacyConfig ;
266
293
}
294
+ if ( typeof json . mobileLinksConfig === 'undefined' ) {
295
+ delete json . mobileLinksConfig ;
296
+ }
267
297
return json ;
268
298
}
269
299
}
0 commit comments