@snabcentr/common-lib 2.7.2 → 2.7.3
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 +1 -1
- package/dist/sc-common-lib.js +157 -144
- 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/providers/orders-data-provider.d.ts +10 -0
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/dist/src/references/enums/index.d.ts +1 -0
- package/dist/src/references/enums/index.d.ts.map +1 -1
- package/dist/src/references/enums/order-status-detail-enum.d.ts +10 -0
- package/dist/src/references/enums/order-status-detail-enum.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,11 +2,11 @@ var kr = Object.defineProperty;
|
|
|
2
2
|
var Lr = (i, r, e) => r in i ? kr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
3
|
var t = (i, r, e) => Lr(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as nr } from "jwt-decode";
|
|
5
|
-
import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as _r, split as xr, isString as
|
|
5
|
+
import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as _r, split as xr, isString as a, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as fe, forEach as Fr, isDate as xe, omitBy as cr, isObject as lr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as He, objectToSnake as Ee } from "ts-case-convert";
|
|
7
7
|
import { defineStore as W } from "pinia";
|
|
8
8
|
import { ref as y, markRaw as Hr, computed as P } from "vue";
|
|
9
|
-
import { isAfter as Ve, parseISO as
|
|
9
|
+
import { isAfter as Ve, parseISO as C, startOfToday as Oe, format as k, 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
|
/**
|
|
@@ -111,7 +111,7 @@ class j {
|
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class zt extends j {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -378,7 +378,7 @@ class ve {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const s = JSON.parse(e);
|
|
381
|
-
if (!s.availableFor || Ve(
|
|
381
|
+
if (!s.availableFor || Ve(C(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
|
|
382
382
|
if (A(s.data) || X(s.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return s.data;
|
|
@@ -452,7 +452,7 @@ class ve {
|
|
|
452
452
|
const n = localStorage.getItem(s);
|
|
453
453
|
if (n) {
|
|
454
454
|
const o = JSON.parse(n);
|
|
455
|
-
o.availableFor && !Ve(
|
|
455
|
+
o.availableFor && !Ve(C(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(s);
|
|
@@ -677,7 +677,7 @@ class ur extends b {
|
|
|
677
677
|
* Дата и время последнего изменения.
|
|
678
678
|
*/
|
|
679
679
|
t(this, "updatedAt");
|
|
680
|
-
this.updatedAt =
|
|
680
|
+
this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
683
|
class tt extends ur {
|
|
@@ -692,7 +692,7 @@ class tt extends ur {
|
|
|
692
692
|
* Дата и время последнего удаления.
|
|
693
693
|
*/
|
|
694
694
|
t(this, "deletedAt");
|
|
695
|
-
this.deletedAt =
|
|
695
|
+
this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
698
|
class st {
|
|
@@ -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 =
|
|
840
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(e == null ? void 0 : e.publishedAt) ? C(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 _(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
class Q extends ur {
|
|
@@ -856,7 +856,7 @@ class Q extends ur {
|
|
|
856
856
|
* Дата и время создания шаблона.
|
|
857
857
|
*/
|
|
858
858
|
t(this, "createdAt");
|
|
859
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt =
|
|
859
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
860
860
|
}
|
|
861
861
|
}
|
|
862
862
|
var hr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(hr || {});
|
|
@@ -1099,7 +1099,7 @@ class L 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 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 =
|
|
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 = a(e == null ? void 0 : e.costDate) ? C(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, d().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
|
}
|
|
@@ -1606,7 +1606,7 @@ t(R, "requestHooks", []), /**
|
|
|
1606
1606
|
*/
|
|
1607
1607
|
t(R, "responseHooks", []);
|
|
1608
1608
|
let p = R;
|
|
1609
|
-
class
|
|
1609
|
+
class Jt extends p {
|
|
1610
1610
|
/**
|
|
1611
1611
|
* Возвращает содержимое корзины указанного клиента.
|
|
1612
1612
|
*
|
|
@@ -1888,7 +1888,7 @@ class ht extends we {
|
|
|
1888
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 Pe(e.manager) : void 0;
|
|
1889
1889
|
}
|
|
1890
1890
|
}
|
|
1891
|
-
class
|
|
1891
|
+
class ae extends ht {
|
|
1892
1892
|
/**
|
|
1893
1893
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1894
1894
|
*
|
|
@@ -1905,7 +1905,7 @@ class Ce 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 ae(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new G(o));
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
1911
|
class yr {
|
|
@@ -2032,7 +2032,7 @@ class wr extends b {
|
|
|
2032
2032
|
* Признак активности учетной записи пользователя.
|
|
2033
2033
|
*/
|
|
2034
2034
|
t(this, "isActive");
|
|
2035
|
-
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 =
|
|
2035
|
+
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 = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
2038
|
class te extends wr {
|
|
@@ -2108,7 +2108,7 @@ class oe extends re {
|
|
|
2108
2108
|
* Данные шаблона прайс-листа.
|
|
2109
2109
|
*/
|
|
2110
2110
|
t(this, "priceTemplate");
|
|
2111
|
-
this.createdAt =
|
|
2111
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
2114
|
class Ie extends yr {
|
|
@@ -2185,10 +2185,10 @@ class S {
|
|
|
2185
2185
|
* Окончание периода.
|
|
2186
2186
|
*/
|
|
2187
2187
|
t(this, "to");
|
|
2188
|
-
this.from =
|
|
2188
|
+
this.from = a(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = a(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
2189
2189
|
}
|
|
2190
2190
|
}
|
|
2191
|
-
class
|
|
2191
|
+
class Et {
|
|
2192
2192
|
/**
|
|
2193
2193
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2194
2194
|
*
|
|
@@ -2248,7 +2248,7 @@ class Jt {
|
|
|
2248
2248
|
return Object.keys(this).forEach((c) => {
|
|
2249
2249
|
const u = this[c];
|
|
2250
2250
|
// eslint-disable-next-line prettier/prettier
|
|
2251
|
-
A(u) ||
|
|
2251
|
+
A(u) || a(u) && u.trim().length === 0 || Fe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2252
2252
|
}), !((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;
|
|
2253
2253
|
}
|
|
2254
2254
|
}
|
|
@@ -2309,7 +2309,7 @@ class Ye {
|
|
|
2309
2309
|
this.role = new le(r == null ? void 0 : r.role), this.category = new we(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
|
|
2310
2310
|
}
|
|
2311
2311
|
}
|
|
2312
|
-
class
|
|
2312
|
+
class Vt extends p {
|
|
2313
2313
|
/**
|
|
2314
2314
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2315
2315
|
*
|
|
@@ -2340,7 +2340,7 @@ class Et extends p {
|
|
|
2340
2340
|
return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
|
|
2341
2341
|
}
|
|
2342
2342
|
}
|
|
2343
|
-
class
|
|
2343
|
+
class Kt extends p {
|
|
2344
2344
|
/**
|
|
2345
2345
|
* Импортирует цены клиента из CSV файла.
|
|
2346
2346
|
*
|
|
@@ -2539,7 +2539,7 @@ class Vt extends p {
|
|
|
2539
2539
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2540
2540
|
}
|
|
2541
2541
|
}
|
|
2542
|
-
class
|
|
2542
|
+
class Qt extends p {
|
|
2543
2543
|
/**
|
|
2544
2544
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2545
2545
|
*
|
|
@@ -2631,7 +2631,7 @@ class Kt extends p {
|
|
|
2631
2631
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2632
2632
|
}
|
|
2633
2633
|
}
|
|
2634
|
-
class
|
|
2634
|
+
class Yt extends p {
|
|
2635
2635
|
/**
|
|
2636
2636
|
* Возвращает список данных о корневых категориях.
|
|
2637
2637
|
*
|
|
@@ -2723,7 +2723,7 @@ class Qt extends p {
|
|
|
2723
2723
|
});
|
|
2724
2724
|
}
|
|
2725
2725
|
}
|
|
2726
|
-
class
|
|
2726
|
+
class Xt extends p {
|
|
2727
2727
|
/**
|
|
2728
2728
|
* Возвращает данные об указанном продукте.
|
|
2729
2729
|
*
|
|
@@ -2773,7 +2773,7 @@ class Yt extends p {
|
|
|
2773
2773
|
});
|
|
2774
2774
|
}
|
|
2775
2775
|
}
|
|
2776
|
-
class
|
|
2776
|
+
class Zt extends p {
|
|
2777
2777
|
/**
|
|
2778
2778
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2779
2779
|
*
|
|
@@ -2789,7 +2789,7 @@ class Xt 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 ae(n))
|
|
2793
2793
|
);
|
|
2794
2794
|
}
|
|
2795
2795
|
/**
|
|
@@ -2810,7 +2810,7 @@ class Xt extends p {
|
|
|
2810
2810
|
showHidden: s,
|
|
2811
2811
|
withNestedCategories: n
|
|
2812
2812
|
},
|
|
2813
|
-
(o) => new
|
|
2813
|
+
(o) => new ae(o.data)
|
|
2814
2814
|
);
|
|
2815
2815
|
}
|
|
2816
2816
|
/**
|
|
@@ -2835,7 +2835,7 @@ class Xt extends p {
|
|
|
2835
2835
|
);
|
|
2836
2836
|
}
|
|
2837
2837
|
}
|
|
2838
|
-
class
|
|
2838
|
+
class es extends p {
|
|
2839
2839
|
/**
|
|
2840
2840
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2841
2841
|
*
|
|
@@ -2947,7 +2947,7 @@ class Ae extends p {
|
|
|
2947
2947
|
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);
|
|
2948
2948
|
}
|
|
2949
2949
|
}
|
|
2950
|
-
class
|
|
2950
|
+
class rs extends Ae {
|
|
2951
2951
|
/**
|
|
2952
2952
|
* Возвращает список шаблонов прайс-листа.
|
|
2953
2953
|
*
|
|
@@ -3151,7 +3151,7 @@ class es extends Ae {
|
|
|
3151
3151
|
);
|
|
3152
3152
|
}
|
|
3153
3153
|
}
|
|
3154
|
-
class
|
|
3154
|
+
class ts extends p {
|
|
3155
3155
|
/**
|
|
3156
3156
|
* Возвращает список ролей ценообразования.
|
|
3157
3157
|
*
|
|
@@ -3231,7 +3231,7 @@ class rs extends p {
|
|
|
3231
3231
|
);
|
|
3232
3232
|
}
|
|
3233
3233
|
}
|
|
3234
|
-
class
|
|
3234
|
+
class ss extends Ae {
|
|
3235
3235
|
/**
|
|
3236
3236
|
* Возвращает пагинированный список свойств.
|
|
3237
3237
|
*
|
|
@@ -3603,7 +3603,7 @@ class ts extends Ae {
|
|
|
3603
3603
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3604
3604
|
}
|
|
3605
3605
|
}
|
|
3606
|
-
class
|
|
3606
|
+
class is extends p {
|
|
3607
3607
|
/**
|
|
3608
3608
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
3609
3609
|
*
|
|
@@ -3698,9 +3698,9 @@ function er(i) {
|
|
|
3698
3698
|
var gt = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i.SalesDirection = "sales_direction", i.Managers = "managers", i.Curators = "curators", i))(gt || {}), U = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(U || {});
|
|
3699
3699
|
class mt extends w {
|
|
3700
3700
|
}
|
|
3701
|
-
class
|
|
3701
|
+
class ar extends w {
|
|
3702
3702
|
}
|
|
3703
|
-
class
|
|
3703
|
+
class ns extends w {
|
|
3704
3704
|
}
|
|
3705
3705
|
class ft extends w {
|
|
3706
3706
|
}
|
|
@@ -3717,7 +3717,7 @@ class B extends w {
|
|
|
3717
3717
|
});
|
|
3718
3718
|
}
|
|
3719
3719
|
}
|
|
3720
|
-
class
|
|
3720
|
+
class Cr extends w {
|
|
3721
3721
|
}
|
|
3722
3722
|
class yt extends w {
|
|
3723
3723
|
}
|
|
@@ -3729,7 +3729,7 @@ class Rr extends w {
|
|
|
3729
3729
|
}
|
|
3730
3730
|
class wt extends w {
|
|
3731
3731
|
}
|
|
3732
|
-
class
|
|
3732
|
+
class os {
|
|
3733
3733
|
/**
|
|
3734
3734
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
3735
3735
|
*
|
|
@@ -3834,7 +3834,7 @@ class z extends Ue {
|
|
|
3834
3834
|
* Дата и время последнего удаления.
|
|
3835
3835
|
*/
|
|
3836
3836
|
t(this, "deletedAt");
|
|
3837
|
-
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt =
|
|
3837
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
3840
|
class Ar extends b {
|
|
@@ -3887,7 +3887,7 @@ class Ar extends b {
|
|
|
3887
3887
|
*/
|
|
3888
3888
|
t(this, "updater");
|
|
3889
3889
|
if (e) {
|
|
3890
|
-
if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt =
|
|
3890
|
+
if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new _(e.creator) : void 0, this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new _(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
|
|
3891
3891
|
const s = [];
|
|
3892
3892
|
e.contacts.forEach((n) => {
|
|
3893
3893
|
s.push(new z(n));
|
|
@@ -3970,7 +3970,7 @@ class Tr extends $r {
|
|
|
3970
3970
|
e && (this.kpp = e.kpp ?? "");
|
|
3971
3971
|
}
|
|
3972
3972
|
}
|
|
3973
|
-
class
|
|
3973
|
+
class at extends Tr {
|
|
3974
3974
|
/**
|
|
3975
3975
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3976
3976
|
*
|
|
@@ -3993,7 +3993,7 @@ class Ct extends Tr {
|
|
|
3993
3993
|
e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3994
3994
|
}
|
|
3995
3995
|
}
|
|
3996
|
-
class
|
|
3996
|
+
class Ce {
|
|
3997
3997
|
/**
|
|
3998
3998
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3999
3999
|
*
|
|
@@ -4006,7 +4006,7 @@ class ae {
|
|
|
4006
4006
|
case U.UlR:
|
|
4007
4007
|
return new Tr(r);
|
|
4008
4008
|
case U.UlNr:
|
|
4009
|
-
return new
|
|
4009
|
+
return new at(r);
|
|
4010
4010
|
default:
|
|
4011
4011
|
return new vt(r);
|
|
4012
4012
|
}
|
|
@@ -4027,7 +4027,7 @@ class ke extends re {
|
|
|
4027
4027
|
this.isPrimary = e.isPrimary;
|
|
4028
4028
|
}
|
|
4029
4029
|
}
|
|
4030
|
-
class
|
|
4030
|
+
class Ct extends z {
|
|
4031
4031
|
/**
|
|
4032
4032
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4033
4033
|
*
|
|
@@ -4145,7 +4145,7 @@ class rr extends te {
|
|
|
4145
4145
|
* @inheritDoc
|
|
4146
4146
|
*/
|
|
4147
4147
|
t(this, "extraData");
|
|
4148
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) =>
|
|
4148
|
+
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 ue(u))) ?? [], this.channelPrimaryInterest = new ar(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 ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4149
4149
|
}
|
|
4150
4150
|
}
|
|
4151
4151
|
class br {
|
|
@@ -4158,11 +4158,11 @@ class br {
|
|
|
4158
4158
|
return Object.keys(this).forEach((e) => {
|
|
4159
4159
|
const s = this[e];
|
|
4160
4160
|
A(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4161
|
-
|
|
4161
|
+
a(s) && s.trim().length === 0 || Fe(s.isNewRec) && s.isNewRec() || (r[e] = s);
|
|
4162
4162
|
}), r;
|
|
4163
4163
|
}
|
|
4164
4164
|
}
|
|
4165
|
-
class
|
|
4165
|
+
class cs extends br {
|
|
4166
4166
|
/**
|
|
4167
4167
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4168
4168
|
*
|
|
@@ -4344,7 +4344,7 @@ class Sr extends re {
|
|
|
4344
4344
|
* @inheritDoc
|
|
4345
4345
|
*/
|
|
4346
4346
|
t(this, "creator");
|
|
4347
|
-
this.createdAt =
|
|
4347
|
+
this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new _(e == null ? void 0 : e.creator);
|
|
4348
4348
|
}
|
|
4349
4349
|
}
|
|
4350
4350
|
class Rt extends b {
|
|
@@ -4405,7 +4405,7 @@ class Pt {
|
|
|
4405
4405
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4406
4406
|
}
|
|
4407
4407
|
}
|
|
4408
|
-
class
|
|
4408
|
+
class ls extends Pt {
|
|
4409
4409
|
/**
|
|
4410
4410
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4411
4411
|
*
|
|
@@ -4436,7 +4436,7 @@ class cs extends Pt {
|
|
|
4436
4436
|
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;
|
|
4437
4437
|
}
|
|
4438
4438
|
}
|
|
4439
|
-
class
|
|
4439
|
+
class us {
|
|
4440
4440
|
/**
|
|
4441
4441
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4442
4442
|
*
|
|
@@ -4667,7 +4667,7 @@ class x extends Ae {
|
|
|
4667
4667
|
getAllClientContacts(r) {
|
|
4668
4668
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4669
4669
|
let s = [];
|
|
4670
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((n) => new
|
|
4670
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((n) => new Ct(n))), s;
|
|
4671
4671
|
});
|
|
4672
4672
|
}
|
|
4673
4673
|
/**
|
|
@@ -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) => Ce.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) => Ce.createInstance(n.data),
|
|
4838
4838
|
s
|
|
4839
4839
|
);
|
|
4840
4840
|
}
|
|
@@ -5214,7 +5214,7 @@ const Y = class Y extends p {
|
|
|
5214
5214
|
*/
|
|
5215
5215
|
t(Y, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5216
5216
|
let me = Y;
|
|
5217
|
-
class
|
|
5217
|
+
class ps extends p {
|
|
5218
5218
|
/**
|
|
5219
5219
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5220
5220
|
*
|
|
@@ -5228,7 +5228,7 @@ class us extends p {
|
|
|
5228
5228
|
});
|
|
5229
5229
|
}
|
|
5230
5230
|
}
|
|
5231
|
-
class
|
|
5231
|
+
class hs {
|
|
5232
5232
|
/**
|
|
5233
5233
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5234
5234
|
*
|
|
@@ -5247,11 +5247,11 @@ class ps {
|
|
|
5247
5247
|
* Текущая версия приложения.
|
|
5248
5248
|
*/
|
|
5249
5249
|
t(this, "version");
|
|
5250
|
-
this.date =
|
|
5250
|
+
this.date = a(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
5251
5251
|
}
|
|
5252
5252
|
}
|
|
5253
5253
|
var Dt = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i.SandwichM2 = "sandwich_m2", i))(Dt || {});
|
|
5254
|
-
class
|
|
5254
|
+
class gs extends p {
|
|
5255
5255
|
/**
|
|
5256
5256
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5257
5257
|
*
|
|
@@ -5342,7 +5342,7 @@ class hs extends p {
|
|
|
5342
5342
|
});
|
|
5343
5343
|
}
|
|
5344
5344
|
}
|
|
5345
|
-
class
|
|
5345
|
+
class ms {
|
|
5346
5346
|
/**
|
|
5347
5347
|
* Возвращает диапазон дат по умолчанию.
|
|
5348
5348
|
*/
|
|
@@ -5385,11 +5385,11 @@ class dr {
|
|
|
5385
5385
|
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((n = r.properties) != null && n.minCount) ? r.properties.minCount : 0.01;
|
|
5386
5386
|
}
|
|
5387
5387
|
}
|
|
5388
|
-
function
|
|
5388
|
+
function fs(i, r) {
|
|
5389
5389
|
const e = [2, 0, 1, 1, 1, 2];
|
|
5390
5390
|
return r[i % 100 > 4 && i % 100 < 20 ? 2 : e[Math.min(i % 10, 5)]];
|
|
5391
5391
|
}
|
|
5392
|
-
class
|
|
5392
|
+
class ys {
|
|
5393
5393
|
/**
|
|
5394
5394
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5395
5395
|
*/
|
|
@@ -5418,7 +5418,7 @@ class At extends me {
|
|
|
5418
5418
|
}
|
|
5419
5419
|
}
|
|
5420
5420
|
var $t = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.ChangeAttachedOperator = "change_attached_operator", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))($t || {});
|
|
5421
|
-
class
|
|
5421
|
+
class ws {
|
|
5422
5422
|
/**
|
|
5423
5423
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
5424
5424
|
*
|
|
@@ -5548,13 +5548,13 @@ class Ir extends Sr {
|
|
|
5548
5548
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5549
5549
|
}, this.delivery = {
|
|
5550
5550
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5551
|
-
date:
|
|
5551
|
+
date: a((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
|
|
5552
5552
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ue(e.delivery.address) : void 0,
|
|
5553
5553
|
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new ye(e.delivery.warehouse) : void 0
|
|
5554
|
-
}, this.attachedUser = e != null && e.attachedUser ? new _(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 =
|
|
5554
|
+
}, this.attachedUser = e != null && e.attachedUser ? new _(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 = a(e == null ? void 0 : e.attachedAt) ? C(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;
|
|
5555
5555
|
}
|
|
5556
5556
|
}
|
|
5557
|
-
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 || {});
|
|
5557
|
+
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 || {}), bt = /* @__PURE__ */ ((i) => (i.WillWaiting = "will_waiting", i))(bt || {});
|
|
5558
5558
|
class T extends me {
|
|
5559
5559
|
/**
|
|
5560
5560
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
@@ -5571,7 +5571,7 @@ class T extends me {
|
|
|
5571
5571
|
* первичного интереса.
|
|
5572
5572
|
*/
|
|
5573
5573
|
getChannelPrimaryInterest() {
|
|
5574
|
-
return this.getTypedDataArrayRequester(
|
|
5574
|
+
return this.getTypedDataArrayRequester(ar, "/internal/references/channel-primary-interest", !0);
|
|
5575
5575
|
}
|
|
5576
5576
|
/**
|
|
5577
5577
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
@@ -5608,7 +5608,7 @@ class T extends me {
|
|
|
5608
5608
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
5609
5609
|
*/
|
|
5610
5610
|
getOperators() {
|
|
5611
|
-
return this.getTypedDataArrayRequester(
|
|
5611
|
+
return this.getTypedDataArrayRequester(Cr, "/internal/references/operator", !0);
|
|
5612
5612
|
}
|
|
5613
5613
|
/**
|
|
5614
5614
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
@@ -5781,7 +5781,7 @@ const $ = W("common.references_private", () => {
|
|
|
5781
5781
|
*/
|
|
5782
5782
|
priceCoefficientsReference: l
|
|
5783
5783
|
};
|
|
5784
|
-
}),
|
|
5784
|
+
}), vs = W("common.references", () => {
|
|
5785
5785
|
const i = P(() => {
|
|
5786
5786
|
const l = $();
|
|
5787
5787
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
@@ -5948,7 +5948,7 @@ const $ = W("common.references_private", () => {
|
|
|
5948
5948
|
priceCoefficientsReference: be
|
|
5949
5949
|
};
|
|
5950
5950
|
});
|
|
5951
|
-
class
|
|
5951
|
+
class as extends br {
|
|
5952
5952
|
/**
|
|
5953
5953
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5954
5954
|
*
|
|
@@ -6049,7 +6049,7 @@ class vs extends br {
|
|
|
6049
6049
|
* @inheritDoc
|
|
6050
6050
|
*/
|
|
6051
6051
|
t(this, "onlyMyRegions");
|
|
6052
|
-
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new
|
|
6052
|
+
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Cr(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 _(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 ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
6053
6053
|
}
|
|
6054
6054
|
/**
|
|
6055
6055
|
* @inheritDoc
|
|
@@ -6098,7 +6098,7 @@ class vs extends br {
|
|
|
6098
6098
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((h = e == null ? void 0 : e.attachedAt) != null && h.to) && delete e.attachedAt, e;
|
|
6099
6099
|
}
|
|
6100
6100
|
}
|
|
6101
|
-
class
|
|
6101
|
+
class St extends mr {
|
|
6102
6102
|
/**
|
|
6103
6103
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
6104
6104
|
*
|
|
@@ -6222,11 +6222,11 @@ class I extends Ir {
|
|
|
6222
6222
|
this.products = (e.products ?? []).map((n) => {
|
|
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
|
-
return new
|
|
6226
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
6225
|
+
return new St(n, o);
|
|
6226
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.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
|
-
class
|
|
6229
|
+
class dt {
|
|
6230
6230
|
/**
|
|
6231
6231
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
6232
6232
|
*
|
|
@@ -6249,7 +6249,7 @@ class St {
|
|
|
6249
6249
|
* @inheritDoc
|
|
6250
6250
|
*/
|
|
6251
6251
|
t(this, "createdAt");
|
|
6252
|
-
this.user = new _(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 =
|
|
6252
|
+
this.user = new _(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 = a(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
6253
6253
|
}
|
|
6254
6254
|
}
|
|
6255
6255
|
class Cs extends Ae {
|
|
@@ -6433,6 +6433,18 @@ class Cs extends Ae {
|
|
|
6433
6433
|
n
|
|
6434
6434
|
);
|
|
6435
6435
|
}
|
|
6436
|
+
/**
|
|
6437
|
+
* Изменяет только детализирующий статус (подстатус) заказа без смены основного
|
|
6438
|
+
* статуса и возвращает обновлённые данные заказа.
|
|
6439
|
+
*
|
|
6440
|
+
* @param orderId Идентификатор заказа.
|
|
6441
|
+
* @param statusDetail Slug детализирующего статуса заказа.
|
|
6442
|
+
*
|
|
6443
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_status_change
|
|
6444
|
+
*/
|
|
6445
|
+
changeOrderStatusDetail(r, e) {
|
|
6446
|
+
return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new I(s.data));
|
|
6447
|
+
}
|
|
6436
6448
|
/**
|
|
6437
6449
|
* Возвращает историю изменения статусов заказа.
|
|
6438
6450
|
*
|
|
@@ -6444,7 +6456,7 @@ class Cs extends Ae {
|
|
|
6444
6456
|
return this.get(
|
|
6445
6457
|
`/internal/orders/${r}/history`,
|
|
6446
6458
|
{},
|
|
6447
|
-
(e) => e.data.map((s) => new
|
|
6459
|
+
(e) => e.data.map((s) => new dt(s))
|
|
6448
6460
|
);
|
|
6449
6461
|
}
|
|
6450
6462
|
/**
|
|
@@ -6600,7 +6612,7 @@ const _e = (i) => {
|
|
|
6600
6612
|
const r = {};
|
|
6601
6613
|
return i.from && (i.from.coefficient || i.from.value) && (r.from = {}, i.from.coefficient && (r.from.priceCoefficientId = i.from.coefficient.id), i.from.value && (r.from.increasePercent = i.from.value)), i.to && (i.to.coefficient || i.to.value) && (r.to = {}, i.to.coefficient && (r.to.priceCoefficientId = i.to.coefficient.id), i.to.value && (r.to.increasePercent = i.to.value)), r;
|
|
6602
6614
|
};
|
|
6603
|
-
class
|
|
6615
|
+
class Rs extends p {
|
|
6604
6616
|
/**
|
|
6605
6617
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
6606
6618
|
*
|
|
@@ -6661,7 +6673,7 @@ class as extends p {
|
|
|
6661
6673
|
);
|
|
6662
6674
|
}
|
|
6663
6675
|
}
|
|
6664
|
-
class
|
|
6676
|
+
class It {
|
|
6665
6677
|
/**
|
|
6666
6678
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
6667
6679
|
*
|
|
@@ -6708,10 +6720,10 @@ class dt {
|
|
|
6708
6720
|
* @inheritDoc
|
|
6709
6721
|
*/
|
|
6710
6722
|
t(this, "currency");
|
|
6711
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
6723
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new he(r.product) : void 0, this.client = r.client ? new _(r.client) : void 0, this.executor = r.executor ? new _(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
|
|
6712
6724
|
}
|
|
6713
6725
|
}
|
|
6714
|
-
class
|
|
6726
|
+
class kt extends he {
|
|
6715
6727
|
/**
|
|
6716
6728
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6717
6729
|
*
|
|
@@ -6723,10 +6735,10 @@ class It extends he {
|
|
|
6723
6735
|
* @inheritDoc
|
|
6724
6736
|
*/
|
|
6725
6737
|
t(this, "history");
|
|
6726
|
-
this.history = fe(e.history, (s) => new
|
|
6738
|
+
this.history = fe(e.history, (s) => new It(s));
|
|
6727
6739
|
}
|
|
6728
6740
|
}
|
|
6729
|
-
class
|
|
6741
|
+
class Ps extends p {
|
|
6730
6742
|
/**
|
|
6731
6743
|
* Возвращает данные об истории изменения цен.
|
|
6732
6744
|
*
|
|
@@ -6746,7 +6758,7 @@ class Rs extends p {
|
|
|
6746
6758
|
(f) => A(f) || (H(f) || lr(f)) && X(f)
|
|
6747
6759
|
), n = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6748
6760
|
return delete s.product, this.get(`/internal/price/products/${n}/history`, s).then((f) => [
|
|
6749
|
-
new
|
|
6761
|
+
new kt(pe(f[0], { history: f }))
|
|
6750
6762
|
]);
|
|
6751
6763
|
}
|
|
6752
6764
|
}
|
|
@@ -6768,7 +6780,7 @@ class sr {
|
|
|
6768
6780
|
r != null && r.products && (this.products = r.products.map((e) => new he(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new he(e)));
|
|
6769
6781
|
}
|
|
6770
6782
|
}
|
|
6771
|
-
class
|
|
6783
|
+
class Ds extends p {
|
|
6772
6784
|
/**
|
|
6773
6785
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6774
6786
|
*
|
|
@@ -6814,7 +6826,7 @@ class Ps extends p {
|
|
|
6814
6826
|
});
|
|
6815
6827
|
}
|
|
6816
6828
|
}
|
|
6817
|
-
class
|
|
6829
|
+
class Lt {
|
|
6818
6830
|
/**
|
|
6819
6831
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
6820
6832
|
*
|
|
@@ -6872,10 +6884,10 @@ class ir {
|
|
|
6872
6884
|
*/
|
|
6873
6885
|
t(this, "tags");
|
|
6874
6886
|
var e;
|
|
6875
|
-
this.resourceType = new Pr(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
|
|
6887
|
+
this.resourceType = new Pr(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 Lt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
6876
6888
|
}
|
|
6877
6889
|
}
|
|
6878
|
-
class
|
|
6890
|
+
class As extends p {
|
|
6879
6891
|
/**
|
|
6880
6892
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6881
6893
|
*
|
|
@@ -6906,7 +6918,7 @@ class Ds extends p {
|
|
|
6906
6918
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6907
6919
|
}
|
|
6908
6920
|
}
|
|
6909
|
-
class
|
|
6921
|
+
class $s extends p {
|
|
6910
6922
|
/**
|
|
6911
6923
|
* Возвращает подсказки по адресам.
|
|
6912
6924
|
*
|
|
@@ -6953,8 +6965,8 @@ class As extends p {
|
|
|
6953
6965
|
});
|
|
6954
6966
|
}
|
|
6955
6967
|
}
|
|
6956
|
-
var
|
|
6957
|
-
class
|
|
6968
|
+
var _t = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(_t || {});
|
|
6969
|
+
class xt extends wr {
|
|
6958
6970
|
/**
|
|
6959
6971
|
* Инициализирует экземпляр класса {@link User}.
|
|
6960
6972
|
*
|
|
@@ -6977,7 +6989,7 @@ class _t extends wr {
|
|
|
6977
6989
|
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;
|
|
6978
6990
|
}
|
|
6979
6991
|
}
|
|
6980
|
-
class
|
|
6992
|
+
class Ts extends p {
|
|
6981
6993
|
/**
|
|
6982
6994
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6983
6995
|
*/
|
|
@@ -6993,16 +7005,16 @@ class $s extends p {
|
|
|
6993
7005
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6994
7006
|
}
|
|
6995
7007
|
}
|
|
6996
|
-
class
|
|
7008
|
+
class Ot extends p {
|
|
6997
7009
|
/**
|
|
6998
7010
|
* Возвращает данные о текущем пользователе.
|
|
6999
7011
|
*/
|
|
7000
7012
|
// eslint-disable-next-line class-methods-use-this
|
|
7001
7013
|
getCurrentUser() {
|
|
7002
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
7014
|
+
return this.get("/internal/users/info", {}, (r) => new xt(r.data), !0);
|
|
7003
7015
|
}
|
|
7004
7016
|
}
|
|
7005
|
-
const
|
|
7017
|
+
const qt = W("common.user_state_private", () => {
|
|
7006
7018
|
const i = y({}), r = y(void 0);
|
|
7007
7019
|
return {
|
|
7008
7020
|
/**
|
|
@@ -7014,20 +7026,20 @@ const Ot = W("common.user_state_private", () => {
|
|
|
7014
7026
|
*/
|
|
7015
7027
|
currentUser: r
|
|
7016
7028
|
};
|
|
7017
|
-
}),
|
|
7029
|
+
}), bs = W("common.user_state", () => ({
|
|
7018
7030
|
/**
|
|
7019
7031
|
* Данные о текущем пользователе.
|
|
7020
7032
|
*/
|
|
7021
7033
|
currentUser: P(() => {
|
|
7022
|
-
const r =
|
|
7023
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(
|
|
7034
|
+
const r = qt();
|
|
7035
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(Ot).getCurrentUser().then((e) => {
|
|
7024
7036
|
r.currentUser = e;
|
|
7025
7037
|
}).catch(v).finally(() => {
|
|
7026
7038
|
r.dataLoaderList.currentUser = !1;
|
|
7027
7039
|
})), r.currentUser;
|
|
7028
7040
|
})
|
|
7029
7041
|
}));
|
|
7030
|
-
class
|
|
7042
|
+
class Ss {
|
|
7031
7043
|
/**
|
|
7032
7044
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
7033
7045
|
*
|
|
@@ -7057,58 +7069,58 @@ export {
|
|
|
7057
7069
|
Ae as BasePaginationProvider,
|
|
7058
7070
|
lt as CalculationTypeEnum,
|
|
7059
7071
|
ne as Cart,
|
|
7060
|
-
|
|
7061
|
-
|
|
7072
|
+
Jt as CartProvider,
|
|
7073
|
+
Vt as CatalogProvider,
|
|
7062
7074
|
pr as CatalogableItem,
|
|
7063
7075
|
N as Category,
|
|
7064
7076
|
Ye as CategoryPricingRule,
|
|
7065
|
-
|
|
7066
|
-
|
|
7077
|
+
ar as ChannelPrimaryInterest,
|
|
7078
|
+
ns as City,
|
|
7067
7079
|
De as CityWithRegionAndCountry,
|
|
7068
7080
|
rr as Client,
|
|
7069
7081
|
Rt as ClientAdditionalData,
|
|
7070
|
-
|
|
7082
|
+
ae as ClientCategory,
|
|
7071
7083
|
x as ClientDataProvider,
|
|
7072
|
-
|
|
7073
|
-
|
|
7084
|
+
Kt as ClientPriceProvider,
|
|
7085
|
+
Qt as ClientPriceTemplateProvider,
|
|
7074
7086
|
G as ClientProduct,
|
|
7075
|
-
|
|
7076
|
-
|
|
7087
|
+
Zt as ClientProductCategoryDataProvider,
|
|
7088
|
+
es as ClientProductDataProvider,
|
|
7077
7089
|
te as ClientShortInfo,
|
|
7078
7090
|
gt as ClientsAdditionalDataRequestTypeEnum,
|
|
7079
|
-
|
|
7091
|
+
cs as ClientsListFilters,
|
|
7080
7092
|
he as CodedIdentity,
|
|
7081
|
-
|
|
7093
|
+
gs as ConfiguratorProvider,
|
|
7082
7094
|
Dt as ConfiguratorsEnum,
|
|
7083
7095
|
Ue as Contact,
|
|
7084
7096
|
fr as ContactLinks,
|
|
7085
7097
|
z as ContactPerson,
|
|
7086
|
-
|
|
7098
|
+
Ct as ContactPersonRelated,
|
|
7087
7099
|
ft as ContactPosition,
|
|
7088
7100
|
ke as ContactRelation,
|
|
7089
7101
|
Ar as ContragentBase,
|
|
7090
|
-
|
|
7102
|
+
Ce as ContragentFactory,
|
|
7091
7103
|
$r as ContragentIc,
|
|
7092
7104
|
vt as ContragentPerson,
|
|
7093
|
-
|
|
7105
|
+
at as ContragentUlNr,
|
|
7094
7106
|
Tr as ContragentUlR,
|
|
7095
7107
|
Me as CostSourceEnum,
|
|
7096
7108
|
Z as Country,
|
|
7097
7109
|
ze as CuratedDirection,
|
|
7098
7110
|
We as Curator,
|
|
7099
7111
|
O as Currency,
|
|
7100
|
-
|
|
7101
|
-
|
|
7112
|
+
$s as DataSuggestionProvider,
|
|
7113
|
+
ls as DataTablePagination,
|
|
7102
7114
|
Pt as DataTablePaginationRequestParams,
|
|
7103
|
-
|
|
7104
|
-
|
|
7115
|
+
us as DataTableSortRequestParams,
|
|
7116
|
+
ms as DateTimeProvider,
|
|
7105
7117
|
tt as DeletableNamedIdentity,
|
|
7106
7118
|
ue as DeliveryAddress,
|
|
7107
7119
|
F as DeliveryType,
|
|
7108
|
-
|
|
7120
|
+
zt as DetailedJwtPayload,
|
|
7109
7121
|
Yr as DeviceTypeResolutionConfig,
|
|
7110
7122
|
nt as DiscountShortInfo,
|
|
7111
|
-
|
|
7123
|
+
Ss as FieldValidationResultData,
|
|
7112
7124
|
M as FilterGroup,
|
|
7113
7125
|
Xe as FilterItem,
|
|
7114
7126
|
Je as FilterOpEnum,
|
|
@@ -7122,91 +7134,92 @@ export {
|
|
|
7122
7134
|
j as JwtPayload,
|
|
7123
7135
|
Pe as Manager,
|
|
7124
7136
|
Be as ManagerCommon,
|
|
7125
|
-
|
|
7137
|
+
ys as ManagerDataFactory,
|
|
7126
7138
|
At as ManagerDataProvider,
|
|
7127
|
-
|
|
7139
|
+
Lt as MetaTagItem,
|
|
7128
7140
|
b as NamedIdentity,
|
|
7129
|
-
|
|
7141
|
+
Cr as Operator,
|
|
7130
7142
|
B as Opf,
|
|
7131
7143
|
U as OpfEnum,
|
|
7132
7144
|
I as Order,
|
|
7133
7145
|
$t as OrderAction,
|
|
7134
|
-
|
|
7146
|
+
ws as OrderEditorData,
|
|
7135
7147
|
Ir as OrderInfo,
|
|
7136
|
-
|
|
7148
|
+
St as OrderItem,
|
|
7137
7149
|
mr as OrderItemBase,
|
|
7138
7150
|
yt as OrderPaymentStatus,
|
|
7139
7151
|
Sr as OrderShortInfo,
|
|
7140
7152
|
$e as OrderStatus,
|
|
7153
|
+
bt as OrderStatusDetailEnum,
|
|
7141
7154
|
Tt as OrderStatusEnum,
|
|
7142
|
-
|
|
7155
|
+
dt as OrderStatusHistoryInfo,
|
|
7143
7156
|
Cs as OrdersDataProvider,
|
|
7144
|
-
|
|
7157
|
+
as as OrdersListFilters,
|
|
7145
7158
|
br as PaginationFiltersBase,
|
|
7146
7159
|
ee as PartnerGroup,
|
|
7147
7160
|
Rr as PaymentType,
|
|
7148
7161
|
ve as PreferencesStorageProvider,
|
|
7149
7162
|
Le as PriceAnalyze,
|
|
7150
|
-
|
|
7163
|
+
Rs as PriceAnalyzeProvider,
|
|
7151
7164
|
Re as PriceCoefficient,
|
|
7152
7165
|
hr as PriceCoefficientEnum,
|
|
7153
|
-
|
|
7154
|
-
|
|
7166
|
+
Ps as PriceHistoryDataProvider,
|
|
7167
|
+
It as PriceHistoryItem,
|
|
7155
7168
|
Q as PriceTemplate,
|
|
7156
7169
|
de as PriceTemplateCategory,
|
|
7157
7170
|
oe as PriceTemplateClient,
|
|
7158
7171
|
yr as PriceTemplateICatalogableItem,
|
|
7159
7172
|
Ie as PriceTemplateProduct,
|
|
7160
|
-
|
|
7173
|
+
rs as PriceTemplateProvider,
|
|
7161
7174
|
le as PricingRole,
|
|
7162
|
-
|
|
7175
|
+
ts as PricingRoleProvider,
|
|
7163
7176
|
qe as PrimaryCatalogableItem,
|
|
7164
7177
|
L as Product,
|
|
7165
|
-
|
|
7166
|
-
|
|
7178
|
+
Yt as ProductCategoryDataProvider,
|
|
7179
|
+
Xt as ProductDataProvider,
|
|
7167
7180
|
wt as ProductFileType,
|
|
7168
7181
|
Ge as ProductPriceCoefficient,
|
|
7169
|
-
|
|
7182
|
+
kt as ProductPriceHistory,
|
|
7170
7183
|
Qe as ProductUnit,
|
|
7171
|
-
|
|
7184
|
+
ss as PropertiesProvider,
|
|
7172
7185
|
ce as Property,
|
|
7173
7186
|
vr as PropertyType,
|
|
7174
7187
|
ut as PropertyTypeEnum,
|
|
7175
7188
|
K as PropertyValue,
|
|
7176
|
-
|
|
7189
|
+
Ds as RecommendationsDataProvider,
|
|
7177
7190
|
sr as RecommendationsList,
|
|
7178
7191
|
w as Reference,
|
|
7179
|
-
|
|
7192
|
+
os as ReferenceDataFactory,
|
|
7180
7193
|
T as ReferenceDataProvider,
|
|
7181
7194
|
ge as Region,
|
|
7182
7195
|
Pr as ResourceType,
|
|
7183
7196
|
q as SalesDirection,
|
|
7184
7197
|
Zr as SentryConfig,
|
|
7185
7198
|
ir as Seo,
|
|
7186
|
-
|
|
7199
|
+
As as SeoDataProvider,
|
|
7187
7200
|
Dr as SourcePrimaryInterest,
|
|
7188
7201
|
ot as StockCount,
|
|
7189
|
-
|
|
7190
|
-
|
|
7202
|
+
is as TemplateProductCategoryDataProvider,
|
|
7203
|
+
Et as TemplatesListFilters,
|
|
7191
7204
|
je as TypedInstanceFactory,
|
|
7192
7205
|
dr as UnitsHelper,
|
|
7193
|
-
|
|
7206
|
+
ps as UnknownClientDataProvider,
|
|
7194
7207
|
ur as UpdatableNamedIdentity,
|
|
7195
|
-
|
|
7196
|
-
|
|
7208
|
+
xt as User,
|
|
7209
|
+
Ts as UserAuthDataProvider,
|
|
7197
7210
|
wr as UserCommonInfo,
|
|
7198
|
-
|
|
7211
|
+
Ot as UserDataProvider,
|
|
7199
7212
|
pt as UserPricingRole,
|
|
7200
7213
|
_ as UserShortInfo,
|
|
7201
|
-
|
|
7202
|
-
|
|
7214
|
+
_t as UserTypeEnum,
|
|
7215
|
+
hs as VersionConfig,
|
|
7203
7216
|
ye as Warehouse,
|
|
7204
7217
|
et as WebSocketConfig,
|
|
7205
7218
|
Ze as findCatalogItemByIdRecursive,
|
|
7206
7219
|
er as flattenCatalogItems,
|
|
7207
|
-
|
|
7220
|
+
fs as pluralize,
|
|
7208
7221
|
Se as useAuthStateStore,
|
|
7209
7222
|
d as useBaseConfigStateStore,
|
|
7210
|
-
|
|
7211
|
-
|
|
7223
|
+
vs as useReferencesStore,
|
|
7224
|
+
bs as useUserStateStore
|
|
7212
7225
|
};
|