UNPKG

@bitrix24/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

43 lines (40 loc) 1.39 kB
/** * @package @bitrix24/b24jssdk * @version 1.1.0 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bitrix24/b24jssdk * @see https://bitrix24.github.io/b24jssdk/ */ import { AbstractInteractionBatch } from './abstract-interaction-batch.mjs'; import { SdkError } from '../../sdk-error.mjs'; var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); const MAX_BATCH_COMMANDS_V3 = 50; class InteractionBatchV3 extends AbstractInteractionBatch { static { __name(this, "InteractionBatchV3"); } get maxSize() { return MAX_BATCH_COMMANDS_V3; } async prepareResponse(response) { if (!this.processingStrategy) { throw new SdkError({ code: "JSSDK_INTERACTION_BATCH_EMPTY_PROCESSING_STRATEGY", description: "ProcessingStrategy not set", status: 500 }); } const responseHelper = { requestId: response.getQuery().requestId, parallelDefaultValue: this.parallelDefaultValue, restrictionManager: this.restrictionManager, response }; const results = await this.processingStrategy.prepareItems(this._commands, responseHelper); return this.processingStrategy.handleResults(this._commands, results, responseHelper); } } export { InteractionBatchV3, MAX_BATCH_COMMANDS_V3 }; //# sourceMappingURL=v3.mjs.map