UNPKG

box-node-sdk

Version:

Official SDK for Box Platform APIs

60 lines 3.05 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.serializeHubDocumentBlockEntryV2025R0 = serializeHubDocumentBlockEntryV2025R0; exports.deserializeHubDocumentBlockEntryV2025R0 = deserializeHubDocumentBlockEntryV2025R0; const hubParagraphTextBlockV2025R0_1 = require("./hubParagraphTextBlockV2025R0.js"); const hubParagraphTextBlockV2025R0_2 = require("./hubParagraphTextBlockV2025R0.js"); const hubSectionTitleTextBlockV2025R0_1 = require("./hubSectionTitleTextBlockV2025R0.js"); const hubSectionTitleTextBlockV2025R0_2 = require("./hubSectionTitleTextBlockV2025R0.js"); const hubCalloutBoxTextBlockV2025R0_1 = require("./hubCalloutBoxTextBlockV2025R0.js"); const hubCalloutBoxTextBlockV2025R0_2 = require("./hubCalloutBoxTextBlockV2025R0.js"); const hubItemListBlockV2025R0_1 = require("./hubItemListBlockV2025R0.js"); const hubItemListBlockV2025R0_2 = require("./hubItemListBlockV2025R0.js"); const hubDividerBlockV2025R0_1 = require("./hubDividerBlockV2025R0.js"); const hubDividerBlockV2025R0_2 = require("./hubDividerBlockV2025R0.js"); const errors_1 = require("../../box/errors.js"); const json_1 = require("../../serialization/json.js"); function serializeHubDocumentBlockEntryV2025R0(val) { if (val.type == 'paragraph') { return (0, hubParagraphTextBlockV2025R0_1.serializeHubParagraphTextBlockV2025R0)(val); } if (val.type == 'section_title') { return (0, hubSectionTitleTextBlockV2025R0_1.serializeHubSectionTitleTextBlockV2025R0)(val); } if (val.type == 'callout_box') { return (0, hubCalloutBoxTextBlockV2025R0_1.serializeHubCalloutBoxTextBlockV2025R0)(val); } if (val.type == 'item_list') { return (0, hubItemListBlockV2025R0_1.serializeHubItemListBlockV2025R0)(val); } if (val.type == 'divider') { return (0, hubDividerBlockV2025R0_1.serializeHubDividerBlockV2025R0)(val); } throw new errors_1.BoxSdkError({ message: 'unknown type' }); } function deserializeHubDocumentBlockEntryV2025R0(val) { if (!(0, json_1.sdIsMap)(val)) { throw new errors_1.BoxSdkError({ message: 'Expecting a map for "HubDocumentBlockEntryV2025R0"', }); } if (val.type == 'paragraph') { return (0, hubParagraphTextBlockV2025R0_2.deserializeHubParagraphTextBlockV2025R0)(val); } if (val.type == 'section_title') { return (0, hubSectionTitleTextBlockV2025R0_2.deserializeHubSectionTitleTextBlockV2025R0)(val); } if (val.type == 'callout_box') { return (0, hubCalloutBoxTextBlockV2025R0_2.deserializeHubCalloutBoxTextBlockV2025R0)(val); } if (val.type == 'item_list') { return (0, hubItemListBlockV2025R0_2.deserializeHubItemListBlockV2025R0)(val); } if (val.type == 'divider') { return (0, hubDividerBlockV2025R0_2.deserializeHubDividerBlockV2025R0)(val); } throw new errors_1.BoxSdkError({ message: "Can't deserialize HubDocumentBlockEntryV2025R0", }); } //# sourceMappingURL=hubDocumentBlockEntryV2025R0.js.map