@snabcentr/common-lib 2.1.0-dev → 2.3.0-dev
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 +6 -0
- package/dist/sc-common-lib.js +312 -292
- 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/classes/orders-list-filters.d.ts +1 -1
- package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts +2 -2
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts.map +1 -1
- package/dist/src/orders/providers/orders-data-provider.d.ts +16 -0
- package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
- package/dist/src/references/enums/order-status-enum.d.ts +22 -10
- package/dist/src/references/enums/order-status-enum.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/visual_stats.html +0 -4949
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Lr = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
2
|
+
var dr = (n, r, e) => r in n ? Lr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => dr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as nr } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
5
|
+
import { merge as le, isNil as $, isEmpty as X, noop as v, mapValues as or, isArray as F, every as xr, split as Or, isString as C, constant as _r, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as ge, forEach as Hr, isDate as Oe, omitBy as cr, isObject as lr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
|
-
import { defineStore as
|
|
7
|
+
import { defineStore as W } from "pinia";
|
|
8
8
|
import { ref as y, markRaw as Fr, computed as D } from "vue";
|
|
9
|
-
import { isAfter as Ve, parseISO as R, startOfToday as _e, format as
|
|
9
|
+
import { isAfter as Ve, parseISO as R, startOfToday as _e, format as H, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
|
|
10
10
|
import Kr, { CanceledError as Qr } from "axios";
|
|
11
|
-
class
|
|
11
|
+
class j {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class F {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
le(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class F {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e = nr(r), s = new
|
|
110
|
+
const e = nr(r), s = new j(Fe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class Mt extends
|
|
114
|
+
class Mt extends j {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class Mt extends F {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
le(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,7 +151,7 @@ class Mt extends F {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new
|
|
154
|
+
return new j(Fe(nr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
class Yr {
|
|
@@ -336,7 +336,7 @@ class rt {
|
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
const I =
|
|
339
|
+
const I = W("common.config", () => {
|
|
340
340
|
const n = y(new rt());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
@@ -355,7 +355,7 @@ const I = z("common.config", () => {
|
|
|
355
355
|
* @param appConfig Конфигурация приложения.
|
|
356
356
|
*/
|
|
357
357
|
setConfig: (s) => {
|
|
358
|
-
n.value =
|
|
358
|
+
n.value = le(n.value, s);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
@@ -379,7 +379,7 @@ class we {
|
|
|
379
379
|
try {
|
|
380
380
|
const s = JSON.parse(e);
|
|
381
381
|
if (!s.availableFor || Ve(R(s.availableFor) || _e(), /* @__PURE__ */ new Date())) {
|
|
382
|
-
if (
|
|
382
|
+
if ($(s.data) || X(s.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return s.data;
|
|
385
385
|
}
|
|
@@ -401,7 +401,7 @@ class we {
|
|
|
401
401
|
static saveActualDataToStorage(r, e, s) {
|
|
402
402
|
if (this.isLocalStorageAvailable())
|
|
403
403
|
try {
|
|
404
|
-
if (
|
|
404
|
+
if ($(e) || X(e))
|
|
405
405
|
throw new Error("Data is empty");
|
|
406
406
|
const i = JSON.stringify({
|
|
407
407
|
availableFor: s,
|
|
@@ -470,13 +470,13 @@ class we {
|
|
|
470
470
|
}
|
|
471
471
|
function Ke(n) {
|
|
472
472
|
try {
|
|
473
|
-
const r =
|
|
473
|
+
const r = j.getJwtPayload(n);
|
|
474
474
|
return new Date(r.exp * 1e3);
|
|
475
475
|
} catch {
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const V = W("common.auth_state_private", () => {
|
|
480
480
|
const n = y(
|
|
481
481
|
(() => {
|
|
482
482
|
var u;
|
|
@@ -491,8 +491,8 @@ const E = z("common.auth_state_private", () => {
|
|
|
491
491
|
})()
|
|
492
492
|
), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
|
|
493
493
|
function i() {
|
|
494
|
-
e.value = void 0,
|
|
495
|
-
const c =
|
|
494
|
+
e.value = void 0, $(n.value) || n.value.then((o) => {
|
|
495
|
+
const c = j.getJwtPayload(o);
|
|
496
496
|
e.value = c.exp * 1e3 > Date.now() ? or(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(v);
|
|
498
498
|
}
|
|
@@ -518,10 +518,10 @@ const E = z("common.auth_state_private", () => {
|
|
|
518
518
|
*/
|
|
519
519
|
recalculateUserPermissions: i
|
|
520
520
|
};
|
|
521
|
-
}), Se =
|
|
521
|
+
}), Se = W("common.auth_state", () => {
|
|
522
522
|
const n = D(() => {
|
|
523
|
-
const o =
|
|
524
|
-
if (
|
|
523
|
+
const o = V();
|
|
524
|
+
if ($(o.jwtToken) && !$(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
526
|
o.jwtToken = c, c.then((u) => {
|
|
527
527
|
o.jwtToken = Promise.resolve(u), we.saveActualDataToStorage("sc.token", u, Ke(u)), o.recalculateUserPermissions();
|
|
@@ -530,35 +530,35 @@ const E = z("common.auth_state_private", () => {
|
|
|
530
530
|
return o.jwtToken;
|
|
531
531
|
});
|
|
532
532
|
function r(o) {
|
|
533
|
-
|
|
533
|
+
V().jwtTokenUpdater = o;
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
|
-
const c =
|
|
536
|
+
const c = V();
|
|
537
537
|
c.jwtToken = Promise.resolve(o), we.saveActualDataToStorage("sc.token", o, Ke(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function s() {
|
|
540
|
-
const o =
|
|
540
|
+
const o = V();
|
|
541
541
|
o.jwtToken = void 0, o.userPermissions = void 0, we.saveActualDataToStorage("sc.token", void 0);
|
|
542
542
|
}
|
|
543
543
|
function i(o) {
|
|
544
|
-
const c =
|
|
545
|
-
|
|
546
|
-
const f =
|
|
544
|
+
const c = V();
|
|
545
|
+
!$(c.jwtToken) && $(c.userPermissions) && c.jwtToken.then((m) => {
|
|
546
|
+
const f = j.getJwtPayload(m);
|
|
547
547
|
c.userPermissions = f.exp * 1e3 > Date.now() ? or(f.resourceAccess, (A) => (A == null ? void 0 : A.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(v);
|
|
549
|
-
const u =
|
|
549
|
+
const u = F(o) ? o.join(" && ") : o;
|
|
550
550
|
if (c.userPermissionsComputedRefs.has(u))
|
|
551
551
|
return c.userPermissionsComputedRefs.get(u);
|
|
552
552
|
const h = D(() => {
|
|
553
553
|
const m = (f) => {
|
|
554
|
-
var
|
|
554
|
+
var E;
|
|
555
555
|
const A = Or(f, ".");
|
|
556
556
|
if (A.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [
|
|
559
|
-
return
|
|
558
|
+
const [se, ie] = A, J = (E = V().userPermissions) == null ? void 0 : E[se];
|
|
559
|
+
return F(J) && J.includes(ie);
|
|
560
560
|
};
|
|
561
|
-
return
|
|
561
|
+
return F(o) ? xr(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
563
563
|
return c.userPermissionsComputedRefs.set(u, h), h;
|
|
564
564
|
}
|
|
@@ -591,7 +591,7 @@ const E = z("common.auth_state_private", () => {
|
|
|
591
591
|
hasUserPermission: i
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
|
-
class
|
|
594
|
+
class re {
|
|
595
595
|
/**
|
|
596
596
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
597
597
|
*
|
|
@@ -607,16 +607,16 @@ class te {
|
|
|
607
607
|
* @inheritDoc
|
|
608
608
|
*/
|
|
609
609
|
t(this, "guid");
|
|
610
|
-
this.id = r == null ? void 0 : r.id,
|
|
610
|
+
this.id = r == null ? void 0 : r.id, $(this.id) && ($(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
613
613
|
* Возвращает признак, что это новая запись.
|
|
614
614
|
*/
|
|
615
615
|
isNewRec() {
|
|
616
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
616
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class b extends
|
|
619
|
+
class b extends re {
|
|
620
620
|
/**
|
|
621
621
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
622
622
|
*
|
|
@@ -631,7 +631,7 @@ class b extends te {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class ue extends b {
|
|
635
635
|
/**
|
|
636
636
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
637
637
|
*
|
|
@@ -718,7 +718,7 @@ class st {
|
|
|
718
718
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
719
719
|
}
|
|
720
720
|
}
|
|
721
|
-
class pr extends
|
|
721
|
+
class pr extends ue {
|
|
722
722
|
/**
|
|
723
723
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
724
724
|
*
|
|
@@ -916,9 +916,9 @@ class gr {
|
|
|
916
916
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
class
|
|
919
|
+
class U extends w {
|
|
920
920
|
}
|
|
921
|
-
class
|
|
921
|
+
class me extends w {
|
|
922
922
|
/**
|
|
923
923
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
924
924
|
*
|
|
@@ -947,7 +947,7 @@ class Z extends w {
|
|
|
947
947
|
* Координаты склада.
|
|
948
948
|
*/
|
|
949
949
|
t(this, "coordinates");
|
|
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((i) => new
|
|
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((i) => new U(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new gr(e == null ? void 0 : e.coordinates);
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
953
|
class ot {
|
|
@@ -965,10 +965,10 @@ class ot {
|
|
|
965
965
|
* Количество остатков товара на складе.
|
|
966
966
|
*/
|
|
967
967
|
t(this, "count");
|
|
968
|
-
this.warehouse = new
|
|
968
|
+
this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
969
969
|
}
|
|
970
970
|
}
|
|
971
|
-
class
|
|
971
|
+
class x extends b {
|
|
972
972
|
/**
|
|
973
973
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
974
974
|
*
|
|
@@ -1099,7 +1099,7 @@ class k 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
|
|
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 x(e.currency) : new x(), 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 = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((h) => new ot(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
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 st(h, I().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 Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1105
1105
|
}
|
|
@@ -1123,7 +1123,7 @@ class k extends it {
|
|
|
1123
1123
|
}
|
|
1124
1124
|
}
|
|
1125
1125
|
var Me = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Me || {});
|
|
1126
|
-
class
|
|
1126
|
+
class G extends k {
|
|
1127
1127
|
/**
|
|
1128
1128
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1129
1129
|
*
|
|
@@ -1189,7 +1189,7 @@ class fe extends qe {
|
|
|
1189
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, i]) => [qr(s), i])) : void 0;
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
|
-
class mr extends
|
|
1192
|
+
class mr extends re {
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
1195
1195
|
*
|
|
@@ -1261,7 +1261,7 @@ class mr extends te {
|
|
|
1261
1261
|
* @inheritDoc
|
|
1262
1262
|
*/
|
|
1263
1263
|
t(this, "originalId");
|
|
1264
|
-
this.product = new
|
|
1264
|
+
this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
|
|
1265
1265
|
}
|
|
1266
1266
|
}
|
|
1267
1267
|
let ct = class extends mr {
|
|
@@ -1308,7 +1308,7 @@ let ct = class extends mr {
|
|
|
1308
1308
|
* @inheritDoc
|
|
1309
1309
|
*/
|
|
1310
1310
|
t(this, "currency");
|
|
1311
|
-
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 =
|
|
1311
|
+
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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new x(e.currency);
|
|
1312
1312
|
}
|
|
1313
1313
|
};
|
|
1314
1314
|
class ye {
|
|
@@ -1372,7 +1372,7 @@ const P = class P {
|
|
|
1372
1372
|
// eslint-disable-next-line class-methods-use-this
|
|
1373
1373
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1374
1374
|
let e;
|
|
1375
|
-
return
|
|
1375
|
+
return $(Se().jwtToken) || (e = await Se().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1376
1376
|
});
|
|
1377
1377
|
/**
|
|
1378
1378
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1497,8 +1497,8 @@ const P = class P {
|
|
|
1497
1497
|
*/
|
|
1498
1498
|
static convertHttpErrorResponse(r) {
|
|
1499
1499
|
var e, s;
|
|
1500
|
-
if (
|
|
1501
|
-
const i =
|
|
1500
|
+
if ($(r) || !$(r.request) || !$(r.response)) {
|
|
1501
|
+
const i = $(r) ? {} : r == null ? void 0 : r.response;
|
|
1502
1502
|
return Promise.reject({
|
|
1503
1503
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
1504
1504
|
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
@@ -1717,7 +1717,7 @@ class zt extends p {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
}
|
|
1719
1719
|
var lt = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(lt || {}), ut = /* @__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))(ut || {});
|
|
1720
|
-
class
|
|
1720
|
+
class q extends fe {
|
|
1721
1721
|
/**
|
|
1722
1722
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1723
1723
|
*
|
|
@@ -1734,7 +1734,7 @@ class _ extends fe {
|
|
|
1734
1734
|
* Список продуктов категории.
|
|
1735
1735
|
*/
|
|
1736
1736
|
t(this, "products");
|
|
1737
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1737
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new k(o));
|
|
1738
1738
|
}
|
|
1739
1739
|
}
|
|
1740
1740
|
class fr {
|
|
@@ -1901,7 +1901,7 @@ class ve extends ht {
|
|
|
1901
1901
|
* Список продуктов категории.
|
|
1902
1902
|
*/
|
|
1903
1903
|
t(this, "products");
|
|
1904
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ve(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new
|
|
1904
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ve(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new G(o));
|
|
1905
1905
|
}
|
|
1906
1906
|
}
|
|
1907
1907
|
class yr {
|
|
@@ -1960,9 +1960,9 @@ class We extends b {
|
|
|
1960
1960
|
this.photo = e.photo, this.contacts = new fr(e.contacts), this.curatedDirection = new ze(e.curatedDirection);
|
|
1961
1961
|
}
|
|
1962
1962
|
}
|
|
1963
|
-
class
|
|
1963
|
+
class Z extends w {
|
|
1964
1964
|
}
|
|
1965
|
-
class
|
|
1965
|
+
class pe extends w {
|
|
1966
1966
|
/**
|
|
1967
1967
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1968
1968
|
*
|
|
@@ -1973,8 +1973,8 @@ class he extends w {
|
|
|
1973
1973
|
/**
|
|
1974
1974
|
* Данные о стране, в которой расположен регион.
|
|
1975
1975
|
*/
|
|
1976
|
-
t(this, "country", new
|
|
1977
|
-
e && (this.country = new
|
|
1976
|
+
t(this, "country", new Z());
|
|
1977
|
+
e && (this.country = new Z(e.country));
|
|
1978
1978
|
}
|
|
1979
1979
|
}
|
|
1980
1980
|
class Ae extends w {
|
|
@@ -1988,8 +1988,8 @@ class Ae extends w {
|
|
|
1988
1988
|
/**
|
|
1989
1989
|
* Данные о регионе, в котором расположен город.
|
|
1990
1990
|
*/
|
|
1991
|
-
t(this, "region", new
|
|
1992
|
-
e && (this.region = new
|
|
1991
|
+
t(this, "region", new pe());
|
|
1992
|
+
e && (this.region = new pe(e.region));
|
|
1993
1993
|
}
|
|
1994
1994
|
}
|
|
1995
1995
|
class wr extends b {
|
|
@@ -2031,7 +2031,7 @@ class wr extends b {
|
|
|
2031
2031
|
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 O(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;
|
|
2032
2032
|
}
|
|
2033
2033
|
}
|
|
2034
|
-
class
|
|
2034
|
+
class te extends wr {
|
|
2035
2035
|
/**
|
|
2036
2036
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2037
2037
|
*
|
|
@@ -2080,7 +2080,7 @@ class se extends wr {
|
|
|
2080
2080
|
this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ae(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
|
-
class
|
|
2083
|
+
class ne extends re {
|
|
2084
2084
|
/**
|
|
2085
2085
|
* Инициализирует новый экземпляр класса.
|
|
2086
2086
|
*
|
|
@@ -2104,7 +2104,7 @@ class oe extends te {
|
|
|
2104
2104
|
* Данные шаблона прайс-листа.
|
|
2105
2105
|
*/
|
|
2106
2106
|
t(this, "priceTemplate");
|
|
2107
|
-
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
|
|
2107
|
+
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);
|
|
2108
2108
|
}
|
|
2109
2109
|
}
|
|
2110
2110
|
class Ie extends yr {
|
|
@@ -2124,7 +2124,7 @@ class Ie extends yr {
|
|
|
2124
2124
|
}
|
|
2125
2125
|
class vr extends w {
|
|
2126
2126
|
}
|
|
2127
|
-
class
|
|
2127
|
+
class oe extends b {
|
|
2128
2128
|
/**
|
|
2129
2129
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2130
2130
|
*
|
|
@@ -2147,7 +2147,7 @@ class ce extends b {
|
|
|
2147
2147
|
this.type = new vr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
2148
2148
|
}
|
|
2149
2149
|
}
|
|
2150
|
-
class
|
|
2150
|
+
class K {
|
|
2151
2151
|
/**
|
|
2152
2152
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
2153
2153
|
*
|
|
@@ -2163,7 +2163,7 @@ class V {
|
|
|
2163
2163
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2164
2164
|
*/
|
|
2165
2165
|
t(this, "value");
|
|
2166
|
-
this.property = new
|
|
2166
|
+
this.property = new oe(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2167
2167
|
}
|
|
2168
2168
|
}
|
|
2169
2169
|
class S {
|
|
@@ -2244,11 +2244,11 @@ class Wt {
|
|
|
2244
2244
|
return Object.keys(this).forEach((c) => {
|
|
2245
2245
|
const u = this[c];
|
|
2246
2246
|
// eslint-disable-next-line prettier/prettier
|
|
2247
|
-
|
|
2247
|
+
$(u) || C(u) && u.trim().length === 0 || He(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2248
2248
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
2249
2249
|
}
|
|
2250
2250
|
}
|
|
2251
|
-
class
|
|
2251
|
+
class ce extends b {
|
|
2252
2252
|
/**
|
|
2253
2253
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2254
2254
|
*
|
|
@@ -2302,7 +2302,7 @@ class Ye {
|
|
|
2302
2302
|
* Минимальный коэффициент цены.
|
|
2303
2303
|
*/
|
|
2304
2304
|
t(this, "minCoefficient");
|
|
2305
|
-
this.role = new
|
|
2305
|
+
this.role = new ce(r == null ? void 0 : r.role), this.category = new fe(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2306
2306
|
}
|
|
2307
2307
|
}
|
|
2308
2308
|
class Jt extends p {
|
|
@@ -2460,7 +2460,7 @@ class Et extends p {
|
|
|
2460
2460
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2461
2461
|
increase_percent: s.value
|
|
2462
2462
|
},
|
|
2463
|
-
(o) => new
|
|
2463
|
+
(o) => new G(o.data)
|
|
2464
2464
|
);
|
|
2465
2465
|
}
|
|
2466
2466
|
/**
|
|
@@ -2472,7 +2472,7 @@ class Et extends p {
|
|
|
2472
2472
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2473
2473
|
*/
|
|
2474
2474
|
removeProductPrice(r, e) {
|
|
2475
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
2475
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new G(s.data));
|
|
2476
2476
|
}
|
|
2477
2477
|
/**
|
|
2478
2478
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2547,7 +2547,7 @@ class Vt extends p {
|
|
|
2547
2547
|
return this.get(
|
|
2548
2548
|
`/internal/clients/${r}/price/templates`,
|
|
2549
2549
|
{},
|
|
2550
|
-
(e) => e.data.map((s) => new
|
|
2550
|
+
(e) => e.data.map((s) => new ne(s))
|
|
2551
2551
|
);
|
|
2552
2552
|
}
|
|
2553
2553
|
/**
|
|
@@ -2558,7 +2558,7 @@ class Vt extends p {
|
|
|
2558
2558
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2559
2559
|
*/
|
|
2560
2560
|
getActiveTemplate(r) {
|
|
2561
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2561
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ne(e.data), !0);
|
|
2562
2562
|
}
|
|
2563
2563
|
/**
|
|
2564
2564
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2574,10 +2574,10 @@ class Vt extends p {
|
|
|
2574
2574
|
return this.post(
|
|
2575
2575
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2576
2576
|
s && {
|
|
2577
|
-
startAt: s.startAt &&
|
|
2578
|
-
endAt: s.endAt &&
|
|
2577
|
+
startAt: s.startAt && H(s.startAt, i),
|
|
2578
|
+
endAt: s.endAt && H(s.endAt, i)
|
|
2579
2579
|
},
|
|
2580
|
-
(o) => new
|
|
2580
|
+
(o) => new ne(o.data),
|
|
2581
2581
|
{},
|
|
2582
2582
|
!0
|
|
2583
2583
|
);
|
|
@@ -2608,10 +2608,10 @@ class Vt extends p {
|
|
|
2608
2608
|
return this.patch(
|
|
2609
2609
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2610
2610
|
i && {
|
|
2611
|
-
startAt: i.startAt &&
|
|
2612
|
-
endAt: i.endAt &&
|
|
2611
|
+
startAt: i.startAt && H(i.startAt, o),
|
|
2612
|
+
endAt: i.endAt && H(i.endAt, o)
|
|
2613
2613
|
},
|
|
2614
|
-
(c) => new
|
|
2614
|
+
(c) => new ne(c.data)
|
|
2615
2615
|
);
|
|
2616
2616
|
}
|
|
2617
2617
|
/**
|
|
@@ -2641,7 +2641,7 @@ class Kt extends p {
|
|
|
2641
2641
|
{
|
|
2642
2642
|
showHidden: r
|
|
2643
2643
|
},
|
|
2644
|
-
(e) => e.data.map((s) => new
|
|
2644
|
+
(e) => e.data.map((s) => new q(s))
|
|
2645
2645
|
);
|
|
2646
2646
|
}
|
|
2647
2647
|
/**
|
|
@@ -2660,7 +2660,7 @@ class Kt extends p {
|
|
|
2660
2660
|
showHidden: e,
|
|
2661
2661
|
withNestedCategories: s
|
|
2662
2662
|
},
|
|
2663
|
-
(i) => new
|
|
2663
|
+
(i) => new q(i.data)
|
|
2664
2664
|
);
|
|
2665
2665
|
}
|
|
2666
2666
|
/**
|
|
@@ -2669,7 +2669,7 @@ class Kt extends p {
|
|
|
2669
2669
|
* @param categoryID Идентификатор категории продуктов.
|
|
2670
2670
|
*/
|
|
2671
2671
|
getPublicCategoryData(r) {
|
|
2672
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2672
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
|
|
2673
2673
|
}
|
|
2674
2674
|
/**
|
|
2675
2675
|
* Возвращает список продуктов категории.
|
|
@@ -2687,7 +2687,7 @@ class Kt extends p {
|
|
|
2687
2687
|
showHidden: s,
|
|
2688
2688
|
withPriceCoefficients: e
|
|
2689
2689
|
},
|
|
2690
|
-
(i) =>
|
|
2690
|
+
(i) => ge(i.data, (o) => new k(o))
|
|
2691
2691
|
);
|
|
2692
2692
|
}
|
|
2693
2693
|
/**
|
|
@@ -2712,7 +2712,7 @@ class Kt extends p {
|
|
|
2712
2712
|
publicSimpleSearch(r, e = 10) {
|
|
2713
2713
|
return new Promise((s, i) => {
|
|
2714
2714
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2715
|
-
s(o.categories.map((c) => new
|
|
2715
|
+
s(o.categories.map((c) => new q(c)));
|
|
2716
2716
|
}).catch((o) => {
|
|
2717
2717
|
i(o);
|
|
2718
2718
|
});
|
|
@@ -2750,7 +2750,7 @@ class Qt extends p {
|
|
|
2750
2750
|
return this.get(
|
|
2751
2751
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2752
2752
|
{},
|
|
2753
|
-
(e) =>
|
|
2753
|
+
(e) => ge(e.data, (s) => new Ge(s))
|
|
2754
2754
|
);
|
|
2755
2755
|
}
|
|
2756
2756
|
/**
|
|
@@ -2827,7 +2827,7 @@ class Yt extends p {
|
|
|
2827
2827
|
showHidden: i,
|
|
2828
2828
|
withPriceCoefficients: s
|
|
2829
2829
|
},
|
|
2830
|
-
(o) =>
|
|
2830
|
+
(o) => ge(o.data, (c) => new G(c))
|
|
2831
2831
|
);
|
|
2832
2832
|
}
|
|
2833
2833
|
}
|
|
@@ -2848,7 +2848,7 @@ class Xt extends p {
|
|
|
2848
2848
|
clientId: e,
|
|
2849
2849
|
withPriceCoefficients: s
|
|
2850
2850
|
},
|
|
2851
|
-
(i) => new
|
|
2851
|
+
(i) => new G(i.data)
|
|
2852
2852
|
);
|
|
2853
2853
|
}
|
|
2854
2854
|
}
|
|
@@ -2884,10 +2884,10 @@ class Xe {
|
|
|
2884
2884
|
field: this.field,
|
|
2885
2885
|
op: this.op
|
|
2886
2886
|
};
|
|
2887
|
-
return r.value = Oe(this.value) ?
|
|
2887
|
+
return r.value = Oe(this.value) ? H(this.value, I().config.dateFormats.api) : this.value, r;
|
|
2888
2888
|
}
|
|
2889
2889
|
}
|
|
2890
|
-
class
|
|
2890
|
+
class M {
|
|
2891
2891
|
/**
|
|
2892
2892
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2893
2893
|
*
|
|
@@ -2907,7 +2907,7 @@ class G {
|
|
|
2907
2907
|
*/
|
|
2908
2908
|
t(this, "groups");
|
|
2909
2909
|
var e, s;
|
|
2910
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Xe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new
|
|
2910
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Xe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new M(i))) ?? [];
|
|
2911
2911
|
}
|
|
2912
2912
|
/**
|
|
2913
2913
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2918,11 +2918,11 @@ class G {
|
|
|
2918
2918
|
return {
|
|
2919
2919
|
groupOp: this.groupOp,
|
|
2920
2920
|
filters: this.filters.map((r) => r instanceof Xe && He(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2921
|
-
groups: this.groups.map((r) => r instanceof
|
|
2921
|
+
groups: this.groups.map((r) => r instanceof M ? r.toPrimitive() : r)
|
|
2922
2922
|
};
|
|
2923
2923
|
}
|
|
2924
2924
|
}
|
|
2925
|
-
class
|
|
2925
|
+
class $e extends p {
|
|
2926
2926
|
/**
|
|
2927
2927
|
* Получает пагинированный список данных.
|
|
2928
2928
|
*
|
|
@@ -2940,10 +2940,10 @@ class Te extends p {
|
|
|
2940
2940
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2941
2941
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2942
2942
|
};
|
|
2943
|
-
return e && (m.filters = JSON.stringify((e instanceof
|
|
2943
|
+
return e && (m.filters = JSON.stringify((e instanceof M ? e : new M(e)).toPrimitive())), X(s) || (m.sort = F(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, h);
|
|
2944
2944
|
}
|
|
2945
2945
|
}
|
|
2946
|
-
class Zt extends
|
|
2946
|
+
class Zt extends $e {
|
|
2947
2947
|
/**
|
|
2948
2948
|
* Возвращает список шаблонов прайс-листа.
|
|
2949
2949
|
*
|
|
@@ -3143,7 +3143,7 @@ class Zt extends Te {
|
|
|
3143
3143
|
return this.get(
|
|
3144
3144
|
`/internal/price/templates/${r}/clients`,
|
|
3145
3145
|
{},
|
|
3146
|
-
(e) => e.data.map((s) => new
|
|
3146
|
+
(e) => e.data.map((s) => new ne(s))
|
|
3147
3147
|
);
|
|
3148
3148
|
}
|
|
3149
3149
|
}
|
|
@@ -3154,7 +3154,7 @@ class es extends p {
|
|
|
3154
3154
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3155
3155
|
*/
|
|
3156
3156
|
getRoles() {
|
|
3157
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3157
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ce(e)));
|
|
3158
3158
|
}
|
|
3159
3159
|
/**
|
|
3160
3160
|
* Добавляет новую роль ценообразования.
|
|
@@ -3164,7 +3164,7 @@ class es extends p {
|
|
|
3164
3164
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3165
3165
|
*/
|
|
3166
3166
|
createRole(r) {
|
|
3167
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3167
|
+
return this.post("/internal/price/roles", r, (e) => new ce(e.data));
|
|
3168
3168
|
}
|
|
3169
3169
|
/**
|
|
3170
3170
|
* Возвращает данные роли ценообразования.
|
|
@@ -3174,7 +3174,7 @@ class es extends p {
|
|
|
3174
3174
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3175
3175
|
*/
|
|
3176
3176
|
getRole(r) {
|
|
3177
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3177
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new ce(e.data));
|
|
3178
3178
|
}
|
|
3179
3179
|
/**
|
|
3180
3180
|
* Обновляет данные роли ценообразования.
|
|
@@ -3185,7 +3185,7 @@ class es extends p {
|
|
|
3185
3185
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3186
3186
|
*/
|
|
3187
3187
|
updateRole(r, e) {
|
|
3188
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3188
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new ce(s.data));
|
|
3189
3189
|
}
|
|
3190
3190
|
/**
|
|
3191
3191
|
* Удаляет роль ценообразования.
|
|
@@ -3227,7 +3227,7 @@ class es extends p {
|
|
|
3227
3227
|
);
|
|
3228
3228
|
}
|
|
3229
3229
|
}
|
|
3230
|
-
class rs extends
|
|
3230
|
+
class rs extends $e {
|
|
3231
3231
|
/**
|
|
3232
3232
|
* Возвращает пагинированный список свойств.
|
|
3233
3233
|
*
|
|
@@ -3240,7 +3240,7 @@ class rs extends Te {
|
|
|
3240
3240
|
getProperties(r, e, s) {
|
|
3241
3241
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3242
3242
|
const o = { ...i.data };
|
|
3243
|
-
return o.data = o.data.map((c) => new
|
|
3243
|
+
return o.data = o.data.map((c) => new oe(c)), o;
|
|
3244
3244
|
});
|
|
3245
3245
|
}
|
|
3246
3246
|
/**
|
|
@@ -3257,7 +3257,7 @@ class rs extends Te {
|
|
|
3257
3257
|
...s,
|
|
3258
3258
|
type: e
|
|
3259
3259
|
},
|
|
3260
|
-
(i) => new
|
|
3260
|
+
(i) => new oe(i.data)
|
|
3261
3261
|
);
|
|
3262
3262
|
}
|
|
3263
3263
|
/**
|
|
@@ -3267,7 +3267,7 @@ class rs extends Te {
|
|
|
3267
3267
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3268
3268
|
*/
|
|
3269
3269
|
getProperty(r) {
|
|
3270
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3270
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new oe(e.data));
|
|
3271
3271
|
}
|
|
3272
3272
|
/**
|
|
3273
3273
|
* Обновляет существующее свойство.
|
|
@@ -3284,7 +3284,7 @@ class rs extends Te {
|
|
|
3284
3284
|
...i,
|
|
3285
3285
|
type: s
|
|
3286
3286
|
},
|
|
3287
|
-
(o) => new
|
|
3287
|
+
(o) => new oe(o.data)
|
|
3288
3288
|
);
|
|
3289
3289
|
}
|
|
3290
3290
|
/**
|
|
@@ -3303,7 +3303,7 @@ class rs extends Te {
|
|
|
3303
3303
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3304
3304
|
*/
|
|
3305
3305
|
getProductProperties(r) {
|
|
3306
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3306
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new K(s)));
|
|
3307
3307
|
}
|
|
3308
3308
|
/**
|
|
3309
3309
|
* Возвращает значение свойства продукта.
|
|
@@ -3313,7 +3313,7 @@ class rs extends Te {
|
|
|
3313
3313
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3314
3314
|
*/
|
|
3315
3315
|
getProductProperty(r, e) {
|
|
3316
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3316
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new K(s.data));
|
|
3317
3317
|
}
|
|
3318
3318
|
/**
|
|
3319
3319
|
* Обновляет значение свойства продукта.
|
|
@@ -3324,7 +3324,7 @@ class rs extends Te {
|
|
|
3324
3324
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3325
3325
|
*/
|
|
3326
3326
|
updateProductProperty(r, e, s) {
|
|
3327
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3327
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new K(i.data));
|
|
3328
3328
|
}
|
|
3329
3329
|
/**
|
|
3330
3330
|
* Удаляет значение свойства продукта.
|
|
@@ -3449,7 +3449,7 @@ class rs extends Te {
|
|
|
3449
3449
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3450
3450
|
*/
|
|
3451
3451
|
getCategoryProperties(r) {
|
|
3452
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3452
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new K(s)));
|
|
3453
3453
|
}
|
|
3454
3454
|
/**
|
|
3455
3455
|
* Возвращает значение свойства категории.
|
|
@@ -3459,7 +3459,7 @@ class rs extends Te {
|
|
|
3459
3459
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3460
3460
|
*/
|
|
3461
3461
|
getCategoryProperty(r, e) {
|
|
3462
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3462
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new K(s.data));
|
|
3463
3463
|
}
|
|
3464
3464
|
/**
|
|
3465
3465
|
* Обновляет значение свойства категории.
|
|
@@ -3470,7 +3470,7 @@ class rs extends Te {
|
|
|
3470
3470
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3471
3471
|
*/
|
|
3472
3472
|
updateCategoryProperty(r, e, s) {
|
|
3473
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3473
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new K(i.data));
|
|
3474
3474
|
}
|
|
3475
3475
|
/**
|
|
3476
3476
|
* Удаляет значение свойства категории.
|
|
@@ -3615,7 +3615,7 @@ class ts extends p {
|
|
|
3615
3615
|
priceTemplateId: r,
|
|
3616
3616
|
showHidden: e
|
|
3617
3617
|
},
|
|
3618
|
-
(s) => s.data.map((i) => new
|
|
3618
|
+
(s) => s.data.map((i) => new q(i))
|
|
3619
3619
|
);
|
|
3620
3620
|
}
|
|
3621
3621
|
/**
|
|
@@ -3636,7 +3636,7 @@ class ts extends p {
|
|
|
3636
3636
|
showHidden: s,
|
|
3637
3637
|
withNestedCategories: i
|
|
3638
3638
|
},
|
|
3639
|
-
(o) => new
|
|
3639
|
+
(o) => new q(o.data)
|
|
3640
3640
|
);
|
|
3641
3641
|
}
|
|
3642
3642
|
/**
|
|
@@ -3657,7 +3657,7 @@ class ts extends p {
|
|
|
3657
3657
|
showHidden: i,
|
|
3658
3658
|
withPriceCoefficients: s
|
|
3659
3659
|
},
|
|
3660
|
-
(o) =>
|
|
3660
|
+
(o) => ge(o.data, (c) => new k(c))
|
|
3661
3661
|
);
|
|
3662
3662
|
}
|
|
3663
3663
|
}
|
|
@@ -3691,7 +3691,7 @@ function er(n) {
|
|
|
3691
3691
|
}
|
|
3692
3692
|
}), r;
|
|
3693
3693
|
}
|
|
3694
|
-
var gt = /* @__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.Curators = "curators", n))(gt || {}),
|
|
3694
|
+
var gt = /* @__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.Curators = "curators", n))(gt || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
|
|
3695
3695
|
class mt extends w {
|
|
3696
3696
|
}
|
|
3697
3697
|
class Cr extends w {
|
|
@@ -3700,15 +3700,15 @@ class ss extends w {
|
|
|
3700
3700
|
}
|
|
3701
3701
|
class ft extends w {
|
|
3702
3702
|
}
|
|
3703
|
-
class
|
|
3703
|
+
class B extends w {
|
|
3704
3704
|
/**
|
|
3705
3705
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3706
3706
|
*/
|
|
3707
3707
|
static generatePersonItem() {
|
|
3708
|
-
return new
|
|
3708
|
+
return new B({
|
|
3709
3709
|
id: 1,
|
|
3710
3710
|
guid: "",
|
|
3711
|
-
slug:
|
|
3711
|
+
slug: N.Person,
|
|
3712
3712
|
name: ""
|
|
3713
3713
|
});
|
|
3714
3714
|
}
|
|
@@ -3717,9 +3717,9 @@ class Rr extends w {
|
|
|
3717
3717
|
}
|
|
3718
3718
|
class yt extends w {
|
|
3719
3719
|
}
|
|
3720
|
-
class
|
|
3720
|
+
class Te extends w {
|
|
3721
3721
|
}
|
|
3722
|
-
class
|
|
3722
|
+
class ee extends w {
|
|
3723
3723
|
}
|
|
3724
3724
|
class Pr extends w {
|
|
3725
3725
|
}
|
|
@@ -3748,7 +3748,7 @@ class Dr extends w {
|
|
|
3748
3748
|
}
|
|
3749
3749
|
class Ar extends w {
|
|
3750
3750
|
}
|
|
3751
|
-
class Ne extends
|
|
3751
|
+
class Ne extends re {
|
|
3752
3752
|
/**
|
|
3753
3753
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3754
3754
|
*
|
|
@@ -3775,8 +3775,8 @@ class Ne extends te {
|
|
|
3775
3775
|
/**
|
|
3776
3776
|
* Данные о валюте.
|
|
3777
3777
|
*/
|
|
3778
|
-
t(this, "currency", new
|
|
3779
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3778
|
+
t(this, "currency", new x());
|
|
3779
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new x(e.currency));
|
|
3780
3780
|
}
|
|
3781
3781
|
}
|
|
3782
3782
|
class Ue extends b {
|
|
@@ -3798,7 +3798,7 @@ class Ue extends b {
|
|
|
3798
3798
|
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;
|
|
3799
3799
|
}
|
|
3800
3800
|
}
|
|
3801
|
-
class
|
|
3801
|
+
class z extends Ue {
|
|
3802
3802
|
/**
|
|
3803
3803
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3804
3804
|
*
|
|
@@ -3833,7 +3833,7 @@ class B extends Ue {
|
|
|
3833
3833
|
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;
|
|
3834
3834
|
}
|
|
3835
3835
|
}
|
|
3836
|
-
class
|
|
3836
|
+
class $r extends b {
|
|
3837
3837
|
/**
|
|
3838
3838
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3839
3839
|
*
|
|
@@ -3845,11 +3845,11 @@ class Tr extends b {
|
|
|
3845
3845
|
/**
|
|
3846
3846
|
* Данные об организационно-правовой форме.
|
|
3847
3847
|
*/
|
|
3848
|
-
t(this, "opf",
|
|
3848
|
+
t(this, "opf", B.generatePersonItem());
|
|
3849
3849
|
/**
|
|
3850
3850
|
* Группа партнеров (направление деятельности).
|
|
3851
3851
|
*/
|
|
3852
|
-
t(this, "partnerGroup", new
|
|
3852
|
+
t(this, "partnerGroup", new ee());
|
|
3853
3853
|
/**
|
|
3854
3854
|
* Список контактных лиц контрагента.
|
|
3855
3855
|
*/
|
|
@@ -3883,10 +3883,10 @@ class Tr extends b {
|
|
|
3883
3883
|
*/
|
|
3884
3884
|
t(this, "updater");
|
|
3885
3885
|
if (e) {
|
|
3886
|
-
if (this.opf = new
|
|
3886
|
+
if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? R(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
|
|
3887
3887
|
const s = [];
|
|
3888
3888
|
e.contacts.forEach((i) => {
|
|
3889
|
-
s.push(new
|
|
3889
|
+
s.push(new z(i));
|
|
3890
3890
|
}), this.contacts = s;
|
|
3891
3891
|
}
|
|
3892
3892
|
if (e.bankAccounts) {
|
|
@@ -3898,7 +3898,7 @@ class Tr extends b {
|
|
|
3898
3898
|
}
|
|
3899
3899
|
}
|
|
3900
3900
|
}
|
|
3901
|
-
class vt extends
|
|
3901
|
+
class vt extends $r {
|
|
3902
3902
|
/**
|
|
3903
3903
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3904
3904
|
*
|
|
@@ -3908,7 +3908,7 @@ class vt extends Tr {
|
|
|
3908
3908
|
super(r);
|
|
3909
3909
|
}
|
|
3910
3910
|
}
|
|
3911
|
-
class
|
|
3911
|
+
class Tr extends $r {
|
|
3912
3912
|
/**
|
|
3913
3913
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3914
3914
|
*
|
|
@@ -3951,7 +3951,7 @@ class $r extends Tr {
|
|
|
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 ar extends
|
|
3954
|
+
class ar extends Tr {
|
|
3955
3955
|
/**
|
|
3956
3956
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3957
3957
|
*
|
|
@@ -3977,7 +3977,7 @@ class Ct extends ar {
|
|
|
3977
3977
|
/**
|
|
3978
3978
|
* Страна регистрации юридического лица нерезидента.
|
|
3979
3979
|
*/
|
|
3980
|
-
t(this, "registrationCountry", new
|
|
3980
|
+
t(this, "registrationCountry", new Z());
|
|
3981
3981
|
/**
|
|
3982
3982
|
* Регистрационный номер юридического лица нерезидента.
|
|
3983
3983
|
*/
|
|
@@ -3986,7 +3986,7 @@ class Ct extends ar {
|
|
|
3986
3986
|
* Налоговый номер юридического лица нерезидента.
|
|
3987
3987
|
*/
|
|
3988
3988
|
t(this, "taxNumber", "");
|
|
3989
|
-
e && (this.registrationCountry = new
|
|
3989
|
+
e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3990
3990
|
}
|
|
3991
3991
|
}
|
|
3992
3992
|
class Ce {
|
|
@@ -3997,18 +3997,18 @@ class Ce {
|
|
|
3997
3997
|
*/
|
|
3998
3998
|
static createInstance(r) {
|
|
3999
3999
|
switch (r.opf.slug) {
|
|
4000
|
-
case
|
|
4001
|
-
return new
|
|
4002
|
-
case
|
|
4000
|
+
case N.Ic:
|
|
4001
|
+
return new Tr(r);
|
|
4002
|
+
case N.UlR:
|
|
4003
4003
|
return new ar(r);
|
|
4004
|
-
case
|
|
4004
|
+
case N.UlNr:
|
|
4005
4005
|
return new Ct(r);
|
|
4006
4006
|
default:
|
|
4007
4007
|
return new vt(r);
|
|
4008
4008
|
}
|
|
4009
4009
|
}
|
|
4010
4010
|
}
|
|
4011
|
-
class Le extends
|
|
4011
|
+
class Le extends re {
|
|
4012
4012
|
/**
|
|
4013
4013
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4014
4014
|
*
|
|
@@ -4023,7 +4023,7 @@ class Le extends te {
|
|
|
4023
4023
|
this.isPrimary = e.isPrimary;
|
|
4024
4024
|
}
|
|
4025
4025
|
}
|
|
4026
|
-
class Rt extends
|
|
4026
|
+
class Rt extends z {
|
|
4027
4027
|
/**
|
|
4028
4028
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4029
4029
|
*
|
|
@@ -4088,10 +4088,10 @@ class Re extends tt {
|
|
|
4088
4088
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4089
4089
|
*/
|
|
4090
4090
|
t(this, "isTransportCompanyAddress");
|
|
4091
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new gr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new
|
|
4091
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new gr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new z(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
4092
4092
|
}
|
|
4093
4093
|
}
|
|
4094
|
-
class rr extends
|
|
4094
|
+
class rr extends te {
|
|
4095
4095
|
/**
|
|
4096
4096
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4097
4097
|
*
|
|
@@ -4141,7 +4141,7 @@ class rr extends se {
|
|
|
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) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new
|
|
4144
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.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 Re(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new U(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4145
4145
|
}
|
|
4146
4146
|
}
|
|
4147
4147
|
class br {
|
|
@@ -4153,7 +4153,7 @@ class br {
|
|
|
4153
4153
|
const r = {};
|
|
4154
4154
|
return Object.keys(this).forEach((e) => {
|
|
4155
4155
|
const s = this[e];
|
|
4156
|
-
|
|
4156
|
+
$(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4157
4157
|
C(s) && s.trim().length === 0 || He(s.isNewRec) && s.isNewRec() || (r[e] = s);
|
|
4158
4158
|
}), r;
|
|
4159
4159
|
}
|
|
@@ -4259,7 +4259,7 @@ class ns extends br {
|
|
|
4259
4259
|
* @inheritDoc
|
|
4260
4260
|
*/
|
|
4261
4261
|
t(this, "lastOrder");
|
|
4262
|
-
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new
|
|
4262
|
+
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new O(A)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((A) => new ee(A)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4263
4263
|
createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
|
|
4264
4264
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4265
4265
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
@@ -4274,7 +4274,7 @@ class ns extends br {
|
|
|
4274
4274
|
this.cities = [];
|
|
4275
4275
|
break;
|
|
4276
4276
|
case "region":
|
|
4277
|
-
this.region = new
|
|
4277
|
+
this.region = new pe();
|
|
4278
4278
|
break;
|
|
4279
4279
|
case "isActive":
|
|
4280
4280
|
this.isActive = !0;
|
|
@@ -4298,10 +4298,10 @@ class ns extends br {
|
|
|
4298
4298
|
this.salesDirections = [];
|
|
4299
4299
|
break;
|
|
4300
4300
|
case "contragentType":
|
|
4301
|
-
this.contragentType = new
|
|
4301
|
+
this.contragentType = new B();
|
|
4302
4302
|
break;
|
|
4303
4303
|
case "preferredDeliveryType":
|
|
4304
|
-
this.preferredDeliveryType = new
|
|
4304
|
+
this.preferredDeliveryType = new U();
|
|
4305
4305
|
break;
|
|
4306
4306
|
case "partnerGroups":
|
|
4307
4307
|
this.partnerGroups = [];
|
|
@@ -4324,7 +4324,7 @@ class ns extends br {
|
|
|
4324
4324
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.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;
|
|
4325
4325
|
}
|
|
4326
4326
|
}
|
|
4327
|
-
class Sr extends
|
|
4327
|
+
class Sr extends re {
|
|
4328
4328
|
/**
|
|
4329
4329
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4330
4330
|
*
|
|
@@ -4380,7 +4380,7 @@ class Pt extends b {
|
|
|
4380
4380
|
* @inheritDoc
|
|
4381
4381
|
*/
|
|
4382
4382
|
t(this, "curators");
|
|
4383
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new
|
|
4383
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(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;
|
|
4384
4384
|
}
|
|
4385
4385
|
}
|
|
4386
4386
|
class Dt {
|
|
@@ -4450,7 +4450,7 @@ class cs {
|
|
|
4450
4450
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4451
4451
|
}
|
|
4452
4452
|
}
|
|
4453
|
-
class
|
|
4453
|
+
class d extends $e {
|
|
4454
4454
|
/**
|
|
4455
4455
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4456
4456
|
*
|
|
@@ -4482,7 +4482,7 @@ class x extends Te {
|
|
|
4482
4482
|
let e;
|
|
4483
4483
|
const s = r, i = r, o = r;
|
|
4484
4484
|
switch (r.opf.slug) {
|
|
4485
|
-
case
|
|
4485
|
+
case N.Ic:
|
|
4486
4486
|
e = {
|
|
4487
4487
|
opf: s.opf.slug,
|
|
4488
4488
|
name: s.name,
|
|
@@ -4499,7 +4499,7 @@ class x extends Te {
|
|
|
4499
4499
|
actual_address: s.actualAddress
|
|
4500
4500
|
};
|
|
4501
4501
|
break;
|
|
4502
|
-
case
|
|
4502
|
+
case N.UlR:
|
|
4503
4503
|
e = {
|
|
4504
4504
|
opf: i.opf.slug,
|
|
4505
4505
|
name: i.name,
|
|
@@ -4517,7 +4517,7 @@ class x extends Te {
|
|
|
4517
4517
|
actual_address: i.actualAddress
|
|
4518
4518
|
};
|
|
4519
4519
|
break;
|
|
4520
|
-
case
|
|
4520
|
+
case N.UlNr:
|
|
4521
4521
|
e = {
|
|
4522
4522
|
opf: o.opf.slug,
|
|
4523
4523
|
name: o.name,
|
|
@@ -4611,7 +4611,7 @@ class x extends Te {
|
|
|
4611
4611
|
i,
|
|
4612
4612
|
(c) => {
|
|
4613
4613
|
const u = { ...c.data };
|
|
4614
|
-
return u.data = u.data.map((h) => new
|
|
4614
|
+
return u.data = u.data.map((h) => new te(h)), u;
|
|
4615
4615
|
},
|
|
4616
4616
|
void 0,
|
|
4617
4617
|
o
|
|
@@ -4674,7 +4674,7 @@ class x extends Te {
|
|
|
4674
4674
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4675
4675
|
*/
|
|
4676
4676
|
createClientCommonData(r, e = {}) {
|
|
4677
|
-
return this.post("/internal/clients",
|
|
4677
|
+
return this.post("/internal/clients", d.transformClientDataToRequest(r), (s) => new rr(s.data), e);
|
|
4678
4678
|
}
|
|
4679
4679
|
/**
|
|
4680
4680
|
* Обновляет данные указанного клиента.
|
|
@@ -4684,7 +4684,7 @@ class x extends Te {
|
|
|
4684
4684
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4685
4685
|
*/
|
|
4686
4686
|
updateClientCommonData(r, e = {}) {
|
|
4687
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
4687
|
+
return this.patch(`/internal/clients/${r.id}`, d.transformClientDataToRequest(r), void 0, e);
|
|
4688
4688
|
}
|
|
4689
4689
|
/**
|
|
4690
4690
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -4813,7 +4813,7 @@ class x extends Te {
|
|
|
4813
4813
|
createContragentClientData(r, e, s = {}) {
|
|
4814
4814
|
return this.post(
|
|
4815
4815
|
`/internal/clients/${r}/contragents`,
|
|
4816
|
-
|
|
4816
|
+
d.transformContragentClientDataToRequest(e),
|
|
4817
4817
|
(i) => Ce.createInstance(i.data),
|
|
4818
4818
|
s
|
|
4819
4819
|
);
|
|
@@ -4829,7 +4829,7 @@ class x extends Te {
|
|
|
4829
4829
|
updateContragentClientData(r, e, s = {}) {
|
|
4830
4830
|
return this.patch(
|
|
4831
4831
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4832
|
-
|
|
4832
|
+
d.transformContragentClientDataToRequest(e),
|
|
4833
4833
|
(i) => Ce.createInstance(i.data),
|
|
4834
4834
|
s
|
|
4835
4835
|
);
|
|
@@ -4855,7 +4855,7 @@ class x extends Te {
|
|
|
4855
4855
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4856
4856
|
return this.post(
|
|
4857
4857
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4858
|
-
|
|
4858
|
+
d.transformClientDeliveryAddressToRequest(e),
|
|
4859
4859
|
(i) => new Re(i.data),
|
|
4860
4860
|
s
|
|
4861
4861
|
);
|
|
@@ -4871,7 +4871,7 @@ class x extends Te {
|
|
|
4871
4871
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4872
4872
|
return this.patch(
|
|
4873
4873
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4874
|
-
|
|
4874
|
+
d.transformClientDeliveryAddressToRequest(e),
|
|
4875
4875
|
(i) => new Re(i.data),
|
|
4876
4876
|
s
|
|
4877
4877
|
);
|
|
@@ -4898,7 +4898,7 @@ class x extends Te {
|
|
|
4898
4898
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4899
4899
|
return this.post(
|
|
4900
4900
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4901
|
-
|
|
4901
|
+
d.transformClientContragentBankAccountToRequest(s),
|
|
4902
4902
|
(o) => new Ne(o.data),
|
|
4903
4903
|
i
|
|
4904
4904
|
);
|
|
@@ -4915,7 +4915,7 @@ class x extends Te {
|
|
|
4915
4915
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4916
4916
|
return this.patch(
|
|
4917
4917
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4918
|
-
|
|
4918
|
+
d.transformClientContragentBankAccountToRequest(s),
|
|
4919
4919
|
(o) => new Ne(o.data),
|
|
4920
4920
|
i
|
|
4921
4921
|
);
|
|
@@ -4972,7 +4972,7 @@ class x extends Te {
|
|
|
4972
4972
|
comment: e.comment,
|
|
4973
4973
|
not_disturb: e.notDisturb
|
|
4974
4974
|
},
|
|
4975
|
-
(i) => new
|
|
4975
|
+
(i) => new z(i.data),
|
|
4976
4976
|
s
|
|
4977
4977
|
);
|
|
4978
4978
|
}
|
|
@@ -5109,7 +5109,7 @@ class x extends Te {
|
|
|
5109
5109
|
comment: e.comment,
|
|
5110
5110
|
...s
|
|
5111
5111
|
};
|
|
5112
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (h) => new
|
|
5112
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (h) => new z(h.data), i);
|
|
5113
5113
|
}
|
|
5114
5114
|
/**
|
|
5115
5115
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5196,7 +5196,7 @@ const Y = class Y extends p {
|
|
|
5196
5196
|
* Кэш результатов запросов.
|
|
5197
5197
|
*/
|
|
5198
5198
|
t(Y, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5199
|
-
let
|
|
5199
|
+
let he = Y;
|
|
5200
5200
|
class ls extends p {
|
|
5201
5201
|
/**
|
|
5202
5202
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
@@ -5388,12 +5388,12 @@ class ms {
|
|
|
5388
5388
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5389
5389
|
}
|
|
5390
5390
|
}
|
|
5391
|
-
class
|
|
5391
|
+
class $t extends he {
|
|
5392
5392
|
/**
|
|
5393
5393
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5394
5394
|
*/
|
|
5395
5395
|
async getManagers() {
|
|
5396
|
-
const r = "/internal/managers", e =
|
|
5396
|
+
const r = "/internal/managers", e = he.getCachedResponse(r);
|
|
5397
5397
|
if (e)
|
|
5398
5398
|
return e;
|
|
5399
5399
|
const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
|
|
@@ -5457,7 +5457,7 @@ class Ir extends Sr {
|
|
|
5457
5457
|
* @inheritDoc
|
|
5458
5458
|
*/
|
|
5459
5459
|
t(this, "isLargeOrder");
|
|
5460
|
-
this.client = new
|
|
5460
|
+
this.client = new te(e == null ? void 0 : e.client), this.payment = {
|
|
5461
5461
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5462
5462
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5463
5463
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
@@ -5465,12 +5465,12 @@ class Ir extends Sr {
|
|
|
5465
5465
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5466
5466
|
date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? R(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
|
|
5467
5467
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
|
|
5468
|
-
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new
|
|
5469
|
-
}, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new
|
|
5468
|
+
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
|
|
5469
|
+
}, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Te(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? R(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
|
|
5470
5470
|
}
|
|
5471
5471
|
}
|
|
5472
|
-
var
|
|
5473
|
-
class a extends
|
|
5472
|
+
var Tt = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(Tt || {});
|
|
5473
|
+
class a extends he {
|
|
5474
5474
|
/**
|
|
5475
5475
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5476
5476
|
*
|
|
@@ -5504,20 +5504,20 @@ class a extends ge {
|
|
|
5504
5504
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5505
5505
|
*/
|
|
5506
5506
|
getCurrency() {
|
|
5507
|
-
return this.getTypedDataArrayRequester(
|
|
5507
|
+
return this.getTypedDataArrayRequester(x, "/public/references/currency", !0);
|
|
5508
5508
|
}
|
|
5509
5509
|
/**
|
|
5510
5510
|
* Возвращает {@link Promise} для получения справочника данных
|
|
5511
5511
|
* групп партнеров (направлений деятельности).
|
|
5512
5512
|
*/
|
|
5513
5513
|
getPartnerGroup() {
|
|
5514
|
-
return this.getTypedDataArrayRequester(
|
|
5514
|
+
return this.getTypedDataArrayRequester(ee, "/internal/references/partner-group", !0);
|
|
5515
5515
|
}
|
|
5516
5516
|
/**
|
|
5517
5517
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5518
5518
|
*/
|
|
5519
5519
|
getOpf() {
|
|
5520
|
-
return this.getTypedDataArrayRequester(
|
|
5520
|
+
return this.getTypedDataArrayRequester(B, "/public/references/opf", !0);
|
|
5521
5521
|
}
|
|
5522
5522
|
/**
|
|
5523
5523
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
@@ -5535,7 +5535,7 @@ class a extends ge {
|
|
|
5535
5535
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5536
5536
|
*/
|
|
5537
5537
|
getOrderStatuses() {
|
|
5538
|
-
return this.getTypedDataArrayRequester(
|
|
5538
|
+
return this.getTypedDataArrayRequester(Te, "/internal/references/order-status", !0);
|
|
5539
5539
|
}
|
|
5540
5540
|
/**
|
|
5541
5541
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
@@ -5575,7 +5575,7 @@ class a extends ge {
|
|
|
5575
5575
|
* @param term Терм поиска.
|
|
5576
5576
|
*/
|
|
5577
5577
|
searchRegion(r) {
|
|
5578
|
-
return this.getTypedDataArrayRequester(
|
|
5578
|
+
return this.getTypedDataArrayRequester(pe, `/internal/references/region-with-country/search?term=${r}`);
|
|
5579
5579
|
}
|
|
5580
5580
|
/**
|
|
5581
5581
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -5583,19 +5583,19 @@ class a extends ge {
|
|
|
5583
5583
|
* @param term Терм поиска.
|
|
5584
5584
|
*/
|
|
5585
5585
|
searchCountry(r) {
|
|
5586
|
-
return this.getTypedDataArrayRequester(
|
|
5586
|
+
return this.getTypedDataArrayRequester(Z, `/internal/references/country/search?term=${r}`);
|
|
5587
5587
|
}
|
|
5588
5588
|
/**
|
|
5589
5589
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
5590
5590
|
*/
|
|
5591
5591
|
getDeliveryTypes() {
|
|
5592
|
-
return this.getTypedDataArrayRequester(
|
|
5592
|
+
return this.getTypedDataArrayRequester(U, "/internal/references/delivery-type", !0);
|
|
5593
5593
|
}
|
|
5594
5594
|
/**
|
|
5595
5595
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5596
5596
|
*/
|
|
5597
5597
|
getWarehouses() {
|
|
5598
|
-
return this.getTypedDataArrayRequester(
|
|
5598
|
+
return this.getTypedDataArrayRequester(me, "/public/references/warehouse", !0);
|
|
5599
5599
|
}
|
|
5600
5600
|
/**
|
|
5601
5601
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
@@ -5616,8 +5616,8 @@ class a extends ge {
|
|
|
5616
5616
|
return this.getTypedDataArrayRequester(wt, "/public/references/product-file-type", !0);
|
|
5617
5617
|
}
|
|
5618
5618
|
}
|
|
5619
|
-
const
|
|
5620
|
-
const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), A = y(void 0),
|
|
5619
|
+
const T = W("common.references_private", () => {
|
|
5620
|
+
const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), A = y(void 0), se = y(void 0), ie = y(void 0), J = y(void 0), E = y(void 0), ae = y(void 0), be = y(void 0), l = y(void 0);
|
|
5621
5621
|
return {
|
|
5622
5622
|
/**
|
|
5623
5623
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5670,19 +5670,19 @@ const $ = z("common.references_private", () => {
|
|
|
5670
5670
|
/**
|
|
5671
5671
|
* Справочник типов файлов продукктов/категорий.
|
|
5672
5672
|
*/
|
|
5673
|
-
productFileTypeReference:
|
|
5673
|
+
productFileTypeReference: se,
|
|
5674
5674
|
/**
|
|
5675
5675
|
* Справочник типов ресурсов.
|
|
5676
5676
|
*/
|
|
5677
|
-
resourceTypesReference:
|
|
5677
|
+
resourceTypesReference: ie,
|
|
5678
5678
|
/**
|
|
5679
5679
|
* Справочник направлений продаж.
|
|
5680
5680
|
*/
|
|
5681
|
-
salesDirectionsReference:
|
|
5681
|
+
salesDirectionsReference: J,
|
|
5682
5682
|
/**
|
|
5683
5683
|
* Справочник источников первичного интереса.
|
|
5684
5684
|
*/
|
|
5685
|
-
sourcePrimaryInterestReference:
|
|
5685
|
+
sourcePrimaryInterestReference: E,
|
|
5686
5686
|
/**
|
|
5687
5687
|
* Справочник складов.
|
|
5688
5688
|
*/
|
|
@@ -5696,94 +5696,94 @@ const $ = z("common.references_private", () => {
|
|
|
5696
5696
|
*/
|
|
5697
5697
|
priceCoefficientsReference: l
|
|
5698
5698
|
};
|
|
5699
|
-
}), fs =
|
|
5699
|
+
}), fs = W("common.references", () => {
|
|
5700
5700
|
const n = D(() => {
|
|
5701
|
-
const l =
|
|
5701
|
+
const l = T();
|
|
5702
5702
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(a).getChannelPrimaryInterest().then((g) => {
|
|
5703
5703
|
l.channelPrimaryInterestReference = g;
|
|
5704
5704
|
}).catch(v)), l.channelPrimaryInterestReference;
|
|
5705
5705
|
}), r = D(() => {
|
|
5706
|
-
const l =
|
|
5706
|
+
const l = T();
|
|
5707
5707
|
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, p.getInstance(a).getContactPositions().then((g) => {
|
|
5708
5708
|
l.contactPositionsReference = g;
|
|
5709
5709
|
}).catch(v)), l.contactPositionsReference;
|
|
5710
5710
|
}), e = D(() => {
|
|
5711
|
-
const l =
|
|
5711
|
+
const l = T();
|
|
5712
5712
|
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(a).getCurrency().then((g) => {
|
|
5713
5713
|
l.currencyReference = g;
|
|
5714
5714
|
}).catch(v)), l.currencyReference;
|
|
5715
5715
|
}), s = D(() => {
|
|
5716
|
-
const l =
|
|
5716
|
+
const l = T();
|
|
5717
5717
|
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(a).getOpf().then((g) => {
|
|
5718
5718
|
l.opfReference = g;
|
|
5719
5719
|
}).catch(v)), l.opfReference;
|
|
5720
5720
|
}), i = D(() => {
|
|
5721
|
-
const l =
|
|
5721
|
+
const l = T();
|
|
5722
5722
|
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, p.getInstance(a).getOperators().then((g) => {
|
|
5723
5723
|
l.operatorReference = g;
|
|
5724
5724
|
}).catch(v)), l.operatorReference;
|
|
5725
5725
|
}), o = D(() => {
|
|
5726
|
-
const l =
|
|
5726
|
+
const l = T();
|
|
5727
5727
|
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(a).getOrderPaymentStatuses().then((g) => {
|
|
5728
5728
|
l.orderPaymentStatusReference = g;
|
|
5729
5729
|
}).catch(v)), l.orderPaymentStatusReference;
|
|
5730
5730
|
}), c = D(() => {
|
|
5731
|
-
const l =
|
|
5731
|
+
const l = T();
|
|
5732
5732
|
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, p.getInstance(a).getOrderStatuses().then((g) => {
|
|
5733
5733
|
l.orderStatusReference = g;
|
|
5734
5734
|
}).catch(v)), l.orderStatusReference;
|
|
5735
5735
|
}), u = D(() => {
|
|
5736
|
-
const l =
|
|
5736
|
+
const l = T();
|
|
5737
5737
|
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, p.getInstance(a).getPaymentTypes().then((g) => {
|
|
5738
5738
|
l.paymentTypeReference = g;
|
|
5739
5739
|
}).catch(v)), l.paymentTypeReference;
|
|
5740
5740
|
}), h = D(() => {
|
|
5741
|
-
const l =
|
|
5741
|
+
const l = T();
|
|
5742
5742
|
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, p.getInstance(a).getPartnerGroup().then((g) => {
|
|
5743
5743
|
l.partnerGroupReference = g;
|
|
5744
5744
|
}).catch(v)), l.partnerGroupReference;
|
|
5745
5745
|
}), m = D(() => {
|
|
5746
|
-
const l =
|
|
5746
|
+
const l = T();
|
|
5747
5747
|
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, p.getInstance(a).getProductFileType().then((g) => {
|
|
5748
5748
|
l.productFileTypeReference = g;
|
|
5749
5749
|
}).catch(v)), l.productFileTypeReference;
|
|
5750
5750
|
}), f = D(() => {
|
|
5751
|
-
const l =
|
|
5751
|
+
const l = T();
|
|
5752
5752
|
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, p.getInstance(a).getResourceTypes().then((g) => {
|
|
5753
5753
|
l.resourceTypesReference = g;
|
|
5754
5754
|
}).catch(v)), l.resourceTypesReference;
|
|
5755
5755
|
}), A = D(() => {
|
|
5756
|
-
const l =
|
|
5756
|
+
const l = T();
|
|
5757
5757
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(a).getSalesDirections().then((g) => {
|
|
5758
5758
|
l.salesDirectionsReference = g;
|
|
5759
5759
|
}).catch(v)), l.salesDirectionsReference;
|
|
5760
|
-
}),
|
|
5761
|
-
const l =
|
|
5760
|
+
}), se = D(() => {
|
|
5761
|
+
const l = T();
|
|
5762
5762
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(a).getSourcePrimaryInterest().then((g) => {
|
|
5763
5763
|
l.sourcePrimaryInterestReference = g;
|
|
5764
5764
|
}).catch(v)), l.sourcePrimaryInterestReference;
|
|
5765
|
-
}),
|
|
5766
|
-
const l =
|
|
5765
|
+
}), ie = D(() => {
|
|
5766
|
+
const l = T();
|
|
5767
5767
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(a).getDeliveryTypes().then((g) => {
|
|
5768
5768
|
l.deliveryTypeReference = g;
|
|
5769
5769
|
}).catch(v)), l.deliveryTypeReference;
|
|
5770
|
-
}),
|
|
5771
|
-
const l =
|
|
5772
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance(
|
|
5770
|
+
}), J = D(() => {
|
|
5771
|
+
const l = T();
|
|
5772
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance($t).getManagers().then((g) => {
|
|
5773
5773
|
l.managersList = g;
|
|
5774
5774
|
}).catch(v)), l.managersList;
|
|
5775
|
-
}),
|
|
5776
|
-
const l =
|
|
5775
|
+
}), E = D(() => {
|
|
5776
|
+
const l = T();
|
|
5777
5777
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, p.getInstance(a).getWarehouses().then((g) => {
|
|
5778
5778
|
l.warehousesReference = g;
|
|
5779
5779
|
}).catch(v)), l.warehousesReference;
|
|
5780
5780
|
}), ae = D(() => {
|
|
5781
|
-
const l =
|
|
5781
|
+
const l = T();
|
|
5782
5782
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, p.getInstance(a).getPropertyTypes().then((g) => {
|
|
5783
5783
|
l.propertyTypesReference = g;
|
|
5784
5784
|
}).catch(v)), l.propertyTypesReference;
|
|
5785
5785
|
}), be = D(() => {
|
|
5786
|
-
const l =
|
|
5786
|
+
const l = T();
|
|
5787
5787
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(a).getPriceCoefficients().then((g) => {
|
|
5788
5788
|
l.priceCoefficientsReference = g;
|
|
5789
5789
|
}).catch(v)), l.priceCoefficientsReference;
|
|
@@ -5840,19 +5840,19 @@ const $ = z("common.references_private", () => {
|
|
|
5840
5840
|
/**
|
|
5841
5841
|
* Справочник каналов первичного интереса.
|
|
5842
5842
|
*/
|
|
5843
|
-
sourcePrimaryInterestsReference:
|
|
5843
|
+
sourcePrimaryInterestsReference: se,
|
|
5844
5844
|
/**
|
|
5845
5845
|
* Справочник типов доставки.
|
|
5846
5846
|
*/
|
|
5847
|
-
deliveryTypeReference:
|
|
5847
|
+
deliveryTypeReference: ie,
|
|
5848
5848
|
/**
|
|
5849
5849
|
* Список менеджеров.
|
|
5850
5850
|
*/
|
|
5851
|
-
managersList:
|
|
5851
|
+
managersList: J,
|
|
5852
5852
|
/**
|
|
5853
5853
|
* Справочник складов.
|
|
5854
5854
|
*/
|
|
5855
|
-
warehousesReference:
|
|
5855
|
+
warehousesReference: E,
|
|
5856
5856
|
/**
|
|
5857
5857
|
* Справочник типов свойств.
|
|
5858
5858
|
*/
|
|
@@ -5870,7 +5870,7 @@ class ys extends br {
|
|
|
5870
5870
|
* @param data Данные для первоначальной инициализации.
|
|
5871
5871
|
*/
|
|
5872
5872
|
constructor(e) {
|
|
5873
|
-
var s, i, o;
|
|
5873
|
+
var s, i, o, c;
|
|
5874
5874
|
super();
|
|
5875
5875
|
/**
|
|
5876
5876
|
* @inheritDoc
|
|
@@ -5951,7 +5951,7 @@ class ys extends br {
|
|
|
5951
5951
|
/**
|
|
5952
5952
|
* @inheritDoc
|
|
5953
5953
|
*/
|
|
5954
|
-
t(this, "
|
|
5954
|
+
t(this, "warehouses");
|
|
5955
5955
|
/**
|
|
5956
5956
|
* @inheritDoc
|
|
5957
5957
|
*/
|
|
@@ -5964,7 +5964,7 @@ class ys extends br {
|
|
|
5964
5964
|
* @inheritDoc
|
|
5965
5965
|
*/
|
|
5966
5966
|
t(this, "onlyMyRegions");
|
|
5967
|
-
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((
|
|
5967
|
+
this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Rr(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 S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(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 S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Pr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
5968
5968
|
}
|
|
5969
5969
|
/**
|
|
5970
5970
|
* @inheritDoc
|
|
@@ -5981,7 +5981,7 @@ class ys extends br {
|
|
|
5981
5981
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
5982
5982
|
break;
|
|
5983
5983
|
case "deliveryType":
|
|
5984
|
-
this.deliveryType = new
|
|
5984
|
+
this.deliveryType = new U();
|
|
5985
5985
|
break;
|
|
5986
5986
|
case "clientCities":
|
|
5987
5987
|
this.clientCities = [];
|
|
@@ -5996,7 +5996,7 @@ class ys extends br {
|
|
|
5996
5996
|
this.status = [];
|
|
5997
5997
|
break;
|
|
5998
5998
|
case "warehouse":
|
|
5999
|
-
this.
|
|
5999
|
+
this.warehouses = [];
|
|
6000
6000
|
break;
|
|
6001
6001
|
default:
|
|
6002
6002
|
this[e] = void 0;
|
|
@@ -6061,10 +6061,10 @@ class at extends mr {
|
|
|
6061
6061
|
* @inheritDoc
|
|
6062
6062
|
*/
|
|
6063
6063
|
t(this, "currency");
|
|
6064
|
-
this.product = new
|
|
6064
|
+
this.product = new G(e.product), this.currency = new x(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;
|
|
6065
6065
|
}
|
|
6066
6066
|
}
|
|
6067
|
-
class
|
|
6067
|
+
class _ extends Ir {
|
|
6068
6068
|
/**
|
|
6069
6069
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6070
6070
|
*
|
|
@@ -6117,7 +6117,7 @@ class K extends Ir {
|
|
|
6117
6117
|
* @inheritDoc
|
|
6118
6118
|
*/
|
|
6119
6119
|
t(this, "operatorsForWarehouseComment");
|
|
6120
|
-
this.products = (e.products ?? []).map((i) => new at(i)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((i) => new
|
|
6120
|
+
this.products = (e.products ?? []).map((i) => new at(i)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((i) => new Te(i)), this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment;
|
|
6121
6121
|
}
|
|
6122
6122
|
}
|
|
6123
6123
|
class bt {
|
|
@@ -6143,10 +6143,10 @@ class bt {
|
|
|
6143
6143
|
* @inheritDoc
|
|
6144
6144
|
*/
|
|
6145
6145
|
t(this, "createdAt");
|
|
6146
|
-
this.user = new L(r == null ? void 0 : r.user), this.status = new
|
|
6146
|
+
this.user = new L(r == null ? void 0 : r.user), this.status = new Te(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? R(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
6147
6147
|
}
|
|
6148
6148
|
}
|
|
6149
|
-
class ws extends
|
|
6149
|
+
class ws extends $e {
|
|
6150
6150
|
/**
|
|
6151
6151
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
6152
6152
|
*
|
|
@@ -6183,7 +6183,7 @@ class ws extends Te {
|
|
|
6183
6183
|
getOrdersCount(r, e = void 0) {
|
|
6184
6184
|
return this.get(
|
|
6185
6185
|
"/internal/orders/count",
|
|
6186
|
-
r ? { filters: JSON.stringify((r instanceof
|
|
6186
|
+
r ? { filters: JSON.stringify((r instanceof M ? r : new M(r)).toPrimitive()) } : {},
|
|
6187
6187
|
void 0,
|
|
6188
6188
|
void 0,
|
|
6189
6189
|
e
|
|
@@ -6206,7 +6206,27 @@ class ws extends Te {
|
|
|
6206
6206
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get
|
|
6207
6207
|
*/
|
|
6208
6208
|
getOrder(r) {
|
|
6209
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
6209
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new _(e.data));
|
|
6210
|
+
}
|
|
6211
|
+
/**
|
|
6212
|
+
* Закрепляет указанный заказ за текущим оператором и возвращает полные данные заказа.
|
|
6213
|
+
*
|
|
6214
|
+
* @param orderId Идентификатор записи заказа.
|
|
6215
|
+
*
|
|
6216
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_attach
|
|
6217
|
+
*/
|
|
6218
|
+
attachOrder(r) {
|
|
6219
|
+
return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new _(e.data));
|
|
6220
|
+
}
|
|
6221
|
+
/**
|
|
6222
|
+
* Открепляет указанный заказ от оператора и возвращает полные данные заказа.
|
|
6223
|
+
*
|
|
6224
|
+
* @param orderId Идентификатор записи заказа.
|
|
6225
|
+
*
|
|
6226
|
+
* @see /doc/api/internal#/Заказы/api_internal_orders_detach
|
|
6227
|
+
*/
|
|
6228
|
+
detachOrder(r) {
|
|
6229
|
+
return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new _(e.data));
|
|
6210
6230
|
}
|
|
6211
6231
|
/**
|
|
6212
6232
|
* Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
|
|
@@ -6220,7 +6240,7 @@ class ws extends Te {
|
|
|
6220
6240
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
6221
6241
|
*/
|
|
6222
6242
|
updateOrder(r, e, s = {}) {
|
|
6223
|
-
return this.patch(`/internal/orders/${r}`, e, (i) => new
|
|
6243
|
+
return this.patch(`/internal/orders/${r}`, e, (i) => new _(i.data), s);
|
|
6224
6244
|
}
|
|
6225
6245
|
/**
|
|
6226
6246
|
* Добавляет продукт в заказ и возвращает обновлённые данные заказа.
|
|
@@ -6248,7 +6268,7 @@ class ws extends Te {
|
|
|
6248
6268
|
is_additional_sale: e.isAdditionalSale,
|
|
6249
6269
|
...e.configuratorParams
|
|
6250
6270
|
},
|
|
6251
|
-
(i) => new
|
|
6271
|
+
(i) => new _(i.data),
|
|
6252
6272
|
s
|
|
6253
6273
|
);
|
|
6254
6274
|
}
|
|
@@ -6271,7 +6291,7 @@ class ws extends Te {
|
|
|
6271
6291
|
status: e,
|
|
6272
6292
|
statusDetail: s
|
|
6273
6293
|
},
|
|
6274
|
-
(o) => new
|
|
6294
|
+
(o) => new _(o.data),
|
|
6275
6295
|
i
|
|
6276
6296
|
);
|
|
6277
6297
|
}
|
|
@@ -6297,7 +6317,7 @@ class ws extends Te {
|
|
|
6297
6317
|
* @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
|
|
6298
6318
|
*/
|
|
6299
6319
|
deleteOrderAttachedFile(r) {
|
|
6300
|
-
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new
|
|
6320
|
+
return this.delete(`/internal/orders/${r}/file/attached`, (e) => new _(e.data));
|
|
6301
6321
|
}
|
|
6302
6322
|
/**
|
|
6303
6323
|
* Изменяет продукт заказа и возвращает обновлённые данные заказа.
|
|
@@ -6325,12 +6345,12 @@ class ws extends Te {
|
|
|
6325
6345
|
marker: s.marker,
|
|
6326
6346
|
...s.configuratorParams
|
|
6327
6347
|
},
|
|
6328
|
-
(o) => new
|
|
6348
|
+
(o) => new _(o.data),
|
|
6329
6349
|
i
|
|
6330
6350
|
);
|
|
6331
6351
|
}
|
|
6332
6352
|
}
|
|
6333
|
-
class
|
|
6353
|
+
class de {
|
|
6334
6354
|
/**
|
|
6335
6355
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
6336
6356
|
*
|
|
@@ -6357,10 +6377,10 @@ class xe {
|
|
|
6357
6377
|
* Источник клиентской цены.
|
|
6358
6378
|
*/
|
|
6359
6379
|
t(this, "source");
|
|
6360
|
-
this.client = new
|
|
6380
|
+
this.client = new te(r == null ? void 0 : r.client), this.product = new k(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Me.Product;
|
|
6361
6381
|
}
|
|
6362
6382
|
}
|
|
6363
|
-
const
|
|
6383
|
+
const xe = (n) => {
|
|
6364
6384
|
var r, e, s, i, o;
|
|
6365
6385
|
return n ? cr(
|
|
6366
6386
|
{
|
|
@@ -6371,7 +6391,7 @@ const de = (n) => {
|
|
|
6371
6391
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
6372
6392
|
hideNotActive: n.hideNotActive
|
|
6373
6393
|
},
|
|
6374
|
-
(c) =>
|
|
6394
|
+
(c) => $(c) || (F(c) || lr(c)) && X(c)
|
|
6375
6395
|
) : {};
|
|
6376
6396
|
}, tr = (n) => {
|
|
6377
6397
|
const r = {};
|
|
@@ -6392,9 +6412,9 @@ class vs extends p {
|
|
|
6392
6412
|
`/internal/price/products/${r}/analyze`,
|
|
6393
6413
|
{
|
|
6394
6414
|
...tr(e),
|
|
6395
|
-
filters:
|
|
6415
|
+
filters: xe(s)
|
|
6396
6416
|
},
|
|
6397
|
-
(i) => i.data.map((o) => new
|
|
6417
|
+
(i) => i.data.map((o) => new de(o))
|
|
6398
6418
|
);
|
|
6399
6419
|
}
|
|
6400
6420
|
/**
|
|
@@ -6411,9 +6431,9 @@ class vs extends p {
|
|
|
6411
6431
|
`/internal/price/categories/${r}/analyze`,
|
|
6412
6432
|
{
|
|
6413
6433
|
...tr(e),
|
|
6414
|
-
filters:
|
|
6434
|
+
filters: xe(s)
|
|
6415
6435
|
},
|
|
6416
|
-
(i) => i.data.map((o) => new
|
|
6436
|
+
(i) => i.data.map((o) => new de(o))
|
|
6417
6437
|
);
|
|
6418
6438
|
}
|
|
6419
6439
|
/**
|
|
@@ -6432,9 +6452,9 @@ class vs extends p {
|
|
|
6432
6452
|
`/internal/price/categories/${r}/analyze/square`,
|
|
6433
6453
|
{
|
|
6434
6454
|
...e,
|
|
6435
|
-
filters:
|
|
6455
|
+
filters: xe(s)
|
|
6436
6456
|
},
|
|
6437
|
-
(i) => i.data.map((o) => new
|
|
6457
|
+
(i) => i.data.map((o) => new de(o))
|
|
6438
6458
|
);
|
|
6439
6459
|
}
|
|
6440
6460
|
}
|
|
@@ -6485,10 +6505,10 @@ class St {
|
|
|
6485
6505
|
* @inheritDoc
|
|
6486
6506
|
*/
|
|
6487
6507
|
t(this, "currency");
|
|
6488
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new
|
|
6508
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
|
|
6489
6509
|
}
|
|
6490
6510
|
}
|
|
6491
|
-
class kt extends
|
|
6511
|
+
class kt extends ue {
|
|
6492
6512
|
/**
|
|
6493
6513
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6494
6514
|
*
|
|
@@ -6500,7 +6520,7 @@ class kt extends pe {
|
|
|
6500
6520
|
* @inheritDoc
|
|
6501
6521
|
*/
|
|
6502
6522
|
t(this, "history");
|
|
6503
|
-
this.history =
|
|
6523
|
+
this.history = ge(e.history, (s) => new St(s));
|
|
6504
6524
|
}
|
|
6505
6525
|
}
|
|
6506
6526
|
class Cs extends p {
|
|
@@ -6514,16 +6534,16 @@ class Cs extends p {
|
|
|
6514
6534
|
getProductPriceHistory(r) {
|
|
6515
6535
|
var o, c, u, h, m;
|
|
6516
6536
|
const e = I().config.dateFormats.api, s = cr(
|
|
6517
|
-
|
|
6537
|
+
le(r, {
|
|
6518
6538
|
costDate: {
|
|
6519
|
-
from: Oe((o = r.costDate) == null ? void 0 : o.from) ?
|
|
6520
|
-
to: Oe((u = r.costDate) == null ? void 0 : u.to) ?
|
|
6539
|
+
from: Oe((o = r.costDate) == null ? void 0 : o.from) ? H(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6540
|
+
to: Oe((u = r.costDate) == null ? void 0 : u.to) ? H(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
|
|
6521
6541
|
}
|
|
6522
6542
|
}),
|
|
6523
|
-
(f) =>
|
|
6543
|
+
(f) => $(f) || (F(f) || lr(f)) && X(f)
|
|
6524
6544
|
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6525
6545
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
|
|
6526
|
-
new kt(
|
|
6546
|
+
new kt(le(f[0], { history: f }))
|
|
6527
6547
|
]);
|
|
6528
6548
|
}
|
|
6529
6549
|
}
|
|
@@ -6542,7 +6562,7 @@ class sr {
|
|
|
6542
6562
|
* Список рекомендованных категорий продуктов.
|
|
6543
6563
|
*/
|
|
6544
6564
|
t(this, "productCategories", []);
|
|
6545
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
6565
|
+
r != null && r.products && (this.products = r.products.map((e) => new ue(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ue(e)));
|
|
6546
6566
|
}
|
|
6547
6567
|
}
|
|
6548
6568
|
class Rs extends p {
|
|
@@ -6731,7 +6751,7 @@ class Ds extends p {
|
|
|
6731
6751
|
}
|
|
6732
6752
|
}
|
|
6733
6753
|
var Lt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Lt || {});
|
|
6734
|
-
class
|
|
6754
|
+
class dt extends wr {
|
|
6735
6755
|
/**
|
|
6736
6756
|
* Инициализирует экземпляр класса {@link User}.
|
|
6737
6757
|
*
|
|
@@ -6770,16 +6790,16 @@ class As extends p {
|
|
|
6770
6790
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6771
6791
|
}
|
|
6772
6792
|
}
|
|
6773
|
-
class
|
|
6793
|
+
class xt extends p {
|
|
6774
6794
|
/**
|
|
6775
6795
|
* Возвращает данные о текущем пользователе.
|
|
6776
6796
|
*/
|
|
6777
6797
|
// eslint-disable-next-line class-methods-use-this
|
|
6778
6798
|
getCurrentUser() {
|
|
6779
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6799
|
+
return this.get("/internal/users/info", {}, (r) => new dt(r.data), !0);
|
|
6780
6800
|
}
|
|
6781
6801
|
}
|
|
6782
|
-
const Ot =
|
|
6802
|
+
const Ot = W("common.user_state_private", () => {
|
|
6783
6803
|
const n = y({}), r = y(void 0);
|
|
6784
6804
|
return {
|
|
6785
6805
|
/**
|
|
@@ -6791,20 +6811,20 @@ const Ot = z("common.user_state_private", () => {
|
|
|
6791
6811
|
*/
|
|
6792
6812
|
currentUser: r
|
|
6793
6813
|
};
|
|
6794
|
-
}),
|
|
6814
|
+
}), $s = W("common.user_state", () => ({
|
|
6795
6815
|
/**
|
|
6796
6816
|
* Данные о текущем пользователе.
|
|
6797
6817
|
*/
|
|
6798
6818
|
currentUser: D(() => {
|
|
6799
6819
|
const r = Ot();
|
|
6800
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(
|
|
6820
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(xt).getCurrentUser().then((e) => {
|
|
6801
6821
|
r.currentUser = e;
|
|
6802
6822
|
}).catch(v).finally(() => {
|
|
6803
6823
|
r.dataLoaderList.currentUser = !1;
|
|
6804
6824
|
})), r.currentUser;
|
|
6805
6825
|
})
|
|
6806
6826
|
}));
|
|
6807
|
-
class
|
|
6827
|
+
class Ts {
|
|
6808
6828
|
/**
|
|
6809
6829
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6810
6830
|
*
|
|
@@ -6831,13 +6851,13 @@ export {
|
|
|
6831
6851
|
mt as AnyReference,
|
|
6832
6852
|
rt as AppBaseConfig,
|
|
6833
6853
|
Ne as BankAccount,
|
|
6834
|
-
|
|
6854
|
+
$e as BasePaginationProvider,
|
|
6835
6855
|
lt as CalculationTypeEnum,
|
|
6836
6856
|
ye as Cart,
|
|
6837
6857
|
zt as CartProvider,
|
|
6838
6858
|
Jt as CatalogProvider,
|
|
6839
6859
|
pr as CatalogableItem,
|
|
6840
|
-
|
|
6860
|
+
q as Category,
|
|
6841
6861
|
Ye as CategoryPricingRule,
|
|
6842
6862
|
Cr as ChannelPrimaryInterest,
|
|
6843
6863
|
ss as City,
|
|
@@ -6845,35 +6865,35 @@ export {
|
|
|
6845
6865
|
rr as Client,
|
|
6846
6866
|
Pt as ClientAdditionalData,
|
|
6847
6867
|
ve as ClientCategory,
|
|
6848
|
-
|
|
6868
|
+
d as ClientDataProvider,
|
|
6849
6869
|
Et as ClientPriceProvider,
|
|
6850
6870
|
Vt as ClientPriceTemplateProvider,
|
|
6851
|
-
|
|
6871
|
+
G as ClientProduct,
|
|
6852
6872
|
Yt as ClientProductCategoryDataProvider,
|
|
6853
6873
|
Xt as ClientProductDataProvider,
|
|
6854
|
-
|
|
6874
|
+
te as ClientShortInfo,
|
|
6855
6875
|
gt as ClientsAdditionalDataRequestTypeEnum,
|
|
6856
6876
|
ns as ClientsListFilters,
|
|
6857
|
-
|
|
6877
|
+
ue as CodedIdentity,
|
|
6858
6878
|
ps as ConfiguratorProvider,
|
|
6859
6879
|
At as ConfiguratorsEnum,
|
|
6860
6880
|
Ue as Contact,
|
|
6861
6881
|
fr as ContactLinks,
|
|
6862
|
-
|
|
6882
|
+
z as ContactPerson,
|
|
6863
6883
|
Rt as ContactPersonRelated,
|
|
6864
6884
|
ft as ContactPosition,
|
|
6865
6885
|
Le as ContactRelation,
|
|
6866
|
-
|
|
6886
|
+
$r as ContragentBase,
|
|
6867
6887
|
Ce as ContragentFactory,
|
|
6868
|
-
|
|
6888
|
+
Tr as ContragentIc,
|
|
6869
6889
|
vt as ContragentPerson,
|
|
6870
6890
|
Ct as ContragentUlNr,
|
|
6871
6891
|
ar as ContragentUlR,
|
|
6872
6892
|
Me as CostSourceEnum,
|
|
6873
|
-
|
|
6893
|
+
Z as Country,
|
|
6874
6894
|
ze as CuratedDirection,
|
|
6875
6895
|
We as Curator,
|
|
6876
|
-
|
|
6896
|
+
x as Currency,
|
|
6877
6897
|
Ds as DataSuggestionProvider,
|
|
6878
6898
|
os as DataTablePagination,
|
|
6879
6899
|
Dt as DataTablePaginationRequestParams,
|
|
@@ -6881,47 +6901,47 @@ export {
|
|
|
6881
6901
|
hs as DateTimeProvider,
|
|
6882
6902
|
tt as DeletableNamedIdentity,
|
|
6883
6903
|
Re as DeliveryAddress,
|
|
6884
|
-
|
|
6904
|
+
U as DeliveryType,
|
|
6885
6905
|
Mt as DetailedJwtPayload,
|
|
6886
6906
|
Yr as DeviceTypeResolutionConfig,
|
|
6887
6907
|
nt as DiscountShortInfo,
|
|
6888
|
-
|
|
6889
|
-
|
|
6908
|
+
Ts as FieldValidationResultData,
|
|
6909
|
+
M as FilterGroup,
|
|
6890
6910
|
Xe as FilterItem,
|
|
6891
6911
|
Je as FilterOpEnum,
|
|
6892
6912
|
gr as GeoCoordinates,
|
|
6893
6913
|
it as HiddenCatalogableItem,
|
|
6894
|
-
|
|
6914
|
+
he as HttpCachedRequester,
|
|
6895
6915
|
Xr as HttpParamsConfig,
|
|
6896
6916
|
p as HttpRequester,
|
|
6897
|
-
|
|
6917
|
+
re as Identity,
|
|
6898
6918
|
st as Image,
|
|
6899
|
-
|
|
6919
|
+
j as JwtPayload,
|
|
6900
6920
|
De as Manager,
|
|
6901
6921
|
Be as ManagerCommon,
|
|
6902
6922
|
ms as ManagerDataFactory,
|
|
6903
|
-
|
|
6923
|
+
$t as ManagerDataProvider,
|
|
6904
6924
|
It as MetaTagItem,
|
|
6905
6925
|
b as NamedIdentity,
|
|
6906
6926
|
Rr as Operator,
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
6927
|
+
B as Opf,
|
|
6928
|
+
N as OpfEnum,
|
|
6929
|
+
_ as Order,
|
|
6910
6930
|
Ir as OrderInfo,
|
|
6911
6931
|
at as OrderItem,
|
|
6912
6932
|
mr as OrderItemBase,
|
|
6913
6933
|
yt as OrderPaymentStatus,
|
|
6914
6934
|
Sr as OrderShortInfo,
|
|
6915
|
-
|
|
6916
|
-
|
|
6935
|
+
Te as OrderStatus,
|
|
6936
|
+
Tt as OrderStatusEnum,
|
|
6917
6937
|
bt as OrderStatusHistoryInfo,
|
|
6918
6938
|
ws as OrdersDataProvider,
|
|
6919
6939
|
ys as OrdersListFilters,
|
|
6920
6940
|
br as PaginationFiltersBase,
|
|
6921
|
-
|
|
6941
|
+
ee as PartnerGroup,
|
|
6922
6942
|
Pr as PaymentType,
|
|
6923
6943
|
we as PreferencesStorageProvider,
|
|
6924
|
-
|
|
6944
|
+
de as PriceAnalyze,
|
|
6925
6945
|
vs as PriceAnalyzeProvider,
|
|
6926
6946
|
Pe as PriceCoefficient,
|
|
6927
6947
|
hr as PriceCoefficientEnum,
|
|
@@ -6929,11 +6949,11 @@ export {
|
|
|
6929
6949
|
St as PriceHistoryItem,
|
|
6930
6950
|
Q as PriceTemplate,
|
|
6931
6951
|
ke as PriceTemplateCategory,
|
|
6932
|
-
|
|
6952
|
+
ne as PriceTemplateClient,
|
|
6933
6953
|
yr as PriceTemplateICatalogableItem,
|
|
6934
6954
|
Ie as PriceTemplateProduct,
|
|
6935
6955
|
Zt as PriceTemplateProvider,
|
|
6936
|
-
|
|
6956
|
+
ce as PricingRole,
|
|
6937
6957
|
es as PricingRoleProvider,
|
|
6938
6958
|
qe as PrimaryCatalogableItem,
|
|
6939
6959
|
k as Product,
|
|
@@ -6944,16 +6964,16 @@ export {
|
|
|
6944
6964
|
kt as ProductPriceHistory,
|
|
6945
6965
|
Qe as ProductUnit,
|
|
6946
6966
|
rs as PropertiesProvider,
|
|
6947
|
-
|
|
6967
|
+
oe as Property,
|
|
6948
6968
|
vr as PropertyType,
|
|
6949
6969
|
ut as PropertyTypeEnum,
|
|
6950
|
-
|
|
6970
|
+
K as PropertyValue,
|
|
6951
6971
|
Rs as RecommendationsDataProvider,
|
|
6952
6972
|
sr as RecommendationsList,
|
|
6953
6973
|
w as Reference,
|
|
6954
6974
|
is as ReferenceDataFactory,
|
|
6955
6975
|
a as ReferenceDataProvider,
|
|
6956
|
-
|
|
6976
|
+
pe as Region,
|
|
6957
6977
|
Dr as ResourceType,
|
|
6958
6978
|
O as SalesDirection,
|
|
6959
6979
|
Zr as SentryConfig,
|
|
@@ -6967,15 +6987,15 @@ export {
|
|
|
6967
6987
|
kr as UnitsHelper,
|
|
6968
6988
|
ls as UnknownClientDataProvider,
|
|
6969
6989
|
ur as UpdatableNamedIdentity,
|
|
6970
|
-
|
|
6990
|
+
dt as User,
|
|
6971
6991
|
As as UserAuthDataProvider,
|
|
6972
6992
|
wr as UserCommonInfo,
|
|
6973
|
-
|
|
6993
|
+
xt as UserDataProvider,
|
|
6974
6994
|
pt as UserPricingRole,
|
|
6975
6995
|
L as UserShortInfo,
|
|
6976
6996
|
Lt as UserTypeEnum,
|
|
6977
6997
|
us as VersionConfig,
|
|
6978
|
-
|
|
6998
|
+
me as Warehouse,
|
|
6979
6999
|
et as WebSocketConfig,
|
|
6980
7000
|
Ze as findCatalogItemByIdRecursive,
|
|
6981
7001
|
er as flattenCatalogItems,
|
|
@@ -6983,5 +7003,5 @@ export {
|
|
|
6983
7003
|
Se as useAuthStateStore,
|
|
6984
7004
|
I as useBaseConfigStateStore,
|
|
6985
7005
|
fs as useReferencesStore,
|
|
6986
|
-
|
|
7006
|
+
$s as useUserStateStore
|
|
6987
7007
|
};
|