@@ -45,6 +45,17 @@ export interface TemplateSigner {
4545 /**
4646 * An identifier for the signer. This can be used to identify a signer within the template. */
4747 readonly publicId ?: string ;
48+ /**
49+ * If true for signers with a defined email, the password provided when the template was created is used by default.
50+ * If true for signers without a specified / defined email, the creator needs to provide a password when using the template. */
51+ readonly isPasswordRequired ?: boolean | null ;
52+ /**
53+ * If true for signers with a defined email, the phone number provided when the template was created is used by default.
54+ * If true for signers without a specified / defined email, the template creator needs to provide a phone number when creating a request. */
55+ readonly isPhoneNumberRequired ?: boolean | null ;
56+ /**
57+ * If true, the signer is required to login to access the document. */
58+ readonly loginRequired ?: boolean | null ;
4859 readonly rawData ?: SerializedData ;
4960}
5061export function serializeTemplateSignerRoleField (
@@ -89,6 +100,9 @@ export function serializeTemplateSigner(val: TemplateSigner): SerializedData {
89100 [ 'signer_group_id' ] : val . signerGroupId ,
90101 [ 'label' ] : val . label ,
91102 [ 'public_id' ] : val . publicId ,
103+ [ 'is_password_required' ] : val . isPasswordRequired ,
104+ [ 'is_phone_number_required' ] : val . isPhoneNumberRequired ,
105+ [ 'login_required' ] : val . loginRequired ,
92106 } ;
93107}
94108export function deserializeTemplateSigner ( val : SerializedData ) : TemplateSigner {
@@ -150,6 +164,38 @@ export function deserializeTemplateSigner(val: SerializedData): TemplateSigner {
150164 }
151165 const publicId : undefined | string =
152166 val . public_id == void 0 ? void 0 : val . public_id ;
167+ if (
168+ ! ( val . is_password_required == void 0 ) &&
169+ ! sdIsBoolean ( val . is_password_required )
170+ ) {
171+ throw new BoxSdkError ( {
172+ message :
173+ 'Expecting boolean for "is_password_required" of type "TemplateSigner"' ,
174+ } ) ;
175+ }
176+ const isPasswordRequired : undefined | boolean =
177+ val . is_password_required == void 0 ? void 0 : val . is_password_required ;
178+ if (
179+ ! ( val . is_phone_number_required == void 0 ) &&
180+ ! sdIsBoolean ( val . is_phone_number_required )
181+ ) {
182+ throw new BoxSdkError ( {
183+ message :
184+ 'Expecting boolean for "is_phone_number_required" of type "TemplateSigner"' ,
185+ } ) ;
186+ }
187+ const isPhoneNumberRequired : undefined | boolean =
188+ val . is_phone_number_required == void 0
189+ ? void 0
190+ : val . is_phone_number_required ;
191+ if ( ! ( val . login_required == void 0 ) && ! sdIsBoolean ( val . login_required ) ) {
192+ throw new BoxSdkError ( {
193+ message :
194+ 'Expecting boolean for "login_required" of type "TemplateSigner"' ,
195+ } ) ;
196+ }
197+ const loginRequired : undefined | boolean =
198+ val . login_required == void 0 ? void 0 : val . login_required ;
153199 return {
154200 inputs : inputs ,
155201 email : email ,
@@ -159,5 +205,8 @@ export function deserializeTemplateSigner(val: SerializedData): TemplateSigner {
159205 signerGroupId : signerGroupId ,
160206 label : label ,
161207 publicId : publicId ,
208+ isPasswordRequired : isPasswordRequired ,
209+ isPhoneNumberRequired : isPhoneNumberRequired ,
210+ loginRequired : loginRequired ,
162211 } satisfies TemplateSigner ;
163212}
0 commit comments