@snabcentr/common-lib 2.8.1 → 2.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +4 -2
- package/dist/sc-common-lib.js +126 -111
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/orders/providers/orders-data-provider.d.ts +9 -0
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/dist/src/user/classes/user.d.ts +5 -0
- package/dist/src/user/classes/user.d.ts.map +1 -1
- package/dist/src/user/interfaces/i-user.d.ts +5 -0
- package/dist/src/user/interfaces/i-user.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (i, r, e) =>
|
|
1
|
+
var _r = Object.defineProperty;
|
|
2
|
+
var xr = (i, r, e) => r in i ? _r(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var t = (i, r, e) => xr(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as nr } from "jwt-decode";
|
|
5
|
-
import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as
|
|
5
|
+
import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as Or, split as qr, isString as C, constant as Nr, toUpper as Ur, cloneDeep as Fr, toLower as Hr, isFunction as Fe, map as fe, forEach as Mr, isDate as xe, omitBy as cr, isObject as lr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as He, objectToSnake as Ee } from "ts-case-convert";
|
|
7
7
|
import { defineStore as W } from "pinia";
|
|
8
|
-
import { ref as y, markRaw as
|
|
9
|
-
import { isAfter as Ve, parseISO as R, startOfToday as Oe, format as I, addSeconds as
|
|
10
|
-
import
|
|
8
|
+
import { ref as y, markRaw as jr, computed as P } from "vue";
|
|
9
|
+
import { isAfter as Ve, parseISO as R, startOfToday as Oe, format as I, addSeconds as Gr, addBusinessDays as Br, endOfTomorrow as zr, startOfTomorrow as Wr, endOfYesterday as Jr, startOfYesterday as Er, endOfToday as Vr, endOfDay as Kr, startOfDay as Qr } from "date-fns";
|
|
10
|
+
import Yr, { CanceledError as Xr } from "axios";
|
|
11
11
|
class M {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -154,7 +154,7 @@ class zt extends M {
|
|
|
154
154
|
return new M(He(nr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class Zr {
|
|
158
158
|
/**
|
|
159
159
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
160
160
|
*
|
|
@@ -176,7 +176,7 @@ class Xr {
|
|
|
176
176
|
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;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
class
|
|
179
|
+
class et {
|
|
180
180
|
/**
|
|
181
181
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
182
182
|
*
|
|
@@ -198,7 +198,7 @@ class Zr {
|
|
|
198
198
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
class
|
|
201
|
+
class rt {
|
|
202
202
|
/**
|
|
203
203
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
204
204
|
*
|
|
@@ -243,7 +243,7 @@ class et {
|
|
|
243
243
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
class
|
|
246
|
+
class tt {
|
|
247
247
|
/**
|
|
248
248
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
249
249
|
*
|
|
@@ -282,7 +282,7 @@ class rt {
|
|
|
282
282
|
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"];
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class st {
|
|
286
286
|
/**
|
|
287
287
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
288
288
|
*
|
|
@@ -326,10 +326,10 @@ class tt {
|
|
|
326
326
|
*/
|
|
327
327
|
t(this, "dateFormats");
|
|
328
328
|
var e, s, n;
|
|
329
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
329
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new et(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Zr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new rt({
|
|
330
330
|
environment: this.environment,
|
|
331
331
|
...r == null ? void 0 : r.sentry
|
|
332
|
-
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new
|
|
332
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new tt(r.websocket) : void 0, this.dateFormats = {
|
|
333
333
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
334
334
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
335
335
|
uiDateWithTime: ((n = r == null ? void 0 : r.dateFormats) == null ? void 0 : n.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
@@ -337,7 +337,7 @@ class tt {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
const k = W("common.config", () => {
|
|
340
|
-
const i = y(new
|
|
340
|
+
const i = y(new st());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
343
343
|
* Конфигурационные данные приложения.
|
|
@@ -489,7 +489,7 @@ const V = W("common.auth_state_private", () => {
|
|
|
489
489
|
const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
490
490
|
return c ? Promise.resolve(c) : void 0;
|
|
491
491
|
})()
|
|
492
|
-
), r = y(void 0), e = y(void 0), s =
|
|
492
|
+
), r = y(void 0), e = y(void 0), s = jr(/* @__PURE__ */ new Map());
|
|
493
493
|
function n() {
|
|
494
494
|
e.value = void 0, A(i.value) || i.value.then((o) => {
|
|
495
495
|
const c = M.getJwtPayload(o);
|
|
@@ -552,13 +552,13 @@ const V = W("common.auth_state_private", () => {
|
|
|
552
552
|
const h = P(() => {
|
|
553
553
|
const m = (f) => {
|
|
554
554
|
var E;
|
|
555
|
-
const D =
|
|
555
|
+
const D = qr(f, ".");
|
|
556
556
|
if (D.length < 2)
|
|
557
557
|
return !1;
|
|
558
558
|
const [se, ie] = D, J = (E = V().userPermissions) == null ? void 0 : E[se];
|
|
559
559
|
return H(J) && J.includes(ie);
|
|
560
560
|
};
|
|
561
|
-
return H(o) ?
|
|
561
|
+
return H(o) ? Or(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
563
563
|
return c.userPermissionsComputedRefs.set(u, h), h;
|
|
564
564
|
}
|
|
@@ -695,7 +695,7 @@ class pr extends ur {
|
|
|
695
695
|
this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
696
696
|
}
|
|
697
697
|
}
|
|
698
|
-
class
|
|
698
|
+
class it {
|
|
699
699
|
/**
|
|
700
700
|
* Инициализирует экземпляр класса {@link Image}.
|
|
701
701
|
*
|
|
@@ -737,7 +737,7 @@ class hr extends he {
|
|
|
737
737
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
|
-
class
|
|
740
|
+
class nt extends hr {
|
|
741
741
|
/**
|
|
742
742
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
743
743
|
*
|
|
@@ -801,7 +801,7 @@ class _ extends S {
|
|
|
801
801
|
this.type = e == null ? void 0 : e.type;
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
class
|
|
804
|
+
class ot extends S {
|
|
805
805
|
/**
|
|
806
806
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
807
807
|
*
|
|
@@ -865,7 +865,7 @@ class Pe extends w {
|
|
|
865
865
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
866
866
|
*/
|
|
867
867
|
static getRetailPriceCoefficient() {
|
|
868
|
-
return { id: -2, slug: gr.Retail, name: "Розн. цена", guid: "", isNewRec:
|
|
868
|
+
return { id: -2, slug: gr.Retail, name: "Розн. цена", guid: "", isNewRec: Nr(!0) };
|
|
869
869
|
}
|
|
870
870
|
}
|
|
871
871
|
class je {
|
|
@@ -950,7 +950,7 @@ class ye extends w {
|
|
|
950
950
|
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((n) => new F(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new mr(e == null ? void 0 : e.coordinates);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
class
|
|
953
|
+
class ct {
|
|
954
954
|
/**
|
|
955
955
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
956
956
|
*
|
|
@@ -1022,7 +1022,7 @@ class Qe extends S {
|
|
|
1022
1022
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
class L extends
|
|
1025
|
+
class L extends nt {
|
|
1026
1026
|
/**
|
|
1027
1027
|
* Инициализирует экземпляр класса {@link Product}.
|
|
1028
1028
|
*
|
|
@@ -1099,9 +1099,9 @@ class L extends it {
|
|
|
1099
1099
|
* Список коэффициентов цен на продукт.
|
|
1100
1100
|
*/
|
|
1101
1101
|
t(this, "priceCoefficients");
|
|
1102
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? R(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new
|
|
1102
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? R(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ct(h))) ?? [], this.type = "product";
|
|
1103
1103
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
|
|
1104
|
-
s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new
|
|
1104
|
+
s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new it(h, k().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new je(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1105
|
}
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1159,7 +1159,7 @@ class j extends L {
|
|
|
1159
1159
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1160
1160
|
*/
|
|
1161
1161
|
t(this, "isFavorite");
|
|
1162
|
-
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
|
|
1162
|
+
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 ot(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new Q(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;
|
|
1163
1163
|
}
|
|
1164
1164
|
}
|
|
1165
1165
|
class we extends qe {
|
|
@@ -1186,7 +1186,7 @@ class we extends qe {
|
|
|
1186
1186
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
1187
1187
|
*/
|
|
1188
1188
|
t(this, "currencyRates");
|
|
1189
|
-
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, n]) => [
|
|
1189
|
+
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, n]) => [Ur(s), n])) : void 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
class fr extends re {
|
|
@@ -1265,10 +1265,10 @@ class fr extends re {
|
|
|
1265
1265
|
* @inheritDoc
|
|
1266
1266
|
*/
|
|
1267
1267
|
t(this, "replacementId");
|
|
1268
|
-
this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new we(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams &&
|
|
1268
|
+
this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new we(), this.currency = e.currency ? new O(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Fr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new _(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
|
-
let
|
|
1271
|
+
let lt = class extends fr {
|
|
1272
1272
|
/**
|
|
1273
1273
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
1274
1274
|
*
|
|
@@ -1334,7 +1334,7 @@ class ne {
|
|
|
1334
1334
|
* @inheritDoc
|
|
1335
1335
|
*/
|
|
1336
1336
|
t(this, "directionsSum");
|
|
1337
|
-
this.items = r.items.map((e) => new
|
|
1337
|
+
this.items = r.items.map((e) => new lt(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
const a = class a {
|
|
@@ -1391,7 +1391,7 @@ const a = class a {
|
|
|
1391
1391
|
* @param request Данные запроса.
|
|
1392
1392
|
*/
|
|
1393
1393
|
// eslint-disable-next-line class-methods-use-this
|
|
1394
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(
|
|
1394
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(Hr(r.method)) && r.data && (r.data = Ee(r.data))), r));
|
|
1395
1395
|
/**
|
|
1396
1396
|
* Перехватчик ошибок ответов на запрос.
|
|
1397
1397
|
*
|
|
@@ -1411,7 +1411,7 @@ const a = class a {
|
|
|
1411
1411
|
t(this, "canceledResponseInterceptor", (r) => {
|
|
1412
1412
|
const e = r.rawError ?? r;
|
|
1413
1413
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
1414
|
-
throw new
|
|
1414
|
+
throw new Xr("Request canceled");
|
|
1415
1415
|
return Promise.reject(r);
|
|
1416
1416
|
});
|
|
1417
1417
|
/**
|
|
@@ -1428,7 +1428,7 @@ const a = class a {
|
|
|
1428
1428
|
*/
|
|
1429
1429
|
// eslint-disable-next-line class-methods-use-this
|
|
1430
1430
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = He(r.data)), r));
|
|
1431
|
-
this.errorResponseHandler = a.defaultErrorsResponseHandler, this.httpClient =
|
|
1431
|
+
this.errorResponseHandler = a.defaultErrorsResponseHandler, this.httpClient = Yr.create({
|
|
1432
1432
|
headers: {
|
|
1433
1433
|
Accept: "application/json",
|
|
1434
1434
|
"Content-Type": "application/json"
|
|
@@ -1720,7 +1720,7 @@ class Jt extends p {
|
|
|
1720
1720
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
|
-
var
|
|
1723
|
+
var ut = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(ut || {}), pt = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))(pt || {});
|
|
1724
1724
|
class N extends we {
|
|
1725
1725
|
/**
|
|
1726
1726
|
* Инициализирует экземпляр класса {@link Category}.
|
|
@@ -1794,7 +1794,7 @@ class Be extends S {
|
|
|
1794
1794
|
}
|
|
1795
1795
|
class ze extends w {
|
|
1796
1796
|
}
|
|
1797
|
-
class
|
|
1797
|
+
class wr extends S {
|
|
1798
1798
|
/**
|
|
1799
1799
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1800
1800
|
*
|
|
@@ -1854,7 +1854,7 @@ class ve extends Be {
|
|
|
1854
1854
|
* Список направлений кураторства.
|
|
1855
1855
|
*/
|
|
1856
1856
|
t(this, "curatedDirections");
|
|
1857
|
-
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, this.pricingRole = e != null && e.pricingRole ? new
|
|
1857
|
+
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, this.pricingRole = e != null && e.pricingRole ? new wr(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((n) => new ze(n))) ?? [];
|
|
1858
1858
|
}
|
|
1859
1859
|
}
|
|
1860
1860
|
class ht extends we {
|
|
@@ -1908,7 +1908,7 @@ class Ce extends ht {
|
|
|
1908
1908
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new Ce(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new j(o));
|
|
1909
1909
|
}
|
|
1910
1910
|
}
|
|
1911
|
-
class
|
|
1911
|
+
class vr {
|
|
1912
1912
|
/**
|
|
1913
1913
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1914
1914
|
*
|
|
@@ -1926,7 +1926,7 @@ class wr {
|
|
|
1926
1926
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1927
1927
|
}
|
|
1928
1928
|
}
|
|
1929
|
-
class de extends
|
|
1929
|
+
class de extends vr {
|
|
1930
1930
|
/**
|
|
1931
1931
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1932
1932
|
*
|
|
@@ -1996,7 +1996,7 @@ class De extends w {
|
|
|
1996
1996
|
e && (this.region = new ge(e.region));
|
|
1997
1997
|
}
|
|
1998
1998
|
}
|
|
1999
|
-
class
|
|
1999
|
+
class ar extends S {
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
2002
2002
|
*
|
|
@@ -2035,7 +2035,7 @@ class vr extends S {
|
|
|
2035
2035
|
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new q(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? R(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
|
-
class te extends
|
|
2038
|
+
class te extends ar {
|
|
2039
2039
|
/**
|
|
2040
2040
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2041
2041
|
*
|
|
@@ -2111,7 +2111,7 @@ class oe extends re {
|
|
|
2111
2111
|
this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
|
|
2112
2112
|
}
|
|
2113
2113
|
}
|
|
2114
|
-
class ke extends
|
|
2114
|
+
class ke extends vr {
|
|
2115
2115
|
/**
|
|
2116
2116
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2117
2117
|
*
|
|
@@ -2126,7 +2126,7 @@ class ke extends wr {
|
|
|
2126
2126
|
this.product = new L(e == null ? void 0 : e.product);
|
|
2127
2127
|
}
|
|
2128
2128
|
}
|
|
2129
|
-
class
|
|
2129
|
+
class Cr extends w {
|
|
2130
2130
|
}
|
|
2131
2131
|
class ce extends S {
|
|
2132
2132
|
/**
|
|
@@ -2148,7 +2148,7 @@ class ce extends S {
|
|
|
2148
2148
|
* Дополнительные метаданные свойства.
|
|
2149
2149
|
*/
|
|
2150
2150
|
t(this, "metadata");
|
|
2151
|
-
this.type = new
|
|
2151
|
+
this.type = new Cr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
2152
2152
|
}
|
|
2153
2153
|
}
|
|
2154
2154
|
class K {
|
|
@@ -2704,7 +2704,7 @@ class Yt extends p {
|
|
|
2704
2704
|
getCategoryProductsCoefficients(r) {
|
|
2705
2705
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2706
2706
|
const { data: s } = e;
|
|
2707
|
-
return
|
|
2707
|
+
return Mr(s, (n) => n.map((o) => new je(o))), s;
|
|
2708
2708
|
});
|
|
2709
2709
|
}
|
|
2710
2710
|
/**
|
|
@@ -3698,7 +3698,7 @@ function er(i) {
|
|
|
3698
3698
|
var gt = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i.SalesDirection = "sales_direction", i.Managers = "managers", i.Curators = "curators", i))(gt || {}), U = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(U || {});
|
|
3699
3699
|
class mt extends w {
|
|
3700
3700
|
}
|
|
3701
|
-
class
|
|
3701
|
+
class Rr extends w {
|
|
3702
3702
|
}
|
|
3703
3703
|
class ns extends w {
|
|
3704
3704
|
}
|
|
@@ -3717,7 +3717,7 @@ class B extends w {
|
|
|
3717
3717
|
});
|
|
3718
3718
|
}
|
|
3719
3719
|
}
|
|
3720
|
-
class
|
|
3720
|
+
class Pr extends w {
|
|
3721
3721
|
}
|
|
3722
3722
|
class yt extends w {
|
|
3723
3723
|
}
|
|
@@ -3725,7 +3725,7 @@ class $e extends w {
|
|
|
3725
3725
|
}
|
|
3726
3726
|
class ee extends w {
|
|
3727
3727
|
}
|
|
3728
|
-
class
|
|
3728
|
+
class Dr extends w {
|
|
3729
3729
|
}
|
|
3730
3730
|
class wt extends w {
|
|
3731
3731
|
}
|
|
@@ -3748,10 +3748,10 @@ class os {
|
|
|
3748
3748
|
return r.id === 0 && r.slug === "-undefined-";
|
|
3749
3749
|
}
|
|
3750
3750
|
}
|
|
3751
|
-
class Dr extends w {
|
|
3752
|
-
}
|
|
3753
3751
|
class Ar extends w {
|
|
3754
3752
|
}
|
|
3753
|
+
class $r extends w {
|
|
3754
|
+
}
|
|
3755
3755
|
class Ne extends re {
|
|
3756
3756
|
/**
|
|
3757
3757
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
@@ -3837,7 +3837,7 @@ class z extends Ue {
|
|
|
3837
3837
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
class
|
|
3840
|
+
class Tr extends pr {
|
|
3841
3841
|
/**
|
|
3842
3842
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3843
3843
|
*
|
|
@@ -3898,7 +3898,7 @@ class $r extends pr {
|
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
3900
|
}
|
|
3901
|
-
class vt extends
|
|
3901
|
+
class vt extends Tr {
|
|
3902
3902
|
/**
|
|
3903
3903
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3904
3904
|
*
|
|
@@ -3908,7 +3908,7 @@ class vt extends $r {
|
|
|
3908
3908
|
super(r);
|
|
3909
3909
|
}
|
|
3910
3910
|
}
|
|
3911
|
-
class
|
|
3911
|
+
class br extends Tr {
|
|
3912
3912
|
/**
|
|
3913
3913
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3914
3914
|
*
|
|
@@ -3951,7 +3951,7 @@ class Tr extends $r {
|
|
|
3951
3951
|
e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
|
|
3952
3952
|
}
|
|
3953
3953
|
}
|
|
3954
|
-
class
|
|
3954
|
+
class Sr extends br {
|
|
3955
3955
|
/**
|
|
3956
3956
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3957
3957
|
*
|
|
@@ -3966,7 +3966,7 @@ class br extends Tr {
|
|
|
3966
3966
|
e && (this.kpp = e.kpp ?? "");
|
|
3967
3967
|
}
|
|
3968
3968
|
}
|
|
3969
|
-
class at extends
|
|
3969
|
+
class at extends Sr {
|
|
3970
3970
|
/**
|
|
3971
3971
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3972
3972
|
*
|
|
@@ -3998,9 +3998,9 @@ class Re {
|
|
|
3998
3998
|
static createInstance(r) {
|
|
3999
3999
|
switch (r.opf.slug) {
|
|
4000
4000
|
case U.Ic:
|
|
4001
|
-
return new Tr(r);
|
|
4002
|
-
case U.UlR:
|
|
4003
4001
|
return new br(r);
|
|
4002
|
+
case U.UlR:
|
|
4003
|
+
return new Sr(r);
|
|
4004
4004
|
case U.UlNr:
|
|
4005
4005
|
return new at(r);
|
|
4006
4006
|
default:
|
|
@@ -4141,10 +4141,10 @@ class rr extends te {
|
|
|
4141
4141
|
* @inheritDoc
|
|
4142
4142
|
*/
|
|
4143
4143
|
t(this, "extraData");
|
|
4144
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Re.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ue(u))) ?? [], this.channelPrimaryInterest = new
|
|
4144
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Re.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ue(u))) ?? [], this.channelPrimaryInterest = new Rr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new $r(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4145
4145
|
}
|
|
4146
4146
|
}
|
|
4147
|
-
class
|
|
4147
|
+
class dr {
|
|
4148
4148
|
/**
|
|
4149
4149
|
* Возвращает очищенное значение фильтров, содержащие
|
|
4150
4150
|
* только актуальные данные.
|
|
@@ -4158,7 +4158,7 @@ class Sr {
|
|
|
4158
4158
|
}), r;
|
|
4159
4159
|
}
|
|
4160
4160
|
}
|
|
4161
|
-
class cs extends
|
|
4161
|
+
class cs extends dr {
|
|
4162
4162
|
/**
|
|
4163
4163
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4164
4164
|
*
|
|
@@ -4328,7 +4328,7 @@ class cs extends Sr {
|
|
|
4328
4328
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, e;
|
|
4329
4329
|
}
|
|
4330
4330
|
}
|
|
4331
|
-
class
|
|
4331
|
+
class kr extends re {
|
|
4332
4332
|
/**
|
|
4333
4333
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4334
4334
|
*
|
|
@@ -4384,7 +4384,7 @@ class Rt extends S {
|
|
|
4384
4384
|
* @inheritDoc
|
|
4385
4385
|
*/
|
|
4386
4386
|
t(this, "curators");
|
|
4387
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new
|
|
4387
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new kr(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new F(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
|
|
4388
4388
|
}
|
|
4389
4389
|
}
|
|
4390
4390
|
class Pt {
|
|
@@ -5187,7 +5187,7 @@ const Y = class Y extends p {
|
|
|
5187
5187
|
*/
|
|
5188
5188
|
cacheResponse(e, s) {
|
|
5189
5189
|
Y.responseDataCache.set(e, {
|
|
5190
|
-
validTo:
|
|
5190
|
+
validTo: Gr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5191
5191
|
val: s
|
|
5192
5192
|
});
|
|
5193
5193
|
}
|
|
@@ -5347,17 +5347,17 @@ class ms {
|
|
|
5347
5347
|
* Возвращает диапазон дат по умолчанию.
|
|
5348
5348
|
*/
|
|
5349
5349
|
static defaultDateRanges() {
|
|
5350
|
-
const r =
|
|
5350
|
+
const r = Br(/* @__PURE__ */ new Date(), 1);
|
|
5351
5351
|
return {
|
|
5352
5352
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5353
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5354
|
-
today: { label: "Сегодня", from: Oe(), to:
|
|
5355
|
-
yesterday: { label: "Вчера", from:
|
|
5356
|
-
tomorrow: { label: "Завтра", from:
|
|
5353
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Qr(r), to: Kr(r) },
|
|
5354
|
+
today: { label: "Сегодня", from: Oe(), to: Vr() },
|
|
5355
|
+
yesterday: { label: "Вчера", from: Er(), to: Jr() },
|
|
5356
|
+
tomorrow: { label: "Завтра", from: Wr(), to: zr() }
|
|
5357
5357
|
};
|
|
5358
5358
|
}
|
|
5359
5359
|
}
|
|
5360
|
-
class
|
|
5360
|
+
class Ir {
|
|
5361
5361
|
/**
|
|
5362
5362
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5363
5363
|
*
|
|
@@ -5373,7 +5373,7 @@ class kr {
|
|
|
5373
5373
|
*/
|
|
5374
5374
|
static getProductMultiplicity(r) {
|
|
5375
5375
|
var e, s;
|
|
5376
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5376
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !Ir.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5377
5377
|
}
|
|
5378
5378
|
/**
|
|
5379
5379
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5485,7 +5485,7 @@ class ws {
|
|
|
5485
5485
|
this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (s = r == null ? void 0 : r.delivery.address) == null ? void 0 : s.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
|
|
5486
5486
|
}
|
|
5487
5487
|
}
|
|
5488
|
-
class
|
|
5488
|
+
class Lr extends kr {
|
|
5489
5489
|
/**
|
|
5490
5490
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5491
5491
|
*
|
|
@@ -5571,7 +5571,7 @@ class T extends me {
|
|
|
5571
5571
|
* первичного интереса.
|
|
5572
5572
|
*/
|
|
5573
5573
|
getChannelPrimaryInterest() {
|
|
5574
|
-
return this.getTypedDataArrayRequester(
|
|
5574
|
+
return this.getTypedDataArrayRequester(Rr, "/internal/references/channel-primary-interest", !0);
|
|
5575
5575
|
}
|
|
5576
5576
|
/**
|
|
5577
5577
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
@@ -5608,7 +5608,7 @@ class T extends me {
|
|
|
5608
5608
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
5609
5609
|
*/
|
|
5610
5610
|
getOperators() {
|
|
5611
|
-
return this.getTypedDataArrayRequester(
|
|
5611
|
+
return this.getTypedDataArrayRequester(Pr, "/internal/references/operator", !0);
|
|
5612
5612
|
}
|
|
5613
5613
|
/**
|
|
5614
5614
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
@@ -5626,13 +5626,13 @@ class T extends me {
|
|
|
5626
5626
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5627
5627
|
*/
|
|
5628
5628
|
getPaymentTypes() {
|
|
5629
|
-
return this.getTypedDataArrayRequester(
|
|
5629
|
+
return this.getTypedDataArrayRequester(Dr, "/public/references/payment-type", !0);
|
|
5630
5630
|
}
|
|
5631
5631
|
/**
|
|
5632
5632
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5633
5633
|
*/
|
|
5634
5634
|
getResourceTypes() {
|
|
5635
|
-
return this.getTypedDataArrayRequester(
|
|
5635
|
+
return this.getTypedDataArrayRequester(Ar, "/internal/references/resource-type", !0);
|
|
5636
5636
|
}
|
|
5637
5637
|
/**
|
|
5638
5638
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
@@ -5644,7 +5644,7 @@ class T extends me {
|
|
|
5644
5644
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5645
5645
|
*/
|
|
5646
5646
|
getSourcePrimaryInterest() {
|
|
5647
|
-
return this.getTypedDataArrayRequester(
|
|
5647
|
+
return this.getTypedDataArrayRequester($r, "/internal/references/source-primary-interest", !0);
|
|
5648
5648
|
}
|
|
5649
5649
|
/**
|
|
5650
5650
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5686,7 +5686,7 @@ class T extends me {
|
|
|
5686
5686
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5687
5687
|
*/
|
|
5688
5688
|
getPropertyTypes() {
|
|
5689
|
-
return this.getTypedDataArrayRequester(
|
|
5689
|
+
return this.getTypedDataArrayRequester(Cr, "/internal/references/property-type", !0);
|
|
5690
5690
|
}
|
|
5691
5691
|
/**
|
|
5692
5692
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -5948,7 +5948,7 @@ const $ = W("common.references_private", () => {
|
|
|
5948
5948
|
priceCoefficientsReference: be
|
|
5949
5949
|
};
|
|
5950
5950
|
});
|
|
5951
|
-
class as extends
|
|
5951
|
+
class as extends dr {
|
|
5952
5952
|
/**
|
|
5953
5953
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5954
5954
|
*
|
|
@@ -6049,7 +6049,7 @@ class as extends Sr {
|
|
|
6049
6049
|
* @inheritDoc
|
|
6050
6050
|
*/
|
|
6051
6051
|
t(this, "onlyMyRegions");
|
|
6052
|
-
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new ve(u) : new
|
|
6052
|
+
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new ve(u) : new Pr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new _(e.creator) : void 0, this.deliveryDate = new b(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new De(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new b(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Dr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
6053
6053
|
}
|
|
6054
6054
|
/**
|
|
6055
6055
|
* @inheritDoc
|
|
@@ -6158,7 +6158,7 @@ class St extends fr {
|
|
|
6158
6158
|
this.product = new j(e.product), this.currency = new O(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing, s && (this.replacement = s, this.quantity !== s.quantity && this.changedFields.push("quantity"), this.length !== s.length && this.changedFields.push("length"));
|
|
6159
6159
|
}
|
|
6160
6160
|
}
|
|
6161
|
-
class d extends
|
|
6161
|
+
class d extends Lr {
|
|
6162
6162
|
/**
|
|
6163
6163
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6164
6164
|
*
|
|
@@ -6272,7 +6272,7 @@ class Cs extends Ae {
|
|
|
6272
6272
|
{},
|
|
6273
6273
|
(o) => {
|
|
6274
6274
|
const c = { ...o.data };
|
|
6275
|
-
return c.data = c.data.map((u) => new
|
|
6275
|
+
return c.data = c.data.map((u) => new Lr(u)), c;
|
|
6276
6276
|
},
|
|
6277
6277
|
void 0,
|
|
6278
6278
|
n
|
|
@@ -6362,6 +6362,17 @@ class Cs extends Ae {
|
|
|
6362
6362
|
detachOrder(r) {
|
|
6363
6363
|
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
|
|
6364
6364
|
}
|
|
6365
|
+
/**
|
|
6366
|
+
* Объединяет указанные заказы в базовый заказ и возвращает обновлённые данные базового заказа.
|
|
6367
|
+
*
|
|
6368
|
+
* @param orderId Идентификатор базового заказа, в который переносятся товары.
|
|
6369
|
+
* @param ids Идентификаторы заказов, товары которых необходимо перенести в базовый заказ.
|
|
6370
|
+
*
|
|
6371
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_merge
|
|
6372
|
+
*/
|
|
6373
|
+
mergeOrders(r, e) {
|
|
6374
|
+
return this.patch(`/internal/orders/${r}/merge`, { ids: e }, (s) => new d(s.data));
|
|
6375
|
+
}
|
|
6365
6376
|
/**
|
|
6366
6377
|
* Пересчитывает стоимость корзины указанного заказа и возвращает обновлённые данные заказа.
|
|
6367
6378
|
*
|
|
@@ -6909,7 +6920,7 @@ class ir {
|
|
|
6909
6920
|
*/
|
|
6910
6921
|
t(this, "tags");
|
|
6911
6922
|
var e;
|
|
6912
|
-
this.resourceType = new
|
|
6923
|
+
this.resourceType = new Ar(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new Lt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
6913
6924
|
}
|
|
6914
6925
|
}
|
|
6915
6926
|
class As extends p {
|
|
@@ -6991,7 +7002,7 @@ class $s extends p {
|
|
|
6991
7002
|
}
|
|
6992
7003
|
}
|
|
6993
7004
|
var _t = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(_t || {});
|
|
6994
|
-
class xt extends
|
|
7005
|
+
class xt extends ar {
|
|
6995
7006
|
/**
|
|
6996
7007
|
* Инициализирует экземпляр класса {@link User}.
|
|
6997
7008
|
*
|
|
@@ -7011,7 +7022,11 @@ class xt extends vr {
|
|
|
7011
7022
|
* URI путь к фотографии пользователя.
|
|
7012
7023
|
*/
|
|
7013
7024
|
t(this, "photo");
|
|
7014
|
-
|
|
7025
|
+
/**
|
|
7026
|
+
* Роль ценообразования текущего пользователя.
|
|
7027
|
+
*/
|
|
7028
|
+
t(this, "pricingRole");
|
|
7029
|
+
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, this.pricingRole = e != null && e.pricingRole ? new wr(e.pricingRole) : void 0;
|
|
7015
7030
|
}
|
|
7016
7031
|
}
|
|
7017
7032
|
class Ts extends p {
|
|
@@ -7089,17 +7104,17 @@ class Ss {
|
|
|
7089
7104
|
}
|
|
7090
7105
|
export {
|
|
7091
7106
|
mt as AnyReference,
|
|
7092
|
-
|
|
7107
|
+
st as AppBaseConfig,
|
|
7093
7108
|
Ne as BankAccount,
|
|
7094
7109
|
Ae as BasePaginationProvider,
|
|
7095
|
-
|
|
7110
|
+
ut as CalculationTypeEnum,
|
|
7096
7111
|
ne as Cart,
|
|
7097
7112
|
Jt as CartProvider,
|
|
7098
7113
|
Vt as CatalogProvider,
|
|
7099
7114
|
hr as CatalogableItem,
|
|
7100
7115
|
N as Category,
|
|
7101
7116
|
Ye as CategoryPricingRule,
|
|
7102
|
-
|
|
7117
|
+
Rr as ChannelPrimaryInterest,
|
|
7103
7118
|
ns as City,
|
|
7104
7119
|
De as CityWithRegionAndCountry,
|
|
7105
7120
|
rr as Client,
|
|
@@ -7123,12 +7138,12 @@ export {
|
|
|
7123
7138
|
Ct as ContactPersonRelated,
|
|
7124
7139
|
ft as ContactPosition,
|
|
7125
7140
|
Ie as ContactRelation,
|
|
7126
|
-
|
|
7141
|
+
Tr as ContragentBase,
|
|
7127
7142
|
Re as ContragentFactory,
|
|
7128
|
-
|
|
7143
|
+
br as ContragentIc,
|
|
7129
7144
|
vt as ContragentPerson,
|
|
7130
7145
|
at as ContragentUlNr,
|
|
7131
|
-
|
|
7146
|
+
Sr as ContragentUlR,
|
|
7132
7147
|
Ge as CostSourceEnum,
|
|
7133
7148
|
Z as Country,
|
|
7134
7149
|
ze as CuratedDirection,
|
|
@@ -7143,19 +7158,19 @@ export {
|
|
|
7143
7158
|
ue as DeliveryAddress,
|
|
7144
7159
|
F as DeliveryType,
|
|
7145
7160
|
zt as DetailedJwtPayload,
|
|
7146
|
-
|
|
7147
|
-
|
|
7161
|
+
Zr as DeviceTypeResolutionConfig,
|
|
7162
|
+
ot as DiscountShortInfo,
|
|
7148
7163
|
Ss as FieldValidationResultData,
|
|
7149
7164
|
G as FilterGroup,
|
|
7150
7165
|
Xe as FilterItem,
|
|
7151
7166
|
Je as FilterOpEnum,
|
|
7152
7167
|
mr as GeoCoordinates,
|
|
7153
|
-
|
|
7168
|
+
nt as HiddenCatalogableItem,
|
|
7154
7169
|
me as HttpCachedRequester,
|
|
7155
|
-
|
|
7170
|
+
et as HttpParamsConfig,
|
|
7156
7171
|
p as HttpRequester,
|
|
7157
7172
|
re as Identity,
|
|
7158
|
-
|
|
7173
|
+
it as Image,
|
|
7159
7174
|
M as JwtPayload,
|
|
7160
7175
|
ve as Manager,
|
|
7161
7176
|
Be as ManagerCommon,
|
|
@@ -7163,26 +7178,26 @@ export {
|
|
|
7163
7178
|
At as ManagerDataProvider,
|
|
7164
7179
|
Lt as MetaTagItem,
|
|
7165
7180
|
S as NamedIdentity,
|
|
7166
|
-
|
|
7181
|
+
Pr as Operator,
|
|
7167
7182
|
B as Opf,
|
|
7168
7183
|
U as OpfEnum,
|
|
7169
7184
|
d as Order,
|
|
7170
7185
|
$t as OrderAction,
|
|
7171
7186
|
ws as OrderEditorData,
|
|
7172
|
-
|
|
7187
|
+
Lr as OrderInfo,
|
|
7173
7188
|
St as OrderItem,
|
|
7174
7189
|
fr as OrderItemBase,
|
|
7175
7190
|
yt as OrderPaymentStatus,
|
|
7176
|
-
|
|
7191
|
+
kr as OrderShortInfo,
|
|
7177
7192
|
$e as OrderStatus,
|
|
7178
7193
|
bt as OrderStatusDetailEnum,
|
|
7179
7194
|
Tt as OrderStatusEnum,
|
|
7180
7195
|
dt as OrderStatusHistoryInfo,
|
|
7181
7196
|
Cs as OrdersDataProvider,
|
|
7182
7197
|
as as OrdersListFilters,
|
|
7183
|
-
|
|
7198
|
+
dr as PaginationFiltersBase,
|
|
7184
7199
|
ee as PartnerGroup,
|
|
7185
|
-
|
|
7200
|
+
Dr as PaymentType,
|
|
7186
7201
|
ae as PreferencesStorageProvider,
|
|
7187
7202
|
Le as PriceAnalyze,
|
|
7188
7203
|
Rs as PriceAnalyzeProvider,
|
|
@@ -7193,7 +7208,7 @@ export {
|
|
|
7193
7208
|
Q as PriceTemplate,
|
|
7194
7209
|
de as PriceTemplateCategory,
|
|
7195
7210
|
oe as PriceTemplateClient,
|
|
7196
|
-
|
|
7211
|
+
vr as PriceTemplateICatalogableItem,
|
|
7197
7212
|
ke as PriceTemplateProduct,
|
|
7198
7213
|
rs as PriceTemplateProvider,
|
|
7199
7214
|
le as PricingRole,
|
|
@@ -7208,8 +7223,8 @@ export {
|
|
|
7208
7223
|
Qe as ProductUnit,
|
|
7209
7224
|
ss as PropertiesProvider,
|
|
7210
7225
|
ce as Property,
|
|
7211
|
-
|
|
7212
|
-
|
|
7226
|
+
Cr as PropertyType,
|
|
7227
|
+
pt as PropertyTypeEnum,
|
|
7213
7228
|
K as PropertyValue,
|
|
7214
7229
|
Ds as RecommendationsDataProvider,
|
|
7215
7230
|
sr as RecommendationsList,
|
|
@@ -7217,29 +7232,29 @@ export {
|
|
|
7217
7232
|
os as ReferenceDataFactory,
|
|
7218
7233
|
T as ReferenceDataProvider,
|
|
7219
7234
|
ge as Region,
|
|
7220
|
-
|
|
7235
|
+
Ar as ResourceType,
|
|
7221
7236
|
q as SalesDirection,
|
|
7222
|
-
|
|
7237
|
+
rt as SentryConfig,
|
|
7223
7238
|
ir as Seo,
|
|
7224
7239
|
As as SeoDataProvider,
|
|
7225
|
-
|
|
7226
|
-
|
|
7240
|
+
$r as SourcePrimaryInterest,
|
|
7241
|
+
ct as StockCount,
|
|
7227
7242
|
is as TemplateProductCategoryDataProvider,
|
|
7228
7243
|
Et as TemplatesListFilters,
|
|
7229
7244
|
Me as TypedInstanceFactory,
|
|
7230
|
-
|
|
7245
|
+
Ir as UnitsHelper,
|
|
7231
7246
|
ps as UnknownClientDataProvider,
|
|
7232
7247
|
ur as UpdatableNamedIdentity,
|
|
7233
7248
|
xt as User,
|
|
7234
7249
|
Ts as UserAuthDataProvider,
|
|
7235
|
-
|
|
7250
|
+
ar as UserCommonInfo,
|
|
7236
7251
|
Ot as UserDataProvider,
|
|
7237
|
-
|
|
7252
|
+
wr as UserPricingRole,
|
|
7238
7253
|
_ as UserShortInfo,
|
|
7239
7254
|
_t as UserTypeEnum,
|
|
7240
7255
|
hs as VersionConfig,
|
|
7241
7256
|
ye as Warehouse,
|
|
7242
|
-
|
|
7257
|
+
tt as WebSocketConfig,
|
|
7243
7258
|
Ze as findCatalogItemByIdRecursive,
|
|
7244
7259
|
er as flattenCatalogItems,
|
|
7245
7260
|
fs as pluralize,
|