@snabcentr/common-lib 2.7.5 → 2.7.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +80 -60
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts +2 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts +3 -2
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/providers/orders-data-provider.d.ts +16 -0
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 2.7.
|
|
1
|
+
## 2.7.8 (2026-06-20)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### changed (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#13186: Фильтр заказов «За кем закреплен заказ» поддерживает закрепление за менеджерами](web_soft/libs/ts/snabcentr-common-lib@6b8d65226a7e02e59a0c110cfd51dbc04d3f95b2) ([merge request](web_soft/libs/ts/snabcentr-common-lib!198))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -336,7 +336,7 @@ class tt {
|
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const I = W("common.config", () => {
|
|
340
340
|
const i = y(new tt());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
@@ -359,7 +359,7 @@ const d = W("common.config", () => {
|
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
362
|
-
class
|
|
362
|
+
class ae {
|
|
363
363
|
/**
|
|
364
364
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
365
365
|
*
|
|
@@ -480,13 +480,13 @@ const V = W("common.auth_state_private", () => {
|
|
|
480
480
|
const i = y(
|
|
481
481
|
(() => {
|
|
482
482
|
var u;
|
|
483
|
-
const o =
|
|
483
|
+
const o = ae.getActualDataFromStorage(
|
|
484
484
|
"sc.token"
|
|
485
485
|
/* JwtToken */
|
|
486
486
|
);
|
|
487
487
|
if (o)
|
|
488
488
|
return Promise.resolve(o);
|
|
489
|
-
const c = (u =
|
|
489
|
+
const c = (u = I().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
490
490
|
return c ? Promise.resolve(c) : void 0;
|
|
491
491
|
})()
|
|
492
492
|
), r = y(void 0), e = y(void 0), s = Mr(/* @__PURE__ */ new Map());
|
|
@@ -524,7 +524,7 @@ const V = W("common.auth_state_private", () => {
|
|
|
524
524
|
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
526
|
o.jwtToken = c, c.then((u) => {
|
|
527
|
-
o.jwtToken = Promise.resolve(u),
|
|
527
|
+
o.jwtToken = Promise.resolve(u), ae.saveActualDataToStorage("sc.token", u, Ke(u)), o.recalculateUserPermissions();
|
|
528
528
|
}).catch(v);
|
|
529
529
|
}
|
|
530
530
|
return o.jwtToken;
|
|
@@ -534,11 +534,11 @@ const V = W("common.auth_state_private", () => {
|
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
536
|
const c = V();
|
|
537
|
-
c.jwtToken = Promise.resolve(o),
|
|
537
|
+
c.jwtToken = Promise.resolve(o), ae.saveActualDataToStorage("sc.token", o, Ke(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function s() {
|
|
540
540
|
const o = V();
|
|
541
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
541
|
+
o.jwtToken = void 0, o.userPermissions = void 0, ae.saveActualDataToStorage("sc.token", void 0);
|
|
542
542
|
}
|
|
543
543
|
function n(o) {
|
|
544
544
|
const c = V();
|
|
@@ -860,7 +860,7 @@ class Q extends ur {
|
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
var gr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(gr || {});
|
|
863
|
-
class
|
|
863
|
+
class Pe extends w {
|
|
864
864
|
/**
|
|
865
865
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
866
866
|
*/
|
|
@@ -895,7 +895,7 @@ class je {
|
|
|
895
895
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
896
896
|
*/
|
|
897
897
|
t(this, "readOnly");
|
|
898
|
-
this.coefficient = new
|
|
898
|
+
this.coefficient = new Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
899
899
|
}
|
|
900
900
|
}
|
|
901
901
|
class mr {
|
|
@@ -1101,7 +1101,7 @@ class L extends it {
|
|
|
1101
1101
|
t(this, "priceCoefficients");
|
|
1102
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) ? R(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
|
-
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,
|
|
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, I().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 je(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1105
|
}
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1349,7 +1349,7 @@ const a = class a {
|
|
|
1349
1349
|
/**
|
|
1350
1350
|
* Базовый URL путь для выполнения запросов.
|
|
1351
1351
|
*/
|
|
1352
|
-
t(this, "baseUrl", `${
|
|
1352
|
+
t(this, "baseUrl", `${I().config.http.portalApiUrl}/api`);
|
|
1353
1353
|
/**
|
|
1354
1354
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
1355
1355
|
*
|
|
@@ -1817,7 +1817,7 @@ class pt extends S {
|
|
|
1817
1817
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1818
1818
|
}
|
|
1819
1819
|
}
|
|
1820
|
-
class
|
|
1820
|
+
class ve extends Be {
|
|
1821
1821
|
/**
|
|
1822
1822
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1823
1823
|
*
|
|
@@ -1885,10 +1885,10 @@ class ht extends we {
|
|
|
1885
1885
|
* Данные о менеджере за которым закреплена категория.
|
|
1886
1886
|
*/
|
|
1887
1887
|
t(this, "manager");
|
|
1888
|
-
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
|
|
1888
|
+
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 ve(e.manager) : void 0;
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
|
-
class
|
|
1891
|
+
class Ce extends ht {
|
|
1892
1892
|
/**
|
|
1893
1893
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1894
1894
|
*
|
|
@@ -1905,7 +1905,7 @@ class ae extends ht {
|
|
|
1905
1905
|
* Список продуктов категории.
|
|
1906
1906
|
*/
|
|
1907
1907
|
t(this, "products");
|
|
1908
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1908
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new Ce(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new j(o));
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
1911
|
class wr {
|
|
@@ -1923,7 +1923,7 @@ class wr {
|
|
|
1923
1923
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1924
1924
|
*/
|
|
1925
1925
|
t(this, "increasePercent");
|
|
1926
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1926
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
1929
|
class de extends wr {
|
|
@@ -2306,7 +2306,7 @@ class Ye {
|
|
|
2306
2306
|
* Минимальный коэффициент цены.
|
|
2307
2307
|
*/
|
|
2308
2308
|
t(this, "minCoefficient");
|
|
2309
|
-
this.role = new le(r == null ? void 0 : r.role), this.category = new we(r == null ? void 0 : r.category), this.minCoefficient = new
|
|
2309
|
+
this.role = new le(r == null ? void 0 : r.role), this.category = new we(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
2312
|
class Vt extends p {
|
|
@@ -2336,7 +2336,7 @@ class Vt extends p {
|
|
|
2336
2336
|
*/
|
|
2337
2337
|
// eslint-disable-next-line class-methods-use-this
|
|
2338
2338
|
getPriceExportLink(r = "csv", e = !1, s = void 0, n = void 0) {
|
|
2339
|
-
let c = `${
|
|
2339
|
+
let c = `${I().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2340
2340
|
return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
@@ -2574,7 +2574,7 @@ class Qt extends p {
|
|
|
2574
2574
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2575
2575
|
*/
|
|
2576
2576
|
attachTemplate(r, e, s) {
|
|
2577
|
-
const n =
|
|
2577
|
+
const n = I().config.dateFormats.api;
|
|
2578
2578
|
return this.post(
|
|
2579
2579
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2580
2580
|
s && {
|
|
@@ -2608,7 +2608,7 @@ class Qt extends p {
|
|
|
2608
2608
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2609
2609
|
*/
|
|
2610
2610
|
changeTemplate(r, e, s, n) {
|
|
2611
|
-
const o =
|
|
2611
|
+
const o = I().config.dateFormats.api;
|
|
2612
2612
|
return this.patch(
|
|
2613
2613
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2614
2614
|
n && {
|
|
@@ -2789,7 +2789,7 @@ class Zt extends p {
|
|
|
2789
2789
|
clientId: r,
|
|
2790
2790
|
showHidden: e
|
|
2791
2791
|
},
|
|
2792
|
-
(s) => s.data.map((n) => new
|
|
2792
|
+
(s) => s.data.map((n) => new Ce(n))
|
|
2793
2793
|
);
|
|
2794
2794
|
}
|
|
2795
2795
|
/**
|
|
@@ -2810,7 +2810,7 @@ class Zt extends p {
|
|
|
2810
2810
|
showHidden: s,
|
|
2811
2811
|
withNestedCategories: n
|
|
2812
2812
|
},
|
|
2813
|
-
(o) => new
|
|
2813
|
+
(o) => new Ce(o.data)
|
|
2814
2814
|
);
|
|
2815
2815
|
}
|
|
2816
2816
|
/**
|
|
@@ -2888,7 +2888,7 @@ class Xe {
|
|
|
2888
2888
|
field: this.field,
|
|
2889
2889
|
op: this.op
|
|
2890
2890
|
};
|
|
2891
|
-
return r.value = xe(this.value) ? k(this.value,
|
|
2891
|
+
return r.value = xe(this.value) ? k(this.value, I().config.dateFormats.api) : this.value, r;
|
|
2892
2892
|
}
|
|
2893
2893
|
}
|
|
2894
2894
|
class G {
|
|
@@ -3989,7 +3989,7 @@ class at extends br {
|
|
|
3989
3989
|
e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3990
3990
|
}
|
|
3991
3991
|
}
|
|
3992
|
-
class
|
|
3992
|
+
class Re {
|
|
3993
3993
|
/**
|
|
3994
3994
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3995
3995
|
*
|
|
@@ -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) =>
|
|
4144
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Re.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 ue(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(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 ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4145
4145
|
}
|
|
4146
4146
|
}
|
|
4147
4147
|
class Sr {
|
|
@@ -4263,7 +4263,7 @@ class cs extends Sr {
|
|
|
4263
4263
|
* @inheritDoc
|
|
4264
4264
|
*/
|
|
4265
4265
|
t(this, "lastOrder");
|
|
4266
|
-
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 ge(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 b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(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
|
|
4266
|
+
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 ge(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 b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(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 ve(D))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, 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 = {
|
|
4267
4267
|
createdAt: new b((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
|
|
4268
4268
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4269
4269
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
@@ -4818,7 +4818,7 @@ class x extends Ae {
|
|
|
4818
4818
|
return this.post(
|
|
4819
4819
|
`/internal/clients/${r}/contragents`,
|
|
4820
4820
|
x.transformContragentClientDataToRequest(e),
|
|
4821
|
-
(n) =>
|
|
4821
|
+
(n) => Re.createInstance(n.data),
|
|
4822
4822
|
s
|
|
4823
4823
|
);
|
|
4824
4824
|
}
|
|
@@ -4834,7 +4834,7 @@ class x extends Ae {
|
|
|
4834
4834
|
return this.patch(
|
|
4835
4835
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4836
4836
|
x.transformContragentClientDataToRequest(e),
|
|
4837
|
-
(n) =>
|
|
4837
|
+
(n) => Re.createInstance(n.data),
|
|
4838
4838
|
s
|
|
4839
4839
|
);
|
|
4840
4840
|
}
|
|
@@ -5165,7 +5165,7 @@ const Y = class Y extends p {
|
|
|
5165
5165
|
* Время кэширования данных ответов на запросы (секунд).
|
|
5166
5166
|
*/
|
|
5167
5167
|
t(this, "responseDataCacheTimeout");
|
|
5168
|
-
this.responseDataCacheTimeout =
|
|
5168
|
+
this.responseDataCacheTimeout = I().config.http.responseDataCacheTimeout;
|
|
5169
5169
|
}
|
|
5170
5170
|
/**
|
|
5171
5171
|
* Возвращает кэшированные данные.
|
|
@@ -5394,7 +5394,7 @@ class ys {
|
|
|
5394
5394
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5395
5395
|
*/
|
|
5396
5396
|
static generateUndefinedManagerInstance() {
|
|
5397
|
-
return new
|
|
5397
|
+
return new ve({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5398
5398
|
}
|
|
5399
5399
|
/**
|
|
5400
5400
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5413,7 +5413,7 @@ class At extends me {
|
|
|
5413
5413
|
const r = "/internal/managers", e = me.getCachedResponse(r);
|
|
5414
5414
|
if (e)
|
|
5415
5415
|
return e;
|
|
5416
|
-
const n = (await this.get(r)).data.map((o) => Me.instanceInitializer(
|
|
5416
|
+
const n = (await this.get(r)).data.map((o) => Me.instanceInitializer(ve, o));
|
|
5417
5417
|
return this.cacheResponse(r, n), n;
|
|
5418
5418
|
}
|
|
5419
5419
|
}
|
|
@@ -5692,7 +5692,7 @@ class T extends me {
|
|
|
5692
5692
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5693
5693
|
*/
|
|
5694
5694
|
getPriceCoefficients() {
|
|
5695
|
-
return this.getTypedDataArrayRequester(
|
|
5695
|
+
return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
|
|
5696
5696
|
}
|
|
5697
5697
|
/**
|
|
5698
5698
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
@@ -5960,7 +5960,7 @@ class as extends Sr {
|
|
|
5960
5960
|
/**
|
|
5961
5961
|
* @inheritDoc
|
|
5962
5962
|
*/
|
|
5963
|
-
t(this, "
|
|
5963
|
+
t(this, "attachedUsers");
|
|
5964
5964
|
/**
|
|
5965
5965
|
* @inheritDoc
|
|
5966
5966
|
*/
|
|
@@ -6049,7 +6049,7 @@ class as extends Sr {
|
|
|
6049
6049
|
* @inheritDoc
|
|
6050
6050
|
*/
|
|
6051
6051
|
t(this, "onlyMyRegions");
|
|
6052
|
-
this.
|
|
6052
|
+
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new ve(u) : new Rr(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 b(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new _(e.creator) : void 0, this.deliveryDate = new b(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 b(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 Pr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
6053
6053
|
}
|
|
6054
6054
|
/**
|
|
6055
6055
|
* @inheritDoc
|
|
@@ -6158,7 +6158,7 @@ class St extends fr {
|
|
|
6158
6158
|
this.product = new j(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, s && (this.replacement = s, this.quantity !== s.quantity && this.changedFields.push("quantity"), this.length !== s.length && this.changedFields.push("length"));
|
|
6159
6159
|
}
|
|
6160
6160
|
}
|
|
6161
|
-
class
|
|
6161
|
+
class d extends kr {
|
|
6162
6162
|
/**
|
|
6163
6163
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6164
6164
|
*
|
|
@@ -6223,7 +6223,7 @@ class I extends kr {
|
|
|
6223
6223
|
var c;
|
|
6224
6224
|
const o = n.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === n.replacementId) : void 0;
|
|
6225
6225
|
return new St(n, o);
|
|
6226
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
6226
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Re.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
|
|
6227
6227
|
}
|
|
6228
6228
|
}
|
|
6229
6229
|
class dt {
|
|
@@ -6312,7 +6312,7 @@ class Cs extends Ae {
|
|
|
6312
6312
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get
|
|
6313
6313
|
*/
|
|
6314
6314
|
getOrder(r) {
|
|
6315
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
6315
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new d(e.data));
|
|
6316
6316
|
}
|
|
6317
6317
|
/**
|
|
6318
6318
|
* Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
|
|
@@ -6326,14 +6326,14 @@ class Cs extends Ae {
|
|
|
6326
6326
|
* @see /doc/api/internal#/operations/api_internal_client_orders_create
|
|
6327
6327
|
*/
|
|
6328
6328
|
createClientOrder(r, e, s, n = {}) {
|
|
6329
|
-
const o =
|
|
6329
|
+
const o = I().config.dateFormats.api;
|
|
6330
6330
|
return this.post(
|
|
6331
6331
|
`/internal/clients/${r}/orders/${e}`,
|
|
6332
6332
|
{
|
|
6333
6333
|
...s,
|
|
6334
6334
|
deliveryDate: k(s.deliveryDate, o)
|
|
6335
6335
|
},
|
|
6336
|
-
(c) => c.data.map((u) => new
|
|
6336
|
+
(c) => c.data.map((u) => new d(u)),
|
|
6337
6337
|
n
|
|
6338
6338
|
);
|
|
6339
6339
|
}
|
|
@@ -6345,7 +6345,7 @@ class Cs extends Ae {
|
|
|
6345
6345
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attach
|
|
6346
6346
|
*/
|
|
6347
6347
|
attachOrder(r) {
|
|
6348
|
-
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new
|
|
6348
|
+
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new d(e.data));
|
|
6349
6349
|
}
|
|
6350
6350
|
/**
|
|
6351
6351
|
* Открепляет указанный заказ от оператора и возвращает полные данные заказа.
|
|
@@ -6355,7 +6355,27 @@ class Cs extends Ae {
|
|
|
6355
6355
|
* @see /doc/api/internal#/Заказы/api_internal_orders_detach
|
|
6356
6356
|
*/
|
|
6357
6357
|
detachOrder(r) {
|
|
6358
|
-
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new
|
|
6358
|
+
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
|
|
6359
|
+
}
|
|
6360
|
+
/**
|
|
6361
|
+
* Пересчитывает стоимость корзины указанного заказа и возвращает обновлённые данные заказа.
|
|
6362
|
+
*
|
|
6363
|
+
* @param orderId Идентификатор заказа.
|
|
6364
|
+
*
|
|
6365
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_recalculate
|
|
6366
|
+
*/
|
|
6367
|
+
recalculateOrder(r) {
|
|
6368
|
+
return this.patch(`/internal/orders/${r}/recalculate`, {}, (e) => new d(e.data));
|
|
6369
|
+
}
|
|
6370
|
+
/**
|
|
6371
|
+
* Копирует товары указанного заказа в текущую корзину пользователя.
|
|
6372
|
+
*
|
|
6373
|
+
* @param orderId Идентификатор заказа-источника.
|
|
6374
|
+
*
|
|
6375
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_clone
|
|
6376
|
+
*/
|
|
6377
|
+
cloneOrder(r) {
|
|
6378
|
+
return this.get(`/internal/orders/${r}/clone`, {});
|
|
6359
6379
|
}
|
|
6360
6380
|
/**
|
|
6361
6381
|
* Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
|
|
@@ -6369,14 +6389,14 @@ class Cs extends Ae {
|
|
|
6369
6389
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
6370
6390
|
*/
|
|
6371
6391
|
updateOrder(r, e, s = {}) {
|
|
6372
|
-
const n =
|
|
6392
|
+
const n = I().config.dateFormats.api;
|
|
6373
6393
|
return this.patch(
|
|
6374
6394
|
`/internal/orders/${r}`,
|
|
6375
6395
|
{
|
|
6376
6396
|
...e,
|
|
6377
6397
|
deliveryDate: e.deliveryDate ? k(e.deliveryDate, n) : void 0
|
|
6378
6398
|
},
|
|
6379
|
-
(o) => new
|
|
6399
|
+
(o) => new d(o.data),
|
|
6380
6400
|
s
|
|
6381
6401
|
);
|
|
6382
6402
|
}
|
|
@@ -6406,7 +6426,7 @@ class Cs extends Ae {
|
|
|
6406
6426
|
is_additional_sale: e.isAdditionalSale,
|
|
6407
6427
|
...e.configuratorParams
|
|
6408
6428
|
},
|
|
6409
|
-
(n) => new
|
|
6429
|
+
(n) => new d(n.data),
|
|
6410
6430
|
s
|
|
6411
6431
|
);
|
|
6412
6432
|
}
|
|
@@ -6429,7 +6449,7 @@ class Cs extends Ae {
|
|
|
6429
6449
|
status: e,
|
|
6430
6450
|
statusDetail: s
|
|
6431
6451
|
},
|
|
6432
|
-
(o) => new
|
|
6452
|
+
(o) => new d(o.data),
|
|
6433
6453
|
n
|
|
6434
6454
|
);
|
|
6435
6455
|
}
|
|
@@ -6443,7 +6463,7 @@ class Cs extends Ae {
|
|
|
6443
6463
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_change
|
|
6444
6464
|
*/
|
|
6445
6465
|
changeOrderStatusDetail(r, e) {
|
|
6446
|
-
return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new
|
|
6466
|
+
return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new d(s.data));
|
|
6447
6467
|
}
|
|
6448
6468
|
/**
|
|
6449
6469
|
* Возвращает историю изменения статусов заказа.
|
|
@@ -6468,7 +6488,7 @@ class Cs extends Ae {
|
|
|
6468
6488
|
* @see /doc/api/internal#/Заказы/api_internal_orders_change_attached_operator
|
|
6469
6489
|
*/
|
|
6470
6490
|
changeAttachedOperator(r, e) {
|
|
6471
|
-
return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (s) => new
|
|
6491
|
+
return this.patch(`/internal/orders/${r}/change-attached-operator`, { operatorId: e }, (s) => new d(s.data));
|
|
6472
6492
|
}
|
|
6473
6493
|
/**
|
|
6474
6494
|
* Удаляет файл, прикреплённый к заказу клиентом, и возвращает обновлённые данные заказа.
|
|
@@ -6478,7 +6498,7 @@ class Cs extends Ae {
|
|
|
6478
6498
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
|
|
6479
6499
|
*/
|
|
6480
6500
|
deleteOrderAttachedFile(r) {
|
|
6481
|
-
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new
|
|
6501
|
+
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new d(e.data));
|
|
6482
6502
|
}
|
|
6483
6503
|
/**
|
|
6484
6504
|
* Удаляет продукт из заказа и возвращает обновлённые данные заказа.
|
|
@@ -6489,7 +6509,7 @@ class Cs extends Ae {
|
|
|
6489
6509
|
* @see /doc/api/internal#/operations/api_internal_orders_product_delete
|
|
6490
6510
|
*/
|
|
6491
6511
|
deleteOrderProduct(r, e) {
|
|
6492
|
-
return this.delete(`/internal/orders/${r}/products/${e}`, (s) => new
|
|
6512
|
+
return this.delete(`/internal/orders/${r}/products/${e}`, (s) => new d(s.data));
|
|
6493
6513
|
}
|
|
6494
6514
|
/**
|
|
6495
6515
|
* Изменяет продукт заказа и возвращает обновлённые данные заказа.
|
|
@@ -6517,7 +6537,7 @@ class Cs extends Ae {
|
|
|
6517
6537
|
marker: s.marker,
|
|
6518
6538
|
...s.configuratorParams
|
|
6519
6539
|
},
|
|
6520
|
-
(o) => new
|
|
6540
|
+
(o) => new d(o.data),
|
|
6521
6541
|
n
|
|
6522
6542
|
);
|
|
6523
6543
|
}
|
|
@@ -6552,7 +6572,7 @@ class Cs extends Ae {
|
|
|
6552
6572
|
* @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
|
|
6553
6573
|
*/
|
|
6554
6574
|
getDeliveryCost(r, e, s, n = void 0) {
|
|
6555
|
-
const o =
|
|
6575
|
+
const o = I().config.dateFormats.api;
|
|
6556
6576
|
return this.get(
|
|
6557
6577
|
`/internal/orders/delivery/${r}/cost`,
|
|
6558
6578
|
{
|
|
@@ -6748,7 +6768,7 @@ class Ps extends p {
|
|
|
6748
6768
|
*/
|
|
6749
6769
|
getProductPriceHistory(r) {
|
|
6750
6770
|
var o, c, u, h, m;
|
|
6751
|
-
const e =
|
|
6771
|
+
const e = I().config.dateFormats.api, s = cr(
|
|
6752
6772
|
pe(r, {
|
|
6753
6773
|
costDate: {
|
|
6754
6774
|
from: xe((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
@@ -6994,7 +7014,7 @@ class Ts extends p {
|
|
|
6994
7014
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6995
7015
|
*/
|
|
6996
7016
|
constructor() {
|
|
6997
|
-
super(), this.baseUrl = `${
|
|
7017
|
+
super(), this.baseUrl = `${I().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6998
7018
|
}
|
|
6999
7019
|
/**
|
|
7000
7020
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -7079,7 +7099,7 @@ export {
|
|
|
7079
7099
|
De as CityWithRegionAndCountry,
|
|
7080
7100
|
rr as Client,
|
|
7081
7101
|
Rt as ClientAdditionalData,
|
|
7082
|
-
|
|
7102
|
+
Ce as ClientCategory,
|
|
7083
7103
|
x as ClientDataProvider,
|
|
7084
7104
|
Kt as ClientPriceProvider,
|
|
7085
7105
|
Qt as ClientPriceTemplateProvider,
|
|
@@ -7099,7 +7119,7 @@ export {
|
|
|
7099
7119
|
ft as ContactPosition,
|
|
7100
7120
|
ke as ContactRelation,
|
|
7101
7121
|
$r as ContragentBase,
|
|
7102
|
-
|
|
7122
|
+
Re as ContragentFactory,
|
|
7103
7123
|
Tr as ContragentIc,
|
|
7104
7124
|
vt as ContragentPerson,
|
|
7105
7125
|
at as ContragentUlNr,
|
|
@@ -7132,7 +7152,7 @@ export {
|
|
|
7132
7152
|
re as Identity,
|
|
7133
7153
|
st as Image,
|
|
7134
7154
|
M as JwtPayload,
|
|
7135
|
-
|
|
7155
|
+
ve as Manager,
|
|
7136
7156
|
Be as ManagerCommon,
|
|
7137
7157
|
ys as ManagerDataFactory,
|
|
7138
7158
|
At as ManagerDataProvider,
|
|
@@ -7141,7 +7161,7 @@ export {
|
|
|
7141
7161
|
Rr as Operator,
|
|
7142
7162
|
B as Opf,
|
|
7143
7163
|
U as OpfEnum,
|
|
7144
|
-
|
|
7164
|
+
d as Order,
|
|
7145
7165
|
$t as OrderAction,
|
|
7146
7166
|
ws as OrderEditorData,
|
|
7147
7167
|
kr as OrderInfo,
|
|
@@ -7158,10 +7178,10 @@ export {
|
|
|
7158
7178
|
Sr as PaginationFiltersBase,
|
|
7159
7179
|
ee as PartnerGroup,
|
|
7160
7180
|
Pr as PaymentType,
|
|
7161
|
-
|
|
7181
|
+
ae as PreferencesStorageProvider,
|
|
7162
7182
|
Le as PriceAnalyze,
|
|
7163
7183
|
Rs as PriceAnalyzeProvider,
|
|
7164
|
-
|
|
7184
|
+
Pe as PriceCoefficient,
|
|
7165
7185
|
gr as PriceCoefficientEnum,
|
|
7166
7186
|
Ps as PriceHistoryDataProvider,
|
|
7167
7187
|
It as PriceHistoryItem,
|
|
@@ -7219,7 +7239,7 @@ export {
|
|
|
7219
7239
|
er as flattenCatalogItems,
|
|
7220
7240
|
fs as pluralize,
|
|
7221
7241
|
Se as useAuthStateStore,
|
|
7222
|
-
|
|
7242
|
+
I as useBaseConfigStateStore,
|
|
7223
7243
|
vs as useReferencesStore,
|
|
7224
7244
|
bs as useUserStateStore
|
|
7225
7245
|
};
|