@snabcentr/common-lib 2.24.2 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +2 -4
- package/dist/sc-common-lib.js +955 -890
- 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/configurator/providers/configurator-provider.d.ts.map +1 -1
- package/dist/src/http/classes/http-requester.d.ts +56 -43
- package/dist/src/http/classes/http-requester.d.ts.map +1 -1
- package/dist/src/http/enums/index.d.ts +2 -0
- package/dist/src/http/enums/index.d.ts.map +1 -0
- package/dist/src/http/enums/interceptors-enum.d.ts +38 -0
- package/dist/src/http/enums/interceptors-enum.d.ts.map +1 -0
- package/dist/src/http/index.d.ts +1 -0
- package/dist/src/http/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) =>
|
|
1
|
+
var $t = Object.defineProperty;
|
|
2
|
+
var kt = (n, r, e) => r in n ? $t(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var s = (n, r, e) => kt(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as Kr } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { defineStore as
|
|
8
|
-
import { ref as
|
|
9
|
-
import { isAfter as
|
|
10
|
-
import
|
|
11
|
-
class
|
|
5
|
+
import { merge as Ne, isNil as m, isEmpty as J, noop as T, mapValues as Xr, isArray as W, every as Ot, split as Lt, startsWith as Zr, endsWith as It, includes as xt, isString as R, isFunction as br, map as De, isObject as Ve, isDate as Je, isError as _r, toLower as _t, isPlainObject as Nt, isUndefined as He, constant as qt, toUpper as Et, cloneDeep as Ut, forEach as Ft, round as Mt, omitBy as et } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Sr, objectToSnake as Ht } from "ts-case-convert";
|
|
7
|
+
import { defineStore as ne } from "pinia";
|
|
8
|
+
import { ref as v, markRaw as Bt, computed as A } from "vue";
|
|
9
|
+
import { isAfter as Nr, parseISO as C, startOfToday as qe, format as k, endOfMonth as x, addMonths as $, differenceInCalendarMonths as zt, startOfMonth as E, getDate as qr, getDaysInMonth as Wt, endOfDay as z, startOfDay as ge, setDate as jt, startOfWeek as ee, addWeeks as ar, differenceInCalendarDays as We, addDays as re, isValid as Gt, subDays as je, addBusinessDays as Yt, startOfYear as ue, endOfYear as de, endOfWeek as $e, endOfTomorrow as Qt, startOfTomorrow as Vt, endOfYesterday as Jt, startOfYesterday as Kt, endOfToday as Xt, startOfQuarter as ke, endOfQuarter as Be, addYears as ir, addQuarters as nr, subYears as or, subQuarters as cr, subMonths as lr, subWeeks as Er, addSeconds as Zt } from "date-fns";
|
|
10
|
+
import es, { CanceledError as rs } from "axios";
|
|
11
|
+
class Te {
|
|
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
|
+
Ne(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 = Kr(r), t = new
|
|
110
|
+
const e = Kr(r), t = new Te(Sr(e));
|
|
111
111
|
return t.resourceAccess = e.resource_access, t;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class rt extends Te {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class et extends Re {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
s(this, "address");
|
|
146
|
-
|
|
146
|
+
Ne(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,11 +151,11 @@ class et extends Re {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
const t = Kr(e), i = new
|
|
154
|
+
const t = Kr(e), i = new rt(Sr(t));
|
|
155
155
|
return i.resourceAccess = t.resource_access, i;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class ts {
|
|
159
159
|
/**
|
|
160
160
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
161
161
|
*
|
|
@@ -177,7 +177,7 @@ class rs {
|
|
|
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 ss {
|
|
181
181
|
/**
|
|
182
182
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
183
183
|
*
|
|
@@ -199,7 +199,7 @@ class ts {
|
|
|
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 is {
|
|
203
203
|
/**
|
|
204
204
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
205
205
|
*
|
|
@@ -244,7 +244,7 @@ class ss {
|
|
|
244
244
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
class
|
|
247
|
+
class ns {
|
|
248
248
|
/**
|
|
249
249
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
250
250
|
*
|
|
@@ -283,7 +283,7 @@ class is {
|
|
|
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 os {
|
|
287
287
|
/**
|
|
288
288
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
289
289
|
*
|
|
@@ -327,18 +327,18 @@ class ns {
|
|
|
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 ss(r == null ? void 0 : r.http), this.deviceTypeByResolution = new ts(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new is({
|
|
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 ns(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
|
|
341
|
-
const n =
|
|
340
|
+
const O = ne("common.config", () => {
|
|
341
|
+
const n = v(new os());
|
|
342
342
|
return {
|
|
343
343
|
/**
|
|
344
344
|
* Конфигурационные данные приложения.
|
|
@@ -356,11 +356,11 @@ const L = ie("common.config", () => {
|
|
|
356
356
|
* @param appConfig Конфигурация приложения.
|
|
357
357
|
*/
|
|
358
358
|
setConfig: (t) => {
|
|
359
|
-
n.value =
|
|
359
|
+
n.value = Ne(n.value, t);
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
362
|
});
|
|
363
|
-
class
|
|
363
|
+
class Ge {
|
|
364
364
|
/**
|
|
365
365
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
366
366
|
*
|
|
@@ -379,8 +379,8 @@ class je {
|
|
|
379
379
|
if (e)
|
|
380
380
|
try {
|
|
381
381
|
const t = JSON.parse(e);
|
|
382
|
-
if (!t.availableFor ||
|
|
383
|
-
if (
|
|
382
|
+
if (!t.availableFor || Nr(C(t.availableFor) || qe(), /* @__PURE__ */ new Date())) {
|
|
383
|
+
if (m(t.data) || J(t.data))
|
|
384
384
|
throw new Error("Data is empty");
|
|
385
385
|
return t.data;
|
|
386
386
|
}
|
|
@@ -403,7 +403,7 @@ class je {
|
|
|
403
403
|
static saveActualDataToStorage(r, e, t) {
|
|
404
404
|
if (this.isLocalStorageAvailable())
|
|
405
405
|
try {
|
|
406
|
-
if (
|
|
406
|
+
if (m(e) || J(e))
|
|
407
407
|
throw new Error("Data is empty");
|
|
408
408
|
const i = JSON.stringify({
|
|
409
409
|
availableFor: t,
|
|
@@ -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 && !Nr(C(o.availableFor) || qe(), /* @__PURE__ */ new Date()) && r.push(t);
|
|
458
458
|
}
|
|
459
459
|
} catch {
|
|
460
460
|
r.push(t);
|
|
@@ -470,33 +470,33 @@ class je {
|
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
|
-
function
|
|
473
|
+
function Ur(n) {
|
|
474
474
|
try {
|
|
475
|
-
const r =
|
|
475
|
+
const r = Te.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 pe = ne("common.auth_state_private", () => {
|
|
482
|
+
const n = v(
|
|
483
483
|
(() => {
|
|
484
484
|
var u;
|
|
485
|
-
const o =
|
|
485
|
+
const o = Ge.getActualDataFromStorage(
|
|
486
486
|
"sc.token"
|
|
487
487
|
/* JwtToken */
|
|
488
488
|
);
|
|
489
489
|
if (o)
|
|
490
490
|
return Promise.resolve(o);
|
|
491
|
-
const c = (u =
|
|
491
|
+
const c = (u = O().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
492
492
|
return c ? Promise.resolve(c) : void 0;
|
|
493
493
|
})()
|
|
494
|
-
), r =
|
|
494
|
+
), r = v(void 0), e = v(void 0), t = Bt(/* @__PURE__ */ new Map());
|
|
495
495
|
function i() {
|
|
496
|
-
e.value = void 0,
|
|
497
|
-
const c =
|
|
496
|
+
e.value = void 0, m(n.value) || n.value.then((o) => {
|
|
497
|
+
const c = Te.getJwtPayload(o);
|
|
498
498
|
e.value = c.exp * 1e3 > Date.now() ? Xr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
499
|
-
}).catch(
|
|
499
|
+
}).catch(T);
|
|
500
500
|
}
|
|
501
501
|
return {
|
|
502
502
|
/**
|
|
@@ -520,47 +520,47 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
520
520
|
*/
|
|
521
521
|
recalculateUserPermissions: i
|
|
522
522
|
};
|
|
523
|
-
}),
|
|
523
|
+
}), ze = ne("common.auth_state", () => {
|
|
524
524
|
const n = A(() => {
|
|
525
|
-
const o =
|
|
526
|
-
if (
|
|
525
|
+
const o = pe();
|
|
526
|
+
if (m(o.jwtToken) && !m(o.jwtTokenUpdater)) {
|
|
527
527
|
const c = o.jwtTokenUpdater();
|
|
528
528
|
o.jwtToken = c, c.then((u) => {
|
|
529
|
-
o.jwtToken = Promise.resolve(u),
|
|
530
|
-
}).catch(
|
|
529
|
+
o.jwtToken = Promise.resolve(u), Ge.saveActualDataToStorage("sc.token", u, Ur(u)), o.recalculateUserPermissions();
|
|
530
|
+
}).catch(T);
|
|
531
531
|
}
|
|
532
532
|
return o.jwtToken;
|
|
533
533
|
});
|
|
534
534
|
function r(o) {
|
|
535
|
-
|
|
535
|
+
pe().jwtTokenUpdater = o;
|
|
536
536
|
}
|
|
537
537
|
function e(o) {
|
|
538
|
-
const c =
|
|
539
|
-
c.jwtToken = Promise.resolve(o),
|
|
538
|
+
const c = pe();
|
|
539
|
+
c.jwtToken = Promise.resolve(o), Ge.saveActualDataToStorage("sc.token", o, Ur(o)), c.recalculateUserPermissions();
|
|
540
540
|
}
|
|
541
541
|
function t() {
|
|
542
|
-
const o =
|
|
543
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
542
|
+
const o = pe();
|
|
543
|
+
o.jwtToken = void 0, o.userPermissions = void 0, Ge.saveActualDataToStorage("sc.token", void 0);
|
|
544
544
|
}
|
|
545
545
|
function i(o) {
|
|
546
|
-
const c =
|
|
547
|
-
!
|
|
548
|
-
const
|
|
549
|
-
c.userPermissions =
|
|
550
|
-
}).catch(
|
|
551
|
-
const u =
|
|
546
|
+
const c = pe();
|
|
547
|
+
!m(c.jwtToken) && m(c.userPermissions) && c.jwtToken.then((g) => {
|
|
548
|
+
const a = Te.getJwtPayload(g);
|
|
549
|
+
c.userPermissions = a.exp * 1e3 > Date.now() ? Xr(a.resourceAccess, (P) => (P == null ? void 0 : P.roles) ?? []) : void 0;
|
|
550
|
+
}).catch(T);
|
|
551
|
+
const u = W(o) ? o.join(" && ") : o;
|
|
552
552
|
if (c.userPermissionsComputedRefs.has(u))
|
|
553
553
|
return c.userPermissionsComputedRefs.get(u);
|
|
554
554
|
const p = A(() => {
|
|
555
|
-
const g = (
|
|
556
|
-
var
|
|
557
|
-
const P = Lt(
|
|
555
|
+
const g = (a) => {
|
|
556
|
+
var le;
|
|
557
|
+
const P = Lt(a, ".");
|
|
558
558
|
if (P.length < 2)
|
|
559
559
|
return !1;
|
|
560
|
-
const [
|
|
561
|
-
return
|
|
560
|
+
const [be, Se] = P, ce = (le = pe().userPermissions) == null ? void 0 : le[be];
|
|
561
|
+
return W(ce) && ce.includes(Se);
|
|
562
562
|
};
|
|
563
|
-
return
|
|
563
|
+
return W(o) ? Ot(o, (a) => g(a)) : g(o);
|
|
564
564
|
});
|
|
565
565
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
566
566
|
}
|
|
@@ -593,7 +593,7 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
593
593
|
hasUserPermission: i
|
|
594
594
|
};
|
|
595
595
|
});
|
|
596
|
-
var
|
|
596
|
+
var Ye = /* @__PURE__ */ ((n) => (n.Image = "image", n.Video = "video", n))(Ye || {});
|
|
597
597
|
class G {
|
|
598
598
|
/**
|
|
599
599
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
@@ -610,16 +610,16 @@ class G {
|
|
|
610
610
|
* @inheritDoc
|
|
611
611
|
*/
|
|
612
612
|
s(this, "guid");
|
|
613
|
-
this.id = r == null ? void 0 : r.id,
|
|
613
|
+
this.id = r == null ? void 0 : r.id, m(this.id) && (m(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
|
|
614
614
|
}
|
|
615
615
|
/**
|
|
616
616
|
* Возвращает признак, что это новая запись.
|
|
617
617
|
*/
|
|
618
618
|
isNewRec() {
|
|
619
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
619
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : m(this.id);
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
class
|
|
622
|
+
class wr extends G {
|
|
623
623
|
/**
|
|
624
624
|
* Инициализирует экземпляр класса {@link BlogPostMediaFile}.
|
|
625
625
|
*
|
|
@@ -647,23 +647,23 @@ class yr extends G {
|
|
|
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 ae extends G {
|
|
667
667
|
/**
|
|
668
668
|
* Инициализирует экземпляр класса {@link BlogPostShortInfo}.
|
|
669
669
|
*
|
|
@@ -687,7 +687,7 @@ class ye extends G {
|
|
|
687
687
|
* @inheritDoc
|
|
688
688
|
*/
|
|
689
689
|
s(this, "createdAt");
|
|
690
|
-
this.slug = (e == null ? void 0 : e.slug) ?? "", this.title = (e == null ? void 0 : e.title) ?? "", this.publishedAt =
|
|
690
|
+
this.slug = (e == null ? void 0 : e.slug) ?? "", this.title = (e == null ? void 0 : e.title) ?? "", this.publishedAt = ae.parseDate(e == null ? void 0 : e.publishedAt), this.createdAt = ae.parseDate(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
691
691
|
}
|
|
692
692
|
/**
|
|
693
693
|
* Возвращает состояние публикации статьи по дате её публикации.
|
|
@@ -695,7 +695,7 @@ class ye extends G {
|
|
|
695
695
|
* @param publishedAt Дата и время публикации статьи.
|
|
696
696
|
*/
|
|
697
697
|
static resolvePublicationStatus(e) {
|
|
698
|
-
return
|
|
698
|
+
return m(e) ? Qe.Draft : e.getTime() > Date.now() ? Qe.Scheduled : Qe.Published;
|
|
699
699
|
}
|
|
700
700
|
/**
|
|
701
701
|
* Возвращает описание ошибки символьного обозначения статьи либо пустую строку,
|
|
@@ -707,7 +707,7 @@ class ye extends G {
|
|
|
707
707
|
* @param slug Символьное обозначение статьи.
|
|
708
708
|
*/
|
|
709
709
|
static getSlugError(e) {
|
|
710
|
-
return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." :
|
|
710
|
+
return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : Zr(e, "-") || It(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : xt(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
|
|
711
711
|
}
|
|
712
712
|
/**
|
|
713
713
|
* Преобразует значение даты, полученное из API, в объект {@link Date}.
|
|
@@ -715,16 +715,16 @@ class ye extends G {
|
|
|
715
715
|
* @param value Значение даты.
|
|
716
716
|
*/
|
|
717
717
|
static parseDate(e) {
|
|
718
|
-
return
|
|
718
|
+
return m(e) ? null : R(e) ? C(e) : e;
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
721
|
* Возвращает состояние публикации статьи.
|
|
722
722
|
*/
|
|
723
723
|
getPublicationStatus() {
|
|
724
|
-
return
|
|
724
|
+
return ae.resolvePublicationStatus(this.publishedAt);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
class
|
|
727
|
+
class ur extends ae {
|
|
728
728
|
/**
|
|
729
729
|
* Инициализирует экземпляр класса {@link BlogPost}.
|
|
730
730
|
*
|
|
@@ -740,7 +740,7 @@ class or extends ye {
|
|
|
740
740
|
* @inheritDoc
|
|
741
741
|
*/
|
|
742
742
|
s(this, "media");
|
|
743
|
-
this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new
|
|
743
|
+
this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new wr(t));
|
|
744
744
|
}
|
|
745
745
|
/**
|
|
746
746
|
* Возвращает данные статьи для отправки на портал.
|
|
@@ -780,12 +780,12 @@ class Fe {
|
|
|
780
780
|
const r = {};
|
|
781
781
|
return Object.keys(this).forEach((e) => {
|
|
782
782
|
const t = this[e];
|
|
783
|
-
|
|
783
|
+
m(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
784
784
|
R(t) && t.trim().length === 0 || br(t.isNewRec) && t.isNewRec() || (r[e] = t);
|
|
785
785
|
}), r;
|
|
786
786
|
}
|
|
787
787
|
}
|
|
788
|
-
class
|
|
788
|
+
class b {
|
|
789
789
|
/**
|
|
790
790
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
791
791
|
*
|
|
@@ -800,10 +800,10 @@ class T {
|
|
|
800
800
|
* Окончание периода.
|
|
801
801
|
*/
|
|
802
802
|
s(this, "to");
|
|
803
|
-
this.from = R(r == null ? void 0 : r.from) ?
|
|
803
|
+
this.from = R(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = R(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
class
|
|
806
|
+
class Ks extends Fe {
|
|
807
807
|
/**
|
|
808
808
|
* Инициализирует экземпляр класса {@link BlogPostsListFilters}.
|
|
809
809
|
*
|
|
@@ -839,7 +839,7 @@ class Js extends Fe {
|
|
|
839
839
|
* @inheritDoc
|
|
840
840
|
*/
|
|
841
841
|
s(this, "createdAt");
|
|
842
|
-
this.id = e == null ? void 0 : e.id, this.title = e == null ? void 0 : e.title, this.slug = e == null ? void 0 : e.slug, this.content = e == null ? void 0 : e.content, this.publicationStatus = e == null ? void 0 : e.publicationStatus, this.publishedAt = new
|
|
842
|
+
this.id = e == null ? void 0 : e.id, this.title = e == null ? void 0 : e.title, this.slug = e == null ? void 0 : e.slug, this.content = e == null ? void 0 : e.content, this.publicationStatus = e == null ? void 0 : e.publicationStatus, this.publishedAt = new b(e == null ? void 0 : e.publishedAt), this.createdAt = new b(e == null ? void 0 : e.createdAt);
|
|
843
843
|
}
|
|
844
844
|
/**
|
|
845
845
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -878,6 +878,7 @@ class Js extends Fe {
|
|
|
878
878
|
return !((t = e == null ? void 0 : e.publishedAt) != null && t.from) && !((i = e == null ? void 0 : e.publishedAt) != null && i.to) && delete e.publishedAt, !((o = e == null ? void 0 : e.createdAt) != null && o.from) && !((c = e == null ? void 0 : e.createdAt) != null && c.to) && delete e.createdAt, e;
|
|
879
879
|
}
|
|
880
880
|
}
|
|
881
|
+
var M = /* @__PURE__ */ ((n) => (n.BASE_URL_REQUEST_INTERCEPTOR = "baseUrlRequestInterceptor", n.DEFAULT_REQUEST_INTERCEPTOR = "defaultRequestInterceptor", n.AUTH_REQUEST_INTERCEPTOR = "authRequestInterceptor", n.DATA_CONVERTER_REQUEST_INTERCEPTOR = "dataConverterRequestInterceptor", n.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR = "convertHttpErrorResponseInterceptor", n.CANCELED_RESPONSE_INTERCEPTOR = "canceledResponseInterceptor", n.AUTH_ERRORS_RESPONSE_INTERCEPTOR = "authErrorsResponseInterceptor", n.DATA_CONVERTER_RESPONSE_INTERCEPTOR = "dataConverterResponseInterceptor", n))(M || {});
|
|
881
882
|
class _ {
|
|
882
883
|
/**
|
|
883
884
|
* Инициализирует экземпляр указанного класса.
|
|
@@ -905,12 +906,12 @@ class _ {
|
|
|
905
906
|
* @throws TypeError Если вместо списка данных получены данные другого типа.
|
|
906
907
|
*/
|
|
907
908
|
static instanceListInitializer(r, e) {
|
|
908
|
-
if (!
|
|
909
|
+
if (!W(e))
|
|
909
910
|
throw new TypeError(`Ожидался список данных для инициализации "${r.name}", получены данные типа "${typeof e}".`);
|
|
910
911
|
return De(e, (t) => _.instanceInitializer(r, t));
|
|
911
912
|
}
|
|
912
913
|
}
|
|
913
|
-
const
|
|
914
|
+
const w = class w {
|
|
914
915
|
/**
|
|
915
916
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
916
917
|
*/
|
|
@@ -922,15 +923,7 @@ const b = class b {
|
|
|
922
923
|
/**
|
|
923
924
|
* Базовый URL путь для выполнения запросов.
|
|
924
925
|
*/
|
|
925
|
-
s(this, "baseUrl", `${
|
|
926
|
-
/**
|
|
927
|
-
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
928
|
-
*
|
|
929
|
-
* @param error Данные об ошибке.
|
|
930
|
-
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
931
|
-
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
932
|
-
*/
|
|
933
|
-
s(this, "errorResponseHandler", D);
|
|
926
|
+
s(this, "baseUrl", `${O().config.http.portalApiUrl}/api`);
|
|
934
927
|
/**
|
|
935
928
|
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
936
929
|
*/
|
|
@@ -948,74 +941,86 @@ const b = class b {
|
|
|
948
941
|
*/
|
|
949
942
|
// eslint-disable-next-line class-methods-use-this
|
|
950
943
|
s(this, "authRequestInterceptor", async (r) => {
|
|
951
|
-
|
|
952
|
-
return
|
|
944
|
+
const e = ze().jwtToken, t = m(e) ? void 0 : await e;
|
|
945
|
+
return t && r.headers.set("Authorization", `Bearer ${t}`), r;
|
|
953
946
|
});
|
|
954
|
-
/**
|
|
955
|
-
* Перехватчик запроса для вызова пользовательских хуков.
|
|
956
|
-
*
|
|
957
|
-
* @param request Данные запроса.
|
|
958
|
-
*/
|
|
959
|
-
// eslint-disable-next-line class-methods-use-this
|
|
960
|
-
s(this, "userRequestHooksInterceptor", async (r) => b.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
961
947
|
/**
|
|
962
948
|
* Перехватчик запроса для преобразования данных запроса.
|
|
963
949
|
*
|
|
964
950
|
* @param request Данные запроса.
|
|
965
951
|
*/
|
|
966
952
|
// eslint-disable-next-line class-methods-use-this
|
|
967
|
-
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
953
|
+
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && !m(r.params) && (r.params = w.toSnakeCaseData(r.params)), ["put", "patch", "post"].includes(_t(r.method)) && !m(r.data) && (r.data = w.toSnakeCaseData(r.data))), r));
|
|
968
954
|
/**
|
|
969
955
|
* Перехватчик ошибок ответов на запрос.
|
|
970
956
|
*
|
|
971
957
|
* @param error Данные ошибки ответа на запрос.
|
|
972
958
|
*/
|
|
973
|
-
s(this, "authErrorsResponseInterceptors", (r) => {
|
|
959
|
+
s(this, "authErrorsResponseInterceptors", async (r) => {
|
|
974
960
|
var t;
|
|
975
961
|
const e = r.rawError ? (t = r.rawError) == null ? void 0 : t.config : void 0;
|
|
976
|
-
|
|
962
|
+
if (r.status === 401) {
|
|
963
|
+
if (!e || e.__isRetryRequest)
|
|
964
|
+
return Promise.reject(r);
|
|
965
|
+
e.__isRetryRequest = !0;
|
|
966
|
+
try {
|
|
967
|
+
await w.isStaleUnauthorizedRequest(e) || await w.refreshAccessToken();
|
|
968
|
+
} catch {
|
|
969
|
+
return Promise.reject(r);
|
|
970
|
+
}
|
|
971
|
+
return this.httpClient(e);
|
|
972
|
+
}
|
|
973
|
+
return Promise.reject(r);
|
|
977
974
|
});
|
|
978
975
|
/**
|
|
979
976
|
* Перехватчик ответа для приведения отмены запроса (AbortController) к единому виду.
|
|
980
977
|
*
|
|
981
|
-
* @param error Данные ошибки ответа на запрос
|
|
978
|
+
* @param error Данные ошибки ответа на запрос после convertHttpErrorResponse. Исходная ошибка axios лежит в rawError.
|
|
982
979
|
*/
|
|
983
980
|
// eslint-disable-next-line class-methods-use-this
|
|
984
981
|
s(this, "canceledResponseInterceptor", (r) => {
|
|
985
982
|
const e = r.rawError ?? r;
|
|
986
983
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
987
|
-
throw new
|
|
984
|
+
throw new rs("Request canceled");
|
|
988
985
|
return Promise.reject(r);
|
|
989
986
|
});
|
|
990
|
-
/**
|
|
991
|
-
* Перехватчик ответа для вызова пользовательских хуков.
|
|
992
|
-
*
|
|
993
|
-
* @param response Данные ответа на запрос.
|
|
994
|
-
*/
|
|
995
|
-
// eslint-disable-next-line class-methods-use-this
|
|
996
|
-
s(this, "userResponseHooksInterceptor", async (r) => b.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
997
987
|
/**
|
|
998
988
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
999
989
|
*
|
|
1000
990
|
* @param response Данные ответа на запрос.
|
|
1001
991
|
*/
|
|
1002
992
|
// eslint-disable-next-line class-methods-use-this
|
|
1003
|
-
s(this, "dataConverterResponseInterceptor", (r) => (r.data
|
|
1004
|
-
this.
|
|
993
|
+
s(this, "dataConverterResponseInterceptor", (r) => (r.data = w.toCamelCaseData(r.data), r));
|
|
994
|
+
this.httpClient = es.create({
|
|
1005
995
|
headers: {
|
|
1006
996
|
Accept: "application/json",
|
|
1007
997
|
"Content-Type": "application/json"
|
|
1008
998
|
}
|
|
1009
|
-
}), this.interceptorIds.request.
|
|
999
|
+
}), this.interceptorIds.request[M.DATA_CONVERTER_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
|
|
1010
1000
|
this.dataConverterRequestInterceptor,
|
|
1011
1001
|
(r) => Promise.reject(r)
|
|
1012
|
-
), this.interceptorIds.
|
|
1002
|
+
), this.interceptorIds.request[M.AUTH_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
|
|
1003
|
+
this.authRequestInterceptor,
|
|
1004
|
+
(r) => Promise.reject(r)
|
|
1005
|
+
), this.interceptorIds.request[M.DEFAULT_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
|
|
1006
|
+
(r) => w.applyDefaultRequestHook(r),
|
|
1007
|
+
(r) => Promise.reject(r)
|
|
1008
|
+
), this.interceptorIds.request[M.BASE_URL_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
|
|
1009
|
+
this.setBaseUrlRequestInterceptor,
|
|
1010
|
+
(r) => Promise.reject(r)
|
|
1011
|
+
), this.interceptorIds.response[M.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
|
|
1013
1012
|
(r) => r,
|
|
1014
|
-
(r) =>
|
|
1015
|
-
), this.interceptorIds.response.
|
|
1013
|
+
(r) => w.convertHttpErrorResponse(r)
|
|
1014
|
+
), this.interceptorIds.response[M.CANCELED_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
|
|
1015
|
+
(r) => r,
|
|
1016
|
+
this.canceledResponseInterceptor
|
|
1017
|
+
), this.interceptorIds.response[M.AUTH_ERRORS_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
|
|
1018
|
+
(r) => r,
|
|
1019
|
+
this.authErrorsResponseInterceptors
|
|
1020
|
+
), this.interceptorIds.response[M.DATA_CONVERTER_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
|
|
1016
1021
|
this.dataConverterResponseInterceptor,
|
|
1017
1022
|
(r) => Promise.reject(r)
|
|
1018
|
-
)
|
|
1023
|
+
);
|
|
1019
1024
|
}
|
|
1020
1025
|
/**
|
|
1021
1026
|
* Устанавливает базовый обработчик ошибок выполнения запросов.
|
|
@@ -1023,41 +1028,95 @@ const b = class b {
|
|
|
1023
1028
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1024
1029
|
*/
|
|
1025
1030
|
static setDefaultErrorsResponseHandler(r) {
|
|
1026
|
-
|
|
1031
|
+
w.defaultErrorsResponseHandler = r;
|
|
1027
1032
|
}
|
|
1028
1033
|
/**
|
|
1029
|
-
*
|
|
1034
|
+
* Устанавливает базовый хук для запросов.
|
|
1030
1035
|
*
|
|
1031
|
-
* @param hook
|
|
1036
|
+
* @param hook Ссылка на функцию-хук.
|
|
1032
1037
|
*/
|
|
1033
|
-
static
|
|
1034
|
-
|
|
1038
|
+
static setDefaultRequestHook(r) {
|
|
1039
|
+
w.defaultRequestHook = r;
|
|
1035
1040
|
}
|
|
1036
1041
|
/**
|
|
1037
|
-
*
|
|
1042
|
+
* Проверяет, что значение можно безопасно пропустить через конвертер ключей.
|
|
1038
1043
|
*
|
|
1039
|
-
*
|
|
1044
|
+
* Blob, FormData, ArrayBuffer и Date конвертер превращает в пустой объект.
|
|
1045
|
+
*
|
|
1046
|
+
* @param value Проверяемое значение.
|
|
1047
|
+
*/
|
|
1048
|
+
static canConvertCaseKeys(r) {
|
|
1049
|
+
return Ve(r) ? !(r instanceof Blob || r instanceof FormData || r instanceof ArrayBuffer || Je(r) || ArrayBuffer.isView(r)) : !1;
|
|
1050
|
+
}
|
|
1051
|
+
/**
|
|
1052
|
+
* Приводит ключи данных к camelCase, если значение является обычным объектом или массивом.
|
|
1053
|
+
*
|
|
1054
|
+
* @param data Исходные данные.
|
|
1040
1055
|
*/
|
|
1041
|
-
static
|
|
1042
|
-
|
|
1043
|
-
e !== -1 && b.requestHooks.splice(e, 1);
|
|
1056
|
+
static toCamelCaseData(r) {
|
|
1057
|
+
return w.canConvertCaseKeys(r) ? Sr(r) : r;
|
|
1044
1058
|
}
|
|
1045
1059
|
/**
|
|
1046
|
-
*
|
|
1060
|
+
* Приводит ключи данных к snake_case, если значение является обычным объектом или массивом.
|
|
1047
1061
|
*
|
|
1048
|
-
* @param
|
|
1062
|
+
* @param data Исходные данные.
|
|
1049
1063
|
*/
|
|
1050
|
-
static
|
|
1051
|
-
|
|
1064
|
+
static toSnakeCaseData(r) {
|
|
1065
|
+
return w.canConvertCaseKeys(r) ? Ht(r) : r;
|
|
1052
1066
|
}
|
|
1053
1067
|
/**
|
|
1054
|
-
*
|
|
1068
|
+
* Возвращает токен доступа из заголовка Authorization исходного запроса.
|
|
1055
1069
|
*
|
|
1056
|
-
* @param
|
|
1070
|
+
* @param request Данные запроса.
|
|
1057
1071
|
*/
|
|
1058
|
-
static
|
|
1059
|
-
const e =
|
|
1060
|
-
|
|
1072
|
+
static getRequestAccessToken(r) {
|
|
1073
|
+
const e = r.headers.get("Authorization"), t = R(e) ? e : void 0, i = "Bearer ";
|
|
1074
|
+
if (m(t) || !Zr(t, i))
|
|
1075
|
+
return;
|
|
1076
|
+
const o = t.slice(i.length);
|
|
1077
|
+
return o === "" ? void 0 : o;
|
|
1078
|
+
}
|
|
1079
|
+
/**
|
|
1080
|
+
* Проверяет, что 401 пришёл на токен, который уже заменён.
|
|
1081
|
+
*
|
|
1082
|
+
* Такой ответ нельзя считать поводом сбрасывать текущий токен: запрос ушёл со старым ключом, а в сторе уже лежит новый.
|
|
1083
|
+
*
|
|
1084
|
+
* @param request Данные запроса.
|
|
1085
|
+
*/
|
|
1086
|
+
static async isStaleUnauthorizedRequest(r) {
|
|
1087
|
+
const e = w.getRequestAccessToken(r);
|
|
1088
|
+
if (m(e))
|
|
1089
|
+
return !1;
|
|
1090
|
+
const t = ze().jwtToken;
|
|
1091
|
+
if (m(t))
|
|
1092
|
+
return !1;
|
|
1093
|
+
try {
|
|
1094
|
+
return await t !== e;
|
|
1095
|
+
} catch {
|
|
1096
|
+
return !1;
|
|
1097
|
+
}
|
|
1098
|
+
}
|
|
1099
|
+
/**
|
|
1100
|
+
* Сбрасывает токен и запускает одно обновление на все параллельные ответы 401.
|
|
1101
|
+
*/
|
|
1102
|
+
static refreshAccessToken() {
|
|
1103
|
+
if (!m(w.tokenRefreshPromise))
|
|
1104
|
+
return w.tokenRefreshPromise;
|
|
1105
|
+
ze().invalidateJwtToken();
|
|
1106
|
+
const e = ze().jwtToken ?? Promise.resolve();
|
|
1107
|
+
return w.tokenRefreshPromise = e.finally(() => {
|
|
1108
|
+
w.tokenRefreshPromise = void 0;
|
|
1109
|
+
}), w.tokenRefreshPromise;
|
|
1110
|
+
}
|
|
1111
|
+
/**
|
|
1112
|
+
* Вызывает базовый хук запроса.
|
|
1113
|
+
*
|
|
1114
|
+
* Хук читается в момент запроса, чтобы экземпляр подхватывал значение, заданное после создания.
|
|
1115
|
+
*
|
|
1116
|
+
* @param request Данные запроса.
|
|
1117
|
+
*/
|
|
1118
|
+
static applyDefaultRequestHook(r) {
|
|
1119
|
+
return m(w.defaultRequestHook) ? r : w.defaultRequestHook(r);
|
|
1061
1120
|
}
|
|
1062
1121
|
/**
|
|
1063
1122
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1065,7 +1124,7 @@ const b = class b {
|
|
|
1065
1124
|
* @param type Тип данных, которыми оперирует метод.
|
|
1066
1125
|
*/
|
|
1067
1126
|
static getInstance(r) {
|
|
1068
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1127
|
+
return Object.prototype.hasOwnProperty.call(w.instances, r.name) || (w.instances[r.name] = _.simpleInstanceInitializer(r)), w.instances[r.name];
|
|
1069
1128
|
}
|
|
1070
1129
|
/**
|
|
1071
1130
|
* Приводит данные об ошибке к форме ошибки HTTP запроса.
|
|
@@ -1076,12 +1135,12 @@ const b = class b {
|
|
|
1076
1135
|
* @param error Данные об ошибке.
|
|
1077
1136
|
*/
|
|
1078
1137
|
static toHttpResponseError(r) {
|
|
1079
|
-
return
|
|
1138
|
+
return Ve(r) && "status" in r ? r : {
|
|
1080
1139
|
status: 0,
|
|
1081
1140
|
statusText: "Invalid response data",
|
|
1082
|
-
message:
|
|
1141
|
+
message: _r(r) ? r.message : "Не удалось обработать данные ответа сервера.",
|
|
1083
1142
|
headers: {},
|
|
1084
|
-
rawError:
|
|
1143
|
+
rawError: _r(r) ? r : new Error(String(r))
|
|
1085
1144
|
};
|
|
1086
1145
|
}
|
|
1087
1146
|
/**
|
|
@@ -1091,8 +1150,8 @@ const b = class b {
|
|
|
1091
1150
|
*/
|
|
1092
1151
|
static convertHttpErrorResponse(r) {
|
|
1093
1152
|
var e, t;
|
|
1094
|
-
if (
|
|
1095
|
-
const i =
|
|
1153
|
+
if (m(r) || !m(r.request) || !m(r.response)) {
|
|
1154
|
+
const i = m(r) ? {} : r == null ? void 0 : r.response;
|
|
1096
1155
|
return Promise.reject({
|
|
1097
1156
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
1098
1157
|
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
@@ -1116,7 +1175,7 @@ const b = class b {
|
|
|
1116
1175
|
request(r, e = void 0, t = {}, i = !1) {
|
|
1117
1176
|
const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
|
|
1118
1177
|
return o.catch((c) => {
|
|
1119
|
-
(c == null ? void 0 : c.name) !== "CanceledError" &&
|
|
1178
|
+
(c == null ? void 0 : c.name) !== "CanceledError" && w.defaultErrorsResponseHandler(w.toHttpResponseError(c), t, i);
|
|
1120
1179
|
}), o;
|
|
1121
1180
|
}
|
|
1122
1181
|
/**
|
|
@@ -1157,9 +1216,10 @@ const b = class b {
|
|
|
1157
1216
|
* @param params Параметры запроса.
|
|
1158
1217
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1159
1218
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1219
|
+
* @param signal Сигнал отмены запроса.
|
|
1160
1220
|
*/
|
|
1161
|
-
getBlob(r, e = {}, t = void 0, i = !1) {
|
|
1162
|
-
return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {}, i);
|
|
1221
|
+
getBlob(r, e = {}, t = void 0, i = !1, o = void 0) {
|
|
1222
|
+
return this.request({ method: "GET", url: r, params: e, responseType: "blob", signal: o }, t, {}, i);
|
|
1163
1223
|
}
|
|
1164
1224
|
/**
|
|
1165
1225
|
* Выполняет patch-запрос с параметрами по умолчанию.
|
|
@@ -1169,9 +1229,10 @@ const b = class b {
|
|
|
1169
1229
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1170
1230
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1171
1231
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1232
|
+
* @param signal Сигнал отмены запроса.
|
|
1172
1233
|
*/
|
|
1173
|
-
patch(r, e = {}, t = void 0, i = {}, o = !1) {
|
|
1174
|
-
return this.request({ method: "PATCH", url: r, data: e }, t, i, o);
|
|
1234
|
+
patch(r, e = {}, t = void 0, i = {}, o = !1, c = void 0) {
|
|
1235
|
+
return this.request({ method: "PATCH", url: r, data: e, signal: c }, t, i, o);
|
|
1175
1236
|
}
|
|
1176
1237
|
/**
|
|
1177
1238
|
* Выполняет post-запрос с параметрами по умолчанию.
|
|
@@ -1181,9 +1242,10 @@ const b = class b {
|
|
|
1181
1242
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1182
1243
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1183
1244
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1245
|
+
* @param signal Сигнал отмены запроса.
|
|
1184
1246
|
*/
|
|
1185
|
-
post(r, e = {}, t = void 0, i = {}, o = !1) {
|
|
1186
|
-
return this.request({ method: "POST", url: r, data: e }, t, i, o);
|
|
1247
|
+
post(r, e = {}, t = void 0, i = {}, o = !1, c = void 0) {
|
|
1248
|
+
return this.request({ method: "POST", url: r, data: e, signal: c }, t, i, o);
|
|
1187
1249
|
}
|
|
1188
1250
|
/**
|
|
1189
1251
|
* Выполняет delete-запрос с параметрами по умолчанию.
|
|
@@ -1191,32 +1253,33 @@ const b = class b {
|
|
|
1191
1253
|
* @param url URL запроса.
|
|
1192
1254
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1193
1255
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1256
|
+
* @param signal Сигнал отмены запроса.
|
|
1194
1257
|
*/
|
|
1195
|
-
delete(r, e = void 0, t = !1) {
|
|
1196
|
-
return this.request({ method: "DELETE", url: r }, e, {}, t);
|
|
1258
|
+
delete(r, e = void 0, t = !1, i = void 0) {
|
|
1259
|
+
return this.request({ method: "DELETE", url: r, signal: i }, e, {}, t);
|
|
1197
1260
|
}
|
|
1198
1261
|
};
|
|
1199
1262
|
/**
|
|
1200
1263
|
* Экземпляр объекта текущего класса.
|
|
1201
1264
|
*/
|
|
1202
1265
|
// eslint-disable-next-line no-use-before-define
|
|
1203
|
-
s(
|
|
1266
|
+
s(w, "instances", {}), /**
|
|
1204
1267
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1205
1268
|
*
|
|
1206
1269
|
* @param error Данные об ошибке.
|
|
1207
1270
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1208
1271
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1209
1272
|
*/
|
|
1210
|
-
s(
|
|
1211
|
-
*
|
|
1273
|
+
s(w, "defaultErrorsResponseHandler", T), /**
|
|
1274
|
+
* Базовый хук для запросов.
|
|
1212
1275
|
*/
|
|
1213
|
-
s(
|
|
1214
|
-
*
|
|
1276
|
+
s(w, "defaultRequestHook"), /**
|
|
1277
|
+
* Общий Promise обновления токена для параллельных ответов 401.
|
|
1215
1278
|
*/
|
|
1216
|
-
s(
|
|
1217
|
-
let h =
|
|
1279
|
+
s(w, "tokenRefreshPromise");
|
|
1280
|
+
let h = w;
|
|
1218
1281
|
var dr = /* @__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))(dr || {});
|
|
1219
|
-
class
|
|
1282
|
+
class Fr {
|
|
1220
1283
|
/**
|
|
1221
1284
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
1222
1285
|
*
|
|
@@ -1243,13 +1306,13 @@ class Mr {
|
|
|
1243
1306
|
* @returns Примитивное представление фильтра.
|
|
1244
1307
|
*/
|
|
1245
1308
|
toPrimitive() {
|
|
1246
|
-
const r =
|
|
1309
|
+
const r = O().config.dateFormats.api, e = {
|
|
1247
1310
|
field: this.field,
|
|
1248
1311
|
op: this.op
|
|
1249
1312
|
};
|
|
1250
|
-
if (
|
|
1313
|
+
if (Je(this.value))
|
|
1251
1314
|
e.value = k(this.value, r);
|
|
1252
|
-
else if (
|
|
1315
|
+
else if (Nt(this.value)) {
|
|
1253
1316
|
const t = this.value;
|
|
1254
1317
|
e.value = {
|
|
1255
1318
|
from: t.from ? k(t.from, r) : null,
|
|
@@ -1260,7 +1323,7 @@ class Mr {
|
|
|
1260
1323
|
return e;
|
|
1261
1324
|
}
|
|
1262
1325
|
}
|
|
1263
|
-
class
|
|
1326
|
+
class te {
|
|
1264
1327
|
/**
|
|
1265
1328
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
1266
1329
|
*
|
|
@@ -1280,7 +1343,7 @@ class re {
|
|
|
1280
1343
|
*/
|
|
1281
1344
|
s(this, "groups");
|
|
1282
1345
|
var e, t;
|
|
1283
|
-
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
|
|
1346
|
+
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 Fr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new te(i))) ?? [];
|
|
1284
1347
|
}
|
|
1285
1348
|
/**
|
|
1286
1349
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -1290,8 +1353,8 @@ class re {
|
|
|
1290
1353
|
toPrimitive() {
|
|
1291
1354
|
return {
|
|
1292
1355
|
groupOp: this.groupOp,
|
|
1293
|
-
filters: this.filters.map((r) => r instanceof
|
|
1294
|
-
groups: this.groups.map((r) => r instanceof
|
|
1356
|
+
filters: this.filters.map((r) => r instanceof Fr && br(r.toPrimitive) ? r.toPrimitive() : r),
|
|
1357
|
+
groups: this.groups.map((r) => r instanceof te ? r.toPrimitive() : r)
|
|
1295
1358
|
};
|
|
1296
1359
|
}
|
|
1297
1360
|
}
|
|
@@ -1313,7 +1376,7 @@ class Y extends h {
|
|
|
1313
1376
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
1314
1377
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
1315
1378
|
};
|
|
1316
|
-
return e && (g.filters = JSON.stringify((e instanceof
|
|
1379
|
+
return e && (g.filters = JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive())), J(t) || (g.sort = W(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u, p);
|
|
1317
1380
|
}
|
|
1318
1381
|
/**
|
|
1319
1382
|
* Получает пагинированный список экземпляров указанного класса.
|
|
@@ -1343,7 +1406,7 @@ class Y extends h {
|
|
|
1343
1406
|
);
|
|
1344
1407
|
}
|
|
1345
1408
|
}
|
|
1346
|
-
class
|
|
1409
|
+
class vr extends Y {
|
|
1347
1410
|
/**
|
|
1348
1411
|
* Возвращает данные статьи блога, подготовленные для отправки на портал.
|
|
1349
1412
|
*
|
|
@@ -1355,8 +1418,8 @@ class ar extends Y {
|
|
|
1355
1418
|
static preparePostSaveData(r) {
|
|
1356
1419
|
const e = {};
|
|
1357
1420
|
if (He(r.title) || (e.title = r.title), He(r.slug) || (e.slug = r.slug), He(r.content) || (e.content = r.content), !He(r.publishedAt)) {
|
|
1358
|
-
const t =
|
|
1359
|
-
e.publishedAt =
|
|
1421
|
+
const t = O().config.dateFormats.api;
|
|
1422
|
+
e.publishedAt = m(r.publishedAt) ? null : k(r.publishedAt, t);
|
|
1360
1423
|
}
|
|
1361
1424
|
return e;
|
|
1362
1425
|
}
|
|
@@ -1376,7 +1439,7 @@ class ar extends Y {
|
|
|
1376
1439
|
return this.getPaginated("/internal/blog", r, e, t, {}, (i) => ({
|
|
1377
1440
|
...i.data,
|
|
1378
1441
|
// eslint-disable-next-line lodash/prefer-lodash-method
|
|
1379
|
-
data: i.data.data.map((o) => new
|
|
1442
|
+
data: i.data.data.map((o) => new ae(o))
|
|
1380
1443
|
}));
|
|
1381
1444
|
}
|
|
1382
1445
|
/**
|
|
@@ -1387,7 +1450,7 @@ class ar extends Y {
|
|
|
1387
1450
|
* @see /doc/api/internal#/operations/api_internal_blog_get
|
|
1388
1451
|
*/
|
|
1389
1452
|
getPost(r) {
|
|
1390
|
-
return this.get(`/internal/blog/${r}`, {}, (e) => new
|
|
1453
|
+
return this.get(`/internal/blog/${r}`, {}, (e) => new ur(e.data));
|
|
1391
1454
|
}
|
|
1392
1455
|
/**
|
|
1393
1456
|
* Создаёт новую статью блога.
|
|
@@ -1400,7 +1463,7 @@ class ar extends Y {
|
|
|
1400
1463
|
* @see /doc/api/internal#/operations/api_internal_blog_create
|
|
1401
1464
|
*/
|
|
1402
1465
|
createPost(r, e = {}) {
|
|
1403
|
-
return this.post("/internal/blog",
|
|
1466
|
+
return this.post("/internal/blog", vr.preparePostSaveData(r), (t) => new ur(t.data), e);
|
|
1404
1467
|
}
|
|
1405
1468
|
/**
|
|
1406
1469
|
* Изменяет данные о статье блога.
|
|
@@ -1414,7 +1477,7 @@ class ar extends Y {
|
|
|
1414
1477
|
* @see /doc/api/internal#/operations/api_internal_blog_update
|
|
1415
1478
|
*/
|
|
1416
1479
|
updatePost(r, e, t = {}) {
|
|
1417
|
-
return this.patch(`/internal/blog/${r}`,
|
|
1480
|
+
return this.patch(`/internal/blog/${r}`, vr.preparePostSaveData(e), (i) => new ur(i.data), t);
|
|
1418
1481
|
}
|
|
1419
1482
|
/**
|
|
1420
1483
|
* Удаляет статью блога.
|
|
@@ -1449,7 +1512,7 @@ class ar extends Y {
|
|
|
1449
1512
|
i && i(c.total ? Math.round(c.loaded / c.total * 100) : 0);
|
|
1450
1513
|
}
|
|
1451
1514
|
},
|
|
1452
|
-
(c) => new
|
|
1515
|
+
(c) => new wr(c.data),
|
|
1453
1516
|
o
|
|
1454
1517
|
);
|
|
1455
1518
|
}
|
|
@@ -1469,7 +1532,7 @@ class ar extends Y {
|
|
|
1469
1532
|
return this.patch(
|
|
1470
1533
|
`/internal/blog/${r}/media/${e}`,
|
|
1471
1534
|
{ isCover: t },
|
|
1472
|
-
(o) => new
|
|
1535
|
+
(o) => new wr(o.data),
|
|
1473
1536
|
i
|
|
1474
1537
|
);
|
|
1475
1538
|
}
|
|
@@ -1487,7 +1550,7 @@ class ar extends Y {
|
|
|
1487
1550
|
return this.delete(`/internal/blog/${r}/media/${e}`);
|
|
1488
1551
|
}
|
|
1489
1552
|
}
|
|
1490
|
-
class
|
|
1553
|
+
class L extends G {
|
|
1491
1554
|
/**
|
|
1492
1555
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1493
1556
|
*
|
|
@@ -1505,10 +1568,10 @@ class O extends G {
|
|
|
1505
1568
|
* @inheritdoc
|
|
1506
1569
|
*/
|
|
1507
1570
|
nameOrGuid() {
|
|
1508
|
-
return
|
|
1571
|
+
return J(this.name) ? this.guid : this.name;
|
|
1509
1572
|
}
|
|
1510
1573
|
}
|
|
1511
|
-
class
|
|
1574
|
+
class N extends L {
|
|
1512
1575
|
/**
|
|
1513
1576
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1514
1577
|
*
|
|
@@ -1527,7 +1590,7 @@ class q extends O {
|
|
|
1527
1590
|
this.type = e == null ? void 0 : e.type, this.isActive = (e == null ? void 0 : e.isActive) ?? !0;
|
|
1528
1591
|
}
|
|
1529
1592
|
}
|
|
1530
|
-
class
|
|
1593
|
+
class cs extends L {
|
|
1531
1594
|
/**
|
|
1532
1595
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1533
1596
|
*
|
|
@@ -1563,10 +1626,10 @@ class os extends O {
|
|
|
1563
1626
|
* Дата и время удаления.
|
|
1564
1627
|
*/
|
|
1565
1628
|
s(this, "deletedAt");
|
|
1566
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = R(e == null ? void 0 : e.publishedAt) ?
|
|
1629
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = R(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new N(e == null ? void 0 : e.owner), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1567
1630
|
}
|
|
1568
1631
|
}
|
|
1569
|
-
class
|
|
1632
|
+
class tt extends L {
|
|
1570
1633
|
/**
|
|
1571
1634
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1572
1635
|
*
|
|
@@ -1578,10 +1641,10 @@ class rt extends O {
|
|
|
1578
1641
|
* Дата и время последнего изменения.
|
|
1579
1642
|
*/
|
|
1580
1643
|
s(this, "updatedAt");
|
|
1581
|
-
this.updatedAt = R(e == null ? void 0 : e.updatedAt) ?
|
|
1644
|
+
this.updatedAt = R(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1582
1645
|
}
|
|
1583
1646
|
}
|
|
1584
|
-
class
|
|
1647
|
+
class fe extends tt {
|
|
1585
1648
|
/**
|
|
1586
1649
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1587
1650
|
*
|
|
@@ -1601,11 +1664,11 @@ class ge extends rt {
|
|
|
1601
1664
|
* Данные о пользователе, создавшем шаблон прайс-листа.
|
|
1602
1665
|
*/
|
|
1603
1666
|
s(this, "owner");
|
|
1604
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = R(e == null ? void 0 : e.createdAt) ?
|
|
1667
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new N(e.owner) : void 0;
|
|
1605
1668
|
}
|
|
1606
1669
|
}
|
|
1607
|
-
var
|
|
1608
|
-
class
|
|
1670
|
+
var st = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(st || {});
|
|
1671
|
+
class D extends L {
|
|
1609
1672
|
/**
|
|
1610
1673
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
1611
1674
|
*
|
|
@@ -1624,21 +1687,21 @@ class C extends O {
|
|
|
1624
1687
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
1625
1688
|
}
|
|
1626
1689
|
}
|
|
1627
|
-
class Pe extends
|
|
1690
|
+
class Pe extends D {
|
|
1628
1691
|
/**
|
|
1629
1692
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
1630
1693
|
*/
|
|
1631
1694
|
static getRetailPriceCoefficient() {
|
|
1632
1695
|
const r = new Pe({
|
|
1633
1696
|
id: -2,
|
|
1634
|
-
slug:
|
|
1697
|
+
slug: st.Retail,
|
|
1635
1698
|
name: "Розн. цена",
|
|
1636
1699
|
guid: ""
|
|
1637
1700
|
});
|
|
1638
|
-
return r.isNewRec =
|
|
1701
|
+
return r.isNewRec = qt(!0), r;
|
|
1639
1702
|
}
|
|
1640
1703
|
}
|
|
1641
|
-
class
|
|
1704
|
+
class $r {
|
|
1642
1705
|
/**
|
|
1643
1706
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
1644
1707
|
*
|
|
@@ -1668,7 +1731,7 @@ class Sr {
|
|
|
1668
1731
|
this.coefficient = new Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
1669
1732
|
}
|
|
1670
1733
|
}
|
|
1671
|
-
class
|
|
1734
|
+
class it {
|
|
1672
1735
|
/**
|
|
1673
1736
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
1674
1737
|
*
|
|
@@ -1686,9 +1749,9 @@ class st {
|
|
|
1686
1749
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
1687
1750
|
}
|
|
1688
1751
|
}
|
|
1689
|
-
class
|
|
1752
|
+
class K extends D {
|
|
1690
1753
|
}
|
|
1691
|
-
class Me extends
|
|
1754
|
+
class Me extends D {
|
|
1692
1755
|
/**
|
|
1693
1756
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
1694
1757
|
*
|
|
@@ -1717,10 +1780,10 @@ class Me extends C {
|
|
|
1717
1780
|
* Координаты склада.
|
|
1718
1781
|
*/
|
|
1719
1782
|
s(this, "coordinates");
|
|
1720
|
-
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
|
|
1783
|
+
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 it(e == null ? void 0 : e.coordinates);
|
|
1721
1784
|
}
|
|
1722
1785
|
}
|
|
1723
|
-
class
|
|
1786
|
+
class ls {
|
|
1724
1787
|
/**
|
|
1725
1788
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
1726
1789
|
*
|
|
@@ -1738,7 +1801,7 @@ class cs {
|
|
|
1738
1801
|
this.warehouse = new Me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
1739
1802
|
}
|
|
1740
1803
|
}
|
|
1741
|
-
class j extends
|
|
1804
|
+
class j extends L {
|
|
1742
1805
|
/**
|
|
1743
1806
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1744
1807
|
*
|
|
@@ -1765,7 +1828,7 @@ class j extends O {
|
|
|
1765
1828
|
e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
|
|
1766
1829
|
}
|
|
1767
1830
|
}
|
|
1768
|
-
class
|
|
1831
|
+
class Mr extends L {
|
|
1769
1832
|
/**
|
|
1770
1833
|
* Инициализирует экземпляр класса {@link ProductUnit}.
|
|
1771
1834
|
*
|
|
@@ -1792,7 +1855,7 @@ class Hr extends O {
|
|
|
1792
1855
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
1793
1856
|
}
|
|
1794
1857
|
}
|
|
1795
|
-
class
|
|
1858
|
+
class Ee extends L {
|
|
1796
1859
|
/**
|
|
1797
1860
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1798
1861
|
*
|
|
@@ -1807,7 +1870,7 @@ class Ne extends O {
|
|
|
1807
1870
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
1808
1871
|
}
|
|
1809
1872
|
}
|
|
1810
|
-
class
|
|
1873
|
+
class nt extends Ee {
|
|
1811
1874
|
/**
|
|
1812
1875
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
1813
1876
|
*
|
|
@@ -1826,7 +1889,7 @@ class it extends Ne {
|
|
|
1826
1889
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
1827
1890
|
}
|
|
1828
1891
|
}
|
|
1829
|
-
class
|
|
1892
|
+
class us extends nt {
|
|
1830
1893
|
/**
|
|
1831
1894
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
1832
1895
|
*
|
|
@@ -1841,7 +1904,7 @@ class ls extends it {
|
|
|
1841
1904
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
1842
1905
|
}
|
|
1843
1906
|
}
|
|
1844
|
-
class
|
|
1907
|
+
class ps {
|
|
1845
1908
|
/**
|
|
1846
1909
|
* Инициализирует экземпляр класса {@link Image}.
|
|
1847
1910
|
*
|
|
@@ -1864,7 +1927,7 @@ class us {
|
|
|
1864
1927
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
1865
1928
|
}
|
|
1866
1929
|
}
|
|
1867
|
-
class
|
|
1930
|
+
class Rr extends nt {
|
|
1868
1931
|
/**
|
|
1869
1932
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
1870
1933
|
*
|
|
@@ -1879,7 +1942,7 @@ class wr extends it {
|
|
|
1879
1942
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
1880
1943
|
}
|
|
1881
1944
|
}
|
|
1882
|
-
class
|
|
1945
|
+
class q extends us {
|
|
1883
1946
|
/**
|
|
1884
1947
|
* Инициализирует экземпляр класса {@link Product}.
|
|
1885
1948
|
*
|
|
@@ -1956,9 +2019,9 @@ class N extends ls {
|
|
|
1956
2019
|
* Список коэффициентов цен на продукт.
|
|
1957
2020
|
*/
|
|
1958
2021
|
s(this, "priceCoefficients");
|
|
1959
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new
|
|
2022
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Mr(e.unit) : new Mr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new j(e.currency) : new j(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = R(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new ls(p))) ?? [], this.type = "product";
|
|
1960
2023
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1961
|
-
t && (this.category = new
|
|
2024
|
+
t && (this.category = new Rr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Rr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ps(p, O().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 $r(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1962
2025
|
}
|
|
1963
2026
|
/**
|
|
1964
2027
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1979,8 +2042,8 @@ class N extends ls {
|
|
|
1979
2042
|
return this.retailCostRub ?? this.costRub;
|
|
1980
2043
|
}
|
|
1981
2044
|
}
|
|
1982
|
-
var
|
|
1983
|
-
class
|
|
2045
|
+
var kr = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(kr || {});
|
|
2046
|
+
class X extends q {
|
|
1984
2047
|
/**
|
|
1985
2048
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1986
2049
|
*
|
|
@@ -2016,10 +2079,10 @@ class K extends N {
|
|
|
2016
2079
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
2017
2080
|
*/
|
|
2018
2081
|
s(this, "isFavorite");
|
|
2019
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
2082
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? kr.Product, this.discount = e != null && e.discount ? new cs(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new fe(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
2020
2083
|
}
|
|
2021
2084
|
}
|
|
2022
|
-
class
|
|
2085
|
+
class Ae extends Rr {
|
|
2023
2086
|
/**
|
|
2024
2087
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
2025
2088
|
*
|
|
@@ -2043,10 +2106,10 @@ class be extends wr {
|
|
|
2043
2106
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
2044
2107
|
*/
|
|
2045
2108
|
s(this, "currencyRates");
|
|
2046
|
-
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]) => [
|
|
2109
|
+
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]) => [Et(t), i])) : void 0;
|
|
2047
2110
|
}
|
|
2048
2111
|
}
|
|
2049
|
-
class
|
|
2112
|
+
class ot extends G {
|
|
2050
2113
|
/**
|
|
2051
2114
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
2052
2115
|
*
|
|
@@ -2122,10 +2185,10 @@ class nt extends G {
|
|
|
2122
2185
|
* @inheritDoc
|
|
2123
2186
|
*/
|
|
2124
2187
|
s(this, "replacementId");
|
|
2125
|
-
this.product = new
|
|
2188
|
+
this.product = new X(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new Ae(), this.currency = e.currency ? new j(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ut(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new N(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
2126
2189
|
}
|
|
2127
2190
|
}
|
|
2128
|
-
let
|
|
2191
|
+
let Or = class extends ot {
|
|
2129
2192
|
/**
|
|
2130
2193
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
2131
2194
|
*
|
|
@@ -2169,10 +2232,10 @@ let kr = class extends nt {
|
|
|
2169
2232
|
* @inheritDoc
|
|
2170
2233
|
*/
|
|
2171
2234
|
s(this, "currency");
|
|
2172
|
-
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 =
|
|
2235
|
+
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 = W(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new j(e.currency);
|
|
2173
2236
|
}
|
|
2174
2237
|
};
|
|
2175
|
-
class
|
|
2238
|
+
class Oe {
|
|
2176
2239
|
/**
|
|
2177
2240
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
2178
2241
|
*
|
|
@@ -2191,10 +2254,10 @@ class ke {
|
|
|
2191
2254
|
* @inheritDoc
|
|
2192
2255
|
*/
|
|
2193
2256
|
s(this, "directionsSum");
|
|
2194
|
-
this.items = r.items.map((e) => new
|
|
2257
|
+
this.items = r.items.map((e) => new Or(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
2195
2258
|
}
|
|
2196
2259
|
}
|
|
2197
|
-
class
|
|
2260
|
+
class Zs extends h {
|
|
2198
2261
|
/**
|
|
2199
2262
|
* Возвращает содержимое корзины указанного клиента.
|
|
2200
2263
|
*
|
|
@@ -2203,7 +2266,7 @@ class Xs extends h {
|
|
|
2203
2266
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
2204
2267
|
*/
|
|
2205
2268
|
getCart(r) {
|
|
2206
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
2269
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new Oe(e.data));
|
|
2207
2270
|
}
|
|
2208
2271
|
/**
|
|
2209
2272
|
* Удаляет всё содержимое корзины.
|
|
@@ -2241,7 +2304,7 @@ class Xs extends h {
|
|
|
2241
2304
|
is_additional_sale: e.isAdditionalSale,
|
|
2242
2305
|
...e.configuratorParams
|
|
2243
2306
|
},
|
|
2244
|
-
(i) => new
|
|
2307
|
+
(i) => new Oe(i.data),
|
|
2245
2308
|
t
|
|
2246
2309
|
);
|
|
2247
2310
|
}
|
|
@@ -2271,7 +2334,7 @@ class Xs extends h {
|
|
|
2271
2334
|
is_additional_sale: e.isAdditionalSale,
|
|
2272
2335
|
...e.configuratorParams
|
|
2273
2336
|
},
|
|
2274
|
-
(i) => new
|
|
2337
|
+
(i) => new Oe(i.data),
|
|
2275
2338
|
t
|
|
2276
2339
|
);
|
|
2277
2340
|
}
|
|
@@ -2284,7 +2347,7 @@ class Xs extends h {
|
|
|
2284
2347
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_delete_item
|
|
2285
2348
|
*/
|
|
2286
2349
|
deleteCartItem(r, e) {
|
|
2287
|
-
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new
|
|
2350
|
+
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new Oe(t.data));
|
|
2288
2351
|
}
|
|
2289
2352
|
/**
|
|
2290
2353
|
* Добавляет продукты в корзину из файла CSV.
|
|
@@ -2295,7 +2358,7 @@ class Xs extends h {
|
|
|
2295
2358
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
2296
2359
|
*/
|
|
2297
2360
|
addCartItemFromCSV(r, e) {
|
|
2298
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new
|
|
2361
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new Oe(t.data));
|
|
2299
2362
|
}
|
|
2300
2363
|
/**
|
|
2301
2364
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -2308,8 +2371,8 @@ class Xs extends h {
|
|
|
2308
2371
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
2309
2372
|
}
|
|
2310
2373
|
}
|
|
2311
|
-
var
|
|
2312
|
-
class
|
|
2374
|
+
var hs = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(hs || {}), gs = /* @__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))(gs || {}), ct = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(ct || {});
|
|
2375
|
+
class Q extends Ae {
|
|
2313
2376
|
/**
|
|
2314
2377
|
* Инициализирует экземпляр класса {@link Category}.
|
|
2315
2378
|
*
|
|
@@ -2326,10 +2389,10 @@ class E extends be {
|
|
|
2326
2389
|
* Список продуктов категории.
|
|
2327
2390
|
*/
|
|
2328
2391
|
s(this, "products");
|
|
2329
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
2392
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new q(o));
|
|
2330
2393
|
}
|
|
2331
2394
|
}
|
|
2332
|
-
class
|
|
2395
|
+
class lt {
|
|
2333
2396
|
/**
|
|
2334
2397
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
2335
2398
|
*
|
|
@@ -2347,9 +2410,9 @@ class ct {
|
|
|
2347
2410
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
2348
2411
|
}
|
|
2349
2412
|
}
|
|
2350
|
-
class
|
|
2413
|
+
class U extends D {
|
|
2351
2414
|
}
|
|
2352
|
-
class Lr extends
|
|
2415
|
+
class Lr extends L {
|
|
2353
2416
|
/**
|
|
2354
2417
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
2355
2418
|
*
|
|
@@ -2377,12 +2440,12 @@ class Lr extends O {
|
|
|
2377
2440
|
* @inheritDoc
|
|
2378
2441
|
*/
|
|
2379
2442
|
s(this, "isRegionalDirector");
|
|
2380
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
2443
|
+
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 lt(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
2381
2444
|
}
|
|
2382
2445
|
}
|
|
2383
|
-
class
|
|
2446
|
+
class Ir extends D {
|
|
2384
2447
|
}
|
|
2385
|
-
class
|
|
2448
|
+
class ut extends L {
|
|
2386
2449
|
/**
|
|
2387
2450
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
2388
2451
|
*
|
|
@@ -2405,7 +2468,7 @@ class lt extends O {
|
|
|
2405
2468
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
2406
2469
|
}
|
|
2407
2470
|
}
|
|
2408
|
-
class
|
|
2471
|
+
class Ze extends L {
|
|
2409
2472
|
/**
|
|
2410
2473
|
* Инициализирует экземпляр класса {@link UserRegionShortInfo}.
|
|
2411
2474
|
*
|
|
@@ -2420,7 +2483,7 @@ class Ve extends O {
|
|
|
2420
2483
|
this.abbr = (e == null ? void 0 : e.abbr) ?? "";
|
|
2421
2484
|
}
|
|
2422
2485
|
}
|
|
2423
|
-
class
|
|
2486
|
+
class Z extends Lr {
|
|
2424
2487
|
/**
|
|
2425
2488
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
2426
2489
|
*
|
|
@@ -2477,10 +2540,10 @@ class X extends Lr {
|
|
|
2477
2540
|
* Дата и время последнего входа в систему.
|
|
2478
2541
|
*/
|
|
2479
2542
|
s(this, "lastLoginAt");
|
|
2480
|
-
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = R(e == null ? void 0 : e.createdAt) ?
|
|
2543
|
+
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new ut(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((c) => new Ir(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 Ze(c)), this.managers = (o = e == null ? void 0 : e.managers) == null ? void 0 : o.map((c) => new Z(c)), this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt;
|
|
2481
2544
|
}
|
|
2482
2545
|
}
|
|
2483
|
-
class
|
|
2546
|
+
class fs extends Ae {
|
|
2484
2547
|
/**
|
|
2485
2548
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
2486
2549
|
*
|
|
@@ -2508,10 +2571,10 @@ class gs extends be {
|
|
|
2508
2571
|
* Данные о менеджере за которым закреплена категория.
|
|
2509
2572
|
*/
|
|
2510
2573
|
s(this, "manager");
|
|
2511
|
-
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
|
|
2574
|
+
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 Z(e.manager) : void 0;
|
|
2512
2575
|
}
|
|
2513
2576
|
}
|
|
2514
|
-
class
|
|
2577
|
+
class Ke extends fs {
|
|
2515
2578
|
/**
|
|
2516
2579
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
2517
2580
|
*
|
|
@@ -2528,10 +2591,10 @@ class Ee extends gs {
|
|
|
2528
2591
|
* Список продуктов категории.
|
|
2529
2592
|
*/
|
|
2530
2593
|
s(this, "products");
|
|
2531
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
2594
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Ke(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new X(o));
|
|
2532
2595
|
}
|
|
2533
2596
|
}
|
|
2534
|
-
class
|
|
2597
|
+
class pt {
|
|
2535
2598
|
/**
|
|
2536
2599
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
2537
2600
|
*
|
|
@@ -2549,7 +2612,7 @@ class ut {
|
|
|
2549
2612
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
2550
2613
|
}
|
|
2551
2614
|
}
|
|
2552
|
-
class
|
|
2615
|
+
class pr extends pt {
|
|
2553
2616
|
/**
|
|
2554
2617
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2555
2618
|
*
|
|
@@ -2561,10 +2624,10 @@ class cr extends ut {
|
|
|
2561
2624
|
* Базовые данные о продукте.
|
|
2562
2625
|
*/
|
|
2563
2626
|
s(this, "productCategory");
|
|
2564
|
-
this.productCategory = new
|
|
2627
|
+
this.productCategory = new Ae(e == null ? void 0 : e.productCategory);
|
|
2565
2628
|
}
|
|
2566
2629
|
}
|
|
2567
|
-
class
|
|
2630
|
+
class xr extends L {
|
|
2568
2631
|
/**
|
|
2569
2632
|
* Инициализирует экземпляр класса {@link Curator}.
|
|
2570
2633
|
*
|
|
@@ -2584,12 +2647,12 @@ class Ir extends O {
|
|
|
2584
2647
|
* @inheritDoc
|
|
2585
2648
|
*/
|
|
2586
2649
|
s(this, "curatedDirection");
|
|
2587
|
-
this.photo = e.photo, this.contacts = new
|
|
2650
|
+
this.photo = e.photo, this.contacts = new lt(e.contacts), this.curatedDirection = new Ir(e.curatedDirection);
|
|
2588
2651
|
}
|
|
2589
2652
|
}
|
|
2590
|
-
class
|
|
2653
|
+
class we extends D {
|
|
2591
2654
|
}
|
|
2592
|
-
class
|
|
2655
|
+
class ve extends D {
|
|
2593
2656
|
/**
|
|
2594
2657
|
* Инициализирует экземпляр класса {@link Region}.
|
|
2595
2658
|
*
|
|
@@ -2600,11 +2663,11 @@ class we extends C {
|
|
|
2600
2663
|
/**
|
|
2601
2664
|
* Данные о стране, в которой расположен регион.
|
|
2602
2665
|
*/
|
|
2603
|
-
s(this, "country", new
|
|
2604
|
-
e && (this.country = new
|
|
2666
|
+
s(this, "country", new we());
|
|
2667
|
+
e && (this.country = new we(e.country));
|
|
2605
2668
|
}
|
|
2606
2669
|
}
|
|
2607
|
-
class
|
|
2670
|
+
class Re extends D {
|
|
2608
2671
|
/**
|
|
2609
2672
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
2610
2673
|
*
|
|
@@ -2615,11 +2678,11 @@ class ve extends C {
|
|
|
2615
2678
|
/**
|
|
2616
2679
|
* Данные о регионе, в котором расположен город.
|
|
2617
2680
|
*/
|
|
2618
|
-
s(this, "region", new
|
|
2619
|
-
e && (this.region = new
|
|
2681
|
+
s(this, "region", new ve());
|
|
2682
|
+
e && (this.region = new ve(e.region));
|
|
2620
2683
|
}
|
|
2621
2684
|
}
|
|
2622
|
-
class
|
|
2685
|
+
class ht extends L {
|
|
2623
2686
|
/**
|
|
2624
2687
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
2625
2688
|
*
|
|
@@ -2655,10 +2718,10 @@ class pt extends O {
|
|
|
2655
2718
|
* Признак активности учетной записи пользователя.
|
|
2656
2719
|
*/
|
|
2657
2720
|
s(this, "isActive");
|
|
2658
|
-
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
|
|
2721
|
+
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.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2659
2722
|
}
|
|
2660
2723
|
}
|
|
2661
|
-
class
|
|
2724
|
+
class oe extends ht {
|
|
2662
2725
|
/**
|
|
2663
2726
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2664
2727
|
*
|
|
@@ -2704,7 +2767,7 @@ class ne extends pt {
|
|
|
2704
2767
|
* @inheritDoc
|
|
2705
2768
|
*/
|
|
2706
2769
|
s(this, "curators");
|
|
2707
|
-
this.salesDirection = new
|
|
2770
|
+
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 Re(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 Lr(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new xr(o))) ?? void 0;
|
|
2708
2771
|
}
|
|
2709
2772
|
}
|
|
2710
2773
|
class Le extends G {
|
|
@@ -2731,10 +2794,10 @@ class Le extends G {
|
|
|
2731
2794
|
* Данные шаблона прайс-листа.
|
|
2732
2795
|
*/
|
|
2733
2796
|
s(this, "priceTemplate");
|
|
2734
|
-
this.createdAt = R(e == null ? void 0 : e.createdAt) ?
|
|
2797
|
+
this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new oe(e == null ? void 0 : e.client), this.priceTemplate = new fe(e == null ? void 0 : e.priceTemplate);
|
|
2735
2798
|
}
|
|
2736
2799
|
}
|
|
2737
|
-
class
|
|
2800
|
+
class hr extends pt {
|
|
2738
2801
|
/**
|
|
2739
2802
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2740
2803
|
*
|
|
@@ -2746,12 +2809,12 @@ class lr extends ut {
|
|
|
2746
2809
|
* Базовые данные о продукте.
|
|
2747
2810
|
*/
|
|
2748
2811
|
s(this, "product");
|
|
2749
|
-
this.product = new
|
|
2812
|
+
this.product = new q(e == null ? void 0 : e.product);
|
|
2750
2813
|
}
|
|
2751
2814
|
}
|
|
2752
|
-
class
|
|
2815
|
+
class gt extends D {
|
|
2753
2816
|
}
|
|
2754
|
-
class
|
|
2817
|
+
class me extends L {
|
|
2755
2818
|
/**
|
|
2756
2819
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2757
2820
|
*
|
|
@@ -2775,10 +2838,10 @@ class fe extends O {
|
|
|
2775
2838
|
* Признак того, что по свойству может производиться фильтрация в каталоге.
|
|
2776
2839
|
*/
|
|
2777
2840
|
s(this, "isFilterable");
|
|
2778
|
-
this.type = new
|
|
2841
|
+
this.type = new gt(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;
|
|
2779
2842
|
}
|
|
2780
2843
|
}
|
|
2781
|
-
class
|
|
2844
|
+
class he {
|
|
2782
2845
|
/**
|
|
2783
2846
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
2784
2847
|
*
|
|
@@ -2794,10 +2857,10 @@ class pe {
|
|
|
2794
2857
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2795
2858
|
*/
|
|
2796
2859
|
s(this, "value");
|
|
2797
|
-
this.property = new
|
|
2860
|
+
this.property = new me(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2798
2861
|
}
|
|
2799
2862
|
}
|
|
2800
|
-
class
|
|
2863
|
+
class ei {
|
|
2801
2864
|
/**
|
|
2802
2865
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2803
2866
|
*
|
|
@@ -2823,12 +2886,12 @@ class Zs {
|
|
|
2823
2886
|
/**
|
|
2824
2887
|
* Период создания.
|
|
2825
2888
|
*/
|
|
2826
|
-
s(this, "createdAt", new
|
|
2889
|
+
s(this, "createdAt", new b());
|
|
2827
2890
|
/**
|
|
2828
2891
|
* Период изменения.
|
|
2829
2892
|
*/
|
|
2830
|
-
s(this, "updatedAt", new
|
|
2831
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.ownerName = r == null ? void 0 : r.ownerName, this.createdAt = new
|
|
2893
|
+
s(this, "updatedAt", new b());
|
|
2894
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.ownerName = r == null ? void 0 : r.ownerName, this.createdAt = new b(r == null ? void 0 : r.createdAt), this.updatedAt = new b(r == null ? void 0 : r.updatedAt);
|
|
2832
2895
|
}
|
|
2833
2896
|
/**
|
|
2834
2897
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -2862,11 +2925,11 @@ class Zs {
|
|
|
2862
2925
|
return Object.keys(this).forEach((c) => {
|
|
2863
2926
|
const u = this[c];
|
|
2864
2927
|
// eslint-disable-next-line prettier/prettier
|
|
2865
|
-
|
|
2928
|
+
m(u) || R(u) && u.trim().length === 0 || br(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2866
2929
|
}), !((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;
|
|
2867
2930
|
}
|
|
2868
2931
|
}
|
|
2869
|
-
class
|
|
2932
|
+
class Ie extends L {
|
|
2870
2933
|
/**
|
|
2871
2934
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2872
2935
|
*
|
|
@@ -2901,7 +2964,7 @@ class Oe extends O {
|
|
|
2901
2964
|
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;
|
|
2902
2965
|
}
|
|
2903
2966
|
}
|
|
2904
|
-
class
|
|
2967
|
+
class Hr {
|
|
2905
2968
|
/**
|
|
2906
2969
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
2907
2970
|
*
|
|
@@ -2920,10 +2983,10 @@ class Br {
|
|
|
2920
2983
|
* Минимальный коэффициент цены.
|
|
2921
2984
|
*/
|
|
2922
2985
|
s(this, "minCoefficient");
|
|
2923
|
-
this.role = new
|
|
2986
|
+
this.role = new Ie(r == null ? void 0 : r.role), this.category = new Ae(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2924
2987
|
}
|
|
2925
2988
|
}
|
|
2926
|
-
class
|
|
2989
|
+
class ms {
|
|
2927
2990
|
/**
|
|
2928
2991
|
* Инициализирует экземпляр класса {@link FilterSettings}.
|
|
2929
2992
|
*
|
|
@@ -2956,7 +3019,7 @@ class fs {
|
|
|
2956
3019
|
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;
|
|
2957
3020
|
}
|
|
2958
3021
|
}
|
|
2959
|
-
class
|
|
3022
|
+
class Br {
|
|
2960
3023
|
/**
|
|
2961
3024
|
* Инициализирует экземпляр класса {@link CategoryFilterSetting}.
|
|
2962
3025
|
*
|
|
@@ -2975,10 +3038,10 @@ class Wr {
|
|
|
2975
3038
|
* @inheritDoc
|
|
2976
3039
|
*/
|
|
2977
3040
|
s(this, "settings");
|
|
2978
|
-
this.category = new
|
|
3041
|
+
this.category = new Ae(r == null ? void 0 : r.category), this.property = new me(r == null ? void 0 : r.property), this.settings = new ms(r == null ? void 0 : r.settings);
|
|
2979
3042
|
}
|
|
2980
3043
|
}
|
|
2981
|
-
class
|
|
3044
|
+
class ys {
|
|
2982
3045
|
/**
|
|
2983
3046
|
* Инициализирует экземпляр класса {@link CategoryFilterValue}.
|
|
2984
3047
|
*
|
|
@@ -2996,7 +3059,7 @@ class ms {
|
|
|
2996
3059
|
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "";
|
|
2997
3060
|
}
|
|
2998
3061
|
}
|
|
2999
|
-
class
|
|
3062
|
+
class as {
|
|
3000
3063
|
/**
|
|
3001
3064
|
* Инициализирует экземпляр класса {@link CategoryFilter}.
|
|
3002
3065
|
*
|
|
@@ -3039,10 +3102,10 @@ class ys {
|
|
|
3039
3102
|
*/
|
|
3040
3103
|
s(this, "max");
|
|
3041
3104
|
var e;
|
|
3042
|
-
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ??
|
|
3105
|
+
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ?? ct.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 ys(t))) ?? [], this.min = (r == null ? void 0 : r.min) ?? null, this.max = (r == null ? void 0 : r.max) ?? null;
|
|
3043
3106
|
}
|
|
3044
3107
|
}
|
|
3045
|
-
class
|
|
3108
|
+
class ri extends h {
|
|
3046
3109
|
/**
|
|
3047
3110
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
3048
3111
|
*
|
|
@@ -3069,11 +3132,11 @@ class ei extends h {
|
|
|
3069
3132
|
*/
|
|
3070
3133
|
// eslint-disable-next-line class-methods-use-this
|
|
3071
3134
|
getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
|
|
3072
|
-
let c = `${
|
|
3135
|
+
let c = `${O().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
3073
3136
|
return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
|
|
3074
3137
|
}
|
|
3075
3138
|
}
|
|
3076
|
-
class
|
|
3139
|
+
class ti extends h {
|
|
3077
3140
|
/**
|
|
3078
3141
|
* Импортирует цены клиента из CSV файла.
|
|
3079
3142
|
*
|
|
@@ -3197,7 +3260,7 @@ class ri extends h {
|
|
|
3197
3260
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3198
3261
|
increase_percent: t.value
|
|
3199
3262
|
},
|
|
3200
|
-
(o) => new
|
|
3263
|
+
(o) => new X(o.data)
|
|
3201
3264
|
);
|
|
3202
3265
|
}
|
|
3203
3266
|
/**
|
|
@@ -3209,7 +3272,7 @@ class ri extends h {
|
|
|
3209
3272
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
3210
3273
|
*/
|
|
3211
3274
|
removeProductPrice(r, e) {
|
|
3212
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new
|
|
3275
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new X(t.data));
|
|
3213
3276
|
}
|
|
3214
3277
|
/**
|
|
3215
3278
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -3272,7 +3335,7 @@ class ri extends h {
|
|
|
3272
3335
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
3273
3336
|
}
|
|
3274
3337
|
}
|
|
3275
|
-
class
|
|
3338
|
+
class si extends h {
|
|
3276
3339
|
/**
|
|
3277
3340
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
3278
3341
|
*
|
|
@@ -3303,7 +3366,7 @@ class ti extends h {
|
|
|
3303
3366
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
3304
3367
|
*/
|
|
3305
3368
|
attachTemplate(r, e, t) {
|
|
3306
|
-
const i =
|
|
3369
|
+
const i = O().config.dateFormats.api;
|
|
3307
3370
|
return this.post(
|
|
3308
3371
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
3309
3372
|
t && {
|
|
@@ -3337,7 +3400,7 @@ class ti extends h {
|
|
|
3337
3400
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
3338
3401
|
*/
|
|
3339
3402
|
changeTemplate(r, e, t, i) {
|
|
3340
|
-
const o =
|
|
3403
|
+
const o = O().config.dateFormats.api;
|
|
3341
3404
|
return this.patch(
|
|
3342
3405
|
`/internal/clients/${r}/price/templates/${e}/${t}`,
|
|
3343
3406
|
i && {
|
|
@@ -3360,7 +3423,7 @@ class ti extends h {
|
|
|
3360
3423
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
3361
3424
|
}
|
|
3362
3425
|
}
|
|
3363
|
-
class
|
|
3426
|
+
class ii extends h {
|
|
3364
3427
|
/**
|
|
3365
3428
|
* Возвращает список данных о корневых категориях.
|
|
3366
3429
|
*
|
|
@@ -3369,7 +3432,7 @@ class si extends h {
|
|
|
3369
3432
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
3370
3433
|
*/
|
|
3371
3434
|
getRootCategoriesList(r = !1) {
|
|
3372
|
-
return this.getTypedList(
|
|
3435
|
+
return this.getTypedList(Q, "/internal/catalog/categories", {
|
|
3373
3436
|
showHidden: r
|
|
3374
3437
|
});
|
|
3375
3438
|
}
|
|
@@ -3389,7 +3452,7 @@ class si extends h {
|
|
|
3389
3452
|
showHidden: e,
|
|
3390
3453
|
withNestedCategories: t
|
|
3391
3454
|
},
|
|
3392
|
-
(i) => new
|
|
3455
|
+
(i) => new Q(i.data)
|
|
3393
3456
|
);
|
|
3394
3457
|
}
|
|
3395
3458
|
/**
|
|
@@ -3398,7 +3461,7 @@ class si extends h {
|
|
|
3398
3461
|
* @param categoryID Идентификатор категории продуктов.
|
|
3399
3462
|
*/
|
|
3400
3463
|
getPublicCategoryData(r) {
|
|
3401
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
3464
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new Q(e.data));
|
|
3402
3465
|
}
|
|
3403
3466
|
/**
|
|
3404
3467
|
* Возвращает список продуктов категории.
|
|
@@ -3416,7 +3479,7 @@ class si extends h {
|
|
|
3416
3479
|
showHidden: t,
|
|
3417
3480
|
withPriceCoefficients: e
|
|
3418
3481
|
},
|
|
3419
|
-
(i) => De(i.data, (o) => new
|
|
3482
|
+
(i) => De(i.data, (o) => new q(o))
|
|
3420
3483
|
);
|
|
3421
3484
|
}
|
|
3422
3485
|
/**
|
|
@@ -3429,7 +3492,7 @@ class si extends h {
|
|
|
3429
3492
|
getCategoryProductsCoefficients(r) {
|
|
3430
3493
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
3431
3494
|
const { data: t } = e;
|
|
3432
|
-
return
|
|
3495
|
+
return Ft(t, (i) => i.map((o) => new $r(o))), t;
|
|
3433
3496
|
});
|
|
3434
3497
|
}
|
|
3435
3498
|
/**
|
|
@@ -3441,14 +3504,14 @@ class si extends h {
|
|
|
3441
3504
|
publicSimpleSearch(r, e = 10) {
|
|
3442
3505
|
return new Promise((t, i) => {
|
|
3443
3506
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
3444
|
-
t(o.categories.map((c) => new
|
|
3507
|
+
t(o.categories.map((c) => new Q(c)));
|
|
3445
3508
|
}).catch((o) => {
|
|
3446
3509
|
i(o);
|
|
3447
3510
|
});
|
|
3448
3511
|
});
|
|
3449
3512
|
}
|
|
3450
3513
|
}
|
|
3451
|
-
class
|
|
3514
|
+
class ni extends Y {
|
|
3452
3515
|
/**
|
|
3453
3516
|
* Возвращает данные об указанном продукте.
|
|
3454
3517
|
*
|
|
@@ -3458,7 +3521,7 @@ class ii extends Y {
|
|
|
3458
3521
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
3459
3522
|
*/
|
|
3460
3523
|
getProductData(r, e = !1) {
|
|
3461
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new
|
|
3524
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new q(t.data));
|
|
3462
3525
|
}
|
|
3463
3526
|
/**
|
|
3464
3527
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -3466,7 +3529,7 @@ class ii extends Y {
|
|
|
3466
3529
|
* @param productId Идентификатор продукта.
|
|
3467
3530
|
*/
|
|
3468
3531
|
getPublicProductData(r) {
|
|
3469
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
3532
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new q(e.data));
|
|
3470
3533
|
}
|
|
3471
3534
|
/**
|
|
3472
3535
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -3479,7 +3542,7 @@ class ii extends Y {
|
|
|
3479
3542
|
return this.get(
|
|
3480
3543
|
`/internal/catalog/products/${r}/coefficients`,
|
|
3481
3544
|
{},
|
|
3482
|
-
(e) => De(e.data, (t) => new
|
|
3545
|
+
(e) => De(e.data, (t) => new $r(t))
|
|
3483
3546
|
);
|
|
3484
3547
|
}
|
|
3485
3548
|
/**
|
|
@@ -3492,8 +3555,8 @@ class ii extends Y {
|
|
|
3492
3555
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
|
|
3493
3556
|
*/
|
|
3494
3557
|
getNewProducts(r, e, t = !0) {
|
|
3495
|
-
const i =
|
|
3496
|
-
return this.getTypedPaginated(
|
|
3558
|
+
const i = O().config.dateFormats.api;
|
|
3559
|
+
return this.getTypedPaginated(q, "/internal/catalog/products/new", void 0, void 0, e, {
|
|
3497
3560
|
period: { from: k(r, i) },
|
|
3498
3561
|
withPriceCoefficients: t
|
|
3499
3562
|
});
|
|
@@ -3507,14 +3570,14 @@ class ii extends Y {
|
|
|
3507
3570
|
publicSimpleSearch(r, e = 10) {
|
|
3508
3571
|
return new Promise((t, i) => {
|
|
3509
3572
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
3510
|
-
t(o.products.map((c) => new
|
|
3573
|
+
t(o.products.map((c) => new q(c)));
|
|
3511
3574
|
}).catch((o) => {
|
|
3512
3575
|
i(o);
|
|
3513
3576
|
});
|
|
3514
3577
|
});
|
|
3515
3578
|
}
|
|
3516
3579
|
}
|
|
3517
|
-
class
|
|
3580
|
+
class oi extends h {
|
|
3518
3581
|
/**
|
|
3519
3582
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
3520
3583
|
*
|
|
@@ -3524,7 +3587,7 @@ class ni extends h {
|
|
|
3524
3587
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
3525
3588
|
*/
|
|
3526
3589
|
getRootCategoriesList(r, e = !1) {
|
|
3527
|
-
return this.getTypedList(
|
|
3590
|
+
return this.getTypedList(Ke, "/internal/catalog/categories", {
|
|
3528
3591
|
clientId: r,
|
|
3529
3592
|
showHidden: e
|
|
3530
3593
|
});
|
|
@@ -3547,7 +3610,7 @@ class ni extends h {
|
|
|
3547
3610
|
showHidden: t,
|
|
3548
3611
|
withNestedCategories: i
|
|
3549
3612
|
},
|
|
3550
|
-
(o) => new
|
|
3613
|
+
(o) => new Ke(o.data)
|
|
3551
3614
|
);
|
|
3552
3615
|
}
|
|
3553
3616
|
/**
|
|
@@ -3568,11 +3631,11 @@ class ni extends h {
|
|
|
3568
3631
|
showHidden: i,
|
|
3569
3632
|
withPriceCoefficients: t
|
|
3570
3633
|
},
|
|
3571
|
-
(o) => De(o.data, (c) => new
|
|
3634
|
+
(o) => De(o.data, (c) => new X(c))
|
|
3572
3635
|
);
|
|
3573
3636
|
}
|
|
3574
3637
|
}
|
|
3575
|
-
class
|
|
3638
|
+
class ci extends Y {
|
|
3576
3639
|
/**
|
|
3577
3640
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
3578
3641
|
*
|
|
@@ -3589,7 +3652,7 @@ class oi extends Y {
|
|
|
3589
3652
|
clientId: e,
|
|
3590
3653
|
withPriceCoefficients: t
|
|
3591
3654
|
},
|
|
3592
|
-
(i) => new
|
|
3655
|
+
(i) => new X(i.data)
|
|
3593
3656
|
);
|
|
3594
3657
|
}
|
|
3595
3658
|
/**
|
|
@@ -3603,15 +3666,15 @@ class oi extends Y {
|
|
|
3603
3666
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
|
|
3604
3667
|
*/
|
|
3605
3668
|
getNewProducts(r, e, t, i = !0) {
|
|
3606
|
-
const o =
|
|
3607
|
-
return this.getTypedPaginated(
|
|
3669
|
+
const o = O().config.dateFormats.api;
|
|
3670
|
+
return this.getTypedPaginated(X, "/internal/catalog/products/new", void 0, void 0, t, {
|
|
3608
3671
|
clientId: r,
|
|
3609
3672
|
period: { from: k(e, o) },
|
|
3610
3673
|
withPriceCoefficients: i
|
|
3611
3674
|
});
|
|
3612
3675
|
}
|
|
3613
3676
|
}
|
|
3614
|
-
class
|
|
3677
|
+
class li extends Y {
|
|
3615
3678
|
/**
|
|
3616
3679
|
* Возвращает список шаблонов прайс-листа.
|
|
3617
3680
|
*
|
|
@@ -3622,7 +3685,7 @@ class ci extends Y {
|
|
|
3622
3685
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
|
|
3623
3686
|
*/
|
|
3624
3687
|
getTemplateList(r, e, t) {
|
|
3625
|
-
return this.getTypedPaginated(
|
|
3688
|
+
return this.getTypedPaginated(fe, "/internal/price/templates", r, e, t);
|
|
3626
3689
|
}
|
|
3627
3690
|
/**
|
|
3628
3691
|
* Создание нового шаблона прайс-листа.
|
|
@@ -3634,7 +3697,7 @@ class ci extends Y {
|
|
|
3634
3697
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
3635
3698
|
*/
|
|
3636
3699
|
createTemplate(r, e = {}) {
|
|
3637
|
-
return this.post("/internal/price/templates", r, (t) => new
|
|
3700
|
+
return this.post("/internal/price/templates", r, (t) => new fe(t.data), e);
|
|
3638
3701
|
}
|
|
3639
3702
|
/**
|
|
3640
3703
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -3644,7 +3707,7 @@ class ci extends Y {
|
|
|
3644
3707
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
3645
3708
|
*/
|
|
3646
3709
|
getTemplate(r) {
|
|
3647
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
3710
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new fe(e.data));
|
|
3648
3711
|
}
|
|
3649
3712
|
/**
|
|
3650
3713
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -3657,7 +3720,7 @@ class ci extends Y {
|
|
|
3657
3720
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
3658
3721
|
*/
|
|
3659
3722
|
updateTemplate(r, e, t = {}) {
|
|
3660
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
3723
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new fe(i.data), t);
|
|
3661
3724
|
}
|
|
3662
3725
|
/**
|
|
3663
3726
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -3677,7 +3740,7 @@ class ci extends Y {
|
|
|
3677
3740
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get_list
|
|
3678
3741
|
*/
|
|
3679
3742
|
getProductTemplatePrices(r) {
|
|
3680
|
-
return this.getTypedList(
|
|
3743
|
+
return this.getTypedList(hr, `/internal/price/templates/${r}/products`);
|
|
3681
3744
|
}
|
|
3682
3745
|
/**
|
|
3683
3746
|
* Возвращает данные о цене на продукт в шаблоне прайс-листа.
|
|
@@ -3688,7 +3751,7 @@ class ci extends Y {
|
|
|
3688
3751
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
3689
3752
|
*/
|
|
3690
3753
|
getProductTemplatePrice(r, e) {
|
|
3691
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new
|
|
3754
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new hr(t.data));
|
|
3692
3755
|
}
|
|
3693
3756
|
/**
|
|
3694
3757
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -3707,7 +3770,7 @@ class ci extends Y {
|
|
|
3707
3770
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3708
3771
|
increase_percent: t.value
|
|
3709
3772
|
},
|
|
3710
|
-
(o) => new
|
|
3773
|
+
(o) => new hr(o.data)
|
|
3711
3774
|
);
|
|
3712
3775
|
}
|
|
3713
3776
|
/**
|
|
@@ -3729,7 +3792,7 @@ class ci extends Y {
|
|
|
3729
3792
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_get_list
|
|
3730
3793
|
*/
|
|
3731
3794
|
getCategoryTemplatePrices(r) {
|
|
3732
|
-
return this.getTypedList(
|
|
3795
|
+
return this.getTypedList(pr, `/internal/price/templates/${r}/categories`);
|
|
3733
3796
|
}
|
|
3734
3797
|
/**
|
|
3735
3798
|
* Возвращает данные о цене на категорию продуктов в шаблоне прайс-листа.
|
|
@@ -3743,7 +3806,7 @@ class ci extends Y {
|
|
|
3743
3806
|
return this.get(
|
|
3744
3807
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3745
3808
|
{},
|
|
3746
|
-
(t) => new
|
|
3809
|
+
(t) => new pr(t.data)
|
|
3747
3810
|
);
|
|
3748
3811
|
}
|
|
3749
3812
|
/**
|
|
@@ -3769,7 +3832,7 @@ class ci extends Y {
|
|
|
3769
3832
|
},
|
|
3770
3833
|
params: i ? { recursively: !0 } : {}
|
|
3771
3834
|
},
|
|
3772
|
-
(c) => new
|
|
3835
|
+
(c) => new pr(c.data)
|
|
3773
3836
|
);
|
|
3774
3837
|
}
|
|
3775
3838
|
/**
|
|
@@ -3800,14 +3863,14 @@ class ci extends Y {
|
|
|
3800
3863
|
return this.getTypedList(Le, `/internal/price/templates/${r}/clients`);
|
|
3801
3864
|
}
|
|
3802
3865
|
}
|
|
3803
|
-
class
|
|
3866
|
+
class ui extends h {
|
|
3804
3867
|
/**
|
|
3805
3868
|
* Возвращает список ролей ценообразования.
|
|
3806
3869
|
*
|
|
3807
3870
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3808
3871
|
*/
|
|
3809
3872
|
getRoles() {
|
|
3810
|
-
return this.getTypedList(
|
|
3873
|
+
return this.getTypedList(Ie, "/internal/price/roles");
|
|
3811
3874
|
}
|
|
3812
3875
|
/**
|
|
3813
3876
|
* Добавляет новую роль ценообразования.
|
|
@@ -3817,7 +3880,7 @@ class li extends h {
|
|
|
3817
3880
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3818
3881
|
*/
|
|
3819
3882
|
createRole(r) {
|
|
3820
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3883
|
+
return this.post("/internal/price/roles", r, (e) => new Ie(e.data));
|
|
3821
3884
|
}
|
|
3822
3885
|
/**
|
|
3823
3886
|
* Возвращает данные роли ценообразования.
|
|
@@ -3827,7 +3890,7 @@ class li extends h {
|
|
|
3827
3890
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3828
3891
|
*/
|
|
3829
3892
|
getRole(r) {
|
|
3830
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3893
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new Ie(e.data));
|
|
3831
3894
|
}
|
|
3832
3895
|
/**
|
|
3833
3896
|
* Обновляет данные роли ценообразования.
|
|
@@ -3838,7 +3901,7 @@ class li extends h {
|
|
|
3838
3901
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3839
3902
|
*/
|
|
3840
3903
|
updateRole(r, e) {
|
|
3841
|
-
return this.patch(`/internal/price/roles/${r}`, e, (t) => new
|
|
3904
|
+
return this.patch(`/internal/price/roles/${r}`, e, (t) => new Ie(t.data));
|
|
3842
3905
|
}
|
|
3843
3906
|
/**
|
|
3844
3907
|
* Удаляет роль ценообразования.
|
|
@@ -3858,7 +3921,7 @@ class li extends h {
|
|
|
3858
3921
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_category_rules_get
|
|
3859
3922
|
*/
|
|
3860
3923
|
getCategoryRules(r) {
|
|
3861
|
-
return this.getTypedList(
|
|
3924
|
+
return this.getTypedList(Hr, `/internal/price/roles/rules/categories/${r}`);
|
|
3862
3925
|
}
|
|
3863
3926
|
/**
|
|
3864
3927
|
* Обновляет правила для роли ценообразования по указанной категории.
|
|
@@ -3872,11 +3935,11 @@ class li extends h {
|
|
|
3872
3935
|
return this.patch(
|
|
3873
3936
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3874
3937
|
e,
|
|
3875
|
-
(t) => _.instanceListInitializer(
|
|
3938
|
+
(t) => _.instanceListInitializer(Hr, t.data)
|
|
3876
3939
|
);
|
|
3877
3940
|
}
|
|
3878
3941
|
}
|
|
3879
|
-
class
|
|
3942
|
+
class pi extends Y {
|
|
3880
3943
|
/**
|
|
3881
3944
|
* Возвращает пагинированный список свойств.
|
|
3882
3945
|
*
|
|
@@ -3887,7 +3950,7 @@ class ui extends Y {
|
|
|
3887
3950
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
|
|
3888
3951
|
*/
|
|
3889
3952
|
getProperties(r, e, t) {
|
|
3890
|
-
return this.getTypedPaginated(
|
|
3953
|
+
return this.getTypedPaginated(me, "/internal/catalog/properties", r, e, t);
|
|
3891
3954
|
}
|
|
3892
3955
|
/**
|
|
3893
3956
|
* Создает новое свойство.
|
|
@@ -3903,7 +3966,7 @@ class ui extends Y {
|
|
|
3903
3966
|
...t,
|
|
3904
3967
|
type: e
|
|
3905
3968
|
},
|
|
3906
|
-
(i) => new
|
|
3969
|
+
(i) => new me(i.data)
|
|
3907
3970
|
);
|
|
3908
3971
|
}
|
|
3909
3972
|
/**
|
|
@@ -3913,7 +3976,7 @@ class ui extends Y {
|
|
|
3913
3976
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3914
3977
|
*/
|
|
3915
3978
|
getProperty(r) {
|
|
3916
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3979
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new me(e.data));
|
|
3917
3980
|
}
|
|
3918
3981
|
/**
|
|
3919
3982
|
* Обновляет существующее свойство.
|
|
@@ -3930,7 +3993,7 @@ class ui extends Y {
|
|
|
3930
3993
|
...i,
|
|
3931
3994
|
type: t
|
|
3932
3995
|
},
|
|
3933
|
-
(o) => new
|
|
3996
|
+
(o) => new me(o.data)
|
|
3934
3997
|
);
|
|
3935
3998
|
}
|
|
3936
3999
|
/**
|
|
@@ -3949,7 +4012,7 @@ class ui extends Y {
|
|
|
3949
4012
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3950
4013
|
*/
|
|
3951
4014
|
getProductProperties(r) {
|
|
3952
|
-
return this.getTypedList(
|
|
4015
|
+
return this.getTypedList(he, `/internal/catalog/products/${r}/properties`);
|
|
3953
4016
|
}
|
|
3954
4017
|
/**
|
|
3955
4018
|
* Возвращает значение свойства продукта.
|
|
@@ -3959,7 +4022,7 @@ class ui extends Y {
|
|
|
3959
4022
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3960
4023
|
*/
|
|
3961
4024
|
getProductProperty(r, e) {
|
|
3962
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new
|
|
4025
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new he(t.data));
|
|
3963
4026
|
}
|
|
3964
4027
|
/**
|
|
3965
4028
|
* Обновляет значение свойства продукта.
|
|
@@ -3970,7 +4033,7 @@ class ui extends Y {
|
|
|
3970
4033
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3971
4034
|
*/
|
|
3972
4035
|
updateProductProperty(r, e, t) {
|
|
3973
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new
|
|
4036
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new he(i.data));
|
|
3974
4037
|
}
|
|
3975
4038
|
/**
|
|
3976
4039
|
* Удаляет значение свойства продукта.
|
|
@@ -4095,7 +4158,7 @@ class ui extends Y {
|
|
|
4095
4158
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
4096
4159
|
*/
|
|
4097
4160
|
getCategoryProperties(r) {
|
|
4098
|
-
return this.getTypedList(
|
|
4161
|
+
return this.getTypedList(he, `/internal/catalog/categories/${r}/properties`);
|
|
4099
4162
|
}
|
|
4100
4163
|
/**
|
|
4101
4164
|
* Возвращает значение свойства категории.
|
|
@@ -4105,7 +4168,7 @@ class ui extends Y {
|
|
|
4105
4168
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
4106
4169
|
*/
|
|
4107
4170
|
getCategoryProperty(r, e) {
|
|
4108
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new
|
|
4171
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new he(t.data));
|
|
4109
4172
|
}
|
|
4110
4173
|
/**
|
|
4111
4174
|
* Обновляет значение свойства категории.
|
|
@@ -4116,7 +4179,7 @@ class ui extends Y {
|
|
|
4116
4179
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
4117
4180
|
*/
|
|
4118
4181
|
updateCategoryProperty(r, e, t) {
|
|
4119
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new
|
|
4182
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new he(i.data));
|
|
4120
4183
|
}
|
|
4121
4184
|
/**
|
|
4122
4185
|
* Удаляет значение свойства категории.
|
|
@@ -4255,7 +4318,7 @@ class ui extends Y {
|
|
|
4255
4318
|
return this.get(
|
|
4256
4319
|
`/internal/catalog/categories/${r}/filters`,
|
|
4257
4320
|
{ recursively: e },
|
|
4258
|
-
(t) => t.data.map((i) => new
|
|
4321
|
+
(t) => t.data.map((i) => new as(i))
|
|
4259
4322
|
);
|
|
4260
4323
|
}
|
|
4261
4324
|
/**
|
|
@@ -4265,7 +4328,7 @@ class ui extends Y {
|
|
|
4265
4328
|
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_get_list
|
|
4266
4329
|
*/
|
|
4267
4330
|
getCategoryFilterSettings(r) {
|
|
4268
|
-
return this.getTypedList(
|
|
4331
|
+
return this.getTypedList(Br, `/internal/catalog/categories/${r}/filter-settings`);
|
|
4269
4332
|
}
|
|
4270
4333
|
/**
|
|
4271
4334
|
* Сохраняет настройки фильтра в категории.
|
|
@@ -4279,7 +4342,7 @@ class ui extends Y {
|
|
|
4279
4342
|
return this.patch(
|
|
4280
4343
|
`/internal/catalog/categories/${r}/filter-settings/${e}`,
|
|
4281
4344
|
t,
|
|
4282
|
-
(i) => new
|
|
4345
|
+
(i) => new Br(i.data)
|
|
4283
4346
|
);
|
|
4284
4347
|
}
|
|
4285
4348
|
/**
|
|
@@ -4293,7 +4356,7 @@ class ui extends Y {
|
|
|
4293
4356
|
return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
|
|
4294
4357
|
}
|
|
4295
4358
|
}
|
|
4296
|
-
class
|
|
4359
|
+
class hi extends h {
|
|
4297
4360
|
/**
|
|
4298
4361
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
4299
4362
|
*
|
|
@@ -4303,7 +4366,7 @@ class pi extends h {
|
|
|
4303
4366
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
4304
4367
|
*/
|
|
4305
4368
|
getRootCategoriesList(r, e = !1) {
|
|
4306
|
-
return this.getTypedList(
|
|
4369
|
+
return this.getTypedList(Q, "/internal/catalog/categories", {
|
|
4307
4370
|
priceTemplateId: r,
|
|
4308
4371
|
showHidden: e
|
|
4309
4372
|
});
|
|
@@ -4326,7 +4389,7 @@ class pi extends h {
|
|
|
4326
4389
|
showHidden: t,
|
|
4327
4390
|
withNestedCategories: i
|
|
4328
4391
|
},
|
|
4329
|
-
(o) => new
|
|
4392
|
+
(o) => new Q(o.data)
|
|
4330
4393
|
);
|
|
4331
4394
|
}
|
|
4332
4395
|
/**
|
|
@@ -4347,7 +4410,7 @@ class pi extends h {
|
|
|
4347
4410
|
showHidden: i,
|
|
4348
4411
|
withPriceCoefficients: t
|
|
4349
4412
|
},
|
|
4350
|
-
(o) => De(o.data, (c) => new
|
|
4413
|
+
(o) => De(o.data, (c) => new q(c))
|
|
4351
4414
|
);
|
|
4352
4415
|
}
|
|
4353
4416
|
}
|
|
@@ -4372,17 +4435,17 @@ function zr(n, r, e) {
|
|
|
4372
4435
|
return !1;
|
|
4373
4436
|
}), t;
|
|
4374
4437
|
}
|
|
4375
|
-
function
|
|
4438
|
+
function Wr(n) {
|
|
4376
4439
|
const r = [];
|
|
4377
4440
|
return n.forEach((e) => {
|
|
4378
4441
|
if (r.push(e), e.type === "category") {
|
|
4379
4442
|
const t = e;
|
|
4380
|
-
t.products && t.products.length > 0 && r.push(...
|
|
4443
|
+
t.products && t.products.length > 0 && r.push(...Wr(t.products)), t.categories && t.categories.length > 0 && r.push(...Wr(t.categories));
|
|
4381
4444
|
}
|
|
4382
4445
|
}), r;
|
|
4383
4446
|
}
|
|
4384
|
-
var
|
|
4385
|
-
class
|
|
4447
|
+
var ws = /* @__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))(ws || {}), V = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(V || {});
|
|
4448
|
+
class Cr extends G {
|
|
4386
4449
|
/**
|
|
4387
4450
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
4388
4451
|
*
|
|
@@ -4413,7 +4476,7 @@ class vr extends G {
|
|
|
4413
4476
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new j(e.currency));
|
|
4414
4477
|
}
|
|
4415
4478
|
}
|
|
4416
|
-
class
|
|
4479
|
+
class Dr extends L {
|
|
4417
4480
|
/**
|
|
4418
4481
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
4419
4482
|
*
|
|
@@ -4432,7 +4495,7 @@ class Cr extends O {
|
|
|
4432
4495
|
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;
|
|
4433
4496
|
}
|
|
4434
4497
|
}
|
|
4435
|
-
class
|
|
4498
|
+
class se extends Dr {
|
|
4436
4499
|
/**
|
|
4437
4500
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
4438
4501
|
*
|
|
@@ -4464,25 +4527,25 @@ class te extends Cr {
|
|
|
4464
4527
|
* Дата и время последнего удаления.
|
|
4465
4528
|
*/
|
|
4466
4529
|
s(this, "deletedAt");
|
|
4467
|
-
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = R(e == null ? void 0 : e.deletedAt) ?
|
|
4530
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
4468
4531
|
}
|
|
4469
4532
|
}
|
|
4470
|
-
class
|
|
4533
|
+
class ie extends D {
|
|
4471
4534
|
/**
|
|
4472
4535
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
4473
4536
|
*/
|
|
4474
4537
|
static generatePersonItem() {
|
|
4475
|
-
return new
|
|
4538
|
+
return new ie({
|
|
4476
4539
|
id: 1,
|
|
4477
4540
|
guid: "",
|
|
4478
|
-
slug:
|
|
4541
|
+
slug: V.Person,
|
|
4479
4542
|
name: ""
|
|
4480
4543
|
});
|
|
4481
4544
|
}
|
|
4482
4545
|
}
|
|
4483
|
-
class Ce extends
|
|
4546
|
+
class Ce extends D {
|
|
4484
4547
|
}
|
|
4485
|
-
class
|
|
4548
|
+
class ft extends tt {
|
|
4486
4549
|
/**
|
|
4487
4550
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
4488
4551
|
*
|
|
@@ -4494,10 +4557,10 @@ class gt extends rt {
|
|
|
4494
4557
|
* Дата и время последнего удаления.
|
|
4495
4558
|
*/
|
|
4496
4559
|
s(this, "deletedAt");
|
|
4497
|
-
this.deletedAt = R(e == null ? void 0 : e.deletedAt) ?
|
|
4560
|
+
this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
4498
4561
|
}
|
|
4499
4562
|
}
|
|
4500
|
-
class
|
|
4563
|
+
class mt extends ft {
|
|
4501
4564
|
/**
|
|
4502
4565
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
4503
4566
|
*
|
|
@@ -4509,7 +4572,7 @@ class ft extends gt {
|
|
|
4509
4572
|
/**
|
|
4510
4573
|
* Данные об организационно-правовой форме.
|
|
4511
4574
|
*/
|
|
4512
|
-
s(this, "opf",
|
|
4575
|
+
s(this, "opf", ie.generatePersonItem());
|
|
4513
4576
|
/**
|
|
4514
4577
|
* Группа партнеров (направление деятельности).
|
|
4515
4578
|
*/
|
|
@@ -4543,22 +4606,22 @@ class ft extends gt {
|
|
|
4543
4606
|
*/
|
|
4544
4607
|
s(this, "updater");
|
|
4545
4608
|
if (e) {
|
|
4546
|
-
if (this.opf = new
|
|
4609
|
+
if (this.opf = new ie(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new N(e.creator) : void 0, this.updater = e.updater ? new N(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Ce(e.partnerGroup)), e.contacts) {
|
|
4547
4610
|
const t = [];
|
|
4548
4611
|
e.contacts.forEach((i) => {
|
|
4549
|
-
t.push(new
|
|
4612
|
+
t.push(new se(i));
|
|
4550
4613
|
}), this.contacts = t;
|
|
4551
4614
|
}
|
|
4552
4615
|
if (e.bankAccounts) {
|
|
4553
4616
|
const t = [];
|
|
4554
4617
|
e.bankAccounts.forEach((i) => {
|
|
4555
|
-
t.push(new
|
|
4618
|
+
t.push(new Cr(i));
|
|
4556
4619
|
}), this.bankAccounts = t;
|
|
4557
4620
|
}
|
|
4558
4621
|
}
|
|
4559
4622
|
}
|
|
4560
4623
|
}
|
|
4561
|
-
class
|
|
4624
|
+
class vs extends mt {
|
|
4562
4625
|
/**
|
|
4563
4626
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
4564
4627
|
*
|
|
@@ -4568,7 +4631,7 @@ class ws extends ft {
|
|
|
4568
4631
|
super(r);
|
|
4569
4632
|
}
|
|
4570
4633
|
}
|
|
4571
|
-
class
|
|
4634
|
+
class yt extends mt {
|
|
4572
4635
|
/**
|
|
4573
4636
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
4574
4637
|
*
|
|
@@ -4611,7 +4674,7 @@ class mt extends ft {
|
|
|
4611
4674
|
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 ?? "");
|
|
4612
4675
|
}
|
|
4613
4676
|
}
|
|
4614
|
-
class
|
|
4677
|
+
class at extends yt {
|
|
4615
4678
|
/**
|
|
4616
4679
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
4617
4680
|
*
|
|
@@ -4626,7 +4689,7 @@ class yt extends mt {
|
|
|
4626
4689
|
e && (this.kpp = e.kpp ?? "");
|
|
4627
4690
|
}
|
|
4628
4691
|
}
|
|
4629
|
-
class
|
|
4692
|
+
class Rs extends at {
|
|
4630
4693
|
/**
|
|
4631
4694
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
4632
4695
|
*
|
|
@@ -4637,7 +4700,7 @@ class vs extends yt {
|
|
|
4637
4700
|
/**
|
|
4638
4701
|
* Страна регистрации юридического лица нерезидента.
|
|
4639
4702
|
*/
|
|
4640
|
-
s(this, "registrationCountry", new
|
|
4703
|
+
s(this, "registrationCountry", new we());
|
|
4641
4704
|
/**
|
|
4642
4705
|
* Регистрационный номер юридического лица нерезидента.
|
|
4643
4706
|
*/
|
|
@@ -4646,10 +4709,10 @@ class vs extends yt {
|
|
|
4646
4709
|
* Налоговый номер юридического лица нерезидента.
|
|
4647
4710
|
*/
|
|
4648
4711
|
s(this, "taxNumber", "");
|
|
4649
|
-
e && (this.registrationCountry = new
|
|
4712
|
+
e && (this.registrationCountry = new we(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
4650
4713
|
}
|
|
4651
4714
|
}
|
|
4652
|
-
class
|
|
4715
|
+
class Xe {
|
|
4653
4716
|
/**
|
|
4654
4717
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
4655
4718
|
*
|
|
@@ -4657,18 +4720,18 @@ class Qe {
|
|
|
4657
4720
|
*/
|
|
4658
4721
|
static createInstance(r) {
|
|
4659
4722
|
switch (r.opf.slug) {
|
|
4660
|
-
case
|
|
4661
|
-
return new mt(r);
|
|
4662
|
-
case Q.UlR:
|
|
4723
|
+
case V.Ic:
|
|
4663
4724
|
return new yt(r);
|
|
4664
|
-
case
|
|
4665
|
-
return new
|
|
4725
|
+
case V.UlR:
|
|
4726
|
+
return new at(r);
|
|
4727
|
+
case V.UlNr:
|
|
4728
|
+
return new Rs(r);
|
|
4666
4729
|
default:
|
|
4667
|
-
return new
|
|
4730
|
+
return new vs(r);
|
|
4668
4731
|
}
|
|
4669
4732
|
}
|
|
4670
4733
|
}
|
|
4671
|
-
class
|
|
4734
|
+
class _e extends ft {
|
|
4672
4735
|
/**
|
|
4673
4736
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
4674
4737
|
*
|
|
@@ -4705,14 +4768,14 @@ class xe extends gt {
|
|
|
4705
4768
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4706
4769
|
*/
|
|
4707
4770
|
s(this, "isTransportCompanyAddress");
|
|
4708
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4771
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new it(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new se(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;
|
|
4709
4772
|
}
|
|
4710
4773
|
}
|
|
4711
|
-
class
|
|
4774
|
+
class wt extends D {
|
|
4712
4775
|
}
|
|
4713
|
-
class
|
|
4776
|
+
class vt extends D {
|
|
4714
4777
|
}
|
|
4715
|
-
class
|
|
4778
|
+
class jr extends oe {
|
|
4716
4779
|
/**
|
|
4717
4780
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4718
4781
|
*
|
|
@@ -4762,17 +4825,17 @@ class Gr extends ne {
|
|
|
4762
4825
|
* @inheritDoc
|
|
4763
4826
|
*/
|
|
4764
4827
|
s(this, "extraData");
|
|
4765
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) =>
|
|
4828
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Xe.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new se(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new _e(u))) ?? [], this.channelPrimaryInterest = new wt(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new vt(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 Me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4766
4829
|
}
|
|
4767
4830
|
}
|
|
4768
|
-
class
|
|
4831
|
+
class gi extends Fe {
|
|
4769
4832
|
/**
|
|
4770
4833
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4771
4834
|
*
|
|
4772
4835
|
* @param data Данные для первоначальной инициализации.
|
|
4773
4836
|
*/
|
|
4774
4837
|
constructor(e) {
|
|
4775
|
-
var t, i, o, c, u, p, g,
|
|
4838
|
+
var t, i, o, c, u, p, g, a;
|
|
4776
4839
|
super();
|
|
4777
4840
|
/**
|
|
4778
4841
|
* @inheritDoc
|
|
@@ -4821,11 +4884,11 @@ class hi extends Fe {
|
|
|
4821
4884
|
/**
|
|
4822
4885
|
* @inheritDoc
|
|
4823
4886
|
*/
|
|
4824
|
-
s(this, "createdAt", new
|
|
4887
|
+
s(this, "createdAt", new b());
|
|
4825
4888
|
/**
|
|
4826
4889
|
* @inheritDoc
|
|
4827
4890
|
*/
|
|
4828
|
-
s(this, "lastLoginDate", new
|
|
4891
|
+
s(this, "lastLoginDate", new b());
|
|
4829
4892
|
/**
|
|
4830
4893
|
* @inheritDoc
|
|
4831
4894
|
*/
|
|
@@ -4877,12 +4940,12 @@ class hi extends Fe {
|
|
|
4877
4940
|
/**
|
|
4878
4941
|
* @inheritDoc
|
|
4879
4942
|
*/
|
|
4880
|
-
s(this, "noOrdersPeriod", new
|
|
4881
|
-
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((P) => new
|
|
4882
|
-
createdAt: new
|
|
4943
|
+
s(this, "noOrdersPeriod", new b());
|
|
4944
|
+
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((P) => new Re(P)), this.region = new ve(e == null ? void 0 : e.region), this.country = new we(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((P) => new Z(P))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((P) => new xr(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new U(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new ie(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((P) => new Ce(P)), this.contact = new Dr(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4945
|
+
createdAt: new b((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4883
4946
|
creator: (g = e == null ? void 0 : e.lastOrder) == null ? void 0 : g.creator,
|
|
4884
|
-
isApproved: (
|
|
4885
|
-
}, this.noOrdersPeriod = new
|
|
4947
|
+
isApproved: (a = e == null ? void 0 : e.lastOrder) == null ? void 0 : a.isApproved
|
|
4948
|
+
}, this.noOrdersPeriod = new b(e == null ? void 0 : e.noOrdersPeriod);
|
|
4886
4949
|
}
|
|
4887
4950
|
/**
|
|
4888
4951
|
* @inheritDoc
|
|
@@ -4893,7 +4956,7 @@ class hi extends Fe {
|
|
|
4893
4956
|
this.cities = [];
|
|
4894
4957
|
break;
|
|
4895
4958
|
case "region":
|
|
4896
|
-
this.region = new
|
|
4959
|
+
this.region = new ve();
|
|
4897
4960
|
break;
|
|
4898
4961
|
case "isActive":
|
|
4899
4962
|
this.isActive = !0;
|
|
@@ -4920,16 +4983,16 @@ class hi extends Fe {
|
|
|
4920
4983
|
this.salesDirections = [];
|
|
4921
4984
|
break;
|
|
4922
4985
|
case "contragentType":
|
|
4923
|
-
this.contragentType = new
|
|
4986
|
+
this.contragentType = new ie();
|
|
4924
4987
|
break;
|
|
4925
4988
|
case "preferredDeliveryType":
|
|
4926
|
-
this.preferredDeliveryType = new
|
|
4989
|
+
this.preferredDeliveryType = new K();
|
|
4927
4990
|
break;
|
|
4928
4991
|
case "partnerGroups":
|
|
4929
4992
|
this.partnerGroups = [];
|
|
4930
4993
|
break;
|
|
4931
4994
|
case "contact":
|
|
4932
|
-
this.contact = new
|
|
4995
|
+
this.contact = new Dr();
|
|
4933
4996
|
break;
|
|
4934
4997
|
default:
|
|
4935
4998
|
this[e] = void 0;
|
|
@@ -4946,7 +5009,7 @@ class hi extends Fe {
|
|
|
4946
5009
|
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;
|
|
4947
5010
|
}
|
|
4948
5011
|
}
|
|
4949
|
-
class
|
|
5012
|
+
class Rt extends G {
|
|
4950
5013
|
/**
|
|
4951
5014
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4952
5015
|
*
|
|
@@ -4962,10 +5025,10 @@ class vt extends G {
|
|
|
4962
5025
|
* @inheritDoc
|
|
4963
5026
|
*/
|
|
4964
5027
|
s(this, "creator");
|
|
4965
|
-
this.createdAt = R(e == null ? void 0 : e.createdAt) ?
|
|
5028
|
+
this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new N(e == null ? void 0 : e.creator);
|
|
4966
5029
|
}
|
|
4967
5030
|
}
|
|
4968
|
-
class Cs extends
|
|
5031
|
+
class Cs extends L {
|
|
4969
5032
|
/**
|
|
4970
5033
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4971
5034
|
*
|
|
@@ -5002,10 +5065,10 @@ class Cs extends O {
|
|
|
5002
5065
|
* @inheritDoc
|
|
5003
5066
|
*/
|
|
5004
5067
|
s(this, "curators");
|
|
5005
|
-
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new
|
|
5068
|
+
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new se(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Rt(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(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 Lr(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new xr(u))) ?? void 0;
|
|
5006
5069
|
}
|
|
5007
5070
|
}
|
|
5008
|
-
class
|
|
5071
|
+
class gr extends G {
|
|
5009
5072
|
/**
|
|
5010
5073
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
5011
5074
|
*
|
|
@@ -5020,7 +5083,7 @@ class ur extends G {
|
|
|
5020
5083
|
this.isPrimary = e.isPrimary;
|
|
5021
5084
|
}
|
|
5022
5085
|
}
|
|
5023
|
-
class Ds extends
|
|
5086
|
+
class Ds extends se {
|
|
5024
5087
|
/**
|
|
5025
5088
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
5026
5089
|
*
|
|
@@ -5045,7 +5108,7 @@ class Ds extends te {
|
|
|
5045
5108
|
*/
|
|
5046
5109
|
addresses: []
|
|
5047
5110
|
});
|
|
5048
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new
|
|
5111
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new gr(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new gr(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new gr(t))));
|
|
5049
5112
|
}
|
|
5050
5113
|
}
|
|
5051
5114
|
class H extends Y {
|
|
@@ -5080,7 +5143,7 @@ class H extends Y {
|
|
|
5080
5143
|
let e;
|
|
5081
5144
|
const t = r, i = r, o = r;
|
|
5082
5145
|
switch (r.opf.slug) {
|
|
5083
|
-
case
|
|
5146
|
+
case V.Ic:
|
|
5084
5147
|
e = {
|
|
5085
5148
|
opf: t.opf.slug,
|
|
5086
5149
|
name: t.name,
|
|
@@ -5097,7 +5160,7 @@ class H extends Y {
|
|
|
5097
5160
|
actual_address: t.actualAddress
|
|
5098
5161
|
};
|
|
5099
5162
|
break;
|
|
5100
|
-
case
|
|
5163
|
+
case V.UlR:
|
|
5101
5164
|
e = {
|
|
5102
5165
|
opf: i.opf.slug,
|
|
5103
5166
|
name: i.name,
|
|
@@ -5115,7 +5178,7 @@ class H extends Y {
|
|
|
5115
5178
|
actual_address: i.actualAddress
|
|
5116
5179
|
};
|
|
5117
5180
|
break;
|
|
5118
|
-
case
|
|
5181
|
+
case V.UlNr:
|
|
5119
5182
|
e = {
|
|
5120
5183
|
opf: o.opf.slug,
|
|
5121
5184
|
name: o.name,
|
|
@@ -5187,7 +5250,7 @@ class H extends Y {
|
|
|
5187
5250
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
5188
5251
|
*/
|
|
5189
5252
|
getClient(r) {
|
|
5190
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
5253
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new jr(e.data));
|
|
5191
5254
|
}
|
|
5192
5255
|
/**
|
|
5193
5256
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -5201,7 +5264,7 @@ class H extends Y {
|
|
|
5201
5264
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_list
|
|
5202
5265
|
*/
|
|
5203
5266
|
getClientsList(r, e, t, i, o = void 0) {
|
|
5204
|
-
return this.getTypedPaginated(
|
|
5267
|
+
return this.getTypedPaginated(oe, "/internal/clients", r, e, t, i, void 0, o);
|
|
5205
5268
|
}
|
|
5206
5269
|
/**
|
|
5207
5270
|
* Выполняет поиск клиентов по терму в строке.
|
|
@@ -5258,7 +5321,7 @@ class H extends Y {
|
|
|
5258
5321
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
5259
5322
|
*/
|
|
5260
5323
|
createClientCommonData(r, e = {}) {
|
|
5261
|
-
return this.post("/internal/clients", H.transformClientDataToRequest(r), (t) => new
|
|
5324
|
+
return this.post("/internal/clients", H.transformClientDataToRequest(r), (t) => new jr(t.data), e);
|
|
5262
5325
|
}
|
|
5263
5326
|
/**
|
|
5264
5327
|
* Обновляет данные указанного клиента.
|
|
@@ -5398,7 +5461,7 @@ class H extends Y {
|
|
|
5398
5461
|
return this.post(
|
|
5399
5462
|
`/internal/clients/${r}/contragents`,
|
|
5400
5463
|
H.transformContragentClientDataToRequest(e),
|
|
5401
|
-
(i) =>
|
|
5464
|
+
(i) => Xe.createInstance(i.data),
|
|
5402
5465
|
t
|
|
5403
5466
|
);
|
|
5404
5467
|
}
|
|
@@ -5414,7 +5477,7 @@ class H extends Y {
|
|
|
5414
5477
|
return this.patch(
|
|
5415
5478
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
5416
5479
|
H.transformContragentClientDataToRequest(e),
|
|
5417
|
-
(i) =>
|
|
5480
|
+
(i) => Xe.createInstance(i.data),
|
|
5418
5481
|
t
|
|
5419
5482
|
);
|
|
5420
5483
|
}
|
|
@@ -5435,7 +5498,7 @@ class H extends Y {
|
|
|
5435
5498
|
* @see /doc/api/internal#/operations/api_internal_client_delivery_address_get_list
|
|
5436
5499
|
*/
|
|
5437
5500
|
getClientDeliveryAddresses(r) {
|
|
5438
|
-
return this.getTypedList(
|
|
5501
|
+
return this.getTypedList(_e, `/internal/clients/${r}/delivery-addresses`);
|
|
5439
5502
|
}
|
|
5440
5503
|
/**
|
|
5441
5504
|
* Создаёт новую запись об адресе доставки клиента.
|
|
@@ -5449,7 +5512,7 @@ class H extends Y {
|
|
|
5449
5512
|
return this.post(
|
|
5450
5513
|
`/internal/clients/${r}/delivery-addresses`,
|
|
5451
5514
|
H.transformClientDeliveryAddressToRequest(e),
|
|
5452
|
-
(i) => new
|
|
5515
|
+
(i) => new _e(i.data),
|
|
5453
5516
|
t
|
|
5454
5517
|
);
|
|
5455
5518
|
}
|
|
@@ -5465,7 +5528,7 @@ class H extends Y {
|
|
|
5465
5528
|
return this.patch(
|
|
5466
5529
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
5467
5530
|
H.transformClientDeliveryAddressToRequest(e),
|
|
5468
|
-
(i) => new
|
|
5531
|
+
(i) => new _e(i.data),
|
|
5469
5532
|
t
|
|
5470
5533
|
);
|
|
5471
5534
|
}
|
|
@@ -5492,7 +5555,7 @@ class H extends Y {
|
|
|
5492
5555
|
return this.post(
|
|
5493
5556
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
5494
5557
|
H.transformClientContragentBankAccountToRequest(t),
|
|
5495
|
-
(o) => new
|
|
5558
|
+
(o) => new Cr(o.data),
|
|
5496
5559
|
i
|
|
5497
5560
|
);
|
|
5498
5561
|
}
|
|
@@ -5509,7 +5572,7 @@ class H extends Y {
|
|
|
5509
5572
|
return this.patch(
|
|
5510
5573
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
|
|
5511
5574
|
H.transformClientContragentBankAccountToRequest(t),
|
|
5512
|
-
(o) => new
|
|
5575
|
+
(o) => new Cr(o.data),
|
|
5513
5576
|
i
|
|
5514
5577
|
);
|
|
5515
5578
|
}
|
|
@@ -5565,7 +5628,7 @@ class H extends Y {
|
|
|
5565
5628
|
comment: e.comment,
|
|
5566
5629
|
not_disturb: e.notDisturb
|
|
5567
5630
|
},
|
|
5568
|
-
(i) => new
|
|
5631
|
+
(i) => new se(i.data),
|
|
5569
5632
|
t
|
|
5570
5633
|
);
|
|
5571
5634
|
}
|
|
@@ -5702,7 +5765,7 @@ class H extends Y {
|
|
|
5702
5765
|
comment: e.comment,
|
|
5703
5766
|
...t
|
|
5704
5767
|
};
|
|
5705
|
-
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
|
|
5768
|
+
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 se(p.data), i);
|
|
5706
5769
|
}
|
|
5707
5770
|
/**
|
|
5708
5771
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5731,7 +5794,7 @@ class H extends Y {
|
|
|
5731
5794
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5732
5795
|
}
|
|
5733
5796
|
}
|
|
5734
|
-
class
|
|
5797
|
+
class fi extends h {
|
|
5735
5798
|
/**
|
|
5736
5799
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5737
5800
|
*
|
|
@@ -5745,7 +5808,7 @@ class gi extends h {
|
|
|
5745
5808
|
});
|
|
5746
5809
|
}
|
|
5747
5810
|
}
|
|
5748
|
-
class
|
|
5811
|
+
class mi {
|
|
5749
5812
|
/**
|
|
5750
5813
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5751
5814
|
*
|
|
@@ -5764,11 +5827,11 @@ class fi {
|
|
|
5764
5827
|
* Текущая версия приложения.
|
|
5765
5828
|
*/
|
|
5766
5829
|
s(this, "version");
|
|
5767
|
-
this.date = R(r == null ? void 0 : r.date) ?
|
|
5830
|
+
this.date = R(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
5768
5831
|
}
|
|
5769
5832
|
}
|
|
5770
|
-
var
|
|
5771
|
-
class
|
|
5833
|
+
var Ts = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Ts || {});
|
|
5834
|
+
class yi extends h {
|
|
5772
5835
|
/**
|
|
5773
5836
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5774
5837
|
*
|
|
@@ -5794,15 +5857,16 @@ class mi extends h {
|
|
|
5794
5857
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
|
|
5795
5858
|
*/
|
|
5796
5859
|
searchProduct(r, e, t, i = {}) {
|
|
5797
|
-
var
|
|
5798
|
-
|
|
5799
|
-
|
|
5800
|
-
|
|
5801
|
-
|
|
5860
|
+
var o;
|
|
5861
|
+
return this.request(
|
|
5862
|
+
{
|
|
5863
|
+
method: "GET",
|
|
5864
|
+
url: `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
5865
|
+
params: { params: t, client_id: e }
|
|
5866
|
+
},
|
|
5867
|
+
(c) => new q(c.data),
|
|
5868
|
+
i
|
|
5802
5869
|
);
|
|
5803
|
-
return o.catch((u) => {
|
|
5804
|
-
this.errorResponseHandler(u, i);
|
|
5805
|
-
}), o;
|
|
5806
5870
|
}
|
|
5807
5871
|
/**
|
|
5808
5872
|
* Создает пользовательский шаблон конфигуратора.
|
|
@@ -5877,7 +5941,7 @@ class Ps {
|
|
|
5877
5941
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5878
5942
|
}
|
|
5879
5943
|
}
|
|
5880
|
-
class
|
|
5944
|
+
class ai extends Ps {
|
|
5881
5945
|
/**
|
|
5882
5946
|
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5883
5947
|
*
|
|
@@ -5908,7 +5972,7 @@ class yi extends Ps {
|
|
|
5908
5972
|
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;
|
|
5909
5973
|
}
|
|
5910
5974
|
}
|
|
5911
|
-
class
|
|
5975
|
+
class wi {
|
|
5912
5976
|
/**
|
|
5913
5977
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5914
5978
|
*
|
|
@@ -5926,14 +5990,14 @@ class ai {
|
|
|
5926
5990
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
5927
5991
|
}
|
|
5928
5992
|
}
|
|
5929
|
-
class
|
|
5993
|
+
class y {
|
|
5930
5994
|
/**
|
|
5931
5995
|
* Возвращает границы декады, в которую попадает указанная дата.
|
|
5932
5996
|
*
|
|
5933
5997
|
* @param date Дата.
|
|
5934
5998
|
*/
|
|
5935
5999
|
static decadeInterval(r) {
|
|
5936
|
-
const [e, t] =
|
|
6000
|
+
const [e, t] = y.shiftedDecadeBounds(r, 0);
|
|
5937
6001
|
return { from: e, to: t };
|
|
5938
6002
|
}
|
|
5939
6003
|
/**
|
|
@@ -5943,7 +6007,7 @@ class m {
|
|
|
5943
6007
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
5944
6008
|
*/
|
|
5945
6009
|
static shiftDecadeInterval(r, e) {
|
|
5946
|
-
const [t, i] =
|
|
6010
|
+
const [t, i] = y.shiftedDecadeBounds(r, e);
|
|
5947
6011
|
return { from: t, to: i };
|
|
5948
6012
|
}
|
|
5949
6013
|
/**
|
|
@@ -5981,8 +6045,8 @@ class m {
|
|
|
5981
6045
|
* @param date Опорная дата.
|
|
5982
6046
|
*/
|
|
5983
6047
|
static intervalTillSameDate(r, e, t) {
|
|
5984
|
-
const i =
|
|
5985
|
-
return { from:
|
|
6048
|
+
const i = zt(E(t), E(r)), o = E($(e, i)), c = Math.min(qr(t), Wt(o));
|
|
6049
|
+
return { from: ge(e), to: z(jt(o, c)) };
|
|
5986
6050
|
}
|
|
5987
6051
|
/**
|
|
5988
6052
|
* Возвращает интервал «сдвинутая неделя до такого же дня недели»; недели начинаются с понедельника.
|
|
@@ -5991,8 +6055,8 @@ class m {
|
|
|
5991
6055
|
* @param shiftWeeks Смещение в неделях, может быть отрицательным.
|
|
5992
6056
|
*/
|
|
5993
6057
|
static weekTillSameWeekday(r, e) {
|
|
5994
|
-
const t =
|
|
5995
|
-
return { from: t, to:
|
|
6058
|
+
const t = ee(ar(r, e), { weekStartsOn: 1 }), i = We(r, ee(r, { weekStartsOn: 1 }));
|
|
6059
|
+
return { from: t, to: z(re(t, i)) };
|
|
5996
6060
|
}
|
|
5997
6061
|
/**
|
|
5998
6062
|
* Возвращает интервал «сдвинутая декада до такого же номера дня»; если в целевой декаде дня с таким
|
|
@@ -6002,8 +6066,8 @@ class m {
|
|
|
6002
6066
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
6003
6067
|
*/
|
|
6004
6068
|
static decadeTillSameDayNumber(r, e) {
|
|
6005
|
-
const [t] =
|
|
6006
|
-
return { from: o, to:
|
|
6069
|
+
const [t] = y.shiftedDecadeBounds(r, 0), i = We(r, t) + 1, [o, c] = y.shiftedDecadeBounds(r, e), u = We(c, o) + 1;
|
|
6070
|
+
return { from: o, to: z(re(o, Math.min(i, u) - 1)) };
|
|
6007
6071
|
}
|
|
6008
6072
|
/**
|
|
6009
6073
|
* Возвращает пару «начало и конец декады», отстоящей от декады указанной даты на заданное число декад.
|
|
@@ -6012,14 +6076,14 @@ class m {
|
|
|
6012
6076
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
6013
6077
|
*/
|
|
6014
6078
|
static shiftedDecadeBounds(r, e) {
|
|
6015
|
-
const t =
|
|
6079
|
+
const t = qr(r);
|
|
6016
6080
|
let i = 2;
|
|
6017
6081
|
t <= 10 ? i = 0 : t <= 20 && (i = 1);
|
|
6018
|
-
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p =
|
|
6019
|
-
return [g,
|
|
6082
|
+
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = E($(r, c)), g = re(p, u * 10), a = u === 2 ? x(p) : z(re(g, 9));
|
|
6083
|
+
return [g, a];
|
|
6020
6084
|
}
|
|
6021
6085
|
}
|
|
6022
|
-
class
|
|
6086
|
+
class Tr {
|
|
6023
6087
|
/**
|
|
6024
6088
|
* Преобразует значение даты из данных ответа в дату.
|
|
6025
6089
|
* Строки разбираются как ISO-даты; нечитаемое значение равносильно отсутствию даты.
|
|
@@ -6027,21 +6091,21 @@ class Dr {
|
|
|
6027
6091
|
* @param value Значение даты: дата, строка в формате ISO или пустое значение.
|
|
6028
6092
|
*/
|
|
6029
6093
|
static parse(r) {
|
|
6030
|
-
if (
|
|
6094
|
+
if (m(r))
|
|
6031
6095
|
return;
|
|
6032
|
-
const e = R(r) ?
|
|
6096
|
+
const e = R(r) ? C(r) : r;
|
|
6033
6097
|
return Gt(e) ? e : void 0;
|
|
6034
6098
|
}
|
|
6035
6099
|
}
|
|
6036
|
-
function
|
|
6037
|
-
return k(
|
|
6100
|
+
function vi(n) {
|
|
6101
|
+
return k(je(qe(), n), "yyyy-MM-dd");
|
|
6038
6102
|
}
|
|
6039
|
-
function
|
|
6103
|
+
function As(n, r) {
|
|
6040
6104
|
const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(n));
|
|
6041
6105
|
return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
|
|
6042
6106
|
}
|
|
6043
|
-
function
|
|
6044
|
-
const r =
|
|
6107
|
+
function Ri(n) {
|
|
6108
|
+
const r = C(n), e = We(qe(), r);
|
|
6045
6109
|
switch (!0) {
|
|
6046
6110
|
case e === 0:
|
|
6047
6111
|
return "Сегодня";
|
|
@@ -6050,7 +6114,7 @@ function vi(n) {
|
|
|
6050
6114
|
case e < 0:
|
|
6051
6115
|
return n;
|
|
6052
6116
|
default:
|
|
6053
|
-
return `${e} ${
|
|
6117
|
+
return `${e} ${As(e, ["день", "дня", "дней"])} назад`;
|
|
6054
6118
|
}
|
|
6055
6119
|
}
|
|
6056
6120
|
class Ci {
|
|
@@ -6060,15 +6124,15 @@ class Ci {
|
|
|
6060
6124
|
* @param year Год, от которого считаются годовые периоды (1/3/9 месяцев, кварталы, полугодия, год); по умолчанию текущий.
|
|
6061
6125
|
*/
|
|
6062
6126
|
static defaultDateRanges(r) {
|
|
6063
|
-
const e = Yt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), i =
|
|
6127
|
+
const e = Yt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), i = ue(r === void 0 ? t : new Date(r, 0, 1)), o = de(i);
|
|
6064
6128
|
return {
|
|
6065
6129
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
6066
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
6067
|
-
today: { label: "Сегодня", from: qe(), to:
|
|
6068
|
-
yesterday: { label: "Вчера", from:
|
|
6069
|
-
tomorrow: { label: "Завтра", from:
|
|
6070
|
-
currentWeek: { label: "Неделя", from:
|
|
6071
|
-
currentMonth: { label: "Месяц", from:
|
|
6130
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: ge(e), to: z(e) },
|
|
6131
|
+
today: { label: "Сегодня", from: qe(), to: Xt() },
|
|
6132
|
+
yesterday: { label: "Вчера", from: Kt(), to: Jt() },
|
|
6133
|
+
tomorrow: { label: "Завтра", from: Vt(), to: Qt() },
|
|
6134
|
+
currentWeek: { label: "Неделя", from: ee(t, { weekStartsOn: 1 }), to: $e(t, { weekStartsOn: 1 }) },
|
|
6135
|
+
currentMonth: { label: "Месяц", from: E(t), to: x(t) },
|
|
6072
6136
|
oneMonth: { label: "1 месяц", from: i, to: x(i) },
|
|
6073
6137
|
threeMonths: { label: "3 месяца", from: i, to: x($(i, 2)) },
|
|
6074
6138
|
nineMonths: { label: "9 месяцев", from: i, to: x($(i, 8)) },
|
|
@@ -6089,110 +6153,110 @@ class Ci {
|
|
|
6089
6153
|
* @param now Опорная дата «сейчас»; по умолчанию текущая.
|
|
6090
6154
|
*/
|
|
6091
6155
|
static standardPeriods(r = /* @__PURE__ */ new Date()) {
|
|
6092
|
-
const e = { weekStartsOn: 1 }, t =
|
|
6156
|
+
const e = { weekStartsOn: 1 }, t = ge(r), i = z(r), o = y.decadeInterval(r), c = E(r), u = ke(r), p = y.startOfHalfYear(r), g = ue(r), a = y.addHalfYears(r, -1), P = y.addHalfYears(r, 1);
|
|
6093
6157
|
return {
|
|
6094
|
-
yesterday: { label: "Вчера", group: "day", from:
|
|
6158
|
+
yesterday: { label: "Вчера", group: "day", from: ge(je(r, 1)), to: z(je(r, 1)) },
|
|
6095
6159
|
today: { label: "Сегодня", group: "day", from: t, to: i },
|
|
6096
|
-
tomorrow: { label: "Завтра", group: "day", from:
|
|
6097
|
-
lastWeek: { label: "Прошлая неделя", group: "week", from:
|
|
6098
|
-
thisWeek: { label: "Эта неделя", group: "week", from:
|
|
6099
|
-
nextWeek: { label: "Следующая неделя", group: "week", from:
|
|
6100
|
-
lastTenDays: { label: "Прошлая декада", group: "decade", ...
|
|
6160
|
+
tomorrow: { label: "Завтра", group: "day", from: ge(re(r, 1)), to: z(re(r, 1)) },
|
|
6161
|
+
lastWeek: { label: "Прошлая неделя", group: "week", from: ee(Er(r, 1), e), to: $e(Er(r, 1), e) },
|
|
6162
|
+
thisWeek: { label: "Эта неделя", group: "week", from: ee(r, e), to: $e(r, e) },
|
|
6163
|
+
nextWeek: { label: "Следующая неделя", group: "week", from: ee(ar(r, 1), e), to: $e(ar(r, 1), e) },
|
|
6164
|
+
lastTenDays: { label: "Прошлая декада", group: "decade", ...y.shiftDecadeInterval(r, -1) },
|
|
6101
6165
|
thisTenDays: { label: "Эта декада", group: "decade", ...o },
|
|
6102
|
-
nextTenDays: { label: "Следующая декада", group: "decade", ...
|
|
6103
|
-
lastMonth: { label: "Прошлый месяц", group: "month", from:
|
|
6166
|
+
nextTenDays: { label: "Следующая декада", group: "decade", ...y.shiftDecadeInterval(r, 1) },
|
|
6167
|
+
lastMonth: { label: "Прошлый месяц", group: "month", from: E(lr(r, 1)), to: x(lr(r, 1)) },
|
|
6104
6168
|
thisMonth: { label: "Этот месяц", group: "month", from: c, to: x(r) },
|
|
6105
|
-
nextMonth: { label: "Следующий месяц", group: "month", from:
|
|
6106
|
-
lastQuarter: { label: "Прошлый квартал", group: "quarter", from:
|
|
6169
|
+
nextMonth: { label: "Следующий месяц", group: "month", from: E($(r, 1)), to: x($(r, 1)) },
|
|
6170
|
+
lastQuarter: { label: "Прошлый квартал", group: "quarter", from: ke(cr(r, 1)), to: Be(cr(r, 1)) },
|
|
6107
6171
|
thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to: Be(r) },
|
|
6108
|
-
nextQuarter: { label: "Следующий квартал", group: "quarter", from:
|
|
6172
|
+
nextQuarter: { label: "Следующий квартал", group: "quarter", from: ke(nr(r, 1)), to: Be(nr(r, 1)) },
|
|
6109
6173
|
lastHalfYear: {
|
|
6110
6174
|
label: "Прошлое полугодие",
|
|
6111
6175
|
group: "halfYear",
|
|
6112
|
-
from:
|
|
6113
|
-
to:
|
|
6176
|
+
from: y.startOfHalfYear(a),
|
|
6177
|
+
to: y.endOfHalfYear(a)
|
|
6114
6178
|
},
|
|
6115
|
-
thisHalfYear: { label: "Это полугодие", group: "halfYear", from: p, to:
|
|
6116
|
-
nextHalfYear: { label: "Следующее полугодие", group: "halfYear", from:
|
|
6117
|
-
lastYear: { label: "Прошлый год", group: "year", from:
|
|
6179
|
+
thisHalfYear: { label: "Это полугодие", group: "halfYear", from: p, to: y.endOfHalfYear(r) },
|
|
6180
|
+
nextHalfYear: { label: "Следующее полугодие", group: "halfYear", from: y.startOfHalfYear(P), to: y.endOfHalfYear(P) },
|
|
6181
|
+
lastYear: { label: "Прошлый год", group: "year", from: ue(or(r, 1)), to: de(or(r, 1)) },
|
|
6118
6182
|
thisYear: { label: "Этот год", group: "year", from: g, to: de(r) },
|
|
6119
|
-
nextYear: { label: "Следующий год", group: "year", from:
|
|
6120
|
-
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from:
|
|
6183
|
+
nextYear: { label: "Следующий год", group: "year", from: ue(ir(r, 1)), to: de(ir(r, 1)) },
|
|
6184
|
+
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from: ee(r, e), to: i },
|
|
6121
6185
|
fromBeginningOfThisTenDays: { label: "С начала этой декады", group: "other", section: "fromBeginning", from: o.from, to: i },
|
|
6122
6186
|
fromBeginningOfThisMonth: { label: "С начала этого месяца", group: "other", section: "fromBeginning", from: c, to: i },
|
|
6123
6187
|
fromBeginningOfThisQuarter: { label: "С начала этого квартала", group: "other", section: "fromBeginning", from: u, to: i },
|
|
6124
6188
|
fromBeginningOfThisHalfYear: { label: "С начала этого полугодия", group: "other", section: "fromBeginning", from: p, to: i },
|
|
6125
6189
|
fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: i },
|
|
6126
|
-
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to:
|
|
6190
|
+
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to: $e(r, e) },
|
|
6127
6191
|
tillEndOfThisTenDays: { label: "До конца этой декады", group: "other", section: "tillEnd", from: t, to: o.to },
|
|
6128
6192
|
tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: x(r) },
|
|
6129
6193
|
tillEndOfThisQuarter: { label: "До конца этого квартала", group: "other", section: "tillEnd", from: t, to: Be(r) },
|
|
6130
|
-
tillEndOfThisHalfYear: { label: "До конца этого полугодия", group: "other", section: "tillEnd", from: t, to:
|
|
6194
|
+
tillEndOfThisHalfYear: { label: "До конца этого полугодия", group: "other", section: "tillEnd", from: t, to: y.endOfHalfYear(r) },
|
|
6131
6195
|
tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to: de(r) },
|
|
6132
|
-
lastWeekTillSameWeekDay: { label: "Прошлая неделя, до такого же дня недели", group: "other", section: "lastTillSame", ...
|
|
6196
|
+
lastWeekTillSameWeekDay: { label: "Прошлая неделя, до такого же дня недели", group: "other", section: "lastTillSame", ...y.weekTillSameWeekday(r, -1) },
|
|
6133
6197
|
lastTenDaysTillSameDayNumber: {
|
|
6134
6198
|
label: "Прошлая декада, до такого же номера дня",
|
|
6135
6199
|
group: "other",
|
|
6136
6200
|
section: "lastTillSame",
|
|
6137
|
-
...
|
|
6201
|
+
...y.decadeTillSameDayNumber(r, -1)
|
|
6138
6202
|
},
|
|
6139
6203
|
lastMonthTillSameDate: {
|
|
6140
6204
|
label: "Прошлый месяц, до такой же даты",
|
|
6141
6205
|
group: "other",
|
|
6142
6206
|
section: "lastTillSame",
|
|
6143
|
-
...
|
|
6207
|
+
...y.intervalTillSameDate(c, E(lr(r, 1)), r)
|
|
6144
6208
|
},
|
|
6145
6209
|
lastQuarterTillSameDate: {
|
|
6146
6210
|
label: "Прошлый квартал, до такой же даты",
|
|
6147
6211
|
group: "other",
|
|
6148
6212
|
section: "lastTillSame",
|
|
6149
|
-
...
|
|
6213
|
+
...y.intervalTillSameDate(u, ke(cr(r, 1)), r)
|
|
6150
6214
|
},
|
|
6151
6215
|
lastHalfYearTillSameDate: {
|
|
6152
6216
|
label: "Прошлое полугодие, до такой же даты",
|
|
6153
6217
|
group: "other",
|
|
6154
6218
|
section: "lastTillSame",
|
|
6155
|
-
...
|
|
6219
|
+
...y.intervalTillSameDate(p, y.startOfHalfYear(a), r)
|
|
6156
6220
|
},
|
|
6157
6221
|
lastYearTillSameDate: {
|
|
6158
6222
|
label: "Прошлый год, до такой же даты",
|
|
6159
6223
|
group: "other",
|
|
6160
6224
|
section: "lastTillSame",
|
|
6161
|
-
...
|
|
6225
|
+
...y.intervalTillSameDate(g, ue(or(r, 1)), r)
|
|
6162
6226
|
},
|
|
6163
|
-
nextWeekTillSameWeekDay: { label: "Следующая неделя, до такого же дня недели", group: "other", section: "nextTillSame", ...
|
|
6227
|
+
nextWeekTillSameWeekDay: { label: "Следующая неделя, до такого же дня недели", group: "other", section: "nextTillSame", ...y.weekTillSameWeekday(r, 1) },
|
|
6164
6228
|
nextTenDaysTillSameDayNumber: {
|
|
6165
6229
|
label: "Следующая декада, до такого же номера дня",
|
|
6166
6230
|
group: "other",
|
|
6167
6231
|
section: "nextTillSame",
|
|
6168
|
-
...
|
|
6232
|
+
...y.decadeTillSameDayNumber(r, 1)
|
|
6169
6233
|
},
|
|
6170
6234
|
nextMonthTillSameDate: {
|
|
6171
6235
|
label: "Следующий месяц, до такой же даты",
|
|
6172
6236
|
group: "other",
|
|
6173
6237
|
section: "nextTillSame",
|
|
6174
|
-
...
|
|
6238
|
+
...y.intervalTillSameDate(c, E($(r, 1)), r)
|
|
6175
6239
|
},
|
|
6176
6240
|
nextQuarterTillSameDate: {
|
|
6177
6241
|
label: "Следующий квартал, до такой же даты",
|
|
6178
6242
|
group: "other",
|
|
6179
6243
|
section: "nextTillSame",
|
|
6180
|
-
...
|
|
6244
|
+
...y.intervalTillSameDate(u, ke(nr(r, 1)), r)
|
|
6181
6245
|
},
|
|
6182
6246
|
nextHalfYearTillSameDate: {
|
|
6183
6247
|
label: "Следующее полугодие, до такой же даты",
|
|
6184
6248
|
group: "other",
|
|
6185
6249
|
section: "nextTillSame",
|
|
6186
|
-
...
|
|
6250
|
+
...y.intervalTillSameDate(p, y.startOfHalfYear(P), r)
|
|
6187
6251
|
},
|
|
6188
6252
|
nextYearTillSameDate: {
|
|
6189
6253
|
label: "Следующий год, до такой же даты",
|
|
6190
6254
|
group: "other",
|
|
6191
6255
|
section: "nextTillSame",
|
|
6192
|
-
...
|
|
6256
|
+
...y.intervalTillSameDate(g, ue(ir(r, 1)), r)
|
|
6193
6257
|
},
|
|
6194
|
-
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from:
|
|
6195
|
-
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to:
|
|
6258
|
+
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: ge(je(r, 6)), to: i },
|
|
6259
|
+
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: z(re(r, 6)) }
|
|
6196
6260
|
};
|
|
6197
6261
|
}
|
|
6198
6262
|
}
|
|
@@ -6205,7 +6269,7 @@ const Di = [
|
|
|
6205
6269
|
{ key: "halfYear", label: "Полугодие" },
|
|
6206
6270
|
{ key: "year", label: "Год" },
|
|
6207
6271
|
{ key: "other", label: "Прочее" }
|
|
6208
|
-
],
|
|
6272
|
+
], Ti = [
|
|
6209
6273
|
{ key: "fromBeginning", label: "С начала периода" },
|
|
6210
6274
|
{ key: "tillEnd", label: "До конца периода" },
|
|
6211
6275
|
{ key: "lastTillSame", label: "Прошлые, до такой же даты" },
|
|
@@ -6213,7 +6277,7 @@ const Di = [
|
|
|
6213
6277
|
{ key: "rollingDays", label: "7 дней" }
|
|
6214
6278
|
];
|
|
6215
6279
|
function Pi(n) {
|
|
6216
|
-
const r =
|
|
6280
|
+
const r = Mt(n * 100);
|
|
6217
6281
|
return `${r >= 0 ? "+" : ""}${r}%`;
|
|
6218
6282
|
}
|
|
6219
6283
|
class Ct {
|
|
@@ -6244,7 +6308,7 @@ class Ct {
|
|
|
6244
6308
|
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;
|
|
6245
6309
|
}
|
|
6246
6310
|
}
|
|
6247
|
-
const
|
|
6311
|
+
const ye = class ye extends h {
|
|
6248
6312
|
/**
|
|
6249
6313
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
6250
6314
|
*/
|
|
@@ -6254,7 +6318,7 @@ const me = class me extends h {
|
|
|
6254
6318
|
* Время кэширования данных ответов на запросы (секунд).
|
|
6255
6319
|
*/
|
|
6256
6320
|
s(this, "responseDataCacheTimeout");
|
|
6257
|
-
this.responseDataCacheTimeout =
|
|
6321
|
+
this.responseDataCacheTimeout = O().config.http.responseDataCacheTimeout;
|
|
6258
6322
|
}
|
|
6259
6323
|
/**
|
|
6260
6324
|
* Возвращает кэшированные данные.
|
|
@@ -6264,7 +6328,7 @@ const me = class me extends h {
|
|
|
6264
6328
|
*/
|
|
6265
6329
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
6266
6330
|
static getCachedResponse(e) {
|
|
6267
|
-
const t =
|
|
6331
|
+
const t = ye.responseDataCache.get(e);
|
|
6268
6332
|
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
6269
6333
|
return t.val;
|
|
6270
6334
|
}
|
|
@@ -6275,8 +6339,8 @@ const me = class me extends h {
|
|
|
6275
6339
|
* @param data Данные для кэширования.
|
|
6276
6340
|
*/
|
|
6277
6341
|
cacheResponse(e, t) {
|
|
6278
|
-
|
|
6279
|
-
validTo:
|
|
6342
|
+
ye.responseDataCache.set(e, {
|
|
6343
|
+
validTo: Zt(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
6280
6344
|
val: t
|
|
6281
6345
|
});
|
|
6282
6346
|
}
|
|
@@ -6292,21 +6356,21 @@ const me = class me extends h {
|
|
|
6292
6356
|
*/
|
|
6293
6357
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
6294
6358
|
getTypedDataArrayRequester(e, t, i = !1, o = {}, c = void 0) {
|
|
6295
|
-
const u = t + (
|
|
6359
|
+
const u = t + (J(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? ye.getCachedResponse(u) : void 0;
|
|
6296
6360
|
return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((g) => (i && g && this.cacheResponse(u, g), g));
|
|
6297
6361
|
}
|
|
6298
6362
|
};
|
|
6299
6363
|
/**
|
|
6300
6364
|
* Кэш результатов запросов.
|
|
6301
6365
|
*/
|
|
6302
|
-
s(
|
|
6303
|
-
let Ue =
|
|
6304
|
-
class
|
|
6366
|
+
s(ye, "responseDataCache", /* @__PURE__ */ new Map());
|
|
6367
|
+
let Ue = ye;
|
|
6368
|
+
class Ai {
|
|
6305
6369
|
/**
|
|
6306
6370
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
6307
6371
|
*/
|
|
6308
6372
|
static generateUndefinedManagerInstance() {
|
|
6309
|
-
return new
|
|
6373
|
+
return new Z({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
6310
6374
|
}
|
|
6311
6375
|
/**
|
|
6312
6376
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -6325,7 +6389,7 @@ class Dt extends Ue {
|
|
|
6325
6389
|
const r = "/internal/managers", e = Ue.getCachedResponse(r);
|
|
6326
6390
|
if (e)
|
|
6327
6391
|
return e;
|
|
6328
|
-
const t = await this.get(r), i = _.instanceListInitializer(
|
|
6392
|
+
const t = await this.get(r), i = _.instanceListInitializer(Z, t.data);
|
|
6329
6393
|
return this.cacheResponse(r, i), i;
|
|
6330
6394
|
}
|
|
6331
6395
|
/**
|
|
@@ -6336,11 +6400,11 @@ class Dt extends Ue {
|
|
|
6336
6400
|
* @see /doc/api/internal#/operations/api_internal_managers_get
|
|
6337
6401
|
*/
|
|
6338
6402
|
getManager(r) {
|
|
6339
|
-
return this.get(`/internal/managers/${r}`, {}, (e) => new
|
|
6403
|
+
return this.get(`/internal/managers/${r}`, {}, (e) => new Z(e.data));
|
|
6340
6404
|
}
|
|
6341
6405
|
}
|
|
6342
|
-
var
|
|
6343
|
-
class
|
|
6406
|
+
var xe = /* @__PURE__ */ ((n) => (n.Processing = "processing", n.Completed = "completed", n.Error = "error", n.NeedsActualization = "needs_actualization", n))(xe || {});
|
|
6407
|
+
class bs {
|
|
6344
6408
|
/**
|
|
6345
6409
|
* Инициализирует экземпляр класса {@link OfferActualization}.
|
|
6346
6410
|
*
|
|
@@ -6363,13 +6427,13 @@ class As {
|
|
|
6363
6427
|
* @inheritDoc
|
|
6364
6428
|
*/
|
|
6365
6429
|
s(this, "error");
|
|
6366
|
-
this.status = (r == null ? void 0 : r.status) ??
|
|
6430
|
+
this.status = (r == null ? void 0 : r.status) ?? xe.Processing, this.actualizedAt = Tr.parse(r == null ? void 0 : r.actualizedAt), this.expiresAt = Tr.parse(r == null ? void 0 : r.expiresAt), this.error = r == null ? void 0 : r.error;
|
|
6367
6431
|
}
|
|
6368
6432
|
/**
|
|
6369
6433
|
* @inheritDoc
|
|
6370
6434
|
*/
|
|
6371
6435
|
get isProcessing() {
|
|
6372
|
-
return this.status ===
|
|
6436
|
+
return this.status === xe.Processing;
|
|
6373
6437
|
}
|
|
6374
6438
|
/**
|
|
6375
6439
|
* @inheritDoc
|
|
@@ -6387,16 +6451,16 @@ class As {
|
|
|
6387
6451
|
* @inheritDoc
|
|
6388
6452
|
*/
|
|
6389
6453
|
isOutdatedAt(r) {
|
|
6390
|
-
return this.status !==
|
|
6454
|
+
return this.status !== xe.Completed || m(this.actualizedAt) ? !0 : !m(this.expiresAt) && this.expiresAt.getTime() < r.getTime();
|
|
6391
6455
|
}
|
|
6392
6456
|
/**
|
|
6393
6457
|
* @inheritDoc
|
|
6394
6458
|
*/
|
|
6395
6459
|
isOrderAllowedAt(r) {
|
|
6396
|
-
return this.status ===
|
|
6460
|
+
return this.status === xe.Completed && !this.isOutdatedAt(r);
|
|
6397
6461
|
}
|
|
6398
6462
|
}
|
|
6399
|
-
class
|
|
6463
|
+
class Tt extends G {
|
|
6400
6464
|
/**
|
|
6401
6465
|
* Инициализирует экземпляр класса {@link OfferShortInfo}.
|
|
6402
6466
|
*
|
|
@@ -6432,10 +6496,10 @@ class Rt extends G {
|
|
|
6432
6496
|
* @inheritDoc
|
|
6433
6497
|
*/
|
|
6434
6498
|
s(this, "file");
|
|
6435
|
-
this.name = e == null ? void 0 : e.name, this.createdAt =
|
|
6499
|
+
this.name = e == null ? void 0 : e.name, this.createdAt = Tr.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new oe(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 bs(e.actualization), this.file = e == null ? void 0 : e.file;
|
|
6436
6500
|
}
|
|
6437
6501
|
}
|
|
6438
|
-
class
|
|
6502
|
+
class Ss extends Or {
|
|
6439
6503
|
/**
|
|
6440
6504
|
* Инициализирует экземпляр класса {@link ProfstroyOfferItem}.
|
|
6441
6505
|
*
|
|
@@ -6465,16 +6529,16 @@ class Ts extends kr {
|
|
|
6465
6529
|
* @inheritDoc
|
|
6466
6530
|
*/
|
|
6467
6531
|
get isProductStub() {
|
|
6468
|
-
return
|
|
6532
|
+
return m(this.product.id);
|
|
6469
6533
|
}
|
|
6470
6534
|
/**
|
|
6471
6535
|
* @inheritDoc
|
|
6472
6536
|
*/
|
|
6473
6537
|
get isOrderable() {
|
|
6474
|
-
return !this.isProductStub && !this.isIgnored &&
|
|
6538
|
+
return !this.isProductStub && !this.isIgnored && J(this.lineError);
|
|
6475
6539
|
}
|
|
6476
6540
|
}
|
|
6477
|
-
class
|
|
6541
|
+
class F extends Tt {
|
|
6478
6542
|
/**
|
|
6479
6543
|
* Инициализирует экземпляр класса {@link Offer}.
|
|
6480
6544
|
*
|
|
@@ -6491,11 +6555,11 @@ class M extends Rt {
|
|
|
6491
6555
|
*/
|
|
6492
6556
|
s(this, "products");
|
|
6493
6557
|
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map(
|
|
6494
|
-
(t) => e.isProfstroy ? new
|
|
6558
|
+
(t) => e.isProfstroy ? new Ss(t) : new Or(t)
|
|
6495
6559
|
);
|
|
6496
6560
|
}
|
|
6497
6561
|
}
|
|
6498
|
-
class
|
|
6562
|
+
class bi extends Fe {
|
|
6499
6563
|
/**
|
|
6500
6564
|
* Инициализирует экземпляр класса {@link OffersListFilters}.
|
|
6501
6565
|
*
|
|
@@ -6518,8 +6582,8 @@ class Ai extends Fe {
|
|
|
6518
6582
|
/**
|
|
6519
6583
|
* @inheritDoc
|
|
6520
6584
|
*/
|
|
6521
|
-
s(this, "createdAt", new
|
|
6522
|
-
this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new
|
|
6585
|
+
s(this, "createdAt", new b());
|
|
6586
|
+
this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new b(e == null ? void 0 : e.createdAt);
|
|
6523
6587
|
}
|
|
6524
6588
|
/**
|
|
6525
6589
|
* @inheritDoc
|
|
@@ -6536,16 +6600,16 @@ class Ai extends Fe {
|
|
|
6536
6600
|
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;
|
|
6537
6601
|
}
|
|
6538
6602
|
}
|
|
6539
|
-
class
|
|
6603
|
+
class er extends D {
|
|
6540
6604
|
}
|
|
6541
|
-
class Pt extends
|
|
6605
|
+
class Pt extends Rt {
|
|
6542
6606
|
/**
|
|
6543
6607
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
6544
6608
|
*
|
|
6545
6609
|
* @param data Данные для первоначальной инициализации.
|
|
6546
6610
|
*/
|
|
6547
6611
|
constructor(e) {
|
|
6548
|
-
var t, i, o, c, u, p, g,
|
|
6612
|
+
var t, i, o, c, u, p, g, a;
|
|
6549
6613
|
super(e);
|
|
6550
6614
|
/**
|
|
6551
6615
|
* @inheritDoc
|
|
@@ -6599,19 +6663,19 @@ class Pt extends vt {
|
|
|
6599
6663
|
* @inheritDoc
|
|
6600
6664
|
*/
|
|
6601
6665
|
s(this, "isLargeOrder");
|
|
6602
|
-
this.client = new
|
|
6666
|
+
this.client = new oe(e == null ? void 0 : e.client), this.payment = {
|
|
6603
6667
|
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
6604
6668
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
6605
6669
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
6606
6670
|
}, this.delivery = {
|
|
6607
6671
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
6608
|
-
date: R((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?
|
|
6609
|
-
address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new
|
|
6610
|
-
warehouse: (
|
|
6611
|
-
}, this.attachedUser = e != null && e.attachedUser ? new
|
|
6672
|
+
date: R((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
6673
|
+
address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new _e(e.delivery.address) : void 0,
|
|
6674
|
+
warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new Me(e.delivery.warehouse) : void 0
|
|
6675
|
+
}, this.attachedUser = e != null && e.attachedUser ? new N(e == null ? void 0 : e.attachedUser) : void 0, this.status = new er(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new D(e.statusDetail) : void 0, this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.attachedAt = R(e == null ? void 0 : e.attachedAt) ? C(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;
|
|
6612
6676
|
}
|
|
6613
6677
|
}
|
|
6614
|
-
class ds extends
|
|
6678
|
+
class ds extends ot {
|
|
6615
6679
|
/**
|
|
6616
6680
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
6617
6681
|
*
|
|
@@ -6668,7 +6732,7 @@ class ds extends nt {
|
|
|
6668
6732
|
* Продукт, которым заменена текущая запись.
|
|
6669
6733
|
*/
|
|
6670
6734
|
s(this, "replacement");
|
|
6671
|
-
this.product = new
|
|
6735
|
+
this.product = new X(e.product), this.currency = new j(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 = W(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"));
|
|
6672
6736
|
}
|
|
6673
6737
|
}
|
|
6674
6738
|
class I extends Pt {
|
|
@@ -6740,10 +6804,10 @@ class I extends Pt {
|
|
|
6740
6804
|
var c;
|
|
6741
6805
|
const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
|
|
6742
6806
|
return new ds(i, o);
|
|
6743
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
6807
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Xe.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new D(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new er(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
|
|
6744
6808
|
}
|
|
6745
6809
|
}
|
|
6746
|
-
class
|
|
6810
|
+
class Si extends Y {
|
|
6747
6811
|
/**
|
|
6748
6812
|
* Возвращает список заказов-черновиков, удовлетворяющих указанным параметрам поиска.
|
|
6749
6813
|
*
|
|
@@ -6755,7 +6819,7 @@ class Ti extends Y {
|
|
|
6755
6819
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get_list
|
|
6756
6820
|
*/
|
|
6757
6821
|
getOffers(r, e, t, i = void 0) {
|
|
6758
|
-
return this.getTypedPaginated(
|
|
6822
|
+
return this.getTypedPaginated(Tt, "/internal/orders/offers", r, e, t, {}, void 0, i);
|
|
6759
6823
|
}
|
|
6760
6824
|
/**
|
|
6761
6825
|
* Создаёт заказ-черновик из содержимого корзины клиента и возвращает данные созданной записи.
|
|
@@ -6774,7 +6838,7 @@ class Ti extends Y {
|
|
|
6774
6838
|
name: e,
|
|
6775
6839
|
items: t != null && t.length ? t : void 0
|
|
6776
6840
|
},
|
|
6777
|
-
(i) => new
|
|
6841
|
+
(i) => new F(i.data)
|
|
6778
6842
|
);
|
|
6779
6843
|
}
|
|
6780
6844
|
/**
|
|
@@ -6790,7 +6854,7 @@ class Ti extends Y {
|
|
|
6790
6854
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_profstroy
|
|
6791
6855
|
*/
|
|
6792
6856
|
createProfstroyOffer(r, e, t, i = {}) {
|
|
6793
|
-
return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new
|
|
6857
|
+
return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new F(o.data), i);
|
|
6794
6858
|
}
|
|
6795
6859
|
/**
|
|
6796
6860
|
* Запускает актуализацию заказа-черновика, созданного из файла «Профстрой»: текущий состав записи
|
|
@@ -6801,7 +6865,7 @@ class Ti extends Y {
|
|
|
6801
6865
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_profstroy_actualize
|
|
6802
6866
|
*/
|
|
6803
6867
|
actualizeProfstroyOffer(r) {
|
|
6804
|
-
return this.post(`/internal/orders/offers/${r}/profstroy/actualize`, {}, (e) => new
|
|
6868
|
+
return this.post(`/internal/orders/offers/${r}/profstroy/actualize`, {}, (e) => new F(e.data));
|
|
6805
6869
|
}
|
|
6806
6870
|
/**
|
|
6807
6871
|
* Пересобирает заказ-черновик из ранее сохранённого файла «Профстрой»: состав записи формируется заново,
|
|
@@ -6812,7 +6876,7 @@ class Ti extends Y {
|
|
|
6812
6876
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_profstroy_reload
|
|
6813
6877
|
*/
|
|
6814
6878
|
reloadProfstroyOffer(r) {
|
|
6815
|
-
return this.post(`/internal/orders/offers/${r}/profstroy/reload`, {}, (e) => new
|
|
6879
|
+
return this.post(`/internal/orders/offers/${r}/profstroy/reload`, {}, (e) => new F(e.data));
|
|
6816
6880
|
}
|
|
6817
6881
|
/**
|
|
6818
6882
|
* Возвращает данные заказа-черновика с указанным идентификатором.
|
|
@@ -6822,7 +6886,7 @@ class Ti extends Y {
|
|
|
6822
6886
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get
|
|
6823
6887
|
*/
|
|
6824
6888
|
getOffer(r) {
|
|
6825
|
-
return this.get(`/internal/orders/offers/${r}`, {}, (e) => new
|
|
6889
|
+
return this.get(`/internal/orders/offers/${r}`, {}, (e) => new F(e.data));
|
|
6826
6890
|
}
|
|
6827
6891
|
/**
|
|
6828
6892
|
* Обновляет данные заказа-черновика и возвращает обновлённые данные.
|
|
@@ -6833,7 +6897,7 @@ class Ti extends Y {
|
|
|
6833
6897
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_change
|
|
6834
6898
|
*/
|
|
6835
6899
|
updateOffer(r, e) {
|
|
6836
|
-
return this.patch(`/internal/orders/offers/${r}`, { name: e }, (t) => new
|
|
6900
|
+
return this.patch(`/internal/orders/offers/${r}`, { name: e }, (t) => new F(t.data));
|
|
6837
6901
|
}
|
|
6838
6902
|
/**
|
|
6839
6903
|
* Удаляет заказ-черновик.
|
|
@@ -6859,7 +6923,7 @@ class Ti extends Y {
|
|
|
6859
6923
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
|
|
6860
6924
|
*/
|
|
6861
6925
|
createOrderFromDraft(r, e, t, i = {}) {
|
|
6862
|
-
const o =
|
|
6926
|
+
const o = O().config.dateFormats.api;
|
|
6863
6927
|
return this.post(
|
|
6864
6928
|
`/internal/orders/offers/${r}/create-order`,
|
|
6865
6929
|
{
|
|
@@ -6896,7 +6960,7 @@ class Ti extends Y {
|
|
|
6896
6960
|
is_additional_sale: e.isAdditionalSale,
|
|
6897
6961
|
...e.configuratorParams
|
|
6898
6962
|
},
|
|
6899
|
-
(i) => new
|
|
6963
|
+
(i) => new F(i.data),
|
|
6900
6964
|
t
|
|
6901
6965
|
);
|
|
6902
6966
|
}
|
|
@@ -6926,7 +6990,7 @@ class Ti extends Y {
|
|
|
6926
6990
|
is_additional_sale: t.isAdditionalSale,
|
|
6927
6991
|
...t.configuratorParams
|
|
6928
6992
|
},
|
|
6929
|
-
(o) => new
|
|
6993
|
+
(o) => new F(o.data),
|
|
6930
6994
|
i
|
|
6931
6995
|
);
|
|
6932
6996
|
}
|
|
@@ -6939,7 +7003,7 @@ class Ti extends Y {
|
|
|
6939
7003
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_product_delete
|
|
6940
7004
|
*/
|
|
6941
7005
|
deleteOfferProduct(r, e) {
|
|
6942
|
-
return this.delete(`/internal/orders/offers/${r}/products/${e}`, (t) => new
|
|
7006
|
+
return this.delete(`/internal/orders/offers/${r}/products/${e}`, (t) => new F(t.data));
|
|
6943
7007
|
}
|
|
6944
7008
|
/**
|
|
6945
7009
|
* Возвращает содержимое печатной формы заказа-черновика в формате HTML.
|
|
@@ -6995,11 +7059,11 @@ class di {
|
|
|
6995
7059
|
* @param offer Полные данные записи заказа-черновика.
|
|
6996
7060
|
*/
|
|
6997
7061
|
static isProfstroyOffer(r) {
|
|
6998
|
-
return !
|
|
7062
|
+
return !m(r) && r.isProfstroy === !0 && !m(r.actualization);
|
|
6999
7063
|
}
|
|
7000
7064
|
}
|
|
7001
|
-
var
|
|
7002
|
-
class
|
|
7065
|
+
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 || {});
|
|
7066
|
+
class $i {
|
|
7003
7067
|
/**
|
|
7004
7068
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
7005
7069
|
*
|
|
@@ -7066,11 +7130,11 @@ class Si {
|
|
|
7066
7130
|
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;
|
|
7067
7131
|
}
|
|
7068
7132
|
}
|
|
7069
|
-
class
|
|
7133
|
+
class At extends D {
|
|
7070
7134
|
}
|
|
7071
|
-
class
|
|
7135
|
+
class bt extends D {
|
|
7072
7136
|
}
|
|
7073
|
-
class
|
|
7137
|
+
class ki extends Fe {
|
|
7074
7138
|
/**
|
|
7075
7139
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
7076
7140
|
*
|
|
@@ -7098,7 +7162,7 @@ class $i extends Fe {
|
|
|
7098
7162
|
/**
|
|
7099
7163
|
* @inheritDoc
|
|
7100
7164
|
*/
|
|
7101
|
-
s(this, "createdAt", new
|
|
7165
|
+
s(this, "createdAt", new b());
|
|
7102
7166
|
/**
|
|
7103
7167
|
* @inheritDoc
|
|
7104
7168
|
*/
|
|
@@ -7106,7 +7170,7 @@ class $i extends Fe {
|
|
|
7106
7170
|
/**
|
|
7107
7171
|
* @inheritDoc
|
|
7108
7172
|
*/
|
|
7109
|
-
s(this, "deliveryDate", new
|
|
7173
|
+
s(this, "deliveryDate", new b());
|
|
7110
7174
|
/**
|
|
7111
7175
|
* @inheritDoc
|
|
7112
7176
|
*/
|
|
@@ -7134,7 +7198,7 @@ class $i extends Fe {
|
|
|
7134
7198
|
/**
|
|
7135
7199
|
* @inheritDoc
|
|
7136
7200
|
*/
|
|
7137
|
-
s(this, "attachedAt", new
|
|
7201
|
+
s(this, "attachedAt", new b());
|
|
7138
7202
|
/**
|
|
7139
7203
|
* @inheritDoc
|
|
7140
7204
|
*/
|
|
@@ -7171,7 +7235,7 @@ class $i extends Fe {
|
|
|
7171
7235
|
* @inheritDoc
|
|
7172
7236
|
*/
|
|
7173
7237
|
s(this, "onlyMyRegions");
|
|
7174
|
-
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new
|
|
7238
|
+
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new Z(u) : new At(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new oe(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 N(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 Re(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 bt(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new Me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
7175
7239
|
}
|
|
7176
7240
|
/**
|
|
7177
7241
|
* @inheritDoc
|
|
@@ -7188,7 +7252,7 @@ class $i extends Fe {
|
|
|
7188
7252
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
7189
7253
|
break;
|
|
7190
7254
|
case "deliveryType":
|
|
7191
|
-
this.deliveryType = new
|
|
7255
|
+
this.deliveryType = new K();
|
|
7192
7256
|
break;
|
|
7193
7257
|
case "clientCities":
|
|
7194
7258
|
this.clientCities = [];
|
|
@@ -7222,7 +7286,7 @@ class $i extends Fe {
|
|
|
7222
7286
|
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;
|
|
7223
7287
|
}
|
|
7224
7288
|
}
|
|
7225
|
-
class
|
|
7289
|
+
class ks {
|
|
7226
7290
|
/**
|
|
7227
7291
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
7228
7292
|
*
|
|
@@ -7245,10 +7309,10 @@ class $s {
|
|
|
7245
7309
|
* @inheritDoc
|
|
7246
7310
|
*/
|
|
7247
7311
|
s(this, "createdAt");
|
|
7248
|
-
this.user = new
|
|
7312
|
+
this.user = new N(r == null ? void 0 : r.user), this.status = new er(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new D(r.statusDetail) : void 0, this.createdAt = R(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
7249
7313
|
}
|
|
7250
7314
|
}
|
|
7251
|
-
class
|
|
7315
|
+
class Oi extends Y {
|
|
7252
7316
|
/**
|
|
7253
7317
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
7254
7318
|
*
|
|
@@ -7273,7 +7337,7 @@ class ki extends Y {
|
|
|
7273
7337
|
getOrdersCount(r, e = void 0) {
|
|
7274
7338
|
return this.get(
|
|
7275
7339
|
"/internal/orders/count",
|
|
7276
|
-
r ? { filters: JSON.stringify((r instanceof
|
|
7340
|
+
r ? { filters: JSON.stringify((r instanceof te ? r : new te(r)).toPrimitive()) } : {},
|
|
7277
7341
|
void 0,
|
|
7278
7342
|
void 0,
|
|
7279
7343
|
e
|
|
@@ -7314,7 +7378,7 @@ class ki extends Y {
|
|
|
7314
7378
|
* @see /doc/api/internal#/operations/api_internal_client_orders_create
|
|
7315
7379
|
*/
|
|
7316
7380
|
createClientOrder(r, e, t, i, o = {}) {
|
|
7317
|
-
const c =
|
|
7381
|
+
const c = O().config.dateFormats.api;
|
|
7318
7382
|
return this.post(
|
|
7319
7383
|
`/internal/clients/${r}/orders/${e}`,
|
|
7320
7384
|
{
|
|
@@ -7389,7 +7453,7 @@ class ki extends Y {
|
|
|
7389
7453
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
7390
7454
|
*/
|
|
7391
7455
|
updateOrder(r, e, t = {}) {
|
|
7392
|
-
const i =
|
|
7456
|
+
const i = O().config.dateFormats.api;
|
|
7393
7457
|
return this.patch(
|
|
7394
7458
|
`/internal/orders/${r}`,
|
|
7395
7459
|
{
|
|
@@ -7473,7 +7537,7 @@ class ki extends Y {
|
|
|
7473
7537
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_history_get
|
|
7474
7538
|
*/
|
|
7475
7539
|
getOrderStatusHistory(r) {
|
|
7476
|
-
return this.getTypedList(
|
|
7540
|
+
return this.getTypedList(ks, `/internal/orders/${r}/history`);
|
|
7477
7541
|
}
|
|
7478
7542
|
/**
|
|
7479
7543
|
* Возвращает содержимое печатной формы заказа в формате HTML.
|
|
@@ -7602,7 +7666,7 @@ class ki extends Y {
|
|
|
7602
7666
|
* @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
|
|
7603
7667
|
*/
|
|
7604
7668
|
getDeliveryCost(r, e, t, i = void 0) {
|
|
7605
|
-
const o =
|
|
7669
|
+
const o = O().config.dateFormats.api;
|
|
7606
7670
|
return this.get(
|
|
7607
7671
|
`/internal/orders/delivery/${r}/cost`,
|
|
7608
7672
|
{
|
|
@@ -7616,7 +7680,7 @@ class ki extends Y {
|
|
|
7616
7680
|
}
|
|
7617
7681
|
}
|
|
7618
7682
|
const Li = Symbol("currentOrder");
|
|
7619
|
-
class
|
|
7683
|
+
class fr {
|
|
7620
7684
|
/**
|
|
7621
7685
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
7622
7686
|
*
|
|
@@ -7643,12 +7707,12 @@ class pr {
|
|
|
7643
7707
|
* Источник клиентской цены.
|
|
7644
7708
|
*/
|
|
7645
7709
|
s(this, "source");
|
|
7646
|
-
this.client = new
|
|
7710
|
+
this.client = new oe(r == null ? void 0 : r.client), this.product = new q(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) ?? kr.Product;
|
|
7647
7711
|
}
|
|
7648
7712
|
}
|
|
7649
|
-
const
|
|
7713
|
+
const mr = (n) => {
|
|
7650
7714
|
var r, e, t, i, o;
|
|
7651
|
-
return n ?
|
|
7715
|
+
return n ? et(
|
|
7652
7716
|
{
|
|
7653
7717
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
7654
7718
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -7657,13 +7721,13 @@ const hr = (n) => {
|
|
|
7657
7721
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
7658
7722
|
hideNotActive: n.hideNotActive
|
|
7659
7723
|
},
|
|
7660
|
-
(c) =>
|
|
7724
|
+
(c) => m(c) || (W(c) || Ve(c)) && J(c)
|
|
7661
7725
|
) : {};
|
|
7662
|
-
},
|
|
7726
|
+
}, Gr = (n) => {
|
|
7663
7727
|
const r = {};
|
|
7664
7728
|
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;
|
|
7665
7729
|
};
|
|
7666
|
-
class
|
|
7730
|
+
class Ii extends h {
|
|
7667
7731
|
/**
|
|
7668
7732
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
7669
7733
|
*
|
|
@@ -7677,10 +7741,10 @@ class Oi extends h {
|
|
|
7677
7741
|
return this.get(
|
|
7678
7742
|
`/internal/price/products/${r}/analyze`,
|
|
7679
7743
|
{
|
|
7680
|
-
...
|
|
7681
|
-
filters:
|
|
7744
|
+
...Gr(e),
|
|
7745
|
+
filters: mr(t)
|
|
7682
7746
|
},
|
|
7683
|
-
(i) => _.instanceListInitializer(
|
|
7747
|
+
(i) => _.instanceListInitializer(fr, i.data)
|
|
7684
7748
|
);
|
|
7685
7749
|
}
|
|
7686
7750
|
/**
|
|
@@ -7696,10 +7760,10 @@ class Oi extends h {
|
|
|
7696
7760
|
return this.get(
|
|
7697
7761
|
`/internal/price/categories/${r}/analyze`,
|
|
7698
7762
|
{
|
|
7699
|
-
...
|
|
7700
|
-
filters:
|
|
7763
|
+
...Gr(e),
|
|
7764
|
+
filters: mr(t)
|
|
7701
7765
|
},
|
|
7702
|
-
(i) => _.instanceListInitializer(
|
|
7766
|
+
(i) => _.instanceListInitializer(fr, i.data)
|
|
7703
7767
|
);
|
|
7704
7768
|
}
|
|
7705
7769
|
/**
|
|
@@ -7718,13 +7782,13 @@ class Oi extends h {
|
|
|
7718
7782
|
`/internal/price/categories/${r}/analyze/square`,
|
|
7719
7783
|
{
|
|
7720
7784
|
...e,
|
|
7721
|
-
filters:
|
|
7785
|
+
filters: mr(t)
|
|
7722
7786
|
},
|
|
7723
|
-
(i) => _.instanceListInitializer(
|
|
7787
|
+
(i) => _.instanceListInitializer(fr, i.data)
|
|
7724
7788
|
);
|
|
7725
7789
|
}
|
|
7726
7790
|
}
|
|
7727
|
-
class
|
|
7791
|
+
class Os {
|
|
7728
7792
|
/**
|
|
7729
7793
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
7730
7794
|
*
|
|
@@ -7771,10 +7835,10 @@ class ks {
|
|
|
7771
7835
|
* @inheritDoc
|
|
7772
7836
|
*/
|
|
7773
7837
|
s(this, "currency");
|
|
7774
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = R(r.costDate) ?
|
|
7838
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = R(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Ee(r.product) : void 0, this.client = r.client ? new N(r.client) : void 0, this.executor = r.executor ? new N(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
|
|
7775
7839
|
}
|
|
7776
7840
|
}
|
|
7777
|
-
class Ls extends
|
|
7841
|
+
class Ls extends Ee {
|
|
7778
7842
|
/**
|
|
7779
7843
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
7780
7844
|
*
|
|
@@ -7786,10 +7850,10 @@ class Ls extends Ne {
|
|
|
7786
7850
|
* @inheritDoc
|
|
7787
7851
|
*/
|
|
7788
7852
|
s(this, "history");
|
|
7789
|
-
this.history = De(e.history, (t) => new
|
|
7853
|
+
this.history = De(e.history, (t) => new Os(t));
|
|
7790
7854
|
}
|
|
7791
7855
|
}
|
|
7792
|
-
class
|
|
7856
|
+
class xi extends h {
|
|
7793
7857
|
/**
|
|
7794
7858
|
* Возвращает данные об истории изменения цен.
|
|
7795
7859
|
*
|
|
@@ -7799,21 +7863,21 @@ class Ii extends h {
|
|
|
7799
7863
|
*/
|
|
7800
7864
|
getProductPriceHistory(r) {
|
|
7801
7865
|
var o, c, u, p, g;
|
|
7802
|
-
const e =
|
|
7803
|
-
|
|
7866
|
+
const e = O().config.dateFormats.api, t = et(
|
|
7867
|
+
Ne(r, {
|
|
7804
7868
|
costDate: {
|
|
7805
|
-
from:
|
|
7806
|
-
to:
|
|
7869
|
+
from: Je((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
7870
|
+
to: Je((u = r.costDate) == null ? void 0 : u.to) ? k(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
7807
7871
|
}
|
|
7808
7872
|
}),
|
|
7809
|
-
(
|
|
7873
|
+
(a) => m(a) || (W(a) || Ve(a)) && J(a)
|
|
7810
7874
|
), i = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
|
|
7811
|
-
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((
|
|
7812
|
-
new Ls(
|
|
7875
|
+
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((a) => [
|
|
7876
|
+
new Ls(Ne(a[0], { history: a }))
|
|
7813
7877
|
]);
|
|
7814
7878
|
}
|
|
7815
7879
|
}
|
|
7816
|
-
class
|
|
7880
|
+
class Yr {
|
|
7817
7881
|
/**
|
|
7818
7882
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
7819
7883
|
*
|
|
@@ -7828,10 +7892,10 @@ class Er {
|
|
|
7828
7892
|
* Список рекомендованных категорий продуктов.
|
|
7829
7893
|
*/
|
|
7830
7894
|
s(this, "productCategories", []);
|
|
7831
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
7895
|
+
r != null && r.products && (this.products = r.products.map((e) => new Ee(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Ee(e)));
|
|
7832
7896
|
}
|
|
7833
7897
|
}
|
|
7834
|
-
class
|
|
7898
|
+
class _i extends h {
|
|
7835
7899
|
/**
|
|
7836
7900
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
7837
7901
|
*
|
|
@@ -7839,7 +7903,7 @@ class xi extends h {
|
|
|
7839
7903
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
7840
7904
|
*/
|
|
7841
7905
|
getProductCategoryRecommendations(r) {
|
|
7842
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
7906
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Yr(e.data));
|
|
7843
7907
|
}
|
|
7844
7908
|
/**
|
|
7845
7909
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -7848,7 +7912,7 @@ class xi extends h {
|
|
|
7848
7912
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
7849
7913
|
*/
|
|
7850
7914
|
getProductRecommendations(r) {
|
|
7851
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
7915
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Yr(e.data));
|
|
7852
7916
|
}
|
|
7853
7917
|
/**
|
|
7854
7918
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -7877,12 +7941,12 @@ class xi extends h {
|
|
|
7877
7941
|
});
|
|
7878
7942
|
}
|
|
7879
7943
|
}
|
|
7880
|
-
var
|
|
7881
|
-
class
|
|
7944
|
+
var Is = /* @__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))(Is || {}), xs = /* @__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))(xs || {});
|
|
7945
|
+
class _s extends D {
|
|
7882
7946
|
}
|
|
7883
|
-
class
|
|
7947
|
+
class Ns extends D {
|
|
7884
7948
|
}
|
|
7885
|
-
class Qr extends
|
|
7949
|
+
class Qr extends D {
|
|
7886
7950
|
/**
|
|
7887
7951
|
* Инициализирует экземпляр класса {@link CityWithUserRegion}.
|
|
7888
7952
|
*
|
|
@@ -7895,18 +7959,18 @@ class Qr extends C {
|
|
|
7895
7959
|
* @inheritDoc
|
|
7896
7960
|
*/
|
|
7897
7961
|
s(this, "userRegions");
|
|
7898
|
-
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new
|
|
7962
|
+
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new Ze(i))) ?? [];
|
|
7899
7963
|
}
|
|
7900
7964
|
}
|
|
7901
|
-
class qs extends
|
|
7965
|
+
class qs extends D {
|
|
7902
7966
|
}
|
|
7903
|
-
class
|
|
7967
|
+
class Es extends D {
|
|
7904
7968
|
}
|
|
7905
|
-
class Us extends
|
|
7969
|
+
class Us extends D {
|
|
7906
7970
|
}
|
|
7907
|
-
class Fs extends
|
|
7971
|
+
class Fs extends D {
|
|
7908
7972
|
}
|
|
7909
|
-
class
|
|
7973
|
+
class Ni {
|
|
7910
7974
|
/**
|
|
7911
7975
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
7912
7976
|
*
|
|
@@ -7925,7 +7989,7 @@ class _i {
|
|
|
7925
7989
|
return r.id === 0 && r.slug === "-undefined-";
|
|
7926
7990
|
}
|
|
7927
7991
|
}
|
|
7928
|
-
class
|
|
7992
|
+
class St extends D {
|
|
7929
7993
|
}
|
|
7930
7994
|
const B = class B extends Ue {
|
|
7931
7995
|
/**
|
|
@@ -7945,14 +8009,14 @@ const B = class B extends Ue {
|
|
|
7945
8009
|
* и использовать в случае аналогичных запросов.
|
|
7946
8010
|
*/
|
|
7947
8011
|
getReference(r, e = !1) {
|
|
7948
|
-
return this.getTypedDataArrayRequester(
|
|
8012
|
+
return this.getTypedDataArrayRequester(_s, `/internal/references/${r}`, e);
|
|
7949
8013
|
}
|
|
7950
8014
|
/**
|
|
7951
8015
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
7952
8016
|
* первичного интереса.
|
|
7953
8017
|
*/
|
|
7954
8018
|
getChannelPrimaryInterest() {
|
|
7955
|
-
return this.getTypedDataArrayRequester(
|
|
8019
|
+
return this.getTypedDataArrayRequester(wt, "/internal/references/channel-primary-interest", !0);
|
|
7956
8020
|
}
|
|
7957
8021
|
/**
|
|
7958
8022
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
@@ -7964,7 +8028,7 @@ const B = class B extends Ue {
|
|
|
7964
8028
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
7965
8029
|
*/
|
|
7966
8030
|
getCuratedDirection() {
|
|
7967
|
-
return this.getTypedDataArrayRequester(
|
|
8031
|
+
return this.getTypedDataArrayRequester(Ir, "/internal/references/curated-direction", !0);
|
|
7968
8032
|
}
|
|
7969
8033
|
/**
|
|
7970
8034
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -7983,25 +8047,25 @@ const B = class B extends Ue {
|
|
|
7983
8047
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
7984
8048
|
*/
|
|
7985
8049
|
getOpf() {
|
|
7986
|
-
return this.getTypedDataArrayRequester(
|
|
8050
|
+
return this.getTypedDataArrayRequester(ie, "/public/references/opf", !0);
|
|
7987
8051
|
}
|
|
7988
8052
|
/**
|
|
7989
8053
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
7990
8054
|
*/
|
|
7991
8055
|
getOperators() {
|
|
7992
|
-
return this.getTypedDataArrayRequester(
|
|
8056
|
+
return this.getTypedDataArrayRequester(At, "/internal/references/operator", !0);
|
|
7993
8057
|
}
|
|
7994
8058
|
/**
|
|
7995
8059
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
7996
8060
|
*/
|
|
7997
8061
|
getOrderPaymentStatuses() {
|
|
7998
|
-
return this.getTypedDataArrayRequester(
|
|
8062
|
+
return this.getTypedDataArrayRequester(Es, "/public/references/order-payment-status", !0);
|
|
7999
8063
|
}
|
|
8000
8064
|
/**
|
|
8001
8065
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
8002
8066
|
*/
|
|
8003
8067
|
getOrderStatuses() {
|
|
8004
|
-
return this.getTypedDataArrayRequester(
|
|
8068
|
+
return this.getTypedDataArrayRequester(er, "/internal/references/order-status", !0);
|
|
8005
8069
|
}
|
|
8006
8070
|
/**
|
|
8007
8071
|
* Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
|
|
@@ -8013,25 +8077,25 @@ const B = class B extends Ue {
|
|
|
8013
8077
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
8014
8078
|
*/
|
|
8015
8079
|
getPaymentTypes() {
|
|
8016
|
-
return this.getTypedDataArrayRequester(
|
|
8080
|
+
return this.getTypedDataArrayRequester(bt, "/public/references/payment-type", !0);
|
|
8017
8081
|
}
|
|
8018
8082
|
/**
|
|
8019
8083
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
8020
8084
|
*/
|
|
8021
8085
|
getResourceTypes() {
|
|
8022
|
-
return this.getTypedDataArrayRequester(
|
|
8086
|
+
return this.getTypedDataArrayRequester(St, "/internal/references/resource-type", !0);
|
|
8023
8087
|
}
|
|
8024
8088
|
/**
|
|
8025
8089
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
8026
8090
|
*/
|
|
8027
8091
|
getSalesDirections() {
|
|
8028
|
-
return this.getTypedDataArrayRequester(
|
|
8092
|
+
return this.getTypedDataArrayRequester(U, "/public/references/sales-direction", !0);
|
|
8029
8093
|
}
|
|
8030
8094
|
/**
|
|
8031
8095
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
8032
8096
|
*/
|
|
8033
8097
|
getSourcePrimaryInterest() {
|
|
8034
|
-
return this.getTypedDataArrayRequester(
|
|
8098
|
+
return this.getTypedDataArrayRequester(vt, "/internal/references/source-primary-interest", !0);
|
|
8035
8099
|
}
|
|
8036
8100
|
/**
|
|
8037
8101
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -8039,7 +8103,7 @@ const B = class B extends Ue {
|
|
|
8039
8103
|
* @param term Терм поиска.
|
|
8040
8104
|
*/
|
|
8041
8105
|
searchCity(r) {
|
|
8042
|
-
return this.getTypedDataArrayRequester(
|
|
8106
|
+
return this.getTypedDataArrayRequester(Re, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
8043
8107
|
}
|
|
8044
8108
|
/**
|
|
8045
8109
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -8047,7 +8111,7 @@ const B = class B extends Ue {
|
|
|
8047
8111
|
* @param term Терм поиска.
|
|
8048
8112
|
*/
|
|
8049
8113
|
searchRegion(r) {
|
|
8050
|
-
return this.getTypedDataArrayRequester(
|
|
8114
|
+
return this.getTypedDataArrayRequester(ve, `/internal/references/region-with-country/search?term=${r}`);
|
|
8051
8115
|
}
|
|
8052
8116
|
/**
|
|
8053
8117
|
* Возвращает {@link Promise} для получения справочника регионов указанной страны.
|
|
@@ -8057,7 +8121,7 @@ const B = class B extends Ue {
|
|
|
8057
8121
|
* @param countryId Идентификатор страны.
|
|
8058
8122
|
*/
|
|
8059
8123
|
getRegionsByCountry(r) {
|
|
8060
|
-
return this.getTypedDataArrayRequester(
|
|
8124
|
+
return this.getTypedDataArrayRequester(ve, "/internal/references/region", !1, { params: { countryId: r } }).then(
|
|
8061
8125
|
(e) => B.withoutUnknownLocation(e)
|
|
8062
8126
|
);
|
|
8063
8127
|
}
|
|
@@ -8069,7 +8133,7 @@ const B = class B extends Ue {
|
|
|
8069
8133
|
* @param regionId Идентификатор региона.
|
|
8070
8134
|
*/
|
|
8071
8135
|
getCitiesByRegion(r) {
|
|
8072
|
-
return this.getTypedDataArrayRequester(
|
|
8136
|
+
return this.getTypedDataArrayRequester(Ns, "/internal/references/city", !1, { params: { regionId: r } }).then(
|
|
8073
8137
|
(e) => B.withoutUnknownLocation(e)
|
|
8074
8138
|
);
|
|
8075
8139
|
}
|
|
@@ -8094,7 +8158,7 @@ const B = class B extends Ue {
|
|
|
8094
8158
|
*/
|
|
8095
8159
|
searchCityWithRegion(r, e, t = void 0) {
|
|
8096
8160
|
return this.getTypedDataArrayRequester(
|
|
8097
|
-
|
|
8161
|
+
Re,
|
|
8098
8162
|
"/internal/references/city-with-region/search",
|
|
8099
8163
|
!1,
|
|
8100
8164
|
{ term: r, ...e ? { params: { countryId: e } } : {} },
|
|
@@ -8119,13 +8183,13 @@ const B = class B extends Ue {
|
|
|
8119
8183
|
* @param term Терм поиска.
|
|
8120
8184
|
*/
|
|
8121
8185
|
searchCountry(r) {
|
|
8122
|
-
return this.getTypedDataArrayRequester(
|
|
8186
|
+
return this.getTypedDataArrayRequester(we, `/internal/references/country/search?term=${r}`);
|
|
8123
8187
|
}
|
|
8124
8188
|
/**
|
|
8125
8189
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
8126
8190
|
*/
|
|
8127
8191
|
getDeliveryTypes() {
|
|
8128
|
-
return this.getTypedDataArrayRequester(
|
|
8192
|
+
return this.getTypedDataArrayRequester(K, "/internal/references/delivery-type", !0);
|
|
8129
8193
|
}
|
|
8130
8194
|
/**
|
|
8131
8195
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
@@ -8137,7 +8201,7 @@ const B = class B extends Ue {
|
|
|
8137
8201
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
8138
8202
|
*/
|
|
8139
8203
|
getPropertyTypes() {
|
|
8140
|
-
return this.getTypedDataArrayRequester(
|
|
8204
|
+
return this.getTypedDataArrayRequester(gt, "/internal/references/property-type", !0);
|
|
8141
8205
|
}
|
|
8142
8206
|
/**
|
|
8143
8207
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -8157,9 +8221,9 @@ const B = class B extends Ue {
|
|
|
8157
8221
|
* обозначающих неизвестное местоположение.
|
|
8158
8222
|
*/
|
|
8159
8223
|
s(B, "unknownLocationId", 1);
|
|
8160
|
-
let
|
|
8161
|
-
const
|
|
8162
|
-
const n =
|
|
8224
|
+
let S = B;
|
|
8225
|
+
const d = ne("common.references_private", () => {
|
|
8226
|
+
const n = v({}), r = v(void 0), e = v(void 0), t = v(void 0), i = v(void 0), o = v(void 0), c = v(void 0), u = v(void 0), p = v(void 0), g = v(void 0), a = v(void 0), P = v(void 0), be = v(void 0), Se = v(void 0), ce = v(void 0), le = v(void 0), rr = v(void 0), tr = v(void 0), sr = v(void 0), l = v(void 0);
|
|
8163
8227
|
return {
|
|
8164
8228
|
/**
|
|
8165
8229
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -8204,7 +8268,7 @@ const S = ie("common.references_private", () => {
|
|
|
8204
8268
|
/**
|
|
8205
8269
|
* Справочник детализирующих статусов (подстатусов) заказов.
|
|
8206
8270
|
*/
|
|
8207
|
-
orderStatusDetailReference:
|
|
8271
|
+
orderStatusDetailReference: a,
|
|
8208
8272
|
/**
|
|
8209
8273
|
* Справочник типов оплаты заказов.
|
|
8210
8274
|
*/
|
|
@@ -8212,132 +8276,132 @@ const S = ie("common.references_private", () => {
|
|
|
8212
8276
|
/**
|
|
8213
8277
|
* Справочник групп партнеров.
|
|
8214
8278
|
*/
|
|
8215
|
-
partnerGroupReference:
|
|
8279
|
+
partnerGroupReference: be,
|
|
8216
8280
|
/**
|
|
8217
8281
|
* Справочник типов файлов продукктов/категорий.
|
|
8218
8282
|
*/
|
|
8219
|
-
productFileTypeReference:
|
|
8283
|
+
productFileTypeReference: Se,
|
|
8220
8284
|
/**
|
|
8221
8285
|
* Справочник типов ресурсов.
|
|
8222
8286
|
*/
|
|
8223
|
-
resourceTypesReference:
|
|
8287
|
+
resourceTypesReference: ce,
|
|
8224
8288
|
/**
|
|
8225
8289
|
* Справочник направлений продаж.
|
|
8226
8290
|
*/
|
|
8227
|
-
salesDirectionsReference:
|
|
8291
|
+
salesDirectionsReference: le,
|
|
8228
8292
|
/**
|
|
8229
8293
|
* Справочник источников первичного интереса.
|
|
8230
8294
|
*/
|
|
8231
|
-
sourcePrimaryInterestReference:
|
|
8295
|
+
sourcePrimaryInterestReference: rr,
|
|
8232
8296
|
/**
|
|
8233
8297
|
* Справочник складов.
|
|
8234
8298
|
*/
|
|
8235
|
-
warehousesReference:
|
|
8299
|
+
warehousesReference: tr,
|
|
8236
8300
|
/**
|
|
8237
8301
|
* Справочник типов свойств.
|
|
8238
8302
|
*/
|
|
8239
|
-
propertyTypesReference:
|
|
8303
|
+
propertyTypesReference: sr,
|
|
8240
8304
|
/**
|
|
8241
8305
|
* Справочник коэффициентов цен.
|
|
8242
8306
|
*/
|
|
8243
8307
|
priceCoefficientsReference: l
|
|
8244
8308
|
};
|
|
8245
|
-
}), qi =
|
|
8309
|
+
}), qi = ne("common.references", () => {
|
|
8246
8310
|
const n = A(() => {
|
|
8247
|
-
const l =
|
|
8248
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
8311
|
+
const l = d();
|
|
8312
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(S).getChannelPrimaryInterest().then((f) => {
|
|
8249
8313
|
l.channelPrimaryInterestReference = f;
|
|
8250
|
-
}).catch(
|
|
8314
|
+
}).catch(T)), l.channelPrimaryInterestReference;
|
|
8251
8315
|
}), r = A(() => {
|
|
8252
|
-
const l =
|
|
8253
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
8316
|
+
const l = d();
|
|
8317
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(S).getContactPositions().then((f) => {
|
|
8254
8318
|
l.contactPositionsReference = f;
|
|
8255
|
-
}).catch(
|
|
8319
|
+
}).catch(T)), l.contactPositionsReference;
|
|
8256
8320
|
}), e = A(() => {
|
|
8257
|
-
const l =
|
|
8258
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
8321
|
+
const l = d();
|
|
8322
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(S).getCurrency().then((f) => {
|
|
8259
8323
|
l.currencyReference = f;
|
|
8260
|
-
}).catch(
|
|
8324
|
+
}).catch(T)), l.currencyReference;
|
|
8261
8325
|
}), t = A(() => {
|
|
8262
|
-
const l =
|
|
8263
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
8326
|
+
const l = d();
|
|
8327
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(S).getOpf().then((f) => {
|
|
8264
8328
|
l.opfReference = f;
|
|
8265
|
-
}).catch(
|
|
8329
|
+
}).catch(T)), l.opfReference;
|
|
8266
8330
|
}), i = A(() => {
|
|
8267
|
-
const l =
|
|
8268
|
-
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(
|
|
8331
|
+
const l = d();
|
|
8332
|
+
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(S).getOperators().then((f) => {
|
|
8269
8333
|
l.operatorReference = f;
|
|
8270
|
-
}).catch(
|
|
8334
|
+
}).catch(T)), l.operatorReference;
|
|
8271
8335
|
}), o = A(() => {
|
|
8272
|
-
const l =
|
|
8273
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
8336
|
+
const l = d();
|
|
8337
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(S).getOrderPaymentStatuses().then((f) => {
|
|
8274
8338
|
l.orderPaymentStatusReference = f;
|
|
8275
|
-
}).catch(
|
|
8339
|
+
}).catch(T)), l.orderPaymentStatusReference;
|
|
8276
8340
|
}), c = A(() => {
|
|
8277
|
-
const l =
|
|
8278
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
8341
|
+
const l = d();
|
|
8342
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(S).getOrderStatuses().then((f) => {
|
|
8279
8343
|
l.orderStatusReference = f;
|
|
8280
|
-
}).catch(
|
|
8344
|
+
}).catch(T)), l.orderStatusReference;
|
|
8281
8345
|
}), u = A(() => {
|
|
8282
|
-
const l =
|
|
8283
|
-
return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(
|
|
8346
|
+
const l = d();
|
|
8347
|
+
return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(S).getOrderStatusDetails().then((f) => {
|
|
8284
8348
|
l.orderStatusDetailReference = f;
|
|
8285
|
-
}).catch(
|
|
8349
|
+
}).catch(T)), l.orderStatusDetailReference;
|
|
8286
8350
|
}), p = A(() => {
|
|
8287
|
-
const l =
|
|
8288
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
8351
|
+
const l = d();
|
|
8352
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(S).getPaymentTypes().then((f) => {
|
|
8289
8353
|
l.paymentTypeReference = f;
|
|
8290
|
-
}).catch(
|
|
8354
|
+
}).catch(T)), l.paymentTypeReference;
|
|
8291
8355
|
}), g = A(() => {
|
|
8292
|
-
const l =
|
|
8293
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
8356
|
+
const l = d();
|
|
8357
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(S).getPartnerGroup().then((f) => {
|
|
8294
8358
|
l.partnerGroupReference = f;
|
|
8295
|
-
}).catch(
|
|
8296
|
-
}),
|
|
8297
|
-
const l =
|
|
8298
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
8359
|
+
}).catch(T)), l.partnerGroupReference;
|
|
8360
|
+
}), a = A(() => {
|
|
8361
|
+
const l = d();
|
|
8362
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(S).getProductFileType().then((f) => {
|
|
8299
8363
|
l.productFileTypeReference = f;
|
|
8300
|
-
}).catch(
|
|
8364
|
+
}).catch(T)), l.productFileTypeReference;
|
|
8301
8365
|
}), P = A(() => {
|
|
8302
|
-
const l =
|
|
8303
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
8366
|
+
const l = d();
|
|
8367
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(S).getResourceTypes().then((f) => {
|
|
8304
8368
|
l.resourceTypesReference = f;
|
|
8305
|
-
}).catch(
|
|
8306
|
-
}),
|
|
8307
|
-
const l =
|
|
8308
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
8369
|
+
}).catch(T)), l.resourceTypesReference;
|
|
8370
|
+
}), be = A(() => {
|
|
8371
|
+
const l = d();
|
|
8372
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(S).getSalesDirections().then((f) => {
|
|
8309
8373
|
l.salesDirectionsReference = f;
|
|
8310
|
-
}).catch(
|
|
8311
|
-
}),
|
|
8312
|
-
const l =
|
|
8313
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
8374
|
+
}).catch(T)), l.salesDirectionsReference;
|
|
8375
|
+
}), Se = A(() => {
|
|
8376
|
+
const l = d();
|
|
8377
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(S).getSourcePrimaryInterest().then((f) => {
|
|
8314
8378
|
l.sourcePrimaryInterestReference = f;
|
|
8315
|
-
}).catch(
|
|
8316
|
-
}), oe = A(() => {
|
|
8317
|
-
const l = S();
|
|
8318
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(d).getDeliveryTypes().then((f) => {
|
|
8319
|
-
l.deliveryTypeReference = f;
|
|
8320
|
-
}).catch(D)), l.deliveryTypeReference;
|
|
8379
|
+
}).catch(T)), l.sourcePrimaryInterestReference;
|
|
8321
8380
|
}), ce = A(() => {
|
|
8322
|
-
const l =
|
|
8381
|
+
const l = d();
|
|
8382
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(S).getDeliveryTypes().then((f) => {
|
|
8383
|
+
l.deliveryTypeReference = f;
|
|
8384
|
+
}).catch(T)), l.deliveryTypeReference;
|
|
8385
|
+
}), le = A(() => {
|
|
8386
|
+
const l = d();
|
|
8323
8387
|
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Dt).getManagers().then((f) => {
|
|
8324
8388
|
l.managersList = f;
|
|
8325
|
-
}).catch(
|
|
8326
|
-
}),
|
|
8327
|
-
const l =
|
|
8328
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
8389
|
+
}).catch(T)), l.managersList;
|
|
8390
|
+
}), rr = A(() => {
|
|
8391
|
+
const l = d();
|
|
8392
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(S).getWarehouses().then((f) => {
|
|
8329
8393
|
l.warehousesReference = f;
|
|
8330
|
-
}).catch(
|
|
8331
|
-
}),
|
|
8332
|
-
const l =
|
|
8333
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
8394
|
+
}).catch(T)), l.warehousesReference;
|
|
8395
|
+
}), tr = A(() => {
|
|
8396
|
+
const l = d();
|
|
8397
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(S).getPropertyTypes().then((f) => {
|
|
8334
8398
|
l.propertyTypesReference = f;
|
|
8335
|
-
}).catch(
|
|
8336
|
-
}),
|
|
8337
|
-
const l =
|
|
8338
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
8399
|
+
}).catch(T)), l.propertyTypesReference;
|
|
8400
|
+
}), sr = A(() => {
|
|
8401
|
+
const l = d();
|
|
8402
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(S).getPriceCoefficients().then((f) => {
|
|
8339
8403
|
l.priceCoefficientsReference = f;
|
|
8340
|
-
}).catch(
|
|
8404
|
+
}).catch(T)), l.priceCoefficientsReference;
|
|
8341
8405
|
});
|
|
8342
8406
|
return {
|
|
8343
8407
|
/**
|
|
@@ -8383,7 +8447,7 @@ const S = ie("common.references_private", () => {
|
|
|
8383
8447
|
/**
|
|
8384
8448
|
* Справочник типов файлов продуктов/категорий.
|
|
8385
8449
|
*/
|
|
8386
|
-
productFilesTypesReference:
|
|
8450
|
+
productFilesTypesReference: a,
|
|
8387
8451
|
/**
|
|
8388
8452
|
* Справочник типов ресурсов.
|
|
8389
8453
|
*/
|
|
@@ -8391,31 +8455,31 @@ const S = ie("common.references_private", () => {
|
|
|
8391
8455
|
/**
|
|
8392
8456
|
* Справочник направлений продаж.
|
|
8393
8457
|
*/
|
|
8394
|
-
salesDirectionsReference:
|
|
8458
|
+
salesDirectionsReference: be,
|
|
8395
8459
|
/**
|
|
8396
8460
|
* Справочник каналов первичного интереса.
|
|
8397
8461
|
*/
|
|
8398
|
-
sourcePrimaryInterestsReference:
|
|
8462
|
+
sourcePrimaryInterestsReference: Se,
|
|
8399
8463
|
/**
|
|
8400
8464
|
* Справочник типов доставки.
|
|
8401
8465
|
*/
|
|
8402
|
-
deliveryTypeReference:
|
|
8466
|
+
deliveryTypeReference: ce,
|
|
8403
8467
|
/**
|
|
8404
8468
|
* Список менеджеров.
|
|
8405
8469
|
*/
|
|
8406
|
-
managersList:
|
|
8470
|
+
managersList: le,
|
|
8407
8471
|
/**
|
|
8408
8472
|
* Справочник складов.
|
|
8409
8473
|
*/
|
|
8410
|
-
warehousesReference:
|
|
8474
|
+
warehousesReference: rr,
|
|
8411
8475
|
/**
|
|
8412
8476
|
* Справочник типов свойств.
|
|
8413
8477
|
*/
|
|
8414
|
-
propertyTypesReference:
|
|
8478
|
+
propertyTypesReference: tr,
|
|
8415
8479
|
/**
|
|
8416
8480
|
* Справочник коэффициентов цен.
|
|
8417
8481
|
*/
|
|
8418
|
-
priceCoefficientsReference:
|
|
8482
|
+
priceCoefficientsReference: sr
|
|
8419
8483
|
};
|
|
8420
8484
|
});
|
|
8421
8485
|
class Ms {
|
|
@@ -8476,10 +8540,10 @@ class Vr {
|
|
|
8476
8540
|
*/
|
|
8477
8541
|
s(this, "tags");
|
|
8478
8542
|
var e;
|
|
8479
|
-
this.resourceType = new
|
|
8543
|
+
this.resourceType = new St(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 Ms(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
8480
8544
|
}
|
|
8481
8545
|
}
|
|
8482
|
-
class
|
|
8546
|
+
class Ei extends h {
|
|
8483
8547
|
/**
|
|
8484
8548
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
8485
8549
|
*
|
|
@@ -8558,7 +8622,7 @@ class Ui extends h {
|
|
|
8558
8622
|
}
|
|
8559
8623
|
}
|
|
8560
8624
|
var dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.ExternalSeo = "external_seo", n.Guest = "guest", n))(dt || {});
|
|
8561
|
-
class Hs extends
|
|
8625
|
+
class Hs extends ht {
|
|
8562
8626
|
/**
|
|
8563
8627
|
* Инициализирует экземпляр класса {@link User}.
|
|
8564
8628
|
*
|
|
@@ -8582,7 +8646,7 @@ class Hs extends pt {
|
|
|
8582
8646
|
* Роль ценообразования текущего пользователя.
|
|
8583
8647
|
*/
|
|
8584
8648
|
s(this, "pricingRole");
|
|
8585
|
-
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
|
|
8649
|
+
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 ut(e.pricingRole) : void 0;
|
|
8586
8650
|
}
|
|
8587
8651
|
}
|
|
8588
8652
|
class Fi extends h {
|
|
@@ -8590,7 +8654,7 @@ class Fi extends h {
|
|
|
8590
8654
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
8591
8655
|
*/
|
|
8592
8656
|
constructor() {
|
|
8593
|
-
super(), this.baseUrl = `${
|
|
8657
|
+
super(), this.baseUrl = `${O().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
8594
8658
|
}
|
|
8595
8659
|
/**
|
|
8596
8660
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -8610,8 +8674,8 @@ class Bs extends h {
|
|
|
8610
8674
|
return this.get("/internal/users/info", {}, (r) => new Hs(r.data), !0);
|
|
8611
8675
|
}
|
|
8612
8676
|
}
|
|
8613
|
-
const
|
|
8614
|
-
const n =
|
|
8677
|
+
const Pr = ne("common.user_state_private", () => {
|
|
8678
|
+
const n = v({}), r = v(void 0), e = v(void 0);
|
|
8615
8679
|
return {
|
|
8616
8680
|
/**
|
|
8617
8681
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -8628,22 +8692,22 @@ const Rr = ie("common.user_state_private", () => {
|
|
|
8628
8692
|
};
|
|
8629
8693
|
});
|
|
8630
8694
|
function Jr(n) {
|
|
8631
|
-
const r =
|
|
8695
|
+
const r = Pr();
|
|
8632
8696
|
(n == null ? void 0 : n.type) !== dt.Manager || r.currentManager || r.dataLoaderList.currentManager || (r.dataLoaderList.currentManager = !0, h.getInstance(Dt).getManager(n.id).then((e) => {
|
|
8633
8697
|
r.currentManager = e;
|
|
8634
|
-
}).catch(
|
|
8698
|
+
}).catch(T).finally(() => {
|
|
8635
8699
|
r.dataLoaderList.currentManager = !1;
|
|
8636
8700
|
}));
|
|
8637
8701
|
}
|
|
8638
|
-
const Mi =
|
|
8702
|
+
const Mi = ne("common.user_state", () => {
|
|
8639
8703
|
const n = A(() => {
|
|
8640
|
-
const e =
|
|
8704
|
+
const e = Pr();
|
|
8641
8705
|
return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(Bs).getCurrentUser().then((t) => {
|
|
8642
8706
|
e.currentUser = t, Jr(t);
|
|
8643
|
-
}).catch(
|
|
8707
|
+
}).catch(T).finally(() => {
|
|
8644
8708
|
e.dataLoaderList.currentUser = !1;
|
|
8645
8709
|
})), e.currentUser;
|
|
8646
|
-
}), r = A(() => (Jr(n.value),
|
|
8710
|
+
}), r = A(() => (Jr(n.value), Pr().currentManager));
|
|
8647
8711
|
return {
|
|
8648
8712
|
/**
|
|
8649
8713
|
* Данные о текущем пользователе.
|
|
@@ -8655,7 +8719,7 @@ const Mi = ie("common.user_state", () => {
|
|
|
8655
8719
|
currentManager: r
|
|
8656
8720
|
};
|
|
8657
8721
|
});
|
|
8658
|
-
class
|
|
8722
|
+
class Ar {
|
|
8659
8723
|
/**
|
|
8660
8724
|
* Инициализирует экземпляр класса {@link UserRegionEmployee}.
|
|
8661
8725
|
*
|
|
@@ -8670,10 +8734,10 @@ class Pr {
|
|
|
8670
8734
|
* @inheritDoc
|
|
8671
8735
|
*/
|
|
8672
8736
|
s(this, "salesDirection");
|
|
8673
|
-
this.user = new
|
|
8737
|
+
this.user = new N(r == null ? void 0 : r.user), this.salesDirection = new U(r == null ? void 0 : r.salesDirection);
|
|
8674
8738
|
}
|
|
8675
8739
|
}
|
|
8676
|
-
class
|
|
8740
|
+
class yr extends Ze {
|
|
8677
8741
|
/**
|
|
8678
8742
|
* Инициализирует экземпляр класса {@link UserRegion}.
|
|
8679
8743
|
*
|
|
@@ -8690,7 +8754,7 @@ class gr extends Ve {
|
|
|
8690
8754
|
* @inheritDoc
|
|
8691
8755
|
*/
|
|
8692
8756
|
s(this, "users");
|
|
8693
|
-
this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new
|
|
8757
|
+
this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new Re(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new Ar(o))) ?? [];
|
|
8694
8758
|
}
|
|
8695
8759
|
}
|
|
8696
8760
|
class Hi extends Fe {
|
|
@@ -8740,7 +8804,7 @@ class Bi extends Y {
|
|
|
8740
8804
|
* @see /doc/api/internal#/operations/api_internal_user_region_get_list
|
|
8741
8805
|
*/
|
|
8742
8806
|
getRegionsList(r, e, t) {
|
|
8743
|
-
return this.getTypedPaginated(
|
|
8807
|
+
return this.getTypedPaginated(Ze, "/internal/users/regions", r, e, t);
|
|
8744
8808
|
}
|
|
8745
8809
|
/**
|
|
8746
8810
|
* Возвращает полные данные о регионе пользователей.
|
|
@@ -8750,7 +8814,7 @@ class Bi extends Y {
|
|
|
8750
8814
|
* @see /doc/api/internal#/operations/api_internal_user_region_get
|
|
8751
8815
|
*/
|
|
8752
8816
|
getRegion(r) {
|
|
8753
|
-
return this.get(`/internal/users/regions/${r}`, {}, (e) => new
|
|
8817
|
+
return this.get(`/internal/users/regions/${r}`, {}, (e) => new yr(e.data));
|
|
8754
8818
|
}
|
|
8755
8819
|
/**
|
|
8756
8820
|
* Создаёт новый регион пользователей.
|
|
@@ -8763,7 +8827,7 @@ class Bi extends Y {
|
|
|
8763
8827
|
* @see /doc/api/internal#/operations/api_internal_user_region_create
|
|
8764
8828
|
*/
|
|
8765
8829
|
createRegion(r, e = {}) {
|
|
8766
|
-
return this.post("/internal/users/regions", r, (t) => new
|
|
8830
|
+
return this.post("/internal/users/regions", r, (t) => new yr(t.data), e);
|
|
8767
8831
|
}
|
|
8768
8832
|
/**
|
|
8769
8833
|
* Изменяет данные о регионе пользователей.
|
|
@@ -8777,7 +8841,7 @@ class Bi extends Y {
|
|
|
8777
8841
|
* @see /doc/api/internal#/operations/api_internal_user_region_change
|
|
8778
8842
|
*/
|
|
8779
8843
|
updateRegion(r, e, t = {}) {
|
|
8780
|
-
return this.patch(`/internal/users/regions/${r}`, e, (i) => new
|
|
8844
|
+
return this.patch(`/internal/users/regions/${r}`, e, (i) => new yr(i.data), t);
|
|
8781
8845
|
}
|
|
8782
8846
|
/**
|
|
8783
8847
|
* Удаляет регион пользователей.
|
|
@@ -8797,7 +8861,7 @@ class Bi extends Y {
|
|
|
8797
8861
|
* @see /doc/api/internal#/operations/api_internal_user_region_user_get_list
|
|
8798
8862
|
*/
|
|
8799
8863
|
getRegionEmployees(r) {
|
|
8800
|
-
return this.getTypedList(
|
|
8864
|
+
return this.getTypedList(Ar, `/internal/users/regions/${r}/users`);
|
|
8801
8865
|
}
|
|
8802
8866
|
/**
|
|
8803
8867
|
* Закрепляет сотрудника за регионом по указанному направлению продаж.
|
|
@@ -8809,7 +8873,7 @@ class Bi extends Y {
|
|
|
8809
8873
|
* @see /doc/api/internal#/operations/api_internal_user_region_user_add
|
|
8810
8874
|
*/
|
|
8811
8875
|
attachRegionEmployee(r, e, t) {
|
|
8812
|
-
return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new
|
|
8876
|
+
return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new Ar(i.data));
|
|
8813
8877
|
}
|
|
8814
8878
|
/**
|
|
8815
8879
|
* Открепляет сотрудника от региона по указанному направлению продаж.
|
|
@@ -8828,7 +8892,7 @@ class Bi extends Y {
|
|
|
8828
8892
|
});
|
|
8829
8893
|
}
|
|
8830
8894
|
}
|
|
8831
|
-
class
|
|
8895
|
+
class zi {
|
|
8832
8896
|
/**
|
|
8833
8897
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
8834
8898
|
*
|
|
@@ -8852,198 +8916,199 @@ class Wi {
|
|
|
8852
8916
|
}
|
|
8853
8917
|
}
|
|
8854
8918
|
export {
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8919
|
+
_s as AnyReference,
|
|
8920
|
+
os as AppBaseConfig,
|
|
8921
|
+
Cr as BankAccount,
|
|
8858
8922
|
Y as BasePaginationProvider,
|
|
8859
|
-
|
|
8860
|
-
|
|
8861
|
-
|
|
8862
|
-
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8866
|
-
|
|
8867
|
-
|
|
8868
|
-
|
|
8869
|
-
|
|
8870
|
-
|
|
8871
|
-
|
|
8872
|
-
|
|
8873
|
-
|
|
8874
|
-
|
|
8875
|
-
|
|
8876
|
-
|
|
8877
|
-
|
|
8878
|
-
|
|
8879
|
-
|
|
8923
|
+
ur as BlogPost,
|
|
8924
|
+
wr as BlogPostMediaFile,
|
|
8925
|
+
Ye as BlogPostMediaTypeEnum,
|
|
8926
|
+
Qe as BlogPostPublicationStatusEnum,
|
|
8927
|
+
ae as BlogPostShortInfo,
|
|
8928
|
+
Ks as BlogPostsListFilters,
|
|
8929
|
+
vr as BlogProvider,
|
|
8930
|
+
hs as CalculationTypeEnum,
|
|
8931
|
+
y as CalendarHelper,
|
|
8932
|
+
Oe as Cart,
|
|
8933
|
+
Zs as CartProvider,
|
|
8934
|
+
ri as CatalogProvider,
|
|
8935
|
+
nt as CatalogableItem,
|
|
8936
|
+
Q as Category,
|
|
8937
|
+
as as CategoryFilter,
|
|
8938
|
+
Br as CategoryFilterSetting,
|
|
8939
|
+
ys as CategoryFilterValue,
|
|
8940
|
+
Hr as CategoryPricingRule,
|
|
8941
|
+
wt as ChannelPrimaryInterest,
|
|
8942
|
+
Ns as City,
|
|
8943
|
+
Re as CityWithRegionAndCountry,
|
|
8880
8944
|
Qr as CityWithUserRegion,
|
|
8881
|
-
|
|
8945
|
+
jr as Client,
|
|
8882
8946
|
Cs as ClientAdditionalData,
|
|
8883
|
-
|
|
8947
|
+
Ke as ClientCategory,
|
|
8884
8948
|
H as ClientDataProvider,
|
|
8885
|
-
|
|
8886
|
-
|
|
8887
|
-
|
|
8888
|
-
|
|
8889
|
-
|
|
8890
|
-
|
|
8891
|
-
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8895
|
-
|
|
8896
|
-
|
|
8897
|
-
|
|
8898
|
-
|
|
8949
|
+
ti as ClientPriceProvider,
|
|
8950
|
+
si as ClientPriceTemplateProvider,
|
|
8951
|
+
X as ClientProduct,
|
|
8952
|
+
oi as ClientProductCategoryDataProvider,
|
|
8953
|
+
ci as ClientProductDataProvider,
|
|
8954
|
+
oe as ClientShortInfo,
|
|
8955
|
+
ws as ClientsAdditionalDataRequestTypeEnum,
|
|
8956
|
+
gi as ClientsListFilters,
|
|
8957
|
+
Ee as CodedIdentity,
|
|
8958
|
+
yi as ConfiguratorProvider,
|
|
8959
|
+
Ts as ConfiguratorsEnum,
|
|
8960
|
+
Dr as Contact,
|
|
8961
|
+
lt as ContactLinks,
|
|
8962
|
+
se as ContactPerson,
|
|
8899
8963
|
Ds as ContactPersonRelated,
|
|
8900
8964
|
qs as ContactPosition,
|
|
8901
|
-
|
|
8902
|
-
|
|
8903
|
-
|
|
8904
|
-
|
|
8905
|
-
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8909
|
-
|
|
8910
|
-
|
|
8911
|
-
|
|
8965
|
+
gr as ContactRelation,
|
|
8966
|
+
mt as ContragentBase,
|
|
8967
|
+
Xe as ContragentFactory,
|
|
8968
|
+
yt as ContragentIc,
|
|
8969
|
+
vs as ContragentPerson,
|
|
8970
|
+
Rs as ContragentUlNr,
|
|
8971
|
+
at as ContragentUlR,
|
|
8972
|
+
kr as CostSourceEnum,
|
|
8973
|
+
we as Country,
|
|
8974
|
+
Ir as CuratedDirection,
|
|
8975
|
+
xr as Curator,
|
|
8912
8976
|
j as Currency,
|
|
8913
8977
|
Ui as DataSuggestionProvider,
|
|
8914
|
-
|
|
8978
|
+
Tr as DateHelper,
|
|
8915
8979
|
Ci as DateTimeProvider,
|
|
8916
|
-
|
|
8917
|
-
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
|
-
|
|
8921
|
-
|
|
8922
|
-
|
|
8923
|
-
|
|
8924
|
-
|
|
8980
|
+
ft as DeletableNamedIdentity,
|
|
8981
|
+
_e as DeliveryAddress,
|
|
8982
|
+
K as DeliveryType,
|
|
8983
|
+
rt as DetailedJwtPayload,
|
|
8984
|
+
ts as DeviceTypeResolutionConfig,
|
|
8985
|
+
cs as DiscountShortInfo,
|
|
8986
|
+
zi as FieldValidationResultData,
|
|
8987
|
+
te as FilterGroup,
|
|
8988
|
+
Fr as FilterItem,
|
|
8925
8989
|
dr as FilterOpEnum,
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8990
|
+
ms as FilterSettings,
|
|
8991
|
+
it as GeoCoordinates,
|
|
8992
|
+
us as HiddenCatalogableItem,
|
|
8929
8993
|
Ue as HttpCachedRequester,
|
|
8930
|
-
|
|
8994
|
+
ss as HttpParamsConfig,
|
|
8931
8995
|
h as HttpRequester,
|
|
8932
8996
|
G as Identity,
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8997
|
+
ps as Image,
|
|
8998
|
+
M as InterceptorsEnum,
|
|
8999
|
+
Te as JwtPayload,
|
|
9000
|
+
Z as Manager,
|
|
8936
9001
|
Lr as ManagerCommon,
|
|
8937
|
-
|
|
9002
|
+
Ai as ManagerDataFactory,
|
|
8938
9003
|
Dt as ManagerDataProvider,
|
|
8939
9004
|
Ms as MetaTagItem,
|
|
8940
|
-
|
|
8941
|
-
|
|
8942
|
-
|
|
8943
|
-
|
|
9005
|
+
L as NamedIdentity,
|
|
9006
|
+
F as Offer,
|
|
9007
|
+
bs as OfferActualization,
|
|
9008
|
+
xe as OfferActualizationStatus,
|
|
8944
9009
|
di as OfferHelper,
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8948
|
-
|
|
8949
|
-
|
|
8950
|
-
|
|
9010
|
+
Tt as OfferShortInfo,
|
|
9011
|
+
Si as OffersDataProvider,
|
|
9012
|
+
bi as OffersListFilters,
|
|
9013
|
+
At as Operator,
|
|
9014
|
+
ie as Opf,
|
|
9015
|
+
V as OpfEnum,
|
|
8951
9016
|
I as Order,
|
|
8952
|
-
|
|
8953
|
-
|
|
9017
|
+
$s as OrderAction,
|
|
9018
|
+
$i as OrderEditorData,
|
|
8954
9019
|
Pt as OrderInfo,
|
|
8955
9020
|
ds as OrderItem,
|
|
8956
|
-
|
|
8957
|
-
|
|
8958
|
-
|
|
8959
|
-
|
|
9021
|
+
ot as OrderItemBase,
|
|
9022
|
+
Es as OrderPaymentStatus,
|
|
9023
|
+
Rt as OrderShortInfo,
|
|
9024
|
+
er as OrderStatus,
|
|
8960
9025
|
Us as OrderStatusDetail,
|
|
8961
|
-
|
|
8962
|
-
|
|
8963
|
-
|
|
8964
|
-
|
|
8965
|
-
|
|
9026
|
+
xs as OrderStatusDetailEnum,
|
|
9027
|
+
Is as OrderStatusEnum,
|
|
9028
|
+
ks as OrderStatusHistoryInfo,
|
|
9029
|
+
Oi as OrdersDataProvider,
|
|
9030
|
+
ki as OrdersListFilters,
|
|
8966
9031
|
Fe as PaginationFiltersBase,
|
|
8967
9032
|
Ce as PartnerGroup,
|
|
8968
|
-
|
|
8969
|
-
|
|
8970
|
-
|
|
8971
|
-
|
|
9033
|
+
bt as PaymentType,
|
|
9034
|
+
Ge as PreferencesStorageProvider,
|
|
9035
|
+
fr as PriceAnalyze,
|
|
9036
|
+
Ii as PriceAnalyzeProvider,
|
|
8972
9037
|
Pe as PriceCoefficient,
|
|
8973
|
-
|
|
8974
|
-
|
|
8975
|
-
|
|
8976
|
-
|
|
8977
|
-
|
|
9038
|
+
st as PriceCoefficientEnum,
|
|
9039
|
+
xi as PriceHistoryDataProvider,
|
|
9040
|
+
Os as PriceHistoryItem,
|
|
9041
|
+
fe as PriceTemplate,
|
|
9042
|
+
pr as PriceTemplateCategory,
|
|
8978
9043
|
Le as PriceTemplateClient,
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
8983
|
-
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
9044
|
+
pt as PriceTemplateICatalogableItem,
|
|
9045
|
+
hr as PriceTemplateProduct,
|
|
9046
|
+
li as PriceTemplateProvider,
|
|
9047
|
+
Ie as PricingRole,
|
|
9048
|
+
ui as PricingRoleProvider,
|
|
9049
|
+
Rr as PrimaryCatalogableItem,
|
|
9050
|
+
q as Product,
|
|
9051
|
+
ii as ProductCategoryDataProvider,
|
|
9052
|
+
ni as ProductDataProvider,
|
|
8988
9053
|
Fs as ProductFileType,
|
|
8989
|
-
|
|
8990
|
-
|
|
9054
|
+
ct as ProductFilterTypeEnum,
|
|
9055
|
+
$r as ProductPriceCoefficient,
|
|
8991
9056
|
Ls as ProductPriceHistory,
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9003
|
-
|
|
9004
|
-
|
|
9005
|
-
|
|
9057
|
+
Mr as ProductUnit,
|
|
9058
|
+
Ss as ProfstroyOfferItem,
|
|
9059
|
+
pi as PropertiesProvider,
|
|
9060
|
+
me as Property,
|
|
9061
|
+
gt as PropertyType,
|
|
9062
|
+
gs as PropertyTypeEnum,
|
|
9063
|
+
he as PropertyValue,
|
|
9064
|
+
_i as RecommendationsDataProvider,
|
|
9065
|
+
Yr as RecommendationsList,
|
|
9066
|
+
D as Reference,
|
|
9067
|
+
Ni as ReferenceDataFactory,
|
|
9068
|
+
S as ReferenceDataProvider,
|
|
9069
|
+
ve as Region,
|
|
9070
|
+
St as ResourceType,
|
|
9006
9071
|
Di as STANDARD_PERIOD_GROUPS,
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9072
|
+
Ti as STANDARD_PERIOD_SECTIONS,
|
|
9073
|
+
U as SalesDirection,
|
|
9074
|
+
is as SentryConfig,
|
|
9010
9075
|
Vr as Seo,
|
|
9011
|
-
|
|
9012
|
-
|
|
9013
|
-
|
|
9014
|
-
|
|
9076
|
+
Ei as SeoDataProvider,
|
|
9077
|
+
vt as SourcePrimaryInterest,
|
|
9078
|
+
ls as StockCount,
|
|
9079
|
+
ai as TableDataPagination,
|
|
9015
9080
|
Ps as TableDataPaginationRequestParams,
|
|
9016
|
-
|
|
9017
|
-
|
|
9018
|
-
|
|
9081
|
+
wi as TableDataSortRequestParams,
|
|
9082
|
+
hi as TemplateProductCategoryDataProvider,
|
|
9083
|
+
ei as TemplatesListFilters,
|
|
9019
9084
|
_ as TypedInstanceFactory,
|
|
9020
9085
|
Ct as UnitsHelper,
|
|
9021
|
-
|
|
9022
|
-
|
|
9086
|
+
fi as UnknownClientDataProvider,
|
|
9087
|
+
tt as UpdatableNamedIdentity,
|
|
9023
9088
|
Hs as User,
|
|
9024
9089
|
Fi as UserAuthDataProvider,
|
|
9025
|
-
|
|
9090
|
+
ht as UserCommonInfo,
|
|
9026
9091
|
Bs as UserDataProvider,
|
|
9027
|
-
|
|
9028
|
-
|
|
9029
|
-
|
|
9092
|
+
ut as UserPricingRole,
|
|
9093
|
+
yr as UserRegion,
|
|
9094
|
+
Ar as UserRegionEmployee,
|
|
9030
9095
|
Bi as UserRegionProvider,
|
|
9031
|
-
|
|
9096
|
+
Ze as UserRegionShortInfo,
|
|
9032
9097
|
Hi as UserRegionsListFilters,
|
|
9033
|
-
|
|
9098
|
+
N as UserShortInfo,
|
|
9034
9099
|
dt as UserTypeEnum,
|
|
9035
|
-
|
|
9100
|
+
mi as VersionConfig,
|
|
9036
9101
|
Me as Warehouse,
|
|
9037
|
-
|
|
9102
|
+
ns as WebSocketConfig,
|
|
9038
9103
|
Li as currentOrderInjectionKey,
|
|
9039
|
-
|
|
9104
|
+
vi as daysAgoIso,
|
|
9040
9105
|
zr as findCatalogItemByIdRecursive,
|
|
9041
|
-
|
|
9106
|
+
Wr as flattenCatalogItems,
|
|
9042
9107
|
Pi as formatPercentChange,
|
|
9043
|
-
|
|
9044
|
-
|
|
9045
|
-
|
|
9046
|
-
|
|
9108
|
+
Ri as formatRelativeDate,
|
|
9109
|
+
As as pluralize,
|
|
9110
|
+
ze as useAuthStateStore,
|
|
9111
|
+
O as useBaseConfigStateStore,
|
|
9047
9112
|
qi as useReferencesStore,
|
|
9048
9113
|
Mi as useUserStateStore
|
|
9049
9114
|
};
|