@snabcentr/common-lib 1.91.0 → 1.92.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +2 -2
- package/dist/sc-common-lib.js +572 -472
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/catalog/classes/category-filter-setting.d.ts +30 -0
- package/dist/src/catalog/classes/category-filter-setting.d.ts.map +1 -0
- package/dist/src/catalog/classes/filter-settings.d.ts +37 -0
- package/dist/src/catalog/classes/filter-settings.d.ts.map +1 -0
- package/dist/src/catalog/classes/index.d.ts +2 -0
- package/dist/src/catalog/classes/index.d.ts.map +1 -1
- package/dist/src/catalog/classes/property.d.ts +4 -0
- package/dist/src/catalog/classes/property.d.ts.map +1 -1
- package/dist/src/catalog/enums/index.d.ts +1 -0
- package/dist/src/catalog/enums/index.d.ts.map +1 -1
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts +18 -0
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts +27 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting.d.ts +21 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts +27 -0
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-property.d.ts +4 -0
- package/dist/src/catalog/interfaces/i-property.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/index.d.ts +3 -0
- package/dist/src/catalog/interfaces/index.d.ts.map +1 -1
- package/dist/src/catalog/providers/properties-provider.d.ts +26 -0
- package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
1
|
+
var Or = Object.defineProperty;
|
|
2
|
+
var dr = (n, r, e) => r in n ? Or(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => dr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as or } from "jwt-decode";
|
|
5
|
+
import { merge as le, isNil as T, isEmpty as X, noop as w, mapValues as cr, isArray as H, every as _r, split as qr, isString as v, constant as ar, toUpper as Nr, cloneDeep as Ur, toLower as Hr, isFunction as Ue, map as ge, forEach as Fr, isDate as de, isObject as He, omitBy as lr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
7
|
import { defineStore as z } from "pinia";
|
|
8
|
-
import { ref as y, markRaw as
|
|
9
|
-
import { isAfter as Ve, parseISO as C, startOfToday as
|
|
10
|
-
import
|
|
8
|
+
import { ref as y, markRaw as Mr, computed as A } from "vue";
|
|
9
|
+
import { isAfter as Ve, parseISO as C, startOfToday as _e, format as O, addBusinessDays as jr, endOfTomorrow as Gr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr, addSeconds as Kr } from "date-fns";
|
|
10
|
+
import Qr, { CanceledError as Yr } from "axios";
|
|
11
11
|
class F {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -99,7 +99,7 @@ class F {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
le(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class F {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = or(r), s = new F(Fe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class zt extends F {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class jt extends F {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
le(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,10 +151,10 @@ class jt extends F {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new F(Fe(
|
|
154
|
+
return new F(Fe(or(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class Xr {
|
|
158
158
|
/**
|
|
159
159
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
160
160
|
*
|
|
@@ -176,7 +176,7 @@ class Yr {
|
|
|
176
176
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
class
|
|
179
|
+
class Zr {
|
|
180
180
|
/**
|
|
181
181
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
182
182
|
*
|
|
@@ -198,7 +198,7 @@ class Xr {
|
|
|
198
198
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
class
|
|
201
|
+
class et {
|
|
202
202
|
/**
|
|
203
203
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
204
204
|
*
|
|
@@ -243,7 +243,7 @@ class Zr {
|
|
|
243
243
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
class
|
|
246
|
+
class rt {
|
|
247
247
|
/**
|
|
248
248
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
249
249
|
*
|
|
@@ -282,7 +282,7 @@ class et {
|
|
|
282
282
|
this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class tt {
|
|
286
286
|
/**
|
|
287
287
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
288
288
|
*
|
|
@@ -326,10 +326,10 @@ class rt {
|
|
|
326
326
|
*/
|
|
327
327
|
t(this, "dateFormats");
|
|
328
328
|
var e, s, i;
|
|
329
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
329
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Zr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Xr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new et({
|
|
330
330
|
environment: this.environment,
|
|
331
331
|
...r == null ? void 0 : r.sentry
|
|
332
|
-
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new
|
|
332
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new rt(r.websocket) : void 0, this.dateFormats = {
|
|
333
333
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
334
334
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
335
335
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
@@ -337,7 +337,7 @@ class rt {
|
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
const L = z("common.config", () => {
|
|
340
|
-
const n = y(new
|
|
340
|
+
const n = y(new tt());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
343
343
|
* Конфигурационные данные приложения.
|
|
@@ -355,7 +355,7 @@ const L = z("common.config", () => {
|
|
|
355
355
|
* @param appConfig Конфигурация приложения.
|
|
356
356
|
*/
|
|
357
357
|
setConfig: (s) => {
|
|
358
|
-
n.value =
|
|
358
|
+
n.value = le(n.value, s);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
@@ -378,8 +378,8 @@ class we {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const s = JSON.parse(e);
|
|
381
|
-
if (!s.availableFor || Ve(C(s.availableFor) ||
|
|
382
|
-
if (
|
|
381
|
+
if (!s.availableFor || Ve(C(s.availableFor) || _e(), /* @__PURE__ */ new Date())) {
|
|
382
|
+
if (T(s.data) || X(s.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return s.data;
|
|
385
385
|
}
|
|
@@ -401,7 +401,7 @@ class we {
|
|
|
401
401
|
static saveActualDataToStorage(r, e, s) {
|
|
402
402
|
if (this.isLocalStorageAvailable())
|
|
403
403
|
try {
|
|
404
|
-
if (
|
|
404
|
+
if (T(e) || X(e))
|
|
405
405
|
throw new Error("Data is empty");
|
|
406
406
|
const i = JSON.stringify({
|
|
407
407
|
availableFor: s,
|
|
@@ -452,7 +452,7 @@ class we {
|
|
|
452
452
|
const i = localStorage.getItem(s);
|
|
453
453
|
if (i) {
|
|
454
454
|
const o = JSON.parse(i);
|
|
455
|
-
o.availableFor && !Ve(C(o.availableFor) ||
|
|
455
|
+
o.availableFor && !Ve(C(o.availableFor) || _e(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(s);
|
|
@@ -489,11 +489,11 @@ const E = z("common.auth_state_private", () => {
|
|
|
489
489
|
const c = (u = L().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 = Mr(/* @__PURE__ */ new Map());
|
|
493
493
|
function i() {
|
|
494
|
-
e.value = void 0,
|
|
494
|
+
e.value = void 0, T(n.value) || n.value.then((o) => {
|
|
495
495
|
const c = F.getJwtPayload(o);
|
|
496
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
496
|
+
e.value = c.exp * 1e3 > Date.now() ? cr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(w);
|
|
498
498
|
}
|
|
499
499
|
return {
|
|
@@ -521,7 +521,7 @@ const E = z("common.auth_state_private", () => {
|
|
|
521
521
|
}), be = z("common.auth_state", () => {
|
|
522
522
|
const n = A(() => {
|
|
523
523
|
const o = E();
|
|
524
|
-
if (
|
|
524
|
+
if (T(o.jwtToken) && !T(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
526
|
o.jwtToken = c, c.then((u) => {
|
|
527
527
|
o.jwtToken = Promise.resolve(u), we.saveActualDataToStorage("sc.token", u, Ke(u)), o.recalculateUserPermissions();
|
|
@@ -542,9 +542,9 @@ const E = z("common.auth_state_private", () => {
|
|
|
542
542
|
}
|
|
543
543
|
function i(o) {
|
|
544
544
|
const c = E();
|
|
545
|
-
|
|
545
|
+
!T(c.jwtToken) && T(c.userPermissions) && c.jwtToken.then((m) => {
|
|
546
546
|
const f = F.getJwtPayload(m);
|
|
547
|
-
c.userPermissions = f.exp * 1e3 > Date.now() ?
|
|
547
|
+
c.userPermissions = f.exp * 1e3 > Date.now() ? cr(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(w);
|
|
549
549
|
const u = H(o) ? o.join(" && ") : o;
|
|
550
550
|
if (c.userPermissionsComputedRefs.has(u))
|
|
@@ -552,13 +552,13 @@ const E = z("common.auth_state_private", () => {
|
|
|
552
552
|
const p = A(() => {
|
|
553
553
|
const m = (f) => {
|
|
554
554
|
var J;
|
|
555
|
-
const D =
|
|
555
|
+
const D = qr(f, ".");
|
|
556
556
|
if (D.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [
|
|
559
|
-
return H(W) && W.includes(
|
|
558
|
+
const [ie, ne] = D, W = (J = E().userPermissions) == null ? void 0 : J[ie];
|
|
559
|
+
return H(W) && W.includes(ne);
|
|
560
560
|
};
|
|
561
|
-
return H(o) ?
|
|
561
|
+
return H(o) ? _r(o, (f) => m(f)) : m(o);
|
|
562
562
|
});
|
|
563
563
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
564
564
|
}
|
|
@@ -591,7 +591,7 @@ const E = z("common.auth_state_private", () => {
|
|
|
591
591
|
hasUserPermission: i
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
|
-
class
|
|
594
|
+
class re {
|
|
595
595
|
/**
|
|
596
596
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
597
597
|
*
|
|
@@ -607,16 +607,16 @@ class ee {
|
|
|
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, T(this.id) && (T(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 === "" : T(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
|
-
class k extends
|
|
619
|
+
class k extends re {
|
|
620
620
|
/**
|
|
621
621
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
622
622
|
*
|
|
@@ -631,7 +631,7 @@ class k extends ee {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class d extends k {
|
|
635
635
|
/**
|
|
636
636
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
637
637
|
*
|
|
@@ -646,7 +646,7 @@ class x extends k {
|
|
|
646
646
|
this.type = e == null ? void 0 : e.type;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
class
|
|
649
|
+
class st extends k {
|
|
650
650
|
/**
|
|
651
651
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
652
652
|
*
|
|
@@ -682,10 +682,10 @@ class tt extends k {
|
|
|
682
682
|
* Дата и время удаления.
|
|
683
683
|
*/
|
|
684
684
|
t(this, "deletedAt");
|
|
685
|
-
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
|
|
685
|
+
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;
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class ur extends k {
|
|
689
689
|
/**
|
|
690
690
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
691
691
|
*
|
|
@@ -700,7 +700,7 @@ class lr extends k {
|
|
|
700
700
|
this.updatedAt = v(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
class K extends
|
|
703
|
+
class K extends ur {
|
|
704
704
|
/**
|
|
705
705
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
706
706
|
*
|
|
@@ -719,7 +719,7 @@ class K extends lr {
|
|
|
719
719
|
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();
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
|
-
var
|
|
722
|
+
var pr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(pr || {});
|
|
723
723
|
class R extends k {
|
|
724
724
|
/**
|
|
725
725
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
@@ -744,7 +744,7 @@ class Pe extends R {
|
|
|
744
744
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
745
745
|
*/
|
|
746
746
|
static getRetailPriceCoefficient() {
|
|
747
|
-
return { id: -2, slug:
|
|
747
|
+
return { id: -2, slug: pr.Retail, name: "Розн. цена", guid: "", isNewRec: ar(!0) };
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
750
|
class Me {
|
|
@@ -777,7 +777,7 @@ class Me {
|
|
|
777
777
|
this.coefficient = new Pe(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;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
|
-
class
|
|
780
|
+
class hr {
|
|
781
781
|
/**
|
|
782
782
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
783
783
|
*
|
|
@@ -797,7 +797,7 @@ class pr {
|
|
|
797
797
|
}
|
|
798
798
|
class U extends R {
|
|
799
799
|
}
|
|
800
|
-
class
|
|
800
|
+
class me extends R {
|
|
801
801
|
/**
|
|
802
802
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
803
803
|
*
|
|
@@ -826,10 +826,10 @@ class ge extends R {
|
|
|
826
826
|
* Координаты склада.
|
|
827
827
|
*/
|
|
828
828
|
t(this, "coordinates");
|
|
829
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new U(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
829
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new U(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new hr(e == null ? void 0 : e.coordinates);
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
class
|
|
832
|
+
class it {
|
|
833
833
|
/**
|
|
834
834
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
835
835
|
*
|
|
@@ -844,10 +844,10 @@ class st {
|
|
|
844
844
|
* Количество остатков товара на складе.
|
|
845
845
|
*/
|
|
846
846
|
t(this, "count");
|
|
847
|
-
this.warehouse = new
|
|
847
|
+
this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
848
848
|
}
|
|
849
849
|
}
|
|
850
|
-
class
|
|
850
|
+
class _ extends k {
|
|
851
851
|
/**
|
|
852
852
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
853
853
|
*
|
|
@@ -901,7 +901,7 @@ class Qe extends k {
|
|
|
901
901
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
902
902
|
}
|
|
903
903
|
}
|
|
904
|
-
class
|
|
904
|
+
class ue extends k {
|
|
905
905
|
/**
|
|
906
906
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
907
907
|
*
|
|
@@ -916,7 +916,7 @@ class le extends k {
|
|
|
916
916
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
class
|
|
919
|
+
class gr extends ue {
|
|
920
920
|
/**
|
|
921
921
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
922
922
|
*
|
|
@@ -935,7 +935,7 @@ class hr extends le {
|
|
|
935
935
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
936
936
|
}
|
|
937
937
|
}
|
|
938
|
-
class
|
|
938
|
+
class nt extends gr {
|
|
939
939
|
/**
|
|
940
940
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
941
941
|
*
|
|
@@ -950,7 +950,7 @@ class it extends hr {
|
|
|
950
950
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
951
951
|
}
|
|
952
952
|
}
|
|
953
|
-
class
|
|
953
|
+
class ot {
|
|
954
954
|
/**
|
|
955
955
|
* Инициализирует экземпляр класса {@link Image}.
|
|
956
956
|
*
|
|
@@ -973,7 +973,7 @@ class nt {
|
|
|
973
973
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
974
974
|
}
|
|
975
975
|
}
|
|
976
|
-
class
|
|
976
|
+
class qe extends gr {
|
|
977
977
|
/**
|
|
978
978
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
979
979
|
*
|
|
@@ -988,7 +988,7 @@ class _e extends hr {
|
|
|
988
988
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
989
989
|
}
|
|
990
990
|
}
|
|
991
|
-
class I extends
|
|
991
|
+
class I extends nt {
|
|
992
992
|
/**
|
|
993
993
|
* Инициализирует экземпляр класса {@link Product}.
|
|
994
994
|
*
|
|
@@ -1065,9 +1065,9 @@ class I extends it {
|
|
|
1065
1065
|
* Список коэффициентов цен на продукт.
|
|
1066
1066
|
*/
|
|
1067
1067
|
t(this, "priceCoefficients");
|
|
1068
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new
|
|
1068
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new _(e.currency) : new _(), 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((p) => new it(p))) ?? [], this.type = "product";
|
|
1069
1069
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1070
|
-
s && (this.category = new
|
|
1070
|
+
s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new qe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ot(p, L().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((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1071
1071
|
}
|
|
1072
1072
|
/**
|
|
1073
1073
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1125,10 +1125,10 @@ class M extends I {
|
|
|
1125
1125
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1126
1126
|
*/
|
|
1127
1127
|
t(this, "isFavorite");
|
|
1128
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new
|
|
1128
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new st(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new K(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;
|
|
1129
1129
|
}
|
|
1130
1130
|
}
|
|
1131
|
-
class
|
|
1131
|
+
class te extends qe {
|
|
1132
1132
|
/**
|
|
1133
1133
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
1134
1134
|
*
|
|
@@ -1152,10 +1152,10 @@ class me extends _e {
|
|
|
1152
1152
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
1153
1153
|
*/
|
|
1154
1154
|
t(this, "currencyRates");
|
|
1155
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
1155
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [Nr(s), i])) : void 0;
|
|
1156
1156
|
}
|
|
1157
1157
|
}
|
|
1158
|
-
class
|
|
1158
|
+
class mr extends re {
|
|
1159
1159
|
/**
|
|
1160
1160
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
1161
1161
|
*
|
|
@@ -1211,10 +1211,10 @@ class gr extends ee {
|
|
|
1211
1211
|
* @inheritDoc
|
|
1212
1212
|
*/
|
|
1213
1213
|
t(this, "creatorUser");
|
|
1214
|
-
this.product = new M(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new
|
|
1214
|
+
this.product = new M(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new te(), this.currency = e.currency ? new _(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ur(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creatorUser = e.creatorUser && new d(e.creatorUser);
|
|
1215
1215
|
}
|
|
1216
1216
|
}
|
|
1217
|
-
let
|
|
1217
|
+
let ct = class extends mr {
|
|
1218
1218
|
/**
|
|
1219
1219
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
1220
1220
|
*
|
|
@@ -1258,7 +1258,7 @@ let ot = class extends gr {
|
|
|
1258
1258
|
* @inheritDoc
|
|
1259
1259
|
*/
|
|
1260
1260
|
t(this, "currency");
|
|
1261
|
-
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 = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new
|
|
1261
|
+
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 = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new _(e.currency);
|
|
1262
1262
|
}
|
|
1263
1263
|
};
|
|
1264
1264
|
class ye {
|
|
@@ -1280,7 +1280,7 @@ class ye {
|
|
|
1280
1280
|
* @inheritDoc
|
|
1281
1281
|
*/
|
|
1282
1282
|
t(this, "directionsSum");
|
|
1283
|
-
this.items = r.items.map((e) => new
|
|
1283
|
+
this.items = r.items.map((e) => new ct(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1284
1284
|
}
|
|
1285
1285
|
}
|
|
1286
1286
|
class Ge {
|
|
@@ -1341,7 +1341,7 @@ const P = class P {
|
|
|
1341
1341
|
// eslint-disable-next-line class-methods-use-this
|
|
1342
1342
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1343
1343
|
let e;
|
|
1344
|
-
return
|
|
1344
|
+
return T(be().jwtToken) || (e = await be().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1345
1345
|
});
|
|
1346
1346
|
/**
|
|
1347
1347
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1356,7 +1356,7 @@ const P = class P {
|
|
|
1356
1356
|
* @param request Данные запроса.
|
|
1357
1357
|
*/
|
|
1358
1358
|
// eslint-disable-next-line class-methods-use-this
|
|
1359
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(
|
|
1359
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(Hr(r.method)) && r.data && (r.data = Ee(r.data))), r));
|
|
1360
1360
|
/**
|
|
1361
1361
|
* Перехватчик ошибок ответов на запрос.
|
|
1362
1362
|
*
|
|
@@ -1376,7 +1376,7 @@ const P = class P {
|
|
|
1376
1376
|
t(this, "canceledResponseInterceptor", (r) => {
|
|
1377
1377
|
const e = r.rawError ?? r;
|
|
1378
1378
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
1379
|
-
throw new
|
|
1379
|
+
throw new Yr("Request canceled");
|
|
1380
1380
|
return Promise.reject(r);
|
|
1381
1381
|
});
|
|
1382
1382
|
/**
|
|
@@ -1393,7 +1393,7 @@ const P = class P {
|
|
|
1393
1393
|
*/
|
|
1394
1394
|
// eslint-disable-next-line class-methods-use-this
|
|
1395
1395
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
|
|
1396
|
-
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient =
|
|
1396
|
+
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = Qr.create({
|
|
1397
1397
|
headers: {
|
|
1398
1398
|
Accept: "application/json",
|
|
1399
1399
|
"Content-Type": "application/json"
|
|
@@ -1466,8 +1466,8 @@ const P = class P {
|
|
|
1466
1466
|
*/
|
|
1467
1467
|
static convertHttpErrorResponse(r) {
|
|
1468
1468
|
var e, s;
|
|
1469
|
-
if (
|
|
1470
|
-
const i =
|
|
1469
|
+
if (T(r) || !T(r.request) || !T(r.response)) {
|
|
1470
|
+
const i = T(r) ? {} : r == null ? void 0 : r.response;
|
|
1471
1471
|
return Promise.reject({
|
|
1472
1472
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
1473
1473
|
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
@@ -1571,7 +1571,7 @@ t(P, "requestHooks", []), /**
|
|
|
1571
1571
|
*/
|
|
1572
1572
|
t(P, "responseHooks", []);
|
|
1573
1573
|
let h = P;
|
|
1574
|
-
class
|
|
1574
|
+
class Jt extends h {
|
|
1575
1575
|
/**
|
|
1576
1576
|
* Возвращает содержимое корзины указанного клиента.
|
|
1577
1577
|
*
|
|
@@ -1685,8 +1685,8 @@ class Bt extends h {
|
|
|
1685
1685
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
var
|
|
1689
|
-
class
|
|
1688
|
+
var lt = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(lt || {}), ut = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(ut || {}), pt = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(pt || {});
|
|
1689
|
+
class a extends te {
|
|
1690
1690
|
/**
|
|
1691
1691
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1692
1692
|
*
|
|
@@ -1703,10 +1703,10 @@ class q extends me {
|
|
|
1703
1703
|
* Список продуктов категории.
|
|
1704
1704
|
*/
|
|
1705
1705
|
t(this, "products");
|
|
1706
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1706
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new a(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new I(o));
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
|
-
class
|
|
1709
|
+
class fr {
|
|
1710
1710
|
/**
|
|
1711
1711
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1712
1712
|
*
|
|
@@ -1724,7 +1724,7 @@ class mr {
|
|
|
1724
1724
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1725
1725
|
}
|
|
1726
1726
|
}
|
|
1727
|
-
class
|
|
1727
|
+
class q extends R {
|
|
1728
1728
|
}
|
|
1729
1729
|
class Be extends k {
|
|
1730
1730
|
/**
|
|
@@ -1754,12 +1754,12 @@ class Be extends k {
|
|
|
1754
1754
|
* @inheritDoc
|
|
1755
1755
|
*/
|
|
1756
1756
|
t(this, "isRegionalDirector");
|
|
1757
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1757
|
+
this.salesDirection = e != null && e.salesDirection ? new q(e.salesDirection) : new q(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new fr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
1760
|
class ze extends R {
|
|
1761
1761
|
}
|
|
1762
|
-
class
|
|
1762
|
+
class yr extends k {
|
|
1763
1763
|
/**
|
|
1764
1764
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1765
1765
|
*
|
|
@@ -1819,10 +1819,10 @@ class fe extends Be {
|
|
|
1819
1819
|
* Список направлений кураторства.
|
|
1820
1820
|
*/
|
|
1821
1821
|
t(this, "curatedDirections");
|
|
1822
|
-
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
|
|
1822
|
+
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 yr(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new ze(i))) ?? [];
|
|
1823
1823
|
}
|
|
1824
1824
|
}
|
|
1825
|
-
class
|
|
1825
|
+
class ht extends te {
|
|
1826
1826
|
/**
|
|
1827
1827
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1828
1828
|
*
|
|
@@ -1853,7 +1853,7 @@ class ut extends me {
|
|
|
1853
1853
|
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 fe(e.manager) : void 0;
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
|
-
class ve extends
|
|
1856
|
+
class ve extends ht {
|
|
1857
1857
|
/**
|
|
1858
1858
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1859
1859
|
*
|
|
@@ -1873,7 +1873,7 @@ class ve extends ut {
|
|
|
1873
1873
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ve(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new M(o));
|
|
1874
1874
|
}
|
|
1875
1875
|
}
|
|
1876
|
-
class
|
|
1876
|
+
class wr {
|
|
1877
1877
|
/**
|
|
1878
1878
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1879
1879
|
*
|
|
@@ -1891,7 +1891,7 @@ class yr {
|
|
|
1891
1891
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
|
-
class Se extends
|
|
1894
|
+
class Se extends wr {
|
|
1895
1895
|
/**
|
|
1896
1896
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1897
1897
|
*
|
|
@@ -1903,7 +1903,7 @@ class Se extends yr {
|
|
|
1903
1903
|
* Базовые данные о продукте.
|
|
1904
1904
|
*/
|
|
1905
1905
|
t(this, "productCategory");
|
|
1906
|
-
this.productCategory = new
|
|
1906
|
+
this.productCategory = new te(e == null ? void 0 : e.productCategory);
|
|
1907
1907
|
}
|
|
1908
1908
|
}
|
|
1909
1909
|
class We extends k {
|
|
@@ -1926,12 +1926,12 @@ class We extends k {
|
|
|
1926
1926
|
* @inheritDoc
|
|
1927
1927
|
*/
|
|
1928
1928
|
t(this, "curatedDirection");
|
|
1929
|
-
this.photo = e.photo, this.contacts = new
|
|
1929
|
+
this.photo = e.photo, this.contacts = new fr(e.contacts), this.curatedDirection = new ze(e.curatedDirection);
|
|
1930
1930
|
}
|
|
1931
1931
|
}
|
|
1932
|
-
class
|
|
1932
|
+
class Z extends R {
|
|
1933
1933
|
}
|
|
1934
|
-
class
|
|
1934
|
+
class pe extends R {
|
|
1935
1935
|
/**
|
|
1936
1936
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1937
1937
|
*
|
|
@@ -1942,8 +1942,8 @@ class ue extends R {
|
|
|
1942
1942
|
/**
|
|
1943
1943
|
* Данные о стране, в которой расположен регион.
|
|
1944
1944
|
*/
|
|
1945
|
-
t(this, "country", new
|
|
1946
|
-
e && (this.country = new
|
|
1945
|
+
t(this, "country", new Z());
|
|
1946
|
+
e && (this.country = new Z(e.country));
|
|
1947
1947
|
}
|
|
1948
1948
|
}
|
|
1949
1949
|
class Ae extends R {
|
|
@@ -1957,11 +1957,11 @@ class Ae extends R {
|
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Данные о регионе, в котором расположен город.
|
|
1959
1959
|
*/
|
|
1960
|
-
t(this, "region", new
|
|
1961
|
-
e && (this.region = new
|
|
1960
|
+
t(this, "region", new pe());
|
|
1961
|
+
e && (this.region = new pe(e.region));
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
class
|
|
1964
|
+
class vr extends k {
|
|
1965
1965
|
/**
|
|
1966
1966
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1967
1967
|
*
|
|
@@ -1997,10 +1997,10 @@ class wr extends k {
|
|
|
1997
1997
|
* Признак активности учетной записи пользователя.
|
|
1998
1998
|
*/
|
|
1999
1999
|
t(this, "isActive");
|
|
2000
|
-
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
|
|
2000
|
+
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new q(e.salesDirection) : void 0, this.createdAt = 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;
|
|
2001
2001
|
}
|
|
2002
2002
|
}
|
|
2003
|
-
class
|
|
2003
|
+
class se extends vr {
|
|
2004
2004
|
/**
|
|
2005
2005
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2006
2006
|
*
|
|
@@ -2046,10 +2046,10 @@ class re extends wr {
|
|
|
2046
2046
|
* @inheritDoc
|
|
2047
2047
|
*/
|
|
2048
2048
|
t(this, "curators");
|
|
2049
|
-
this.salesDirection = new
|
|
2049
|
+
this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ae(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
|
|
2050
2050
|
}
|
|
2051
2051
|
}
|
|
2052
|
-
class
|
|
2052
|
+
class oe extends re {
|
|
2053
2053
|
/**
|
|
2054
2054
|
* Инициализирует новый экземпляр класса.
|
|
2055
2055
|
*
|
|
@@ -2073,10 +2073,10 @@ class ie extends ee {
|
|
|
2073
2073
|
* Данные шаблона прайс-листа.
|
|
2074
2074
|
*/
|
|
2075
2075
|
t(this, "priceTemplate");
|
|
2076
|
-
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
|
|
2076
|
+
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 se(e == null ? void 0 : e.client), this.priceTemplate = new K(e == null ? void 0 : e.priceTemplate);
|
|
2077
2077
|
}
|
|
2078
2078
|
}
|
|
2079
|
-
class ke extends
|
|
2079
|
+
class ke extends wr {
|
|
2080
2080
|
/**
|
|
2081
2081
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2082
2082
|
*
|
|
@@ -2091,9 +2091,9 @@ class ke extends yr {
|
|
|
2091
2091
|
this.product = new I(e == null ? void 0 : e.product);
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
class
|
|
2094
|
+
class Cr extends R {
|
|
2095
2095
|
}
|
|
2096
|
-
class
|
|
2096
|
+
class Q extends k {
|
|
2097
2097
|
/**
|
|
2098
2098
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2099
2099
|
*
|
|
@@ -2113,7 +2113,11 @@ class ne extends k {
|
|
|
2113
2113
|
* Дополнительные метаданные свойства.
|
|
2114
2114
|
*/
|
|
2115
2115
|
t(this, "metadata");
|
|
2116
|
-
|
|
2116
|
+
/**
|
|
2117
|
+
* Признак того, что по свойству может производиться фильтрация в каталоге.
|
|
2118
|
+
*/
|
|
2119
|
+
t(this, "isFilterable");
|
|
2120
|
+
this.type = new Cr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
|
|
2117
2121
|
}
|
|
2118
2122
|
}
|
|
2119
2123
|
class V {
|
|
@@ -2132,10 +2136,10 @@ class V {
|
|
|
2132
2136
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2133
2137
|
*/
|
|
2134
2138
|
t(this, "value");
|
|
2135
|
-
this.property = new
|
|
2139
|
+
this.property = new Q(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2136
2140
|
}
|
|
2137
2141
|
}
|
|
2138
|
-
class
|
|
2142
|
+
class $ {
|
|
2139
2143
|
/**
|
|
2140
2144
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
2141
2145
|
*
|
|
@@ -2153,7 +2157,7 @@ class T {
|
|
|
2153
2157
|
this.from = v(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = v(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
2154
2158
|
}
|
|
2155
2159
|
}
|
|
2156
|
-
class
|
|
2160
|
+
class Et {
|
|
2157
2161
|
/**
|
|
2158
2162
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2159
2163
|
*
|
|
@@ -2175,12 +2179,12 @@ class zt {
|
|
|
2175
2179
|
/**
|
|
2176
2180
|
* Период создания.
|
|
2177
2181
|
*/
|
|
2178
|
-
t(this, "createdAt", new
|
|
2182
|
+
t(this, "createdAt", new $());
|
|
2179
2183
|
/**
|
|
2180
2184
|
* Период изменения.
|
|
2181
2185
|
*/
|
|
2182
|
-
t(this, "updatedAt", new
|
|
2183
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new
|
|
2186
|
+
t(this, "updatedAt", new $());
|
|
2187
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new $(r == null ? void 0 : r.createdAt), this.updatedAt = new $(r == null ? void 0 : r.updatedAt);
|
|
2184
2188
|
}
|
|
2185
2189
|
/**
|
|
2186
2190
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -2213,11 +2217,11 @@ class zt {
|
|
|
2213
2217
|
return Object.keys(this).forEach((c) => {
|
|
2214
2218
|
const u = this[c];
|
|
2215
2219
|
// eslint-disable-next-line prettier/prettier
|
|
2216
|
-
|
|
2220
|
+
T(u) || v(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2217
2221
|
}), !((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;
|
|
2218
2222
|
}
|
|
2219
2223
|
}
|
|
2220
|
-
class
|
|
2224
|
+
class ce extends k {
|
|
2221
2225
|
/**
|
|
2222
2226
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2223
2227
|
*
|
|
@@ -2271,10 +2275,65 @@ class Ye {
|
|
|
2271
2275
|
* Минимальный коэффициент цены.
|
|
2272
2276
|
*/
|
|
2273
2277
|
t(this, "minCoefficient");
|
|
2274
|
-
this.role = new
|
|
2278
|
+
this.role = new ce(r == null ? void 0 : r.role), this.category = new te(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2275
2279
|
}
|
|
2276
2280
|
}
|
|
2277
|
-
class
|
|
2281
|
+
class gt {
|
|
2282
|
+
/**
|
|
2283
|
+
* Инициализирует экземпляр класса {@link FilterSettings}.
|
|
2284
|
+
*
|
|
2285
|
+
* Значения по умолчанию заданы намеренно: API не возвращает поля, значения которых совпадают
|
|
2286
|
+
* с настройками по умолчанию, поэтому отсутствующее поле означает значение по умолчанию.
|
|
2287
|
+
*
|
|
2288
|
+
* @param data Данные для первоначальной инициализации.
|
|
2289
|
+
*/
|
|
2290
|
+
constructor(r) {
|
|
2291
|
+
/**
|
|
2292
|
+
* @inheritDoc
|
|
2293
|
+
*/
|
|
2294
|
+
t(this, "isFake");
|
|
2295
|
+
/**
|
|
2296
|
+
* @inheritDoc
|
|
2297
|
+
*/
|
|
2298
|
+
t(this, "isHidden");
|
|
2299
|
+
/**
|
|
2300
|
+
* @inheritDoc
|
|
2301
|
+
*/
|
|
2302
|
+
t(this, "isMultiple");
|
|
2303
|
+
/**
|
|
2304
|
+
* @inheritDoc
|
|
2305
|
+
*/
|
|
2306
|
+
t(this, "type");
|
|
2307
|
+
/**
|
|
2308
|
+
* @inheritDoc
|
|
2309
|
+
*/
|
|
2310
|
+
t(this, "ord");
|
|
2311
|
+
this.isFake = (r == null ? void 0 : r.isFake) ?? !1, this.isHidden = (r == null ? void 0 : r.isHidden) ?? !1, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.type = (r == null ? void 0 : r.type) ?? null, this.ord = (r == null ? void 0 : r.ord) ?? 0;
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
class Xe {
|
|
2315
|
+
/**
|
|
2316
|
+
* Инициализирует экземпляр класса {@link CategoryFilterSetting}.
|
|
2317
|
+
*
|
|
2318
|
+
* @param data Данные для первоначальной инициализации.
|
|
2319
|
+
*/
|
|
2320
|
+
constructor(r) {
|
|
2321
|
+
/**
|
|
2322
|
+
* @inheritDoc
|
|
2323
|
+
*/
|
|
2324
|
+
t(this, "category");
|
|
2325
|
+
/**
|
|
2326
|
+
* @inheritDoc
|
|
2327
|
+
*/
|
|
2328
|
+
t(this, "property");
|
|
2329
|
+
/**
|
|
2330
|
+
* @inheritDoc
|
|
2331
|
+
*/
|
|
2332
|
+
t(this, "settings");
|
|
2333
|
+
this.category = new te(r == null ? void 0 : r.category), this.property = new Q(r == null ? void 0 : r.property), this.settings = new gt(r == null ? void 0 : r.settings);
|
|
2334
|
+
}
|
|
2335
|
+
}
|
|
2336
|
+
class Vt extends h {
|
|
2278
2337
|
/**
|
|
2279
2338
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2280
2339
|
*
|
|
@@ -2305,7 +2364,7 @@ class Wt extends h {
|
|
|
2305
2364
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2306
2365
|
}
|
|
2307
2366
|
}
|
|
2308
|
-
class
|
|
2367
|
+
class Kt extends h {
|
|
2309
2368
|
/**
|
|
2310
2369
|
* Импортирует цены клиента из CSV файла.
|
|
2311
2370
|
*
|
|
@@ -2504,7 +2563,7 @@ class Jt extends h {
|
|
|
2504
2563
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2505
2564
|
}
|
|
2506
2565
|
}
|
|
2507
|
-
class
|
|
2566
|
+
class Qt extends h {
|
|
2508
2567
|
/**
|
|
2509
2568
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2510
2569
|
*
|
|
@@ -2516,7 +2575,7 @@ class Et extends h {
|
|
|
2516
2575
|
return this.get(
|
|
2517
2576
|
`/internal/clients/${r}/price/templates`,
|
|
2518
2577
|
{},
|
|
2519
|
-
(e) => e.data.map((s) => new
|
|
2578
|
+
(e) => e.data.map((s) => new oe(s))
|
|
2520
2579
|
);
|
|
2521
2580
|
}
|
|
2522
2581
|
/**
|
|
@@ -2527,7 +2586,7 @@ class Et extends h {
|
|
|
2527
2586
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2528
2587
|
*/
|
|
2529
2588
|
getActiveTemplate(r) {
|
|
2530
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2589
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new oe(e.data), !0);
|
|
2531
2590
|
}
|
|
2532
2591
|
/**
|
|
2533
2592
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2543,10 +2602,10 @@ class Et extends h {
|
|
|
2543
2602
|
return this.post(
|
|
2544
2603
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2545
2604
|
s && {
|
|
2546
|
-
startAt: s.startAt &&
|
|
2547
|
-
endAt: s.endAt &&
|
|
2605
|
+
startAt: s.startAt && O(s.startAt, i),
|
|
2606
|
+
endAt: s.endAt && O(s.endAt, i)
|
|
2548
2607
|
},
|
|
2549
|
-
(o) => new
|
|
2608
|
+
(o) => new oe(o.data),
|
|
2550
2609
|
{},
|
|
2551
2610
|
!0
|
|
2552
2611
|
);
|
|
@@ -2577,10 +2636,10 @@ class Et extends h {
|
|
|
2577
2636
|
return this.patch(
|
|
2578
2637
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2579
2638
|
i && {
|
|
2580
|
-
startAt: i.startAt &&
|
|
2581
|
-
endAt: i.endAt &&
|
|
2639
|
+
startAt: i.startAt && O(i.startAt, o),
|
|
2640
|
+
endAt: i.endAt && O(i.endAt, o)
|
|
2582
2641
|
},
|
|
2583
|
-
(c) => new
|
|
2642
|
+
(c) => new oe(c.data)
|
|
2584
2643
|
);
|
|
2585
2644
|
}
|
|
2586
2645
|
/**
|
|
@@ -2596,7 +2655,7 @@ class Et extends h {
|
|
|
2596
2655
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2597
2656
|
}
|
|
2598
2657
|
}
|
|
2599
|
-
class
|
|
2658
|
+
class Yt extends h {
|
|
2600
2659
|
/**
|
|
2601
2660
|
* Возвращает список данных о корневых категориях.
|
|
2602
2661
|
*
|
|
@@ -2610,7 +2669,7 @@ class Vt extends h {
|
|
|
2610
2669
|
{
|
|
2611
2670
|
showHidden: r
|
|
2612
2671
|
},
|
|
2613
|
-
(e) => e.data.map((s) => new
|
|
2672
|
+
(e) => e.data.map((s) => new a(s))
|
|
2614
2673
|
);
|
|
2615
2674
|
}
|
|
2616
2675
|
/**
|
|
@@ -2629,7 +2688,7 @@ class Vt extends h {
|
|
|
2629
2688
|
showHidden: e,
|
|
2630
2689
|
withNestedCategories: s
|
|
2631
2690
|
},
|
|
2632
|
-
(i) => new
|
|
2691
|
+
(i) => new a(i.data)
|
|
2633
2692
|
);
|
|
2634
2693
|
}
|
|
2635
2694
|
/**
|
|
@@ -2638,7 +2697,7 @@ class Vt extends h {
|
|
|
2638
2697
|
* @param categoryID Идентификатор категории продуктов.
|
|
2639
2698
|
*/
|
|
2640
2699
|
getPublicCategoryData(r) {
|
|
2641
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2700
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new a(e.data));
|
|
2642
2701
|
}
|
|
2643
2702
|
/**
|
|
2644
2703
|
* Возвращает список продуктов категории.
|
|
@@ -2656,7 +2715,7 @@ class Vt extends h {
|
|
|
2656
2715
|
showHidden: s,
|
|
2657
2716
|
withPriceCoefficients: e
|
|
2658
2717
|
},
|
|
2659
|
-
(i) =>
|
|
2718
|
+
(i) => ge(i.data, (o) => new I(o))
|
|
2660
2719
|
);
|
|
2661
2720
|
}
|
|
2662
2721
|
/**
|
|
@@ -2669,7 +2728,7 @@ class Vt extends h {
|
|
|
2669
2728
|
getCategoryProductsCoefficients(r) {
|
|
2670
2729
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2671
2730
|
const { data: s } = e;
|
|
2672
|
-
return
|
|
2731
|
+
return Fr(s, (i) => i.map((o) => new Me(o))), s;
|
|
2673
2732
|
});
|
|
2674
2733
|
}
|
|
2675
2734
|
/**
|
|
@@ -2681,14 +2740,14 @@ class Vt extends h {
|
|
|
2681
2740
|
publicSimpleSearch(r, e = 10) {
|
|
2682
2741
|
return new Promise((s, i) => {
|
|
2683
2742
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2684
|
-
s(o.categories.map((c) => new
|
|
2743
|
+
s(o.categories.map((c) => new a(c)));
|
|
2685
2744
|
}).catch((o) => {
|
|
2686
2745
|
i(o);
|
|
2687
2746
|
});
|
|
2688
2747
|
});
|
|
2689
2748
|
}
|
|
2690
2749
|
}
|
|
2691
|
-
class
|
|
2750
|
+
class Xt extends h {
|
|
2692
2751
|
/**
|
|
2693
2752
|
* Возвращает данные об указанном продукте.
|
|
2694
2753
|
*
|
|
@@ -2719,7 +2778,7 @@ class Kt extends h {
|
|
|
2719
2778
|
return this.get(
|
|
2720
2779
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2721
2780
|
{},
|
|
2722
|
-
(e) =>
|
|
2781
|
+
(e) => ge(e.data, (s) => new Me(s))
|
|
2723
2782
|
);
|
|
2724
2783
|
}
|
|
2725
2784
|
/**
|
|
@@ -2738,7 +2797,7 @@ class Kt extends h {
|
|
|
2738
2797
|
});
|
|
2739
2798
|
}
|
|
2740
2799
|
}
|
|
2741
|
-
class
|
|
2800
|
+
class Zt extends h {
|
|
2742
2801
|
/**
|
|
2743
2802
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2744
2803
|
*
|
|
@@ -2796,11 +2855,11 @@ class Qt extends h {
|
|
|
2796
2855
|
showHidden: i,
|
|
2797
2856
|
withPriceCoefficients: s
|
|
2798
2857
|
},
|
|
2799
|
-
(o) =>
|
|
2858
|
+
(o) => ge(o.data, (c) => new M(c))
|
|
2800
2859
|
);
|
|
2801
2860
|
}
|
|
2802
2861
|
}
|
|
2803
|
-
class
|
|
2862
|
+
class es extends h {
|
|
2804
2863
|
/**
|
|
2805
2864
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2806
2865
|
*
|
|
@@ -2822,7 +2881,7 @@ class Yt extends h {
|
|
|
2822
2881
|
}
|
|
2823
2882
|
}
|
|
2824
2883
|
var Je = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Je || {});
|
|
2825
|
-
class
|
|
2884
|
+
class Ze {
|
|
2826
2885
|
/**
|
|
2827
2886
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2828
2887
|
*
|
|
@@ -2853,9 +2912,9 @@ class Xe {
|
|
|
2853
2912
|
field: this.field,
|
|
2854
2913
|
op: this.op
|
|
2855
2914
|
};
|
|
2856
|
-
return
|
|
2857
|
-
from: this.value.from ?
|
|
2858
|
-
to: this.value.to ?
|
|
2915
|
+
return de(this.value) ? e.value = O(this.value, r) : He(this.value) ? e.value = {
|
|
2916
|
+
from: this.value.from ? O(this.value.from, r) : null,
|
|
2917
|
+
to: this.value.to ? O(this.value.to, r) : null
|
|
2859
2918
|
} : e.value = this.value, e;
|
|
2860
2919
|
}
|
|
2861
2920
|
}
|
|
@@ -2879,7 +2938,7 @@ class j {
|
|
|
2879
2938
|
*/
|
|
2880
2939
|
t(this, "groups");
|
|
2881
2940
|
var e, s;
|
|
2882
|
-
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
|
|
2941
|
+
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 Ze(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new j(i))) ?? [];
|
|
2883
2942
|
}
|
|
2884
2943
|
/**
|
|
2885
2944
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2889,7 +2948,7 @@ class j {
|
|
|
2889
2948
|
toPrimitive() {
|
|
2890
2949
|
return {
|
|
2891
2950
|
groupOp: this.groupOp,
|
|
2892
|
-
filters: this.filters.map((r) => r instanceof
|
|
2951
|
+
filters: this.filters.map((r) => r instanceof Ze && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2893
2952
|
groups: this.groups.map((r) => r instanceof j ? r.toPrimitive() : r)
|
|
2894
2953
|
};
|
|
2895
2954
|
}
|
|
@@ -2912,10 +2971,10 @@ class De extends h {
|
|
|
2912
2971
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2913
2972
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2914
2973
|
};
|
|
2915
|
-
return e && (m.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())),
|
|
2974
|
+
return e && (m.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())), X(s) || (m.sort = H(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
|
|
2916
2975
|
}
|
|
2917
2976
|
}
|
|
2918
|
-
class
|
|
2977
|
+
class rs extends De {
|
|
2919
2978
|
/**
|
|
2920
2979
|
* Возвращает список шаблонов прайс-листа.
|
|
2921
2980
|
*
|
|
@@ -3115,18 +3174,18 @@ class Xt extends De {
|
|
|
3115
3174
|
return this.get(
|
|
3116
3175
|
`/internal/price/templates/${r}/clients`,
|
|
3117
3176
|
{},
|
|
3118
|
-
(e) => e.data.map((s) => new
|
|
3177
|
+
(e) => e.data.map((s) => new oe(s))
|
|
3119
3178
|
);
|
|
3120
3179
|
}
|
|
3121
3180
|
}
|
|
3122
|
-
class
|
|
3181
|
+
class ts extends h {
|
|
3123
3182
|
/**
|
|
3124
3183
|
* Возвращает список ролей ценообразования.
|
|
3125
3184
|
*
|
|
3126
3185
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3127
3186
|
*/
|
|
3128
3187
|
getRoles() {
|
|
3129
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3188
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ce(e)));
|
|
3130
3189
|
}
|
|
3131
3190
|
/**
|
|
3132
3191
|
* Добавляет новую роль ценообразования.
|
|
@@ -3136,7 +3195,7 @@ class Zt extends h {
|
|
|
3136
3195
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3137
3196
|
*/
|
|
3138
3197
|
createRole(r) {
|
|
3139
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3198
|
+
return this.post("/internal/price/roles", r, (e) => new ce(e.data));
|
|
3140
3199
|
}
|
|
3141
3200
|
/**
|
|
3142
3201
|
* Возвращает данные роли ценообразования.
|
|
@@ -3146,7 +3205,7 @@ class Zt extends h {
|
|
|
3146
3205
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3147
3206
|
*/
|
|
3148
3207
|
getRole(r) {
|
|
3149
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3208
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new ce(e.data));
|
|
3150
3209
|
}
|
|
3151
3210
|
/**
|
|
3152
3211
|
* Обновляет данные роли ценообразования.
|
|
@@ -3157,7 +3216,7 @@ class Zt extends h {
|
|
|
3157
3216
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3158
3217
|
*/
|
|
3159
3218
|
updateRole(r, e) {
|
|
3160
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3219
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new ce(s.data));
|
|
3161
3220
|
}
|
|
3162
3221
|
/**
|
|
3163
3222
|
* Удаляет роль ценообразования.
|
|
@@ -3199,7 +3258,7 @@ class Zt extends h {
|
|
|
3199
3258
|
);
|
|
3200
3259
|
}
|
|
3201
3260
|
}
|
|
3202
|
-
class
|
|
3261
|
+
class ss extends De {
|
|
3203
3262
|
/**
|
|
3204
3263
|
* Возвращает пагинированный список свойств.
|
|
3205
3264
|
*
|
|
@@ -3212,7 +3271,7 @@ class es extends De {
|
|
|
3212
3271
|
getProperties(r, e, s) {
|
|
3213
3272
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3214
3273
|
const o = { ...i.data };
|
|
3215
|
-
return o.data = o.data.map((c) => new
|
|
3274
|
+
return o.data = o.data.map((c) => new Q(c)), o;
|
|
3216
3275
|
});
|
|
3217
3276
|
}
|
|
3218
3277
|
/**
|
|
@@ -3229,7 +3288,7 @@ class es extends De {
|
|
|
3229
3288
|
...s,
|
|
3230
3289
|
type: e
|
|
3231
3290
|
},
|
|
3232
|
-
(i) => new
|
|
3291
|
+
(i) => new Q(i.data)
|
|
3233
3292
|
);
|
|
3234
3293
|
}
|
|
3235
3294
|
/**
|
|
@@ -3239,7 +3298,7 @@ class es extends De {
|
|
|
3239
3298
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3240
3299
|
*/
|
|
3241
3300
|
getProperty(r) {
|
|
3242
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3301
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new Q(e.data));
|
|
3243
3302
|
}
|
|
3244
3303
|
/**
|
|
3245
3304
|
* Обновляет существующее свойство.
|
|
@@ -3256,7 +3315,7 @@ class es extends De {
|
|
|
3256
3315
|
...i,
|
|
3257
3316
|
type: s
|
|
3258
3317
|
},
|
|
3259
|
-
(o) => new
|
|
3318
|
+
(o) => new Q(o.data)
|
|
3260
3319
|
);
|
|
3261
3320
|
}
|
|
3262
3321
|
/**
|
|
@@ -3570,8 +3629,46 @@ class es extends De {
|
|
|
3570
3629
|
updateCategoryImage(r, e) {
|
|
3571
3630
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3572
3631
|
}
|
|
3632
|
+
/**
|
|
3633
|
+
* Возвращает список настроенных фильтров категории.
|
|
3634
|
+
*
|
|
3635
|
+
* @param categoryId Идентификатор категории.
|
|
3636
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_get_list
|
|
3637
|
+
*/
|
|
3638
|
+
getCategoryFilterSettings(r) {
|
|
3639
|
+
return this.get(
|
|
3640
|
+
`/internal/catalog/categories/${r}/filter-settings`,
|
|
3641
|
+
{},
|
|
3642
|
+
(e) => e.data.map((s) => new Xe(s))
|
|
3643
|
+
);
|
|
3644
|
+
}
|
|
3645
|
+
/**
|
|
3646
|
+
* Сохраняет настройки фильтра в категории.
|
|
3647
|
+
*
|
|
3648
|
+
* @param categoryId Идентификатор категории.
|
|
3649
|
+
* @param propertyId Идентификатор свойства.
|
|
3650
|
+
* @param settingsData Данные настроек фильтра.
|
|
3651
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_save
|
|
3652
|
+
*/
|
|
3653
|
+
saveCategoryFilterSetting(r, e, s) {
|
|
3654
|
+
return this.patch(
|
|
3655
|
+
`/internal/catalog/categories/${r}/filter-settings/${e}`,
|
|
3656
|
+
s,
|
|
3657
|
+
(i) => new Xe(i.data)
|
|
3658
|
+
);
|
|
3659
|
+
}
|
|
3660
|
+
/**
|
|
3661
|
+
* Удаляет настройки фильтра в категории, возвращая фильтру настройки по умолчанию.
|
|
3662
|
+
*
|
|
3663
|
+
* @param categoryId Идентификатор категории.
|
|
3664
|
+
* @param propertyId Идентификатор свойства.
|
|
3665
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_delete
|
|
3666
|
+
*/
|
|
3667
|
+
deleteCategoryFilterSetting(r, e) {
|
|
3668
|
+
return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
|
|
3669
|
+
}
|
|
3573
3670
|
}
|
|
3574
|
-
class
|
|
3671
|
+
class is extends h {
|
|
3575
3672
|
/**
|
|
3576
3673
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
3577
3674
|
*
|
|
@@ -3587,7 +3684,7 @@ class rs extends h {
|
|
|
3587
3684
|
priceTemplateId: r,
|
|
3588
3685
|
showHidden: e
|
|
3589
3686
|
},
|
|
3590
|
-
(s) => s.data.map((i) => new
|
|
3687
|
+
(s) => s.data.map((i) => new a(i))
|
|
3591
3688
|
);
|
|
3592
3689
|
}
|
|
3593
3690
|
/**
|
|
@@ -3608,7 +3705,7 @@ class rs extends h {
|
|
|
3608
3705
|
showHidden: s,
|
|
3609
3706
|
withNestedCategories: i
|
|
3610
3707
|
},
|
|
3611
|
-
(o) => new
|
|
3708
|
+
(o) => new a(o.data)
|
|
3612
3709
|
);
|
|
3613
3710
|
}
|
|
3614
3711
|
/**
|
|
@@ -3629,11 +3726,11 @@ class rs extends h {
|
|
|
3629
3726
|
showHidden: i,
|
|
3630
3727
|
withPriceCoefficients: s
|
|
3631
3728
|
},
|
|
3632
|
-
(o) =>
|
|
3729
|
+
(o) => ge(o.data, (c) => new I(c))
|
|
3633
3730
|
);
|
|
3634
3731
|
}
|
|
3635
3732
|
}
|
|
3636
|
-
function
|
|
3733
|
+
function er(n, r, e) {
|
|
3637
3734
|
let s;
|
|
3638
3735
|
return n.some((i) => {
|
|
3639
3736
|
if (i.type === e && i.id === r)
|
|
@@ -3642,29 +3739,29 @@ function Ze(n, r, e) {
|
|
|
3642
3739
|
return !1;
|
|
3643
3740
|
const o = i;
|
|
3644
3741
|
if (o.products && o.products.length > 0) {
|
|
3645
|
-
const c =
|
|
3742
|
+
const c = er(o.products, r, e);
|
|
3646
3743
|
if (c)
|
|
3647
3744
|
return s = c, !0;
|
|
3648
3745
|
}
|
|
3649
3746
|
if (o.categories && o.categories.length > 0) {
|
|
3650
|
-
const c =
|
|
3747
|
+
const c = er(o.categories, r, e);
|
|
3651
3748
|
if (c)
|
|
3652
3749
|
return s = c, !0;
|
|
3653
3750
|
}
|
|
3654
3751
|
return !1;
|
|
3655
3752
|
}), s;
|
|
3656
3753
|
}
|
|
3657
|
-
function
|
|
3754
|
+
function rr(n) {
|
|
3658
3755
|
const r = [];
|
|
3659
3756
|
return n.forEach((e) => {
|
|
3660
3757
|
if (r.push(e), e.type === "category") {
|
|
3661
3758
|
const s = e;
|
|
3662
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3759
|
+
s.products && s.products.length > 0 && r.push(...rr(s.products)), s.categories && s.categories.length > 0 && r.push(...rr(s.categories));
|
|
3663
3760
|
}
|
|
3664
3761
|
}), r;
|
|
3665
3762
|
}
|
|
3666
|
-
var
|
|
3667
|
-
class
|
|
3763
|
+
var mt = /* @__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))(mt || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
|
|
3764
|
+
class ae extends re {
|
|
3668
3765
|
/**
|
|
3669
3766
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3670
3767
|
*
|
|
@@ -3691,8 +3788,8 @@ class qe extends ee {
|
|
|
3691
3788
|
/**
|
|
3692
3789
|
* Данные о валюте.
|
|
3693
3790
|
*/
|
|
3694
|
-
t(this, "currency", new
|
|
3695
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3791
|
+
t(this, "currency", new _());
|
|
3792
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new _(e.currency));
|
|
3696
3793
|
}
|
|
3697
3794
|
}
|
|
3698
3795
|
class Ne extends k {
|
|
@@ -3762,9 +3859,9 @@ class B extends R {
|
|
|
3762
3859
|
});
|
|
3763
3860
|
}
|
|
3764
3861
|
}
|
|
3765
|
-
class
|
|
3862
|
+
class ee extends R {
|
|
3766
3863
|
}
|
|
3767
|
-
class
|
|
3864
|
+
class Rr extends k {
|
|
3768
3865
|
/**
|
|
3769
3866
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3770
3867
|
*
|
|
@@ -3780,7 +3877,7 @@ class Cr extends k {
|
|
|
3780
3877
|
/**
|
|
3781
3878
|
* Группа партнеров (направление деятельности).
|
|
3782
3879
|
*/
|
|
3783
|
-
t(this, "partnerGroup", new
|
|
3880
|
+
t(this, "partnerGroup", new ee());
|
|
3784
3881
|
/**
|
|
3785
3882
|
* Список контактных лиц контрагента.
|
|
3786
3883
|
*/
|
|
@@ -3814,7 +3911,7 @@ class Cr extends k {
|
|
|
3814
3911
|
*/
|
|
3815
3912
|
t(this, "updater");
|
|
3816
3913
|
if (e) {
|
|
3817
|
-
if (this.opf = new B(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
|
|
3914
|
+
if (this.opf = new B(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 ee(e.partnerGroup)), e.contacts) {
|
|
3818
3915
|
const s = [];
|
|
3819
3916
|
e.contacts.forEach((i) => {
|
|
3820
3917
|
s.push(new G(i));
|
|
@@ -3823,13 +3920,13 @@ class Cr extends k {
|
|
|
3823
3920
|
if (e.bankAccounts) {
|
|
3824
3921
|
const s = [];
|
|
3825
3922
|
e.bankAccounts.forEach((i) => {
|
|
3826
|
-
s.push(new
|
|
3923
|
+
s.push(new ae(i));
|
|
3827
3924
|
}), this.bankAccounts = s;
|
|
3828
3925
|
}
|
|
3829
3926
|
}
|
|
3830
3927
|
}
|
|
3831
3928
|
}
|
|
3832
|
-
class
|
|
3929
|
+
class ft extends Rr {
|
|
3833
3930
|
/**
|
|
3834
3931
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3835
3932
|
*
|
|
@@ -3839,7 +3936,7 @@ class ht extends Cr {
|
|
|
3839
3936
|
super(r);
|
|
3840
3937
|
}
|
|
3841
3938
|
}
|
|
3842
|
-
class
|
|
3939
|
+
class Pr extends Rr {
|
|
3843
3940
|
/**
|
|
3844
3941
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3845
3942
|
*
|
|
@@ -3882,7 +3979,7 @@ class Rr extends Cr {
|
|
|
3882
3979
|
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 ?? "");
|
|
3883
3980
|
}
|
|
3884
3981
|
}
|
|
3885
|
-
class
|
|
3982
|
+
class Ar extends Pr {
|
|
3886
3983
|
/**
|
|
3887
3984
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3888
3985
|
*
|
|
@@ -3897,7 +3994,7 @@ class Pr extends Rr {
|
|
|
3897
3994
|
e && (this.kpp = e.kpp ?? "");
|
|
3898
3995
|
}
|
|
3899
3996
|
}
|
|
3900
|
-
class
|
|
3997
|
+
class yt extends Ar {
|
|
3901
3998
|
/**
|
|
3902
3999
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3903
4000
|
*
|
|
@@ -3908,7 +4005,7 @@ class gt extends Pr {
|
|
|
3908
4005
|
/**
|
|
3909
4006
|
* Страна регистрации юридического лица нерезидента.
|
|
3910
4007
|
*/
|
|
3911
|
-
t(this, "registrationCountry", new
|
|
4008
|
+
t(this, "registrationCountry", new Z());
|
|
3912
4009
|
/**
|
|
3913
4010
|
* Регистрационный номер юридического лица нерезидента.
|
|
3914
4011
|
*/
|
|
@@ -3917,7 +4014,7 @@ class gt extends Pr {
|
|
|
3917
4014
|
* Налоговый номер юридического лица нерезидента.
|
|
3918
4015
|
*/
|
|
3919
4016
|
t(this, "taxNumber", "");
|
|
3920
|
-
e && (this.registrationCountry = new
|
|
4017
|
+
e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3921
4018
|
}
|
|
3922
4019
|
}
|
|
3923
4020
|
class Ce {
|
|
@@ -3929,17 +4026,17 @@ class Ce {
|
|
|
3929
4026
|
static createInstance(r) {
|
|
3930
4027
|
switch (r.opf.slug) {
|
|
3931
4028
|
case N.Ic:
|
|
3932
|
-
return new Rr(r);
|
|
3933
|
-
case N.UlR:
|
|
3934
4029
|
return new Pr(r);
|
|
4030
|
+
case N.UlR:
|
|
4031
|
+
return new Ar(r);
|
|
3935
4032
|
case N.UlNr:
|
|
3936
|
-
return new
|
|
4033
|
+
return new yt(r);
|
|
3937
4034
|
default:
|
|
3938
|
-
return new
|
|
4035
|
+
return new ft(r);
|
|
3939
4036
|
}
|
|
3940
4037
|
}
|
|
3941
4038
|
}
|
|
3942
|
-
class
|
|
4039
|
+
class wt extends ur {
|
|
3943
4040
|
/**
|
|
3944
4041
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
3945
4042
|
*
|
|
@@ -3954,7 +4051,7 @@ class mt extends lr {
|
|
|
3954
4051
|
this.deletedAt = v(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3955
4052
|
}
|
|
3956
4053
|
}
|
|
3957
|
-
class Re extends
|
|
4054
|
+
class Re extends wt {
|
|
3958
4055
|
/**
|
|
3959
4056
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3960
4057
|
*
|
|
@@ -3991,14 +4088,14 @@ class Re extends mt {
|
|
|
3991
4088
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3992
4089
|
*/
|
|
3993
4090
|
t(this, "isTransportCompanyAddress");
|
|
3994
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4091
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new hr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new G(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;
|
|
3995
4092
|
}
|
|
3996
4093
|
}
|
|
3997
|
-
class Ar extends R {
|
|
3998
|
-
}
|
|
3999
4094
|
class Dr extends R {
|
|
4000
4095
|
}
|
|
4001
|
-
class
|
|
4096
|
+
class $r extends R {
|
|
4097
|
+
}
|
|
4098
|
+
class tr extends se {
|
|
4002
4099
|
/**
|
|
4003
4100
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4004
4101
|
*
|
|
@@ -4048,7 +4145,7 @@ class rr extends re {
|
|
|
4048
4145
|
* @inheritDoc
|
|
4049
4146
|
*/
|
|
4050
4147
|
t(this, "extraData");
|
|
4051
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new
|
|
4148
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new G(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Re(u))) ?? [], this.channelPrimaryInterest = new Dr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new $r(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new U(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4052
4149
|
}
|
|
4053
4150
|
}
|
|
4054
4151
|
class Tr {
|
|
@@ -4060,12 +4157,12 @@ class Tr {
|
|
|
4060
4157
|
const r = {};
|
|
4061
4158
|
return Object.keys(this).forEach((e) => {
|
|
4062
4159
|
const s = this[e];
|
|
4063
|
-
|
|
4160
|
+
T(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4064
4161
|
v(s) && s.trim().length === 0 || Ue(s.isNewRec) && s.isNewRec() || (r[e] = s);
|
|
4065
4162
|
}), r;
|
|
4066
4163
|
}
|
|
4067
4164
|
}
|
|
4068
|
-
class
|
|
4165
|
+
class ns extends Tr {
|
|
4069
4166
|
/**
|
|
4070
4167
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4071
4168
|
*
|
|
@@ -4117,11 +4214,11 @@ class ts extends Tr {
|
|
|
4117
4214
|
/**
|
|
4118
4215
|
* @inheritDoc
|
|
4119
4216
|
*/
|
|
4120
|
-
t(this, "createdAt", new
|
|
4217
|
+
t(this, "createdAt", new $());
|
|
4121
4218
|
/**
|
|
4122
4219
|
* @inheritDoc
|
|
4123
4220
|
*/
|
|
4124
|
-
t(this, "lastLoginDate", new
|
|
4221
|
+
t(this, "lastLoginDate", new $());
|
|
4125
4222
|
/**
|
|
4126
4223
|
* @inheritDoc
|
|
4127
4224
|
*/
|
|
@@ -4173,12 +4270,12 @@ class ts extends Tr {
|
|
|
4173
4270
|
/**
|
|
4174
4271
|
* @inheritDoc
|
|
4175
4272
|
*/
|
|
4176
|
-
t(this, "noOrdersPeriod", new
|
|
4177
|
-
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new Ae(D)), this.region = new
|
|
4178
|
-
createdAt: new
|
|
4273
|
+
t(this, "noOrdersPeriod", new $());
|
|
4274
|
+
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new Ae(D)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new $(e == null ? void 0 : e.createdAt), this.lastLoginDate = new $(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((D) => new fe(D))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ne(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4275
|
+
createdAt: new $((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4179
4276
|
creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
|
|
4180
4277
|
isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
|
|
4181
|
-
}, this.noOrdersPeriod = new
|
|
4278
|
+
}, this.noOrdersPeriod = new $(e == null ? void 0 : e.noOrdersPeriod);
|
|
4182
4279
|
}
|
|
4183
4280
|
/**
|
|
4184
4281
|
* @inheritDoc
|
|
@@ -4189,7 +4286,7 @@ class ts extends Tr {
|
|
|
4189
4286
|
this.cities = [];
|
|
4190
4287
|
break;
|
|
4191
4288
|
case "region":
|
|
4192
|
-
this.region = new
|
|
4289
|
+
this.region = new pe();
|
|
4193
4290
|
break;
|
|
4194
4291
|
case "isActive":
|
|
4195
4292
|
this.isActive = !0;
|
|
@@ -4242,7 +4339,7 @@ class ts extends Tr {
|
|
|
4242
4339
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
|
|
4243
4340
|
}
|
|
4244
4341
|
}
|
|
4245
|
-
class
|
|
4342
|
+
class br extends re {
|
|
4246
4343
|
/**
|
|
4247
4344
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4248
4345
|
*
|
|
@@ -4262,10 +4359,10 @@ class $r extends ee {
|
|
|
4262
4359
|
* @inheritDoc
|
|
4263
4360
|
*/
|
|
4264
4361
|
t(this, "isApproved1c");
|
|
4265
|
-
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4362
|
+
this.createdAt = v(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new d(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4266
4363
|
}
|
|
4267
4364
|
}
|
|
4268
|
-
class
|
|
4365
|
+
class vt extends k {
|
|
4269
4366
|
/**
|
|
4270
4367
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4271
4368
|
*
|
|
@@ -4302,10 +4399,10 @@ class ft extends k {
|
|
|
4302
4399
|
* @inheritDoc
|
|
4303
4400
|
*/
|
|
4304
4401
|
t(this, "curators");
|
|
4305
|
-
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new
|
|
4402
|
+
this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new br(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
|
|
4306
4403
|
}
|
|
4307
4404
|
}
|
|
4308
|
-
class Ie extends
|
|
4405
|
+
class Ie extends re {
|
|
4309
4406
|
/**
|
|
4310
4407
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4311
4408
|
*
|
|
@@ -4320,7 +4417,7 @@ class Ie extends ee {
|
|
|
4320
4417
|
this.isPrimary = e.isPrimary;
|
|
4321
4418
|
}
|
|
4322
4419
|
}
|
|
4323
|
-
class
|
|
4420
|
+
class Ct extends G {
|
|
4324
4421
|
/**
|
|
4325
4422
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4326
4423
|
*
|
|
@@ -4348,7 +4445,7 @@ class yt extends G {
|
|
|
4348
4445
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
|
|
4349
4446
|
}
|
|
4350
4447
|
}
|
|
4351
|
-
class
|
|
4448
|
+
class x extends De {
|
|
4352
4449
|
/**
|
|
4353
4450
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4354
4451
|
*
|
|
@@ -4487,7 +4584,7 @@ class d extends De {
|
|
|
4487
4584
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4488
4585
|
*/
|
|
4489
4586
|
getClient(r) {
|
|
4490
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4587
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new tr(e.data));
|
|
4491
4588
|
}
|
|
4492
4589
|
/**
|
|
4493
4590
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4509,7 +4606,7 @@ class d extends De {
|
|
|
4509
4606
|
i,
|
|
4510
4607
|
(c) => {
|
|
4511
4608
|
const u = { ...c.data };
|
|
4512
|
-
return u.data = u.data.map((p) => new
|
|
4609
|
+
return u.data = u.data.map((p) => new se(p)), u;
|
|
4513
4610
|
},
|
|
4514
4611
|
void 0,
|
|
4515
4612
|
o
|
|
@@ -4549,7 +4646,7 @@ class d extends De {
|
|
|
4549
4646
|
const s = r.map((i) => i.id);
|
|
4550
4647
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4551
4648
|
let o = [];
|
|
4552
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4649
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new vt(c))), o;
|
|
4553
4650
|
});
|
|
4554
4651
|
}
|
|
4555
4652
|
/**
|
|
@@ -4561,7 +4658,7 @@ class d extends De {
|
|
|
4561
4658
|
getAllClientContacts(r) {
|
|
4562
4659
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4563
4660
|
let s = [];
|
|
4564
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4661
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new Ct(i))), s;
|
|
4565
4662
|
});
|
|
4566
4663
|
}
|
|
4567
4664
|
/**
|
|
@@ -4572,7 +4669,7 @@ class d extends De {
|
|
|
4572
4669
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4573
4670
|
*/
|
|
4574
4671
|
createClientCommonData(r, e = {}) {
|
|
4575
|
-
return this.post("/internal/clients",
|
|
4672
|
+
return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new tr(s.data), e);
|
|
4576
4673
|
}
|
|
4577
4674
|
/**
|
|
4578
4675
|
* Обновляет данные указанного клиента.
|
|
@@ -4582,7 +4679,7 @@ class d extends De {
|
|
|
4582
4679
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4583
4680
|
*/
|
|
4584
4681
|
updateClientCommonData(r, e = {}) {
|
|
4585
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
4682
|
+
return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
|
|
4586
4683
|
}
|
|
4587
4684
|
/**
|
|
4588
4685
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -4711,7 +4808,7 @@ class d extends De {
|
|
|
4711
4808
|
createContragentClientData(r, e, s = {}) {
|
|
4712
4809
|
return this.post(
|
|
4713
4810
|
`/internal/clients/${r}/contragents`,
|
|
4714
|
-
|
|
4811
|
+
x.transformContragentClientDataToRequest(e),
|
|
4715
4812
|
(i) => Ce.createInstance(i.data),
|
|
4716
4813
|
s
|
|
4717
4814
|
);
|
|
@@ -4727,7 +4824,7 @@ class d extends De {
|
|
|
4727
4824
|
updateContragentClientData(r, e, s = {}) {
|
|
4728
4825
|
return this.patch(
|
|
4729
4826
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4730
|
-
|
|
4827
|
+
x.transformContragentClientDataToRequest(e),
|
|
4731
4828
|
(i) => Ce.createInstance(i.data),
|
|
4732
4829
|
s
|
|
4733
4830
|
);
|
|
@@ -4753,7 +4850,7 @@ class d extends De {
|
|
|
4753
4850
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4754
4851
|
return this.post(
|
|
4755
4852
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4756
|
-
|
|
4853
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4757
4854
|
(i) => new Re(i.data),
|
|
4758
4855
|
s
|
|
4759
4856
|
);
|
|
@@ -4769,7 +4866,7 @@ class d extends De {
|
|
|
4769
4866
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4770
4867
|
return this.patch(
|
|
4771
4868
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4772
|
-
|
|
4869
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4773
4870
|
(i) => new Re(i.data),
|
|
4774
4871
|
s
|
|
4775
4872
|
);
|
|
@@ -4796,8 +4893,8 @@ class d extends De {
|
|
|
4796
4893
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4797
4894
|
return this.post(
|
|
4798
4895
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4799
|
-
|
|
4800
|
-
(o) => new
|
|
4896
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4897
|
+
(o) => new ae(o.data),
|
|
4801
4898
|
i
|
|
4802
4899
|
);
|
|
4803
4900
|
}
|
|
@@ -4813,8 +4910,8 @@ class d extends De {
|
|
|
4813
4910
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4814
4911
|
return this.patch(
|
|
4815
4912
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4816
|
-
|
|
4817
|
-
(o) => new
|
|
4913
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4914
|
+
(o) => new ae(o.data),
|
|
4818
4915
|
i
|
|
4819
4916
|
);
|
|
4820
4917
|
}
|
|
@@ -5036,7 +5133,7 @@ class d extends De {
|
|
|
5036
5133
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5037
5134
|
}
|
|
5038
5135
|
}
|
|
5039
|
-
class
|
|
5136
|
+
class os extends h {
|
|
5040
5137
|
/**
|
|
5041
5138
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5042
5139
|
*
|
|
@@ -5050,7 +5147,7 @@ class ss extends h {
|
|
|
5050
5147
|
});
|
|
5051
5148
|
}
|
|
5052
5149
|
}
|
|
5053
|
-
class
|
|
5150
|
+
class cs {
|
|
5054
5151
|
/**
|
|
5055
5152
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5056
5153
|
*
|
|
@@ -5072,8 +5169,8 @@ class is {
|
|
|
5072
5169
|
this.date = v(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
5073
5170
|
}
|
|
5074
5171
|
}
|
|
5075
|
-
var
|
|
5076
|
-
class
|
|
5172
|
+
var Rt = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Rt || {});
|
|
5173
|
+
class ls extends h {
|
|
5077
5174
|
/**
|
|
5078
5175
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5079
5176
|
*
|
|
@@ -5164,7 +5261,7 @@ class ns extends h {
|
|
|
5164
5261
|
});
|
|
5165
5262
|
}
|
|
5166
5263
|
}
|
|
5167
|
-
class
|
|
5264
|
+
class Pt {
|
|
5168
5265
|
/**
|
|
5169
5266
|
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
5170
5267
|
*
|
|
@@ -5182,7 +5279,7 @@ class vt {
|
|
|
5182
5279
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5183
5280
|
}
|
|
5184
5281
|
}
|
|
5185
|
-
class
|
|
5282
|
+
class us extends Pt {
|
|
5186
5283
|
/**
|
|
5187
5284
|
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5188
5285
|
*
|
|
@@ -5213,7 +5310,7 @@ class os extends vt {
|
|
|
5213
5310
|
this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
|
|
5214
5311
|
}
|
|
5215
5312
|
}
|
|
5216
|
-
class
|
|
5313
|
+
class ps {
|
|
5217
5314
|
/**
|
|
5218
5315
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5219
5316
|
*
|
|
@@ -5231,22 +5328,22 @@ class cs {
|
|
|
5231
5328
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
5232
5329
|
}
|
|
5233
5330
|
}
|
|
5234
|
-
class
|
|
5331
|
+
class hs {
|
|
5235
5332
|
/**
|
|
5236
5333
|
* Возвращает диапазон дат по умолчанию.
|
|
5237
5334
|
*/
|
|
5238
5335
|
static defaultDateRanges() {
|
|
5239
|
-
const r =
|
|
5336
|
+
const r = jr(/* @__PURE__ */ new Date(), 1);
|
|
5240
5337
|
return {
|
|
5241
5338
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5242
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5243
|
-
today: { label: "Сегодня", from:
|
|
5244
|
-
yesterday: { label: "Вчера", from:
|
|
5245
|
-
tomorrow: { label: "Завтра", from:
|
|
5339
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Vr(r), to: Er(r) },
|
|
5340
|
+
today: { label: "Сегодня", from: _e(), to: Jr() },
|
|
5341
|
+
yesterday: { label: "Вчера", from: Wr(), to: zr() },
|
|
5342
|
+
tomorrow: { label: "Завтра", from: Br(), to: Gr() }
|
|
5246
5343
|
};
|
|
5247
5344
|
}
|
|
5248
5345
|
}
|
|
5249
|
-
class
|
|
5346
|
+
class Sr {
|
|
5250
5347
|
/**
|
|
5251
5348
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5252
5349
|
*
|
|
@@ -5262,7 +5359,7 @@ class br {
|
|
|
5262
5359
|
*/
|
|
5263
5360
|
static getProductMultiplicity(r) {
|
|
5264
5361
|
var e, s;
|
|
5265
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5362
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !Sr.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5266
5363
|
}
|
|
5267
5364
|
/**
|
|
5268
5365
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5274,7 +5371,7 @@ class br {
|
|
|
5274
5371
|
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;
|
|
5275
5372
|
}
|
|
5276
5373
|
}
|
|
5277
|
-
const
|
|
5374
|
+
const Y = class Y extends h {
|
|
5278
5375
|
/**
|
|
5279
5376
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5280
5377
|
*/
|
|
@@ -5294,7 +5391,7 @@ const Q = class Q extends h {
|
|
|
5294
5391
|
*/
|
|
5295
5392
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5296
5393
|
static getCachedResponse(e) {
|
|
5297
|
-
const s =
|
|
5394
|
+
const s = Y.responseDataCache.get(e);
|
|
5298
5395
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
5299
5396
|
return s.val;
|
|
5300
5397
|
}
|
|
@@ -5305,8 +5402,8 @@ const Q = class Q extends h {
|
|
|
5305
5402
|
* @param data Данные для кэширования.
|
|
5306
5403
|
*/
|
|
5307
5404
|
cacheResponse(e, s) {
|
|
5308
|
-
|
|
5309
|
-
validTo:
|
|
5405
|
+
Y.responseDataCache.set(e, {
|
|
5406
|
+
validTo: Kr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5310
5407
|
val: s
|
|
5311
5408
|
});
|
|
5312
5409
|
}
|
|
@@ -5321,7 +5418,7 @@ const Q = class Q extends h {
|
|
|
5321
5418
|
*/
|
|
5322
5419
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5323
5420
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5324
|
-
const c = s + (
|
|
5421
|
+
const c = s + (X(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? Y.getCachedResponse(c) : void 0;
|
|
5325
5422
|
return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
|
|
5326
5423
|
const m = p.map((f) => Ge.instanceInitializer(e, f));
|
|
5327
5424
|
return i && m && this.cacheResponse(s, m), m;
|
|
@@ -5331,13 +5428,13 @@ const Q = class Q extends h {
|
|
|
5331
5428
|
/**
|
|
5332
5429
|
* Кэш результатов запросов.
|
|
5333
5430
|
*/
|
|
5334
|
-
t(
|
|
5335
|
-
let
|
|
5336
|
-
function
|
|
5431
|
+
t(Y, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5432
|
+
let he = Y;
|
|
5433
|
+
function gs(n, r) {
|
|
5337
5434
|
const e = [2, 0, 1, 1, 1, 2];
|
|
5338
5435
|
return r[n % 100 > 4 && n % 100 < 20 ? 2 : e[Math.min(n % 10, 5)]];
|
|
5339
5436
|
}
|
|
5340
|
-
class
|
|
5437
|
+
class ms {
|
|
5341
5438
|
/**
|
|
5342
5439
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5343
5440
|
*/
|
|
@@ -5353,19 +5450,19 @@ class ps {
|
|
|
5353
5450
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5354
5451
|
}
|
|
5355
5452
|
}
|
|
5356
|
-
class
|
|
5453
|
+
class At extends he {
|
|
5357
5454
|
/**
|
|
5358
5455
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5359
5456
|
*/
|
|
5360
5457
|
async getManagers() {
|
|
5361
|
-
const r = "/internal/managers", e =
|
|
5458
|
+
const r = "/internal/managers", e = he.getCachedResponse(r);
|
|
5362
5459
|
if (e)
|
|
5363
5460
|
return e;
|
|
5364
5461
|
const i = (await this.get(r)).data.map((o) => Ge.instanceInitializer(fe, o));
|
|
5365
5462
|
return this.cacheResponse(r, i), i;
|
|
5366
5463
|
}
|
|
5367
5464
|
}
|
|
5368
|
-
class
|
|
5465
|
+
class kr extends br {
|
|
5369
5466
|
/**
|
|
5370
5467
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5371
5468
|
*
|
|
@@ -5422,7 +5519,7 @@ class Sr extends $r {
|
|
|
5422
5519
|
* @inheritDoc
|
|
5423
5520
|
*/
|
|
5424
5521
|
t(this, "isLargeOrder");
|
|
5425
|
-
this.client = new
|
|
5522
|
+
this.client = new se(e == null ? void 0 : e.client), this.payment = {
|
|
5426
5523
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5427
5524
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5428
5525
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
@@ -5430,15 +5527,15 @@ class Sr extends $r {
|
|
|
5430
5527
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5431
5528
|
date: v((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5432
5529
|
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
|
|
5433
|
-
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new
|
|
5434
|
-
}, this.attachedUser = e != null && e.attachedUser ? new
|
|
5530
|
+
warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
|
|
5531
|
+
}, this.attachedUser = e != null && e.attachedUser ? new d(e == null ? void 0 : e.attachedUser) : void 0, this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new q(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, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
|
|
5435
5532
|
}
|
|
5436
5533
|
}
|
|
5437
|
-
class kr extends R {
|
|
5438
|
-
}
|
|
5439
5534
|
class Ir extends R {
|
|
5440
5535
|
}
|
|
5441
|
-
class
|
|
5536
|
+
class Lr extends R {
|
|
5537
|
+
}
|
|
5538
|
+
class fs extends Tr {
|
|
5442
5539
|
/**
|
|
5443
5540
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5444
5541
|
*
|
|
@@ -5466,7 +5563,7 @@ class hs extends Tr {
|
|
|
5466
5563
|
/**
|
|
5467
5564
|
* @inheritDoc
|
|
5468
5565
|
*/
|
|
5469
|
-
t(this, "createdAt", new
|
|
5566
|
+
t(this, "createdAt", new $());
|
|
5470
5567
|
/**
|
|
5471
5568
|
* @inheritDoc
|
|
5472
5569
|
*/
|
|
@@ -5474,7 +5571,7 @@ class hs extends Tr {
|
|
|
5474
5571
|
/**
|
|
5475
5572
|
* @inheritDoc
|
|
5476
5573
|
*/
|
|
5477
|
-
t(this, "deliveryDate", new
|
|
5574
|
+
t(this, "deliveryDate", new $());
|
|
5478
5575
|
/**
|
|
5479
5576
|
* @inheritDoc
|
|
5480
5577
|
*/
|
|
@@ -5506,11 +5603,11 @@ class hs extends Tr {
|
|
|
5506
5603
|
/**
|
|
5507
5604
|
* @inheritDoc
|
|
5508
5605
|
*/
|
|
5509
|
-
t(this, "pendingAt", new
|
|
5606
|
+
t(this, "pendingAt", new $());
|
|
5510
5607
|
/**
|
|
5511
5608
|
* @inheritDoc
|
|
5512
5609
|
*/
|
|
5513
|
-
t(this, "processedAt", new
|
|
5610
|
+
t(this, "processedAt", new $());
|
|
5514
5611
|
/**
|
|
5515
5612
|
* @inheritDoc
|
|
5516
5613
|
*/
|
|
@@ -5543,7 +5640,7 @@ class hs extends Tr {
|
|
|
5543
5640
|
* @inheritDoc
|
|
5544
5641
|
*/
|
|
5545
5642
|
t(this, "onlyMyRegions");
|
|
5546
|
-
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new fe(u) : new
|
|
5643
|
+
this.attachedUsers = (s = e == null ? void 0 : e.attachedUsers) == null ? void 0 : s.map((u) => "isActive" in u ? new fe(u) : new Ir(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new se(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new $(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new d(e.creator) : void 0, this.deliveryDate = new $(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Ae(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isApproved1c = e == null ? void 0 : e.isApproved1c, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.pendingAt = new $(e == null ? void 0 : e.pendingAt), this.processedAt = new $(e == null ? void 0 : e.processedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Lr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
5547
5644
|
}
|
|
5548
5645
|
/**
|
|
5549
5646
|
* @inheritDoc
|
|
@@ -5595,7 +5692,7 @@ class hs extends Tr {
|
|
|
5595
5692
|
return !((s = e == null ? void 0 : e.createdAt) != null && s.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.pendingAt) != null && u.from) && !((p = e == null ? void 0 : e.pendingAt) != null && p.to) && delete e.pendingAt, !((m = e == null ? void 0 : e.processedAt) != null && m.from) && !((f = e == null ? void 0 : e.processedAt) != null && f.to) && delete e.processedAt, e;
|
|
5596
5693
|
}
|
|
5597
5694
|
}
|
|
5598
|
-
class
|
|
5695
|
+
class Dt extends mr {
|
|
5599
5696
|
/**
|
|
5600
5697
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
5601
5698
|
*
|
|
@@ -5643,10 +5740,10 @@ class Rt extends gr {
|
|
|
5643
5740
|
* @inheritDoc
|
|
5644
5741
|
*/
|
|
5645
5742
|
t(this, "currency");
|
|
5646
|
-
this.product = new M(e.product), this.currency = new
|
|
5743
|
+
this.product = new M(e.product), this.currency = new _(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
|
|
5647
5744
|
}
|
|
5648
5745
|
}
|
|
5649
|
-
class Le extends
|
|
5746
|
+
class Le extends kr {
|
|
5650
5747
|
/**
|
|
5651
5748
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5652
5749
|
*
|
|
@@ -5686,10 +5783,10 @@ class Le extends Sr {
|
|
|
5686
5783
|
* @inheritDoc
|
|
5687
5784
|
*/
|
|
5688
5785
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5689
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5786
|
+
this.products = (e.products ?? []).map((s) => new Dt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new R(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5690
5787
|
}
|
|
5691
5788
|
}
|
|
5692
|
-
class
|
|
5789
|
+
class ys extends De {
|
|
5693
5790
|
/**
|
|
5694
5791
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5695
5792
|
*
|
|
@@ -5709,7 +5806,7 @@ class gs extends De {
|
|
|
5709
5806
|
{},
|
|
5710
5807
|
(o) => {
|
|
5711
5808
|
const c = { ...o.data };
|
|
5712
|
-
return c.data = c.data.map((u) => new
|
|
5809
|
+
return c.data = c.data.map((u) => new kr(u)), c;
|
|
5713
5810
|
},
|
|
5714
5811
|
void 0,
|
|
5715
5812
|
i
|
|
@@ -5810,7 +5907,7 @@ class gs extends De {
|
|
|
5810
5907
|
);
|
|
5811
5908
|
}
|
|
5812
5909
|
}
|
|
5813
|
-
class
|
|
5910
|
+
class xe {
|
|
5814
5911
|
/**
|
|
5815
5912
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5816
5913
|
*
|
|
@@ -5837,12 +5934,12 @@ class de {
|
|
|
5837
5934
|
* Источник клиентской цены.
|
|
5838
5935
|
*/
|
|
5839
5936
|
t(this, "source");
|
|
5840
|
-
this.client = new
|
|
5937
|
+
this.client = new se(r == null ? void 0 : r.client), this.product = new I(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) ?? je.Product;
|
|
5841
5938
|
}
|
|
5842
5939
|
}
|
|
5843
|
-
const
|
|
5940
|
+
const Oe = (n) => {
|
|
5844
5941
|
var r, e, s, i, o;
|
|
5845
|
-
return n ?
|
|
5942
|
+
return n ? lr(
|
|
5846
5943
|
{
|
|
5847
5944
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5848
5945
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5851,13 +5948,13 @@ const ae = (n) => {
|
|
|
5851
5948
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5852
5949
|
hideNotActive: n.hideNotActive
|
|
5853
5950
|
},
|
|
5854
|
-
(c) =>
|
|
5951
|
+
(c) => T(c) || (H(c) || He(c)) && X(c)
|
|
5855
5952
|
) : {};
|
|
5856
|
-
},
|
|
5953
|
+
}, sr = (n) => {
|
|
5857
5954
|
const r = {};
|
|
5858
5955
|
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;
|
|
5859
5956
|
};
|
|
5860
|
-
class
|
|
5957
|
+
class ws extends h {
|
|
5861
5958
|
/**
|
|
5862
5959
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5863
5960
|
*
|
|
@@ -5871,10 +5968,10 @@ class ms extends h {
|
|
|
5871
5968
|
return this.get(
|
|
5872
5969
|
`/internal/price/products/${r}/analyze`,
|
|
5873
5970
|
{
|
|
5874
|
-
...
|
|
5875
|
-
filters:
|
|
5971
|
+
...sr(e),
|
|
5972
|
+
filters: Oe(s)
|
|
5876
5973
|
},
|
|
5877
|
-
(i) => i.data.map((o) => new
|
|
5974
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5878
5975
|
);
|
|
5879
5976
|
}
|
|
5880
5977
|
/**
|
|
@@ -5890,10 +5987,10 @@ class ms extends h {
|
|
|
5890
5987
|
return this.get(
|
|
5891
5988
|
`/internal/price/categories/${r}/analyze`,
|
|
5892
5989
|
{
|
|
5893
|
-
...
|
|
5894
|
-
filters:
|
|
5990
|
+
...sr(e),
|
|
5991
|
+
filters: Oe(s)
|
|
5895
5992
|
},
|
|
5896
|
-
(i) => i.data.map((o) => new
|
|
5993
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5897
5994
|
);
|
|
5898
5995
|
}
|
|
5899
5996
|
/**
|
|
@@ -5912,13 +6009,13 @@ class ms extends h {
|
|
|
5912
6009
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5913
6010
|
{
|
|
5914
6011
|
...e,
|
|
5915
|
-
filters:
|
|
6012
|
+
filters: Oe(s)
|
|
5916
6013
|
},
|
|
5917
|
-
(i) => i.data.map((o) => new
|
|
6014
|
+
(i) => i.data.map((o) => new xe(o))
|
|
5918
6015
|
);
|
|
5919
6016
|
}
|
|
5920
6017
|
}
|
|
5921
|
-
class
|
|
6018
|
+
class $t {
|
|
5922
6019
|
/**
|
|
5923
6020
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5924
6021
|
*
|
|
@@ -5965,10 +6062,10 @@ class Pt {
|
|
|
5965
6062
|
* @inheritDoc
|
|
5966
6063
|
*/
|
|
5967
6064
|
t(this, "currency");
|
|
5968
|
-
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
|
|
6065
|
+
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 ue(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 _(r.currency) : void 0;
|
|
5969
6066
|
}
|
|
5970
6067
|
}
|
|
5971
|
-
class
|
|
6068
|
+
class Tt extends ue {
|
|
5972
6069
|
/**
|
|
5973
6070
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5974
6071
|
*
|
|
@@ -5980,10 +6077,10 @@ class At extends le {
|
|
|
5980
6077
|
* @inheritDoc
|
|
5981
6078
|
*/
|
|
5982
6079
|
t(this, "history");
|
|
5983
|
-
this.history =
|
|
6080
|
+
this.history = ge(e.history, (s) => new $t(s));
|
|
5984
6081
|
}
|
|
5985
6082
|
}
|
|
5986
|
-
class
|
|
6083
|
+
class vs extends h {
|
|
5987
6084
|
/**
|
|
5988
6085
|
* Возвращает данные об истории изменения цен.
|
|
5989
6086
|
*
|
|
@@ -5993,21 +6090,21 @@ class fs extends h {
|
|
|
5993
6090
|
*/
|
|
5994
6091
|
getProductPriceHistory(r) {
|
|
5995
6092
|
var o, c, u, p, m;
|
|
5996
|
-
const e = L().config.dateFormats.api, s =
|
|
5997
|
-
|
|
6093
|
+
const e = L().config.dateFormats.api, s = lr(
|
|
6094
|
+
le(r, {
|
|
5998
6095
|
costDate: {
|
|
5999
|
-
from:
|
|
6000
|
-
to:
|
|
6096
|
+
from: de((o = r.costDate) == null ? void 0 : o.from) ? O(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6097
|
+
to: de((u = r.costDate) == null ? void 0 : u.to) ? O(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
6001
6098
|
}
|
|
6002
6099
|
}),
|
|
6003
|
-
(f) =>
|
|
6100
|
+
(f) => T(f) || (H(f) || He(f)) && X(f)
|
|
6004
6101
|
), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
|
|
6005
6102
|
return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
|
|
6006
|
-
new
|
|
6103
|
+
new Tt(le(f[0], { history: f }))
|
|
6007
6104
|
]);
|
|
6008
6105
|
}
|
|
6009
6106
|
}
|
|
6010
|
-
class
|
|
6107
|
+
class ir {
|
|
6011
6108
|
/**
|
|
6012
6109
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
6013
6110
|
*
|
|
@@ -6022,10 +6119,10 @@ class sr {
|
|
|
6022
6119
|
* Список рекомендованных категорий продуктов.
|
|
6023
6120
|
*/
|
|
6024
6121
|
t(this, "productCategories", []);
|
|
6025
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
6122
|
+
r != null && r.products && (this.products = r.products.map((e) => new ue(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ue(e)));
|
|
6026
6123
|
}
|
|
6027
6124
|
}
|
|
6028
|
-
class
|
|
6125
|
+
class Cs extends h {
|
|
6029
6126
|
/**
|
|
6030
6127
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6031
6128
|
*
|
|
@@ -6033,7 +6130,7 @@ class ys extends h {
|
|
|
6033
6130
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
6034
6131
|
*/
|
|
6035
6132
|
getProductCategoryRecommendations(r) {
|
|
6036
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
6133
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new ir(e.data));
|
|
6037
6134
|
}
|
|
6038
6135
|
/**
|
|
6039
6136
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -6042,7 +6139,7 @@ class ys extends h {
|
|
|
6042
6139
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
6043
6140
|
*/
|
|
6044
6141
|
getProductRecommendations(r) {
|
|
6045
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
6142
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new ir(e.data));
|
|
6046
6143
|
}
|
|
6047
6144
|
/**
|
|
6048
6145
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -6071,20 +6168,20 @@ class ys extends h {
|
|
|
6071
6168
|
});
|
|
6072
6169
|
}
|
|
6073
6170
|
}
|
|
6074
|
-
var
|
|
6075
|
-
class
|
|
6171
|
+
var bt = /* @__PURE__ */ ((n) => (n.New = "new", n.WorkedOut = "worked_out", n.Pending = "pending", n.Completed = "completed", n.Declined = "declined", n.Deleted = "deleted", n))(bt || {});
|
|
6172
|
+
class St extends R {
|
|
6076
6173
|
}
|
|
6077
|
-
class
|
|
6174
|
+
class Rs extends R {
|
|
6078
6175
|
}
|
|
6079
|
-
class
|
|
6176
|
+
class kt extends R {
|
|
6080
6177
|
}
|
|
6081
|
-
class
|
|
6178
|
+
class It extends R {
|
|
6082
6179
|
}
|
|
6083
|
-
class
|
|
6180
|
+
class Lt extends R {
|
|
6084
6181
|
}
|
|
6085
|
-
class
|
|
6182
|
+
class xt extends R {
|
|
6086
6183
|
}
|
|
6087
|
-
class
|
|
6184
|
+
class Ps {
|
|
6088
6185
|
/**
|
|
6089
6186
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
6090
6187
|
*
|
|
@@ -6103,9 +6200,9 @@ class vs {
|
|
|
6103
6200
|
return r.id === 0 && r.slug === "-undefined-";
|
|
6104
6201
|
}
|
|
6105
6202
|
}
|
|
6106
|
-
class
|
|
6203
|
+
class xr extends R {
|
|
6107
6204
|
}
|
|
6108
|
-
class S extends
|
|
6205
|
+
class S extends he {
|
|
6109
6206
|
/**
|
|
6110
6207
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
6111
6208
|
*
|
|
@@ -6114,20 +6211,20 @@ class S extends pe {
|
|
|
6114
6211
|
* и использовать в случае аналогичных запросов.
|
|
6115
6212
|
*/
|
|
6116
6213
|
getReference(r, e = !1) {
|
|
6117
|
-
return this.getTypedDataArrayRequester(
|
|
6214
|
+
return this.getTypedDataArrayRequester(St, `/internal/references/${r}`, e);
|
|
6118
6215
|
}
|
|
6119
6216
|
/**
|
|
6120
6217
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
6121
6218
|
* первичного интереса.
|
|
6122
6219
|
*/
|
|
6123
6220
|
getChannelPrimaryInterest() {
|
|
6124
|
-
return this.getTypedDataArrayRequester(
|
|
6221
|
+
return this.getTypedDataArrayRequester(Dr, "/internal/references/channel-primary-interest", !0);
|
|
6125
6222
|
}
|
|
6126
6223
|
/**
|
|
6127
6224
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
6128
6225
|
*/
|
|
6129
6226
|
getContactPositions() {
|
|
6130
|
-
return this.getTypedDataArrayRequester(
|
|
6227
|
+
return this.getTypedDataArrayRequester(kt, "/internal/references/contact-position", !0);
|
|
6131
6228
|
}
|
|
6132
6229
|
/**
|
|
6133
6230
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
@@ -6139,14 +6236,14 @@ class S extends pe {
|
|
|
6139
6236
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
6140
6237
|
*/
|
|
6141
6238
|
getCurrency() {
|
|
6142
|
-
return this.getTypedDataArrayRequester(
|
|
6239
|
+
return this.getTypedDataArrayRequester(_, "/public/references/currency", !0);
|
|
6143
6240
|
}
|
|
6144
6241
|
/**
|
|
6145
6242
|
* Возвращает {@link Promise} для получения справочника данных
|
|
6146
6243
|
* групп партнеров (направлений деятельности).
|
|
6147
6244
|
*/
|
|
6148
6245
|
getPartnerGroup() {
|
|
6149
|
-
return this.getTypedDataArrayRequester(
|
|
6246
|
+
return this.getTypedDataArrayRequester(ee, "/internal/references/partner-group", !0);
|
|
6150
6247
|
}
|
|
6151
6248
|
/**
|
|
6152
6249
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
@@ -6158,43 +6255,43 @@ class S extends pe {
|
|
|
6158
6255
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
6159
6256
|
*/
|
|
6160
6257
|
getOperators() {
|
|
6161
|
-
return this.getTypedDataArrayRequester(
|
|
6258
|
+
return this.getTypedDataArrayRequester(Ir, "/internal/references/operator", !0);
|
|
6162
6259
|
}
|
|
6163
6260
|
/**
|
|
6164
6261
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
6165
6262
|
*/
|
|
6166
6263
|
getOrderPaymentStatuses() {
|
|
6167
|
-
return this.getTypedDataArrayRequester(
|
|
6264
|
+
return this.getTypedDataArrayRequester(It, "/public/references/order-payment-status", !0);
|
|
6168
6265
|
}
|
|
6169
6266
|
/**
|
|
6170
6267
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
6171
6268
|
*/
|
|
6172
6269
|
getOrderStatuses() {
|
|
6173
|
-
return this.getTypedDataArrayRequester(
|
|
6270
|
+
return this.getTypedDataArrayRequester(Lt, "/internal/references/order-status", !0);
|
|
6174
6271
|
}
|
|
6175
6272
|
/**
|
|
6176
6273
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
6177
6274
|
*/
|
|
6178
6275
|
getPaymentTypes() {
|
|
6179
|
-
return this.getTypedDataArrayRequester(
|
|
6276
|
+
return this.getTypedDataArrayRequester(Lr, "/public/references/payment-type", !0);
|
|
6180
6277
|
}
|
|
6181
6278
|
/**
|
|
6182
6279
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
6183
6280
|
*/
|
|
6184
6281
|
getResourceTypes() {
|
|
6185
|
-
return this.getTypedDataArrayRequester(
|
|
6282
|
+
return this.getTypedDataArrayRequester(xr, "/internal/references/resource-type", !0);
|
|
6186
6283
|
}
|
|
6187
6284
|
/**
|
|
6188
6285
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
6189
6286
|
*/
|
|
6190
6287
|
getSalesDirections() {
|
|
6191
|
-
return this.getTypedDataArrayRequester(
|
|
6288
|
+
return this.getTypedDataArrayRequester(q, "/public/references/sales-direction", !0);
|
|
6192
6289
|
}
|
|
6193
6290
|
/**
|
|
6194
6291
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
6195
6292
|
*/
|
|
6196
6293
|
getSourcePrimaryInterest() {
|
|
6197
|
-
return this.getTypedDataArrayRequester(
|
|
6294
|
+
return this.getTypedDataArrayRequester($r, "/internal/references/source-primary-interest", !0);
|
|
6198
6295
|
}
|
|
6199
6296
|
/**
|
|
6200
6297
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -6210,7 +6307,7 @@ class S extends pe {
|
|
|
6210
6307
|
* @param term Терм поиска.
|
|
6211
6308
|
*/
|
|
6212
6309
|
searchRegion(r) {
|
|
6213
|
-
return this.getTypedDataArrayRequester(
|
|
6310
|
+
return this.getTypedDataArrayRequester(pe, `/internal/references/region-with-country/search?term=${r}`);
|
|
6214
6311
|
}
|
|
6215
6312
|
/**
|
|
6216
6313
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -6218,7 +6315,7 @@ class S extends pe {
|
|
|
6218
6315
|
* @param term Терм поиска.
|
|
6219
6316
|
*/
|
|
6220
6317
|
searchCountry(r) {
|
|
6221
|
-
return this.getTypedDataArrayRequester(
|
|
6318
|
+
return this.getTypedDataArrayRequester(Z, `/internal/references/country/search?term=${r}`);
|
|
6222
6319
|
}
|
|
6223
6320
|
/**
|
|
6224
6321
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
@@ -6230,13 +6327,13 @@ class S extends pe {
|
|
|
6230
6327
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
6231
6328
|
*/
|
|
6232
6329
|
getWarehouses() {
|
|
6233
|
-
return this.getTypedDataArrayRequester(
|
|
6330
|
+
return this.getTypedDataArrayRequester(me, "/public/references/warehouse", !0);
|
|
6234
6331
|
}
|
|
6235
6332
|
/**
|
|
6236
6333
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
6237
6334
|
*/
|
|
6238
6335
|
getPropertyTypes() {
|
|
6239
|
-
return this.getTypedDataArrayRequester(
|
|
6336
|
+
return this.getTypedDataArrayRequester(Cr, "/internal/references/property-type", !0);
|
|
6240
6337
|
}
|
|
6241
6338
|
/**
|
|
6242
6339
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -6248,11 +6345,11 @@ class S extends pe {
|
|
|
6248
6345
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
6249
6346
|
*/
|
|
6250
6347
|
getProductFileType() {
|
|
6251
|
-
return this.getTypedDataArrayRequester(
|
|
6348
|
+
return this.getTypedDataArrayRequester(xt, "/public/references/product-file-type", !0);
|
|
6252
6349
|
}
|
|
6253
6350
|
}
|
|
6254
6351
|
const b = z("common.references_private", () => {
|
|
6255
|
-
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), p = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0),
|
|
6352
|
+
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), p = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0), ie = y(void 0), ne = y(void 0), W = y(void 0), J = y(void 0), $e = y(void 0), Te = y(void 0), l = y(void 0);
|
|
6256
6353
|
return {
|
|
6257
6354
|
/**
|
|
6258
6355
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -6305,11 +6402,11 @@ const b = z("common.references_private", () => {
|
|
|
6305
6402
|
/**
|
|
6306
6403
|
* Справочник типов файлов продукктов/категорий.
|
|
6307
6404
|
*/
|
|
6308
|
-
productFileTypeReference:
|
|
6405
|
+
productFileTypeReference: ie,
|
|
6309
6406
|
/**
|
|
6310
6407
|
* Справочник типов ресурсов.
|
|
6311
6408
|
*/
|
|
6312
|
-
resourceTypesReference:
|
|
6409
|
+
resourceTypesReference: ne,
|
|
6313
6410
|
/**
|
|
6314
6411
|
* Справочник направлений продаж.
|
|
6315
6412
|
*/
|
|
@@ -6321,17 +6418,17 @@ const b = z("common.references_private", () => {
|
|
|
6321
6418
|
/**
|
|
6322
6419
|
* Справочник складов.
|
|
6323
6420
|
*/
|
|
6324
|
-
warehousesReference:
|
|
6421
|
+
warehousesReference: $e,
|
|
6325
6422
|
/**
|
|
6326
6423
|
* Справочник типов свойств.
|
|
6327
6424
|
*/
|
|
6328
|
-
propertyTypesReference:
|
|
6425
|
+
propertyTypesReference: Te,
|
|
6329
6426
|
/**
|
|
6330
6427
|
* Справочник коэффициентов цен.
|
|
6331
6428
|
*/
|
|
6332
6429
|
priceCoefficientsReference: l
|
|
6333
6430
|
};
|
|
6334
|
-
}),
|
|
6431
|
+
}), As = z("common.references", () => {
|
|
6335
6432
|
const n = A(() => {
|
|
6336
6433
|
const l = b();
|
|
6337
6434
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(S).getChannelPrimaryInterest().then((g) => {
|
|
@@ -6392,19 +6489,19 @@ const b = z("common.references_private", () => {
|
|
|
6392
6489
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(S).getSalesDirections().then((g) => {
|
|
6393
6490
|
l.salesDirectionsReference = g;
|
|
6394
6491
|
}).catch(w)), l.salesDirectionsReference;
|
|
6395
|
-
}),
|
|
6492
|
+
}), ie = A(() => {
|
|
6396
6493
|
const l = b();
|
|
6397
6494
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(S).getSourcePrimaryInterest().then((g) => {
|
|
6398
6495
|
l.sourcePrimaryInterestReference = g;
|
|
6399
6496
|
}).catch(w)), l.sourcePrimaryInterestReference;
|
|
6400
|
-
}),
|
|
6497
|
+
}), ne = A(() => {
|
|
6401
6498
|
const l = b();
|
|
6402
6499
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(S).getDeliveryTypes().then((g) => {
|
|
6403
6500
|
l.deliveryTypeReference = g;
|
|
6404
6501
|
}).catch(w)), l.deliveryTypeReference;
|
|
6405
6502
|
}), W = A(() => {
|
|
6406
6503
|
const l = b();
|
|
6407
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
6504
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(At).getManagers().then((g) => {
|
|
6408
6505
|
l.managersList = g;
|
|
6409
6506
|
}).catch(w)), l.managersList;
|
|
6410
6507
|
}), J = A(() => {
|
|
@@ -6412,12 +6509,12 @@ const b = z("common.references_private", () => {
|
|
|
6412
6509
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(S).getWarehouses().then((g) => {
|
|
6413
6510
|
l.warehousesReference = g;
|
|
6414
6511
|
}).catch(w)), l.warehousesReference;
|
|
6415
|
-
}),
|
|
6512
|
+
}), $e = A(() => {
|
|
6416
6513
|
const l = b();
|
|
6417
6514
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(S).getPropertyTypes().then((g) => {
|
|
6418
6515
|
l.propertyTypesReference = g;
|
|
6419
6516
|
}).catch(w)), l.propertyTypesReference;
|
|
6420
|
-
}),
|
|
6517
|
+
}), Te = A(() => {
|
|
6421
6518
|
const l = b();
|
|
6422
6519
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(S).getPriceCoefficients().then((g) => {
|
|
6423
6520
|
l.priceCoefficientsReference = g;
|
|
@@ -6475,11 +6572,11 @@ const b = z("common.references_private", () => {
|
|
|
6475
6572
|
/**
|
|
6476
6573
|
* Справочник каналов первичного интереса.
|
|
6477
6574
|
*/
|
|
6478
|
-
sourcePrimaryInterestsReference:
|
|
6575
|
+
sourcePrimaryInterestsReference: ie,
|
|
6479
6576
|
/**
|
|
6480
6577
|
* Справочник типов доставки.
|
|
6481
6578
|
*/
|
|
6482
|
-
deliveryTypeReference:
|
|
6579
|
+
deliveryTypeReference: ne,
|
|
6483
6580
|
/**
|
|
6484
6581
|
* Список менеджеров.
|
|
6485
6582
|
*/
|
|
@@ -6491,14 +6588,14 @@ const b = z("common.references_private", () => {
|
|
|
6491
6588
|
/**
|
|
6492
6589
|
* Справочник типов свойств.
|
|
6493
6590
|
*/
|
|
6494
|
-
propertyTypesReference:
|
|
6591
|
+
propertyTypesReference: $e,
|
|
6495
6592
|
/**
|
|
6496
6593
|
* Справочник коэффициентов цен.
|
|
6497
6594
|
*/
|
|
6498
|
-
priceCoefficientsReference:
|
|
6595
|
+
priceCoefficientsReference: Te
|
|
6499
6596
|
};
|
|
6500
6597
|
});
|
|
6501
|
-
class
|
|
6598
|
+
class Ot {
|
|
6502
6599
|
/**
|
|
6503
6600
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
6504
6601
|
*
|
|
@@ -6516,7 +6613,7 @@ class It {
|
|
|
6516
6613
|
this.name = r.name, this.content = r.content;
|
|
6517
6614
|
}
|
|
6518
6615
|
}
|
|
6519
|
-
class
|
|
6616
|
+
class nr {
|
|
6520
6617
|
/**
|
|
6521
6618
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
6522
6619
|
*
|
|
@@ -6556,10 +6653,10 @@ class ir {
|
|
|
6556
6653
|
*/
|
|
6557
6654
|
t(this, "tags");
|
|
6558
6655
|
var e;
|
|
6559
|
-
this.resourceType = new
|
|
6656
|
+
this.resourceType = new xr(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 Ot(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
6560
6657
|
}
|
|
6561
6658
|
}
|
|
6562
|
-
class
|
|
6659
|
+
class Ds extends h {
|
|
6563
6660
|
/**
|
|
6564
6661
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
6565
6662
|
*
|
|
@@ -6567,7 +6664,7 @@ class Rs extends h {
|
|
|
6567
6664
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6568
6665
|
*/
|
|
6569
6666
|
getResourceSeoData(r, e) {
|
|
6570
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6667
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new nr(s.data));
|
|
6571
6668
|
}
|
|
6572
6669
|
/**
|
|
6573
6670
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6578,7 +6675,7 @@ class Rs extends h {
|
|
|
6578
6675
|
* в случае ошибок в запросах.
|
|
6579
6676
|
*/
|
|
6580
6677
|
saveResourceSeoData(r, e = {}) {
|
|
6581
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6678
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new nr(s.data), e);
|
|
6582
6679
|
}
|
|
6583
6680
|
/**
|
|
6584
6681
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6590,7 +6687,7 @@ class Rs extends h {
|
|
|
6590
6687
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6591
6688
|
}
|
|
6592
6689
|
}
|
|
6593
|
-
class
|
|
6690
|
+
class $s extends h {
|
|
6594
6691
|
/**
|
|
6595
6692
|
* Возвращает подсказки по адресам.
|
|
6596
6693
|
*
|
|
@@ -6637,8 +6734,8 @@ class Ps extends h {
|
|
|
6637
6734
|
});
|
|
6638
6735
|
}
|
|
6639
6736
|
}
|
|
6640
|
-
var
|
|
6641
|
-
class
|
|
6737
|
+
var dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(dt || {});
|
|
6738
|
+
class _t extends vr {
|
|
6642
6739
|
/**
|
|
6643
6740
|
* Инициализирует экземпляр класса {@link User}.
|
|
6644
6741
|
*
|
|
@@ -6662,10 +6759,10 @@ class dt extends wr {
|
|
|
6662
6759
|
* Роль ценообразования текущего пользователя.
|
|
6663
6760
|
*/
|
|
6664
6761
|
t(this, "pricingRole");
|
|
6665
|
-
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new
|
|
6762
|
+
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new yr(e.pricingRole) : void 0;
|
|
6666
6763
|
}
|
|
6667
6764
|
}
|
|
6668
|
-
class
|
|
6765
|
+
class Ts extends h {
|
|
6669
6766
|
/**
|
|
6670
6767
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6671
6768
|
*/
|
|
@@ -6681,16 +6778,16 @@ class As extends h {
|
|
|
6681
6778
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6682
6779
|
}
|
|
6683
6780
|
}
|
|
6684
|
-
class
|
|
6781
|
+
class qt extends h {
|
|
6685
6782
|
/**
|
|
6686
6783
|
* Возвращает данные о текущем пользователе.
|
|
6687
6784
|
*/
|
|
6688
6785
|
// eslint-disable-next-line class-methods-use-this
|
|
6689
6786
|
getCurrentUser() {
|
|
6690
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6787
|
+
return this.get("/internal/users/info", {}, (r) => new _t(r.data), !0);
|
|
6691
6788
|
}
|
|
6692
6789
|
}
|
|
6693
|
-
const
|
|
6790
|
+
const at = z("common.user_state_private", () => {
|
|
6694
6791
|
const n = y({}), r = y(void 0);
|
|
6695
6792
|
return {
|
|
6696
6793
|
/**
|
|
@@ -6702,20 +6799,20 @@ const xt = z("common.user_state_private", () => {
|
|
|
6702
6799
|
*/
|
|
6703
6800
|
currentUser: r
|
|
6704
6801
|
};
|
|
6705
|
-
}),
|
|
6802
|
+
}), bs = z("common.user_state", () => ({
|
|
6706
6803
|
/**
|
|
6707
6804
|
* Данные о текущем пользователе.
|
|
6708
6805
|
*/
|
|
6709
6806
|
currentUser: A(() => {
|
|
6710
|
-
const r =
|
|
6711
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6807
|
+
const r = at();
|
|
6808
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(qt).getCurrentUser().then((e) => {
|
|
6712
6809
|
r.currentUser = e;
|
|
6713
6810
|
}).catch(w).finally(() => {
|
|
6714
6811
|
r.dataLoaderList.currentUser = !1;
|
|
6715
6812
|
})), r.currentUser;
|
|
6716
6813
|
})
|
|
6717
6814
|
}));
|
|
6718
|
-
class
|
|
6815
|
+
class Ss {
|
|
6719
6816
|
/**
|
|
6720
6817
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
6721
6818
|
*
|
|
@@ -6739,159 +6836,162 @@ class Ts {
|
|
|
6739
6836
|
}
|
|
6740
6837
|
}
|
|
6741
6838
|
export {
|
|
6742
|
-
|
|
6743
|
-
|
|
6744
|
-
|
|
6839
|
+
St as AnyReference,
|
|
6840
|
+
tt as AppBaseConfig,
|
|
6841
|
+
ae as BankAccount,
|
|
6745
6842
|
De as BasePaginationProvider,
|
|
6746
|
-
|
|
6843
|
+
lt as CalculationTypeEnum,
|
|
6747
6844
|
ye as Cart,
|
|
6748
|
-
|
|
6749
|
-
|
|
6750
|
-
|
|
6751
|
-
|
|
6845
|
+
Jt as CartProvider,
|
|
6846
|
+
Vt as CatalogProvider,
|
|
6847
|
+
gr as CatalogableItem,
|
|
6848
|
+
a as Category,
|
|
6849
|
+
Xe as CategoryFilterSetting,
|
|
6752
6850
|
Ye as CategoryPricingRule,
|
|
6753
|
-
|
|
6754
|
-
|
|
6851
|
+
Dr as ChannelPrimaryInterest,
|
|
6852
|
+
Rs as City,
|
|
6755
6853
|
Ae as CityWithRegionAndCountry,
|
|
6756
|
-
|
|
6757
|
-
|
|
6854
|
+
tr as Client,
|
|
6855
|
+
vt as ClientAdditionalData,
|
|
6758
6856
|
ve as ClientCategory,
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6857
|
+
x as ClientDataProvider,
|
|
6858
|
+
Kt as ClientPriceProvider,
|
|
6859
|
+
Qt as ClientPriceTemplateProvider,
|
|
6762
6860
|
M as ClientProduct,
|
|
6763
|
-
|
|
6764
|
-
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6861
|
+
Zt as ClientProductCategoryDataProvider,
|
|
6862
|
+
es as ClientProductDataProvider,
|
|
6863
|
+
se as ClientShortInfo,
|
|
6864
|
+
mt as ClientsAdditionalDataRequestTypeEnum,
|
|
6865
|
+
ns as ClientsListFilters,
|
|
6866
|
+
ue as CodedIdentity,
|
|
6867
|
+
ls as ConfiguratorProvider,
|
|
6868
|
+
Rt as ConfiguratorsEnum,
|
|
6771
6869
|
Ne as Contact,
|
|
6772
|
-
|
|
6870
|
+
fr as ContactLinks,
|
|
6773
6871
|
G as ContactPerson,
|
|
6774
|
-
|
|
6775
|
-
|
|
6872
|
+
Ct as ContactPersonRelated,
|
|
6873
|
+
kt as ContactPosition,
|
|
6776
6874
|
Ie as ContactRelation,
|
|
6777
|
-
|
|
6875
|
+
Rr as ContragentBase,
|
|
6778
6876
|
Ce as ContragentFactory,
|
|
6779
|
-
|
|
6780
|
-
|
|
6781
|
-
|
|
6782
|
-
|
|
6877
|
+
Pr as ContragentIc,
|
|
6878
|
+
ft as ContragentPerson,
|
|
6879
|
+
yt as ContragentUlNr,
|
|
6880
|
+
Ar as ContragentUlR,
|
|
6783
6881
|
je as CostSourceEnum,
|
|
6784
|
-
|
|
6882
|
+
Z as Country,
|
|
6785
6883
|
ze as CuratedDirection,
|
|
6786
6884
|
We as Curator,
|
|
6787
|
-
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6885
|
+
_ as Currency,
|
|
6886
|
+
$s as DataSuggestionProvider,
|
|
6887
|
+
hs as DateTimeProvider,
|
|
6888
|
+
wt as DeletableNamedIdentity,
|
|
6791
6889
|
Re as DeliveryAddress,
|
|
6792
6890
|
U as DeliveryType,
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
|
|
6796
|
-
|
|
6891
|
+
zt as DetailedJwtPayload,
|
|
6892
|
+
Xr as DeviceTypeResolutionConfig,
|
|
6893
|
+
st as DiscountShortInfo,
|
|
6894
|
+
Ss as FieldValidationResultData,
|
|
6797
6895
|
j as FilterGroup,
|
|
6798
|
-
|
|
6896
|
+
Ze as FilterItem,
|
|
6799
6897
|
Je as FilterOpEnum,
|
|
6800
|
-
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6898
|
+
gt as FilterSettings,
|
|
6899
|
+
hr as GeoCoordinates,
|
|
6900
|
+
nt as HiddenCatalogableItem,
|
|
6901
|
+
he as HttpCachedRequester,
|
|
6902
|
+
Zr as HttpParamsConfig,
|
|
6804
6903
|
h as HttpRequester,
|
|
6805
|
-
|
|
6806
|
-
|
|
6904
|
+
re as Identity,
|
|
6905
|
+
ot as Image,
|
|
6807
6906
|
F as JwtPayload,
|
|
6808
6907
|
fe as Manager,
|
|
6809
6908
|
Be as ManagerCommon,
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6909
|
+
ms as ManagerDataFactory,
|
|
6910
|
+
At as ManagerDataProvider,
|
|
6911
|
+
Ot as MetaTagItem,
|
|
6813
6912
|
k as NamedIdentity,
|
|
6814
|
-
|
|
6913
|
+
Ir as Operator,
|
|
6815
6914
|
B as Opf,
|
|
6816
6915
|
N as OpfEnum,
|
|
6817
6916
|
Le as Order,
|
|
6818
|
-
|
|
6819
|
-
|
|
6820
|
-
|
|
6821
|
-
|
|
6822
|
-
|
|
6823
|
-
|
|
6824
|
-
|
|
6825
|
-
|
|
6826
|
-
|
|
6917
|
+
kr as OrderInfo,
|
|
6918
|
+
Dt as OrderItem,
|
|
6919
|
+
mr as OrderItemBase,
|
|
6920
|
+
It as OrderPaymentStatus,
|
|
6921
|
+
br as OrderShortInfo,
|
|
6922
|
+
Lt as OrderStatus,
|
|
6923
|
+
bt as OrderStatusEnum,
|
|
6924
|
+
ys as OrdersDataProvider,
|
|
6925
|
+
fs as OrdersListFilters,
|
|
6827
6926
|
Tr as PaginationFiltersBase,
|
|
6828
|
-
|
|
6829
|
-
|
|
6927
|
+
ee as PartnerGroup,
|
|
6928
|
+
Lr as PaymentType,
|
|
6830
6929
|
we as PreferencesStorageProvider,
|
|
6831
|
-
|
|
6832
|
-
|
|
6930
|
+
xe as PriceAnalyze,
|
|
6931
|
+
ws as PriceAnalyzeProvider,
|
|
6833
6932
|
Pe as PriceCoefficient,
|
|
6834
|
-
|
|
6835
|
-
|
|
6836
|
-
|
|
6933
|
+
pr as PriceCoefficientEnum,
|
|
6934
|
+
vs as PriceHistoryDataProvider,
|
|
6935
|
+
$t as PriceHistoryItem,
|
|
6837
6936
|
K as PriceTemplate,
|
|
6838
6937
|
Se as PriceTemplateCategory,
|
|
6839
|
-
|
|
6840
|
-
|
|
6938
|
+
oe as PriceTemplateClient,
|
|
6939
|
+
wr as PriceTemplateICatalogableItem,
|
|
6841
6940
|
ke as PriceTemplateProduct,
|
|
6842
|
-
|
|
6843
|
-
|
|
6844
|
-
|
|
6845
|
-
|
|
6941
|
+
rs as PriceTemplateProvider,
|
|
6942
|
+
ce as PricingRole,
|
|
6943
|
+
ts as PricingRoleProvider,
|
|
6944
|
+
qe as PrimaryCatalogableItem,
|
|
6846
6945
|
I as Product,
|
|
6847
|
-
|
|
6848
|
-
|
|
6849
|
-
|
|
6946
|
+
Yt as ProductCategoryDataProvider,
|
|
6947
|
+
Xt as ProductDataProvider,
|
|
6948
|
+
xt as ProductFileType,
|
|
6949
|
+
pt as ProductFilterTypeEnum,
|
|
6850
6950
|
Me as ProductPriceCoefficient,
|
|
6851
|
-
|
|
6951
|
+
Tt as ProductPriceHistory,
|
|
6852
6952
|
Qe as ProductUnit,
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
6856
|
-
|
|
6953
|
+
ss as PropertiesProvider,
|
|
6954
|
+
Q as Property,
|
|
6955
|
+
Cr as PropertyType,
|
|
6956
|
+
ut as PropertyTypeEnum,
|
|
6857
6957
|
V as PropertyValue,
|
|
6858
|
-
|
|
6859
|
-
|
|
6958
|
+
Cs as RecommendationsDataProvider,
|
|
6959
|
+
ir as RecommendationsList,
|
|
6860
6960
|
R as Reference,
|
|
6861
|
-
|
|
6961
|
+
Ps as ReferenceDataFactory,
|
|
6862
6962
|
S as ReferenceDataProvider,
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
|
|
6870
|
-
|
|
6871
|
-
|
|
6872
|
-
|
|
6873
|
-
|
|
6874
|
-
|
|
6875
|
-
|
|
6963
|
+
pe as Region,
|
|
6964
|
+
xr as ResourceType,
|
|
6965
|
+
q as SalesDirection,
|
|
6966
|
+
et as SentryConfig,
|
|
6967
|
+
nr as Seo,
|
|
6968
|
+
Ds as SeoDataProvider,
|
|
6969
|
+
$r as SourcePrimaryInterest,
|
|
6970
|
+
it as StockCount,
|
|
6971
|
+
us as TableDataPagination,
|
|
6972
|
+
Pt as TableDataPaginationRequestParams,
|
|
6973
|
+
ps as TableDataSortRequestParams,
|
|
6974
|
+
is as TemplateProductCategoryDataProvider,
|
|
6975
|
+
Et as TemplatesListFilters,
|
|
6876
6976
|
Ge as TypedInstanceFactory,
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
6881
|
-
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
6886
|
-
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6977
|
+
Sr as UnitsHelper,
|
|
6978
|
+
os as UnknownClientDataProvider,
|
|
6979
|
+
ur as UpdatableNamedIdentity,
|
|
6980
|
+
_t as User,
|
|
6981
|
+
Ts as UserAuthDataProvider,
|
|
6982
|
+
vr as UserCommonInfo,
|
|
6983
|
+
qt as UserDataProvider,
|
|
6984
|
+
yr as UserPricingRole,
|
|
6985
|
+
d as UserShortInfo,
|
|
6986
|
+
dt as UserTypeEnum,
|
|
6987
|
+
cs as VersionConfig,
|
|
6988
|
+
me as Warehouse,
|
|
6989
|
+
rt as WebSocketConfig,
|
|
6990
|
+
er as findCatalogItemByIdRecursive,
|
|
6991
|
+
rr as flattenCatalogItems,
|
|
6992
|
+
gs as pluralize,
|
|
6893
6993
|
be as useAuthStateStore,
|
|
6894
6994
|
L as useBaseConfigStateStore,
|
|
6895
|
-
|
|
6896
|
-
|
|
6995
|
+
As as useReferencesStore,
|
|
6996
|
+
bs as useUserStateStore
|
|
6897
6997
|
};
|