Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .codegen.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{ "engineHash": "35c5d34", "specHash": "e7ce024", "version": "4.1.1" }
{ "engineHash": "49f3695", "specHash": "7e4908e", "version": "4.1.1" }
3 changes: 2 additions & 1 deletion src/sdk-gen/schemas/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,10 @@ export * from './templateSigner';
export * from './signTemplate';
export * from './signTemplates';
export * from './signRequestSignerInput';
export * from './signRequestSigner';
export * from './signRequestBase';
export * from './signRequestCreateRequest';
export * from './signRequestSignerAttachment';
export * from './signRequestSigner';
export * from './signRequest';
export * from './signRequests';
export * from './statusSkillCard';
Expand Down
42 changes: 42 additions & 0 deletions src/sdk-gen/schemas/signRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ export type SignRequest = SignRequestBase & {
/**
* The collaborator level of the user to the sign request. Values can include "owner", "editor", and "viewer". */
readonly collaboratorLevel?: string | null;
/**
* Short identifier for the sign request. */
readonly shortId?: string;
/**
* Timestamp marking when the sign request was created. */
readonly createdAt?: DateTime;
/**
* Timestamp indicating when all signing actions completed. */
readonly finishedAt?: DateTime | null;
/**
* The email address of the sender of the sign request. */
readonly senderEmail?: string | null;
Expand Down Expand Up @@ -263,6 +272,15 @@ export function serializeSignRequest(val: SignRequest): SerializedData {
? val.parentFolder
: serializeFolderMini(val.parentFolder),
['collaborator_level']: val.collaboratorLevel,
['short_id']: val.shortId,
['created_at']:
val.createdAt == void 0
? val.createdAt
: serializeDateTime(val.createdAt),
['finished_at']:
val.finishedAt == void 0
? val.finishedAt
: serializeDateTime(val.finishedAt),
['sender_email']: val.senderEmail,
['sender_id']: val.senderId,
},
Expand Down Expand Up @@ -354,6 +372,27 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
}
const collaboratorLevel: undefined | string =
val.collaborator_level == void 0 ? void 0 : val.collaborator_level;
if (!(val.short_id == void 0) && !sdIsString(val.short_id)) {
throw new BoxSdkError({
message: 'Expecting string for "short_id" of type "SignRequest"',
});
}
const shortId: undefined | string =
val.short_id == void 0 ? void 0 : val.short_id;
if (!(val.created_at == void 0) && !sdIsString(val.created_at)) {
throw new BoxSdkError({
message: 'Expecting string for "created_at" of type "SignRequest"',
});
}
const createdAt: undefined | DateTime =
val.created_at == void 0 ? void 0 : deserializeDateTime(val.created_at);
if (!(val.finished_at == void 0) && !sdIsString(val.finished_at)) {
throw new BoxSdkError({
message: 'Expecting string for "finished_at" of type "SignRequest"',
});
}
const finishedAt: undefined | DateTime =
val.finished_at == void 0 ? void 0 : deserializeDateTime(val.finished_at);
if (!(val.sender_email == void 0) && !sdIsString(val.sender_email)) {
throw new BoxSdkError({
message: 'Expecting string for "sender_email" of type "SignRequest"',
Expand Down Expand Up @@ -503,6 +542,9 @@ export function deserializeSignRequest(val: SerializedData): SignRequest {
autoExpireAt: autoExpireAt,
parentFolder: parentFolder,
collaboratorLevel: collaboratorLevel,
shortId: shortId,
createdAt: createdAt,
finishedAt: finishedAt,
senderEmail: senderEmail,
senderId: senderId,
isDocumentPreparationNeeded: isDocumentPreparationNeeded,
Expand Down
30 changes: 30 additions & 0 deletions src/sdk-gen/schemas/signRequestSigner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,14 @@ import { serializeSignRequestCreateSigner } from './signRequestCreateSigner';
import { deserializeSignRequestCreateSigner } from './signRequestCreateSigner';
import { serializeSignRequestSignerInput } from './signRequestSignerInput';
import { deserializeSignRequestSignerInput } from './signRequestSignerInput';
import { serializeSignRequestSignerAttachment } from './signRequestSignerAttachment';
import { deserializeSignRequestSignerAttachment } from './signRequestSignerAttachment';
import { serializeDateTime } from '../internal/utils';
import { deserializeDateTime } from '../internal/utils';
import { SignRequestCreateSignerRoleField } from './signRequestCreateSigner';
import { SignRequestCreateSigner } from './signRequestCreateSigner';
import { SignRequestSignerInput } from './signRequestSignerInput';
import { SignRequestSignerAttachment } from './signRequestSignerAttachment';
import { BoxSdkError } from '../box/errors';
import { DateTime } from '../internal/utils';
import { SerializedData } from '../serialization/json';
Expand Down Expand Up @@ -50,6 +53,9 @@ export type SignRequestSigner = SignRequestCreateSigner & {
* parameter was passed in the
* `create Box Sign request` call. */
readonly iframeableEmbedUrl?: string | null;
/**
* Attachments that the signer uploaded. */
readonly attachments?: readonly SignRequestSignerAttachment[] | null;
};
export function serializeSignRequestSignerSignerDecisionTypeField(
val: SignRequestSignerSignerDecisionTypeField
Expand Down Expand Up @@ -145,6 +151,14 @@ export function serializeSignRequestSigner(
}) as readonly any[]),
['embed_url']: val.embedUrl,
['iframeable_embed_url']: val.iframeableEmbedUrl,
['attachments']:
val.attachments == void 0
? val.attachments
: (val.attachments.map(function (
item: SignRequestSignerAttachment
): SerializedData {
return serializeSignRequestSignerAttachment(item);
}) as readonly any[]),
},
};
}
Expand Down Expand Up @@ -204,6 +218,21 @@ export function deserializeSignRequestSigner(
}
const iframeableEmbedUrl: undefined | string =
val.iframeable_embed_url == void 0 ? void 0 : val.iframeable_embed_url;
if (!(val.attachments == void 0) && !sdIsList(val.attachments)) {
throw new BoxSdkError({
message: 'Expecting array for "attachments" of type "SignRequestSigner"',
});
}
const attachments: undefined | readonly SignRequestSignerAttachment[] =
val.attachments == void 0
? void 0
: sdIsList(val.attachments)
? (val.attachments.map(function (
itm: SerializedData
): SignRequestSignerAttachment {
return deserializeSignRequestSignerAttachment(itm);
}) as readonly any[])
: [];
if (!(val.email == void 0) && !sdIsString(val.email)) {
throw new BoxSdkError({
message: 'Expecting string for "email" of type "SignRequestSigner"',
Expand Down Expand Up @@ -313,6 +342,7 @@ export function deserializeSignRequestSigner(
inputs: inputs,
embedUrl: embedUrl,
iframeableEmbedUrl: iframeableEmbedUrl,
attachments: attachments,
email: email,
role: role,
isInPerson: isInPerson,
Expand Down
46 changes: 46 additions & 0 deletions src/sdk-gen/schemas/signRequestSignerAttachment.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import { BoxSdkError } from '../box/errors';
import { SerializedData } from '../serialization/json';
import { sdIsEmpty } from '../serialization/json';
import { sdIsBoolean } from '../serialization/json';
import { sdIsNumber } from '../serialization/json';
import { sdIsString } from '../serialization/json';
import { sdIsList } from '../serialization/json';
import { sdIsMap } from '../serialization/json';
export interface SignRequestSignerAttachment {
/**
* Identifier of the attachment file. */
readonly id?: string | null;
/**
* Display name of the attachment file. */
readonly name?: string | null;
readonly rawData?: SerializedData;
}
export function serializeSignRequestSignerAttachment(
val: SignRequestSignerAttachment
): SerializedData {
return { ['id']: val.id, ['name']: val.name };
}
export function deserializeSignRequestSignerAttachment(
val: SerializedData
): SignRequestSignerAttachment {
if (!sdIsMap(val)) {
throw new BoxSdkError({
message: 'Expecting a map for "SignRequestSignerAttachment"',
});
}
if (!(val.id == void 0) && !sdIsString(val.id)) {
throw new BoxSdkError({
message:
'Expecting string for "id" of type "SignRequestSignerAttachment"',
});
}
const id: undefined | string = val.id == void 0 ? void 0 : val.id;
if (!(val.name == void 0) && !sdIsString(val.name)) {
throw new BoxSdkError({
message:
'Expecting string for "name" of type "SignRequestSignerAttachment"',
});
}
const name: undefined | string = val.name == void 0 ? void 0 : val.name;
return { id: id, name: name } satisfies SignRequestSignerAttachment;
}