UNPKG

@bxshefby/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

34 lines (31 loc) • 937 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/ */ import { AbstractBatch } from '../abstract-batch.mjs'; import { ApiVersion } from '../../../types/b24.mjs'; var __defProp = Object.defineProperty; var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); class BatchV2 extends AbstractBatch { static { __name(this, "BatchV2"); } async make(options) { this._warnMisplacedOptions( options, ["isHaltOnError", "returnAjaxResult", "requestId"], "options" ); const opts = { ...options.options, apiVersion: ApiVersion.v2 }; const response = await this._b24.getHttpClient(ApiVersion.v2).batch(options.calls, opts); return this._processBatchResponse(response, options.calls, opts); } } export { BatchV2 };