@snabcentr/common-lib 1.55.0 → 1.55.1

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,7 +1,7 @@
1
1
  var tr = Object.defineProperty;
2
2
  var sr = (n, r, e) => r in n ? tr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var t = (n, r, e) => sr(n, typeof r != "symbol" ? r + "" : r, e);
4
- import { constant as ir, isUndefined as nr, isString as m, cloneDeep as or, noop as y, toLower as cr, map as ne, forEach as lr, isNil as Ge, isDate as pr, isFunction as Me, isEmpty as ur } from "lodash-es";
4
+ import { constant as ir, isUndefined as nr, isString as m, cloneDeep as or, noop as y, toLower as cr, map as oe, forEach as lr, isNil as de, isDate as pr, isFunction as Me, isEmpty as ur } from "lodash-es";
5
5
  import { parseISO as f, format as z, addSeconds as hr, isAfter as gr, startOfToday as Fe, addBusinessDays as mr, endOfTomorrow as fr, startOfTomorrow as yr, endOfYesterday as wr, startOfYesterday as Cr, endOfToday as vr, endOfDay as Pr, startOfDay as Rr } from "date-fns";
6
6
  import Dr from "axios";
7
7
  import { objectToSnake as Ie, objectToCamel as $r } from "ts-case-convert";
@@ -84,7 +84,7 @@ class De extends He {
84
84
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
85
85
  }
86
86
  }
87
- class te extends De {
87
+ class se extends De {
88
88
  /**
89
89
  * Инициализирует экземпляр класса {@link BaseCategory}.
90
90
  *
@@ -447,7 +447,7 @@ class _r extends F {
447
447
  * Признак того, что позиция является дополнительной продажей.
448
448
  */
449
449
  t(this, "isAdditionalSale");
450
- this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new te(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && or(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
450
+ this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new se(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && or(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
451
451
  }
452
452
  }
453
453
  class ar extends _r {
@@ -500,7 +500,7 @@ class ar extends _r {
500
500
  this.currency = e.currency, this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
501
501
  }
502
502
  }
503
- class ie {
503
+ class ne {
504
504
  /**
505
505
  * Инициализирует экземпляр класса {@link Cart}.
506
506
  *
@@ -724,7 +724,7 @@ class ae {
724
724
  return new r(e);
725
725
  }
726
726
  }
727
- const a = class a {
727
+ const S = class S {
728
728
  /**
729
729
  * Инициализирует экземпляр класса {@link HttpRequester}.
730
730
  *
@@ -745,7 +745,7 @@ const a = class a {
745
745
  */
746
746
  t(this, "defaultInstanceNotificationErrorResponseHandler", y);
747
747
  const s = T.getConfig().version;
748
- this.defaultInstanceNotificationErrorResponseHandler = a.baseDefaultNotificationErrorResponseHandler, this.httpClient = Dr.create({
748
+ this.defaultInstanceNotificationErrorResponseHandler = S.baseDefaultNotificationErrorResponseHandler, this.httpClient = Dr.create({
749
749
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
750
750
  baseURL: r,
751
751
  headers: {
@@ -760,7 +760,7 @@ const a = class a {
760
760
  ), this.httpClient.interceptors.response.use(
761
761
  (i) => (i.data && (i.data = $r(i.data)), i),
762
762
  // Возвращаем изменённую структуру сообщения об ошибке.
763
- (i) => a.convertHttpErrorResponse(i)
763
+ (i) => S.convertHttpErrorResponse(i)
764
764
  );
765
765
  }
766
766
  /**
@@ -769,7 +769,7 @@ const a = class a {
769
769
  * @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
770
770
  */
771
771
  static setBaseDefaultNotificationErrorResponseHandler(r) {
772
- a.baseDefaultNotificationErrorResponseHandler = r;
772
+ S.baseDefaultNotificationErrorResponseHandler = r;
773
773
  }
774
774
  /**
775
775
  * Возвращает экземпляр объекта текущего класса.
@@ -777,7 +777,7 @@ const a = class a {
777
777
  * @param type Тип данных, которыми оперирует метод.
778
778
  */
779
779
  static getInstance(r) {
780
- return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = ae.simpleInstanceInitializer(r)), a.instances[r.name];
780
+ return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = ae.simpleInstanceInitializer(r)), S.instances[r.name];
781
781
  }
782
782
  /**
783
783
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -872,15 +872,15 @@ const a = class a {
872
872
  * Экземпляр объекта текущего класса.
873
873
  */
874
874
  // eslint-disable-next-line no-use-before-define
875
- t(a, "instances", {}), /**
875
+ t(S, "instances", {}), /**
876
876
  * Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
877
877
  *
878
878
  * Параметры:
879
879
  * - error Данные об ошибке.
880
880
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
881
881
  */
882
- t(a, "baseDefaultNotificationErrorResponseHandler", y);
883
- let $e = a;
882
+ t(S, "baseDefaultNotificationErrorResponseHandler", y);
883
+ let $e = S;
884
884
  const j = class j extends $e {
885
885
  /**
886
886
  * Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
@@ -961,7 +961,7 @@ class ft extends u {
961
961
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
962
962
  */
963
963
  getCart(r) {
964
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ie(e.data));
964
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ne(e.data));
965
965
  }
966
966
  /**
967
967
  * Удаляет всё содержимое корзины.
@@ -999,7 +999,7 @@ class ft extends u {
999
999
  isAdditionalSale: e.isAdditionalSale,
1000
1000
  ...e.configuratorParams
1001
1001
  },
1002
- (i) => new ie(i.data),
1002
+ (i) => new ne(i.data),
1003
1003
  s
1004
1004
  );
1005
1005
  }
@@ -1029,7 +1029,7 @@ class ft extends u {
1029
1029
  isAdditionalSale: e.isAdditionalSale,
1030
1030
  ...e.configuratorParams
1031
1031
  },
1032
- (i) => new ie(i.data),
1032
+ (i) => new ne(i.data),
1033
1033
  s
1034
1034
  );
1035
1035
  }
@@ -1052,11 +1052,11 @@ class ft extends u {
1052
1052
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1053
1053
  */
1054
1054
  addCartItemFromCSV(r) {
1055
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ie(e.data));
1055
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ne(e.data));
1056
1056
  }
1057
1057
  }
1058
1058
  var kr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(kr || {}), Se = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Se || {}), Nr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Nr || {});
1059
- class q extends te {
1059
+ class q extends se {
1060
1060
  /**
1061
1061
  * Инициализирует экземпляр класса {@link Category}.
1062
1062
  *
@@ -1253,7 +1253,7 @@ class J extends _ {
1253
1253
  this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Se.Product, this.discount = e != null && e.discount ? new Ur(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new B(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1254
1254
  }
1255
1255
  }
1256
- class dr {
1256
+ class Gr {
1257
1257
  /**
1258
1258
  * Инициализирует экземпляр класса {@link ContactLinks}.
1259
1259
  *
@@ -1271,9 +1271,9 @@ class dr {
1271
1271
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1272
1272
  }
1273
1273
  }
1274
- class S extends w {
1274
+ class a extends w {
1275
1275
  }
1276
- class oe extends D {
1276
+ class ee extends D {
1277
1277
  /**
1278
1278
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1279
1279
  *
@@ -1284,7 +1284,7 @@ class oe extends D {
1284
1284
  /**
1285
1285
  * Направление продаж.
1286
1286
  */
1287
- t(this, "salesDirection", new S());
1287
+ t(this, "salesDirection", new a());
1288
1288
  /**
1289
1289
  * URI путь к фотографии пользователя.
1290
1290
  */
@@ -1297,10 +1297,10 @@ class oe extends D {
1297
1297
  * Признак того, что менеджер является основным для клиента.
1298
1298
  */
1299
1299
  t(this, "isDefault");
1300
- e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new dr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1300
+ e && (this.salesDirection = new a(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Gr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1301
1301
  }
1302
1302
  }
1303
- class ye extends oe {
1303
+ class ye extends ee {
1304
1304
  /**
1305
1305
  * Инициализирует экземпляр класса {@link Manager}.
1306
1306
  *
@@ -1331,7 +1331,7 @@ class ye extends oe {
1331
1331
  this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId;
1332
1332
  }
1333
1333
  }
1334
- class Gr extends te {
1334
+ class dr extends se {
1335
1335
  /**
1336
1336
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1337
1337
  *
@@ -1362,7 +1362,7 @@ class Gr extends te {
1362
1362
  this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new ye(e.manager) : void 0;
1363
1363
  }
1364
1364
  }
1365
- class ce extends Gr {
1365
+ class ce extends dr {
1366
1366
  /**
1367
1367
  * Инициализирует экземпляр класса {@link ClientCategory}.
1368
1368
  *
@@ -1412,12 +1412,12 @@ class Ce extends je {
1412
1412
  * Базовые данные о продукте.
1413
1413
  */
1414
1414
  t(this, "productCategory");
1415
- this.productCategory = new te(e == null ? void 0 : e.productCategory);
1415
+ this.productCategory = new se(e == null ? void 0 : e.productCategory);
1416
1416
  }
1417
1417
  }
1418
1418
  class Q extends w {
1419
1419
  }
1420
- class ee extends w {
1420
+ class re extends w {
1421
1421
  /**
1422
1422
  * Инициализирует экземпляр класса {@link Region}.
1423
1423
  *
@@ -1443,8 +1443,8 @@ class le extends w {
1443
1443
  /**
1444
1444
  * Данные о регионе, в котором расположен город.
1445
1445
  */
1446
- t(this, "region", new ee());
1447
- e && (this.region = new ee(e.region));
1446
+ t(this, "region", new re());
1447
+ e && (this.region = new re(e.region));
1448
1448
  }
1449
1449
  }
1450
1450
  class Ve extends D {
@@ -1483,10 +1483,10 @@ class Ve extends D {
1483
1483
  * Признак активности учетной записи пользователя.
1484
1484
  */
1485
1485
  t(this, "isActive");
1486
- this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new S(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1486
+ this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new a(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1487
1487
  }
1488
1488
  }
1489
- class se extends Ve {
1489
+ class ie extends Ve {
1490
1490
  /**
1491
1491
  * Инициализирует экземпляр класса {@link Client}.
1492
1492
  *
@@ -1528,7 +1528,7 @@ class se extends Ve {
1528
1528
  * Список менеджеров клиента.
1529
1529
  */
1530
1530
  t(this, "managers");
1531
- this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new le(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new oe(i))) ?? [];
1531
+ this.salesDirection = new a(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new le(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ee(i))) ?? [];
1532
1532
  }
1533
1533
  }
1534
1534
  class Y extends F {
@@ -1555,7 +1555,7 @@ class Y extends F {
1555
1555
  * Данные шаблона прайс-листа.
1556
1556
  */
1557
1557
  t(this, "priceTemplate");
1558
- this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new se(e == null ? void 0 : e.client), this.priceTemplate = new B(e == null ? void 0 : e.priceTemplate);
1558
+ this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new ie(e == null ? void 0 : e.client), this.priceTemplate = new B(e == null ? void 0 : e.priceTemplate);
1559
1559
  }
1560
1560
  }
1561
1561
  class ve extends je {
@@ -1645,12 +1645,12 @@ class pe extends D {
1645
1645
  }
1646
1646
  }
1647
1647
  var b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
1648
- class d extends w {
1648
+ class G extends w {
1649
1649
  /**
1650
1650
  * Возвращает сгенерированную запись-описание физического лица.
1651
1651
  */
1652
1652
  static generatePersonItem() {
1653
- return new d({
1653
+ return new G({
1654
1654
  id: 1,
1655
1655
  guid: "",
1656
1656
  slug: b.Person,
@@ -1662,7 +1662,7 @@ class Hr extends w {
1662
1662
  }
1663
1663
  class zr extends w {
1664
1664
  }
1665
- class G extends w {
1665
+ class d extends w {
1666
1666
  }
1667
1667
  class Br extends w {
1668
1668
  }
@@ -1707,13 +1707,13 @@ class R extends u {
1707
1707
  * групп партнеров (направлений деятельности).
1708
1708
  */
1709
1709
  getPartnerGroup() {
1710
- return this.getTypedDataArrayRequester(G, "/internal/references/partner-group", !0);
1710
+ return this.getTypedDataArrayRequester(d, "/internal/references/partner-group", !0);
1711
1711
  }
1712
1712
  /**
1713
1713
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
1714
1714
  */
1715
1715
  getOpf() {
1716
- return this.getTypedDataArrayRequester(d, "/public/references/opf", !0);
1716
+ return this.getTypedDataArrayRequester(G, "/public/references/opf", !0);
1717
1717
  }
1718
1718
  /**
1719
1719
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
@@ -1743,7 +1743,7 @@ class R extends u {
1743
1743
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
1744
1744
  */
1745
1745
  getSalesDirections() {
1746
- return this.getTypedDataArrayRequester(S, "/public/references/sales-direction", !0);
1746
+ return this.getTypedDataArrayRequester(a, "/public/references/sales-direction", !0);
1747
1747
  }
1748
1748
  /**
1749
1749
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
@@ -1765,7 +1765,7 @@ class R extends u {
1765
1765
  * @param term Терм поиска.
1766
1766
  */
1767
1767
  searchRegion(r) {
1768
- return this.getTypedDataArrayRequester(ee, `/internal/references/region-with-country/search?term=${r}`);
1768
+ return this.getTypedDataArrayRequester(re, `/internal/references/region-with-country/search?term=${r}`);
1769
1769
  }
1770
1770
  /**
1771
1771
  * Выполняет поиск данных о странах по терму в названии.
@@ -1957,7 +1957,7 @@ class ke {
1957
1957
  * Минимальный коэффициент цены.
1958
1958
  */
1959
1959
  t(this, "minCoefficient");
1960
- this.role = new Z(r == null ? void 0 : r.role), this.category = new te(r == null ? void 0 : r.category), this.minCoefficient = new me(r == null ? void 0 : r.minCoefficient);
1960
+ this.role = new Z(r == null ? void 0 : r.role), this.category = new se(r == null ? void 0 : r.category), this.minCoefficient = new me(r == null ? void 0 : r.minCoefficient);
1961
1961
  }
1962
1962
  }
1963
1963
  class Pe {
@@ -1987,7 +1987,7 @@ class Pe {
1987
1987
  * Источник клиентской цены.
1988
1988
  */
1989
1989
  t(this, "source");
1990
- this.client = new se(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Se.Product;
1990
+ this.client = new ie(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Se.Product;
1991
1991
  }
1992
1992
  }
1993
1993
  class Ct extends u {
@@ -2370,7 +2370,7 @@ class Rt extends u {
2370
2370
  showHidden: s,
2371
2371
  withPriceCoefficients: e
2372
2372
  },
2373
- (i) => ne(i.data, (o) => new _(o))
2373
+ (i) => oe(i.data, (o) => new _(o))
2374
2374
  );
2375
2375
  }
2376
2376
  /**
@@ -2433,7 +2433,7 @@ class Dt extends u {
2433
2433
  return this.get(
2434
2434
  `/internal/catalog/products/${r}/coefficients`,
2435
2435
  {},
2436
- (e) => ne(e.data, (s) => new _e(s))
2436
+ (e) => oe(e.data, (s) => new _e(s))
2437
2437
  );
2438
2438
  }
2439
2439
  /**
@@ -2446,7 +2446,7 @@ class Dt extends u {
2446
2446
  */
2447
2447
  getProductPriceHistory(r, e) {
2448
2448
  const s = {};
2449
- return Ge(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ne(i.data, (o) => new Jr(o)));
2449
+ return de(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => oe(i.data, (o) => new Jr(o)));
2450
2450
  }
2451
2451
  /**
2452
2452
  * Выполняет публичный поиск данных о продуктах по терму.
@@ -2522,7 +2522,7 @@ class $t extends u {
2522
2522
  showHidden: i,
2523
2523
  withPriceCoefficients: s
2524
2524
  },
2525
- (o) => ne(o.data, (l) => new J(l))
2525
+ (o) => oe(o.data, (l) => new J(l))
2526
2526
  );
2527
2527
  }
2528
2528
  }
@@ -2582,7 +2582,7 @@ class Ne {
2582
2582
  return r.value = pr(this.value) ? z(this.value, T.getConfig().dateFormats.api) : this.value, r;
2583
2583
  }
2584
2584
  }
2585
- class re {
2585
+ class te {
2586
2586
  /**
2587
2587
  * Инициализирует экземпляр класса {@link FilterGroup}.
2588
2588
  *
@@ -2602,7 +2602,7 @@ class re {
2602
2602
  */
2603
2603
  t(this, "groups");
2604
2604
  var e, s;
2605
- this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Ne(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new re(i))) ?? [];
2605
+ this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Ne(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new te(i))) ?? [];
2606
2606
  }
2607
2607
  /**
2608
2608
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2613,7 +2613,7 @@ class re {
2613
2613
  return {
2614
2614
  groupOp: this.groupOp,
2615
2615
  filters: this.filters.map((r) => r instanceof Ne && Me(r.toPrimitive) ? r.toPrimitive() : r),
2616
- groups: this.groups.map((r) => r instanceof re ? r.toPrimitive() : r)
2616
+ groups: this.groups.map((r) => r instanceof te ? r.toPrimitive() : r)
2617
2617
  };
2618
2618
  }
2619
2619
  }
@@ -2634,7 +2634,7 @@ class we extends u {
2634
2634
  page: (i == null ? void 0 : i.page) ?? 1,
2635
2635
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2636
2636
  };
2637
- return e && (g.filters = JSON.stringify((e instanceof re ? e : new re(e)).toPrimitive())), ur(s) || (g.sort = s), o && (g = { ...g, ...o }), this.get(r, g, l, p);
2637
+ return e && (g.filters = JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive())), ur(s) || (g.sort = s), o && (g = { ...g, ...o }), this.get(r, g, l, p);
2638
2638
  }
2639
2639
  }
2640
2640
  class Tt extends we {
@@ -3470,19 +3470,19 @@ class Ye extends D {
3470
3470
  /**
3471
3471
  * Данные о менеджере.
3472
3472
  */
3473
- t(this, "manager", new oe());
3473
+ t(this, "manager", new ee());
3474
3474
  /**
3475
3475
  * Данные об организационно-правовой форме.
3476
3476
  */
3477
- t(this, "opf", d.generatePersonItem());
3477
+ t(this, "opf", G.generatePersonItem());
3478
3478
  /**
3479
3479
  * Направление продаж.
3480
3480
  */
3481
- t(this, "salesDirection", new S());
3481
+ t(this, "salesDirection", new a());
3482
3482
  /**
3483
3483
  * Группа партнеров (направление деятельности).
3484
3484
  */
3485
- t(this, "partnerGroup", new G());
3485
+ t(this, "partnerGroup", new d());
3486
3486
  /**
3487
3487
  * Список контактных лиц контрагента.
3488
3488
  */
@@ -3516,7 +3516,7 @@ class Ye extends D {
3516
3516
  */
3517
3517
  t(this, "updater");
3518
3518
  if (e) {
3519
- if (this.opf = new d(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new G(e.partnerGroup)), e.manager && (this.manager = new oe(e.manager)), e.contacts) {
3519
+ if (this.opf = new G(e.opf), this.salesDirection = new a(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new d(e.partnerGroup)), e.manager && (this.manager = new ee(e.manager)), e.contacts) {
3520
3520
  const s = [];
3521
3521
  e.contacts.forEach((i) => {
3522
3522
  s.push(new M(i));
@@ -3724,7 +3724,7 @@ class he extends qr {
3724
3724
  this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Be(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
3725
3725
  }
3726
3726
  }
3727
- class qe extends se {
3727
+ class qe extends ie {
3728
3728
  /**
3729
3729
  * Инициализирует экземпляр класса {@link Client}.
3730
3730
  *
@@ -3778,7 +3778,7 @@ class qe extends se {
3778
3778
  * Дополнительные данные о клиенте.
3779
3779
  */
3780
3780
  t(this, "extraData");
3781
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ue.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new G(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new Je(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ee(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new fe(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3781
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ue.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new d(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new he(p))) ?? [], this.channelPrimaryInterest = new Je(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ee(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new fe(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3782
3782
  }
3783
3783
  }
3784
3784
  class E {
@@ -3891,7 +3891,7 @@ class Lt {
3891
3891
  */
3892
3892
  t(this, "lastOrder");
3893
3893
  var e, s, i;
3894
- this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.city = new le(r == null ? void 0 : r.city), this.region = new ee(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new E(r == null ? void 0 : r.createdAt), this.lastLoginDate = new E(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((o) => new ye(o)) : [], this.salesDirection = new S(r == null ? void 0 : r.salesDirection), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new d(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new K(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroup = new G(r == null ? void 0 : r.partnerGroup), this.contact = new be(r == null ? void 0 : r.contact), this.lastOrder = {
3894
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.city = new le(r == null ? void 0 : r.city), this.region = new re(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new E(r == null ? void 0 : r.createdAt), this.lastLoginDate = new E(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((o) => new ye(o)) : [], this.salesDirection = new a(r == null ? void 0 : r.salesDirection), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new G(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new K(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroup = new d(r == null ? void 0 : r.partnerGroup), this.contact = new be(r == null ? void 0 : r.contact), this.lastOrder = {
3895
3895
  createdAt: new E((e = r == null ? void 0 : r.lastOrder) == null ? void 0 : e.createdAt),
3896
3896
  creator: (s = r == null ? void 0 : r.lastOrder) == null ? void 0 : s.creator,
3897
3897
  isApproved: (i = r == null ? void 0 : r.lastOrder) == null ? void 0 : i.isApproved
@@ -3917,7 +3917,7 @@ class Lt {
3917
3917
  this.city = new le();
3918
3918
  break;
3919
3919
  case "region":
3920
- this.region = new ee();
3920
+ this.region = new re();
3921
3921
  break;
3922
3922
  case "isActive":
3923
3923
  this.isActive = !0;
@@ -3938,16 +3938,16 @@ class Lt {
3938
3938
  this.managers = [];
3939
3939
  break;
3940
3940
  case "salesDirection":
3941
- this.salesDirection = new S();
3941
+ this.salesDirection = new a();
3942
3942
  break;
3943
3943
  case "contragentType":
3944
- this.contragentType = new d();
3944
+ this.contragentType = new G();
3945
3945
  break;
3946
3946
  case "preferredDeliveryType":
3947
3947
  this.preferredDeliveryType = new K();
3948
3948
  break;
3949
3949
  case "partnerGroup":
3950
- this.partnerGroup = new G();
3950
+ this.partnerGroup = new d();
3951
3951
  break;
3952
3952
  case "contact":
3953
3953
  this.contact = new be();
@@ -3965,7 +3965,7 @@ class Lt {
3965
3965
  return Object.keys(this).forEach((l) => {
3966
3966
  const p = this[l];
3967
3967
  // eslint-disable-next-line prettier/prettier
3968
- Ge(p) || m(p) && p.trim().length === 0 || Me(p.isNewRec) && p.isNewRec() || (r[l] = p);
3968
+ de(p) || m(p) && p.trim().length === 0 || Me(p.isNewRec) && p.isNewRec() || (r[l] = p);
3969
3969
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
3970
3970
  }
3971
3971
  }
@@ -3992,228 +3992,7 @@ class er extends F {
3992
3992
  this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new U(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
3993
3993
  }
3994
3994
  }
3995
- class rr extends er {
3996
- /**
3997
- * Инициализирует экземпляр класса {@link OrderInfo}.
3998
- *
3999
- * @param data Данные для первоначальной инициализации.
4000
- */
4001
- constructor(e) {
4002
- var s, i, o, l, p, g, $, A;
4003
- super(e);
4004
- /**
4005
- * Краткие данные о клиенте.
4006
- */
4007
- t(this, "client");
4008
- /**
4009
- * Данные об оплате заказа.
4010
- */
4011
- t(this, "payment");
4012
- /**
4013
- * Данные о доставке заказа.
4014
- */
4015
- t(this, "delivery");
4016
- /**
4017
- * Краткие данные о пользователе, за которым закреплен заказ.
4018
- */
4019
- t(this, "attachedUser");
4020
- /**
4021
- * Идентификатор статуса заказа.
4022
- */
4023
- t(this, "status");
4024
- /**
4025
- * Направление продаж заказа.
4026
- */
4027
- t(this, "salesDirection");
4028
- /**
4029
- * Дата и время начала обработки заказа.
4030
- */
4031
- t(this, "pendingAt");
4032
- /**
4033
- * Дата и время завершения обработки заказа.
4034
- */
4035
- t(this, "processedAt");
4036
- /**
4037
- * Признак того, что заказ создан из товаров, которые имеют признак "Под заказ".
4038
- */
4039
- t(this, "isOnOrder");
4040
- /**
4041
- * Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
4042
- */
4043
- t(this, "isNotInStock");
4044
- this.client = new se(e == null ? void 0 : e.client), this.payment = {
4045
- type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
4046
- status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
4047
- onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
4048
- }, this.delivery = {
4049
- type: ((l = e == null ? void 0 : e.delivery) == null ? void 0 : l.type) ?? -1,
4050
- date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
4051
- address: ($ = e == null ? void 0 : e.delivery) != null && $.address ? new he(e.delivery.address) : void 0,
4052
- warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new fe(e.delivery.warehouse) : void 0
4053
- }, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
4054
- }
4055
- }
4056
- class Zr extends F {
4057
- /**
4058
- * Инициализирует экземпляр класса {@link OrderProduct}.
4059
- *
4060
- * @param data Данные для первоначальной инициализации.
4061
- */
4062
- constructor(e) {
4063
- super(e);
4064
- /**
4065
- * Данные о продукте.
4066
- */
4067
- t(this, "product");
4068
- /**
4069
- * Количество товара/услуги.
4070
- */
4071
- t(this, "quantity");
4072
- /**
4073
- * Валюта товара или услуги.
4074
- */
4075
- t(this, "currency");
4076
- /**
4077
- * Стоимость единицы товара или услуги в валюте.
4078
- */
4079
- t(this, "costOne");
4080
- /**
4081
- * Стоимость единицы товара или услуги в рублях.
4082
- */
4083
- t(this, "costOneRub");
4084
- /**
4085
- * Итоговая стоимость товара или услуги в валюте.
4086
- */
4087
- t(this, "cost");
4088
- /**
4089
- * Итоговая стоимость товара или услуги в рублях.
4090
- */
4091
- t(this, "costRub");
4092
- /**
4093
- * Описание позиции.
4094
- */
4095
- t(this, "marker");
4096
- /**
4097
- * Высота товара.
4098
- */
4099
- t(this, "height");
4100
- /**
4101
- * Длина товара.
4102
- */
4103
- t(this, "length");
4104
- /**
4105
- * Ширина товара.
4106
- */
4107
- t(this, "width");
4108
- /**
4109
- * Идентификатор логической группы товаров/услуг.
4110
- */
4111
- t(this, "logicGroupId");
4112
- /**
4113
- * Направление продаж.
4114
- */
4115
- t(this, "salesDirection");
4116
- /**
4117
- * URL изображения со спецификацией.
4118
- */
4119
- t(this, "specificationImgUrl");
4120
- /**
4121
- * Название (slug) конфигуратора.
4122
- */
4123
- t(this, "configurator");
4124
- /**
4125
- * Параметры введенные в конфигуратор, при добавлении позиции в корзину.
4126
- */
4127
- t(this, "configuratorParams");
4128
- /**
4129
- * Вариант продольного распила.
4130
- *
4131
- * В качестве значения указывается ширина продукта,
4132
- * а в качестве ключа указывается код продукта,
4133
- * который соответствует указанной ширине. Количество не ограничено.
4134
- */
4135
- t(this, "sawing");
4136
- this.product = new J(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
4137
- }
4138
- }
4139
- class et extends rr {
4140
- /**
4141
- * Инициализирует экземпляр класса {@link Order}.
4142
- *
4143
- * @param data Данные для первоначальной инициализации.
4144
- */
4145
- constructor(e) {
4146
- super(e);
4147
- /**
4148
- * Список продуктов заказа.
4149
- */
4150
- t(this, "products");
4151
- /**
4152
- * Список счетов заказа.
4153
- */
4154
- t(this, "invoices");
4155
- /**
4156
- * Комментарий клиента к заказу.
4157
- */
4158
- t(this, "comment");
4159
- /**
4160
- * Изображение, прикрепленное к заказу клиентом во время создания.
4161
- */
4162
- t(this, "image");
4163
- /**
4164
- * Данные о контрагенте.
4165
- */
4166
- t(this, "contragent");
4167
- /**
4168
- * Штрих-код заказа.
4169
- */
4170
- t(this, "barcode");
4171
- /**
4172
- * Данные об источнике заказа.
4173
- */
4174
- t(this, "orderSource");
4175
- /**
4176
- * Признак, что разрешена передача заказа в работу без оплаты.
4177
- */
4178
- t(this, "isAllowProcessingWithoutPayment");
4179
- this.products = (e.products ?? []).map((s) => new Zr(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ue.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
4180
- }
4181
- }
4182
- class It extends we {
4183
- /**
4184
- * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
4185
- *
4186
- * @param filters Параметры фильтрации данных.
4187
- * @param sortParams Параметры сортировки.
4188
- * @param paginationParams Параметры пагинации.
4189
- *
4190
- * @see /doc/api/internal#/Заказы/api_internal_orders_get_list
4191
- */
4192
- getOrders(r, e, s) {
4193
- return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
4194
- const o = { ...i.data };
4195
- return o.data = o.data.map((l) => new rr(l)), o;
4196
- });
4197
- }
4198
- /**
4199
- * Возвращает данные о количестве и сумме заказов клиента помесячно, с возможностью ограничения периода.
4200
- *
4201
- * @param clientId Идентификатор клиента для которого необходимо вернуть данные.
4202
- * @param period Период, за который запрашивается статистика.
4203
- */
4204
- getClientOrderStatistics(r, e) {
4205
- return this.get(`/internal/clients/${r}/orders/statistics`, e ? { period: e } : {});
4206
- }
4207
- /**
4208
- * Возвращает данные заказа с указанным идентификатором.
4209
- *
4210
- * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
4211
- */
4212
- getOrder(r) {
4213
- return this.get(`/internal/orders/${r}`, {}, (e) => new et(e.data));
4214
- }
4215
- }
4216
- class rt extends D {
3995
+ class Zr extends D {
4217
3996
  /**
4218
3997
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4219
3998
  *
@@ -4238,10 +4017,18 @@ class rt extends D {
4238
4017
  * Данные о последнем заказе клиента.
4239
4018
  */
4240
4019
  t(this, "lastOrder");
4241
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new er(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new G(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new K(e.preferredDeliveryType));
4020
+ /**
4021
+ * Направление продаж.
4022
+ */
4023
+ t(this, "salesDirection");
4024
+ /**
4025
+ * Список менеджеров.
4026
+ */
4027
+ t(this, "managers");
4028
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new er(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new d(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new K(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new a(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ee(o)));
4242
4029
  }
4243
4030
  }
4244
- class tt {
4031
+ class et {
4245
4032
  /**
4246
4033
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4247
4034
  *
@@ -4259,7 +4046,7 @@ class tt {
4259
4046
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4260
4047
  }
4261
4048
  }
4262
- class xt extends tt {
4049
+ class It extends et {
4263
4050
  /**
4264
4051
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4265
4052
  *
@@ -4290,7 +4077,7 @@ class xt extends tt {
4290
4077
  this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
4291
4078
  }
4292
4079
  }
4293
- class kt {
4080
+ class xt {
4294
4081
  /**
4295
4082
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4296
4083
  *
@@ -4308,7 +4095,7 @@ class kt {
4308
4095
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4309
4096
  }
4310
4097
  }
4311
- class Nt extends we {
4098
+ class kt extends we {
4312
4099
  /**
4313
4100
  * Возвращает данные об указанном клиенте.
4314
4101
  *
@@ -4331,7 +4118,7 @@ class Nt extends we {
4331
4118
  getClientsList(r, e, s, i) {
4332
4119
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4333
4120
  const l = { ...o.data };
4334
- return l.data = l.data.map((p) => new se(p)), l;
4121
+ return l.data = l.data.map((p) => new ie(p)), l;
4335
4122
  });
4336
4123
  }
4337
4124
  /**
@@ -4358,7 +4145,7 @@ class Nt extends we {
4358
4145
  const s = r.map((i) => i.id);
4359
4146
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4360
4147
  let o = [];
4361
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((l) => new rt(l))), o;
4148
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((l) => new Zr(l))), o;
4362
4149
  });
4363
4150
  }
4364
4151
  /**
@@ -5035,7 +4822,7 @@ class Nt extends we {
5035
4822
  return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
5036
4823
  }
5037
4824
  }
5038
- class Ot extends u {
4825
+ class Nt extends u {
5039
4826
  /**
5040
4827
  * Выполняет проверку занят ли указанный номер телефона.
5041
4828
  *
@@ -5049,7 +4836,7 @@ class Ot extends u {
5049
4836
  });
5050
4837
  }
5051
4838
  }
5052
- class qt extends u {
4839
+ class Ot extends u {
5053
4840
  /**
5054
4841
  * Возвращает настройки указанного конфигуратора для указанной категории.
5055
4842
  *
@@ -5120,7 +4907,7 @@ class qt extends u {
5120
4907
  return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
5121
4908
  }
5122
4909
  }
5123
- class Ut {
4910
+ class qt {
5124
4911
  /**
5125
4912
  * Возвращает диапазон дат по умолчанию.
5126
4913
  */
@@ -5176,7 +4963,7 @@ const V = class V {
5176
4963
  */
5177
4964
  t(V, "linearValues", ["пог.м.", "м.", "м2"]);
5178
4965
  let Ue = V;
5179
- class dt {
4966
+ class Ut {
5180
4967
  /**
5181
4968
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5182
4969
  */
@@ -5192,7 +4979,7 @@ class dt {
5192
4979
  return r.id === 0 && r.guid === "-undefined-";
5193
4980
  }
5194
4981
  }
5195
- class st extends u {
4982
+ class rt extends u {
5196
4983
  /**
5197
4984
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5198
4985
  */
@@ -5204,6 +4991,227 @@ class st extends u {
5204
4991
  });
5205
4992
  }
5206
4993
  }
4994
+ class rr extends er {
4995
+ /**
4996
+ * Инициализирует экземпляр класса {@link OrderInfo}.
4997
+ *
4998
+ * @param data Данные для первоначальной инициализации.
4999
+ */
5000
+ constructor(e) {
5001
+ var s, i, o, l, p, g, $, A;
5002
+ super(e);
5003
+ /**
5004
+ * Краткие данные о клиенте.
5005
+ */
5006
+ t(this, "client");
5007
+ /**
5008
+ * Данные об оплате заказа.
5009
+ */
5010
+ t(this, "payment");
5011
+ /**
5012
+ * Данные о доставке заказа.
5013
+ */
5014
+ t(this, "delivery");
5015
+ /**
5016
+ * Краткие данные о пользователе, за которым закреплен заказ.
5017
+ */
5018
+ t(this, "attachedUser");
5019
+ /**
5020
+ * Идентификатор статуса заказа.
5021
+ */
5022
+ t(this, "status");
5023
+ /**
5024
+ * Направление продаж заказа.
5025
+ */
5026
+ t(this, "salesDirection");
5027
+ /**
5028
+ * Дата и время начала обработки заказа.
5029
+ */
5030
+ t(this, "pendingAt");
5031
+ /**
5032
+ * Дата и время завершения обработки заказа.
5033
+ */
5034
+ t(this, "processedAt");
5035
+ /**
5036
+ * Признак того, что заказ создан из товаров, которые имеют признак "Под заказ".
5037
+ */
5038
+ t(this, "isOnOrder");
5039
+ /**
5040
+ * Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
5041
+ */
5042
+ t(this, "isNotInStock");
5043
+ this.client = new ie(e == null ? void 0 : e.client), this.payment = {
5044
+ type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5045
+ status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5046
+ onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5047
+ }, this.delivery = {
5048
+ type: ((l = e == null ? void 0 : e.delivery) == null ? void 0 : l.type) ?? -1,
5049
+ date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
5050
+ address: ($ = e == null ? void 0 : e.delivery) != null && $.address ? new he(e.delivery.address) : void 0,
5051
+ warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new fe(e.delivery.warehouse) : void 0
5052
+ }, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new a(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
5053
+ }
5054
+ }
5055
+ class tt extends F {
5056
+ /**
5057
+ * Инициализирует экземпляр класса {@link OrderProduct}.
5058
+ *
5059
+ * @param data Данные для первоначальной инициализации.
5060
+ */
5061
+ constructor(e) {
5062
+ super(e);
5063
+ /**
5064
+ * Данные о продукте.
5065
+ */
5066
+ t(this, "product");
5067
+ /**
5068
+ * Количество товара/услуги.
5069
+ */
5070
+ t(this, "quantity");
5071
+ /**
5072
+ * Валюта товара или услуги.
5073
+ */
5074
+ t(this, "currency");
5075
+ /**
5076
+ * Стоимость единицы товара или услуги в валюте.
5077
+ */
5078
+ t(this, "costOne");
5079
+ /**
5080
+ * Стоимость единицы товара или услуги в рублях.
5081
+ */
5082
+ t(this, "costOneRub");
5083
+ /**
5084
+ * Итоговая стоимость товара или услуги в валюте.
5085
+ */
5086
+ t(this, "cost");
5087
+ /**
5088
+ * Итоговая стоимость товара или услуги в рублях.
5089
+ */
5090
+ t(this, "costRub");
5091
+ /**
5092
+ * Описание позиции.
5093
+ */
5094
+ t(this, "marker");
5095
+ /**
5096
+ * Высота товара.
5097
+ */
5098
+ t(this, "height");
5099
+ /**
5100
+ * Длина товара.
5101
+ */
5102
+ t(this, "length");
5103
+ /**
5104
+ * Ширина товара.
5105
+ */
5106
+ t(this, "width");
5107
+ /**
5108
+ * Идентификатор логической группы товаров/услуг.
5109
+ */
5110
+ t(this, "logicGroupId");
5111
+ /**
5112
+ * Направление продаж.
5113
+ */
5114
+ t(this, "salesDirection");
5115
+ /**
5116
+ * URL изображения со спецификацией.
5117
+ */
5118
+ t(this, "specificationImgUrl");
5119
+ /**
5120
+ * Название (slug) конфигуратора.
5121
+ */
5122
+ t(this, "configurator");
5123
+ /**
5124
+ * Параметры введенные в конфигуратор, при добавлении позиции в корзину.
5125
+ */
5126
+ t(this, "configuratorParams");
5127
+ /**
5128
+ * Вариант продольного распила.
5129
+ *
5130
+ * В качестве значения указывается ширина продукта,
5131
+ * а в качестве ключа указывается код продукта,
5132
+ * который соответствует указанной ширине. Количество не ограничено.
5133
+ */
5134
+ t(this, "sawing");
5135
+ this.product = new J(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
5136
+ }
5137
+ }
5138
+ class st extends rr {
5139
+ /**
5140
+ * Инициализирует экземпляр класса {@link Order}.
5141
+ *
5142
+ * @param data Данные для первоначальной инициализации.
5143
+ */
5144
+ constructor(e) {
5145
+ super(e);
5146
+ /**
5147
+ * Список продуктов заказа.
5148
+ */
5149
+ t(this, "products");
5150
+ /**
5151
+ * Список счетов заказа.
5152
+ */
5153
+ t(this, "invoices");
5154
+ /**
5155
+ * Комментарий клиента к заказу.
5156
+ */
5157
+ t(this, "comment");
5158
+ /**
5159
+ * Изображение, прикрепленное к заказу клиентом во время создания.
5160
+ */
5161
+ t(this, "image");
5162
+ /**
5163
+ * Данные о контрагенте.
5164
+ */
5165
+ t(this, "contragent");
5166
+ /**
5167
+ * Штрих-код заказа.
5168
+ */
5169
+ t(this, "barcode");
5170
+ /**
5171
+ * Данные об источнике заказа.
5172
+ */
5173
+ t(this, "orderSource");
5174
+ /**
5175
+ * Признак, что разрешена передача заказа в работу без оплаты.
5176
+ */
5177
+ t(this, "isAllowProcessingWithoutPayment");
5178
+ this.products = (e.products ?? []).map((s) => new tt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ue.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5179
+ }
5180
+ }
5181
+ class Gt extends we {
5182
+ /**
5183
+ * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5184
+ *
5185
+ * @param filters Параметры фильтрации данных.
5186
+ * @param sortParams Параметры сортировки.
5187
+ * @param paginationParams Параметры пагинации.
5188
+ *
5189
+ * @see /doc/api/internal#/Заказы/api_internal_orders_get_list
5190
+ */
5191
+ getOrders(r, e, s) {
5192
+ return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5193
+ const o = { ...i.data };
5194
+ return o.data = o.data.map((l) => new rr(l)), o;
5195
+ });
5196
+ }
5197
+ /**
5198
+ * Возвращает данные о количестве и сумме заказов клиента помесячно, с возможностью ограничения периода.
5199
+ *
5200
+ * @param clientId Идентификатор клиента для которого необходимо вернуть данные.
5201
+ * @param period Период, за который запрашивается статистика.
5202
+ */
5203
+ getClientOrderStatistics(r, e) {
5204
+ return this.get(`/internal/clients/${r}/orders/statistics`, e ? { period: e } : {});
5205
+ }
5206
+ /**
5207
+ * Возвращает данные заказа с указанным идентификатором.
5208
+ *
5209
+ * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5210
+ */
5211
+ getOrder(r) {
5212
+ return this.get(`/internal/orders/${r}`, {}, (e) => new st(e.data));
5213
+ }
5214
+ }
5207
5215
  class it {
5208
5216
  /**
5209
5217
  * Инициализирует экземпляр класса {@link MetaTagItem}.
@@ -5222,7 +5230,7 @@ class it {
5222
5230
  this.name = r.name, this.content = r.content;
5223
5231
  }
5224
5232
  }
5225
- class de {
5233
+ class Ge {
5226
5234
  /**
5227
5235
  * Инициализирует экземпляр класса {@link Seo}.
5228
5236
  *
@@ -5261,7 +5269,7 @@ class de {
5261
5269
  this.resourceType = new Qe(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new it(s))) ?? [];
5262
5270
  }
5263
5271
  }
5264
- class Gt extends u {
5272
+ class dt extends u {
5265
5273
  /**
5266
5274
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
5267
5275
  *
@@ -5269,7 +5277,7 @@ class Gt extends u {
5269
5277
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
5270
5278
  */
5271
5279
  getResourceSeoData(r, e) {
5272
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new de(s.data));
5280
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new Ge(s.data));
5273
5281
  }
5274
5282
  /**
5275
5283
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -5280,7 +5288,7 @@ class Gt extends u {
5280
5288
  * в случае ошибок в запросах.
5281
5289
  */
5282
5290
  saveResourceSeoData(r, e = {}) {
5283
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new de(s.data), e);
5291
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new Ge(s.data), e);
5284
5292
  }
5285
5293
  /**
5286
5294
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -5436,7 +5444,7 @@ const P = ge("__references_private", () => {
5436
5444
  }).catch(y)), c.deliveryTypeReference;
5437
5445
  }), x = v(() => {
5438
5446
  const c = P();
5439
- return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(st).getManagers().then((h) => {
5447
+ return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(rt).getManagers().then((h) => {
5440
5448
  c.managersList = h;
5441
5449
  }).catch(y)), c.managersList;
5442
5450
  }), k = v(() => {
@@ -5625,7 +5633,7 @@ export {
5625
5633
  Te as BankAccount,
5626
5634
  we as BasePaginationProvider,
5627
5635
  kr as CalculationTypeEnum,
5628
- ie as Cart,
5636
+ ne as Cart,
5629
5637
  ar as CartItem,
5630
5638
  _r as CartItemBase,
5631
5639
  ft as CartProvider,
@@ -5637,20 +5645,20 @@ export {
5637
5645
  wt as City,
5638
5646
  le as CityWithRegionAndCountry,
5639
5647
  qe as Client,
5640
- rt as ClientAdditionalData,
5648
+ Zr as ClientAdditionalData,
5641
5649
  ce as ClientCategory,
5642
- Nt as ClientDataProvider,
5650
+ kt as ClientDataProvider,
5643
5651
  vt as ClientPriceProvider,
5644
5652
  Pt as ClientPriceTemplateProvider,
5645
5653
  J as ClientProduct,
5646
5654
  $t as ClientProductCategoryDataProvider,
5647
5655
  At as ClientProductDataProvider,
5648
- se as ClientShortInfo,
5656
+ ie as ClientShortInfo,
5649
5657
  Qr as ClientsAdditionalDataRequestTypeEnum,
5650
5658
  Lt as ClientsListFilters,
5651
- qt as ConfiguratorProvider,
5659
+ Ot as ConfiguratorProvider,
5652
5660
  be as Contact,
5653
- dr as ContactLinks,
5661
+ Gr as ContactLinks,
5654
5662
  M as ContactPerson,
5655
5663
  Xr as ContactPersonRelated,
5656
5664
  Fr as ContactPosition,
@@ -5665,17 +5673,17 @@ export {
5665
5673
  Q as Country,
5666
5674
  pe as Currency,
5667
5675
  Ht as DataSuggestionProvider,
5668
- xt as DataTablePagination,
5669
- tt as DataTablePaginationRequestParams,
5670
- kt as DataTableSortRequestParams,
5671
- Ut as DateTimeProvider,
5676
+ It as DataTablePagination,
5677
+ et as DataTablePaginationRequestParams,
5678
+ xt as DataTableSortRequestParams,
5679
+ qt as DateTimeProvider,
5672
5680
  qr as DeletableNamedIdentity,
5673
5681
  he as DeliveryAddress,
5674
5682
  K as DeliveryType,
5675
5683
  Sr as DeviceTypeResolutionConfig,
5676
5684
  Ur as DiscountShortInfo,
5677
5685
  zt as FieldValidationResultData,
5678
- re as FilterGroup,
5686
+ te as FilterGroup,
5679
5687
  Ne as FilterItem,
5680
5688
  Le as FilterOpEnum,
5681
5689
  Be as GeoCoordinates,
@@ -5687,21 +5695,21 @@ export {
5687
5695
  F as Identity,
5688
5696
  br as Image,
5689
5697
  ye as Manager,
5690
- oe as ManagerCommon,
5691
- dt as ManagerDataFactory,
5692
- st as ManagerDataProvider,
5698
+ ee as ManagerCommon,
5699
+ Ut as ManagerDataFactory,
5700
+ rt as ManagerDataProvider,
5693
5701
  it as MetaTagItem,
5694
5702
  D as NamedIdentity,
5695
- d as Opf,
5703
+ G as Opf,
5696
5704
  b as OpfEnum,
5697
- et as Order,
5705
+ st as Order,
5698
5706
  rr as OrderInfo,
5699
5707
  Hr as OrderPaymentStatus,
5700
- Zr as OrderProduct,
5708
+ tt as OrderProduct,
5701
5709
  er as OrderShortInfo,
5702
5710
  zr as OrderStatus,
5703
- It as OrdersDataProvider,
5704
- G as PartnerGroup,
5711
+ Gt as OrdersDataProvider,
5712
+ d as PartnerGroup,
5705
5713
  Br as PaymentType,
5706
5714
  yt as PreferencesStorageProvider,
5707
5715
  Pe as PriceAnalyze,
@@ -5732,17 +5740,17 @@ export {
5732
5740
  xe as RecommendationsList,
5733
5741
  w as Reference,
5734
5742
  R as ReferenceDataProvider,
5735
- ee as Region,
5743
+ re as Region,
5736
5744
  Qe as ResourceType,
5737
- S as SalesDirection,
5745
+ a as SalesDirection,
5738
5746
  Ir as SentryConfig,
5739
- de as Seo,
5740
- Gt as SeoDataProvider,
5747
+ Ge as Seo,
5748
+ dt as SeoDataProvider,
5741
5749
  Ee as SourcePrimaryInterest,
5742
5750
  Ar as StockCount,
5743
5751
  ae as TypedInstanceFactory,
5744
5752
  Ue as UnitsHelper,
5745
- Ot as UnknownClientDataProvider,
5753
+ Nt as UnknownClientDataProvider,
5746
5754
  We as UpdatableNamedIdentity,
5747
5755
  Vr as User,
5748
5756
  Ve as UserCommonInfo,