@@ -29,6 +29,8 @@ import {
2929 PasswordPolicyConfig ,
3030 EmailPrivacyConfig ,
3131 EmailPrivacyAuthConfig ,
32+ MobileLinksConfig ,
33+ MobileLinksAuthConfig ,
3234} from './auth-config' ;
3335import { deepCopy } from '../utils/deep-copy' ;
3436
@@ -60,6 +62,11 @@ export interface UpdateProjectConfigRequest {
6062 * The email privacy configuration to update on the project
6163 */
6264 emailPrivacyConfig ?: EmailPrivacyConfig ;
65+
66+ /**
67+ * The mobile links configuration for the project
68+ */
69+ mobileLinksConfig ?: MobileLinksConfig ;
6370}
6471
6572/**
@@ -71,6 +78,7 @@ export interface ProjectConfigServerResponse {
7178 recaptchaConfig ?: RecaptchaAuthServerConfig ;
7279 passwordPolicyConfig ?: PasswordPolicyAuthServerConfig ;
7380 emailPrivacyConfig ?: EmailPrivacyConfig ;
81+ mobileLinksConfig ?: MobileLinksConfig ;
7482}
7583
7684/**
@@ -82,6 +90,7 @@ export interface ProjectConfigClientRequest {
8290 recaptchaConfig ?: RecaptchaAuthServerConfig ;
8391 passwordPolicyConfig ?: PasswordPolicyAuthServerConfig ;
8492 emailPrivacyConfig ?: EmailPrivacyConfig ;
93+ mobileLinksConfig ?: MobileLinksConfig ;
8594}
8695
8796/**
@@ -128,6 +137,11 @@ export class ProjectConfig {
128137 */
129138 public readonly emailPrivacyConfig ?: EmailPrivacyConfig ;
130139
140+ /**
141+ * The mobile links configuration for the project
142+ */
143+ public readonly mobileLinksConfig ?: MobileLinksConfig
144+
131145 /**
132146 * Validates a project config options object. Throws an error on failure.
133147 *
@@ -146,6 +160,7 @@ export class ProjectConfig {
146160 recaptchaConfig : true ,
147161 passwordPolicyConfig : true ,
148162 emailPrivacyConfig : true ,
163+ mobileLinksConfig : true ,
149164 }
150165 // Check for unsupported top level attributes.
151166 for ( const key in request ) {
@@ -179,6 +194,11 @@ export class ProjectConfig {
179194 if ( typeof request . emailPrivacyConfig !== 'undefined' ) {
180195 EmailPrivacyAuthConfig . validate ( request . emailPrivacyConfig ) ;
181196 }
197+
198+ // Validate Mobile Links Config if provided.
199+ if ( typeof request . mobileLinksConfig !== 'undefined' ) {
200+ MobileLinksAuthConfig . validate ( request . mobileLinksConfig ) ;
201+ }
182202 }
183203
184204 /**
@@ -206,6 +226,9 @@ export class ProjectConfig {
206226 if ( typeof configOptions . emailPrivacyConfig !== 'undefined' ) {
207227 request . emailPrivacyConfig = configOptions . emailPrivacyConfig ;
208228 }
229+ if ( typeof configOptions . mobileLinksConfig !== 'undefined' ) {
230+ request . mobileLinksConfig = configOptions . mobileLinksConfig ;
231+ }
209232 return request ;
210233 }
211234
@@ -234,6 +257,9 @@ export class ProjectConfig {
234257 if ( typeof response . emailPrivacyConfig !== 'undefined' ) {
235258 this . emailPrivacyConfig = response . emailPrivacyConfig ;
236259 }
260+ if ( typeof response . mobileLinksConfig !== 'undefined' ) {
261+ this . mobileLinksConfig = response . mobileLinksConfig ;
262+ }
237263 }
238264 /**
239265 * Returns a JSON-serializable representation of this object.
@@ -248,6 +274,7 @@ export class ProjectConfig {
248274 recaptchaConfig : deepCopy ( this . recaptchaConfig ) ,
249275 passwordPolicyConfig : deepCopy ( this . passwordPolicyConfig ) ,
250276 emailPrivacyConfig : deepCopy ( this . emailPrivacyConfig ) ,
277+ mobileLinksConfig : deepCopy ( this . mobileLinksConfig ) ,
251278 } ;
252279 if ( typeof json . smsRegionConfig === 'undefined' ) {
253280 delete json . smsRegionConfig ;
@@ -264,6 +291,9 @@ export class ProjectConfig {
264291 if ( typeof json . emailPrivacyConfig === 'undefined' ) {
265292 delete json . emailPrivacyConfig ;
266293 }
294+ if ( typeof json . mobileLinksConfig === 'undefined' ) {
295+ delete json . mobileLinksConfig ;
296+ }
267297 return json ;
268298 }
269299}
0 commit comments