Skip to content

Commit

Permalink
feat: move notification suppression to public schema (box/box-openapi…
Browse files Browse the repository at this point in the history
  • Loading branch information
box-sdk-build committed May 15, 2024
1 parent 806c7a6 commit 4b3376c
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "3eadef2", "specHash": "f26f46d", "version": "0.5.4" }
{ "engineHash": "3eadef2", "specHash": "6c3dd22", "version": "0.5.4" }
12 changes: 12 additions & 0 deletions src/schemas/signRequest.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,17 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
}
const templateId: undefined | string =
val.template_id == void 0 ? void 0 : val.template_id;
if (
!(val.external_system_name == void 0) &&
!sdIsString(val.external_system_name)
) {
throw new BoxSdkError({
message:
'Expecting string for "external_system_name" of type "SignRequest"',
});
}
const externalSystemName: undefined | string =
val.external_system_name == void 0 ? void 0 : val.external_system_name;
return {
type: type,
sourceFiles: sourceFiles,
Expand All @@ -456,5 +467,6 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
externalId: externalId,
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
templateId: templateId,
externalSystemName: externalSystemName,
} satisfies SignRequest;
}
15 changes: 15 additions & 0 deletions src/schemas/signRequestBase.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface SignRequestBase {
readonly externalId?: string;
readonly isPhoneVerificationRequiredToView?: boolean;
readonly templateId?: string;
readonly externalSystemName?: string;
}
export function serializeSignRequestBase(val: SignRequestBase): SerializedData {
return {
Expand Down Expand Up @@ -57,6 +58,8 @@ export function serializeSignRequestBase(val: SignRequestBase): SerializedData {
? void 0
: val.isPhoneVerificationRequiredToView,
['template_id']: val.templateId == void 0 ? void 0 : val.templateId,
['external_system_name']:
val.externalSystemName == void 0 ? void 0 : val.externalSystemName,
};
}
export function deserializeSignRequestBase(
Expand Down Expand Up @@ -189,6 +192,17 @@ export function deserializeSignRequestBase(
}
const templateId: undefined | string =
val.template_id == void 0 ? void 0 : val.template_id;
if (
!(val.external_system_name == void 0) &&
!sdIsString(val.external_system_name)
) {
throw new BoxSdkError({
message:
'Expecting string for "external_system_name" of type "SignRequestBase"',
});
}
const externalSystemName: undefined | string =
val.external_system_name == void 0 ? void 0 : val.external_system_name;
return {
isDocumentPreparationNeeded: isDocumentPreparationNeeded,
redirectUrl: redirectUrl,
Expand All @@ -203,5 +217,6 @@ export function deserializeSignRequestBase(
externalId: externalId,
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
templateId: templateId,
externalSystemName: externalSystemName,
} satisfies SignRequestBase;
}
12 changes: 12 additions & 0 deletions src/schemas/signRequestCreateRequest.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,17 @@ export function deserializeSignRequestCreateRequest(
}
const templateId: undefined | string =
val.template_id == void 0 ? void 0 : val.template_id;
if (
!(val.external_system_name == void 0) &&
!sdIsString(val.external_system_name)
) {
throw new BoxSdkError({
message:
'Expecting string for "external_system_name" of type "SignRequestCreateRequest"',
});
}
const externalSystemName: undefined | string =
val.external_system_name == void 0 ? void 0 : val.external_system_name;
return {
sourceFiles: sourceFiles,
signatureColor: signatureColor,
Expand All @@ -294,5 +305,6 @@ export function deserializeSignRequestCreateRequest(
externalId: externalId,
isPhoneVerificationRequiredToView: isPhoneVerificationRequiredToView,
templateId: templateId,
externalSystemName: externalSystemName,
} satisfies SignRequestCreateRequest;
}
15 changes: 15 additions & 0 deletions src/schemas/signRequestCreateSigner.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export interface SignRequestCreateSigner {
readonly verificationPhoneNumber?: string;
readonly password?: string;
readonly signerGroupId?: string;
readonly suppressNotifications?: boolean;
}
export function serializeSignRequestCreateSignerRoleField(
val: SignRequestCreateSignerRoleField
Expand Down Expand Up @@ -76,6 +77,8 @@ export function serializeSignRequestCreateSigner(
['password']: val.password == void 0 ? void 0 : val.password,
['signer_group_id']:
val.signerGroupId == void 0 ? void 0 : val.signerGroupId,
['suppress_notifications']:
val.suppressNotifications == void 0 ? void 0 : val.suppressNotifications,
};
}
export function deserializeSignRequestCreateSigner(
Expand Down Expand Up @@ -179,6 +182,17 @@ export function deserializeSignRequestCreateSigner(
}
const signerGroupId: undefined | string =
val.signer_group_id == void 0 ? void 0 : val.signer_group_id;
if (
!(val.suppress_notifications == void 0) &&
!sdIsBoolean(val.suppress_notifications)
) {
throw new BoxSdkError({
message:
'Expecting boolean for "suppress_notifications" of type "SignRequestCreateSigner"',
});
}
const suppressNotifications: undefined | boolean =
val.suppress_notifications == void 0 ? void 0 : val.suppress_notifications;
return {
email: email,
role: role,
Expand All @@ -191,5 +205,6 @@ export function deserializeSignRequestCreateSigner(
verificationPhoneNumber: verificationPhoneNumber,
password: password,
signerGroupId: signerGroupId,
suppressNotifications: suppressNotifications,
} satisfies SignRequestCreateSigner;
}
12 changes: 12 additions & 0 deletions src/schemas/signRequestSigner.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,17 @@ export function deserializeSignRequestSigner(
}
const signerGroupId: undefined | string =
val.signer_group_id == void 0 ? void 0 : val.signer_group_id;
if (
!(val.suppress_notifications == void 0) &&
!sdIsBoolean(val.suppress_notifications)
) {
throw new BoxSdkError({
message:
'Expecting boolean for "suppress_notifications" of type "SignRequestSigner"',
});
}
const suppressNotifications: undefined | boolean =
val.suppress_notifications == void 0 ? void 0 : val.suppress_notifications;
return {
hasViewedDocument: hasViewedDocument,
signerDecision: signerDecision,
Expand All @@ -298,5 +309,6 @@ export function deserializeSignRequestSigner(
verificationPhoneNumber: verificationPhoneNumber,
password: password,
signerGroupId: signerGroupId,
suppressNotifications: suppressNotifications,
} satisfies SignRequestSigner;
}

0 comments on commit 4b3376c

Please sign in to comment.