@bitrix24/b24jssdk
Version:
Bitrix24 REST API JavaScript SDK
56 lines (52 loc) • 1.55 kB
JavaScript
/**
* @package @bitrix24/b24jssdk
* @version 2.0.0
* @copyright (c) 2026 Bitrix24
* @license MIT
* @see https://github.com/bitrix24/b24jssdk
* @see https://bitrix24.github.io/b24jssdk/
*/
'use strict';
const b24 = require('../../types/b24.cjs');
const managerV2 = require('./v2/manager-v2.cjs');
const managerV3 = require('./v3/manager-v3.cjs');
const loggerFactory = require('../../logger/logger-factory.cjs');
var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const apiV2Name = Symbol(b24.ApiVersion.v2);
const apiV3Name = Symbol(b24.ApiVersion.v3);
class ActionsManager {
static {
__name(this, "ActionsManager");
}
_b24;
_logger;
_mapActions;
constructor(b24) {
this._b24 = b24;
this._logger = loggerFactory.LoggerFactory.createNullLogger();
this._mapActions = /* @__PURE__ */ new Map();
}
setLogger(logger) {
this._logger = logger;
this.v2.setLogger(this._logger);
this.v3.setLogger(this._logger);
}
getLogger() {
return this._logger;
}
get v2() {
if (!this._mapActions.has(apiV2Name)) {
this._mapActions.set(apiV2Name, new managerV2.ActionsManagerV2(this._b24));
}
return this._mapActions.get(apiV2Name);
}
get v3() {
if (!this._mapActions.has(apiV3Name)) {
this._mapActions.set(apiV3Name, new managerV3.ActionsManagerV3(this._b24));
}
return this._mapActions.get(apiV3Name);
}
}
exports.ActionsManager = ActionsManager;
//# sourceMappingURL=manager.cjs.map