Skip to content

Commit 916502c

Browse files
fix: add verification_phone_number property to create sign request (box/box-openapi#515) (#546)
1 parent 7c32eaf commit 916502c

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "41feeaa", "specHash": "3dc6f70", "version": "1.13.2" }
1+
{ "engineHash": "41feeaa", "specHash": "1080bb4", "version": "1.13.2" }

src/schemas/signRequestCreateSigner.generated.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ export interface SignRequestCreateSigner {
5353
* an existing account, they will have the option to create
5454
* a free Box account. */
5555
readonly loginRequired?: boolean | null;
56+
/**
57+
* If set, this phone number will be used to verify the signer
58+
* via two-factor authentication before they are able to sign the document.
59+
* Cannot be selected in combination with `login_required`. */
60+
readonly verificationPhoneNumber?: string | null;
5661
/**
5762
* If set, the signer is required to enter the password before they are able
5863
* to sign a document. This field is write only. */
@@ -110,6 +115,7 @@ export function serializeSignRequestCreateSigner(
110115
['redirect_url']: val.redirectUrl,
111116
['declined_redirect_url']: val.declinedRedirectUrl,
112117
['login_required']: val.loginRequired,
118+
['verification_phone_number']: val.verificationPhoneNumber,
113119
['password']: val.password,
114120
['signer_group_id']: val.signerGroupId,
115121
['suppress_notifications']: val.suppressNotifications,
@@ -187,6 +193,19 @@ export function deserializeSignRequestCreateSigner(
187193
}
188194
const loginRequired: undefined | boolean =
189195
val.login_required == void 0 ? void 0 : val.login_required;
196+
if (
197+
!(val.verification_phone_number == void 0) &&
198+
!sdIsString(val.verification_phone_number)
199+
) {
200+
throw new BoxSdkError({
201+
message:
202+
'Expecting string for "verification_phone_number" of type "SignRequestCreateSigner"',
203+
});
204+
}
205+
const verificationPhoneNumber: undefined | string =
206+
val.verification_phone_number == void 0
207+
? void 0
208+
: val.verification_phone_number;
190209
if (!(val.password == void 0) && !sdIsString(val.password)) {
191210
throw new BoxSdkError({
192211
message:
@@ -223,6 +242,7 @@ export function deserializeSignRequestCreateSigner(
223242
redirectUrl: redirectUrl,
224243
declinedRedirectUrl: declinedRedirectUrl,
225244
loginRequired: loginRequired,
245+
verificationPhoneNumber: verificationPhoneNumber,
226246
password: password,
227247
signerGroupId: signerGroupId,
228248
suppressNotifications: suppressNotifications,

src/schemas/signRequestSigner.generated.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,19 @@ export function deserializeSignRequestSigner(
268268
}
269269
const loginRequired: undefined | boolean =
270270
val.login_required == void 0 ? void 0 : val.login_required;
271+
if (
272+
!(val.verification_phone_number == void 0) &&
273+
!sdIsString(val.verification_phone_number)
274+
) {
275+
throw new BoxSdkError({
276+
message:
277+
'Expecting string for "verification_phone_number" of type "SignRequestSigner"',
278+
});
279+
}
280+
const verificationPhoneNumber: undefined | string =
281+
val.verification_phone_number == void 0
282+
? void 0
283+
: val.verification_phone_number;
271284
if (!(val.password == void 0) && !sdIsString(val.password)) {
272285
throw new BoxSdkError({
273286
message: 'Expecting string for "password" of type "SignRequestSigner"',
@@ -308,6 +321,7 @@ export function deserializeSignRequestSigner(
308321
redirectUrl: redirectUrl,
309322
declinedRedirectUrl: declinedRedirectUrl,
310323
loginRequired: loginRequired,
324+
verificationPhoneNumber: verificationPhoneNumber,
311325
password: password,
312326
signerGroupId: signerGroupId,
313327
suppressNotifications: suppressNotifications,

0 commit comments

Comments
 (0)