@snabcentr/common-lib 2.0.5 → 2.0.6
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 +2 -2
- package/dist/sc-common-lib.js +122 -127
- 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/clients/classes/clients-list-filters.d.ts +26 -22
- package/dist/src/clients/classes/clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +4 -0
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,7 +2,7 @@ var Ar = Object.defineProperty;
|
|
|
2
2
|
var Dr = (n, r, e) => r in n ? Ar(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Dr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as tr } from "jwt-decode";
|
|
5
|
-
import { merge as de, isUndefined as Tr, isNil as D, isEmpty as Y, noop as f, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as
|
|
5
|
+
import { merge as de, isUndefined as Tr, isNil as D, isEmpty as Y, noop as f, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as Sr, constant as ar, isString as y, cloneDeep as Ir, toLower as xr, isFunction as Ue, map as he, forEach as Lr, isDate as ke, omitBy as ir, isObject as nr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
7
|
import { isAfter as ze, parseISO as w, startOfToday as _e, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as Nr, startOfYesterday as dr, endOfToday as Ur, endOfDay as Fr, startOfDay as Mr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
@@ -308,7 +308,7 @@ function We(n) {
|
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const H = te("__auth_state_private", () => {
|
|
312
312
|
const n = m(
|
|
313
313
|
(() => {
|
|
314
314
|
var u;
|
|
@@ -352,7 +352,7 @@ const B = te("__auth_state_private", () => {
|
|
|
352
352
|
};
|
|
353
353
|
}), be = te("__auth_state", () => {
|
|
354
354
|
const n = P(() => {
|
|
355
|
-
const o =
|
|
355
|
+
const o = H();
|
|
356
356
|
if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
|
|
357
357
|
const c = o.jwtTokenUpdater();
|
|
358
358
|
o.jwtToken = c, c.then((u) => {
|
|
@@ -362,32 +362,32 @@ const B = te("__auth_state_private", () => {
|
|
|
362
362
|
return o.jwtToken;
|
|
363
363
|
});
|
|
364
364
|
function r(o) {
|
|
365
|
-
|
|
365
|
+
H().jwtTokenUpdater = o;
|
|
366
366
|
}
|
|
367
367
|
function e(o) {
|
|
368
|
-
const c =
|
|
368
|
+
const c = H();
|
|
369
369
|
c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
|
|
370
370
|
}
|
|
371
371
|
function s() {
|
|
372
|
-
const o =
|
|
372
|
+
const o = H();
|
|
373
373
|
o.jwtToken = void 0, o.userPermissions = void 0, ye.saveActualDataToStorage("sc.token", void 0);
|
|
374
374
|
}
|
|
375
375
|
function i(o) {
|
|
376
|
-
const c =
|
|
376
|
+
const c = H();
|
|
377
377
|
!D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((v) => {
|
|
378
378
|
const R = d.getJwtPayload(v);
|
|
379
|
-
c.userPermissions = R.exp * 1e3 > Date.now() ? sr(R.resourceAccess, (
|
|
379
|
+
c.userPermissions = R.exp * 1e3 > Date.now() ? sr(R.resourceAccess, (S) => (S == null ? void 0 : S.roles) ?? []) : void 0;
|
|
380
380
|
}).catch(f);
|
|
381
381
|
const u = Q(o) ? o.join(" && ") : o;
|
|
382
382
|
if (c.userPermissionsComputedRefs.has(u))
|
|
383
383
|
return c.userPermissionsComputedRefs.get(u);
|
|
384
384
|
const p = P(() => {
|
|
385
385
|
const v = (R) => {
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
386
|
+
var B;
|
|
387
|
+
const S = br(R, ".");
|
|
388
|
+
if (S.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [_, O] =
|
|
390
|
+
const [_, O] = S, G = (B = H().userPermissions) == null ? void 0 : B[_];
|
|
391
391
|
return Q(G) && G.includes(O);
|
|
392
392
|
};
|
|
393
393
|
return Q(o) ? $r(o, (R) => v(R)) : v(o);
|
|
@@ -536,7 +536,7 @@ class ge extends Oe {
|
|
|
536
536
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
537
537
|
*/
|
|
538
538
|
t(this, "currencyRates");
|
|
539
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
539
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [Sr(s), i])) : void 0;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
var cr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(cr || {});
|
|
@@ -564,7 +564,7 @@ class Re extends C {
|
|
|
564
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
565
565
|
*/
|
|
566
566
|
static getRetailPriceCoefficient() {
|
|
567
|
-
return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec:
|
|
567
|
+
return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec: ar(!0) };
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
class Me {
|
|
@@ -649,7 +649,7 @@ class Ae extends C {
|
|
|
649
649
|
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new lr(e == null ? void 0 : e.coordinates);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
class
|
|
652
|
+
class Br {
|
|
653
653
|
/**
|
|
654
654
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
655
655
|
*
|
|
@@ -667,7 +667,7 @@ class Hr {
|
|
|
667
667
|
this.warehouse = new Ae(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
class
|
|
670
|
+
class Hr extends or {
|
|
671
671
|
/**
|
|
672
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
673
673
|
*
|
|
@@ -705,7 +705,7 @@ class Er {
|
|
|
705
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
class I extends
|
|
708
|
+
class I extends Hr {
|
|
709
709
|
/**
|
|
710
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
711
711
|
*
|
|
@@ -790,7 +790,7 @@ class I extends Br {
|
|
|
790
790
|
* Список коэффициентов цен на продукт.
|
|
791
791
|
*/
|
|
792
792
|
t(this, "priceCoefficients");
|
|
793
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = y(e == null ? void 0 : e.costDate) ? w(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new
|
|
793
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = y(e == null ? void 0 : e.costDate) ? w(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Br(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
795
795
|
s && (this.category = new Oe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Oe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Er(p, T.getConfig().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((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
@@ -961,7 +961,7 @@ class je {
|
|
|
961
961
|
return new r(e);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const a = class a {
|
|
965
965
|
/**
|
|
966
966
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
967
967
|
*/
|
|
@@ -1008,7 +1008,7 @@ const S = class S {
|
|
|
1008
1008
|
* @param request Данные запроса.
|
|
1009
1009
|
*/
|
|
1010
1010
|
// eslint-disable-next-line class-methods-use-this
|
|
1011
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(
|
|
1011
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(xr(r.method)) && r.data && (r.data = Ee(r.data))), r));
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Перехватчик ошибок ответов на запрос.
|
|
1014
1014
|
*
|
|
@@ -1027,7 +1027,7 @@ const S = class S {
|
|
|
1027
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
1028
1028
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
|
|
1029
1029
|
const r = T.getConfig().version;
|
|
1030
|
-
this.errorResponseHandler =
|
|
1030
|
+
this.errorResponseHandler = a.defaultErrorsResponseHandler, this.httpClient = Gr.create({
|
|
1031
1031
|
headers: {
|
|
1032
1032
|
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
|
|
1033
1033
|
Accept: "application/json",
|
|
@@ -1038,7 +1038,7 @@ const S = class S {
|
|
|
1038
1038
|
(e) => Promise.reject(e)
|
|
1039
1039
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1040
1040
|
(e) => e,
|
|
1041
|
-
(e) =>
|
|
1041
|
+
(e) => a.convertHttpErrorResponse(e)
|
|
1042
1042
|
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1043
1043
|
this.dataConverterResponseInterceptor,
|
|
1044
1044
|
(e) => Promise.reject(e)
|
|
@@ -1050,7 +1050,7 @@ const S = class S {
|
|
|
1050
1050
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1051
1051
|
*/
|
|
1052
1052
|
static setDefaultErrorsResponseHandler(r) {
|
|
1053
|
-
|
|
1053
|
+
a.defaultErrorsResponseHandler = r;
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1058,7 +1058,7 @@ const S = class S {
|
|
|
1058
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
1059
1059
|
*/
|
|
1060
1060
|
static getInstance(r) {
|
|
1061
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1061
|
+
return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = je.simpleInstanceInitializer(r)), a.instances[r.name];
|
|
1062
1062
|
}
|
|
1063
1063
|
/**
|
|
1064
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1156,15 +1156,15 @@ const S = class S {
|
|
|
1156
1156
|
* Экземпляр объекта текущего класса.
|
|
1157
1157
|
*/
|
|
1158
1158
|
// eslint-disable-next-line no-use-before-define
|
|
1159
|
-
t(
|
|
1159
|
+
t(a, "instances", {}), /**
|
|
1160
1160
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1161
1161
|
*
|
|
1162
1162
|
* @param error Данные об ошибке.
|
|
1163
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1164
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1165
1165
|
*/
|
|
1166
|
-
t(
|
|
1167
|
-
let h =
|
|
1166
|
+
t(a, "defaultErrorsResponseHandler", f);
|
|
1167
|
+
let h = a;
|
|
1168
1168
|
class dt extends h {
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1460,7 +1460,7 @@ class Yr {
|
|
|
1460
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
class
|
|
1463
|
+
class x extends C {
|
|
1464
1464
|
}
|
|
1465
1465
|
class ce extends b {
|
|
1466
1466
|
/**
|
|
@@ -1490,7 +1490,7 @@ class ce extends b {
|
|
|
1490
1490
|
* @inheritDoc
|
|
1491
1491
|
*/
|
|
1492
1492
|
t(this, "isRegionalDirector");
|
|
1493
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1493
|
+
this.salesDirection = e != null && e.salesDirection ? new x(e.salesDirection) : new x(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Yr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
class Xr extends b {
|
|
@@ -1620,7 +1620,7 @@ class pr {
|
|
|
1620
1620
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
class
|
|
1623
|
+
class Se extends pr {
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1626
1626
|
*
|
|
@@ -1652,7 +1652,7 @@ class le extends C {
|
|
|
1652
1652
|
e && (this.country = new ee(e.country));
|
|
1653
1653
|
}
|
|
1654
1654
|
}
|
|
1655
|
-
class
|
|
1655
|
+
class Be extends C {
|
|
1656
1656
|
/**
|
|
1657
1657
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1658
1658
|
*
|
|
@@ -1703,7 +1703,7 @@ class hr extends b {
|
|
|
1703
1703
|
* Признак активности учетной записи пользователя.
|
|
1704
1704
|
*/
|
|
1705
1705
|
t(this, "isActive");
|
|
1706
|
-
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
|
|
1706
|
+
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 x(e.salesDirection) : void 0, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = y(e == null ? void 0 : e.lastLoginAt) ? w(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
1709
|
class me extends hr {
|
|
@@ -1748,7 +1748,7 @@ class me extends hr {
|
|
|
1748
1748
|
* Список менеджеров клиента.
|
|
1749
1749
|
*/
|
|
1750
1750
|
t(this, "managers");
|
|
1751
|
-
this.salesDirection = new
|
|
1751
|
+
this.salesDirection = new x(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 Be(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ce(i))) ?? [];
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
class se extends j {
|
|
@@ -1778,7 +1778,7 @@ class se extends j {
|
|
|
1778
1778
|
this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1779
1779
|
}
|
|
1780
1780
|
}
|
|
1781
|
-
class
|
|
1781
|
+
class ae extends pr {
|
|
1782
1782
|
/**
|
|
1783
1783
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1784
1784
|
*
|
|
@@ -2510,7 +2510,7 @@ class Gt extends h {
|
|
|
2510
2510
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2511
2511
|
}
|
|
2512
2512
|
}
|
|
2513
|
-
class
|
|
2513
|
+
class Bt extends h {
|
|
2514
2514
|
/**
|
|
2515
2515
|
* Возвращает список данных о корневых категориях.
|
|
2516
2516
|
*
|
|
@@ -2583,7 +2583,7 @@ class Ht extends h {
|
|
|
2583
2583
|
getCategoryProductsCoefficients(r) {
|
|
2584
2584
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2585
2585
|
const { data: s } = e;
|
|
2586
|
-
return
|
|
2586
|
+
return Lr(s, (i) => i.map((o) => new Me(o))), s;
|
|
2587
2587
|
});
|
|
2588
2588
|
}
|
|
2589
2589
|
/**
|
|
@@ -2602,7 +2602,7 @@ class Ht extends h {
|
|
|
2602
2602
|
});
|
|
2603
2603
|
}
|
|
2604
2604
|
}
|
|
2605
|
-
class
|
|
2605
|
+
class Ht extends h {
|
|
2606
2606
|
/**
|
|
2607
2607
|
* Возвращает данные об указанном продукте.
|
|
2608
2608
|
*
|
|
@@ -2735,7 +2735,7 @@ class zt extends h {
|
|
|
2735
2735
|
);
|
|
2736
2736
|
}
|
|
2737
2737
|
}
|
|
2738
|
-
var
|
|
2738
|
+
var He = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(He || {});
|
|
2739
2739
|
class Ve {
|
|
2740
2740
|
/**
|
|
2741
2741
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2755,7 +2755,7 @@ class Ve {
|
|
|
2755
2755
|
* Значение с которым сравнивается поле.
|
|
2756
2756
|
*/
|
|
2757
2757
|
t(this, "value");
|
|
2758
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2758
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? He.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2759
2759
|
}
|
|
2760
2760
|
/**
|
|
2761
2761
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2897,7 +2897,7 @@ class Wt extends Te {
|
|
|
2897
2897
|
return this.get(
|
|
2898
2898
|
`/internal/price/templates/${r}/products`,
|
|
2899
2899
|
{},
|
|
2900
|
-
(e) => e.data.map((s) => new
|
|
2900
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2901
2901
|
);
|
|
2902
2902
|
}
|
|
2903
2903
|
/**
|
|
@@ -2909,7 +2909,7 @@ class Wt extends Te {
|
|
|
2909
2909
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2910
2910
|
*/
|
|
2911
2911
|
getProductTemplatePrice(r, e) {
|
|
2912
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2912
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
|
|
2913
2913
|
}
|
|
2914
2914
|
/**
|
|
2915
2915
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2928,7 +2928,7 @@ class Wt extends Te {
|
|
|
2928
2928
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2929
2929
|
increase_percent: s.value
|
|
2930
2930
|
},
|
|
2931
|
-
(o) => new
|
|
2931
|
+
(o) => new ae(o.data)
|
|
2932
2932
|
);
|
|
2933
2933
|
}
|
|
2934
2934
|
/**
|
|
@@ -2953,7 +2953,7 @@ class Wt extends Te {
|
|
|
2953
2953
|
return this.get(
|
|
2954
2954
|
`/internal/price/templates/${r}/categories`,
|
|
2955
2955
|
{},
|
|
2956
|
-
(e) => e.data.map((s) => new
|
|
2956
|
+
(e) => e.data.map((s) => new Se(s))
|
|
2957
2957
|
);
|
|
2958
2958
|
}
|
|
2959
2959
|
/**
|
|
@@ -2968,7 +2968,7 @@ class Wt extends Te {
|
|
|
2968
2968
|
return this.get(
|
|
2969
2969
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2970
2970
|
{},
|
|
2971
|
-
(s) => new
|
|
2971
|
+
(s) => new Se(s.data)
|
|
2972
2972
|
);
|
|
2973
2973
|
}
|
|
2974
2974
|
/**
|
|
@@ -2994,7 +2994,7 @@ class Wt extends Te {
|
|
|
2994
2994
|
},
|
|
2995
2995
|
params: i ? { recursively: !0 } : {}
|
|
2996
2996
|
},
|
|
2997
|
-
(c) => new
|
|
2997
|
+
(c) => new Se(c.data)
|
|
2998
2998
|
);
|
|
2999
2999
|
}
|
|
3000
3000
|
/**
|
|
@@ -3671,7 +3671,7 @@ class wr extends b {
|
|
|
3671
3671
|
/**
|
|
3672
3672
|
* Направление продаж.
|
|
3673
3673
|
*/
|
|
3674
|
-
t(this, "salesDirection", new
|
|
3674
|
+
t(this, "salesDirection", new x());
|
|
3675
3675
|
/**
|
|
3676
3676
|
* Группа партнеров (направление деятельности).
|
|
3677
3677
|
*/
|
|
@@ -3709,7 +3709,7 @@ class wr extends b {
|
|
|
3709
3709
|
*/
|
|
3710
3710
|
t(this, "updater");
|
|
3711
3711
|
if (e) {
|
|
3712
|
-
if (this.opf = new F(e.opf), this.salesDirection = new
|
|
3712
|
+
if (this.opf = new F(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3713
3713
|
const s = [];
|
|
3714
3714
|
e.contacts.forEach((i) => {
|
|
3715
3715
|
s.push(new M(i));
|
|
@@ -3986,99 +3986,103 @@ class Qt {
|
|
|
3986
3986
|
*/
|
|
3987
3987
|
constructor(r) {
|
|
3988
3988
|
/**
|
|
3989
|
-
*
|
|
3989
|
+
* @inheritDoc
|
|
3990
3990
|
*/
|
|
3991
3991
|
t(this, "id");
|
|
3992
3992
|
/**
|
|
3993
|
-
*
|
|
3993
|
+
* @inheritDoc
|
|
3994
3994
|
*/
|
|
3995
3995
|
t(this, "name");
|
|
3996
3996
|
/**
|
|
3997
|
-
*
|
|
3997
|
+
* @inheritDoc
|
|
3998
3998
|
*/
|
|
3999
3999
|
t(this, "alternativeName");
|
|
4000
4000
|
/**
|
|
4001
|
-
*
|
|
4001
|
+
* @inheritDoc
|
|
4002
4002
|
*/
|
|
4003
4003
|
t(this, "searchTerm");
|
|
4004
4004
|
/**
|
|
4005
|
-
*
|
|
4005
|
+
* @inheritDoc
|
|
4006
4006
|
*/
|
|
4007
4007
|
t(this, "cities");
|
|
4008
4008
|
/**
|
|
4009
|
-
*
|
|
4009
|
+
* @inheritDoc
|
|
4010
4010
|
*/
|
|
4011
4011
|
t(this, "region");
|
|
4012
4012
|
/**
|
|
4013
|
-
*
|
|
4013
|
+
* @inheritDoc
|
|
4014
4014
|
*/
|
|
4015
4015
|
t(this, "country");
|
|
4016
4016
|
/**
|
|
4017
|
-
*
|
|
4017
|
+
* @inheritDoc
|
|
4018
4018
|
*/
|
|
4019
4019
|
t(this, "phone");
|
|
4020
4020
|
/**
|
|
4021
|
-
*
|
|
4021
|
+
* @inheritDoc
|
|
4022
4022
|
*/
|
|
4023
4023
|
t(this, "email");
|
|
4024
4024
|
/**
|
|
4025
|
-
*
|
|
4025
|
+
* @inheritDoc
|
|
4026
4026
|
*/
|
|
4027
4027
|
t(this, "isActive");
|
|
4028
4028
|
/**
|
|
4029
|
-
*
|
|
4029
|
+
* @inheritDoc
|
|
4030
4030
|
*/
|
|
4031
4031
|
t(this, "createdAt", new k());
|
|
4032
4032
|
/**
|
|
4033
|
-
*
|
|
4033
|
+
* @inheritDoc
|
|
4034
4034
|
*/
|
|
4035
4035
|
t(this, "lastLoginDate", new k());
|
|
4036
4036
|
/**
|
|
4037
|
-
*
|
|
4037
|
+
* @inheritDoc
|
|
4038
4038
|
*/
|
|
4039
4039
|
t(this, "lastLoginDateHasOrder");
|
|
4040
4040
|
/**
|
|
4041
|
-
*
|
|
4041
|
+
* @inheritDoc
|
|
4042
4042
|
*/
|
|
4043
4043
|
t(this, "managers");
|
|
4044
4044
|
/**
|
|
4045
|
-
*
|
|
4045
|
+
* @inheritDoc
|
|
4046
4046
|
*/
|
|
4047
4047
|
t(this, "isManagerRequired");
|
|
4048
4048
|
/**
|
|
4049
|
-
*
|
|
4049
|
+
* @inheritDoc
|
|
4050
4050
|
*/
|
|
4051
4051
|
t(this, "salesDirections");
|
|
4052
4052
|
/**
|
|
4053
|
-
*
|
|
4053
|
+
* @inheritDoc
|
|
4054
4054
|
*/
|
|
4055
4055
|
t(this, "contragentInn");
|
|
4056
4056
|
/**
|
|
4057
|
-
*
|
|
4057
|
+
* @inheritDoc
|
|
4058
4058
|
*/
|
|
4059
4059
|
t(this, "contragentType");
|
|
4060
4060
|
/**
|
|
4061
|
-
*
|
|
4061
|
+
* @inheritDoc
|
|
4062
4062
|
*/
|
|
4063
4063
|
t(this, "preferredDeliveryType");
|
|
4064
4064
|
/**
|
|
4065
|
-
*
|
|
4065
|
+
* @inheritDoc
|
|
4066
4066
|
*/
|
|
4067
4067
|
t(this, "partnerGroups");
|
|
4068
4068
|
/**
|
|
4069
|
-
*
|
|
4069
|
+
* @inheritDoc
|
|
4070
4070
|
*/
|
|
4071
4071
|
t(this, "contact");
|
|
4072
4072
|
/**
|
|
4073
|
-
*
|
|
4073
|
+
* @inheritDoc
|
|
4074
4074
|
*/
|
|
4075
4075
|
t(this, "lastOrder");
|
|
4076
|
+
/**
|
|
4077
|
+
* @inheritDoc
|
|
4078
|
+
*/
|
|
4079
|
+
t(this, "isExcludedFromMsCallsToClients");
|
|
4076
4080
|
var e, s, i, o, c, u;
|
|
4077
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new
|
|
4081
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new Be(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new De(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new x(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4078
4082
|
createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4079
4083
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4080
4084
|
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
4081
|
-
};
|
|
4085
|
+
}, this.isExcludedFromMsCallsToClients = r == null ? void 0 : r.isExcludedFromMsCallsToClients;
|
|
4082
4086
|
}
|
|
4083
4087
|
/**
|
|
4084
4088
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -4087,15 +4091,6 @@ class Qt {
|
|
|
4087
4091
|
*/
|
|
4088
4092
|
resetFilterValue(r) {
|
|
4089
4093
|
switch (r) {
|
|
4090
|
-
case "id":
|
|
4091
|
-
case "phone":
|
|
4092
|
-
case "email":
|
|
4093
|
-
case "name":
|
|
4094
|
-
case "alternativeName":
|
|
4095
|
-
case "searchTerm":
|
|
4096
|
-
case "contragentInn":
|
|
4097
|
-
this[r] = void 0;
|
|
4098
|
-
break;
|
|
4099
4094
|
case "cities":
|
|
4100
4095
|
this.cities = [];
|
|
4101
4096
|
break;
|
|
@@ -4111,9 +4106,6 @@ class Qt {
|
|
|
4111
4106
|
case "lastLoginDate":
|
|
4112
4107
|
this.lastLoginDate.from = null, this.lastLoginDate.to = null;
|
|
4113
4108
|
break;
|
|
4114
|
-
case "lastLoginDateHasOrder":
|
|
4115
|
-
this.lastLoginDateHasOrder = void 0;
|
|
4116
|
-
break;
|
|
4117
4109
|
case "lastOrder":
|
|
4118
4110
|
this.lastOrder = {};
|
|
4119
4111
|
break;
|
|
@@ -4135,6 +4127,9 @@ class Qt {
|
|
|
4135
4127
|
case "contact":
|
|
4136
4128
|
this.contact = new Ne();
|
|
4137
4129
|
break;
|
|
4130
|
+
default:
|
|
4131
|
+
this[r] = void 0;
|
|
4132
|
+
break;
|
|
4138
4133
|
}
|
|
4139
4134
|
return this;
|
|
4140
4135
|
}
|
|
@@ -4208,7 +4203,7 @@ class yt extends b {
|
|
|
4208
4203
|
* Список менеджеров.
|
|
4209
4204
|
*/
|
|
4210
4205
|
t(this, "managers");
|
|
4211
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new
|
|
4206
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new x(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
|
|
4212
4207
|
}
|
|
4213
4208
|
}
|
|
4214
4209
|
class wt {
|
|
@@ -4278,7 +4273,7 @@ class Xt {
|
|
|
4278
4273
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4279
4274
|
}
|
|
4280
4275
|
}
|
|
4281
|
-
class
|
|
4276
|
+
class L extends Te {
|
|
4282
4277
|
/**
|
|
4283
4278
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4284
4279
|
*
|
|
@@ -4308,7 +4303,7 @@ class x extends Te {
|
|
|
4308
4303
|
* @param contragent Данные о контрагенте клиента.
|
|
4309
4304
|
*/
|
|
4310
4305
|
static transformContragentClientDataToRequest(r) {
|
|
4311
|
-
var c, u, p, v, R,
|
|
4306
|
+
var c, u, p, v, R, S, _, O;
|
|
4312
4307
|
let e;
|
|
4313
4308
|
const s = r, i = r, o = r;
|
|
4314
4309
|
switch (r.opf.slug) {
|
|
@@ -4355,7 +4350,7 @@ class x extends Te {
|
|
|
4355
4350
|
name: o.name,
|
|
4356
4351
|
alternative_name: o.alternativeName,
|
|
4357
4352
|
partner_group_id: (R = o.partnerGroup) == null ? void 0 : R.id,
|
|
4358
|
-
manager_id: (
|
|
4353
|
+
manager_id: (S = o.manager) == null ? void 0 : S.id,
|
|
4359
4354
|
comment: o.comment,
|
|
4360
4355
|
director_name: o.directorName,
|
|
4361
4356
|
director_position: o.directorPosition,
|
|
@@ -4451,7 +4446,7 @@ class x extends Te {
|
|
|
4451
4446
|
return this.getClientsList({
|
|
4452
4447
|
groupOp: "and",
|
|
4453
4448
|
groups: [],
|
|
4454
|
-
filters: [{ field: "phone", op:
|
|
4449
|
+
filters: [{ field: "phone", op: He.Contains, value: r }]
|
|
4455
4450
|
});
|
|
4456
4451
|
}
|
|
4457
4452
|
/**
|
|
@@ -4488,7 +4483,7 @@ class x extends Te {
|
|
|
4488
4483
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4489
4484
|
*/
|
|
4490
4485
|
createClientCommonData(r, e = {}) {
|
|
4491
|
-
return this.post("/internal/clients",
|
|
4486
|
+
return this.post("/internal/clients", L.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
|
|
4492
4487
|
}
|
|
4493
4488
|
/**
|
|
4494
4489
|
* Обновляет данные указанного клиента.
|
|
@@ -4498,7 +4493,7 @@ class x extends Te {
|
|
|
4498
4493
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4499
4494
|
*/
|
|
4500
4495
|
updateClientCommonData(r, e = {}) {
|
|
4501
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
4496
|
+
return this.patch(`/internal/clients/${r.id}`, L.transformClientDataToRequest(r), void 0, e);
|
|
4502
4497
|
}
|
|
4503
4498
|
/**
|
|
4504
4499
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -4587,7 +4582,7 @@ class x extends Te {
|
|
|
4587
4582
|
createContragentClientData(r, e, s = {}) {
|
|
4588
4583
|
return this.post(
|
|
4589
4584
|
`/internal/clients/${r}/contragents`,
|
|
4590
|
-
|
|
4585
|
+
L.transformContragentClientDataToRequest(e),
|
|
4591
4586
|
(i) => ve.createInstance(i.data),
|
|
4592
4587
|
s
|
|
4593
4588
|
);
|
|
@@ -4603,7 +4598,7 @@ class x extends Te {
|
|
|
4603
4598
|
updateContragentClientData(r, e, s = {}) {
|
|
4604
4599
|
return this.patch(
|
|
4605
4600
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4606
|
-
|
|
4601
|
+
L.transformContragentClientDataToRequest(e),
|
|
4607
4602
|
(i) => ve.createInstance(i.data),
|
|
4608
4603
|
s
|
|
4609
4604
|
);
|
|
@@ -4629,7 +4624,7 @@ class x extends Te {
|
|
|
4629
4624
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4630
4625
|
return this.post(
|
|
4631
4626
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4632
|
-
|
|
4627
|
+
L.transformClientDeliveryAddressToRequest(e),
|
|
4633
4628
|
(i) => new Pe(i.data),
|
|
4634
4629
|
s
|
|
4635
4630
|
);
|
|
@@ -4645,7 +4640,7 @@ class x extends Te {
|
|
|
4645
4640
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4646
4641
|
return this.patch(
|
|
4647
4642
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4648
|
-
|
|
4643
|
+
L.transformClientDeliveryAddressToRequest(e),
|
|
4649
4644
|
(i) => new Pe(i.data),
|
|
4650
4645
|
s
|
|
4651
4646
|
);
|
|
@@ -4672,7 +4667,7 @@ class x extends Te {
|
|
|
4672
4667
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4673
4668
|
return this.post(
|
|
4674
4669
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4675
|
-
|
|
4670
|
+
L.transformClientContragentBankAccountToRequest(s),
|
|
4676
4671
|
(o) => new qe(o.data),
|
|
4677
4672
|
i
|
|
4678
4673
|
);
|
|
@@ -4689,7 +4684,7 @@ class x extends Te {
|
|
|
4689
4684
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4690
4685
|
return this.patch(
|
|
4691
4686
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4692
|
-
|
|
4687
|
+
L.transformClientContragentBankAccountToRequest(s),
|
|
4693
4688
|
(o) => new qe(o.data),
|
|
4694
4689
|
i
|
|
4695
4690
|
);
|
|
@@ -5198,7 +5193,7 @@ class Rr extends Pr {
|
|
|
5198
5193
|
date: y((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? w(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5199
5194
|
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
|
|
5200
5195
|
warehouse: (R = e == null ? void 0 : e.delivery) != null && R.warehouse ? new Ae(e.delivery.warehouse) : void 0
|
|
5201
|
-
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5196
|
+
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? w(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? w(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5202
5197
|
}
|
|
5203
5198
|
}
|
|
5204
5199
|
class vt extends j {
|
|
@@ -5361,7 +5356,7 @@ class ss extends Te {
|
|
|
5361
5356
|
return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
|
|
5362
5357
|
}
|
|
5363
5358
|
}
|
|
5364
|
-
class
|
|
5359
|
+
class xe {
|
|
5365
5360
|
/**
|
|
5366
5361
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5367
5362
|
*
|
|
@@ -5391,7 +5386,7 @@ class Le {
|
|
|
5391
5386
|
this.client = new me(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) ?? Ge.Product;
|
|
5392
5387
|
}
|
|
5393
5388
|
}
|
|
5394
|
-
const
|
|
5389
|
+
const Le = (n) => {
|
|
5395
5390
|
var r, e, s, i, o;
|
|
5396
5391
|
return n ? ir(
|
|
5397
5392
|
{
|
|
@@ -5423,9 +5418,9 @@ class is extends h {
|
|
|
5423
5418
|
`/internal/price/products/${r}/analyze`,
|
|
5424
5419
|
{
|
|
5425
5420
|
...Ze(e),
|
|
5426
|
-
filters:
|
|
5421
|
+
filters: Le(s)
|
|
5427
5422
|
},
|
|
5428
|
-
(i) => i.data.map((o) => new
|
|
5423
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5429
5424
|
);
|
|
5430
5425
|
}
|
|
5431
5426
|
/**
|
|
@@ -5442,9 +5437,9 @@ class is extends h {
|
|
|
5442
5437
|
`/internal/price/categories/${r}/analyze`,
|
|
5443
5438
|
{
|
|
5444
5439
|
...Ze(e),
|
|
5445
|
-
filters:
|
|
5440
|
+
filters: Le(s)
|
|
5446
5441
|
},
|
|
5447
|
-
(i) => i.data.map((o) => new
|
|
5442
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5448
5443
|
);
|
|
5449
5444
|
}
|
|
5450
5445
|
/**
|
|
@@ -5463,9 +5458,9 @@ class is extends h {
|
|
|
5463
5458
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5464
5459
|
{
|
|
5465
5460
|
...e,
|
|
5466
|
-
filters:
|
|
5461
|
+
filters: Le(s)
|
|
5467
5462
|
},
|
|
5468
|
-
(i) => i.data.map((o) => new
|
|
5463
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5469
5464
|
);
|
|
5470
5465
|
}
|
|
5471
5466
|
}
|
|
@@ -5703,7 +5698,7 @@ class $ extends pe {
|
|
|
5703
5698
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5704
5699
|
*/
|
|
5705
5700
|
getSalesDirections() {
|
|
5706
|
-
return this.getTypedDataArrayRequester(
|
|
5701
|
+
return this.getTypedDataArrayRequester(x, "/public/references/sales-direction", !0);
|
|
5707
5702
|
}
|
|
5708
5703
|
/**
|
|
5709
5704
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -5717,7 +5712,7 @@ class $ extends pe {
|
|
|
5717
5712
|
* @param term Терм поиска.
|
|
5718
5713
|
*/
|
|
5719
5714
|
searchCity(r) {
|
|
5720
|
-
return this.getTypedDataArrayRequester(
|
|
5715
|
+
return this.getTypedDataArrayRequester(Be, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5721
5716
|
}
|
|
5722
5717
|
/**
|
|
5723
5718
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5767,7 +5762,7 @@ class $ extends pe {
|
|
|
5767
5762
|
}
|
|
5768
5763
|
}
|
|
5769
5764
|
const A = te("__references_private", () => {
|
|
5770
|
-
const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0),
|
|
5765
|
+
const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0), S = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0), B = m(void 0), $e = m(void 0), l = m(void 0);
|
|
5771
5766
|
return {
|
|
5772
5767
|
/**
|
|
5773
5768
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5816,7 +5811,7 @@ const A = te("__references_private", () => {
|
|
|
5816
5811
|
/**
|
|
5817
5812
|
* Справочник типов файлов продукктов/категорий.
|
|
5818
5813
|
*/
|
|
5819
|
-
productFileTypeReference:
|
|
5814
|
+
productFileTypeReference: S,
|
|
5820
5815
|
/**
|
|
5821
5816
|
* Справочник типов ресурсов.
|
|
5822
5817
|
*/
|
|
@@ -5832,7 +5827,7 @@ const A = te("__references_private", () => {
|
|
|
5832
5827
|
/**
|
|
5833
5828
|
* Справочник складов.
|
|
5834
5829
|
*/
|
|
5835
|
-
warehousesReference:
|
|
5830
|
+
warehousesReference: B,
|
|
5836
5831
|
/**
|
|
5837
5832
|
* Справочник типов свойств.
|
|
5838
5833
|
*/
|
|
@@ -5898,7 +5893,7 @@ const A = te("__references_private", () => {
|
|
|
5898
5893
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
|
|
5899
5894
|
l.salesDirectionsReference = g;
|
|
5900
5895
|
}).catch(f)), l.salesDirectionsReference;
|
|
5901
|
-
}),
|
|
5896
|
+
}), S = P(() => {
|
|
5902
5897
|
const l = A();
|
|
5903
5898
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
|
|
5904
5899
|
l.sourcePrimaryInterestReference = g;
|
|
@@ -5918,7 +5913,7 @@ const A = te("__references_private", () => {
|
|
|
5918
5913
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
|
|
5919
5914
|
l.warehousesReference = g;
|
|
5920
5915
|
}).catch(f)), l.warehousesReference;
|
|
5921
|
-
}),
|
|
5916
|
+
}), B = P(() => {
|
|
5922
5917
|
const l = A();
|
|
5923
5918
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
|
|
5924
5919
|
l.propertyTypesReference = g;
|
|
@@ -5977,7 +5972,7 @@ const A = te("__references_private", () => {
|
|
|
5977
5972
|
/**
|
|
5978
5973
|
* Справочник каналов первичного интереса.
|
|
5979
5974
|
*/
|
|
5980
|
-
sourcePrimaryInterestsReference:
|
|
5975
|
+
sourcePrimaryInterestsReference: S,
|
|
5981
5976
|
/**
|
|
5982
5977
|
* Справочник типов доставки.
|
|
5983
5978
|
*/
|
|
@@ -5993,7 +5988,7 @@ const A = te("__references_private", () => {
|
|
|
5993
5988
|
/**
|
|
5994
5989
|
* Справочник типов свойств.
|
|
5995
5990
|
*/
|
|
5996
|
-
propertyTypesReference:
|
|
5991
|
+
propertyTypesReference: B,
|
|
5997
5992
|
/**
|
|
5998
5993
|
* Справочник коэффициентов цен.
|
|
5999
5994
|
*/
|
|
@@ -6184,7 +6179,7 @@ class bt extends h {
|
|
|
6184
6179
|
return this.get("/internal/users/info", {}, (r) => new $t(r.data));
|
|
6185
6180
|
}
|
|
6186
6181
|
}
|
|
6187
|
-
const
|
|
6182
|
+
const St = te("__user_state_private", () => {
|
|
6188
6183
|
const n = m({}), r = m(void 0);
|
|
6189
6184
|
return {
|
|
6190
6185
|
/**
|
|
@@ -6201,7 +6196,7 @@ const at = te("__user_state_private", () => {
|
|
|
6201
6196
|
* Данные о текущем пользователе.
|
|
6202
6197
|
*/
|
|
6203
6198
|
currentUser: P(() => {
|
|
6204
|
-
const r =
|
|
6199
|
+
const r = St();
|
|
6205
6200
|
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(bt).getCurrentUser().then((e) => {
|
|
6206
6201
|
r.currentUser = e;
|
|
6207
6202
|
}).catch(f).finally(() => {
|
|
@@ -6249,11 +6244,11 @@ export {
|
|
|
6249
6244
|
Je as CategoryPricingRule,
|
|
6250
6245
|
mr as ChannelPrimaryInterest,
|
|
6251
6246
|
Kt as City,
|
|
6252
|
-
|
|
6247
|
+
Be as CityWithRegionAndCountry,
|
|
6253
6248
|
Ye as Client,
|
|
6254
6249
|
yt as ClientAdditionalData,
|
|
6255
6250
|
we as ClientCategory,
|
|
6256
|
-
|
|
6251
|
+
L as ClientDataProvider,
|
|
6257
6252
|
jt as ClientPriceProvider,
|
|
6258
6253
|
Gt as ClientPriceTemplateProvider,
|
|
6259
6254
|
Z as ClientProduct,
|
|
@@ -6293,9 +6288,9 @@ export {
|
|
|
6293
6288
|
gs as FieldValidationResultData,
|
|
6294
6289
|
ue as FilterGroup,
|
|
6295
6290
|
Ve as FilterItem,
|
|
6296
|
-
|
|
6291
|
+
He as FilterOpEnum,
|
|
6297
6292
|
lr as GeoCoordinates,
|
|
6298
|
-
|
|
6293
|
+
Hr as HiddenCatalogableItem,
|
|
6299
6294
|
pe as HttpCachedRequester,
|
|
6300
6295
|
rt as HttpParamsConfig,
|
|
6301
6296
|
h as HttpRequester,
|
|
@@ -6320,24 +6315,24 @@ export {
|
|
|
6320
6315
|
re as PartnerGroup,
|
|
6321
6316
|
pt as PaymentType,
|
|
6322
6317
|
ye as PreferencesStorageProvider,
|
|
6323
|
-
|
|
6318
|
+
xe as PriceAnalyze,
|
|
6324
6319
|
is as PriceAnalyzeProvider,
|
|
6325
6320
|
Re as PriceCoefficient,
|
|
6326
6321
|
cr as PriceCoefficientEnum,
|
|
6327
6322
|
ns as PriceHistoryDataProvider,
|
|
6328
6323
|
Rt as PriceHistoryItem,
|
|
6329
6324
|
W as PriceTemplate,
|
|
6330
|
-
|
|
6325
|
+
Se as PriceTemplateCategory,
|
|
6331
6326
|
se as PriceTemplateClient,
|
|
6332
6327
|
pr as PriceTemplateICatalogableItem,
|
|
6333
|
-
|
|
6328
|
+
ae as PriceTemplateProduct,
|
|
6334
6329
|
Wt as PriceTemplateProvider,
|
|
6335
6330
|
ne as PricingRole,
|
|
6336
6331
|
Jt as PricingRoleProvider,
|
|
6337
6332
|
Oe as PrimaryCatalogableItem,
|
|
6338
6333
|
I as Product,
|
|
6339
|
-
|
|
6340
|
-
|
|
6334
|
+
Bt as ProductCategoryDataProvider,
|
|
6335
|
+
Ht as ProductDataProvider,
|
|
6341
6336
|
ht as ProductFileType,
|
|
6342
6337
|
Me as ProductPriceCoefficient,
|
|
6343
6338
|
At as ProductPriceHistory,
|
|
@@ -6352,12 +6347,12 @@ export {
|
|
|
6352
6347
|
$ as ReferenceDataProvider,
|
|
6353
6348
|
le as Region,
|
|
6354
6349
|
fr as ResourceType,
|
|
6355
|
-
|
|
6350
|
+
x as SalesDirection,
|
|
6356
6351
|
tt as SentryConfig,
|
|
6357
6352
|
rr as Seo,
|
|
6358
6353
|
ls as SeoDataProvider,
|
|
6359
6354
|
yr as SourcePrimaryInterest,
|
|
6360
|
-
|
|
6355
|
+
Br as StockCount,
|
|
6361
6356
|
Ut as TemplatesListFilters,
|
|
6362
6357
|
je as TypedInstanceFactory,
|
|
6363
6358
|
Xe as UnitsHelper,
|