@snabcentr/common-lib 2.24.0 → 2.24.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 +6 -3
- package/dist/sc-common-lib.js +556 -521
- 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/date-time/helpers/days-ago-iso.d.ts +7 -0
- package/dist/src/date-time/helpers/days-ago-iso.d.ts.map +1 -0
- package/dist/src/date-time/helpers/format-relative-date.d.ts +7 -0
- package/dist/src/date-time/helpers/format-relative-date.d.ts.map +1 -0
- package/dist/src/date-time/helpers/index.d.ts +2 -0
- package/dist/src/date-time/helpers/index.d.ts.map +1 -1
- package/dist/src/helpers/format-percent-change.d.ts +7 -0
- package/dist/src/helpers/format-percent-change.d.ts.map +1 -0
- package/dist/src/helpers/index.d.ts +1 -0
- package/dist/src/helpers/index.d.ts.map +1 -1
- package/dist/src/references/classes/price-coefficient.d.ts.map +1 -1
- package/dist/src/system/classes/named-identity.d.ts +4 -0
- package/dist/src/system/classes/named-identity.d.ts.map +1 -1
- package/dist/src/system/interfaces/i-named-identity.d.ts +4 -0
- package/dist/src/system/interfaces/i-named-identity.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,12 +2,12 @@ var St = Object.defineProperty;
|
|
|
2
2
|
var $t = (n, r, e) => r in n ? St(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var s = (n, r, e) => $t(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as Kr } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
5
|
+
import { merge as _e, isNil as a, isEmpty as V, noop as D, mapValues as Xr, isArray as z, every as kt, split as Lt, startsWith as Ot, endsWith as It, includes as xt, isString as R, isFunction as br, map as De, isObject as Ar, isError as xr, toLower as _t, isDate as fr, isPlainObject as qt, isUndefined as He, constant as Nt, toUpper as Ut, cloneDeep as Ft, forEach as Mt, round as Ht, omitBy as Zr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as Tr, objectToSnake as _r } from "ts-case-convert";
|
|
7
7
|
import { defineStore as ie } from "pinia";
|
|
8
|
-
import { ref as w, markRaw as
|
|
9
|
-
import { isAfter as qr, parseISO as
|
|
10
|
-
import
|
|
8
|
+
import { ref as w, markRaw as Bt, computed as A } from "vue";
|
|
9
|
+
import { isAfter as qr, parseISO as v, startOfToday as qe, format as k, endOfMonth as x, addMonths as $, differenceInCalendarMonths as Wt, startOfMonth as U, getDate as Nr, getDaysInMonth as zt, endOfDay as W, startOfDay as he, setDate as jt, startOfWeek as Z, addWeeks as mr, differenceInCalendarDays as We, addDays as ee, isValid as Gt, subDays as ze, addBusinessDays as Yt, startOfYear as le, endOfYear as de, endOfWeek as Se, endOfTomorrow as Et, startOfTomorrow as Qt, endOfYesterday as Vt, startOfYesterday as Jt, endOfToday as Kt, startOfQuarter as $e, endOfQuarter as Be, addYears as er, addQuarters as rr, subYears as tr, subQuarters as sr, subMonths as ir, subWeeks as Ur, addSeconds as Xt } from "date-fns";
|
|
10
|
+
import Zt, { CanceledError as es } from "axios";
|
|
11
11
|
class Re {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -99,7 +99,7 @@ class Re {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
s(this, "email", "");
|
|
102
|
-
|
|
102
|
+
_e(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -143,7 +143,7 @@ class et extends Re {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
s(this, "address");
|
|
146
|
-
|
|
146
|
+
_e(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -155,7 +155,7 @@ class et extends Re {
|
|
|
155
155
|
return i.resourceAccess = t.resource_access, i;
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class rs {
|
|
159
159
|
/**
|
|
160
160
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
161
161
|
*
|
|
@@ -177,7 +177,7 @@ class es {
|
|
|
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 ts {
|
|
181
181
|
/**
|
|
182
182
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
183
183
|
*
|
|
@@ -199,7 +199,7 @@ class rs {
|
|
|
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 ss {
|
|
203
203
|
/**
|
|
204
204
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
205
205
|
*
|
|
@@ -244,7 +244,7 @@ class ts {
|
|
|
244
244
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
class
|
|
247
|
+
class is {
|
|
248
248
|
/**
|
|
249
249
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
250
250
|
*
|
|
@@ -283,7 +283,7 @@ class ss {
|
|
|
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 ns {
|
|
287
287
|
/**
|
|
288
288
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
289
289
|
*
|
|
@@ -327,18 +327,18 @@ class is {
|
|
|
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 ts(r == null ? void 0 : r.http), this.deviceTypeByResolution = new rs(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new ss({
|
|
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 is(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 = w(new
|
|
340
|
+
const L = ie("common.config", () => {
|
|
341
|
+
const n = w(new ns());
|
|
342
342
|
return {
|
|
343
343
|
/**
|
|
344
344
|
* Конфигурационные данные приложения.
|
|
@@ -356,11 +356,11 @@ const k = ie("common.config", () => {
|
|
|
356
356
|
* @param appConfig Конфигурация приложения.
|
|
357
357
|
*/
|
|
358
358
|
setConfig: (t) => {
|
|
359
|
-
n.value =
|
|
359
|
+
n.value = _e(n.value, t);
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
362
|
});
|
|
363
|
-
class
|
|
363
|
+
class je {
|
|
364
364
|
/**
|
|
365
365
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
366
366
|
*
|
|
@@ -379,8 +379,8 @@ class He {
|
|
|
379
379
|
if (e)
|
|
380
380
|
try {
|
|
381
381
|
const t = JSON.parse(e);
|
|
382
|
-
if (!t.availableFor || qr(
|
|
383
|
-
if (a(t.data) ||
|
|
382
|
+
if (!t.availableFor || qr(v(t.availableFor) || qe(), /* @__PURE__ */ new Date())) {
|
|
383
|
+
if (a(t.data) || V(t.data))
|
|
384
384
|
throw new Error("Data is empty");
|
|
385
385
|
return t.data;
|
|
386
386
|
}
|
|
@@ -403,7 +403,7 @@ class He {
|
|
|
403
403
|
static saveActualDataToStorage(r, e, t) {
|
|
404
404
|
if (this.isLocalStorageAvailable())
|
|
405
405
|
try {
|
|
406
|
-
if (a(e) ||
|
|
406
|
+
if (a(e) || V(e))
|
|
407
407
|
throw new Error("Data is empty");
|
|
408
408
|
const i = JSON.stringify({
|
|
409
409
|
availableFor: t,
|
|
@@ -454,7 +454,7 @@ class He {
|
|
|
454
454
|
const i = localStorage.getItem(t);
|
|
455
455
|
if (i) {
|
|
456
456
|
const o = JSON.parse(i);
|
|
457
|
-
o.availableFor && !qr(
|
|
457
|
+
o.availableFor && !qr(v(o.availableFor) || qe(), /* @__PURE__ */ new Date()) && r.push(t);
|
|
458
458
|
}
|
|
459
459
|
} catch {
|
|
460
460
|
r.push(t);
|
|
@@ -482,21 +482,21 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
482
482
|
const n = w(
|
|
483
483
|
(() => {
|
|
484
484
|
var u;
|
|
485
|
-
const o =
|
|
485
|
+
const o = je.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 = L().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
492
492
|
return c ? Promise.resolve(c) : void 0;
|
|
493
493
|
})()
|
|
494
|
-
), r = w(void 0), e = w(void 0), t =
|
|
494
|
+
), r = w(void 0), e = w(void 0), t = Bt(/* @__PURE__ */ new Map());
|
|
495
495
|
function i() {
|
|
496
496
|
e.value = void 0, a(n.value) || n.value.then((o) => {
|
|
497
497
|
const c = Re.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(D);
|
|
500
500
|
}
|
|
501
501
|
return {
|
|
502
502
|
/**
|
|
@@ -520,14 +520,14 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
520
520
|
*/
|
|
521
521
|
recalculateUserPermissions: i
|
|
522
522
|
};
|
|
523
|
-
}),
|
|
523
|
+
}), nr = ie("common.auth_state", () => {
|
|
524
524
|
const n = A(() => {
|
|
525
525
|
const o = ue();
|
|
526
526
|
if (a(o.jwtToken) && !a(o.jwtTokenUpdater)) {
|
|
527
527
|
const c = o.jwtTokenUpdater();
|
|
528
528
|
o.jwtToken = c, c.then((u) => {
|
|
529
|
-
o.jwtToken = Promise.resolve(u),
|
|
530
|
-
}).catch(
|
|
529
|
+
o.jwtToken = Promise.resolve(u), je.saveActualDataToStorage("sc.token", u, Fr(u)), o.recalculateUserPermissions();
|
|
530
|
+
}).catch(D);
|
|
531
531
|
}
|
|
532
532
|
return o.jwtToken;
|
|
533
533
|
});
|
|
@@ -536,18 +536,18 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
536
536
|
}
|
|
537
537
|
function e(o) {
|
|
538
538
|
const c = ue();
|
|
539
|
-
c.jwtToken = Promise.resolve(o),
|
|
539
|
+
c.jwtToken = Promise.resolve(o), je.saveActualDataToStorage("sc.token", o, Fr(o)), c.recalculateUserPermissions();
|
|
540
540
|
}
|
|
541
541
|
function t() {
|
|
542
542
|
const o = ue();
|
|
543
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
543
|
+
o.jwtToken = void 0, o.userPermissions = void 0, je.saveActualDataToStorage("sc.token", void 0);
|
|
544
544
|
}
|
|
545
545
|
function i(o) {
|
|
546
546
|
const c = ue();
|
|
547
547
|
!a(c.jwtToken) && a(c.userPermissions) && c.jwtToken.then((g) => {
|
|
548
548
|
const y = Re.getJwtPayload(g);
|
|
549
549
|
c.userPermissions = y.exp * 1e3 > Date.now() ? Xr(y.resourceAccess, (P) => (P == null ? void 0 : P.roles) ?? []) : void 0;
|
|
550
|
-
}).catch(
|
|
550
|
+
}).catch(D);
|
|
551
551
|
const u = z(o) ? o.join(" && ") : o;
|
|
552
552
|
if (c.userPermissionsComputedRefs.has(u))
|
|
553
553
|
return c.userPermissionsComputedRefs.get(u);
|
|
@@ -557,8 +557,8 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
557
557
|
const P = Lt(y, ".");
|
|
558
558
|
if (P.length < 2)
|
|
559
559
|
return !1;
|
|
560
|
-
const [
|
|
561
|
-
return z(oe) && oe.includes(
|
|
560
|
+
const [Ae, Te] = P, oe = (ce = ue().userPermissions) == null ? void 0 : ce[Ae];
|
|
561
|
+
return z(oe) && oe.includes(Te);
|
|
562
562
|
};
|
|
563
563
|
return z(o) ? kt(o, (y) => g(y)) : g(o);
|
|
564
564
|
});
|
|
@@ -593,7 +593,7 @@ const ue = ie("common.auth_state_private", () => {
|
|
|
593
593
|
hasUserPermission: i
|
|
594
594
|
};
|
|
595
595
|
});
|
|
596
|
-
var
|
|
596
|
+
var Ge = /* @__PURE__ */ ((n) => (n.Image = "image", n.Video = "video", n))(Ge || {});
|
|
597
597
|
class G {
|
|
598
598
|
/**
|
|
599
599
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
@@ -647,22 +647,22 @@ 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) ?? Ge.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 === Ge.Image;
|
|
657
657
|
}
|
|
658
658
|
/**
|
|
659
659
|
* Возвращает признак того, что медиафайл является видео.
|
|
660
660
|
*/
|
|
661
661
|
isVideo() {
|
|
662
|
-
return this.mediaType ===
|
|
662
|
+
return this.mediaType === Ge.Video;
|
|
663
663
|
}
|
|
664
664
|
}
|
|
665
|
-
var
|
|
665
|
+
var Ye = /* @__PURE__ */ ((n) => (n.Draft = "draft", n.Published = "published", n.Scheduled = "scheduled", n))(Ye || {});
|
|
666
666
|
class ye extends G {
|
|
667
667
|
/**
|
|
668
668
|
* Инициализирует экземпляр класса {@link BlogPostShortInfo}.
|
|
@@ -695,7 +695,7 @@ class ye extends G {
|
|
|
695
695
|
* @param publishedAt Дата и время публикации статьи.
|
|
696
696
|
*/
|
|
697
697
|
static resolvePublicationStatus(e) {
|
|
698
|
-
return a(e) ?
|
|
698
|
+
return a(e) ? Ye.Draft : e.getTime() > Date.now() ? Ye.Scheduled : Ye.Published;
|
|
699
699
|
}
|
|
700
700
|
/**
|
|
701
701
|
* Возвращает описание ошибки символьного обозначения статьи либо пустую строку,
|
|
@@ -715,7 +715,7 @@ class ye extends G {
|
|
|
715
715
|
* @param value Значение даты.
|
|
716
716
|
*/
|
|
717
717
|
static parseDate(e) {
|
|
718
|
-
return a(e) ? null :
|
|
718
|
+
return a(e) ? null : R(e) ? v(e) : e;
|
|
719
719
|
}
|
|
720
720
|
/**
|
|
721
721
|
* Возвращает состояние публикации статьи.
|
|
@@ -724,7 +724,7 @@ class ye extends G {
|
|
|
724
724
|
return ye.resolvePublicationStatus(this.publishedAt);
|
|
725
725
|
}
|
|
726
726
|
}
|
|
727
|
-
class
|
|
727
|
+
class or extends ye {
|
|
728
728
|
/**
|
|
729
729
|
* Инициализирует экземпляр класса {@link BlogPost}.
|
|
730
730
|
*
|
|
@@ -771,7 +771,7 @@ class nr extends ye {
|
|
|
771
771
|
return this.media.filter((e) => e.isUnused);
|
|
772
772
|
}
|
|
773
773
|
}
|
|
774
|
-
class
|
|
774
|
+
class Fe {
|
|
775
775
|
/**
|
|
776
776
|
* Возвращает очищенное значение фильтров, содержащие
|
|
777
777
|
* только актуальные данные.
|
|
@@ -781,7 +781,7 @@ class Ne {
|
|
|
781
781
|
return Object.keys(this).forEach((e) => {
|
|
782
782
|
const t = this[e];
|
|
783
783
|
a(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
|
}
|
|
@@ -800,10 +800,10 @@ class T {
|
|
|
800
800
|
* Окончание периода.
|
|
801
801
|
*/
|
|
802
802
|
s(this, "to");
|
|
803
|
-
this.from =
|
|
803
|
+
this.from = R(r == null ? void 0 : r.from) ? v(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = R(r == null ? void 0 : r.to) ? v(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
class
|
|
806
|
+
class Js extends Fe {
|
|
807
807
|
/**
|
|
808
808
|
* Инициализирует экземпляр класса {@link BlogPostsListFilters}.
|
|
809
809
|
*
|
|
@@ -922,7 +922,7 @@ const b = class b {
|
|
|
922
922
|
/**
|
|
923
923
|
* Базовый URL путь для выполнения запросов.
|
|
924
924
|
*/
|
|
925
|
-
s(this, "baseUrl", `${
|
|
925
|
+
s(this, "baseUrl", `${L().config.http.portalApiUrl}/api`);
|
|
926
926
|
/**
|
|
927
927
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
928
928
|
*
|
|
@@ -930,7 +930,7 @@ const b = class b {
|
|
|
930
930
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
931
931
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
932
932
|
*/
|
|
933
|
-
s(this, "errorResponseHandler",
|
|
933
|
+
s(this, "errorResponseHandler", D);
|
|
934
934
|
/**
|
|
935
935
|
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
936
936
|
*/
|
|
@@ -949,7 +949,7 @@ const b = class b {
|
|
|
949
949
|
// eslint-disable-next-line class-methods-use-this
|
|
950
950
|
s(this, "authRequestInterceptor", async (r) => {
|
|
951
951
|
let e;
|
|
952
|
-
return a(
|
|
952
|
+
return a(nr().jwtToken) || (e = await nr().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
953
953
|
});
|
|
954
954
|
/**
|
|
955
955
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -973,7 +973,7 @@ const b = class b {
|
|
|
973
973
|
s(this, "authErrorsResponseInterceptors", (r) => {
|
|
974
974
|
var t;
|
|
975
975
|
const e = r.rawError ? (t = r.rawError) == null ? void 0 : t.config : void 0;
|
|
976
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
976
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (nr().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
977
977
|
});
|
|
978
978
|
/**
|
|
979
979
|
* Перехватчик ответа для приведения отмены запроса (AbortController) к единому виду.
|
|
@@ -984,7 +984,7 @@ const b = class b {
|
|
|
984
984
|
s(this, "canceledResponseInterceptor", (r) => {
|
|
985
985
|
const e = r.rawError ?? r;
|
|
986
986
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
987
|
-
throw new
|
|
987
|
+
throw new es("Request canceled");
|
|
988
988
|
return Promise.reject(r);
|
|
989
989
|
});
|
|
990
990
|
/**
|
|
@@ -1001,7 +1001,7 @@ const b = class b {
|
|
|
1001
1001
|
*/
|
|
1002
1002
|
// eslint-disable-next-line class-methods-use-this
|
|
1003
1003
|
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Tr(r.data)), r));
|
|
1004
|
-
this.errorResponseHandler = b.defaultErrorsResponseHandler, this.httpClient =
|
|
1004
|
+
this.errorResponseHandler = b.defaultErrorsResponseHandler, this.httpClient = Zt.create({
|
|
1005
1005
|
headers: {
|
|
1006
1006
|
Accept: "application/json",
|
|
1007
1007
|
"Content-Type": "application/json"
|
|
@@ -1207,7 +1207,7 @@ s(b, "instances", {}), /**
|
|
|
1207
1207
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1208
1208
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1209
1209
|
*/
|
|
1210
|
-
s(b, "defaultErrorsResponseHandler",
|
|
1210
|
+
s(b, "defaultErrorsResponseHandler", D), /**
|
|
1211
1211
|
* Список зарегистрированных хуков для запросов.
|
|
1212
1212
|
*/
|
|
1213
1213
|
s(b, "requestHooks", []), /**
|
|
@@ -1243,17 +1243,17 @@ class Mr {
|
|
|
1243
1243
|
* @returns Примитивное представление фильтра.
|
|
1244
1244
|
*/
|
|
1245
1245
|
toPrimitive() {
|
|
1246
|
-
const r =
|
|
1246
|
+
const r = L().config.dateFormats.api, e = {
|
|
1247
1247
|
field: this.field,
|
|
1248
1248
|
op: this.op
|
|
1249
1249
|
};
|
|
1250
|
-
if (
|
|
1251
|
-
e.value =
|
|
1250
|
+
if (fr(this.value))
|
|
1251
|
+
e.value = k(this.value, r);
|
|
1252
1252
|
else if (qt(this.value)) {
|
|
1253
1253
|
const t = this.value;
|
|
1254
1254
|
e.value = {
|
|
1255
|
-
from: t.from ?
|
|
1256
|
-
to: t.to ?
|
|
1255
|
+
from: t.from ? k(t.from, r) : null,
|
|
1256
|
+
to: t.to ? k(t.to, r) : null
|
|
1257
1257
|
};
|
|
1258
1258
|
} else
|
|
1259
1259
|
e.value = this.value;
|
|
@@ -1313,7 +1313,7 @@ class Y extends h {
|
|
|
1313
1313
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
1314
1314
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
1315
1315
|
};
|
|
1316
|
-
return e && (g.filters = JSON.stringify((e instanceof re ? e : new re(e)).toPrimitive())),
|
|
1316
|
+
return e && (g.filters = JSON.stringify((e instanceof re ? e : new re(e)).toPrimitive())), V(t) || (g.sort = z(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u, p);
|
|
1317
1317
|
}
|
|
1318
1318
|
/**
|
|
1319
1319
|
* Получает пагинированный список экземпляров указанного класса.
|
|
@@ -1354,9 +1354,9 @@ class ar extends Y {
|
|
|
1354
1354
|
*/
|
|
1355
1355
|
static preparePostSaveData(r) {
|
|
1356
1356
|
const e = {};
|
|
1357
|
-
if (
|
|
1358
|
-
const t =
|
|
1359
|
-
e.publishedAt = a(r.publishedAt) ? null :
|
|
1357
|
+
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 = L().config.dateFormats.api;
|
|
1359
|
+
e.publishedAt = a(r.publishedAt) ? null : k(r.publishedAt, t);
|
|
1360
1360
|
}
|
|
1361
1361
|
return e;
|
|
1362
1362
|
}
|
|
@@ -1387,7 +1387,7 @@ class ar extends Y {
|
|
|
1387
1387
|
* @see /doc/api/internal#/operations/api_internal_blog_get
|
|
1388
1388
|
*/
|
|
1389
1389
|
getPost(r) {
|
|
1390
|
-
return this.get(`/internal/blog/${r}`, {}, (e) => new
|
|
1390
|
+
return this.get(`/internal/blog/${r}`, {}, (e) => new or(e.data));
|
|
1391
1391
|
}
|
|
1392
1392
|
/**
|
|
1393
1393
|
* Создаёт новую статью блога.
|
|
@@ -1400,7 +1400,7 @@ class ar extends Y {
|
|
|
1400
1400
|
* @see /doc/api/internal#/operations/api_internal_blog_create
|
|
1401
1401
|
*/
|
|
1402
1402
|
createPost(r, e = {}) {
|
|
1403
|
-
return this.post("/internal/blog", ar.preparePostSaveData(r), (t) => new
|
|
1403
|
+
return this.post("/internal/blog", ar.preparePostSaveData(r), (t) => new or(t.data), e);
|
|
1404
1404
|
}
|
|
1405
1405
|
/**
|
|
1406
1406
|
* Изменяет данные о статье блога.
|
|
@@ -1414,7 +1414,7 @@ class ar extends Y {
|
|
|
1414
1414
|
* @see /doc/api/internal#/operations/api_internal_blog_update
|
|
1415
1415
|
*/
|
|
1416
1416
|
updatePost(r, e, t = {}) {
|
|
1417
|
-
return this.patch(`/internal/blog/${r}`, ar.preparePostSaveData(e), (i) => new
|
|
1417
|
+
return this.patch(`/internal/blog/${r}`, ar.preparePostSaveData(e), (i) => new or(i.data), t);
|
|
1418
1418
|
}
|
|
1419
1419
|
/**
|
|
1420
1420
|
* Удаляет статью блога.
|
|
@@ -1501,6 +1501,12 @@ class O extends G {
|
|
|
1501
1501
|
s(this, "name", "");
|
|
1502
1502
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
1503
1503
|
}
|
|
1504
|
+
/**
|
|
1505
|
+
* @inheritdoc
|
|
1506
|
+
*/
|
|
1507
|
+
nameOrGuid() {
|
|
1508
|
+
return V(this.name) ? this.guid : this.name;
|
|
1509
|
+
}
|
|
1504
1510
|
}
|
|
1505
1511
|
class q extends O {
|
|
1506
1512
|
/**
|
|
@@ -1521,7 +1527,7 @@ class q extends O {
|
|
|
1521
1527
|
this.type = e == null ? void 0 : e.type, this.isActive = (e == null ? void 0 : e.isActive) ?? !0;
|
|
1522
1528
|
}
|
|
1523
1529
|
}
|
|
1524
|
-
class
|
|
1530
|
+
class os extends O {
|
|
1525
1531
|
/**
|
|
1526
1532
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1527
1533
|
*
|
|
@@ -1557,7 +1563,7 @@ class ns extends O {
|
|
|
1557
1563
|
* Дата и время удаления.
|
|
1558
1564
|
*/
|
|
1559
1565
|
s(this, "deletedAt");
|
|
1560
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt =
|
|
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) ? v(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new q(e == null ? void 0 : e.owner), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1561
1567
|
}
|
|
1562
1568
|
}
|
|
1563
1569
|
class rt extends O {
|
|
@@ -1572,7 +1578,7 @@ class rt extends O {
|
|
|
1572
1578
|
* Дата и время последнего изменения.
|
|
1573
1579
|
*/
|
|
1574
1580
|
s(this, "updatedAt");
|
|
1575
|
-
this.updatedAt =
|
|
1581
|
+
this.updatedAt = R(e == null ? void 0 : e.updatedAt) ? v(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1576
1582
|
}
|
|
1577
1583
|
}
|
|
1578
1584
|
class ge extends rt {
|
|
@@ -1595,11 +1601,11 @@ class ge extends rt {
|
|
|
1595
1601
|
* Данные о пользователе, создавшем шаблон прайс-листа.
|
|
1596
1602
|
*/
|
|
1597
1603
|
s(this, "owner");
|
|
1598
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt =
|
|
1604
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = R(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new q(e.owner) : void 0;
|
|
1599
1605
|
}
|
|
1600
1606
|
}
|
|
1601
1607
|
var tt = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(tt || {});
|
|
1602
|
-
class
|
|
1608
|
+
class C extends O {
|
|
1603
1609
|
/**
|
|
1604
1610
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
1605
1611
|
*
|
|
@@ -1618,12 +1624,18 @@ class v extends O {
|
|
|
1618
1624
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
1619
1625
|
}
|
|
1620
1626
|
}
|
|
1621
|
-
class
|
|
1627
|
+
class Pe extends C {
|
|
1622
1628
|
/**
|
|
1623
1629
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
1624
1630
|
*/
|
|
1625
1631
|
static getRetailPriceCoefficient() {
|
|
1626
|
-
|
|
1632
|
+
const r = new Pe({
|
|
1633
|
+
id: -2,
|
|
1634
|
+
slug: tt.Retail,
|
|
1635
|
+
name: "Розн. цена",
|
|
1636
|
+
guid: ""
|
|
1637
|
+
});
|
|
1638
|
+
return r.isNewRec = Nt(!0), r;
|
|
1627
1639
|
}
|
|
1628
1640
|
}
|
|
1629
1641
|
class Sr {
|
|
@@ -1653,7 +1665,7 @@ class Sr {
|
|
|
1653
1665
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
1654
1666
|
*/
|
|
1655
1667
|
s(this, "readOnly");
|
|
1656
|
-
this.coefficient = new
|
|
1668
|
+
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;
|
|
1657
1669
|
}
|
|
1658
1670
|
}
|
|
1659
1671
|
class st {
|
|
@@ -1674,9 +1686,9 @@ class st {
|
|
|
1674
1686
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
1675
1687
|
}
|
|
1676
1688
|
}
|
|
1677
|
-
class
|
|
1689
|
+
class J extends C {
|
|
1678
1690
|
}
|
|
1679
|
-
class
|
|
1691
|
+
class Me extends C {
|
|
1680
1692
|
/**
|
|
1681
1693
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
1682
1694
|
*
|
|
@@ -1705,10 +1717,10 @@ class Ue extends v {
|
|
|
1705
1717
|
* Координаты склада.
|
|
1706
1718
|
*/
|
|
1707
1719
|
s(this, "coordinates");
|
|
1708
|
-
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
|
|
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 J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new st(e == null ? void 0 : e.coordinates);
|
|
1709
1721
|
}
|
|
1710
1722
|
}
|
|
1711
|
-
class
|
|
1723
|
+
class cs {
|
|
1712
1724
|
/**
|
|
1713
1725
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
1714
1726
|
*
|
|
@@ -1723,7 +1735,7 @@ class os {
|
|
|
1723
1735
|
* Количество остатков товара на складе.
|
|
1724
1736
|
*/
|
|
1725
1737
|
s(this, "count");
|
|
1726
|
-
this.warehouse = new
|
|
1738
|
+
this.warehouse = new Me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
1727
1739
|
}
|
|
1728
1740
|
}
|
|
1729
1741
|
class j extends O {
|
|
@@ -1780,7 +1792,7 @@ class Hr extends O {
|
|
|
1780
1792
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
1781
1793
|
}
|
|
1782
1794
|
}
|
|
1783
|
-
class
|
|
1795
|
+
class Ne extends O {
|
|
1784
1796
|
/**
|
|
1785
1797
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
1786
1798
|
*
|
|
@@ -1795,7 +1807,7 @@ class _e extends O {
|
|
|
1795
1807
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
1796
1808
|
}
|
|
1797
1809
|
}
|
|
1798
|
-
class it extends
|
|
1810
|
+
class it extends Ne {
|
|
1799
1811
|
/**
|
|
1800
1812
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
1801
1813
|
*
|
|
@@ -1814,7 +1826,7 @@ class it extends _e {
|
|
|
1814
1826
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
1815
1827
|
}
|
|
1816
1828
|
}
|
|
1817
|
-
class
|
|
1829
|
+
class ls extends it {
|
|
1818
1830
|
/**
|
|
1819
1831
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
1820
1832
|
*
|
|
@@ -1829,7 +1841,7 @@ class cs extends it {
|
|
|
1829
1841
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
1830
1842
|
}
|
|
1831
1843
|
}
|
|
1832
|
-
class
|
|
1844
|
+
class us {
|
|
1833
1845
|
/**
|
|
1834
1846
|
* Инициализирует экземпляр класса {@link Image}.
|
|
1835
1847
|
*
|
|
@@ -1867,7 +1879,7 @@ class wr extends it {
|
|
|
1867
1879
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
1868
1880
|
}
|
|
1869
1881
|
}
|
|
1870
|
-
class N extends
|
|
1882
|
+
class N extends ls {
|
|
1871
1883
|
/**
|
|
1872
1884
|
* Инициализирует экземпляр класса {@link Product}.
|
|
1873
1885
|
*
|
|
@@ -1944,9 +1956,9 @@ class N extends cs {
|
|
|
1944
1956
|
* Список коэффициентов цен на продукт.
|
|
1945
1957
|
*/
|
|
1946
1958
|
s(this, "priceCoefficients");
|
|
1947
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Hr(e.unit) : new Hr(), 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 =
|
|
1959
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Hr(e.unit) : new Hr(), 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) ? v(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 cs(p))) ?? [], this.type = "product";
|
|
1948
1960
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1949
|
-
t && (this.category = new wr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new wr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new
|
|
1961
|
+
t && (this.category = new wr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new wr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new us(p, L().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Sr(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1950
1962
|
}
|
|
1951
1963
|
/**
|
|
1952
1964
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1968,7 +1980,7 @@ class N extends cs {
|
|
|
1968
1980
|
}
|
|
1969
1981
|
}
|
|
1970
1982
|
var $r = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))($r || {});
|
|
1971
|
-
class
|
|
1983
|
+
class K extends N {
|
|
1972
1984
|
/**
|
|
1973
1985
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1974
1986
|
*
|
|
@@ -2004,10 +2016,10 @@ class J extends N {
|
|
|
2004
2016
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
2005
2017
|
*/
|
|
2006
2018
|
s(this, "isFavorite");
|
|
2007
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? $r.Product, this.discount = e != null && e.discount ? new
|
|
2019
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? $r.Product, this.discount = e != null && e.discount ? new os(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new ge(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;
|
|
2008
2020
|
}
|
|
2009
2021
|
}
|
|
2010
|
-
class
|
|
2022
|
+
class be extends wr {
|
|
2011
2023
|
/**
|
|
2012
2024
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
2013
2025
|
*
|
|
@@ -2110,7 +2122,7 @@ class nt extends G {
|
|
|
2110
2122
|
* @inheritDoc
|
|
2111
2123
|
*/
|
|
2112
2124
|
s(this, "replacementId");
|
|
2113
|
-
this.product = new
|
|
2125
|
+
this.product = new K(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new be(), 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 && Ft(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new q(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
2114
2126
|
}
|
|
2115
2127
|
}
|
|
2116
2128
|
let kr = class extends nt {
|
|
@@ -2160,7 +2172,7 @@ let kr = class extends nt {
|
|
|
2160
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 = z(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new j(e.currency);
|
|
2161
2173
|
}
|
|
2162
2174
|
};
|
|
2163
|
-
class
|
|
2175
|
+
class ke {
|
|
2164
2176
|
/**
|
|
2165
2177
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
2166
2178
|
*
|
|
@@ -2182,7 +2194,7 @@ class $e {
|
|
|
2182
2194
|
this.items = r.items.map((e) => new kr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
2183
2195
|
}
|
|
2184
2196
|
}
|
|
2185
|
-
class
|
|
2197
|
+
class Xs extends h {
|
|
2186
2198
|
/**
|
|
2187
2199
|
* Возвращает содержимое корзины указанного клиента.
|
|
2188
2200
|
*
|
|
@@ -2191,7 +2203,7 @@ class Js extends h {
|
|
|
2191
2203
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
2192
2204
|
*/
|
|
2193
2205
|
getCart(r) {
|
|
2194
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
2206
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ke(e.data));
|
|
2195
2207
|
}
|
|
2196
2208
|
/**
|
|
2197
2209
|
* Удаляет всё содержимое корзины.
|
|
@@ -2229,7 +2241,7 @@ class Js extends h {
|
|
|
2229
2241
|
is_additional_sale: e.isAdditionalSale,
|
|
2230
2242
|
...e.configuratorParams
|
|
2231
2243
|
},
|
|
2232
|
-
(i) => new
|
|
2244
|
+
(i) => new ke(i.data),
|
|
2233
2245
|
t
|
|
2234
2246
|
);
|
|
2235
2247
|
}
|
|
@@ -2259,7 +2271,7 @@ class Js extends h {
|
|
|
2259
2271
|
is_additional_sale: e.isAdditionalSale,
|
|
2260
2272
|
...e.configuratorParams
|
|
2261
2273
|
},
|
|
2262
|
-
(i) => new
|
|
2274
|
+
(i) => new ke(i.data),
|
|
2263
2275
|
t
|
|
2264
2276
|
);
|
|
2265
2277
|
}
|
|
@@ -2272,7 +2284,7 @@ class Js extends h {
|
|
|
2272
2284
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_delete_item
|
|
2273
2285
|
*/
|
|
2274
2286
|
deleteCartItem(r, e) {
|
|
2275
|
-
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new
|
|
2287
|
+
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new ke(t.data));
|
|
2276
2288
|
}
|
|
2277
2289
|
/**
|
|
2278
2290
|
* Добавляет продукты в корзину из файла CSV.
|
|
@@ -2283,7 +2295,7 @@ class Js extends h {
|
|
|
2283
2295
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
2284
2296
|
*/
|
|
2285
2297
|
addCartItemFromCSV(r, e) {
|
|
2286
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new
|
|
2298
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new ke(t.data));
|
|
2287
2299
|
}
|
|
2288
2300
|
/**
|
|
2289
2301
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -2296,8 +2308,8 @@ class Js extends h {
|
|
|
2296
2308
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
2297
2309
|
}
|
|
2298
2310
|
}
|
|
2299
|
-
var
|
|
2300
|
-
class E extends
|
|
2311
|
+
var ps = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(ps || {}), hs = /* @__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))(hs || {}), ot = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(ot || {});
|
|
2312
|
+
class E extends be {
|
|
2301
2313
|
/**
|
|
2302
2314
|
* Инициализирует экземпляр класса {@link Category}.
|
|
2303
2315
|
*
|
|
@@ -2335,7 +2347,7 @@ class ct {
|
|
|
2335
2347
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
2336
2348
|
}
|
|
2337
2349
|
}
|
|
2338
|
-
class F extends
|
|
2350
|
+
class F extends C {
|
|
2339
2351
|
}
|
|
2340
2352
|
class Lr extends O {
|
|
2341
2353
|
/**
|
|
@@ -2368,7 +2380,7 @@ class Lr extends O {
|
|
|
2368
2380
|
this.salesDirection = e != null && e.salesDirection ? new F(e.salesDirection) : new F(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new ct(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
2369
2381
|
}
|
|
2370
2382
|
}
|
|
2371
|
-
class Or extends
|
|
2383
|
+
class Or extends C {
|
|
2372
2384
|
}
|
|
2373
2385
|
class lt extends O {
|
|
2374
2386
|
/**
|
|
@@ -2393,7 +2405,7 @@ class lt extends O {
|
|
|
2393
2405
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
2394
2406
|
}
|
|
2395
2407
|
}
|
|
2396
|
-
class
|
|
2408
|
+
class Ve extends O {
|
|
2397
2409
|
/**
|
|
2398
2410
|
* Инициализирует экземпляр класса {@link UserRegionShortInfo}.
|
|
2399
2411
|
*
|
|
@@ -2408,7 +2420,7 @@ class Ye extends O {
|
|
|
2408
2420
|
this.abbr = (e == null ? void 0 : e.abbr) ?? "";
|
|
2409
2421
|
}
|
|
2410
2422
|
}
|
|
2411
|
-
class
|
|
2423
|
+
class X extends Lr {
|
|
2412
2424
|
/**
|
|
2413
2425
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
2414
2426
|
*
|
|
@@ -2465,10 +2477,10 @@ class K extends Lr {
|
|
|
2465
2477
|
* Дата и время последнего входа в систему.
|
|
2466
2478
|
*/
|
|
2467
2479
|
s(this, "lastLoginAt");
|
|
2468
|
-
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 =
|
|
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) ? v(e.createdAt) : e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new lt(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((c) => new Or(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 Ve(c)), this.managers = (o = e == null ? void 0 : e.managers) == null ? void 0 : o.map((c) => new X(c)), this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? v(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt;
|
|
2469
2481
|
}
|
|
2470
2482
|
}
|
|
2471
|
-
class
|
|
2483
|
+
class gs extends be {
|
|
2472
2484
|
/**
|
|
2473
2485
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
2474
2486
|
*
|
|
@@ -2496,10 +2508,10 @@ class hs extends Pe {
|
|
|
2496
2508
|
* Данные о менеджере за которым закреплена категория.
|
|
2497
2509
|
*/
|
|
2498
2510
|
s(this, "manager");
|
|
2499
|
-
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
|
|
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 X(e.manager) : void 0;
|
|
2500
2512
|
}
|
|
2501
2513
|
}
|
|
2502
|
-
class
|
|
2514
|
+
class Ee extends gs {
|
|
2503
2515
|
/**
|
|
2504
2516
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
2505
2517
|
*
|
|
@@ -2516,7 +2528,7 @@ class ze extends hs {
|
|
|
2516
2528
|
* Список продуктов категории.
|
|
2517
2529
|
*/
|
|
2518
2530
|
s(this, "products");
|
|
2519
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
2531
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Ee(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
|
|
2520
2532
|
}
|
|
2521
2533
|
}
|
|
2522
2534
|
class ut {
|
|
@@ -2534,10 +2546,10 @@ class ut {
|
|
|
2534
2546
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
2535
2547
|
*/
|
|
2536
2548
|
s(this, "increasePercent");
|
|
2537
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
2549
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
2538
2550
|
}
|
|
2539
2551
|
}
|
|
2540
|
-
class
|
|
2552
|
+
class cr extends ut {
|
|
2541
2553
|
/**
|
|
2542
2554
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2543
2555
|
*
|
|
@@ -2549,7 +2561,7 @@ class or extends ut {
|
|
|
2549
2561
|
* Базовые данные о продукте.
|
|
2550
2562
|
*/
|
|
2551
2563
|
s(this, "productCategory");
|
|
2552
|
-
this.productCategory = new
|
|
2564
|
+
this.productCategory = new be(e == null ? void 0 : e.productCategory);
|
|
2553
2565
|
}
|
|
2554
2566
|
}
|
|
2555
2567
|
class Ir extends O {
|
|
@@ -2575,9 +2587,9 @@ class Ir extends O {
|
|
|
2575
2587
|
this.photo = e.photo, this.contacts = new ct(e.contacts), this.curatedDirection = new Or(e.curatedDirection);
|
|
2576
2588
|
}
|
|
2577
2589
|
}
|
|
2578
|
-
class ae extends
|
|
2590
|
+
class ae extends C {
|
|
2579
2591
|
}
|
|
2580
|
-
class we extends
|
|
2592
|
+
class we extends C {
|
|
2581
2593
|
/**
|
|
2582
2594
|
* Инициализирует экземпляр класса {@link Region}.
|
|
2583
2595
|
*
|
|
@@ -2592,7 +2604,7 @@ class we extends v {
|
|
|
2592
2604
|
e && (this.country = new ae(e.country));
|
|
2593
2605
|
}
|
|
2594
2606
|
}
|
|
2595
|
-
class ve extends
|
|
2607
|
+
class ve extends C {
|
|
2596
2608
|
/**
|
|
2597
2609
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
2598
2610
|
*
|
|
@@ -2643,7 +2655,7 @@ class pt extends O {
|
|
|
2643
2655
|
* Признак активности учетной записи пользователя.
|
|
2644
2656
|
*/
|
|
2645
2657
|
s(this, "isActive");
|
|
2646
|
-
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 F(e.salesDirection) : void 0, this.createdAt =
|
|
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 F(e.salesDirection) : void 0, this.createdAt = R(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? v(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2647
2659
|
}
|
|
2648
2660
|
}
|
|
2649
2661
|
class ne extends pt {
|
|
@@ -2695,7 +2707,7 @@ class ne extends pt {
|
|
|
2695
2707
|
this.salesDirection = new F(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 ve(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 Ir(o))) ?? void 0;
|
|
2696
2708
|
}
|
|
2697
2709
|
}
|
|
2698
|
-
class
|
|
2710
|
+
class Le extends G {
|
|
2699
2711
|
/**
|
|
2700
2712
|
* Инициализирует новый экземпляр класса.
|
|
2701
2713
|
*
|
|
@@ -2719,10 +2731,10 @@ class ke extends G {
|
|
|
2719
2731
|
* Данные шаблона прайс-листа.
|
|
2720
2732
|
*/
|
|
2721
2733
|
s(this, "priceTemplate");
|
|
2722
|
-
this.createdAt =
|
|
2734
|
+
this.createdAt = R(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ne(e == null ? void 0 : e.client), this.priceTemplate = new ge(e == null ? void 0 : e.priceTemplate);
|
|
2723
2735
|
}
|
|
2724
2736
|
}
|
|
2725
|
-
class
|
|
2737
|
+
class lr extends ut {
|
|
2726
2738
|
/**
|
|
2727
2739
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
2728
2740
|
*
|
|
@@ -2737,7 +2749,7 @@ class cr extends ut {
|
|
|
2737
2749
|
this.product = new N(e == null ? void 0 : e.product);
|
|
2738
2750
|
}
|
|
2739
2751
|
}
|
|
2740
|
-
class ht extends
|
|
2752
|
+
class ht extends C {
|
|
2741
2753
|
}
|
|
2742
2754
|
class fe extends O {
|
|
2743
2755
|
/**
|
|
@@ -2785,7 +2797,7 @@ class pe {
|
|
|
2785
2797
|
this.property = new fe(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2786
2798
|
}
|
|
2787
2799
|
}
|
|
2788
|
-
class
|
|
2800
|
+
class Zs {
|
|
2789
2801
|
/**
|
|
2790
2802
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2791
2803
|
*
|
|
@@ -2850,11 +2862,11 @@ class Ks {
|
|
|
2850
2862
|
return Object.keys(this).forEach((c) => {
|
|
2851
2863
|
const u = this[c];
|
|
2852
2864
|
// eslint-disable-next-line prettier/prettier
|
|
2853
|
-
a(u) ||
|
|
2865
|
+
a(u) || R(u) && u.trim().length === 0 || br(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2854
2866
|
}), !((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;
|
|
2855
2867
|
}
|
|
2856
2868
|
}
|
|
2857
|
-
class
|
|
2869
|
+
class Oe extends O {
|
|
2858
2870
|
/**
|
|
2859
2871
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2860
2872
|
*
|
|
@@ -2908,10 +2920,10 @@ class Br {
|
|
|
2908
2920
|
* Минимальный коэффициент цены.
|
|
2909
2921
|
*/
|
|
2910
2922
|
s(this, "minCoefficient");
|
|
2911
|
-
this.role = new
|
|
2923
|
+
this.role = new Oe(r == null ? void 0 : r.role), this.category = new be(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
2912
2924
|
}
|
|
2913
2925
|
}
|
|
2914
|
-
class
|
|
2926
|
+
class fs {
|
|
2915
2927
|
/**
|
|
2916
2928
|
* Инициализирует экземпляр класса {@link FilterSettings}.
|
|
2917
2929
|
*
|
|
@@ -2963,10 +2975,10 @@ class Wr {
|
|
|
2963
2975
|
* @inheritDoc
|
|
2964
2976
|
*/
|
|
2965
2977
|
s(this, "settings");
|
|
2966
|
-
this.category = new
|
|
2978
|
+
this.category = new be(r == null ? void 0 : r.category), this.property = new fe(r == null ? void 0 : r.property), this.settings = new fs(r == null ? void 0 : r.settings);
|
|
2967
2979
|
}
|
|
2968
2980
|
}
|
|
2969
|
-
class
|
|
2981
|
+
class ms {
|
|
2970
2982
|
/**
|
|
2971
2983
|
* Инициализирует экземпляр класса {@link CategoryFilterValue}.
|
|
2972
2984
|
*
|
|
@@ -2984,7 +2996,7 @@ class fs {
|
|
|
2984
2996
|
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "";
|
|
2985
2997
|
}
|
|
2986
2998
|
}
|
|
2987
|
-
class
|
|
2999
|
+
class ys {
|
|
2988
3000
|
/**
|
|
2989
3001
|
* Инициализирует экземпляр класса {@link CategoryFilter}.
|
|
2990
3002
|
*
|
|
@@ -3027,10 +3039,10 @@ class ms {
|
|
|
3027
3039
|
*/
|
|
3028
3040
|
s(this, "max");
|
|
3029
3041
|
var e;
|
|
3030
|
-
this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ?? ot.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
|
|
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) ?? ot.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 ms(t))) ?? [], this.min = (r == null ? void 0 : r.min) ?? null, this.max = (r == null ? void 0 : r.max) ?? null;
|
|
3031
3043
|
}
|
|
3032
3044
|
}
|
|
3033
|
-
class
|
|
3045
|
+
class ei extends h {
|
|
3034
3046
|
/**
|
|
3035
3047
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
3036
3048
|
*
|
|
@@ -3057,11 +3069,11 @@ class Xs extends h {
|
|
|
3057
3069
|
*/
|
|
3058
3070
|
// eslint-disable-next-line class-methods-use-this
|
|
3059
3071
|
getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
|
|
3060
|
-
let c = `${
|
|
3072
|
+
let c = `${L().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
3061
3073
|
return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
|
|
3062
3074
|
}
|
|
3063
3075
|
}
|
|
3064
|
-
class
|
|
3076
|
+
class ri extends h {
|
|
3065
3077
|
/**
|
|
3066
3078
|
* Импортирует цены клиента из CSV файла.
|
|
3067
3079
|
*
|
|
@@ -3185,7 +3197,7 @@ class Zs extends h {
|
|
|
3185
3197
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3186
3198
|
increase_percent: t.value
|
|
3187
3199
|
},
|
|
3188
|
-
(o) => new
|
|
3200
|
+
(o) => new K(o.data)
|
|
3189
3201
|
);
|
|
3190
3202
|
}
|
|
3191
3203
|
/**
|
|
@@ -3197,7 +3209,7 @@ class Zs extends h {
|
|
|
3197
3209
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
3198
3210
|
*/
|
|
3199
3211
|
removeProductPrice(r, e) {
|
|
3200
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new
|
|
3212
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new K(t.data));
|
|
3201
3213
|
}
|
|
3202
3214
|
/**
|
|
3203
3215
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -3260,7 +3272,7 @@ class Zs extends h {
|
|
|
3260
3272
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
3261
3273
|
}
|
|
3262
3274
|
}
|
|
3263
|
-
class
|
|
3275
|
+
class ti extends h {
|
|
3264
3276
|
/**
|
|
3265
3277
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
3266
3278
|
*
|
|
@@ -3269,7 +3281,7 @@ class ei extends h {
|
|
|
3269
3281
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_list
|
|
3270
3282
|
*/
|
|
3271
3283
|
getTemplateList(r) {
|
|
3272
|
-
return this.getTypedList(
|
|
3284
|
+
return this.getTypedList(Le, `/internal/clients/${r}/price/templates`);
|
|
3273
3285
|
}
|
|
3274
3286
|
/**
|
|
3275
3287
|
* Возвращает действующий шаблон прайс листа привязанный к клиенту.
|
|
@@ -3279,7 +3291,7 @@ class ei extends h {
|
|
|
3279
3291
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
3280
3292
|
*/
|
|
3281
3293
|
getActiveTemplate(r) {
|
|
3282
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
3294
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Le(e.data), !0);
|
|
3283
3295
|
}
|
|
3284
3296
|
/**
|
|
3285
3297
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -3291,14 +3303,14 @@ class ei extends h {
|
|
|
3291
3303
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
3292
3304
|
*/
|
|
3293
3305
|
attachTemplate(r, e, t) {
|
|
3294
|
-
const i =
|
|
3306
|
+
const i = L().config.dateFormats.api;
|
|
3295
3307
|
return this.post(
|
|
3296
3308
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
3297
3309
|
t && {
|
|
3298
|
-
startAt: t.startAt &&
|
|
3299
|
-
endAt: t.endAt &&
|
|
3310
|
+
startAt: t.startAt && k(t.startAt, i),
|
|
3311
|
+
endAt: t.endAt && k(t.endAt, i)
|
|
3300
3312
|
},
|
|
3301
|
-
(o) => new
|
|
3313
|
+
(o) => new Le(o.data),
|
|
3302
3314
|
{},
|
|
3303
3315
|
!0
|
|
3304
3316
|
);
|
|
@@ -3325,14 +3337,14 @@ class ei extends h {
|
|
|
3325
3337
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
3326
3338
|
*/
|
|
3327
3339
|
changeTemplate(r, e, t, i) {
|
|
3328
|
-
const o =
|
|
3340
|
+
const o = L().config.dateFormats.api;
|
|
3329
3341
|
return this.patch(
|
|
3330
3342
|
`/internal/clients/${r}/price/templates/${e}/${t}`,
|
|
3331
3343
|
i && {
|
|
3332
|
-
startAt: i.startAt &&
|
|
3333
|
-
endAt: i.endAt &&
|
|
3344
|
+
startAt: i.startAt && k(i.startAt, o),
|
|
3345
|
+
endAt: i.endAt && k(i.endAt, o)
|
|
3334
3346
|
},
|
|
3335
|
-
(c) => new
|
|
3347
|
+
(c) => new Le(c.data)
|
|
3336
3348
|
);
|
|
3337
3349
|
}
|
|
3338
3350
|
/**
|
|
@@ -3348,7 +3360,7 @@ class ei extends h {
|
|
|
3348
3360
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
3349
3361
|
}
|
|
3350
3362
|
}
|
|
3351
|
-
class
|
|
3363
|
+
class si extends h {
|
|
3352
3364
|
/**
|
|
3353
3365
|
* Возвращает список данных о корневых категориях.
|
|
3354
3366
|
*
|
|
@@ -3436,7 +3448,7 @@ class ri extends h {
|
|
|
3436
3448
|
});
|
|
3437
3449
|
}
|
|
3438
3450
|
}
|
|
3439
|
-
class
|
|
3451
|
+
class ii extends Y {
|
|
3440
3452
|
/**
|
|
3441
3453
|
* Возвращает данные об указанном продукте.
|
|
3442
3454
|
*
|
|
@@ -3480,9 +3492,9 @@ class ti extends Y {
|
|
|
3480
3492
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
|
|
3481
3493
|
*/
|
|
3482
3494
|
getNewProducts(r, e, t = !0) {
|
|
3483
|
-
const i =
|
|
3495
|
+
const i = L().config.dateFormats.api;
|
|
3484
3496
|
return this.getTypedPaginated(N, "/internal/catalog/products/new", void 0, void 0, e, {
|
|
3485
|
-
period: { from:
|
|
3497
|
+
period: { from: k(r, i) },
|
|
3486
3498
|
withPriceCoefficients: t
|
|
3487
3499
|
});
|
|
3488
3500
|
}
|
|
@@ -3502,7 +3514,7 @@ class ti extends Y {
|
|
|
3502
3514
|
});
|
|
3503
3515
|
}
|
|
3504
3516
|
}
|
|
3505
|
-
class
|
|
3517
|
+
class ni extends h {
|
|
3506
3518
|
/**
|
|
3507
3519
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
3508
3520
|
*
|
|
@@ -3512,7 +3524,7 @@ class si extends h {
|
|
|
3512
3524
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
|
|
3513
3525
|
*/
|
|
3514
3526
|
getRootCategoriesList(r, e = !1) {
|
|
3515
|
-
return this.getTypedList(
|
|
3527
|
+
return this.getTypedList(Ee, "/internal/catalog/categories", {
|
|
3516
3528
|
clientId: r,
|
|
3517
3529
|
showHidden: e
|
|
3518
3530
|
});
|
|
@@ -3535,7 +3547,7 @@ class si extends h {
|
|
|
3535
3547
|
showHidden: t,
|
|
3536
3548
|
withNestedCategories: i
|
|
3537
3549
|
},
|
|
3538
|
-
(o) => new
|
|
3550
|
+
(o) => new Ee(o.data)
|
|
3539
3551
|
);
|
|
3540
3552
|
}
|
|
3541
3553
|
/**
|
|
@@ -3556,11 +3568,11 @@ class si extends h {
|
|
|
3556
3568
|
showHidden: i,
|
|
3557
3569
|
withPriceCoefficients: t
|
|
3558
3570
|
},
|
|
3559
|
-
(o) => De(o.data, (c) => new
|
|
3571
|
+
(o) => De(o.data, (c) => new K(c))
|
|
3560
3572
|
);
|
|
3561
3573
|
}
|
|
3562
3574
|
}
|
|
3563
|
-
class
|
|
3575
|
+
class oi extends Y {
|
|
3564
3576
|
/**
|
|
3565
3577
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
3566
3578
|
*
|
|
@@ -3577,7 +3589,7 @@ class ii extends Y {
|
|
|
3577
3589
|
clientId: e,
|
|
3578
3590
|
withPriceCoefficients: t
|
|
3579
3591
|
},
|
|
3580
|
-
(i) => new
|
|
3592
|
+
(i) => new K(i.data)
|
|
3581
3593
|
);
|
|
3582
3594
|
}
|
|
3583
3595
|
/**
|
|
@@ -3591,15 +3603,15 @@ class ii extends Y {
|
|
|
3591
3603
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
|
|
3592
3604
|
*/
|
|
3593
3605
|
getNewProducts(r, e, t, i = !0) {
|
|
3594
|
-
const o =
|
|
3595
|
-
return this.getTypedPaginated(
|
|
3606
|
+
const o = L().config.dateFormats.api;
|
|
3607
|
+
return this.getTypedPaginated(K, "/internal/catalog/products/new", void 0, void 0, t, {
|
|
3596
3608
|
clientId: r,
|
|
3597
|
-
period: { from:
|
|
3609
|
+
period: { from: k(e, o) },
|
|
3598
3610
|
withPriceCoefficients: i
|
|
3599
3611
|
});
|
|
3600
3612
|
}
|
|
3601
3613
|
}
|
|
3602
|
-
class
|
|
3614
|
+
class ci extends Y {
|
|
3603
3615
|
/**
|
|
3604
3616
|
* Возвращает список шаблонов прайс-листа.
|
|
3605
3617
|
*
|
|
@@ -3665,7 +3677,7 @@ class ni extends Y {
|
|
|
3665
3677
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get_list
|
|
3666
3678
|
*/
|
|
3667
3679
|
getProductTemplatePrices(r) {
|
|
3668
|
-
return this.getTypedList(
|
|
3680
|
+
return this.getTypedList(lr, `/internal/price/templates/${r}/products`);
|
|
3669
3681
|
}
|
|
3670
3682
|
/**
|
|
3671
3683
|
* Возвращает данные о цене на продукт в шаблоне прайс-листа.
|
|
@@ -3676,7 +3688,7 @@ class ni extends Y {
|
|
|
3676
3688
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
3677
3689
|
*/
|
|
3678
3690
|
getProductTemplatePrice(r, e) {
|
|
3679
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new
|
|
3691
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new lr(t.data));
|
|
3680
3692
|
}
|
|
3681
3693
|
/**
|
|
3682
3694
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -3695,7 +3707,7 @@ class ni extends Y {
|
|
|
3695
3707
|
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
3696
3708
|
increase_percent: t.value
|
|
3697
3709
|
},
|
|
3698
|
-
(o) => new
|
|
3710
|
+
(o) => new lr(o.data)
|
|
3699
3711
|
);
|
|
3700
3712
|
}
|
|
3701
3713
|
/**
|
|
@@ -3717,7 +3729,7 @@ class ni extends Y {
|
|
|
3717
3729
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_get_list
|
|
3718
3730
|
*/
|
|
3719
3731
|
getCategoryTemplatePrices(r) {
|
|
3720
|
-
return this.getTypedList(
|
|
3732
|
+
return this.getTypedList(cr, `/internal/price/templates/${r}/categories`);
|
|
3721
3733
|
}
|
|
3722
3734
|
/**
|
|
3723
3735
|
* Возвращает данные о цене на категорию продуктов в шаблоне прайс-листа.
|
|
@@ -3731,7 +3743,7 @@ class ni extends Y {
|
|
|
3731
3743
|
return this.get(
|
|
3732
3744
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3733
3745
|
{},
|
|
3734
|
-
(t) => new
|
|
3746
|
+
(t) => new cr(t.data)
|
|
3735
3747
|
);
|
|
3736
3748
|
}
|
|
3737
3749
|
/**
|
|
@@ -3757,7 +3769,7 @@ class ni extends Y {
|
|
|
3757
3769
|
},
|
|
3758
3770
|
params: i ? { recursively: !0 } : {}
|
|
3759
3771
|
},
|
|
3760
|
-
(c) => new
|
|
3772
|
+
(c) => new cr(c.data)
|
|
3761
3773
|
);
|
|
3762
3774
|
}
|
|
3763
3775
|
/**
|
|
@@ -3785,17 +3797,17 @@ class ni extends Y {
|
|
|
3785
3797
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_clients_get_list
|
|
3786
3798
|
*/
|
|
3787
3799
|
getTemplateClients(r) {
|
|
3788
|
-
return this.getTypedList(
|
|
3800
|
+
return this.getTypedList(Le, `/internal/price/templates/${r}/clients`);
|
|
3789
3801
|
}
|
|
3790
3802
|
}
|
|
3791
|
-
class
|
|
3803
|
+
class li extends h {
|
|
3792
3804
|
/**
|
|
3793
3805
|
* Возвращает список ролей ценообразования.
|
|
3794
3806
|
*
|
|
3795
3807
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3796
3808
|
*/
|
|
3797
3809
|
getRoles() {
|
|
3798
|
-
return this.getTypedList(
|
|
3810
|
+
return this.getTypedList(Oe, "/internal/price/roles");
|
|
3799
3811
|
}
|
|
3800
3812
|
/**
|
|
3801
3813
|
* Добавляет новую роль ценообразования.
|
|
@@ -3805,7 +3817,7 @@ class oi extends h {
|
|
|
3805
3817
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3806
3818
|
*/
|
|
3807
3819
|
createRole(r) {
|
|
3808
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3820
|
+
return this.post("/internal/price/roles", r, (e) => new Oe(e.data));
|
|
3809
3821
|
}
|
|
3810
3822
|
/**
|
|
3811
3823
|
* Возвращает данные роли ценообразования.
|
|
@@ -3815,7 +3827,7 @@ class oi extends h {
|
|
|
3815
3827
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3816
3828
|
*/
|
|
3817
3829
|
getRole(r) {
|
|
3818
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3830
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new Oe(e.data));
|
|
3819
3831
|
}
|
|
3820
3832
|
/**
|
|
3821
3833
|
* Обновляет данные роли ценообразования.
|
|
@@ -3826,7 +3838,7 @@ class oi extends h {
|
|
|
3826
3838
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3827
3839
|
*/
|
|
3828
3840
|
updateRole(r, e) {
|
|
3829
|
-
return this.patch(`/internal/price/roles/${r}`, e, (t) => new
|
|
3841
|
+
return this.patch(`/internal/price/roles/${r}`, e, (t) => new Oe(t.data));
|
|
3830
3842
|
}
|
|
3831
3843
|
/**
|
|
3832
3844
|
* Удаляет роль ценообразования.
|
|
@@ -3864,7 +3876,7 @@ class oi extends h {
|
|
|
3864
3876
|
);
|
|
3865
3877
|
}
|
|
3866
3878
|
}
|
|
3867
|
-
class
|
|
3879
|
+
class ui extends Y {
|
|
3868
3880
|
/**
|
|
3869
3881
|
* Возвращает пагинированный список свойств.
|
|
3870
3882
|
*
|
|
@@ -4243,7 +4255,7 @@ class ci extends Y {
|
|
|
4243
4255
|
return this.get(
|
|
4244
4256
|
`/internal/catalog/categories/${r}/filters`,
|
|
4245
4257
|
{ recursively: e },
|
|
4246
|
-
(t) => t.data.map((i) => new
|
|
4258
|
+
(t) => t.data.map((i) => new ys(i))
|
|
4247
4259
|
);
|
|
4248
4260
|
}
|
|
4249
4261
|
/**
|
|
@@ -4281,7 +4293,7 @@ class ci extends Y {
|
|
|
4281
4293
|
return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
|
|
4282
4294
|
}
|
|
4283
4295
|
}
|
|
4284
|
-
class
|
|
4296
|
+
class pi extends h {
|
|
4285
4297
|
/**
|
|
4286
4298
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
4287
4299
|
*
|
|
@@ -4369,7 +4381,7 @@ function jr(n) {
|
|
|
4369
4381
|
}
|
|
4370
4382
|
}), r;
|
|
4371
4383
|
}
|
|
4372
|
-
var
|
|
4384
|
+
var as = /* @__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))(as || {}), Q = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(Q || {});
|
|
4373
4385
|
class vr extends G {
|
|
4374
4386
|
/**
|
|
4375
4387
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
@@ -4452,10 +4464,10 @@ class te extends Cr {
|
|
|
4452
4464
|
* Дата и время последнего удаления.
|
|
4453
4465
|
*/
|
|
4454
4466
|
s(this, "deletedAt");
|
|
4455
|
-
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 =
|
|
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) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
4456
4468
|
}
|
|
4457
4469
|
}
|
|
4458
|
-
class se extends
|
|
4470
|
+
class se extends C {
|
|
4459
4471
|
/**
|
|
4460
4472
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
4461
4473
|
*/
|
|
@@ -4468,7 +4480,7 @@ class se extends v {
|
|
|
4468
4480
|
});
|
|
4469
4481
|
}
|
|
4470
4482
|
}
|
|
4471
|
-
class Ce extends
|
|
4483
|
+
class Ce extends C {
|
|
4472
4484
|
}
|
|
4473
4485
|
class gt extends rt {
|
|
4474
4486
|
/**
|
|
@@ -4482,7 +4494,7 @@ class gt extends rt {
|
|
|
4482
4494
|
* Дата и время последнего удаления.
|
|
4483
4495
|
*/
|
|
4484
4496
|
s(this, "deletedAt");
|
|
4485
|
-
this.deletedAt =
|
|
4497
|
+
this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? v(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
4486
4498
|
}
|
|
4487
4499
|
}
|
|
4488
4500
|
class ft extends gt {
|
|
@@ -4531,7 +4543,7 @@ class ft extends gt {
|
|
|
4531
4543
|
*/
|
|
4532
4544
|
s(this, "updater");
|
|
4533
4545
|
if (e) {
|
|
4534
|
-
if (this.opf = new se(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt =
|
|
4546
|
+
if (this.opf = new se(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = R(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : e.createdAt, this.creator = e.creator ? new q(e.creator) : void 0, this.updater = e.updater ? new q(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Ce(e.partnerGroup)), e.contacts) {
|
|
4535
4547
|
const t = [];
|
|
4536
4548
|
e.contacts.forEach((i) => {
|
|
4537
4549
|
t.push(new te(i));
|
|
@@ -4546,7 +4558,7 @@ class ft extends gt {
|
|
|
4546
4558
|
}
|
|
4547
4559
|
}
|
|
4548
4560
|
}
|
|
4549
|
-
class
|
|
4561
|
+
class ws extends ft {
|
|
4550
4562
|
/**
|
|
4551
4563
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
4552
4564
|
*
|
|
@@ -4614,7 +4626,7 @@ class yt extends mt {
|
|
|
4614
4626
|
e && (this.kpp = e.kpp ?? "");
|
|
4615
4627
|
}
|
|
4616
4628
|
}
|
|
4617
|
-
class
|
|
4629
|
+
class vs extends yt {
|
|
4618
4630
|
/**
|
|
4619
4631
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
4620
4632
|
*
|
|
@@ -4637,7 +4649,7 @@ class ws extends yt {
|
|
|
4637
4649
|
e && (this.registrationCountry = new ae(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
4638
4650
|
}
|
|
4639
4651
|
}
|
|
4640
|
-
class
|
|
4652
|
+
class Qe {
|
|
4641
4653
|
/**
|
|
4642
4654
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
4643
4655
|
*
|
|
@@ -4650,13 +4662,13 @@ class je {
|
|
|
4650
4662
|
case Q.UlR:
|
|
4651
4663
|
return new yt(r);
|
|
4652
4664
|
case Q.UlNr:
|
|
4653
|
-
return new
|
|
4665
|
+
return new vs(r);
|
|
4654
4666
|
default:
|
|
4655
|
-
return new
|
|
4667
|
+
return new ws(r);
|
|
4656
4668
|
}
|
|
4657
4669
|
}
|
|
4658
4670
|
}
|
|
4659
|
-
class
|
|
4671
|
+
class xe extends gt {
|
|
4660
4672
|
/**
|
|
4661
4673
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
4662
4674
|
*
|
|
@@ -4696,9 +4708,9 @@ class Ie extends gt {
|
|
|
4696
4708
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new st(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new te(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
4697
4709
|
}
|
|
4698
4710
|
}
|
|
4699
|
-
class at extends
|
|
4711
|
+
class at extends C {
|
|
4700
4712
|
}
|
|
4701
|
-
class wt extends
|
|
4713
|
+
class wt extends C {
|
|
4702
4714
|
}
|
|
4703
4715
|
class Gr extends ne {
|
|
4704
4716
|
/**
|
|
@@ -4750,10 +4762,10 @@ class Gr extends ne {
|
|
|
4750
4762
|
* @inheritDoc
|
|
4751
4763
|
*/
|
|
4752
4764
|
s(this, "extraData");
|
|
4753
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) =>
|
|
4765
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Qe.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 te(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new xe(u))) ?? [], this.channelPrimaryInterest = new at(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new wt(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(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) ?? {};
|
|
4754
4766
|
}
|
|
4755
4767
|
}
|
|
4756
|
-
class
|
|
4768
|
+
class hi extends Fe {
|
|
4757
4769
|
/**
|
|
4758
4770
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4759
4771
|
*
|
|
@@ -4866,7 +4878,7 @@ class ui extends Ne {
|
|
|
4866
4878
|
* @inheritDoc
|
|
4867
4879
|
*/
|
|
4868
4880
|
s(this, "noOrdersPeriod", new T());
|
|
4869
|
-
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 ve(P)), this.region = new we(e == null ? void 0 : e.region), this.country = new ae(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 T(e == null ? void 0 : e.createdAt), this.lastLoginDate = new T(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
|
|
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 ve(P)), this.region = new we(e == null ? void 0 : e.region), this.country = new ae(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 T(e == null ? void 0 : e.createdAt), this.lastLoginDate = new T(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 X(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 Ir(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new F(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new se(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new J(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 Cr(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4870
4882
|
createdAt: new T((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4871
4883
|
creator: (g = e == null ? void 0 : e.lastOrder) == null ? void 0 : g.creator,
|
|
4872
4884
|
isApproved: (y = e == null ? void 0 : e.lastOrder) == null ? void 0 : y.isApproved
|
|
@@ -4911,7 +4923,7 @@ class ui extends Ne {
|
|
|
4911
4923
|
this.contragentType = new se();
|
|
4912
4924
|
break;
|
|
4913
4925
|
case "preferredDeliveryType":
|
|
4914
|
-
this.preferredDeliveryType = new
|
|
4926
|
+
this.preferredDeliveryType = new J();
|
|
4915
4927
|
break;
|
|
4916
4928
|
case "partnerGroups":
|
|
4917
4929
|
this.partnerGroups = [];
|
|
@@ -4950,10 +4962,10 @@ class vt extends G {
|
|
|
4950
4962
|
* @inheritDoc
|
|
4951
4963
|
*/
|
|
4952
4964
|
s(this, "creator");
|
|
4953
|
-
this.createdAt =
|
|
4965
|
+
this.createdAt = R(e == null ? void 0 : e.createdAt) ? v(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new q(e == null ? void 0 : e.creator);
|
|
4954
4966
|
}
|
|
4955
4967
|
}
|
|
4956
|
-
class
|
|
4968
|
+
class Cs extends O {
|
|
4957
4969
|
/**
|
|
4958
4970
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4959
4971
|
*
|
|
@@ -4990,10 +5002,10 @@ class vs extends O {
|
|
|
4990
5002
|
* @inheritDoc
|
|
4991
5003
|
*/
|
|
4992
5004
|
s(this, "curators");
|
|
4993
|
-
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new te(u))) ?? void 0, this.lastOrder = e.lastOrder ? new vt(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
|
|
5005
|
+
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new te(u))) ?? void 0, this.lastOrder = e.lastOrder ? new vt(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 J(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new F(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 Ir(u))) ?? void 0;
|
|
4994
5006
|
}
|
|
4995
5007
|
}
|
|
4996
|
-
class
|
|
5008
|
+
class ur extends G {
|
|
4997
5009
|
/**
|
|
4998
5010
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
4999
5011
|
*
|
|
@@ -5008,7 +5020,7 @@ class lr extends G {
|
|
|
5008
5020
|
this.isPrimary = e.isPrimary;
|
|
5009
5021
|
}
|
|
5010
5022
|
}
|
|
5011
|
-
class
|
|
5023
|
+
class Ds extends te {
|
|
5012
5024
|
/**
|
|
5013
5025
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
5014
5026
|
*
|
|
@@ -5033,7 +5045,7 @@ class Cs extends te {
|
|
|
5033
5045
|
*/
|
|
5034
5046
|
addresses: []
|
|
5035
5047
|
});
|
|
5036
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new
|
|
5048
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new ur(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new ur(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new ur(t))));
|
|
5037
5049
|
}
|
|
5038
5050
|
}
|
|
5039
5051
|
class H extends Y {
|
|
@@ -5226,7 +5238,7 @@ class H extends Y {
|
|
|
5226
5238
|
return this.post(
|
|
5227
5239
|
"/internal/clients/additional-data",
|
|
5228
5240
|
{ clients: t, requested_data_types: e },
|
|
5229
|
-
(i) => _.instanceListInitializer(
|
|
5241
|
+
(i) => _.instanceListInitializer(Cs, i.data)
|
|
5230
5242
|
);
|
|
5231
5243
|
}
|
|
5232
5244
|
/**
|
|
@@ -5236,7 +5248,7 @@ class H extends Y {
|
|
|
5236
5248
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_get_all_contact_list
|
|
5237
5249
|
*/
|
|
5238
5250
|
getAllClientContacts(r) {
|
|
5239
|
-
return this.getTypedList(
|
|
5251
|
+
return this.getTypedList(Ds, `/internal/clients/${r}/contacts/all`);
|
|
5240
5252
|
}
|
|
5241
5253
|
/**
|
|
5242
5254
|
* Создаёт нового клиента на основе указанных данных.
|
|
@@ -5386,7 +5398,7 @@ class H extends Y {
|
|
|
5386
5398
|
return this.post(
|
|
5387
5399
|
`/internal/clients/${r}/contragents`,
|
|
5388
5400
|
H.transformContragentClientDataToRequest(e),
|
|
5389
|
-
(i) =>
|
|
5401
|
+
(i) => Qe.createInstance(i.data),
|
|
5390
5402
|
t
|
|
5391
5403
|
);
|
|
5392
5404
|
}
|
|
@@ -5402,7 +5414,7 @@ class H extends Y {
|
|
|
5402
5414
|
return this.patch(
|
|
5403
5415
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
5404
5416
|
H.transformContragentClientDataToRequest(e),
|
|
5405
|
-
(i) =>
|
|
5417
|
+
(i) => Qe.createInstance(i.data),
|
|
5406
5418
|
t
|
|
5407
5419
|
);
|
|
5408
5420
|
}
|
|
@@ -5423,7 +5435,7 @@ class H extends Y {
|
|
|
5423
5435
|
* @see /doc/api/internal#/operations/api_internal_client_delivery_address_get_list
|
|
5424
5436
|
*/
|
|
5425
5437
|
getClientDeliveryAddresses(r) {
|
|
5426
|
-
return this.getTypedList(
|
|
5438
|
+
return this.getTypedList(xe, `/internal/clients/${r}/delivery-addresses`);
|
|
5427
5439
|
}
|
|
5428
5440
|
/**
|
|
5429
5441
|
* Создаёт новую запись об адресе доставки клиента.
|
|
@@ -5437,7 +5449,7 @@ class H extends Y {
|
|
|
5437
5449
|
return this.post(
|
|
5438
5450
|
`/internal/clients/${r}/delivery-addresses`,
|
|
5439
5451
|
H.transformClientDeliveryAddressToRequest(e),
|
|
5440
|
-
(i) => new
|
|
5452
|
+
(i) => new xe(i.data),
|
|
5441
5453
|
t
|
|
5442
5454
|
);
|
|
5443
5455
|
}
|
|
@@ -5453,7 +5465,7 @@ class H extends Y {
|
|
|
5453
5465
|
return this.patch(
|
|
5454
5466
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
5455
5467
|
H.transformClientDeliveryAddressToRequest(e),
|
|
5456
|
-
(i) => new
|
|
5468
|
+
(i) => new xe(i.data),
|
|
5457
5469
|
t
|
|
5458
5470
|
);
|
|
5459
5471
|
}
|
|
@@ -5719,7 +5731,7 @@ class H extends Y {
|
|
|
5719
5731
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5720
5732
|
}
|
|
5721
5733
|
}
|
|
5722
|
-
class
|
|
5734
|
+
class gi extends h {
|
|
5723
5735
|
/**
|
|
5724
5736
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5725
5737
|
*
|
|
@@ -5733,7 +5745,7 @@ class pi extends h {
|
|
|
5733
5745
|
});
|
|
5734
5746
|
}
|
|
5735
5747
|
}
|
|
5736
|
-
class
|
|
5748
|
+
class fi {
|
|
5737
5749
|
/**
|
|
5738
5750
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5739
5751
|
*
|
|
@@ -5752,11 +5764,11 @@ class hi {
|
|
|
5752
5764
|
* Текущая версия приложения.
|
|
5753
5765
|
*/
|
|
5754
5766
|
s(this, "version");
|
|
5755
|
-
this.date =
|
|
5767
|
+
this.date = R(r == null ? void 0 : r.date) ? v(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";
|
|
5756
5768
|
}
|
|
5757
5769
|
}
|
|
5758
|
-
var
|
|
5759
|
-
class
|
|
5770
|
+
var Rs = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Rs || {});
|
|
5771
|
+
class mi extends h {
|
|
5760
5772
|
/**
|
|
5761
5773
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5762
5774
|
*
|
|
@@ -5847,7 +5859,7 @@ class gi extends h {
|
|
|
5847
5859
|
});
|
|
5848
5860
|
}
|
|
5849
5861
|
}
|
|
5850
|
-
class
|
|
5862
|
+
class Ps {
|
|
5851
5863
|
/**
|
|
5852
5864
|
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
5853
5865
|
*
|
|
@@ -5865,7 +5877,7 @@ class Rs {
|
|
|
5865
5877
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5866
5878
|
}
|
|
5867
5879
|
}
|
|
5868
|
-
class
|
|
5880
|
+
class yi extends Ps {
|
|
5869
5881
|
/**
|
|
5870
5882
|
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5871
5883
|
*
|
|
@@ -5896,7 +5908,7 @@ class fi extends Rs {
|
|
|
5896
5908
|
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;
|
|
5897
5909
|
}
|
|
5898
5910
|
}
|
|
5899
|
-
class
|
|
5911
|
+
class ai {
|
|
5900
5912
|
/**
|
|
5901
5913
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5902
5914
|
*
|
|
@@ -5969,8 +5981,8 @@ class m {
|
|
|
5969
5981
|
* @param date Опорная дата.
|
|
5970
5982
|
*/
|
|
5971
5983
|
static intervalTillSameDate(r, e, t) {
|
|
5972
|
-
const i =
|
|
5973
|
-
return { from: he(e), to: W(
|
|
5984
|
+
const i = Wt(U(t), U(r)), o = U($(e, i)), c = Math.min(Nr(t), zt(o));
|
|
5985
|
+
return { from: he(e), to: W(jt(o, c)) };
|
|
5974
5986
|
}
|
|
5975
5987
|
/**
|
|
5976
5988
|
* Возвращает интервал «сдвинутая неделя до такого же дня недели»; недели начинаются с понедельника.
|
|
@@ -5979,8 +5991,8 @@ class m {
|
|
|
5979
5991
|
* @param shiftWeeks Смещение в неделях, может быть отрицательным.
|
|
5980
5992
|
*/
|
|
5981
5993
|
static weekTillSameWeekday(r, e) {
|
|
5982
|
-
const t =
|
|
5983
|
-
return { from: t, to: W(
|
|
5994
|
+
const t = Z(mr(r, e), { weekStartsOn: 1 }), i = We(r, Z(r, { weekStartsOn: 1 }));
|
|
5995
|
+
return { from: t, to: W(ee(t, i)) };
|
|
5984
5996
|
}
|
|
5985
5997
|
/**
|
|
5986
5998
|
* Возвращает интервал «сдвинутая декада до такого же номера дня»; если в целевой декаде дня с таким
|
|
@@ -5990,8 +6002,8 @@ class m {
|
|
|
5990
6002
|
* @param shift Смещение в декадах, может быть отрицательным.
|
|
5991
6003
|
*/
|
|
5992
6004
|
static decadeTillSameDayNumber(r, e) {
|
|
5993
|
-
const [t] = m.shiftedDecadeBounds(r, 0), i =
|
|
5994
|
-
return { from: o, to: W(
|
|
6005
|
+
const [t] = m.shiftedDecadeBounds(r, 0), i = We(r, t) + 1, [o, c] = m.shiftedDecadeBounds(r, e), u = We(c, o) + 1;
|
|
6006
|
+
return { from: o, to: W(ee(o, Math.min(i, u) - 1)) };
|
|
5995
6007
|
}
|
|
5996
6008
|
/**
|
|
5997
6009
|
* Возвращает пару «начало и конец декады», отстоящей от декады указанной даты на заданное число декад.
|
|
@@ -6003,7 +6015,7 @@ class m {
|
|
|
6003
6015
|
const t = Nr(r);
|
|
6004
6016
|
let i = 2;
|
|
6005
6017
|
t <= 10 ? i = 0 : t <= 20 && (i = 1);
|
|
6006
|
-
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = U($(r, c)), g =
|
|
6018
|
+
const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = U($(r, c)), g = ee(p, u * 10), y = u === 2 ? x(p) : W(ee(g, 9));
|
|
6007
6019
|
return [g, y];
|
|
6008
6020
|
}
|
|
6009
6021
|
}
|
|
@@ -6017,25 +6029,45 @@ class Dr {
|
|
|
6017
6029
|
static parse(r) {
|
|
6018
6030
|
if (a(r))
|
|
6019
6031
|
return;
|
|
6020
|
-
const e =
|
|
6021
|
-
return
|
|
6032
|
+
const e = R(r) ? v(r) : r;
|
|
6033
|
+
return Gt(e) ? e : void 0;
|
|
6034
|
+
}
|
|
6035
|
+
}
|
|
6036
|
+
function wi(n) {
|
|
6037
|
+
return k(ze(qe(), n), "yyyy-MM-dd");
|
|
6038
|
+
}
|
|
6039
|
+
function bs(n, r) {
|
|
6040
|
+
const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(n));
|
|
6041
|
+
return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
|
|
6042
|
+
}
|
|
6043
|
+
function vi(n) {
|
|
6044
|
+
const r = v(n), e = We(qe(), r);
|
|
6045
|
+
switch (!0) {
|
|
6046
|
+
case e === 0:
|
|
6047
|
+
return "Сегодня";
|
|
6048
|
+
case e === 1:
|
|
6049
|
+
return "Вчера";
|
|
6050
|
+
case e < 0:
|
|
6051
|
+
return n;
|
|
6052
|
+
default:
|
|
6053
|
+
return `${e} ${bs(e, ["день", "дня", "дней"])} назад`;
|
|
6022
6054
|
}
|
|
6023
6055
|
}
|
|
6024
|
-
class
|
|
6056
|
+
class Ci {
|
|
6025
6057
|
/**
|
|
6026
6058
|
* Возвращает предустановленные диапазоны дат.
|
|
6027
6059
|
*
|
|
6028
6060
|
* @param year Год, от которого считаются годовые периоды (1/3/9 месяцев, кварталы, полугодия, год); по умолчанию текущий.
|
|
6029
6061
|
*/
|
|
6030
6062
|
static defaultDateRanges(r) {
|
|
6031
|
-
const e =
|
|
6063
|
+
const e = Yt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), i = le(r === void 0 ? t : new Date(r, 0, 1)), o = de(i);
|
|
6032
6064
|
return {
|
|
6033
6065
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
6034
6066
|
nextWorkingDay: { label: "Следующий рабочий день", from: he(e), to: W(e) },
|
|
6035
|
-
today: { label: "Сегодня", from:
|
|
6036
|
-
yesterday: { label: "Вчера", from:
|
|
6037
|
-
tomorrow: { label: "Завтра", from:
|
|
6038
|
-
currentWeek: { label: "Неделя", from:
|
|
6067
|
+
today: { label: "Сегодня", from: qe(), to: Kt() },
|
|
6068
|
+
yesterday: { label: "Вчера", from: Jt(), to: Vt() },
|
|
6069
|
+
tomorrow: { label: "Завтра", from: Qt(), to: Et() },
|
|
6070
|
+
currentWeek: { label: "Неделя", from: Z(t, { weekStartsOn: 1 }), to: Se(t, { weekStartsOn: 1 }) },
|
|
6039
6071
|
currentMonth: { label: "Месяц", from: U(t), to: x(t) },
|
|
6040
6072
|
oneMonth: { label: "1 месяц", from: i, to: x(i) },
|
|
6041
6073
|
threeMonths: { label: "3 месяца", from: i, to: x($(i, 2)) },
|
|
@@ -6057,23 +6089,23 @@ class yi {
|
|
|
6057
6089
|
* @param now Опорная дата «сейчас»; по умолчанию текущая.
|
|
6058
6090
|
*/
|
|
6059
6091
|
static standardPeriods(r = /* @__PURE__ */ new Date()) {
|
|
6060
|
-
const e = { weekStartsOn: 1 }, t = he(r), i = W(r), o = m.decadeInterval(r), c = U(r), u =
|
|
6092
|
+
const e = { weekStartsOn: 1 }, t = he(r), i = W(r), o = m.decadeInterval(r), c = U(r), u = $e(r), p = m.startOfHalfYear(r), g = le(r), y = m.addHalfYears(r, -1), P = m.addHalfYears(r, 1);
|
|
6061
6093
|
return {
|
|
6062
|
-
yesterday: { label: "Вчера", group: "day", from: he(
|
|
6094
|
+
yesterday: { label: "Вчера", group: "day", from: he(ze(r, 1)), to: W(ze(r, 1)) },
|
|
6063
6095
|
today: { label: "Сегодня", group: "day", from: t, to: i },
|
|
6064
|
-
tomorrow: { label: "Завтра", group: "day", from: he(
|
|
6065
|
-
lastWeek: { label: "Прошлая неделя", group: "week", from:
|
|
6066
|
-
thisWeek: { label: "Эта неделя", group: "week", from:
|
|
6067
|
-
nextWeek: { label: "Следующая неделя", group: "week", from:
|
|
6096
|
+
tomorrow: { label: "Завтра", group: "day", from: he(ee(r, 1)), to: W(ee(r, 1)) },
|
|
6097
|
+
lastWeek: { label: "Прошлая неделя", group: "week", from: Z(Ur(r, 1), e), to: Se(Ur(r, 1), e) },
|
|
6098
|
+
thisWeek: { label: "Эта неделя", group: "week", from: Z(r, e), to: Se(r, e) },
|
|
6099
|
+
nextWeek: { label: "Следующая неделя", group: "week", from: Z(mr(r, 1), e), to: Se(mr(r, 1), e) },
|
|
6068
6100
|
lastTenDays: { label: "Прошлая декада", group: "decade", ...m.shiftDecadeInterval(r, -1) },
|
|
6069
6101
|
thisTenDays: { label: "Эта декада", group: "decade", ...o },
|
|
6070
6102
|
nextTenDays: { label: "Следующая декада", group: "decade", ...m.shiftDecadeInterval(r, 1) },
|
|
6071
|
-
lastMonth: { label: "Прошлый месяц", group: "month", from: U(
|
|
6103
|
+
lastMonth: { label: "Прошлый месяц", group: "month", from: U(ir(r, 1)), to: x(ir(r, 1)) },
|
|
6072
6104
|
thisMonth: { label: "Этот месяц", group: "month", from: c, to: x(r) },
|
|
6073
6105
|
nextMonth: { label: "Следующий месяц", group: "month", from: U($(r, 1)), to: x($(r, 1)) },
|
|
6074
|
-
lastQuarter: { label: "Прошлый квартал", group: "quarter", from:
|
|
6075
|
-
thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to:
|
|
6076
|
-
nextQuarter: { label: "Следующий квартал", group: "quarter", from:
|
|
6106
|
+
lastQuarter: { label: "Прошлый квартал", group: "quarter", from: $e(sr(r, 1)), to: Be(sr(r, 1)) },
|
|
6107
|
+
thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to: Be(r) },
|
|
6108
|
+
nextQuarter: { label: "Следующий квартал", group: "quarter", from: $e(rr(r, 1)), to: Be(rr(r, 1)) },
|
|
6077
6109
|
lastHalfYear: {
|
|
6078
6110
|
label: "Прошлое полугодие",
|
|
6079
6111
|
group: "halfYear",
|
|
@@ -6082,21 +6114,21 @@ class yi {
|
|
|
6082
6114
|
},
|
|
6083
6115
|
thisHalfYear: { label: "Это полугодие", group: "halfYear", from: p, to: m.endOfHalfYear(r) },
|
|
6084
6116
|
nextHalfYear: { label: "Следующее полугодие", group: "halfYear", from: m.startOfHalfYear(P), to: m.endOfHalfYear(P) },
|
|
6085
|
-
lastYear: { label: "Прошлый год", group: "year", from: le(
|
|
6086
|
-
thisYear: { label: "Этот год", group: "year", from: g, to:
|
|
6087
|
-
nextYear: { label: "Следующий год", group: "year", from: le(
|
|
6088
|
-
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from:
|
|
6117
|
+
lastYear: { label: "Прошлый год", group: "year", from: le(tr(r, 1)), to: de(tr(r, 1)) },
|
|
6118
|
+
thisYear: { label: "Этот год", group: "year", from: g, to: de(r) },
|
|
6119
|
+
nextYear: { label: "Следующий год", group: "year", from: le(er(r, 1)), to: de(er(r, 1)) },
|
|
6120
|
+
fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from: Z(r, e), to: i },
|
|
6089
6121
|
fromBeginningOfThisTenDays: { label: "С начала этой декады", group: "other", section: "fromBeginning", from: o.from, to: i },
|
|
6090
6122
|
fromBeginningOfThisMonth: { label: "С начала этого месяца", group: "other", section: "fromBeginning", from: c, to: i },
|
|
6091
6123
|
fromBeginningOfThisQuarter: { label: "С начала этого квартала", group: "other", section: "fromBeginning", from: u, to: i },
|
|
6092
6124
|
fromBeginningOfThisHalfYear: { label: "С начала этого полугодия", group: "other", section: "fromBeginning", from: p, to: i },
|
|
6093
6125
|
fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: i },
|
|
6094
|
-
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to:
|
|
6126
|
+
tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to: Se(r, e) },
|
|
6095
6127
|
tillEndOfThisTenDays: { label: "До конца этой декады", group: "other", section: "tillEnd", from: t, to: o.to },
|
|
6096
6128
|
tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: x(r) },
|
|
6097
|
-
tillEndOfThisQuarter: { label: "До конца этого квартала", group: "other", section: "tillEnd", from: t, to:
|
|
6129
|
+
tillEndOfThisQuarter: { label: "До конца этого квартала", group: "other", section: "tillEnd", from: t, to: Be(r) },
|
|
6098
6130
|
tillEndOfThisHalfYear: { label: "До конца этого полугодия", group: "other", section: "tillEnd", from: t, to: m.endOfHalfYear(r) },
|
|
6099
|
-
tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to:
|
|
6131
|
+
tillEndOfThisYear: { label: "До конца этого года", group: "other", section: "tillEnd", from: t, to: de(r) },
|
|
6100
6132
|
lastWeekTillSameWeekDay: { label: "Прошлая неделя, до такого же дня недели", group: "other", section: "lastTillSame", ...m.weekTillSameWeekday(r, -1) },
|
|
6101
6133
|
lastTenDaysTillSameDayNumber: {
|
|
6102
6134
|
label: "Прошлая декада, до такого же номера дня",
|
|
@@ -6108,13 +6140,13 @@ class yi {
|
|
|
6108
6140
|
label: "Прошлый месяц, до такой же даты",
|
|
6109
6141
|
group: "other",
|
|
6110
6142
|
section: "lastTillSame",
|
|
6111
|
-
...m.intervalTillSameDate(c, U(
|
|
6143
|
+
...m.intervalTillSameDate(c, U(ir(r, 1)), r)
|
|
6112
6144
|
},
|
|
6113
6145
|
lastQuarterTillSameDate: {
|
|
6114
6146
|
label: "Прошлый квартал, до такой же даты",
|
|
6115
6147
|
group: "other",
|
|
6116
6148
|
section: "lastTillSame",
|
|
6117
|
-
...m.intervalTillSameDate(u,
|
|
6149
|
+
...m.intervalTillSameDate(u, $e(sr(r, 1)), r)
|
|
6118
6150
|
},
|
|
6119
6151
|
lastHalfYearTillSameDate: {
|
|
6120
6152
|
label: "Прошлое полугодие, до такой же даты",
|
|
@@ -6126,7 +6158,7 @@ class yi {
|
|
|
6126
6158
|
label: "Прошлый год, до такой же даты",
|
|
6127
6159
|
group: "other",
|
|
6128
6160
|
section: "lastTillSame",
|
|
6129
|
-
...m.intervalTillSameDate(g, le(
|
|
6161
|
+
...m.intervalTillSameDate(g, le(tr(r, 1)), r)
|
|
6130
6162
|
},
|
|
6131
6163
|
nextWeekTillSameWeekDay: { label: "Следующая неделя, до такого же дня недели", group: "other", section: "nextTillSame", ...m.weekTillSameWeekday(r, 1) },
|
|
6132
6164
|
nextTenDaysTillSameDayNumber: {
|
|
@@ -6145,7 +6177,7 @@ class yi {
|
|
|
6145
6177
|
label: "Следующий квартал, до такой же даты",
|
|
6146
6178
|
group: "other",
|
|
6147
6179
|
section: "nextTillSame",
|
|
6148
|
-
...m.intervalTillSameDate(u,
|
|
6180
|
+
...m.intervalTillSameDate(u, $e(rr(r, 1)), r)
|
|
6149
6181
|
},
|
|
6150
6182
|
nextHalfYearTillSameDate: {
|
|
6151
6183
|
label: "Следующее полугодие, до такой же даты",
|
|
@@ -6157,14 +6189,14 @@ class yi {
|
|
|
6157
6189
|
label: "Следующий год, до такой же даты",
|
|
6158
6190
|
group: "other",
|
|
6159
6191
|
section: "nextTillSame",
|
|
6160
|
-
...m.intervalTillSameDate(g, le(
|
|
6192
|
+
...m.intervalTillSameDate(g, le(er(r, 1)), r)
|
|
6161
6193
|
},
|
|
6162
|
-
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: he(
|
|
6163
|
-
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: W(
|
|
6194
|
+
last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: he(ze(r, 6)), to: i },
|
|
6195
|
+
next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: W(ee(r, 6)) }
|
|
6164
6196
|
};
|
|
6165
6197
|
}
|
|
6166
6198
|
}
|
|
6167
|
-
const
|
|
6199
|
+
const Di = [
|
|
6168
6200
|
{ key: "day", label: "День" },
|
|
6169
6201
|
{ key: "week", label: "Неделя" },
|
|
6170
6202
|
{ key: "decade", label: "Декада" },
|
|
@@ -6173,13 +6205,17 @@ const ai = [
|
|
|
6173
6205
|
{ key: "halfYear", label: "Полугодие" },
|
|
6174
6206
|
{ key: "year", label: "Год" },
|
|
6175
6207
|
{ key: "other", label: "Прочее" }
|
|
6176
|
-
],
|
|
6208
|
+
], Ri = [
|
|
6177
6209
|
{ key: "fromBeginning", label: "С начала периода" },
|
|
6178
6210
|
{ key: "tillEnd", label: "До конца периода" },
|
|
6179
6211
|
{ key: "lastTillSame", label: "Прошлые, до такой же даты" },
|
|
6180
6212
|
{ key: "nextTillSame", label: "Следующие, до такой же даты" },
|
|
6181
6213
|
{ key: "rollingDays", label: "7 дней" }
|
|
6182
6214
|
];
|
|
6215
|
+
function Pi(n) {
|
|
6216
|
+
const r = Ht(n * 100);
|
|
6217
|
+
return `${r >= 0 ? "+" : ""}${r}%`;
|
|
6218
|
+
}
|
|
6183
6219
|
class Ct {
|
|
6184
6220
|
/**
|
|
6185
6221
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -6218,7 +6254,7 @@ const me = class me extends h {
|
|
|
6218
6254
|
* Время кэширования данных ответов на запросы (секунд).
|
|
6219
6255
|
*/
|
|
6220
6256
|
s(this, "responseDataCacheTimeout");
|
|
6221
|
-
this.responseDataCacheTimeout =
|
|
6257
|
+
this.responseDataCacheTimeout = L().config.http.responseDataCacheTimeout;
|
|
6222
6258
|
}
|
|
6223
6259
|
/**
|
|
6224
6260
|
* Возвращает кэшированные данные.
|
|
@@ -6240,7 +6276,7 @@ const me = class me extends h {
|
|
|
6240
6276
|
*/
|
|
6241
6277
|
cacheResponse(e, t) {
|
|
6242
6278
|
me.responseDataCache.set(e, {
|
|
6243
|
-
validTo:
|
|
6279
|
+
validTo: Xt(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
6244
6280
|
val: t
|
|
6245
6281
|
});
|
|
6246
6282
|
}
|
|
@@ -6256,7 +6292,7 @@ const me = class me extends h {
|
|
|
6256
6292
|
*/
|
|
6257
6293
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
6258
6294
|
getTypedDataArrayRequester(e, t, i = !1, o = {}, c = void 0) {
|
|
6259
|
-
const u = t + (
|
|
6295
|
+
const u = t + (V(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? me.getCachedResponse(u) : void 0;
|
|
6260
6296
|
return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((g) => (i && g && this.cacheResponse(u, g), g));
|
|
6261
6297
|
}
|
|
6262
6298
|
};
|
|
@@ -6264,17 +6300,13 @@ const me = class me extends h {
|
|
|
6264
6300
|
* Кэш результатов запросов.
|
|
6265
6301
|
*/
|
|
6266
6302
|
s(me, "responseDataCache", /* @__PURE__ */ new Map());
|
|
6267
|
-
let
|
|
6268
|
-
|
|
6269
|
-
const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(n));
|
|
6270
|
-
return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
|
|
6271
|
-
}
|
|
6272
|
-
class Ci {
|
|
6303
|
+
let Ue = me;
|
|
6304
|
+
class bi {
|
|
6273
6305
|
/**
|
|
6274
6306
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
6275
6307
|
*/
|
|
6276
6308
|
static generateUndefinedManagerInstance() {
|
|
6277
|
-
return new
|
|
6309
|
+
return new X({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
6278
6310
|
}
|
|
6279
6311
|
/**
|
|
6280
6312
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -6285,15 +6317,15 @@ class Ci {
|
|
|
6285
6317
|
return r.id === 0 && r.guid === "-undefined-";
|
|
6286
6318
|
}
|
|
6287
6319
|
}
|
|
6288
|
-
class Dt extends
|
|
6320
|
+
class Dt extends Ue {
|
|
6289
6321
|
/**
|
|
6290
6322
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
6291
6323
|
*/
|
|
6292
6324
|
async getManagers() {
|
|
6293
|
-
const r = "/internal/managers", e =
|
|
6325
|
+
const r = "/internal/managers", e = Ue.getCachedResponse(r);
|
|
6294
6326
|
if (e)
|
|
6295
6327
|
return e;
|
|
6296
|
-
const t = await this.get(r), i = _.instanceListInitializer(
|
|
6328
|
+
const t = await this.get(r), i = _.instanceListInitializer(X, t.data);
|
|
6297
6329
|
return this.cacheResponse(r, i), i;
|
|
6298
6330
|
}
|
|
6299
6331
|
/**
|
|
@@ -6304,11 +6336,11 @@ class Dt extends qe {
|
|
|
6304
6336
|
* @see /doc/api/internal#/operations/api_internal_managers_get
|
|
6305
6337
|
*/
|
|
6306
6338
|
getManager(r) {
|
|
6307
|
-
return this.get(`/internal/managers/${r}`, {}, (e) => new
|
|
6339
|
+
return this.get(`/internal/managers/${r}`, {}, (e) => new X(e.data));
|
|
6308
6340
|
}
|
|
6309
6341
|
}
|
|
6310
|
-
var
|
|
6311
|
-
class
|
|
6342
|
+
var Ie = /* @__PURE__ */ ((n) => (n.Processing = "processing", n.Completed = "completed", n.Error = "error", n.NeedsActualization = "needs_actualization", n))(Ie || {});
|
|
6343
|
+
class As {
|
|
6312
6344
|
/**
|
|
6313
6345
|
* Инициализирует экземпляр класса {@link OfferActualization}.
|
|
6314
6346
|
*
|
|
@@ -6331,13 +6363,13 @@ class Ps {
|
|
|
6331
6363
|
* @inheritDoc
|
|
6332
6364
|
*/
|
|
6333
6365
|
s(this, "error");
|
|
6334
|
-
this.status = (r == null ? void 0 : r.status) ??
|
|
6366
|
+
this.status = (r == null ? void 0 : r.status) ?? Ie.Processing, this.actualizedAt = Dr.parse(r == null ? void 0 : r.actualizedAt), this.expiresAt = Dr.parse(r == null ? void 0 : r.expiresAt), this.error = r == null ? void 0 : r.error;
|
|
6335
6367
|
}
|
|
6336
6368
|
/**
|
|
6337
6369
|
* @inheritDoc
|
|
6338
6370
|
*/
|
|
6339
6371
|
get isProcessing() {
|
|
6340
|
-
return this.status ===
|
|
6372
|
+
return this.status === Ie.Processing;
|
|
6341
6373
|
}
|
|
6342
6374
|
/**
|
|
6343
6375
|
* @inheritDoc
|
|
@@ -6355,13 +6387,13 @@ class Ps {
|
|
|
6355
6387
|
* @inheritDoc
|
|
6356
6388
|
*/
|
|
6357
6389
|
isOutdatedAt(r) {
|
|
6358
|
-
return this.status !==
|
|
6390
|
+
return this.status !== Ie.Completed || a(this.actualizedAt) ? !0 : !a(this.expiresAt) && this.expiresAt.getTime() < r.getTime();
|
|
6359
6391
|
}
|
|
6360
6392
|
/**
|
|
6361
6393
|
* @inheritDoc
|
|
6362
6394
|
*/
|
|
6363
6395
|
isOrderAllowedAt(r) {
|
|
6364
|
-
return this.status ===
|
|
6396
|
+
return this.status === Ie.Completed && !this.isOutdatedAt(r);
|
|
6365
6397
|
}
|
|
6366
6398
|
}
|
|
6367
6399
|
class Rt extends G {
|
|
@@ -6400,10 +6432,10 @@ class Rt extends G {
|
|
|
6400
6432
|
* @inheritDoc
|
|
6401
6433
|
*/
|
|
6402
6434
|
s(this, "file");
|
|
6403
|
-
this.name = e == null ? void 0 : e.name, this.createdAt = Dr.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new ne(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
|
|
6435
|
+
this.name = e == null ? void 0 : e.name, this.createdAt = Dr.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new ne(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 As(e.actualization), this.file = e == null ? void 0 : e.file;
|
|
6404
6436
|
}
|
|
6405
6437
|
}
|
|
6406
|
-
class
|
|
6438
|
+
class Ts extends kr {
|
|
6407
6439
|
/**
|
|
6408
6440
|
* Инициализирует экземпляр класса {@link ProfstroyOfferItem}.
|
|
6409
6441
|
*
|
|
@@ -6439,7 +6471,7 @@ class bs extends kr {
|
|
|
6439
6471
|
* @inheritDoc
|
|
6440
6472
|
*/
|
|
6441
6473
|
get isOrderable() {
|
|
6442
|
-
return !this.isProductStub && !this.isIgnored &&
|
|
6474
|
+
return !this.isProductStub && !this.isIgnored && V(this.lineError);
|
|
6443
6475
|
}
|
|
6444
6476
|
}
|
|
6445
6477
|
class M extends Rt {
|
|
@@ -6459,11 +6491,11 @@ class M extends Rt {
|
|
|
6459
6491
|
*/
|
|
6460
6492
|
s(this, "products");
|
|
6461
6493
|
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map(
|
|
6462
|
-
(t) => e.isProfstroy ? new
|
|
6494
|
+
(t) => e.isProfstroy ? new Ts(t) : new kr(t)
|
|
6463
6495
|
);
|
|
6464
6496
|
}
|
|
6465
6497
|
}
|
|
6466
|
-
class
|
|
6498
|
+
class Ai extends Fe {
|
|
6467
6499
|
/**
|
|
6468
6500
|
* Инициализирует экземпляр класса {@link OffersListFilters}.
|
|
6469
6501
|
*
|
|
@@ -6504,7 +6536,7 @@ class Di extends Ne {
|
|
|
6504
6536
|
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;
|
|
6505
6537
|
}
|
|
6506
6538
|
}
|
|
6507
|
-
class
|
|
6539
|
+
class Je extends C {
|
|
6508
6540
|
}
|
|
6509
6541
|
class Pt extends vt {
|
|
6510
6542
|
/**
|
|
@@ -6573,13 +6605,13 @@ class Pt extends vt {
|
|
|
6573
6605
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
6574
6606
|
}, this.delivery = {
|
|
6575
6607
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
6576
|
-
date:
|
|
6577
|
-
address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new
|
|
6578
|
-
warehouse: (y = e == null ? void 0 : e.delivery) != null && y.warehouse ? new
|
|
6579
|
-
}, this.attachedUser = e != null && e.attachedUser ? new q(e == null ? void 0 : e.attachedUser) : void 0, this.status = new
|
|
6608
|
+
date: R((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? v(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
6609
|
+
address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new xe(e.delivery.address) : void 0,
|
|
6610
|
+
warehouse: (y = e == null ? void 0 : e.delivery) != null && y.warehouse ? new Me(e.delivery.warehouse) : void 0
|
|
6611
|
+
}, this.attachedUser = e != null && e.attachedUser ? new q(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Je(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new C(e.statusDetail) : void 0, this.salesDirection = new F(e == null ? void 0 : e.salesDirection), this.attachedAt = R(e == null ? void 0 : e.attachedAt) ? v(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;
|
|
6580
6612
|
}
|
|
6581
6613
|
}
|
|
6582
|
-
class
|
|
6614
|
+
class ds extends nt {
|
|
6583
6615
|
/**
|
|
6584
6616
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
6585
6617
|
*
|
|
@@ -6636,7 +6668,7 @@ class As extends nt {
|
|
|
6636
6668
|
* Продукт, которым заменена текущая запись.
|
|
6637
6669
|
*/
|
|
6638
6670
|
s(this, "replacement");
|
|
6639
|
-
this.product = new
|
|
6671
|
+
this.product = new K(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 = z(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"));
|
|
6640
6672
|
}
|
|
6641
6673
|
}
|
|
6642
6674
|
class I extends Pt {
|
|
@@ -6703,11 +6735,11 @@ class I extends Pt {
|
|
|
6703
6735
|
this.products = (e.products ?? []).map((i) => {
|
|
6704
6736
|
var c;
|
|
6705
6737
|
const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
|
|
6706
|
-
return new
|
|
6707
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
6738
|
+
return new ds(i, o);
|
|
6739
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Qe.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new C(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new Je(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
|
|
6708
6740
|
}
|
|
6709
6741
|
}
|
|
6710
|
-
class
|
|
6742
|
+
class Ti extends Y {
|
|
6711
6743
|
/**
|
|
6712
6744
|
* Возвращает список заказов-черновиков, удовлетворяющих указанным параметрам поиска.
|
|
6713
6745
|
*
|
|
@@ -6823,12 +6855,12 @@ class Ri extends Y {
|
|
|
6823
6855
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
|
|
6824
6856
|
*/
|
|
6825
6857
|
createOrderFromDraft(r, e, t, i = {}) {
|
|
6826
|
-
const o =
|
|
6858
|
+
const o = L().config.dateFormats.api;
|
|
6827
6859
|
return this.post(
|
|
6828
6860
|
`/internal/orders/offers/${r}/create-order`,
|
|
6829
6861
|
{
|
|
6830
6862
|
...e,
|
|
6831
|
-
deliveryDate: e.deliveryDate ?
|
|
6863
|
+
deliveryDate: e.deliveryDate ? k(e.deliveryDate, o) : void 0,
|
|
6832
6864
|
items: t != null && t.length ? t : void 0
|
|
6833
6865
|
},
|
|
6834
6866
|
(c) => _.instanceListInitializer(I, c.data),
|
|
@@ -6943,7 +6975,7 @@ class Ri extends Y {
|
|
|
6943
6975
|
return this.post(`/internal/orders/offers/${r}/send`, e);
|
|
6944
6976
|
}
|
|
6945
6977
|
}
|
|
6946
|
-
class
|
|
6978
|
+
class di {
|
|
6947
6979
|
/**
|
|
6948
6980
|
* Возвращает признак того, что запись создана из файла выгрузки программы «Профстрой».
|
|
6949
6981
|
*
|
|
@@ -6962,8 +6994,8 @@ class Pi {
|
|
|
6962
6994
|
return !a(r) && r.isProfstroy === !0 && !a(r.actualization);
|
|
6963
6995
|
}
|
|
6964
6996
|
}
|
|
6965
|
-
var
|
|
6966
|
-
class
|
|
6997
|
+
var Ss = /* @__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))(Ss || {});
|
|
6998
|
+
class Si {
|
|
6967
6999
|
/**
|
|
6968
7000
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
6969
7001
|
*
|
|
@@ -7030,11 +7062,11 @@ class bi {
|
|
|
7030
7062
|
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;
|
|
7031
7063
|
}
|
|
7032
7064
|
}
|
|
7033
|
-
class bt extends
|
|
7065
|
+
class bt extends C {
|
|
7034
7066
|
}
|
|
7035
|
-
class At extends
|
|
7067
|
+
class At extends C {
|
|
7036
7068
|
}
|
|
7037
|
-
class
|
|
7069
|
+
class $i extends Fe {
|
|
7038
7070
|
/**
|
|
7039
7071
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
7040
7072
|
*
|
|
@@ -7135,7 +7167,7 @@ class Ai extends Ne {
|
|
|
7135
7167
|
* @inheritDoc
|
|
7136
7168
|
*/
|
|
7137
7169
|
s(this, "onlyMyRegions");
|
|
7138
|
-
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new
|
|
7170
|
+
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new X(u) : new bt(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new ne(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new T(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new q(e.creator) : void 0, this.deliveryDate = new T(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 ve(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 T(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new F(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new J(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new At(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;
|
|
7139
7171
|
}
|
|
7140
7172
|
/**
|
|
7141
7173
|
* @inheritDoc
|
|
@@ -7152,7 +7184,7 @@ class Ai extends Ne {
|
|
|
7152
7184
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
7153
7185
|
break;
|
|
7154
7186
|
case "deliveryType":
|
|
7155
|
-
this.deliveryType = new
|
|
7187
|
+
this.deliveryType = new J();
|
|
7156
7188
|
break;
|
|
7157
7189
|
case "clientCities":
|
|
7158
7190
|
this.clientCities = [];
|
|
@@ -7186,7 +7218,7 @@ class Ai extends Ne {
|
|
|
7186
7218
|
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;
|
|
7187
7219
|
}
|
|
7188
7220
|
}
|
|
7189
|
-
class
|
|
7221
|
+
class $s {
|
|
7190
7222
|
/**
|
|
7191
7223
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
7192
7224
|
*
|
|
@@ -7209,10 +7241,10 @@ class ds {
|
|
|
7209
7241
|
* @inheritDoc
|
|
7210
7242
|
*/
|
|
7211
7243
|
s(this, "createdAt");
|
|
7212
|
-
this.user = new q(r == null ? void 0 : r.user), this.status = new
|
|
7244
|
+
this.user = new q(r == null ? void 0 : r.user), this.status = new Je(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new C(r.statusDetail) : void 0, this.createdAt = R(r == null ? void 0 : r.createdAt) ? v(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
7213
7245
|
}
|
|
7214
7246
|
}
|
|
7215
|
-
class
|
|
7247
|
+
class ki extends Y {
|
|
7216
7248
|
/**
|
|
7217
7249
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
7218
7250
|
*
|
|
@@ -7278,12 +7310,12 @@ class Ti extends Y {
|
|
|
7278
7310
|
* @see /doc/api/internal#/operations/api_internal_client_orders_create
|
|
7279
7311
|
*/
|
|
7280
7312
|
createClientOrder(r, e, t, i, o = {}) {
|
|
7281
|
-
const c =
|
|
7313
|
+
const c = L().config.dateFormats.api;
|
|
7282
7314
|
return this.post(
|
|
7283
7315
|
`/internal/clients/${r}/orders/${e}`,
|
|
7284
7316
|
{
|
|
7285
7317
|
...t,
|
|
7286
|
-
deliveryDate:
|
|
7318
|
+
deliveryDate: k(t.deliveryDate, c),
|
|
7287
7319
|
items: i != null && i.length ? i : void 0
|
|
7288
7320
|
},
|
|
7289
7321
|
(u) => _.instanceListInitializer(I, u.data),
|
|
@@ -7353,12 +7385,12 @@ class Ti extends Y {
|
|
|
7353
7385
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
7354
7386
|
*/
|
|
7355
7387
|
updateOrder(r, e, t = {}) {
|
|
7356
|
-
const i =
|
|
7388
|
+
const i = L().config.dateFormats.api;
|
|
7357
7389
|
return this.patch(
|
|
7358
7390
|
`/internal/orders/${r}`,
|
|
7359
7391
|
{
|
|
7360
7392
|
...e,
|
|
7361
|
-
deliveryDate: e.deliveryDate ?
|
|
7393
|
+
deliveryDate: e.deliveryDate ? k(e.deliveryDate, i) : void 0
|
|
7362
7394
|
},
|
|
7363
7395
|
(o) => new I(o.data),
|
|
7364
7396
|
t
|
|
@@ -7437,7 +7469,7 @@ class Ti extends Y {
|
|
|
7437
7469
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_history_get
|
|
7438
7470
|
*/
|
|
7439
7471
|
getOrderStatusHistory(r) {
|
|
7440
|
-
return this.getTypedList(
|
|
7472
|
+
return this.getTypedList($s, `/internal/orders/${r}/history`);
|
|
7441
7473
|
}
|
|
7442
7474
|
/**
|
|
7443
7475
|
* Возвращает содержимое печатной формы заказа в формате HTML.
|
|
@@ -7566,11 +7598,11 @@ class Ti extends Y {
|
|
|
7566
7598
|
* @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
|
|
7567
7599
|
*/
|
|
7568
7600
|
getDeliveryCost(r, e, t, i = void 0) {
|
|
7569
|
-
const o =
|
|
7601
|
+
const o = L().config.dateFormats.api;
|
|
7570
7602
|
return this.get(
|
|
7571
7603
|
`/internal/orders/delivery/${r}/cost`,
|
|
7572
7604
|
{
|
|
7573
|
-
date:
|
|
7605
|
+
date: k(e, o),
|
|
7574
7606
|
warehouse_id: t
|
|
7575
7607
|
},
|
|
7576
7608
|
(c) => c.data,
|
|
@@ -7579,8 +7611,8 @@ class Ti extends Y {
|
|
|
7579
7611
|
);
|
|
7580
7612
|
}
|
|
7581
7613
|
}
|
|
7582
|
-
const
|
|
7583
|
-
class
|
|
7614
|
+
const Li = Symbol("currentOrder");
|
|
7615
|
+
class pr {
|
|
7584
7616
|
/**
|
|
7585
7617
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
7586
7618
|
*
|
|
@@ -7610,7 +7642,7 @@ class ur {
|
|
|
7610
7642
|
this.client = new ne(r == null ? void 0 : r.client), this.product = new N(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? $r.Product;
|
|
7611
7643
|
}
|
|
7612
7644
|
}
|
|
7613
|
-
const
|
|
7645
|
+
const hr = (n) => {
|
|
7614
7646
|
var r, e, t, i, o;
|
|
7615
7647
|
return n ? Zr(
|
|
7616
7648
|
{
|
|
@@ -7621,13 +7653,13 @@ const pr = (n) => {
|
|
|
7621
7653
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
7622
7654
|
hideNotActive: n.hideNotActive
|
|
7623
7655
|
},
|
|
7624
|
-
(c) => a(c) || (z(c) || Ar(c)) &&
|
|
7656
|
+
(c) => a(c) || (z(c) || Ar(c)) && V(c)
|
|
7625
7657
|
) : {};
|
|
7626
7658
|
}, Yr = (n) => {
|
|
7627
7659
|
const r = {};
|
|
7628
7660
|
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;
|
|
7629
7661
|
};
|
|
7630
|
-
class
|
|
7662
|
+
class Oi extends h {
|
|
7631
7663
|
/**
|
|
7632
7664
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
7633
7665
|
*
|
|
@@ -7642,9 +7674,9 @@ class Si extends h {
|
|
|
7642
7674
|
`/internal/price/products/${r}/analyze`,
|
|
7643
7675
|
{
|
|
7644
7676
|
...Yr(e),
|
|
7645
|
-
filters:
|
|
7677
|
+
filters: hr(t)
|
|
7646
7678
|
},
|
|
7647
|
-
(i) => _.instanceListInitializer(
|
|
7679
|
+
(i) => _.instanceListInitializer(pr, i.data)
|
|
7648
7680
|
);
|
|
7649
7681
|
}
|
|
7650
7682
|
/**
|
|
@@ -7661,9 +7693,9 @@ class Si extends h {
|
|
|
7661
7693
|
`/internal/price/categories/${r}/analyze`,
|
|
7662
7694
|
{
|
|
7663
7695
|
...Yr(e),
|
|
7664
|
-
filters:
|
|
7696
|
+
filters: hr(t)
|
|
7665
7697
|
},
|
|
7666
|
-
(i) => _.instanceListInitializer(
|
|
7698
|
+
(i) => _.instanceListInitializer(pr, i.data)
|
|
7667
7699
|
);
|
|
7668
7700
|
}
|
|
7669
7701
|
/**
|
|
@@ -7682,13 +7714,13 @@ class Si extends h {
|
|
|
7682
7714
|
`/internal/price/categories/${r}/analyze/square`,
|
|
7683
7715
|
{
|
|
7684
7716
|
...e,
|
|
7685
|
-
filters:
|
|
7717
|
+
filters: hr(t)
|
|
7686
7718
|
},
|
|
7687
|
-
(i) => _.instanceListInitializer(
|
|
7719
|
+
(i) => _.instanceListInitializer(pr, i.data)
|
|
7688
7720
|
);
|
|
7689
7721
|
}
|
|
7690
7722
|
}
|
|
7691
|
-
class
|
|
7723
|
+
class ks {
|
|
7692
7724
|
/**
|
|
7693
7725
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
7694
7726
|
*
|
|
@@ -7735,10 +7767,10 @@ class Ss {
|
|
|
7735
7767
|
* @inheritDoc
|
|
7736
7768
|
*/
|
|
7737
7769
|
s(this, "currency");
|
|
7738
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
7770
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = R(r.costDate) ? v(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Ne(r.product) : void 0, this.client = r.client ? new q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
|
|
7739
7771
|
}
|
|
7740
7772
|
}
|
|
7741
|
-
class
|
|
7773
|
+
class Ls extends Ne {
|
|
7742
7774
|
/**
|
|
7743
7775
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
7744
7776
|
*
|
|
@@ -7750,10 +7782,10 @@ class $s extends _e {
|
|
|
7750
7782
|
* @inheritDoc
|
|
7751
7783
|
*/
|
|
7752
7784
|
s(this, "history");
|
|
7753
|
-
this.history = De(e.history, (t) => new
|
|
7785
|
+
this.history = De(e.history, (t) => new ks(t));
|
|
7754
7786
|
}
|
|
7755
7787
|
}
|
|
7756
|
-
class
|
|
7788
|
+
class Ii extends h {
|
|
7757
7789
|
/**
|
|
7758
7790
|
* Возвращает данные об истории изменения цен.
|
|
7759
7791
|
*
|
|
@@ -7763,17 +7795,17 @@ class $i extends h {
|
|
|
7763
7795
|
*/
|
|
7764
7796
|
getProductPriceHistory(r) {
|
|
7765
7797
|
var o, c, u, p, g;
|
|
7766
|
-
const e =
|
|
7767
|
-
|
|
7798
|
+
const e = L().config.dateFormats.api, t = Zr(
|
|
7799
|
+
_e(r, {
|
|
7768
7800
|
costDate: {
|
|
7769
|
-
from:
|
|
7770
|
-
to:
|
|
7801
|
+
from: fr((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
7802
|
+
to: fr((u = r.costDate) == null ? void 0 : u.to) ? k(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
7771
7803
|
}
|
|
7772
7804
|
}),
|
|
7773
|
-
(y) => a(y) || (z(y) || Ar(y)) &&
|
|
7805
|
+
(y) => a(y) || (z(y) || Ar(y)) && V(y)
|
|
7774
7806
|
), i = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
|
|
7775
7807
|
return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((y) => [
|
|
7776
|
-
new
|
|
7808
|
+
new Ls(_e(y[0], { history: y }))
|
|
7777
7809
|
]);
|
|
7778
7810
|
}
|
|
7779
7811
|
}
|
|
@@ -7792,10 +7824,10 @@ class Er {
|
|
|
7792
7824
|
* Список рекомендованных категорий продуктов.
|
|
7793
7825
|
*/
|
|
7794
7826
|
s(this, "productCategories", []);
|
|
7795
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
7827
|
+
r != null && r.products && (this.products = r.products.map((e) => new Ne(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Ne(e)));
|
|
7796
7828
|
}
|
|
7797
7829
|
}
|
|
7798
|
-
class
|
|
7830
|
+
class xi extends h {
|
|
7799
7831
|
/**
|
|
7800
7832
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
7801
7833
|
*
|
|
@@ -7841,12 +7873,12 @@ class ki extends h {
|
|
|
7841
7873
|
});
|
|
7842
7874
|
}
|
|
7843
7875
|
}
|
|
7844
|
-
var
|
|
7845
|
-
class
|
|
7876
|
+
var Os = /* @__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))(Os || {}), Is = /* @__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))(Is || {});
|
|
7877
|
+
class xs extends C {
|
|
7846
7878
|
}
|
|
7847
|
-
class
|
|
7879
|
+
class _s extends C {
|
|
7848
7880
|
}
|
|
7849
|
-
class Qr extends
|
|
7881
|
+
class Qr extends C {
|
|
7850
7882
|
/**
|
|
7851
7883
|
* Инициализирует экземпляр класса {@link CityWithUserRegion}.
|
|
7852
7884
|
*
|
|
@@ -7859,18 +7891,18 @@ class Qr extends v {
|
|
|
7859
7891
|
* @inheritDoc
|
|
7860
7892
|
*/
|
|
7861
7893
|
s(this, "userRegions");
|
|
7862
|
-
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new
|
|
7894
|
+
this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new Ve(i))) ?? [];
|
|
7863
7895
|
}
|
|
7864
7896
|
}
|
|
7865
|
-
class
|
|
7897
|
+
class qs extends C {
|
|
7866
7898
|
}
|
|
7867
|
-
class
|
|
7899
|
+
class Ns extends C {
|
|
7868
7900
|
}
|
|
7869
|
-
class
|
|
7901
|
+
class Us extends C {
|
|
7870
7902
|
}
|
|
7871
|
-
class
|
|
7903
|
+
class Fs extends C {
|
|
7872
7904
|
}
|
|
7873
|
-
class
|
|
7905
|
+
class _i {
|
|
7874
7906
|
/**
|
|
7875
7907
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
7876
7908
|
*
|
|
@@ -7889,9 +7921,9 @@ class Li {
|
|
|
7889
7921
|
return r.id === 0 && r.slug === "-undefined-";
|
|
7890
7922
|
}
|
|
7891
7923
|
}
|
|
7892
|
-
class Tt extends
|
|
7924
|
+
class Tt extends C {
|
|
7893
7925
|
}
|
|
7894
|
-
const B = class B extends
|
|
7926
|
+
const B = class B extends Ue {
|
|
7895
7927
|
/**
|
|
7896
7928
|
* Исключает из списка записей справочника местоположений служебную запись
|
|
7897
7929
|
* неизвестного региона или города.
|
|
@@ -7909,7 +7941,7 @@ const B = class B extends qe {
|
|
|
7909
7941
|
* и использовать в случае аналогичных запросов.
|
|
7910
7942
|
*/
|
|
7911
7943
|
getReference(r, e = !1) {
|
|
7912
|
-
return this.getTypedDataArrayRequester(
|
|
7944
|
+
return this.getTypedDataArrayRequester(xs, `/internal/references/${r}`, e);
|
|
7913
7945
|
}
|
|
7914
7946
|
/**
|
|
7915
7947
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
@@ -7922,7 +7954,7 @@ const B = class B extends qe {
|
|
|
7922
7954
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
7923
7955
|
*/
|
|
7924
7956
|
getContactPositions() {
|
|
7925
|
-
return this.getTypedDataArrayRequester(
|
|
7957
|
+
return this.getTypedDataArrayRequester(qs, "/internal/references/contact-position", !0);
|
|
7926
7958
|
}
|
|
7927
7959
|
/**
|
|
7928
7960
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
@@ -7959,19 +7991,19 @@ const B = class B extends qe {
|
|
|
7959
7991
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
7960
7992
|
*/
|
|
7961
7993
|
getOrderPaymentStatuses() {
|
|
7962
|
-
return this.getTypedDataArrayRequester(
|
|
7994
|
+
return this.getTypedDataArrayRequester(Ns, "/public/references/order-payment-status", !0);
|
|
7963
7995
|
}
|
|
7964
7996
|
/**
|
|
7965
7997
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
7966
7998
|
*/
|
|
7967
7999
|
getOrderStatuses() {
|
|
7968
|
-
return this.getTypedDataArrayRequester(
|
|
8000
|
+
return this.getTypedDataArrayRequester(Je, "/internal/references/order-status", !0);
|
|
7969
8001
|
}
|
|
7970
8002
|
/**
|
|
7971
8003
|
* Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
|
|
7972
8004
|
*/
|
|
7973
8005
|
getOrderStatusDetails() {
|
|
7974
|
-
return this.getTypedDataArrayRequester(
|
|
8006
|
+
return this.getTypedDataArrayRequester(Us, "/internal/references/order-status-detail", !0);
|
|
7975
8007
|
}
|
|
7976
8008
|
/**
|
|
7977
8009
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
@@ -8033,7 +8065,7 @@ const B = class B extends qe {
|
|
|
8033
8065
|
* @param regionId Идентификатор региона.
|
|
8034
8066
|
*/
|
|
8035
8067
|
getCitiesByRegion(r) {
|
|
8036
|
-
return this.getTypedDataArrayRequester(
|
|
8068
|
+
return this.getTypedDataArrayRequester(_s, "/internal/references/city", !1, { params: { regionId: r } }).then(
|
|
8037
8069
|
(e) => B.withoutUnknownLocation(e)
|
|
8038
8070
|
);
|
|
8039
8071
|
}
|
|
@@ -8089,13 +8121,13 @@ const B = class B extends qe {
|
|
|
8089
8121
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
8090
8122
|
*/
|
|
8091
8123
|
getDeliveryTypes() {
|
|
8092
|
-
return this.getTypedDataArrayRequester(
|
|
8124
|
+
return this.getTypedDataArrayRequester(J, "/internal/references/delivery-type", !0);
|
|
8093
8125
|
}
|
|
8094
8126
|
/**
|
|
8095
8127
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
8096
8128
|
*/
|
|
8097
8129
|
getWarehouses() {
|
|
8098
|
-
return this.getTypedDataArrayRequester(
|
|
8130
|
+
return this.getTypedDataArrayRequester(Me, "/public/references/warehouse", !0);
|
|
8099
8131
|
}
|
|
8100
8132
|
/**
|
|
8101
8133
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
@@ -8107,13 +8139,13 @@ const B = class B extends qe {
|
|
|
8107
8139
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
8108
8140
|
*/
|
|
8109
8141
|
getPriceCoefficients() {
|
|
8110
|
-
return this.getTypedDataArrayRequester(
|
|
8142
|
+
return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
|
|
8111
8143
|
}
|
|
8112
8144
|
/**
|
|
8113
8145
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
8114
8146
|
*/
|
|
8115
8147
|
getProductFileType() {
|
|
8116
|
-
return this.getTypedDataArrayRequester(
|
|
8148
|
+
return this.getTypedDataArrayRequester(Fs, "/public/references/product-file-type", !0);
|
|
8117
8149
|
}
|
|
8118
8150
|
};
|
|
8119
8151
|
/**
|
|
@@ -8123,7 +8155,7 @@ const B = class B extends qe {
|
|
|
8123
8155
|
s(B, "unknownLocationId", 1);
|
|
8124
8156
|
let d = B;
|
|
8125
8157
|
const S = ie("common.references_private", () => {
|
|
8126
|
-
const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), g = w(void 0), y = w(void 0), P = w(void 0),
|
|
8158
|
+
const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), g = w(void 0), y = w(void 0), P = w(void 0), Ae = w(void 0), Te = w(void 0), oe = w(void 0), ce = w(void 0), Ke = w(void 0), Xe = w(void 0), Ze = w(void 0), l = w(void 0);
|
|
8127
8159
|
return {
|
|
8128
8160
|
/**
|
|
8129
8161
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -8176,11 +8208,11 @@ const S = ie("common.references_private", () => {
|
|
|
8176
8208
|
/**
|
|
8177
8209
|
* Справочник групп партнеров.
|
|
8178
8210
|
*/
|
|
8179
|
-
partnerGroupReference:
|
|
8211
|
+
partnerGroupReference: Ae,
|
|
8180
8212
|
/**
|
|
8181
8213
|
* Справочник типов файлов продукктов/категорий.
|
|
8182
8214
|
*/
|
|
8183
|
-
productFileTypeReference:
|
|
8215
|
+
productFileTypeReference: Te,
|
|
8184
8216
|
/**
|
|
8185
8217
|
* Справочник типов ресурсов.
|
|
8186
8218
|
*/
|
|
@@ -8192,116 +8224,116 @@ const S = ie("common.references_private", () => {
|
|
|
8192
8224
|
/**
|
|
8193
8225
|
* Справочник источников первичного интереса.
|
|
8194
8226
|
*/
|
|
8195
|
-
sourcePrimaryInterestReference:
|
|
8227
|
+
sourcePrimaryInterestReference: Ke,
|
|
8196
8228
|
/**
|
|
8197
8229
|
* Справочник складов.
|
|
8198
8230
|
*/
|
|
8199
|
-
warehousesReference:
|
|
8231
|
+
warehousesReference: Xe,
|
|
8200
8232
|
/**
|
|
8201
8233
|
* Справочник типов свойств.
|
|
8202
8234
|
*/
|
|
8203
|
-
propertyTypesReference:
|
|
8235
|
+
propertyTypesReference: Ze,
|
|
8204
8236
|
/**
|
|
8205
8237
|
* Справочник коэффициентов цен.
|
|
8206
8238
|
*/
|
|
8207
8239
|
priceCoefficientsReference: l
|
|
8208
8240
|
};
|
|
8209
|
-
}),
|
|
8241
|
+
}), qi = ie("common.references", () => {
|
|
8210
8242
|
const n = A(() => {
|
|
8211
8243
|
const l = S();
|
|
8212
8244
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(d).getChannelPrimaryInterest().then((f) => {
|
|
8213
8245
|
l.channelPrimaryInterestReference = f;
|
|
8214
|
-
}).catch(
|
|
8246
|
+
}).catch(D)), l.channelPrimaryInterestReference;
|
|
8215
8247
|
}), r = A(() => {
|
|
8216
8248
|
const l = S();
|
|
8217
8249
|
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(d).getContactPositions().then((f) => {
|
|
8218
8250
|
l.contactPositionsReference = f;
|
|
8219
|
-
}).catch(
|
|
8251
|
+
}).catch(D)), l.contactPositionsReference;
|
|
8220
8252
|
}), e = A(() => {
|
|
8221
8253
|
const l = S();
|
|
8222
8254
|
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(d).getCurrency().then((f) => {
|
|
8223
8255
|
l.currencyReference = f;
|
|
8224
|
-
}).catch(
|
|
8256
|
+
}).catch(D)), l.currencyReference;
|
|
8225
8257
|
}), t = A(() => {
|
|
8226
8258
|
const l = S();
|
|
8227
8259
|
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(d).getOpf().then((f) => {
|
|
8228
8260
|
l.opfReference = f;
|
|
8229
|
-
}).catch(
|
|
8261
|
+
}).catch(D)), l.opfReference;
|
|
8230
8262
|
}), i = A(() => {
|
|
8231
8263
|
const l = S();
|
|
8232
8264
|
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(d).getOperators().then((f) => {
|
|
8233
8265
|
l.operatorReference = f;
|
|
8234
|
-
}).catch(
|
|
8266
|
+
}).catch(D)), l.operatorReference;
|
|
8235
8267
|
}), o = A(() => {
|
|
8236
8268
|
const l = S();
|
|
8237
8269
|
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(d).getOrderPaymentStatuses().then((f) => {
|
|
8238
8270
|
l.orderPaymentStatusReference = f;
|
|
8239
|
-
}).catch(
|
|
8271
|
+
}).catch(D)), l.orderPaymentStatusReference;
|
|
8240
8272
|
}), c = A(() => {
|
|
8241
8273
|
const l = S();
|
|
8242
8274
|
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(d).getOrderStatuses().then((f) => {
|
|
8243
8275
|
l.orderStatusReference = f;
|
|
8244
|
-
}).catch(
|
|
8276
|
+
}).catch(D)), l.orderStatusReference;
|
|
8245
8277
|
}), u = A(() => {
|
|
8246
8278
|
const l = S();
|
|
8247
8279
|
return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(d).getOrderStatusDetails().then((f) => {
|
|
8248
8280
|
l.orderStatusDetailReference = f;
|
|
8249
|
-
}).catch(
|
|
8281
|
+
}).catch(D)), l.orderStatusDetailReference;
|
|
8250
8282
|
}), p = A(() => {
|
|
8251
8283
|
const l = S();
|
|
8252
8284
|
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(d).getPaymentTypes().then((f) => {
|
|
8253
8285
|
l.paymentTypeReference = f;
|
|
8254
|
-
}).catch(
|
|
8286
|
+
}).catch(D)), l.paymentTypeReference;
|
|
8255
8287
|
}), g = A(() => {
|
|
8256
8288
|
const l = S();
|
|
8257
8289
|
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(d).getPartnerGroup().then((f) => {
|
|
8258
8290
|
l.partnerGroupReference = f;
|
|
8259
|
-
}).catch(
|
|
8291
|
+
}).catch(D)), l.partnerGroupReference;
|
|
8260
8292
|
}), y = A(() => {
|
|
8261
8293
|
const l = S();
|
|
8262
8294
|
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(d).getProductFileType().then((f) => {
|
|
8263
8295
|
l.productFileTypeReference = f;
|
|
8264
|
-
}).catch(
|
|
8296
|
+
}).catch(D)), l.productFileTypeReference;
|
|
8265
8297
|
}), P = A(() => {
|
|
8266
8298
|
const l = S();
|
|
8267
8299
|
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(d).getResourceTypes().then((f) => {
|
|
8268
8300
|
l.resourceTypesReference = f;
|
|
8269
|
-
}).catch(
|
|
8270
|
-
}),
|
|
8301
|
+
}).catch(D)), l.resourceTypesReference;
|
|
8302
|
+
}), Ae = A(() => {
|
|
8271
8303
|
const l = S();
|
|
8272
8304
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(d).getSalesDirections().then((f) => {
|
|
8273
8305
|
l.salesDirectionsReference = f;
|
|
8274
|
-
}).catch(
|
|
8275
|
-
}),
|
|
8306
|
+
}).catch(D)), l.salesDirectionsReference;
|
|
8307
|
+
}), Te = A(() => {
|
|
8276
8308
|
const l = S();
|
|
8277
8309
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(d).getSourcePrimaryInterest().then((f) => {
|
|
8278
8310
|
l.sourcePrimaryInterestReference = f;
|
|
8279
|
-
}).catch(
|
|
8311
|
+
}).catch(D)), l.sourcePrimaryInterestReference;
|
|
8280
8312
|
}), oe = A(() => {
|
|
8281
8313
|
const l = S();
|
|
8282
8314
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(d).getDeliveryTypes().then((f) => {
|
|
8283
8315
|
l.deliveryTypeReference = f;
|
|
8284
|
-
}).catch(
|
|
8316
|
+
}).catch(D)), l.deliveryTypeReference;
|
|
8285
8317
|
}), ce = A(() => {
|
|
8286
8318
|
const l = S();
|
|
8287
8319
|
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Dt).getManagers().then((f) => {
|
|
8288
8320
|
l.managersList = f;
|
|
8289
|
-
}).catch(
|
|
8290
|
-
}),
|
|
8321
|
+
}).catch(D)), l.managersList;
|
|
8322
|
+
}), Ke = A(() => {
|
|
8291
8323
|
const l = S();
|
|
8292
8324
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(d).getWarehouses().then((f) => {
|
|
8293
8325
|
l.warehousesReference = f;
|
|
8294
|
-
}).catch(
|
|
8295
|
-
}),
|
|
8326
|
+
}).catch(D)), l.warehousesReference;
|
|
8327
|
+
}), Xe = A(() => {
|
|
8296
8328
|
const l = S();
|
|
8297
8329
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(d).getPropertyTypes().then((f) => {
|
|
8298
8330
|
l.propertyTypesReference = f;
|
|
8299
|
-
}).catch(
|
|
8300
|
-
}),
|
|
8331
|
+
}).catch(D)), l.propertyTypesReference;
|
|
8332
|
+
}), Ze = A(() => {
|
|
8301
8333
|
const l = S();
|
|
8302
8334
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(d).getPriceCoefficients().then((f) => {
|
|
8303
8335
|
l.priceCoefficientsReference = f;
|
|
8304
|
-
}).catch(
|
|
8336
|
+
}).catch(D)), l.priceCoefficientsReference;
|
|
8305
8337
|
});
|
|
8306
8338
|
return {
|
|
8307
8339
|
/**
|
|
@@ -8355,11 +8387,11 @@ const S = ie("common.references_private", () => {
|
|
|
8355
8387
|
/**
|
|
8356
8388
|
* Справочник направлений продаж.
|
|
8357
8389
|
*/
|
|
8358
|
-
salesDirectionsReference:
|
|
8390
|
+
salesDirectionsReference: Ae,
|
|
8359
8391
|
/**
|
|
8360
8392
|
* Справочник каналов первичного интереса.
|
|
8361
8393
|
*/
|
|
8362
|
-
sourcePrimaryInterestsReference:
|
|
8394
|
+
sourcePrimaryInterestsReference: Te,
|
|
8363
8395
|
/**
|
|
8364
8396
|
* Справочник типов доставки.
|
|
8365
8397
|
*/
|
|
@@ -8371,18 +8403,18 @@ const S = ie("common.references_private", () => {
|
|
|
8371
8403
|
/**
|
|
8372
8404
|
* Справочник складов.
|
|
8373
8405
|
*/
|
|
8374
|
-
warehousesReference:
|
|
8406
|
+
warehousesReference: Ke,
|
|
8375
8407
|
/**
|
|
8376
8408
|
* Справочник типов свойств.
|
|
8377
8409
|
*/
|
|
8378
|
-
propertyTypesReference:
|
|
8410
|
+
propertyTypesReference: Xe,
|
|
8379
8411
|
/**
|
|
8380
8412
|
* Справочник коэффициентов цен.
|
|
8381
8413
|
*/
|
|
8382
|
-
priceCoefficientsReference:
|
|
8414
|
+
priceCoefficientsReference: Ze
|
|
8383
8415
|
};
|
|
8384
8416
|
});
|
|
8385
|
-
class
|
|
8417
|
+
class Ms {
|
|
8386
8418
|
/**
|
|
8387
8419
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
8388
8420
|
*
|
|
@@ -8440,10 +8472,10 @@ class Vr {
|
|
|
8440
8472
|
*/
|
|
8441
8473
|
s(this, "tags");
|
|
8442
8474
|
var e;
|
|
8443
|
-
this.resourceType = new Tt(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
|
|
8475
|
+
this.resourceType = new Tt(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;
|
|
8444
8476
|
}
|
|
8445
8477
|
}
|
|
8446
|
-
class
|
|
8478
|
+
class Ni extends h {
|
|
8447
8479
|
/**
|
|
8448
8480
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
8449
8481
|
*
|
|
@@ -8474,7 +8506,7 @@ class Ii extends h {
|
|
|
8474
8506
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
8475
8507
|
}
|
|
8476
8508
|
}
|
|
8477
|
-
class
|
|
8509
|
+
class Ui extends h {
|
|
8478
8510
|
/**
|
|
8479
8511
|
* Возвращает подсказки по адресам.
|
|
8480
8512
|
*
|
|
@@ -8522,7 +8554,7 @@ class xi extends h {
|
|
|
8522
8554
|
}
|
|
8523
8555
|
}
|
|
8524
8556
|
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 || {});
|
|
8525
|
-
class
|
|
8557
|
+
class Hs extends pt {
|
|
8526
8558
|
/**
|
|
8527
8559
|
* Инициализирует экземпляр класса {@link User}.
|
|
8528
8560
|
*
|
|
@@ -8549,12 +8581,12 @@ class Fs extends pt {
|
|
|
8549
8581
|
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 lt(e.pricingRole) : void 0;
|
|
8550
8582
|
}
|
|
8551
8583
|
}
|
|
8552
|
-
class
|
|
8584
|
+
class Fi extends h {
|
|
8553
8585
|
/**
|
|
8554
8586
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
8555
8587
|
*/
|
|
8556
8588
|
constructor() {
|
|
8557
|
-
super(), this.baseUrl = `${
|
|
8589
|
+
super(), this.baseUrl = `${L().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
8558
8590
|
}
|
|
8559
8591
|
/**
|
|
8560
8592
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -8565,13 +8597,13 @@ class _i extends h {
|
|
|
8565
8597
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
8566
8598
|
}
|
|
8567
8599
|
}
|
|
8568
|
-
class
|
|
8600
|
+
class Bs extends h {
|
|
8569
8601
|
/**
|
|
8570
8602
|
* Возвращает данные о текущем пользователе.
|
|
8571
8603
|
*/
|
|
8572
8604
|
// eslint-disable-next-line class-methods-use-this
|
|
8573
8605
|
getCurrentUser() {
|
|
8574
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
8606
|
+
return this.get("/internal/users/info", {}, (r) => new Hs(r.data), !0);
|
|
8575
8607
|
}
|
|
8576
8608
|
}
|
|
8577
8609
|
const Rr = ie("common.user_state_private", () => {
|
|
@@ -8595,16 +8627,16 @@ function Jr(n) {
|
|
|
8595
8627
|
const r = Rr();
|
|
8596
8628
|
(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) => {
|
|
8597
8629
|
r.currentManager = e;
|
|
8598
|
-
}).catch(
|
|
8630
|
+
}).catch(D).finally(() => {
|
|
8599
8631
|
r.dataLoaderList.currentManager = !1;
|
|
8600
8632
|
}));
|
|
8601
8633
|
}
|
|
8602
|
-
const
|
|
8634
|
+
const Mi = ie("common.user_state", () => {
|
|
8603
8635
|
const n = A(() => {
|
|
8604
8636
|
const e = Rr();
|
|
8605
|
-
return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(
|
|
8637
|
+
return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(Bs).getCurrentUser().then((t) => {
|
|
8606
8638
|
e.currentUser = t, Jr(t);
|
|
8607
|
-
}).catch(
|
|
8639
|
+
}).catch(D).finally(() => {
|
|
8608
8640
|
e.dataLoaderList.currentUser = !1;
|
|
8609
8641
|
})), e.currentUser;
|
|
8610
8642
|
}), r = A(() => (Jr(n.value), Rr().currentManager));
|
|
@@ -8637,7 +8669,7 @@ class Pr {
|
|
|
8637
8669
|
this.user = new q(r == null ? void 0 : r.user), this.salesDirection = new F(r == null ? void 0 : r.salesDirection);
|
|
8638
8670
|
}
|
|
8639
8671
|
}
|
|
8640
|
-
class
|
|
8672
|
+
class gr extends Ve {
|
|
8641
8673
|
/**
|
|
8642
8674
|
* Инициализирует экземпляр класса {@link UserRegion}.
|
|
8643
8675
|
*
|
|
@@ -8657,7 +8689,7 @@ class hr extends Ye {
|
|
|
8657
8689
|
this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new ve(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new Pr(o))) ?? [];
|
|
8658
8690
|
}
|
|
8659
8691
|
}
|
|
8660
|
-
class
|
|
8692
|
+
class Hi extends Fe {
|
|
8661
8693
|
/**
|
|
8662
8694
|
* Инициализирует экземпляр класса {@link UserRegionsListFilters}.
|
|
8663
8695
|
*
|
|
@@ -8693,7 +8725,7 @@ class Ni extends Ne {
|
|
|
8693
8725
|
return this;
|
|
8694
8726
|
}
|
|
8695
8727
|
}
|
|
8696
|
-
class
|
|
8728
|
+
class Bi extends Y {
|
|
8697
8729
|
/**
|
|
8698
8730
|
* Возвращает список регионов пользователей.
|
|
8699
8731
|
*
|
|
@@ -8704,7 +8736,7 @@ class Ui extends Y {
|
|
|
8704
8736
|
* @see /doc/api/internal#/operations/api_internal_user_region_get_list
|
|
8705
8737
|
*/
|
|
8706
8738
|
getRegionsList(r, e, t) {
|
|
8707
|
-
return this.getTypedPaginated(
|
|
8739
|
+
return this.getTypedPaginated(Ve, "/internal/users/regions", r, e, t);
|
|
8708
8740
|
}
|
|
8709
8741
|
/**
|
|
8710
8742
|
* Возвращает полные данные о регионе пользователей.
|
|
@@ -8714,7 +8746,7 @@ class Ui extends Y {
|
|
|
8714
8746
|
* @see /doc/api/internal#/operations/api_internal_user_region_get
|
|
8715
8747
|
*/
|
|
8716
8748
|
getRegion(r) {
|
|
8717
|
-
return this.get(`/internal/users/regions/${r}`, {}, (e) => new
|
|
8749
|
+
return this.get(`/internal/users/regions/${r}`, {}, (e) => new gr(e.data));
|
|
8718
8750
|
}
|
|
8719
8751
|
/**
|
|
8720
8752
|
* Создаёт новый регион пользователей.
|
|
@@ -8727,7 +8759,7 @@ class Ui extends Y {
|
|
|
8727
8759
|
* @see /doc/api/internal#/operations/api_internal_user_region_create
|
|
8728
8760
|
*/
|
|
8729
8761
|
createRegion(r, e = {}) {
|
|
8730
|
-
return this.post("/internal/users/regions", r, (t) => new
|
|
8762
|
+
return this.post("/internal/users/regions", r, (t) => new gr(t.data), e);
|
|
8731
8763
|
}
|
|
8732
8764
|
/**
|
|
8733
8765
|
* Изменяет данные о регионе пользователей.
|
|
@@ -8741,7 +8773,7 @@ class Ui extends Y {
|
|
|
8741
8773
|
* @see /doc/api/internal#/operations/api_internal_user_region_change
|
|
8742
8774
|
*/
|
|
8743
8775
|
updateRegion(r, e, t = {}) {
|
|
8744
|
-
return this.patch(`/internal/users/regions/${r}`, e, (i) => new
|
|
8776
|
+
return this.patch(`/internal/users/regions/${r}`, e, (i) => new gr(i.data), t);
|
|
8745
8777
|
}
|
|
8746
8778
|
/**
|
|
8747
8779
|
* Удаляет регион пользователей.
|
|
@@ -8792,7 +8824,7 @@ class Ui extends Y {
|
|
|
8792
8824
|
});
|
|
8793
8825
|
}
|
|
8794
8826
|
}
|
|
8795
|
-
class
|
|
8827
|
+
class Wi {
|
|
8796
8828
|
/**
|
|
8797
8829
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
8798
8830
|
*
|
|
@@ -8816,195 +8848,198 @@ class Fi {
|
|
|
8816
8848
|
}
|
|
8817
8849
|
}
|
|
8818
8850
|
export {
|
|
8819
|
-
|
|
8820
|
-
|
|
8851
|
+
xs as AnyReference,
|
|
8852
|
+
ns as AppBaseConfig,
|
|
8821
8853
|
vr as BankAccount,
|
|
8822
8854
|
Y as BasePaginationProvider,
|
|
8823
|
-
|
|
8855
|
+
or as BlogPost,
|
|
8824
8856
|
yr as BlogPostMediaFile,
|
|
8825
|
-
|
|
8826
|
-
|
|
8857
|
+
Ge as BlogPostMediaTypeEnum,
|
|
8858
|
+
Ye as BlogPostPublicationStatusEnum,
|
|
8827
8859
|
ye as BlogPostShortInfo,
|
|
8828
|
-
|
|
8860
|
+
Js as BlogPostsListFilters,
|
|
8829
8861
|
ar as BlogProvider,
|
|
8830
|
-
|
|
8862
|
+
ps as CalculationTypeEnum,
|
|
8831
8863
|
m as CalendarHelper,
|
|
8832
|
-
|
|
8833
|
-
|
|
8834
|
-
|
|
8864
|
+
ke as Cart,
|
|
8865
|
+
Xs as CartProvider,
|
|
8866
|
+
ei as CatalogProvider,
|
|
8835
8867
|
it as CatalogableItem,
|
|
8836
8868
|
E as Category,
|
|
8837
|
-
|
|
8869
|
+
ys as CategoryFilter,
|
|
8838
8870
|
Wr as CategoryFilterSetting,
|
|
8839
|
-
|
|
8871
|
+
ms as CategoryFilterValue,
|
|
8840
8872
|
Br as CategoryPricingRule,
|
|
8841
8873
|
at as ChannelPrimaryInterest,
|
|
8842
|
-
|
|
8874
|
+
_s as City,
|
|
8843
8875
|
ve as CityWithRegionAndCountry,
|
|
8844
8876
|
Qr as CityWithUserRegion,
|
|
8845
8877
|
Gr as Client,
|
|
8846
|
-
|
|
8847
|
-
|
|
8878
|
+
Cs as ClientAdditionalData,
|
|
8879
|
+
Ee as ClientCategory,
|
|
8848
8880
|
H as ClientDataProvider,
|
|
8849
|
-
|
|
8850
|
-
|
|
8851
|
-
|
|
8852
|
-
|
|
8853
|
-
|
|
8881
|
+
ri as ClientPriceProvider,
|
|
8882
|
+
ti as ClientPriceTemplateProvider,
|
|
8883
|
+
K as ClientProduct,
|
|
8884
|
+
ni as ClientProductCategoryDataProvider,
|
|
8885
|
+
oi as ClientProductDataProvider,
|
|
8854
8886
|
ne as ClientShortInfo,
|
|
8855
|
-
|
|
8856
|
-
|
|
8857
|
-
|
|
8858
|
-
|
|
8859
|
-
|
|
8887
|
+
as as ClientsAdditionalDataRequestTypeEnum,
|
|
8888
|
+
hi as ClientsListFilters,
|
|
8889
|
+
Ne as CodedIdentity,
|
|
8890
|
+
mi as ConfiguratorProvider,
|
|
8891
|
+
Rs as ConfiguratorsEnum,
|
|
8860
8892
|
Cr as Contact,
|
|
8861
8893
|
ct as ContactLinks,
|
|
8862
8894
|
te as ContactPerson,
|
|
8863
|
-
|
|
8864
|
-
|
|
8865
|
-
|
|
8895
|
+
Ds as ContactPersonRelated,
|
|
8896
|
+
qs as ContactPosition,
|
|
8897
|
+
ur as ContactRelation,
|
|
8866
8898
|
ft as ContragentBase,
|
|
8867
|
-
|
|
8899
|
+
Qe as ContragentFactory,
|
|
8868
8900
|
mt as ContragentIc,
|
|
8869
|
-
|
|
8870
|
-
|
|
8901
|
+
ws as ContragentPerson,
|
|
8902
|
+
vs as ContragentUlNr,
|
|
8871
8903
|
yt as ContragentUlR,
|
|
8872
8904
|
$r as CostSourceEnum,
|
|
8873
8905
|
ae as Country,
|
|
8874
8906
|
Or as CuratedDirection,
|
|
8875
8907
|
Ir as Curator,
|
|
8876
8908
|
j as Currency,
|
|
8877
|
-
|
|
8909
|
+
Ui as DataSuggestionProvider,
|
|
8878
8910
|
Dr as DateHelper,
|
|
8879
|
-
|
|
8911
|
+
Ci as DateTimeProvider,
|
|
8880
8912
|
gt as DeletableNamedIdentity,
|
|
8881
|
-
|
|
8882
|
-
|
|
8913
|
+
xe as DeliveryAddress,
|
|
8914
|
+
J as DeliveryType,
|
|
8883
8915
|
et as DetailedJwtPayload,
|
|
8884
|
-
|
|
8885
|
-
|
|
8886
|
-
|
|
8916
|
+
rs as DeviceTypeResolutionConfig,
|
|
8917
|
+
os as DiscountShortInfo,
|
|
8918
|
+
Wi as FieldValidationResultData,
|
|
8887
8919
|
re as FilterGroup,
|
|
8888
8920
|
Mr as FilterItem,
|
|
8889
8921
|
dr as FilterOpEnum,
|
|
8890
|
-
|
|
8922
|
+
fs as FilterSettings,
|
|
8891
8923
|
st as GeoCoordinates,
|
|
8892
|
-
|
|
8893
|
-
|
|
8894
|
-
|
|
8924
|
+
ls as HiddenCatalogableItem,
|
|
8925
|
+
Ue as HttpCachedRequester,
|
|
8926
|
+
ts as HttpParamsConfig,
|
|
8895
8927
|
h as HttpRequester,
|
|
8896
8928
|
G as Identity,
|
|
8897
|
-
|
|
8929
|
+
us as Image,
|
|
8898
8930
|
Re as JwtPayload,
|
|
8899
|
-
|
|
8931
|
+
X as Manager,
|
|
8900
8932
|
Lr as ManagerCommon,
|
|
8901
|
-
|
|
8933
|
+
bi as ManagerDataFactory,
|
|
8902
8934
|
Dt as ManagerDataProvider,
|
|
8903
|
-
|
|
8935
|
+
Ms as MetaTagItem,
|
|
8904
8936
|
O as NamedIdentity,
|
|
8905
8937
|
M as Offer,
|
|
8906
|
-
|
|
8907
|
-
|
|
8908
|
-
|
|
8938
|
+
As as OfferActualization,
|
|
8939
|
+
Ie as OfferActualizationStatus,
|
|
8940
|
+
di as OfferHelper,
|
|
8909
8941
|
Rt as OfferShortInfo,
|
|
8910
|
-
|
|
8911
|
-
|
|
8942
|
+
Ti as OffersDataProvider,
|
|
8943
|
+
Ai as OffersListFilters,
|
|
8912
8944
|
bt as Operator,
|
|
8913
8945
|
se as Opf,
|
|
8914
8946
|
Q as OpfEnum,
|
|
8915
8947
|
I as Order,
|
|
8916
|
-
|
|
8917
|
-
|
|
8948
|
+
Ss as OrderAction,
|
|
8949
|
+
Si as OrderEditorData,
|
|
8918
8950
|
Pt as OrderInfo,
|
|
8919
|
-
|
|
8951
|
+
ds as OrderItem,
|
|
8920
8952
|
nt as OrderItemBase,
|
|
8921
|
-
|
|
8953
|
+
Ns as OrderPaymentStatus,
|
|
8922
8954
|
vt as OrderShortInfo,
|
|
8923
|
-
|
|
8924
|
-
|
|
8925
|
-
|
|
8926
|
-
|
|
8927
|
-
|
|
8928
|
-
|
|
8929
|
-
|
|
8930
|
-
|
|
8955
|
+
Je as OrderStatus,
|
|
8956
|
+
Us as OrderStatusDetail,
|
|
8957
|
+
Is as OrderStatusDetailEnum,
|
|
8958
|
+
Os as OrderStatusEnum,
|
|
8959
|
+
$s as OrderStatusHistoryInfo,
|
|
8960
|
+
ki as OrdersDataProvider,
|
|
8961
|
+
$i as OrdersListFilters,
|
|
8962
|
+
Fe as PaginationFiltersBase,
|
|
8931
8963
|
Ce as PartnerGroup,
|
|
8932
8964
|
At as PaymentType,
|
|
8933
|
-
|
|
8934
|
-
|
|
8935
|
-
|
|
8936
|
-
|
|
8965
|
+
je as PreferencesStorageProvider,
|
|
8966
|
+
pr as PriceAnalyze,
|
|
8967
|
+
Oi as PriceAnalyzeProvider,
|
|
8968
|
+
Pe as PriceCoefficient,
|
|
8937
8969
|
tt as PriceCoefficientEnum,
|
|
8938
|
-
|
|
8939
|
-
|
|
8970
|
+
Ii as PriceHistoryDataProvider,
|
|
8971
|
+
ks as PriceHistoryItem,
|
|
8940
8972
|
ge as PriceTemplate,
|
|
8941
|
-
|
|
8942
|
-
|
|
8973
|
+
cr as PriceTemplateCategory,
|
|
8974
|
+
Le as PriceTemplateClient,
|
|
8943
8975
|
ut as PriceTemplateICatalogableItem,
|
|
8944
|
-
|
|
8945
|
-
|
|
8946
|
-
|
|
8947
|
-
|
|
8976
|
+
lr as PriceTemplateProduct,
|
|
8977
|
+
ci as PriceTemplateProvider,
|
|
8978
|
+
Oe as PricingRole,
|
|
8979
|
+
li as PricingRoleProvider,
|
|
8948
8980
|
wr as PrimaryCatalogableItem,
|
|
8949
8981
|
N as Product,
|
|
8950
|
-
|
|
8951
|
-
|
|
8952
|
-
|
|
8982
|
+
si as ProductCategoryDataProvider,
|
|
8983
|
+
ii as ProductDataProvider,
|
|
8984
|
+
Fs as ProductFileType,
|
|
8953
8985
|
ot as ProductFilterTypeEnum,
|
|
8954
8986
|
Sr as ProductPriceCoefficient,
|
|
8955
|
-
|
|
8987
|
+
Ls as ProductPriceHistory,
|
|
8956
8988
|
Hr as ProductUnit,
|
|
8957
|
-
|
|
8958
|
-
|
|
8989
|
+
Ts as ProfstroyOfferItem,
|
|
8990
|
+
ui as PropertiesProvider,
|
|
8959
8991
|
fe as Property,
|
|
8960
8992
|
ht as PropertyType,
|
|
8961
|
-
|
|
8993
|
+
hs as PropertyTypeEnum,
|
|
8962
8994
|
pe as PropertyValue,
|
|
8963
|
-
|
|
8995
|
+
xi as RecommendationsDataProvider,
|
|
8964
8996
|
Er as RecommendationsList,
|
|
8965
|
-
|
|
8966
|
-
|
|
8997
|
+
C as Reference,
|
|
8998
|
+
_i as ReferenceDataFactory,
|
|
8967
8999
|
d as ReferenceDataProvider,
|
|
8968
9000
|
we as Region,
|
|
8969
9001
|
Tt as ResourceType,
|
|
8970
|
-
|
|
8971
|
-
|
|
9002
|
+
Di as STANDARD_PERIOD_GROUPS,
|
|
9003
|
+
Ri as STANDARD_PERIOD_SECTIONS,
|
|
8972
9004
|
F as SalesDirection,
|
|
8973
|
-
|
|
9005
|
+
ss as SentryConfig,
|
|
8974
9006
|
Vr as Seo,
|
|
8975
|
-
|
|
9007
|
+
Ni as SeoDataProvider,
|
|
8976
9008
|
wt as SourcePrimaryInterest,
|
|
8977
|
-
|
|
8978
|
-
|
|
8979
|
-
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
|
|
9009
|
+
cs as StockCount,
|
|
9010
|
+
yi as TableDataPagination,
|
|
9011
|
+
Ps as TableDataPaginationRequestParams,
|
|
9012
|
+
ai as TableDataSortRequestParams,
|
|
9013
|
+
pi as TemplateProductCategoryDataProvider,
|
|
9014
|
+
Zs as TemplatesListFilters,
|
|
8983
9015
|
_ as TypedInstanceFactory,
|
|
8984
9016
|
Ct as UnitsHelper,
|
|
8985
|
-
|
|
9017
|
+
gi as UnknownClientDataProvider,
|
|
8986
9018
|
rt as UpdatableNamedIdentity,
|
|
8987
|
-
|
|
8988
|
-
|
|
9019
|
+
Hs as User,
|
|
9020
|
+
Fi as UserAuthDataProvider,
|
|
8989
9021
|
pt as UserCommonInfo,
|
|
8990
|
-
|
|
9022
|
+
Bs as UserDataProvider,
|
|
8991
9023
|
lt as UserPricingRole,
|
|
8992
|
-
|
|
9024
|
+
gr as UserRegion,
|
|
8993
9025
|
Pr as UserRegionEmployee,
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
9026
|
+
Bi as UserRegionProvider,
|
|
9027
|
+
Ve as UserRegionShortInfo,
|
|
9028
|
+
Hi as UserRegionsListFilters,
|
|
8997
9029
|
q as UserShortInfo,
|
|
8998
9030
|
dt as UserTypeEnum,
|
|
8999
|
-
|
|
9000
|
-
|
|
9001
|
-
|
|
9002
|
-
|
|
9031
|
+
fi as VersionConfig,
|
|
9032
|
+
Me as Warehouse,
|
|
9033
|
+
is as WebSocketConfig,
|
|
9034
|
+
Li as currentOrderInjectionKey,
|
|
9035
|
+
wi as daysAgoIso,
|
|
9003
9036
|
zr as findCatalogItemByIdRecursive,
|
|
9004
9037
|
jr as flattenCatalogItems,
|
|
9005
|
-
|
|
9006
|
-
|
|
9007
|
-
|
|
9008
|
-
|
|
9009
|
-
|
|
9038
|
+
Pi as formatPercentChange,
|
|
9039
|
+
vi as formatRelativeDate,
|
|
9040
|
+
bs as pluralize,
|
|
9041
|
+
nr as useAuthStateStore,
|
|
9042
|
+
L as useBaseConfigStateStore,
|
|
9043
|
+
qi as useReferencesStore,
|
|
9044
|
+
Mi as useUserStateStore
|
|
9010
9045
|
};
|