@snabcentr/common-lib 3.5.1 → 3.6.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 +3 -6
- package/dist/sc-common-lib.js +938 -785
- 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/faq/classes/faq-group.d.ts +14 -0
- package/dist/src/faq/classes/faq-group.d.ts.map +1 -0
- package/dist/src/faq/classes/faq.d.ts +34 -0
- package/dist/src/faq/classes/faq.d.ts.map +1 -0
- package/dist/src/faq/classes/index.d.ts +3 -0
- package/dist/src/faq/classes/index.d.ts.map +1 -0
- package/dist/src/faq/index.d.ts +4 -0
- package/dist/src/faq/index.d.ts.map +1 -0
- package/dist/src/faq/interfaces/i-faq-group-save-data.d.ts +10 -0
- package/dist/src/faq/interfaces/i-faq-group-save-data.d.ts.map +1 -0
- package/dist/src/faq/interfaces/i-faq-group.d.ts +7 -0
- package/dist/src/faq/interfaces/i-faq-group.d.ts.map +1 -0
- package/dist/src/faq/interfaces/i-faq-save-data.d.ts +18 -0
- package/dist/src/faq/interfaces/i-faq-save-data.d.ts.map +1 -0
- package/dist/src/faq/interfaces/i-faq.d.ts +20 -0
- package/dist/src/faq/interfaces/i-faq.d.ts.map +1 -0
- package/dist/src/faq/interfaces/index.d.ts +5 -0
- package/dist/src/faq/interfaces/index.d.ts.map +1 -0
- package/dist/src/faq/providers/faq-provider.d.ts +99 -0
- package/dist/src/faq/providers/faq-provider.d.ts.map +1 -0
- package/dist/src/faq/providers/index.d.ts +2 -0
- package/dist/src/faq/providers/index.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { defineStore as
|
|
8
|
-
import { ref as
|
|
9
|
-
import { isAfter as
|
|
10
|
-
import
|
|
11
|
-
class
|
|
1
|
+
var qt = Object.defineProperty;
|
|
2
|
+
var _t = (n, r, e) => r in n ? qt(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var s = (n, r, e) => _t(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as it } from "jwt-decode";
|
|
5
|
+
import { merge as qe, isNil as a, isEmpty as Q, noop as C, mapValues as nt, isArray as G, every as Nt, split as Ft, isString as I, startsWith as Ut, endsWith as Mt, includes as Ht, isFunction as kr, map as V, isObject as Lr, isError as Mr, toLower as Bt, isDate as Dr, isPlainObject as Wt, isUndefined as Be, constant as zt, toUpper as Gt, cloneDeep as Et, forEach as jt, round as Yt, omitBy as ot } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Or, objectToSnake as Hr } from "ts-case-convert";
|
|
7
|
+
import { defineStore as ie } from "pinia";
|
|
8
|
+
import { ref as w, markRaw as Qt, computed as R } from "vue";
|
|
9
|
+
import { isAfter as Br, parseISO as k, startOfToday as _e, isValid as Vt, format as A, endOfMonth as O, addMonths as $, differenceInCalendarMonths as Jt, startOfMonth as F, getDate as Wr, getDaysInMonth as Kt, endOfDay as z, startOfDay as me, setDate as Xt, startOfWeek as Z, addWeeks as Pr, differenceInCalendarDays as Ge, addDays as ee, subDays as Ee, addBusinessDays as Zt, startOfYear as he, endOfYear as $e, endOfWeek as Ae, endOfTomorrow as es, startOfTomorrow as rs, endOfYesterday as ts, startOfYesterday as ss, endOfToday as is, startOfQuarter as Se, endOfQuarter as We, addYears as or, addQuarters as cr, subYears as lr, subQuarters as ur, subMonths as pr, subWeeks as zr, addSeconds as ns } from "date-fns";
|
|
10
|
+
import os, { CanceledError as cs } from "axios";
|
|
11
|
+
class be {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class Re {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
s(this, "email", "");
|
|
102
|
-
|
|
102
|
+
qe(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class Re {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = it(r), t = new be(Or(e));
|
|
111
111
|
return t.resourceAccess = e.resource_access, t;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class ct extends be {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class nt extends Re {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
s(this, "address");
|
|
146
|
-
|
|
146
|
+
qe(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,11 +151,11 @@ class nt extends Re {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
const t =
|
|
154
|
+
const t = it(e), i = new ct(Or(t));
|
|
155
155
|
return i.resourceAccess = t.resource_access, i;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class ls {
|
|
159
159
|
/**
|
|
160
160
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
161
161
|
*
|
|
@@ -177,7 +177,7 @@ class os {
|
|
|
177
177
|
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;
|
|
178
178
|
}
|
|
179
179
|
}
|
|
180
|
-
class
|
|
180
|
+
class us {
|
|
181
181
|
/**
|
|
182
182
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
183
183
|
*
|
|
@@ -199,7 +199,7 @@ class cs {
|
|
|
199
199
|
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;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
|
-
class
|
|
202
|
+
class ps {
|
|
203
203
|
/**
|
|
204
204
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
205
205
|
*
|
|
@@ -244,7 +244,7 @@ class ls {
|
|
|
244
244
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
class
|
|
247
|
+
class hs {
|
|
248
248
|
/**
|
|
249
249
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
250
250
|
*
|
|
@@ -283,7 +283,7 @@ class us {
|
|
|
283
283
|
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"];
|
|
284
284
|
}
|
|
285
285
|
}
|
|
286
|
-
class
|
|
286
|
+
class gs {
|
|
287
287
|
/**
|
|
288
288
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
289
289
|
*
|
|
@@ -327,18 +327,18 @@ class ps {
|
|
|
327
327
|
*/
|
|
328
328
|
s(this, "dateFormats");
|
|
329
329
|
var e, t, i;
|
|
330
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
330
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new us(r == null ? void 0 : r.http), this.deviceTypeByResolution = new ls(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new ps({
|
|
331
331
|
environment: this.environment,
|
|
332
332
|
...r == null ? void 0 : r.sentry
|
|
333
|
-
}), 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
|
|
333
|
+
}), 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 hs(r.websocket) : void 0, this.dateFormats = {
|
|
334
334
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
335
335
|
uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
|
|
336
336
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
337
337
|
};
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
|
-
const S =
|
|
341
|
-
const n =
|
|
340
|
+
const S = ie("common.config", () => {
|
|
341
|
+
const n = w(new gs());
|
|
342
342
|
return {
|
|
343
343
|
/**
|
|
344
344
|
* Конфигурационные данные приложения.
|
|
@@ -356,7 +356,7 @@ const S = se("common.config", () => {
|
|
|
356
356
|
* @param appConfig Конфигурация приложения.
|
|
357
357
|
*/
|
|
358
358
|
setConfig: (t) => {
|
|
359
|
-
n.value =
|
|
359
|
+
n.value = qe(n.value, t);
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
362
|
});
|
|
@@ -379,7 +379,7 @@ class je {
|
|
|
379
379
|
if (e)
|
|
380
380
|
try {
|
|
381
381
|
const t = JSON.parse(e);
|
|
382
|
-
if (!t.availableFor ||
|
|
382
|
+
if (!t.availableFor || Br(k(t.availableFor) || _e(), /* @__PURE__ */ new Date())) {
|
|
383
383
|
if (a(t.data) || Q(t.data))
|
|
384
384
|
throw new Error("Data is empty");
|
|
385
385
|
return t.data;
|
|
@@ -454,7 +454,7 @@ class je {
|
|
|
454
454
|
const i = localStorage.getItem(t);
|
|
455
455
|
if (i) {
|
|
456
456
|
const o = JSON.parse(i);
|
|
457
|
-
o.availableFor && !
|
|
457
|
+
o.availableFor && !Br(k(o.availableFor) || _e(), /* @__PURE__ */ new Date()) && r.push(t);
|
|
458
458
|
}
|
|
459
459
|
} catch {
|
|
460
460
|
r.push(t);
|
|
@@ -470,16 +470,16 @@ class je {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Gr(n) {
|
|
474
474
|
try {
|
|
475
|
-
const r =
|
|
475
|
+
const r = be.getJwtPayload(n);
|
|
476
476
|
return new Date(r.exp * 1e3);
|
|
477
477
|
} catch {
|
|
478
478
|
return;
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
const
|
|
482
|
-
const n =
|
|
481
|
+
const ge = ie("common.auth_state_private", () => {
|
|
482
|
+
const n = w(
|
|
483
483
|
(() => {
|
|
484
484
|
var u;
|
|
485
485
|
const o = je.getActualDataFromStorage(
|
|
@@ -491,11 +491,11 @@ const pe = se("common.auth_state_private", () => {
|
|
|
491
491
|
const c = (u = S().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
492
492
|
return c ? Promise.resolve(c) : void 0;
|
|
493
493
|
})()
|
|
494
|
-
), r =
|
|
494
|
+
), r = w(void 0), e = w(void 0), t = Qt(/* @__PURE__ */ new Map());
|
|
495
495
|
function i() {
|
|
496
496
|
e.value = void 0, a(n.value) || n.value.then((o) => {
|
|
497
|
-
const c =
|
|
498
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
497
|
+
const c = be.getJwtPayload(o);
|
|
498
|
+
e.value = c.exp * 1e3 > Date.now() ? nt(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
499
499
|
}).catch(C);
|
|
500
500
|
}
|
|
501
501
|
return {
|
|
@@ -520,47 +520,47 @@ const pe = se("common.auth_state_private", () => {
|
|
|
520
520
|
*/
|
|
521
521
|
recalculateUserPermissions: i
|
|
522
522
|
};
|
|
523
|
-
}),
|
|
523
|
+
}), hr = ie("common.auth_state", () => {
|
|
524
524
|
const n = R(() => {
|
|
525
|
-
const o =
|
|
525
|
+
const o = ge();
|
|
526
526
|
if (a(o.jwtToken) && !a(o.jwtTokenUpdater)) {
|
|
527
527
|
const c = o.jwtTokenUpdater();
|
|
528
528
|
o.jwtToken = c, c.then((u) => {
|
|
529
|
-
o.jwtToken = Promise.resolve(u), je.saveActualDataToStorage("sc.token", u,
|
|
529
|
+
o.jwtToken = Promise.resolve(u), je.saveActualDataToStorage("sc.token", u, Gr(u)), o.recalculateUserPermissions();
|
|
530
530
|
}).catch(C);
|
|
531
531
|
}
|
|
532
532
|
return o.jwtToken;
|
|
533
533
|
});
|
|
534
534
|
function r(o) {
|
|
535
|
-
|
|
535
|
+
ge().jwtTokenUpdater = o;
|
|
536
536
|
}
|
|
537
537
|
function e(o) {
|
|
538
|
-
const c =
|
|
539
|
-
c.jwtToken = Promise.resolve(o), je.saveActualDataToStorage("sc.token", o,
|
|
538
|
+
const c = ge();
|
|
539
|
+
c.jwtToken = Promise.resolve(o), je.saveActualDataToStorage("sc.token", o, Gr(o)), c.recalculateUserPermissions();
|
|
540
540
|
}
|
|
541
541
|
function t() {
|
|
542
|
-
const o =
|
|
542
|
+
const o = ge();
|
|
543
543
|
o.jwtToken = void 0, o.userPermissions = void 0, je.saveActualDataToStorage("sc.token", void 0);
|
|
544
544
|
}
|
|
545
545
|
function i(o) {
|
|
546
|
-
const c =
|
|
546
|
+
const c = ge();
|
|
547
547
|
!a(c.jwtToken) && a(c.userPermissions) && c.jwtToken.then((g) => {
|
|
548
|
-
const y =
|
|
549
|
-
c.userPermissions = y.exp * 1e3 > Date.now() ?
|
|
548
|
+
const y = be.getJwtPayload(g);
|
|
549
|
+
c.userPermissions = y.exp * 1e3 > Date.now() ? nt(y.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
|
|
550
550
|
}).catch(C);
|
|
551
|
-
const u =
|
|
551
|
+
const u = G(o) ? o.join(" && ") : o;
|
|
552
552
|
if (c.userPermissionsComputedRefs.has(u))
|
|
553
553
|
return c.userPermissionsComputedRefs.get(u);
|
|
554
554
|
const p = R(() => {
|
|
555
555
|
const g = (y) => {
|
|
556
|
-
var
|
|
557
|
-
const D =
|
|
556
|
+
var pe;
|
|
557
|
+
const D = Ft(y, ".");
|
|
558
558
|
if (D.length < 2)
|
|
559
559
|
return !1;
|
|
560
|
-
const [de, Te] = D,
|
|
561
|
-
return
|
|
560
|
+
const [de, Te] = D, ue = (pe = ge().userPermissions) == null ? void 0 : pe[de];
|
|
561
|
+
return G(ue) && ue.includes(Te);
|
|
562
562
|
};
|
|
563
|
-
return
|
|
563
|
+
return G(o) ? Nt(o, (y) => g(y)) : g(o);
|
|
564
564
|
});
|
|
565
565
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
566
566
|
}
|
|
@@ -593,8 +593,8 @@ const pe = se("common.auth_state_private", () => {
|
|
|
593
593
|
hasUserPermission: i
|
|
594
594
|
};
|
|
595
595
|
});
|
|
596
|
-
var
|
|
597
|
-
class
|
|
596
|
+
var Ye = /* @__PURE__ */ ((n) => (n.Image = "image", n.Video = "video", n))(Ye || {});
|
|
597
|
+
class ne {
|
|
598
598
|
/**
|
|
599
599
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
600
600
|
*
|
|
@@ -619,7 +619,7 @@ class be {
|
|
|
619
619
|
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : a(this.id);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
class
|
|
622
|
+
class Rr extends ne {
|
|
623
623
|
/**
|
|
624
624
|
* Инициализирует экземпляр класса {@link BlogPostMediaFile}.
|
|
625
625
|
*
|
|
@@ -647,23 +647,23 @@ class Dr extends be {
|
|
|
647
647
|
* @inheritDoc
|
|
648
648
|
*/
|
|
649
649
|
s(this, "urlWebp");
|
|
650
|
-
this.mediaType = (e == null ? void 0 : e.mediaType) ??
|
|
650
|
+
this.mediaType = (e == null ? void 0 : e.mediaType) ?? Ye.Image, this.isCover = (e == null ? void 0 : e.isCover) ?? !1, this.isUnused = (e == null ? void 0 : e.isUnused) ?? !1, this.url = (e == null ? void 0 : e.url) ?? "", this.urlWebp = e == null ? void 0 : e.urlWebp;
|
|
651
651
|
}
|
|
652
652
|
/**
|
|
653
653
|
* Возвращает признак того, что медиафайл является изображением.
|
|
654
654
|
*/
|
|
655
655
|
isImage() {
|
|
656
|
-
return this.mediaType ===
|
|
656
|
+
return this.mediaType === Ye.Image;
|
|
657
657
|
}
|
|
658
658
|
/**
|
|
659
659
|
* Возвращает признак того, что медиафайл является видео.
|
|
660
660
|
*/
|
|
661
661
|
isVideo() {
|
|
662
|
-
return this.mediaType ===
|
|
662
|
+
return this.mediaType === Ye.Video;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var
|
|
666
|
-
class
|
|
665
|
+
var Qe = /* @__PURE__ */ ((n) => (n.Draft = "draft", n.Published = "published", n.Scheduled = "scheduled", n))(Qe || {});
|
|
666
|
+
class J {
|
|
667
667
|
/**
|
|
668
668
|
* Преобразует значение даты из данных ответа в дату.
|
|
669
669
|
* Строки разбираются как ISO-даты; нечитаемое значение равносильно отсутствию даты.
|
|
@@ -674,10 +674,10 @@ class V {
|
|
|
674
674
|
if (a(r))
|
|
675
675
|
return;
|
|
676
676
|
const e = I(r) ? k(r) : r;
|
|
677
|
-
return
|
|
677
|
+
return Vt(e) ? e : void 0;
|
|
678
678
|
}
|
|
679
679
|
}
|
|
680
|
-
class
|
|
680
|
+
class Xe extends ne {
|
|
681
681
|
/**
|
|
682
682
|
* Инициализирует экземпляр класса {@link CreatableIdentity}.
|
|
683
683
|
*
|
|
@@ -690,10 +690,10 @@ class Je extends be {
|
|
|
690
690
|
* Дата и время создания записи. Если не задана в данных, используется текущий момент.
|
|
691
691
|
*/
|
|
692
692
|
s(this, "createdAt");
|
|
693
|
-
this.createdAt =
|
|
693
|
+
this.createdAt = J.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
class Ne extends
|
|
696
|
+
class Ne extends Xe {
|
|
697
697
|
/**
|
|
698
698
|
* Инициализирует экземпляр класса {@link BlogPostShortInfo}.
|
|
699
699
|
*
|
|
@@ -721,7 +721,7 @@ class Ne extends Je {
|
|
|
721
721
|
* @param publishedAt Дата и время публикации статьи.
|
|
722
722
|
*/
|
|
723
723
|
static resolvePublicationStatus(e) {
|
|
724
|
-
return a(e) ?
|
|
724
|
+
return a(e) ? Qe.Draft : e.getTime() > Date.now() ? Qe.Scheduled : Qe.Published;
|
|
725
725
|
}
|
|
726
726
|
/**
|
|
727
727
|
* Возвращает описание ошибки символьного обозначения статьи либо пустую строку,
|
|
@@ -733,7 +733,7 @@ class Ne extends Je {
|
|
|
733
733
|
* @param slug Символьное обозначение статьи.
|
|
734
734
|
*/
|
|
735
735
|
static getSlugError(e) {
|
|
736
|
-
return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." :
|
|
736
|
+
return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : Ut(e, "-") || Mt(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Ht(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
|
|
737
737
|
}
|
|
738
738
|
/**
|
|
739
739
|
* Преобразует значение даты, полученное из API, в объект {@link Date}.
|
|
@@ -750,7 +750,7 @@ class Ne extends Je {
|
|
|
750
750
|
return Ne.resolvePublicationStatus(this.publishedAt);
|
|
751
751
|
}
|
|
752
752
|
}
|
|
753
|
-
class
|
|
753
|
+
class gr extends Ne {
|
|
754
754
|
/**
|
|
755
755
|
* Инициализирует экземпляр класса {@link BlogPost}.
|
|
756
756
|
*
|
|
@@ -766,7 +766,7 @@ class pr extends Ne {
|
|
|
766
766
|
* @inheritDoc
|
|
767
767
|
*/
|
|
768
768
|
s(this, "media");
|
|
769
|
-
this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new
|
|
769
|
+
this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new Rr(t));
|
|
770
770
|
}
|
|
771
771
|
/**
|
|
772
772
|
* Возвращает данные статьи для отправки на портал.
|
|
@@ -807,7 +807,7 @@ class Me {
|
|
|
807
807
|
return Object.keys(this).forEach((e) => {
|
|
808
808
|
const t = this[e];
|
|
809
809
|
a(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
810
|
-
I(t) && t.trim().length === 0 ||
|
|
810
|
+
I(t) && t.trim().length === 0 || kr(t.isNewRec) && t.isNewRec() || (r[e] = t);
|
|
811
811
|
}), r;
|
|
812
812
|
}
|
|
813
813
|
}
|
|
@@ -829,7 +829,7 @@ class b {
|
|
|
829
829
|
this.from = I(r == null ? void 0 : r.from) ? k(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = I(r == null ? void 0 : r.to) ? k(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
830
830
|
}
|
|
831
831
|
}
|
|
832
|
-
class
|
|
832
|
+
class ii extends Me {
|
|
833
833
|
/**
|
|
834
834
|
* Инициализирует экземпляр класса {@link BlogPostsListFilters}.
|
|
835
835
|
*
|
|
@@ -931,9 +931,9 @@ class x {
|
|
|
931
931
|
* @throws TypeError Если вместо списка данных получены данные другого типа.
|
|
932
932
|
*/
|
|
933
933
|
static instanceListInitializer(r, e) {
|
|
934
|
-
if (!
|
|
934
|
+
if (!G(e))
|
|
935
935
|
throw new TypeError(`Ожидался список данных для инициализации "${r.name}", получены данные типа "${typeof e}".`);
|
|
936
|
-
return
|
|
936
|
+
return V(e, (t) => x.instanceInitializer(r, t));
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
const P = class P {
|
|
@@ -975,7 +975,7 @@ const P = class P {
|
|
|
975
975
|
// eslint-disable-next-line class-methods-use-this
|
|
976
976
|
s(this, "authRequestInterceptor", async (r) => {
|
|
977
977
|
let e;
|
|
978
|
-
return a(
|
|
978
|
+
return a(hr().jwtToken) || (e = await hr().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
979
979
|
});
|
|
980
980
|
/**
|
|
981
981
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -990,7 +990,7 @@ const P = class P {
|
|
|
990
990
|
* @param request Данные запроса.
|
|
991
991
|
*/
|
|
992
992
|
// eslint-disable-next-line class-methods-use-this
|
|
993
|
-
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
993
|
+
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Hr(r.params)), ["put", "patch", "post"].includes(Bt(r.method)) && r.data && (r.data = Hr(r.data))), r));
|
|
994
994
|
/**
|
|
995
995
|
* Перехватчик ошибок ответов на запрос.
|
|
996
996
|
*
|
|
@@ -999,7 +999,7 @@ const P = class P {
|
|
|
999
999
|
s(this, "authErrorsResponseInterceptors", (r) => {
|
|
1000
1000
|
var t;
|
|
1001
1001
|
const e = r.rawError ? (t = r.rawError) == null ? void 0 : t.config : void 0;
|
|
1002
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
1002
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (hr().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
1003
1003
|
});
|
|
1004
1004
|
/**
|
|
1005
1005
|
* Перехватчик ответа для приведения отмены запроса (AbortController) к единому виду.
|
|
@@ -1010,7 +1010,7 @@ const P = class P {
|
|
|
1010
1010
|
s(this, "canceledResponseInterceptor", (r) => {
|
|
1011
1011
|
const e = r.rawError ?? r;
|
|
1012
1012
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
1013
|
-
throw new
|
|
1013
|
+
throw new cs("Request canceled");
|
|
1014
1014
|
return Promise.reject(r);
|
|
1015
1015
|
});
|
|
1016
1016
|
/**
|
|
@@ -1026,8 +1026,8 @@ const P = class P {
|
|
|
1026
1026
|
* @param response Данные ответа на запрос.
|
|
1027
1027
|
*/
|
|
1028
1028
|
// eslint-disable-next-line class-methods-use-this
|
|
1029
|
-
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1030
|
-
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient =
|
|
1029
|
+
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Or(r.data)), r));
|
|
1030
|
+
this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = os.create({
|
|
1031
1031
|
headers: {
|
|
1032
1032
|
Accept: "application/json",
|
|
1033
1033
|
"Content-Type": "application/json"
|
|
@@ -1102,12 +1102,12 @@ const P = class P {
|
|
|
1102
1102
|
* @param error Данные об ошибке.
|
|
1103
1103
|
*/
|
|
1104
1104
|
static toHttpResponseError(r) {
|
|
1105
|
-
return
|
|
1105
|
+
return Lr(r) && "status" in r ? r : {
|
|
1106
1106
|
status: 0,
|
|
1107
1107
|
statusText: "Invalid response data",
|
|
1108
|
-
message:
|
|
1108
|
+
message: Mr(r) ? r.message : "Не удалось обработать данные ответа сервера.",
|
|
1109
1109
|
headers: {},
|
|
1110
|
-
rawError:
|
|
1110
|
+
rawError: Mr(r) ? r : new Error(String(r))
|
|
1111
1111
|
};
|
|
1112
1112
|
}
|
|
1113
1113
|
/**
|
|
@@ -1241,8 +1241,8 @@ s(P, "requestHooks", []), /**
|
|
|
1241
1241
|
*/
|
|
1242
1242
|
s(P, "responseHooks", []);
|
|
1243
1243
|
let h = P;
|
|
1244
|
-
var
|
|
1245
|
-
class
|
|
1244
|
+
var Ir = /* @__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))(Ir || {});
|
|
1245
|
+
class Er {
|
|
1246
1246
|
/**
|
|
1247
1247
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
1248
1248
|
*
|
|
@@ -1261,7 +1261,7 @@ class zr {
|
|
|
1261
1261
|
* Значение с которым сравнивается поле.
|
|
1262
1262
|
*/
|
|
1263
1263
|
s(this, "value");
|
|
1264
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
1264
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Ir.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1265
1265
|
}
|
|
1266
1266
|
/**
|
|
1267
1267
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -1273,20 +1273,20 @@ class zr {
|
|
|
1273
1273
|
field: this.field,
|
|
1274
1274
|
op: this.op
|
|
1275
1275
|
};
|
|
1276
|
-
if (
|
|
1277
|
-
e.value =
|
|
1278
|
-
else if (
|
|
1276
|
+
if (Dr(this.value))
|
|
1277
|
+
e.value = A(this.value, r);
|
|
1278
|
+
else if (Wt(this.value)) {
|
|
1279
1279
|
const t = this.value;
|
|
1280
1280
|
e.value = {
|
|
1281
|
-
from: t.from ?
|
|
1282
|
-
to: t.to ?
|
|
1281
|
+
from: t.from ? A(t.from, r) : null,
|
|
1282
|
+
to: t.to ? A(t.to, r) : null
|
|
1283
1283
|
};
|
|
1284
1284
|
} else
|
|
1285
1285
|
e.value = this.value;
|
|
1286
1286
|
return e;
|
|
1287
1287
|
}
|
|
1288
1288
|
}
|
|
1289
|
-
class
|
|
1289
|
+
class re {
|
|
1290
1290
|
/**
|
|
1291
1291
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
1292
1292
|
*
|
|
@@ -1306,7 +1306,7 @@ class ee {
|
|
|
1306
1306
|
*/
|
|
1307
1307
|
s(this, "groups");
|
|
1308
1308
|
var e, t;
|
|
1309
|
-
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
|
|
1309
|
+
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 Er(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new re(i))) ?? [];
|
|
1310
1310
|
}
|
|
1311
1311
|
/**
|
|
1312
1312
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -1316,12 +1316,12 @@ class ee {
|
|
|
1316
1316
|
toPrimitive() {
|
|
1317
1317
|
return {
|
|
1318
1318
|
groupOp: this.groupOp,
|
|
1319
|
-
filters: this.filters.map((r) => r instanceof
|
|
1320
|
-
groups: this.groups.map((r) => r instanceof
|
|
1319
|
+
filters: this.filters.map((r) => r instanceof Er && kr(r.toPrimitive) ? r.toPrimitive() : r),
|
|
1320
|
+
groups: this.groups.map((r) => r instanceof re ? r.toPrimitive() : r)
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
|
-
class
|
|
1324
|
+
class M extends h {
|
|
1325
1325
|
/**
|
|
1326
1326
|
* Получает пагинированный список данных.
|
|
1327
1327
|
*
|
|
@@ -1339,7 +1339,7 @@ class j extends h {
|
|
|
1339
1339
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
1340
1340
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
1341
1341
|
};
|
|
1342
|
-
return e && (g.filters = JSON.stringify((e instanceof
|
|
1342
|
+
return e && (g.filters = JSON.stringify((e instanceof re ? e : new re(e)).toPrimitive())), Q(t) || (g.sort = G(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u, p);
|
|
1343
1343
|
}
|
|
1344
1344
|
/**
|
|
1345
1345
|
* Получает пагинированный список экземпляров указанного класса.
|
|
@@ -1369,7 +1369,7 @@ class j extends h {
|
|
|
1369
1369
|
);
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
class
|
|
1372
|
+
class br extends M {
|
|
1373
1373
|
/**
|
|
1374
1374
|
* Возвращает данные статьи блога, подготовленные для отправки на портал.
|
|
1375
1375
|
*
|
|
@@ -1382,7 +1382,7 @@ class Pr extends j {
|
|
|
1382
1382
|
const e = {};
|
|
1383
1383
|
if (Be(r.title) || (e.title = r.title), Be(r.slug) || (e.slug = r.slug), Be(r.content) || (e.content = r.content), !Be(r.publishedAt)) {
|
|
1384
1384
|
const t = S().config.dateFormats.api;
|
|
1385
|
-
e.publishedAt = a(r.publishedAt) ? null :
|
|
1385
|
+
e.publishedAt = a(r.publishedAt) ? null : A(r.publishedAt, t);
|
|
1386
1386
|
}
|
|
1387
1387
|
return e;
|
|
1388
1388
|
}
|
|
@@ -1413,7 +1413,7 @@ class Pr extends j {
|
|
|
1413
1413
|
* @see /doc/api/internal#/operations/api_internal_blog_get
|
|
1414
1414
|
*/
|
|
1415
1415
|
getPost(r) {
|
|
1416
|
-
return this.get(`/internal/blog/${r}`, {}, (e) => new
|
|
1416
|
+
return this.get(`/internal/blog/${r}`, {}, (e) => new gr(e.data));
|
|
1417
1417
|
}
|
|
1418
1418
|
/**
|
|
1419
1419
|
* Создаёт новую статью блога.
|
|
@@ -1426,7 +1426,7 @@ class Pr extends j {
|
|
|
1426
1426
|
* @see /doc/api/internal#/operations/api_internal_blog_create
|
|
1427
1427
|
*/
|
|
1428
1428
|
createPost(r, e = {}) {
|
|
1429
|
-
return this.post("/internal/blog",
|
|
1429
|
+
return this.post("/internal/blog", br.preparePostSaveData(r), (t) => new gr(t.data), e);
|
|
1430
1430
|
}
|
|
1431
1431
|
/**
|
|
1432
1432
|
* Изменяет данные о статье блога.
|
|
@@ -1440,7 +1440,7 @@ class Pr extends j {
|
|
|
1440
1440
|
* @see /doc/api/internal#/operations/api_internal_blog_update
|
|
1441
1441
|
*/
|
|
1442
1442
|
updatePost(r, e, t = {}) {
|
|
1443
|
-
return this.patch(`/internal/blog/${r}`,
|
|
1443
|
+
return this.patch(`/internal/blog/${r}`, br.preparePostSaveData(e), (i) => new gr(i.data), t);
|
|
1444
1444
|
}
|
|
1445
1445
|
/**
|
|
1446
1446
|
* Удаляет статью блога.
|
|
@@ -1475,7 +1475,7 @@ class Pr extends j {
|
|
|
1475
1475
|
i && i(c.total ? Math.round(c.loaded / c.total * 100) : 0);
|
|
1476
1476
|
}
|
|
1477
1477
|
},
|
|
1478
|
-
(c) => new
|
|
1478
|
+
(c) => new Rr(c.data),
|
|
1479
1479
|
o
|
|
1480
1480
|
);
|
|
1481
1481
|
}
|
|
@@ -1495,7 +1495,7 @@ class Pr extends j {
|
|
|
1495
1495
|
return this.patch(
|
|
1496
1496
|
`/internal/blog/${r}/media/${e}`,
|
|
1497
1497
|
{ isCover: t },
|
|
1498
|
-
(o) => new
|
|
1498
|
+
(o) => new Rr(o.data),
|
|
1499
1499
|
i
|
|
1500
1500
|
);
|
|
1501
1501
|
}
|
|
@@ -1513,7 +1513,7 @@ class Pr extends j {
|
|
|
1513
1513
|
return this.delete(`/internal/blog/${r}/media/${e}`);
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
class
|
|
1516
|
+
class _ extends ne {
|
|
1517
1517
|
/**
|
|
1518
1518
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1519
1519
|
*
|
|
@@ -1534,7 +1534,7 @@ class N extends be {
|
|
|
1534
1534
|
return Q(this.name) ? this.guid : this.name;
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
1537
|
-
class
|
|
1537
|
+
class Ze extends _ {
|
|
1538
1538
|
/**
|
|
1539
1539
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1540
1540
|
*
|
|
@@ -1550,10 +1550,10 @@ class Ke extends N {
|
|
|
1550
1550
|
* Дата и время последнего изменения.
|
|
1551
1551
|
*/
|
|
1552
1552
|
s(this, "updatedAt");
|
|
1553
|
-
this.createdAt =
|
|
1553
|
+
this.createdAt = J.parse(e == null ? void 0 : e.createdAt), this.updatedAt = J.parse(e == null ? void 0 : e.updatedAt);
|
|
1554
1554
|
}
|
|
1555
1555
|
}
|
|
1556
|
-
class
|
|
1556
|
+
class er extends Ze {
|
|
1557
1557
|
/**
|
|
1558
1558
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1559
1559
|
*
|
|
@@ -1565,10 +1565,10 @@ class Xe extends Ke {
|
|
|
1565
1565
|
* Дата и время последнего удаления.
|
|
1566
1566
|
*/
|
|
1567
1567
|
s(this, "deletedAt");
|
|
1568
|
-
this.deletedAt =
|
|
1568
|
+
this.deletedAt = J.parse(e == null ? void 0 : e.deletedAt);
|
|
1569
1569
|
}
|
|
1570
1570
|
}
|
|
1571
|
-
class
|
|
1571
|
+
class q extends _ {
|
|
1572
1572
|
/**
|
|
1573
1573
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1574
1574
|
*
|
|
@@ -1587,7 +1587,7 @@ class _ extends N {
|
|
|
1587
1587
|
this.type = e == null ? void 0 : e.type, this.isActive = (e == null ? void 0 : e.isActive) ?? !0;
|
|
1588
1588
|
}
|
|
1589
1589
|
}
|
|
1590
|
-
class
|
|
1590
|
+
class fs extends er {
|
|
1591
1591
|
/**
|
|
1592
1592
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1593
1593
|
*
|
|
@@ -1619,10 +1619,10 @@ class hs extends Xe {
|
|
|
1619
1619
|
* Краткие данные о пользователе.
|
|
1620
1620
|
*/
|
|
1621
1621
|
s(this, "owner");
|
|
1622
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = I(e == null ? void 0 : e.publishedAt) ? k(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
|
|
1622
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = I(e == null ? void 0 : e.publishedAt) ? k(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 q(e == null ? void 0 : e.owner);
|
|
1623
1623
|
}
|
|
1624
1624
|
}
|
|
1625
|
-
class
|
|
1625
|
+
class ye extends Ze {
|
|
1626
1626
|
/**
|
|
1627
1627
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1628
1628
|
*
|
|
@@ -1638,11 +1638,11 @@ class fe extends Ke {
|
|
|
1638
1638
|
* Данные о пользователе, создавшем шаблон прайс-листа.
|
|
1639
1639
|
*/
|
|
1640
1640
|
s(this, "owner");
|
|
1641
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.owner = e != null && e.owner ? new
|
|
1641
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.owner = e != null && e.owner ? new q(e.owner) : void 0;
|
|
1642
1642
|
}
|
|
1643
1643
|
}
|
|
1644
|
-
var
|
|
1645
|
-
class
|
|
1644
|
+
var lt = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(lt || {});
|
|
1645
|
+
class v extends _ {
|
|
1646
1646
|
/**
|
|
1647
1647
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
1648
1648
|
*
|
|
@@ -1661,21 +1661,21 @@ class w extends N {
|
|
|
1661
1661
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
|
-
class
|
|
1664
|
+
class oe extends v {
|
|
1665
1665
|
/**
|
|
1666
1666
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
1667
1667
|
*/
|
|
1668
1668
|
static getRetailPriceCoefficient() {
|
|
1669
|
-
const r = new
|
|
1669
|
+
const r = new oe({
|
|
1670
1670
|
id: -2,
|
|
1671
|
-
slug:
|
|
1671
|
+
slug: lt.Retail,
|
|
1672
1672
|
name: "Розн. цена",
|
|
1673
1673
|
guid: ""
|
|
1674
1674
|
});
|
|
1675
|
-
return r.isNewRec =
|
|
1675
|
+
return r.isNewRec = zt(!0), r;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
|
-
class
|
|
1678
|
+
class xr {
|
|
1679
1679
|
/**
|
|
1680
1680
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
1681
1681
|
*
|
|
@@ -1702,10 +1702,10 @@ class Or {
|
|
|
1702
1702
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
1703
1703
|
*/
|
|
1704
1704
|
s(this, "readOnly");
|
|
1705
|
-
this.coefficient = new
|
|
1705
|
+
this.coefficient = new oe(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;
|
|
1706
1706
|
}
|
|
1707
1707
|
}
|
|
1708
|
-
class
|
|
1708
|
+
class ut {
|
|
1709
1709
|
/**
|
|
1710
1710
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
1711
1711
|
*
|
|
@@ -1723,9 +1723,9 @@ class ct {
|
|
|
1723
1723
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
|
-
class
|
|
1726
|
+
class K extends v {
|
|
1727
1727
|
}
|
|
1728
|
-
class He extends
|
|
1728
|
+
class He extends v {
|
|
1729
1729
|
/**
|
|
1730
1730
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
1731
1731
|
*
|
|
@@ -1754,10 +1754,10 @@ class He extends w {
|
|
|
1754
1754
|
* Координаты склада.
|
|
1755
1755
|
*/
|
|
1756
1756
|
s(this, "coordinates");
|
|
1757
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new
|
|
1757
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new ut(e == null ? void 0 : e.coordinates);
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
|
-
class
|
|
1760
|
+
class ms {
|
|
1761
1761
|
/**
|
|
1762
1762
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
1763
1763
|
*
|
|
@@ -1775,7 +1775,7 @@ class gs {
|
|
|
1775
1775
|
this.warehouse = new He(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
1776
1776
|
}
|
|
1777
1777
|
}
|
|
1778
|
-
class E extends
|
|
1778
|
+
class E extends _ {
|
|
1779
1779
|
/**
|
|
1780
1780
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1781
1781
|
*
|
|
@@ -1802,7 +1802,7 @@ class E extends N {
|
|
|
1802
1802
|
e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
|
|
1803
1803
|
}
|
|
1804
1804
|
}
|
|
1805
|
-
class
|
|
1805
|
+
class jr extends _ {
|
|
1806
1806
|
/**
|
|
1807
1807
|
* Инициализирует экземпляр класса {@link ProductUnit}.
|
|
1808
1808
|
*
|
|
@@ -1829,7 +1829,7 @@ class Er extends N {
|
|
|
1829
1829
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
class
|
|
1832
|
+
class Fe extends _ {
|
|
1833
1833
|
/**
|
|
1834
1834
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1835
1835
|
*
|
|
@@ -1844,7 +1844,7 @@ class Ue extends N {
|
|
|
1844
1844
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
1845
1845
|
}
|
|
1846
1846
|
}
|
|
1847
|
-
class
|
|
1847
|
+
class pt extends Fe {
|
|
1848
1848
|
/**
|
|
1849
1849
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
1850
1850
|
*
|
|
@@ -1863,7 +1863,7 @@ class lt extends Ue {
|
|
|
1863
1863
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
1864
1864
|
}
|
|
1865
1865
|
}
|
|
1866
|
-
class
|
|
1866
|
+
class ys extends pt {
|
|
1867
1867
|
/**
|
|
1868
1868
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
1869
1869
|
*
|
|
@@ -1878,7 +1878,7 @@ class fs extends lt {
|
|
|
1878
1878
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
1879
1879
|
}
|
|
1880
1880
|
}
|
|
1881
|
-
class
|
|
1881
|
+
class as {
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Инициализирует экземпляр класса {@link Image}.
|
|
1884
1884
|
*
|
|
@@ -1901,7 +1901,7 @@ class ms {
|
|
|
1901
1901
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
1902
1902
|
}
|
|
1903
1903
|
}
|
|
1904
|
-
class
|
|
1904
|
+
class dr extends pt {
|
|
1905
1905
|
/**
|
|
1906
1906
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
1907
1907
|
*
|
|
@@ -1916,7 +1916,7 @@ class Rr extends lt {
|
|
|
1916
1916
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
class
|
|
1919
|
+
class N extends ys {
|
|
1920
1920
|
/**
|
|
1921
1921
|
* Инициализирует экземпляр класса {@link Product}.
|
|
1922
1922
|
*
|
|
@@ -1993,9 +1993,9 @@ class q extends fs {
|
|
|
1993
1993
|
* Список коэффициентов цен на продукт.
|
|
1994
1994
|
*/
|
|
1995
1995
|
s(this, "priceCoefficients");
|
|
1996
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new
|
|
1996
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new jr(e.unit) : new jr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new E(e.currency) : new E(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = I(e == null ? void 0 : e.costDate) ? k(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 ms(p))) ?? [], this.type = "product";
|
|
1997
1997
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1998
|
-
t && (this.category = new
|
|
1998
|
+
t && (this.category = new dr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new dr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new as(p, S().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 xr(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1999
1999
|
}
|
|
2000
2000
|
/**
|
|
2001
2001
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -2016,8 +2016,8 @@ class q extends fs {
|
|
|
2016
2016
|
return this.retailCostRub ?? this.costRub;
|
|
2017
2017
|
}
|
|
2018
2018
|
}
|
|
2019
|
-
var
|
|
2020
|
-
class
|
|
2019
|
+
var qr = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(qr || {});
|
|
2020
|
+
class ve extends N {
|
|
2021
2021
|
/**
|
|
2022
2022
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
2023
2023
|
*
|
|
@@ -2061,10 +2061,10 @@ class ae extends q {
|
|
|
2061
2061
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
2062
2062
|
*/
|
|
2063
2063
|
s(this, "isFavorite");
|
|
2064
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
2064
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? qr.Product, this.discount = e != null && e.discount ? new fs(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new ye(e.priceTemplate) : void 0, this.priceCoefficient = e != null && e.priceCoefficient ? new oe(e.priceCoefficient) : void 0, this.increasePercent = e == null ? void 0 : e.increasePercent, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
class
|
|
2067
|
+
class ce extends dr {
|
|
2068
2068
|
/**
|
|
2069
2069
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
2070
2070
|
*
|
|
@@ -2088,10 +2088,10 @@ class ne extends Rr {
|
|
|
2088
2088
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
2089
2089
|
*/
|
|
2090
2090
|
s(this, "currencyRates");
|
|
2091
|
-
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(([t, i]) => [
|
|
2091
|
+
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(([t, i]) => [Gt(t), i])) : void 0;
|
|
2092
2092
|
}
|
|
2093
2093
|
}
|
|
2094
|
-
class
|
|
2094
|
+
class ht extends ne {
|
|
2095
2095
|
/**
|
|
2096
2096
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
2097
2097
|
*
|
|
@@ -2167,10 +2167,10 @@ class ut extends be {
|
|
|
2167
2167
|
* @inheritDoc
|
|
2168
2168
|
*/
|
|
2169
2169
|
s(this, "replacementId");
|
|
2170
|
-
this.product = new
|
|
2170
|
+
this.product = new ve(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ce(), this.currency = e.currency ? new E(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Et(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new q(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
2171
2171
|
}
|
|
2172
2172
|
}
|
|
2173
|
-
let
|
|
2173
|
+
let _r = class extends ht {
|
|
2174
2174
|
/**
|
|
2175
2175
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
2176
2176
|
*
|
|
@@ -2214,7 +2214,7 @@ let xr = class extends ut {
|
|
|
2214
2214
|
* @inheritDoc
|
|
2215
2215
|
*/
|
|
2216
2216
|
s(this, "currency");
|
|
2217
|
-
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 =
|
|
2217
|
+
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 = G(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new E(e.currency);
|
|
2218
2218
|
}
|
|
2219
2219
|
};
|
|
2220
2220
|
class ke {
|
|
@@ -2236,10 +2236,10 @@ class ke {
|
|
|
2236
2236
|
* @inheritDoc
|
|
2237
2237
|
*/
|
|
2238
2238
|
s(this, "directionsSum");
|
|
2239
|
-
this.items = r.items.map((e) => new
|
|
2239
|
+
this.items = r.items.map((e) => new _r(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
2240
2240
|
}
|
|
2241
2241
|
}
|
|
2242
|
-
class
|
|
2242
|
+
class oi extends h {
|
|
2243
2243
|
/**
|
|
2244
2244
|
* Возвращает содержимое корзины указанного клиента.
|
|
2245
2245
|
*
|
|
@@ -2353,8 +2353,8 @@ class ii extends h {
|
|
|
2353
2353
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
2354
2354
|
}
|
|
2355
2355
|
}
|
|
2356
|
-
var
|
|
2357
|
-
class
|
|
2356
|
+
var ws = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(ws || {}), vs = /* @__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))(vs || {}), gt = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(gt || {});
|
|
2357
|
+
class j extends ce {
|
|
2358
2358
|
/**
|
|
2359
2359
|
* Инициализирует экземпляр класса {@link Category}.
|
|
2360
2360
|
*
|
|
@@ -2371,10 +2371,10 @@ class G extends ne {
|
|
|
2371
2371
|
* Список продуктов категории.
|
|
2372
2372
|
*/
|
|
2373
2373
|
s(this, "products");
|
|
2374
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
2374
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new j(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new N(o));
|
|
2375
2375
|
}
|
|
2376
2376
|
}
|
|
2377
|
-
class
|
|
2377
|
+
class ft {
|
|
2378
2378
|
/**
|
|
2379
2379
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
2380
2380
|
*
|
|
@@ -2392,9 +2392,9 @@ class ht {
|
|
|
2392
2392
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
2393
2393
|
}
|
|
2394
2394
|
}
|
|
2395
|
-
class
|
|
2395
|
+
class U extends v {
|
|
2396
2396
|
}
|
|
2397
|
-
class
|
|
2397
|
+
class Nr extends Ze {
|
|
2398
2398
|
/**
|
|
2399
2399
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
2400
2400
|
*
|
|
@@ -2422,12 +2422,12 @@ class _r extends Ke {
|
|
|
2422
2422
|
* @inheritDoc
|
|
2423
2423
|
*/
|
|
2424
2424
|
s(this, "isRegionalDirector");
|
|
2425
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
2425
|
+
this.salesDirection = e != null && e.salesDirection ? new U(e.salesDirection) : new U(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new ft(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
2426
2426
|
}
|
|
2427
2427
|
}
|
|
2428
|
-
class
|
|
2428
|
+
class Fr extends v {
|
|
2429
2429
|
}
|
|
2430
|
-
class
|
|
2430
|
+
class mt extends _ {
|
|
2431
2431
|
/**
|
|
2432
2432
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
2433
2433
|
*
|
|
@@ -2450,7 +2450,7 @@ class gt extends N {
|
|
|
2450
2450
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
|
-
class
|
|
2453
|
+
class rr extends _ {
|
|
2454
2454
|
/**
|
|
2455
2455
|
* Инициализирует экземпляр класса {@link UserRegionShortInfo}.
|
|
2456
2456
|
*
|
|
@@ -2465,7 +2465,7 @@ class Ze extends N {
|
|
|
2465
2465
|
this.abbr = (e == null ? void 0 : e.abbr) ?? "";
|
|
2466
2466
|
}
|
|
2467
2467
|
}
|
|
2468
|
-
class
|
|
2468
|
+
class X extends Nr {
|
|
2469
2469
|
/**
|
|
2470
2470
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
2471
2471
|
*
|
|
@@ -2518,10 +2518,10 @@ class K extends _r {
|
|
|
2518
2518
|
* Дата и время последнего входа в систему.
|
|
2519
2519
|
*/
|
|
2520
2520
|
s(this, "lastLoginAt");
|
|
2521
|
-
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.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new
|
|
2521
|
+
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.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new mt(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((c) => new Fr(c))) ?? [], this.showAllCosts = e == null ? void 0 : e.showAllCosts, this.authAsOperator = e == null ? void 0 : e.authAsOperator, this.managerRegions = (i = e == null ? void 0 : e.managerRegions) == null ? void 0 : i.map((c) => new rr(c)), this.managers = (o = e == null ? void 0 : e.managers) == null ? void 0 : o.map((c) => new X(c)), this.lastLoginAt = I(e == null ? void 0 : e.lastLoginAt) ? k(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt;
|
|
2522
2522
|
}
|
|
2523
2523
|
}
|
|
2524
|
-
class
|
|
2524
|
+
class Cs extends ce {
|
|
2525
2525
|
/**
|
|
2526
2526
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
2527
2527
|
*
|
|
@@ -2549,10 +2549,10 @@ class vs extends ne {
|
|
|
2549
2549
|
* Данные о менеджере за которым закреплена категория.
|
|
2550
2550
|
*/
|
|
2551
2551
|
s(this, "manager");
|
|
2552
|
-
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
|
|
2552
|
+
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 X(e.manager) : void 0;
|
|
2553
2553
|
}
|
|
2554
2554
|
}
|
|
2555
|
-
class
|
|
2555
|
+
class Je extends Cs {
|
|
2556
2556
|
/**
|
|
2557
2557
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
2558
2558
|
*
|
|
@@ -2569,10 +2569,10 @@ class Qe extends vs {
|
|
|
2569
2569
|
* Список продуктов категории.
|
|
2570
2570
|
*/
|
|
2571
2571
|
s(this, "products");
|
|
2572
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
2572
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Je(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new ve(o));
|
|
2573
2573
|
}
|
|
2574
2574
|
}
|
|
2575
|
-
class
|
|
2575
|
+
class yt {
|
|
2576
2576
|
/**
|
|
2577
2577
|
* Инициализирует экземпляр класса {@link PriceCatalogableItem}.
|
|
2578
2578
|
*
|
|
@@ -2587,10 +2587,10 @@ class ft {
|
|
|
2587
2587
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
2588
2588
|
*/
|
|
2589
2589
|
s(this, "increasePercent");
|
|
2590
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
2590
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new oe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
|
-
class
|
|
2593
|
+
class at extends yt {
|
|
2594
2594
|
/**
|
|
2595
2595
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
2596
2596
|
*
|
|
@@ -2600,7 +2600,7 @@ class mt extends ft {
|
|
|
2600
2600
|
super(r);
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
class
|
|
2603
|
+
class fr extends at {
|
|
2604
2604
|
/**
|
|
2605
2605
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2606
2606
|
*
|
|
@@ -2612,10 +2612,10 @@ class hr extends mt {
|
|
|
2612
2612
|
* Базовые данные о продукте.
|
|
2613
2613
|
*/
|
|
2614
2614
|
s(this, "productCategory");
|
|
2615
|
-
this.productCategory = new
|
|
2615
|
+
this.productCategory = new ce(e == null ? void 0 : e.productCategory);
|
|
2616
2616
|
}
|
|
2617
2617
|
}
|
|
2618
|
-
class
|
|
2618
|
+
class Ur extends _ {
|
|
2619
2619
|
/**
|
|
2620
2620
|
* Инициализирует экземпляр класса {@link Curator}.
|
|
2621
2621
|
*
|
|
@@ -2635,12 +2635,12 @@ class Nr extends N {
|
|
|
2635
2635
|
* @inheritDoc
|
|
2636
2636
|
*/
|
|
2637
2637
|
s(this, "curatedDirection");
|
|
2638
|
-
this.photo = e.photo, this.contacts = new
|
|
2638
|
+
this.photo = e.photo, this.contacts = new ft(e.contacts), this.curatedDirection = new Fr(e.curatedDirection);
|
|
2639
2639
|
}
|
|
2640
2640
|
}
|
|
2641
|
-
class
|
|
2641
|
+
class Ce extends v {
|
|
2642
2642
|
}
|
|
2643
|
-
class
|
|
2643
|
+
class De extends v {
|
|
2644
2644
|
/**
|
|
2645
2645
|
* Инициализирует экземпляр класса {@link Region}.
|
|
2646
2646
|
*
|
|
@@ -2651,11 +2651,11 @@ class we extends w {
|
|
|
2651
2651
|
/**
|
|
2652
2652
|
* Данные о стране, в которой расположен регион.
|
|
2653
2653
|
*/
|
|
2654
|
-
s(this, "country", new
|
|
2655
|
-
e && (this.country = new
|
|
2654
|
+
s(this, "country", new Ce());
|
|
2655
|
+
e && (this.country = new Ce(e.country));
|
|
2656
2656
|
}
|
|
2657
2657
|
}
|
|
2658
|
-
class
|
|
2658
|
+
class Pe extends v {
|
|
2659
2659
|
/**
|
|
2660
2660
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
2661
2661
|
*
|
|
@@ -2666,11 +2666,11 @@ class Ce extends w {
|
|
|
2666
2666
|
/**
|
|
2667
2667
|
* Данные о регионе, в котором расположен город.
|
|
2668
2668
|
*/
|
|
2669
|
-
s(this, "region", new
|
|
2670
|
-
e && (this.region = new
|
|
2669
|
+
s(this, "region", new De());
|
|
2670
|
+
e && (this.region = new De(e.region));
|
|
2671
2671
|
}
|
|
2672
2672
|
}
|
|
2673
|
-
class
|
|
2673
|
+
class wt extends Ze {
|
|
2674
2674
|
/**
|
|
2675
2675
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
2676
2676
|
*
|
|
@@ -2702,10 +2702,10 @@ class yt extends Ke {
|
|
|
2702
2702
|
* Признак активности учетной записи пользователя.
|
|
2703
2703
|
*/
|
|
2704
2704
|
s(this, "isActive");
|
|
2705
|
-
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
|
|
2705
|
+
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 U(e.salesDirection) : void 0, this.lastLoginAt = I(e == null ? void 0 : e.lastLoginAt) ? k(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2706
2706
|
}
|
|
2707
2707
|
}
|
|
2708
|
-
class
|
|
2708
|
+
class le extends wt {
|
|
2709
2709
|
/**
|
|
2710
2710
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2711
2711
|
*
|
|
@@ -2751,10 +2751,10 @@ class oe extends yt {
|
|
|
2751
2751
|
* @inheritDoc
|
|
2752
2752
|
*/
|
|
2753
2753
|
s(this, "curators");
|
|
2754
|
-
this.salesDirection = new
|
|
2754
|
+
this.salesDirection = new U(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 Pe(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 = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Nr(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new Ur(o))) ?? void 0;
|
|
2755
2755
|
}
|
|
2756
2756
|
}
|
|
2757
|
-
class
|
|
2757
|
+
class Ds extends Xe {
|
|
2758
2758
|
/**
|
|
2759
2759
|
* Инициализирует экземпляр класса {@link DeletableIdentity}.
|
|
2760
2760
|
*
|
|
@@ -2767,10 +2767,10 @@ class ws extends Je {
|
|
|
2767
2767
|
* Дата и время удаления записи.
|
|
2768
2768
|
*/
|
|
2769
2769
|
s(this, "deletedAt");
|
|
2770
|
-
this.deletedAt =
|
|
2770
|
+
this.deletedAt = J.parse(e == null ? void 0 : e.deletedAt);
|
|
2771
2771
|
}
|
|
2772
2772
|
}
|
|
2773
|
-
class Le extends
|
|
2773
|
+
class Le extends Ds {
|
|
2774
2774
|
/**
|
|
2775
2775
|
* Инициализирует новый экземпляр класса.
|
|
2776
2776
|
*
|
|
@@ -2786,10 +2786,10 @@ class Le extends ws {
|
|
|
2786
2786
|
* Данные шаблона прайс-листа.
|
|
2787
2787
|
*/
|
|
2788
2788
|
s(this, "priceTemplate");
|
|
2789
|
-
this.client = new
|
|
2789
|
+
this.client = new le(e == null ? void 0 : e.client), this.priceTemplate = new ye(e == null ? void 0 : e.priceTemplate);
|
|
2790
2790
|
}
|
|
2791
2791
|
}
|
|
2792
|
-
class
|
|
2792
|
+
class mr extends at {
|
|
2793
2793
|
/**
|
|
2794
2794
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2795
2795
|
*
|
|
@@ -2801,12 +2801,12 @@ class gr extends mt {
|
|
|
2801
2801
|
* Базовые данные о продукте.
|
|
2802
2802
|
*/
|
|
2803
2803
|
s(this, "product");
|
|
2804
|
-
this.product = new
|
|
2804
|
+
this.product = new N(e == null ? void 0 : e.product);
|
|
2805
2805
|
}
|
|
2806
2806
|
}
|
|
2807
|
-
class
|
|
2807
|
+
class vt extends v {
|
|
2808
2808
|
}
|
|
2809
|
-
class
|
|
2809
|
+
class ae extends _ {
|
|
2810
2810
|
/**
|
|
2811
2811
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2812
2812
|
*
|
|
@@ -2830,10 +2830,10 @@ class me extends N {
|
|
|
2830
2830
|
* Признак того, что по свойству может производиться фильтрация в каталоге.
|
|
2831
2831
|
*/
|
|
2832
2832
|
s(this, "isFilterable");
|
|
2833
|
-
this.type = new
|
|
2833
|
+
this.type = new vt(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;
|
|
2834
2834
|
}
|
|
2835
2835
|
}
|
|
2836
|
-
class
|
|
2836
|
+
class fe {
|
|
2837
2837
|
/**
|
|
2838
2838
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
2839
2839
|
*
|
|
@@ -2849,10 +2849,10 @@ class he {
|
|
|
2849
2849
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2850
2850
|
*/
|
|
2851
2851
|
s(this, "value");
|
|
2852
|
-
this.property = new
|
|
2852
|
+
this.property = new ae(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2853
2853
|
}
|
|
2854
2854
|
}
|
|
2855
|
-
class
|
|
2855
|
+
class ci {
|
|
2856
2856
|
/**
|
|
2857
2857
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2858
2858
|
*
|
|
@@ -2917,11 +2917,11 @@ class ni {
|
|
|
2917
2917
|
return Object.keys(this).forEach((c) => {
|
|
2918
2918
|
const u = this[c];
|
|
2919
2919
|
// eslint-disable-next-line prettier/prettier
|
|
2920
|
-
a(u) || I(u) && u.trim().length === 0 ||
|
|
2920
|
+
a(u) || I(u) && u.trim().length === 0 || kr(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2921
2921
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
|
|
2922
2922
|
}
|
|
2923
2923
|
}
|
|
2924
|
-
class
|
|
2924
|
+
class Ct extends yt {
|
|
2925
2925
|
/**
|
|
2926
2926
|
* Инициализирует экземпляр класса {@link ClientPriceCatalogableItem}.
|
|
2927
2927
|
*
|
|
@@ -2937,10 +2937,10 @@ class vt extends ft {
|
|
|
2937
2937
|
* Дата и время создания записи.
|
|
2938
2938
|
*/
|
|
2939
2939
|
s(this, "createdAt");
|
|
2940
|
-
this.executor = e != null && e.executor ? new
|
|
2940
|
+
this.executor = e != null && e.executor ? new q(e.executor) : void 0, this.createdAt = J.parse(e == null ? void 0 : e.createdAt);
|
|
2941
2941
|
}
|
|
2942
2942
|
}
|
|
2943
|
-
class
|
|
2943
|
+
class yr extends Ct {
|
|
2944
2944
|
/**
|
|
2945
2945
|
* Инициализирует экземпляр класса {@link ClientPriceProduct}.
|
|
2946
2946
|
*
|
|
@@ -2952,10 +2952,10 @@ class fr extends vt {
|
|
|
2952
2952
|
* Базовые данные о продукте.
|
|
2953
2953
|
*/
|
|
2954
2954
|
s(this, "product");
|
|
2955
|
-
this.product = new
|
|
2955
|
+
this.product = new N(e == null ? void 0 : e.product);
|
|
2956
2956
|
}
|
|
2957
2957
|
}
|
|
2958
|
-
class
|
|
2958
|
+
class Yr extends Ct {
|
|
2959
2959
|
/**
|
|
2960
2960
|
* Инициализирует экземпляр класса {@link ClientPriceCategory}.
|
|
2961
2961
|
*
|
|
@@ -2967,10 +2967,10 @@ class jr extends vt {
|
|
|
2967
2967
|
* Базовые данные о категории.
|
|
2968
2968
|
*/
|
|
2969
2969
|
s(this, "productCategory");
|
|
2970
|
-
this.productCategory = new
|
|
2970
|
+
this.productCategory = new ce(e == null ? void 0 : e.productCategory);
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
2973
|
-
class Oe extends
|
|
2973
|
+
class Oe extends _ {
|
|
2974
2974
|
/**
|
|
2975
2975
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2976
2976
|
*
|
|
@@ -3005,7 +3005,7 @@ class Oe extends N {
|
|
|
3005
3005
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
3006
3006
|
}
|
|
3007
3007
|
}
|
|
3008
|
-
class
|
|
3008
|
+
class Qr {
|
|
3009
3009
|
/**
|
|
3010
3010
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
3011
3011
|
*
|
|
@@ -3024,10 +3024,10 @@ class Gr {
|
|
|
3024
3024
|
* Минимальный коэффициент цены.
|
|
3025
3025
|
*/
|
|
3026
3026
|
s(this, "minCoefficient");
|
|
3027
|
-
this.role = new Oe(r == null ? void 0 : r.role), this.category = new
|
|
3027
|
+
this.role = new Oe(r == null ? void 0 : r.role), this.category = new ce(r == null ? void 0 : r.category), this.minCoefficient = new oe(r == null ? void 0 : r.minCoefficient);
|
|
3028
3028
|
}
|
|
3029
3029
|
}
|
|
3030
|
-
class
|
|
3030
|
+
class Ps {
|
|
3031
3031
|
/**
|
|
3032
3032
|
* Инициализирует экземпляр класса {@link FilterSettings}.
|
|
3033
3033
|
*
|
|
@@ -3060,7 +3060,7 @@ class Cs {
|
|
|
3060
3060
|
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;
|
|
3061
3061
|
}
|
|
3062
3062
|
}
|
|
3063
|
-
class
|
|
3063
|
+
class Vr {
|
|
3064
3064
|
/**
|
|
3065
3065
|
* Инициализирует экземпляр класса {@link CategoryFilterSetting}.
|
|
3066
3066
|
*
|
|
@@ -3079,10 +3079,10 @@ class Yr {
|
|
|
3079
3079
|
* @inheritDoc
|
|
3080
3080
|
*/
|
|
3081
3081
|
s(this, "settings");
|
|
3082
|
-
this.category = new
|
|
3082
|
+
this.category = new ce(r == null ? void 0 : r.category), this.property = new ae(r == null ? void 0 : r.property), this.settings = new Ps(r == null ? void 0 : r.settings);
|
|
3083
3083
|
}
|
|
3084
3084
|
}
|
|
3085
|
-
class
|
|
3085
|
+
class Rs {
|
|
3086
3086
|
/**
|
|
3087
3087
|
* Инициализирует экземпляр класса {@link CategoryFilterValue}.
|
|
3088
3088
|
*
|
|
@@ -3100,7 +3100,7 @@ class Ds {
|
|
|
3100
3100
|
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "";
|
|
3101
3101
|
}
|
|
3102
3102
|
}
|
|
3103
|
-
class
|
|
3103
|
+
class bs {
|
|
3104
3104
|
/**
|
|
3105
3105
|
* Инициализирует экземпляр класса {@link CategoryFilter}.
|
|
3106
3106
|
*
|
|
@@ -3143,10 +3143,10 @@ class Ps {
|
|
|
3143
3143
|
*/
|
|
3144
3144
|
s(this, "max");
|
|
3145
3145
|
var e;
|
|
3146
|
-
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ??
|
|
3146
|
+
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ?? gt.Checkbox, this.ord = (r == null ? void 0 : r.ord) ?? 0, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.values = ((e = r == null ? void 0 : r.values) == null ? void 0 : e.map((t) => new Rs(t))) ?? [], this.min = (r == null ? void 0 : r.min) ?? null, this.max = (r == null ? void 0 : r.max) ?? null;
|
|
3147
3147
|
}
|
|
3148
3148
|
}
|
|
3149
|
-
class
|
|
3149
|
+
class li extends h {
|
|
3150
3150
|
/**
|
|
3151
3151
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
3152
3152
|
*
|
|
@@ -3177,7 +3177,7 @@ class oi extends h {
|
|
|
3177
3177
|
return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
|
|
3178
3178
|
}
|
|
3179
3179
|
}
|
|
3180
|
-
class
|
|
3180
|
+
class ui extends h {
|
|
3181
3181
|
/**
|
|
3182
3182
|
* Импортирует цены клиента из CSV файла.
|
|
3183
3183
|
*
|
|
@@ -3197,7 +3197,7 @@ class ci extends h {
|
|
|
3197
3197
|
* @see /doc/api/internal#/operations/api_internal_client_price_categories_get_list
|
|
3198
3198
|
*/
|
|
3199
3199
|
getCategoryPrices(r) {
|
|
3200
|
-
return this.getTypedList(
|
|
3200
|
+
return this.getTypedList(Yr, `/internal/clients/${r}/price/categories`);
|
|
3201
3201
|
}
|
|
3202
3202
|
/**
|
|
3203
3203
|
* Возвращает цену прайс-листа клиента, установленную на категорию.
|
|
@@ -3208,7 +3208,7 @@ class ci extends h {
|
|
|
3208
3208
|
* @see /doc/api/internal#/operations/api_internal_client_price_categories_get
|
|
3209
3209
|
*/
|
|
3210
3210
|
getCategoryPrice(r, e) {
|
|
3211
|
-
return this.get(`/internal/clients/${r}/price/categories/${e}`, {}, (t) => new
|
|
3211
|
+
return this.get(`/internal/clients/${r}/price/categories/${e}`, {}, (t) => new Yr(t.data));
|
|
3212
3212
|
}
|
|
3213
3213
|
/**
|
|
3214
3214
|
* Устанавливает цену прайс-листа клиента на категорию.
|
|
@@ -3340,7 +3340,7 @@ class ci extends h {
|
|
|
3340
3340
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_get_list
|
|
3341
3341
|
*/
|
|
3342
3342
|
getProductPrices(r) {
|
|
3343
|
-
return this.getTypedList(
|
|
3343
|
+
return this.getTypedList(yr, `/internal/clients/${r}/price/products`);
|
|
3344
3344
|
}
|
|
3345
3345
|
/**
|
|
3346
3346
|
* Возвращает цену прайс-листа клиента, установленную на продукт.
|
|
@@ -3351,7 +3351,7 @@ class ci extends h {
|
|
|
3351
3351
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_get
|
|
3352
3352
|
*/
|
|
3353
3353
|
getProductPrice(r, e) {
|
|
3354
|
-
return this.get(`/internal/clients/${r}/price/products/${e}`, {}, (t) => new
|
|
3354
|
+
return this.get(`/internal/clients/${r}/price/products/${e}`, {}, (t) => new yr(t.data));
|
|
3355
3355
|
}
|
|
3356
3356
|
/**
|
|
3357
3357
|
* Устанавливает цену прайс-листа клиента на продукт.
|
|
@@ -3370,7 +3370,7 @@ class ci extends h {
|
|
|
3370
3370
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3371
3371
|
increase_percent: t.value
|
|
3372
3372
|
},
|
|
3373
|
-
(o) => new
|
|
3373
|
+
(o) => new yr(o.data)
|
|
3374
3374
|
);
|
|
3375
3375
|
}
|
|
3376
3376
|
/**
|
|
@@ -3445,7 +3445,7 @@ class ci extends h {
|
|
|
3445
3445
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
3446
3446
|
}
|
|
3447
3447
|
}
|
|
3448
|
-
class
|
|
3448
|
+
class pi extends h {
|
|
3449
3449
|
/**
|
|
3450
3450
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
3451
3451
|
*
|
|
@@ -3480,8 +3480,8 @@ class li extends h {
|
|
|
3480
3480
|
return this.post(
|
|
3481
3481
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
3482
3482
|
t && {
|
|
3483
|
-
startAt: t.startAt &&
|
|
3484
|
-
endAt: t.endAt &&
|
|
3483
|
+
startAt: t.startAt && A(t.startAt, i),
|
|
3484
|
+
endAt: t.endAt && A(t.endAt, i)
|
|
3485
3485
|
},
|
|
3486
3486
|
(o) => new Le(o.data),
|
|
3487
3487
|
{},
|
|
@@ -3514,8 +3514,8 @@ class li extends h {
|
|
|
3514
3514
|
return this.patch(
|
|
3515
3515
|
`/internal/clients/${r}/price/templates/${e}/${t}`,
|
|
3516
3516
|
i && {
|
|
3517
|
-
startAt: i.startAt &&
|
|
3518
|
-
endAt: i.endAt &&
|
|
3517
|
+
startAt: i.startAt && A(i.startAt, o),
|
|
3518
|
+
endAt: i.endAt && A(i.endAt, o)
|
|
3519
3519
|
},
|
|
3520
3520
|
(c) => new Le(c.data)
|
|
3521
3521
|
);
|
|
@@ -3533,7 +3533,7 @@ class li extends h {
|
|
|
3533
3533
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
3534
3534
|
}
|
|
3535
3535
|
}
|
|
3536
|
-
class
|
|
3536
|
+
class hi extends h {
|
|
3537
3537
|
/**
|
|
3538
3538
|
* Возвращает список данных о корневых категориях.
|
|
3539
3539
|
*
|
|
@@ -3542,7 +3542,7 @@ class ui extends h {
|
|
|
3542
3542
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
3543
3543
|
*/
|
|
3544
3544
|
getRootCategoriesList(r = !1) {
|
|
3545
|
-
return this.getTypedList(
|
|
3545
|
+
return this.getTypedList(j, "/internal/catalog/categories", {
|
|
3546
3546
|
showHidden: r
|
|
3547
3547
|
});
|
|
3548
3548
|
}
|
|
@@ -3562,7 +3562,7 @@ class ui extends h {
|
|
|
3562
3562
|
showHidden: e,
|
|
3563
3563
|
withNestedCategories: t
|
|
3564
3564
|
},
|
|
3565
|
-
(i) => new
|
|
3565
|
+
(i) => new j(i.data)
|
|
3566
3566
|
);
|
|
3567
3567
|
}
|
|
3568
3568
|
/**
|
|
@@ -3571,7 +3571,7 @@ class ui extends h {
|
|
|
3571
3571
|
* @param categoryID Идентификатор категории продуктов.
|
|
3572
3572
|
*/
|
|
3573
3573
|
getPublicCategoryData(r) {
|
|
3574
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
3574
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new j(e.data));
|
|
3575
3575
|
}
|
|
3576
3576
|
/**
|
|
3577
3577
|
* Возвращает список продуктов категории.
|
|
@@ -3589,7 +3589,7 @@ class ui extends h {
|
|
|
3589
3589
|
showHidden: t,
|
|
3590
3590
|
withPriceCoefficients: e
|
|
3591
3591
|
},
|
|
3592
|
-
(i) =>
|
|
3592
|
+
(i) => V(i.data, (o) => new N(o))
|
|
3593
3593
|
);
|
|
3594
3594
|
}
|
|
3595
3595
|
/**
|
|
@@ -3602,7 +3602,7 @@ class ui extends h {
|
|
|
3602
3602
|
getCategoryProductsCoefficients(r) {
|
|
3603
3603
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
3604
3604
|
const { data: t } = e;
|
|
3605
|
-
return
|
|
3605
|
+
return jt(t, (i) => i.map((o) => new xr(o))), t;
|
|
3606
3606
|
});
|
|
3607
3607
|
}
|
|
3608
3608
|
/**
|
|
@@ -3614,14 +3614,14 @@ class ui extends h {
|
|
|
3614
3614
|
publicSimpleSearch(r, e = 10) {
|
|
3615
3615
|
return new Promise((t, i) => {
|
|
3616
3616
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
3617
|
-
t(o.categories.map((c) => new
|
|
3617
|
+
t(o.categories.map((c) => new j(c)));
|
|
3618
3618
|
}).catch((o) => {
|
|
3619
3619
|
i(o);
|
|
3620
3620
|
});
|
|
3621
3621
|
});
|
|
3622
3622
|
}
|
|
3623
3623
|
}
|
|
3624
|
-
class
|
|
3624
|
+
class gi extends M {
|
|
3625
3625
|
/**
|
|
3626
3626
|
* Возвращает данные об указанном продукте.
|
|
3627
3627
|
*
|
|
@@ -3631,7 +3631,7 @@ class pi extends j {
|
|
|
3631
3631
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
3632
3632
|
*/
|
|
3633
3633
|
getProductData(r, e = !1) {
|
|
3634
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new
|
|
3634
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new N(t.data));
|
|
3635
3635
|
}
|
|
3636
3636
|
/**
|
|
3637
3637
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -3639,7 +3639,7 @@ class pi extends j {
|
|
|
3639
3639
|
* @param productId Идентификатор продукта.
|
|
3640
3640
|
*/
|
|
3641
3641
|
getPublicProductData(r) {
|
|
3642
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
3642
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new N(e.data));
|
|
3643
3643
|
}
|
|
3644
3644
|
/**
|
|
3645
3645
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -3652,7 +3652,7 @@ class pi extends j {
|
|
|
3652
3652
|
return this.get(
|
|
3653
3653
|
`/internal/catalog/products/${r}/coefficients`,
|
|
3654
3654
|
{},
|
|
3655
|
-
(e) =>
|
|
3655
|
+
(e) => V(e.data, (t) => new xr(t))
|
|
3656
3656
|
);
|
|
3657
3657
|
}
|
|
3658
3658
|
/**
|
|
@@ -3666,8 +3666,8 @@ class pi extends j {
|
|
|
3666
3666
|
*/
|
|
3667
3667
|
getNewProducts(r, e, t = !0) {
|
|
3668
3668
|
const i = S().config.dateFormats.api;
|
|
3669
|
-
return this.getTypedPaginated(
|
|
3670
|
-
period: { from:
|
|
3669
|
+
return this.getTypedPaginated(N, "/internal/catalog/products/new", void 0, void 0, e, {
|
|
3670
|
+
period: { from: A(r, i) },
|
|
3671
3671
|
withPriceCoefficients: t
|
|
3672
3672
|
});
|
|
3673
3673
|
}
|
|
@@ -3680,14 +3680,14 @@ class pi extends j {
|
|
|
3680
3680
|
publicSimpleSearch(r, e = 10) {
|
|
3681
3681
|
return new Promise((t, i) => {
|
|
3682
3682
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
3683
|
-
t(o.products.map((c) => new
|
|
3683
|
+
t(o.products.map((c) => new N(c)));
|
|
3684
3684
|
}).catch((o) => {
|
|
3685
3685
|
i(o);
|
|
3686
3686
|
});
|
|
3687
3687
|
});
|
|
3688
3688
|
}
|
|
3689
3689
|
}
|
|
3690
|
-
class
|
|
3690
|
+
class fi extends h {
|
|
3691
3691
|
/**
|
|
3692
3692
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
3693
3693
|
*
|
|
@@ -3697,7 +3697,7 @@ class hi extends h {
|
|
|
3697
3697
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
3698
3698
|
*/
|
|
3699
3699
|
getRootCategoriesList(r, e = !1) {
|
|
3700
|
-
return this.getTypedList(
|
|
3700
|
+
return this.getTypedList(Je, "/internal/catalog/categories", {
|
|
3701
3701
|
clientId: r,
|
|
3702
3702
|
showHidden: e
|
|
3703
3703
|
});
|
|
@@ -3720,7 +3720,7 @@ class hi extends h {
|
|
|
3720
3720
|
showHidden: t,
|
|
3721
3721
|
withNestedCategories: i
|
|
3722
3722
|
},
|
|
3723
|
-
(o) => new
|
|
3723
|
+
(o) => new Je(o.data)
|
|
3724
3724
|
);
|
|
3725
3725
|
}
|
|
3726
3726
|
/**
|
|
@@ -3741,11 +3741,11 @@ class hi extends h {
|
|
|
3741
3741
|
showHidden: i,
|
|
3742
3742
|
withPriceCoefficients: t
|
|
3743
3743
|
},
|
|
3744
|
-
(o) =>
|
|
3744
|
+
(o) => V(o.data, (c) => new ve(c))
|
|
3745
3745
|
);
|
|
3746
3746
|
}
|
|
3747
3747
|
}
|
|
3748
|
-
class
|
|
3748
|
+
class mi extends M {
|
|
3749
3749
|
/**
|
|
3750
3750
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
3751
3751
|
*
|
|
@@ -3762,7 +3762,7 @@ class gi extends j {
|
|
|
3762
3762
|
clientId: e,
|
|
3763
3763
|
withPriceCoefficients: t
|
|
3764
3764
|
},
|
|
3765
|
-
(i) => new
|
|
3765
|
+
(i) => new ve(i.data)
|
|
3766
3766
|
);
|
|
3767
3767
|
}
|
|
3768
3768
|
/**
|
|
@@ -3777,14 +3777,14 @@ class gi extends j {
|
|
|
3777
3777
|
*/
|
|
3778
3778
|
getNewProducts(r, e, t, i = !0) {
|
|
3779
3779
|
const o = S().config.dateFormats.api;
|
|
3780
|
-
return this.getTypedPaginated(
|
|
3780
|
+
return this.getTypedPaginated(ve, "/internal/catalog/products/new", void 0, void 0, t, {
|
|
3781
3781
|
clientId: r,
|
|
3782
|
-
period: { from:
|
|
3782
|
+
period: { from: A(e, o) },
|
|
3783
3783
|
withPriceCoefficients: i
|
|
3784
3784
|
});
|
|
3785
3785
|
}
|
|
3786
3786
|
}
|
|
3787
|
-
class
|
|
3787
|
+
class yi extends M {
|
|
3788
3788
|
/**
|
|
3789
3789
|
* Возвращает список шаблонов прайс-листа.
|
|
3790
3790
|
*
|
|
@@ -3795,7 +3795,7 @@ class fi extends j {
|
|
|
3795
3795
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
|
|
3796
3796
|
*/
|
|
3797
3797
|
getTemplateList(r, e, t) {
|
|
3798
|
-
return this.getTypedPaginated(
|
|
3798
|
+
return this.getTypedPaginated(ye, "/internal/price/templates", r, e, t);
|
|
3799
3799
|
}
|
|
3800
3800
|
/**
|
|
3801
3801
|
* Создание нового шаблона прайс-листа.
|
|
@@ -3807,7 +3807,7 @@ class fi extends j {
|
|
|
3807
3807
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
3808
3808
|
*/
|
|
3809
3809
|
createTemplate(r, e = {}) {
|
|
3810
|
-
return this.post("/internal/price/templates", r, (t) => new
|
|
3810
|
+
return this.post("/internal/price/templates", r, (t) => new ye(t.data), e);
|
|
3811
3811
|
}
|
|
3812
3812
|
/**
|
|
3813
3813
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -3817,7 +3817,7 @@ class fi extends j {
|
|
|
3817
3817
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
3818
3818
|
*/
|
|
3819
3819
|
getTemplate(r) {
|
|
3820
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
3820
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new ye(e.data));
|
|
3821
3821
|
}
|
|
3822
3822
|
/**
|
|
3823
3823
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -3830,7 +3830,7 @@ class fi extends j {
|
|
|
3830
3830
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
3831
3831
|
*/
|
|
3832
3832
|
updateTemplate(r, e, t = {}) {
|
|
3833
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
3833
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new ye(i.data), t);
|
|
3834
3834
|
}
|
|
3835
3835
|
/**
|
|
3836
3836
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -3850,7 +3850,7 @@ class fi extends j {
|
|
|
3850
3850
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get_list
|
|
3851
3851
|
*/
|
|
3852
3852
|
getProductTemplatePrices(r) {
|
|
3853
|
-
return this.getTypedList(
|
|
3853
|
+
return this.getTypedList(mr, `/internal/price/templates/${r}/products`);
|
|
3854
3854
|
}
|
|
3855
3855
|
/**
|
|
3856
3856
|
* Возвращает данные о цене на продукт в шаблоне прайс-листа.
|
|
@@ -3861,7 +3861,7 @@ class fi extends j {
|
|
|
3861
3861
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
3862
3862
|
*/
|
|
3863
3863
|
getProductTemplatePrice(r, e) {
|
|
3864
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new
|
|
3864
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new mr(t.data));
|
|
3865
3865
|
}
|
|
3866
3866
|
/**
|
|
3867
3867
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -3880,7 +3880,7 @@ class fi extends j {
|
|
|
3880
3880
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3881
3881
|
increase_percent: t.value
|
|
3882
3882
|
},
|
|
3883
|
-
(o) => new
|
|
3883
|
+
(o) => new mr(o.data)
|
|
3884
3884
|
);
|
|
3885
3885
|
}
|
|
3886
3886
|
/**
|
|
@@ -3902,7 +3902,7 @@ class fi extends j {
|
|
|
3902
3902
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_get_list
|
|
3903
3903
|
*/
|
|
3904
3904
|
getCategoryTemplatePrices(r) {
|
|
3905
|
-
return this.getTypedList(
|
|
3905
|
+
return this.getTypedList(fr, `/internal/price/templates/${r}/categories`);
|
|
3906
3906
|
}
|
|
3907
3907
|
/**
|
|
3908
3908
|
* Возвращает данные о цене на категорию продуктов в шаблоне прайс-листа.
|
|
@@ -3916,7 +3916,7 @@ class fi extends j {
|
|
|
3916
3916
|
return this.get(
|
|
3917
3917
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3918
3918
|
{},
|
|
3919
|
-
(t) => new
|
|
3919
|
+
(t) => new fr(t.data)
|
|
3920
3920
|
);
|
|
3921
3921
|
}
|
|
3922
3922
|
/**
|
|
@@ -3942,7 +3942,7 @@ class fi extends j {
|
|
|
3942
3942
|
},
|
|
3943
3943
|
params: i ? { recursively: !0 } : {}
|
|
3944
3944
|
},
|
|
3945
|
-
(c) => new
|
|
3945
|
+
(c) => new fr(c.data)
|
|
3946
3946
|
);
|
|
3947
3947
|
}
|
|
3948
3948
|
/**
|
|
@@ -3973,7 +3973,7 @@ class fi extends j {
|
|
|
3973
3973
|
return this.getTypedList(Le, `/internal/price/templates/${r}/clients`);
|
|
3974
3974
|
}
|
|
3975
3975
|
}
|
|
3976
|
-
class
|
|
3976
|
+
class ai extends h {
|
|
3977
3977
|
/**
|
|
3978
3978
|
* Возвращает список ролей ценообразования.
|
|
3979
3979
|
*
|
|
@@ -4031,7 +4031,7 @@ class mi extends h {
|
|
|
4031
4031
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_category_rules_get
|
|
4032
4032
|
*/
|
|
4033
4033
|
getCategoryRules(r) {
|
|
4034
|
-
return this.getTypedList(
|
|
4034
|
+
return this.getTypedList(Qr, `/internal/price/roles/rules/categories/${r}`);
|
|
4035
4035
|
}
|
|
4036
4036
|
/**
|
|
4037
4037
|
* Обновляет правила для роли ценообразования по указанной категории.
|
|
@@ -4045,11 +4045,11 @@ class mi extends h {
|
|
|
4045
4045
|
return this.patch(
|
|
4046
4046
|
`/internal/price/roles/rules/categories/${r}`,
|
|
4047
4047
|
e,
|
|
4048
|
-
(t) => x.instanceListInitializer(
|
|
4048
|
+
(t) => x.instanceListInitializer(Qr, t.data)
|
|
4049
4049
|
);
|
|
4050
4050
|
}
|
|
4051
4051
|
}
|
|
4052
|
-
class
|
|
4052
|
+
class wi extends M {
|
|
4053
4053
|
/**
|
|
4054
4054
|
* Возвращает пагинированный список свойств.
|
|
4055
4055
|
*
|
|
@@ -4060,7 +4060,7 @@ class yi extends j {
|
|
|
4060
4060
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
|
|
4061
4061
|
*/
|
|
4062
4062
|
getProperties(r, e, t) {
|
|
4063
|
-
return this.getTypedPaginated(
|
|
4063
|
+
return this.getTypedPaginated(ae, "/internal/catalog/properties", r, e, t);
|
|
4064
4064
|
}
|
|
4065
4065
|
/**
|
|
4066
4066
|
* Создает новое свойство.
|
|
@@ -4076,7 +4076,7 @@ class yi extends j {
|
|
|
4076
4076
|
...t,
|
|
4077
4077
|
type: e
|
|
4078
4078
|
},
|
|
4079
|
-
(i) => new
|
|
4079
|
+
(i) => new ae(i.data)
|
|
4080
4080
|
);
|
|
4081
4081
|
}
|
|
4082
4082
|
/**
|
|
@@ -4086,7 +4086,7 @@ class yi extends j {
|
|
|
4086
4086
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
4087
4087
|
*/
|
|
4088
4088
|
getProperty(r) {
|
|
4089
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
4089
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ae(e.data));
|
|
4090
4090
|
}
|
|
4091
4091
|
/**
|
|
4092
4092
|
* Обновляет существующее свойство.
|
|
@@ -4103,7 +4103,7 @@ class yi extends j {
|
|
|
4103
4103
|
...i,
|
|
4104
4104
|
type: t
|
|
4105
4105
|
},
|
|
4106
|
-
(o) => new
|
|
4106
|
+
(o) => new ae(o.data)
|
|
4107
4107
|
);
|
|
4108
4108
|
}
|
|
4109
4109
|
/**
|
|
@@ -4122,7 +4122,7 @@ class yi extends j {
|
|
|
4122
4122
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
4123
4123
|
*/
|
|
4124
4124
|
getProductProperties(r) {
|
|
4125
|
-
return this.getTypedList(
|
|
4125
|
+
return this.getTypedList(fe, `/internal/catalog/products/${r}/properties`);
|
|
4126
4126
|
}
|
|
4127
4127
|
/**
|
|
4128
4128
|
* Возвращает значение свойства продукта.
|
|
@@ -4132,7 +4132,7 @@ class yi extends j {
|
|
|
4132
4132
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
4133
4133
|
*/
|
|
4134
4134
|
getProductProperty(r, e) {
|
|
4135
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new
|
|
4135
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new fe(t.data));
|
|
4136
4136
|
}
|
|
4137
4137
|
/**
|
|
4138
4138
|
* Обновляет значение свойства продукта.
|
|
@@ -4143,7 +4143,7 @@ class yi extends j {
|
|
|
4143
4143
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
4144
4144
|
*/
|
|
4145
4145
|
updateProductProperty(r, e, t) {
|
|
4146
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new
|
|
4146
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new fe(i.data));
|
|
4147
4147
|
}
|
|
4148
4148
|
/**
|
|
4149
4149
|
* Удаляет значение свойства продукта.
|
|
@@ -4268,7 +4268,7 @@ class yi extends j {
|
|
|
4268
4268
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
4269
4269
|
*/
|
|
4270
4270
|
getCategoryProperties(r) {
|
|
4271
|
-
return this.getTypedList(
|
|
4271
|
+
return this.getTypedList(fe, `/internal/catalog/categories/${r}/properties`);
|
|
4272
4272
|
}
|
|
4273
4273
|
/**
|
|
4274
4274
|
* Возвращает значение свойства категории.
|
|
@@ -4278,7 +4278,7 @@ class yi extends j {
|
|
|
4278
4278
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
4279
4279
|
*/
|
|
4280
4280
|
getCategoryProperty(r, e) {
|
|
4281
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new
|
|
4281
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new fe(t.data));
|
|
4282
4282
|
}
|
|
4283
4283
|
/**
|
|
4284
4284
|
* Обновляет значение свойства категории.
|
|
@@ -4289,7 +4289,7 @@ class yi extends j {
|
|
|
4289
4289
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
4290
4290
|
*/
|
|
4291
4291
|
updateCategoryProperty(r, e, t) {
|
|
4292
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new
|
|
4292
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new fe(i.data));
|
|
4293
4293
|
}
|
|
4294
4294
|
/**
|
|
4295
4295
|
* Удаляет значение свойства категории.
|
|
@@ -4428,7 +4428,7 @@ class yi extends j {
|
|
|
4428
4428
|
return this.get(
|
|
4429
4429
|
`/internal/catalog/categories/${r}/filters`,
|
|
4430
4430
|
{ recursively: e },
|
|
4431
|
-
(t) => t.data.map((i) => new
|
|
4431
|
+
(t) => t.data.map((i) => new bs(i))
|
|
4432
4432
|
);
|
|
4433
4433
|
}
|
|
4434
4434
|
/**
|
|
@@ -4438,7 +4438,7 @@ class yi extends j {
|
|
|
4438
4438
|
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_get_list
|
|
4439
4439
|
*/
|
|
4440
4440
|
getCategoryFilterSettings(r) {
|
|
4441
|
-
return this.getTypedList(
|
|
4441
|
+
return this.getTypedList(Vr, `/internal/catalog/categories/${r}/filter-settings`);
|
|
4442
4442
|
}
|
|
4443
4443
|
/**
|
|
4444
4444
|
* Сохраняет настройки фильтра в категории.
|
|
@@ -4452,7 +4452,7 @@ class yi extends j {
|
|
|
4452
4452
|
return this.patch(
|
|
4453
4453
|
`/internal/catalog/categories/${r}/filter-settings/${e}`,
|
|
4454
4454
|
t,
|
|
4455
|
-
(i) => new
|
|
4455
|
+
(i) => new Vr(i.data)
|
|
4456
4456
|
);
|
|
4457
4457
|
}
|
|
4458
4458
|
/**
|
|
@@ -4466,7 +4466,7 @@ class yi extends j {
|
|
|
4466
4466
|
return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
|
|
4467
4467
|
}
|
|
4468
4468
|
}
|
|
4469
|
-
class
|
|
4469
|
+
class vi extends h {
|
|
4470
4470
|
/**
|
|
4471
4471
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
4472
4472
|
*
|
|
@@ -4476,7 +4476,7 @@ class ai extends h {
|
|
|
4476
4476
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
4477
4477
|
*/
|
|
4478
4478
|
getRootCategoriesList(r, e = !1) {
|
|
4479
|
-
return this.getTypedList(
|
|
4479
|
+
return this.getTypedList(j, "/internal/catalog/categories", {
|
|
4480
4480
|
priceTemplateId: r,
|
|
4481
4481
|
showHidden: e
|
|
4482
4482
|
});
|
|
@@ -4499,7 +4499,7 @@ class ai extends h {
|
|
|
4499
4499
|
showHidden: t,
|
|
4500
4500
|
withNestedCategories: i
|
|
4501
4501
|
},
|
|
4502
|
-
(o) => new
|
|
4502
|
+
(o) => new j(o.data)
|
|
4503
4503
|
);
|
|
4504
4504
|
}
|
|
4505
4505
|
/**
|
|
@@ -4520,11 +4520,11 @@ class ai extends h {
|
|
|
4520
4520
|
showHidden: i,
|
|
4521
4521
|
withPriceCoefficients: t
|
|
4522
4522
|
},
|
|
4523
|
-
(o) =>
|
|
4523
|
+
(o) => V(o.data, (c) => new N(c))
|
|
4524
4524
|
);
|
|
4525
4525
|
}
|
|
4526
4526
|
}
|
|
4527
|
-
function
|
|
4527
|
+
function Jr(n, r, e) {
|
|
4528
4528
|
let t;
|
|
4529
4529
|
return n.some((i) => {
|
|
4530
4530
|
if (i.type === e && i.id === r)
|
|
@@ -4533,29 +4533,29 @@ function Qr(n, r, e) {
|
|
|
4533
4533
|
return !1;
|
|
4534
4534
|
const o = i;
|
|
4535
4535
|
if (o.products && o.products.length > 0) {
|
|
4536
|
-
const c =
|
|
4536
|
+
const c = Jr(o.products, r, e);
|
|
4537
4537
|
if (c)
|
|
4538
4538
|
return t = c, !0;
|
|
4539
4539
|
}
|
|
4540
4540
|
if (o.categories && o.categories.length > 0) {
|
|
4541
|
-
const c =
|
|
4541
|
+
const c = Jr(o.categories, r, e);
|
|
4542
4542
|
if (c)
|
|
4543
4543
|
return t = c, !0;
|
|
4544
4544
|
}
|
|
4545
4545
|
return !1;
|
|
4546
4546
|
}), t;
|
|
4547
4547
|
}
|
|
4548
|
-
function
|
|
4548
|
+
function Kr(n) {
|
|
4549
4549
|
const r = [];
|
|
4550
4550
|
return n.forEach((e) => {
|
|
4551
4551
|
if (r.push(e), e.type === "category") {
|
|
4552
4552
|
const t = e;
|
|
4553
|
-
t.products && t.products.length > 0 && r.push(...
|
|
4553
|
+
t.products && t.products.length > 0 && r.push(...Kr(t.products)), t.categories && t.categories.length > 0 && r.push(...Kr(t.categories));
|
|
4554
4554
|
}
|
|
4555
4555
|
}), r;
|
|
4556
4556
|
}
|
|
4557
|
-
var
|
|
4558
|
-
class
|
|
4557
|
+
var ds = /* @__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))(ds || {}), Y = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(Y || {});
|
|
4558
|
+
class Tr extends ne {
|
|
4559
4559
|
/**
|
|
4560
4560
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
4561
4561
|
*
|
|
@@ -4586,7 +4586,7 @@ class br extends be {
|
|
|
4586
4586
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new E(e.currency));
|
|
4587
4587
|
}
|
|
4588
4588
|
}
|
|
4589
|
-
class
|
|
4589
|
+
class $r extends er {
|
|
4590
4590
|
/**
|
|
4591
4591
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
4592
4592
|
*
|
|
@@ -4605,7 +4605,7 @@ class dr extends Xe {
|
|
|
4605
4605
|
this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
|
|
4606
4606
|
}
|
|
4607
4607
|
}
|
|
4608
|
-
class
|
|
4608
|
+
class te extends $r {
|
|
4609
4609
|
/**
|
|
4610
4610
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
4611
4611
|
*
|
|
@@ -4632,12 +4632,12 @@ class re extends dr {
|
|
|
4632
4632
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment;
|
|
4633
4633
|
}
|
|
4634
4634
|
}
|
|
4635
|
-
class
|
|
4635
|
+
class se extends v {
|
|
4636
4636
|
/**
|
|
4637
4637
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
4638
4638
|
*/
|
|
4639
4639
|
static generatePersonItem() {
|
|
4640
|
-
return new
|
|
4640
|
+
return new se({
|
|
4641
4641
|
id: 1,
|
|
4642
4642
|
guid: "",
|
|
4643
4643
|
slug: Y.Person,
|
|
@@ -4645,9 +4645,9 @@ class te extends w {
|
|
|
4645
4645
|
});
|
|
4646
4646
|
}
|
|
4647
4647
|
}
|
|
4648
|
-
class
|
|
4648
|
+
class Re extends v {
|
|
4649
4649
|
}
|
|
4650
|
-
class
|
|
4650
|
+
class Dt extends er {
|
|
4651
4651
|
/**
|
|
4652
4652
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
4653
4653
|
*
|
|
@@ -4659,11 +4659,11 @@ class wt extends Xe {
|
|
|
4659
4659
|
/**
|
|
4660
4660
|
* Данные об организационно-правовой форме.
|
|
4661
4661
|
*/
|
|
4662
|
-
s(this, "opf",
|
|
4662
|
+
s(this, "opf", se.generatePersonItem());
|
|
4663
4663
|
/**
|
|
4664
4664
|
* Группа партнеров (направление деятельности).
|
|
4665
4665
|
*/
|
|
4666
|
-
s(this, "partnerGroup", new
|
|
4666
|
+
s(this, "partnerGroup", new Re());
|
|
4667
4667
|
/**
|
|
4668
4668
|
* Список контактных лиц контрагента.
|
|
4669
4669
|
*/
|
|
@@ -4689,22 +4689,22 @@ class wt extends Xe {
|
|
|
4689
4689
|
*/
|
|
4690
4690
|
s(this, "updater");
|
|
4691
4691
|
if (e) {
|
|
4692
|
-
if (this.opf = new
|
|
4692
|
+
if (this.opf = new se(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new q(e.creator) : void 0, this.updater = e.updater ? new q(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Re(e.partnerGroup)), e.contacts) {
|
|
4693
4693
|
const t = [];
|
|
4694
4694
|
e.contacts.forEach((i) => {
|
|
4695
|
-
t.push(new
|
|
4695
|
+
t.push(new te(i));
|
|
4696
4696
|
}), this.contacts = t;
|
|
4697
4697
|
}
|
|
4698
4698
|
if (e.bankAccounts) {
|
|
4699
4699
|
const t = [];
|
|
4700
4700
|
e.bankAccounts.forEach((i) => {
|
|
4701
|
-
t.push(new
|
|
4701
|
+
t.push(new Tr(i));
|
|
4702
4702
|
}), this.bankAccounts = t;
|
|
4703
4703
|
}
|
|
4704
4704
|
}
|
|
4705
4705
|
}
|
|
4706
4706
|
}
|
|
4707
|
-
class
|
|
4707
|
+
class Ts extends Dt {
|
|
4708
4708
|
/**
|
|
4709
4709
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
4710
4710
|
*
|
|
@@ -4714,7 +4714,7 @@ class bs extends wt {
|
|
|
4714
4714
|
super(r);
|
|
4715
4715
|
}
|
|
4716
4716
|
}
|
|
4717
|
-
class
|
|
4717
|
+
class Pt extends Dt {
|
|
4718
4718
|
/**
|
|
4719
4719
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
4720
4720
|
*
|
|
@@ -4757,7 +4757,7 @@ class Ct extends wt {
|
|
|
4757
4757
|
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 ?? "");
|
|
4758
4758
|
}
|
|
4759
4759
|
}
|
|
4760
|
-
class
|
|
4760
|
+
class Rt extends Pt {
|
|
4761
4761
|
/**
|
|
4762
4762
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
4763
4763
|
*
|
|
@@ -4772,7 +4772,7 @@ class Dt extends Ct {
|
|
|
4772
4772
|
e && (this.kpp = e.kpp ?? "");
|
|
4773
4773
|
}
|
|
4774
4774
|
}
|
|
4775
|
-
class
|
|
4775
|
+
class $s extends Rt {
|
|
4776
4776
|
/**
|
|
4777
4777
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
4778
4778
|
*
|
|
@@ -4783,7 +4783,7 @@ class ds extends Dt {
|
|
|
4783
4783
|
/**
|
|
4784
4784
|
* Страна регистрации юридического лица нерезидента.
|
|
4785
4785
|
*/
|
|
4786
|
-
s(this, "registrationCountry", new
|
|
4786
|
+
s(this, "registrationCountry", new Ce());
|
|
4787
4787
|
/**
|
|
4788
4788
|
* Регистрационный номер юридического лица нерезидента.
|
|
4789
4789
|
*/
|
|
@@ -4792,10 +4792,10 @@ class ds extends Dt {
|
|
|
4792
4792
|
* Налоговый номер юридического лица нерезидента.
|
|
4793
4793
|
*/
|
|
4794
4794
|
s(this, "taxNumber", "");
|
|
4795
|
-
e && (this.registrationCountry = new
|
|
4795
|
+
e && (this.registrationCountry = new Ce(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
4796
4796
|
}
|
|
4797
4797
|
}
|
|
4798
|
-
class
|
|
4798
|
+
class Ke {
|
|
4799
4799
|
/**
|
|
4800
4800
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
4801
4801
|
*
|
|
@@ -4804,17 +4804,17 @@ class Ve {
|
|
|
4804
4804
|
static createInstance(r) {
|
|
4805
4805
|
switch (r.opf.slug) {
|
|
4806
4806
|
case Y.Ic:
|
|
4807
|
-
return new
|
|
4807
|
+
return new Pt(r);
|
|
4808
4808
|
case Y.UlR:
|
|
4809
|
-
return new
|
|
4809
|
+
return new Rt(r);
|
|
4810
4810
|
case Y.UlNr:
|
|
4811
|
-
return new
|
|
4811
|
+
return new $s(r);
|
|
4812
4812
|
default:
|
|
4813
|
-
return new
|
|
4813
|
+
return new Ts(r);
|
|
4814
4814
|
}
|
|
4815
4815
|
}
|
|
4816
4816
|
}
|
|
4817
|
-
class xe extends
|
|
4817
|
+
class xe extends er {
|
|
4818
4818
|
/**
|
|
4819
4819
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
4820
4820
|
*
|
|
@@ -4851,14 +4851,14 @@ class xe extends Xe {
|
|
|
4851
4851
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4852
4852
|
*/
|
|
4853
4853
|
s(this, "isTransportCompanyAddress");
|
|
4854
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4854
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new ut(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new te(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;
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
|
-
class
|
|
4857
|
+
class bt extends v {
|
|
4858
4858
|
}
|
|
4859
|
-
class
|
|
4859
|
+
class dt extends v {
|
|
4860
4860
|
}
|
|
4861
|
-
class
|
|
4861
|
+
class Xr extends le {
|
|
4862
4862
|
/**
|
|
4863
4863
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4864
4864
|
*
|
|
@@ -4908,10 +4908,10 @@ class Jr extends oe {
|
|
|
4908
4908
|
* @inheritDoc
|
|
4909
4909
|
*/
|
|
4910
4910
|
s(this, "extraData");
|
|
4911
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) =>
|
|
4911
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Ke.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new te(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new xe(u))) ?? [], this.channelPrimaryInterest = new bt(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new dt(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new He(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4912
4912
|
}
|
|
4913
4913
|
}
|
|
4914
|
-
class
|
|
4914
|
+
class Ci extends Me {
|
|
4915
4915
|
/**
|
|
4916
4916
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4917
4917
|
*
|
|
@@ -5024,7 +5024,7 @@ class vi extends Me {
|
|
|
5024
5024
|
* @inheritDoc
|
|
5025
5025
|
*/
|
|
5026
5026
|
s(this, "noOrdersPeriod", new b());
|
|
5027
|
-
this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, 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 = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new
|
|
5027
|
+
this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, 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 = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new Pe(D)), this.region = new De(e == null ? void 0 : e.region), this.country = new Ce(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 b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(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 X(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 Ur(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new U(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new se(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new K(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new Re(D)), this.contact = new $r(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
5028
5028
|
createdAt: new b((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
5029
5029
|
creator: (g = e == null ? void 0 : e.lastOrder) == null ? void 0 : g.creator,
|
|
5030
5030
|
isApproved: (y = e == null ? void 0 : e.lastOrder) == null ? void 0 : y.isApproved
|
|
@@ -5039,7 +5039,7 @@ class vi extends Me {
|
|
|
5039
5039
|
this.cities = [];
|
|
5040
5040
|
break;
|
|
5041
5041
|
case "region":
|
|
5042
|
-
this.region = new
|
|
5042
|
+
this.region = new De();
|
|
5043
5043
|
break;
|
|
5044
5044
|
case "isActive":
|
|
5045
5045
|
this.isActive = !0;
|
|
@@ -5066,16 +5066,16 @@ class vi extends Me {
|
|
|
5066
5066
|
this.salesDirections = [];
|
|
5067
5067
|
break;
|
|
5068
5068
|
case "contragentType":
|
|
5069
|
-
this.contragentType = new
|
|
5069
|
+
this.contragentType = new se();
|
|
5070
5070
|
break;
|
|
5071
5071
|
case "preferredDeliveryType":
|
|
5072
|
-
this.preferredDeliveryType = new
|
|
5072
|
+
this.preferredDeliveryType = new K();
|
|
5073
5073
|
break;
|
|
5074
5074
|
case "partnerGroups":
|
|
5075
5075
|
this.partnerGroups = [];
|
|
5076
5076
|
break;
|
|
5077
5077
|
case "contact":
|
|
5078
|
-
this.contact = new
|
|
5078
|
+
this.contact = new $r();
|
|
5079
5079
|
break;
|
|
5080
5080
|
default:
|
|
5081
5081
|
this[e] = void 0;
|
|
@@ -5092,7 +5092,7 @@ class vi extends Me {
|
|
|
5092
5092
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.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;
|
|
5093
5093
|
}
|
|
5094
5094
|
}
|
|
5095
|
-
class
|
|
5095
|
+
class Tt extends Xe {
|
|
5096
5096
|
/**
|
|
5097
5097
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
5098
5098
|
*
|
|
@@ -5104,10 +5104,10 @@ class bt extends Je {
|
|
|
5104
5104
|
* @inheritDoc
|
|
5105
5105
|
*/
|
|
5106
5106
|
s(this, "creator");
|
|
5107
|
-
this.creator = new
|
|
5107
|
+
this.creator = new q(e == null ? void 0 : e.creator);
|
|
5108
5108
|
}
|
|
5109
5109
|
}
|
|
5110
|
-
class
|
|
5110
|
+
class As extends _ {
|
|
5111
5111
|
/**
|
|
5112
5112
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
5113
5113
|
*
|
|
@@ -5144,10 +5144,10 @@ class Ts extends N {
|
|
|
5144
5144
|
* @inheritDoc
|
|
5145
5145
|
*/
|
|
5146
5146
|
s(this, "curators");
|
|
5147
|
-
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new
|
|
5147
|
+
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new te(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Tt(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new Re(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new K(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new U(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Nr(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Ur(u))) ?? void 0;
|
|
5148
5148
|
}
|
|
5149
5149
|
}
|
|
5150
|
-
class
|
|
5150
|
+
class ar extends ne {
|
|
5151
5151
|
/**
|
|
5152
5152
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
5153
5153
|
*
|
|
@@ -5162,7 +5162,7 @@ class mr extends be {
|
|
|
5162
5162
|
this.isPrimary = e.isPrimary;
|
|
5163
5163
|
}
|
|
5164
5164
|
}
|
|
5165
|
-
class
|
|
5165
|
+
class Ss extends te {
|
|
5166
5166
|
/**
|
|
5167
5167
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
5168
5168
|
*
|
|
@@ -5187,10 +5187,10 @@ class As extends re {
|
|
|
5187
5187
|
*/
|
|
5188
5188
|
addresses: []
|
|
5189
5189
|
});
|
|
5190
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new
|
|
5190
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new ar(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new ar(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new ar(t))));
|
|
5191
5191
|
}
|
|
5192
5192
|
}
|
|
5193
|
-
class
|
|
5193
|
+
class B extends M {
|
|
5194
5194
|
/**
|
|
5195
5195
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
5196
5196
|
*
|
|
@@ -5329,7 +5329,7 @@ class H extends j {
|
|
|
5329
5329
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
5330
5330
|
*/
|
|
5331
5331
|
getClient(r) {
|
|
5332
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
5332
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Xr(e.data));
|
|
5333
5333
|
}
|
|
5334
5334
|
/**
|
|
5335
5335
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -5343,7 +5343,7 @@ class H extends j {
|
|
|
5343
5343
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_list
|
|
5344
5344
|
*/
|
|
5345
5345
|
getClientsList(r, e, t, i, o = void 0) {
|
|
5346
|
-
return this.getTypedPaginated(
|
|
5346
|
+
return this.getTypedPaginated(le, "/internal/clients", r, e, t, i, void 0, o);
|
|
5347
5347
|
}
|
|
5348
5348
|
/**
|
|
5349
5349
|
* Выполняет поиск клиентов по терму в строке.
|
|
@@ -5365,7 +5365,7 @@ class H extends j {
|
|
|
5365
5365
|
return this.getClientsList({
|
|
5366
5366
|
groupOp: "and",
|
|
5367
5367
|
groups: [],
|
|
5368
|
-
filters: [{ field: "phone", op:
|
|
5368
|
+
filters: [{ field: "phone", op: Ir.Contains, value: r }]
|
|
5369
5369
|
});
|
|
5370
5370
|
}
|
|
5371
5371
|
/**
|
|
@@ -5380,7 +5380,7 @@ class H extends j {
|
|
|
5380
5380
|
return this.post(
|
|
5381
5381
|
"/internal/clients/additional-data",
|
|
5382
5382
|
{ clients: t, requested_data_types: e },
|
|
5383
|
-
(i) => x.instanceListInitializer(
|
|
5383
|
+
(i) => x.instanceListInitializer(As, i.data)
|
|
5384
5384
|
);
|
|
5385
5385
|
}
|
|
5386
5386
|
/**
|
|
@@ -5390,7 +5390,7 @@ class H extends j {
|
|
|
5390
5390
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_get_all_contact_list
|
|
5391
5391
|
*/
|
|
5392
5392
|
getAllClientContacts(r) {
|
|
5393
|
-
return this.getTypedList(
|
|
5393
|
+
return this.getTypedList(Ss, `/internal/clients/${r}/contacts/all`);
|
|
5394
5394
|
}
|
|
5395
5395
|
/**
|
|
5396
5396
|
* Создаёт нового клиента на основе указанных данных.
|
|
@@ -5400,7 +5400,7 @@ class H extends j {
|
|
|
5400
5400
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
5401
5401
|
*/
|
|
5402
5402
|
createClientCommonData(r, e = {}) {
|
|
5403
|
-
return this.post("/internal/clients",
|
|
5403
|
+
return this.post("/internal/clients", B.transformClientDataToRequest(r), (t) => new Xr(t.data), e);
|
|
5404
5404
|
}
|
|
5405
5405
|
/**
|
|
5406
5406
|
* Обновляет данные указанного клиента.
|
|
@@ -5410,7 +5410,7 @@ class H extends j {
|
|
|
5410
5410
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
5411
5411
|
*/
|
|
5412
5412
|
updateClientCommonData(r, e = {}) {
|
|
5413
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
5413
|
+
return this.patch(`/internal/clients/${r.id}`, B.transformClientDataToRequest(r), void 0, e);
|
|
5414
5414
|
}
|
|
5415
5415
|
/**
|
|
5416
5416
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -5539,8 +5539,8 @@ class H extends j {
|
|
|
5539
5539
|
createContragentClientData(r, e, t = {}) {
|
|
5540
5540
|
return this.post(
|
|
5541
5541
|
`/internal/clients/${r}/contragents`,
|
|
5542
|
-
|
|
5543
|
-
(i) =>
|
|
5542
|
+
B.transformContragentClientDataToRequest(e),
|
|
5543
|
+
(i) => Ke.createInstance(i.data),
|
|
5544
5544
|
t
|
|
5545
5545
|
);
|
|
5546
5546
|
}
|
|
@@ -5555,8 +5555,8 @@ class H extends j {
|
|
|
5555
5555
|
updateContragentClientData(r, e, t = {}) {
|
|
5556
5556
|
return this.patch(
|
|
5557
5557
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
5558
|
-
|
|
5559
|
-
(i) =>
|
|
5558
|
+
B.transformContragentClientDataToRequest(e),
|
|
5559
|
+
(i) => Ke.createInstance(i.data),
|
|
5560
5560
|
t
|
|
5561
5561
|
);
|
|
5562
5562
|
}
|
|
@@ -5590,7 +5590,7 @@ class H extends j {
|
|
|
5590
5590
|
createClientDeliveryAddress(r, e, t = {}) {
|
|
5591
5591
|
return this.post(
|
|
5592
5592
|
`/internal/clients/${r}/delivery-addresses`,
|
|
5593
|
-
|
|
5593
|
+
B.transformClientDeliveryAddressToRequest(e),
|
|
5594
5594
|
(i) => new xe(i.data),
|
|
5595
5595
|
t
|
|
5596
5596
|
);
|
|
@@ -5606,7 +5606,7 @@ class H extends j {
|
|
|
5606
5606
|
updateClientDeliveryAddress(r, e, t = {}) {
|
|
5607
5607
|
return this.patch(
|
|
5608
5608
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
5609
|
-
|
|
5609
|
+
B.transformClientDeliveryAddressToRequest(e),
|
|
5610
5610
|
(i) => new xe(i.data),
|
|
5611
5611
|
t
|
|
5612
5612
|
);
|
|
@@ -5633,8 +5633,8 @@ class H extends j {
|
|
|
5633
5633
|
createContragentBankAccount(r, e, t, i = {}) {
|
|
5634
5634
|
return this.post(
|
|
5635
5635
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
5636
|
-
|
|
5637
|
-
(o) => new
|
|
5636
|
+
B.transformClientContragentBankAccountToRequest(t),
|
|
5637
|
+
(o) => new Tr(o.data),
|
|
5638
5638
|
i
|
|
5639
5639
|
);
|
|
5640
5640
|
}
|
|
@@ -5650,8 +5650,8 @@ class H extends j {
|
|
|
5650
5650
|
updateContragentBankAccount(r, e, t, i = {}) {
|
|
5651
5651
|
return this.patch(
|
|
5652
5652
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
|
|
5653
|
-
|
|
5654
|
-
(o) => new
|
|
5653
|
+
B.transformClientContragentBankAccountToRequest(t),
|
|
5654
|
+
(o) => new Tr(o.data),
|
|
5655
5655
|
i
|
|
5656
5656
|
);
|
|
5657
5657
|
}
|
|
@@ -5707,7 +5707,7 @@ class H extends j {
|
|
|
5707
5707
|
comment: e.comment,
|
|
5708
5708
|
not_disturb: e.notDisturb
|
|
5709
5709
|
},
|
|
5710
|
-
(i) => new
|
|
5710
|
+
(i) => new te(i.data),
|
|
5711
5711
|
t
|
|
5712
5712
|
);
|
|
5713
5713
|
}
|
|
@@ -5844,7 +5844,7 @@ class H extends j {
|
|
|
5844
5844
|
comment: e.comment,
|
|
5845
5845
|
...t
|
|
5846
5846
|
};
|
|
5847
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new
|
|
5847
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new te(p.data), i);
|
|
5848
5848
|
}
|
|
5849
5849
|
/**
|
|
5850
5850
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5873,7 +5873,7 @@ class H extends j {
|
|
|
5873
5873
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5874
5874
|
}
|
|
5875
5875
|
}
|
|
5876
|
-
class
|
|
5876
|
+
class Di extends h {
|
|
5877
5877
|
/**
|
|
5878
5878
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5879
5879
|
*
|
|
@@ -5887,7 +5887,7 @@ class wi extends h {
|
|
|
5887
5887
|
});
|
|
5888
5888
|
}
|
|
5889
5889
|
}
|
|
5890
|
-
class
|
|
5890
|
+
class Pi {
|
|
5891
5891
|
/**
|
|
5892
5892
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5893
5893
|
*
|
|
@@ -5909,8 +5909,8 @@ class Ci {
|
|
|
5909
5909
|
this.date = I(r == null ? void 0 : r.date) ? k(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";
|
|
5910
5910
|
}
|
|
5911
5911
|
}
|
|
5912
|
-
var
|
|
5913
|
-
class
|
|
5912
|
+
var ks = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(ks || {});
|
|
5913
|
+
class Ri extends h {
|
|
5914
5914
|
/**
|
|
5915
5915
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5916
5916
|
*
|
|
@@ -5940,7 +5940,7 @@ class Di extends h {
|
|
|
5940
5940
|
const o = this.get(
|
|
5941
5941
|
`internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
|
|
5942
5942
|
{ params: t, client_id: e },
|
|
5943
|
-
(u) => new
|
|
5943
|
+
(u) => new N(u.data)
|
|
5944
5944
|
);
|
|
5945
5945
|
return o.catch((u) => {
|
|
5946
5946
|
this.errorResponseHandler(u, i);
|
|
@@ -6001,7 +6001,7 @@ class Di extends h {
|
|
|
6001
6001
|
});
|
|
6002
6002
|
}
|
|
6003
6003
|
}
|
|
6004
|
-
class
|
|
6004
|
+
class Ls {
|
|
6005
6005
|
/**
|
|
6006
6006
|
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
6007
6007
|
*
|
|
@@ -6019,7 +6019,7 @@ class Ss {
|
|
|
6019
6019
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
6020
6020
|
}
|
|
6021
6021
|
}
|
|
6022
|
-
class
|
|
6022
|
+
class bi extends Ls {
|
|
6023
6023
|
/**
|
|
6024
6024
|
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
6025
6025
|
*
|
|
@@ -6050,7 +6050,7 @@ class Pi extends Ss {
|
|
|
6050
6050
|
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;
|
|
6051
6051
|
}
|
|
6052
6052
|
}
|
|
6053
|
-
class
|
|
6053
|
+
class di {
|
|
6054
6054
|
/**
|
|
6055
6055
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
6056
6056
|
*
|
|
@@ -6111,7 +6111,7 @@ class m {
|
|
|
6111
6111
|
* @param amount Смещение в полугодиях, может быть отрицательным.
|
|
6112
6112
|
*/
|
|
6113
6113
|
static addHalfYears(r, e) {
|
|
6114
|
-
return
|
|
6114
|
+
return $(r, e * 6);
|
|
6115
6115
|
}
|
|
6116
6116
|
/**
|
|
6117
6117
|
* Возвращает интервал «сдвинутый период до такой же даты»: от начала сдвинутого периода до конца дня
|
|
@@ -6123,8 +6123,8 @@ class m {
|
|
|
6123
6123
|
* @param date Опорная дата.
|
|
6124
6124
|
*/
|
|
6125
6125
|
static intervalTillSameDate(r, e, t) {
|
|
6126
|
-
const i =
|
|
6127
|
-
return { from:
|
|
6126
|
+
const i = Jt(F(t), F(r)), o = F($(e, i)), c = Math.min(Wr(t), Kt(o));
|
|
6127
|
+
return { from: me(e), to: z(Xt(o, c)) };
|
|
6128
6128
|
}
|
|
6129
6129
|
/**
|
|
6130
6130
|
* Возвращает интервал «сдвинутая неделя до такого же дня недели»; недели начинаются с понедельника.
|
|
@@ -6133,8 +6133,8 @@ class m {
|
|
|
6133
6133
|
* @param shiftWeeks Смещение в неделях, может быть отрицательным.
|
|
6134
6134
|
*/
|
|
6135
6135
|
static weekTillSameWeekday(r, e) {
|
|
6136
|
-
const t =
|
|
6137
|
-
return { from: t, to:
|
|
6136
|
+
const t = Z(Pr(r, e), { weekStartsOn: 1 }), i = Ge(r, Z(r, { weekStartsOn: 1 }));
|
|
6137
|
+
return { from: t, to: z(ee(t, i)) };
|
|
6138
6138
|
}
|
|
6139
6139
|
/**
|
|
6140
6140
|
* Возвращает интервал «сдвинутая декада до такого же номера дня»; если в целевой декаде дня с таким
|
|
@@ -6144,8 +6144,8 @@ class m {
|
|
|
6144
6144
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
6145
6145
|
*/
|
|
6146
6146
|
static decadeTillSameDayNumber(r, e) {
|
|
6147
|
-
const [t] = m.shiftedDecadeBounds(r, 0), i =
|
|
6148
|
-
return { from: o, to:
|
|
6147
|
+
const [t] = m.shiftedDecadeBounds(r, 0), i = Ge(r, t) + 1, [o, c] = m.shiftedDecadeBounds(r, e), u = Ge(c, o) + 1;
|
|
6148
|
+
return { from: o, to: z(ee(o, Math.min(i, u) - 1)) };
|
|
6149
6149
|
}
|
|
6150
6150
|
/**
|
|
6151
6151
|
* Возвращает пару «начало и конец декады», отстоящей от декады указанной даты на заданное число декад.
|
|
@@ -6154,22 +6154,22 @@ class m {
|
|
|
6154
6154
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
6155
6155
|
*/
|
|
6156
6156
|
static shiftedDecadeBounds(r, e) {
|
|
6157
|
-
const t =
|
|
6157
|
+
const t = Wr(r);
|
|
6158
6158
|
let i = 2;
|
|
6159
6159
|
t <= 10 ? i = 0 : t <= 20 && (i = 1);
|
|
6160
|
-
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p =
|
|
6160
|
+
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = F($(r, c)), g = ee(p, u * 10), y = u === 2 ? O(p) : z(ee(g, 9));
|
|
6161
6161
|
return [g, y];
|
|
6162
6162
|
}
|
|
6163
6163
|
}
|
|
6164
|
-
function
|
|
6165
|
-
return
|
|
6164
|
+
function Ti(n) {
|
|
6165
|
+
return A(Ee(_e(), n), "yyyy-MM-dd");
|
|
6166
6166
|
}
|
|
6167
|
-
function
|
|
6167
|
+
function Os(n, r) {
|
|
6168
6168
|
const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(n));
|
|
6169
6169
|
return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
|
|
6170
6170
|
}
|
|
6171
|
-
function
|
|
6172
|
-
const r = k(n), e =
|
|
6171
|
+
function $i(n) {
|
|
6172
|
+
const r = k(n), e = Ge(_e(), r);
|
|
6173
6173
|
switch (!0) {
|
|
6174
6174
|
case e === 0:
|
|
6175
6175
|
return "Сегодня";
|
|
@@ -6178,34 +6178,34 @@ function di(n) {
|
|
|
6178
6178
|
case e < 0:
|
|
6179
6179
|
return n;
|
|
6180
6180
|
default:
|
|
6181
|
-
return `${e} ${
|
|
6181
|
+
return `${e} ${Os(e, ["день", "дня", "дней"])} назад`;
|
|
6182
6182
|
}
|
|
6183
6183
|
}
|
|
6184
|
-
class
|
|
6184
|
+
class Ai {
|
|
6185
6185
|
/**
|
|
6186
6186
|
* Возвращает предустановленные диапазоны дат.
|
|
6187
6187
|
*
|
|
6188
6188
|
* @param year Год, от которого считаются годовые периоды (1/3/9 месяцев, кварталы, полугодия, год); по умолчанию текущий.
|
|
6189
6189
|
*/
|
|
6190
6190
|
static defaultDateRanges(r) {
|
|
6191
|
-
const e =
|
|
6191
|
+
const e = Zt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), i = he(r === void 0 ? t : new Date(r, 0, 1)), o = $e(i);
|
|
6192
6192
|
return {
|
|
6193
6193
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
6194
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
6195
|
-
today: { label: "Сегодня", from:
|
|
6196
|
-
yesterday: { label: "Вчера", from:
|
|
6197
|
-
tomorrow: { label: "Завтра", from:
|
|
6198
|
-
currentWeek: { label: "Неделя", from:
|
|
6199
|
-
currentMonth: { label: "Месяц", from:
|
|
6194
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: me(e), to: z(e) },
|
|
6195
|
+
today: { label: "Сегодня", from: _e(), to: is() },
|
|
6196
|
+
yesterday: { label: "Вчера", from: ss(), to: ts() },
|
|
6197
|
+
tomorrow: { label: "Завтра", from: rs(), to: es() },
|
|
6198
|
+
currentWeek: { label: "Неделя", from: Z(t, { weekStartsOn: 1 }), to: Ae(t, { weekStartsOn: 1 }) },
|
|
6199
|
+
currentMonth: { label: "Месяц", from: F(t), to: O(t) },
|
|
6200
6200
|
oneMonth: { label: "1 месяц", from: i, to: O(i) },
|
|
6201
|
-
threeMonths: { label: "3 месяца", from: i, to: O(
|
|
6202
|
-
nineMonths: { label: "9 месяцев", from: i, to: O(
|
|
6203
|
-
firstQuarter: { label: "I квартал", from: i, to: O(
|
|
6204
|
-
secondQuarter: { label: "II квартал", from:
|
|
6205
|
-
thirdQuarter: { label: "III квартал", from:
|
|
6206
|
-
fourthQuarter: { label: "IV квартал", from:
|
|
6207
|
-
firstHalfYear: { label: "I полугодие", from: i, to: O(
|
|
6208
|
-
secondHalfYear: { label: "II полугодие", from:
|
|
6201
|
+
threeMonths: { label: "3 месяца", from: i, to: O($(i, 2)) },
|
|
6202
|
+
nineMonths: { label: "9 месяцев", from: i, to: O($(i, 8)) },
|
|
6203
|
+
firstQuarter: { label: "I квартал", from: i, to: O($(i, 2)) },
|
|
6204
|
+
secondQuarter: { label: "II квартал", from: $(i, 3), to: O($(i, 5)) },
|
|
6205
|
+
thirdQuarter: { label: "III квартал", from: $(i, 6), to: O($(i, 8)) },
|
|
6206
|
+
fourthQuarter: { label: "IV квартал", from: $(i, 9), to: O($(i, 11)) },
|
|
6207
|
+
firstHalfYear: { label: "I полугодие", from: i, to: O($(i, 5)) },
|
|
6208
|
+
secondHalfYear: { label: "II полугодие", from: $(i, 6), to: o },
|
|
6209
6209
|
currentYear: { label: "12 месяцев", from: i, to: o }
|
|
6210
6210
|
};
|
|
6211
6211
|
}
|
|
@@ -6217,23 +6217,23 @@ class Ti {
|
|
|
6217
6217
|
* @param now Опорная дата «сейчас»; по умолчанию текущая.
|
|
6218
6218
|
*/
|
|
6219
6219
|
static standardPeriods(r = /* @__PURE__ */ new Date()) {
|
|
6220
|
-
const e = { weekStartsOn: 1 }, t =
|
|
6220
|
+
const e = { weekStartsOn: 1 }, t = me(r), i = z(r), o = m.decadeInterval(r), c = F(r), u = Se(r), p = m.startOfHalfYear(r), g = he(r), y = m.addHalfYears(r, -1), D = m.addHalfYears(r, 1);
|
|
6221
6221
|
return {
|
|
6222
|
-
yesterday: { label: "Вчера", group: "day", from:
|
|
6222
|
+
yesterday: { label: "Вчера", group: "day", from: me(Ee(r, 1)), to: z(Ee(r, 1)) },
|
|
6223
6223
|
today: { label: "Сегодня", group: "day", from: t, to: i },
|
|
6224
|
-
tomorrow: { label: "Завтра", group: "day", from:
|
|
6225
|
-
lastWeek: { label: "Прошлая неделя", group: "week", from:
|
|
6226
|
-
thisWeek: { label: "Эта неделя", group: "week", from:
|
|
6227
|
-
nextWeek: { label: "Следующая неделя", group: "week", from:
|
|
6224
|
+
tomorrow: { label: "Завтра", group: "day", from: me(ee(r, 1)), to: z(ee(r, 1)) },
|
|
6225
|
+
lastWeek: { label: "Прошлая неделя", group: "week", from: Z(zr(r, 1), e), to: Ae(zr(r, 1), e) },
|
|
6226
|
+
thisWeek: { label: "Эта неделя", group: "week", from: Z(r, e), to: Ae(r, e) },
|
|
6227
|
+
nextWeek: { label: "Следующая неделя", group: "week", from: Z(Pr(r, 1), e), to: Ae(Pr(r, 1), e) },
|
|
6228
6228
|
lastTenDays: { label: "Прошлая декада", group: "decade", ...m.shiftDecadeInterval(r, -1) },
|
|
6229
6229
|
thisTenDays: { label: "Эта декада", group: "decade", ...o },
|
|
6230
6230
|
nextTenDays: { label: "Следующая декада", group: "decade", ...m.shiftDecadeInterval(r, 1) },
|
|
6231
|
-
lastMonth: { label: "Прошлый месяц", group: "month", from:
|
|
6231
|
+
lastMonth: { label: "Прошлый месяц", group: "month", from: F(pr(r, 1)), to: O(pr(r, 1)) },
|
|
6232
6232
|
thisMonth: { label: "Этот месяц", group: "month", from: c, to: O(r) },
|
|
6233
|
-
nextMonth: { label: "Следующий месяц", group: "month", from:
|
|
6234
|
-
lastQuarter: { label: "Прошлый квартал", group: "quarter", from: Se(
|
|
6233
|
+
nextMonth: { label: "Следующий месяц", group: "month", from: F($(r, 1)), to: O($(r, 1)) },
|
|
6234
|
+
lastQuarter: { label: "Прошлый квартал", group: "quarter", from: Se(ur(r, 1)), to: We(ur(r, 1)) },
|
|
6235
6235
|
thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to: We(r) },
|
|
6236
|
-
nextQuarter: { label: "Следующий квартал", group: "quarter", from: Se(
|
|
6236
|
+
nextQuarter: { label: "Следующий квартал", group: "quarter", from: Se(cr(r, 1)), to: We(cr(r, 1)) },
|
|
6237
6237
|
lastHalfYear: {
|
|
6238
6238
|
label: "Прошлое полугодие",
|
|
6239
6239
|
group: "halfYear",
|
|
@@ -6242,21 +6242,21 @@ class Ti {
|
|
|
6242
6242
|
},
|
|
6243
6243
|
thisHalfYear: { label: "Это полугодие", group: "halfYear", from: p, to: m.endOfHalfYear(r) },
|
|
6244
6244
|
nextHalfYear: { label: "Следующее полугодие", group: "halfYear", from: m.startOfHalfYear(D), to: m.endOfHalfYear(D) },
|
|
6245
|
-
lastYear: { label: "Прошлый год", group: "year", from:
|
|
6246
|
-
thisYear: { label: "Этот год", group: "year", from: g, to:
|
|
6247
|
-
nextYear: { label: "Следующий год", group: "year", from:
|
|
6248
|
-
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from:
|
|
6245
|
+
lastYear: { label: "Прошлый год", group: "year", from: he(lr(r, 1)), to: $e(lr(r, 1)) },
|
|
6246
|
+
thisYear: { label: "Этот год", group: "year", from: g, to: $e(r) },
|
|
6247
|
+
nextYear: { label: "Следующий год", group: "year", from: he(or(r, 1)), to: $e(or(r, 1)) },
|
|
6248
|
+
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from: Z(r, e), to: i },
|
|
6249
6249
|
fromBeginningOfThisTenDays: { label: "С начала этой декады", group: "other", section: "fromBeginning", from: o.from, to: i },
|
|
6250
6250
|
fromBeginningOfThisMonth: { label: "С начала этого месяца", group: "other", section: "fromBeginning", from: c, to: i },
|
|
6251
6251
|
fromBeginningOfThisQuarter: { label: "С начала этого квартала", group: "other", section: "fromBeginning", from: u, to: i },
|
|
6252
6252
|
fromBeginningOfThisHalfYear: { label: "С начала этого полугодия", group: "other", section: "fromBeginning", from: p, to: i },
|
|
6253
6253
|
fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: i },
|
|
6254
|
-
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to:
|
|
6254
|
+
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to: Ae(r, e) },
|
|
6255
6255
|
tillEndOfThisTenDays: { label: "До конца этой декады", group: "other", section: "tillEnd", from: t, to: o.to },
|
|
6256
6256
|
tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: O(r) },
|
|
6257
6257
|
tillEndOfThisQuarter: { label: "До конца этого квартала", group: "other", section: "tillEnd", from: t, to: We(r) },
|
|
6258
6258
|
tillEndOfThisHalfYear: { label: "До конца этого полугодия", group: "other", section: "tillEnd", from: t, to: m.endOfHalfYear(r) },
|
|
6259
|
-
tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to:
|
|
6259
|
+
tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to: $e(r) },
|
|
6260
6260
|
lastWeekTillSameWeekDay: { label: "Прошлая неделя, до такого же дня недели", group: "other", section: "lastTillSame", ...m.weekTillSameWeekday(r, -1) },
|
|
6261
6261
|
lastTenDaysTillSameDayNumber: {
|
|
6262
6262
|
label: "Прошлая декада, до такого же номера дня",
|
|
@@ -6268,13 +6268,13 @@ class Ti {
|
|
|
6268
6268
|
label: "Прошлый месяц, до такой же даты",
|
|
6269
6269
|
group: "other",
|
|
6270
6270
|
section: "lastTillSame",
|
|
6271
|
-
...m.intervalTillSameDate(c,
|
|
6271
|
+
...m.intervalTillSameDate(c, F(pr(r, 1)), r)
|
|
6272
6272
|
},
|
|
6273
6273
|
lastQuarterTillSameDate: {
|
|
6274
6274
|
label: "Прошлый квартал, до такой же даты",
|
|
6275
6275
|
group: "other",
|
|
6276
6276
|
section: "lastTillSame",
|
|
6277
|
-
...m.intervalTillSameDate(u, Se(
|
|
6277
|
+
...m.intervalTillSameDate(u, Se(ur(r, 1)), r)
|
|
6278
6278
|
},
|
|
6279
6279
|
lastHalfYearTillSameDate: {
|
|
6280
6280
|
label: "Прошлое полугодие, до такой же даты",
|
|
@@ -6286,7 +6286,7 @@ class Ti {
|
|
|
6286
6286
|
label: "Прошлый год, до такой же даты",
|
|
6287
6287
|
group: "other",
|
|
6288
6288
|
section: "lastTillSame",
|
|
6289
|
-
...m.intervalTillSameDate(g,
|
|
6289
|
+
...m.intervalTillSameDate(g, he(lr(r, 1)), r)
|
|
6290
6290
|
},
|
|
6291
6291
|
nextWeekTillSameWeekDay: { label: "Следующая неделя, до такого же дня недели", group: "other", section: "nextTillSame", ...m.weekTillSameWeekday(r, 1) },
|
|
6292
6292
|
nextTenDaysTillSameDayNumber: {
|
|
@@ -6299,13 +6299,13 @@ class Ti {
|
|
|
6299
6299
|
label: "Следующий месяц, до такой же даты",
|
|
6300
6300
|
group: "other",
|
|
6301
6301
|
section: "nextTillSame",
|
|
6302
|
-
...m.intervalTillSameDate(c,
|
|
6302
|
+
...m.intervalTillSameDate(c, F($(r, 1)), r)
|
|
6303
6303
|
},
|
|
6304
6304
|
nextQuarterTillSameDate: {
|
|
6305
6305
|
label: "Следующий квартал, до такой же даты",
|
|
6306
6306
|
group: "other",
|
|
6307
6307
|
section: "nextTillSame",
|
|
6308
|
-
...m.intervalTillSameDate(u, Se(
|
|
6308
|
+
...m.intervalTillSameDate(u, Se(cr(r, 1)), r)
|
|
6309
6309
|
},
|
|
6310
6310
|
nextHalfYearTillSameDate: {
|
|
6311
6311
|
label: "Следующее полугодие, до такой же даты",
|
|
@@ -6317,14 +6317,14 @@ class Ti {
|
|
|
6317
6317
|
label: "Следующий год, до такой же даты",
|
|
6318
6318
|
group: "other",
|
|
6319
6319
|
section: "nextTillSame",
|
|
6320
|
-
...m.intervalTillSameDate(g,
|
|
6320
|
+
...m.intervalTillSameDate(g, he(or(r, 1)), r)
|
|
6321
6321
|
},
|
|
6322
|
-
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from:
|
|
6323
|
-
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to:
|
|
6322
|
+
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: me(Ee(r, 6)), to: i },
|
|
6323
|
+
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: z(ee(r, 6)) }
|
|
6324
6324
|
};
|
|
6325
6325
|
}
|
|
6326
6326
|
}
|
|
6327
|
-
const
|
|
6327
|
+
const Si = [
|
|
6328
6328
|
{ key: "day", label: "День" },
|
|
6329
6329
|
{ key: "week", label: "Неделя" },
|
|
6330
6330
|
{ key: "decade", label: "Декада" },
|
|
@@ -6333,18 +6333,168 @@ const Ai = [
|
|
|
6333
6333
|
{ key: "halfYear", label: "Полугодие" },
|
|
6334
6334
|
{ key: "year", label: "Год" },
|
|
6335
6335
|
{ key: "other", label: "Прочее" }
|
|
6336
|
-
],
|
|
6336
|
+
], ki = [
|
|
6337
6337
|
{ key: "fromBeginning", label: "С начала периода" },
|
|
6338
6338
|
{ key: "tillEnd", label: "До конца периода" },
|
|
6339
6339
|
{ key: "lastTillSame", label: "Прошлые, до такой же даты" },
|
|
6340
6340
|
{ key: "nextTillSame", label: "Следующие, до такой же даты" },
|
|
6341
6341
|
{ key: "rollingDays", label: "7 дней" }
|
|
6342
6342
|
];
|
|
6343
|
-
|
|
6344
|
-
|
|
6343
|
+
class Ve extends _ {
|
|
6344
|
+
/**
|
|
6345
|
+
* Инициализирует экземпляр класса {@link FaqGroup}.
|
|
6346
|
+
*
|
|
6347
|
+
* @param data Данные для первоначальной инициализации.
|
|
6348
|
+
*/
|
|
6349
|
+
constructor(r) {
|
|
6350
|
+
super(r);
|
|
6351
|
+
}
|
|
6352
|
+
}
|
|
6353
|
+
class ze extends ne {
|
|
6354
|
+
/**
|
|
6355
|
+
* Инициализирует экземпляр класса {@link Faq}.
|
|
6356
|
+
*
|
|
6357
|
+
* Портал не передаёт поле групп, если вопрос не относится ни к одной группе.
|
|
6358
|
+
*
|
|
6359
|
+
* @param data Данные для первоначальной инициализации.
|
|
6360
|
+
*/
|
|
6361
|
+
constructor(e) {
|
|
6362
|
+
super(e, -1);
|
|
6363
|
+
/**
|
|
6364
|
+
* @inheritDoc
|
|
6365
|
+
*/
|
|
6366
|
+
s(this, "question");
|
|
6367
|
+
/**
|
|
6368
|
+
* @inheritDoc
|
|
6369
|
+
*/
|
|
6370
|
+
s(this, "answer");
|
|
6371
|
+
/**
|
|
6372
|
+
* @inheritDoc
|
|
6373
|
+
*/
|
|
6374
|
+
s(this, "groups");
|
|
6375
|
+
this.question = (e == null ? void 0 : e.question) ?? "", this.answer = (e == null ? void 0 : e.answer) ?? "", this.groups = V((e == null ? void 0 : e.groups) ?? [], (t) => new Ve(t));
|
|
6376
|
+
}
|
|
6377
|
+
/**
|
|
6378
|
+
* Возвращает данные вопроса для отправки на портал.
|
|
6379
|
+
*/
|
|
6380
|
+
toSaveData() {
|
|
6381
|
+
return {
|
|
6382
|
+
question: this.question,
|
|
6383
|
+
answer: this.answer,
|
|
6384
|
+
groups: V(this.groups, "id")
|
|
6385
|
+
};
|
|
6386
|
+
}
|
|
6387
|
+
}
|
|
6388
|
+
class Li extends M {
|
|
6389
|
+
/**
|
|
6390
|
+
* Возвращает список часто задаваемых вопросов.
|
|
6391
|
+
*
|
|
6392
|
+
* @param groupId Идентификатор группы, вопросы которой необходимо получить. Если не задан, возвращаются все вопросы.
|
|
6393
|
+
* @param paginationParams Параметры пагинации.
|
|
6394
|
+
*
|
|
6395
|
+
* @see /doc/api/internal#/operations/api_internal_faq_get_list
|
|
6396
|
+
*/
|
|
6397
|
+
getFaqList(r, e) {
|
|
6398
|
+
return this.getTypedPaginated(ze, "/internal/faq", void 0, void 0, e, a(r) ? {} : { group: r });
|
|
6399
|
+
}
|
|
6400
|
+
/**
|
|
6401
|
+
* Возвращает данные о часто задаваемом вопросе.
|
|
6402
|
+
*
|
|
6403
|
+
* @param faqId Идентификатор вопроса.
|
|
6404
|
+
*
|
|
6405
|
+
* @see /doc/api/internal#/operations/api_internal_faq_get
|
|
6406
|
+
*/
|
|
6407
|
+
getFaq(r) {
|
|
6408
|
+
return this.get(`/internal/faq/${r}`, {}, (e) => new ze(e.data));
|
|
6409
|
+
}
|
|
6410
|
+
/**
|
|
6411
|
+
* Создаёт новый часто задаваемый вопрос.
|
|
6412
|
+
*
|
|
6413
|
+
* @param data Данные для создания вопроса.
|
|
6414
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
6415
|
+
* установить данные об ошибках валидации
|
|
6416
|
+
* в случае ошибок в запросах.
|
|
6417
|
+
*
|
|
6418
|
+
* @see /doc/api/internal#/operations/api_internal_faq_create
|
|
6419
|
+
*/
|
|
6420
|
+
createFaq(r, e = {}) {
|
|
6421
|
+
return this.post("/internal/faq", r, (t) => new ze(t.data), e);
|
|
6422
|
+
}
|
|
6423
|
+
/**
|
|
6424
|
+
* Изменяет данные о часто задаваемом вопросе.
|
|
6425
|
+
*
|
|
6426
|
+
* @param faqId Идентификатор вопроса.
|
|
6427
|
+
* @param data Данные для изменения вопроса.
|
|
6428
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
6429
|
+
* установить данные об ошибках валидации
|
|
6430
|
+
* в случае ошибок в запросах.
|
|
6431
|
+
*
|
|
6432
|
+
* @see /doc/api/internal#/operations/api_internal_faq_update
|
|
6433
|
+
*/
|
|
6434
|
+
updateFaq(r, e, t = {}) {
|
|
6435
|
+
return this.patch(`/internal/faq/${r}`, e, (i) => new ze(i.data), t);
|
|
6436
|
+
}
|
|
6437
|
+
/**
|
|
6438
|
+
* Удаляет часто задаваемый вопрос.
|
|
6439
|
+
*
|
|
6440
|
+
* @param faqId Идентификатор вопроса.
|
|
6441
|
+
*
|
|
6442
|
+
* @see /doc/api/internal#/operations/api_internal_faq_delete
|
|
6443
|
+
*/
|
|
6444
|
+
removeFaq(r) {
|
|
6445
|
+
return this.delete(`/internal/faq/${r}`);
|
|
6446
|
+
}
|
|
6447
|
+
/**
|
|
6448
|
+
* Возвращает список групп часто задаваемых вопросов.
|
|
6449
|
+
*
|
|
6450
|
+
* @see /doc/api/internal#/operations/api_internal_faq_groups_get_list
|
|
6451
|
+
*/
|
|
6452
|
+
getGroupsList() {
|
|
6453
|
+
return this.getTypedList(Ve, "/internal/faq/groups");
|
|
6454
|
+
}
|
|
6455
|
+
/**
|
|
6456
|
+
* Создаёт новую группу часто задаваемых вопросов.
|
|
6457
|
+
*
|
|
6458
|
+
* @param data Данные для создания группы.
|
|
6459
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
6460
|
+
* установить данные об ошибках валидации
|
|
6461
|
+
* в случае ошибок в запросах.
|
|
6462
|
+
*
|
|
6463
|
+
* @see /doc/api/internal#/operations/api_internal_faq_groups_create
|
|
6464
|
+
*/
|
|
6465
|
+
createGroup(r, e = {}) {
|
|
6466
|
+
return this.post("/internal/faq/groups", r, (t) => new Ve(t.data), e);
|
|
6467
|
+
}
|
|
6468
|
+
/**
|
|
6469
|
+
* Изменяет данные о группе часто задаваемых вопросов.
|
|
6470
|
+
*
|
|
6471
|
+
* @param groupId Идентификатор группы.
|
|
6472
|
+
* @param data Данные для изменения группы.
|
|
6473
|
+
* @param validationFieldResultData Список полей, для которых необходимо
|
|
6474
|
+
* установить данные об ошибках валидации
|
|
6475
|
+
* в случае ошибок в запросах.
|
|
6476
|
+
*
|
|
6477
|
+
* @see /doc/api/internal#/operations/api_internal_faq_groups_update
|
|
6478
|
+
*/
|
|
6479
|
+
updateGroup(r, e, t = {}) {
|
|
6480
|
+
return this.patch(`/internal/faq/groups/${r}`, e, (i) => new Ve(i.data), t);
|
|
6481
|
+
}
|
|
6482
|
+
/**
|
|
6483
|
+
* Удаляет группу часто задаваемых вопросов. Вопросы группы при этом не удаляются.
|
|
6484
|
+
*
|
|
6485
|
+
* @param groupId Идентификатор группы.
|
|
6486
|
+
*
|
|
6487
|
+
* @see /doc/api/internal#/operations/api_internal_faq_groups_delete
|
|
6488
|
+
*/
|
|
6489
|
+
removeGroup(r) {
|
|
6490
|
+
return this.delete(`/internal/faq/groups/${r}`);
|
|
6491
|
+
}
|
|
6492
|
+
}
|
|
6493
|
+
function Oi(n) {
|
|
6494
|
+
const r = Yt(n * 100);
|
|
6345
6495
|
return `${r >= 0 ? "+" : ""}${r}%`;
|
|
6346
6496
|
}
|
|
6347
|
-
class
|
|
6497
|
+
class $t {
|
|
6348
6498
|
/**
|
|
6349
6499
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
6350
6500
|
*
|
|
@@ -6360,7 +6510,7 @@ class dt {
|
|
|
6360
6510
|
*/
|
|
6361
6511
|
static getProductMultiplicity(r) {
|
|
6362
6512
|
var e, t;
|
|
6363
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) == null ? void 0 : t.minCount) != null &&
|
|
6513
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) == null ? void 0 : t.minCount) != null && !$t.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
6364
6514
|
}
|
|
6365
6515
|
/**
|
|
6366
6516
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -6372,7 +6522,7 @@ class dt {
|
|
|
6372
6522
|
return ((e = r.properties) == null ? void 0 : e.lengthStep) != null ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((i = r.properties) == null ? void 0 : i.minCount) != null ? r.properties.minCount : 0.01;
|
|
6373
6523
|
}
|
|
6374
6524
|
}
|
|
6375
|
-
const
|
|
6525
|
+
const we = class we extends h {
|
|
6376
6526
|
/**
|
|
6377
6527
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
6378
6528
|
*/
|
|
@@ -6392,7 +6542,7 @@ const ye = class ye extends h {
|
|
|
6392
6542
|
*/
|
|
6393
6543
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
6394
6544
|
static getCachedResponse(e) {
|
|
6395
|
-
const t =
|
|
6545
|
+
const t = we.responseDataCache.get(e);
|
|
6396
6546
|
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
6397
6547
|
return t.val;
|
|
6398
6548
|
}
|
|
@@ -6403,8 +6553,8 @@ const ye = class ye extends h {
|
|
|
6403
6553
|
* @param data Данные для кэширования.
|
|
6404
6554
|
*/
|
|
6405
6555
|
cacheResponse(e, t) {
|
|
6406
|
-
|
|
6407
|
-
validTo:
|
|
6556
|
+
we.responseDataCache.set(e, {
|
|
6557
|
+
validTo: ns(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
6408
6558
|
val: t
|
|
6409
6559
|
});
|
|
6410
6560
|
}
|
|
@@ -6420,21 +6570,21 @@ const ye = class ye extends h {
|
|
|
6420
6570
|
*/
|
|
6421
6571
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
6422
6572
|
getTypedDataArrayRequester(e, t, i = !1, o = {}, c = void 0) {
|
|
6423
|
-
const u = t + (Q(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ?
|
|
6573
|
+
const u = t + (Q(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? we.getCachedResponse(u) : void 0;
|
|
6424
6574
|
return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((g) => (i && g && this.cacheResponse(u, g), g));
|
|
6425
6575
|
}
|
|
6426
6576
|
};
|
|
6427
6577
|
/**
|
|
6428
6578
|
* Кэш результатов запросов.
|
|
6429
6579
|
*/
|
|
6430
|
-
s(
|
|
6431
|
-
let
|
|
6432
|
-
class
|
|
6580
|
+
s(we, "responseDataCache", /* @__PURE__ */ new Map());
|
|
6581
|
+
let Ue = we;
|
|
6582
|
+
class Ii {
|
|
6433
6583
|
/**
|
|
6434
6584
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
6435
6585
|
*/
|
|
6436
6586
|
static generateUndefinedManagerInstance() {
|
|
6437
|
-
return new
|
|
6587
|
+
return new X({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
6438
6588
|
}
|
|
6439
6589
|
/**
|
|
6440
6590
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -6445,15 +6595,15 @@ class ki {
|
|
|
6445
6595
|
return r.id === 0 && r.guid === "-undefined-";
|
|
6446
6596
|
}
|
|
6447
6597
|
}
|
|
6448
|
-
class
|
|
6598
|
+
class At extends Ue {
|
|
6449
6599
|
/**
|
|
6450
6600
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
6451
6601
|
*/
|
|
6452
6602
|
async getManagers() {
|
|
6453
|
-
const r = "/internal/managers", e =
|
|
6603
|
+
const r = "/internal/managers", e = Ue.getCachedResponse(r);
|
|
6454
6604
|
if (e)
|
|
6455
6605
|
return e;
|
|
6456
|
-
const t = await this.get(r), i = x.instanceListInitializer(
|
|
6606
|
+
const t = await this.get(r), i = x.instanceListInitializer(X, t.data);
|
|
6457
6607
|
return this.cacheResponse(r, i), i;
|
|
6458
6608
|
}
|
|
6459
6609
|
/**
|
|
@@ -6464,11 +6614,11 @@ class Tt extends Fe {
|
|
|
6464
6614
|
* @see /doc/api/internal#/operations/api_internal_managers_get
|
|
6465
6615
|
*/
|
|
6466
6616
|
getManager(r) {
|
|
6467
|
-
return this.get(`/internal/managers/${r}`, {}, (e) => new
|
|
6617
|
+
return this.get(`/internal/managers/${r}`, {}, (e) => new X(e.data));
|
|
6468
6618
|
}
|
|
6469
6619
|
}
|
|
6470
6620
|
var Ie = /* @__PURE__ */ ((n) => (n.Processing = "processing", n.Completed = "completed", n.Error = "error", n.NeedsActualization = "needs_actualization", n))(Ie || {});
|
|
6471
|
-
class
|
|
6621
|
+
class Is {
|
|
6472
6622
|
/**
|
|
6473
6623
|
* Инициализирует экземпляр класса {@link OfferActualization}.
|
|
6474
6624
|
*
|
|
@@ -6491,7 +6641,7 @@ class Ls {
|
|
|
6491
6641
|
* @inheritDoc
|
|
6492
6642
|
*/
|
|
6493
6643
|
s(this, "error");
|
|
6494
|
-
this.status = (r == null ? void 0 : r.status) ?? Ie.Processing, this.actualizedAt =
|
|
6644
|
+
this.status = (r == null ? void 0 : r.status) ?? Ie.Processing, this.actualizedAt = J.parse(r == null ? void 0 : r.actualizedAt), this.expiresAt = J.parse(r == null ? void 0 : r.expiresAt), this.error = r == null ? void 0 : r.error;
|
|
6495
6645
|
}
|
|
6496
6646
|
/**
|
|
6497
6647
|
* @inheritDoc
|
|
@@ -6524,7 +6674,7 @@ class Ls {
|
|
|
6524
6674
|
return this.status === Ie.Completed && !this.isOutdatedAt(r);
|
|
6525
6675
|
}
|
|
6526
6676
|
}
|
|
6527
|
-
class
|
|
6677
|
+
class St extends Xe {
|
|
6528
6678
|
/**
|
|
6529
6679
|
* Инициализирует экземпляр класса {@link OfferShortInfo}.
|
|
6530
6680
|
*
|
|
@@ -6556,10 +6706,10 @@ class At extends Je {
|
|
|
6556
6706
|
* @inheritDoc
|
|
6557
6707
|
*/
|
|
6558
6708
|
s(this, "file");
|
|
6559
|
-
this.name = e == null ? void 0 : e.name, this.client = new
|
|
6709
|
+
this.name = e == null ? void 0 : e.name, this.client = new le(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum, this.isProfstroy = e == null ? void 0 : e.isProfstroy, this.actualization = (e == null ? void 0 : e.actualization) && new Is(e.actualization), this.file = e == null ? void 0 : e.file;
|
|
6560
6710
|
}
|
|
6561
6711
|
}
|
|
6562
|
-
class
|
|
6712
|
+
class xs extends _r {
|
|
6563
6713
|
/**
|
|
6564
6714
|
* Инициализирует экземпляр класса {@link ProfstroyOfferItem}.
|
|
6565
6715
|
*
|
|
@@ -6598,7 +6748,7 @@ class Os extends xr {
|
|
|
6598
6748
|
return !this.isProductStub && !this.isIgnored && Q(this.lineError);
|
|
6599
6749
|
}
|
|
6600
6750
|
}
|
|
6601
|
-
class
|
|
6751
|
+
class H extends St {
|
|
6602
6752
|
/**
|
|
6603
6753
|
* Инициализирует экземпляр класса {@link Offer}.
|
|
6604
6754
|
*
|
|
@@ -6615,11 +6765,11 @@ class M extends At {
|
|
|
6615
6765
|
*/
|
|
6616
6766
|
s(this, "products");
|
|
6617
6767
|
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map(
|
|
6618
|
-
(t) => e.isProfstroy ? new
|
|
6768
|
+
(t) => e.isProfstroy ? new xs(t) : new _r(t)
|
|
6619
6769
|
);
|
|
6620
6770
|
}
|
|
6621
6771
|
}
|
|
6622
|
-
class
|
|
6772
|
+
class xi extends Me {
|
|
6623
6773
|
/**
|
|
6624
6774
|
* Инициализирует экземпляр класса {@link OffersListFilters}.
|
|
6625
6775
|
*
|
|
@@ -6660,9 +6810,9 @@ class Li extends Me {
|
|
|
6660
6810
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, e;
|
|
6661
6811
|
}
|
|
6662
6812
|
}
|
|
6663
|
-
class
|
|
6813
|
+
class tr extends v {
|
|
6664
6814
|
}
|
|
6665
|
-
class
|
|
6815
|
+
class kt extends Tt {
|
|
6666
6816
|
/**
|
|
6667
6817
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
6668
6818
|
*
|
|
@@ -6723,7 +6873,7 @@ class $t extends bt {
|
|
|
6723
6873
|
* @inheritDoc
|
|
6724
6874
|
*/
|
|
6725
6875
|
s(this, "isLargeOrder");
|
|
6726
|
-
this.client = new
|
|
6876
|
+
this.client = new le(e == null ? void 0 : e.client), this.payment = {
|
|
6727
6877
|
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
6728
6878
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
6729
6879
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
@@ -6732,10 +6882,10 @@ class $t extends bt {
|
|
|
6732
6882
|
date: I((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? k(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
6733
6883
|
address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new xe(e.delivery.address) : void 0,
|
|
6734
6884
|
warehouse: (y = e == null ? void 0 : e.delivery) != null && y.warehouse ? new He(e.delivery.warehouse) : void 0
|
|
6735
|
-
}, this.attachedUser = e != null && e.attachedUser ? new
|
|
6885
|
+
}, this.attachedUser = e != null && e.attachedUser ? new q(e == null ? void 0 : e.attachedUser) : void 0, this.status = new tr(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new v(e.statusDetail) : void 0, this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.attachedAt = I(e == null ? void 0 : e.attachedAt) ? k(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isProfstroy = (e == null ? void 0 : e.isProfstroy) ?? !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;
|
|
6736
6886
|
}
|
|
6737
6887
|
}
|
|
6738
|
-
class
|
|
6888
|
+
class qs extends ht {
|
|
6739
6889
|
/**
|
|
6740
6890
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
6741
6891
|
*
|
|
@@ -6792,10 +6942,10 @@ class Is extends ut {
|
|
|
6792
6942
|
* Продукт, которым заменена текущая запись.
|
|
6793
6943
|
*/
|
|
6794
6944
|
s(this, "replacement");
|
|
6795
|
-
this.product = new
|
|
6945
|
+
this.product = new ve(e.product), this.currency = new E(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 = G(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
|
|
6796
6946
|
}
|
|
6797
6947
|
}
|
|
6798
|
-
class L extends
|
|
6948
|
+
class L extends kt {
|
|
6799
6949
|
/**
|
|
6800
6950
|
* Инициализирует экземпляр класса {@link Order}.
|
|
6801
6951
|
*
|
|
@@ -6859,11 +7009,11 @@ class L extends $t {
|
|
|
6859
7009
|
this.products = (e.products ?? []).map((i) => {
|
|
6860
7010
|
var c;
|
|
6861
7011
|
const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
|
|
6862
|
-
return new
|
|
6863
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
7012
|
+
return new qs(i, o);
|
|
7013
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ke.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new v(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new tr(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
|
|
6864
7014
|
}
|
|
6865
7015
|
}
|
|
6866
|
-
class
|
|
7016
|
+
class qi extends M {
|
|
6867
7017
|
/**
|
|
6868
7018
|
* Возвращает список заказов-черновиков, удовлетворяющих указанным параметрам поиска.
|
|
6869
7019
|
*
|
|
@@ -6875,7 +7025,7 @@ class Oi extends j {
|
|
|
6875
7025
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get_list
|
|
6876
7026
|
*/
|
|
6877
7027
|
getOffers(r, e, t, i = void 0) {
|
|
6878
|
-
return this.getTypedPaginated(
|
|
7028
|
+
return this.getTypedPaginated(St, "/internal/orders/offers", r, e, t, {}, void 0, i);
|
|
6879
7029
|
}
|
|
6880
7030
|
/**
|
|
6881
7031
|
* Создаёт заказ-черновик из содержимого корзины клиента и возвращает данные созданной записи.
|
|
@@ -6894,7 +7044,7 @@ class Oi extends j {
|
|
|
6894
7044
|
name: e,
|
|
6895
7045
|
items: t != null && t.length ? t : void 0
|
|
6896
7046
|
},
|
|
6897
|
-
(i) => new
|
|
7047
|
+
(i) => new H(i.data)
|
|
6898
7048
|
);
|
|
6899
7049
|
}
|
|
6900
7050
|
/**
|
|
@@ -6910,7 +7060,7 @@ class Oi extends j {
|
|
|
6910
7060
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_profstroy
|
|
6911
7061
|
*/
|
|
6912
7062
|
createProfstroyOffer(r, e, t, i = {}) {
|
|
6913
|
-
return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new
|
|
7063
|
+
return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new H(o.data), i);
|
|
6914
7064
|
}
|
|
6915
7065
|
/**
|
|
6916
7066
|
* Запускает актуализацию заказа-черновика, созданного из файла «Профстрой»: текущий состав записи
|
|
@@ -6921,7 +7071,7 @@ class Oi extends j {
|
|
|
6921
7071
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_profstroy_actualize
|
|
6922
7072
|
*/
|
|
6923
7073
|
actualizeProfstroyOffer(r) {
|
|
6924
|
-
return this.post(`/internal/orders/offers/${r}/profstroy/actualize`, {}, (e) => new
|
|
7074
|
+
return this.post(`/internal/orders/offers/${r}/profstroy/actualize`, {}, (e) => new H(e.data));
|
|
6925
7075
|
}
|
|
6926
7076
|
/**
|
|
6927
7077
|
* Пересобирает заказ-черновик из ранее сохранённого файла «Профстрой»: состав записи формируется заново,
|
|
@@ -6932,7 +7082,7 @@ class Oi extends j {
|
|
|
6932
7082
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_profstroy_reload
|
|
6933
7083
|
*/
|
|
6934
7084
|
reloadProfstroyOffer(r) {
|
|
6935
|
-
return this.post(`/internal/orders/offers/${r}/profstroy/reload`, {}, (e) => new
|
|
7085
|
+
return this.post(`/internal/orders/offers/${r}/profstroy/reload`, {}, (e) => new H(e.data));
|
|
6936
7086
|
}
|
|
6937
7087
|
/**
|
|
6938
7088
|
* Возвращает данные заказа-черновика с указанным идентификатором.
|
|
@@ -6942,7 +7092,7 @@ class Oi extends j {
|
|
|
6942
7092
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get
|
|
6943
7093
|
*/
|
|
6944
7094
|
getOffer(r) {
|
|
6945
|
-
return this.get(`/internal/orders/offers/${r}`, {}, (e) => new
|
|
7095
|
+
return this.get(`/internal/orders/offers/${r}`, {}, (e) => new H(e.data));
|
|
6946
7096
|
}
|
|
6947
7097
|
/**
|
|
6948
7098
|
* Обновляет данные заказа-черновика и возвращает обновлённые данные.
|
|
@@ -6953,7 +7103,7 @@ class Oi extends j {
|
|
|
6953
7103
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_change
|
|
6954
7104
|
*/
|
|
6955
7105
|
updateOffer(r, e) {
|
|
6956
|
-
return this.patch(`/internal/orders/offers/${r}`, { name: e }, (t) => new
|
|
7106
|
+
return this.patch(`/internal/orders/offers/${r}`, { name: e }, (t) => new H(t.data));
|
|
6957
7107
|
}
|
|
6958
7108
|
/**
|
|
6959
7109
|
* Удаляет заказ-черновик.
|
|
@@ -6984,7 +7134,7 @@ class Oi extends j {
|
|
|
6984
7134
|
`/internal/orders/offers/${r}/create-order`,
|
|
6985
7135
|
{
|
|
6986
7136
|
...e,
|
|
6987
|
-
deliveryDate: e.deliveryDate ?
|
|
7137
|
+
deliveryDate: e.deliveryDate ? A(e.deliveryDate, o) : void 0,
|
|
6988
7138
|
items: t != null && t.length ? t : void 0
|
|
6989
7139
|
},
|
|
6990
7140
|
(c) => x.instanceListInitializer(L, c.data),
|
|
@@ -7016,7 +7166,7 @@ class Oi extends j {
|
|
|
7016
7166
|
is_additional_sale: e.isAdditionalSale,
|
|
7017
7167
|
...e.configuratorParams
|
|
7018
7168
|
},
|
|
7019
|
-
(i) => new
|
|
7169
|
+
(i) => new H(i.data),
|
|
7020
7170
|
t
|
|
7021
7171
|
);
|
|
7022
7172
|
}
|
|
@@ -7046,7 +7196,7 @@ class Oi extends j {
|
|
|
7046
7196
|
is_additional_sale: t.isAdditionalSale,
|
|
7047
7197
|
...t.configuratorParams
|
|
7048
7198
|
},
|
|
7049
|
-
(o) => new
|
|
7199
|
+
(o) => new H(o.data),
|
|
7050
7200
|
i
|
|
7051
7201
|
);
|
|
7052
7202
|
}
|
|
@@ -7059,7 +7209,7 @@ class Oi extends j {
|
|
|
7059
7209
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_product_delete
|
|
7060
7210
|
*/
|
|
7061
7211
|
deleteOfferProduct(r, e) {
|
|
7062
|
-
return this.delete(`/internal/orders/offers/${r}/products/${e}`, (t) => new
|
|
7212
|
+
return this.delete(`/internal/orders/offers/${r}/products/${e}`, (t) => new H(t.data));
|
|
7063
7213
|
}
|
|
7064
7214
|
/**
|
|
7065
7215
|
* Возвращает содержимое печатной формы заказа-черновика в формате HTML.
|
|
@@ -7099,7 +7249,7 @@ class Oi extends j {
|
|
|
7099
7249
|
return this.post(`/internal/orders/offers/${r}/send`, e);
|
|
7100
7250
|
}
|
|
7101
7251
|
}
|
|
7102
|
-
class
|
|
7252
|
+
class _i {
|
|
7103
7253
|
/**
|
|
7104
7254
|
* Возвращает признак того, что запись создана из файла выгрузки программы «Профстрой».
|
|
7105
7255
|
*
|
|
@@ -7118,8 +7268,8 @@ class Ii {
|
|
|
7118
7268
|
return !a(r) && r.isProfstroy === !0 && !a(r.actualization);
|
|
7119
7269
|
}
|
|
7120
7270
|
}
|
|
7121
|
-
var
|
|
7122
|
-
class
|
|
7271
|
+
var _s = /* @__PURE__ */ ((n) => (n.View = "view", n.Share = "share", n.EditTags = "edit_tags", n.SaveOrderIgnoredProducts = "save_order_ignored_products", n.ChangeStatus = "change_status", n.ChangeProducts = "change_products", n.ChangeOrderParameters = "change_order_parameters", n.Recalculate = "recalculate", n.AttachOrder = "attach_order", n.DetachOrder = "detach_order", n.ChangeAttachedOperator = "change_attached_operator", n.SendOnlinePaymentLink = "send_online_payment_link", n.ConfirmOnlineFullPayment = "confirm_online_full_payment", n.MergeOrders = "merge_orders", n.GetHistory = "get_history", n.CloneOrder = "clone_order", n.DeleteAttachedFile = "delete_attached_file", n))(_s || {});
|
|
7272
|
+
class Ni {
|
|
7123
7273
|
/**
|
|
7124
7274
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
7125
7275
|
*
|
|
@@ -7186,11 +7336,11 @@ class xi {
|
|
|
7186
7336
|
this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (i = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : i.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
|
|
7187
7337
|
}
|
|
7188
7338
|
}
|
|
7189
|
-
class
|
|
7339
|
+
class Lt extends v {
|
|
7190
7340
|
}
|
|
7191
|
-
class
|
|
7341
|
+
class Ot extends v {
|
|
7192
7342
|
}
|
|
7193
|
-
class
|
|
7343
|
+
class Fi extends Me {
|
|
7194
7344
|
/**
|
|
7195
7345
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
7196
7346
|
*
|
|
@@ -7291,7 +7441,7 @@ class _i extends Me {
|
|
|
7291
7441
|
* @inheritDoc
|
|
7292
7442
|
*/
|
|
7293
7443
|
s(this, "onlyMyRegions");
|
|
7294
|
-
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new
|
|
7444
|
+
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new X(u) : new Lt(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new le(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new q(e.creator) : void 0, this.deliveryDate = new b(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 Pe(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new b(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new U(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new K(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Ot(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new He(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
7295
7445
|
}
|
|
7296
7446
|
/**
|
|
7297
7447
|
* @inheritDoc
|
|
@@ -7308,7 +7458,7 @@ class _i extends Me {
|
|
|
7308
7458
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
7309
7459
|
break;
|
|
7310
7460
|
case "deliveryType":
|
|
7311
|
-
this.deliveryType = new
|
|
7461
|
+
this.deliveryType = new K();
|
|
7312
7462
|
break;
|
|
7313
7463
|
case "clientCities":
|
|
7314
7464
|
this.clientCities = [];
|
|
@@ -7342,7 +7492,7 @@ class _i extends Me {
|
|
|
7342
7492
|
return !((t = e == null ? void 0 : e.createdAt) != null && t.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.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
|
|
7343
7493
|
}
|
|
7344
7494
|
}
|
|
7345
|
-
class
|
|
7495
|
+
class Ns {
|
|
7346
7496
|
/**
|
|
7347
7497
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
7348
7498
|
*
|
|
@@ -7365,10 +7515,10 @@ class _s {
|
|
|
7365
7515
|
* @inheritDoc
|
|
7366
7516
|
*/
|
|
7367
7517
|
s(this, "createdAt");
|
|
7368
|
-
this.user = new
|
|
7518
|
+
this.user = new q(r == null ? void 0 : r.user), this.status = new tr(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new v(r.statusDetail) : void 0, this.createdAt = I(r == null ? void 0 : r.createdAt) ? k(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
7369
7519
|
}
|
|
7370
7520
|
}
|
|
7371
|
-
class
|
|
7521
|
+
class Ui extends M {
|
|
7372
7522
|
/**
|
|
7373
7523
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
7374
7524
|
*
|
|
@@ -7380,7 +7530,7 @@ class qi extends j {
|
|
|
7380
7530
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get_list
|
|
7381
7531
|
*/
|
|
7382
7532
|
getOrders(r, e, t, i = void 0) {
|
|
7383
|
-
return this.getTypedPaginated(
|
|
7533
|
+
return this.getTypedPaginated(kt, "/internal/orders", r, e, t, {}, void 0, i);
|
|
7384
7534
|
}
|
|
7385
7535
|
/**
|
|
7386
7536
|
* Возвращает количество заказов, соответствующих указанным фильтрам.
|
|
@@ -7393,7 +7543,7 @@ class qi extends j {
|
|
|
7393
7543
|
getOrdersCount(r, e = void 0) {
|
|
7394
7544
|
return this.get(
|
|
7395
7545
|
"/internal/orders/count",
|
|
7396
|
-
r ? { filters: JSON.stringify((r instanceof
|
|
7546
|
+
r ? { filters: JSON.stringify((r instanceof re ? r : new re(r)).toPrimitive()) } : {},
|
|
7397
7547
|
void 0,
|
|
7398
7548
|
void 0,
|
|
7399
7549
|
e
|
|
@@ -7440,7 +7590,7 @@ class qi extends j {
|
|
|
7440
7590
|
`/internal/clients/${r}/orders`,
|
|
7441
7591
|
{
|
|
7442
7592
|
...e,
|
|
7443
|
-
deliveryDate:
|
|
7593
|
+
deliveryDate: A(e.deliveryDate, o),
|
|
7444
7594
|
items: t != null && t.length ? t : void 0
|
|
7445
7595
|
},
|
|
7446
7596
|
(c) => x.instanceListInitializer(L, c.data),
|
|
@@ -7515,7 +7665,7 @@ class qi extends j {
|
|
|
7515
7665
|
`/internal/orders/${r}`,
|
|
7516
7666
|
{
|
|
7517
7667
|
...e,
|
|
7518
|
-
deliveryDate: e.deliveryDate ?
|
|
7668
|
+
deliveryDate: e.deliveryDate ? A(e.deliveryDate, i) : void 0
|
|
7519
7669
|
},
|
|
7520
7670
|
(o) => new L(o.data),
|
|
7521
7671
|
t
|
|
@@ -7594,7 +7744,7 @@ class qi extends j {
|
|
|
7594
7744
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_history_get
|
|
7595
7745
|
*/
|
|
7596
7746
|
getOrderStatusHistory(r) {
|
|
7597
|
-
return this.getTypedList(
|
|
7747
|
+
return this.getTypedList(Ns, `/internal/orders/${r}/history`);
|
|
7598
7748
|
}
|
|
7599
7749
|
/**
|
|
7600
7750
|
* Возвращает содержимое печатной формы заказа в формате HTML.
|
|
@@ -7727,7 +7877,7 @@ class qi extends j {
|
|
|
7727
7877
|
return this.get(
|
|
7728
7878
|
`/internal/orders/delivery/${r}/cost`,
|
|
7729
7879
|
{
|
|
7730
|
-
date:
|
|
7880
|
+
date: A(e, o),
|
|
7731
7881
|
warehouse_id: t
|
|
7732
7882
|
},
|
|
7733
7883
|
(c) => c.data,
|
|
@@ -7736,8 +7886,8 @@ class qi extends j {
|
|
|
7736
7886
|
);
|
|
7737
7887
|
}
|
|
7738
7888
|
}
|
|
7739
|
-
const
|
|
7740
|
-
class
|
|
7889
|
+
const Mi = Symbol("currentOrder");
|
|
7890
|
+
class wr {
|
|
7741
7891
|
/**
|
|
7742
7892
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
7743
7893
|
*
|
|
@@ -7764,12 +7914,12 @@ class yr {
|
|
|
7764
7914
|
* Источник клиентской цены.
|
|
7765
7915
|
*/
|
|
7766
7916
|
s(this, "source");
|
|
7767
|
-
this.client = new
|
|
7917
|
+
this.client = new le(r == null ? void 0 : r.client), this.product = new N(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) ?? qr.Product;
|
|
7768
7918
|
}
|
|
7769
7919
|
}
|
|
7770
|
-
const
|
|
7920
|
+
const vr = (n) => {
|
|
7771
7921
|
var r, e, t, i, o;
|
|
7772
|
-
return n ?
|
|
7922
|
+
return n ? ot(
|
|
7773
7923
|
{
|
|
7774
7924
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
7775
7925
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -7778,13 +7928,13 @@ const ar = (n) => {
|
|
|
7778
7928
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
7779
7929
|
hideNotActive: n.hideNotActive
|
|
7780
7930
|
},
|
|
7781
|
-
(c) => a(c) || (
|
|
7931
|
+
(c) => a(c) || (G(c) || Lr(c)) && Q(c)
|
|
7782
7932
|
) : {};
|
|
7783
|
-
},
|
|
7933
|
+
}, Zr = (n) => {
|
|
7784
7934
|
const r = {};
|
|
7785
7935
|
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;
|
|
7786
7936
|
};
|
|
7787
|
-
class
|
|
7937
|
+
class Hi extends h {
|
|
7788
7938
|
/**
|
|
7789
7939
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
7790
7940
|
*
|
|
@@ -7798,10 +7948,10 @@ class Ui extends h {
|
|
|
7798
7948
|
return this.get(
|
|
7799
7949
|
`/internal/price/products/${r}/analyze`,
|
|
7800
7950
|
{
|
|
7801
|
-
...
|
|
7802
|
-
filters:
|
|
7951
|
+
...Zr(e),
|
|
7952
|
+
filters: vr(t)
|
|
7803
7953
|
},
|
|
7804
|
-
(i) => x.instanceListInitializer(
|
|
7954
|
+
(i) => x.instanceListInitializer(wr, i.data)
|
|
7805
7955
|
);
|
|
7806
7956
|
}
|
|
7807
7957
|
/**
|
|
@@ -7817,10 +7967,10 @@ class Ui extends h {
|
|
|
7817
7967
|
return this.get(
|
|
7818
7968
|
`/internal/price/categories/${r}/analyze`,
|
|
7819
7969
|
{
|
|
7820
|
-
...
|
|
7821
|
-
filters:
|
|
7970
|
+
...Zr(e),
|
|
7971
|
+
filters: vr(t)
|
|
7822
7972
|
},
|
|
7823
|
-
(i) => x.instanceListInitializer(
|
|
7973
|
+
(i) => x.instanceListInitializer(wr, i.data)
|
|
7824
7974
|
);
|
|
7825
7975
|
}
|
|
7826
7976
|
/**
|
|
@@ -7839,13 +7989,13 @@ class Ui extends h {
|
|
|
7839
7989
|
`/internal/price/categories/${r}/analyze/square`,
|
|
7840
7990
|
{
|
|
7841
7991
|
...e,
|
|
7842
|
-
filters:
|
|
7992
|
+
filters: vr(t)
|
|
7843
7993
|
},
|
|
7844
|
-
(i) => x.instanceListInitializer(
|
|
7994
|
+
(i) => x.instanceListInitializer(wr, i.data)
|
|
7845
7995
|
);
|
|
7846
7996
|
}
|
|
7847
7997
|
}
|
|
7848
|
-
class
|
|
7998
|
+
class Fs {
|
|
7849
7999
|
/**
|
|
7850
8000
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
7851
8001
|
*
|
|
@@ -7892,10 +8042,10 @@ class qs {
|
|
|
7892
8042
|
* @inheritDoc
|
|
7893
8043
|
*/
|
|
7894
8044
|
s(this, "currency");
|
|
7895
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = I(r.costDate) ? k(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new
|
|
8045
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = I(r.costDate) ? k(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Fe(r.product) : void 0, this.client = r.client ? new q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new E(r.currency) : void 0;
|
|
7896
8046
|
}
|
|
7897
8047
|
}
|
|
7898
|
-
class
|
|
8048
|
+
class Us extends Fe {
|
|
7899
8049
|
/**
|
|
7900
8050
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
7901
8051
|
*
|
|
@@ -7907,10 +8057,10 @@ class Ns extends Ue {
|
|
|
7907
8057
|
* @inheritDoc
|
|
7908
8058
|
*/
|
|
7909
8059
|
s(this, "history");
|
|
7910
|
-
this.history =
|
|
8060
|
+
this.history = V(e.history, (t) => new Fs(t));
|
|
7911
8061
|
}
|
|
7912
8062
|
}
|
|
7913
|
-
class
|
|
8063
|
+
class Bi extends h {
|
|
7914
8064
|
/**
|
|
7915
8065
|
* Возвращает данные об истории изменения цен.
|
|
7916
8066
|
*
|
|
@@ -7920,21 +8070,21 @@ class Fi extends h {
|
|
|
7920
8070
|
*/
|
|
7921
8071
|
getProductPriceHistory(r) {
|
|
7922
8072
|
var o, c, u, p, g;
|
|
7923
|
-
const e = S().config.dateFormats.api, t =
|
|
7924
|
-
|
|
8073
|
+
const e = S().config.dateFormats.api, t = ot(
|
|
8074
|
+
qe(r, {
|
|
7925
8075
|
costDate: {
|
|
7926
|
-
from:
|
|
7927
|
-
to:
|
|
8076
|
+
from: Dr((o = r.costDate) == null ? void 0 : o.from) ? A(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
8077
|
+
to: Dr((u = r.costDate) == null ? void 0 : u.to) ? A(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
7928
8078
|
}
|
|
7929
8079
|
}),
|
|
7930
|
-
(y) => a(y) || (
|
|
8080
|
+
(y) => a(y) || (G(y) || Lr(y)) && Q(y)
|
|
7931
8081
|
), i = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
|
|
7932
8082
|
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((y) => [
|
|
7933
|
-
new
|
|
8083
|
+
new Us(qe(y[0], { history: y }))
|
|
7934
8084
|
]);
|
|
7935
8085
|
}
|
|
7936
8086
|
}
|
|
7937
|
-
class
|
|
8087
|
+
class et {
|
|
7938
8088
|
/**
|
|
7939
8089
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
7940
8090
|
*
|
|
@@ -7949,10 +8099,10 @@ class Xr {
|
|
|
7949
8099
|
* Список рекомендованных категорий продуктов.
|
|
7950
8100
|
*/
|
|
7951
8101
|
s(this, "productCategories", []);
|
|
7952
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
8102
|
+
r != null && r.products && (this.products = r.products.map((e) => new Fe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Fe(e)));
|
|
7953
8103
|
}
|
|
7954
8104
|
}
|
|
7955
|
-
class
|
|
8105
|
+
class Wi extends h {
|
|
7956
8106
|
/**
|
|
7957
8107
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
7958
8108
|
*
|
|
@@ -7960,7 +8110,7 @@ class Mi extends h {
|
|
|
7960
8110
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
7961
8111
|
*/
|
|
7962
8112
|
getProductCategoryRecommendations(r) {
|
|
7963
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
8113
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new et(e.data));
|
|
7964
8114
|
}
|
|
7965
8115
|
/**
|
|
7966
8116
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -7969,7 +8119,7 @@ class Mi extends h {
|
|
|
7969
8119
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
7970
8120
|
*/
|
|
7971
8121
|
getProductRecommendations(r) {
|
|
7972
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
8122
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new et(e.data));
|
|
7973
8123
|
}
|
|
7974
8124
|
/**
|
|
7975
8125
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -7998,12 +8148,12 @@ class Mi extends h {
|
|
|
7998
8148
|
});
|
|
7999
8149
|
}
|
|
8000
8150
|
}
|
|
8001
|
-
var
|
|
8002
|
-
class
|
|
8151
|
+
var Ms = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(Ms || {}), Hs = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(Hs || {});
|
|
8152
|
+
class Bs extends v {
|
|
8003
8153
|
}
|
|
8004
|
-
class
|
|
8154
|
+
class Ws extends v {
|
|
8005
8155
|
}
|
|
8006
|
-
class
|
|
8156
|
+
class rt extends v {
|
|
8007
8157
|
/**
|
|
8008
8158
|
* Инициализирует экземпляр класса {@link CityWithUserRegion}.
|
|
8009
8159
|
*
|
|
@@ -8016,18 +8166,18 @@ class Zr extends w {
|
|
|
8016
8166
|
* @inheritDoc
|
|
8017
8167
|
*/
|
|
8018
8168
|
s(this, "userRegions");
|
|
8019
|
-
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new
|
|
8169
|
+
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new rr(i))) ?? [];
|
|
8020
8170
|
}
|
|
8021
8171
|
}
|
|
8022
|
-
class
|
|
8172
|
+
class zs extends v {
|
|
8023
8173
|
}
|
|
8024
|
-
class
|
|
8174
|
+
class Gs extends v {
|
|
8025
8175
|
}
|
|
8026
|
-
class
|
|
8176
|
+
class Es extends v {
|
|
8027
8177
|
}
|
|
8028
|
-
class
|
|
8178
|
+
class js extends v {
|
|
8029
8179
|
}
|
|
8030
|
-
class
|
|
8180
|
+
class zi {
|
|
8031
8181
|
/**
|
|
8032
8182
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
8033
8183
|
*
|
|
@@ -8046,9 +8196,9 @@ class Hi {
|
|
|
8046
8196
|
return r.id === 0 && r.slug === "-undefined-";
|
|
8047
8197
|
}
|
|
8048
8198
|
}
|
|
8049
|
-
class
|
|
8199
|
+
class It extends v {
|
|
8050
8200
|
}
|
|
8051
|
-
const
|
|
8201
|
+
const W = class W extends Ue {
|
|
8052
8202
|
/**
|
|
8053
8203
|
* Исключает из списка записей справочника местоположений служебную запись
|
|
8054
8204
|
* неизвестного региона или города.
|
|
@@ -8056,7 +8206,7 @@ const B = class B extends Fe {
|
|
|
8056
8206
|
* @param locations Записи справочника местоположений.
|
|
8057
8207
|
*/
|
|
8058
8208
|
static withoutUnknownLocation(r) {
|
|
8059
|
-
return r.filter((e) => e.id !==
|
|
8209
|
+
return r.filter((e) => e.id !== W.unknownLocationId);
|
|
8060
8210
|
}
|
|
8061
8211
|
/**
|
|
8062
8212
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
@@ -8066,26 +8216,26 @@ const B = class B extends Fe {
|
|
|
8066
8216
|
* и использовать в случае аналогичных запросов.
|
|
8067
8217
|
*/
|
|
8068
8218
|
getReference(r, e = !1) {
|
|
8069
|
-
return this.getTypedDataArrayRequester(
|
|
8219
|
+
return this.getTypedDataArrayRequester(Bs, `/internal/references/${r}`, e);
|
|
8070
8220
|
}
|
|
8071
8221
|
/**
|
|
8072
8222
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
8073
8223
|
* первичного интереса.
|
|
8074
8224
|
*/
|
|
8075
8225
|
getChannelPrimaryInterest() {
|
|
8076
|
-
return this.getTypedDataArrayRequester(
|
|
8226
|
+
return this.getTypedDataArrayRequester(bt, "/internal/references/channel-primary-interest", !0);
|
|
8077
8227
|
}
|
|
8078
8228
|
/**
|
|
8079
8229
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
8080
8230
|
*/
|
|
8081
8231
|
getContactPositions() {
|
|
8082
|
-
return this.getTypedDataArrayRequester(
|
|
8232
|
+
return this.getTypedDataArrayRequester(zs, "/internal/references/contact-position", !0);
|
|
8083
8233
|
}
|
|
8084
8234
|
/**
|
|
8085
8235
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
8086
8236
|
*/
|
|
8087
8237
|
getCuratedDirection() {
|
|
8088
|
-
return this.getTypedDataArrayRequester(
|
|
8238
|
+
return this.getTypedDataArrayRequester(Fr, "/internal/references/curated-direction", !0);
|
|
8089
8239
|
}
|
|
8090
8240
|
/**
|
|
8091
8241
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -8098,61 +8248,61 @@ const B = class B extends Fe {
|
|
|
8098
8248
|
* групп партнеров (направлений деятельности).
|
|
8099
8249
|
*/
|
|
8100
8250
|
getPartnerGroup() {
|
|
8101
|
-
return this.getTypedDataArrayRequester(
|
|
8251
|
+
return this.getTypedDataArrayRequester(Re, "/internal/references/partner-group", !0);
|
|
8102
8252
|
}
|
|
8103
8253
|
/**
|
|
8104
8254
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
8105
8255
|
*/
|
|
8106
8256
|
getOpf() {
|
|
8107
|
-
return this.getTypedDataArrayRequester(
|
|
8257
|
+
return this.getTypedDataArrayRequester(se, "/public/references/opf", !0);
|
|
8108
8258
|
}
|
|
8109
8259
|
/**
|
|
8110
8260
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
8111
8261
|
*/
|
|
8112
8262
|
getOperators() {
|
|
8113
|
-
return this.getTypedDataArrayRequester(
|
|
8263
|
+
return this.getTypedDataArrayRequester(Lt, "/internal/references/operator", !0);
|
|
8114
8264
|
}
|
|
8115
8265
|
/**
|
|
8116
8266
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
8117
8267
|
*/
|
|
8118
8268
|
getOrderPaymentStatuses() {
|
|
8119
|
-
return this.getTypedDataArrayRequester(
|
|
8269
|
+
return this.getTypedDataArrayRequester(Gs, "/public/references/order-payment-status", !0);
|
|
8120
8270
|
}
|
|
8121
8271
|
/**
|
|
8122
8272
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
8123
8273
|
*/
|
|
8124
8274
|
getOrderStatuses() {
|
|
8125
|
-
return this.getTypedDataArrayRequester(
|
|
8275
|
+
return this.getTypedDataArrayRequester(tr, "/internal/references/order-status", !0);
|
|
8126
8276
|
}
|
|
8127
8277
|
/**
|
|
8128
8278
|
* Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
|
|
8129
8279
|
*/
|
|
8130
8280
|
getOrderStatusDetails() {
|
|
8131
|
-
return this.getTypedDataArrayRequester(
|
|
8281
|
+
return this.getTypedDataArrayRequester(Es, "/internal/references/order-status-detail", !0);
|
|
8132
8282
|
}
|
|
8133
8283
|
/**
|
|
8134
8284
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
8135
8285
|
*/
|
|
8136
8286
|
getPaymentTypes() {
|
|
8137
|
-
return this.getTypedDataArrayRequester(
|
|
8287
|
+
return this.getTypedDataArrayRequester(Ot, "/public/references/payment-type", !0);
|
|
8138
8288
|
}
|
|
8139
8289
|
/**
|
|
8140
8290
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
8141
8291
|
*/
|
|
8142
8292
|
getResourceTypes() {
|
|
8143
|
-
return this.getTypedDataArrayRequester(
|
|
8293
|
+
return this.getTypedDataArrayRequester(It, "/internal/references/resource-type", !0);
|
|
8144
8294
|
}
|
|
8145
8295
|
/**
|
|
8146
8296
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
8147
8297
|
*/
|
|
8148
8298
|
getSalesDirections() {
|
|
8149
|
-
return this.getTypedDataArrayRequester(
|
|
8299
|
+
return this.getTypedDataArrayRequester(U, "/public/references/sales-direction", !0);
|
|
8150
8300
|
}
|
|
8151
8301
|
/**
|
|
8152
8302
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
8153
8303
|
*/
|
|
8154
8304
|
getSourcePrimaryInterest() {
|
|
8155
|
-
return this.getTypedDataArrayRequester(
|
|
8305
|
+
return this.getTypedDataArrayRequester(dt, "/internal/references/source-primary-interest", !0);
|
|
8156
8306
|
}
|
|
8157
8307
|
/**
|
|
8158
8308
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -8160,7 +8310,7 @@ const B = class B extends Fe {
|
|
|
8160
8310
|
* @param term Терм поиска.
|
|
8161
8311
|
*/
|
|
8162
8312
|
searchCity(r) {
|
|
8163
|
-
return this.getTypedDataArrayRequester(
|
|
8313
|
+
return this.getTypedDataArrayRequester(Pe, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
8164
8314
|
}
|
|
8165
8315
|
/**
|
|
8166
8316
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -8168,7 +8318,7 @@ const B = class B extends Fe {
|
|
|
8168
8318
|
* @param term Терм поиска.
|
|
8169
8319
|
*/
|
|
8170
8320
|
searchRegion(r) {
|
|
8171
|
-
return this.getTypedDataArrayRequester(
|
|
8321
|
+
return this.getTypedDataArrayRequester(De, `/internal/references/region-with-country/search?term=${r}`);
|
|
8172
8322
|
}
|
|
8173
8323
|
/**
|
|
8174
8324
|
* Возвращает {@link Promise} для получения справочника регионов указанной страны.
|
|
@@ -8178,8 +8328,8 @@ const B = class B extends Fe {
|
|
|
8178
8328
|
* @param countryId Идентификатор страны.
|
|
8179
8329
|
*/
|
|
8180
8330
|
getRegionsByCountry(r) {
|
|
8181
|
-
return this.getTypedDataArrayRequester(
|
|
8182
|
-
(e) =>
|
|
8331
|
+
return this.getTypedDataArrayRequester(De, "/internal/references/region", !1, { params: { countryId: r } }).then(
|
|
8332
|
+
(e) => W.withoutUnknownLocation(e)
|
|
8183
8333
|
);
|
|
8184
8334
|
}
|
|
8185
8335
|
/**
|
|
@@ -8190,8 +8340,8 @@ const B = class B extends Fe {
|
|
|
8190
8340
|
* @param regionId Идентификатор региона.
|
|
8191
8341
|
*/
|
|
8192
8342
|
getCitiesByRegion(r) {
|
|
8193
|
-
return this.getTypedDataArrayRequester(
|
|
8194
|
-
(e) =>
|
|
8343
|
+
return this.getTypedDataArrayRequester(Ws, "/internal/references/city", !1, { params: { regionId: r } }).then(
|
|
8344
|
+
(e) => W.withoutUnknownLocation(e)
|
|
8195
8345
|
);
|
|
8196
8346
|
}
|
|
8197
8347
|
/**
|
|
@@ -8201,8 +8351,8 @@ const B = class B extends Fe {
|
|
|
8201
8351
|
* @param regionId Идентификатор региона.
|
|
8202
8352
|
*/
|
|
8203
8353
|
getCitiesWithUserRegionByRegion(r) {
|
|
8204
|
-
return this.getTypedDataArrayRequester(
|
|
8205
|
-
(e) =>
|
|
8354
|
+
return this.getTypedDataArrayRequester(rt, "/internal/references/city-with-user-region", !1, { params: { regionId: r } }).then(
|
|
8355
|
+
(e) => W.withoutUnknownLocation(e)
|
|
8206
8356
|
);
|
|
8207
8357
|
}
|
|
8208
8358
|
/**
|
|
@@ -8215,12 +8365,12 @@ const B = class B extends Fe {
|
|
|
8215
8365
|
*/
|
|
8216
8366
|
searchCityWithRegion(r, e, t = void 0) {
|
|
8217
8367
|
return this.getTypedDataArrayRequester(
|
|
8218
|
-
|
|
8368
|
+
Pe,
|
|
8219
8369
|
"/internal/references/city-with-region/search",
|
|
8220
8370
|
!1,
|
|
8221
8371
|
{ term: r, ...e ? { params: { countryId: e } } : {} },
|
|
8222
8372
|
t
|
|
8223
|
-
).then((i) =>
|
|
8373
|
+
).then((i) => W.withoutUnknownLocation(i));
|
|
8224
8374
|
}
|
|
8225
8375
|
/**
|
|
8226
8376
|
* Выполняет поиск данных о городах по терму в названии с данными
|
|
@@ -8230,8 +8380,8 @@ const B = class B extends Fe {
|
|
|
8230
8380
|
* @param signal Сигнал отмены запроса.
|
|
8231
8381
|
*/
|
|
8232
8382
|
searchCityWithUserRegion(r, e = void 0) {
|
|
8233
|
-
return this.getTypedDataArrayRequester(
|
|
8234
|
-
(t) =>
|
|
8383
|
+
return this.getTypedDataArrayRequester(rt, "/internal/references/city-with-user-region/search", !1, { term: r }, e).then(
|
|
8384
|
+
(t) => W.withoutUnknownLocation(t)
|
|
8235
8385
|
);
|
|
8236
8386
|
}
|
|
8237
8387
|
/**
|
|
@@ -8240,13 +8390,13 @@ const B = class B extends Fe {
|
|
|
8240
8390
|
* @param term Терм поиска.
|
|
8241
8391
|
*/
|
|
8242
8392
|
searchCountry(r) {
|
|
8243
|
-
return this.getTypedDataArrayRequester(
|
|
8393
|
+
return this.getTypedDataArrayRequester(Ce, `/internal/references/country/search?term=${r}`);
|
|
8244
8394
|
}
|
|
8245
8395
|
/**
|
|
8246
8396
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
8247
8397
|
*/
|
|
8248
8398
|
getDeliveryTypes() {
|
|
8249
|
-
return this.getTypedDataArrayRequester(
|
|
8399
|
+
return this.getTypedDataArrayRequester(K, "/internal/references/delivery-type", !0);
|
|
8250
8400
|
}
|
|
8251
8401
|
/**
|
|
8252
8402
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
@@ -8258,29 +8408,29 @@ const B = class B extends Fe {
|
|
|
8258
8408
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
8259
8409
|
*/
|
|
8260
8410
|
getPropertyTypes() {
|
|
8261
|
-
return this.getTypedDataArrayRequester(
|
|
8411
|
+
return this.getTypedDataArrayRequester(vt, "/internal/references/property-type", !0);
|
|
8262
8412
|
}
|
|
8263
8413
|
/**
|
|
8264
8414
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
8265
8415
|
*/
|
|
8266
8416
|
getPriceCoefficients() {
|
|
8267
|
-
return this.getTypedDataArrayRequester(
|
|
8417
|
+
return this.getTypedDataArrayRequester(oe, "/internal/references/price-coefficient", !0);
|
|
8268
8418
|
}
|
|
8269
8419
|
/**
|
|
8270
8420
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
8271
8421
|
*/
|
|
8272
8422
|
getProductFileType() {
|
|
8273
|
-
return this.getTypedDataArrayRequester(
|
|
8423
|
+
return this.getTypedDataArrayRequester(js, "/public/references/product-file-type", !0);
|
|
8274
8424
|
}
|
|
8275
8425
|
};
|
|
8276
8426
|
/**
|
|
8277
8427
|
* Идентификатор служебных записей справочников регионов и городов,
|
|
8278
8428
|
* обозначающих неизвестное местоположение.
|
|
8279
8429
|
*/
|
|
8280
|
-
s(
|
|
8281
|
-
let d =
|
|
8282
|
-
const T =
|
|
8283
|
-
const n =
|
|
8430
|
+
s(W, "unknownLocationId", 1);
|
|
8431
|
+
let d = W;
|
|
8432
|
+
const T = ie("common.references_private", () => {
|
|
8433
|
+
const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), g = w(void 0), y = w(void 0), D = w(void 0), de = w(void 0), Te = w(void 0), ue = w(void 0), pe = w(void 0), sr = w(void 0), ir = w(void 0), nr = w(void 0), l = w(void 0);
|
|
8284
8434
|
return {
|
|
8285
8435
|
/**
|
|
8286
8436
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -8341,29 +8491,29 @@ const T = se("common.references_private", () => {
|
|
|
8341
8491
|
/**
|
|
8342
8492
|
* Справочник типов ресурсов.
|
|
8343
8493
|
*/
|
|
8344
|
-
resourceTypesReference:
|
|
8494
|
+
resourceTypesReference: ue,
|
|
8345
8495
|
/**
|
|
8346
8496
|
* Справочник направлений продаж.
|
|
8347
8497
|
*/
|
|
8348
|
-
salesDirectionsReference:
|
|
8498
|
+
salesDirectionsReference: pe,
|
|
8349
8499
|
/**
|
|
8350
8500
|
* Справочник источников первичного интереса.
|
|
8351
8501
|
*/
|
|
8352
|
-
sourcePrimaryInterestReference:
|
|
8502
|
+
sourcePrimaryInterestReference: sr,
|
|
8353
8503
|
/**
|
|
8354
8504
|
* Справочник складов.
|
|
8355
8505
|
*/
|
|
8356
|
-
warehousesReference:
|
|
8506
|
+
warehousesReference: ir,
|
|
8357
8507
|
/**
|
|
8358
8508
|
* Справочник типов свойств.
|
|
8359
8509
|
*/
|
|
8360
|
-
propertyTypesReference:
|
|
8510
|
+
propertyTypesReference: nr,
|
|
8361
8511
|
/**
|
|
8362
8512
|
* Справочник коэффициентов цен.
|
|
8363
8513
|
*/
|
|
8364
8514
|
priceCoefficientsReference: l
|
|
8365
8515
|
};
|
|
8366
|
-
}),
|
|
8516
|
+
}), Gi = ie("common.references", () => {
|
|
8367
8517
|
const n = R(() => {
|
|
8368
8518
|
const l = T();
|
|
8369
8519
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(d).getChannelPrimaryInterest().then((f) => {
|
|
@@ -8434,27 +8584,27 @@ const T = se("common.references_private", () => {
|
|
|
8434
8584
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(d).getSourcePrimaryInterest().then((f) => {
|
|
8435
8585
|
l.sourcePrimaryInterestReference = f;
|
|
8436
8586
|
}).catch(C)), l.sourcePrimaryInterestReference;
|
|
8437
|
-
}),
|
|
8587
|
+
}), ue = R(() => {
|
|
8438
8588
|
const l = T();
|
|
8439
8589
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(d).getDeliveryTypes().then((f) => {
|
|
8440
8590
|
l.deliveryTypeReference = f;
|
|
8441
8591
|
}).catch(C)), l.deliveryTypeReference;
|
|
8442
|
-
}),
|
|
8592
|
+
}), pe = R(() => {
|
|
8443
8593
|
const l = T();
|
|
8444
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
8594
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(At).getManagers().then((f) => {
|
|
8445
8595
|
l.managersList = f;
|
|
8446
8596
|
}).catch(C)), l.managersList;
|
|
8447
|
-
}),
|
|
8597
|
+
}), sr = R(() => {
|
|
8448
8598
|
const l = T();
|
|
8449
8599
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(d).getWarehouses().then((f) => {
|
|
8450
8600
|
l.warehousesReference = f;
|
|
8451
8601
|
}).catch(C)), l.warehousesReference;
|
|
8452
|
-
}),
|
|
8602
|
+
}), ir = R(() => {
|
|
8453
8603
|
const l = T();
|
|
8454
8604
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(d).getPropertyTypes().then((f) => {
|
|
8455
8605
|
l.propertyTypesReference = f;
|
|
8456
8606
|
}).catch(C)), l.propertyTypesReference;
|
|
8457
|
-
}),
|
|
8607
|
+
}), nr = R(() => {
|
|
8458
8608
|
const l = T();
|
|
8459
8609
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(d).getPriceCoefficients().then((f) => {
|
|
8460
8610
|
l.priceCoefficientsReference = f;
|
|
@@ -8520,26 +8670,26 @@ const T = se("common.references_private", () => {
|
|
|
8520
8670
|
/**
|
|
8521
8671
|
* Справочник типов доставки.
|
|
8522
8672
|
*/
|
|
8523
|
-
deliveryTypeReference:
|
|
8673
|
+
deliveryTypeReference: ue,
|
|
8524
8674
|
/**
|
|
8525
8675
|
* Список менеджеров.
|
|
8526
8676
|
*/
|
|
8527
|
-
managersList:
|
|
8677
|
+
managersList: pe,
|
|
8528
8678
|
/**
|
|
8529
8679
|
* Справочник складов.
|
|
8530
8680
|
*/
|
|
8531
|
-
warehousesReference:
|
|
8681
|
+
warehousesReference: sr,
|
|
8532
8682
|
/**
|
|
8533
8683
|
* Справочник типов свойств.
|
|
8534
8684
|
*/
|
|
8535
|
-
propertyTypesReference:
|
|
8685
|
+
propertyTypesReference: ir,
|
|
8536
8686
|
/**
|
|
8537
8687
|
* Справочник коэффициентов цен.
|
|
8538
8688
|
*/
|
|
8539
|
-
priceCoefficientsReference:
|
|
8689
|
+
priceCoefficientsReference: nr
|
|
8540
8690
|
};
|
|
8541
8691
|
});
|
|
8542
|
-
class
|
|
8692
|
+
class Ys {
|
|
8543
8693
|
/**
|
|
8544
8694
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
8545
8695
|
*
|
|
@@ -8557,7 +8707,7 @@ class js {
|
|
|
8557
8707
|
this.name = r.name, this.content = r.content;
|
|
8558
8708
|
}
|
|
8559
8709
|
}
|
|
8560
|
-
class
|
|
8710
|
+
class tt {
|
|
8561
8711
|
/**
|
|
8562
8712
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
8563
8713
|
*
|
|
@@ -8597,10 +8747,10 @@ class et {
|
|
|
8597
8747
|
*/
|
|
8598
8748
|
s(this, "tags");
|
|
8599
8749
|
var e;
|
|
8600
|
-
this.resourceType = new
|
|
8750
|
+
this.resourceType = new It(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((t) => new Ys(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
8601
8751
|
}
|
|
8602
8752
|
}
|
|
8603
|
-
class
|
|
8753
|
+
class Ei extends h {
|
|
8604
8754
|
/**
|
|
8605
8755
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
8606
8756
|
*
|
|
@@ -8608,7 +8758,7 @@ class Wi extends h {
|
|
|
8608
8758
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
8609
8759
|
*/
|
|
8610
8760
|
getResourceSeoData(r, e) {
|
|
8611
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
8761
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new tt(t.data));
|
|
8612
8762
|
}
|
|
8613
8763
|
/**
|
|
8614
8764
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -8619,7 +8769,7 @@ class Wi extends h {
|
|
|
8619
8769
|
* в случае ошибок в запросах.
|
|
8620
8770
|
*/
|
|
8621
8771
|
saveResourceSeoData(r, e = {}) {
|
|
8622
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
8772
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new tt(t.data), e);
|
|
8623
8773
|
}
|
|
8624
8774
|
/**
|
|
8625
8775
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -8631,7 +8781,7 @@ class Wi extends h {
|
|
|
8631
8781
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
8632
8782
|
}
|
|
8633
8783
|
}
|
|
8634
|
-
class
|
|
8784
|
+
class ji extends h {
|
|
8635
8785
|
/**
|
|
8636
8786
|
* Возвращает подсказки по адресам.
|
|
8637
8787
|
*
|
|
@@ -8678,8 +8828,8 @@ class zi extends h {
|
|
|
8678
8828
|
});
|
|
8679
8829
|
}
|
|
8680
8830
|
}
|
|
8681
|
-
var
|
|
8682
|
-
class
|
|
8831
|
+
var xt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.ExternalSeo = "external_seo", n.Guest = "guest", n))(xt || {});
|
|
8832
|
+
class Qs extends wt {
|
|
8683
8833
|
/**
|
|
8684
8834
|
* Инициализирует экземпляр класса {@link User}.
|
|
8685
8835
|
*
|
|
@@ -8703,10 +8853,10 @@ class Gs extends yt {
|
|
|
8703
8853
|
* Роль ценообразования текущего пользователя.
|
|
8704
8854
|
*/
|
|
8705
8855
|
s(this, "pricingRole");
|
|
8706
|
-
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
|
|
8856
|
+
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 mt(e.pricingRole) : void 0;
|
|
8707
8857
|
}
|
|
8708
8858
|
}
|
|
8709
|
-
class
|
|
8859
|
+
class Yi extends h {
|
|
8710
8860
|
/**
|
|
8711
8861
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
8712
8862
|
*/
|
|
@@ -8722,17 +8872,17 @@ class Ei extends h {
|
|
|
8722
8872
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
8723
8873
|
}
|
|
8724
8874
|
}
|
|
8725
|
-
class
|
|
8875
|
+
class Vs extends h {
|
|
8726
8876
|
/**
|
|
8727
8877
|
* Возвращает данные о текущем пользователе.
|
|
8728
8878
|
*/
|
|
8729
8879
|
// eslint-disable-next-line class-methods-use-this
|
|
8730
8880
|
getCurrentUser() {
|
|
8731
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
8881
|
+
return this.get("/internal/users/info", {}, (r) => new Qs(r.data), !0);
|
|
8732
8882
|
}
|
|
8733
8883
|
}
|
|
8734
|
-
const
|
|
8735
|
-
const n =
|
|
8884
|
+
const Ar = ie("common.user_state_private", () => {
|
|
8885
|
+
const n = w({}), r = w(void 0), e = w(void 0);
|
|
8736
8886
|
return {
|
|
8737
8887
|
/**
|
|
8738
8888
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -8748,23 +8898,23 @@ const Tr = se("common.user_state_private", () => {
|
|
|
8748
8898
|
currentManager: e
|
|
8749
8899
|
};
|
|
8750
8900
|
});
|
|
8751
|
-
function
|
|
8752
|
-
const r =
|
|
8753
|
-
(n == null ? void 0 : n.type) !==
|
|
8901
|
+
function st(n) {
|
|
8902
|
+
const r = Ar();
|
|
8903
|
+
(n == null ? void 0 : n.type) !== xt.Manager || r.currentManager || r.dataLoaderList.currentManager || (r.dataLoaderList.currentManager = !0, h.getInstance(At).getManager(n.id).then((e) => {
|
|
8754
8904
|
r.currentManager = e;
|
|
8755
8905
|
}).catch(C).finally(() => {
|
|
8756
8906
|
r.dataLoaderList.currentManager = !1;
|
|
8757
8907
|
}));
|
|
8758
8908
|
}
|
|
8759
|
-
const
|
|
8909
|
+
const Qi = ie("common.user_state", () => {
|
|
8760
8910
|
const n = R(() => {
|
|
8761
|
-
const e =
|
|
8762
|
-
return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(
|
|
8763
|
-
e.currentUser = t,
|
|
8911
|
+
const e = Ar();
|
|
8912
|
+
return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(Vs).getCurrentUser().then((t) => {
|
|
8913
|
+
e.currentUser = t, st(t);
|
|
8764
8914
|
}).catch(C).finally(() => {
|
|
8765
8915
|
e.dataLoaderList.currentUser = !1;
|
|
8766
8916
|
})), e.currentUser;
|
|
8767
|
-
}), r = R(() => (
|
|
8917
|
+
}), r = R(() => (st(n.value), Ar().currentManager));
|
|
8768
8918
|
return {
|
|
8769
8919
|
/**
|
|
8770
8920
|
* Данные о текущем пользователе.
|
|
@@ -8776,7 +8926,7 @@ const ji = se("common.user_state", () => {
|
|
|
8776
8926
|
currentManager: r
|
|
8777
8927
|
};
|
|
8778
8928
|
});
|
|
8779
|
-
class
|
|
8929
|
+
class Sr {
|
|
8780
8930
|
/**
|
|
8781
8931
|
* Инициализирует экземпляр класса {@link UserRegionEmployee}.
|
|
8782
8932
|
*
|
|
@@ -8791,10 +8941,10 @@ class Ar {
|
|
|
8791
8941
|
* @inheritDoc
|
|
8792
8942
|
*/
|
|
8793
8943
|
s(this, "salesDirection");
|
|
8794
|
-
this.user = new
|
|
8944
|
+
this.user = new q(r == null ? void 0 : r.user), this.salesDirection = new U(r == null ? void 0 : r.salesDirection);
|
|
8795
8945
|
}
|
|
8796
8946
|
}
|
|
8797
|
-
class
|
|
8947
|
+
class Cr extends rr {
|
|
8798
8948
|
/**
|
|
8799
8949
|
* Инициализирует экземпляр класса {@link UserRegion}.
|
|
8800
8950
|
*
|
|
@@ -8811,10 +8961,10 @@ class vr extends Ze {
|
|
|
8811
8961
|
* @inheritDoc
|
|
8812
8962
|
*/
|
|
8813
8963
|
s(this, "users");
|
|
8814
|
-
this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new
|
|
8964
|
+
this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new Pe(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new Sr(o))) ?? [];
|
|
8815
8965
|
}
|
|
8816
8966
|
}
|
|
8817
|
-
class
|
|
8967
|
+
class Vi extends Me {
|
|
8818
8968
|
/**
|
|
8819
8969
|
* Инициализирует экземпляр класса {@link UserRegionsListFilters}.
|
|
8820
8970
|
*
|
|
@@ -8850,7 +9000,7 @@ class Gi extends Me {
|
|
|
8850
9000
|
return this;
|
|
8851
9001
|
}
|
|
8852
9002
|
}
|
|
8853
|
-
class
|
|
9003
|
+
class Ji extends M {
|
|
8854
9004
|
/**
|
|
8855
9005
|
* Возвращает список регионов пользователей.
|
|
8856
9006
|
*
|
|
@@ -8861,7 +9011,7 @@ class Yi extends j {
|
|
|
8861
9011
|
* @see /doc/api/internal#/operations/api_internal_user_region_get_list
|
|
8862
9012
|
*/
|
|
8863
9013
|
getRegionsList(r, e, t) {
|
|
8864
|
-
return this.getTypedPaginated(
|
|
9014
|
+
return this.getTypedPaginated(rr, "/internal/users/regions", r, e, t);
|
|
8865
9015
|
}
|
|
8866
9016
|
/**
|
|
8867
9017
|
* Возвращает полные данные о регионе пользователей.
|
|
@@ -8871,7 +9021,7 @@ class Yi extends j {
|
|
|
8871
9021
|
* @see /doc/api/internal#/operations/api_internal_user_region_get
|
|
8872
9022
|
*/
|
|
8873
9023
|
getRegion(r) {
|
|
8874
|
-
return this.get(`/internal/users/regions/${r}`, {}, (e) => new
|
|
9024
|
+
return this.get(`/internal/users/regions/${r}`, {}, (e) => new Cr(e.data));
|
|
8875
9025
|
}
|
|
8876
9026
|
/**
|
|
8877
9027
|
* Создаёт новый регион пользователей.
|
|
@@ -8884,7 +9034,7 @@ class Yi extends j {
|
|
|
8884
9034
|
* @see /doc/api/internal#/operations/api_internal_user_region_create
|
|
8885
9035
|
*/
|
|
8886
9036
|
createRegion(r, e = {}) {
|
|
8887
|
-
return this.post("/internal/users/regions", r, (t) => new
|
|
9037
|
+
return this.post("/internal/users/regions", r, (t) => new Cr(t.data), e);
|
|
8888
9038
|
}
|
|
8889
9039
|
/**
|
|
8890
9040
|
* Изменяет данные о регионе пользователей.
|
|
@@ -8898,7 +9048,7 @@ class Yi extends j {
|
|
|
8898
9048
|
* @see /doc/api/internal#/operations/api_internal_user_region_change
|
|
8899
9049
|
*/
|
|
8900
9050
|
updateRegion(r, e, t = {}) {
|
|
8901
|
-
return this.patch(`/internal/users/regions/${r}`, e, (i) => new
|
|
9051
|
+
return this.patch(`/internal/users/regions/${r}`, e, (i) => new Cr(i.data), t);
|
|
8902
9052
|
}
|
|
8903
9053
|
/**
|
|
8904
9054
|
* Удаляет регион пользователей.
|
|
@@ -8918,7 +9068,7 @@ class Yi extends j {
|
|
|
8918
9068
|
* @see /doc/api/internal#/operations/api_internal_user_region_user_get_list
|
|
8919
9069
|
*/
|
|
8920
9070
|
getRegionEmployees(r) {
|
|
8921
|
-
return this.getTypedList(
|
|
9071
|
+
return this.getTypedList(Sr, `/internal/users/regions/${r}/users`);
|
|
8922
9072
|
}
|
|
8923
9073
|
/**
|
|
8924
9074
|
* Закрепляет сотрудника за регионом по указанному направлению продаж.
|
|
@@ -8930,7 +9080,7 @@ class Yi extends j {
|
|
|
8930
9080
|
* @see /doc/api/internal#/operations/api_internal_user_region_user_add
|
|
8931
9081
|
*/
|
|
8932
9082
|
attachRegionEmployee(r, e, t) {
|
|
8933
|
-
return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new
|
|
9083
|
+
return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new Sr(i.data));
|
|
8934
9084
|
}
|
|
8935
9085
|
/**
|
|
8936
9086
|
* Открепляет сотрудника от региона по указанному направлению продаж.
|
|
@@ -8949,7 +9099,7 @@ class Yi extends j {
|
|
|
8949
9099
|
});
|
|
8950
9100
|
}
|
|
8951
9101
|
}
|
|
8952
|
-
class
|
|
9102
|
+
class Ki {
|
|
8953
9103
|
/**
|
|
8954
9104
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
8955
9105
|
*
|
|
@@ -8973,204 +9123,207 @@ class Qi {
|
|
|
8973
9123
|
}
|
|
8974
9124
|
}
|
|
8975
9125
|
export {
|
|
8976
|
-
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
9126
|
+
Bs as AnyReference,
|
|
9127
|
+
gs as AppBaseConfig,
|
|
9128
|
+
Tr as BankAccount,
|
|
9129
|
+
M as BasePaginationProvider,
|
|
9130
|
+
gr as BlogPost,
|
|
9131
|
+
Rr as BlogPostMediaFile,
|
|
9132
|
+
Ye as BlogPostMediaTypeEnum,
|
|
9133
|
+
Qe as BlogPostPublicationStatusEnum,
|
|
8984
9134
|
Ne as BlogPostShortInfo,
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
9135
|
+
ii as BlogPostsListFilters,
|
|
9136
|
+
br as BlogProvider,
|
|
9137
|
+
ws as CalculationTypeEnum,
|
|
8988
9138
|
m as CalendarHelper,
|
|
8989
9139
|
ke as Cart,
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9010
|
-
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9015
|
-
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9019
|
-
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
|
|
9024
|
-
|
|
9025
|
-
|
|
9026
|
-
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9030
|
-
|
|
9031
|
-
|
|
9032
|
-
|
|
9033
|
-
|
|
9034
|
-
|
|
9035
|
-
|
|
9036
|
-
|
|
9140
|
+
oi as CartProvider,
|
|
9141
|
+
li as CatalogProvider,
|
|
9142
|
+
pt as CatalogableItem,
|
|
9143
|
+
j as Category,
|
|
9144
|
+
bs as CategoryFilter,
|
|
9145
|
+
Vr as CategoryFilterSetting,
|
|
9146
|
+
Rs as CategoryFilterValue,
|
|
9147
|
+
Qr as CategoryPricingRule,
|
|
9148
|
+
bt as ChannelPrimaryInterest,
|
|
9149
|
+
Ws as City,
|
|
9150
|
+
Pe as CityWithRegionAndCountry,
|
|
9151
|
+
rt as CityWithUserRegion,
|
|
9152
|
+
Xr as Client,
|
|
9153
|
+
As as ClientAdditionalData,
|
|
9154
|
+
Je as ClientCategory,
|
|
9155
|
+
B as ClientDataProvider,
|
|
9156
|
+
Ct as ClientPriceCatalogableItem,
|
|
9157
|
+
Yr as ClientPriceCategory,
|
|
9158
|
+
yr as ClientPriceProduct,
|
|
9159
|
+
ui as ClientPriceProvider,
|
|
9160
|
+
pi as ClientPriceTemplateProvider,
|
|
9161
|
+
ve as ClientProduct,
|
|
9162
|
+
fi as ClientProductCategoryDataProvider,
|
|
9163
|
+
mi as ClientProductDataProvider,
|
|
9164
|
+
le as ClientShortInfo,
|
|
9165
|
+
ds as ClientsAdditionalDataRequestTypeEnum,
|
|
9166
|
+
Ci as ClientsListFilters,
|
|
9167
|
+
Fe as CodedIdentity,
|
|
9168
|
+
Ri as ConfiguratorProvider,
|
|
9169
|
+
ks as ConfiguratorsEnum,
|
|
9170
|
+
$r as Contact,
|
|
9171
|
+
ft as ContactLinks,
|
|
9172
|
+
te as ContactPerson,
|
|
9173
|
+
Ss as ContactPersonRelated,
|
|
9174
|
+
zs as ContactPosition,
|
|
9175
|
+
ar as ContactRelation,
|
|
9176
|
+
Dt as ContragentBase,
|
|
9177
|
+
Ke as ContragentFactory,
|
|
9178
|
+
Pt as ContragentIc,
|
|
9179
|
+
Ts as ContragentPerson,
|
|
9180
|
+
$s as ContragentUlNr,
|
|
9181
|
+
Rt as ContragentUlR,
|
|
9182
|
+
qr as CostSourceEnum,
|
|
9183
|
+
Ce as Country,
|
|
9184
|
+
Xe as CreatableIdentity,
|
|
9185
|
+
Fr as CuratedDirection,
|
|
9186
|
+
Ur as Curator,
|
|
9037
9187
|
E as Currency,
|
|
9038
|
-
|
|
9039
|
-
|
|
9040
|
-
|
|
9041
|
-
|
|
9042
|
-
|
|
9188
|
+
ji as DataSuggestionProvider,
|
|
9189
|
+
J as DateHelper,
|
|
9190
|
+
Ai as DateTimeProvider,
|
|
9191
|
+
Ds as DeletableIdentity,
|
|
9192
|
+
er as DeletableNamedIdentity,
|
|
9043
9193
|
xe as DeliveryAddress,
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9047
|
-
|
|
9048
|
-
|
|
9049
|
-
|
|
9050
|
-
|
|
9051
|
-
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
|
|
9056
|
-
|
|
9194
|
+
K as DeliveryType,
|
|
9195
|
+
ct as DetailedJwtPayload,
|
|
9196
|
+
ls as DeviceTypeResolutionConfig,
|
|
9197
|
+
fs as DiscountShortInfo,
|
|
9198
|
+
ze as Faq,
|
|
9199
|
+
Ve as FaqGroup,
|
|
9200
|
+
Li as FaqProvider,
|
|
9201
|
+
Ki as FieldValidationResultData,
|
|
9202
|
+
re as FilterGroup,
|
|
9203
|
+
Er as FilterItem,
|
|
9204
|
+
Ir as FilterOpEnum,
|
|
9205
|
+
Ps as FilterSettings,
|
|
9206
|
+
ut as GeoCoordinates,
|
|
9207
|
+
ys as HiddenCatalogableItem,
|
|
9208
|
+
Ue as HttpCachedRequester,
|
|
9209
|
+
us as HttpParamsConfig,
|
|
9057
9210
|
h as HttpRequester,
|
|
9058
|
-
|
|
9059
|
-
|
|
9060
|
-
|
|
9061
|
-
|
|
9062
|
-
|
|
9063
|
-
|
|
9064
|
-
|
|
9065
|
-
|
|
9066
|
-
|
|
9067
|
-
|
|
9068
|
-
|
|
9211
|
+
ne as Identity,
|
|
9212
|
+
as as Image,
|
|
9213
|
+
be as JwtPayload,
|
|
9214
|
+
X as Manager,
|
|
9215
|
+
Nr as ManagerCommon,
|
|
9216
|
+
Ii as ManagerDataFactory,
|
|
9217
|
+
At as ManagerDataProvider,
|
|
9218
|
+
Ys as MetaTagItem,
|
|
9219
|
+
_ as NamedIdentity,
|
|
9220
|
+
H as Offer,
|
|
9221
|
+
Is as OfferActualization,
|
|
9069
9222
|
Ie as OfferActualizationStatus,
|
|
9070
|
-
|
|
9071
|
-
|
|
9072
|
-
|
|
9073
|
-
|
|
9074
|
-
|
|
9075
|
-
|
|
9223
|
+
_i as OfferHelper,
|
|
9224
|
+
St as OfferShortInfo,
|
|
9225
|
+
qi as OffersDataProvider,
|
|
9226
|
+
xi as OffersListFilters,
|
|
9227
|
+
Lt as Operator,
|
|
9228
|
+
se as Opf,
|
|
9076
9229
|
Y as OpfEnum,
|
|
9077
9230
|
L as Order,
|
|
9078
|
-
|
|
9079
|
-
|
|
9080
|
-
|
|
9081
|
-
|
|
9082
|
-
|
|
9083
|
-
|
|
9084
|
-
|
|
9085
|
-
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
|
|
9090
|
-
|
|
9091
|
-
|
|
9231
|
+
_s as OrderAction,
|
|
9232
|
+
Ni as OrderEditorData,
|
|
9233
|
+
kt as OrderInfo,
|
|
9234
|
+
qs as OrderItem,
|
|
9235
|
+
ht as OrderItemBase,
|
|
9236
|
+
Gs as OrderPaymentStatus,
|
|
9237
|
+
Tt as OrderShortInfo,
|
|
9238
|
+
tr as OrderStatus,
|
|
9239
|
+
Es as OrderStatusDetail,
|
|
9240
|
+
Hs as OrderStatusDetailEnum,
|
|
9241
|
+
Ms as OrderStatusEnum,
|
|
9242
|
+
Ns as OrderStatusHistoryInfo,
|
|
9243
|
+
Ui as OrdersDataProvider,
|
|
9244
|
+
Fi as OrdersListFilters,
|
|
9092
9245
|
Me as PaginationFiltersBase,
|
|
9093
|
-
|
|
9094
|
-
|
|
9246
|
+
Re as PartnerGroup,
|
|
9247
|
+
Ot as PaymentType,
|
|
9095
9248
|
je as PreferencesStorageProvider,
|
|
9096
|
-
|
|
9097
|
-
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9101
|
-
|
|
9102
|
-
|
|
9103
|
-
|
|
9104
|
-
|
|
9249
|
+
wr as PriceAnalyze,
|
|
9250
|
+
Hi as PriceAnalyzeProvider,
|
|
9251
|
+
yt as PriceCatalogableItem,
|
|
9252
|
+
oe as PriceCoefficient,
|
|
9253
|
+
lt as PriceCoefficientEnum,
|
|
9254
|
+
Bi as PriceHistoryDataProvider,
|
|
9255
|
+
Fs as PriceHistoryItem,
|
|
9256
|
+
ye as PriceTemplate,
|
|
9257
|
+
fr as PriceTemplateCategory,
|
|
9105
9258
|
Le as PriceTemplateClient,
|
|
9106
|
-
|
|
9107
|
-
|
|
9108
|
-
|
|
9259
|
+
at as PriceTemplateICatalogableItem,
|
|
9260
|
+
mr as PriceTemplateProduct,
|
|
9261
|
+
yi as PriceTemplateProvider,
|
|
9109
9262
|
Oe as PricingRole,
|
|
9110
|
-
|
|
9111
|
-
|
|
9112
|
-
|
|
9113
|
-
|
|
9114
|
-
|
|
9115
|
-
|
|
9116
|
-
|
|
9117
|
-
|
|
9118
|
-
|
|
9119
|
-
|
|
9120
|
-
|
|
9121
|
-
|
|
9122
|
-
|
|
9123
|
-
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9127
|
-
|
|
9128
|
-
|
|
9129
|
-
|
|
9263
|
+
ai as PricingRoleProvider,
|
|
9264
|
+
dr as PrimaryCatalogableItem,
|
|
9265
|
+
N as Product,
|
|
9266
|
+
hi as ProductCategoryDataProvider,
|
|
9267
|
+
gi as ProductDataProvider,
|
|
9268
|
+
js as ProductFileType,
|
|
9269
|
+
gt as ProductFilterTypeEnum,
|
|
9270
|
+
xr as ProductPriceCoefficient,
|
|
9271
|
+
Us as ProductPriceHistory,
|
|
9272
|
+
jr as ProductUnit,
|
|
9273
|
+
xs as ProfstroyOfferItem,
|
|
9274
|
+
wi as PropertiesProvider,
|
|
9275
|
+
ae as Property,
|
|
9276
|
+
vt as PropertyType,
|
|
9277
|
+
vs as PropertyTypeEnum,
|
|
9278
|
+
fe as PropertyValue,
|
|
9279
|
+
Wi as RecommendationsDataProvider,
|
|
9280
|
+
et as RecommendationsList,
|
|
9281
|
+
v as Reference,
|
|
9282
|
+
zi as ReferenceDataFactory,
|
|
9130
9283
|
d as ReferenceDataProvider,
|
|
9131
|
-
|
|
9132
|
-
|
|
9133
|
-
|
|
9134
|
-
|
|
9135
|
-
|
|
9136
|
-
|
|
9137
|
-
|
|
9138
|
-
|
|
9139
|
-
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
|
|
9143
|
-
|
|
9144
|
-
|
|
9145
|
-
|
|
9284
|
+
De as Region,
|
|
9285
|
+
It as ResourceType,
|
|
9286
|
+
Si as STANDARD_PERIOD_GROUPS,
|
|
9287
|
+
ki as STANDARD_PERIOD_SECTIONS,
|
|
9288
|
+
U as SalesDirection,
|
|
9289
|
+
ps as SentryConfig,
|
|
9290
|
+
tt as Seo,
|
|
9291
|
+
Ei as SeoDataProvider,
|
|
9292
|
+
dt as SourcePrimaryInterest,
|
|
9293
|
+
ms as StockCount,
|
|
9294
|
+
bi as TableDataPagination,
|
|
9295
|
+
Ls as TableDataPaginationRequestParams,
|
|
9296
|
+
di as TableDataSortRequestParams,
|
|
9297
|
+
vi as TemplateProductCategoryDataProvider,
|
|
9298
|
+
ci as TemplatesListFilters,
|
|
9146
9299
|
x as TypedInstanceFactory,
|
|
9147
|
-
|
|
9148
|
-
|
|
9149
|
-
|
|
9150
|
-
|
|
9151
|
-
|
|
9152
|
-
|
|
9153
|
-
|
|
9154
|
-
|
|
9155
|
-
|
|
9156
|
-
|
|
9157
|
-
|
|
9158
|
-
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9300
|
+
$t as UnitsHelper,
|
|
9301
|
+
Di as UnknownClientDataProvider,
|
|
9302
|
+
Ze as UpdatableNamedIdentity,
|
|
9303
|
+
Qs as User,
|
|
9304
|
+
Yi as UserAuthDataProvider,
|
|
9305
|
+
wt as UserCommonInfo,
|
|
9306
|
+
Vs as UserDataProvider,
|
|
9307
|
+
mt as UserPricingRole,
|
|
9308
|
+
Cr as UserRegion,
|
|
9309
|
+
Sr as UserRegionEmployee,
|
|
9310
|
+
Ji as UserRegionProvider,
|
|
9311
|
+
rr as UserRegionShortInfo,
|
|
9312
|
+
Vi as UserRegionsListFilters,
|
|
9313
|
+
q as UserShortInfo,
|
|
9314
|
+
xt as UserTypeEnum,
|
|
9315
|
+
Pi as VersionConfig,
|
|
9163
9316
|
He as Warehouse,
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9317
|
+
hs as WebSocketConfig,
|
|
9318
|
+
Mi as currentOrderInjectionKey,
|
|
9319
|
+
Ti as daysAgoIso,
|
|
9320
|
+
Jr as findCatalogItemByIdRecursive,
|
|
9321
|
+
Kr as flattenCatalogItems,
|
|
9322
|
+
Oi as formatPercentChange,
|
|
9323
|
+
$i as formatRelativeDate,
|
|
9324
|
+
Os as pluralize,
|
|
9325
|
+
hr as useAuthStateStore,
|
|
9173
9326
|
S as useBaseConfigStateStore,
|
|
9174
|
-
|
|
9175
|
-
|
|
9327
|
+
Gi as useReferencesStore,
|
|
9328
|
+
Qi as useUserStateStore
|
|
9176
9329
|
};
|