@snabcentr/common-lib 1.71.4 → 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 +2 -2
- package/dist/sc-common-lib.js +148 -137
- 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 +11 -1
- 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
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1112,11 +1112,22 @@ class xt extends h {
|
|
|
1112
1112
|
* Добавляет продукты в корзину из файла CSV.
|
|
1113
1113
|
*
|
|
1114
1114
|
* @param client Данные о клиенте, для которого необходимо добавить в корзину новые позиции заказываемого товара/услуги из файла CSV.
|
|
1115
|
+
* @param file Данные о файле CSV.
|
|
1115
1116
|
*
|
|
1116
1117
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1117
1118
|
*/
|
|
1118
|
-
addCartItemFromCSV(r) {
|
|
1119
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`,
|
|
1119
|
+
addCartItemFromCSV(r, e) {
|
|
1120
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new me(s.data));
|
|
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" }));
|
|
1120
1131
|
}
|
|
1121
1132
|
}
|
|
1122
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 || {});
|
|
@@ -1137,7 +1148,7 @@ class B extends he {
|
|
|
1137
1148
|
* Список продуктов категории.
|
|
1138
1149
|
*/
|
|
1139
1150
|
t(this, "products");
|
|
1140
|
-
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));
|
|
1141
1152
|
}
|
|
1142
1153
|
}
|
|
1143
1154
|
class ir extends T {
|
|
@@ -1277,7 +1288,7 @@ class z extends ir {
|
|
|
1277
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();
|
|
1278
1289
|
}
|
|
1279
1290
|
}
|
|
1280
|
-
class Q extends
|
|
1291
|
+
class Q extends k {
|
|
1281
1292
|
/**
|
|
1282
1293
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1283
1294
|
*
|
|
@@ -1522,7 +1533,7 @@ class ce extends P {
|
|
|
1522
1533
|
e && (this.country = new Y(e.country));
|
|
1523
1534
|
}
|
|
1524
1535
|
}
|
|
1525
|
-
class
|
|
1536
|
+
class Fe extends P {
|
|
1526
1537
|
/**
|
|
1527
1538
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1528
1539
|
*
|
|
@@ -1618,7 +1629,7 @@ class ge extends or {
|
|
|
1618
1629
|
* Список менеджеров клиента.
|
|
1619
1630
|
*/
|
|
1620
1631
|
t(this, "managers");
|
|
1621
|
-
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))) ?? [];
|
|
1622
1633
|
}
|
|
1623
1634
|
}
|
|
1624
1635
|
class re extends M {
|
|
@@ -1660,7 +1671,7 @@ class Te extends nr {
|
|
|
1660
1671
|
* Базовые данные о продукте.
|
|
1661
1672
|
*/
|
|
1662
1673
|
t(this, "product");
|
|
1663
|
-
this.product = new
|
|
1674
|
+
this.product = new k(e == null ? void 0 : e.product);
|
|
1664
1675
|
}
|
|
1665
1676
|
}
|
|
1666
1677
|
class cr extends P {
|
|
@@ -2085,7 +2096,7 @@ class Ut extends h {
|
|
|
2085
2096
|
*/
|
|
2086
2097
|
// eslint-disable-next-line class-methods-use-this
|
|
2087
2098
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2088
|
-
let c = `${
|
|
2099
|
+
let c = `${a.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2089
2100
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2090
2101
|
}
|
|
2091
2102
|
}
|
|
@@ -2288,7 +2299,7 @@ class Gt extends h {
|
|
|
2288
2299
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2289
2300
|
}
|
|
2290
2301
|
}
|
|
2291
|
-
class
|
|
2302
|
+
class Ft extends h {
|
|
2292
2303
|
/**
|
|
2293
2304
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2294
2305
|
*
|
|
@@ -2323,7 +2334,7 @@ class jt extends h {
|
|
|
2323
2334
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2324
2335
|
*/
|
|
2325
2336
|
attachTemplate(r, e, s) {
|
|
2326
|
-
const i =
|
|
2337
|
+
const i = a.getConfig().dateFormats.api;
|
|
2327
2338
|
return this.post(
|
|
2328
2339
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2329
2340
|
s && {
|
|
@@ -2357,7 +2368,7 @@ class jt extends h {
|
|
|
2357
2368
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2358
2369
|
*/
|
|
2359
2370
|
changeTemplate(r, e, s, i) {
|
|
2360
|
-
const o =
|
|
2371
|
+
const o = a.getConfig().dateFormats.api;
|
|
2361
2372
|
return this.patch(
|
|
2362
2373
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2363
2374
|
i && {
|
|
@@ -2380,7 +2391,7 @@ class jt extends h {
|
|
|
2380
2391
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2381
2392
|
}
|
|
2382
2393
|
}
|
|
2383
|
-
class
|
|
2394
|
+
class jt extends h {
|
|
2384
2395
|
/**
|
|
2385
2396
|
* Возвращает список данных о корневых категориях.
|
|
2386
2397
|
*
|
|
@@ -2440,7 +2451,7 @@ class Ft extends h {
|
|
|
2440
2451
|
showHidden: s,
|
|
2441
2452
|
withPriceCoefficients: e
|
|
2442
2453
|
},
|
|
2443
|
-
(i) => ue(i.data, (o) => new
|
|
2454
|
+
(i) => ue(i.data, (o) => new k(o))
|
|
2444
2455
|
);
|
|
2445
2456
|
}
|
|
2446
2457
|
/**
|
|
@@ -2482,7 +2493,7 @@ class Mt extends h {
|
|
|
2482
2493
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2483
2494
|
*/
|
|
2484
2495
|
getProductData(r, e = !1) {
|
|
2485
|
-
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));
|
|
2486
2497
|
}
|
|
2487
2498
|
/**
|
|
2488
2499
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2490,7 +2501,7 @@ class Mt extends h {
|
|
|
2490
2501
|
* @param productId Идентификатор продукта.
|
|
2491
2502
|
*/
|
|
2492
2503
|
getPublicProductData(r) {
|
|
2493
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2504
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new k(e.data));
|
|
2494
2505
|
}
|
|
2495
2506
|
/**
|
|
2496
2507
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2515,7 +2526,7 @@ class Mt extends h {
|
|
|
2515
2526
|
publicSimpleSearch(r, e = 10) {
|
|
2516
2527
|
return new Promise((s, i) => {
|
|
2517
2528
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2518
|
-
s(o.products.map((c) => new
|
|
2529
|
+
s(o.products.map((c) => new k(c)));
|
|
2519
2530
|
}).catch((o) => {
|
|
2520
2531
|
i(o);
|
|
2521
2532
|
});
|
|
@@ -2605,7 +2616,7 @@ class Bt extends h {
|
|
|
2605
2616
|
);
|
|
2606
2617
|
}
|
|
2607
2618
|
}
|
|
2608
|
-
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 || {});
|
|
2609
2620
|
class Be {
|
|
2610
2621
|
/**
|
|
2611
2622
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2625,7 +2636,7 @@ class Be {
|
|
|
2625
2636
|
* Значение с которым сравнивается поле.
|
|
2626
2637
|
*/
|
|
2627
2638
|
t(this, "value");
|
|
2628
|
-
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) ?? "";
|
|
2629
2640
|
}
|
|
2630
2641
|
/**
|
|
2631
2642
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2637,7 +2648,7 @@ class Be {
|
|
|
2637
2648
|
field: this.field,
|
|
2638
2649
|
op: this.op
|
|
2639
2650
|
};
|
|
2640
|
-
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;
|
|
2641
2652
|
}
|
|
2642
2653
|
}
|
|
2643
2654
|
class le {
|
|
@@ -2675,7 +2686,7 @@ class le {
|
|
|
2675
2686
|
};
|
|
2676
2687
|
}
|
|
2677
2688
|
}
|
|
2678
|
-
class
|
|
2689
|
+
class ae extends h {
|
|
2679
2690
|
/**
|
|
2680
2691
|
* Получает пагинированный список данных.
|
|
2681
2692
|
*
|
|
@@ -2695,7 +2706,7 @@ class De extends h {
|
|
|
2695
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);
|
|
2696
2707
|
}
|
|
2697
2708
|
}
|
|
2698
|
-
class zt extends
|
|
2709
|
+
class zt extends ae {
|
|
2699
2710
|
/**
|
|
2700
2711
|
* Возвращает список шаблонов прайс-листа.
|
|
2701
2712
|
*
|
|
@@ -2979,7 +2990,7 @@ class Wt extends h {
|
|
|
2979
2990
|
);
|
|
2980
2991
|
}
|
|
2981
2992
|
}
|
|
2982
|
-
class Et extends
|
|
2993
|
+
class Et extends ae {
|
|
2983
2994
|
/**
|
|
2984
2995
|
* Возвращает пагинированный список свойств.
|
|
2985
2996
|
*
|
|
@@ -3381,7 +3392,7 @@ function We(n) {
|
|
|
3381
3392
|
}
|
|
3382
3393
|
}), r;
|
|
3383
3394
|
}
|
|
3384
|
-
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 || {});
|
|
3385
3396
|
class st extends P {
|
|
3386
3397
|
}
|
|
3387
3398
|
class lr extends P {
|
|
@@ -3409,15 +3420,15 @@ class ye extends T {
|
|
|
3409
3420
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3410
3421
|
}
|
|
3411
3422
|
}
|
|
3412
|
-
class
|
|
3423
|
+
class F extends P {
|
|
3413
3424
|
/**
|
|
3414
3425
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3415
3426
|
*/
|
|
3416
3427
|
static generatePersonItem() {
|
|
3417
|
-
return new
|
|
3428
|
+
return new F({
|
|
3418
3429
|
id: 1,
|
|
3419
3430
|
guid: "",
|
|
3420
|
-
slug:
|
|
3431
|
+
slug: d.Person,
|
|
3421
3432
|
name: ""
|
|
3422
3433
|
});
|
|
3423
3434
|
}
|
|
@@ -3436,7 +3447,7 @@ class pr extends P {
|
|
|
3436
3447
|
}
|
|
3437
3448
|
class ur extends P {
|
|
3438
3449
|
}
|
|
3439
|
-
class
|
|
3450
|
+
class Le extends M {
|
|
3440
3451
|
/**
|
|
3441
3452
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3442
3453
|
*
|
|
@@ -3467,7 +3478,7 @@ class ke extends M {
|
|
|
3467
3478
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ye(e.currency));
|
|
3468
3479
|
}
|
|
3469
3480
|
}
|
|
3470
|
-
class
|
|
3481
|
+
class ke extends T {
|
|
3471
3482
|
/**
|
|
3472
3483
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3473
3484
|
*
|
|
@@ -3486,7 +3497,7 @@ class de extends T {
|
|
|
3486
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;
|
|
3487
3498
|
}
|
|
3488
3499
|
}
|
|
3489
|
-
class
|
|
3500
|
+
class j extends ke {
|
|
3490
3501
|
/**
|
|
3491
3502
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3492
3503
|
*
|
|
@@ -3537,7 +3548,7 @@ class hr extends T {
|
|
|
3537
3548
|
/**
|
|
3538
3549
|
* Данные об организационно-правовой форме.
|
|
3539
3550
|
*/
|
|
3540
|
-
t(this, "opf",
|
|
3551
|
+
t(this, "opf", F.generatePersonItem());
|
|
3541
3552
|
/**
|
|
3542
3553
|
* Направление продаж.
|
|
3543
3554
|
*/
|
|
@@ -3579,16 +3590,16 @@ class hr extends T {
|
|
|
3579
3590
|
*/
|
|
3580
3591
|
t(this, "updater");
|
|
3581
3592
|
if (e) {
|
|
3582
|
-
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) {
|
|
3583
3594
|
const s = [];
|
|
3584
3595
|
e.contacts.forEach((i) => {
|
|
3585
|
-
s.push(new
|
|
3596
|
+
s.push(new j(i));
|
|
3586
3597
|
}), this.contacts = s;
|
|
3587
3598
|
}
|
|
3588
3599
|
if (e.bankAccounts) {
|
|
3589
3600
|
const s = [];
|
|
3590
3601
|
e.bankAccounts.forEach((i) => {
|
|
3591
|
-
s.push(new
|
|
3602
|
+
s.push(new Le(i));
|
|
3592
3603
|
}), this.bankAccounts = s;
|
|
3593
3604
|
}
|
|
3594
3605
|
}
|
|
@@ -3693,11 +3704,11 @@ class we {
|
|
|
3693
3704
|
*/
|
|
3694
3705
|
static createInstance(r) {
|
|
3695
3706
|
switch (r.opf.slug) {
|
|
3696
|
-
case
|
|
3707
|
+
case d.Ic:
|
|
3697
3708
|
return new gr(r);
|
|
3698
|
-
case
|
|
3709
|
+
case d.UlR:
|
|
3699
3710
|
return new mr(r);
|
|
3700
|
-
case
|
|
3711
|
+
case d.UlNr:
|
|
3701
3712
|
return new ut(r);
|
|
3702
3713
|
default:
|
|
3703
3714
|
return new pt(r);
|
|
@@ -3719,7 +3730,7 @@ class be extends M {
|
|
|
3719
3730
|
this.isPrimary = e.isPrimary;
|
|
3720
3731
|
}
|
|
3721
3732
|
}
|
|
3722
|
-
class ht extends
|
|
3733
|
+
class ht extends j {
|
|
3723
3734
|
/**
|
|
3724
3735
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3725
3736
|
*
|
|
@@ -3784,7 +3795,7 @@ class Ce extends Er {
|
|
|
3784
3795
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3785
3796
|
*/
|
|
3786
3797
|
t(this, "isTransportCompanyAddress");
|
|
3787
|
-
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;
|
|
3788
3799
|
}
|
|
3789
3800
|
}
|
|
3790
3801
|
class Ee extends ge {
|
|
@@ -3841,7 +3852,7 @@ class Ee extends ge {
|
|
|
3841
3852
|
* Дополнительные данные о клиенте.
|
|
3842
3853
|
*/
|
|
3843
3854
|
t(this, "extraData");
|
|
3844
|
-
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) ?? {};
|
|
3845
3856
|
}
|
|
3846
3857
|
}
|
|
3847
3858
|
class Jt {
|
|
@@ -3940,7 +3951,7 @@ class Jt {
|
|
|
3940
3951
|
*/
|
|
3941
3952
|
t(this, "lastOrder");
|
|
3942
3953
|
var e, s, i, o, c, p;
|
|
3943
|
-
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 = {
|
|
3944
3955
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3945
3956
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3946
3957
|
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
@@ -3990,7 +4001,7 @@ class Jt {
|
|
|
3990
4001
|
this.salesDirections = [];
|
|
3991
4002
|
break;
|
|
3992
4003
|
case "contragentType":
|
|
3993
|
-
this.contragentType = new
|
|
4004
|
+
this.contragentType = new F();
|
|
3994
4005
|
break;
|
|
3995
4006
|
case "preferredDeliveryType":
|
|
3996
4007
|
this.preferredDeliveryType = new K();
|
|
@@ -3999,7 +4010,7 @@ class Jt {
|
|
|
3999
4010
|
this.partnerGroups = [];
|
|
4000
4011
|
break;
|
|
4001
4012
|
case "contact":
|
|
4002
|
-
this.contact = new
|
|
4013
|
+
this.contact = new ke();
|
|
4003
4014
|
break;
|
|
4004
4015
|
}
|
|
4005
4016
|
return this;
|
|
@@ -4074,7 +4085,7 @@ class gt extends T {
|
|
|
4074
4085
|
* Список менеджеров.
|
|
4075
4086
|
*/
|
|
4076
4087
|
t(this, "managers");
|
|
4077
|
-
(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)));
|
|
4078
4089
|
}
|
|
4079
4090
|
}
|
|
4080
4091
|
class mt {
|
|
@@ -4144,7 +4155,7 @@ class Qt {
|
|
|
4144
4155
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4145
4156
|
}
|
|
4146
4157
|
}
|
|
4147
|
-
class Yt extends
|
|
4158
|
+
class Yt extends ae {
|
|
4148
4159
|
/**
|
|
4149
4160
|
* Возвращает данные об указанном клиенте.
|
|
4150
4161
|
*
|
|
@@ -4180,7 +4191,7 @@ class Yt extends De {
|
|
|
4180
4191
|
return this.getClientsList({
|
|
4181
4192
|
groupOp: "and",
|
|
4182
4193
|
groups: [],
|
|
4183
|
-
filters: [{ field: "phone", op:
|
|
4194
|
+
filters: [{ field: "phone", op: je.Contains, value: r }]
|
|
4184
4195
|
});
|
|
4185
4196
|
}
|
|
4186
4197
|
/**
|
|
@@ -4350,7 +4361,7 @@ class Yt extends De {
|
|
|
4350
4361
|
let i;
|
|
4351
4362
|
const o = e, c = e, p = e;
|
|
4352
4363
|
switch (e.opf.slug) {
|
|
4353
|
-
case
|
|
4364
|
+
case d.Ic:
|
|
4354
4365
|
i = {
|
|
4355
4366
|
opf: o.opf.slug,
|
|
4356
4367
|
name: o.name,
|
|
@@ -4368,7 +4379,7 @@ class Yt extends De {
|
|
|
4368
4379
|
actual_address: o.actualAddress
|
|
4369
4380
|
};
|
|
4370
4381
|
break;
|
|
4371
|
-
case
|
|
4382
|
+
case d.UlR:
|
|
4372
4383
|
i = {
|
|
4373
4384
|
opf: c.opf.slug,
|
|
4374
4385
|
name: c.name,
|
|
@@ -4387,7 +4398,7 @@ class Yt extends De {
|
|
|
4387
4398
|
actual_address: c.actualAddress
|
|
4388
4399
|
};
|
|
4389
4400
|
break;
|
|
4390
|
-
case
|
|
4401
|
+
case d.UlNr:
|
|
4391
4402
|
i = {
|
|
4392
4403
|
opf: p.opf.slug,
|
|
4393
4404
|
name: p.name,
|
|
@@ -4439,7 +4450,7 @@ class Yt extends De {
|
|
|
4439
4450
|
let i;
|
|
4440
4451
|
const o = e, c = e, p = e;
|
|
4441
4452
|
switch (e.opf.slug) {
|
|
4442
|
-
case
|
|
4453
|
+
case d.Ic:
|
|
4443
4454
|
i = {
|
|
4444
4455
|
opf: o.opf.slug,
|
|
4445
4456
|
name: o.name,
|
|
@@ -4457,7 +4468,7 @@ class Yt extends De {
|
|
|
4457
4468
|
actual_address: o.actualAddress
|
|
4458
4469
|
};
|
|
4459
4470
|
break;
|
|
4460
|
-
case
|
|
4471
|
+
case d.UlR:
|
|
4461
4472
|
i = {
|
|
4462
4473
|
opf: c.opf.slug,
|
|
4463
4474
|
name: c.name,
|
|
@@ -4476,7 +4487,7 @@ class Yt extends De {
|
|
|
4476
4487
|
actual_address: c.actualAddress
|
|
4477
4488
|
};
|
|
4478
4489
|
break;
|
|
4479
|
-
case
|
|
4490
|
+
case d.UlNr:
|
|
4480
4491
|
i = {
|
|
4481
4492
|
opf: p.opf.slug,
|
|
4482
4493
|
name: p.name,
|
|
@@ -4612,7 +4623,7 @@ class Yt extends De {
|
|
|
4612
4623
|
correspondent_account: s.correspondentAccount,
|
|
4613
4624
|
currency_id: s.currency.id
|
|
4614
4625
|
},
|
|
4615
|
-
(o) => new
|
|
4626
|
+
(o) => new Le(o.data),
|
|
4616
4627
|
i
|
|
4617
4628
|
);
|
|
4618
4629
|
}
|
|
@@ -4638,7 +4649,7 @@ class Yt extends De {
|
|
|
4638
4649
|
correspondent_account: s.correspondentAccount,
|
|
4639
4650
|
currency_id: s.currency.id
|
|
4640
4651
|
},
|
|
4641
|
-
(o) => new
|
|
4652
|
+
(o) => new Le(o.data),
|
|
4642
4653
|
i
|
|
4643
4654
|
);
|
|
4644
4655
|
}
|
|
@@ -4699,7 +4710,7 @@ class Yt extends De {
|
|
|
4699
4710
|
comment: e.comment,
|
|
4700
4711
|
not_disturb: e.notDisturb
|
|
4701
4712
|
},
|
|
4702
|
-
(i) => new
|
|
4713
|
+
(i) => new j(i.data),
|
|
4703
4714
|
s
|
|
4704
4715
|
);
|
|
4705
4716
|
}
|
|
@@ -4842,7 +4853,7 @@ class Yt extends De {
|
|
|
4842
4853
|
comment: e.comment,
|
|
4843
4854
|
...s
|
|
4844
4855
|
};
|
|
4845
|
-
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);
|
|
4846
4857
|
}
|
|
4847
4858
|
/**
|
|
4848
4859
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4881,7 +4892,7 @@ const E = class E extends h {
|
|
|
4881
4892
|
* Время кэширования данных ответов на запросы (секунд).
|
|
4882
4893
|
*/
|
|
4883
4894
|
t(this, "responseDataCacheTimeout");
|
|
4884
|
-
this.responseDataCacheTimeout =
|
|
4895
|
+
this.responseDataCacheTimeout = a.getConfig().http.responseDataCacheTimeout;
|
|
4885
4896
|
}
|
|
4886
4897
|
/**
|
|
4887
4898
|
* Возвращает кэшированные данные.
|
|
@@ -4972,7 +4983,7 @@ class Zt extends h {
|
|
|
4972
4983
|
const i = this.get(
|
|
4973
4984
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
4974
4985
|
{ params: e },
|
|
4975
|
-
(c) => new
|
|
4986
|
+
(c) => new k(c.data)
|
|
4976
4987
|
);
|
|
4977
4988
|
return i.catch((c) => {
|
|
4978
4989
|
this.errorResponseHandler(c, s);
|
|
@@ -5020,13 +5031,13 @@ class es {
|
|
|
5020
5031
|
* Возвращает диапазон дат по умолчанию.
|
|
5021
5032
|
*/
|
|
5022
5033
|
static defaultDateRanges() {
|
|
5023
|
-
const r =
|
|
5034
|
+
const r = dr(/* @__PURE__ */ new Date(), 1);
|
|
5024
5035
|
return {
|
|
5025
5036
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5026
5037
|
nextWorkingDay: { label: "Следующий рабочий день", from: Ur(r), to: qr(r) },
|
|
5027
5038
|
today: { label: "Сегодня", from: er(), to: Or() },
|
|
5028
5039
|
yesterday: { label: "Вчера", from: Nr(), to: xr() },
|
|
5029
|
-
tomorrow: { label: "Завтра", from:
|
|
5040
|
+
tomorrow: { label: "Завтра", from: kr(), to: Lr() }
|
|
5030
5041
|
};
|
|
5031
5042
|
}
|
|
5032
5043
|
}
|
|
@@ -5286,7 +5297,7 @@ class wt extends yr {
|
|
|
5286
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;
|
|
5287
5298
|
}
|
|
5288
5299
|
}
|
|
5289
|
-
class ts extends
|
|
5300
|
+
class ts extends ae {
|
|
5290
5301
|
/**
|
|
5291
5302
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5292
5303
|
*
|
|
@@ -5347,7 +5358,7 @@ class _e {
|
|
|
5347
5358
|
* Источник клиентской цены.
|
|
5348
5359
|
*/
|
|
5349
5360
|
t(this, "source");
|
|
5350
|
-
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;
|
|
5351
5362
|
}
|
|
5352
5363
|
}
|
|
5353
5364
|
const Se = (n) => {
|
|
@@ -5498,7 +5509,7 @@ class is extends h {
|
|
|
5498
5509
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5499
5510
|
*/
|
|
5500
5511
|
constructor() {
|
|
5501
|
-
super(), this.baseUrl = `${
|
|
5512
|
+
super(), this.baseUrl = `${a.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
|
|
5502
5513
|
}
|
|
5503
5514
|
/**
|
|
5504
5515
|
* Возвращает данные об истории изменения цен.
|
|
@@ -5509,7 +5520,7 @@ class is extends h {
|
|
|
5509
5520
|
*/
|
|
5510
5521
|
getProductPriceHistory(r) {
|
|
5511
5522
|
var i, o, c, p;
|
|
5512
|
-
const e =
|
|
5523
|
+
const e = a.getConfig().dateFormats.api, s = Xe(
|
|
5513
5524
|
xe(r, {
|
|
5514
5525
|
costDate: {
|
|
5515
5526
|
from: Ie((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
@@ -5544,7 +5555,7 @@ class ns extends h {
|
|
|
5544
5555
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5545
5556
|
*/
|
|
5546
5557
|
constructor() {
|
|
5547
|
-
super(), this.baseUrl = `${
|
|
5558
|
+
super(), this.baseUrl = `${a.getConfig().http.recommendationsApiUrl ?? ""}/api`;
|
|
5548
5559
|
}
|
|
5549
5560
|
/**
|
|
5550
5561
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
@@ -5591,7 +5602,7 @@ class ns extends h {
|
|
|
5591
5602
|
});
|
|
5592
5603
|
}
|
|
5593
5604
|
}
|
|
5594
|
-
class
|
|
5605
|
+
class D extends pe {
|
|
5595
5606
|
/**
|
|
5596
5607
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5597
5608
|
*
|
|
@@ -5632,7 +5643,7 @@ class a extends pe {
|
|
|
5632
5643
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5633
5644
|
*/
|
|
5634
5645
|
getOpf() {
|
|
5635
|
-
return this.getTypedDataArrayRequester(
|
|
5646
|
+
return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
|
|
5636
5647
|
}
|
|
5637
5648
|
/**
|
|
5638
5649
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
@@ -5676,7 +5687,7 @@ class a extends pe {
|
|
|
5676
5687
|
* @param term Терм поиска.
|
|
5677
5688
|
*/
|
|
5678
5689
|
searchCity(r) {
|
|
5679
|
-
return this.getTypedDataArrayRequester(
|
|
5690
|
+
return this.getTypedDataArrayRequester(Fe, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5680
5691
|
}
|
|
5681
5692
|
/**
|
|
5682
5693
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5804,67 +5815,67 @@ const A = Z("__references_private", () => {
|
|
|
5804
5815
|
}), os = Z("references", () => {
|
|
5805
5816
|
const n = R(() => {
|
|
5806
5817
|
const l = A();
|
|
5807
|
-
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) => {
|
|
5808
5819
|
l.channelPrimaryInterestReference = g;
|
|
5809
5820
|
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5810
5821
|
}), r = R(() => {
|
|
5811
5822
|
const l = A();
|
|
5812
|
-
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) => {
|
|
5813
5824
|
l.contactPositionsReference = g;
|
|
5814
5825
|
}).catch(w)), l.contactPositionsReference;
|
|
5815
5826
|
}), e = R(() => {
|
|
5816
5827
|
const l = A();
|
|
5817
|
-
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) => {
|
|
5818
5829
|
l.currencyReference = g;
|
|
5819
5830
|
}).catch(w)), l.currencyReference;
|
|
5820
5831
|
}), s = R(() => {
|
|
5821
5832
|
const l = A();
|
|
5822
|
-
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) => {
|
|
5823
5834
|
l.opfReference = g;
|
|
5824
5835
|
}).catch(w)), l.opfReference;
|
|
5825
5836
|
}), i = R(() => {
|
|
5826
5837
|
const l = A();
|
|
5827
|
-
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) => {
|
|
5828
5839
|
l.orderPaymentStatusReference = g;
|
|
5829
5840
|
}).catch(w)), l.orderPaymentStatusReference;
|
|
5830
5841
|
}), o = R(() => {
|
|
5831
5842
|
const l = A();
|
|
5832
|
-
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) => {
|
|
5833
5844
|
l.orderStatusReference = g;
|
|
5834
5845
|
}).catch(w)), l.orderStatusReference;
|
|
5835
5846
|
}), c = R(() => {
|
|
5836
5847
|
const l = A();
|
|
5837
|
-
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) => {
|
|
5838
5849
|
l.paymentTypeReference = g;
|
|
5839
5850
|
}).catch(w)), l.paymentTypeReference;
|
|
5840
5851
|
}), p = R(() => {
|
|
5841
5852
|
const l = A();
|
|
5842
|
-
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) => {
|
|
5843
5854
|
l.partnerGroupReference = g;
|
|
5844
5855
|
}).catch(w)), l.partnerGroupReference;
|
|
5845
5856
|
}), u = R(() => {
|
|
5846
5857
|
const l = A();
|
|
5847
|
-
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) => {
|
|
5848
5859
|
l.productFileTypeReference = g;
|
|
5849
5860
|
}).catch(w)), l.productFileTypeReference;
|
|
5850
5861
|
}), m = R(() => {
|
|
5851
5862
|
const l = A();
|
|
5852
|
-
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) => {
|
|
5853
5864
|
l.resourceTypesReference = g;
|
|
5854
5865
|
}).catch(w)), l.resourceTypesReference;
|
|
5855
5866
|
}), v = R(() => {
|
|
5856
5867
|
const l = A();
|
|
5857
|
-
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) => {
|
|
5858
5869
|
l.salesDirectionsReference = g;
|
|
5859
5870
|
}).catch(w)), l.salesDirectionsReference;
|
|
5860
5871
|
}), S = R(() => {
|
|
5861
5872
|
const l = A();
|
|
5862
|
-
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) => {
|
|
5863
5874
|
l.sourcePrimaryInterestReference = g;
|
|
5864
5875
|
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
5865
5876
|
}), I = R(() => {
|
|
5866
5877
|
const l = A();
|
|
5867
|
-
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) => {
|
|
5868
5879
|
l.deliveryTypeReference = g;
|
|
5869
5880
|
}).catch(w)), l.deliveryTypeReference;
|
|
5870
5881
|
}), b = R(() => {
|
|
@@ -5874,17 +5885,17 @@ const A = Z("__references_private", () => {
|
|
|
5874
5885
|
}).catch(w)), l.managersList;
|
|
5875
5886
|
}), _ = R(() => {
|
|
5876
5887
|
const l = A();
|
|
5877
|
-
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) => {
|
|
5878
5889
|
l.warehousesReference = g;
|
|
5879
5890
|
}).catch(w)), l.warehousesReference;
|
|
5880
5891
|
}), N = R(() => {
|
|
5881
5892
|
const l = A();
|
|
5882
|
-
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) => {
|
|
5883
5894
|
l.propertyTypesReference = g;
|
|
5884
5895
|
}).catch(w)), l.propertyTypesReference;
|
|
5885
5896
|
}), U = R(() => {
|
|
5886
5897
|
const l = A();
|
|
5887
|
-
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) => {
|
|
5888
5899
|
l.priceCoefficientsReference = g;
|
|
5889
5900
|
}).catch(w)), l.priceCoefficientsReference;
|
|
5890
5901
|
});
|
|
@@ -6123,7 +6134,7 @@ class ps extends h {
|
|
|
6123
6134
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6124
6135
|
*/
|
|
6125
6136
|
constructor() {
|
|
6126
|
-
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);
|
|
6127
6138
|
}
|
|
6128
6139
|
/**
|
|
6129
6140
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6134,7 +6145,7 @@ class ps extends h {
|
|
|
6134
6145
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6135
6146
|
}
|
|
6136
6147
|
}
|
|
6137
|
-
class
|
|
6148
|
+
class at extends h {
|
|
6138
6149
|
/**
|
|
6139
6150
|
* Возвращает данные о текущем пользователе.
|
|
6140
6151
|
*/
|
|
@@ -6143,7 +6154,7 @@ class Dt extends h {
|
|
|
6143
6154
|
return this.get("/internal/users/info", {}, (r) => new At(r.data));
|
|
6144
6155
|
}
|
|
6145
6156
|
}
|
|
6146
|
-
const
|
|
6157
|
+
const Dt = Z("__user_state_private", () => {
|
|
6147
6158
|
const n = f({}), r = f(void 0);
|
|
6148
6159
|
return {
|
|
6149
6160
|
/**
|
|
@@ -6160,8 +6171,8 @@ const at = Z("__user_state_private", () => {
|
|
|
6160
6171
|
* Данные о текущем пользователе.
|
|
6161
6172
|
*/
|
|
6162
6173
|
currentUser: R(() => {
|
|
6163
|
-
const r =
|
|
6164
|
-
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) => {
|
|
6165
6176
|
r.currentUser = e;
|
|
6166
6177
|
}).catch(w).finally(() => {
|
|
6167
6178
|
r.dataLoaderList.currentUser = !1;
|
|
@@ -6194,9 +6205,9 @@ class hs {
|
|
|
6194
6205
|
export {
|
|
6195
6206
|
st as AnyReference,
|
|
6196
6207
|
qt as AppBaseConfig,
|
|
6197
|
-
|
|
6198
|
-
|
|
6199
|
-
|
|
6208
|
+
a as AppConfigProvider,
|
|
6209
|
+
Le as BankAccount,
|
|
6210
|
+
ae as BasePaginationProvider,
|
|
6200
6211
|
zr as CalculationTypeEnum,
|
|
6201
6212
|
me as Cart,
|
|
6202
6213
|
Br as CartItem,
|
|
@@ -6208,13 +6219,13 @@ export {
|
|
|
6208
6219
|
He as CategoryPricingRule,
|
|
6209
6220
|
lr as ChannelPrimaryInterest,
|
|
6210
6221
|
Vt as City,
|
|
6211
|
-
|
|
6222
|
+
Fe as CityWithRegionAndCountry,
|
|
6212
6223
|
Ee as Client,
|
|
6213
6224
|
gt as ClientAdditionalData,
|
|
6214
6225
|
fe as ClientCategory,
|
|
6215
6226
|
Yt as ClientDataProvider,
|
|
6216
6227
|
Gt as ClientPriceProvider,
|
|
6217
|
-
|
|
6228
|
+
Ft as ClientPriceTemplateProvider,
|
|
6218
6229
|
Q as ClientProduct,
|
|
6219
6230
|
Ht as ClientProductCategoryDataProvider,
|
|
6220
6231
|
Bt as ClientProductDataProvider,
|
|
@@ -6223,9 +6234,9 @@ export {
|
|
|
6223
6234
|
Jt as ClientsListFilters,
|
|
6224
6235
|
ne as CodedIdentity,
|
|
6225
6236
|
Zt as ConfiguratorProvider,
|
|
6226
|
-
|
|
6237
|
+
ke as Contact,
|
|
6227
6238
|
Jr as ContactLinks,
|
|
6228
|
-
|
|
6239
|
+
j as ContactPerson,
|
|
6229
6240
|
ht as ContactPersonRelated,
|
|
6230
6241
|
it as ContactPosition,
|
|
6231
6242
|
be as ContactRelation,
|
|
@@ -6246,15 +6257,15 @@ export {
|
|
|
6246
6257
|
Er as DeletableNamedIdentity,
|
|
6247
6258
|
Ce as DeliveryAddress,
|
|
6248
6259
|
K as DeliveryType,
|
|
6249
|
-
|
|
6260
|
+
kt as DetailedJwtPayload,
|
|
6250
6261
|
Yr as DeviceTypeResolutionConfig,
|
|
6251
6262
|
Vr as DiscountShortInfo,
|
|
6252
6263
|
hs as FieldValidationResultData,
|
|
6253
6264
|
le as FilterGroup,
|
|
6254
6265
|
Be as FilterItem,
|
|
6255
|
-
|
|
6266
|
+
je as FilterOpEnum,
|
|
6256
6267
|
sr as GeoCoordinates,
|
|
6257
|
-
|
|
6268
|
+
jr as HiddenCatalogableItem,
|
|
6258
6269
|
pe as HttpCachedRequester,
|
|
6259
6270
|
Xr as HttpParamsConfig,
|
|
6260
6271
|
h as HttpRequester,
|
|
@@ -6267,8 +6278,8 @@ export {
|
|
|
6267
6278
|
ft as ManagerDataProvider,
|
|
6268
6279
|
Pt as MetaTagItem,
|
|
6269
6280
|
T as NamedIdentity,
|
|
6270
|
-
|
|
6271
|
-
|
|
6281
|
+
F as Opf,
|
|
6282
|
+
d as OpfEnum,
|
|
6272
6283
|
wt as Order,
|
|
6273
6284
|
yr as OrderInfo,
|
|
6274
6285
|
nt as OrderPaymentStatus,
|
|
@@ -6293,9 +6304,9 @@ export {
|
|
|
6293
6304
|
zt as PriceTemplateProvider,
|
|
6294
6305
|
se as PricingRole,
|
|
6295
6306
|
Wt as PricingRoleProvider,
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6307
|
+
de as PrimaryCatalogableItem,
|
|
6308
|
+
k as Product,
|
|
6309
|
+
jt as ProductCategoryDataProvider,
|
|
6299
6310
|
Mt as ProductDataProvider,
|
|
6300
6311
|
lt as ProductFileType,
|
|
6301
6312
|
qe as ProductPriceCoefficient,
|
|
@@ -6308,7 +6319,7 @@ export {
|
|
|
6308
6319
|
ns as RecommendationsDataProvider,
|
|
6309
6320
|
Ke as RecommendationsList,
|
|
6310
6321
|
P as Reference,
|
|
6311
|
-
|
|
6322
|
+
D as ReferenceDataProvider,
|
|
6312
6323
|
ce as Region,
|
|
6313
6324
|
pr as ResourceType,
|
|
6314
6325
|
x as SalesDirection,
|
|
@@ -6316,7 +6327,7 @@ export {
|
|
|
6316
6327
|
Qe as Seo,
|
|
6317
6328
|
cs as SeoDataProvider,
|
|
6318
6329
|
ur as SourcePrimaryInterest,
|
|
6319
|
-
|
|
6330
|
+
Fr as StockCount,
|
|
6320
6331
|
Ot as TemplatesListFilters,
|
|
6321
6332
|
Ue as TypedInstanceFactory,
|
|
6322
6333
|
Ve as UnitsHelper,
|
|
@@ -6325,7 +6336,7 @@ export {
|
|
|
6325
6336
|
At as User,
|
|
6326
6337
|
ps as UserAuthDataProvider,
|
|
6327
6338
|
or as UserCommonInfo,
|
|
6328
|
-
|
|
6339
|
+
at as UserDataProvider,
|
|
6329
6340
|
Kr as UserPricingRole,
|
|
6330
6341
|
G as UserShortInfo,
|
|
6331
6342
|
Rt as UserTypeEnum,
|
|
@@ -6334,7 +6345,7 @@ export {
|
|
|
6334
6345
|
rt as WebSocketConfig,
|
|
6335
6346
|
ze as findCatalogItemByIdRecursive,
|
|
6336
6347
|
We as flattenCatalogItems,
|
|
6337
|
-
|
|
6348
|
+
De as useAuthStateStore,
|
|
6338
6349
|
os as useReferencesStore,
|
|
6339
6350
|
us as useUserStateStore
|
|
6340
6351
|
};
|