box-node-sdk 4.4.0 → 4.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/sdk-gen/client.d.ts +10 -1
- package/lib/sdk-gen/client.d.ts.map +1 -1
- package/lib/sdk-gen/client.js +16 -0
- package/lib/sdk-gen/client.js.map +1 -1
- package/lib/sdk-gen/managers/archives.d.ts +4 -0
- package/lib/sdk-gen/managers/archives.d.ts.map +1 -1
- package/lib/sdk-gen/managers/archives.js +4 -0
- package/lib/sdk-gen/managers/archives.js.map +1 -1
- package/lib/sdk-gen/managers/hubDocument.d.ts +133 -0
- package/lib/sdk-gen/managers/hubDocument.d.ts.map +1 -0
- package/lib/sdk-gen/managers/hubDocument.js +162 -0
- package/lib/sdk-gen/managers/hubDocument.js.map +1 -0
- package/lib/sdk-gen/managers/hubItems.d.ts +7 -0
- package/lib/sdk-gen/managers/hubItems.d.ts.map +1 -1
- package/lib/sdk-gen/managers/hubItems.js +1 -0
- package/lib/sdk-gen/managers/hubItems.js.map +1 -1
- package/lib/sdk-gen/managers/index.d.ts +1 -0
- package/lib/sdk-gen/managers/index.d.ts.map +1 -1
- package/lib/sdk-gen/managers/index.js +1 -0
- package/lib/sdk-gen/managers/index.js.map +1 -1
- package/lib/sdk-gen/managers/search.d.ts +1 -1
- package/lib/sdk-gen/managers/search.d.ts.map +1 -1
- package/lib/sdk-gen/managers/search.js +1 -1
- package/lib/sdk-gen/managers/search.js.map +1 -1
- package/lib/sdk-gen/managers/trashedItems.d.ts +2 -0
- package/lib/sdk-gen/managers/trashedItems.d.ts.map +1 -1
- package/lib/sdk-gen/managers/trashedItems.js +2 -0
- package/lib/sdk-gen/managers/trashedItems.js.map +1 -1
- package/lib/sdk-gen/networking/boxNetworkClient.d.ts.map +1 -1
- package/lib/sdk-gen/networking/boxNetworkClient.js +61 -6
- package/lib/sdk-gen/networking/boxNetworkClient.js.map +1 -1
- package/lib/sdk-gen/networking/network.d.ts +10 -1
- package/lib/sdk-gen/networking/network.d.ts.map +1 -1
- package/lib/sdk-gen/networking/network.js +29 -0
- package/lib/sdk-gen/networking/network.js.map +1 -1
- package/lib/sdk-gen/networking/timeoutConfig.d.ts +4 -0
- package/lib/sdk-gen/networking/timeoutConfig.d.ts.map +1 -0
- package/lib/sdk-gen/networking/timeoutConfig.js +3 -0
- package/lib/sdk-gen/networking/timeoutConfig.js.map +1 -0
- package/lib/sdk-gen/networking/version.d.ts +1 -1
- package/lib/sdk-gen/networking/version.js +1 -1
- package/lib/sdk-gen/schemas/aiAgentBasicTextToolBase.d.ts +1 -1
- package/lib/sdk-gen/schemas/aiAgentBasicTextToolBase.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/aiAgentSpreadsheetTool.d.ts +1 -1
- package/lib/sdk-gen/schemas/aiAgentSpreadsheetTool.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/aiExtractStructured.d.ts +3 -0
- package/lib/sdk-gen/schemas/aiExtractStructured.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/aiExtractStructured.js +9 -0
- package/lib/sdk-gen/schemas/aiExtractStructured.js.map +1 -1
- package/lib/sdk-gen/schemas/aiExtractStructuredResponse.d.ts +5 -0
- package/lib/sdk-gen/schemas/aiExtractStructuredResponse.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/aiExtractStructuredResponse.js +24 -0
- package/lib/sdk-gen/schemas/aiExtractStructuredResponse.js.map +1 -1
- package/lib/sdk-gen/schemas/index.d.ts +9 -9
- package/lib/sdk-gen/schemas/index.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/index.js +9 -9
- package/lib/sdk-gen/schemas/index.js.map +1 -1
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignedItem.d.ts +13 -5
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignedItem.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignedItem.js +47 -24
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignedItem.js.map +1 -1
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignment.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/legalHoldPolicyAssignment.js.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.d.ts +20 -0
- package/lib/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.js +105 -0
- package/lib/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.d.ts +17 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.js +87 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.d.ts +10 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.js +60 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.d.ts +13 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.js +36 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.d.ts +45 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.js +162 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.d.ts +19 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.js +68 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.d.ts +45 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.js +162 -0
- package/lib/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.d.ts +17 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.js +87 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.d.ts +3 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.js +8 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.js.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.d.ts +3 -0
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.js +12 -1
- package/lib/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.js.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.d.ts +20 -0
- package/lib/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.js +105 -0
- package/lib/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.d.ts +20 -0
- package/lib/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.d.ts.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.js +105 -0
- package/lib/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.js.map +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.d.ts +3 -0
- package/lib/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.js +11 -0
- package/lib/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.js.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubV2025R0.d.ts +1 -0
- package/lib/sdk-gen/schemas/v2025R0/hubV2025R0.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/hubV2025R0.js +14 -0
- package/lib/sdk-gen/schemas/v2025R0/hubV2025R0.js.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/index.d.ts +10 -0
- package/lib/sdk-gen/schemas/v2025R0/index.d.ts.map +1 -1
- package/lib/sdk-gen/schemas/v2025R0/index.js +10 -0
- package/lib/sdk-gen/schemas/v2025R0/index.js.map +1 -1
- package/lib-esm/bundle.js +771 -16
- package/lib-esm/bundle.js.map +1 -1
- package/lib-esm/sdk-gen/client.d.ts +10 -1
- package/lib-esm/sdk-gen/client.js +17 -0
- package/lib-esm/sdk-gen/client.js.map +1 -1
- package/lib-esm/sdk-gen/managers/archives.d.ts +4 -0
- package/lib-esm/sdk-gen/managers/archives.js +4 -0
- package/lib-esm/sdk-gen/managers/archives.js.map +1 -1
- package/lib-esm/sdk-gen/managers/hubDocument.d.ts +132 -0
- package/lib-esm/sdk-gen/managers/hubDocument.js +162 -0
- package/lib-esm/sdk-gen/managers/hubDocument.js.map +1 -0
- package/lib-esm/sdk-gen/managers/hubItems.d.ts +7 -0
- package/lib-esm/sdk-gen/managers/hubItems.js +1 -0
- package/lib-esm/sdk-gen/managers/hubItems.js.map +1 -1
- package/lib-esm/sdk-gen/managers/index.d.ts +1 -0
- package/lib-esm/sdk-gen/managers/index.js +1 -0
- package/lib-esm/sdk-gen/managers/index.js.map +1 -1
- package/lib-esm/sdk-gen/managers/search.d.ts +1 -1
- package/lib-esm/sdk-gen/managers/search.js +1 -1
- package/lib-esm/sdk-gen/managers/search.js.map +1 -1
- package/lib-esm/sdk-gen/managers/trashedItems.d.ts +2 -0
- package/lib-esm/sdk-gen/managers/trashedItems.js +2 -0
- package/lib-esm/sdk-gen/managers/trashedItems.js.map +1 -1
- package/lib-esm/sdk-gen/networking/boxNetworkClient.js +67 -6
- package/lib-esm/sdk-gen/networking/boxNetworkClient.js.map +1 -1
- package/lib-esm/sdk-gen/networking/network.d.ts +10 -1
- package/lib-esm/sdk-gen/networking/network.js +30 -0
- package/lib-esm/sdk-gen/networking/network.js.map +1 -1
- package/lib-esm/sdk-gen/networking/timeoutConfig.d.ts +3 -0
- package/lib-esm/sdk-gen/networking/timeoutConfig.js +3 -0
- package/lib-esm/sdk-gen/networking/timeoutConfig.js.map +1 -0
- package/lib-esm/sdk-gen/networking/version.d.ts +1 -1
- package/lib-esm/sdk-gen/networking/version.js +1 -1
- package/lib-esm/sdk-gen/schemas/aiAgentBasicTextToolBase.d.ts +1 -1
- package/lib-esm/sdk-gen/schemas/aiAgentSpreadsheetTool.d.ts +1 -1
- package/lib-esm/sdk-gen/schemas/aiExtractStructured.d.ts +3 -0
- package/lib-esm/sdk-gen/schemas/aiExtractStructured.js +9 -0
- package/lib-esm/sdk-gen/schemas/aiExtractStructured.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/aiExtractStructuredResponse.d.ts +5 -0
- package/lib-esm/sdk-gen/schemas/aiExtractStructuredResponse.js +24 -0
- package/lib-esm/sdk-gen/schemas/aiExtractStructuredResponse.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/index.d.ts +9 -9
- package/lib-esm/sdk-gen/schemas/index.js +9 -9
- package/lib-esm/sdk-gen/schemas/index.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/legalHoldPolicyAssignedItem.d.ts +13 -5
- package/lib-esm/sdk-gen/schemas/legalHoldPolicyAssignedItem.js +47 -24
- package/lib-esm/sdk-gen/schemas/legalHoldPolicyAssignedItem.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/legalHoldPolicyAssignment.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.d.ts +19 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.js +114 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubCalloutBoxTextBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.d.ts +16 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.js +93 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDividerBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.d.ts +9 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.js +60 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockEntryV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.d.ts +12 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.js +36 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.d.ts +44 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.js +174 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentBlocksV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.d.ts +18 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.js +68 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPageV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.d.ts +44 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.js +174 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubDocumentPagesV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.d.ts +16 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.js +93 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemListBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.d.ts +3 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.js +8 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationResultV2025R0.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.d.ts +3 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.js +12 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/hubItemOperationV2025R0.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.d.ts +19 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.js +114 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubParagraphTextBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.d.ts +19 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.js +114 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubSectionTitleTextBlockV2025R0.js.map +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.d.ts +3 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.js +11 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubUpdateRequestV2025R0.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/hubV2025R0.d.ts +1 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubV2025R0.js +15 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/hubV2025R0.js.map +1 -1
- package/lib-esm/sdk-gen/schemas/v2025R0/index.d.ts +10 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/index.js +10 -0
- package/lib-esm/sdk-gen/schemas/v2025R0/index.js.map +1 -1
- package/package.json +1 -1
package/lib-esm/bundle.js
CHANGED
|
@@ -3622,7 +3622,7 @@
|
|
|
3622
3622
|
var browserExports = browser.exports;
|
|
3623
3623
|
var nodeFetch = /*@__PURE__*/getDefaultExportFromCjs(browserExports);
|
|
3624
3624
|
|
|
3625
|
-
const sdkVersion = '4.
|
|
3625
|
+
const sdkVersion = '4.6.0';
|
|
3626
3626
|
|
|
3627
3627
|
class BoxRetryStrategy {
|
|
3628
3628
|
constructor(fields) {
|
|
@@ -3707,6 +3707,46 @@
|
|
|
3707
3707
|
(options.responseFormat === 'binary' ||
|
|
3708
3708
|
options.responseFormat === 'no_content'));
|
|
3709
3709
|
};
|
|
3710
|
+
function createAbortSignalWithTimeout(baseSignal, timeoutMs) {
|
|
3711
|
+
var _a;
|
|
3712
|
+
const controller = new AbortController();
|
|
3713
|
+
const upstream = baseSignal;
|
|
3714
|
+
let timedOut = false;
|
|
3715
|
+
const abortFromUpstream = () => {
|
|
3716
|
+
try {
|
|
3717
|
+
controller.abort(upstream === null || upstream === void 0 ? void 0 : upstream.reason);
|
|
3718
|
+
}
|
|
3719
|
+
catch (_a) {
|
|
3720
|
+
controller.abort();
|
|
3721
|
+
}
|
|
3722
|
+
};
|
|
3723
|
+
if (upstream) {
|
|
3724
|
+
if (upstream.aborted) {
|
|
3725
|
+
abortFromUpstream();
|
|
3726
|
+
}
|
|
3727
|
+
else {
|
|
3728
|
+
upstream.addEventListener('abort', abortFromUpstream, { once: true });
|
|
3729
|
+
}
|
|
3730
|
+
}
|
|
3731
|
+
const timeoutId = setTimeout(() => {
|
|
3732
|
+
timedOut = true;
|
|
3733
|
+
controller.abort();
|
|
3734
|
+
}, timeoutMs);
|
|
3735
|
+
// Node.js timers keep the event loop alive. If the only pending work is this
|
|
3736
|
+
// watchdog timeout, we don't want it to prevent process exit (e.g. short CLI
|
|
3737
|
+
// runs, tests, scripts). `unref()` detaches the timer from the event loop.
|
|
3738
|
+
// It’s a no-op in environments where `unref` isn’t available.
|
|
3739
|
+
(_a = timeoutId === null || timeoutId === void 0 ? void 0 : timeoutId.unref) === null || _a === void 0 ? void 0 : _a.call(timeoutId);
|
|
3740
|
+
return {
|
|
3741
|
+
signal: controller.signal,
|
|
3742
|
+
clearTimeout: () => {
|
|
3743
|
+
clearTimeout(timeoutId);
|
|
3744
|
+
if (upstream)
|
|
3745
|
+
upstream.removeEventListener('abort', abortFromUpstream);
|
|
3746
|
+
},
|
|
3747
|
+
didTimeout: () => timedOut,
|
|
3748
|
+
};
|
|
3749
|
+
}
|
|
3710
3750
|
function createRequestInit(options) {
|
|
3711
3751
|
return __awaiter$1(this, void 0, void 0, function* () {
|
|
3712
3752
|
var _a, _b;
|
|
@@ -3809,11 +3849,18 @@
|
|
|
3809
3849
|
: void 0, multipartData: multipartBuffer
|
|
3810
3850
|
? multipartBufferToStream(multipartBuffer)
|
|
3811
3851
|
: void 0 }));
|
|
3852
|
+
const timeoutConfig = (_j = fetchOptions.networkSession) === null || _j === void 0 ? void 0 : _j.timeoutConfig;
|
|
3853
|
+
const timeoutMs = timeoutConfig === null || timeoutConfig === void 0 ? void 0 : timeoutConfig.timeoutMs;
|
|
3854
|
+
const requestTimeout = timeoutMs != null && timeoutMs > 0
|
|
3855
|
+
? createAbortSignalWithTimeout(requestInit.signal, timeoutMs)
|
|
3856
|
+
: undefined;
|
|
3857
|
+
const requestInitWithTimeout = requestTimeout
|
|
3858
|
+
? Object.assign(Object.assign({}, requestInit), { signal: requestTimeout.signal }) : requestInit;
|
|
3812
3859
|
try {
|
|
3813
|
-
const
|
|
3860
|
+
const requestUrl = ''.concat(fetchOptions.url, Object.keys(params).length === 0 || fetchOptions.url.endsWith('?')
|
|
3814
3861
|
? ''
|
|
3815
|
-
: '?', new URLSearchParams(params).toString())
|
|
3816
|
-
const
|
|
3862
|
+
: '?', new URLSearchParams(params).toString());
|
|
3863
|
+
const response = yield nodeFetch(requestUrl, Object.assign(Object.assign({}, requestInitWithTimeout), { redirect: isBrowser() ? 'follow' : 'manual' }));
|
|
3817
3864
|
const ignoreResponseBody = fetchOptions.followRedirects === false;
|
|
3818
3865
|
let data;
|
|
3819
3866
|
let content = generateByteStreamFromBuffer(new Uint8Array().buffer);
|
|
@@ -3845,16 +3892,24 @@
|
|
|
3845
3892
|
catch (error) {
|
|
3846
3893
|
isExceptionCase = true;
|
|
3847
3894
|
numberOfRetriesOnException++;
|
|
3848
|
-
|
|
3895
|
+
if (requestTimeout === null || requestTimeout === void 0 ? void 0 : requestTimeout.didTimeout()) {
|
|
3896
|
+
caughtError = new Error(`Connection timeout after ${timeoutMs}ms`);
|
|
3897
|
+
}
|
|
3898
|
+
else {
|
|
3899
|
+
caughtError = error instanceof Error ? error : new Error(String(error));
|
|
3900
|
+
}
|
|
3849
3901
|
fetchResponse = fetchResponse !== null && fetchResponse !== void 0 ? fetchResponse : { status: 0, headers: {} };
|
|
3850
3902
|
}
|
|
3903
|
+
finally {
|
|
3904
|
+
requestTimeout === null || requestTimeout === void 0 ? void 0 : requestTimeout.clearTimeout();
|
|
3905
|
+
}
|
|
3851
3906
|
const attemptForRetry = isExceptionCase
|
|
3852
3907
|
? numberOfRetriesOnException
|
|
3853
3908
|
: attemptNumber;
|
|
3854
3909
|
const shouldRetry = yield retryStrategy.shouldRetry(fetchOptions, fetchResponse, attemptForRetry);
|
|
3855
3910
|
if (shouldRetry) {
|
|
3856
3911
|
const retryTimeout = retryStrategy.retryAfter(fetchOptions, fetchResponse, attemptForRetry);
|
|
3857
|
-
yield new Promise((resolve) => setTimeout(resolve, retryTimeout));
|
|
3912
|
+
yield new Promise((resolve) => setTimeout(resolve, retryTimeout * 1000));
|
|
3858
3913
|
return this.fetch(Object.assign(Object.assign({}, options), { attemptNumber: attemptNumber + 1, numberOfRetriesOnException: numberOfRetriesOnException, fileStream: fileStreamBuffer
|
|
3859
3914
|
? generateByteStreamFromBuffer(fileStreamBuffer)
|
|
3860
3915
|
: void 0, multipartData: multipartBuffer
|
|
@@ -3891,7 +3946,7 @@
|
|
|
3891
3946
|
: [];
|
|
3892
3947
|
if (fetchResponse.status === 0) {
|
|
3893
3948
|
throw new BoxSdkError({
|
|
3894
|
-
message: `Unexpected Error occurred`,
|
|
3949
|
+
message: (caughtError === null || caughtError === void 0 ? void 0 : caughtError.message) || `Unexpected Error occurred`,
|
|
3895
3950
|
timestamp: `${Date.now()}`,
|
|
3896
3951
|
error: caughtError,
|
|
3897
3952
|
});
|
|
@@ -3976,6 +4031,9 @@
|
|
|
3976
4031
|
if (fields.dataSanitizer !== undefined) {
|
|
3977
4032
|
this.dataSanitizer = fields.dataSanitizer;
|
|
3978
4033
|
}
|
|
4034
|
+
if (fields.timeoutConfig !== undefined) {
|
|
4035
|
+
this.timeoutConfig = fields.timeoutConfig;
|
|
4036
|
+
}
|
|
3979
4037
|
}
|
|
3980
4038
|
/**
|
|
3981
4039
|
* Generate a fresh network session by duplicating the existing configuration and network parameters, while also including additional headers to be attached to every API call.
|
|
@@ -4013,6 +4071,7 @@
|
|
|
4013
4071
|
networkClient: this.networkClient,
|
|
4014
4072
|
retryStrategy: this.retryStrategy,
|
|
4015
4073
|
dataSanitizer: this.dataSanitizer,
|
|
4074
|
+
timeoutConfig: this.timeoutConfig,
|
|
4016
4075
|
});
|
|
4017
4076
|
}
|
|
4018
4077
|
/**
|
|
@@ -4031,6 +4090,7 @@
|
|
|
4031
4090
|
networkClient: this.networkClient,
|
|
4032
4091
|
retryStrategy: this.retryStrategy,
|
|
4033
4092
|
dataSanitizer: this.dataSanitizer,
|
|
4093
|
+
timeoutConfig: this.timeoutConfig,
|
|
4034
4094
|
});
|
|
4035
4095
|
}
|
|
4036
4096
|
/**
|
|
@@ -4049,6 +4109,7 @@
|
|
|
4049
4109
|
networkClient: this.networkClient,
|
|
4050
4110
|
retryStrategy: this.retryStrategy,
|
|
4051
4111
|
dataSanitizer: this.dataSanitizer,
|
|
4112
|
+
timeoutConfig: this.timeoutConfig,
|
|
4052
4113
|
});
|
|
4053
4114
|
}
|
|
4054
4115
|
/**
|
|
@@ -4067,6 +4128,7 @@
|
|
|
4067
4128
|
networkClient: this.networkClient,
|
|
4068
4129
|
retryStrategy: this.retryStrategy,
|
|
4069
4130
|
dataSanitizer: this.dataSanitizer,
|
|
4131
|
+
timeoutConfig: this.timeoutConfig,
|
|
4070
4132
|
});
|
|
4071
4133
|
}
|
|
4072
4134
|
/**
|
|
@@ -4085,6 +4147,7 @@
|
|
|
4085
4147
|
networkClient: networkClient,
|
|
4086
4148
|
retryStrategy: this.retryStrategy,
|
|
4087
4149
|
dataSanitizer: this.dataSanitizer,
|
|
4150
|
+
timeoutConfig: this.timeoutConfig,
|
|
4088
4151
|
});
|
|
4089
4152
|
}
|
|
4090
4153
|
/**
|
|
@@ -4103,6 +4166,7 @@
|
|
|
4103
4166
|
networkClient: this.networkClient,
|
|
4104
4167
|
retryStrategy: retryStrategy,
|
|
4105
4168
|
dataSanitizer: this.dataSanitizer,
|
|
4169
|
+
timeoutConfig: this.timeoutConfig,
|
|
4106
4170
|
});
|
|
4107
4171
|
}
|
|
4108
4172
|
/**
|
|
@@ -4122,6 +4186,26 @@
|
|
|
4122
4186
|
networkClient: this.networkClient,
|
|
4123
4187
|
retryStrategy: this.retryStrategy,
|
|
4124
4188
|
dataSanitizer: dataSanitizer,
|
|
4189
|
+
timeoutConfig: this.timeoutConfig,
|
|
4190
|
+
});
|
|
4191
|
+
}
|
|
4192
|
+
/**
|
|
4193
|
+
* Generate a fresh network session by duplicating the existing configuration and network parameters, while also applying timeout config
|
|
4194
|
+
* @param {TimeoutConfig} timeoutConfig
|
|
4195
|
+
* @returns {NetworkSession}
|
|
4196
|
+
*/
|
|
4197
|
+
withTimeoutConfig(timeoutConfig) {
|
|
4198
|
+
return new NetworkSession({
|
|
4199
|
+
additionalHeaders: this.additionalHeaders,
|
|
4200
|
+
baseUrls: this.baseUrls,
|
|
4201
|
+
interceptors: this.interceptors,
|
|
4202
|
+
agent: this.agent,
|
|
4203
|
+
agentOptions: this.agentOptions,
|
|
4204
|
+
proxyConfig: this.proxyConfig,
|
|
4205
|
+
networkClient: this.networkClient,
|
|
4206
|
+
retryStrategy: this.retryStrategy,
|
|
4207
|
+
dataSanitizer: this.dataSanitizer,
|
|
4208
|
+
timeoutConfig: timeoutConfig,
|
|
4125
4209
|
});
|
|
4126
4210
|
}
|
|
4127
4211
|
}
|
|
@@ -19527,6 +19611,8 @@
|
|
|
19527
19611
|
*
|
|
19528
19612
|
* This endpoint defaults to use offset-based pagination, yet also supports
|
|
19529
19613
|
* marker-based pagination using the `marker` parameter.
|
|
19614
|
+
*
|
|
19615
|
+
* The number of entries returned may be less than `total_count`. For example, if a user deletes items from a shared folder and is later removed as a collaborator, those deleted items will no longer appear in this endpoint’s results, even though they are still included in `total_count`.
|
|
19530
19616
|
* @param {GetTrashedItemsQueryParams} queryParams Query parameters of getTrashedItems method
|
|
19531
19617
|
* @param {GetTrashedItemsHeadersInput} headersInput Headers of getTrashedItems method
|
|
19532
19618
|
* @param {CancellationToken} cancellationToken Token used for request cancellation.
|
|
@@ -32264,24 +32350,53 @@
|
|
|
32264
32350
|
});
|
|
32265
32351
|
}
|
|
32266
32352
|
|
|
32353
|
+
function deserializeLegalHoldPolicyAssignedItemTypeField(val) {
|
|
32354
|
+
if (val == 'file') {
|
|
32355
|
+
return val;
|
|
32356
|
+
}
|
|
32357
|
+
if (val == 'file_version') {
|
|
32358
|
+
return val;
|
|
32359
|
+
}
|
|
32360
|
+
if (val == 'folder') {
|
|
32361
|
+
return val;
|
|
32362
|
+
}
|
|
32363
|
+
if (val == 'user') {
|
|
32364
|
+
return val;
|
|
32365
|
+
}
|
|
32366
|
+
if (val == 'ownership') {
|
|
32367
|
+
return val;
|
|
32368
|
+
}
|
|
32369
|
+
if (val == 'interactions') {
|
|
32370
|
+
return val;
|
|
32371
|
+
}
|
|
32372
|
+
throw new BoxSdkError({
|
|
32373
|
+
message: "Can't deserialize LegalHoldPolicyAssignedItemTypeField",
|
|
32374
|
+
});
|
|
32375
|
+
}
|
|
32267
32376
|
function deserializeLegalHoldPolicyAssignedItem(val) {
|
|
32268
32377
|
if (!sdIsMap(val)) {
|
|
32269
32378
|
throw new BoxSdkError({
|
|
32270
32379
|
message: 'Expecting a map for "LegalHoldPolicyAssignedItem"',
|
|
32271
32380
|
});
|
|
32272
32381
|
}
|
|
32273
|
-
if (val.type ==
|
|
32274
|
-
|
|
32382
|
+
if (val.type == void 0) {
|
|
32383
|
+
throw new BoxSdkError({
|
|
32384
|
+
message: 'Expecting "type" of type "LegalHoldPolicyAssignedItem" to be defined',
|
|
32385
|
+
});
|
|
32275
32386
|
}
|
|
32276
|
-
|
|
32277
|
-
|
|
32387
|
+
const type = deserializeLegalHoldPolicyAssignedItemTypeField(val.type);
|
|
32388
|
+
if (val.id == void 0) {
|
|
32389
|
+
throw new BoxSdkError({
|
|
32390
|
+
message: 'Expecting "id" of type "LegalHoldPolicyAssignedItem" to be defined',
|
|
32391
|
+
});
|
|
32278
32392
|
}
|
|
32279
|
-
if (val.
|
|
32280
|
-
|
|
32393
|
+
if (!sdIsString(val.id)) {
|
|
32394
|
+
throw new BoxSdkError({
|
|
32395
|
+
message: 'Expecting string for "id" of type "LegalHoldPolicyAssignedItem"',
|
|
32396
|
+
});
|
|
32281
32397
|
}
|
|
32282
|
-
|
|
32283
|
-
|
|
32284
|
-
});
|
|
32398
|
+
const id = val.id;
|
|
32399
|
+
return { type: type, id: id };
|
|
32285
32400
|
}
|
|
32286
32401
|
|
|
32287
32402
|
function deserializeLegalHoldPolicyAssignment(val) {
|
|
@@ -43170,6 +43285,21 @@
|
|
|
43170
43285
|
})(v),
|
|
43171
43286
|
]))
|
|
43172
43287
|
: {};
|
|
43288
|
+
if (!(val.reference == void 0) && !sdIsMap(val.reference)) {
|
|
43289
|
+
throw new BoxSdkError({
|
|
43290
|
+
message: 'Expecting object for "reference" of type "AiExtractStructuredResponse"',
|
|
43291
|
+
});
|
|
43292
|
+
}
|
|
43293
|
+
const reference = val.reference == void 0
|
|
43294
|
+
? void 0
|
|
43295
|
+
: sdIsMap(val.reference)
|
|
43296
|
+
? Object.fromEntries(Object.entries(val.reference).map(([k, v]) => [
|
|
43297
|
+
k,
|
|
43298
|
+
(function (v) {
|
|
43299
|
+
return v;
|
|
43300
|
+
})(v),
|
|
43301
|
+
]))
|
|
43302
|
+
: {};
|
|
43173
43303
|
const aiAgentInfo = val.ai_agent_info == void 0
|
|
43174
43304
|
? void 0
|
|
43175
43305
|
: deserializeAiAgentInfo(val.ai_agent_info);
|
|
@@ -43178,6 +43308,7 @@
|
|
|
43178
43308
|
createdAt: createdAt,
|
|
43179
43309
|
completionReason: completionReason,
|
|
43180
43310
|
confidenceScore: confidenceScore,
|
|
43311
|
+
reference: reference,
|
|
43181
43312
|
aiAgentInfo: aiAgentInfo,
|
|
43182
43313
|
};
|
|
43183
43314
|
}
|
|
@@ -43235,6 +43366,7 @@
|
|
|
43235
43366
|
return serializeAiExtractStructuredFieldsField(item);
|
|
43236
43367
|
}),
|
|
43237
43368
|
['include_confidence_score']: val.includeConfidenceScore,
|
|
43369
|
+
['include_reference']: val.includeReference,
|
|
43238
43370
|
['ai_agent']: val.aiAgent == void 0
|
|
43239
43371
|
? val.aiAgent
|
|
43240
43372
|
: serializeAiExtractStructuredAgent(val.aiAgent),
|
|
@@ -48992,6 +49124,15 @@
|
|
|
48992
49124
|
const canSharedLinkBeCreated = val.can_shared_link_be_created == void 0
|
|
48993
49125
|
? void 0
|
|
48994
49126
|
: val.can_shared_link_be_created;
|
|
49127
|
+
if (!(val.can_public_shared_link_be_created == void 0) &&
|
|
49128
|
+
!sdIsBoolean(val.can_public_shared_link_be_created)) {
|
|
49129
|
+
throw new BoxSdkError({
|
|
49130
|
+
message: 'Expecting boolean for "can_public_shared_link_be_created" of type "HubV2025R0"',
|
|
49131
|
+
});
|
|
49132
|
+
}
|
|
49133
|
+
const canPublicSharedLinkBeCreated = val.can_public_shared_link_be_created == void 0
|
|
49134
|
+
? void 0
|
|
49135
|
+
: val.can_public_shared_link_be_created;
|
|
48995
49136
|
if (val.id == void 0) {
|
|
48996
49137
|
throw new BoxSdkError({
|
|
48997
49138
|
message: 'Expecting "id" of type "HubV2025R0" to be defined',
|
|
@@ -49021,6 +49162,7 @@
|
|
|
49021
49162
|
isCollaborationRestrictedToEnterprise: isCollaborationRestrictedToEnterprise,
|
|
49022
49163
|
canNonOwnersInvite: canNonOwnersInvite,
|
|
49023
49164
|
canSharedLinkBeCreated: canSharedLinkBeCreated,
|
|
49165
|
+
canPublicSharedLinkBeCreated: canPublicSharedLinkBeCreated,
|
|
49024
49166
|
id: id,
|
|
49025
49167
|
type: type,
|
|
49026
49168
|
};
|
|
@@ -49073,6 +49215,7 @@
|
|
|
49073
49215
|
['is_collaboration_restricted_to_enterprise']: val.isCollaborationRestrictedToEnterprise,
|
|
49074
49216
|
['can_non_owners_invite']: val.canNonOwnersInvite,
|
|
49075
49217
|
['can_shared_link_be_created']: val.canSharedLinkBeCreated,
|
|
49218
|
+
['can_public_shared_link_be_created']: val.canPublicSharedLinkBeCreated,
|
|
49076
49219
|
};
|
|
49077
49220
|
}
|
|
49078
49221
|
|
|
@@ -50420,6 +50563,12 @@
|
|
|
50420
50563
|
}
|
|
50421
50564
|
const action = val.action == void 0 ? void 0 : val.action;
|
|
50422
50565
|
const item = val.item == void 0 ? void 0 : deserializeHubItemReferenceV2025R0(val.item);
|
|
50566
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
50567
|
+
throw new BoxSdkError({
|
|
50568
|
+
message: 'Expecting string for "parent_id" of type "HubItemOperationResultV2025R0"',
|
|
50569
|
+
});
|
|
50570
|
+
}
|
|
50571
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
50423
50572
|
if (!(val.status == void 0) && !sdIsNumber(val.status)) {
|
|
50424
50573
|
throw new BoxSdkError({
|
|
50425
50574
|
message: 'Expecting number for "status" of type "HubItemOperationResultV2025R0"',
|
|
@@ -50435,6 +50584,7 @@
|
|
|
50435
50584
|
return {
|
|
50436
50585
|
action: action,
|
|
50437
50586
|
item: item,
|
|
50587
|
+
parentId: parentId,
|
|
50438
50588
|
status: status,
|
|
50439
50589
|
error: error,
|
|
50440
50590
|
};
|
|
@@ -50471,6 +50621,7 @@
|
|
|
50471
50621
|
return {
|
|
50472
50622
|
['action']: serializeHubItemOperationV2025R0ActionField(val.action),
|
|
50473
50623
|
['item']: serializeHubItemReferenceV2025R0(val.item),
|
|
50624
|
+
['parent_id']: val.parentId,
|
|
50474
50625
|
};
|
|
50475
50626
|
}
|
|
50476
50627
|
|
|
@@ -50566,6 +50717,7 @@
|
|
|
50566
50717
|
const cancellationToken = optionals.cancellationToken;
|
|
50567
50718
|
const queryParamsMap = prepareParams({
|
|
50568
50719
|
['hub_id']: toString(queryParams.hubId),
|
|
50720
|
+
['parent_id']: toString(queryParams.parentId),
|
|
50569
50721
|
['marker']: toString(queryParams.marker),
|
|
50570
50722
|
['limit']: toString(queryParams.limit),
|
|
50571
50723
|
});
|
|
@@ -50622,6 +50774,590 @@
|
|
|
50622
50774
|
}
|
|
50623
50775
|
}
|
|
50624
50776
|
|
|
50777
|
+
function deserializeHubDocumentPageV2025R0(val) {
|
|
50778
|
+
if (!sdIsMap(val)) {
|
|
50779
|
+
throw new BoxSdkError({
|
|
50780
|
+
message: 'Expecting a map for "HubDocumentPageV2025R0"',
|
|
50781
|
+
});
|
|
50782
|
+
}
|
|
50783
|
+
if (val.id == void 0) {
|
|
50784
|
+
throw new BoxSdkError({
|
|
50785
|
+
message: 'Expecting "id" of type "HubDocumentPageV2025R0" to be defined',
|
|
50786
|
+
});
|
|
50787
|
+
}
|
|
50788
|
+
if (!sdIsString(val.id)) {
|
|
50789
|
+
throw new BoxSdkError({
|
|
50790
|
+
message: 'Expecting string for "id" of type "HubDocumentPageV2025R0"',
|
|
50791
|
+
});
|
|
50792
|
+
}
|
|
50793
|
+
const id = val.id;
|
|
50794
|
+
if (val.type == void 0) {
|
|
50795
|
+
throw new BoxSdkError({
|
|
50796
|
+
message: 'Expecting "type" of type "HubDocumentPageV2025R0" to be defined',
|
|
50797
|
+
});
|
|
50798
|
+
}
|
|
50799
|
+
if (!sdIsString(val.type)) {
|
|
50800
|
+
throw new BoxSdkError({
|
|
50801
|
+
message: 'Expecting string for "type" of type "HubDocumentPageV2025R0"',
|
|
50802
|
+
});
|
|
50803
|
+
}
|
|
50804
|
+
const type = val.type;
|
|
50805
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
50806
|
+
throw new BoxSdkError({
|
|
50807
|
+
message: 'Expecting string for "parent_id" of type "HubDocumentPageV2025R0"',
|
|
50808
|
+
});
|
|
50809
|
+
}
|
|
50810
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
50811
|
+
if (val.title_fragment == void 0) {
|
|
50812
|
+
throw new BoxSdkError({
|
|
50813
|
+
message: 'Expecting "title_fragment" of type "HubDocumentPageV2025R0" to be defined',
|
|
50814
|
+
});
|
|
50815
|
+
}
|
|
50816
|
+
if (!sdIsString(val.title_fragment)) {
|
|
50817
|
+
throw new BoxSdkError({
|
|
50818
|
+
message: 'Expecting string for "title_fragment" of type "HubDocumentPageV2025R0"',
|
|
50819
|
+
});
|
|
50820
|
+
}
|
|
50821
|
+
const titleFragment = val.title_fragment;
|
|
50822
|
+
return {
|
|
50823
|
+
id: id,
|
|
50824
|
+
type: type,
|
|
50825
|
+
parentId: parentId,
|
|
50826
|
+
titleFragment: titleFragment,
|
|
50827
|
+
};
|
|
50828
|
+
}
|
|
50829
|
+
|
|
50830
|
+
function deserializeHubDocumentPagesV2025R0TypeField(val) {
|
|
50831
|
+
if (val == 'document_pages') {
|
|
50832
|
+
return val;
|
|
50833
|
+
}
|
|
50834
|
+
throw new BoxSdkError({
|
|
50835
|
+
message: "Can't deserialize HubDocumentPagesV2025R0TypeField",
|
|
50836
|
+
});
|
|
50837
|
+
}
|
|
50838
|
+
function deserializeHubDocumentPagesV2025R0(val) {
|
|
50839
|
+
if (!sdIsMap(val)) {
|
|
50840
|
+
throw new BoxSdkError({
|
|
50841
|
+
message: 'Expecting a map for "HubDocumentPagesV2025R0"',
|
|
50842
|
+
});
|
|
50843
|
+
}
|
|
50844
|
+
if (val.entries == void 0) {
|
|
50845
|
+
throw new BoxSdkError({
|
|
50846
|
+
message: 'Expecting "entries" of type "HubDocumentPagesV2025R0" to be defined',
|
|
50847
|
+
});
|
|
50848
|
+
}
|
|
50849
|
+
if (!sdIsList(val.entries)) {
|
|
50850
|
+
throw new BoxSdkError({
|
|
50851
|
+
message: 'Expecting array for "entries" of type "HubDocumentPagesV2025R0"',
|
|
50852
|
+
});
|
|
50853
|
+
}
|
|
50854
|
+
const entries = sdIsList(val.entries)
|
|
50855
|
+
? val.entries.map(function (itm) {
|
|
50856
|
+
return deserializeHubDocumentPageV2025R0(itm);
|
|
50857
|
+
})
|
|
50858
|
+
: [];
|
|
50859
|
+
if (val.type == void 0) {
|
|
50860
|
+
throw new BoxSdkError({
|
|
50861
|
+
message: 'Expecting "type" of type "HubDocumentPagesV2025R0" to be defined',
|
|
50862
|
+
});
|
|
50863
|
+
}
|
|
50864
|
+
const type = deserializeHubDocumentPagesV2025R0TypeField(val.type);
|
|
50865
|
+
if (!(val.limit == void 0) && !sdIsNumber(val.limit)) {
|
|
50866
|
+
throw new BoxSdkError({
|
|
50867
|
+
message: 'Expecting number for "limit" of type "HubDocumentPagesV2025R0"',
|
|
50868
|
+
});
|
|
50869
|
+
}
|
|
50870
|
+
const limit = val.limit == void 0 ? void 0 : val.limit;
|
|
50871
|
+
if (!(val.next_marker == void 0) && !sdIsString(val.next_marker)) {
|
|
50872
|
+
throw new BoxSdkError({
|
|
50873
|
+
message: 'Expecting string for "next_marker" of type "HubDocumentPagesV2025R0"',
|
|
50874
|
+
});
|
|
50875
|
+
}
|
|
50876
|
+
const nextMarker = val.next_marker == void 0 ? void 0 : val.next_marker;
|
|
50877
|
+
return {
|
|
50878
|
+
entries: entries,
|
|
50879
|
+
type: type,
|
|
50880
|
+
limit: limit,
|
|
50881
|
+
nextMarker: nextMarker,
|
|
50882
|
+
};
|
|
50883
|
+
}
|
|
50884
|
+
|
|
50885
|
+
function deserializeHubParagraphTextBlockV2025R0TypeField(val) {
|
|
50886
|
+
if (val == 'paragraph') {
|
|
50887
|
+
return val;
|
|
50888
|
+
}
|
|
50889
|
+
throw new BoxSdkError({
|
|
50890
|
+
message: "Can't deserialize HubParagraphTextBlockV2025R0TypeField",
|
|
50891
|
+
});
|
|
50892
|
+
}
|
|
50893
|
+
function deserializeHubParagraphTextBlockV2025R0(val) {
|
|
50894
|
+
if (!sdIsMap(val)) {
|
|
50895
|
+
throw new BoxSdkError({
|
|
50896
|
+
message: 'Expecting a map for "HubParagraphTextBlockV2025R0"',
|
|
50897
|
+
});
|
|
50898
|
+
}
|
|
50899
|
+
if (val.type == void 0) {
|
|
50900
|
+
throw new BoxSdkError({
|
|
50901
|
+
message: 'Expecting "type" of type "HubParagraphTextBlockV2025R0" to be defined',
|
|
50902
|
+
});
|
|
50903
|
+
}
|
|
50904
|
+
const type = deserializeHubParagraphTextBlockV2025R0TypeField(val.type);
|
|
50905
|
+
if (val.fragment == void 0) {
|
|
50906
|
+
throw new BoxSdkError({
|
|
50907
|
+
message: 'Expecting "fragment" of type "HubParagraphTextBlockV2025R0" to be defined',
|
|
50908
|
+
});
|
|
50909
|
+
}
|
|
50910
|
+
if (!sdIsString(val.fragment)) {
|
|
50911
|
+
throw new BoxSdkError({
|
|
50912
|
+
message: 'Expecting string for "fragment" of type "HubParagraphTextBlockV2025R0"',
|
|
50913
|
+
});
|
|
50914
|
+
}
|
|
50915
|
+
const fragment = val.fragment;
|
|
50916
|
+
if (val.id == void 0) {
|
|
50917
|
+
throw new BoxSdkError({
|
|
50918
|
+
message: 'Expecting "id" of type "HubParagraphTextBlockV2025R0" to be defined',
|
|
50919
|
+
});
|
|
50920
|
+
}
|
|
50921
|
+
if (!sdIsString(val.id)) {
|
|
50922
|
+
throw new BoxSdkError({
|
|
50923
|
+
message: 'Expecting string for "id" of type "HubParagraphTextBlockV2025R0"',
|
|
50924
|
+
});
|
|
50925
|
+
}
|
|
50926
|
+
const id = val.id;
|
|
50927
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
50928
|
+
throw new BoxSdkError({
|
|
50929
|
+
message: 'Expecting string for "parent_id" of type "HubParagraphTextBlockV2025R0"',
|
|
50930
|
+
});
|
|
50931
|
+
}
|
|
50932
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
50933
|
+
return {
|
|
50934
|
+
type: type,
|
|
50935
|
+
fragment: fragment,
|
|
50936
|
+
id: id,
|
|
50937
|
+
parentId: parentId,
|
|
50938
|
+
};
|
|
50939
|
+
}
|
|
50940
|
+
|
|
50941
|
+
function deserializeHubSectionTitleTextBlockV2025R0TypeField(val) {
|
|
50942
|
+
if (val == 'section_title') {
|
|
50943
|
+
return val;
|
|
50944
|
+
}
|
|
50945
|
+
throw new BoxSdkError({
|
|
50946
|
+
message: "Can't deserialize HubSectionTitleTextBlockV2025R0TypeField",
|
|
50947
|
+
});
|
|
50948
|
+
}
|
|
50949
|
+
function deserializeHubSectionTitleTextBlockV2025R0(val) {
|
|
50950
|
+
if (!sdIsMap(val)) {
|
|
50951
|
+
throw new BoxSdkError({
|
|
50952
|
+
message: 'Expecting a map for "HubSectionTitleTextBlockV2025R0"',
|
|
50953
|
+
});
|
|
50954
|
+
}
|
|
50955
|
+
if (val.type == void 0) {
|
|
50956
|
+
throw new BoxSdkError({
|
|
50957
|
+
message: 'Expecting "type" of type "HubSectionTitleTextBlockV2025R0" to be defined',
|
|
50958
|
+
});
|
|
50959
|
+
}
|
|
50960
|
+
const type = deserializeHubSectionTitleTextBlockV2025R0TypeField(val.type);
|
|
50961
|
+
if (val.fragment == void 0) {
|
|
50962
|
+
throw new BoxSdkError({
|
|
50963
|
+
message: 'Expecting "fragment" of type "HubSectionTitleTextBlockV2025R0" to be defined',
|
|
50964
|
+
});
|
|
50965
|
+
}
|
|
50966
|
+
if (!sdIsString(val.fragment)) {
|
|
50967
|
+
throw new BoxSdkError({
|
|
50968
|
+
message: 'Expecting string for "fragment" of type "HubSectionTitleTextBlockV2025R0"',
|
|
50969
|
+
});
|
|
50970
|
+
}
|
|
50971
|
+
const fragment = val.fragment;
|
|
50972
|
+
if (val.id == void 0) {
|
|
50973
|
+
throw new BoxSdkError({
|
|
50974
|
+
message: 'Expecting "id" of type "HubSectionTitleTextBlockV2025R0" to be defined',
|
|
50975
|
+
});
|
|
50976
|
+
}
|
|
50977
|
+
if (!sdIsString(val.id)) {
|
|
50978
|
+
throw new BoxSdkError({
|
|
50979
|
+
message: 'Expecting string for "id" of type "HubSectionTitleTextBlockV2025R0"',
|
|
50980
|
+
});
|
|
50981
|
+
}
|
|
50982
|
+
const id = val.id;
|
|
50983
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
50984
|
+
throw new BoxSdkError({
|
|
50985
|
+
message: 'Expecting string for "parent_id" of type "HubSectionTitleTextBlockV2025R0"',
|
|
50986
|
+
});
|
|
50987
|
+
}
|
|
50988
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
50989
|
+
return {
|
|
50990
|
+
type: type,
|
|
50991
|
+
fragment: fragment,
|
|
50992
|
+
id: id,
|
|
50993
|
+
parentId: parentId,
|
|
50994
|
+
};
|
|
50995
|
+
}
|
|
50996
|
+
|
|
50997
|
+
function deserializeHubCalloutBoxTextBlockV2025R0TypeField(val) {
|
|
50998
|
+
if (val == 'callout_box') {
|
|
50999
|
+
return val;
|
|
51000
|
+
}
|
|
51001
|
+
throw new BoxSdkError({
|
|
51002
|
+
message: "Can't deserialize HubCalloutBoxTextBlockV2025R0TypeField",
|
|
51003
|
+
});
|
|
51004
|
+
}
|
|
51005
|
+
function deserializeHubCalloutBoxTextBlockV2025R0(val) {
|
|
51006
|
+
if (!sdIsMap(val)) {
|
|
51007
|
+
throw new BoxSdkError({
|
|
51008
|
+
message: 'Expecting a map for "HubCalloutBoxTextBlockV2025R0"',
|
|
51009
|
+
});
|
|
51010
|
+
}
|
|
51011
|
+
if (val.type == void 0) {
|
|
51012
|
+
throw new BoxSdkError({
|
|
51013
|
+
message: 'Expecting "type" of type "HubCalloutBoxTextBlockV2025R0" to be defined',
|
|
51014
|
+
});
|
|
51015
|
+
}
|
|
51016
|
+
const type = deserializeHubCalloutBoxTextBlockV2025R0TypeField(val.type);
|
|
51017
|
+
if (val.fragment == void 0) {
|
|
51018
|
+
throw new BoxSdkError({
|
|
51019
|
+
message: 'Expecting "fragment" of type "HubCalloutBoxTextBlockV2025R0" to be defined',
|
|
51020
|
+
});
|
|
51021
|
+
}
|
|
51022
|
+
if (!sdIsString(val.fragment)) {
|
|
51023
|
+
throw new BoxSdkError({
|
|
51024
|
+
message: 'Expecting string for "fragment" of type "HubCalloutBoxTextBlockV2025R0"',
|
|
51025
|
+
});
|
|
51026
|
+
}
|
|
51027
|
+
const fragment = val.fragment;
|
|
51028
|
+
if (val.id == void 0) {
|
|
51029
|
+
throw new BoxSdkError({
|
|
51030
|
+
message: 'Expecting "id" of type "HubCalloutBoxTextBlockV2025R0" to be defined',
|
|
51031
|
+
});
|
|
51032
|
+
}
|
|
51033
|
+
if (!sdIsString(val.id)) {
|
|
51034
|
+
throw new BoxSdkError({
|
|
51035
|
+
message: 'Expecting string for "id" of type "HubCalloutBoxTextBlockV2025R0"',
|
|
51036
|
+
});
|
|
51037
|
+
}
|
|
51038
|
+
const id = val.id;
|
|
51039
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
51040
|
+
throw new BoxSdkError({
|
|
51041
|
+
message: 'Expecting string for "parent_id" of type "HubCalloutBoxTextBlockV2025R0"',
|
|
51042
|
+
});
|
|
51043
|
+
}
|
|
51044
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
51045
|
+
return {
|
|
51046
|
+
type: type,
|
|
51047
|
+
fragment: fragment,
|
|
51048
|
+
id: id,
|
|
51049
|
+
parentId: parentId,
|
|
51050
|
+
};
|
|
51051
|
+
}
|
|
51052
|
+
|
|
51053
|
+
function deserializeHubItemListBlockV2025R0TypeField(val) {
|
|
51054
|
+
if (val == 'item_list') {
|
|
51055
|
+
return val;
|
|
51056
|
+
}
|
|
51057
|
+
throw new BoxSdkError({
|
|
51058
|
+
message: "Can't deserialize HubItemListBlockV2025R0TypeField",
|
|
51059
|
+
});
|
|
51060
|
+
}
|
|
51061
|
+
function deserializeHubItemListBlockV2025R0(val) {
|
|
51062
|
+
if (!sdIsMap(val)) {
|
|
51063
|
+
throw new BoxSdkError({
|
|
51064
|
+
message: 'Expecting a map for "HubItemListBlockV2025R0"',
|
|
51065
|
+
});
|
|
51066
|
+
}
|
|
51067
|
+
if (val.type == void 0) {
|
|
51068
|
+
throw new BoxSdkError({
|
|
51069
|
+
message: 'Expecting "type" of type "HubItemListBlockV2025R0" to be defined',
|
|
51070
|
+
});
|
|
51071
|
+
}
|
|
51072
|
+
const type = deserializeHubItemListBlockV2025R0TypeField(val.type);
|
|
51073
|
+
if (val.id == void 0) {
|
|
51074
|
+
throw new BoxSdkError({
|
|
51075
|
+
message: 'Expecting "id" of type "HubItemListBlockV2025R0" to be defined',
|
|
51076
|
+
});
|
|
51077
|
+
}
|
|
51078
|
+
if (!sdIsString(val.id)) {
|
|
51079
|
+
throw new BoxSdkError({
|
|
51080
|
+
message: 'Expecting string for "id" of type "HubItemListBlockV2025R0"',
|
|
51081
|
+
});
|
|
51082
|
+
}
|
|
51083
|
+
const id = val.id;
|
|
51084
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
51085
|
+
throw new BoxSdkError({
|
|
51086
|
+
message: 'Expecting string for "parent_id" of type "HubItemListBlockV2025R0"',
|
|
51087
|
+
});
|
|
51088
|
+
}
|
|
51089
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
51090
|
+
return {
|
|
51091
|
+
type: type,
|
|
51092
|
+
id: id,
|
|
51093
|
+
parentId: parentId,
|
|
51094
|
+
};
|
|
51095
|
+
}
|
|
51096
|
+
|
|
51097
|
+
function deserializeHubDividerBlockV2025R0TypeField(val) {
|
|
51098
|
+
if (val == 'divider') {
|
|
51099
|
+
return val;
|
|
51100
|
+
}
|
|
51101
|
+
throw new BoxSdkError({
|
|
51102
|
+
message: "Can't deserialize HubDividerBlockV2025R0TypeField",
|
|
51103
|
+
});
|
|
51104
|
+
}
|
|
51105
|
+
function deserializeHubDividerBlockV2025R0(val) {
|
|
51106
|
+
if (!sdIsMap(val)) {
|
|
51107
|
+
throw new BoxSdkError({
|
|
51108
|
+
message: 'Expecting a map for "HubDividerBlockV2025R0"',
|
|
51109
|
+
});
|
|
51110
|
+
}
|
|
51111
|
+
if (val.type == void 0) {
|
|
51112
|
+
throw new BoxSdkError({
|
|
51113
|
+
message: 'Expecting "type" of type "HubDividerBlockV2025R0" to be defined',
|
|
51114
|
+
});
|
|
51115
|
+
}
|
|
51116
|
+
const type = deserializeHubDividerBlockV2025R0TypeField(val.type);
|
|
51117
|
+
if (val.id == void 0) {
|
|
51118
|
+
throw new BoxSdkError({
|
|
51119
|
+
message: 'Expecting "id" of type "HubDividerBlockV2025R0" to be defined',
|
|
51120
|
+
});
|
|
51121
|
+
}
|
|
51122
|
+
if (!sdIsString(val.id)) {
|
|
51123
|
+
throw new BoxSdkError({
|
|
51124
|
+
message: 'Expecting string for "id" of type "HubDividerBlockV2025R0"',
|
|
51125
|
+
});
|
|
51126
|
+
}
|
|
51127
|
+
const id = val.id;
|
|
51128
|
+
if (!(val.parent_id == void 0) && !sdIsString(val.parent_id)) {
|
|
51129
|
+
throw new BoxSdkError({
|
|
51130
|
+
message: 'Expecting string for "parent_id" of type "HubDividerBlockV2025R0"',
|
|
51131
|
+
});
|
|
51132
|
+
}
|
|
51133
|
+
const parentId = val.parent_id == void 0 ? void 0 : val.parent_id;
|
|
51134
|
+
return {
|
|
51135
|
+
type: type,
|
|
51136
|
+
id: id,
|
|
51137
|
+
parentId: parentId,
|
|
51138
|
+
};
|
|
51139
|
+
}
|
|
51140
|
+
|
|
51141
|
+
function deserializeHubDocumentBlockEntryV2025R0(val) {
|
|
51142
|
+
if (!sdIsMap(val)) {
|
|
51143
|
+
throw new BoxSdkError({
|
|
51144
|
+
message: 'Expecting a map for "HubDocumentBlockEntryV2025R0"',
|
|
51145
|
+
});
|
|
51146
|
+
}
|
|
51147
|
+
if (val.type == 'paragraph') {
|
|
51148
|
+
return deserializeHubParagraphTextBlockV2025R0(val);
|
|
51149
|
+
}
|
|
51150
|
+
if (val.type == 'section_title') {
|
|
51151
|
+
return deserializeHubSectionTitleTextBlockV2025R0(val);
|
|
51152
|
+
}
|
|
51153
|
+
if (val.type == 'callout_box') {
|
|
51154
|
+
return deserializeHubCalloutBoxTextBlockV2025R0(val);
|
|
51155
|
+
}
|
|
51156
|
+
if (val.type == 'item_list') {
|
|
51157
|
+
return deserializeHubItemListBlockV2025R0(val);
|
|
51158
|
+
}
|
|
51159
|
+
if (val.type == 'divider') {
|
|
51160
|
+
return deserializeHubDividerBlockV2025R0(val);
|
|
51161
|
+
}
|
|
51162
|
+
throw new BoxSdkError({
|
|
51163
|
+
message: "Can't deserialize HubDocumentBlockEntryV2025R0",
|
|
51164
|
+
});
|
|
51165
|
+
}
|
|
51166
|
+
|
|
51167
|
+
function deserializeHubDocumentBlocksV2025R0TypeField(val) {
|
|
51168
|
+
if (val == 'document_blocks') {
|
|
51169
|
+
return val;
|
|
51170
|
+
}
|
|
51171
|
+
throw new BoxSdkError({
|
|
51172
|
+
message: "Can't deserialize HubDocumentBlocksV2025R0TypeField",
|
|
51173
|
+
});
|
|
51174
|
+
}
|
|
51175
|
+
function deserializeHubDocumentBlocksV2025R0(val) {
|
|
51176
|
+
if (!sdIsMap(val)) {
|
|
51177
|
+
throw new BoxSdkError({
|
|
51178
|
+
message: 'Expecting a map for "HubDocumentBlocksV2025R0"',
|
|
51179
|
+
});
|
|
51180
|
+
}
|
|
51181
|
+
if (val.entries == void 0) {
|
|
51182
|
+
throw new BoxSdkError({
|
|
51183
|
+
message: 'Expecting "entries" of type "HubDocumentBlocksV2025R0" to be defined',
|
|
51184
|
+
});
|
|
51185
|
+
}
|
|
51186
|
+
if (!sdIsList(val.entries)) {
|
|
51187
|
+
throw new BoxSdkError({
|
|
51188
|
+
message: 'Expecting array for "entries" of type "HubDocumentBlocksV2025R0"',
|
|
51189
|
+
});
|
|
51190
|
+
}
|
|
51191
|
+
const entries = sdIsList(val.entries)
|
|
51192
|
+
? val.entries.map(function (itm) {
|
|
51193
|
+
return deserializeHubDocumentBlockEntryV2025R0(itm);
|
|
51194
|
+
})
|
|
51195
|
+
: [];
|
|
51196
|
+
if (val.type == void 0) {
|
|
51197
|
+
throw new BoxSdkError({
|
|
51198
|
+
message: 'Expecting "type" of type "HubDocumentBlocksV2025R0" to be defined',
|
|
51199
|
+
});
|
|
51200
|
+
}
|
|
51201
|
+
const type = deserializeHubDocumentBlocksV2025R0TypeField(val.type);
|
|
51202
|
+
if (!(val.limit == void 0) && !sdIsNumber(val.limit)) {
|
|
51203
|
+
throw new BoxSdkError({
|
|
51204
|
+
message: 'Expecting number for "limit" of type "HubDocumentBlocksV2025R0"',
|
|
51205
|
+
});
|
|
51206
|
+
}
|
|
51207
|
+
const limit = val.limit == void 0 ? void 0 : val.limit;
|
|
51208
|
+
if (!(val.next_marker == void 0) && !sdIsString(val.next_marker)) {
|
|
51209
|
+
throw new BoxSdkError({
|
|
51210
|
+
message: 'Expecting string for "next_marker" of type "HubDocumentBlocksV2025R0"',
|
|
51211
|
+
});
|
|
51212
|
+
}
|
|
51213
|
+
const nextMarker = val.next_marker == void 0 ? void 0 : val.next_marker;
|
|
51214
|
+
return {
|
|
51215
|
+
entries: entries,
|
|
51216
|
+
type: type,
|
|
51217
|
+
limit: limit,
|
|
51218
|
+
nextMarker: nextMarker,
|
|
51219
|
+
};
|
|
51220
|
+
}
|
|
51221
|
+
|
|
51222
|
+
class GetHubDocumentPagesV2025R0Optionals {
|
|
51223
|
+
constructor(fields) {
|
|
51224
|
+
this.headers = new GetHubDocumentPagesV2025R0Headers({});
|
|
51225
|
+
this.cancellationToken = void 0;
|
|
51226
|
+
if (fields.headers !== undefined) {
|
|
51227
|
+
this.headers = fields.headers;
|
|
51228
|
+
}
|
|
51229
|
+
if (fields.cancellationToken !== undefined) {
|
|
51230
|
+
this.cancellationToken = fields.cancellationToken;
|
|
51231
|
+
}
|
|
51232
|
+
}
|
|
51233
|
+
}
|
|
51234
|
+
class GetHubDocumentBlocksV2025R0Optionals {
|
|
51235
|
+
constructor(fields) {
|
|
51236
|
+
this.headers = new GetHubDocumentBlocksV2025R0Headers({});
|
|
51237
|
+
this.cancellationToken = void 0;
|
|
51238
|
+
if (fields.headers !== undefined) {
|
|
51239
|
+
this.headers = fields.headers;
|
|
51240
|
+
}
|
|
51241
|
+
if (fields.cancellationToken !== undefined) {
|
|
51242
|
+
this.cancellationToken = fields.cancellationToken;
|
|
51243
|
+
}
|
|
51244
|
+
}
|
|
51245
|
+
}
|
|
51246
|
+
class GetHubDocumentPagesV2025R0Headers {
|
|
51247
|
+
constructor(fields) {
|
|
51248
|
+
/**
|
|
51249
|
+
* Version header. */
|
|
51250
|
+
this.boxVersion = '2025.0';
|
|
51251
|
+
/**
|
|
51252
|
+
* Extra headers that will be included in the HTTP request. */
|
|
51253
|
+
this.extraHeaders = {};
|
|
51254
|
+
if (fields.boxVersion !== undefined) {
|
|
51255
|
+
this.boxVersion = fields.boxVersion;
|
|
51256
|
+
}
|
|
51257
|
+
if (fields.extraHeaders !== undefined) {
|
|
51258
|
+
this.extraHeaders = fields.extraHeaders;
|
|
51259
|
+
}
|
|
51260
|
+
}
|
|
51261
|
+
}
|
|
51262
|
+
class GetHubDocumentBlocksV2025R0Headers {
|
|
51263
|
+
constructor(fields) {
|
|
51264
|
+
/**
|
|
51265
|
+
* Version header. */
|
|
51266
|
+
this.boxVersion = '2025.0';
|
|
51267
|
+
/**
|
|
51268
|
+
* Extra headers that will be included in the HTTP request. */
|
|
51269
|
+
this.extraHeaders = {};
|
|
51270
|
+
if (fields.boxVersion !== undefined) {
|
|
51271
|
+
this.boxVersion = fields.boxVersion;
|
|
51272
|
+
}
|
|
51273
|
+
if (fields.extraHeaders !== undefined) {
|
|
51274
|
+
this.extraHeaders = fields.extraHeaders;
|
|
51275
|
+
}
|
|
51276
|
+
}
|
|
51277
|
+
}
|
|
51278
|
+
class HubDocumentManager {
|
|
51279
|
+
constructor(fields) {
|
|
51280
|
+
this.networkSession = new NetworkSession({});
|
|
51281
|
+
if (fields.auth !== undefined) {
|
|
51282
|
+
this.auth = fields.auth;
|
|
51283
|
+
}
|
|
51284
|
+
if (fields.networkSession !== undefined) {
|
|
51285
|
+
this.networkSession = fields.networkSession;
|
|
51286
|
+
}
|
|
51287
|
+
}
|
|
51288
|
+
/**
|
|
51289
|
+
* Retrieves a list of Hub Document Pages for the specified hub.
|
|
51290
|
+
* Includes both root-level pages and sub pages.
|
|
51291
|
+
* @param {GetHubDocumentPagesV2025R0QueryParams} queryParams Query parameters of getHubDocumentPagesV2025R0 method
|
|
51292
|
+
* @param {GetHubDocumentPagesV2025R0OptionalsInput} optionalsInput
|
|
51293
|
+
* @returns {Promise<HubDocumentPagesV2025R0>}
|
|
51294
|
+
*/
|
|
51295
|
+
getHubDocumentPagesV2025R0(queryParams_1) {
|
|
51296
|
+
return __awaiter$1(this, arguments, void 0, function* (queryParams, optionalsInput = {}) {
|
|
51297
|
+
const optionals = new GetHubDocumentPagesV2025R0Optionals({
|
|
51298
|
+
headers: optionalsInput.headers,
|
|
51299
|
+
cancellationToken: optionalsInput.cancellationToken,
|
|
51300
|
+
});
|
|
51301
|
+
const headers = optionals.headers;
|
|
51302
|
+
const cancellationToken = optionals.cancellationToken;
|
|
51303
|
+
const queryParamsMap = prepareParams({
|
|
51304
|
+
['hub_id']: toString(queryParams.hubId),
|
|
51305
|
+
['marker']: toString(queryParams.marker),
|
|
51306
|
+
['limit']: toString(queryParams.limit),
|
|
51307
|
+
});
|
|
51308
|
+
const headersMap = prepareParams(Object.assign({ ['box-version']: toString(headers.boxVersion) }, headers.extraHeaders));
|
|
51309
|
+
const response = yield this.networkSession.networkClient.fetch(new FetchOptions({
|
|
51310
|
+
url: ''.concat(this.networkSession.baseUrls.baseUrl, '/2.0/hub_document_pages'),
|
|
51311
|
+
method: 'GET',
|
|
51312
|
+
params: queryParamsMap,
|
|
51313
|
+
headers: headersMap,
|
|
51314
|
+
responseFormat: 'json',
|
|
51315
|
+
auth: this.auth,
|
|
51316
|
+
networkSession: this.networkSession,
|
|
51317
|
+
cancellationToken: cancellationToken,
|
|
51318
|
+
}));
|
|
51319
|
+
return Object.assign(Object.assign({}, deserializeHubDocumentPagesV2025R0(response.data)), { rawData: response.data });
|
|
51320
|
+
});
|
|
51321
|
+
}
|
|
51322
|
+
/**
|
|
51323
|
+
* Retrieves a sorted list of all Hub Document Blocks on a specified page in the hub document, excluding items.
|
|
51324
|
+
* Blocks are hierarchically organized by their `parent_id`.
|
|
51325
|
+
* Blocks are sorted in order based on user specification in the user interface.
|
|
51326
|
+
* The response will only include content blocks that belong to the specified page. This will not include sub pages or sub page content blocks.
|
|
51327
|
+
* @param {GetHubDocumentBlocksV2025R0QueryParams} queryParams Query parameters of getHubDocumentBlocksV2025R0 method
|
|
51328
|
+
* @param {GetHubDocumentBlocksV2025R0OptionalsInput} optionalsInput
|
|
51329
|
+
* @returns {Promise<HubDocumentBlocksV2025R0>}
|
|
51330
|
+
*/
|
|
51331
|
+
getHubDocumentBlocksV2025R0(queryParams_1) {
|
|
51332
|
+
return __awaiter$1(this, arguments, void 0, function* (queryParams, optionalsInput = {}) {
|
|
51333
|
+
const optionals = new GetHubDocumentBlocksV2025R0Optionals({
|
|
51334
|
+
headers: optionalsInput.headers,
|
|
51335
|
+
cancellationToken: optionalsInput.cancellationToken,
|
|
51336
|
+
});
|
|
51337
|
+
const headers = optionals.headers;
|
|
51338
|
+
const cancellationToken = optionals.cancellationToken;
|
|
51339
|
+
const queryParamsMap = prepareParams({
|
|
51340
|
+
['hub_id']: toString(queryParams.hubId),
|
|
51341
|
+
['page_id']: toString(queryParams.pageId),
|
|
51342
|
+
['marker']: toString(queryParams.marker),
|
|
51343
|
+
['limit']: toString(queryParams.limit),
|
|
51344
|
+
});
|
|
51345
|
+
const headersMap = prepareParams(Object.assign({ ['box-version']: toString(headers.boxVersion) }, headers.extraHeaders));
|
|
51346
|
+
const response = yield this.networkSession.networkClient.fetch(new FetchOptions({
|
|
51347
|
+
url: ''.concat(this.networkSession.baseUrls.baseUrl, '/2.0/hub_document_blocks'),
|
|
51348
|
+
method: 'GET',
|
|
51349
|
+
params: queryParamsMap,
|
|
51350
|
+
headers: headersMap,
|
|
51351
|
+
responseFormat: 'json',
|
|
51352
|
+
auth: this.auth,
|
|
51353
|
+
networkSession: this.networkSession,
|
|
51354
|
+
cancellationToken: cancellationToken,
|
|
51355
|
+
}));
|
|
51356
|
+
return Object.assign(Object.assign({}, deserializeHubDocumentBlocksV2025R0(response.data)), { rawData: response.data });
|
|
51357
|
+
});
|
|
51358
|
+
}
|
|
51359
|
+
}
|
|
51360
|
+
|
|
50625
51361
|
function deserializeShieldListMiniV2025R0TypeField(val) {
|
|
50626
51362
|
if (val == 'shield_list') {
|
|
50627
51363
|
return val;
|
|
@@ -51751,6 +52487,10 @@
|
|
|
51751
52487
|
* Permanently deletes an archive.
|
|
51752
52488
|
*
|
|
51753
52489
|
* To learn more about the archive APIs, see the [Archive API Guide](https://developer.box.com/guides/archives).
|
|
52490
|
+
*
|
|
52491
|
+
* <Danger>
|
|
52492
|
+
* This endpoint is currently unavailable. Please contact support for assistance.
|
|
52493
|
+
* </Danger>
|
|
51754
52494
|
* @param {string} archiveId The ID of the archive.
|
|
51755
52495
|
Example: "982312"
|
|
51756
52496
|
* @param {DeleteArchiveByIdV2025R0OptionalsInput} optionalsInput
|
|
@@ -52311,6 +53051,10 @@
|
|
|
52311
53051
|
auth: this.auth,
|
|
52312
53052
|
networkSession: this.networkSession,
|
|
52313
53053
|
});
|
|
53054
|
+
this.hubDocument = new HubDocumentManager({
|
|
53055
|
+
auth: this.auth,
|
|
53056
|
+
networkSession: this.networkSession,
|
|
53057
|
+
});
|
|
52314
53058
|
this.shieldLists = new ShieldListsManager({
|
|
52315
53059
|
auth: this.auth,
|
|
52316
53060
|
networkSession: this.networkSession,
|
|
@@ -52432,6 +53176,17 @@
|
|
|
52432
53176
|
networkSession: this.networkSession.withProxy(config),
|
|
52433
53177
|
});
|
|
52434
53178
|
}
|
|
53179
|
+
/**
|
|
53180
|
+
* Create a new client with custom timeouts that will be used for every API call
|
|
53181
|
+
* @param {TimeoutConfig} config Timeout configuration.
|
|
53182
|
+
* @returns {BoxClient}
|
|
53183
|
+
*/
|
|
53184
|
+
withTimeouts(config) {
|
|
53185
|
+
return new BoxClient({
|
|
53186
|
+
auth: this.auth,
|
|
53187
|
+
networkSession: this.networkSession.withTimeoutConfig(config),
|
|
53188
|
+
});
|
|
53189
|
+
}
|
|
52435
53190
|
/**
|
|
52436
53191
|
* Create a new client with a custom set of agent options that will be used for every API call
|
|
52437
53192
|
* @param {AgentOptions} agentOptions Custom set of agent options that will be used for every API call
|