@snabcentr/common-lib 1.54.1 → 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
  *
@@ -183,7 +183,7 @@ class Be {
183
183
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
184
184
  }
185
185
  }
186
- class E extends w {
186
+ class K extends w {
187
187
  }
188
188
  class fe extends w {
189
189
  /**
@@ -214,7 +214,7 @@ class fe extends w {
214
214
  * Координаты склада.
215
215
  */
216
216
  t(this, "coordinates");
217
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new E(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Be(e == null ? void 0 : e.coordinates);
217
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Be(e == null ? void 0 : e.coordinates);
218
218
  }
219
219
  }
220
220
  class Ar {
@@ -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
  *
@@ -1141,7 +1141,7 @@ class yt {
1141
1141
  );
1142
1142
  }
1143
1143
  }
1144
- class d extends D {
1144
+ class U extends D {
1145
1145
  /**
1146
1146
  * Инициализирует экземпляр класса {@link UserShortInfo}.
1147
1147
  *
@@ -1156,7 +1156,7 @@ class d extends D {
1156
1156
  this.type = e == null ? void 0 : e.type;
1157
1157
  }
1158
1158
  }
1159
- class dr extends D {
1159
+ class Ur extends D {
1160
1160
  /**
1161
1161
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
1162
1162
  *
@@ -1192,7 +1192,7 @@ class dr extends D {
1192
1192
  * Дата и время удаления.
1193
1193
  */
1194
1194
  t(this, "deletedAt");
1195
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new d(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1195
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new U(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1196
1196
  }
1197
1197
  }
1198
1198
  class B extends We {
@@ -1214,7 +1214,7 @@ class B extends We {
1214
1214
  this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1215
1215
  }
1216
1216
  }
1217
- class K extends _ {
1217
+ class J extends _ {
1218
1218
  /**
1219
1219
  * Инициализирует экземпляр класса {@link ClientProduct}.
1220
1220
  *
@@ -1250,10 +1250,10 @@ class K extends _ {
1250
1250
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1251
1251
  */
1252
1252
  t(this, "isFavorite");
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 dr(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;
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 Ur {
1256
+ class Gr {
1257
1257
  /**
1258
1258
  * Инициализирует экземпляр класса {@link ContactLinks}.
1259
1259
  *
@@ -1271,9 +1271,9 @@ class Ur {
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 Ur(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
  *
@@ -1379,7 +1379,7 @@ class ce extends Gr {
1379
1379
  * Список продуктов категории.
1380
1380
  */
1381
1381
  t(this, "products");
1382
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ce(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
1382
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ce(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new J(o));
1383
1383
  }
1384
1384
  }
1385
1385
  class je {
@@ -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
- class J extends w {
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
  *
@@ -1428,8 +1428,8 @@ class ee extends w {
1428
1428
  /**
1429
1429
  * Данные о стране, в которой расположен регион.
1430
1430
  */
1431
- t(this, "country", new J());
1432
- e && (this.country = new J(e.country));
1431
+ t(this, "country", new Q());
1432
+ e && (this.country = new Q(e.country));
1433
1433
  }
1434
1434
  }
1435
1435
  class le extends w {
@@ -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 {
@@ -1573,7 +1573,7 @@ class ve extends je {
1573
1573
  this.product = new _(e == null ? void 0 : e.product);
1574
1574
  }
1575
1575
  }
1576
- class Ee extends w {
1576
+ class Ke extends w {
1577
1577
  }
1578
1578
  class X extends D {
1579
1579
  /**
@@ -1595,7 +1595,7 @@ class X extends D {
1595
1595
  * Дополнительные метаданные свойства.
1596
1596
  */
1597
1597
  t(this, "metadata");
1598
- this.type = new Ee(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1598
+ this.type = new Ke(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1599
1599
  }
1600
1600
  }
1601
1601
  class H {
@@ -1619,7 +1619,7 @@ class H {
1619
1619
  }
1620
1620
  class Mr extends w {
1621
1621
  }
1622
- class Ke extends w {
1622
+ class Je extends w {
1623
1623
  }
1624
1624
  class wt extends w {
1625
1625
  }
@@ -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 U extends w {
1648
+ class G extends w {
1649
1649
  /**
1650
1650
  * Возвращает сгенерированную запись-описание физического лица.
1651
1651
  */
1652
1652
  static generatePersonItem() {
1653
- return new U({
1653
+ return new G({
1654
1654
  id: 1,
1655
1655
  guid: "",
1656
1656
  slug: b.Person,
@@ -1662,16 +1662,16 @@ 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
  }
1669
1669
  class Wr extends w {
1670
1670
  }
1671
- class Je extends w {
1672
- }
1673
1671
  class Qe extends w {
1674
1672
  }
1673
+ class Ee extends w {
1674
+ }
1675
1675
  class R extends u {
1676
1676
  /**
1677
1677
  * Возвращает {@link Promise} для получения данных указанного справочника.
@@ -1688,7 +1688,7 @@ class R extends u {
1688
1688
  * первичного интереса.
1689
1689
  */
1690
1690
  getChannelPrimaryInterest() {
1691
- return this.getTypedDataArrayRequester(Ke, "/internal/references/channel-primary-interest", !0);
1691
+ return this.getTypedDataArrayRequester(Je, "/internal/references/channel-primary-interest", !0);
1692
1692
  }
1693
1693
  /**
1694
1694
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
@@ -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(U, "/public/references/opf", !0);
1716
+ return this.getTypedDataArrayRequester(G, "/public/references/opf", !0);
1717
1717
  }
1718
1718
  /**
1719
1719
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
@@ -1737,19 +1737,19 @@ class R extends u {
1737
1737
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
1738
1738
  */
1739
1739
  getResourceTypes() {
1740
- return this.getTypedDataArrayRequester(Je, "/internal/references/resource-type", !0);
1740
+ return this.getTypedDataArrayRequester(Qe, "/internal/references/resource-type", !0);
1741
1741
  }
1742
1742
  /**
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} для получения справочника данных об источнике первичного интереса.
1750
1750
  */
1751
1751
  getSourcePrimaryInterest() {
1752
- return this.getTypedDataArrayRequester(Qe, "/internal/references/source-primary-interest", !0);
1752
+ return this.getTypedDataArrayRequester(Ee, "/internal/references/source-primary-interest", !0);
1753
1753
  }
1754
1754
  /**
1755
1755
  * Выполняет поиск данных о городах по терму в названии.
@@ -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
  * Выполняет поиск данных о странах по терму в названии.
@@ -1773,13 +1773,13 @@ class R extends u {
1773
1773
  * @param term Терм поиска.
1774
1774
  */
1775
1775
  searchCountry(r) {
1776
- return this.getTypedDataArrayRequester(J, `/internal/references/country/search?term=${r}`);
1776
+ return this.getTypedDataArrayRequester(Q, `/internal/references/country/search?term=${r}`);
1777
1777
  }
1778
1778
  /**
1779
1779
  * Возвращает {@link Promise} для получения справочника типов доставки.
1780
1780
  */
1781
1781
  getDeliveryTypes() {
1782
- return this.getTypedDataArrayRequester(E, "/internal/references/delivery-type", !0);
1782
+ return this.getTypedDataArrayRequester(K, "/internal/references/delivery-type", !0);
1783
1783
  }
1784
1784
  /**
1785
1785
  * Возвращает {@link Promise} для получения справочника складов.
@@ -1791,7 +1791,7 @@ class R extends u {
1791
1791
  * Возвращает {@link Promise} для получения справочника типов свойств.
1792
1792
  */
1793
1793
  getPropertyTypes() {
1794
- return this.getTypedDataArrayRequester(Ee, "/internal/references/property-type", !0);
1794
+ return this.getTypedDataArrayRequester(Ke, "/internal/references/property-type", !0);
1795
1795
  }
1796
1796
  /**
1797
1797
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
@@ -1830,7 +1830,7 @@ class Vr extends Ve {
1830
1830
  this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
1831
1831
  }
1832
1832
  }
1833
- class Er extends u {
1833
+ class Kr extends u {
1834
1834
  /**
1835
1835
  * Возвращает данные о текущем пользователе.
1836
1836
  */
@@ -1839,7 +1839,7 @@ class Er extends u {
1839
1839
  return this.get("/internal/users/info", {}, (r) => new Vr(r.data));
1840
1840
  }
1841
1841
  }
1842
- class Kr {
1842
+ class Jr {
1843
1843
  /**
1844
1844
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
1845
1845
  *
@@ -1882,7 +1882,7 @@ class Kr {
1882
1882
  * Данные о валюте.
1883
1883
  */
1884
1884
  t(this, "currency");
1885
- this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new pe(r.currency) : void 0;
1885
+ this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new U(r.client) : void 0, this.executor = r.executor ? new U(r.executor) : void 0, this.currency = r.currency ? new pe(r.currency) : void 0;
1886
1886
  }
1887
1887
  }
1888
1888
  class xe {
@@ -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 {
@@ -2145,7 +2145,7 @@ class vt extends u {
2145
2145
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2146
2146
  increase_percent: s.value
2147
2147
  },
2148
- (o) => new K(o.data)
2148
+ (o) => new J(o.data)
2149
2149
  );
2150
2150
  }
2151
2151
  /**
@@ -2157,7 +2157,7 @@ class vt extends u {
2157
2157
  * @see /doc/api/internal#/operations/api_internal_client_price_products_remove
2158
2158
  */
2159
2159
  removeProductPrice(r, e) {
2160
- return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new K(s.data));
2160
+ return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new J(s.data));
2161
2161
  }
2162
2162
  /**
2163
2163
  * Добавляет указанный продукт в список товаров для дополнительных продаж.
@@ -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 Kr(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 K(l))
2525
+ (o) => oe(o.data, (l) => new J(l))
2526
2526
  );
2527
2527
  }
2528
2528
  }
@@ -2543,7 +2543,7 @@ class At extends u {
2543
2543
  clientId: e,
2544
2544
  withPriceCoefficients: s
2545
2545
  },
2546
- (i) => new K(i.data)
2546
+ (i) => new J(i.data)
2547
2547
  );
2548
2548
  }
2549
2549
  }
@@ -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 {
@@ -3372,7 +3372,7 @@ class St extends u {
3372
3372
  );
3373
3373
  }
3374
3374
  }
3375
- var Jr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n))(Jr || {});
3375
+ var Qr = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(Qr || {});
3376
3376
  class Te extends F {
3377
3377
  /**
3378
3378
  * Инициализирует экземпляр класса {@link BankAccount}.
@@ -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", U.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 U(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 d(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(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));
@@ -3531,7 +3531,7 @@ class Ye extends D {
3531
3531
  }
3532
3532
  }
3533
3533
  }
3534
- class Qr extends Ye {
3534
+ class Er extends Ye {
3535
3535
  /**
3536
3536
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3537
3537
  *
@@ -3610,7 +3610,7 @@ class Yr extends Ze {
3610
3610
  /**
3611
3611
  * Страна регистрации юридического лица нерезидента.
3612
3612
  */
3613
- t(this, "registrationCountry", new J());
3613
+ t(this, "registrationCountry", new Q());
3614
3614
  /**
3615
3615
  * Регистрационный номер юридического лица нерезидента.
3616
3616
  */
@@ -3619,7 +3619,7 @@ class Yr extends Ze {
3619
3619
  * Налоговый номер юридического лица нерезидента.
3620
3620
  */
3621
3621
  t(this, "taxNumber", "");
3622
- e && (this.registrationCountry = new J(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3622
+ e && (this.registrationCountry = new Q(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3623
3623
  }
3624
3624
  }
3625
3625
  class ue {
@@ -3637,7 +3637,7 @@ class ue {
3637
3637
  case b.UlNr:
3638
3638
  return new Yr(r);
3639
3639
  default:
3640
- return new Qr(r);
3640
+ return new Er(r);
3641
3641
  }
3642
3642
  }
3643
3643
  }
@@ -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,10 +3778,10 @@ 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 Ke(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Qe(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new E(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
- class Q {
3784
+ class E {
3785
3785
  /**
3786
3786
  * Инициализирует экземпляр класса {@link DatePeriod}.
3787
3787
  *
@@ -3849,11 +3849,11 @@ class Lt {
3849
3849
  /**
3850
3850
  * Период регистрации.
3851
3851
  */
3852
- t(this, "createdAt", new Q());
3852
+ t(this, "createdAt", new E());
3853
3853
  /**
3854
3854
  * Период последнего входа.
3855
3855
  */
3856
- t(this, "lastLoginDate", new Q());
3856
+ t(this, "lastLoginDate", new E());
3857
3857
  /**
3858
3858
  * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
3859
3859
  */
@@ -3891,8 +3891,8 @@ 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 J(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 Q(r == null ? void 0 : r.createdAt), this.lastLoginDate = new Q(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 U(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new E(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 = {
3895
- createdAt: new Q((e = r == null ? void 0 : r.lastOrder) == null ? void 0 : e.createdAt),
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
+ 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
3898
3898
  };
@@ -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 U();
3944
+ this.contragentType = new G();
3945
3945
  break;
3946
3946
  case "preferredDeliveryType":
3947
- this.preferredDeliveryType = new E();
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
  }
@@ -3989,231 +3989,10 @@ class er extends F {
3989
3989
  * Признак того, что заказ подтвержден в 1С.
3990
3990
  */
3991
3991
  t(this, "isApproved1c");
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 d(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
3993
- }
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 d(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 K(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));
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;
4214
3993
  }
4215
3994
  }
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 E(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
  /**
@@ -4350,14 +4137,15 @@ class Nt extends we {
4350
4137
  /**
4351
4138
  * Возвращает дополнительные данные об указанных клиентах.
4352
4139
  *
4353
- * @param ids Список идентификаторов для которых необходимо вернуть дополнительные данные.
4140
+ * @param clients Список данных о клиентах, для которых необходимо получить дополнительные данные.
4354
4141
  * @param dataTypes Список данных которые необходимо вернуть.
4355
4142
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
4356
4143
  */
4357
4144
  getAdditionalClientsData(r, e) {
4358
- return this.post("/internal/clients/additional-data", { clients: r, requested_data_types: e }, (s) => {
4359
- let i = [];
4360
- return (s == null ? void 0 : s.data.length) > 0 && (i = s.data.map((o) => new rt(o))), i;
4145
+ const s = r.map((i) => i.id);
4146
+ return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4147
+ let o = [];
4148
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((l) => new Zr(l))), o;
4361
4149
  });
4362
4150
  }
4363
4151
  /**
@@ -5034,7 +4822,7 @@ class Nt extends we {
5034
4822
  return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
5035
4823
  }
5036
4824
  }
5037
- class Ot extends u {
4825
+ class Nt extends u {
5038
4826
  /**
5039
4827
  * Выполняет проверку занят ли указанный номер телефона.
5040
4828
  *
@@ -5048,7 +4836,7 @@ class Ot extends u {
5048
4836
  });
5049
4837
  }
5050
4838
  }
5051
- class qt extends u {
4839
+ class Ot extends u {
5052
4840
  /**
5053
4841
  * Возвращает настройки указанного конфигуратора для указанной категории.
5054
4842
  *
@@ -5119,7 +4907,7 @@ class qt extends u {
5119
4907
  return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
5120
4908
  }
5121
4909
  }
5122
- class dt {
4910
+ class qt {
5123
4911
  /**
5124
4912
  * Возвращает диапазон дат по умолчанию.
5125
4913
  */
@@ -5174,7 +4962,7 @@ const V = class V {
5174
4962
  * Список единиц измерения линейной величины.
5175
4963
  */
5176
4964
  t(V, "linearValues", ["пог.м.", "м.", "м2"]);
5177
- let de = V;
4965
+ let Ue = V;
5178
4966
  class Ut {
5179
4967
  /**
5180
4968
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
@@ -5191,7 +4979,7 @@ class Ut {
5191
4979
  return r.id === 0 && r.guid === "-undefined-";
5192
4980
  }
5193
4981
  }
5194
- class st extends u {
4982
+ class rt extends u {
5195
4983
  /**
5196
4984
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5197
4985
  */
@@ -5203,6 +4991,227 @@ class st extends u {
5203
4991
  });
5204
4992
  }
5205
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
+ }
5206
5215
  class it {
5207
5216
  /**
5208
5217
  * Инициализирует экземпляр класса {@link MetaTagItem}.
@@ -5221,7 +5230,7 @@ class it {
5221
5230
  this.name = r.name, this.content = r.content;
5222
5231
  }
5223
5232
  }
5224
- class Ue {
5233
+ class Ge {
5225
5234
  /**
5226
5235
  * Инициализирует экземпляр класса {@link Seo}.
5227
5236
  *
@@ -5257,10 +5266,10 @@ class Ue {
5257
5266
  */
5258
5267
  t(this, "meta");
5259
5268
  var e;
5260
- this.resourceType = new Je(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))) ?? [];
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))) ?? [];
5261
5270
  }
5262
5271
  }
5263
- class Gt extends u {
5272
+ class dt extends u {
5264
5273
  /**
5265
5274
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
5266
5275
  *
@@ -5268,7 +5277,7 @@ class Gt extends u {
5268
5277
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
5269
5278
  */
5270
5279
  getResourceSeoData(r, e) {
5271
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new Ue(s.data));
5280
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new Ge(s.data));
5272
5281
  }
5273
5282
  /**
5274
5283
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -5279,7 +5288,7 @@ class Gt extends u {
5279
5288
  * в случае ошибок в запросах.
5280
5289
  */
5281
5290
  saveResourceSeoData(r, e = {}) {
5282
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new Ue(s.data), e);
5291
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new Ge(s.data), e);
5283
5292
  }
5284
5293
  /**
5285
5294
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -5435,7 +5444,7 @@ const P = ge("__references_private", () => {
5435
5444
  }).catch(y)), c.deliveryTypeReference;
5436
5445
  }), x = v(() => {
5437
5446
  const c = P();
5438
- 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) => {
5439
5448
  c.managersList = h;
5440
5449
  }).catch(y)), c.managersList;
5441
5450
  }), k = v(() => {
@@ -5542,7 +5551,7 @@ const P = ge("__references_private", () => {
5542
5551
  */
5543
5552
  currentUser: v(() => {
5544
5553
  const r = nt();
5545
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(Er).getCurrentUser().then((e) => {
5554
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(Kr).getCurrentUser().then((e) => {
5546
5555
  r.currentUser = e;
5547
5556
  }).catch(y).finally(y)), r.currentUser;
5548
5557
  })
@@ -5624,7 +5633,7 @@ export {
5624
5633
  Te as BankAccount,
5625
5634
  we as BasePaginationProvider,
5626
5635
  kr as CalculationTypeEnum,
5627
- ie as Cart,
5636
+ ne as Cart,
5628
5637
  ar as CartItem,
5629
5638
  _r as CartItemBase,
5630
5639
  ft as CartProvider,
@@ -5632,24 +5641,24 @@ export {
5632
5641
  He as CatalogableItem,
5633
5642
  q as Category,
5634
5643
  ke as CategoryPricingRule,
5635
- Ke as ChannelPrimaryInterest,
5644
+ Je as ChannelPrimaryInterest,
5636
5645
  wt as City,
5637
5646
  le as CityWithRegionAndCountry,
5638
5647
  qe as Client,
5639
- rt as ClientAdditionalData,
5648
+ Zr as ClientAdditionalData,
5640
5649
  ce as ClientCategory,
5641
- Nt as ClientDataProvider,
5650
+ kt as ClientDataProvider,
5642
5651
  vt as ClientPriceProvider,
5643
5652
  Pt as ClientPriceTemplateProvider,
5644
- K as ClientProduct,
5653
+ J as ClientProduct,
5645
5654
  $t as ClientProductCategoryDataProvider,
5646
5655
  At as ClientProductDataProvider,
5647
- se as ClientShortInfo,
5648
- Jr as ClientsAdditionalDataRequestTypeEnum,
5656
+ ie as ClientShortInfo,
5657
+ Qr as ClientsAdditionalDataRequestTypeEnum,
5649
5658
  Lt as ClientsListFilters,
5650
- qt as ConfiguratorProvider,
5659
+ Ot as ConfiguratorProvider,
5651
5660
  be as Contact,
5652
- Ur as ContactLinks,
5661
+ Gr as ContactLinks,
5653
5662
  M as ContactPerson,
5654
5663
  Xr as ContactPersonRelated,
5655
5664
  Fr as ContactPosition,
@@ -5657,24 +5666,24 @@ export {
5657
5666
  Ye as ContragentBase,
5658
5667
  ue as ContragentFactory,
5659
5668
  Xe as ContragentIc,
5660
- Qr as ContragentPerson,
5669
+ Er as ContragentPerson,
5661
5670
  Yr as ContragentUlNr,
5662
5671
  Ze as ContragentUlR,
5663
5672
  Se as CostSourceEnum,
5664
- J as Country,
5673
+ Q as Country,
5665
5674
  pe as Currency,
5666
5675
  Ht as DataSuggestionProvider,
5667
- xt as DataTablePagination,
5668
- tt as DataTablePaginationRequestParams,
5669
- kt as DataTableSortRequestParams,
5670
- dt as DateTimeProvider,
5676
+ It as DataTablePagination,
5677
+ et as DataTablePaginationRequestParams,
5678
+ xt as DataTableSortRequestParams,
5679
+ qt as DateTimeProvider,
5671
5680
  qr as DeletableNamedIdentity,
5672
5681
  he as DeliveryAddress,
5673
- E as DeliveryType,
5682
+ K as DeliveryType,
5674
5683
  Sr as DeviceTypeResolutionConfig,
5675
- dr as DiscountShortInfo,
5684
+ Ur as DiscountShortInfo,
5676
5685
  zt as FieldValidationResultData,
5677
- re as FilterGroup,
5686
+ te as FilterGroup,
5678
5687
  Ne as FilterItem,
5679
5688
  Le as FilterOpEnum,
5680
5689
  Be as GeoCoordinates,
@@ -5686,21 +5695,21 @@ export {
5686
5695
  F as Identity,
5687
5696
  br as Image,
5688
5697
  ye as Manager,
5689
- oe as ManagerCommon,
5698
+ ee as ManagerCommon,
5690
5699
  Ut as ManagerDataFactory,
5691
- st as ManagerDataProvider,
5700
+ rt as ManagerDataProvider,
5692
5701
  it as MetaTagItem,
5693
5702
  D as NamedIdentity,
5694
- U as Opf,
5703
+ G as Opf,
5695
5704
  b as OpfEnum,
5696
- et as Order,
5705
+ st as Order,
5697
5706
  rr as OrderInfo,
5698
5707
  Hr as OrderPaymentStatus,
5699
- Zr as OrderProduct,
5708
+ tt as OrderProduct,
5700
5709
  er as OrderShortInfo,
5701
5710
  zr as OrderStatus,
5702
- It as OrdersDataProvider,
5703
- G as PartnerGroup,
5711
+ Gt as OrdersDataProvider,
5712
+ d as PartnerGroup,
5704
5713
  Br as PaymentType,
5705
5714
  yt as PreferencesStorageProvider,
5706
5715
  Pe as PriceAnalyze,
@@ -5721,32 +5730,32 @@ export {
5721
5730
  Dt as ProductDataProvider,
5722
5731
  Wr as ProductFileType,
5723
5732
  _e as ProductPriceCoefficient,
5724
- Kr as ProductPriceHistory,
5733
+ Jr as ProductPriceHistory,
5725
5734
  _t as PropertiesProvider,
5726
5735
  X as Property,
5727
- Ee as PropertyType,
5736
+ Ke as PropertyType,
5728
5737
  Nr as PropertyTypeEnum,
5729
5738
  H as PropertyValue,
5730
5739
  at as RecommendationsDataProvider,
5731
5740
  xe as RecommendationsList,
5732
5741
  w as Reference,
5733
5742
  R as ReferenceDataProvider,
5734
- ee as Region,
5735
- Je as ResourceType,
5736
- S as SalesDirection,
5743
+ re as Region,
5744
+ Qe as ResourceType,
5745
+ a as SalesDirection,
5737
5746
  Ir as SentryConfig,
5738
- Ue as Seo,
5739
- Gt as SeoDataProvider,
5740
- Qe as SourcePrimaryInterest,
5747
+ Ge as Seo,
5748
+ dt as SeoDataProvider,
5749
+ Ee as SourcePrimaryInterest,
5741
5750
  Ar as StockCount,
5742
5751
  ae as TypedInstanceFactory,
5743
- de as UnitsHelper,
5744
- Ot as UnknownClientDataProvider,
5752
+ Ue as UnitsHelper,
5753
+ Nt as UnknownClientDataProvider,
5745
5754
  We as UpdatableNamedIdentity,
5746
5755
  Vr as User,
5747
5756
  Ve as UserCommonInfo,
5748
- Er as UserDataProvider,
5749
- d as UserShortInfo,
5757
+ Kr as UserDataProvider,
5758
+ U as UserShortInfo,
5750
5759
  jr as UserTypeEnum,
5751
5760
  xr as VersionConfig,
5752
5761
  fe as Warehouse,