@snabcentr/common-lib 1.72.4 → 1.72.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -2
- package/dist/sc-common-lib.js +187 -188
- 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/clients/classes/clients-list-filters.d.ts +26 -22
- package/dist/src/clients/classes/clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +4 -0
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/dist/src/config/classes/app-base-config.d.ts +4 -0
- package/dist/src/config/classes/app-base-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-app-base-config.d.ts +4 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,9 +2,9 @@ var Dr = Object.defineProperty;
|
|
|
2
2
|
var Ar = (n, r, e) => r in n ? Dr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Ar(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as tr } from "jwt-decode";
|
|
5
|
-
import { merge as ye, isUndefined as Tr, isNil as A, isEmpty as Y, noop as y, mapValues as sr, isArray as Q, every as $r, split as
|
|
6
|
-
import { objectToCamel as Fe, objectToSnake as
|
|
7
|
-
import { isAfter as ze, parseISO as C, startOfToday as
|
|
5
|
+
import { merge as ye, isUndefined as Tr, isNil as A, isEmpty as Y, noop as y, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as Sr, constant as ar, isString as w, cloneDeep as Ir, toLower as xr, isFunction as Ue, map as Re, forEach as Lr, isDate as _e, omitBy as ir, isObject as nr } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Fe, objectToSnake as He } from "ts-case-convert";
|
|
7
|
+
import { isAfter as ze, parseISO as C, startOfToday as Oe, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as dr, startOfYesterday as Nr, endOfToday as Ur, endOfDay as Fr, startOfDay as Mr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
9
9
|
import { ref as f, markRaw as jr, computed as R } from "vue";
|
|
10
10
|
import Gr from "axios";
|
|
@@ -111,7 +111,7 @@ class N {
|
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class dt extends N {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -210,7 +210,7 @@ class fe {
|
|
|
210
210
|
if (e)
|
|
211
211
|
try {
|
|
212
212
|
const s = JSON.parse(e);
|
|
213
|
-
if (!s.availableFor || ze(C(s.availableFor) ||
|
|
213
|
+
if (!s.availableFor || ze(C(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
|
|
214
214
|
if (A(s.data) || Y(s.data))
|
|
215
215
|
throw new Error("Data is empty");
|
|
216
216
|
return s.data;
|
|
@@ -284,7 +284,7 @@ class fe {
|
|
|
284
284
|
const i = localStorage.getItem(s);
|
|
285
285
|
if (i) {
|
|
286
286
|
const o = JSON.parse(i);
|
|
287
|
-
o.availableFor && !ze(C(o.availableFor) ||
|
|
287
|
+
o.availableFor && !ze(C(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
288
288
|
}
|
|
289
289
|
} catch {
|
|
290
290
|
r.push(s);
|
|
@@ -308,7 +308,7 @@ function We(n) {
|
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
|
-
const
|
|
311
|
+
const E = te("__auth_state_private", () => {
|
|
312
312
|
const n = f(
|
|
313
313
|
(() => {
|
|
314
314
|
var u;
|
|
@@ -350,9 +350,9 @@ const H = te("__auth_state_private", () => {
|
|
|
350
350
|
*/
|
|
351
351
|
recalculateUserPermissions: i
|
|
352
352
|
};
|
|
353
|
-
}),
|
|
353
|
+
}), Se = te("__auth_state", () => {
|
|
354
354
|
const n = R(() => {
|
|
355
|
-
const o =
|
|
355
|
+
const o = E();
|
|
356
356
|
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
357
357
|
const c = o.jwtTokenUpdater();
|
|
358
358
|
o.jwtToken = c, c.then((u) => {
|
|
@@ -362,21 +362,21 @@ const H = te("__auth_state_private", () => {
|
|
|
362
362
|
return o.jwtToken;
|
|
363
363
|
});
|
|
364
364
|
function r(o) {
|
|
365
|
-
|
|
365
|
+
E().jwtTokenUpdater = o;
|
|
366
366
|
}
|
|
367
367
|
function e(o) {
|
|
368
|
-
const c =
|
|
368
|
+
const c = E();
|
|
369
369
|
c.jwtToken = Promise.resolve(o), fe.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
|
|
370
370
|
}
|
|
371
371
|
function s() {
|
|
372
|
-
const o =
|
|
372
|
+
const o = E();
|
|
373
373
|
o.jwtToken = void 0, o.userPermissions = void 0, fe.saveActualDataToStorage("sc.token", void 0);
|
|
374
374
|
}
|
|
375
375
|
function i(o) {
|
|
376
|
-
const c =
|
|
376
|
+
const c = E();
|
|
377
377
|
!A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((v) => {
|
|
378
378
|
const m = N.getJwtPayload(v);
|
|
379
|
-
c.userPermissions = m.exp * 1e3 > Date.now() ? sr(m.resourceAccess, (
|
|
379
|
+
c.userPermissions = m.exp * 1e3 > Date.now() ? sr(m.resourceAccess, (S) => (S == null ? void 0 : S.roles) ?? []) : void 0;
|
|
380
380
|
}).catch(y);
|
|
381
381
|
const u = Q(o) ? o.join(" && ") : o;
|
|
382
382
|
if (c.userPermissionsComputedRefs.has(u))
|
|
@@ -384,11 +384,11 @@ const H = te("__auth_state_private", () => {
|
|
|
384
384
|
const p = R(() => {
|
|
385
385
|
const v = (m) => {
|
|
386
386
|
var B;
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
387
|
+
const S = br(m, ".");
|
|
388
|
+
if (S.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [_,
|
|
391
|
-
return Q(G) && G.includes(
|
|
390
|
+
const [_, O] = S, G = (B = E().userPermissions) == null ? void 0 : B[_];
|
|
391
|
+
return Q(G) && G.includes(O);
|
|
392
392
|
};
|
|
393
393
|
return Q(o) ? $r(o, (m) => v(m)) : v(o);
|
|
394
394
|
});
|
|
@@ -448,7 +448,7 @@ class j {
|
|
|
448
448
|
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : A(this.id);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
class
|
|
451
|
+
class b extends j {
|
|
452
452
|
/**
|
|
453
453
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
454
454
|
*
|
|
@@ -463,7 +463,7 @@ class a extends j {
|
|
|
463
463
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
464
464
|
}
|
|
465
465
|
}
|
|
466
|
-
class oe extends
|
|
466
|
+
class oe extends b {
|
|
467
467
|
/**
|
|
468
468
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
469
469
|
*
|
|
@@ -497,7 +497,7 @@ class or extends oe {
|
|
|
497
497
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
class
|
|
500
|
+
class qe extends or {
|
|
501
501
|
/**
|
|
502
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
503
503
|
*
|
|
@@ -512,7 +512,7 @@ class Oe extends or {
|
|
|
512
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
class he extends
|
|
515
|
+
class he extends qe {
|
|
516
516
|
/**
|
|
517
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
518
518
|
*
|
|
@@ -536,11 +536,11 @@ class he extends Oe {
|
|
|
536
536
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
537
537
|
*/
|
|
538
538
|
t(this, "currencyRates");
|
|
539
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
539
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [Sr(s), i])) : void 0;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
var cr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(cr || {});
|
|
543
|
-
class P extends
|
|
543
|
+
class P extends b {
|
|
544
544
|
/**
|
|
545
545
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
546
546
|
*
|
|
@@ -564,7 +564,7 @@ class De extends P {
|
|
|
564
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
565
565
|
*/
|
|
566
566
|
static getRetailPriceCoefficient() {
|
|
567
|
-
return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec:
|
|
567
|
+
return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec: ar(!0) };
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
570
|
class Me {
|
|
@@ -667,7 +667,7 @@ class Br {
|
|
|
667
667
|
this.warehouse = new Ae(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
class
|
|
670
|
+
class Er extends or {
|
|
671
671
|
/**
|
|
672
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
673
673
|
*
|
|
@@ -682,7 +682,7 @@ class Hr extends or {
|
|
|
682
682
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
class
|
|
685
|
+
class Hr {
|
|
686
686
|
/**
|
|
687
687
|
* Инициализирует экземпляр класса {@link Image}.
|
|
688
688
|
*
|
|
@@ -705,7 +705,7 @@ class Er {
|
|
|
705
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
class I extends
|
|
708
|
+
class I extends Er {
|
|
709
709
|
/**
|
|
710
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
711
711
|
*
|
|
@@ -792,7 +792,7 @@ class I extends Hr {
|
|
|
792
792
|
t(this, "priceCoefficients");
|
|
793
793
|
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = w(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Br(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
794
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
795
|
-
s && (this.category = new
|
|
795
|
+
s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new qe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Hr(p, $.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
797
797
|
/**
|
|
798
798
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -961,7 +961,7 @@ class je {
|
|
|
961
961
|
return new r(e);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const a = class a {
|
|
965
965
|
/**
|
|
966
966
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
967
967
|
*/
|
|
@@ -1000,7 +1000,7 @@ const S = class S {
|
|
|
1000
1000
|
// eslint-disable-next-line class-methods-use-this
|
|
1001
1001
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1002
1002
|
let e;
|
|
1003
|
-
return A(
|
|
1003
|
+
return A(Se().jwtToken) || (e = await Se().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1004
1004
|
});
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -1008,7 +1008,7 @@ const S = class S {
|
|
|
1008
1008
|
* @param request Данные запроса.
|
|
1009
1009
|
*/
|
|
1010
1010
|
// eslint-disable-next-line class-methods-use-this
|
|
1011
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1011
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = He(r.params)), ["put", "patch", "post"].includes(xr(r.method)) && r.data && (r.data = He(r.data))), r));
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Перехватчик ошибок ответов на запрос.
|
|
1014
1014
|
*
|
|
@@ -1017,7 +1017,7 @@ const S = class S {
|
|
|
1017
1017
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
1018
1018
|
var s;
|
|
1019
1019
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
1020
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
1020
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Se().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
1021
1021
|
});
|
|
1022
1022
|
/**
|
|
1023
1023
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -1027,9 +1027,9 @@ const S = class S {
|
|
|
1027
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
1028
1028
|
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
|
|
1029
1029
|
const r = $.getConfig().version;
|
|
1030
|
-
this.errorResponseHandler =
|
|
1030
|
+
this.errorResponseHandler = a.defaultErrorsResponseHandler, this.httpClient = Gr.create({
|
|
1031
1031
|
headers: {
|
|
1032
|
-
"APP-VERSION": `${r.name} (${r.version}, ${
|
|
1032
|
+
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, $.getConfig().dateFormats.uiDate)})`,
|
|
1033
1033
|
Accept: "application/json",
|
|
1034
1034
|
"Content-Type": "application/json"
|
|
1035
1035
|
}
|
|
@@ -1038,7 +1038,7 @@ const S = class S {
|
|
|
1038
1038
|
(e) => Promise.reject(e)
|
|
1039
1039
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1040
1040
|
(e) => e,
|
|
1041
|
-
(e) =>
|
|
1041
|
+
(e) => a.convertHttpErrorResponse(e)
|
|
1042
1042
|
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1043
1043
|
this.dataConverterResponseInterceptor,
|
|
1044
1044
|
(e) => Promise.reject(e)
|
|
@@ -1050,7 +1050,7 @@ const S = class S {
|
|
|
1050
1050
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1051
1051
|
*/
|
|
1052
1052
|
static setDefaultErrorsResponseHandler(r) {
|
|
1053
|
-
|
|
1053
|
+
a.defaultErrorsResponseHandler = r;
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1058,7 +1058,7 @@ const S = class S {
|
|
|
1058
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
1059
1059
|
*/
|
|
1060
1060
|
static getInstance(r) {
|
|
1061
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1061
|
+
return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = je.simpleInstanceInitializer(r)), a.instances[r.name];
|
|
1062
1062
|
}
|
|
1063
1063
|
/**
|
|
1064
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1156,15 +1156,15 @@ const S = class S {
|
|
|
1156
1156
|
* Экземпляр объекта текущего класса.
|
|
1157
1157
|
*/
|
|
1158
1158
|
// eslint-disable-next-line no-use-before-define
|
|
1159
|
-
t(
|
|
1159
|
+
t(a, "instances", {}), /**
|
|
1160
1160
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1161
1161
|
*
|
|
1162
1162
|
* @param error Данные об ошибке.
|
|
1163
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1164
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1165
1165
|
*/
|
|
1166
|
-
t(
|
|
1167
|
-
let h =
|
|
1166
|
+
t(a, "defaultErrorsResponseHandler", y);
|
|
1167
|
+
let h = a;
|
|
1168
1168
|
class Nt extends h {
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
@@ -1300,7 +1300,7 @@ class z extends he {
|
|
|
1300
1300
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new z(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new I(o));
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
class ur extends
|
|
1303
|
+
class ur extends b {
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1306
1306
|
*
|
|
@@ -1330,7 +1330,7 @@ class Kr extends ur {
|
|
|
1330
1330
|
this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
class U extends
|
|
1333
|
+
class U extends b {
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1336
1336
|
*
|
|
@@ -1345,7 +1345,7 @@ class U extends a {
|
|
|
1345
1345
|
this.type = e == null ? void 0 : e.type;
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
class Qr extends
|
|
1348
|
+
class Qr extends b {
|
|
1349
1349
|
/**
|
|
1350
1350
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1351
1351
|
*
|
|
@@ -1460,9 +1460,9 @@ class Yr {
|
|
|
1460
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
class
|
|
1463
|
+
class x extends P {
|
|
1464
1464
|
}
|
|
1465
|
-
class ce extends
|
|
1465
|
+
class ce extends b {
|
|
1466
1466
|
/**
|
|
1467
1467
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1468
1468
|
*
|
|
@@ -1490,10 +1490,10 @@ class ce extends a {
|
|
|
1490
1490
|
* @inheritDoc
|
|
1491
1491
|
*/
|
|
1492
1492
|
t(this, "isRegionalDirector");
|
|
1493
|
-
this.salesDirection = e != null && e.salesDirection ? new
|
|
1493
|
+
this.salesDirection = e != null && e.salesDirection ? new x(e.salesDirection) : new x(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Yr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
class Xr extends
|
|
1496
|
+
class Xr extends b {
|
|
1497
1497
|
/**
|
|
1498
1498
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1499
1499
|
*
|
|
@@ -1620,7 +1620,7 @@ class pr {
|
|
|
1620
1620
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new De(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1621
1621
|
}
|
|
1622
1622
|
}
|
|
1623
|
-
class
|
|
1623
|
+
class ae extends pr {
|
|
1624
1624
|
/**
|
|
1625
1625
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1626
1626
|
*
|
|
@@ -1667,7 +1667,7 @@ class Be extends P {
|
|
|
1667
1667
|
e && (this.region = new le(e.region));
|
|
1668
1668
|
}
|
|
1669
1669
|
}
|
|
1670
|
-
class hr extends
|
|
1670
|
+
class hr extends b {
|
|
1671
1671
|
/**
|
|
1672
1672
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1673
1673
|
*
|
|
@@ -1703,7 +1703,7 @@ class hr extends a {
|
|
|
1703
1703
|
* Признак активности учетной записи пользователя.
|
|
1704
1704
|
*/
|
|
1705
1705
|
t(this, "isActive");
|
|
1706
|
-
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
|
|
1706
|
+
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 x(e.salesDirection) : void 0, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = w(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1707
1707
|
}
|
|
1708
1708
|
}
|
|
1709
1709
|
class ge extends hr {
|
|
@@ -1748,7 +1748,7 @@ class ge extends hr {
|
|
|
1748
1748
|
* Список менеджеров клиента.
|
|
1749
1749
|
*/
|
|
1750
1750
|
t(this, "managers");
|
|
1751
|
-
this.salesDirection = new
|
|
1751
|
+
this.salesDirection = new x(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 Be(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ce(i))) ?? [];
|
|
1752
1752
|
}
|
|
1753
1753
|
}
|
|
1754
1754
|
class se extends j {
|
|
@@ -1795,7 +1795,7 @@ class Ie extends pr {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
class gr extends P {
|
|
1797
1797
|
}
|
|
1798
|
-
class ie extends
|
|
1798
|
+
class ie extends b {
|
|
1799
1799
|
/**
|
|
1800
1800
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1801
1801
|
*
|
|
@@ -1818,7 +1818,7 @@ class ie extends a {
|
|
|
1818
1818
|
this.type = new gr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1819
1819
|
}
|
|
1820
1820
|
}
|
|
1821
|
-
class
|
|
1821
|
+
class H {
|
|
1822
1822
|
/**
|
|
1823
1823
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1824
1824
|
*
|
|
@@ -1919,7 +1919,7 @@ class Ut {
|
|
|
1919
1919
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1920
1920
|
}
|
|
1921
1921
|
}
|
|
1922
|
-
class ne extends
|
|
1922
|
+
class ne extends b {
|
|
1923
1923
|
/**
|
|
1924
1924
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
1925
1925
|
*
|
|
@@ -2153,6 +2153,10 @@ class Ft {
|
|
|
2153
2153
|
* @inheritDoc
|
|
2154
2154
|
*/
|
|
2155
2155
|
t(this, "sentry");
|
|
2156
|
+
/**
|
|
2157
|
+
* @inheritDoc
|
|
2158
|
+
*/
|
|
2159
|
+
t(this, "tableDefaultHeightCoefficient");
|
|
2156
2160
|
/**
|
|
2157
2161
|
* @inheritDoc
|
|
2158
2162
|
*/
|
|
@@ -2173,7 +2177,7 @@ class Ft {
|
|
|
2173
2177
|
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new rt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new et(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new tt({
|
|
2174
2178
|
environment: this.environment,
|
|
2175
2179
|
...r == null ? void 0 : r.sentry
|
|
2176
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
|
|
2180
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
|
|
2177
2181
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2178
2182
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2179
2183
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
@@ -2449,8 +2453,8 @@ class Gt extends h {
|
|
|
2449
2453
|
return this.post(
|
|
2450
2454
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2451
2455
|
s && {
|
|
2452
|
-
startAt: s.startAt &&
|
|
2453
|
-
endAt: s.endAt &&
|
|
2456
|
+
startAt: s.startAt && q(s.startAt, i),
|
|
2457
|
+
endAt: s.endAt && q(s.endAt, i)
|
|
2454
2458
|
},
|
|
2455
2459
|
(o) => new se(o.data),
|
|
2456
2460
|
{},
|
|
@@ -2483,8 +2487,8 @@ class Gt extends h {
|
|
|
2483
2487
|
return this.patch(
|
|
2484
2488
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2485
2489
|
i && {
|
|
2486
|
-
startAt: i.startAt &&
|
|
2487
|
-
endAt: i.endAt &&
|
|
2490
|
+
startAt: i.startAt && q(i.startAt, o),
|
|
2491
|
+
endAt: i.endAt && q(i.endAt, o)
|
|
2488
2492
|
},
|
|
2489
2493
|
(c) => new se(c.data)
|
|
2490
2494
|
);
|
|
@@ -2575,7 +2579,7 @@ class Bt extends h {
|
|
|
2575
2579
|
getCategoryProductsCoefficients(r) {
|
|
2576
2580
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2577
2581
|
const { data: s } = e;
|
|
2578
|
-
return
|
|
2582
|
+
return Lr(s, (i) => i.map((o) => new Me(o))), s;
|
|
2579
2583
|
});
|
|
2580
2584
|
}
|
|
2581
2585
|
/**
|
|
@@ -2594,7 +2598,7 @@ class Bt extends h {
|
|
|
2594
2598
|
});
|
|
2595
2599
|
}
|
|
2596
2600
|
}
|
|
2597
|
-
class
|
|
2601
|
+
class Et extends h {
|
|
2598
2602
|
/**
|
|
2599
2603
|
* Возвращает данные об указанном продукте.
|
|
2600
2604
|
*
|
|
@@ -2644,7 +2648,7 @@ class Ht extends h {
|
|
|
2644
2648
|
});
|
|
2645
2649
|
}
|
|
2646
2650
|
}
|
|
2647
|
-
class
|
|
2651
|
+
class Ht extends h {
|
|
2648
2652
|
/**
|
|
2649
2653
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2650
2654
|
*
|
|
@@ -2727,7 +2731,7 @@ class zt extends h {
|
|
|
2727
2731
|
);
|
|
2728
2732
|
}
|
|
2729
2733
|
}
|
|
2730
|
-
var
|
|
2734
|
+
var Ee = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Ee || {});
|
|
2731
2735
|
class Ve {
|
|
2732
2736
|
/**
|
|
2733
2737
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2747,7 +2751,7 @@ class Ve {
|
|
|
2747
2751
|
* Значение с которым сравнивается поле.
|
|
2748
2752
|
*/
|
|
2749
2753
|
t(this, "value");
|
|
2750
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2754
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Ee.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2751
2755
|
}
|
|
2752
2756
|
/**
|
|
2753
2757
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2759,7 +2763,7 @@ class Ve {
|
|
|
2759
2763
|
field: this.field,
|
|
2760
2764
|
op: this.op
|
|
2761
2765
|
};
|
|
2762
|
-
return r.value = _e(this.value) ?
|
|
2766
|
+
return r.value = _e(this.value) ? q(this.value, $.getConfig().dateFormats.api) : this.value, r;
|
|
2763
2767
|
}
|
|
2764
2768
|
}
|
|
2765
2769
|
class ue {
|
|
@@ -2945,7 +2949,7 @@ class Wt extends $e {
|
|
|
2945
2949
|
return this.get(
|
|
2946
2950
|
`/internal/price/templates/${r}/categories`,
|
|
2947
2951
|
{},
|
|
2948
|
-
(e) => e.data.map((s) => new
|
|
2952
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2949
2953
|
);
|
|
2950
2954
|
}
|
|
2951
2955
|
/**
|
|
@@ -2960,7 +2964,7 @@ class Wt extends $e {
|
|
|
2960
2964
|
return this.get(
|
|
2961
2965
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2962
2966
|
{},
|
|
2963
|
-
(s) => new
|
|
2967
|
+
(s) => new ae(s.data)
|
|
2964
2968
|
);
|
|
2965
2969
|
}
|
|
2966
2970
|
/**
|
|
@@ -2986,7 +2990,7 @@ class Wt extends $e {
|
|
|
2986
2990
|
},
|
|
2987
2991
|
params: i ? { recursively: !0 } : {}
|
|
2988
2992
|
},
|
|
2989
|
-
(c) => new
|
|
2993
|
+
(c) => new ae(c.data)
|
|
2990
2994
|
);
|
|
2991
2995
|
}
|
|
2992
2996
|
/**
|
|
@@ -3177,7 +3181,7 @@ class Vt extends $e {
|
|
|
3177
3181
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3178
3182
|
*/
|
|
3179
3183
|
getProductProperties(r) {
|
|
3180
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3184
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
|
|
3181
3185
|
}
|
|
3182
3186
|
/**
|
|
3183
3187
|
* Возвращает значение свойства продукта.
|
|
@@ -3187,7 +3191,7 @@ class Vt extends $e {
|
|
|
3187
3191
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3188
3192
|
*/
|
|
3189
3193
|
getProductProperty(r, e) {
|
|
3190
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3194
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new H(s.data));
|
|
3191
3195
|
}
|
|
3192
3196
|
/**
|
|
3193
3197
|
* Обновляет значение свойства продукта.
|
|
@@ -3198,7 +3202,7 @@ class Vt extends $e {
|
|
|
3198
3202
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3199
3203
|
*/
|
|
3200
3204
|
updateProductProperty(r, e, s) {
|
|
3201
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3205
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
|
|
3202
3206
|
}
|
|
3203
3207
|
/**
|
|
3204
3208
|
* Удаляет значение свойства продукта.
|
|
@@ -3323,7 +3327,7 @@ class Vt extends $e {
|
|
|
3323
3327
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3324
3328
|
*/
|
|
3325
3329
|
getCategoryProperties(r) {
|
|
3326
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3330
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
|
|
3327
3331
|
}
|
|
3328
3332
|
/**
|
|
3329
3333
|
* Возвращает значение свойства категории.
|
|
@@ -3333,7 +3337,7 @@ class Vt extends $e {
|
|
|
3333
3337
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3334
3338
|
*/
|
|
3335
3339
|
getCategoryProperty(r, e) {
|
|
3336
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3340
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new H(s.data));
|
|
3337
3341
|
}
|
|
3338
3342
|
/**
|
|
3339
3343
|
* Обновляет значение свойства категории.
|
|
@@ -3344,7 +3348,7 @@ class Vt extends $e {
|
|
|
3344
3348
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3345
3349
|
*/
|
|
3346
3350
|
updateCategoryProperty(r, e, s) {
|
|
3347
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3351
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
|
|
3348
3352
|
}
|
|
3349
3353
|
/**
|
|
3350
3354
|
* Удаляет значение свойства категории.
|
|
@@ -3503,7 +3507,7 @@ function Qe(n) {
|
|
|
3503
3507
|
}
|
|
3504
3508
|
}), r;
|
|
3505
3509
|
}
|
|
3506
|
-
var nt = /* @__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))(nt || {}),
|
|
3510
|
+
var nt = /* @__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))(nt || {}), d = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(d || {});
|
|
3507
3511
|
class ot extends P {
|
|
3508
3512
|
}
|
|
3509
3513
|
class mr extends P {
|
|
@@ -3512,7 +3516,7 @@ class Kt extends P {
|
|
|
3512
3516
|
}
|
|
3513
3517
|
class ct extends P {
|
|
3514
3518
|
}
|
|
3515
|
-
class Ce extends
|
|
3519
|
+
class Ce extends b {
|
|
3516
3520
|
/**
|
|
3517
3521
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3518
3522
|
*
|
|
@@ -3539,7 +3543,7 @@ class F extends P {
|
|
|
3539
3543
|
return new F({
|
|
3540
3544
|
id: 1,
|
|
3541
3545
|
guid: "",
|
|
3542
|
-
slug:
|
|
3546
|
+
slug: d.Person,
|
|
3543
3547
|
name: ""
|
|
3544
3548
|
});
|
|
3545
3549
|
}
|
|
@@ -3558,7 +3562,7 @@ class fr extends P {
|
|
|
3558
3562
|
}
|
|
3559
3563
|
class yr extends P {
|
|
3560
3564
|
}
|
|
3561
|
-
class
|
|
3565
|
+
class de extends j {
|
|
3562
3566
|
/**
|
|
3563
3567
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3564
3568
|
*
|
|
@@ -3589,7 +3593,7 @@ class qe extends j {
|
|
|
3589
3593
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new Ce(e.currency));
|
|
3590
3594
|
}
|
|
3591
3595
|
}
|
|
3592
|
-
class Ne extends
|
|
3596
|
+
class Ne extends b {
|
|
3593
3597
|
/**
|
|
3594
3598
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3595
3599
|
*
|
|
@@ -3643,7 +3647,7 @@ class M extends Ne {
|
|
|
3643
3647
|
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 = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3644
3648
|
}
|
|
3645
3649
|
}
|
|
3646
|
-
class wr extends
|
|
3650
|
+
class wr extends b {
|
|
3647
3651
|
/**
|
|
3648
3652
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3649
3653
|
*
|
|
@@ -3663,7 +3667,7 @@ class wr extends a {
|
|
|
3663
3667
|
/**
|
|
3664
3668
|
* Направление продаж.
|
|
3665
3669
|
*/
|
|
3666
|
-
t(this, "salesDirection", new
|
|
3670
|
+
t(this, "salesDirection", new x());
|
|
3667
3671
|
/**
|
|
3668
3672
|
* Группа партнеров (направление деятельности).
|
|
3669
3673
|
*/
|
|
@@ -3701,7 +3705,7 @@ class wr extends a {
|
|
|
3701
3705
|
*/
|
|
3702
3706
|
t(this, "updater");
|
|
3703
3707
|
if (e) {
|
|
3704
|
-
if (this.opf = new F(e.opf), this.salesDirection = new
|
|
3708
|
+
if (this.opf = new F(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3705
3709
|
const s = [];
|
|
3706
3710
|
e.contacts.forEach((i) => {
|
|
3707
3711
|
s.push(new M(i));
|
|
@@ -3710,7 +3714,7 @@ class wr extends a {
|
|
|
3710
3714
|
if (e.bankAccounts) {
|
|
3711
3715
|
const s = [];
|
|
3712
3716
|
e.bankAccounts.forEach((i) => {
|
|
3713
|
-
s.push(new
|
|
3717
|
+
s.push(new de(i));
|
|
3714
3718
|
}), this.bankAccounts = s;
|
|
3715
3719
|
}
|
|
3716
3720
|
}
|
|
@@ -3815,18 +3819,18 @@ class ve {
|
|
|
3815
3819
|
*/
|
|
3816
3820
|
static createInstance(r) {
|
|
3817
3821
|
switch (r.opf.slug) {
|
|
3818
|
-
case
|
|
3822
|
+
case d.Ic:
|
|
3819
3823
|
return new Cr(r);
|
|
3820
|
-
case
|
|
3824
|
+
case d.UlR:
|
|
3821
3825
|
return new vr(r);
|
|
3822
|
-
case
|
|
3826
|
+
case d.UlNr:
|
|
3823
3827
|
return new mt(r);
|
|
3824
3828
|
default:
|
|
3825
3829
|
return new gt(r);
|
|
3826
3830
|
}
|
|
3827
3831
|
}
|
|
3828
3832
|
}
|
|
3829
|
-
class
|
|
3833
|
+
class xe extends j {
|
|
3830
3834
|
/**
|
|
3831
3835
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3832
3836
|
*
|
|
@@ -3866,7 +3870,7 @@ class ft extends M {
|
|
|
3866
3870
|
*/
|
|
3867
3871
|
addresses: []
|
|
3868
3872
|
});
|
|
3869
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
3873
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new xe(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new xe(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new xe(s))));
|
|
3870
3874
|
}
|
|
3871
3875
|
}
|
|
3872
3876
|
class Pe extends Kr {
|
|
@@ -3978,99 +3982,103 @@ class Qt {
|
|
|
3978
3982
|
*/
|
|
3979
3983
|
constructor(r) {
|
|
3980
3984
|
/**
|
|
3981
|
-
*
|
|
3985
|
+
* @inheritDoc
|
|
3982
3986
|
*/
|
|
3983
3987
|
t(this, "id");
|
|
3984
3988
|
/**
|
|
3985
|
-
*
|
|
3989
|
+
* @inheritDoc
|
|
3986
3990
|
*/
|
|
3987
3991
|
t(this, "name");
|
|
3988
3992
|
/**
|
|
3989
|
-
*
|
|
3993
|
+
* @inheritDoc
|
|
3990
3994
|
*/
|
|
3991
3995
|
t(this, "alternativeName");
|
|
3992
3996
|
/**
|
|
3993
|
-
*
|
|
3997
|
+
* @inheritDoc
|
|
3994
3998
|
*/
|
|
3995
3999
|
t(this, "searchTerm");
|
|
3996
4000
|
/**
|
|
3997
|
-
*
|
|
4001
|
+
* @inheritDoc
|
|
3998
4002
|
*/
|
|
3999
4003
|
t(this, "cities");
|
|
4000
4004
|
/**
|
|
4001
|
-
*
|
|
4005
|
+
* @inheritDoc
|
|
4002
4006
|
*/
|
|
4003
4007
|
t(this, "region");
|
|
4004
4008
|
/**
|
|
4005
|
-
*
|
|
4009
|
+
* @inheritDoc
|
|
4006
4010
|
*/
|
|
4007
4011
|
t(this, "country");
|
|
4008
4012
|
/**
|
|
4009
|
-
*
|
|
4013
|
+
* @inheritDoc
|
|
4010
4014
|
*/
|
|
4011
4015
|
t(this, "phone");
|
|
4012
4016
|
/**
|
|
4013
|
-
*
|
|
4017
|
+
* @inheritDoc
|
|
4014
4018
|
*/
|
|
4015
4019
|
t(this, "email");
|
|
4016
4020
|
/**
|
|
4017
|
-
*
|
|
4021
|
+
* @inheritDoc
|
|
4018
4022
|
*/
|
|
4019
4023
|
t(this, "isActive");
|
|
4020
4024
|
/**
|
|
4021
|
-
*
|
|
4025
|
+
* @inheritDoc
|
|
4022
4026
|
*/
|
|
4023
4027
|
t(this, "createdAt", new k());
|
|
4024
4028
|
/**
|
|
4025
|
-
*
|
|
4029
|
+
* @inheritDoc
|
|
4026
4030
|
*/
|
|
4027
4031
|
t(this, "lastLoginDate", new k());
|
|
4028
4032
|
/**
|
|
4029
|
-
*
|
|
4033
|
+
* @inheritDoc
|
|
4030
4034
|
*/
|
|
4031
4035
|
t(this, "lastLoginDateHasOrder");
|
|
4032
4036
|
/**
|
|
4033
|
-
*
|
|
4037
|
+
* @inheritDoc
|
|
4034
4038
|
*/
|
|
4035
4039
|
t(this, "managers");
|
|
4036
4040
|
/**
|
|
4037
|
-
*
|
|
4041
|
+
* @inheritDoc
|
|
4038
4042
|
*/
|
|
4039
4043
|
t(this, "isManagerRequired");
|
|
4040
4044
|
/**
|
|
4041
|
-
*
|
|
4045
|
+
* @inheritDoc
|
|
4042
4046
|
*/
|
|
4043
4047
|
t(this, "salesDirections");
|
|
4044
4048
|
/**
|
|
4045
|
-
*
|
|
4049
|
+
* @inheritDoc
|
|
4046
4050
|
*/
|
|
4047
4051
|
t(this, "contragentInn");
|
|
4048
4052
|
/**
|
|
4049
|
-
*
|
|
4053
|
+
* @inheritDoc
|
|
4050
4054
|
*/
|
|
4051
4055
|
t(this, "contragentType");
|
|
4052
4056
|
/**
|
|
4053
|
-
*
|
|
4057
|
+
* @inheritDoc
|
|
4054
4058
|
*/
|
|
4055
4059
|
t(this, "preferredDeliveryType");
|
|
4056
4060
|
/**
|
|
4057
|
-
*
|
|
4061
|
+
* @inheritDoc
|
|
4058
4062
|
*/
|
|
4059
4063
|
t(this, "partnerGroups");
|
|
4060
4064
|
/**
|
|
4061
|
-
*
|
|
4065
|
+
* @inheritDoc
|
|
4062
4066
|
*/
|
|
4063
4067
|
t(this, "contact");
|
|
4064
4068
|
/**
|
|
4065
|
-
*
|
|
4069
|
+
* @inheritDoc
|
|
4066
4070
|
*/
|
|
4067
4071
|
t(this, "lastOrder");
|
|
4072
|
+
/**
|
|
4073
|
+
* @inheritDoc
|
|
4074
|
+
*/
|
|
4075
|
+
t(this, "isExcludedFromMsCallsToClients");
|
|
4068
4076
|
var e, s, i, o, c, u;
|
|
4069
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new Be(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new Te(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new
|
|
4077
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new Be(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new Te(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new x(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4070
4078
|
createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4071
4079
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4072
4080
|
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
4073
|
-
};
|
|
4081
|
+
}, this.isExcludedFromMsCallsToClients = r == null ? void 0 : r.isExcludedFromMsCallsToClients;
|
|
4074
4082
|
}
|
|
4075
4083
|
/**
|
|
4076
4084
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -4079,15 +4087,6 @@ class Qt {
|
|
|
4079
4087
|
*/
|
|
4080
4088
|
resetFilterValue(r) {
|
|
4081
4089
|
switch (r) {
|
|
4082
|
-
case "id":
|
|
4083
|
-
case "phone":
|
|
4084
|
-
case "email":
|
|
4085
|
-
case "name":
|
|
4086
|
-
case "alternativeName":
|
|
4087
|
-
case "searchTerm":
|
|
4088
|
-
case "contragentInn":
|
|
4089
|
-
this[r] = void 0;
|
|
4090
|
-
break;
|
|
4091
4090
|
case "cities":
|
|
4092
4091
|
this.cities = [];
|
|
4093
4092
|
break;
|
|
@@ -4103,9 +4102,6 @@ class Qt {
|
|
|
4103
4102
|
case "lastLoginDate":
|
|
4104
4103
|
this.lastLoginDate.from = null, this.lastLoginDate.to = null;
|
|
4105
4104
|
break;
|
|
4106
|
-
case "lastLoginDateHasOrder":
|
|
4107
|
-
this.lastLoginDateHasOrder = void 0;
|
|
4108
|
-
break;
|
|
4109
4105
|
case "lastOrder":
|
|
4110
4106
|
this.lastOrder = {};
|
|
4111
4107
|
break;
|
|
@@ -4127,6 +4123,9 @@ class Qt {
|
|
|
4127
4123
|
case "contact":
|
|
4128
4124
|
this.contact = new Ne();
|
|
4129
4125
|
break;
|
|
4126
|
+
default:
|
|
4127
|
+
this[r] = void 0;
|
|
4128
|
+
break;
|
|
4130
4129
|
}
|
|
4131
4130
|
return this;
|
|
4132
4131
|
}
|
|
@@ -4167,7 +4166,7 @@ class Pr extends j {
|
|
|
4167
4166
|
this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new U(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4168
4167
|
}
|
|
4169
4168
|
}
|
|
4170
|
-
class yt extends
|
|
4169
|
+
class yt extends b {
|
|
4171
4170
|
/**
|
|
4172
4171
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4173
4172
|
*
|
|
@@ -4200,7 +4199,7 @@ class yt extends a {
|
|
|
4200
4199
|
* Список менеджеров.
|
|
4201
4200
|
*/
|
|
4202
4201
|
t(this, "managers");
|
|
4203
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new
|
|
4202
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new x(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
|
|
4204
4203
|
}
|
|
4205
4204
|
}
|
|
4206
4205
|
class wt {
|
|
@@ -4270,7 +4269,7 @@ class Xt {
|
|
|
4270
4269
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4271
4270
|
}
|
|
4272
4271
|
}
|
|
4273
|
-
class
|
|
4272
|
+
class L extends $e {
|
|
4274
4273
|
/**
|
|
4275
4274
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4276
4275
|
*
|
|
@@ -4300,11 +4299,11 @@ class x extends $e {
|
|
|
4300
4299
|
* @param contragent Данные о контрагенте клиента.
|
|
4301
4300
|
*/
|
|
4302
4301
|
static transformContragentClientDataToRequest(r) {
|
|
4303
|
-
var c, u, p, v, m,
|
|
4302
|
+
var c, u, p, v, m, S, _, O;
|
|
4304
4303
|
let e;
|
|
4305
4304
|
const s = r, i = r, o = r;
|
|
4306
4305
|
switch (r.opf.slug) {
|
|
4307
|
-
case
|
|
4306
|
+
case d.Ic:
|
|
4308
4307
|
e = {
|
|
4309
4308
|
opf: s.opf.slug,
|
|
4310
4309
|
name: s.name,
|
|
@@ -4322,7 +4321,7 @@ class x extends $e {
|
|
|
4322
4321
|
actual_address: s.actualAddress
|
|
4323
4322
|
};
|
|
4324
4323
|
break;
|
|
4325
|
-
case
|
|
4324
|
+
case d.UlR:
|
|
4326
4325
|
e = {
|
|
4327
4326
|
opf: i.opf.slug,
|
|
4328
4327
|
name: i.name,
|
|
@@ -4341,13 +4340,13 @@ class x extends $e {
|
|
|
4341
4340
|
actual_address: i.actualAddress
|
|
4342
4341
|
};
|
|
4343
4342
|
break;
|
|
4344
|
-
case
|
|
4343
|
+
case d.UlNr:
|
|
4345
4344
|
e = {
|
|
4346
4345
|
opf: o.opf.slug,
|
|
4347
4346
|
name: o.name,
|
|
4348
4347
|
alternative_name: o.alternativeName,
|
|
4349
4348
|
partner_group_id: (m = o.partnerGroup) == null ? void 0 : m.id,
|
|
4350
|
-
manager_id: (
|
|
4349
|
+
manager_id: (S = o.manager) == null ? void 0 : S.id,
|
|
4351
4350
|
comment: o.comment,
|
|
4352
4351
|
director_name: o.directorName,
|
|
4353
4352
|
director_position: o.directorPosition,
|
|
@@ -4366,7 +4365,7 @@ class x extends $e {
|
|
|
4366
4365
|
name: r.name,
|
|
4367
4366
|
alternative_name: r.alternativeName,
|
|
4368
4367
|
partner_group_id: (_ = r.partnerGroup) == null ? void 0 : _.id,
|
|
4369
|
-
manager_id: (
|
|
4368
|
+
manager_id: (O = r.manager) == null ? void 0 : O.id,
|
|
4370
4369
|
comment: r.comment
|
|
4371
4370
|
};
|
|
4372
4371
|
break;
|
|
@@ -4443,7 +4442,7 @@ class x extends $e {
|
|
|
4443
4442
|
return this.getClientsList({
|
|
4444
4443
|
groupOp: "and",
|
|
4445
4444
|
groups: [],
|
|
4446
|
-
filters: [{ field: "phone", op:
|
|
4445
|
+
filters: [{ field: "phone", op: Ee.Contains, value: r }]
|
|
4447
4446
|
});
|
|
4448
4447
|
}
|
|
4449
4448
|
/**
|
|
@@ -4480,7 +4479,7 @@ class x extends $e {
|
|
|
4480
4479
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4481
4480
|
*/
|
|
4482
4481
|
createClientCommonData(r, e = {}) {
|
|
4483
|
-
return this.post("/internal/clients",
|
|
4482
|
+
return this.post("/internal/clients", L.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
|
|
4484
4483
|
}
|
|
4485
4484
|
/**
|
|
4486
4485
|
* Обновляет данные указанного клиента.
|
|
@@ -4490,7 +4489,7 @@ class x extends $e {
|
|
|
4490
4489
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4491
4490
|
*/
|
|
4492
4491
|
updateClientCommonData(r, e = {}) {
|
|
4493
|
-
return this.patch(`/internal/clients/${r.id}`,
|
|
4492
|
+
return this.patch(`/internal/clients/${r.id}`, L.transformClientDataToRequest(r), void 0, e);
|
|
4494
4493
|
}
|
|
4495
4494
|
/**
|
|
4496
4495
|
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
@@ -4579,7 +4578,7 @@ class x extends $e {
|
|
|
4579
4578
|
createContragentClientData(r, e, s = {}) {
|
|
4580
4579
|
return this.post(
|
|
4581
4580
|
`/internal/clients/${r}/contragents`,
|
|
4582
|
-
|
|
4581
|
+
L.transformContragentClientDataToRequest(e),
|
|
4583
4582
|
(i) => ve.createInstance(i.data),
|
|
4584
4583
|
s
|
|
4585
4584
|
);
|
|
@@ -4595,7 +4594,7 @@ class x extends $e {
|
|
|
4595
4594
|
updateContragentClientData(r, e, s = {}) {
|
|
4596
4595
|
return this.patch(
|
|
4597
4596
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4598
|
-
|
|
4597
|
+
L.transformContragentClientDataToRequest(e),
|
|
4599
4598
|
(i) => ve.createInstance(i.data),
|
|
4600
4599
|
s
|
|
4601
4600
|
);
|
|
@@ -4621,7 +4620,7 @@ class x extends $e {
|
|
|
4621
4620
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4622
4621
|
return this.post(
|
|
4623
4622
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4624
|
-
|
|
4623
|
+
L.transformClientDeliveryAddressToRequest(e),
|
|
4625
4624
|
(i) => new Pe(i.data),
|
|
4626
4625
|
s
|
|
4627
4626
|
);
|
|
@@ -4637,7 +4636,7 @@ class x extends $e {
|
|
|
4637
4636
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4638
4637
|
return this.patch(
|
|
4639
4638
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4640
|
-
|
|
4639
|
+
L.transformClientDeliveryAddressToRequest(e),
|
|
4641
4640
|
(i) => new Pe(i.data),
|
|
4642
4641
|
s
|
|
4643
4642
|
);
|
|
@@ -4664,8 +4663,8 @@ class x extends $e {
|
|
|
4664
4663
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4665
4664
|
return this.post(
|
|
4666
4665
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4667
|
-
|
|
4668
|
-
(o) => new
|
|
4666
|
+
L.transformClientContragentBankAccountToRequest(s),
|
|
4667
|
+
(o) => new de(o.data),
|
|
4669
4668
|
i
|
|
4670
4669
|
);
|
|
4671
4670
|
}
|
|
@@ -4681,8 +4680,8 @@ class x extends $e {
|
|
|
4681
4680
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4682
4681
|
return this.patch(
|
|
4683
4682
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4684
|
-
|
|
4685
|
-
(o) => new
|
|
4683
|
+
L.transformClientContragentBankAccountToRequest(s),
|
|
4684
|
+
(o) => new de(o.data),
|
|
4686
4685
|
i
|
|
4687
4686
|
);
|
|
4688
4687
|
}
|
|
@@ -5057,9 +5056,9 @@ class rs {
|
|
|
5057
5056
|
return {
|
|
5058
5057
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5059
5058
|
nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
|
|
5060
|
-
today: { label: "Сегодня", from:
|
|
5061
|
-
yesterday: { label: "Вчера", from: Nr(), to:
|
|
5062
|
-
tomorrow: { label: "Завтра", from:
|
|
5059
|
+
today: { label: "Сегодня", from: Oe(), to: Ur() },
|
|
5060
|
+
yesterday: { label: "Вчера", from: Nr(), to: dr() },
|
|
5061
|
+
tomorrow: { label: "Завтра", from: qr(), to: Or() }
|
|
5063
5062
|
};
|
|
5064
5063
|
}
|
|
5065
5064
|
}
|
|
@@ -5190,7 +5189,7 @@ class Rr extends Pr {
|
|
|
5190
5189
|
date: w((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5191
5190
|
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
|
|
5192
5191
|
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new Ae(e.delivery.warehouse) : void 0
|
|
5193
|
-
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5192
|
+
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = w(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = w(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5194
5193
|
}
|
|
5195
5194
|
}
|
|
5196
5195
|
class vt extends j {
|
|
@@ -5353,7 +5352,7 @@ class ss extends $e {
|
|
|
5353
5352
|
return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
|
|
5354
5353
|
}
|
|
5355
5354
|
}
|
|
5356
|
-
class
|
|
5355
|
+
class Le {
|
|
5357
5356
|
/**
|
|
5358
5357
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5359
5358
|
*
|
|
@@ -5417,7 +5416,7 @@ class is extends h {
|
|
|
5417
5416
|
...Ze(e),
|
|
5418
5417
|
filters: ke(s)
|
|
5419
5418
|
},
|
|
5420
|
-
(i) => i.data.map((o) => new
|
|
5419
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5421
5420
|
);
|
|
5422
5421
|
}
|
|
5423
5422
|
/**
|
|
@@ -5436,7 +5435,7 @@ class is extends h {
|
|
|
5436
5435
|
...Ze(e),
|
|
5437
5436
|
filters: ke(s)
|
|
5438
5437
|
},
|
|
5439
|
-
(i) => i.data.map((o) => new
|
|
5438
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5440
5439
|
);
|
|
5441
5440
|
}
|
|
5442
5441
|
/**
|
|
@@ -5457,7 +5456,7 @@ class is extends h {
|
|
|
5457
5456
|
...e,
|
|
5458
5457
|
filters: ke(s)
|
|
5459
5458
|
},
|
|
5460
|
-
(i) => i.data.map((o) => new
|
|
5459
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5461
5460
|
);
|
|
5462
5461
|
}
|
|
5463
5462
|
}
|
|
@@ -5539,8 +5538,8 @@ class ns extends h {
|
|
|
5539
5538
|
const e = $.getConfig().dateFormats.api, s = ir(
|
|
5540
5539
|
ye(r, {
|
|
5541
5540
|
costDate: {
|
|
5542
|
-
from: _e((o = r.costDate) == null ? void 0 : o.from) ?
|
|
5543
|
-
to: _e((u = r.costDate) == null ? void 0 : u.to) ?
|
|
5541
|
+
from: _e((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
5542
|
+
to: _e((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5544
5543
|
}
|
|
5545
5544
|
}),
|
|
5546
5545
|
(m) => A(m) || (Q(m) || nr(m)) && Y(m)
|
|
@@ -5685,7 +5684,7 @@ class T extends pe {
|
|
|
5685
5684
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5686
5685
|
*/
|
|
5687
5686
|
getSalesDirections() {
|
|
5688
|
-
return this.getTypedDataArrayRequester(
|
|
5687
|
+
return this.getTypedDataArrayRequester(x, "/public/references/sales-direction", !0);
|
|
5689
5688
|
}
|
|
5690
5689
|
/**
|
|
5691
5690
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -5749,7 +5748,7 @@ class T extends pe {
|
|
|
5749
5748
|
}
|
|
5750
5749
|
}
|
|
5751
5750
|
const D = te("__references_private", () => {
|
|
5752
|
-
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), u = f(void 0), p = f(void 0), v = f(void 0), m = f(void 0),
|
|
5751
|
+
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), u = f(void 0), p = f(void 0), v = f(void 0), m = f(void 0), S = f(void 0), _ = f(void 0), O = f(void 0), G = f(void 0), B = f(void 0), be = f(void 0), l = f(void 0);
|
|
5753
5752
|
return {
|
|
5754
5753
|
/**
|
|
5755
5754
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5798,7 +5797,7 @@ const D = te("__references_private", () => {
|
|
|
5798
5797
|
/**
|
|
5799
5798
|
* Справочник типов файлов продукктов/категорий.
|
|
5800
5799
|
*/
|
|
5801
|
-
productFileTypeReference:
|
|
5800
|
+
productFileTypeReference: S,
|
|
5802
5801
|
/**
|
|
5803
5802
|
* Справочник типов ресурсов.
|
|
5804
5803
|
*/
|
|
@@ -5806,7 +5805,7 @@ const D = te("__references_private", () => {
|
|
|
5806
5805
|
/**
|
|
5807
5806
|
* Справочник направлений продаж.
|
|
5808
5807
|
*/
|
|
5809
|
-
salesDirectionsReference:
|
|
5808
|
+
salesDirectionsReference: O,
|
|
5810
5809
|
/**
|
|
5811
5810
|
* Справочник источников первичного интереса.
|
|
5812
5811
|
*/
|
|
@@ -5818,7 +5817,7 @@ const D = te("__references_private", () => {
|
|
|
5818
5817
|
/**
|
|
5819
5818
|
* Справочник типов свойств.
|
|
5820
5819
|
*/
|
|
5821
|
-
propertyTypesReference:
|
|
5820
|
+
propertyTypesReference: be,
|
|
5822
5821
|
/**
|
|
5823
5822
|
* Справочник коэффициентов цен.
|
|
5824
5823
|
*/
|
|
@@ -5880,7 +5879,7 @@ const D = te("__references_private", () => {
|
|
|
5880
5879
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
5881
5880
|
l.salesDirectionsReference = g;
|
|
5882
5881
|
}).catch(y)), l.salesDirectionsReference;
|
|
5883
|
-
}),
|
|
5882
|
+
}), S = R(() => {
|
|
5884
5883
|
const l = D();
|
|
5885
5884
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
5886
5885
|
l.sourcePrimaryInterestReference = g;
|
|
@@ -5890,7 +5889,7 @@ const D = te("__references_private", () => {
|
|
|
5890
5889
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
5891
5890
|
l.deliveryTypeReference = g;
|
|
5892
5891
|
}).catch(y)), l.deliveryTypeReference;
|
|
5893
|
-
}),
|
|
5892
|
+
}), O = R(() => {
|
|
5894
5893
|
const l = D();
|
|
5895
5894
|
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
|
|
5896
5895
|
l.managersList = g;
|
|
@@ -5905,7 +5904,7 @@ const D = te("__references_private", () => {
|
|
|
5905
5904
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
5906
5905
|
l.propertyTypesReference = g;
|
|
5907
5906
|
}).catch(y)), l.propertyTypesReference;
|
|
5908
|
-
}),
|
|
5907
|
+
}), be = R(() => {
|
|
5909
5908
|
const l = D();
|
|
5910
5909
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
5911
5910
|
l.priceCoefficientsReference = g;
|
|
@@ -5959,7 +5958,7 @@ const D = te("__references_private", () => {
|
|
|
5959
5958
|
/**
|
|
5960
5959
|
* Справочник каналов первичного интереса.
|
|
5961
5960
|
*/
|
|
5962
|
-
sourcePrimaryInterestsReference:
|
|
5961
|
+
sourcePrimaryInterestsReference: S,
|
|
5963
5962
|
/**
|
|
5964
5963
|
* Справочник типов доставки.
|
|
5965
5964
|
*/
|
|
@@ -5967,7 +5966,7 @@ const D = te("__references_private", () => {
|
|
|
5967
5966
|
/**
|
|
5968
5967
|
* Список менеджеров.
|
|
5969
5968
|
*/
|
|
5970
|
-
managersList:
|
|
5969
|
+
managersList: O,
|
|
5971
5970
|
/**
|
|
5972
5971
|
* Справочник складов.
|
|
5973
5972
|
*/
|
|
@@ -5979,7 +5978,7 @@ const D = te("__references_private", () => {
|
|
|
5979
5978
|
/**
|
|
5980
5979
|
* Справочник коэффициентов цен.
|
|
5981
5980
|
*/
|
|
5982
|
-
priceCoefficientsReference:
|
|
5981
|
+
priceCoefficientsReference: be
|
|
5983
5982
|
};
|
|
5984
5983
|
});
|
|
5985
5984
|
class At {
|
|
@@ -6157,7 +6156,7 @@ class ps extends h {
|
|
|
6157
6156
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6158
6157
|
}
|
|
6159
6158
|
}
|
|
6160
|
-
class
|
|
6159
|
+
class bt extends h {
|
|
6161
6160
|
/**
|
|
6162
6161
|
* Возвращает данные о текущем пользователе.
|
|
6163
6162
|
*/
|
|
@@ -6166,7 +6165,7 @@ class at extends h {
|
|
|
6166
6165
|
return this.get("/internal/users/info", {}, (r) => new $t(r.data));
|
|
6167
6166
|
}
|
|
6168
6167
|
}
|
|
6169
|
-
const
|
|
6168
|
+
const St = te("__user_state_private", () => {
|
|
6170
6169
|
const n = f({}), r = f(void 0);
|
|
6171
6170
|
return {
|
|
6172
6171
|
/**
|
|
@@ -6183,8 +6182,8 @@ const bt = te("__user_state_private", () => {
|
|
|
6183
6182
|
* Данные о текущем пользователе.
|
|
6184
6183
|
*/
|
|
6185
6184
|
currentUser: R(() => {
|
|
6186
|
-
const r =
|
|
6187
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6185
|
+
const r = St();
|
|
6186
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(bt).getCurrentUser().then((e) => {
|
|
6188
6187
|
r.currentUser = e;
|
|
6189
6188
|
}).catch(y).finally(() => {
|
|
6190
6189
|
r.dataLoaderList.currentUser = !1;
|
|
@@ -6218,7 +6217,7 @@ export {
|
|
|
6218
6217
|
ot as AnyReference,
|
|
6219
6218
|
Ft as AppBaseConfig,
|
|
6220
6219
|
$ as AppConfigProvider,
|
|
6221
|
-
|
|
6220
|
+
de as BankAccount,
|
|
6222
6221
|
$e as BasePaginationProvider,
|
|
6223
6222
|
Jr as CalculationTypeEnum,
|
|
6224
6223
|
me as Cart,
|
|
@@ -6235,11 +6234,11 @@ export {
|
|
|
6235
6234
|
Ye as Client,
|
|
6236
6235
|
yt as ClientAdditionalData,
|
|
6237
6236
|
we as ClientCategory,
|
|
6238
|
-
|
|
6237
|
+
L as ClientDataProvider,
|
|
6239
6238
|
jt as ClientPriceProvider,
|
|
6240
6239
|
Gt as ClientPriceTemplateProvider,
|
|
6241
6240
|
Z as ClientProduct,
|
|
6242
|
-
|
|
6241
|
+
Ht as ClientProductCategoryDataProvider,
|
|
6243
6242
|
zt as ClientProductDataProvider,
|
|
6244
6243
|
ge as ClientShortInfo,
|
|
6245
6244
|
nt as ClientsAdditionalDataRequestTypeEnum,
|
|
@@ -6251,7 +6250,7 @@ export {
|
|
|
6251
6250
|
M as ContactPerson,
|
|
6252
6251
|
ft as ContactPersonRelated,
|
|
6253
6252
|
ct as ContactPosition,
|
|
6254
|
-
|
|
6253
|
+
xe as ContactRelation,
|
|
6255
6254
|
wr as ContragentBase,
|
|
6256
6255
|
ve as ContragentFactory,
|
|
6257
6256
|
Cr as ContragentIc,
|
|
@@ -6269,29 +6268,29 @@ export {
|
|
|
6269
6268
|
Kr as DeletableNamedIdentity,
|
|
6270
6269
|
Pe as DeliveryAddress,
|
|
6271
6270
|
X as DeliveryType,
|
|
6272
|
-
|
|
6271
|
+
dt as DetailedJwtPayload,
|
|
6273
6272
|
et as DeviceTypeResolutionConfig,
|
|
6274
6273
|
Qr as DiscountShortInfo,
|
|
6275
6274
|
gs as FieldValidationResultData,
|
|
6276
6275
|
ue as FilterGroup,
|
|
6277
6276
|
Ve as FilterItem,
|
|
6278
|
-
|
|
6277
|
+
Ee as FilterOpEnum,
|
|
6279
6278
|
lr as GeoCoordinates,
|
|
6280
|
-
|
|
6279
|
+
Er as HiddenCatalogableItem,
|
|
6281
6280
|
pe as HttpCachedRequester,
|
|
6282
6281
|
rt as HttpParamsConfig,
|
|
6283
6282
|
h as HttpRequester,
|
|
6284
6283
|
j as Identity,
|
|
6285
|
-
|
|
6284
|
+
Hr as Image,
|
|
6286
6285
|
N as JwtPayload,
|
|
6287
6286
|
Te as Manager,
|
|
6288
6287
|
ce as ManagerCommon,
|
|
6289
6288
|
ts as ManagerDataFactory,
|
|
6290
6289
|
Ct as ManagerDataProvider,
|
|
6291
6290
|
At as MetaTagItem,
|
|
6292
|
-
|
|
6291
|
+
b as NamedIdentity,
|
|
6293
6292
|
F as Opf,
|
|
6294
|
-
|
|
6293
|
+
d as OpfEnum,
|
|
6295
6294
|
Pt as Order,
|
|
6296
6295
|
Rr as OrderInfo,
|
|
6297
6296
|
lt as OrderPaymentStatus,
|
|
@@ -6302,24 +6301,24 @@ export {
|
|
|
6302
6301
|
re as PartnerGroup,
|
|
6303
6302
|
pt as PaymentType,
|
|
6304
6303
|
fe as PreferencesStorageProvider,
|
|
6305
|
-
|
|
6304
|
+
Le as PriceAnalyze,
|
|
6306
6305
|
is as PriceAnalyzeProvider,
|
|
6307
6306
|
De as PriceCoefficient,
|
|
6308
6307
|
cr as PriceCoefficientEnum,
|
|
6309
6308
|
ns as PriceHistoryDataProvider,
|
|
6310
6309
|
Rt as PriceHistoryItem,
|
|
6311
6310
|
W as PriceTemplate,
|
|
6312
|
-
|
|
6311
|
+
ae as PriceTemplateCategory,
|
|
6313
6312
|
se as PriceTemplateClient,
|
|
6314
6313
|
pr as PriceTemplateICatalogableItem,
|
|
6315
6314
|
Ie as PriceTemplateProduct,
|
|
6316
6315
|
Wt as PriceTemplateProvider,
|
|
6317
6316
|
ne as PricingRole,
|
|
6318
6317
|
Jt as PricingRoleProvider,
|
|
6319
|
-
|
|
6318
|
+
qe as PrimaryCatalogableItem,
|
|
6320
6319
|
I as Product,
|
|
6321
6320
|
Bt as ProductCategoryDataProvider,
|
|
6322
|
-
|
|
6321
|
+
Et as ProductDataProvider,
|
|
6323
6322
|
ht as ProductFileType,
|
|
6324
6323
|
Me as ProductPriceCoefficient,
|
|
6325
6324
|
Dt as ProductPriceHistory,
|
|
@@ -6327,14 +6326,14 @@ export {
|
|
|
6327
6326
|
ie as Property,
|
|
6328
6327
|
gr as PropertyType,
|
|
6329
6328
|
Vr as PropertyTypeEnum,
|
|
6330
|
-
|
|
6329
|
+
H as PropertyValue,
|
|
6331
6330
|
os as RecommendationsDataProvider,
|
|
6332
6331
|
er as RecommendationsList,
|
|
6333
6332
|
P as Reference,
|
|
6334
6333
|
T as ReferenceDataProvider,
|
|
6335
6334
|
le as Region,
|
|
6336
6335
|
fr as ResourceType,
|
|
6337
|
-
|
|
6336
|
+
x as SalesDirection,
|
|
6338
6337
|
tt as SentryConfig,
|
|
6339
6338
|
rr as Seo,
|
|
6340
6339
|
ls as SeoDataProvider,
|
|
@@ -6348,7 +6347,7 @@ export {
|
|
|
6348
6347
|
$t as User,
|
|
6349
6348
|
ps as UserAuthDataProvider,
|
|
6350
6349
|
hr as UserCommonInfo,
|
|
6351
|
-
|
|
6350
|
+
bt as UserDataProvider,
|
|
6352
6351
|
Xr as UserPricingRole,
|
|
6353
6352
|
U as UserShortInfo,
|
|
6354
6353
|
Tt as UserTypeEnum,
|
|
@@ -6357,7 +6356,7 @@ export {
|
|
|
6357
6356
|
it as WebSocketConfig,
|
|
6358
6357
|
Ke as findCatalogItemByIdRecursive,
|
|
6359
6358
|
Qe as flattenCatalogItems,
|
|
6360
|
-
|
|
6359
|
+
Se as useAuthStateStore,
|
|
6361
6360
|
cs as useReferencesStore,
|
|
6362
6361
|
hs as useUserStateStore
|
|
6363
6362
|
};
|