@snabcentr/common-lib 1.78.0 → 1.79.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/sc-common-lib.js +545 -537
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -2
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/cart/classes/cart-item-base.d.ts +2 -2
- package/dist/src/cart/classes/cart-item-base.d.ts.map +1 -1
- package/dist/src/cart/classes/cart-item.d.ts +0 -4
- package/dist/src/cart/classes/cart-item.d.ts.map +1 -1
- package/dist/src/cart/interfaces/i-cart-item-base.d.ts +2 -2
- package/dist/src/cart/interfaces/i-cart-item-base.d.ts.map +1 -1
- package/dist/src/cart/interfaces/i-cart-item.d.ts +0 -4
- package/dist/src/cart/interfaces/i-cart-item.d.ts.map +1 -1
- package/dist/src/catalog/classes/product.d.ts +4 -10
- package/dist/src/catalog/classes/product.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-product.d.ts +4 -10
- package/dist/src/catalog/interfaces/i-product.d.ts.map +1 -1
- package/dist/src/helpers/units-helper.d.ts +0 -10
- package/dist/src/helpers/units-helper.d.ts.map +1 -1
- package/dist/src/orders/classes/order-product.d.ts +2 -1
- package/dist/src/orders/classes/order-product.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-order-product.d.ts +2 -1
- package/dist/src/orders/interfaces/i-order-product.d.ts.map +1 -1
- package/dist/src/references/classes/currency.d.ts +8 -0
- package/dist/src/references/classes/currency.d.ts.map +1 -1
- package/dist/src/references/classes/index.d.ts +1 -0
- package/dist/src/references/classes/index.d.ts.map +1 -1
- package/dist/src/references/classes/product-unit.d.ts +30 -0
- package/dist/src/references/classes/product-unit.d.ts.map +1 -0
- package/dist/src/references/interfaces/i-currency.d.ts +8 -0
- package/dist/src/references/interfaces/i-currency.d.ts.map +1 -1
- package/dist/src/references/interfaces/i-product-unit.d.ts +23 -0
- package/dist/src/references/interfaces/i-product-unit.d.ts.map +1 -0
- package/dist/src/references/interfaces/index.d.ts +2 -1
- package/dist/src/references/interfaces/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var Tr = Object.defineProperty;
|
|
2
2
|
var ar = (n, r, e) => r in n ? Tr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => ar(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as ne, isNil as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { defineStore as
|
|
8
|
-
import { ref as y, markRaw as
|
|
9
|
-
import { isAfter as
|
|
4
|
+
import { jwtDecode as sr } from "jwt-decode";
|
|
5
|
+
import { merge as ne, isNil as A, isEmpty as K, noop as w, mapValues as ir, isArray as V, every as br, split as Sr, toUpper as kr, constant as Ir, isString as v, cloneDeep as Lr, toLower as xr, isFunction as qe, map as ve, forEach as dr, isDate as Ie, omitBy as nr, isObject as or } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Oe, objectToSnake as ze } from "ts-case-convert";
|
|
7
|
+
import { defineStore as j } from "pinia";
|
|
8
|
+
import { ref as y, markRaw as _r, computed as D } from "vue";
|
|
9
|
+
import { isAfter as We, parseISO as C, startOfToday as Le, format as q, addSeconds as qr, addBusinessDays as Or, endOfTomorrow as Nr, startOfTomorrow as Ur, endOfYesterday as Hr, startOfYesterday as jr, endOfToday as Gr, endOfDay as Fr, startOfDay as Mr } from "date-fns";
|
|
10
10
|
import Br from "axios";
|
|
11
|
-
class
|
|
11
|
+
class O {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -107,11 +107,11 @@ class _ {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = sr(r), s = new O(Oe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class Ot extends O {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -151,7 +151,7 @@ class _t extends _ {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new
|
|
154
|
+
return new O(Oe(sr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
class zr {
|
|
@@ -336,7 +336,7 @@ class Vr {
|
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
const
|
|
339
|
+
const k = j("common.config", () => {
|
|
340
340
|
const n = y(new Vr());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
@@ -378,8 +378,8 @@ class me {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const s = JSON.parse(e);
|
|
381
|
-
if (!s.availableFor ||
|
|
382
|
-
if (
|
|
381
|
+
if (!s.availableFor || We(C(s.availableFor) || Le(), /* @__PURE__ */ new Date())) {
|
|
382
|
+
if (A(s.data) || K(s.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return s.data;
|
|
385
385
|
}
|
|
@@ -401,7 +401,7 @@ class me {
|
|
|
401
401
|
static saveActualDataToStorage(r, e, s) {
|
|
402
402
|
if (this.isLocalStorageAvailable())
|
|
403
403
|
try {
|
|
404
|
-
if (
|
|
404
|
+
if (A(e) || K(e))
|
|
405
405
|
throw new Error("Data is empty");
|
|
406
406
|
const i = JSON.stringify({
|
|
407
407
|
availableFor: s,
|
|
@@ -452,7 +452,7 @@ class me {
|
|
|
452
452
|
const i = localStorage.getItem(s);
|
|
453
453
|
if (i) {
|
|
454
454
|
const o = JSON.parse(i);
|
|
455
|
-
o.availableFor && !
|
|
455
|
+
o.availableFor && !We(C(o.availableFor) || Le(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(s);
|
|
@@ -468,32 +468,32 @@ class me {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function
|
|
471
|
+
function Ee(n) {
|
|
472
472
|
try {
|
|
473
|
-
const r =
|
|
473
|
+
const r = O.getJwtPayload(n);
|
|
474
474
|
return new Date(r.exp * 1e3);
|
|
475
475
|
} catch {
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
const
|
|
479
|
+
const B = j("common.auth_state_private", () => {
|
|
480
480
|
const n = y(
|
|
481
481
|
(() => {
|
|
482
|
-
var
|
|
482
|
+
var u;
|
|
483
483
|
const o = me.getActualDataFromStorage(
|
|
484
484
|
"sc.token"
|
|
485
485
|
/* JwtToken */
|
|
486
486
|
);
|
|
487
487
|
if (o)
|
|
488
488
|
return Promise.resolve(o);
|
|
489
|
-
const c = (
|
|
489
|
+
const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
490
490
|
return c ? Promise.resolve(c) : void 0;
|
|
491
491
|
})()
|
|
492
|
-
), r = y(void 0), e = y(void 0), s =
|
|
492
|
+
), r = y(void 0), e = y(void 0), s = _r(/* @__PURE__ */ new Map());
|
|
493
493
|
function i() {
|
|
494
|
-
e.value = void 0,
|
|
495
|
-
const c =
|
|
496
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
494
|
+
e.value = void 0, A(n.value) || n.value.then((o) => {
|
|
495
|
+
const c = O.getJwtPayload(o);
|
|
496
|
+
e.value = c.exp * 1e3 > Date.now() ? ir(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(w);
|
|
498
498
|
}
|
|
499
499
|
return {
|
|
@@ -518,49 +518,49 @@ const M = H("common.auth_state_private", () => {
|
|
|
518
518
|
*/
|
|
519
519
|
recalculateUserPermissions: i
|
|
520
520
|
};
|
|
521
|
-
}),
|
|
521
|
+
}), $e = j("common.auth_state", () => {
|
|
522
522
|
const n = D(() => {
|
|
523
|
-
const o =
|
|
524
|
-
if (
|
|
523
|
+
const o = B();
|
|
524
|
+
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
|
-
o.jwtToken = c, c.then((
|
|
527
|
-
o.jwtToken = Promise.resolve(
|
|
526
|
+
o.jwtToken = c, c.then((u) => {
|
|
527
|
+
o.jwtToken = Promise.resolve(u), me.saveActualDataToStorage("sc.token", u, Ee(u)), o.recalculateUserPermissions();
|
|
528
528
|
}).catch(w);
|
|
529
529
|
}
|
|
530
530
|
return o.jwtToken;
|
|
531
531
|
});
|
|
532
532
|
function r(o) {
|
|
533
|
-
|
|
533
|
+
B().jwtTokenUpdater = o;
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
|
-
const c =
|
|
537
|
-
c.jwtToken = Promise.resolve(o), me.saveActualDataToStorage("sc.token", o,
|
|
536
|
+
const c = B();
|
|
537
|
+
c.jwtToken = Promise.resolve(o), me.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function s() {
|
|
540
|
-
const o =
|
|
540
|
+
const o = B();
|
|
541
541
|
o.jwtToken = void 0, o.userPermissions = void 0, me.saveActualDataToStorage("sc.token", void 0);
|
|
542
542
|
}
|
|
543
543
|
function i(o) {
|
|
544
|
-
const c =
|
|
545
|
-
|
|
546
|
-
const g =
|
|
547
|
-
c.userPermissions = g.exp * 1e3 > Date.now() ?
|
|
544
|
+
const c = B();
|
|
545
|
+
!A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((f) => {
|
|
546
|
+
const g = O.getJwtPayload(f);
|
|
547
|
+
c.userPermissions = g.exp * 1e3 > Date.now() ? ir(g.resourceAccess, (b) => (b == null ? void 0 : b.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(w);
|
|
549
|
-
const
|
|
550
|
-
if (c.userPermissionsComputedRefs.has(
|
|
551
|
-
return c.userPermissionsComputedRefs.get(
|
|
549
|
+
const u = V(o) ? o.join(" && ") : o;
|
|
550
|
+
if (c.userPermissionsComputedRefs.has(u))
|
|
551
|
+
return c.userPermissionsComputedRefs.get(u);
|
|
552
552
|
const h = D(() => {
|
|
553
553
|
const f = (g) => {
|
|
554
|
-
var
|
|
555
|
-
const
|
|
556
|
-
if (
|
|
554
|
+
var M;
|
|
555
|
+
const b = Sr(g, ".");
|
|
556
|
+
if (b.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [ee, re] =
|
|
559
|
-
return V(
|
|
558
|
+
const [ee, re] = b, F = (M = B().userPermissions) == null ? void 0 : M[ee];
|
|
559
|
+
return V(F) && F.includes(re);
|
|
560
560
|
};
|
|
561
561
|
return V(o) ? br(o, (g) => f(g)) : f(o);
|
|
562
562
|
});
|
|
563
|
-
return c.userPermissionsComputedRefs.set(
|
|
563
|
+
return c.userPermissionsComputedRefs.set(u, h), h;
|
|
564
564
|
}
|
|
565
565
|
return {
|
|
566
566
|
/**
|
|
@@ -591,7 +591,7 @@ const M = H("common.auth_state_private", () => {
|
|
|
591
591
|
hasUserPermission: i
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
|
-
class
|
|
594
|
+
class G {
|
|
595
595
|
/**
|
|
596
596
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
597
597
|
*
|
|
@@ -607,16 +607,16 @@ class j {
|
|
|
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, A(this.id) && (A(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 === "" : A(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class a extends
|
|
619
|
+
class a extends G {
|
|
620
620
|
/**
|
|
621
621
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
622
622
|
*
|
|
@@ -646,7 +646,7 @@ class oe extends a {
|
|
|
646
646
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
class
|
|
649
|
+
class cr extends oe {
|
|
650
650
|
/**
|
|
651
651
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
652
652
|
*
|
|
@@ -665,7 +665,7 @@ class ur extends oe {
|
|
|
665
665
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
class
|
|
668
|
+
class xe extends cr {
|
|
669
669
|
/**
|
|
670
670
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
671
671
|
*
|
|
@@ -680,7 +680,7 @@ class de extends ur {
|
|
|
680
680
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
class pe extends
|
|
683
|
+
class pe extends xe {
|
|
684
684
|
/**
|
|
685
685
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
686
686
|
*
|
|
@@ -727,7 +727,7 @@ class R extends a {
|
|
|
727
727
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
728
728
|
}
|
|
729
729
|
}
|
|
730
|
-
class
|
|
730
|
+
class Ce extends R {
|
|
731
731
|
/**
|
|
732
732
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
733
733
|
*/
|
|
@@ -735,7 +735,7 @@ class Pe extends R {
|
|
|
735
735
|
return { id: -2, slug: lr.Retail, name: "Розн. цена", guid: "", isNewRec: Ir(!0) };
|
|
736
736
|
}
|
|
737
737
|
}
|
|
738
|
-
class
|
|
738
|
+
class Ne {
|
|
739
739
|
/**
|
|
740
740
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
741
741
|
*
|
|
@@ -762,10 +762,10 @@ class Ue {
|
|
|
762
762
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
763
763
|
*/
|
|
764
764
|
t(this, "readOnly");
|
|
765
|
-
this.coefficient = new
|
|
765
|
+
this.coefficient = new Ce(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
|
-
class
|
|
768
|
+
class ur {
|
|
769
769
|
/**
|
|
770
770
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
771
771
|
*
|
|
@@ -785,7 +785,7 @@ class pr {
|
|
|
785
785
|
}
|
|
786
786
|
class Q extends R {
|
|
787
787
|
}
|
|
788
|
-
class
|
|
788
|
+
class Pe extends R {
|
|
789
789
|
/**
|
|
790
790
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
791
791
|
*
|
|
@@ -814,7 +814,7 @@ class Re extends R {
|
|
|
814
814
|
* Координаты склада.
|
|
815
815
|
*/
|
|
816
816
|
t(this, "coordinates");
|
|
817
|
-
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 Q(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
817
|
+
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 Q(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new ur(e == null ? void 0 : e.coordinates);
|
|
818
818
|
}
|
|
819
819
|
}
|
|
820
820
|
class Kr {
|
|
@@ -832,22 +832,37 @@ class Kr {
|
|
|
832
832
|
* Количество остатков товара на складе.
|
|
833
833
|
*/
|
|
834
834
|
t(this, "count");
|
|
835
|
-
this.warehouse = new
|
|
835
|
+
this.warehouse = new Pe(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
836
836
|
}
|
|
837
837
|
}
|
|
838
|
-
class
|
|
838
|
+
class pr extends a {
|
|
839
839
|
/**
|
|
840
|
-
* Инициализирует экземпляр класса {@link
|
|
840
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
841
841
|
*
|
|
842
842
|
* @param data Данные для первоначальной инициализации.
|
|
843
843
|
*/
|
|
844
844
|
constructor(e) {
|
|
845
845
|
super(e);
|
|
846
846
|
/**
|
|
847
|
-
*
|
|
847
|
+
* Дата и время последнего изменения.
|
|
848
848
|
*/
|
|
849
|
-
t(this, "
|
|
850
|
-
this.
|
|
849
|
+
t(this, "updatedAt");
|
|
850
|
+
this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
851
|
+
}
|
|
852
|
+
}
|
|
853
|
+
class Qr extends pr {
|
|
854
|
+
/**
|
|
855
|
+
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
856
|
+
*
|
|
857
|
+
* @param data Данные для первоначальной инициализации.
|
|
858
|
+
*/
|
|
859
|
+
constructor(e) {
|
|
860
|
+
super(e);
|
|
861
|
+
/**
|
|
862
|
+
* Дата и время последнего удаления.
|
|
863
|
+
*/
|
|
864
|
+
t(this, "deletedAt");
|
|
865
|
+
this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
851
866
|
}
|
|
852
867
|
}
|
|
853
868
|
class Yr {
|
|
@@ -873,14 +888,83 @@ class Yr {
|
|
|
873
888
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
874
889
|
}
|
|
875
890
|
}
|
|
876
|
-
class
|
|
891
|
+
class Xr extends cr {
|
|
892
|
+
/**
|
|
893
|
+
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
894
|
+
*
|
|
895
|
+
* @param data Данные для первоначальной инициализации.
|
|
896
|
+
*/
|
|
897
|
+
constructor(e) {
|
|
898
|
+
super(e);
|
|
899
|
+
/**
|
|
900
|
+
* Признак того, что категория скрыта.
|
|
901
|
+
*/
|
|
902
|
+
t(this, "isHidden");
|
|
903
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
class N extends a {
|
|
907
|
+
/**
|
|
908
|
+
* Инициализирует экземпляр класса {@link Currency}.
|
|
909
|
+
*
|
|
910
|
+
* @param data Данные для первоначальной инициализации.
|
|
911
|
+
*/
|
|
912
|
+
constructor(e) {
|
|
913
|
+
super(e);
|
|
914
|
+
/**
|
|
915
|
+
* Сигнатура валюты.
|
|
916
|
+
*/
|
|
917
|
+
t(this, "signature", "");
|
|
918
|
+
/**
|
|
919
|
+
* Цифровой код валюты по стандарту ISO 4217.
|
|
920
|
+
*/
|
|
921
|
+
t(this, "code");
|
|
922
|
+
/**
|
|
923
|
+
* Символ валюты.
|
|
924
|
+
*/
|
|
925
|
+
t(this, "symbol", "");
|
|
926
|
+
/**
|
|
927
|
+
* Точность округления (количество знаков после запятой).
|
|
928
|
+
*/
|
|
929
|
+
t(this, "precision");
|
|
930
|
+
e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
|
|
931
|
+
}
|
|
932
|
+
}
|
|
933
|
+
class Je extends a {
|
|
934
|
+
/**
|
|
935
|
+
* Инициализирует экземпляр класса {@link ProductUnit}.
|
|
936
|
+
*
|
|
937
|
+
* @param data Данные для первоначальной инициализации.
|
|
938
|
+
*/
|
|
939
|
+
constructor(e) {
|
|
940
|
+
super(e);
|
|
941
|
+
/**
|
|
942
|
+
* Символьное обозначение (slug) единицы измерения продукта.
|
|
943
|
+
*/
|
|
944
|
+
t(this, "slug", "");
|
|
945
|
+
/**
|
|
946
|
+
* Описание единицы измерения продукта.
|
|
947
|
+
*/
|
|
948
|
+
t(this, "description");
|
|
949
|
+
/**
|
|
950
|
+
* Признак того, что единица измерения является единицей измерения площади.
|
|
951
|
+
*/
|
|
952
|
+
t(this, "isSquare", !1);
|
|
953
|
+
/**
|
|
954
|
+
* Признак того, что единица измерения является линейной величиной.
|
|
955
|
+
*/
|
|
956
|
+
t(this, "isLinear", !1);
|
|
957
|
+
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
class S extends Xr {
|
|
877
961
|
/**
|
|
878
962
|
* Инициализирует экземпляр класса {@link Product}.
|
|
879
963
|
*
|
|
880
964
|
* @param data Данные для первоначальной инициализации.
|
|
881
965
|
*/
|
|
882
966
|
constructor(e) {
|
|
883
|
-
var i, o, c,
|
|
967
|
+
var i, o, c, u;
|
|
884
968
|
super(e);
|
|
885
969
|
/**
|
|
886
970
|
* Артикул производителя/поставщика.
|
|
@@ -898,18 +982,10 @@ class k extends Qr {
|
|
|
898
982
|
* Минимальное количество товара для заказа.
|
|
899
983
|
*/
|
|
900
984
|
t(this, "minCount");
|
|
901
|
-
/**
|
|
902
|
-
* Единица измерения количества товара.
|
|
903
|
-
*/
|
|
904
|
-
t(this, "quantityUnit");
|
|
905
985
|
/**
|
|
906
986
|
* Валюта товара или услуги.
|
|
907
987
|
*/
|
|
908
988
|
t(this, "currency");
|
|
909
|
-
/**
|
|
910
|
-
* Сигнатура валюты.
|
|
911
|
-
*/
|
|
912
|
-
t(this, "currencySignature");
|
|
913
989
|
/**
|
|
914
990
|
* Стоимость товара или услуги.
|
|
915
991
|
*/
|
|
@@ -958,17 +1034,15 @@ class k extends Qr {
|
|
|
958
1034
|
* Список коэффициентов цен на продукт.
|
|
959
1035
|
*/
|
|
960
1036
|
t(this, "priceCoefficients");
|
|
961
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit =
|
|
1037
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Je(e.unit) : new Je(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new N(e.currency) : new N(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = v(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((h) => new Kr(h))) ?? [], this.type = "product";
|
|
962
1038
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
|
|
963
|
-
s && (this.category = new
|
|
1039
|
+
s && (this.category = new xe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new xe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new Yr(h, k().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((h) => new Ne(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
964
1040
|
}
|
|
965
1041
|
/**
|
|
966
1042
|
* Возвращает признак, что это измеряемый товар.
|
|
967
1043
|
*/
|
|
968
1044
|
getIsMeasurable() {
|
|
969
|
-
|
|
970
|
-
const s = (i = b().getConfig().catalog) == null ? void 0 : i.products.units;
|
|
971
|
-
return [...(s == null ? void 0 : s.linear) ?? ["пог.м.", "м."], ...(s == null ? void 0 : s.square) ?? ["м2"]].includes(this.unit);
|
|
1045
|
+
return this.unit.isLinear || this.unit.isSquare;
|
|
972
1046
|
}
|
|
973
1047
|
/**
|
|
974
1048
|
* Возвращает розничную цену.
|
|
@@ -983,7 +1057,7 @@ class k extends Qr {
|
|
|
983
1057
|
return this.retailCostRub ?? this.costRub;
|
|
984
1058
|
}
|
|
985
1059
|
}
|
|
986
|
-
class
|
|
1060
|
+
class Zr extends G {
|
|
987
1061
|
/**
|
|
988
1062
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
989
1063
|
*
|
|
@@ -1034,11 +1108,11 @@ class Xr extends j {
|
|
|
1034
1108
|
/**
|
|
1035
1109
|
* Признак того, что позиция является дополнительной продажей.
|
|
1036
1110
|
*/
|
|
1037
|
-
t(this, "
|
|
1038
|
-
this.product = new
|
|
1111
|
+
t(this, "isAdditionalSale");
|
|
1112
|
+
this.product = new S(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new pe(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Lr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
1039
1113
|
}
|
|
1040
1114
|
}
|
|
1041
|
-
class
|
|
1115
|
+
class et extends Zr {
|
|
1042
1116
|
/**
|
|
1043
1117
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
1044
1118
|
*
|
|
@@ -1046,10 +1120,6 @@ class Zr extends Xr {
|
|
|
1046
1120
|
*/
|
|
1047
1121
|
constructor(e) {
|
|
1048
1122
|
super(e);
|
|
1049
|
-
/**
|
|
1050
|
-
* Валюта товара или услуги.
|
|
1051
|
-
*/
|
|
1052
|
-
t(this, "currency");
|
|
1053
1123
|
/**
|
|
1054
1124
|
* Итоговая стоимость товара или услуги в валюте.
|
|
1055
1125
|
*/
|
|
@@ -1085,7 +1155,7 @@ class Zr extends Xr {
|
|
|
1085
1155
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
1086
1156
|
*/
|
|
1087
1157
|
t(this, "sawing");
|
|
1088
|
-
this.
|
|
1158
|
+
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;
|
|
1089
1159
|
}
|
|
1090
1160
|
}
|
|
1091
1161
|
class ge {
|
|
@@ -1107,10 +1177,10 @@ class ge {
|
|
|
1107
1177
|
* Список итоговых сумм по направлениям продаж.
|
|
1108
1178
|
*/
|
|
1109
1179
|
t(this, "directionsSum");
|
|
1110
|
-
this.items = r.items.map((e) => new
|
|
1180
|
+
this.items = r.items.map((e) => new et(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1111
1181
|
}
|
|
1112
1182
|
}
|
|
1113
|
-
class
|
|
1183
|
+
class Ue {
|
|
1114
1184
|
/**
|
|
1115
1185
|
* Инициализирует экземпляр указанного класса.
|
|
1116
1186
|
*
|
|
@@ -1141,7 +1211,7 @@ const P = class P {
|
|
|
1141
1211
|
/**
|
|
1142
1212
|
* Базовый URL путь для выполнения запросов.
|
|
1143
1213
|
*/
|
|
1144
|
-
t(this, "baseUrl", `${
|
|
1214
|
+
t(this, "baseUrl", `${k().config.http.portalApiUrl}/api`);
|
|
1145
1215
|
/**
|
|
1146
1216
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
1147
1217
|
*
|
|
@@ -1168,7 +1238,7 @@ const P = class P {
|
|
|
1168
1238
|
// eslint-disable-next-line class-methods-use-this
|
|
1169
1239
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1170
1240
|
let e;
|
|
1171
|
-
return $(
|
|
1241
|
+
return A($e().jwtToken) || (e = await $e().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1172
1242
|
});
|
|
1173
1243
|
/**
|
|
1174
1244
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1183,7 +1253,7 @@ const P = class P {
|
|
|
1183
1253
|
* @param request Данные запроса.
|
|
1184
1254
|
*/
|
|
1185
1255
|
// eslint-disable-next-line class-methods-use-this
|
|
1186
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1256
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = ze(r.params)), ["put", "patch", "post"].includes(xr(r.method)) && r.data && (r.data = ze(r.data))), r));
|
|
1187
1257
|
/**
|
|
1188
1258
|
* Перехватчик ошибок ответов на запрос.
|
|
1189
1259
|
*
|
|
@@ -1192,7 +1262,7 @@ const P = class P {
|
|
|
1192
1262
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
1193
1263
|
var s;
|
|
1194
1264
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
1195
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
1265
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : ($e().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
1196
1266
|
});
|
|
1197
1267
|
/**
|
|
1198
1268
|
* Перехватчик ответа для вызова пользовательских хуков.
|
|
@@ -1207,7 +1277,7 @@ const P = class P {
|
|
|
1207
1277
|
* @param response Данные ответа на запрос.
|
|
1208
1278
|
*/
|
|
1209
1279
|
// eslint-disable-next-line class-methods-use-this
|
|
1210
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1280
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Oe(r.data)), r));
|
|
1211
1281
|
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = Br.create({
|
|
1212
1282
|
headers: {
|
|
1213
1283
|
Accept: "application/json",
|
|
@@ -1272,7 +1342,7 @@ const P = class P {
|
|
|
1272
1342
|
* @param type Тип данных, которыми оперирует метод.
|
|
1273
1343
|
*/
|
|
1274
1344
|
static getInstance(r) {
|
|
1275
|
-
return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] =
|
|
1345
|
+
return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] = Ue.simpleInstanceInitializer(r)), P.instances[r.name];
|
|
1276
1346
|
}
|
|
1277
1347
|
/**
|
|
1278
1348
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1281,8 +1351,8 @@ const P = class P {
|
|
|
1281
1351
|
*/
|
|
1282
1352
|
static convertHttpErrorResponse(r) {
|
|
1283
1353
|
var e, s;
|
|
1284
|
-
if (
|
|
1285
|
-
const i = r == null ? void 0 : r.response;
|
|
1354
|
+
if (A(r) || !A(r.request) || !A(r.response)) {
|
|
1355
|
+
const i = A(r) ? {} : r == null ? void 0 : r.response;
|
|
1286
1356
|
return Promise.reject({
|
|
1287
1357
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
1288
1358
|
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
@@ -1421,15 +1491,15 @@ class Nt extends p {
|
|
|
1421
1491
|
return this.patch(
|
|
1422
1492
|
`internal/clients/${r.id}/cart`,
|
|
1423
1493
|
{
|
|
1424
|
-
|
|
1425
|
-
|
|
1494
|
+
product_id: e.product.id,
|
|
1495
|
+
product_category_id: e.configurator ? e.category.id : void 0,
|
|
1426
1496
|
quantity: e.quantity,
|
|
1427
1497
|
height: e.height,
|
|
1428
1498
|
length: e.length,
|
|
1429
1499
|
width: e.width,
|
|
1430
1500
|
configurator: e.configurator,
|
|
1431
1501
|
marker: e.marker,
|
|
1432
|
-
|
|
1502
|
+
is_additional_sale: e.isAdditionalSale,
|
|
1433
1503
|
...e.configuratorParams
|
|
1434
1504
|
},
|
|
1435
1505
|
(i) => new ge(i.data),
|
|
@@ -1451,15 +1521,15 @@ class Nt extends p {
|
|
|
1451
1521
|
return this.patch(
|
|
1452
1522
|
`internal/clients/${r.id}/cart/${e.id}`,
|
|
1453
1523
|
{
|
|
1454
|
-
|
|
1455
|
-
|
|
1524
|
+
product_id: e.product.id,
|
|
1525
|
+
product_category_id: e.configurator ? e.category.id : void 0,
|
|
1456
1526
|
quantity: e.quantity,
|
|
1457
1527
|
height: e.height,
|
|
1458
1528
|
length: e.length,
|
|
1459
1529
|
width: e.width,
|
|
1460
1530
|
configurator: e.configurator,
|
|
1461
1531
|
marker: e.marker,
|
|
1462
|
-
|
|
1532
|
+
is_additional_sale: e.isAdditionalSale,
|
|
1463
1533
|
...e.configuratorParams
|
|
1464
1534
|
},
|
|
1465
1535
|
(i) => new ge(i.data),
|
|
@@ -1499,8 +1569,8 @@ class Nt extends p {
|
|
|
1499
1569
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1500
1570
|
}
|
|
1501
1571
|
}
|
|
1502
|
-
var
|
|
1503
|
-
class
|
|
1572
|
+
var rt = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(rt || {}), He = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(He || {}), tt = /* @__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))(tt || {});
|
|
1573
|
+
class W extends pe {
|
|
1504
1574
|
/**
|
|
1505
1575
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1506
1576
|
*
|
|
@@ -1517,37 +1587,7 @@ class z extends pe {
|
|
|
1517
1587
|
* Список продуктов категории.
|
|
1518
1588
|
*/
|
|
1519
1589
|
t(this, "products");
|
|
1520
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1521
|
-
}
|
|
1522
|
-
}
|
|
1523
|
-
class hr extends a {
|
|
1524
|
-
/**
|
|
1525
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1526
|
-
*
|
|
1527
|
-
* @param data Данные для первоначальной инициализации.
|
|
1528
|
-
*/
|
|
1529
|
-
constructor(e) {
|
|
1530
|
-
super(e);
|
|
1531
|
-
/**
|
|
1532
|
-
* Дата и время последнего изменения.
|
|
1533
|
-
*/
|
|
1534
|
-
t(this, "updatedAt");
|
|
1535
|
-
this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1536
|
-
}
|
|
1537
|
-
}
|
|
1538
|
-
class tt extends hr {
|
|
1539
|
-
/**
|
|
1540
|
-
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1541
|
-
*
|
|
1542
|
-
* @param data Данные для первоначальной инициализации.
|
|
1543
|
-
*/
|
|
1544
|
-
constructor(e) {
|
|
1545
|
-
super(e);
|
|
1546
|
-
/**
|
|
1547
|
-
* Дата и время последнего удаления.
|
|
1548
|
-
*/
|
|
1549
|
-
t(this, "deletedAt");
|
|
1550
|
-
this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1590
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new W(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new S(o));
|
|
1551
1591
|
}
|
|
1552
1592
|
}
|
|
1553
1593
|
class d extends a {
|
|
@@ -1604,7 +1644,7 @@ class st extends a {
|
|
|
1604
1644
|
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = v(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new d(e == null ? void 0 : e.owner), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1605
1645
|
}
|
|
1606
1646
|
}
|
|
1607
|
-
class
|
|
1647
|
+
class E extends pr {
|
|
1608
1648
|
/**
|
|
1609
1649
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1610
1650
|
*
|
|
@@ -1623,7 +1663,7 @@ class W extends hr {
|
|
|
1623
1663
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1624
1664
|
}
|
|
1625
1665
|
}
|
|
1626
|
-
class Y extends
|
|
1666
|
+
class Y extends S {
|
|
1627
1667
|
/**
|
|
1628
1668
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1629
1669
|
*
|
|
@@ -1659,10 +1699,10 @@ class Y extends k {
|
|
|
1659
1699
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1660
1700
|
*/
|
|
1661
1701
|
t(this, "isFavorite");
|
|
1662
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1702
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? He.Product, this.discount = e != null && e.discount ? new st(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new E(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1663
1703
|
}
|
|
1664
1704
|
}
|
|
1665
|
-
class
|
|
1705
|
+
class hr {
|
|
1666
1706
|
/**
|
|
1667
1707
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1668
1708
|
*
|
|
@@ -1680,9 +1720,9 @@ class gr {
|
|
|
1680
1720
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1681
1721
|
}
|
|
1682
1722
|
}
|
|
1683
|
-
class
|
|
1723
|
+
class _ extends R {
|
|
1684
1724
|
}
|
|
1685
|
-
class
|
|
1725
|
+
class je extends a {
|
|
1686
1726
|
/**
|
|
1687
1727
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1688
1728
|
*
|
|
@@ -1710,10 +1750,10 @@ class Ge extends a {
|
|
|
1710
1750
|
* @inheritDoc
|
|
1711
1751
|
*/
|
|
1712
1752
|
t(this, "isRegionalDirector");
|
|
1713
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1753
|
+
this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : new _(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new hr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1714
1754
|
}
|
|
1715
1755
|
}
|
|
1716
|
-
class
|
|
1756
|
+
class Ge extends R {
|
|
1717
1757
|
}
|
|
1718
1758
|
class it extends a {
|
|
1719
1759
|
/**
|
|
@@ -1738,7 +1778,7 @@ class it extends a {
|
|
|
1738
1778
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1739
1779
|
}
|
|
1740
1780
|
}
|
|
1741
|
-
class
|
|
1781
|
+
class Re extends je {
|
|
1742
1782
|
/**
|
|
1743
1783
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1744
1784
|
*
|
|
@@ -1775,7 +1815,7 @@ class De extends Ge {
|
|
|
1775
1815
|
* Список направлений кураторства.
|
|
1776
1816
|
*/
|
|
1777
1817
|
t(this, "curatedDirections");
|
|
1778
|
-
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new it(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new
|
|
1818
|
+
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new it(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new Ge(i))) ?? [];
|
|
1779
1819
|
}
|
|
1780
1820
|
}
|
|
1781
1821
|
class nt extends pe {
|
|
@@ -1806,7 +1846,7 @@ class nt extends pe {
|
|
|
1806
1846
|
* Данные о менеджере за которым закреплена категория.
|
|
1807
1847
|
*/
|
|
1808
1848
|
t(this, "manager");
|
|
1809
|
-
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new
|
|
1849
|
+
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Re(e.manager) : void 0;
|
|
1810
1850
|
}
|
|
1811
1851
|
}
|
|
1812
1852
|
class fe extends nt {
|
|
@@ -1829,7 +1869,7 @@ class fe extends nt {
|
|
|
1829
1869
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new fe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Y(o));
|
|
1830
1870
|
}
|
|
1831
1871
|
}
|
|
1832
|
-
class
|
|
1872
|
+
class gr {
|
|
1833
1873
|
/**
|
|
1834
1874
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1835
1875
|
*
|
|
@@ -1844,10 +1884,10 @@ class mr {
|
|
|
1844
1884
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1845
1885
|
*/
|
|
1846
1886
|
t(this, "increasePercent");
|
|
1847
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1887
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Ce(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1848
1888
|
}
|
|
1849
1889
|
}
|
|
1850
|
-
class
|
|
1890
|
+
class Te extends gr {
|
|
1851
1891
|
/**
|
|
1852
1892
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1853
1893
|
*
|
|
@@ -1862,7 +1902,7 @@ class ae extends mr {
|
|
|
1862
1902
|
this.productCategory = new pe(e == null ? void 0 : e.productCategory);
|
|
1863
1903
|
}
|
|
1864
1904
|
}
|
|
1865
|
-
class
|
|
1905
|
+
class Fe extends a {
|
|
1866
1906
|
/**
|
|
1867
1907
|
* Инициализирует экземпляр класса {@link Curator}.
|
|
1868
1908
|
*
|
|
@@ -1882,7 +1922,7 @@ class Me extends a {
|
|
|
1882
1922
|
* @inheritDoc
|
|
1883
1923
|
*/
|
|
1884
1924
|
t(this, "curatedDirection");
|
|
1885
|
-
this.photo = e.photo, this.contacts = new
|
|
1925
|
+
this.photo = e.photo, this.contacts = new hr(e.contacts), this.curatedDirection = new Ge(e.curatedDirection);
|
|
1886
1926
|
}
|
|
1887
1927
|
}
|
|
1888
1928
|
class X extends R {
|
|
@@ -1902,7 +1942,7 @@ class ce extends R {
|
|
|
1902
1942
|
e && (this.country = new X(e.country));
|
|
1903
1943
|
}
|
|
1904
1944
|
}
|
|
1905
|
-
class
|
|
1945
|
+
class Me extends R {
|
|
1906
1946
|
/**
|
|
1907
1947
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1908
1948
|
*
|
|
@@ -1917,7 +1957,7 @@ class Be extends R {
|
|
|
1917
1957
|
e && (this.region = new ce(e.region));
|
|
1918
1958
|
}
|
|
1919
1959
|
}
|
|
1920
|
-
class
|
|
1960
|
+
class mr extends a {
|
|
1921
1961
|
/**
|
|
1922
1962
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1923
1963
|
*
|
|
@@ -1953,10 +1993,10 @@ class fr extends a {
|
|
|
1953
1993
|
* Признак активности учетной записи пользователя.
|
|
1954
1994
|
*/
|
|
1955
1995
|
t(this, "isActive");
|
|
1956
|
-
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
|
|
1996
|
+
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 _(e.salesDirection) : void 0, this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = v(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1957
1997
|
}
|
|
1958
1998
|
}
|
|
1959
|
-
class he extends
|
|
1999
|
+
class he extends mr {
|
|
1960
2000
|
/**
|
|
1961
2001
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1962
2002
|
*
|
|
@@ -2002,10 +2042,10 @@ class he extends fr {
|
|
|
2002
2042
|
* @inheritDoc
|
|
2003
2043
|
*/
|
|
2004
2044
|
t(this, "curators");
|
|
2005
|
-
this.salesDirection = new
|
|
2045
|
+
this.salesDirection = new _(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 Me(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 je(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new Fe(o))) ?? void 0;
|
|
2006
2046
|
}
|
|
2007
2047
|
}
|
|
2008
|
-
class te extends
|
|
2048
|
+
class te extends G {
|
|
2009
2049
|
/**
|
|
2010
2050
|
* Инициализирует новый экземпляр класса.
|
|
2011
2051
|
*
|
|
@@ -2029,10 +2069,10 @@ class te extends j {
|
|
|
2029
2069
|
* Данные шаблона прайс-листа.
|
|
2030
2070
|
*/
|
|
2031
2071
|
t(this, "priceTemplate");
|
|
2032
|
-
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new he(e == null ? void 0 : e.client), this.priceTemplate = new
|
|
2072
|
+
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new he(e == null ? void 0 : e.client), this.priceTemplate = new E(e == null ? void 0 : e.priceTemplate);
|
|
2033
2073
|
}
|
|
2034
2074
|
}
|
|
2035
|
-
class
|
|
2075
|
+
class ae extends gr {
|
|
2036
2076
|
/**
|
|
2037
2077
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2038
2078
|
*
|
|
@@ -2044,10 +2084,10 @@ class be extends mr {
|
|
|
2044
2084
|
* Базовые данные о продукте.
|
|
2045
2085
|
*/
|
|
2046
2086
|
t(this, "product");
|
|
2047
|
-
this.product = new
|
|
2087
|
+
this.product = new S(e == null ? void 0 : e.product);
|
|
2048
2088
|
}
|
|
2049
2089
|
}
|
|
2050
|
-
class
|
|
2090
|
+
class fr extends R {
|
|
2051
2091
|
}
|
|
2052
2092
|
class se extends a {
|
|
2053
2093
|
/**
|
|
@@ -2069,10 +2109,10 @@ class se extends a {
|
|
|
2069
2109
|
* Дополнительные метаданные свойства.
|
|
2070
2110
|
*/
|
|
2071
2111
|
t(this, "metadata");
|
|
2072
|
-
this.type = new
|
|
2112
|
+
this.type = new fr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
2073
2113
|
}
|
|
2074
2114
|
}
|
|
2075
|
-
class
|
|
2115
|
+
class z {
|
|
2076
2116
|
/**
|
|
2077
2117
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
2078
2118
|
*
|
|
@@ -2167,9 +2207,9 @@ class Ut {
|
|
|
2167
2207
|
var e, s, i, o;
|
|
2168
2208
|
const r = {};
|
|
2169
2209
|
return Object.keys(this).forEach((c) => {
|
|
2170
|
-
const
|
|
2210
|
+
const u = this[c];
|
|
2171
2211
|
// eslint-disable-next-line prettier/prettier
|
|
2172
|
-
|
|
2212
|
+
A(u) || v(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2173
2213
|
}), !((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;
|
|
2174
2214
|
}
|
|
2175
2215
|
}
|
|
@@ -2227,7 +2267,7 @@ class Ve {
|
|
|
2227
2267
|
* Минимальный коэффициент цены.
|
|
2228
2268
|
*/
|
|
2229
2269
|
t(this, "minCoefficient");
|
|
2230
|
-
this.role = new ie(r == null ? void 0 : r.role), this.category = new pe(r == null ? void 0 : r.category), this.minCoefficient = new
|
|
2270
|
+
this.role = new ie(r == null ? void 0 : r.role), this.category = new pe(r == null ? void 0 : r.category), this.minCoefficient = new Ce(r == null ? void 0 : r.minCoefficient);
|
|
2231
2271
|
}
|
|
2232
2272
|
}
|
|
2233
2273
|
class Ht extends p {
|
|
@@ -2257,7 +2297,7 @@ class Ht extends p {
|
|
|
2257
2297
|
*/
|
|
2258
2298
|
// eslint-disable-next-line class-methods-use-this
|
|
2259
2299
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2260
|
-
let c = `${
|
|
2300
|
+
let c = `${k().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2261
2301
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2262
2302
|
}
|
|
2263
2303
|
}
|
|
@@ -2495,12 +2535,12 @@ class Gt extends p {
|
|
|
2495
2535
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2496
2536
|
*/
|
|
2497
2537
|
attachTemplate(r, e, s) {
|
|
2498
|
-
const i =
|
|
2538
|
+
const i = k().config.dateFormats.api;
|
|
2499
2539
|
return this.post(
|
|
2500
2540
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2501
2541
|
s && {
|
|
2502
|
-
startAt: s.startAt &&
|
|
2503
|
-
endAt: s.endAt &&
|
|
2542
|
+
startAt: s.startAt && q(s.startAt, i),
|
|
2543
|
+
endAt: s.endAt && q(s.endAt, i)
|
|
2504
2544
|
},
|
|
2505
2545
|
(o) => new te(o.data),
|
|
2506
2546
|
{},
|
|
@@ -2529,12 +2569,12 @@ class Gt extends p {
|
|
|
2529
2569
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2530
2570
|
*/
|
|
2531
2571
|
changeTemplate(r, e, s, i) {
|
|
2532
|
-
const o =
|
|
2572
|
+
const o = k().config.dateFormats.api;
|
|
2533
2573
|
return this.patch(
|
|
2534
2574
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2535
2575
|
i && {
|
|
2536
|
-
startAt: i.startAt &&
|
|
2537
|
-
endAt: i.endAt &&
|
|
2576
|
+
startAt: i.startAt && q(i.startAt, o),
|
|
2577
|
+
endAt: i.endAt && q(i.endAt, o)
|
|
2538
2578
|
},
|
|
2539
2579
|
(c) => new te(c.data)
|
|
2540
2580
|
);
|
|
@@ -2566,7 +2606,7 @@ class Ft extends p {
|
|
|
2566
2606
|
{
|
|
2567
2607
|
showHidden: r
|
|
2568
2608
|
},
|
|
2569
|
-
(e) => e.data.map((s) => new
|
|
2609
|
+
(e) => e.data.map((s) => new W(s))
|
|
2570
2610
|
);
|
|
2571
2611
|
}
|
|
2572
2612
|
/**
|
|
@@ -2585,7 +2625,7 @@ class Ft extends p {
|
|
|
2585
2625
|
showHidden: e,
|
|
2586
2626
|
withNestedCategories: s
|
|
2587
2627
|
},
|
|
2588
|
-
(i) => new
|
|
2628
|
+
(i) => new W(i.data)
|
|
2589
2629
|
);
|
|
2590
2630
|
}
|
|
2591
2631
|
/**
|
|
@@ -2594,7 +2634,7 @@ class Ft extends p {
|
|
|
2594
2634
|
* @param categoryID Идентификатор категории продуктов.
|
|
2595
2635
|
*/
|
|
2596
2636
|
getPublicCategoryData(r) {
|
|
2597
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2637
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new W(e.data));
|
|
2598
2638
|
}
|
|
2599
2639
|
/**
|
|
2600
2640
|
* Возвращает список продуктов категории.
|
|
@@ -2612,7 +2652,7 @@ class Ft extends p {
|
|
|
2612
2652
|
showHidden: s,
|
|
2613
2653
|
withPriceCoefficients: e
|
|
2614
2654
|
},
|
|
2615
|
-
(i) =>
|
|
2655
|
+
(i) => ve(i.data, (o) => new S(o))
|
|
2616
2656
|
);
|
|
2617
2657
|
}
|
|
2618
2658
|
/**
|
|
@@ -2625,7 +2665,7 @@ class Ft extends p {
|
|
|
2625
2665
|
getCategoryProductsCoefficients(r) {
|
|
2626
2666
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2627
2667
|
const { data: s } = e;
|
|
2628
|
-
return dr(s, (i) => i.map((o) => new
|
|
2668
|
+
return dr(s, (i) => i.map((o) => new Ne(o))), s;
|
|
2629
2669
|
});
|
|
2630
2670
|
}
|
|
2631
2671
|
/**
|
|
@@ -2637,7 +2677,7 @@ class Ft extends p {
|
|
|
2637
2677
|
publicSimpleSearch(r, e = 10) {
|
|
2638
2678
|
return new Promise((s, i) => {
|
|
2639
2679
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2640
|
-
s(o.categories.map((c) => new
|
|
2680
|
+
s(o.categories.map((c) => new W(c)));
|
|
2641
2681
|
}).catch((o) => {
|
|
2642
2682
|
i(o);
|
|
2643
2683
|
});
|
|
@@ -2654,7 +2694,7 @@ class Mt extends p {
|
|
|
2654
2694
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2655
2695
|
*/
|
|
2656
2696
|
getProductData(r, e = !1) {
|
|
2657
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2697
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new S(s.data));
|
|
2658
2698
|
}
|
|
2659
2699
|
/**
|
|
2660
2700
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2662,7 +2702,7 @@ class Mt extends p {
|
|
|
2662
2702
|
* @param productId Идентификатор продукта.
|
|
2663
2703
|
*/
|
|
2664
2704
|
getPublicProductData(r) {
|
|
2665
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2705
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new S(e.data));
|
|
2666
2706
|
}
|
|
2667
2707
|
/**
|
|
2668
2708
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2675,7 +2715,7 @@ class Mt extends p {
|
|
|
2675
2715
|
return this.get(
|
|
2676
2716
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2677
2717
|
{},
|
|
2678
|
-
(e) =>
|
|
2718
|
+
(e) => ve(e.data, (s) => new Ne(s))
|
|
2679
2719
|
);
|
|
2680
2720
|
}
|
|
2681
2721
|
/**
|
|
@@ -2687,7 +2727,7 @@ class Mt extends p {
|
|
|
2687
2727
|
publicSimpleSearch(r, e = 10) {
|
|
2688
2728
|
return new Promise((s, i) => {
|
|
2689
2729
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2690
|
-
s(o.products.map((c) => new
|
|
2730
|
+
s(o.products.map((c) => new S(c)));
|
|
2691
2731
|
}).catch((o) => {
|
|
2692
2732
|
i(o);
|
|
2693
2733
|
});
|
|
@@ -2752,7 +2792,7 @@ class Bt extends p {
|
|
|
2752
2792
|
showHidden: i,
|
|
2753
2793
|
withPriceCoefficients: s
|
|
2754
2794
|
},
|
|
2755
|
-
(o) =>
|
|
2795
|
+
(o) => ve(o.data, (c) => new Y(c))
|
|
2756
2796
|
);
|
|
2757
2797
|
}
|
|
2758
2798
|
}
|
|
@@ -2777,7 +2817,7 @@ class zt extends p {
|
|
|
2777
2817
|
);
|
|
2778
2818
|
}
|
|
2779
2819
|
}
|
|
2780
|
-
var
|
|
2820
|
+
var Be = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Be || {});
|
|
2781
2821
|
class Ke {
|
|
2782
2822
|
/**
|
|
2783
2823
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2797,7 +2837,7 @@ class Ke {
|
|
|
2797
2837
|
* Значение с которым сравнивается поле.
|
|
2798
2838
|
*/
|
|
2799
2839
|
t(this, "value");
|
|
2800
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2840
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Be.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2801
2841
|
}
|
|
2802
2842
|
/**
|
|
2803
2843
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2809,10 +2849,10 @@ class Ke {
|
|
|
2809
2849
|
field: this.field,
|
|
2810
2850
|
op: this.op
|
|
2811
2851
|
};
|
|
2812
|
-
return r.value =
|
|
2852
|
+
return r.value = Ie(this.value) ? q(this.value, k().config.dateFormats.api) : this.value, r;
|
|
2813
2853
|
}
|
|
2814
2854
|
}
|
|
2815
|
-
class
|
|
2855
|
+
class le {
|
|
2816
2856
|
/**
|
|
2817
2857
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2818
2858
|
*
|
|
@@ -2832,7 +2872,7 @@ class ue {
|
|
|
2832
2872
|
*/
|
|
2833
2873
|
t(this, "groups");
|
|
2834
2874
|
var e, s;
|
|
2835
|
-
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 Ke(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new
|
|
2875
|
+
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 Ke(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new le(i))) ?? [];
|
|
2836
2876
|
}
|
|
2837
2877
|
/**
|
|
2838
2878
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2842,12 +2882,12 @@ class ue {
|
|
|
2842
2882
|
toPrimitive() {
|
|
2843
2883
|
return {
|
|
2844
2884
|
groupOp: this.groupOp,
|
|
2845
|
-
filters: this.filters.map((r) => r instanceof Ke &&
|
|
2846
|
-
groups: this.groups.map((r) => r instanceof
|
|
2885
|
+
filters: this.filters.map((r) => r instanceof Ke && qe(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2886
|
+
groups: this.groups.map((r) => r instanceof le ? r.toPrimitive() : r)
|
|
2847
2887
|
};
|
|
2848
2888
|
}
|
|
2849
2889
|
}
|
|
2850
|
-
class
|
|
2890
|
+
class De extends p {
|
|
2851
2891
|
/**
|
|
2852
2892
|
* Получает пагинированный список данных.
|
|
2853
2893
|
*
|
|
@@ -2859,15 +2899,15 @@ class Ae extends p {
|
|
|
2859
2899
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2860
2900
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2861
2901
|
*/
|
|
2862
|
-
getPaginated(r, e, s, i, o, c,
|
|
2902
|
+
getPaginated(r, e, s, i, o, c, u) {
|
|
2863
2903
|
let h = {
|
|
2864
2904
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2865
2905
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2866
2906
|
};
|
|
2867
|
-
return e && (h.filters = JSON.stringify((e instanceof
|
|
2907
|
+
return e && (h.filters = JSON.stringify((e instanceof le ? e : new le(e)).toPrimitive())), K(s) || (h.sort = V(s) ? s : [s]), o && (h = { ...h, ...o }), this.get(r, h, c, u);
|
|
2868
2908
|
}
|
|
2869
2909
|
}
|
|
2870
|
-
class Wt extends
|
|
2910
|
+
class Wt extends De {
|
|
2871
2911
|
/**
|
|
2872
2912
|
* Возвращает список шаблонов прайс-листа.
|
|
2873
2913
|
*
|
|
@@ -2880,7 +2920,7 @@ class Wt extends Ae {
|
|
|
2880
2920
|
getTemplateList(r, e, s) {
|
|
2881
2921
|
return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
|
|
2882
2922
|
const o = { ...i.data };
|
|
2883
|
-
return o.data = o.data.map((c) => new
|
|
2923
|
+
return o.data = o.data.map((c) => new E(c)), o;
|
|
2884
2924
|
});
|
|
2885
2925
|
}
|
|
2886
2926
|
/**
|
|
@@ -2893,7 +2933,7 @@ class Wt extends Ae {
|
|
|
2893
2933
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
2894
2934
|
*/
|
|
2895
2935
|
createTemplate(r, e = {}) {
|
|
2896
|
-
return this.post("/internal/price/templates", r, (s) => new
|
|
2936
|
+
return this.post("/internal/price/templates", r, (s) => new E(s.data), e);
|
|
2897
2937
|
}
|
|
2898
2938
|
/**
|
|
2899
2939
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -2903,7 +2943,7 @@ class Wt extends Ae {
|
|
|
2903
2943
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
2904
2944
|
*/
|
|
2905
2945
|
getTemplate(r) {
|
|
2906
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
2946
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new E(e.data));
|
|
2907
2947
|
}
|
|
2908
2948
|
/**
|
|
2909
2949
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -2916,7 +2956,7 @@ class Wt extends Ae {
|
|
|
2916
2956
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2917
2957
|
*/
|
|
2918
2958
|
updateTemplate(r, e, s = {}) {
|
|
2919
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
2959
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new E(i.data), s);
|
|
2920
2960
|
}
|
|
2921
2961
|
/**
|
|
2922
2962
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -2939,7 +2979,7 @@ class Wt extends Ae {
|
|
|
2939
2979
|
return this.get(
|
|
2940
2980
|
`/internal/price/templates/${r}/products`,
|
|
2941
2981
|
{},
|
|
2942
|
-
(e) => e.data.map((s) => new
|
|
2982
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2943
2983
|
);
|
|
2944
2984
|
}
|
|
2945
2985
|
/**
|
|
@@ -2951,7 +2991,7 @@ class Wt extends Ae {
|
|
|
2951
2991
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2952
2992
|
*/
|
|
2953
2993
|
getProductTemplatePrice(r, e) {
|
|
2954
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2994
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
|
|
2955
2995
|
}
|
|
2956
2996
|
/**
|
|
2957
2997
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2970,7 +3010,7 @@ class Wt extends Ae {
|
|
|
2970
3010
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2971
3011
|
increase_percent: s.value
|
|
2972
3012
|
},
|
|
2973
|
-
(o) => new
|
|
3013
|
+
(o) => new ae(o.data)
|
|
2974
3014
|
);
|
|
2975
3015
|
}
|
|
2976
3016
|
/**
|
|
@@ -2995,7 +3035,7 @@ class Wt extends Ae {
|
|
|
2995
3035
|
return this.get(
|
|
2996
3036
|
`/internal/price/templates/${r}/categories`,
|
|
2997
3037
|
{},
|
|
2998
|
-
(e) => e.data.map((s) => new
|
|
3038
|
+
(e) => e.data.map((s) => new Te(s))
|
|
2999
3039
|
);
|
|
3000
3040
|
}
|
|
3001
3041
|
/**
|
|
@@ -3010,7 +3050,7 @@ class Wt extends Ae {
|
|
|
3010
3050
|
return this.get(
|
|
3011
3051
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3012
3052
|
{},
|
|
3013
|
-
(s) => new
|
|
3053
|
+
(s) => new Te(s.data)
|
|
3014
3054
|
);
|
|
3015
3055
|
}
|
|
3016
3056
|
/**
|
|
@@ -3036,7 +3076,7 @@ class Wt extends Ae {
|
|
|
3036
3076
|
},
|
|
3037
3077
|
params: i ? { recursively: !0 } : {}
|
|
3038
3078
|
},
|
|
3039
|
-
(c) => new
|
|
3079
|
+
(c) => new Te(c.data)
|
|
3040
3080
|
);
|
|
3041
3081
|
}
|
|
3042
3082
|
/**
|
|
@@ -3151,7 +3191,7 @@ class Et extends p {
|
|
|
3151
3191
|
);
|
|
3152
3192
|
}
|
|
3153
3193
|
}
|
|
3154
|
-
class Jt extends
|
|
3194
|
+
class Jt extends De {
|
|
3155
3195
|
/**
|
|
3156
3196
|
* Возвращает пагинированный список свойств.
|
|
3157
3197
|
*
|
|
@@ -3227,7 +3267,7 @@ class Jt extends Ae {
|
|
|
3227
3267
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3228
3268
|
*/
|
|
3229
3269
|
getProductProperties(r) {
|
|
3230
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3270
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3231
3271
|
}
|
|
3232
3272
|
/**
|
|
3233
3273
|
* Возвращает значение свойства продукта.
|
|
@@ -3237,7 +3277,7 @@ class Jt extends Ae {
|
|
|
3237
3277
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3238
3278
|
*/
|
|
3239
3279
|
getProductProperty(r, e) {
|
|
3240
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3280
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3241
3281
|
}
|
|
3242
3282
|
/**
|
|
3243
3283
|
* Обновляет значение свойства продукта.
|
|
@@ -3248,7 +3288,7 @@ class Jt extends Ae {
|
|
|
3248
3288
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3249
3289
|
*/
|
|
3250
3290
|
updateProductProperty(r, e, s) {
|
|
3251
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3291
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3252
3292
|
}
|
|
3253
3293
|
/**
|
|
3254
3294
|
* Удаляет значение свойства продукта.
|
|
@@ -3373,7 +3413,7 @@ class Jt extends Ae {
|
|
|
3373
3413
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3374
3414
|
*/
|
|
3375
3415
|
getCategoryProperties(r) {
|
|
3376
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3416
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
|
|
3377
3417
|
}
|
|
3378
3418
|
/**
|
|
3379
3419
|
* Возвращает значение свойства категории.
|
|
@@ -3383,7 +3423,7 @@ class Jt extends Ae {
|
|
|
3383
3423
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3384
3424
|
*/
|
|
3385
3425
|
getCategoryProperty(r, e) {
|
|
3386
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3426
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
|
|
3387
3427
|
}
|
|
3388
3428
|
/**
|
|
3389
3429
|
* Обновляет значение свойства категории.
|
|
@@ -3394,7 +3434,7 @@ class Jt extends Ae {
|
|
|
3394
3434
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3395
3435
|
*/
|
|
3396
3436
|
updateCategoryProperty(r, e, s) {
|
|
3397
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3437
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
|
|
3398
3438
|
}
|
|
3399
3439
|
/**
|
|
3400
3440
|
* Удаляет значение свойства категории.
|
|
@@ -3556,37 +3596,18 @@ function Ye(n) {
|
|
|
3556
3596
|
var ot = /* @__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))(ot || {}), x = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(x || {});
|
|
3557
3597
|
class ct extends R {
|
|
3558
3598
|
}
|
|
3559
|
-
class
|
|
3599
|
+
class yr extends R {
|
|
3560
3600
|
}
|
|
3561
3601
|
class Vt extends R {
|
|
3562
3602
|
}
|
|
3563
|
-
class
|
|
3564
|
-
}
|
|
3565
|
-
class ye extends a {
|
|
3566
|
-
/**
|
|
3567
|
-
* Инициализирует экземпляр класса {@link Currency}.
|
|
3568
|
-
*
|
|
3569
|
-
* @param data Данные для первоначальной инициализации.
|
|
3570
|
-
*/
|
|
3571
|
-
constructor(e) {
|
|
3572
|
-
super(e);
|
|
3573
|
-
/**
|
|
3574
|
-
* Сигнатура валюты.
|
|
3575
|
-
*/
|
|
3576
|
-
t(this, "signature", "");
|
|
3577
|
-
/**
|
|
3578
|
-
* Символ валюты.
|
|
3579
|
-
*/
|
|
3580
|
-
t(this, "symbol", "");
|
|
3581
|
-
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3582
|
-
}
|
|
3603
|
+
class lt extends R {
|
|
3583
3604
|
}
|
|
3584
|
-
class
|
|
3605
|
+
class U extends R {
|
|
3585
3606
|
/**
|
|
3586
3607
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3587
3608
|
*/
|
|
3588
3609
|
static generatePersonItem() {
|
|
3589
|
-
return new
|
|
3610
|
+
return new U({
|
|
3590
3611
|
id: 1,
|
|
3591
3612
|
guid: "",
|
|
3592
3613
|
slug: x.Person,
|
|
@@ -3594,7 +3615,7 @@ class N extends R {
|
|
|
3594
3615
|
});
|
|
3595
3616
|
}
|
|
3596
3617
|
}
|
|
3597
|
-
class
|
|
3618
|
+
class ut extends R {
|
|
3598
3619
|
}
|
|
3599
3620
|
class pt extends R {
|
|
3600
3621
|
}
|
|
@@ -3604,11 +3625,11 @@ class ht extends R {
|
|
|
3604
3625
|
}
|
|
3605
3626
|
class gt extends R {
|
|
3606
3627
|
}
|
|
3607
|
-
class
|
|
3628
|
+
class wr extends R {
|
|
3608
3629
|
}
|
|
3609
|
-
class
|
|
3630
|
+
class vr extends R {
|
|
3610
3631
|
}
|
|
3611
|
-
class
|
|
3632
|
+
class de extends G {
|
|
3612
3633
|
/**
|
|
3613
3634
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3614
3635
|
*
|
|
@@ -3635,11 +3656,11 @@ class qe extends j {
|
|
|
3635
3656
|
/**
|
|
3636
3657
|
* Данные о валюте.
|
|
3637
3658
|
*/
|
|
3638
|
-
t(this, "currency", new
|
|
3639
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3659
|
+
t(this, "currency", new N());
|
|
3660
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new N(e.currency));
|
|
3640
3661
|
}
|
|
3641
3662
|
}
|
|
3642
|
-
class
|
|
3663
|
+
class _e extends a {
|
|
3643
3664
|
/**
|
|
3644
3665
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3645
3666
|
*
|
|
@@ -3658,7 +3679,7 @@ class Oe extends a {
|
|
|
3658
3679
|
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;
|
|
3659
3680
|
}
|
|
3660
3681
|
}
|
|
3661
|
-
class
|
|
3682
|
+
class H extends _e {
|
|
3662
3683
|
/**
|
|
3663
3684
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3664
3685
|
*
|
|
@@ -3693,7 +3714,7 @@ class U extends Oe {
|
|
|
3693
3714
|
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 = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3694
3715
|
}
|
|
3695
3716
|
}
|
|
3696
|
-
class
|
|
3717
|
+
class Cr extends a {
|
|
3697
3718
|
/**
|
|
3698
3719
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3699
3720
|
*
|
|
@@ -3705,7 +3726,7 @@ class Pr extends a {
|
|
|
3705
3726
|
/**
|
|
3706
3727
|
* Данные об организационно-правовой форме.
|
|
3707
3728
|
*/
|
|
3708
|
-
t(this, "opf",
|
|
3729
|
+
t(this, "opf", U.generatePersonItem());
|
|
3709
3730
|
/**
|
|
3710
3731
|
* Группа партнеров (направление деятельности).
|
|
3711
3732
|
*/
|
|
@@ -3743,22 +3764,22 @@ class Pr extends a {
|
|
|
3743
3764
|
*/
|
|
3744
3765
|
t(this, "updater");
|
|
3745
3766
|
if (e) {
|
|
3746
|
-
if (this.opf = new
|
|
3767
|
+
if (this.opf = new U(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Z(e.partnerGroup)), e.contacts) {
|
|
3747
3768
|
const s = [];
|
|
3748
3769
|
e.contacts.forEach((i) => {
|
|
3749
|
-
s.push(new
|
|
3770
|
+
s.push(new H(i));
|
|
3750
3771
|
}), this.contacts = s;
|
|
3751
3772
|
}
|
|
3752
3773
|
if (e.bankAccounts) {
|
|
3753
3774
|
const s = [];
|
|
3754
3775
|
e.bankAccounts.forEach((i) => {
|
|
3755
|
-
s.push(new
|
|
3776
|
+
s.push(new de(i));
|
|
3756
3777
|
}), this.bankAccounts = s;
|
|
3757
3778
|
}
|
|
3758
3779
|
}
|
|
3759
3780
|
}
|
|
3760
3781
|
}
|
|
3761
|
-
class mt extends
|
|
3782
|
+
class mt extends Cr {
|
|
3762
3783
|
/**
|
|
3763
3784
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3764
3785
|
*
|
|
@@ -3768,7 +3789,7 @@ class mt extends Pr {
|
|
|
3768
3789
|
super(r);
|
|
3769
3790
|
}
|
|
3770
3791
|
}
|
|
3771
|
-
class
|
|
3792
|
+
class Pr extends Cr {
|
|
3772
3793
|
/**
|
|
3773
3794
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3774
3795
|
*
|
|
@@ -3811,7 +3832,7 @@ class Rr extends Pr {
|
|
|
3811
3832
|
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 ?? "");
|
|
3812
3833
|
}
|
|
3813
3834
|
}
|
|
3814
|
-
class
|
|
3835
|
+
class Rr extends Pr {
|
|
3815
3836
|
/**
|
|
3816
3837
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3817
3838
|
*
|
|
@@ -3826,7 +3847,7 @@ class Dr extends Rr {
|
|
|
3826
3847
|
e && (this.kpp = e.kpp ?? "");
|
|
3827
3848
|
}
|
|
3828
3849
|
}
|
|
3829
|
-
class ft extends
|
|
3850
|
+
class ft extends Rr {
|
|
3830
3851
|
/**
|
|
3831
3852
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3832
3853
|
*
|
|
@@ -3849,7 +3870,7 @@ class ft extends Dr {
|
|
|
3849
3870
|
e && (this.registrationCountry = new X(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3850
3871
|
}
|
|
3851
3872
|
}
|
|
3852
|
-
class
|
|
3873
|
+
class ye {
|
|
3853
3874
|
/**
|
|
3854
3875
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3855
3876
|
*
|
|
@@ -3858,9 +3879,9 @@ class we {
|
|
|
3858
3879
|
static createInstance(r) {
|
|
3859
3880
|
switch (r.opf.slug) {
|
|
3860
3881
|
case x.Ic:
|
|
3861
|
-
return new
|
|
3882
|
+
return new Pr(r);
|
|
3862
3883
|
case x.UlR:
|
|
3863
|
-
return new
|
|
3884
|
+
return new Rr(r);
|
|
3864
3885
|
case x.UlNr:
|
|
3865
3886
|
return new ft(r);
|
|
3866
3887
|
default:
|
|
@@ -3868,7 +3889,7 @@ class we {
|
|
|
3868
3889
|
}
|
|
3869
3890
|
}
|
|
3870
3891
|
}
|
|
3871
|
-
class
|
|
3892
|
+
class be extends G {
|
|
3872
3893
|
/**
|
|
3873
3894
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3874
3895
|
*
|
|
@@ -3883,7 +3904,7 @@ class Se extends j {
|
|
|
3883
3904
|
this.isPrimary = e.isPrimary;
|
|
3884
3905
|
}
|
|
3885
3906
|
}
|
|
3886
|
-
class yt extends
|
|
3907
|
+
class yt extends H {
|
|
3887
3908
|
/**
|
|
3888
3909
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3889
3910
|
*
|
|
@@ -3908,10 +3929,10 @@ class yt extends U {
|
|
|
3908
3929
|
*/
|
|
3909
3930
|
addresses: []
|
|
3910
3931
|
});
|
|
3911
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
3932
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new be(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new be(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new be(s))));
|
|
3912
3933
|
}
|
|
3913
3934
|
}
|
|
3914
|
-
class
|
|
3935
|
+
class we extends Qr {
|
|
3915
3936
|
/**
|
|
3916
3937
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3917
3938
|
*
|
|
@@ -3948,7 +3969,7 @@ class ve extends tt {
|
|
|
3948
3969
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3949
3970
|
*/
|
|
3950
3971
|
t(this, "isTransportCompanyAddress");
|
|
3951
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3972
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new ur(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new H(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;
|
|
3952
3973
|
}
|
|
3953
3974
|
}
|
|
3954
3975
|
class Xe extends he {
|
|
@@ -4001,7 +4022,7 @@ class Xe extends he {
|
|
|
4001
4022
|
* @inheritDoc
|
|
4002
4023
|
*/
|
|
4003
4024
|
t(this, "extraData");
|
|
4004
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
4025
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ye.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Z(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new H(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new we(u))) ?? [], this.channelPrimaryInterest = new yr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new vr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new Q(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Pe(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4005
4026
|
}
|
|
4006
4027
|
}
|
|
4007
4028
|
class Kt {
|
|
@@ -4103,9 +4124,9 @@ class Kt {
|
|
|
4103
4124
|
* @inheritDoc
|
|
4104
4125
|
*/
|
|
4105
4126
|
t(this, "lastOrder");
|
|
4106
|
-
var e, s, i, o, c,
|
|
4107
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((g) => new
|
|
4108
|
-
createdAt: new L((
|
|
4127
|
+
var e, s, i, o, c, u, h, f;
|
|
4128
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((g) => new Me(g)), this.region = new ce(r == null ? void 0 : r.region), this.country = new X(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new L(r == null ? void 0 : r.createdAt), this.lastLoginDate = new L(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = ((s = r == null ? void 0 : r.managers) == null ? void 0 : s.map((g) => new Re(g))) ?? [], this.curators = ((i = r == null ? void 0 : r.curators) == null ? void 0 : i.map((g) => new Fe(g))) ?? [], this.salesDirections = (o = r == null ? void 0 : r.salesDirections) == null ? void 0 : o.map((g) => new _(g)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new U(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new Q(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (c = r == null ? void 0 : r.partnerGroups) == null ? void 0 : c.map((g) => new Z(g)), this.contact = new _e(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4129
|
+
createdAt: new L((u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.createdAt),
|
|
4109
4130
|
creator: (h = r == null ? void 0 : r.lastOrder) == null ? void 0 : h.creator,
|
|
4110
4131
|
isApproved: (f = r == null ? void 0 : r.lastOrder) == null ? void 0 : f.isApproved
|
|
4111
4132
|
};
|
|
@@ -4145,7 +4166,7 @@ class Kt {
|
|
|
4145
4166
|
this.salesDirections = [];
|
|
4146
4167
|
break;
|
|
4147
4168
|
case "contragentType":
|
|
4148
|
-
this.contragentType = new
|
|
4169
|
+
this.contragentType = new U();
|
|
4149
4170
|
break;
|
|
4150
4171
|
case "preferredDeliveryType":
|
|
4151
4172
|
this.preferredDeliveryType = new Q();
|
|
@@ -4154,7 +4175,7 @@ class Kt {
|
|
|
4154
4175
|
this.partnerGroups = [];
|
|
4155
4176
|
break;
|
|
4156
4177
|
case "contact":
|
|
4157
|
-
this.contact = new
|
|
4178
|
+
this.contact = new _e();
|
|
4158
4179
|
break;
|
|
4159
4180
|
default:
|
|
4160
4181
|
this[r] = void 0;
|
|
@@ -4170,13 +4191,13 @@ class Kt {
|
|
|
4170
4191
|
var e, s, i, o;
|
|
4171
4192
|
const r = {};
|
|
4172
4193
|
return Object.keys(this).forEach((c) => {
|
|
4173
|
-
const
|
|
4194
|
+
const u = this[c];
|
|
4174
4195
|
// eslint-disable-next-line prettier/prettier
|
|
4175
|
-
|
|
4196
|
+
A(u) || v(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
4176
4197
|
}), !((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.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4177
4198
|
}
|
|
4178
4199
|
}
|
|
4179
|
-
class
|
|
4200
|
+
class Dr extends G {
|
|
4180
4201
|
/**
|
|
4181
4202
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4182
4203
|
*
|
|
@@ -4236,7 +4257,7 @@ class wt extends a {
|
|
|
4236
4257
|
* @inheritDoc
|
|
4237
4258
|
*/
|
|
4238
4259
|
t(this, "curators");
|
|
4239
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((
|
|
4260
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new H(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Dr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new Z(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new Q(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new _(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new je(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Fe(u))) ?? void 0;
|
|
4240
4261
|
}
|
|
4241
4262
|
}
|
|
4242
4263
|
class vt {
|
|
@@ -4306,7 +4327,7 @@ class Yt {
|
|
|
4306
4327
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4307
4328
|
}
|
|
4308
4329
|
}
|
|
4309
|
-
class I extends
|
|
4330
|
+
class I extends De {
|
|
4310
4331
|
/**
|
|
4311
4332
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4312
4333
|
*
|
|
@@ -4334,7 +4355,7 @@ class I extends Ae {
|
|
|
4334
4355
|
* @param contragent Данные о контрагенте клиента.
|
|
4335
4356
|
*/
|
|
4336
4357
|
static transformContragentClientDataToRequest(r) {
|
|
4337
|
-
var c,
|
|
4358
|
+
var c, u, h, f;
|
|
4338
4359
|
let e;
|
|
4339
4360
|
const s = r, i = r, o = r;
|
|
4340
4361
|
switch (r.opf.slug) {
|
|
@@ -4360,7 +4381,7 @@ class I extends Ae {
|
|
|
4360
4381
|
opf: i.opf.slug,
|
|
4361
4382
|
name: i.name,
|
|
4362
4383
|
alternative_name: i.alternativeName,
|
|
4363
|
-
partner_group_id: (
|
|
4384
|
+
partner_group_id: (u = i.partnerGroup) == null ? void 0 : u.id,
|
|
4364
4385
|
comment: i.comment,
|
|
4365
4386
|
inn: i.inn,
|
|
4366
4387
|
kpp: i.kpp,
|
|
@@ -4460,7 +4481,7 @@ class I extends Ae {
|
|
|
4460
4481
|
getClientsList(r, e, s, i) {
|
|
4461
4482
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4462
4483
|
const c = { ...o.data };
|
|
4463
|
-
return c.data = c.data.map((
|
|
4484
|
+
return c.data = c.data.map((u) => new he(u)), c;
|
|
4464
4485
|
});
|
|
4465
4486
|
}
|
|
4466
4487
|
/**
|
|
@@ -4473,7 +4494,7 @@ class I extends Ae {
|
|
|
4473
4494
|
return this.getClientsList({
|
|
4474
4495
|
groupOp: "and",
|
|
4475
4496
|
groups: [],
|
|
4476
|
-
filters: [{ field: "phone", op:
|
|
4497
|
+
filters: [{ field: "phone", op: Be.Contains, value: r }]
|
|
4477
4498
|
});
|
|
4478
4499
|
}
|
|
4479
4500
|
/**
|
|
@@ -4650,7 +4671,7 @@ class I extends Ae {
|
|
|
4650
4671
|
return this.post(
|
|
4651
4672
|
`/internal/clients/${r}/contragents`,
|
|
4652
4673
|
I.transformContragentClientDataToRequest(e),
|
|
4653
|
-
(i) =>
|
|
4674
|
+
(i) => ye.createInstance(i.data),
|
|
4654
4675
|
s
|
|
4655
4676
|
);
|
|
4656
4677
|
}
|
|
@@ -4666,7 +4687,7 @@ class I extends Ae {
|
|
|
4666
4687
|
return this.patch(
|
|
4667
4688
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4668
4689
|
I.transformContragentClientDataToRequest(e),
|
|
4669
|
-
(i) =>
|
|
4690
|
+
(i) => ye.createInstance(i.data),
|
|
4670
4691
|
s
|
|
4671
4692
|
);
|
|
4672
4693
|
}
|
|
@@ -4692,7 +4713,7 @@ class I extends Ae {
|
|
|
4692
4713
|
return this.post(
|
|
4693
4714
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4694
4715
|
I.transformClientDeliveryAddressToRequest(e),
|
|
4695
|
-
(i) => new
|
|
4716
|
+
(i) => new we(i.data),
|
|
4696
4717
|
s
|
|
4697
4718
|
);
|
|
4698
4719
|
}
|
|
@@ -4708,7 +4729,7 @@ class I extends Ae {
|
|
|
4708
4729
|
return this.patch(
|
|
4709
4730
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4710
4731
|
I.transformClientDeliveryAddressToRequest(e),
|
|
4711
|
-
(i) => new
|
|
4732
|
+
(i) => new we(i.data),
|
|
4712
4733
|
s
|
|
4713
4734
|
);
|
|
4714
4735
|
}
|
|
@@ -4735,7 +4756,7 @@ class I extends Ae {
|
|
|
4735
4756
|
return this.post(
|
|
4736
4757
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4737
4758
|
I.transformClientContragentBankAccountToRequest(s),
|
|
4738
|
-
(o) => new
|
|
4759
|
+
(o) => new de(o.data),
|
|
4739
4760
|
i
|
|
4740
4761
|
);
|
|
4741
4762
|
}
|
|
@@ -4752,7 +4773,7 @@ class I extends Ae {
|
|
|
4752
4773
|
return this.patch(
|
|
4753
4774
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4754
4775
|
I.transformClientContragentBankAccountToRequest(s),
|
|
4755
|
-
(o) => new
|
|
4776
|
+
(o) => new de(o.data),
|
|
4756
4777
|
i
|
|
4757
4778
|
);
|
|
4758
4779
|
}
|
|
@@ -4808,7 +4829,7 @@ class I extends Ae {
|
|
|
4808
4829
|
comment: e.comment,
|
|
4809
4830
|
not_disturb: e.notDisturb
|
|
4810
4831
|
},
|
|
4811
|
-
(i) => new
|
|
4832
|
+
(i) => new H(i.data),
|
|
4812
4833
|
s
|
|
4813
4834
|
);
|
|
4814
4835
|
}
|
|
@@ -4938,14 +4959,14 @@ class I extends Ae {
|
|
|
4938
4959
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4939
4960
|
*/
|
|
4940
4961
|
createContact(r, e, s, i = {}) {
|
|
4941
|
-
var c,
|
|
4962
|
+
var c, u;
|
|
4942
4963
|
const o = {
|
|
4943
4964
|
name: e.name,
|
|
4944
4965
|
position: e.position,
|
|
4945
4966
|
comment: e.comment,
|
|
4946
4967
|
...s
|
|
4947
4968
|
};
|
|
4948
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
4969
|
+
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 H(h.data), i);
|
|
4949
4970
|
}
|
|
4950
4971
|
/**
|
|
4951
4972
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4974,7 +4995,7 @@ class I extends Ae {
|
|
|
4974
4995
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4975
4996
|
}
|
|
4976
4997
|
}
|
|
4977
|
-
const
|
|
4998
|
+
const J = class J extends p {
|
|
4978
4999
|
/**
|
|
4979
5000
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
4980
5001
|
*/
|
|
@@ -4984,7 +5005,7 @@ const E = class E extends p {
|
|
|
4984
5005
|
* Время кэширования данных ответов на запросы (секунд).
|
|
4985
5006
|
*/
|
|
4986
5007
|
t(this, "responseDataCacheTimeout");
|
|
4987
|
-
this.responseDataCacheTimeout =
|
|
5008
|
+
this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
|
|
4988
5009
|
}
|
|
4989
5010
|
/**
|
|
4990
5011
|
* Возвращает кэшированные данные.
|
|
@@ -4994,7 +5015,7 @@ const E = class E extends p {
|
|
|
4994
5015
|
*/
|
|
4995
5016
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4996
5017
|
static getCachedResponse(e) {
|
|
4997
|
-
const s =
|
|
5018
|
+
const s = J.responseDataCache.get(e);
|
|
4998
5019
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
4999
5020
|
return s.val;
|
|
5000
5021
|
}
|
|
@@ -5005,8 +5026,8 @@ const E = class E extends p {
|
|
|
5005
5026
|
* @param data Данные для кэширования.
|
|
5006
5027
|
*/
|
|
5007
5028
|
cacheResponse(e, s) {
|
|
5008
|
-
|
|
5009
|
-
validTo:
|
|
5029
|
+
J.responseDataCache.set(e, {
|
|
5030
|
+
validTo: qr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5010
5031
|
val: s
|
|
5011
5032
|
});
|
|
5012
5033
|
}
|
|
@@ -5021,9 +5042,9 @@ const E = class E extends p {
|
|
|
5021
5042
|
*/
|
|
5022
5043
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5023
5044
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5024
|
-
const c = s + (K(o) ? "" : ` >>> ${JSON.stringify(o)}`),
|
|
5025
|
-
return
|
|
5026
|
-
const f = h.map((g) =>
|
|
5045
|
+
const c = s + (K(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? J.getCachedResponse(c) : void 0;
|
|
5046
|
+
return u ? Promise.resolve(u) : this.get(s, o).then((h) => {
|
|
5047
|
+
const f = h.map((g) => Ue.instanceInitializer(e, g));
|
|
5027
5048
|
return i && f && this.cacheResponse(s, f), f;
|
|
5028
5049
|
});
|
|
5029
5050
|
}
|
|
@@ -5031,8 +5052,8 @@ const E = class E extends p {
|
|
|
5031
5052
|
/**
|
|
5032
5053
|
* Кэш результатов запросов.
|
|
5033
5054
|
*/
|
|
5034
|
-
t(
|
|
5035
|
-
let
|
|
5055
|
+
t(J, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5056
|
+
let ue = J;
|
|
5036
5057
|
class Xt extends p {
|
|
5037
5058
|
/**
|
|
5038
5059
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
@@ -5107,10 +5128,10 @@ class rs extends p {
|
|
|
5107
5128
|
const o = this.get(
|
|
5108
5129
|
`internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
|
|
5109
5130
|
{ params: s, client_id: e },
|
|
5110
|
-
(
|
|
5131
|
+
(u) => new S(u.data)
|
|
5111
5132
|
);
|
|
5112
|
-
return o.catch((
|
|
5113
|
-
this.errorResponseHandler(
|
|
5133
|
+
return o.catch((u) => {
|
|
5134
|
+
this.errorResponseHandler(u, i);
|
|
5114
5135
|
}), o;
|
|
5115
5136
|
}
|
|
5116
5137
|
/**
|
|
@@ -5157,32 +5178,24 @@ class ts {
|
|
|
5157
5178
|
* Возвращает диапазон дат по умолчанию.
|
|
5158
5179
|
*/
|
|
5159
5180
|
static defaultDateRanges() {
|
|
5160
|
-
const r =
|
|
5181
|
+
const r = Or(/* @__PURE__ */ new Date(), 1);
|
|
5161
5182
|
return {
|
|
5162
5183
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5163
5184
|
nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
|
|
5164
|
-
today: { label: "Сегодня", from:
|
|
5185
|
+
today: { label: "Сегодня", from: Le(), to: Gr() },
|
|
5165
5186
|
yesterday: { label: "Вчера", from: jr(), to: Hr() },
|
|
5166
5187
|
tomorrow: { label: "Завтра", from: Ur(), to: Nr() }
|
|
5167
5188
|
};
|
|
5168
5189
|
}
|
|
5169
5190
|
}
|
|
5170
|
-
|
|
5171
|
-
/**
|
|
5172
|
-
* Устанавливает список единиц измерения линейной величины.
|
|
5173
|
-
*
|
|
5174
|
-
* @param linearValues Список единиц измерения линейной величины.
|
|
5175
|
-
*/
|
|
5176
|
-
static setLinearValues(r) {
|
|
5177
|
-
J.linearValues = r;
|
|
5178
|
-
}
|
|
5191
|
+
class Ar {
|
|
5179
5192
|
/**
|
|
5180
5193
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5181
5194
|
*
|
|
5182
5195
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
5183
5196
|
*/
|
|
5184
5197
|
static productIsMeasurable(r) {
|
|
5185
|
-
return
|
|
5198
|
+
return r.unit.isLinear || r.unit.isSquare;
|
|
5186
5199
|
}
|
|
5187
5200
|
/**
|
|
5188
5201
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -5191,7 +5204,7 @@ const J = class J {
|
|
|
5191
5204
|
*/
|
|
5192
5205
|
static getProductMultiplicity(r) {
|
|
5193
5206
|
var e, s;
|
|
5194
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5207
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !Ar.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5195
5208
|
}
|
|
5196
5209
|
/**
|
|
5197
5210
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5202,18 +5215,13 @@ const J = class J {
|
|
|
5202
5215
|
var e, s, i;
|
|
5203
5216
|
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
|
|
5204
5217
|
}
|
|
5205
|
-
}
|
|
5206
|
-
/**
|
|
5207
|
-
* Список единиц измерения линейной величины.
|
|
5208
|
-
*/
|
|
5209
|
-
t(J, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5210
|
-
let Ze = J;
|
|
5218
|
+
}
|
|
5211
5219
|
class ss {
|
|
5212
5220
|
/**
|
|
5213
5221
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5214
5222
|
*/
|
|
5215
5223
|
static generateUndefinedManagerInstance() {
|
|
5216
|
-
return new
|
|
5224
|
+
return new Re({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5217
5225
|
}
|
|
5218
5226
|
/**
|
|
5219
5227
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5224,26 +5232,26 @@ class ss {
|
|
|
5224
5232
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5225
5233
|
}
|
|
5226
5234
|
}
|
|
5227
|
-
class Ct extends
|
|
5235
|
+
class Ct extends ue {
|
|
5228
5236
|
/**
|
|
5229
5237
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5230
5238
|
*/
|
|
5231
5239
|
async getManagers() {
|
|
5232
|
-
const r = "/internal/managers", e =
|
|
5240
|
+
const r = "/internal/managers", e = ue.getCachedResponse(r);
|
|
5233
5241
|
if (e)
|
|
5234
5242
|
return e;
|
|
5235
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5243
|
+
const i = (await this.get(r)).data.map((o) => Ue.instanceInitializer(Re, o));
|
|
5236
5244
|
return this.cacheResponse(r, i), i;
|
|
5237
5245
|
}
|
|
5238
5246
|
}
|
|
5239
|
-
class $r extends
|
|
5247
|
+
class $r extends Dr {
|
|
5240
5248
|
/**
|
|
5241
5249
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5242
5250
|
*
|
|
5243
5251
|
* @param data Данные для первоначальной инициализации.
|
|
5244
5252
|
*/
|
|
5245
5253
|
constructor(e) {
|
|
5246
|
-
var s, i, o, c,
|
|
5254
|
+
var s, i, o, c, u, h, f, g;
|
|
5247
5255
|
super(e);
|
|
5248
5256
|
/**
|
|
5249
5257
|
* Краткие данные о клиенте.
|
|
@@ -5295,13 +5303,13 @@ class $r extends Ar {
|
|
|
5295
5303
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5296
5304
|
}, this.delivery = {
|
|
5297
5305
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5298
|
-
date: v((
|
|
5299
|
-
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new
|
|
5300
|
-
warehouse: (g = e == null ? void 0 : e.delivery) != null && g.warehouse ? new
|
|
5301
|
-
}, this.attachedUser = new d(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5306
|
+
date: v((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
|
|
5307
|
+
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new we(e.delivery.address) : void 0,
|
|
5308
|
+
warehouse: (g = e == null ? void 0 : e.delivery) != null && g.warehouse ? new Pe(e.delivery.warehouse) : void 0
|
|
5309
|
+
}, this.attachedUser = new d(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new _(e == null ? void 0 : e.salesDirection), this.pendingAt = v(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = v(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0;
|
|
5302
5310
|
}
|
|
5303
5311
|
}
|
|
5304
|
-
class Pt extends
|
|
5312
|
+
class Pt extends G {
|
|
5305
5313
|
/**
|
|
5306
5314
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5307
5315
|
*
|
|
@@ -5385,10 +5393,10 @@ class Pt extends j {
|
|
|
5385
5393
|
* Данные о пользователе, добавившем продукт в заказ.
|
|
5386
5394
|
*/
|
|
5387
5395
|
t(this, "creatorUser");
|
|
5388
|
-
this.product = new Y(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing, this.creatorUser = e.creatorUser && new d(e.creatorUser);
|
|
5396
|
+
this.product = new Y(e.product), this.quantity = e.quantity, this.currency = new N(e.currency), this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing, this.creatorUser = e.creatorUser && new d(e.creatorUser);
|
|
5389
5397
|
}
|
|
5390
5398
|
}
|
|
5391
|
-
class
|
|
5399
|
+
class Ze extends $r {
|
|
5392
5400
|
/**
|
|
5393
5401
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5394
5402
|
*
|
|
@@ -5428,10 +5436,10 @@ class er extends $r {
|
|
|
5428
5436
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5429
5437
|
*/
|
|
5430
5438
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5431
|
-
this.products = (e.products ?? []).map((s) => new Pt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
5439
|
+
this.products = (e.products ?? []).map((s) => new Pt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ye.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new R(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5432
5440
|
}
|
|
5433
5441
|
}
|
|
5434
|
-
class is extends
|
|
5442
|
+
class is extends De {
|
|
5435
5443
|
/**
|
|
5436
5444
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5437
5445
|
*
|
|
@@ -5462,7 +5470,7 @@ class is extends Ae {
|
|
|
5462
5470
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5463
5471
|
*/
|
|
5464
5472
|
getOrder(r) {
|
|
5465
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5473
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new Ze(e.data));
|
|
5466
5474
|
}
|
|
5467
5475
|
/**
|
|
5468
5476
|
* Добавляет продукт в заказ и возвращает обновлённые данные заказа.
|
|
@@ -5479,23 +5487,23 @@ class is extends Ae {
|
|
|
5479
5487
|
return this.post(
|
|
5480
5488
|
`/internal/orders/${r}/products`,
|
|
5481
5489
|
{
|
|
5482
|
-
|
|
5483
|
-
|
|
5490
|
+
product_id: e.product.id,
|
|
5491
|
+
product_category_id: e.configurator ? e.category.id : void 0,
|
|
5484
5492
|
quantity: e.quantity,
|
|
5485
5493
|
height: e.height,
|
|
5486
5494
|
length: e.length,
|
|
5487
5495
|
width: e.width,
|
|
5488
5496
|
configurator: e.configurator,
|
|
5489
5497
|
marker: e.marker,
|
|
5490
|
-
|
|
5498
|
+
is_additional_sale: e.isAdditionalSale,
|
|
5491
5499
|
...e.configuratorParams
|
|
5492
5500
|
},
|
|
5493
|
-
(i) => new
|
|
5501
|
+
(i) => new Ze(i.data),
|
|
5494
5502
|
s
|
|
5495
5503
|
);
|
|
5496
5504
|
}
|
|
5497
5505
|
}
|
|
5498
|
-
class
|
|
5506
|
+
class Se {
|
|
5499
5507
|
/**
|
|
5500
5508
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5501
5509
|
*
|
|
@@ -5522,12 +5530,12 @@ class ke {
|
|
|
5522
5530
|
* Источник клиентской цены.
|
|
5523
5531
|
*/
|
|
5524
5532
|
t(this, "source");
|
|
5525
|
-
this.client = new he(r == null ? void 0 : r.client), this.product = new
|
|
5533
|
+
this.client = new he(r == null ? void 0 : r.client), this.product = new S(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) ?? He.Product;
|
|
5526
5534
|
}
|
|
5527
5535
|
}
|
|
5528
|
-
const
|
|
5536
|
+
const ke = (n) => {
|
|
5529
5537
|
var r, e, s, i, o;
|
|
5530
|
-
return n ?
|
|
5538
|
+
return n ? nr(
|
|
5531
5539
|
{
|
|
5532
5540
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5533
5541
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5536,9 +5544,9 @@ const Ie = (n) => {
|
|
|
5536
5544
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5537
5545
|
hideNotActive: n.hideNotActive
|
|
5538
5546
|
},
|
|
5539
|
-
(c) =>
|
|
5547
|
+
(c) => A(c) || (V(c) || or(c)) && K(c)
|
|
5540
5548
|
) : {};
|
|
5541
|
-
},
|
|
5549
|
+
}, er = (n) => {
|
|
5542
5550
|
const r = {};
|
|
5543
5551
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
5544
5552
|
};
|
|
@@ -5556,10 +5564,10 @@ class ns extends p {
|
|
|
5556
5564
|
return this.get(
|
|
5557
5565
|
`/internal/price/products/${r}/analyze`,
|
|
5558
5566
|
{
|
|
5559
|
-
...
|
|
5560
|
-
filters:
|
|
5567
|
+
...er(e),
|
|
5568
|
+
filters: ke(s)
|
|
5561
5569
|
},
|
|
5562
|
-
(i) => i.data.map((o) => new
|
|
5570
|
+
(i) => i.data.map((o) => new Se(o))
|
|
5563
5571
|
);
|
|
5564
5572
|
}
|
|
5565
5573
|
/**
|
|
@@ -5575,10 +5583,10 @@ class ns extends p {
|
|
|
5575
5583
|
return this.get(
|
|
5576
5584
|
`/internal/price/categories/${r}/analyze`,
|
|
5577
5585
|
{
|
|
5578
|
-
...
|
|
5579
|
-
filters:
|
|
5586
|
+
...er(e),
|
|
5587
|
+
filters: ke(s)
|
|
5580
5588
|
},
|
|
5581
|
-
(i) => i.data.map((o) => new
|
|
5589
|
+
(i) => i.data.map((o) => new Se(o))
|
|
5582
5590
|
);
|
|
5583
5591
|
}
|
|
5584
5592
|
/**
|
|
@@ -5597,9 +5605,9 @@ class ns extends p {
|
|
|
5597
5605
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5598
5606
|
{
|
|
5599
5607
|
...e,
|
|
5600
|
-
filters:
|
|
5608
|
+
filters: ke(s)
|
|
5601
5609
|
},
|
|
5602
|
-
(i) => i.data.map((o) => new
|
|
5610
|
+
(i) => i.data.map((o) => new Se(o))
|
|
5603
5611
|
);
|
|
5604
5612
|
}
|
|
5605
5613
|
}
|
|
@@ -5650,7 +5658,7 @@ class Rt {
|
|
|
5650
5658
|
* @inheritDoc
|
|
5651
5659
|
*/
|
|
5652
5660
|
t(this, "currency");
|
|
5653
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = v(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new
|
|
5661
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = v(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new N(r.currency) : void 0;
|
|
5654
5662
|
}
|
|
5655
5663
|
}
|
|
5656
5664
|
class Dt extends oe {
|
|
@@ -5665,7 +5673,7 @@ class Dt extends oe {
|
|
|
5665
5673
|
* @inheritDoc
|
|
5666
5674
|
*/
|
|
5667
5675
|
t(this, "history");
|
|
5668
|
-
this.history =
|
|
5676
|
+
this.history = ve(e.history, (s) => new Rt(s));
|
|
5669
5677
|
}
|
|
5670
5678
|
}
|
|
5671
5679
|
class os extends p {
|
|
@@ -5677,22 +5685,22 @@ class os extends p {
|
|
|
5677
5685
|
* @see /docs/api#/operations/api_internal_price_history_get
|
|
5678
5686
|
*/
|
|
5679
5687
|
getProductPriceHistory(r) {
|
|
5680
|
-
var o, c,
|
|
5681
|
-
const e =
|
|
5688
|
+
var o, c, u, h, f;
|
|
5689
|
+
const e = k().config.dateFormats.api, s = nr(
|
|
5682
5690
|
ne(r, {
|
|
5683
5691
|
costDate: {
|
|
5684
|
-
from:
|
|
5685
|
-
to:
|
|
5692
|
+
from: Ie((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
5693
|
+
to: Ie((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
|
|
5686
5694
|
}
|
|
5687
5695
|
}),
|
|
5688
|
-
(g) =>
|
|
5696
|
+
(g) => A(g) || (V(g) || or(g)) && K(g)
|
|
5689
5697
|
), i = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
|
|
5690
5698
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((g) => [
|
|
5691
5699
|
new Dt(ne(g[0], { history: g }))
|
|
5692
5700
|
]);
|
|
5693
5701
|
}
|
|
5694
5702
|
}
|
|
5695
|
-
class
|
|
5703
|
+
class rr {
|
|
5696
5704
|
/**
|
|
5697
5705
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
5698
5706
|
*
|
|
@@ -5718,7 +5726,7 @@ class cs extends p {
|
|
|
5718
5726
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5719
5727
|
*/
|
|
5720
5728
|
getProductCategoryRecommendations(r) {
|
|
5721
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
5729
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new rr(e.data));
|
|
5722
5730
|
}
|
|
5723
5731
|
/**
|
|
5724
5732
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5727,7 +5735,7 @@ class cs extends p {
|
|
|
5727
5735
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5728
5736
|
*/
|
|
5729
5737
|
getProductRecommendations(r) {
|
|
5730
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
5738
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new rr(e.data));
|
|
5731
5739
|
}
|
|
5732
5740
|
/**
|
|
5733
5741
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5756,7 +5764,7 @@ class cs extends p {
|
|
|
5756
5764
|
});
|
|
5757
5765
|
}
|
|
5758
5766
|
}
|
|
5759
|
-
class T extends
|
|
5767
|
+
class T extends ue {
|
|
5760
5768
|
/**
|
|
5761
5769
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5762
5770
|
*
|
|
@@ -5772,25 +5780,25 @@ class T extends le {
|
|
|
5772
5780
|
* первичного интереса.
|
|
5773
5781
|
*/
|
|
5774
5782
|
getChannelPrimaryInterest() {
|
|
5775
|
-
return this.getTypedDataArrayRequester(
|
|
5783
|
+
return this.getTypedDataArrayRequester(yr, "/internal/references/channel-primary-interest", !0);
|
|
5776
5784
|
}
|
|
5777
5785
|
/**
|
|
5778
5786
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5779
5787
|
*/
|
|
5780
5788
|
getContactPositions() {
|
|
5781
|
-
return this.getTypedDataArrayRequester(
|
|
5789
|
+
return this.getTypedDataArrayRequester(lt, "/internal/references/contact-position", !0);
|
|
5782
5790
|
}
|
|
5783
5791
|
/**
|
|
5784
5792
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
5785
5793
|
*/
|
|
5786
5794
|
getCuratedDirection() {
|
|
5787
|
-
return this.getTypedDataArrayRequester(
|
|
5795
|
+
return this.getTypedDataArrayRequester(Ge, "/internal/references/curated-direction", !0);
|
|
5788
5796
|
}
|
|
5789
5797
|
/**
|
|
5790
5798
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5791
5799
|
*/
|
|
5792
5800
|
getCurrency() {
|
|
5793
|
-
return this.getTypedDataArrayRequester(
|
|
5801
|
+
return this.getTypedDataArrayRequester(N, "/public/references/currency", !0);
|
|
5794
5802
|
}
|
|
5795
5803
|
/**
|
|
5796
5804
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -5803,13 +5811,13 @@ class T extends le {
|
|
|
5803
5811
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5804
5812
|
*/
|
|
5805
5813
|
getOpf() {
|
|
5806
|
-
return this.getTypedDataArrayRequester(
|
|
5814
|
+
return this.getTypedDataArrayRequester(U, "/public/references/opf", !0);
|
|
5807
5815
|
}
|
|
5808
5816
|
/**
|
|
5809
5817
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5810
5818
|
*/
|
|
5811
5819
|
getOrderPaymentStatuses() {
|
|
5812
|
-
return this.getTypedDataArrayRequester(
|
|
5820
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/order-payment-status", !0);
|
|
5813
5821
|
}
|
|
5814
5822
|
/**
|
|
5815
5823
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
@@ -5827,19 +5835,19 @@ class T extends le {
|
|
|
5827
5835
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5828
5836
|
*/
|
|
5829
5837
|
getResourceTypes() {
|
|
5830
|
-
return this.getTypedDataArrayRequester(
|
|
5838
|
+
return this.getTypedDataArrayRequester(wr, "/internal/references/resource-type", !0);
|
|
5831
5839
|
}
|
|
5832
5840
|
/**
|
|
5833
5841
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5834
5842
|
*/
|
|
5835
5843
|
getSalesDirections() {
|
|
5836
|
-
return this.getTypedDataArrayRequester(
|
|
5844
|
+
return this.getTypedDataArrayRequester(_, "/public/references/sales-direction", !0);
|
|
5837
5845
|
}
|
|
5838
5846
|
/**
|
|
5839
5847
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5840
5848
|
*/
|
|
5841
5849
|
getSourcePrimaryInterest() {
|
|
5842
|
-
return this.getTypedDataArrayRequester(
|
|
5850
|
+
return this.getTypedDataArrayRequester(vr, "/internal/references/source-primary-interest", !0);
|
|
5843
5851
|
}
|
|
5844
5852
|
/**
|
|
5845
5853
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5847,7 +5855,7 @@ class T extends le {
|
|
|
5847
5855
|
* @param term Терм поиска.
|
|
5848
5856
|
*/
|
|
5849
5857
|
searchCity(r) {
|
|
5850
|
-
return this.getTypedDataArrayRequester(
|
|
5858
|
+
return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5851
5859
|
}
|
|
5852
5860
|
/**
|
|
5853
5861
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5875,19 +5883,19 @@ class T extends le {
|
|
|
5875
5883
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5876
5884
|
*/
|
|
5877
5885
|
getWarehouses() {
|
|
5878
|
-
return this.getTypedDataArrayRequester(
|
|
5886
|
+
return this.getTypedDataArrayRequester(Pe, "/public/references/warehouse", !0);
|
|
5879
5887
|
}
|
|
5880
5888
|
/**
|
|
5881
5889
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5882
5890
|
*/
|
|
5883
5891
|
getPropertyTypes() {
|
|
5884
|
-
return this.getTypedDataArrayRequester(
|
|
5892
|
+
return this.getTypedDataArrayRequester(fr, "/internal/references/property-type", !0);
|
|
5885
5893
|
}
|
|
5886
5894
|
/**
|
|
5887
5895
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5888
5896
|
*/
|
|
5889
5897
|
getPriceCoefficients() {
|
|
5890
|
-
return this.getTypedDataArrayRequester(
|
|
5898
|
+
return this.getTypedDataArrayRequester(Ce, "/internal/references/price-coefficient", !0);
|
|
5891
5899
|
}
|
|
5892
5900
|
/**
|
|
5893
5901
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
@@ -5896,8 +5904,8 @@ class T extends le {
|
|
|
5896
5904
|
return this.getTypedDataArrayRequester(gt, "/public/references/product-file-type", !0);
|
|
5897
5905
|
}
|
|
5898
5906
|
}
|
|
5899
|
-
const
|
|
5900
|
-
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),
|
|
5907
|
+
const $ = j("common.references_private", () => {
|
|
5908
|
+
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), f = y(void 0), g = y(void 0), b = y(void 0), ee = y(void 0), re = y(void 0), F = y(void 0), M = y(void 0), Ae = y(void 0), l = y(void 0);
|
|
5901
5909
|
return {
|
|
5902
5910
|
/**
|
|
5903
5911
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5930,7 +5938,7 @@ const A = H("common.references_private", () => {
|
|
|
5930
5938
|
/**
|
|
5931
5939
|
* Справочник статусов оплаты заказа.
|
|
5932
5940
|
*/
|
|
5933
|
-
orderPaymentStatusReference:
|
|
5941
|
+
orderPaymentStatusReference: u,
|
|
5934
5942
|
/**
|
|
5935
5943
|
* Справочник статусов заказов.
|
|
5936
5944
|
*/
|
|
@@ -5946,7 +5954,7 @@ const A = H("common.references_private", () => {
|
|
|
5946
5954
|
/**
|
|
5947
5955
|
* Справочник типов файлов продукктов/категорий.
|
|
5948
5956
|
*/
|
|
5949
|
-
productFileTypeReference:
|
|
5957
|
+
productFileTypeReference: b,
|
|
5950
5958
|
/**
|
|
5951
5959
|
* Справочник типов ресурсов.
|
|
5952
5960
|
*/
|
|
@@ -5958,106 +5966,106 @@ const A = H("common.references_private", () => {
|
|
|
5958
5966
|
/**
|
|
5959
5967
|
* Справочник источников первичного интереса.
|
|
5960
5968
|
*/
|
|
5961
|
-
sourcePrimaryInterestReference:
|
|
5969
|
+
sourcePrimaryInterestReference: F,
|
|
5962
5970
|
/**
|
|
5963
5971
|
* Справочник складов.
|
|
5964
5972
|
*/
|
|
5965
|
-
warehousesReference:
|
|
5973
|
+
warehousesReference: M,
|
|
5966
5974
|
/**
|
|
5967
5975
|
* Справочник типов свойств.
|
|
5968
5976
|
*/
|
|
5969
|
-
propertyTypesReference:
|
|
5977
|
+
propertyTypesReference: Ae,
|
|
5970
5978
|
/**
|
|
5971
5979
|
* Справочник коэффициентов цен.
|
|
5972
5980
|
*/
|
|
5973
|
-
priceCoefficientsReference:
|
|
5981
|
+
priceCoefficientsReference: l
|
|
5974
5982
|
};
|
|
5975
|
-
}),
|
|
5983
|
+
}), ls = j("common.references", () => {
|
|
5976
5984
|
const n = D(() => {
|
|
5977
|
-
const
|
|
5978
|
-
return !
|
|
5979
|
-
|
|
5980
|
-
}).catch(w)),
|
|
5985
|
+
const l = $();
|
|
5986
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(T).getChannelPrimaryInterest().then((m) => {
|
|
5987
|
+
l.channelPrimaryInterestReference = m;
|
|
5988
|
+
}).catch(w)), l.channelPrimaryInterestReference;
|
|
5981
5989
|
}), r = D(() => {
|
|
5982
|
-
const
|
|
5983
|
-
return !
|
|
5984
|
-
|
|
5985
|
-
}).catch(w)),
|
|
5990
|
+
const l = $();
|
|
5991
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, p.getInstance(T).getContactPositions().then((m) => {
|
|
5992
|
+
l.contactPositionsReference = m;
|
|
5993
|
+
}).catch(w)), l.contactPositionsReference;
|
|
5986
5994
|
}), e = D(() => {
|
|
5987
|
-
const
|
|
5988
|
-
return !
|
|
5989
|
-
|
|
5990
|
-
}).catch(w)),
|
|
5995
|
+
const l = $();
|
|
5996
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(T).getCurrency().then((m) => {
|
|
5997
|
+
l.currencyReference = m;
|
|
5998
|
+
}).catch(w)), l.currencyReference;
|
|
5991
5999
|
}), s = D(() => {
|
|
5992
|
-
const
|
|
5993
|
-
return !
|
|
5994
|
-
|
|
5995
|
-
}).catch(w)),
|
|
6000
|
+
const l = $();
|
|
6001
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(T).getOpf().then((m) => {
|
|
6002
|
+
l.opfReference = m;
|
|
6003
|
+
}).catch(w)), l.opfReference;
|
|
5996
6004
|
}), i = D(() => {
|
|
5997
|
-
const
|
|
5998
|
-
return !
|
|
5999
|
-
|
|
6000
|
-
}).catch(w)),
|
|
6005
|
+
const l = $();
|
|
6006
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(T).getOrderPaymentStatuses().then((m) => {
|
|
6007
|
+
l.orderPaymentStatusReference = m;
|
|
6008
|
+
}).catch(w)), l.orderPaymentStatusReference;
|
|
6001
6009
|
}), o = D(() => {
|
|
6002
|
-
const
|
|
6003
|
-
return !
|
|
6004
|
-
|
|
6005
|
-
}).catch(w)),
|
|
6010
|
+
const l = $();
|
|
6011
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, p.getInstance(T).getOrderStatuses().then((m) => {
|
|
6012
|
+
l.orderStatusReference = m;
|
|
6013
|
+
}).catch(w)), l.orderStatusReference;
|
|
6006
6014
|
}), c = D(() => {
|
|
6007
|
-
const
|
|
6008
|
-
return !
|
|
6009
|
-
|
|
6010
|
-
}).catch(w)),
|
|
6011
|
-
}),
|
|
6012
|
-
const
|
|
6013
|
-
return !
|
|
6014
|
-
|
|
6015
|
-
}).catch(w)),
|
|
6015
|
+
const l = $();
|
|
6016
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, p.getInstance(T).getPaymentTypes().then((m) => {
|
|
6017
|
+
l.paymentTypeReference = m;
|
|
6018
|
+
}).catch(w)), l.paymentTypeReference;
|
|
6019
|
+
}), u = D(() => {
|
|
6020
|
+
const l = $();
|
|
6021
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, p.getInstance(T).getPartnerGroup().then((m) => {
|
|
6022
|
+
l.partnerGroupReference = m;
|
|
6023
|
+
}).catch(w)), l.partnerGroupReference;
|
|
6016
6024
|
}), h = D(() => {
|
|
6017
|
-
const
|
|
6018
|
-
return !
|
|
6019
|
-
|
|
6020
|
-
}).catch(w)),
|
|
6025
|
+
const l = $();
|
|
6026
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, p.getInstance(T).getProductFileType().then((m) => {
|
|
6027
|
+
l.productFileTypeReference = m;
|
|
6028
|
+
}).catch(w)), l.productFileTypeReference;
|
|
6021
6029
|
}), f = D(() => {
|
|
6022
|
-
const
|
|
6023
|
-
return !
|
|
6024
|
-
|
|
6025
|
-
}).catch(w)),
|
|
6030
|
+
const l = $();
|
|
6031
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, p.getInstance(T).getResourceTypes().then((m) => {
|
|
6032
|
+
l.resourceTypesReference = m;
|
|
6033
|
+
}).catch(w)), l.resourceTypesReference;
|
|
6026
6034
|
}), g = D(() => {
|
|
6027
|
-
const
|
|
6028
|
-
return !
|
|
6029
|
-
|
|
6030
|
-
}).catch(w)),
|
|
6031
|
-
}),
|
|
6032
|
-
const
|
|
6033
|
-
return !
|
|
6034
|
-
|
|
6035
|
-
}).catch(w)),
|
|
6035
|
+
const l = $();
|
|
6036
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(T).getSalesDirections().then((m) => {
|
|
6037
|
+
l.salesDirectionsReference = m;
|
|
6038
|
+
}).catch(w)), l.salesDirectionsReference;
|
|
6039
|
+
}), b = D(() => {
|
|
6040
|
+
const l = $();
|
|
6041
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(T).getSourcePrimaryInterest().then((m) => {
|
|
6042
|
+
l.sourcePrimaryInterestReference = m;
|
|
6043
|
+
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
6036
6044
|
}), ee = D(() => {
|
|
6037
|
-
const
|
|
6038
|
-
return !
|
|
6039
|
-
|
|
6040
|
-
}).catch(w)),
|
|
6045
|
+
const l = $();
|
|
6046
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(T).getDeliveryTypes().then((m) => {
|
|
6047
|
+
l.deliveryTypeReference = m;
|
|
6048
|
+
}).catch(w)), l.deliveryTypeReference;
|
|
6041
6049
|
}), re = D(() => {
|
|
6042
|
-
const
|
|
6043
|
-
return !
|
|
6044
|
-
|
|
6045
|
-
}).catch(w)),
|
|
6046
|
-
}), G = D(() => {
|
|
6047
|
-
const u = A();
|
|
6048
|
-
return !u.warehousesReference && !u.dataLoaderList.warehousesReference && (u.dataLoaderList.warehousesReference = !0, p.getInstance(T).getWarehouses().then((m) => {
|
|
6049
|
-
u.warehousesReference = m;
|
|
6050
|
-
}).catch(w)), u.warehousesReference;
|
|
6050
|
+
const l = $();
|
|
6051
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance(Ct).getManagers().then((m) => {
|
|
6052
|
+
l.managersList = m;
|
|
6053
|
+
}).catch(w)), l.managersList;
|
|
6051
6054
|
}), F = D(() => {
|
|
6052
|
-
const
|
|
6053
|
-
return !
|
|
6054
|
-
|
|
6055
|
-
}).catch(w)),
|
|
6056
|
-
}),
|
|
6057
|
-
const
|
|
6058
|
-
return !
|
|
6059
|
-
|
|
6060
|
-
}).catch(w)),
|
|
6055
|
+
const l = $();
|
|
6056
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, p.getInstance(T).getWarehouses().then((m) => {
|
|
6057
|
+
l.warehousesReference = m;
|
|
6058
|
+
}).catch(w)), l.warehousesReference;
|
|
6059
|
+
}), M = D(() => {
|
|
6060
|
+
const l = $();
|
|
6061
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, p.getInstance(T).getPropertyTypes().then((m) => {
|
|
6062
|
+
l.propertyTypesReference = m;
|
|
6063
|
+
}).catch(w)), l.propertyTypesReference;
|
|
6064
|
+
}), Ae = D(() => {
|
|
6065
|
+
const l = $();
|
|
6066
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(T).getPriceCoefficients().then((m) => {
|
|
6067
|
+
l.priceCoefficientsReference = m;
|
|
6068
|
+
}).catch(w)), l.priceCoefficientsReference;
|
|
6061
6069
|
});
|
|
6062
6070
|
return {
|
|
6063
6071
|
/**
|
|
@@ -6091,7 +6099,7 @@ const A = H("common.references_private", () => {
|
|
|
6091
6099
|
/**
|
|
6092
6100
|
* Справочник групп партнеров.
|
|
6093
6101
|
*/
|
|
6094
|
-
partnerGroupsReference:
|
|
6102
|
+
partnerGroupsReference: u,
|
|
6095
6103
|
/**
|
|
6096
6104
|
* Справочник типов файлов продуктов/категорий.
|
|
6097
6105
|
*/
|
|
@@ -6107,7 +6115,7 @@ const A = H("common.references_private", () => {
|
|
|
6107
6115
|
/**
|
|
6108
6116
|
* Справочник каналов первичного интереса.
|
|
6109
6117
|
*/
|
|
6110
|
-
sourcePrimaryInterestsReference:
|
|
6118
|
+
sourcePrimaryInterestsReference: b,
|
|
6111
6119
|
/**
|
|
6112
6120
|
* Справочник типов доставки.
|
|
6113
6121
|
*/
|
|
@@ -6119,15 +6127,15 @@ const A = H("common.references_private", () => {
|
|
|
6119
6127
|
/**
|
|
6120
6128
|
* Справочник складов.
|
|
6121
6129
|
*/
|
|
6122
|
-
warehousesReference:
|
|
6130
|
+
warehousesReference: F,
|
|
6123
6131
|
/**
|
|
6124
6132
|
* Справочник типов свойств.
|
|
6125
6133
|
*/
|
|
6126
|
-
propertyTypesReference:
|
|
6134
|
+
propertyTypesReference: M,
|
|
6127
6135
|
/**
|
|
6128
6136
|
* Справочник коэффициентов цен.
|
|
6129
6137
|
*/
|
|
6130
|
-
priceCoefficientsReference:
|
|
6138
|
+
priceCoefficientsReference: Ae
|
|
6131
6139
|
};
|
|
6132
6140
|
});
|
|
6133
6141
|
class At {
|
|
@@ -6148,7 +6156,7 @@ class At {
|
|
|
6148
6156
|
this.name = r.name, this.content = r.content;
|
|
6149
6157
|
}
|
|
6150
6158
|
}
|
|
6151
|
-
class
|
|
6159
|
+
class tr {
|
|
6152
6160
|
/**
|
|
6153
6161
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
6154
6162
|
*
|
|
@@ -6184,10 +6192,10 @@ class sr {
|
|
|
6184
6192
|
*/
|
|
6185
6193
|
t(this, "meta");
|
|
6186
6194
|
var e;
|
|
6187
|
-
this.resourceType = new
|
|
6195
|
+
this.resourceType = new wr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new At(s))) ?? [];
|
|
6188
6196
|
}
|
|
6189
6197
|
}
|
|
6190
|
-
class
|
|
6198
|
+
class us extends p {
|
|
6191
6199
|
/**
|
|
6192
6200
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6193
6201
|
*
|
|
@@ -6195,7 +6203,7 @@ class ls extends p {
|
|
|
6195
6203
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6196
6204
|
*/
|
|
6197
6205
|
getResourceSeoData(r, e) {
|
|
6198
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6206
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new tr(s.data));
|
|
6199
6207
|
}
|
|
6200
6208
|
/**
|
|
6201
6209
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6206,7 +6214,7 @@ class ls extends p {
|
|
|
6206
6214
|
* в случае ошибок в запросах.
|
|
6207
6215
|
*/
|
|
6208
6216
|
saveResourceSeoData(r, e = {}) {
|
|
6209
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6217
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new tr(s.data), e);
|
|
6210
6218
|
}
|
|
6211
6219
|
/**
|
|
6212
6220
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6266,7 +6274,7 @@ class ps extends p {
|
|
|
6266
6274
|
}
|
|
6267
6275
|
}
|
|
6268
6276
|
var $t = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))($t || {});
|
|
6269
|
-
class Tt extends
|
|
6277
|
+
class Tt extends mr {
|
|
6270
6278
|
/**
|
|
6271
6279
|
* Инициализирует экземпляр класса {@link User}.
|
|
6272
6280
|
*
|
|
@@ -6294,7 +6302,7 @@ class hs extends p {
|
|
|
6294
6302
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6295
6303
|
*/
|
|
6296
6304
|
constructor() {
|
|
6297
|
-
super(), this.baseUrl = `${
|
|
6305
|
+
super(), this.baseUrl = `${k().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6298
6306
|
}
|
|
6299
6307
|
/**
|
|
6300
6308
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6314,7 +6322,7 @@ class at extends p {
|
|
|
6314
6322
|
return this.get("/internal/users/info", {}, (r) => new Tt(r.data), !0);
|
|
6315
6323
|
}
|
|
6316
6324
|
}
|
|
6317
|
-
const bt =
|
|
6325
|
+
const bt = j("common.user_state_private", () => {
|
|
6318
6326
|
const n = y({}), r = y(void 0);
|
|
6319
6327
|
return {
|
|
6320
6328
|
/**
|
|
@@ -6326,7 +6334,7 @@ const bt = H("common.user_state_private", () => {
|
|
|
6326
6334
|
*/
|
|
6327
6335
|
currentUser: r
|
|
6328
6336
|
};
|
|
6329
|
-
}), gs =
|
|
6337
|
+
}), gs = j("common.user_state", () => ({
|
|
6330
6338
|
/**
|
|
6331
6339
|
* Данные о текущем пользователе.
|
|
6332
6340
|
*/
|
|
@@ -6365,20 +6373,20 @@ class ms {
|
|
|
6365
6373
|
export {
|
|
6366
6374
|
ct as AnyReference,
|
|
6367
6375
|
Vr as AppBaseConfig,
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6376
|
+
de as BankAccount,
|
|
6377
|
+
De as BasePaginationProvider,
|
|
6378
|
+
rt as CalculationTypeEnum,
|
|
6371
6379
|
ge as Cart,
|
|
6372
|
-
|
|
6373
|
-
|
|
6380
|
+
et as CartItem,
|
|
6381
|
+
Zr as CartItemBase,
|
|
6374
6382
|
Nt as CartProvider,
|
|
6375
6383
|
Ht as CatalogProvider,
|
|
6376
|
-
|
|
6377
|
-
|
|
6384
|
+
cr as CatalogableItem,
|
|
6385
|
+
W as Category,
|
|
6378
6386
|
Ve as CategoryPricingRule,
|
|
6379
|
-
|
|
6387
|
+
yr as ChannelPrimaryInterest,
|
|
6380
6388
|
Vt as City,
|
|
6381
|
-
|
|
6389
|
+
Me as CityWithRegionAndCountry,
|
|
6382
6390
|
Xe as Client,
|
|
6383
6391
|
wt as ClientAdditionalData,
|
|
6384
6392
|
fe as ClientCategory,
|
|
@@ -6393,123 +6401,123 @@ export {
|
|
|
6393
6401
|
Kt as ClientsListFilters,
|
|
6394
6402
|
oe as CodedIdentity,
|
|
6395
6403
|
rs as ConfiguratorProvider,
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6404
|
+
_e as Contact,
|
|
6405
|
+
hr as ContactLinks,
|
|
6406
|
+
H as ContactPerson,
|
|
6399
6407
|
yt as ContactPersonRelated,
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6408
|
+
lt as ContactPosition,
|
|
6409
|
+
be as ContactRelation,
|
|
6410
|
+
Cr as ContragentBase,
|
|
6411
|
+
ye as ContragentFactory,
|
|
6412
|
+
Pr as ContragentIc,
|
|
6405
6413
|
mt as ContragentPerson,
|
|
6406
6414
|
ft as ContragentUlNr,
|
|
6407
|
-
|
|
6408
|
-
|
|
6415
|
+
Rr as ContragentUlR,
|
|
6416
|
+
He as CostSourceEnum,
|
|
6409
6417
|
X as Country,
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6418
|
+
Ge as CuratedDirection,
|
|
6419
|
+
Fe as Curator,
|
|
6420
|
+
N as Currency,
|
|
6413
6421
|
ps as DataSuggestionProvider,
|
|
6414
6422
|
Qt as DataTablePagination,
|
|
6415
6423
|
vt as DataTablePaginationRequestParams,
|
|
6416
6424
|
Yt as DataTableSortRequestParams,
|
|
6417
6425
|
ts as DateTimeProvider,
|
|
6418
|
-
|
|
6419
|
-
|
|
6426
|
+
Qr as DeletableNamedIdentity,
|
|
6427
|
+
we as DeliveryAddress,
|
|
6420
6428
|
Q as DeliveryType,
|
|
6421
|
-
|
|
6429
|
+
Ot as DetailedJwtPayload,
|
|
6422
6430
|
zr as DeviceTypeResolutionConfig,
|
|
6423
6431
|
st as DiscountShortInfo,
|
|
6424
6432
|
ms as FieldValidationResultData,
|
|
6425
|
-
|
|
6433
|
+
le as FilterGroup,
|
|
6426
6434
|
Ke as FilterItem,
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6435
|
+
Be as FilterOpEnum,
|
|
6436
|
+
ur as GeoCoordinates,
|
|
6437
|
+
Xr as HiddenCatalogableItem,
|
|
6438
|
+
ue as HttpCachedRequester,
|
|
6431
6439
|
Wr as HttpParamsConfig,
|
|
6432
6440
|
p as HttpRequester,
|
|
6433
|
-
|
|
6441
|
+
G as Identity,
|
|
6434
6442
|
Yr as Image,
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6443
|
+
O as JwtPayload,
|
|
6444
|
+
Re as Manager,
|
|
6445
|
+
je as ManagerCommon,
|
|
6438
6446
|
ss as ManagerDataFactory,
|
|
6439
6447
|
Ct as ManagerDataProvider,
|
|
6440
6448
|
At as MetaTagItem,
|
|
6441
6449
|
a as NamedIdentity,
|
|
6442
|
-
|
|
6450
|
+
U as Opf,
|
|
6443
6451
|
x as OpfEnum,
|
|
6444
|
-
|
|
6452
|
+
Ze as Order,
|
|
6445
6453
|
$r as OrderInfo,
|
|
6446
|
-
|
|
6454
|
+
ut as OrderPaymentStatus,
|
|
6447
6455
|
Pt as OrderProduct,
|
|
6448
|
-
|
|
6456
|
+
Dr as OrderShortInfo,
|
|
6449
6457
|
pt as OrderStatus,
|
|
6450
6458
|
is as OrdersDataProvider,
|
|
6451
6459
|
Z as PartnerGroup,
|
|
6452
6460
|
ht as PaymentType,
|
|
6453
6461
|
me as PreferencesStorageProvider,
|
|
6454
|
-
|
|
6462
|
+
Se as PriceAnalyze,
|
|
6455
6463
|
ns as PriceAnalyzeProvider,
|
|
6456
|
-
|
|
6464
|
+
Ce as PriceCoefficient,
|
|
6457
6465
|
lr as PriceCoefficientEnum,
|
|
6458
6466
|
os as PriceHistoryDataProvider,
|
|
6459
6467
|
Rt as PriceHistoryItem,
|
|
6460
|
-
|
|
6461
|
-
|
|
6468
|
+
E as PriceTemplate,
|
|
6469
|
+
Te as PriceTemplateCategory,
|
|
6462
6470
|
te as PriceTemplateClient,
|
|
6463
|
-
|
|
6464
|
-
|
|
6471
|
+
gr as PriceTemplateICatalogableItem,
|
|
6472
|
+
ae as PriceTemplateProduct,
|
|
6465
6473
|
Wt as PriceTemplateProvider,
|
|
6466
6474
|
ie as PricingRole,
|
|
6467
6475
|
Et as PricingRoleProvider,
|
|
6468
|
-
|
|
6469
|
-
|
|
6476
|
+
xe as PrimaryCatalogableItem,
|
|
6477
|
+
S as Product,
|
|
6470
6478
|
Ft as ProductCategoryDataProvider,
|
|
6471
6479
|
Mt as ProductDataProvider,
|
|
6472
6480
|
gt as ProductFileType,
|
|
6473
|
-
|
|
6481
|
+
Ne as ProductPriceCoefficient,
|
|
6474
6482
|
Dt as ProductPriceHistory,
|
|
6483
|
+
Je as ProductUnit,
|
|
6475
6484
|
Jt as PropertiesProvider,
|
|
6476
6485
|
se as Property,
|
|
6477
|
-
|
|
6478
|
-
|
|
6479
|
-
|
|
6486
|
+
fr as PropertyType,
|
|
6487
|
+
tt as PropertyTypeEnum,
|
|
6488
|
+
z as PropertyValue,
|
|
6480
6489
|
cs as RecommendationsDataProvider,
|
|
6481
|
-
|
|
6490
|
+
rr as RecommendationsList,
|
|
6482
6491
|
R as Reference,
|
|
6483
6492
|
T as ReferenceDataProvider,
|
|
6484
6493
|
ce as Region,
|
|
6485
|
-
|
|
6486
|
-
|
|
6494
|
+
wr as ResourceType,
|
|
6495
|
+
_ as SalesDirection,
|
|
6487
6496
|
Er as SentryConfig,
|
|
6488
|
-
|
|
6489
|
-
|
|
6490
|
-
|
|
6497
|
+
tr as Seo,
|
|
6498
|
+
us as SeoDataProvider,
|
|
6499
|
+
vr as SourcePrimaryInterest,
|
|
6491
6500
|
Kr as StockCount,
|
|
6492
6501
|
Ut as TemplatesListFilters,
|
|
6493
|
-
|
|
6494
|
-
|
|
6502
|
+
Ue as TypedInstanceFactory,
|
|
6503
|
+
Ar as UnitsHelper,
|
|
6495
6504
|
Xt as UnknownClientDataProvider,
|
|
6496
|
-
|
|
6505
|
+
pr as UpdatableNamedIdentity,
|
|
6497
6506
|
Tt as User,
|
|
6498
6507
|
hs as UserAuthDataProvider,
|
|
6499
|
-
|
|
6508
|
+
mr as UserCommonInfo,
|
|
6500
6509
|
at as UserDataProvider,
|
|
6501
6510
|
it as UserPricingRole,
|
|
6502
6511
|
d as UserShortInfo,
|
|
6503
6512
|
$t as UserTypeEnum,
|
|
6504
6513
|
es as VersionConfig,
|
|
6505
|
-
|
|
6514
|
+
Pe as Warehouse,
|
|
6506
6515
|
Jr as WebSocketConfig,
|
|
6507
6516
|
Qe as findCatalogItemByIdRecursive,
|
|
6508
6517
|
Ye as flattenCatalogItems,
|
|
6509
6518
|
Zt as loadRemoteConfig,
|
|
6510
|
-
|
|
6511
|
-
|
|
6512
|
-
|
|
6519
|
+
$e as useAuthStateStore,
|
|
6520
|
+
k as useBaseConfigStateStore,
|
|
6521
|
+
ls as useReferencesStore,
|
|
6513
6522
|
gs as useUserStateStore
|
|
6514
6523
|
};
|
|
6515
|
-
//# sourceMappingURL=sc-common-lib.js.map
|