@bitrix24/b24jssdk 0.2.1 → 0.2.3
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/dist/commonjs/index.cjs +96 -7
- package/dist/commonjs/index.cjs.map +1 -1
- package/dist/commonjs/index.d.cts +273 -3
- package/dist/commonjs/index.d.mts +273 -3
- package/dist/commonjs/index.d.ts +273 -3
- package/dist/esm/index.d.mts +273 -3
- package/dist/esm/index.d.ts +273 -3
- package/dist/esm/index.mjs +92 -8
- package/dist/esm/index.mjs.map +1 -1
- package/dist/umd/index.js +96 -7
- package/dist/umd/index.js.map +1 -1
- package/dist/umd/index.min.js +17 -17
- package/dist/umd/index.min.js.map +1 -1
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @version @bitrix24/b24jssdk v0.2.
|
|
2
|
+
* @version @bitrix24/b24jssdk v0.2.3
|
|
3
3
|
* @copyright (c) 2025 Bitrix24
|
|
4
4
|
* @licence MIT
|
|
5
5
|
* @links https://github.com/bitrix24/b24jssdk - GitHub
|
|
@@ -8946,6 +8946,7 @@
|
|
|
8946
8946
|
EnumCrmEntityType2["invoice"] = "CRM_SMART_INVOICE";
|
|
8947
8947
|
EnumCrmEntityType2["quote"] = "CRM_QUOTE";
|
|
8948
8948
|
EnumCrmEntityType2["requisite"] = "CRM_REQUISITE";
|
|
8949
|
+
EnumCrmEntityType2["order"] = "ORDER";
|
|
8949
8950
|
return EnumCrmEntityType2;
|
|
8950
8951
|
})(EnumCrmEntityType || {});
|
|
8951
8952
|
var EnumCrmEntityTypeId = /* @__PURE__ */ ((EnumCrmEntityTypeId2) => {
|
|
@@ -8958,8 +8959,54 @@
|
|
|
8958
8959
|
EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["invoice"] = 31] = "invoice";
|
|
8959
8960
|
EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["quote"] = 7] = "quote";
|
|
8960
8961
|
EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["requisite"] = 8] = "requisite";
|
|
8962
|
+
EnumCrmEntityTypeId2[EnumCrmEntityTypeId2["order"] = 14] = "order";
|
|
8961
8963
|
return EnumCrmEntityTypeId2;
|
|
8962
8964
|
})(EnumCrmEntityTypeId || {});
|
|
8965
|
+
var EnumCrmEntityTypeShort = /* @__PURE__ */ ((EnumCrmEntityTypeShort2) => {
|
|
8966
|
+
EnumCrmEntityTypeShort2["undefined"] = "?";
|
|
8967
|
+
EnumCrmEntityTypeShort2["lead"] = "L";
|
|
8968
|
+
EnumCrmEntityTypeShort2["deal"] = "D";
|
|
8969
|
+
EnumCrmEntityTypeShort2["contact"] = "C";
|
|
8970
|
+
EnumCrmEntityTypeShort2["company"] = "CO";
|
|
8971
|
+
EnumCrmEntityTypeShort2["oldInvoice"] = "I";
|
|
8972
|
+
EnumCrmEntityTypeShort2["invoice"] = "SI";
|
|
8973
|
+
EnumCrmEntityTypeShort2["quote"] = "Q";
|
|
8974
|
+
EnumCrmEntityTypeShort2["requisite"] = "RQ";
|
|
8975
|
+
EnumCrmEntityTypeShort2["order"] = "O";
|
|
8976
|
+
return EnumCrmEntityTypeShort2;
|
|
8977
|
+
})(EnumCrmEntityTypeShort || {});
|
|
8978
|
+
|
|
8979
|
+
var ProductRowDiscountTypeId = /* @__PURE__ */ ((ProductRowDiscountTypeId2) => {
|
|
8980
|
+
ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["undefined"] = 0] = "undefined";
|
|
8981
|
+
ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["absolute"] = 1] = "absolute";
|
|
8982
|
+
ProductRowDiscountTypeId2[ProductRowDiscountTypeId2["percentage"] = 2] = "percentage";
|
|
8983
|
+
return ProductRowDiscountTypeId2;
|
|
8984
|
+
})(ProductRowDiscountTypeId || {});
|
|
8985
|
+
|
|
8986
|
+
var CatalogProductType = /* @__PURE__ */ ((CatalogProductType2) => {
|
|
8987
|
+
CatalogProductType2[CatalogProductType2["undefined"] = 0] = "undefined";
|
|
8988
|
+
CatalogProductType2[CatalogProductType2["product"] = 1] = "product";
|
|
8989
|
+
CatalogProductType2[CatalogProductType2["service"] = 7] = "service";
|
|
8990
|
+
CatalogProductType2[CatalogProductType2["sku"] = 3] = "sku";
|
|
8991
|
+
CatalogProductType2[CatalogProductType2["skuEmpty"] = 6] = "skuEmpty";
|
|
8992
|
+
CatalogProductType2[CatalogProductType2["offer"] = 4] = "offer";
|
|
8993
|
+
CatalogProductType2[CatalogProductType2["offerEmpty"] = 5] = "offerEmpty";
|
|
8994
|
+
return CatalogProductType2;
|
|
8995
|
+
})(CatalogProductType || {});
|
|
8996
|
+
var CatalogProductImageType = /* @__PURE__ */ ((CatalogProductImageType2) => {
|
|
8997
|
+
CatalogProductImageType2["undefined"] = "UNDEFINED";
|
|
8998
|
+
CatalogProductImageType2["detail"] = "DETAIL_PICTURE";
|
|
8999
|
+
CatalogProductImageType2["preview"] = "PREVIEW_PICTURE";
|
|
9000
|
+
CatalogProductImageType2["morePhoto"] = "MORE_PHOTO";
|
|
9001
|
+
return CatalogProductImageType2;
|
|
9002
|
+
})(CatalogProductImageType || {});
|
|
9003
|
+
var CatalogRoundingRuleType = /* @__PURE__ */ ((CatalogRoundingRuleType2) => {
|
|
9004
|
+
CatalogRoundingRuleType2[CatalogRoundingRuleType2["undefined"] = 0] = "undefined";
|
|
9005
|
+
CatalogRoundingRuleType2[CatalogRoundingRuleType2["mathematical"] = 1] = "mathematical";
|
|
9006
|
+
CatalogRoundingRuleType2[CatalogRoundingRuleType2["roundingUp"] = 2] = "roundingUp";
|
|
9007
|
+
CatalogRoundingRuleType2[CatalogRoundingRuleType2["roundingDown"] = 4] = "roundingDown";
|
|
9008
|
+
return CatalogRoundingRuleType2;
|
|
9009
|
+
})(CatalogRoundingRuleType || {});
|
|
8963
9010
|
|
|
8964
9011
|
var LoadDataType = /* @__PURE__ */ ((LoadDataType2) => {
|
|
8965
9012
|
LoadDataType2["App"] = "app";
|
|
@@ -14015,9 +14062,16 @@ ${this.stack}`;
|
|
|
14015
14062
|
#isClientSideWarning = false;
|
|
14016
14063
|
#clientSideWarningMessage = "";
|
|
14017
14064
|
constructor(baseURL, authActions, options) {
|
|
14065
|
+
const defaultHeaders = {
|
|
14066
|
+
// 'X-Sdk': 'b24-js-sdk-v-0.2.3'
|
|
14067
|
+
};
|
|
14018
14068
|
this.#clientAxios = axios.create({
|
|
14019
14069
|
baseURL,
|
|
14020
|
-
|
|
14070
|
+
headers: {
|
|
14071
|
+
...defaultHeaders,
|
|
14072
|
+
...options ? options.headers : {}
|
|
14073
|
+
},
|
|
14074
|
+
...options && { ...options, headers: void 0 }
|
|
14021
14075
|
});
|
|
14022
14076
|
this.#authActions = authActions;
|
|
14023
14077
|
this.#restrictionManager = new RestrictionManager();
|
|
@@ -14419,7 +14473,7 @@ ${this.stack}`;
|
|
|
14419
14473
|
result.logTag = this.#logTag;
|
|
14420
14474
|
}
|
|
14421
14475
|
result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
|
|
14422
|
-
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.
|
|
14476
|
+
result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.2.3";
|
|
14423
14477
|
if (!!result.data && !!result.data.start) {
|
|
14424
14478
|
delete result.data.start;
|
|
14425
14479
|
}
|
|
@@ -15637,22 +15691,28 @@ ${this.stack}`;
|
|
|
15637
15691
|
timeoutId: null
|
|
15638
15692
|
};
|
|
15639
15693
|
const keyPromise = this.#setCallbackPromise(promiseHandler);
|
|
15640
|
-
|
|
15641
|
-
const
|
|
15694
|
+
let paramsSend = null;
|
|
15695
|
+
const optionsSend = omit(params || {}, ["singleOption", "callBack", "isSafely", "safelyTime"]);
|
|
15696
|
+
const { callBack, singleOption } = params || {};
|
|
15642
15697
|
if (callBack) {
|
|
15643
15698
|
this.#callbackSingletone.set(keyPromise, callBack);
|
|
15644
15699
|
}
|
|
15700
|
+
if (singleOption) {
|
|
15701
|
+
paramsSend = singleOption;
|
|
15702
|
+
} else if (Object.keys(optionsSend).length > 0) {
|
|
15703
|
+
paramsSend = { ...optionsSend };
|
|
15704
|
+
}
|
|
15645
15705
|
if (command.toString().includes(":")) {
|
|
15646
15706
|
cmd = {
|
|
15647
15707
|
method: command.toString(),
|
|
15648
|
-
params: paramsSend
|
|
15708
|
+
params: paramsSend || "",
|
|
15649
15709
|
callback: keyPromise,
|
|
15650
15710
|
appSid: this.#appFrame.getAppSid()
|
|
15651
15711
|
};
|
|
15652
15712
|
} else {
|
|
15653
15713
|
cmd = command.toString();
|
|
15654
15714
|
const listParams = [
|
|
15655
|
-
|
|
15715
|
+
paramsSend ? JSON.stringify(paramsSend) : "",
|
|
15656
15716
|
keyPromise,
|
|
15657
15717
|
this.#appFrame.getAppSid()
|
|
15658
15718
|
];
|
|
@@ -16470,6 +16530,30 @@ ${this.stack}`;
|
|
|
16470
16530
|
}
|
|
16471
16531
|
);
|
|
16472
16532
|
}
|
|
16533
|
+
/**
|
|
16534
|
+
* Set Up the Interface Event Handler
|
|
16535
|
+
* @param {string} command
|
|
16536
|
+
* @param {null | string | Record<string, any>} parameters
|
|
16537
|
+
* @param {(...args: any[]) => void} callBack
|
|
16538
|
+
*
|
|
16539
|
+
* @return {Promise<any>}
|
|
16540
|
+
*/
|
|
16541
|
+
async callCustomBind(command, parameters = null, callBack) {
|
|
16542
|
+
let options = {};
|
|
16543
|
+
if (Type.isString(parameters)) {
|
|
16544
|
+
options["singleOption"] = parameters;
|
|
16545
|
+
} else if (Type.isObjectLike(parameters)) {
|
|
16546
|
+
options = { ...parameters };
|
|
16547
|
+
}
|
|
16548
|
+
return this.#messageManager.send(
|
|
16549
|
+
command,
|
|
16550
|
+
{
|
|
16551
|
+
...options,
|
|
16552
|
+
callBack,
|
|
16553
|
+
isSafely: true
|
|
16554
|
+
}
|
|
16555
|
+
);
|
|
16556
|
+
}
|
|
16473
16557
|
}
|
|
16474
16558
|
|
|
16475
16559
|
class B24Frame extends AbstractB24 {
|
|
@@ -26094,6 +26178,9 @@ Data string: ${pullEvent}
|
|
|
26094
26178
|
exports.B24LangList = B24LangList;
|
|
26095
26179
|
exports.B24PullClientManager = PullClient;
|
|
26096
26180
|
exports.Browser = Browser;
|
|
26181
|
+
exports.CatalogProductImageType = CatalogProductImageType;
|
|
26182
|
+
exports.CatalogProductType = CatalogProductType;
|
|
26183
|
+
exports.CatalogRoundingRuleType = CatalogRoundingRuleType;
|
|
26097
26184
|
exports.CloseReasons = CloseReasons;
|
|
26098
26185
|
exports.ConnectionType = ConnectionType;
|
|
26099
26186
|
exports.DataType = DataType;
|
|
@@ -26101,6 +26188,7 @@ Data string: ${pullEvent}
|
|
|
26101
26188
|
exports.EnumAppStatus = EnumAppStatus;
|
|
26102
26189
|
exports.EnumCrmEntityType = EnumCrmEntityType;
|
|
26103
26190
|
exports.EnumCrmEntityTypeId = EnumCrmEntityTypeId;
|
|
26191
|
+
exports.EnumCrmEntityTypeShort = EnumCrmEntityTypeShort;
|
|
26104
26192
|
exports.ListRpcError = ListRpcError;
|
|
26105
26193
|
exports.LoadDataType = LoadDataType;
|
|
26106
26194
|
exports.LoggerBrowser = LoggerBrowser;
|
|
@@ -26111,6 +26199,7 @@ Data string: ${pullEvent}
|
|
|
26111
26199
|
exports.OptionsManager = OptionsManager$1;
|
|
26112
26200
|
exports.ParentManager = ParentManager;
|
|
26113
26201
|
exports.PlacementManager = PlacementManager;
|
|
26202
|
+
exports.ProductRowDiscountTypeId = ProductRowDiscountTypeId;
|
|
26114
26203
|
exports.PullStatus = PullStatus;
|
|
26115
26204
|
exports.RestrictionManagerParamsBase = RestrictionManagerParamsBase;
|
|
26116
26205
|
exports.RestrictionManagerParamsForEnterprise = RestrictionManagerParamsForEnterprise;
|