@bitrix24/b24jssdk 0.1.2 → 0.1.4

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @version @bitrix24/b24jssdk v0.1.2
2
+ * @version @bitrix24/b24jssdk v0.1.4
3
3
  * @copyright (c) 2024 Bitrix24
4
4
  * @licence MIT
5
5
  * @links https://github.com/bitrix24/b24jssdk - GitHub
@@ -9,7 +9,20 @@
9
9
 
10
10
  const luxon = require('luxon');
11
11
  const axios = require('axios');
12
- const qs = require('qs');
12
+ const qs = require('qs-esm');
13
+
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null);
16
+ if (e) {
17
+ for (const k in e) {
18
+ n[k] = e[k];
19
+ }
20
+ }
21
+ n.default = e;
22
+ return n;
23
+ }
24
+
25
+ const qs__namespace = /*#__PURE__*/_interopNamespaceDefault(qs);
13
26
 
14
27
  var LoggerType = /* @__PURE__ */ ((LoggerType2) => {
15
28
  LoggerType2["desktop"] = "desktop";
@@ -1382,7 +1395,7 @@ class Http {
1382
1395
  }
1383
1396
  if (method) {
1384
1397
  cnt++;
1385
- const data = method + "?" + qs.stringify(params);
1398
+ const data = method + "?" + qs__namespace.stringify(params);
1386
1399
  if (isArrayMode || Array.isArray(cmd)) {
1387
1400
  cmd.push(data);
1388
1401
  } else {
@@ -1430,7 +1443,7 @@ class Http {
1430
1443
  },
1431
1444
  {
1432
1445
  method: q[0] || "",
1433
- params: qs.parse(q[1] || ""),
1446
+ params: qs__namespace.parse(q[1] || ""),
1434
1447
  start: 0
1435
1448
  },
1436
1449
  response.getStatus()
@@ -1454,7 +1467,7 @@ class Http {
1454
1467
  status: 0,
1455
1468
  answerError: {
1456
1469
  error: result2.getErrorMessages().join("; "),
1457
- errorDescription: `batch ${result2.getQuery().method}: ${qs.stringify(result2.getQuery().params, { encode: false })}`
1470
+ errorDescription: `batch ${result2.getQuery().method}: ${qs__namespace.stringify(result2.getQuery().params, { encode: false })}`
1458
1471
  },
1459
1472
  cause: result2.getErrors().next().value
1460
1473
  });
@@ -1605,7 +1618,7 @@ class Http {
1605
1618
  result.logTag = this.#logTag;
1606
1619
  }
1607
1620
  result[this.#requestIdGenerator.getQueryStringParameterName()] = this.#requestIdGenerator.getRequestId();
1608
- result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.2";
1621
+ result[this.#requestIdGenerator.getQueryStringSdkParameterName()] = "0.1.4";
1609
1622
  if (!!result.data && !!result.data.start) {
1610
1623
  delete result.data.start;
1611
1624
  }
@@ -1728,7 +1741,7 @@ class AbstractB24 {
1728
1741
  do {
1729
1742
  const result = await this.callMethod(method, params, params.start);
1730
1743
  let data = void 0;
1731
- if (Type.isNull(customKeyForResult) && null !== customKeyForResult) {
1744
+ if (!Type.isNull(customKeyForResult) && null !== customKeyForResult) {
1732
1745
  data = result.getData().result[customKeyForResult];
1733
1746
  } else {
1734
1747
  data = result.getData().result;