@snabcentr/common-lib 2.5.0 → 2.5.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.
@@ -2,11 +2,11 @@ var Lr = Object.defineProperty;
2
2
  var dr = (i, r, e) => r in i ? Lr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
3
  var t = (i, r, e) => dr(i, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as nr } from "jwt-decode";
5
- import { merge as le, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as F, every as xr, split as _r, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as ge, forEach as Hr, isDate as _e, omitBy as cr, isObject as lr } from "lodash-es";
6
- import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
5
+ import { merge as le, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as xr, split as _r, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as ge, forEach as Fr, isDate as _e, omitBy as cr, isObject as lr } from "lodash-es";
6
+ import { objectToCamel as He, objectToSnake as Ee } from "ts-case-convert";
7
7
  import { defineStore as W } from "pinia";
8
- import { ref as y, markRaw as Fr, computed as P } from "vue";
9
- import { isAfter as Ve, parseISO as a, startOfToday as Oe, format as q, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
8
+ import { ref as y, markRaw as Hr, computed as P } from "vue";
9
+ import { isAfter as Ve, parseISO as a, startOfToday as Oe, format as I, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
10
10
  import Kr, { CanceledError as Qr } from "axios";
11
11
  class j {
12
12
  /**
@@ -107,7 +107,7 @@ class j {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- const e = nr(r), s = new j(Fe(e));
110
+ const e = nr(r), s = new j(He(e));
111
111
  return s.resourceAccess = e.resource_access, s;
112
112
  }
113
113
  }
@@ -151,7 +151,7 @@ class Bt extends j {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- return new j(Fe(nr(e)));
154
+ return new j(He(nr(e)));
155
155
  }
156
156
  }
157
157
  class Yr {
@@ -489,7 +489,7 @@ const V = W("common.auth_state_private", () => {
489
489
  const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
490
490
  return c ? Promise.resolve(c) : void 0;
491
491
  })()
492
- ), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
492
+ ), r = y(void 0), e = y(void 0), s = Hr(/* @__PURE__ */ new Map());
493
493
  function n() {
494
494
  e.value = void 0, A(i.value) || i.value.then((o) => {
495
495
  const c = j.getJwtPayload(o);
@@ -546,7 +546,7 @@ const V = W("common.auth_state_private", () => {
546
546
  const f = j.getJwtPayload(m);
547
547
  c.userPermissions = f.exp * 1e3 > Date.now() ? or(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
548
548
  }).catch(v);
549
- const u = F(o) ? o.join(" && ") : o;
549
+ const u = H(o) ? o.join(" && ") : o;
550
550
  if (c.userPermissionsComputedRefs.has(u))
551
551
  return c.userPermissionsComputedRefs.get(u);
552
552
  const h = P(() => {
@@ -556,9 +556,9 @@ const V = W("common.auth_state_private", () => {
556
556
  if (D.length < 2)
557
557
  return !1;
558
558
  const [se, ie] = D, J = (E = V().userPermissions) == null ? void 0 : E[se];
559
- return F(J) && J.includes(ie);
559
+ return H(J) && J.includes(ie);
560
560
  };
561
- return F(o) ? xr(o, (f) => m(f)) : m(o);
561
+ return H(o) ? xr(o, (f) => m(f)) : m(o);
562
562
  });
563
563
  return c.userPermissionsComputedRefs.set(u, h), h;
564
564
  }
@@ -786,7 +786,7 @@ class je {
786
786
  return new r(e);
787
787
  }
788
788
  }
789
- class L extends b {
789
+ class d extends b {
790
790
  /**
791
791
  * Инициализирует экземпляр класса {@link UserShortInfo}.
792
792
  *
@@ -837,7 +837,7 @@ class nt extends b {
837
837
  * Дата и время удаления.
838
838
  */
839
839
  t(this, "deletedAt");
840
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(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 L(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
840
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(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 = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
841
841
  }
842
842
  }
843
843
  class Q extends ur {
@@ -916,7 +916,7 @@ class gr {
916
916
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
917
917
  }
918
918
  }
919
- class H extends w {
919
+ class F extends w {
920
920
  }
921
921
  class me extends w {
922
922
  /**
@@ -947,7 +947,7 @@ class me extends w {
947
947
  * Координаты склада.
948
948
  */
949
949
  t(this, "coordinates");
950
- 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((n) => new H(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new gr(e == null ? void 0 : e.coordinates);
950
+ 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((n) => new F(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new gr(e == null ? void 0 : e.coordinates);
951
951
  }
952
952
  }
953
953
  class ot {
@@ -968,7 +968,7 @@ class ot {
968
968
  this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
969
969
  }
970
970
  }
971
- class _ extends b {
971
+ class O extends b {
972
972
  /**
973
973
  * Инициализирует экземпляр класса {@link Currency}.
974
974
  *
@@ -1022,7 +1022,7 @@ class Qe extends b {
1022
1022
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
1023
1023
  }
1024
1024
  }
1025
- class I extends it {
1025
+ class L extends it {
1026
1026
  /**
1027
1027
  * Инициализирует экземпляр класса {@link Product}.
1028
1028
  *
@@ -1099,7 +1099,7 @@ class I extends it {
1099
1099
  * Список коэффициентов цен на продукт.
1100
1100
  */
1101
1101
  t(this, "priceCoefficients");
1102
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new _(e.currency) : new _(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1102
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1103
1103
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
1104
1104
  s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, k().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1105
1105
  }
@@ -1123,7 +1123,7 @@ class I extends it {
1123
1123
  }
1124
1124
  }
1125
1125
  var Me = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(Me || {});
1126
- class G extends I {
1126
+ class G extends L {
1127
1127
  /**
1128
1128
  * Инициализирует экземпляр класса {@link ClientProduct}.
1129
1129
  *
@@ -1261,7 +1261,7 @@ class mr extends re {
1261
1261
  * @inheritDoc
1262
1262
  */
1263
1263
  t(this, "originalId");
1264
- this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new _(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1264
+ this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new d(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1265
1265
  }
1266
1266
  }
1267
1267
  let ct = class extends mr {
@@ -1308,7 +1308,7 @@ let ct = class extends mr {
1308
1308
  * @inheritDoc
1309
1309
  */
1310
1310
  t(this, "currency");
1311
- 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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new _(e.currency);
1311
+ 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 = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new O(e.currency);
1312
1312
  }
1313
1313
  };
1314
1314
  class ye {
@@ -1423,7 +1423,7 @@ const R = class R {
1423
1423
  * @param response Данные ответа на запрос.
1424
1424
  */
1425
1425
  // eslint-disable-next-line class-methods-use-this
1426
- t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
1426
+ t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = He(r.data)), r));
1427
1427
  this.errorResponseHandler = R.defaultErrorsResponseHandler, this.httpClient = Kr.create({
1428
1428
  headers: {
1429
1429
  Accept: "application/json",
@@ -1734,7 +1734,7 @@ class N extends fe {
1734
1734
  * Список продуктов категории.
1735
1735
  */
1736
1736
  t(this, "products");
1737
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new I(o));
1737
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new L(o));
1738
1738
  }
1739
1739
  }
1740
1740
  class fr {
@@ -1755,7 +1755,7 @@ class fr {
1755
1755
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1756
1756
  }
1757
1757
  }
1758
- class O extends w {
1758
+ class q extends w {
1759
1759
  }
1760
1760
  class Be extends b {
1761
1761
  /**
@@ -1785,7 +1785,7 @@ class Be extends b {
1785
1785
  * @inheritDoc
1786
1786
  */
1787
1787
  t(this, "isRegionalDirector");
1788
- this.salesDirection = e != null && e.salesDirection ? new O(e.salesDirection) : new O(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new fr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1788
+ this.salesDirection = e != null && e.salesDirection ? new q(e.salesDirection) : new q(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new fr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1789
1789
  }
1790
1790
  }
1791
1791
  class ze extends w {
@@ -2028,7 +2028,7 @@ class wr extends b {
2028
2028
  * Признак активности учетной записи пользователя.
2029
2029
  */
2030
2030
  t(this, "isActive");
2031
- 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 O(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2031
+ 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 q(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2032
2032
  }
2033
2033
  }
2034
2034
  class te extends wr {
@@ -2077,7 +2077,7 @@ class te extends wr {
2077
2077
  * @inheritDoc
2078
2078
  */
2079
2079
  t(this, "curators");
2080
- this.salesDirection = new O(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 De(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((o) => new Be(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new We(o))) ?? void 0;
2080
+ this.salesDirection = new q(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 De(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((o) => new Be(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new We(o))) ?? void 0;
2081
2081
  }
2082
2082
  }
2083
2083
  class ne extends re {
@@ -2119,7 +2119,7 @@ class Ie extends yr {
2119
2119
  * Базовые данные о продукте.
2120
2120
  */
2121
2121
  t(this, "product");
2122
- this.product = new I(e == null ? void 0 : e.product);
2122
+ this.product = new L(e == null ? void 0 : e.product);
2123
2123
  }
2124
2124
  }
2125
2125
  class vr extends w {
@@ -2244,7 +2244,7 @@ class Jt {
2244
2244
  return Object.keys(this).forEach((c) => {
2245
2245
  const u = this[c];
2246
2246
  // eslint-disable-next-line prettier/prettier
2247
- A(u) || C(u) && u.trim().length === 0 || He(u.isNewRec) && u.isNewRec() || (r[c] = u);
2247
+ A(u) || C(u) && u.trim().length === 0 || Fe(u.isNewRec) && u.isNewRec() || (r[c] = u);
2248
2248
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((n = r == null ? void 0 : r.updatedAt) != null && n.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2249
2249
  }
2250
2250
  }
@@ -2574,8 +2574,8 @@ class Kt extends p {
2574
2574
  return this.post(
2575
2575
  `/internal/clients/${r}/price/templates/${e}`,
2576
2576
  s && {
2577
- startAt: s.startAt && q(s.startAt, n),
2578
- endAt: s.endAt && q(s.endAt, n)
2577
+ startAt: s.startAt && I(s.startAt, n),
2578
+ endAt: s.endAt && I(s.endAt, n)
2579
2579
  },
2580
2580
  (o) => new ne(o.data),
2581
2581
  {},
@@ -2608,8 +2608,8 @@ class Kt extends p {
2608
2608
  return this.patch(
2609
2609
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2610
2610
  n && {
2611
- startAt: n.startAt && q(n.startAt, o),
2612
- endAt: n.endAt && q(n.endAt, o)
2611
+ startAt: n.startAt && I(n.startAt, o),
2612
+ endAt: n.endAt && I(n.endAt, o)
2613
2613
  },
2614
2614
  (c) => new ne(c.data)
2615
2615
  );
@@ -2687,7 +2687,7 @@ class Qt extends p {
2687
2687
  showHidden: s,
2688
2688
  withPriceCoefficients: e
2689
2689
  },
2690
- (n) => ge(n.data, (o) => new I(o))
2690
+ (n) => ge(n.data, (o) => new L(o))
2691
2691
  );
2692
2692
  }
2693
2693
  /**
@@ -2700,7 +2700,7 @@ class Qt extends p {
2700
2700
  getCategoryProductsCoefficients(r) {
2701
2701
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2702
2702
  const { data: s } = e;
2703
- return Hr(s, (n) => n.map((o) => new Ge(o))), s;
2703
+ return Fr(s, (n) => n.map((o) => new Ge(o))), s;
2704
2704
  });
2705
2705
  }
2706
2706
  /**
@@ -2729,7 +2729,7 @@ class Yt extends p {
2729
2729
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2730
2730
  */
2731
2731
  getProductData(r, e = !1) {
2732
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new I(s.data));
2732
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new L(s.data));
2733
2733
  }
2734
2734
  /**
2735
2735
  * Возвращает публичные данные об указанном продукте.
@@ -2737,7 +2737,7 @@ class Yt extends p {
2737
2737
  * @param productId Идентификатор продукта.
2738
2738
  */
2739
2739
  getPublicProductData(r) {
2740
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
2740
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new L(e.data));
2741
2741
  }
2742
2742
  /**
2743
2743
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2762,7 +2762,7 @@ class Yt extends p {
2762
2762
  publicSimpleSearch(r, e = 10) {
2763
2763
  return new Promise((s, n) => {
2764
2764
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2765
- s(o.products.map((c) => new I(c)));
2765
+ s(o.products.map((c) => new L(c)));
2766
2766
  }).catch((o) => {
2767
2767
  n(o);
2768
2768
  });
@@ -2884,7 +2884,7 @@ class Xe {
2884
2884
  field: this.field,
2885
2885
  op: this.op
2886
2886
  };
2887
- return r.value = _e(this.value) ? q(this.value, k().config.dateFormats.api) : this.value, r;
2887
+ return r.value = _e(this.value) ? I(this.value, k().config.dateFormats.api) : this.value, r;
2888
2888
  }
2889
2889
  }
2890
2890
  class M {
@@ -2917,7 +2917,7 @@ class M {
2917
2917
  toPrimitive() {
2918
2918
  return {
2919
2919
  groupOp: this.groupOp,
2920
- filters: this.filters.map((r) => r instanceof Xe && He(r.toPrimitive) ? r.toPrimitive() : r),
2920
+ filters: this.filters.map((r) => r instanceof Xe && Fe(r.toPrimitive) ? r.toPrimitive() : r),
2921
2921
  groups: this.groups.map((r) => r instanceof M ? r.toPrimitive() : r)
2922
2922
  };
2923
2923
  }
@@ -2940,7 +2940,7 @@ class Ae extends p {
2940
2940
  page: (n == null ? void 0 : n.page) ?? 1,
2941
2941
  perPage: (n == null ? void 0 : n.pageSize) ?? 10
2942
2942
  };
2943
- return e && (m.filters = JSON.stringify((e instanceof M ? e : new M(e)).toPrimitive())), X(s) || (m.sort = F(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, h);
2943
+ return e && (m.filters = JSON.stringify((e instanceof M ? e : new M(e)).toPrimitive())), X(s) || (m.sort = H(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, h);
2944
2944
  }
2945
2945
  }
2946
2946
  class es extends Ae {
@@ -3657,7 +3657,7 @@ class ss extends p {
3657
3657
  showHidden: n,
3658
3658
  withPriceCoefficients: s
3659
3659
  },
3660
- (o) => ge(o.data, (c) => new I(c))
3660
+ (o) => ge(o.data, (c) => new L(c))
3661
3661
  );
3662
3662
  }
3663
3663
  }
@@ -3775,8 +3775,8 @@ class Ne extends re {
3775
3775
  /**
3776
3776
  * Данные о валюте.
3777
3777
  */
3778
- t(this, "currency", new _());
3779
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new _(e.currency));
3778
+ t(this, "currency", new O());
3779
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new O(e.currency));
3780
3780
  }
3781
3781
  }
3782
3782
  class Ue extends b {
@@ -3883,7 +3883,7 @@ class Ar extends b {
3883
3883
  */
3884
3884
  t(this, "updater");
3885
3885
  if (e) {
3886
- if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3886
+ if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3887
3887
  const s = [];
3888
3888
  e.contacts.forEach((n) => {
3889
3889
  s.push(new z(n));
@@ -4141,7 +4141,7 @@ class rr extends te {
4141
4141
  * @inheritDoc
4142
4142
  */
4143
4143
  t(this, "extraData");
4144
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ae(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new H(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4144
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ae(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4145
4145
  }
4146
4146
  }
4147
4147
  class br {
@@ -4154,7 +4154,7 @@ class br {
4154
4154
  return Object.keys(this).forEach((e) => {
4155
4155
  const s = this[e];
4156
4156
  A(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4157
- C(s) && s.trim().length === 0 || He(s.isNewRec) && s.isNewRec() || (r[e] = s);
4157
+ C(s) && s.trim().length === 0 || Fe(s.isNewRec) && s.isNewRec() || (r[e] = s);
4158
4158
  }), r;
4159
4159
  }
4160
4160
  }
@@ -4259,7 +4259,7 @@ class os extends br {
4259
4259
  * @inheritDoc
4260
4260
  */
4261
4261
  t(this, "lastOrder");
4262
- this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new De(D)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new O(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new H(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4262
+ this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new De(D)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new F(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4263
4263
  createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
4264
4264
  creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
4265
4265
  isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
@@ -4301,7 +4301,7 @@ class os extends br {
4301
4301
  this.contragentType = new B();
4302
4302
  break;
4303
4303
  case "preferredDeliveryType":
4304
- this.preferredDeliveryType = new H();
4304
+ this.preferredDeliveryType = new F();
4305
4305
  break;
4306
4306
  case "partnerGroups":
4307
4307
  this.partnerGroups = [];
@@ -4340,7 +4340,7 @@ class Sr extends re {
4340
4340
  * @inheritDoc
4341
4341
  */
4342
4342
  t(this, "creator");
4343
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new L(e == null ? void 0 : e.creator);
4343
+ this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new d(e == null ? void 0 : e.creator);
4344
4344
  }
4345
4345
  }
4346
4346
  class Rt extends b {
@@ -4380,7 +4380,7 @@ class Rt extends b {
4380
4380
  * @inheritDoc
4381
4381
  */
4382
4382
  t(this, "curators");
4383
- this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new H(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4383
+ this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new F(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4384
4384
  }
4385
4385
  }
4386
4386
  class Pt {
@@ -4450,7 +4450,7 @@ class ls {
4450
4450
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4451
4451
  }
4452
4452
  }
4453
- class x extends Ae {
4453
+ class _ extends Ae {
4454
4454
  /**
4455
4455
  * Преобразует данные о клиенте в данные требуемые для запроса.
4456
4456
  *
@@ -4674,7 +4674,7 @@ class x extends Ae {
4674
4674
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4675
4675
  */
4676
4676
  createClientCommonData(r, e = {}) {
4677
- return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new rr(s.data), e);
4677
+ return this.post("/internal/clients", _.transformClientDataToRequest(r), (s) => new rr(s.data), e);
4678
4678
  }
4679
4679
  /**
4680
4680
  * Обновляет данные указанного клиента.
@@ -4684,7 +4684,7 @@ class x extends Ae {
4684
4684
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4685
4685
  */
4686
4686
  updateClientCommonData(r, e = {}) {
4687
- return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
4687
+ return this.patch(`/internal/clients/${r.id}`, _.transformClientDataToRequest(r), void 0, e);
4688
4688
  }
4689
4689
  /**
4690
4690
  * Обновляет данные "Не беспокоить" указанного клиента.
@@ -4813,7 +4813,7 @@ class x extends Ae {
4813
4813
  createContragentClientData(r, e, s = {}) {
4814
4814
  return this.post(
4815
4815
  `/internal/clients/${r}/contragents`,
4816
- x.transformContragentClientDataToRequest(e),
4816
+ _.transformContragentClientDataToRequest(e),
4817
4817
  (n) => Ce.createInstance(n.data),
4818
4818
  s
4819
4819
  );
@@ -4829,7 +4829,7 @@ class x extends Ae {
4829
4829
  updateContragentClientData(r, e, s = {}) {
4830
4830
  return this.patch(
4831
4831
  `/internal/clients/${r}/contragents/${e.id}`,
4832
- x.transformContragentClientDataToRequest(e),
4832
+ _.transformContragentClientDataToRequest(e),
4833
4833
  (n) => Ce.createInstance(n.data),
4834
4834
  s
4835
4835
  );
@@ -4855,7 +4855,7 @@ class x extends Ae {
4855
4855
  createClientDeliveryAddress(r, e, s = {}) {
4856
4856
  return this.post(
4857
4857
  `/internal/clients/${r}/delivery-addresses`,
4858
- x.transformClientDeliveryAddressToRequest(e),
4858
+ _.transformClientDeliveryAddressToRequest(e),
4859
4859
  (n) => new ae(n.data),
4860
4860
  s
4861
4861
  );
@@ -4871,7 +4871,7 @@ class x extends Ae {
4871
4871
  updateClientDeliveryAddress(r, e, s = {}) {
4872
4872
  return this.patch(
4873
4873
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4874
- x.transformClientDeliveryAddressToRequest(e),
4874
+ _.transformClientDeliveryAddressToRequest(e),
4875
4875
  (n) => new ae(n.data),
4876
4876
  s
4877
4877
  );
@@ -4898,7 +4898,7 @@ class x extends Ae {
4898
4898
  createContragentBankAccount(r, e, s, n = {}) {
4899
4899
  return this.post(
4900
4900
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
4901
- x.transformClientContragentBankAccountToRequest(s),
4901
+ _.transformClientContragentBankAccountToRequest(s),
4902
4902
  (o) => new Ne(o.data),
4903
4903
  n
4904
4904
  );
@@ -4915,7 +4915,7 @@ class x extends Ae {
4915
4915
  updateContragentBankAccount(r, e, s, n = {}) {
4916
4916
  return this.patch(
4917
4917
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
4918
- x.transformClientContragentBankAccountToRequest(s),
4918
+ _.transformClientContragentBankAccountToRequest(s),
4919
4919
  (o) => new Ne(o.data),
4920
4920
  n
4921
4921
  );
@@ -5264,7 +5264,7 @@ class hs extends p {
5264
5264
  const o = this.get(
5265
5265
  `internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
5266
5266
  { params: s, client_id: e },
5267
- (u) => new I(u.data)
5267
+ (u) => new L(u.data)
5268
5268
  );
5269
5269
  return o.catch((u) => {
5270
5270
  this.errorResponseHandler(u, n);
@@ -5465,7 +5465,7 @@ class ys {
5465
5465
  */
5466
5466
  t(this, "isAdditionalSale");
5467
5467
  var e, s, n;
5468
- this.paymentType = (r == null ? void 0 : r.payment.type) ?? -1, this.deliveryType = (r == null ? void 0 : r.delivery.type) ?? -1, this.contragentId = ((e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id) ?? -1, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : /* @__PURE__ */ new Date(), this.addressId = (s = r == null ? void 0 : r.delivery.address) == null ? void 0 : s.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
5468
+ this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : /* @__PURE__ */ new Date(), this.addressId = (s = r == null ? void 0 : r.delivery.address) == null ? void 0 : s.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
5469
5469
  }
5470
5470
  }
5471
5471
  class Ir extends Sr {
@@ -5534,7 +5534,7 @@ class Ir extends Sr {
5534
5534
  date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5535
5535
  address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ae(e.delivery.address) : void 0,
5536
5536
  warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
5537
- }, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5537
+ }, this.attachedUser = e != null && e.attachedUser ? new d(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5538
5538
  }
5539
5539
  }
5540
5540
  var Tt = /* @__PURE__ */ ((i) => (i.New = "new", i.Processing = "processing", i.AwaitingSupplyProducts = "awaiting_supply_products", i.InvoiceIssued = "invoice_issued", i.ProcessingOnStock = "processing_on_stock", i.Finished = "finished", i.OrderUpdated = "order_updated", i.Canceled = "canceled", i.Error = "error", i))(Tt || {});
@@ -5572,7 +5572,7 @@ class T extends he {
5572
5572
  * Возвращает {@link Promise} для получения справочника списка валют.
5573
5573
  */
5574
5574
  getCurrency() {
5575
- return this.getTypedDataArrayRequester(_, "/public/references/currency", !0);
5575
+ return this.getTypedDataArrayRequester(O, "/public/references/currency", !0);
5576
5576
  }
5577
5577
  /**
5578
5578
  * Возвращает {@link Promise} для получения справочника данных
@@ -5621,7 +5621,7 @@ class T extends he {
5621
5621
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
5622
5622
  */
5623
5623
  getSalesDirections() {
5624
- return this.getTypedDataArrayRequester(O, "/public/references/sales-direction", !0);
5624
+ return this.getTypedDataArrayRequester(q, "/public/references/sales-direction", !0);
5625
5625
  }
5626
5626
  /**
5627
5627
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
@@ -5657,7 +5657,7 @@ class T extends he {
5657
5657
  * Возвращает {@link Promise} для получения справочника типов доставки.
5658
5658
  */
5659
5659
  getDeliveryTypes() {
5660
- return this.getTypedDataArrayRequester(H, "/internal/references/delivery-type", !0);
5660
+ return this.getTypedDataArrayRequester(F, "/internal/references/delivery-type", !0);
5661
5661
  }
5662
5662
  /**
5663
5663
  * Возвращает {@link Promise} для получения справочника складов.
@@ -6032,7 +6032,7 @@ class vs extends br {
6032
6032
  * @inheritDoc
6033
6033
  */
6034
6034
  t(this, "onlyMyRegions");
6035
- this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new De(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new H(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6035
+ this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new d(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new De(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6036
6036
  }
6037
6037
  /**
6038
6038
  * @inheritDoc
@@ -6049,7 +6049,7 @@ class vs extends br {
6049
6049
  this.deliveryDate.from = null, this.deliveryDate.to = null;
6050
6050
  break;
6051
6051
  case "deliveryType":
6052
- this.deliveryType = new H();
6052
+ this.deliveryType = new F();
6053
6053
  break;
6054
6054
  case "clientCities":
6055
6055
  this.clientCities = [];
@@ -6129,10 +6129,10 @@ class bt extends mr {
6129
6129
  * @inheritDoc
6130
6130
  */
6131
6131
  t(this, "currency");
6132
- this.product = new G(e.product), this.currency = new _(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;
6132
+ this.product = new G(e.product), this.currency = new O(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;
6133
6133
  }
6134
6134
  }
6135
- class d extends Ir {
6135
+ class x extends Ir {
6136
6136
  /**
6137
6137
  * Инициализирует экземпляр класса {@link Order}.
6138
6138
  *
@@ -6215,7 +6215,7 @@ class St {
6215
6215
  * @inheritDoc
6216
6216
  */
6217
6217
  t(this, "createdAt");
6218
- this.user = new L(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6218
+ this.user = new d(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6219
6219
  }
6220
6220
  }
6221
6221
  class Cs extends Ae {
@@ -6278,7 +6278,7 @@ class Cs extends Ae {
6278
6278
  * @see /doc/api/internal#/Заказы/api_internal_orders_get
6279
6279
  */
6280
6280
  getOrder(r) {
6281
- return this.get(`/internal/orders/${r}`, {}, (e) => new d(e.data));
6281
+ return this.get(`/internal/orders/${r}`, {}, (e) => new x(e.data));
6282
6282
  }
6283
6283
  /**
6284
6284
  * Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
@@ -6292,7 +6292,16 @@ class Cs extends Ae {
6292
6292
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
6293
6293
  */
6294
6294
  createClientOrder(r, e, s, n = {}) {
6295
- return this.post(`/internal/clients/${r}/orders/${e}`, s, (o) => new d(o.data), n);
6295
+ const o = k().config.dateFormats.api;
6296
+ return this.post(
6297
+ `/internal/clients/${r}/orders/${e}`,
6298
+ {
6299
+ ...s,
6300
+ deliveryDate: I(s.deliveryDate, o)
6301
+ },
6302
+ (c) => new x(c.data),
6303
+ n
6304
+ );
6296
6305
  }
6297
6306
  /**
6298
6307
  * Закрепляет указанный заказ за текущим оператором и возвращает полные данные заказа.
@@ -6302,7 +6311,7 @@ class Cs extends Ae {
6302
6311
  * @see /doc/api/internal#/Заказы/api_internal_orders_attach
6303
6312
  */
6304
6313
  attachOrder(r) {
6305
- return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new d(e.data));
6314
+ return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new x(e.data));
6306
6315
  }
6307
6316
  /**
6308
6317
  * Открепляет указанный заказ от оператора и возвращает полные данные заказа.
@@ -6312,7 +6321,7 @@ class Cs extends Ae {
6312
6321
  * @see /doc/api/internal#/Заказы/api_internal_orders_detach
6313
6322
  */
6314
6323
  detachOrder(r) {
6315
- return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
6324
+ return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new x(e.data));
6316
6325
  }
6317
6326
  /**
6318
6327
  * Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
@@ -6326,7 +6335,16 @@ class Cs extends Ae {
6326
6335
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
6327
6336
  */
6328
6337
  updateOrder(r, e, s = {}) {
6329
- return this.patch(`/internal/orders/${r}`, e, (n) => new d(n.data), s);
6338
+ const n = k().config.dateFormats.api;
6339
+ return this.patch(
6340
+ `/internal/orders/${r}`,
6341
+ {
6342
+ ...e,
6343
+ deliveryDate: e.deliveryDate ? I(e.deliveryDate, n) : void 0
6344
+ },
6345
+ (o) => new x(o.data),
6346
+ s
6347
+ );
6330
6348
  }
6331
6349
  /**
6332
6350
  * Добавляет продукт в заказ и возвращает обновлённые данные заказа.
@@ -6354,7 +6372,7 @@ class Cs extends Ae {
6354
6372
  is_additional_sale: e.isAdditionalSale,
6355
6373
  ...e.configuratorParams
6356
6374
  },
6357
- (n) => new d(n.data),
6375
+ (n) => new x(n.data),
6358
6376
  s
6359
6377
  );
6360
6378
  }
@@ -6377,7 +6395,7 @@ class Cs extends Ae {
6377
6395
  status: e,
6378
6396
  statusDetail: s
6379
6397
  },
6380
- (o) => new d(o.data),
6398
+ (o) => new x(o.data),
6381
6399
  n
6382
6400
  );
6383
6401
  }
@@ -6403,7 +6421,7 @@ class Cs extends Ae {
6403
6421
  * @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
6404
6422
  */
6405
6423
  deleteOrderAttachedFile(r) {
6406
- return this.delete(`/internal/orders/${r}/file/attached`, (e) => new d(e.data));
6424
+ return this.delete(`/internal/orders/${r}/file/attached`, (e) => new x(e.data));
6407
6425
  }
6408
6426
  /**
6409
6427
  * Изменяет продукт заказа и возвращает обновлённые данные заказа.
@@ -6431,7 +6449,7 @@ class Cs extends Ae {
6431
6449
  marker: s.marker,
6432
6450
  ...s.configuratorParams
6433
6451
  },
6434
- (o) => new d(o.data),
6452
+ (o) => new x(o.data),
6435
6453
  n
6436
6454
  );
6437
6455
  }
@@ -6470,7 +6488,7 @@ class Cs extends Ae {
6470
6488
  return this.get(
6471
6489
  `/internal/orders/delivery/${r}/cost`,
6472
6490
  {
6473
- date: q(e, o),
6491
+ date: I(e, o),
6474
6492
  warehouse_id: s
6475
6493
  },
6476
6494
  (c) => c.data,
@@ -6506,7 +6524,7 @@ class de {
6506
6524
  * Источник клиентской цены.
6507
6525
  */
6508
6526
  t(this, "source");
6509
- this.client = new te(r == null ? void 0 : r.client), this.product = new I(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) ?? Me.Product;
6527
+ this.client = new te(r == null ? void 0 : r.client), this.product = new L(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) ?? Me.Product;
6510
6528
  }
6511
6529
  }
6512
6530
  const xe = (i) => {
@@ -6520,7 +6538,7 @@ const xe = (i) => {
6520
6538
  salesDirections: (o = i.salesDirections) == null ? void 0 : o.map((c) => c.id),
6521
6539
  hideNotActive: i.hideNotActive
6522
6540
  },
6523
- (c) => A(c) || (F(c) || lr(c)) && X(c)
6541
+ (c) => A(c) || (H(c) || lr(c)) && X(c)
6524
6542
  ) : {};
6525
6543
  }, tr = (i) => {
6526
6544
  const r = {};
@@ -6634,7 +6652,7 @@ class kt {
6634
6652
  * @inheritDoc
6635
6653
  */
6636
6654
  t(this, "currency");
6637
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new _(r.currency) : void 0;
6655
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, 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 O(r.currency) : void 0;
6638
6656
  }
6639
6657
  }
6640
6658
  class It extends ue {
@@ -6665,11 +6683,11 @@ class Rs extends p {
6665
6683
  const e = k().config.dateFormats.api, s = cr(
6666
6684
  le(r, {
6667
6685
  costDate: {
6668
- from: _e((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6669
- to: _e((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
6686
+ from: _e((o = r.costDate) == null ? void 0 : o.from) ? I(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6687
+ to: _e((u = r.costDate) == null ? void 0 : u.to) ? I(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
6670
6688
  }
6671
6689
  }),
6672
- (f) => A(f) || (F(f) || lr(f)) && X(f)
6690
+ (f) => A(f) || (H(f) || lr(f)) && X(f)
6673
6691
  ), n = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6674
6692
  return delete s.product, this.get(`/internal/price/products/${n}/history`, s).then((f) => [
6675
6693
  new It(le(f[0], { history: f }))
@@ -6994,7 +7012,7 @@ export {
6994
7012
  rr as Client,
6995
7013
  Rt as ClientAdditionalData,
6996
7014
  ve as ClientCategory,
6997
- x as ClientDataProvider,
7015
+ _ as ClientDataProvider,
6998
7016
  Vt as ClientPriceProvider,
6999
7017
  Kt as ClientPriceTemplateProvider,
7000
7018
  G as ClientProduct,
@@ -7022,7 +7040,7 @@ export {
7022
7040
  Z as Country,
7023
7041
  ze as CuratedDirection,
7024
7042
  We as Curator,
7025
- _ as Currency,
7043
+ O as Currency,
7026
7044
  As as DataSuggestionProvider,
7027
7045
  cs as DataTablePagination,
7028
7046
  Pt as DataTablePaginationRequestParams,
@@ -7030,7 +7048,7 @@ export {
7030
7048
  gs as DateTimeProvider,
7031
7049
  tt as DeletableNamedIdentity,
7032
7050
  ae as DeliveryAddress,
7033
- H as DeliveryType,
7051
+ F as DeliveryType,
7034
7052
  Bt as DetailedJwtPayload,
7035
7053
  Yr as DeviceTypeResolutionConfig,
7036
7054
  nt as DiscountShortInfo,
@@ -7055,7 +7073,7 @@ export {
7055
7073
  ar as Operator,
7056
7074
  B as Opf,
7057
7075
  U as OpfEnum,
7058
- d as Order,
7076
+ x as Order,
7059
7077
  $t as OrderAction,
7060
7078
  ys as OrderEditorData,
7061
7079
  Ir as OrderInfo,
@@ -7087,7 +7105,7 @@ export {
7087
7105
  ce as PricingRole,
7088
7106
  rs as PricingRoleProvider,
7089
7107
  qe as PrimaryCatalogableItem,
7090
- I as Product,
7108
+ L as Product,
7091
7109
  Qt as ProductCategoryDataProvider,
7092
7110
  Yt as ProductDataProvider,
7093
7111
  wt as ProductFileType,
@@ -7106,7 +7124,7 @@ export {
7106
7124
  T as ReferenceDataProvider,
7107
7125
  pe as Region,
7108
7126
  Pr as ResourceType,
7109
- O as SalesDirection,
7127
+ q as SalesDirection,
7110
7128
  Zr as SentryConfig,
7111
7129
  ir as Seo,
7112
7130
  Ds as SeoDataProvider,
@@ -7123,7 +7141,7 @@ export {
7123
7141
  wr as UserCommonInfo,
7124
7142
  _t as UserDataProvider,
7125
7143
  pt as UserPricingRole,
7126
- L as UserShortInfo,
7144
+ d as UserShortInfo,
7127
7145
  dt as UserTypeEnum,
7128
7146
  ps as VersionConfig,
7129
7147
  me as Warehouse,