Skip to content

Commit 4b3376c

Browse files
committed
feat: move notification suppression to public schema (box/box-openapi#425)
1 parent 806c7a6 commit 4b3376c

6 files changed

+67
-1
lines changed

.codegen.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{ "engineHash": "3eadef2", "specHash": "f26f46d", "version": "0.5.4" }
1+
{ "engineHash": "3eadef2", "specHash": "6c3dd22", "version": "0.5.4" }

src/schemas/signRequest.generated.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,17 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
431431
}
432432
const templateId: undefined | string =
433433
val.template_id == void 0 ? void 0 : val.template_id;
434+
if (
435+
!(val.external_system_name == void 0) &&
436+
!sdIsString(val.external_system_name)
437+
) {
438+
throw new BoxSdkError({
439+
message:
440+
'Expecting string for "external_system_name" of type "SignRequest"',
441+
});
442+
}
443+
const externalSystemName: undefined | string =
444+
val.external_system_name == void 0 ? void 0 : val.external_system_name;
434445
return {
435446
type: type,
436447
sourceFiles: sourceFiles,
@@ -456,5 +467,6 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
456467
externalId: externalId,
457468
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
458469
templateId: templateId,
470+
externalSystemName: externalSystemName,
459471
} satisfies SignRequest;
460472
}

src/schemas/signRequestBase.generated.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ export interface SignRequestBase {
2323
readonly externalId?: string;
2424
readonly isPhoneVerificationRequiredToView?: boolean;
2525
readonly templateId?: string;
26+
readonly externalSystemName?: string;
2627
}
2728
export function serializeSignRequestBase(val: SignRequestBase): SerializedData {
2829
return {
@@ -57,6 +58,8 @@ export function serializeSignRequestBase(val: SignRequestBase): SerializedData {
5758
? void 0
5859
: val.isPhoneVerificationRequiredToView,
5960
['template_id']: val.templateId == void 0 ? void 0 : val.templateId,
61+
['external_system_name']:
62+
val.externalSystemName == void 0 ? void 0 : val.externalSystemName,
6063
};
6164
}
6265
export function deserializeSignRequestBase(
@@ -189,6 +192,17 @@ export function deserializeSignRequestBase(
189192
}
190193
const templateId: undefined | string =
191194
val.template_id == void 0 ? void 0 : val.template_id;
195+
if (
196+
!(val.external_system_name == void 0) &&
197+
!sdIsString(val.external_system_name)
198+
) {
199+
throw new BoxSdkError({
200+
message:
201+
'Expecting string for "external_system_name" of type "SignRequestBase"',
202+
});
203+
}
204+
const externalSystemName: undefined | string =
205+
val.external_system_name == void 0 ? void 0 : val.external_system_name;
192206
return {
193207
isDocumentPreparationNeeded: isDocumentPreparationNeeded,
194208
redirectUrl: redirectUrl,
@@ -203,5 +217,6 @@ export function deserializeSignRequestBase(
203217
externalId: externalId,
204218
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
205219
templateId: templateId,
220+
externalSystemName: externalSystemName,
206221
} satisfies SignRequestBase;
207222
}

src/schemas/signRequestCreateRequest.generated.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,17 @@ export function deserializeSignRequestCreateRequest(
276276
}
277277
const templateId: undefined | string =
278278
val.template_id == void 0 ? void 0 : val.template_id;
279+
if (
280+
!(val.external_system_name == void 0) &&
281+
!sdIsString(val.external_system_name)
282+
) {
283+
throw new BoxSdkError({
284+
message:
285+
'Expecting string for "external_system_name" of type "SignRequestCreateRequest"',
286+
});
287+
}
288+
const externalSystemName: undefined | string =
289+
val.external_system_name == void 0 ? void 0 : val.external_system_name;
279290
return {
280291
sourceFiles: sourceFiles,
281292
signatureColor: signatureColor,
@@ -294,5 +305,6 @@ export function deserializeSignRequestCreateRequest(
294305
externalId: externalId,
295306
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
296307
templateId: templateId,
308+
externalSystemName: externalSystemName,
297309
} satisfies SignRequestCreateRequest;
298310
}

src/schemas/signRequestCreateSigner.generated.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export interface SignRequestCreateSigner {
2222
readonly verificationPhoneNumber?: string;
2323
readonly password?: string;
2424
readonly signerGroupId?: string;
25+
readonly suppressNotifications?: boolean;
2526
}
2627
export function serializeSignRequestCreateSignerRoleField(
2728
val: SignRequestCreateSignerRoleField
@@ -76,6 +77,8 @@ export function serializeSignRequestCreateSigner(
7677
['password']: val.password == void 0 ? void 0 : val.password,
7778
['signer_group_id']:
7879
val.signerGroupId == void 0 ? void 0 : val.signerGroupId,
80+
['suppress_notifications']:
81+
val.suppressNotifications == void 0 ? void 0 : val.suppressNotifications,
7982
};
8083
}
8184
export function deserializeSignRequestCreateSigner(
@@ -179,6 +182,17 @@ export function deserializeSignRequestCreateSigner(
179182
}
180183
const signerGroupId: undefined | string =
181184
val.signer_group_id == void 0 ? void 0 : val.signer_group_id;
185+
if (
186+
!(val.suppress_notifications == void 0) &&
187+
!sdIsBoolean(val.suppress_notifications)
188+
) {
189+
throw new BoxSdkError({
190+
message:
191+
'Expecting boolean for "suppress_notifications" of type "SignRequestCreateSigner"',
192+
});
193+
}
194+
const suppressNotifications: undefined | boolean =
195+
val.suppress_notifications == void 0 ? void 0 : val.suppress_notifications;
182196
return {
183197
email: email,
184198
role: role,
@@ -191,5 +205,6 @@ export function deserializeSignRequestCreateSigner(
191205
verificationPhoneNumber: verificationPhoneNumber,
192206
password: password,
193207
signerGroupId: signerGroupId,
208+
suppressNotifications: suppressNotifications,
194209
} satisfies SignRequestCreateSigner;
195210
}

src/schemas/signRequestSigner.generated.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,17 @@ export function deserializeSignRequestSigner(
281281
}
282282
const signerGroupId: undefined | string =
283283
val.signer_group_id == void 0 ? void 0 : val.signer_group_id;
284+
if (
285+
!(val.suppress_notifications == void 0) &&
286+
!sdIsBoolean(val.suppress_notifications)
287+
) {
288+
throw new BoxSdkError({
289+
message:
290+
'Expecting boolean for "suppress_notifications" of type "SignRequestSigner"',
291+
});
292+
}
293+
const suppressNotifications: undefined | boolean =
294+
val.suppress_notifications == void 0 ? void 0 : val.suppress_notifications;
284295
return {
285296
hasViewedDocument: hasViewedDocument,
286297
signerDecision: signerDecision,
@@ -298,5 +309,6 @@ export function deserializeSignRequestSigner(
298309
verificationPhoneNumber: verificationPhoneNumber,
299310
password: password,
300311
signerGroupId: signerGroupId,
312+
suppressNotifications: suppressNotifications,
301313
} satisfies SignRequestSigner;
302314
}

0 commit comments

Comments
 (0)