UNPKG

@bxshefby/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

36 lines (32 loc) • 976 B
/** * @package @bxshefby/b24jssdk * @version 3.3.0 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bx-shef/b24-js-sdk * @see https://b24-js-sdk.bx-shef.by/ */ 'use strict'; const abstractBatch = require('../abstract-batch.cjs'); const b24 = require('../../../types/b24.cjs'); var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); class BatchV2 extends abstractBatch.AbstractBatch { static { __name(this, "BatchV2"); } async make(options) { this._warnMisplacedOptions( options, ["isHaltOnError", "returnAjaxResult", "requestId"], "options" ); const opts = { ...options.options, apiVersion: b24.ApiVersion.v2 }; const response = await this._b24.getHttpClient(b24.ApiVersion.v2).batch(options.calls, opts); return this._processBatchResponse(response, options.calls, opts); } } exports.BatchV2 = BatchV2;