@snabcentr/common-lib 1.71.5 → 1.71.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 +3 -3
- package/dist/sc-common-lib.js +145 -135
- 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/cart/providers/cart-provider.d.ts +8 -0
- package/dist/src/cart/providers/cart-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,11 +2,11 @@ var wr = Object.defineProperty;
|
|
|
2
2
|
var Cr = (n, r, e) => r in n ? wr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Cr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as Ye } from "jwt-decode";
|
|
5
|
-
import { merge as xe, isUndefined as vr, isNil as $, noop as w, mapValues as Pr, isArray as J, every as Rr, split as Ar, toUpper as
|
|
5
|
+
import { merge as xe, isUndefined as vr, isNil as $, noop as w, mapValues as Pr, isArray as J, every as Rr, split as Ar, toUpper as ar, constant as Dr, isString as y, cloneDeep as $r, toLower as Tr, isFunction as Ne, map as ue, forEach as br, isDate as Ie, isEmpty as ve, omitBy as Xe, isObject as Ze } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Oe, objectToSnake as Me } from "ts-case-convert";
|
|
7
7
|
import { defineStore as Z } from "pinia";
|
|
8
8
|
import { ref as f, markRaw as _r, computed as R } from "vue";
|
|
9
|
-
import { parseISO as C, format as q, isAfter as Sr, startOfToday as er, addSeconds as Ir, addBusinessDays as
|
|
9
|
+
import { parseISO as C, format as q, isAfter as Sr, startOfToday as er, addSeconds as Ir, addBusinessDays as dr, endOfTomorrow as Lr, startOfTomorrow as kr, endOfYesterday as xr, startOfYesterday as Nr, endOfToday as Or, endOfDay as qr, startOfDay as Ur } from "date-fns";
|
|
10
10
|
import Gr from "axios";
|
|
11
11
|
class ie {
|
|
12
12
|
/**
|
|
@@ -111,7 +111,7 @@ class ie {
|
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class kt extends ie {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -190,10 +190,10 @@ const W = class W {
|
|
|
190
190
|
* Конфигурация приложения.
|
|
191
191
|
*/
|
|
192
192
|
t(W, "config");
|
|
193
|
-
let
|
|
193
|
+
let a = W;
|
|
194
194
|
const ee = Z("__auth_state_private", () => {
|
|
195
195
|
var i;
|
|
196
|
-
const n = f(Promise.resolve((i =
|
|
196
|
+
const n = f(Promise.resolve((i = a.getConfig().devMode) == null ? void 0 : i.initAuthBearerToken)), r = f(void 0), e = f(void 0), s = _r(/* @__PURE__ */ new Map());
|
|
197
197
|
return {
|
|
198
198
|
/**
|
|
199
199
|
* {@link Promise<string>} для получения jwt-ключа доступа к системам.
|
|
@@ -212,7 +212,7 @@ const ee = Z("__auth_state_private", () => {
|
|
|
212
212
|
*/
|
|
213
213
|
userPermissionsComputedRefs: s
|
|
214
214
|
};
|
|
215
|
-
}),
|
|
215
|
+
}), De = Z("__auth_state", () => {
|
|
216
216
|
const n = R(() => {
|
|
217
217
|
const i = ee();
|
|
218
218
|
if ($(i.jwtToken) && !$(i.jwtTokenUpdater)) {
|
|
@@ -348,7 +348,7 @@ class rr extends ne {
|
|
|
348
348
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
349
349
|
}
|
|
350
350
|
}
|
|
351
|
-
class
|
|
351
|
+
class de extends rr {
|
|
352
352
|
/**
|
|
353
353
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
354
354
|
*
|
|
@@ -363,7 +363,7 @@ class Le extends rr {
|
|
|
363
363
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
|
-
class he extends
|
|
366
|
+
class he extends de {
|
|
367
367
|
/**
|
|
368
368
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
369
369
|
*
|
|
@@ -387,7 +387,7 @@ class he extends Le {
|
|
|
387
387
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
388
388
|
*/
|
|
389
389
|
t(this, "currencyRates");
|
|
390
|
-
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]) => [
|
|
390
|
+
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]) => [ar(s), i])) : void 0;
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
var tr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(tr || {});
|
|
@@ -415,7 +415,7 @@ class Pe extends P {
|
|
|
415
415
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
416
416
|
*/
|
|
417
417
|
static getRetailPriceCoefficient() {
|
|
418
|
-
return { id: -2, slug: tr.Retail, name: "Розн. цена", guid: "", isNewRec:
|
|
418
|
+
return { id: -2, slug: tr.Retail, name: "Розн. цена", guid: "", isNewRec: Dr(!0) };
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
class qe {
|
|
@@ -500,7 +500,7 @@ class Re extends P {
|
|
|
500
500
|
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new sr(e == null ? void 0 : e.coordinates);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
class
|
|
503
|
+
class Fr {
|
|
504
504
|
/**
|
|
505
505
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
506
506
|
*
|
|
@@ -518,7 +518,7 @@ class jr {
|
|
|
518
518
|
this.warehouse = new Re(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
class
|
|
521
|
+
class jr extends rr {
|
|
522
522
|
/**
|
|
523
523
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
524
524
|
*
|
|
@@ -556,7 +556,7 @@ class Mr {
|
|
|
556
556
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
class
|
|
559
|
+
class k extends jr {
|
|
560
560
|
/**
|
|
561
561
|
* Инициализирует экземпляр класса {@link Product}.
|
|
562
562
|
*
|
|
@@ -641,16 +641,16 @@ class d extends Fr {
|
|
|
641
641
|
* Список коэффициентов цен на продукт.
|
|
642
642
|
*/
|
|
643
643
|
t(this, "priceCoefficients");
|
|
644
|
-
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) ? C(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((u) => new
|
|
644
|
+
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) ? C(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((u) => new Fr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
645
645
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
646
|
-
s && (this.category = new
|
|
646
|
+
s && (this.category = new de({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new de(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Mr(u, a.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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new qe(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
647
647
|
}
|
|
648
648
|
/**
|
|
649
649
|
* Возвращает признак, что это измеряемый товар.
|
|
650
650
|
*/
|
|
651
651
|
getIsMeasurable() {
|
|
652
652
|
var s;
|
|
653
|
-
const e = (s =
|
|
653
|
+
const e = (s = a.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
654
654
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
655
655
|
}
|
|
656
656
|
/**
|
|
@@ -718,7 +718,7 @@ class Hr extends M {
|
|
|
718
718
|
* Признак того, что позиция является дополнительной продажей.
|
|
719
719
|
*/
|
|
720
720
|
t(this, "isAdditionalSale");
|
|
721
|
-
this.product = new
|
|
721
|
+
this.product = new k(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new he(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && $r(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
724
|
class Br extends Hr {
|
|
@@ -812,7 +812,7 @@ class Ue {
|
|
|
812
812
|
return new r(e);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
const
|
|
815
|
+
const L = class L {
|
|
816
816
|
/**
|
|
817
817
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
818
818
|
*/
|
|
@@ -824,7 +824,7 @@ const k = class k {
|
|
|
824
824
|
/**
|
|
825
825
|
* Базовый URL путь для выполнения запросов.
|
|
826
826
|
*/
|
|
827
|
-
t(this, "baseUrl", `${
|
|
827
|
+
t(this, "baseUrl", `${a.getConfig().http.portalApiUrl}/api`);
|
|
828
828
|
/**
|
|
829
829
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
830
830
|
*
|
|
@@ -851,7 +851,7 @@ const k = class k {
|
|
|
851
851
|
// eslint-disable-next-line class-methods-use-this
|
|
852
852
|
t(this, "authRequestInterceptor", async (r) => {
|
|
853
853
|
let e;
|
|
854
|
-
return $(
|
|
854
|
+
return $(De().jwtToken) || (e = await De().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
855
855
|
});
|
|
856
856
|
/**
|
|
857
857
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -868,7 +868,7 @@ const k = class k {
|
|
|
868
868
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
869
869
|
var s;
|
|
870
870
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
871
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
871
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (De().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
872
872
|
});
|
|
873
873
|
/**
|
|
874
874
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -877,10 +877,10 @@ const k = class k {
|
|
|
877
877
|
*/
|
|
878
878
|
// eslint-disable-next-line class-methods-use-this
|
|
879
879
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Oe(r.data)), r));
|
|
880
|
-
const r =
|
|
881
|
-
this.errorResponseHandler =
|
|
880
|
+
const r = a.getConfig().version;
|
|
881
|
+
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = Gr.create({
|
|
882
882
|
headers: {
|
|
883
|
-
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date,
|
|
883
|
+
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, a.getConfig().dateFormats.uiDate)})`,
|
|
884
884
|
Accept: "application/json",
|
|
885
885
|
"Content-Type": "application/json"
|
|
886
886
|
}
|
|
@@ -889,7 +889,7 @@ const k = class k {
|
|
|
889
889
|
(e) => Promise.reject(e)
|
|
890
890
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
891
891
|
(e) => e,
|
|
892
|
-
(e) =>
|
|
892
|
+
(e) => L.convertHttpErrorResponse(e)
|
|
893
893
|
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
894
894
|
this.dataConverterResponseInterceptor,
|
|
895
895
|
(e) => Promise.reject(e)
|
|
@@ -901,7 +901,7 @@ const k = class k {
|
|
|
901
901
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
902
902
|
*/
|
|
903
903
|
static setDefaultErrorsResponseHandler(r) {
|
|
904
|
-
|
|
904
|
+
L.defaultErrorsResponseHandler = r;
|
|
905
905
|
}
|
|
906
906
|
/**
|
|
907
907
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -909,7 +909,7 @@ const k = class k {
|
|
|
909
909
|
* @param type Тип данных, которыми оперирует метод.
|
|
910
910
|
*/
|
|
911
911
|
static getInstance(r) {
|
|
912
|
-
return Object.prototype.hasOwnProperty.call(
|
|
912
|
+
return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = Ue.simpleInstanceInitializer(r)), L.instances[r.name];
|
|
913
913
|
}
|
|
914
914
|
/**
|
|
915
915
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1007,15 +1007,15 @@ const k = class k {
|
|
|
1007
1007
|
* Экземпляр объекта текущего класса.
|
|
1008
1008
|
*/
|
|
1009
1009
|
// eslint-disable-next-line no-use-before-define
|
|
1010
|
-
t(
|
|
1010
|
+
t(L, "instances", {}), /**
|
|
1011
1011
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1012
1012
|
*
|
|
1013
1013
|
* @param error Данные об ошибке.
|
|
1014
1014
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1015
1015
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1016
1016
|
*/
|
|
1017
|
-
t(
|
|
1018
|
-
let h =
|
|
1017
|
+
t(L, "defaultErrorsResponseHandler", w);
|
|
1018
|
+
let h = L;
|
|
1019
1019
|
class xt extends h {
|
|
1020
1020
|
/**
|
|
1021
1021
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1119,6 +1119,16 @@ class xt extends h {
|
|
|
1119
1119
|
addCartItemFromCSV(r, e) {
|
|
1120
1120
|
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new me(s.data));
|
|
1121
1121
|
}
|
|
1122
|
+
/**
|
|
1123
|
+
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
1124
|
+
*
|
|
1125
|
+
* @param client Данные о клиенте, для которого необходимо получить пример CSV файла.
|
|
1126
|
+
*
|
|
1127
|
+
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv_example
|
|
1128
|
+
*/
|
|
1129
|
+
getCartItemFromCSVExample(r) {
|
|
1130
|
+
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1131
|
+
}
|
|
1122
1132
|
}
|
|
1123
1133
|
var zr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(zr || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), Wr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Wr || {});
|
|
1124
1134
|
class B extends he {
|
|
@@ -1138,7 +1148,7 @@ class B extends he {
|
|
|
1138
1148
|
* Список продуктов категории.
|
|
1139
1149
|
*/
|
|
1140
1150
|
t(this, "products");
|
|
1141
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new B(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new
|
|
1151
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new B(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new k(o));
|
|
1142
1152
|
}
|
|
1143
1153
|
}
|
|
1144
1154
|
class ir extends T {
|
|
@@ -1278,7 +1288,7 @@ class z extends ir {
|
|
|
1278
1288
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1279
1289
|
}
|
|
1280
1290
|
}
|
|
1281
|
-
class Q extends
|
|
1291
|
+
class Q extends k {
|
|
1282
1292
|
/**
|
|
1283
1293
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1284
1294
|
*
|
|
@@ -1523,7 +1533,7 @@ class ce extends P {
|
|
|
1523
1533
|
e && (this.country = new Y(e.country));
|
|
1524
1534
|
}
|
|
1525
1535
|
}
|
|
1526
|
-
class
|
|
1536
|
+
class Fe extends P {
|
|
1527
1537
|
/**
|
|
1528
1538
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1529
1539
|
*
|
|
@@ -1619,7 +1629,7 @@ class ge extends or {
|
|
|
1619
1629
|
* Список менеджеров клиента.
|
|
1620
1630
|
*/
|
|
1621
1631
|
t(this, "managers");
|
|
1622
|
-
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
|
|
1632
|
+
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 Fe(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new oe(i))) ?? [];
|
|
1623
1633
|
}
|
|
1624
1634
|
}
|
|
1625
1635
|
class re extends M {
|
|
@@ -1661,7 +1671,7 @@ class Te extends nr {
|
|
|
1661
1671
|
* Базовые данные о продукте.
|
|
1662
1672
|
*/
|
|
1663
1673
|
t(this, "product");
|
|
1664
|
-
this.product = new
|
|
1674
|
+
this.product = new k(e == null ? void 0 : e.product);
|
|
1665
1675
|
}
|
|
1666
1676
|
}
|
|
1667
1677
|
class cr extends P {
|
|
@@ -2086,7 +2096,7 @@ class Ut extends h {
|
|
|
2086
2096
|
*/
|
|
2087
2097
|
// eslint-disable-next-line class-methods-use-this
|
|
2088
2098
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2089
|
-
let c = `${
|
|
2099
|
+
let c = `${a.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2090
2100
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2091
2101
|
}
|
|
2092
2102
|
}
|
|
@@ -2289,7 +2299,7 @@ class Gt extends h {
|
|
|
2289
2299
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2290
2300
|
}
|
|
2291
2301
|
}
|
|
2292
|
-
class
|
|
2302
|
+
class Ft extends h {
|
|
2293
2303
|
/**
|
|
2294
2304
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2295
2305
|
*
|
|
@@ -2324,7 +2334,7 @@ class jt extends h {
|
|
|
2324
2334
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2325
2335
|
*/
|
|
2326
2336
|
attachTemplate(r, e, s) {
|
|
2327
|
-
const i =
|
|
2337
|
+
const i = a.getConfig().dateFormats.api;
|
|
2328
2338
|
return this.post(
|
|
2329
2339
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2330
2340
|
s && {
|
|
@@ -2358,7 +2368,7 @@ class jt extends h {
|
|
|
2358
2368
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2359
2369
|
*/
|
|
2360
2370
|
changeTemplate(r, e, s, i) {
|
|
2361
|
-
const o =
|
|
2371
|
+
const o = a.getConfig().dateFormats.api;
|
|
2362
2372
|
return this.patch(
|
|
2363
2373
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2364
2374
|
i && {
|
|
@@ -2381,7 +2391,7 @@ class jt extends h {
|
|
|
2381
2391
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2382
2392
|
}
|
|
2383
2393
|
}
|
|
2384
|
-
class
|
|
2394
|
+
class jt extends h {
|
|
2385
2395
|
/**
|
|
2386
2396
|
* Возвращает список данных о корневых категориях.
|
|
2387
2397
|
*
|
|
@@ -2441,7 +2451,7 @@ class Ft extends h {
|
|
|
2441
2451
|
showHidden: s,
|
|
2442
2452
|
withPriceCoefficients: e
|
|
2443
2453
|
},
|
|
2444
|
-
(i) => ue(i.data, (o) => new
|
|
2454
|
+
(i) => ue(i.data, (o) => new k(o))
|
|
2445
2455
|
);
|
|
2446
2456
|
}
|
|
2447
2457
|
/**
|
|
@@ -2483,7 +2493,7 @@ class Mt extends h {
|
|
|
2483
2493
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2484
2494
|
*/
|
|
2485
2495
|
getProductData(r, e = !1) {
|
|
2486
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2496
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new k(s.data));
|
|
2487
2497
|
}
|
|
2488
2498
|
/**
|
|
2489
2499
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2491,7 +2501,7 @@ class Mt extends h {
|
|
|
2491
2501
|
* @param productId Идентификатор продукта.
|
|
2492
2502
|
*/
|
|
2493
2503
|
getPublicProductData(r) {
|
|
2494
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2504
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new k(e.data));
|
|
2495
2505
|
}
|
|
2496
2506
|
/**
|
|
2497
2507
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2516,7 +2526,7 @@ class Mt extends h {
|
|
|
2516
2526
|
publicSimpleSearch(r, e = 10) {
|
|
2517
2527
|
return new Promise((s, i) => {
|
|
2518
2528
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2519
|
-
s(o.products.map((c) => new
|
|
2529
|
+
s(o.products.map((c) => new k(c)));
|
|
2520
2530
|
}).catch((o) => {
|
|
2521
2531
|
i(o);
|
|
2522
2532
|
});
|
|
@@ -2606,7 +2616,7 @@ class Bt extends h {
|
|
|
2606
2616
|
);
|
|
2607
2617
|
}
|
|
2608
2618
|
}
|
|
2609
|
-
var
|
|
2619
|
+
var je = /* @__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))(je || {});
|
|
2610
2620
|
class Be {
|
|
2611
2621
|
/**
|
|
2612
2622
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2626,7 +2636,7 @@ class Be {
|
|
|
2626
2636
|
* Значение с которым сравнивается поле.
|
|
2627
2637
|
*/
|
|
2628
2638
|
t(this, "value");
|
|
2629
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2639
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? je.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2630
2640
|
}
|
|
2631
2641
|
/**
|
|
2632
2642
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2638,7 +2648,7 @@ class Be {
|
|
|
2638
2648
|
field: this.field,
|
|
2639
2649
|
op: this.op
|
|
2640
2650
|
};
|
|
2641
|
-
return r.value = Ie(this.value) ? q(this.value,
|
|
2651
|
+
return r.value = Ie(this.value) ? q(this.value, a.getConfig().dateFormats.api) : this.value, r;
|
|
2642
2652
|
}
|
|
2643
2653
|
}
|
|
2644
2654
|
class le {
|
|
@@ -2676,7 +2686,7 @@ class le {
|
|
|
2676
2686
|
};
|
|
2677
2687
|
}
|
|
2678
2688
|
}
|
|
2679
|
-
class
|
|
2689
|
+
class ae extends h {
|
|
2680
2690
|
/**
|
|
2681
2691
|
* Получает пагинированный список данных.
|
|
2682
2692
|
*
|
|
@@ -2696,7 +2706,7 @@ class De extends h {
|
|
|
2696
2706
|
return e && (u.filters = JSON.stringify((e instanceof le ? e : new le(e)).toPrimitive())), ve(s) || (u.sort = J(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
|
|
2697
2707
|
}
|
|
2698
2708
|
}
|
|
2699
|
-
class zt extends
|
|
2709
|
+
class zt extends ae {
|
|
2700
2710
|
/**
|
|
2701
2711
|
* Возвращает список шаблонов прайс-листа.
|
|
2702
2712
|
*
|
|
@@ -2980,7 +2990,7 @@ class Wt extends h {
|
|
|
2980
2990
|
);
|
|
2981
2991
|
}
|
|
2982
2992
|
}
|
|
2983
|
-
class Et extends
|
|
2993
|
+
class Et extends ae {
|
|
2984
2994
|
/**
|
|
2985
2995
|
* Возвращает пагинированный список свойств.
|
|
2986
2996
|
*
|
|
@@ -3382,7 +3392,7 @@ function We(n) {
|
|
|
3382
3392
|
}
|
|
3383
3393
|
}), r;
|
|
3384
3394
|
}
|
|
3385
|
-
var tt = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(tt || {}),
|
|
3395
|
+
var tt = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(tt || {}), d = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(d || {});
|
|
3386
3396
|
class st extends P {
|
|
3387
3397
|
}
|
|
3388
3398
|
class lr extends P {
|
|
@@ -3410,15 +3420,15 @@ class ye extends T {
|
|
|
3410
3420
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3411
3421
|
}
|
|
3412
3422
|
}
|
|
3413
|
-
class
|
|
3423
|
+
class F extends P {
|
|
3414
3424
|
/**
|
|
3415
3425
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3416
3426
|
*/
|
|
3417
3427
|
static generatePersonItem() {
|
|
3418
|
-
return new
|
|
3428
|
+
return new F({
|
|
3419
3429
|
id: 1,
|
|
3420
3430
|
guid: "",
|
|
3421
|
-
slug:
|
|
3431
|
+
slug: d.Person,
|
|
3422
3432
|
name: ""
|
|
3423
3433
|
});
|
|
3424
3434
|
}
|
|
@@ -3437,7 +3447,7 @@ class pr extends P {
|
|
|
3437
3447
|
}
|
|
3438
3448
|
class ur extends P {
|
|
3439
3449
|
}
|
|
3440
|
-
class
|
|
3450
|
+
class Le extends M {
|
|
3441
3451
|
/**
|
|
3442
3452
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3443
3453
|
*
|
|
@@ -3468,7 +3478,7 @@ class ke extends M {
|
|
|
3468
3478
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ye(e.currency));
|
|
3469
3479
|
}
|
|
3470
3480
|
}
|
|
3471
|
-
class
|
|
3481
|
+
class ke extends T {
|
|
3472
3482
|
/**
|
|
3473
3483
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3474
3484
|
*
|
|
@@ -3487,7 +3497,7 @@ class de extends T {
|
|
|
3487
3497
|
this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
|
|
3488
3498
|
}
|
|
3489
3499
|
}
|
|
3490
|
-
class
|
|
3500
|
+
class j extends ke {
|
|
3491
3501
|
/**
|
|
3492
3502
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3493
3503
|
*
|
|
@@ -3538,7 +3548,7 @@ class hr extends T {
|
|
|
3538
3548
|
/**
|
|
3539
3549
|
* Данные об организационно-правовой форме.
|
|
3540
3550
|
*/
|
|
3541
|
-
t(this, "opf",
|
|
3551
|
+
t(this, "opf", F.generatePersonItem());
|
|
3542
3552
|
/**
|
|
3543
3553
|
* Направление продаж.
|
|
3544
3554
|
*/
|
|
@@ -3580,16 +3590,16 @@ class hr extends T {
|
|
|
3580
3590
|
*/
|
|
3581
3591
|
t(this, "updater");
|
|
3582
3592
|
if (e) {
|
|
3583
|
-
if (this.opf = new
|
|
3593
|
+
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) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new X(e.partnerGroup)), e.manager && (this.manager = new oe(e.manager)), e.contacts) {
|
|
3584
3594
|
const s = [];
|
|
3585
3595
|
e.contacts.forEach((i) => {
|
|
3586
|
-
s.push(new
|
|
3596
|
+
s.push(new j(i));
|
|
3587
3597
|
}), this.contacts = s;
|
|
3588
3598
|
}
|
|
3589
3599
|
if (e.bankAccounts) {
|
|
3590
3600
|
const s = [];
|
|
3591
3601
|
e.bankAccounts.forEach((i) => {
|
|
3592
|
-
s.push(new
|
|
3602
|
+
s.push(new Le(i));
|
|
3593
3603
|
}), this.bankAccounts = s;
|
|
3594
3604
|
}
|
|
3595
3605
|
}
|
|
@@ -3694,11 +3704,11 @@ class we {
|
|
|
3694
3704
|
*/
|
|
3695
3705
|
static createInstance(r) {
|
|
3696
3706
|
switch (r.opf.slug) {
|
|
3697
|
-
case
|
|
3707
|
+
case d.Ic:
|
|
3698
3708
|
return new gr(r);
|
|
3699
|
-
case
|
|
3709
|
+
case d.UlR:
|
|
3700
3710
|
return new mr(r);
|
|
3701
|
-
case
|
|
3711
|
+
case d.UlNr:
|
|
3702
3712
|
return new ut(r);
|
|
3703
3713
|
default:
|
|
3704
3714
|
return new pt(r);
|
|
@@ -3720,7 +3730,7 @@ class be extends M {
|
|
|
3720
3730
|
this.isPrimary = e.isPrimary;
|
|
3721
3731
|
}
|
|
3722
3732
|
}
|
|
3723
|
-
class ht extends
|
|
3733
|
+
class ht extends j {
|
|
3724
3734
|
/**
|
|
3725
3735
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3726
3736
|
*
|
|
@@ -3785,7 +3795,7 @@ class Ce extends Er {
|
|
|
3785
3795
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3786
3796
|
*/
|
|
3787
3797
|
t(this, "isTransportCompanyAddress");
|
|
3788
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new sr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new
|
|
3798
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new sr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new j(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
3789
3799
|
}
|
|
3790
3800
|
}
|
|
3791
3801
|
class Ee extends ge {
|
|
@@ -3842,7 +3852,7 @@ class Ee extends ge {
|
|
|
3842
3852
|
* Дополнительные данные о клиенте.
|
|
3843
3853
|
*/
|
|
3844
3854
|
t(this, "extraData");
|
|
3845
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => we.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new X(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new
|
|
3855
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => we.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new X(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new j(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new Ce(p))) ?? [], this.channelPrimaryInterest = new lr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new ur(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3846
3856
|
}
|
|
3847
3857
|
}
|
|
3848
3858
|
class Jt {
|
|
@@ -3941,7 +3951,7 @@ class Jt {
|
|
|
3941
3951
|
*/
|
|
3942
3952
|
t(this, "lastOrder");
|
|
3943
3953
|
var e, s, i, o, c, p;
|
|
3944
|
-
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((u) => new
|
|
3954
|
+
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((u) => new Fe(u)), this.region = new ce(r == null ? void 0 : r.region), this.country = new Y(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 O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(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((u) => new Ae(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new x(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new K(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((u) => new X(u)), this.contact = new ke(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3945
3955
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3946
3956
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3947
3957
|
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
@@ -3991,7 +4001,7 @@ class Jt {
|
|
|
3991
4001
|
this.salesDirections = [];
|
|
3992
4002
|
break;
|
|
3993
4003
|
case "contragentType":
|
|
3994
|
-
this.contragentType = new
|
|
4004
|
+
this.contragentType = new F();
|
|
3995
4005
|
break;
|
|
3996
4006
|
case "preferredDeliveryType":
|
|
3997
4007
|
this.preferredDeliveryType = new K();
|
|
@@ -4000,7 +4010,7 @@ class Jt {
|
|
|
4000
4010
|
this.partnerGroups = [];
|
|
4001
4011
|
break;
|
|
4002
4012
|
case "contact":
|
|
4003
|
-
this.contact = new
|
|
4013
|
+
this.contact = new ke();
|
|
4004
4014
|
break;
|
|
4005
4015
|
}
|
|
4006
4016
|
return this;
|
|
@@ -4075,7 +4085,7 @@ class gt extends T {
|
|
|
4075
4085
|
* Список менеджеров.
|
|
4076
4086
|
*/
|
|
4077
4087
|
t(this, "managers");
|
|
4078
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
4088
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new j(o))), e.lastOrder && (this.lastOrder = new fr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new X(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new K(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new x(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new oe(o)));
|
|
4079
4089
|
}
|
|
4080
4090
|
}
|
|
4081
4091
|
class mt {
|
|
@@ -4145,7 +4155,7 @@ class Qt {
|
|
|
4145
4155
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4146
4156
|
}
|
|
4147
4157
|
}
|
|
4148
|
-
class Yt extends
|
|
4158
|
+
class Yt extends ae {
|
|
4149
4159
|
/**
|
|
4150
4160
|
* Возвращает данные об указанном клиенте.
|
|
4151
4161
|
*
|
|
@@ -4181,7 +4191,7 @@ class Yt extends De {
|
|
|
4181
4191
|
return this.getClientsList({
|
|
4182
4192
|
groupOp: "and",
|
|
4183
4193
|
groups: [],
|
|
4184
|
-
filters: [{ field: "phone", op:
|
|
4194
|
+
filters: [{ field: "phone", op: je.Contains, value: r }]
|
|
4185
4195
|
});
|
|
4186
4196
|
}
|
|
4187
4197
|
/**
|
|
@@ -4351,7 +4361,7 @@ class Yt extends De {
|
|
|
4351
4361
|
let i;
|
|
4352
4362
|
const o = e, c = e, p = e;
|
|
4353
4363
|
switch (e.opf.slug) {
|
|
4354
|
-
case
|
|
4364
|
+
case d.Ic:
|
|
4355
4365
|
i = {
|
|
4356
4366
|
opf: o.opf.slug,
|
|
4357
4367
|
name: o.name,
|
|
@@ -4369,7 +4379,7 @@ class Yt extends De {
|
|
|
4369
4379
|
actual_address: o.actualAddress
|
|
4370
4380
|
};
|
|
4371
4381
|
break;
|
|
4372
|
-
case
|
|
4382
|
+
case d.UlR:
|
|
4373
4383
|
i = {
|
|
4374
4384
|
opf: c.opf.slug,
|
|
4375
4385
|
name: c.name,
|
|
@@ -4388,7 +4398,7 @@ class Yt extends De {
|
|
|
4388
4398
|
actual_address: c.actualAddress
|
|
4389
4399
|
};
|
|
4390
4400
|
break;
|
|
4391
|
-
case
|
|
4401
|
+
case d.UlNr:
|
|
4392
4402
|
i = {
|
|
4393
4403
|
opf: p.opf.slug,
|
|
4394
4404
|
name: p.name,
|
|
@@ -4440,7 +4450,7 @@ class Yt extends De {
|
|
|
4440
4450
|
let i;
|
|
4441
4451
|
const o = e, c = e, p = e;
|
|
4442
4452
|
switch (e.opf.slug) {
|
|
4443
|
-
case
|
|
4453
|
+
case d.Ic:
|
|
4444
4454
|
i = {
|
|
4445
4455
|
opf: o.opf.slug,
|
|
4446
4456
|
name: o.name,
|
|
@@ -4458,7 +4468,7 @@ class Yt extends De {
|
|
|
4458
4468
|
actual_address: o.actualAddress
|
|
4459
4469
|
};
|
|
4460
4470
|
break;
|
|
4461
|
-
case
|
|
4471
|
+
case d.UlR:
|
|
4462
4472
|
i = {
|
|
4463
4473
|
opf: c.opf.slug,
|
|
4464
4474
|
name: c.name,
|
|
@@ -4477,7 +4487,7 @@ class Yt extends De {
|
|
|
4477
4487
|
actual_address: c.actualAddress
|
|
4478
4488
|
};
|
|
4479
4489
|
break;
|
|
4480
|
-
case
|
|
4490
|
+
case d.UlNr:
|
|
4481
4491
|
i = {
|
|
4482
4492
|
opf: p.opf.slug,
|
|
4483
4493
|
name: p.name,
|
|
@@ -4613,7 +4623,7 @@ class Yt extends De {
|
|
|
4613
4623
|
correspondent_account: s.correspondentAccount,
|
|
4614
4624
|
currency_id: s.currency.id
|
|
4615
4625
|
},
|
|
4616
|
-
(o) => new
|
|
4626
|
+
(o) => new Le(o.data),
|
|
4617
4627
|
i
|
|
4618
4628
|
);
|
|
4619
4629
|
}
|
|
@@ -4639,7 +4649,7 @@ class Yt extends De {
|
|
|
4639
4649
|
correspondent_account: s.correspondentAccount,
|
|
4640
4650
|
currency_id: s.currency.id
|
|
4641
4651
|
},
|
|
4642
|
-
(o) => new
|
|
4652
|
+
(o) => new Le(o.data),
|
|
4643
4653
|
i
|
|
4644
4654
|
);
|
|
4645
4655
|
}
|
|
@@ -4700,7 +4710,7 @@ class Yt extends De {
|
|
|
4700
4710
|
comment: e.comment,
|
|
4701
4711
|
not_disturb: e.notDisturb
|
|
4702
4712
|
},
|
|
4703
|
-
(i) => new
|
|
4713
|
+
(i) => new j(i.data),
|
|
4704
4714
|
s
|
|
4705
4715
|
);
|
|
4706
4716
|
}
|
|
@@ -4843,7 +4853,7 @@ class Yt extends De {
|
|
|
4843
4853
|
comment: e.comment,
|
|
4844
4854
|
...s
|
|
4845
4855
|
};
|
|
4846
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new
|
|
4856
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new j(u.data), i);
|
|
4847
4857
|
}
|
|
4848
4858
|
/**
|
|
4849
4859
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4882,7 +4892,7 @@ const E = class E extends h {
|
|
|
4882
4892
|
* Время кэширования данных ответов на запросы (секунд).
|
|
4883
4893
|
*/
|
|
4884
4894
|
t(this, "responseDataCacheTimeout");
|
|
4885
|
-
this.responseDataCacheTimeout =
|
|
4895
|
+
this.responseDataCacheTimeout = a.getConfig().http.responseDataCacheTimeout;
|
|
4886
4896
|
}
|
|
4887
4897
|
/**
|
|
4888
4898
|
* Возвращает кэшированные данные.
|
|
@@ -4973,7 +4983,7 @@ class Zt extends h {
|
|
|
4973
4983
|
const i = this.get(
|
|
4974
4984
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
4975
4985
|
{ params: e },
|
|
4976
|
-
(c) => new
|
|
4986
|
+
(c) => new k(c.data)
|
|
4977
4987
|
);
|
|
4978
4988
|
return i.catch((c) => {
|
|
4979
4989
|
this.errorResponseHandler(c, s);
|
|
@@ -5021,13 +5031,13 @@ class es {
|
|
|
5021
5031
|
* Возвращает диапазон дат по умолчанию.
|
|
5022
5032
|
*/
|
|
5023
5033
|
static defaultDateRanges() {
|
|
5024
|
-
const r =
|
|
5034
|
+
const r = dr(/* @__PURE__ */ new Date(), 1);
|
|
5025
5035
|
return {
|
|
5026
5036
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5027
5037
|
nextWorkingDay: { label: "Следующий рабочий день", from: Ur(r), to: qr(r) },
|
|
5028
5038
|
today: { label: "Сегодня", from: er(), to: Or() },
|
|
5029
5039
|
yesterday: { label: "Вчера", from: Nr(), to: xr() },
|
|
5030
|
-
tomorrow: { label: "Завтра", from:
|
|
5040
|
+
tomorrow: { label: "Завтра", from: kr(), to: Lr() }
|
|
5031
5041
|
};
|
|
5032
5042
|
}
|
|
5033
5043
|
}
|
|
@@ -5287,7 +5297,7 @@ class wt extends yr {
|
|
|
5287
5297
|
this.products = (e.products ?? []).map((s) => new yt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? we.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new P(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5288
5298
|
}
|
|
5289
5299
|
}
|
|
5290
|
-
class ts extends
|
|
5300
|
+
class ts extends ae {
|
|
5291
5301
|
/**
|
|
5292
5302
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5293
5303
|
*
|
|
@@ -5348,7 +5358,7 @@ class _e {
|
|
|
5348
5358
|
* Источник клиентской цены.
|
|
5349
5359
|
*/
|
|
5350
5360
|
t(this, "source");
|
|
5351
|
-
this.client = new ge(r == null ? void 0 : r.client), this.product = new
|
|
5361
|
+
this.client = new ge(r == null ? void 0 : r.client), this.product = new k(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;
|
|
5352
5362
|
}
|
|
5353
5363
|
}
|
|
5354
5364
|
const Se = (n) => {
|
|
@@ -5499,7 +5509,7 @@ class is extends h {
|
|
|
5499
5509
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5500
5510
|
*/
|
|
5501
5511
|
constructor() {
|
|
5502
|
-
super(), this.baseUrl = `${
|
|
5512
|
+
super(), this.baseUrl = `${a.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
|
|
5503
5513
|
}
|
|
5504
5514
|
/**
|
|
5505
5515
|
* Возвращает данные об истории изменения цен.
|
|
@@ -5510,7 +5520,7 @@ class is extends h {
|
|
|
5510
5520
|
*/
|
|
5511
5521
|
getProductPriceHistory(r) {
|
|
5512
5522
|
var i, o, c, p;
|
|
5513
|
-
const e =
|
|
5523
|
+
const e = a.getConfig().dateFormats.api, s = Xe(
|
|
5514
5524
|
xe(r, {
|
|
5515
5525
|
costDate: {
|
|
5516
5526
|
from: Ie((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
@@ -5545,7 +5555,7 @@ class ns extends h {
|
|
|
5545
5555
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5546
5556
|
*/
|
|
5547
5557
|
constructor() {
|
|
5548
|
-
super(), this.baseUrl = `${
|
|
5558
|
+
super(), this.baseUrl = `${a.getConfig().http.recommendationsApiUrl ?? ""}/api`;
|
|
5549
5559
|
}
|
|
5550
5560
|
/**
|
|
5551
5561
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
@@ -5592,7 +5602,7 @@ class ns extends h {
|
|
|
5592
5602
|
});
|
|
5593
5603
|
}
|
|
5594
5604
|
}
|
|
5595
|
-
class
|
|
5605
|
+
class D extends pe {
|
|
5596
5606
|
/**
|
|
5597
5607
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5598
5608
|
*
|
|
@@ -5633,7 +5643,7 @@ class a extends pe {
|
|
|
5633
5643
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5634
5644
|
*/
|
|
5635
5645
|
getOpf() {
|
|
5636
|
-
return this.getTypedDataArrayRequester(
|
|
5646
|
+
return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
|
|
5637
5647
|
}
|
|
5638
5648
|
/**
|
|
5639
5649
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
@@ -5677,7 +5687,7 @@ class a extends pe {
|
|
|
5677
5687
|
* @param term Терм поиска.
|
|
5678
5688
|
*/
|
|
5679
5689
|
searchCity(r) {
|
|
5680
|
-
return this.getTypedDataArrayRequester(
|
|
5690
|
+
return this.getTypedDataArrayRequester(Fe, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5681
5691
|
}
|
|
5682
5692
|
/**
|
|
5683
5693
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5805,67 +5815,67 @@ const A = Z("__references_private", () => {
|
|
|
5805
5815
|
}), os = Z("references", () => {
|
|
5806
5816
|
const n = R(() => {
|
|
5807
5817
|
const l = A();
|
|
5808
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5818
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(D).getChannelPrimaryInterest().then((g) => {
|
|
5809
5819
|
l.channelPrimaryInterestReference = g;
|
|
5810
5820
|
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5811
5821
|
}), r = R(() => {
|
|
5812
5822
|
const l = A();
|
|
5813
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5823
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(D).getContactPositions().then((g) => {
|
|
5814
5824
|
l.contactPositionsReference = g;
|
|
5815
5825
|
}).catch(w)), l.contactPositionsReference;
|
|
5816
5826
|
}), e = R(() => {
|
|
5817
5827
|
const l = A();
|
|
5818
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5828
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(D).getCurrency().then((g) => {
|
|
5819
5829
|
l.currencyReference = g;
|
|
5820
5830
|
}).catch(w)), l.currencyReference;
|
|
5821
5831
|
}), s = R(() => {
|
|
5822
5832
|
const l = A();
|
|
5823
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5833
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(D).getOpf().then((g) => {
|
|
5824
5834
|
l.opfReference = g;
|
|
5825
5835
|
}).catch(w)), l.opfReference;
|
|
5826
5836
|
}), i = R(() => {
|
|
5827
5837
|
const l = A();
|
|
5828
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5838
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(D).getOrderPaymentStatuses().then((g) => {
|
|
5829
5839
|
l.orderPaymentStatusReference = g;
|
|
5830
5840
|
}).catch(w)), l.orderPaymentStatusReference;
|
|
5831
5841
|
}), o = R(() => {
|
|
5832
5842
|
const l = A();
|
|
5833
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5843
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(D).getOrderStatuses().then((g) => {
|
|
5834
5844
|
l.orderStatusReference = g;
|
|
5835
5845
|
}).catch(w)), l.orderStatusReference;
|
|
5836
5846
|
}), c = R(() => {
|
|
5837
5847
|
const l = A();
|
|
5838
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5848
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(D).getPaymentTypes().then((g) => {
|
|
5839
5849
|
l.paymentTypeReference = g;
|
|
5840
5850
|
}).catch(w)), l.paymentTypeReference;
|
|
5841
5851
|
}), p = R(() => {
|
|
5842
5852
|
const l = A();
|
|
5843
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
5853
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(D).getPartnerGroup().then((g) => {
|
|
5844
5854
|
l.partnerGroupReference = g;
|
|
5845
5855
|
}).catch(w)), l.partnerGroupReference;
|
|
5846
5856
|
}), u = R(() => {
|
|
5847
5857
|
const l = A();
|
|
5848
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
5858
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(D).getProductFileType().then((g) => {
|
|
5849
5859
|
l.productFileTypeReference = g;
|
|
5850
5860
|
}).catch(w)), l.productFileTypeReference;
|
|
5851
5861
|
}), m = R(() => {
|
|
5852
5862
|
const l = A();
|
|
5853
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5863
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(D).getResourceTypes().then((g) => {
|
|
5854
5864
|
l.resourceTypesReference = g;
|
|
5855
5865
|
}).catch(w)), l.resourceTypesReference;
|
|
5856
5866
|
}), v = R(() => {
|
|
5857
5867
|
const l = A();
|
|
5858
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5868
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(D).getSalesDirections().then((g) => {
|
|
5859
5869
|
l.salesDirectionsReference = g;
|
|
5860
5870
|
}).catch(w)), l.salesDirectionsReference;
|
|
5861
5871
|
}), S = R(() => {
|
|
5862
5872
|
const l = A();
|
|
5863
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5873
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(D).getSourcePrimaryInterest().then((g) => {
|
|
5864
5874
|
l.sourcePrimaryInterestReference = g;
|
|
5865
5875
|
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5866
5876
|
}), I = R(() => {
|
|
5867
5877
|
const l = A();
|
|
5868
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5878
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(D).getDeliveryTypes().then((g) => {
|
|
5869
5879
|
l.deliveryTypeReference = g;
|
|
5870
5880
|
}).catch(w)), l.deliveryTypeReference;
|
|
5871
5881
|
}), b = R(() => {
|
|
@@ -5875,17 +5885,17 @@ const A = Z("__references_private", () => {
|
|
|
5875
5885
|
}).catch(w)), l.managersList;
|
|
5876
5886
|
}), _ = R(() => {
|
|
5877
5887
|
const l = A();
|
|
5878
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
5888
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(D).getWarehouses().then((g) => {
|
|
5879
5889
|
l.warehousesReference = g;
|
|
5880
5890
|
}).catch(w)), l.warehousesReference;
|
|
5881
5891
|
}), N = R(() => {
|
|
5882
5892
|
const l = A();
|
|
5883
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
5893
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(D).getPropertyTypes().then((g) => {
|
|
5884
5894
|
l.propertyTypesReference = g;
|
|
5885
5895
|
}).catch(w)), l.propertyTypesReference;
|
|
5886
5896
|
}), U = R(() => {
|
|
5887
5897
|
const l = A();
|
|
5888
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
5898
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(D).getPriceCoefficients().then((g) => {
|
|
5889
5899
|
l.priceCoefficientsReference = g;
|
|
5890
5900
|
}).catch(w)), l.priceCoefficientsReference;
|
|
5891
5901
|
});
|
|
@@ -6124,7 +6134,7 @@ class ps extends h {
|
|
|
6124
6134
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6125
6135
|
*/
|
|
6126
6136
|
constructor() {
|
|
6127
|
-
super(), this.baseUrl = `${
|
|
6137
|
+
super(), this.baseUrl = `${a.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6128
6138
|
}
|
|
6129
6139
|
/**
|
|
6130
6140
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6135,7 +6145,7 @@ class ps extends h {
|
|
|
6135
6145
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6136
6146
|
}
|
|
6137
6147
|
}
|
|
6138
|
-
class
|
|
6148
|
+
class at extends h {
|
|
6139
6149
|
/**
|
|
6140
6150
|
* Возвращает данные о текущем пользователе.
|
|
6141
6151
|
*/
|
|
@@ -6144,7 +6154,7 @@ class Dt extends h {
|
|
|
6144
6154
|
return this.get("/internal/users/info", {}, (r) => new At(r.data));
|
|
6145
6155
|
}
|
|
6146
6156
|
}
|
|
6147
|
-
const
|
|
6157
|
+
const Dt = Z("__user_state_private", () => {
|
|
6148
6158
|
const n = f({}), r = f(void 0);
|
|
6149
6159
|
return {
|
|
6150
6160
|
/**
|
|
@@ -6161,8 +6171,8 @@ const at = Z("__user_state_private", () => {
|
|
|
6161
6171
|
* Данные о текущем пользователе.
|
|
6162
6172
|
*/
|
|
6163
6173
|
currentUser: R(() => {
|
|
6164
|
-
const r =
|
|
6165
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6174
|
+
const r = Dt();
|
|
6175
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(at).getCurrentUser().then((e) => {
|
|
6166
6176
|
r.currentUser = e;
|
|
6167
6177
|
}).catch(w).finally(() => {
|
|
6168
6178
|
r.dataLoaderList.currentUser = !1;
|
|
@@ -6195,9 +6205,9 @@ class hs {
|
|
|
6195
6205
|
export {
|
|
6196
6206
|
st as AnyReference,
|
|
6197
6207
|
qt as AppBaseConfig,
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
|
|
6208
|
+
a as AppConfigProvider,
|
|
6209
|
+
Le as BankAccount,
|
|
6210
|
+
ae as BasePaginationProvider,
|
|
6201
6211
|
zr as CalculationTypeEnum,
|
|
6202
6212
|
me as Cart,
|
|
6203
6213
|
Br as CartItem,
|
|
@@ -6209,13 +6219,13 @@ export {
|
|
|
6209
6219
|
He as CategoryPricingRule,
|
|
6210
6220
|
lr as ChannelPrimaryInterest,
|
|
6211
6221
|
Vt as City,
|
|
6212
|
-
|
|
6222
|
+
Fe as CityWithRegionAndCountry,
|
|
6213
6223
|
Ee as Client,
|
|
6214
6224
|
gt as ClientAdditionalData,
|
|
6215
6225
|
fe as ClientCategory,
|
|
6216
6226
|
Yt as ClientDataProvider,
|
|
6217
6227
|
Gt as ClientPriceProvider,
|
|
6218
|
-
|
|
6228
|
+
Ft as ClientPriceTemplateProvider,
|
|
6219
6229
|
Q as ClientProduct,
|
|
6220
6230
|
Ht as ClientProductCategoryDataProvider,
|
|
6221
6231
|
Bt as ClientProductDataProvider,
|
|
@@ -6224,9 +6234,9 @@ export {
|
|
|
6224
6234
|
Jt as ClientsListFilters,
|
|
6225
6235
|
ne as CodedIdentity,
|
|
6226
6236
|
Zt as ConfiguratorProvider,
|
|
6227
|
-
|
|
6237
|
+
ke as Contact,
|
|
6228
6238
|
Jr as ContactLinks,
|
|
6229
|
-
|
|
6239
|
+
j as ContactPerson,
|
|
6230
6240
|
ht as ContactPersonRelated,
|
|
6231
6241
|
it as ContactPosition,
|
|
6232
6242
|
be as ContactRelation,
|
|
@@ -6247,15 +6257,15 @@ export {
|
|
|
6247
6257
|
Er as DeletableNamedIdentity,
|
|
6248
6258
|
Ce as DeliveryAddress,
|
|
6249
6259
|
K as DeliveryType,
|
|
6250
|
-
|
|
6260
|
+
kt as DetailedJwtPayload,
|
|
6251
6261
|
Yr as DeviceTypeResolutionConfig,
|
|
6252
6262
|
Vr as DiscountShortInfo,
|
|
6253
6263
|
hs as FieldValidationResultData,
|
|
6254
6264
|
le as FilterGroup,
|
|
6255
6265
|
Be as FilterItem,
|
|
6256
|
-
|
|
6266
|
+
je as FilterOpEnum,
|
|
6257
6267
|
sr as GeoCoordinates,
|
|
6258
|
-
|
|
6268
|
+
jr as HiddenCatalogableItem,
|
|
6259
6269
|
pe as HttpCachedRequester,
|
|
6260
6270
|
Xr as HttpParamsConfig,
|
|
6261
6271
|
h as HttpRequester,
|
|
@@ -6268,8 +6278,8 @@ export {
|
|
|
6268
6278
|
ft as ManagerDataProvider,
|
|
6269
6279
|
Pt as MetaTagItem,
|
|
6270
6280
|
T as NamedIdentity,
|
|
6271
|
-
|
|
6272
|
-
|
|
6281
|
+
F as Opf,
|
|
6282
|
+
d as OpfEnum,
|
|
6273
6283
|
wt as Order,
|
|
6274
6284
|
yr as OrderInfo,
|
|
6275
6285
|
nt as OrderPaymentStatus,
|
|
@@ -6294,9 +6304,9 @@ export {
|
|
|
6294
6304
|
zt as PriceTemplateProvider,
|
|
6295
6305
|
se as PricingRole,
|
|
6296
6306
|
Wt as PricingRoleProvider,
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6307
|
+
de as PrimaryCatalogableItem,
|
|
6308
|
+
k as Product,
|
|
6309
|
+
jt as ProductCategoryDataProvider,
|
|
6300
6310
|
Mt as ProductDataProvider,
|
|
6301
6311
|
lt as ProductFileType,
|
|
6302
6312
|
qe as ProductPriceCoefficient,
|
|
@@ -6309,7 +6319,7 @@ export {
|
|
|
6309
6319
|
ns as RecommendationsDataProvider,
|
|
6310
6320
|
Ke as RecommendationsList,
|
|
6311
6321
|
P as Reference,
|
|
6312
|
-
|
|
6322
|
+
D as ReferenceDataProvider,
|
|
6313
6323
|
ce as Region,
|
|
6314
6324
|
pr as ResourceType,
|
|
6315
6325
|
x as SalesDirection,
|
|
@@ -6317,7 +6327,7 @@ export {
|
|
|
6317
6327
|
Qe as Seo,
|
|
6318
6328
|
cs as SeoDataProvider,
|
|
6319
6329
|
ur as SourcePrimaryInterest,
|
|
6320
|
-
|
|
6330
|
+
Fr as StockCount,
|
|
6321
6331
|
Ot as TemplatesListFilters,
|
|
6322
6332
|
Ue as TypedInstanceFactory,
|
|
6323
6333
|
Ve as UnitsHelper,
|
|
@@ -6326,7 +6336,7 @@ export {
|
|
|
6326
6336
|
At as User,
|
|
6327
6337
|
ps as UserAuthDataProvider,
|
|
6328
6338
|
or as UserCommonInfo,
|
|
6329
|
-
|
|
6339
|
+
at as UserDataProvider,
|
|
6330
6340
|
Kr as UserPricingRole,
|
|
6331
6341
|
G as UserShortInfo,
|
|
6332
6342
|
Rt as UserTypeEnum,
|
|
@@ -6335,7 +6345,7 @@ export {
|
|
|
6335
6345
|
rt as WebSocketConfig,
|
|
6336
6346
|
ze as findCatalogItemByIdRecursive,
|
|
6337
6347
|
We as flattenCatalogItems,
|
|
6338
|
-
|
|
6348
|
+
De as useAuthStateStore,
|
|
6339
6349
|
os as useReferencesStore,
|
|
6340
6350
|
us as useUserStateStore
|
|
6341
6351
|
};
|