UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

27 lines 1.07 kB
import { BoxSdkError } from '../box/errors.js'; import { sdIsString } from '../serialization/json.js'; import { sdIsMap } from '../serialization/json.js'; export function serializeSignRequestSignerAttachment(val) { return { ['id']: val.id, ['name']: val.name }; } export function deserializeSignRequestSignerAttachment(val) { 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 = 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 = val.name == void 0 ? void 0 : val.name; return { id: id, name: name }; } //# sourceMappingURL=signRequestSignerAttachment.js.map