@snabcentr/common-lib 1.70.1 → 1.71.0
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 +4 -2
- package/dist/sc-common-lib.js +263 -219
- 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/auth/states/auth-state-store.d.ts.map +1 -1
- package/dist/src/config/classes/app-base-config.d.ts +13 -8
- package/dist/src/config/classes/app-base-config.d.ts.map +1 -1
- package/dist/src/config/classes/index.d.ts +1 -0
- package/dist/src/config/classes/index.d.ts.map +1 -1
- package/dist/src/config/classes/websocket-config.d.ts +38 -0
- package/dist/src/config/classes/websocket-config.d.ts.map +1 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts +5 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-websocket-config.d.ts +34 -0
- package/dist/src/config/interfaces/i-websocket-config.d.ts.map +1 -0
- package/dist/src/config/interfaces/index.d.ts +1 -0
- package/dist/src/config/interfaces/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -5,9 +5,9 @@ import { jwtDecode as Qe } from "jwt-decode";
|
|
|
5
5
|
import { merge as xe, isUndefined as Cr, isNil as $, noop as w, mapValues as vr, isArray as J, every as Pr, split as Rr, toUpper as Ar, constant as Dr, isString as y, cloneDeep as ar, toLower as $r, isFunction as Ne, map as ue, forEach as Tr, isDate as Ie, isEmpty as ve, omitBy as Ye, isObject as Xe } 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
|
-
import { ref as f, computed as R } from "vue";
|
|
9
|
-
import { parseISO as C, format as q, isAfter as
|
|
10
|
-
import
|
|
8
|
+
import { ref as f, markRaw as br, computed as R } from "vue";
|
|
9
|
+
import { parseISO as C, format as q, isAfter as _r, startOfToday as Ze, addSeconds as Sr, addBusinessDays as Ir, endOfTomorrow as dr, startOfTomorrow as kr, endOfYesterday as Lr, startOfYesterday as xr, endOfToday as Nr, endOfDay as Or, startOfDay as qr } from "date-fns";
|
|
10
|
+
import Ur from "axios";
|
|
11
11
|
class ie {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -111,7 +111,7 @@ class ie {
|
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class dt extends ie {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -193,7 +193,7 @@ t(W, "config");
|
|
|
193
193
|
let D = W;
|
|
194
194
|
const ee = Z("__auth_state_private", () => {
|
|
195
195
|
var i;
|
|
196
|
-
const n = f(Promise.resolve((i = D.getConfig().devMode) == null ? void 0 : i.initAuthBearerToken)), r = f(void 0), e = f(void 0), s =
|
|
196
|
+
const n = f(Promise.resolve((i = D.getConfig().devMode) == null ? void 0 : i.initAuthBearerToken)), r = f(void 0), e = f(void 0), s = br(/* @__PURE__ */ new Map());
|
|
197
197
|
return {
|
|
198
198
|
/**
|
|
199
199
|
* {@link Promise<string>} для получения jwt-ключа доступа к системам.
|
|
@@ -236,8 +236,8 @@ const ee = Z("__auth_state_private", () => {
|
|
|
236
236
|
o.userPermissions = m.exp * 1e3 > Date.now() ? vr(m.resourceAccess, (v) => (v == null ? void 0 : v.roles) ?? []) : void 0;
|
|
237
237
|
}).catch(w);
|
|
238
238
|
const c = J(i) ? i.join(" && ") : i;
|
|
239
|
-
if (
|
|
240
|
-
return o.userPermissionsComputedRefs
|
|
239
|
+
if (o.userPermissionsComputedRefs.has(c))
|
|
240
|
+
return o.userPermissionsComputedRefs.get(c);
|
|
241
241
|
const p = R(() => {
|
|
242
242
|
const u = (m) => {
|
|
243
243
|
var _;
|
|
@@ -249,7 +249,7 @@ const ee = Z("__auth_state_private", () => {
|
|
|
249
249
|
};
|
|
250
250
|
return J(i) ? Pr(i, (m) => u(m)) : u(i);
|
|
251
251
|
});
|
|
252
|
-
return o.userPermissionsComputedRefs
|
|
252
|
+
return o.userPermissionsComputedRefs.set(c, p), p;
|
|
253
253
|
}
|
|
254
254
|
return {
|
|
255
255
|
/**
|
|
@@ -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 tr(e == null ? void 0 : e.coordinates);
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
class
|
|
503
|
+
class Gr {
|
|
504
504
|
/**
|
|
505
505
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
506
506
|
*
|
|
@@ -518,7 +518,7 @@ class Ur {
|
|
|
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 er {
|
|
522
522
|
/**
|
|
523
523
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
524
524
|
*
|
|
@@ -533,7 +533,7 @@ class Gr extends er {
|
|
|
533
533
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
534
534
|
}
|
|
535
535
|
}
|
|
536
|
-
class
|
|
536
|
+
class Fr {
|
|
537
537
|
/**
|
|
538
538
|
* Инициализирует экземпляр класса {@link Image}.
|
|
539
539
|
*
|
|
@@ -556,7 +556,7 @@ class jr {
|
|
|
556
556
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
class
|
|
559
|
+
class L extends jr {
|
|
560
560
|
/**
|
|
561
561
|
* Инициализирует экземпляр класса {@link Product}.
|
|
562
562
|
*
|
|
@@ -641,9 +641,9 @@ class k extends Gr {
|
|
|
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 Gr(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 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
|
|
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 Fr(u, D.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
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -666,7 +666,7 @@ class k extends Gr {
|
|
|
666
666
|
return this.retailCostRub ?? this.costRub;
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
class
|
|
669
|
+
class Mr extends M {
|
|
670
670
|
/**
|
|
671
671
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
672
672
|
*
|
|
@@ -718,10 +718,10 @@ class Fr extends M {
|
|
|
718
718
|
* Признак того, что позиция является дополнительной продажей.
|
|
719
719
|
*/
|
|
720
720
|
t(this, "isAdditionalSale");
|
|
721
|
-
this.product = new
|
|
721
|
+
this.product = new L(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 && ar(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
722
722
|
}
|
|
723
723
|
}
|
|
724
|
-
class
|
|
724
|
+
class Hr extends Mr {
|
|
725
725
|
/**
|
|
726
726
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
727
727
|
*
|
|
@@ -790,7 +790,7 @@ class me {
|
|
|
790
790
|
* Список итоговых сумм по направлениям продаж.
|
|
791
791
|
*/
|
|
792
792
|
t(this, "directionsSum");
|
|
793
|
-
this.items = r.items.map((e) => new
|
|
793
|
+
this.items = r.items.map((e) => new Hr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
796
|
class Ue {
|
|
@@ -812,7 +812,7 @@ class Ue {
|
|
|
812
812
|
return new r(e);
|
|
813
813
|
}
|
|
814
814
|
}
|
|
815
|
-
const
|
|
815
|
+
const k = class k {
|
|
816
816
|
/**
|
|
817
817
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
818
818
|
*/
|
|
@@ -878,7 +878,7 @@ const L = class L {
|
|
|
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
880
|
const r = D.getConfig().version;
|
|
881
|
-
this.errorResponseHandler =
|
|
881
|
+
this.errorResponseHandler = k.defaultErrorsResponseHandler, this.httpClient = Ur.create({
|
|
882
882
|
headers: {
|
|
883
883
|
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, D.getConfig().dateFormats.uiDate)})`,
|
|
884
884
|
Accept: "application/json",
|
|
@@ -889,7 +889,7 @@ const L = class L {
|
|
|
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) => k.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 L = class L {
|
|
|
901
901
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
902
902
|
*/
|
|
903
903
|
static setDefaultErrorsResponseHandler(r) {
|
|
904
|
-
|
|
904
|
+
k.defaultErrorsResponseHandler = r;
|
|
905
905
|
}
|
|
906
906
|
/**
|
|
907
907
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -909,7 +909,7 @@ const L = class L {
|
|
|
909
909
|
* @param type Тип данных, которыми оперирует метод.
|
|
910
910
|
*/
|
|
911
911
|
static getInstance(r) {
|
|
912
|
-
return Object.prototype.hasOwnProperty.call(
|
|
912
|
+
return Object.prototype.hasOwnProperty.call(k.instances, r.name) || (k.instances[r.name] = Ue.simpleInstanceInitializer(r)), k.instances[r.name];
|
|
913
913
|
}
|
|
914
914
|
/**
|
|
915
915
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1007,16 +1007,16 @@ const L = class L {
|
|
|
1007
1007
|
* Экземпляр объекта текущего класса.
|
|
1008
1008
|
*/
|
|
1009
1009
|
// eslint-disable-next-line no-use-before-define
|
|
1010
|
-
t(
|
|
1010
|
+
t(k, "instances", {}), /**
|
|
1011
1011
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1012
1012
|
*
|
|
1013
1013
|
* @param error Данные об ошибке.
|
|
1014
1014
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1015
1015
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1016
1016
|
*/
|
|
1017
|
-
t(
|
|
1018
|
-
let h =
|
|
1019
|
-
class
|
|
1017
|
+
t(k, "defaultErrorsResponseHandler", w);
|
|
1018
|
+
let h = k;
|
|
1019
|
+
class kt extends h {
|
|
1020
1020
|
/**
|
|
1021
1021
|
* Возвращает содержимое корзины указанного клиента.
|
|
1022
1022
|
*
|
|
@@ -1119,7 +1119,7 @@ class It extends h {
|
|
|
1119
1119
|
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new me(e.data));
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
var
|
|
1122
|
+
var Br = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Br || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), zr = /* @__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))(zr || {});
|
|
1123
1123
|
class B extends he {
|
|
1124
1124
|
/**
|
|
1125
1125
|
* Инициализирует экземпляр класса {@link Category}.
|
|
@@ -1137,7 +1137,7 @@ class B extends he {
|
|
|
1137
1137
|
* Список продуктов категории.
|
|
1138
1138
|
*/
|
|
1139
1139
|
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
|
|
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 L(o));
|
|
1141
1141
|
}
|
|
1142
1142
|
}
|
|
1143
1143
|
class sr extends T {
|
|
@@ -1155,7 +1155,7 @@ class sr extends T {
|
|
|
1155
1155
|
this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
class
|
|
1158
|
+
class Wr extends sr {
|
|
1159
1159
|
/**
|
|
1160
1160
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1161
1161
|
*
|
|
@@ -1170,7 +1170,7 @@ class zr extends sr {
|
|
|
1170
1170
|
this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1171
1171
|
}
|
|
1172
1172
|
}
|
|
1173
|
-
class
|
|
1173
|
+
class Lt {
|
|
1174
1174
|
/**
|
|
1175
1175
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1176
1176
|
*
|
|
@@ -1181,7 +1181,7 @@ class dt {
|
|
|
1181
1181
|
if (e)
|
|
1182
1182
|
try {
|
|
1183
1183
|
const s = JSON.parse(e);
|
|
1184
|
-
if (
|
|
1184
|
+
if (_r(C(s.availableFor) || Ze(), /* @__PURE__ */ new Date()))
|
|
1185
1185
|
return s.data ?? {};
|
|
1186
1186
|
} catch {
|
|
1187
1187
|
localStorage.removeItem(r);
|
|
@@ -1219,7 +1219,7 @@ class G extends T {
|
|
|
1219
1219
|
this.type = e == null ? void 0 : e.type;
|
|
1220
1220
|
}
|
|
1221
1221
|
}
|
|
1222
|
-
class
|
|
1222
|
+
class Vr extends T {
|
|
1223
1223
|
/**
|
|
1224
1224
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1225
1225
|
*
|
|
@@ -1277,7 +1277,7 @@ class z extends sr {
|
|
|
1277
1277
|
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
1278
|
}
|
|
1279
1279
|
}
|
|
1280
|
-
class Q extends
|
|
1280
|
+
class Q extends L {
|
|
1281
1281
|
/**
|
|
1282
1282
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1283
1283
|
*
|
|
@@ -1313,10 +1313,10 @@ class Q extends k {
|
|
|
1313
1313
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1314
1314
|
*/
|
|
1315
1315
|
t(this, "isFavorite");
|
|
1316
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new
|
|
1316
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new Vr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new z(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
class
|
|
1319
|
+
class Er {
|
|
1320
1320
|
/**
|
|
1321
1321
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1322
1322
|
*
|
|
@@ -1360,7 +1360,7 @@ class oe extends T {
|
|
|
1360
1360
|
* Признак того, что менеджер является основным для клиента.
|
|
1361
1361
|
*/
|
|
1362
1362
|
t(this, "isDefault");
|
|
1363
|
-
e && (this.salesDirection = new x(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1363
|
+
e && (this.salesDirection = new x(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Er(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1364
1364
|
}
|
|
1365
1365
|
}
|
|
1366
1366
|
class Ae extends oe {
|
|
@@ -1394,7 +1394,7 @@ class Ae extends oe {
|
|
|
1394
1394
|
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId;
|
|
1395
1395
|
}
|
|
1396
1396
|
}
|
|
1397
|
-
class
|
|
1397
|
+
class Jr extends he {
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1400
1400
|
*
|
|
@@ -1425,7 +1425,7 @@ class Er extends he {
|
|
|
1425
1425
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Ae(e.manager) : void 0;
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
|
-
class fe extends
|
|
1428
|
+
class fe extends Jr {
|
|
1429
1429
|
/**
|
|
1430
1430
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1431
1431
|
*
|
|
@@ -1633,7 +1633,7 @@ class Te extends ir {
|
|
|
1633
1633
|
* Базовые данные о продукте.
|
|
1634
1634
|
*/
|
|
1635
1635
|
t(this, "product");
|
|
1636
|
-
this.product = new
|
|
1636
|
+
this.product = new L(e == null ? void 0 : e.product);
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
class or extends P {
|
|
@@ -1698,7 +1698,7 @@ class O {
|
|
|
1698
1698
|
this.from = y(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = y(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1699
1699
|
}
|
|
1700
1700
|
}
|
|
1701
|
-
class
|
|
1701
|
+
class xt {
|
|
1702
1702
|
/**
|
|
1703
1703
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1704
1704
|
*
|
|
@@ -1819,7 +1819,7 @@ class He {
|
|
|
1819
1819
|
this.role = new se(r == null ? void 0 : r.role), this.category = new he(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
1820
1820
|
}
|
|
1821
1821
|
}
|
|
1822
|
-
class
|
|
1822
|
+
class Kr {
|
|
1823
1823
|
/**
|
|
1824
1824
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
1825
1825
|
*
|
|
@@ -1841,7 +1841,7 @@ class Jr {
|
|
|
1841
1841
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
1844
|
-
class
|
|
1844
|
+
class Qr {
|
|
1845
1845
|
/**
|
|
1846
1846
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
1847
1847
|
*
|
|
@@ -1871,7 +1871,7 @@ class Kr {
|
|
|
1871
1871
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.priceHistoryApiUrl = (r == null ? void 0 : r.priceHistoryApiUrl) ?? "", this.recommendationsApiUrl = (r == null ? void 0 : r.recommendationsApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
1872
1872
|
}
|
|
1873
1873
|
}
|
|
1874
|
-
class
|
|
1874
|
+
class Yr {
|
|
1875
1875
|
/**
|
|
1876
1876
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
1877
1877
|
*
|
|
@@ -1916,7 +1916,7 @@ class Qr {
|
|
|
1916
1916
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
class
|
|
1919
|
+
class Xr {
|
|
1920
1920
|
/**
|
|
1921
1921
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
1922
1922
|
*
|
|
@@ -1938,7 +1938,46 @@ class Yr {
|
|
|
1938
1938
|
this.date = y(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
1939
1939
|
}
|
|
1940
1940
|
}
|
|
1941
|
-
class
|
|
1941
|
+
class Zr {
|
|
1942
|
+
/**
|
|
1943
|
+
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
1944
|
+
*
|
|
1945
|
+
* @param data Данные для первоначальной инициализации.
|
|
1946
|
+
*/
|
|
1947
|
+
constructor(r) {
|
|
1948
|
+
/**
|
|
1949
|
+
* @inheritDoc
|
|
1950
|
+
*/
|
|
1951
|
+
// eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents
|
|
1952
|
+
t(this, "broadcaster");
|
|
1953
|
+
/**
|
|
1954
|
+
* @inheritDoc
|
|
1955
|
+
*/
|
|
1956
|
+
t(this, "key");
|
|
1957
|
+
/**
|
|
1958
|
+
* @inheritDoc
|
|
1959
|
+
*/
|
|
1960
|
+
t(this, "wsHost");
|
|
1961
|
+
/**
|
|
1962
|
+
* @inheritDoc
|
|
1963
|
+
*/
|
|
1964
|
+
t(this, "wsPort");
|
|
1965
|
+
/**
|
|
1966
|
+
* @inheritDoc
|
|
1967
|
+
*/
|
|
1968
|
+
t(this, "wssPort");
|
|
1969
|
+
/**
|
|
1970
|
+
* @inheritDoc
|
|
1971
|
+
*/
|
|
1972
|
+
t(this, "forceTLS");
|
|
1973
|
+
/**
|
|
1974
|
+
* @inheritDoc
|
|
1975
|
+
*/
|
|
1976
|
+
t(this, "enabledTransports");
|
|
1977
|
+
this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
|
|
1978
|
+
}
|
|
1979
|
+
}
|
|
1980
|
+
class Nt {
|
|
1942
1981
|
/**
|
|
1943
1982
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
1944
1983
|
*
|
|
@@ -1946,49 +1985,53 @@ class kt {
|
|
|
1946
1985
|
*/
|
|
1947
1986
|
constructor(r) {
|
|
1948
1987
|
/**
|
|
1949
|
-
*
|
|
1988
|
+
* @inheritDoc
|
|
1950
1989
|
*/
|
|
1951
1990
|
t(this, "environment");
|
|
1952
1991
|
/**
|
|
1953
|
-
*
|
|
1992
|
+
* @inheritDoc
|
|
1954
1993
|
*/
|
|
1955
1994
|
t(this, "devMode");
|
|
1956
1995
|
/**
|
|
1957
|
-
*
|
|
1996
|
+
* @inheritDoc
|
|
1958
1997
|
*/
|
|
1959
1998
|
t(this, "http");
|
|
1960
1999
|
/**
|
|
1961
|
-
*
|
|
2000
|
+
* @inheritDoc
|
|
1962
2001
|
*/
|
|
1963
2002
|
t(this, "deviceTypeByResolution");
|
|
1964
2003
|
/**
|
|
1965
|
-
*
|
|
2004
|
+
* @inheritDoc
|
|
1966
2005
|
*/
|
|
1967
2006
|
t(this, "sentry");
|
|
1968
2007
|
/**
|
|
1969
|
-
*
|
|
2008
|
+
* @inheritDoc
|
|
1970
2009
|
*/
|
|
1971
2010
|
t(this, "urls");
|
|
1972
2011
|
/**
|
|
1973
|
-
*
|
|
2012
|
+
* @inheritDoc
|
|
1974
2013
|
*/
|
|
1975
2014
|
t(this, "version");
|
|
1976
2015
|
/**
|
|
1977
|
-
*
|
|
2016
|
+
* Конфигурация web-сокета.
|
|
2017
|
+
*/
|
|
2018
|
+
t(this, "websocket");
|
|
2019
|
+
/**
|
|
2020
|
+
* @inheritDoc
|
|
1978
2021
|
*/
|
|
1979
2022
|
t(this, "dateFormats");
|
|
1980
2023
|
var e, s, i;
|
|
1981
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2024
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Qr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Kr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Yr({
|
|
1982
2025
|
environment: this.environment,
|
|
1983
2026
|
...r == null ? void 0 : r.sentry
|
|
1984
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2027
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new Xr(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new Zr(r.websocket) : void 0, this.dateFormats = {
|
|
1985
2028
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
1986
2029
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
1987
2030
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
1988
2031
|
};
|
|
1989
2032
|
}
|
|
1990
2033
|
}
|
|
1991
|
-
class
|
|
2034
|
+
class Ot extends h {
|
|
1992
2035
|
/**
|
|
1993
2036
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
1994
2037
|
*
|
|
@@ -2019,7 +2062,7 @@ class xt extends h {
|
|
|
2019
2062
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2020
2063
|
}
|
|
2021
2064
|
}
|
|
2022
|
-
class
|
|
2065
|
+
class qt extends h {
|
|
2023
2066
|
/**
|
|
2024
2067
|
* Импортирует цены клиента из CSV файла.
|
|
2025
2068
|
*
|
|
@@ -2218,7 +2261,7 @@ class Nt extends h {
|
|
|
2218
2261
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2219
2262
|
}
|
|
2220
2263
|
}
|
|
2221
|
-
class
|
|
2264
|
+
class Ut extends h {
|
|
2222
2265
|
/**
|
|
2223
2266
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2224
2267
|
*
|
|
@@ -2310,7 +2353,7 @@ class Ot extends h {
|
|
|
2310
2353
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2311
2354
|
}
|
|
2312
2355
|
}
|
|
2313
|
-
class
|
|
2356
|
+
class Gt extends h {
|
|
2314
2357
|
/**
|
|
2315
2358
|
* Возвращает список данных о корневых категориях.
|
|
2316
2359
|
*
|
|
@@ -2370,7 +2413,7 @@ class qt extends h {
|
|
|
2370
2413
|
showHidden: s,
|
|
2371
2414
|
withPriceCoefficients: e
|
|
2372
2415
|
},
|
|
2373
|
-
(i) => ue(i.data, (o) => new
|
|
2416
|
+
(i) => ue(i.data, (o) => new L(o))
|
|
2374
2417
|
);
|
|
2375
2418
|
}
|
|
2376
2419
|
/**
|
|
@@ -2402,7 +2445,7 @@ class qt extends h {
|
|
|
2402
2445
|
});
|
|
2403
2446
|
}
|
|
2404
2447
|
}
|
|
2405
|
-
class
|
|
2448
|
+
class jt extends h {
|
|
2406
2449
|
/**
|
|
2407
2450
|
* Возвращает данные об указанном продукте.
|
|
2408
2451
|
*
|
|
@@ -2412,7 +2455,7 @@ class Ut extends h {
|
|
|
2412
2455
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2413
2456
|
*/
|
|
2414
2457
|
getProductData(r, e = !1) {
|
|
2415
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2458
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new L(s.data));
|
|
2416
2459
|
}
|
|
2417
2460
|
/**
|
|
2418
2461
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2420,7 +2463,7 @@ class Ut extends h {
|
|
|
2420
2463
|
* @param productId Идентификатор продукта.
|
|
2421
2464
|
*/
|
|
2422
2465
|
getPublicProductData(r) {
|
|
2423
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2466
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new L(e.data));
|
|
2424
2467
|
}
|
|
2425
2468
|
/**
|
|
2426
2469
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2445,14 +2488,14 @@ class Ut extends h {
|
|
|
2445
2488
|
publicSimpleSearch(r, e = 10) {
|
|
2446
2489
|
return new Promise((s, i) => {
|
|
2447
2490
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2448
|
-
s(o.products.map((c) => new
|
|
2491
|
+
s(o.products.map((c) => new L(c)));
|
|
2449
2492
|
}).catch((o) => {
|
|
2450
2493
|
i(o);
|
|
2451
2494
|
});
|
|
2452
2495
|
});
|
|
2453
2496
|
}
|
|
2454
2497
|
}
|
|
2455
|
-
class
|
|
2498
|
+
class Ft extends h {
|
|
2456
2499
|
/**
|
|
2457
2500
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2458
2501
|
*
|
|
@@ -2514,7 +2557,7 @@ class Gt extends h {
|
|
|
2514
2557
|
);
|
|
2515
2558
|
}
|
|
2516
2559
|
}
|
|
2517
|
-
class
|
|
2560
|
+
class Mt extends h {
|
|
2518
2561
|
/**
|
|
2519
2562
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2520
2563
|
*
|
|
@@ -2625,7 +2668,7 @@ class De extends h {
|
|
|
2625
2668
|
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);
|
|
2626
2669
|
}
|
|
2627
2670
|
}
|
|
2628
|
-
class
|
|
2671
|
+
class Ht extends De {
|
|
2629
2672
|
/**
|
|
2630
2673
|
* Возвращает список шаблонов прайс-листа.
|
|
2631
2674
|
*
|
|
@@ -2829,7 +2872,7 @@ class Ft extends De {
|
|
|
2829
2872
|
);
|
|
2830
2873
|
}
|
|
2831
2874
|
}
|
|
2832
|
-
class
|
|
2875
|
+
class Bt extends h {
|
|
2833
2876
|
/**
|
|
2834
2877
|
* Возвращает список ролей ценообразования.
|
|
2835
2878
|
*
|
|
@@ -2909,7 +2952,7 @@ class Mt extends h {
|
|
|
2909
2952
|
);
|
|
2910
2953
|
}
|
|
2911
2954
|
}
|
|
2912
|
-
class
|
|
2955
|
+
class zt extends De {
|
|
2913
2956
|
/**
|
|
2914
2957
|
* Возвращает пагинированный список свойств.
|
|
2915
2958
|
*
|
|
@@ -3302,14 +3345,14 @@ function ze(n, r, e) {
|
|
|
3302
3345
|
return !1;
|
|
3303
3346
|
}), s;
|
|
3304
3347
|
}
|
|
3305
|
-
var
|
|
3306
|
-
class
|
|
3348
|
+
var et = /* @__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))(et || {}), d = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(d || {});
|
|
3349
|
+
class rt extends P {
|
|
3307
3350
|
}
|
|
3308
3351
|
class cr extends P {
|
|
3309
3352
|
}
|
|
3310
|
-
class
|
|
3353
|
+
class Wt extends P {
|
|
3311
3354
|
}
|
|
3312
|
-
class
|
|
3355
|
+
class tt extends P {
|
|
3313
3356
|
}
|
|
3314
3357
|
class ye extends T {
|
|
3315
3358
|
/**
|
|
@@ -3343,21 +3386,21 @@ class j extends P {
|
|
|
3343
3386
|
});
|
|
3344
3387
|
}
|
|
3345
3388
|
}
|
|
3346
|
-
class
|
|
3389
|
+
class st extends P {
|
|
3347
3390
|
}
|
|
3348
|
-
class
|
|
3391
|
+
class it extends P {
|
|
3349
3392
|
}
|
|
3350
3393
|
class X extends P {
|
|
3351
3394
|
}
|
|
3352
|
-
class
|
|
3395
|
+
class nt extends P {
|
|
3353
3396
|
}
|
|
3354
|
-
class
|
|
3397
|
+
class ot extends P {
|
|
3355
3398
|
}
|
|
3356
3399
|
class lr extends P {
|
|
3357
3400
|
}
|
|
3358
3401
|
class pr extends P {
|
|
3359
3402
|
}
|
|
3360
|
-
class
|
|
3403
|
+
class ke extends M {
|
|
3361
3404
|
/**
|
|
3362
3405
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3363
3406
|
*
|
|
@@ -3388,7 +3431,7 @@ class Le extends M {
|
|
|
3388
3431
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ye(e.currency));
|
|
3389
3432
|
}
|
|
3390
3433
|
}
|
|
3391
|
-
class
|
|
3434
|
+
class Le extends T {
|
|
3392
3435
|
/**
|
|
3393
3436
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3394
3437
|
*
|
|
@@ -3407,7 +3450,7 @@ class ke extends T {
|
|
|
3407
3450
|
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;
|
|
3408
3451
|
}
|
|
3409
3452
|
}
|
|
3410
|
-
class F extends
|
|
3453
|
+
class F extends Le {
|
|
3411
3454
|
/**
|
|
3412
3455
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3413
3456
|
*
|
|
@@ -3509,13 +3552,13 @@ class ur extends T {
|
|
|
3509
3552
|
if (e.bankAccounts) {
|
|
3510
3553
|
const s = [];
|
|
3511
3554
|
e.bankAccounts.forEach((i) => {
|
|
3512
|
-
s.push(new
|
|
3555
|
+
s.push(new ke(i));
|
|
3513
3556
|
}), this.bankAccounts = s;
|
|
3514
3557
|
}
|
|
3515
3558
|
}
|
|
3516
3559
|
}
|
|
3517
3560
|
}
|
|
3518
|
-
class
|
|
3561
|
+
class ct extends ur {
|
|
3519
3562
|
/**
|
|
3520
3563
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3521
3564
|
*
|
|
@@ -3583,7 +3626,7 @@ class gr extends hr {
|
|
|
3583
3626
|
e && (this.kpp = e.kpp ?? "");
|
|
3584
3627
|
}
|
|
3585
3628
|
}
|
|
3586
|
-
class
|
|
3629
|
+
class lt extends gr {
|
|
3587
3630
|
/**
|
|
3588
3631
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3589
3632
|
*
|
|
@@ -3619,9 +3662,9 @@ class we {
|
|
|
3619
3662
|
case d.UlR:
|
|
3620
3663
|
return new gr(r);
|
|
3621
3664
|
case d.UlNr:
|
|
3622
|
-
return new
|
|
3665
|
+
return new lt(r);
|
|
3623
3666
|
default:
|
|
3624
|
-
return new
|
|
3667
|
+
return new ct(r);
|
|
3625
3668
|
}
|
|
3626
3669
|
}
|
|
3627
3670
|
}
|
|
@@ -3640,7 +3683,7 @@ class be extends M {
|
|
|
3640
3683
|
this.isPrimary = e.isPrimary;
|
|
3641
3684
|
}
|
|
3642
3685
|
}
|
|
3643
|
-
class
|
|
3686
|
+
class pt extends F {
|
|
3644
3687
|
/**
|
|
3645
3688
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3646
3689
|
*
|
|
@@ -3668,7 +3711,7 @@ class ct extends F {
|
|
|
3668
3711
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new be(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new be(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new be(s))));
|
|
3669
3712
|
}
|
|
3670
3713
|
}
|
|
3671
|
-
class Ce extends
|
|
3714
|
+
class Ce extends Wr {
|
|
3672
3715
|
/**
|
|
3673
3716
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3674
3717
|
*
|
|
@@ -3765,7 +3808,7 @@ class We extends ge {
|
|
|
3765
3808
|
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 F(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new Ce(p))) ?? [], this.channelPrimaryInterest = new cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new pr(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) ?? {};
|
|
3766
3809
|
}
|
|
3767
3810
|
}
|
|
3768
|
-
class
|
|
3811
|
+
class Vt {
|
|
3769
3812
|
/**
|
|
3770
3813
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3771
3814
|
*
|
|
@@ -3861,7 +3904,7 @@ class zt {
|
|
|
3861
3904
|
*/
|
|
3862
3905
|
t(this, "lastOrder");
|
|
3863
3906
|
var e, s, i, o, c, p;
|
|
3864
|
-
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 je(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 j(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
|
|
3907
|
+
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 je(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 j(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 Le(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3865
3908
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
3866
3909
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
3867
3910
|
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
@@ -3920,7 +3963,7 @@ class zt {
|
|
|
3920
3963
|
this.partnerGroups = [];
|
|
3921
3964
|
break;
|
|
3922
3965
|
case "contact":
|
|
3923
|
-
this.contact = new
|
|
3966
|
+
this.contact = new Le();
|
|
3924
3967
|
break;
|
|
3925
3968
|
}
|
|
3926
3969
|
return this;
|
|
@@ -3962,7 +4005,7 @@ class mr extends M {
|
|
|
3962
4005
|
this.createdAt = y(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
3963
4006
|
}
|
|
3964
4007
|
}
|
|
3965
|
-
class
|
|
4008
|
+
class ut extends T {
|
|
3966
4009
|
/**
|
|
3967
4010
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
3968
4011
|
*
|
|
@@ -3998,7 +4041,7 @@ class lt extends T {
|
|
|
3998
4041
|
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new mr(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)));
|
|
3999
4042
|
}
|
|
4000
4043
|
}
|
|
4001
|
-
class
|
|
4044
|
+
class ht {
|
|
4002
4045
|
/**
|
|
4003
4046
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4004
4047
|
*
|
|
@@ -4016,7 +4059,7 @@ class pt {
|
|
|
4016
4059
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4017
4060
|
}
|
|
4018
4061
|
}
|
|
4019
|
-
class
|
|
4062
|
+
class Et extends ht {
|
|
4020
4063
|
/**
|
|
4021
4064
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4022
4065
|
*
|
|
@@ -4047,7 +4090,7 @@ class Wt extends pt {
|
|
|
4047
4090
|
this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
|
|
4048
4091
|
}
|
|
4049
4092
|
}
|
|
4050
|
-
class
|
|
4093
|
+
class Jt {
|
|
4051
4094
|
/**
|
|
4052
4095
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4053
4096
|
*
|
|
@@ -4065,7 +4108,7 @@ class Vt {
|
|
|
4065
4108
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4066
4109
|
}
|
|
4067
4110
|
}
|
|
4068
|
-
class
|
|
4111
|
+
class Kt extends De {
|
|
4069
4112
|
/**
|
|
4070
4113
|
* Возвращает данные об указанном клиенте.
|
|
4071
4114
|
*
|
|
@@ -4115,7 +4158,7 @@ class Et extends De {
|
|
|
4115
4158
|
const s = r.map((i) => i.id);
|
|
4116
4159
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4117
4160
|
let o = [];
|
|
4118
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4161
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ut(c))), o;
|
|
4119
4162
|
});
|
|
4120
4163
|
}
|
|
4121
4164
|
/**
|
|
@@ -4127,7 +4170,7 @@ class Et extends De {
|
|
|
4127
4170
|
getAllClientContacts(r) {
|
|
4128
4171
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4129
4172
|
let s = [];
|
|
4130
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4173
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new pt(i))), s;
|
|
4131
4174
|
});
|
|
4132
4175
|
}
|
|
4133
4176
|
/**
|
|
@@ -4533,7 +4576,7 @@ class Et extends De {
|
|
|
4533
4576
|
correspondent_account: s.correspondentAccount,
|
|
4534
4577
|
currency_id: s.currency.id
|
|
4535
4578
|
},
|
|
4536
|
-
(o) => new
|
|
4579
|
+
(o) => new ke(o.data),
|
|
4537
4580
|
i
|
|
4538
4581
|
);
|
|
4539
4582
|
}
|
|
@@ -4559,7 +4602,7 @@ class Et extends De {
|
|
|
4559
4602
|
correspondent_account: s.correspondentAccount,
|
|
4560
4603
|
currency_id: s.currency.id
|
|
4561
4604
|
},
|
|
4562
|
-
(o) => new
|
|
4605
|
+
(o) => new ke(o.data),
|
|
4563
4606
|
i
|
|
4564
4607
|
);
|
|
4565
4608
|
}
|
|
@@ -4824,7 +4867,7 @@ const V = class V extends h {
|
|
|
4824
4867
|
*/
|
|
4825
4868
|
cacheResponse(e, s) {
|
|
4826
4869
|
V.responseDataCache.set(e, {
|
|
4827
|
-
validTo:
|
|
4870
|
+
validTo: Sr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
4828
4871
|
val: s
|
|
4829
4872
|
});
|
|
4830
4873
|
}
|
|
@@ -4851,7 +4894,7 @@ const V = class V extends h {
|
|
|
4851
4894
|
*/
|
|
4852
4895
|
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
4853
4896
|
let pe = V;
|
|
4854
|
-
class
|
|
4897
|
+
class Qt extends h {
|
|
4855
4898
|
/**
|
|
4856
4899
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4857
4900
|
*
|
|
@@ -4865,7 +4908,7 @@ class Jt extends h {
|
|
|
4865
4908
|
});
|
|
4866
4909
|
}
|
|
4867
4910
|
}
|
|
4868
|
-
class
|
|
4911
|
+
class Yt extends h {
|
|
4869
4912
|
/**
|
|
4870
4913
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4871
4914
|
*
|
|
@@ -4893,7 +4936,7 @@ class Kt extends h {
|
|
|
4893
4936
|
const i = this.get(
|
|
4894
4937
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
4895
4938
|
{ params: e },
|
|
4896
|
-
(c) => new
|
|
4939
|
+
(c) => new L(c.data)
|
|
4897
4940
|
);
|
|
4898
4941
|
return i.catch((c) => {
|
|
4899
4942
|
this.errorResponseHandler(c, s);
|
|
@@ -4936,18 +4979,18 @@ class Kt extends h {
|
|
|
4936
4979
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
4937
4980
|
}
|
|
4938
4981
|
}
|
|
4939
|
-
class
|
|
4982
|
+
class Xt {
|
|
4940
4983
|
/**
|
|
4941
4984
|
* Возвращает диапазон дат по умолчанию.
|
|
4942
4985
|
*/
|
|
4943
4986
|
static defaultDateRanges() {
|
|
4944
|
-
const r =
|
|
4987
|
+
const r = Ir(/* @__PURE__ */ new Date(), 1);
|
|
4945
4988
|
return {
|
|
4946
4989
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
4947
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
4948
|
-
today: { label: "Сегодня", from: Ze(), to:
|
|
4949
|
-
yesterday: { label: "Вчера", from:
|
|
4950
|
-
tomorrow: { label: "Завтра", from:
|
|
4990
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: qr(r), to: Or(r) },
|
|
4991
|
+
today: { label: "Сегодня", from: Ze(), to: Nr() },
|
|
4992
|
+
yesterday: { label: "Вчера", from: xr(), to: Lr() },
|
|
4993
|
+
tomorrow: { label: "Завтра", from: kr(), to: dr() }
|
|
4951
4994
|
};
|
|
4952
4995
|
}
|
|
4953
4996
|
}
|
|
@@ -4992,7 +5035,7 @@ const E = class E {
|
|
|
4992
5035
|
*/
|
|
4993
5036
|
t(E, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
4994
5037
|
let Ve = E;
|
|
4995
|
-
class
|
|
5038
|
+
class Zt {
|
|
4996
5039
|
/**
|
|
4997
5040
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
4998
5041
|
*/
|
|
@@ -5008,7 +5051,7 @@ class Yt {
|
|
|
5008
5051
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5009
5052
|
}
|
|
5010
5053
|
}
|
|
5011
|
-
class
|
|
5054
|
+
class gt extends pe {
|
|
5012
5055
|
/**
|
|
5013
5056
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5014
5057
|
*/
|
|
@@ -5081,7 +5124,7 @@ class fr extends mr {
|
|
|
5081
5124
|
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5082
5125
|
}
|
|
5083
5126
|
}
|
|
5084
|
-
class
|
|
5127
|
+
class mt extends M {
|
|
5085
5128
|
/**
|
|
5086
5129
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5087
5130
|
*
|
|
@@ -5164,7 +5207,7 @@ class ht extends M {
|
|
|
5164
5207
|
this.product = new Q(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5165
5208
|
}
|
|
5166
5209
|
}
|
|
5167
|
-
class
|
|
5210
|
+
class ft extends fr {
|
|
5168
5211
|
/**
|
|
5169
5212
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5170
5213
|
*
|
|
@@ -5204,10 +5247,10 @@ class gt extends fr {
|
|
|
5204
5247
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5205
5248
|
*/
|
|
5206
5249
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5207
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5250
|
+
this.products = (e.products ?? []).map((s) => new mt(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;
|
|
5208
5251
|
}
|
|
5209
5252
|
}
|
|
5210
|
-
class
|
|
5253
|
+
class es extends De {
|
|
5211
5254
|
/**
|
|
5212
5255
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5213
5256
|
*
|
|
@@ -5238,7 +5281,7 @@ class Xt extends De {
|
|
|
5238
5281
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5239
5282
|
*/
|
|
5240
5283
|
getOrder(r) {
|
|
5241
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5284
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new ft(e.data));
|
|
5242
5285
|
}
|
|
5243
5286
|
}
|
|
5244
5287
|
class _e {
|
|
@@ -5268,7 +5311,7 @@ class _e {
|
|
|
5268
5311
|
* Источник клиентской цены.
|
|
5269
5312
|
*/
|
|
5270
5313
|
t(this, "source");
|
|
5271
|
-
this.client = new ge(r == null ? void 0 : r.client), this.product = new
|
|
5314
|
+
this.client = new ge(r == null ? void 0 : r.client), this.product = new L(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;
|
|
5272
5315
|
}
|
|
5273
5316
|
}
|
|
5274
5317
|
const Se = (n) => {
|
|
@@ -5288,7 +5331,7 @@ const Se = (n) => {
|
|
|
5288
5331
|
const r = {};
|
|
5289
5332
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
5290
5333
|
};
|
|
5291
|
-
class
|
|
5334
|
+
class rs extends h {
|
|
5292
5335
|
/**
|
|
5293
5336
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5294
5337
|
*
|
|
@@ -5349,7 +5392,7 @@ class Zt extends h {
|
|
|
5349
5392
|
);
|
|
5350
5393
|
}
|
|
5351
5394
|
}
|
|
5352
|
-
class
|
|
5395
|
+
class yt {
|
|
5353
5396
|
/**
|
|
5354
5397
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5355
5398
|
*
|
|
@@ -5399,7 +5442,7 @@ class mt {
|
|
|
5399
5442
|
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ne(r.product) : void 0, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new ye(r.currency) : void 0;
|
|
5400
5443
|
}
|
|
5401
5444
|
}
|
|
5402
|
-
class
|
|
5445
|
+
class wt extends ne {
|
|
5403
5446
|
/**
|
|
5404
5447
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5405
5448
|
*
|
|
@@ -5411,10 +5454,10 @@ class ft extends ne {
|
|
|
5411
5454
|
* @inheritDoc
|
|
5412
5455
|
*/
|
|
5413
5456
|
t(this, "history");
|
|
5414
|
-
this.history = ue(e.history, (s) => new
|
|
5457
|
+
this.history = ue(e.history, (s) => new yt(s));
|
|
5415
5458
|
}
|
|
5416
5459
|
}
|
|
5417
|
-
class
|
|
5460
|
+
class ts extends h {
|
|
5418
5461
|
/**
|
|
5419
5462
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5420
5463
|
*/
|
|
@@ -5439,7 +5482,7 @@ class es extends h {
|
|
|
5439
5482
|
}),
|
|
5440
5483
|
(u) => $(u) || (J(u) || Xe(u)) && ve(u)
|
|
5441
5484
|
);
|
|
5442
|
-
return this.get("/internal/history", s, (u) => ue(u.data, (m) => new
|
|
5485
|
+
return this.get("/internal/history", s, (u) => ue(u.data, (m) => new wt(m)));
|
|
5443
5486
|
}
|
|
5444
5487
|
}
|
|
5445
5488
|
class Je {
|
|
@@ -5460,7 +5503,7 @@ class Je {
|
|
|
5460
5503
|
r != null && r.products && (this.products = r.products.map((e) => new ne(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ne(e)));
|
|
5461
5504
|
}
|
|
5462
5505
|
}
|
|
5463
|
-
class
|
|
5506
|
+
class ss extends h {
|
|
5464
5507
|
/**
|
|
5465
5508
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5466
5509
|
*/
|
|
@@ -5521,7 +5564,7 @@ class a extends pe {
|
|
|
5521
5564
|
* и использовать в случае аналогичных запросов.
|
|
5522
5565
|
*/
|
|
5523
5566
|
getReference(r, e = !1) {
|
|
5524
|
-
return this.getTypedDataArrayRequester(
|
|
5567
|
+
return this.getTypedDataArrayRequester(rt, `/internal/references/${r}`, e);
|
|
5525
5568
|
}
|
|
5526
5569
|
/**
|
|
5527
5570
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
@@ -5534,7 +5577,7 @@ class a extends pe {
|
|
|
5534
5577
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5535
5578
|
*/
|
|
5536
5579
|
getContactPositions() {
|
|
5537
|
-
return this.getTypedDataArrayRequester(
|
|
5580
|
+
return this.getTypedDataArrayRequester(tt, "/internal/references/contact-position", !0);
|
|
5538
5581
|
}
|
|
5539
5582
|
/**
|
|
5540
5583
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -5559,19 +5602,19 @@ class a extends pe {
|
|
|
5559
5602
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5560
5603
|
*/
|
|
5561
5604
|
getOrderPaymentStatuses() {
|
|
5562
|
-
return this.getTypedDataArrayRequester(
|
|
5605
|
+
return this.getTypedDataArrayRequester(st, "/public/references/order-payment-status", !0);
|
|
5563
5606
|
}
|
|
5564
5607
|
/**
|
|
5565
5608
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5566
5609
|
*/
|
|
5567
5610
|
getOrderStatuses() {
|
|
5568
|
-
return this.getTypedDataArrayRequester(
|
|
5611
|
+
return this.getTypedDataArrayRequester(it, "/public/references/order-status", !0);
|
|
5569
5612
|
}
|
|
5570
5613
|
/**
|
|
5571
5614
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5572
5615
|
*/
|
|
5573
5616
|
getPaymentTypes() {
|
|
5574
|
-
return this.getTypedDataArrayRequester(
|
|
5617
|
+
return this.getTypedDataArrayRequester(nt, "/public/references/payment-type", !0);
|
|
5575
5618
|
}
|
|
5576
5619
|
/**
|
|
5577
5620
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
@@ -5643,7 +5686,7 @@ class a extends pe {
|
|
|
5643
5686
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5644
5687
|
*/
|
|
5645
5688
|
getProductFileType() {
|
|
5646
|
-
return this.getTypedDataArrayRequester(
|
|
5689
|
+
return this.getTypedDataArrayRequester(ot, "/public/references/product-file-type", !0);
|
|
5647
5690
|
}
|
|
5648
5691
|
}
|
|
5649
5692
|
const A = Z("__references_private", () => {
|
|
@@ -5722,7 +5765,7 @@ const A = Z("__references_private", () => {
|
|
|
5722
5765
|
*/
|
|
5723
5766
|
priceCoefficientsReference: l
|
|
5724
5767
|
};
|
|
5725
|
-
}),
|
|
5768
|
+
}), is = Z("references", () => {
|
|
5726
5769
|
const n = R(() => {
|
|
5727
5770
|
const l = A();
|
|
5728
5771
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(a).getChannelPrimaryInterest().then((g) => {
|
|
@@ -5790,7 +5833,7 @@ const A = Z("__references_private", () => {
|
|
|
5790
5833
|
}).catch(w)), l.deliveryTypeReference;
|
|
5791
5834
|
}), b = R(() => {
|
|
5792
5835
|
const l = A();
|
|
5793
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
5836
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(gt).getManagers().then((g) => {
|
|
5794
5837
|
l.managersList = g;
|
|
5795
5838
|
}).catch(w)), l.managersList;
|
|
5796
5839
|
}), _ = R(() => {
|
|
@@ -5880,7 +5923,7 @@ const A = Z("__references_private", () => {
|
|
|
5880
5923
|
priceCoefficientsReference: U
|
|
5881
5924
|
};
|
|
5882
5925
|
});
|
|
5883
|
-
class
|
|
5926
|
+
class Ct {
|
|
5884
5927
|
/**
|
|
5885
5928
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5886
5929
|
*
|
|
@@ -5934,10 +5977,10 @@ class Ke {
|
|
|
5934
5977
|
*/
|
|
5935
5978
|
t(this, "meta");
|
|
5936
5979
|
var e;
|
|
5937
|
-
this.resourceType = new lr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new
|
|
5980
|
+
this.resourceType = new lr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new Ct(s))) ?? [];
|
|
5938
5981
|
}
|
|
5939
5982
|
}
|
|
5940
|
-
class
|
|
5983
|
+
class ns extends h {
|
|
5941
5984
|
/**
|
|
5942
5985
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
5943
5986
|
*
|
|
@@ -5968,7 +6011,7 @@ class ss extends h {
|
|
|
5968
6011
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
5969
6012
|
}
|
|
5970
6013
|
}
|
|
5971
|
-
class
|
|
6014
|
+
class os extends h {
|
|
5972
6015
|
/**
|
|
5973
6016
|
* Возвращает подсказки по адресам.
|
|
5974
6017
|
*
|
|
@@ -6015,8 +6058,8 @@ class is extends h {
|
|
|
6015
6058
|
});
|
|
6016
6059
|
}
|
|
6017
6060
|
}
|
|
6018
|
-
var
|
|
6019
|
-
class
|
|
6061
|
+
var vt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(vt || {});
|
|
6062
|
+
class Pt extends nr {
|
|
6020
6063
|
/**
|
|
6021
6064
|
* Инициализирует экземпляр класса {@link User}.
|
|
6022
6065
|
*
|
|
@@ -6039,7 +6082,7 @@ class Ct extends nr {
|
|
|
6039
6082
|
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
|
|
6040
6083
|
}
|
|
6041
6084
|
}
|
|
6042
|
-
class
|
|
6085
|
+
class cs extends h {
|
|
6043
6086
|
/**
|
|
6044
6087
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6045
6088
|
*/
|
|
@@ -6055,16 +6098,16 @@ class ns extends h {
|
|
|
6055
6098
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6056
6099
|
}
|
|
6057
6100
|
}
|
|
6058
|
-
class
|
|
6101
|
+
class Rt extends h {
|
|
6059
6102
|
/**
|
|
6060
6103
|
* Возвращает данные о текущем пользователе.
|
|
6061
6104
|
*/
|
|
6062
6105
|
// eslint-disable-next-line class-methods-use-this
|
|
6063
6106
|
getCurrentUser() {
|
|
6064
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6107
|
+
return this.get("/internal/users/info", {}, (r) => new Pt(r.data));
|
|
6065
6108
|
}
|
|
6066
6109
|
}
|
|
6067
|
-
const
|
|
6110
|
+
const At = Z("__user_state_private", () => {
|
|
6068
6111
|
const n = f({}), r = f(void 0);
|
|
6069
6112
|
return {
|
|
6070
6113
|
/**
|
|
@@ -6076,20 +6119,20 @@ const Pt = Z("__user_state_private", () => {
|
|
|
6076
6119
|
*/
|
|
6077
6120
|
currentUser: r
|
|
6078
6121
|
};
|
|
6079
|
-
}),
|
|
6122
|
+
}), ls = Z("user_state", () => ({
|
|
6080
6123
|
/**
|
|
6081
6124
|
* Данные о текущем пользователе.
|
|
6082
6125
|
*/
|
|
6083
6126
|
currentUser: R(() => {
|
|
6084
|
-
const r =
|
|
6085
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6127
|
+
const r = At();
|
|
6128
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Rt).getCurrentUser().then((e) => {
|
|
6086
6129
|
r.currentUser = e;
|
|
6087
6130
|
}).catch(w).finally(() => {
|
|
6088
6131
|
r.dataLoaderList.currentUser = !1;
|
|
6089
6132
|
})), r.currentUser;
|
|
6090
6133
|
})
|
|
6091
6134
|
}));
|
|
6092
|
-
class
|
|
6135
|
+
class ps {
|
|
6093
6136
|
/**
|
|
6094
6137
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6095
6138
|
*
|
|
@@ -6113,147 +6156,148 @@ class cs {
|
|
|
6113
6156
|
}
|
|
6114
6157
|
}
|
|
6115
6158
|
export {
|
|
6116
|
-
|
|
6117
|
-
|
|
6159
|
+
rt as AnyReference,
|
|
6160
|
+
Nt as AppBaseConfig,
|
|
6118
6161
|
D as AppConfigProvider,
|
|
6119
|
-
|
|
6162
|
+
ke as BankAccount,
|
|
6120
6163
|
De as BasePaginationProvider,
|
|
6121
|
-
|
|
6164
|
+
Br as CalculationTypeEnum,
|
|
6122
6165
|
me as Cart,
|
|
6123
|
-
|
|
6124
|
-
|
|
6125
|
-
|
|
6126
|
-
|
|
6166
|
+
Hr as CartItem,
|
|
6167
|
+
Mr as CartItemBase,
|
|
6168
|
+
kt as CartProvider,
|
|
6169
|
+
Ot as CatalogProvider,
|
|
6127
6170
|
er as CatalogableItem,
|
|
6128
6171
|
B as Category,
|
|
6129
6172
|
He as CategoryPricingRule,
|
|
6130
6173
|
cr as ChannelPrimaryInterest,
|
|
6131
|
-
|
|
6174
|
+
Wt as City,
|
|
6132
6175
|
je as CityWithRegionAndCountry,
|
|
6133
6176
|
We as Client,
|
|
6134
|
-
|
|
6177
|
+
ut as ClientAdditionalData,
|
|
6135
6178
|
fe as ClientCategory,
|
|
6136
|
-
|
|
6137
|
-
|
|
6138
|
-
|
|
6179
|
+
Kt as ClientDataProvider,
|
|
6180
|
+
qt as ClientPriceProvider,
|
|
6181
|
+
Ut as ClientPriceTemplateProvider,
|
|
6139
6182
|
Q as ClientProduct,
|
|
6140
|
-
|
|
6141
|
-
|
|
6183
|
+
Ft as ClientProductCategoryDataProvider,
|
|
6184
|
+
Mt as ClientProductDataProvider,
|
|
6142
6185
|
ge as ClientShortInfo,
|
|
6143
|
-
|
|
6144
|
-
|
|
6186
|
+
et as ClientsAdditionalDataRequestTypeEnum,
|
|
6187
|
+
Vt as ClientsListFilters,
|
|
6145
6188
|
ne as CodedIdentity,
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6189
|
+
Yt as ConfiguratorProvider,
|
|
6190
|
+
Le as Contact,
|
|
6191
|
+
Er as ContactLinks,
|
|
6149
6192
|
F as ContactPerson,
|
|
6150
|
-
|
|
6151
|
-
|
|
6193
|
+
pt as ContactPersonRelated,
|
|
6194
|
+
tt as ContactPosition,
|
|
6152
6195
|
be as ContactRelation,
|
|
6153
6196
|
ur as ContragentBase,
|
|
6154
6197
|
we as ContragentFactory,
|
|
6155
6198
|
hr as ContragentIc,
|
|
6156
|
-
|
|
6157
|
-
|
|
6199
|
+
ct as ContragentPerson,
|
|
6200
|
+
lt as ContragentUlNr,
|
|
6158
6201
|
gr as ContragentUlR,
|
|
6159
6202
|
Ge as CostSourceEnum,
|
|
6160
6203
|
Y as Country,
|
|
6161
6204
|
ye as Currency,
|
|
6162
|
-
|
|
6163
|
-
|
|
6164
|
-
|
|
6165
|
-
|
|
6166
|
-
|
|
6167
|
-
|
|
6205
|
+
os as DataSuggestionProvider,
|
|
6206
|
+
Et as DataTablePagination,
|
|
6207
|
+
ht as DataTablePaginationRequestParams,
|
|
6208
|
+
Jt as DataTableSortRequestParams,
|
|
6209
|
+
Xt as DateTimeProvider,
|
|
6210
|
+
Wr as DeletableNamedIdentity,
|
|
6168
6211
|
Ce as DeliveryAddress,
|
|
6169
6212
|
K as DeliveryType,
|
|
6170
|
-
|
|
6171
|
-
|
|
6172
|
-
|
|
6173
|
-
|
|
6213
|
+
dt as DetailedJwtPayload,
|
|
6214
|
+
Kr as DeviceTypeResolutionConfig,
|
|
6215
|
+
Vr as DiscountShortInfo,
|
|
6216
|
+
ps as FieldValidationResultData,
|
|
6174
6217
|
le as FilterGroup,
|
|
6175
6218
|
Be as FilterItem,
|
|
6176
6219
|
Fe as FilterOpEnum,
|
|
6177
6220
|
tr as GeoCoordinates,
|
|
6178
|
-
|
|
6221
|
+
jr as HiddenCatalogableItem,
|
|
6179
6222
|
pe as HttpCachedRequester,
|
|
6180
|
-
|
|
6223
|
+
Qr as HttpParamsConfig,
|
|
6181
6224
|
h as HttpRequester,
|
|
6182
6225
|
M as Identity,
|
|
6183
|
-
|
|
6226
|
+
Fr as Image,
|
|
6184
6227
|
ie as JwtPayload,
|
|
6185
6228
|
Ae as Manager,
|
|
6186
6229
|
oe as ManagerCommon,
|
|
6187
|
-
|
|
6188
|
-
|
|
6189
|
-
|
|
6230
|
+
Zt as ManagerDataFactory,
|
|
6231
|
+
gt as ManagerDataProvider,
|
|
6232
|
+
Ct as MetaTagItem,
|
|
6190
6233
|
T as NamedIdentity,
|
|
6191
6234
|
j as Opf,
|
|
6192
6235
|
d as OpfEnum,
|
|
6193
|
-
|
|
6236
|
+
ft as Order,
|
|
6194
6237
|
fr as OrderInfo,
|
|
6195
|
-
|
|
6196
|
-
|
|
6238
|
+
st as OrderPaymentStatus,
|
|
6239
|
+
mt as OrderProduct,
|
|
6197
6240
|
mr as OrderShortInfo,
|
|
6198
|
-
|
|
6199
|
-
|
|
6241
|
+
it as OrderStatus,
|
|
6242
|
+
es as OrdersDataProvider,
|
|
6200
6243
|
X as PartnerGroup,
|
|
6201
|
-
|
|
6202
|
-
|
|
6244
|
+
nt as PaymentType,
|
|
6245
|
+
Lt as PreferencesStorageProvider,
|
|
6203
6246
|
_e as PriceAnalyze,
|
|
6204
|
-
|
|
6247
|
+
rs as PriceAnalyzeProvider,
|
|
6205
6248
|
Pe as PriceCoefficient,
|
|
6206
6249
|
rr as PriceCoefficientEnum,
|
|
6207
|
-
|
|
6208
|
-
|
|
6250
|
+
ts as PriceHistoryDataProvider,
|
|
6251
|
+
yt as PriceHistoryItem,
|
|
6209
6252
|
z as PriceTemplate,
|
|
6210
6253
|
$e as PriceTemplateCategory,
|
|
6211
6254
|
re as PriceTemplateClient,
|
|
6212
6255
|
ir as PriceTemplateICatalogableItem,
|
|
6213
6256
|
Te as PriceTemplateProduct,
|
|
6214
|
-
|
|
6257
|
+
Ht as PriceTemplateProvider,
|
|
6215
6258
|
se as PricingRole,
|
|
6216
|
-
|
|
6259
|
+
Bt as PricingRoleProvider,
|
|
6217
6260
|
de as PrimaryCatalogableItem,
|
|
6218
|
-
|
|
6219
|
-
|
|
6220
|
-
|
|
6221
|
-
|
|
6261
|
+
L as Product,
|
|
6262
|
+
Gt as ProductCategoryDataProvider,
|
|
6263
|
+
jt as ProductDataProvider,
|
|
6264
|
+
ot as ProductFileType,
|
|
6222
6265
|
qe as ProductPriceCoefficient,
|
|
6223
|
-
|
|
6224
|
-
|
|
6266
|
+
wt as ProductPriceHistory,
|
|
6267
|
+
zt as PropertiesProvider,
|
|
6225
6268
|
te as Property,
|
|
6226
6269
|
or as PropertyType,
|
|
6227
|
-
|
|
6270
|
+
zr as PropertyTypeEnum,
|
|
6228
6271
|
H as PropertyValue,
|
|
6229
|
-
|
|
6272
|
+
ss as RecommendationsDataProvider,
|
|
6230
6273
|
Je as RecommendationsList,
|
|
6231
6274
|
P as Reference,
|
|
6232
6275
|
a as ReferenceDataProvider,
|
|
6233
6276
|
ce as Region,
|
|
6234
6277
|
lr as ResourceType,
|
|
6235
6278
|
x as SalesDirection,
|
|
6236
|
-
|
|
6279
|
+
Yr as SentryConfig,
|
|
6237
6280
|
Ke as Seo,
|
|
6238
|
-
|
|
6281
|
+
ns as SeoDataProvider,
|
|
6239
6282
|
pr as SourcePrimaryInterest,
|
|
6240
|
-
|
|
6241
|
-
|
|
6283
|
+
Gr as StockCount,
|
|
6284
|
+
xt as TemplatesListFilters,
|
|
6242
6285
|
Ue as TypedInstanceFactory,
|
|
6243
6286
|
Ve as UnitsHelper,
|
|
6244
|
-
|
|
6287
|
+
Qt as UnknownClientDataProvider,
|
|
6245
6288
|
sr as UpdatableNamedIdentity,
|
|
6246
|
-
|
|
6247
|
-
|
|
6289
|
+
Pt as User,
|
|
6290
|
+
cs as UserAuthDataProvider,
|
|
6248
6291
|
nr as UserCommonInfo,
|
|
6249
|
-
|
|
6292
|
+
Rt as UserDataProvider,
|
|
6250
6293
|
G as UserShortInfo,
|
|
6251
|
-
|
|
6252
|
-
|
|
6294
|
+
vt as UserTypeEnum,
|
|
6295
|
+
Xr as VersionConfig,
|
|
6253
6296
|
Re as Warehouse,
|
|
6297
|
+
Zr as WebSocketConfig,
|
|
6254
6298
|
ze as findCatalogItemByIdRecursive,
|
|
6255
6299
|
ae as useAuthStateStore,
|
|
6256
|
-
|
|
6257
|
-
|
|
6300
|
+
is as useReferencesStore,
|
|
6301
|
+
ls as useUserStateStore
|
|
6258
6302
|
};
|
|
6259
6303
|
//# sourceMappingURL=sc-common-lib.js.map
|