@snabcentr/common-lib 1.72.2 → 2.0.2
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 +5 -18
- package/dist/sc-common-lib.js +347 -329
- 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/config/classes/http-params-config.d.ts +8 -0
- package/dist/src/config/classes/http-params-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-http-params-config.d.ts +8 -0
- package/dist/src/config/interfaces/i-http-params-config.d.ts.map +1 -1
- package/dist/src/price-history/providers/price-history-data-provider.d.ts +4 -0
- package/dist/src/price-history/providers/price-history-data-provider.d.ts.map +1 -1
- package/dist/src/recommendations/providers/recommendations-data-provider.d.ts +4 -0
- package/dist/src/recommendations/providers/recommendations-data-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -2,11 +2,11 @@ var Pr = Object.defineProperty;
|
|
|
2
2
|
var Rr = (n, r, e) => r in n ? Pr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => Rr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
4
|
import { jwtDecode as rr } from "jwt-decode";
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { isAfter as ze, parseISO as
|
|
5
|
+
import { merge as Oe, isUndefined as Ar, isNil as A, isEmpty as Y, noop as y, mapValues as tr, isArray as Q, every as Dr, split as $r, toUpper as Tr, constant as br, isString as w, cloneDeep as Sr, toLower as _r, isFunction as Ue, map as he, forEach as dr, isDate as Ie, omitBy as sr, isObject as ir } from "lodash-es";
|
|
6
|
+
import { objectToCamel as qe, objectToSnake as Be } from "ts-case-convert";
|
|
7
|
+
import { isAfter as ze, parseISO as a, startOfToday as ke, format as U, addSeconds as Ir, addBusinessDays as kr, endOfTomorrow as Lr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as Ur, endOfDay as qr, startOfDay as Gr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
9
|
-
import { ref as
|
|
9
|
+
import { ref as f, markRaw as Fr, computed as P } from "vue";
|
|
10
10
|
import jr from "axios";
|
|
11
11
|
class G {
|
|
12
12
|
/**
|
|
@@ -99,7 +99,7 @@ class G {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
Oe(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,7 +107,7 @@ class G {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e = rr(r), s = new G(
|
|
110
|
+
const e = rr(r), s = new G(qe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
@@ -143,7 +143,7 @@ class Nt extends G {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
Oe(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,7 +151,7 @@ class Nt extends G {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new G(
|
|
154
|
+
return new G(qe(rr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
157
|
const J = class J {
|
|
@@ -168,7 +168,7 @@ const J = class J {
|
|
|
168
168
|
*/
|
|
169
169
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
170
170
|
static getConfig() {
|
|
171
|
-
if (
|
|
171
|
+
if (Ar(J.config))
|
|
172
172
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
173
173
|
return J.config;
|
|
174
174
|
}
|
|
@@ -190,8 +190,8 @@ const J = class J {
|
|
|
190
190
|
* Конфигурация приложения.
|
|
191
191
|
*/
|
|
192
192
|
t(J, "config");
|
|
193
|
-
let
|
|
194
|
-
class
|
|
193
|
+
let D = J;
|
|
194
|
+
class ye {
|
|
195
195
|
/**
|
|
196
196
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
197
197
|
*
|
|
@@ -210,8 +210,8 @@ class fe {
|
|
|
210
210
|
if (e)
|
|
211
211
|
try {
|
|
212
212
|
const s = JSON.parse(e);
|
|
213
|
-
if (!s.availableFor || ze(
|
|
214
|
-
if (
|
|
213
|
+
if (!s.availableFor || ze(a(s.availableFor) || ke(), /* @__PURE__ */ new Date())) {
|
|
214
|
+
if (A(s.data) || Y(s.data))
|
|
215
215
|
throw new Error("Data is empty");
|
|
216
216
|
return s.data;
|
|
217
217
|
}
|
|
@@ -233,7 +233,7 @@ class fe {
|
|
|
233
233
|
static saveActualDataToStorage(r, e, s) {
|
|
234
234
|
if (this.isLocalStorageAvailable())
|
|
235
235
|
try {
|
|
236
|
-
if (
|
|
236
|
+
if (A(e) || Y(e))
|
|
237
237
|
throw new Error("Data is empty");
|
|
238
238
|
const i = JSON.stringify({
|
|
239
239
|
availableFor: s,
|
|
@@ -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(
|
|
287
|
+
o.availableFor && !ze(a(o.availableFor) || ke(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
288
288
|
}
|
|
289
289
|
} catch {
|
|
290
290
|
r.push(s);
|
|
@@ -309,24 +309,24 @@ function Ee(n) {
|
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
const B = te("__auth_state_private", () => {
|
|
312
|
-
const n =
|
|
312
|
+
const n = f(
|
|
313
313
|
(() => {
|
|
314
|
-
var
|
|
315
|
-
const o =
|
|
314
|
+
var p;
|
|
315
|
+
const o = ye.getActualDataFromStorage(
|
|
316
316
|
"sc.token"
|
|
317
317
|
/* JwtToken */
|
|
318
318
|
);
|
|
319
319
|
if (o)
|
|
320
320
|
return Promise.resolve(o);
|
|
321
|
-
const c = (
|
|
321
|
+
const c = (p = D.getConfig().devMode) == null ? void 0 : p.initAuthBearerToken;
|
|
322
322
|
return c ? Promise.resolve(c) : void 0;
|
|
323
323
|
})()
|
|
324
|
-
), r =
|
|
324
|
+
), r = f(void 0), e = f(void 0), s = Fr(/* @__PURE__ */ new Map());
|
|
325
325
|
function i() {
|
|
326
|
-
e.value = void 0,
|
|
326
|
+
e.value = void 0, A(n.value) || n.value.then((o) => {
|
|
327
327
|
const c = G.getJwtPayload(o);
|
|
328
|
-
e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (
|
|
329
|
-
}).catch(
|
|
328
|
+
e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (p) => (p == null ? void 0 : p.roles) ?? []) : void 0;
|
|
329
|
+
}).catch(y);
|
|
330
330
|
}
|
|
331
331
|
return {
|
|
332
332
|
/**
|
|
@@ -350,14 +350,14 @@ const B = te("__auth_state_private", () => {
|
|
|
350
350
|
*/
|
|
351
351
|
recalculateUserPermissions: i
|
|
352
352
|
};
|
|
353
|
-
}),
|
|
353
|
+
}), $e = te("__auth_state", () => {
|
|
354
354
|
const n = P(() => {
|
|
355
355
|
const o = B();
|
|
356
|
-
if (
|
|
356
|
+
if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
|
|
357
357
|
const c = o.jwtTokenUpdater();
|
|
358
|
-
o.jwtToken = c, c.then((
|
|
359
|
-
o.jwtToken = Promise.resolve(
|
|
360
|
-
}).catch(
|
|
358
|
+
o.jwtToken = c, c.then((p) => {
|
|
359
|
+
o.jwtToken = Promise.resolve(p), ye.saveActualDataToStorage("sc.token", p, Ee(p)), o.recalculateUserPermissions();
|
|
360
|
+
}).catch(y);
|
|
361
361
|
}
|
|
362
362
|
return o.jwtToken;
|
|
363
363
|
});
|
|
@@ -366,33 +366,33 @@ const B = te("__auth_state_private", () => {
|
|
|
366
366
|
}
|
|
367
367
|
function e(o) {
|
|
368
368
|
const c = B();
|
|
369
|
-
c.jwtToken = Promise.resolve(o),
|
|
369
|
+
c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
|
|
370
370
|
}
|
|
371
371
|
function s() {
|
|
372
372
|
const o = B();
|
|
373
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
373
|
+
o.jwtToken = void 0, o.userPermissions = void 0, ye.saveActualDataToStorage("sc.token", void 0);
|
|
374
374
|
}
|
|
375
375
|
function i(o) {
|
|
376
376
|
const c = B();
|
|
377
|
-
!
|
|
378
|
-
const
|
|
379
|
-
c.userPermissions =
|
|
380
|
-
}).catch(
|
|
381
|
-
const
|
|
382
|
-
if (c.userPermissionsComputedRefs.has(
|
|
383
|
-
return c.userPermissionsComputedRefs.get(
|
|
384
|
-
const
|
|
385
|
-
const
|
|
377
|
+
!A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((m) => {
|
|
378
|
+
const C = G.getJwtPayload(m);
|
|
379
|
+
c.userPermissions = C.exp * 1e3 > Date.now() ? tr(C.resourceAccess, ($) => ($ == null ? void 0 : $.roles) ?? []) : void 0;
|
|
380
|
+
}).catch(y);
|
|
381
|
+
const p = Q(o) ? o.join(" && ") : o;
|
|
382
|
+
if (c.userPermissionsComputedRefs.has(p))
|
|
383
|
+
return c.userPermissionsComputedRefs.get(p);
|
|
384
|
+
const u = P(() => {
|
|
385
|
+
const m = (C) => {
|
|
386
386
|
var _;
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
387
|
+
const $ = $r(C, ".");
|
|
388
|
+
if ($.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [d, I] =
|
|
390
|
+
const [d, I] = $, S = (_ = B().userPermissions) == null ? void 0 : _[d];
|
|
391
391
|
return Q(S) && S.includes(I);
|
|
392
392
|
};
|
|
393
|
-
return Q(o) ?
|
|
393
|
+
return Q(o) ? Dr(o, (C) => m(C)) : m(o);
|
|
394
394
|
});
|
|
395
|
-
return c.userPermissionsComputedRefs.set(
|
|
395
|
+
return c.userPermissionsComputedRefs.set(p, u), u;
|
|
396
396
|
}
|
|
397
397
|
return {
|
|
398
398
|
/**
|
|
@@ -439,13 +439,13 @@ class H {
|
|
|
439
439
|
* @inheritDoc
|
|
440
440
|
*/
|
|
441
441
|
t(this, "guid");
|
|
442
|
-
this.id = r == null ? void 0 : r.id,
|
|
442
|
+
this.id = r == null ? void 0 : r.id, A(this.id) && (A(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
|
|
443
443
|
}
|
|
444
444
|
/**
|
|
445
445
|
* Возвращает признак, что это новая запись.
|
|
446
446
|
*/
|
|
447
447
|
isNewRec() {
|
|
448
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
448
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : A(this.id);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
class b extends H {
|
|
@@ -497,7 +497,7 @@ class nr extends oe {
|
|
|
497
497
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
class
|
|
500
|
+
class Le extends nr {
|
|
501
501
|
/**
|
|
502
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
503
503
|
*
|
|
@@ -512,7 +512,7 @@ class xe extends nr {
|
|
|
512
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
class
|
|
515
|
+
class ge extends Le {
|
|
516
516
|
/**
|
|
517
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
518
518
|
*
|
|
@@ -559,7 +559,7 @@ class v extends b {
|
|
|
559
559
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
class
|
|
562
|
+
class Pe extends v {
|
|
563
563
|
/**
|
|
564
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
565
565
|
*/
|
|
@@ -594,7 +594,7 @@ class Ge {
|
|
|
594
594
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
595
595
|
*/
|
|
596
596
|
t(this, "readOnly");
|
|
597
|
-
this.coefficient = new
|
|
597
|
+
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;
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
600
|
class cr {
|
|
@@ -617,7 +617,7 @@ class cr {
|
|
|
617
617
|
}
|
|
618
618
|
class X extends v {
|
|
619
619
|
}
|
|
620
|
-
class
|
|
620
|
+
class Re extends v {
|
|
621
621
|
/**
|
|
622
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
623
623
|
*
|
|
@@ -664,7 +664,7 @@ class Mr {
|
|
|
664
664
|
* Количество остатков товара на складе.
|
|
665
665
|
*/
|
|
666
666
|
t(this, "count");
|
|
667
|
-
this.warehouse = new
|
|
667
|
+
this.warehouse = new Re(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
class Hr extends nr {
|
|
@@ -712,7 +712,7 @@ class x extends Hr {
|
|
|
712
712
|
* @param data Данные для первоначальной инициализации.
|
|
713
713
|
*/
|
|
714
714
|
constructor(e) {
|
|
715
|
-
var i, o, c,
|
|
715
|
+
var i, o, c, p;
|
|
716
716
|
super(e);
|
|
717
717
|
/**
|
|
718
718
|
* Артикул производителя/поставщика.
|
|
@@ -790,16 +790,16 @@ class x extends Hr {
|
|
|
790
790
|
* Список коэффициентов цен на продукт.
|
|
791
791
|
*/
|
|
792
792
|
t(this, "priceCoefficients");
|
|
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 =
|
|
794
|
-
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
795
|
-
s && (this.category = new
|
|
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) ? a(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((u) => new Mr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
794
|
+
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
795
|
+
s && (this.category = new Le({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new Le(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Br(u, D.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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new Ge(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
797
797
|
/**
|
|
798
798
|
* Возвращает признак, что это измеряемый товар.
|
|
799
799
|
*/
|
|
800
800
|
getIsMeasurable() {
|
|
801
801
|
var s;
|
|
802
|
-
const e = (s =
|
|
802
|
+
const e = (s = D.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
803
803
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
804
804
|
}
|
|
805
805
|
/**
|
|
@@ -867,7 +867,7 @@ class zr extends H {
|
|
|
867
867
|
* Признак того, что позиция является дополнительной продажей.
|
|
868
868
|
*/
|
|
869
869
|
t(this, "isAdditionalSale");
|
|
870
|
-
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new
|
|
870
|
+
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ge(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Sr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
873
|
class Er extends zr {
|
|
@@ -920,7 +920,7 @@ class Er extends zr {
|
|
|
920
920
|
this.currency = e.currency, this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
|
-
class
|
|
923
|
+
class fe {
|
|
924
924
|
/**
|
|
925
925
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
926
926
|
*
|
|
@@ -973,7 +973,7 @@ const L = class L {
|
|
|
973
973
|
/**
|
|
974
974
|
* Базовый URL путь для выполнения запросов.
|
|
975
975
|
*/
|
|
976
|
-
t(this, "baseUrl", `${
|
|
976
|
+
t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
|
|
977
977
|
/**
|
|
978
978
|
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
979
979
|
*
|
|
@@ -981,7 +981,7 @@ const L = class L {
|
|
|
981
981
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
982
982
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
983
983
|
*/
|
|
984
|
-
t(this, "errorResponseHandler",
|
|
984
|
+
t(this, "errorResponseHandler", y);
|
|
985
985
|
/**
|
|
986
986
|
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
987
987
|
*/
|
|
@@ -1000,7 +1000,7 @@ const L = class L {
|
|
|
1000
1000
|
// eslint-disable-next-line class-methods-use-this
|
|
1001
1001
|
t(this, "authRequestInterceptor", async (r) => {
|
|
1002
1002
|
let e;
|
|
1003
|
-
return
|
|
1003
|
+
return A($e().jwtToken) || (e = await $e().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1004
1004
|
});
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -1017,7 +1017,7 @@ const L = class L {
|
|
|
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) : ($e().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
1021
1021
|
});
|
|
1022
1022
|
/**
|
|
1023
1023
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -1025,11 +1025,11 @@ const L = class L {
|
|
|
1025
1025
|
* @param response Данные ответа на запрос.
|
|
1026
1026
|
*/
|
|
1027
1027
|
// eslint-disable-next-line class-methods-use-this
|
|
1028
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
1029
|
-
const r =
|
|
1028
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = qe(r.data)), r));
|
|
1029
|
+
const r = D.getConfig().version;
|
|
1030
1030
|
this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = jr.create({
|
|
1031
1031
|
headers: {
|
|
1032
|
-
"APP-VERSION": `${r.name} (${r.version}, ${
|
|
1032
|
+
"APP-VERSION": `${r.name} (${r.version}, ${U(r.date, D.getConfig().dateFormats.uiDate)})`,
|
|
1033
1033
|
Accept: "application/json",
|
|
1034
1034
|
"Content-Type": "application/json"
|
|
1035
1035
|
}
|
|
@@ -1067,7 +1067,7 @@ const L = class L {
|
|
|
1067
1067
|
*/
|
|
1068
1068
|
static convertHttpErrorResponse(r) {
|
|
1069
1069
|
var e, s;
|
|
1070
|
-
if (!
|
|
1070
|
+
if (!A(r.request) || !A(r.response)) {
|
|
1071
1071
|
const i = r == null ? void 0 : r.response;
|
|
1072
1072
|
return Promise.reject({
|
|
1073
1073
|
status: (i == null ? void 0 : i.status) ?? 0,
|
|
@@ -1163,7 +1163,7 @@ t(L, "instances", {}), /**
|
|
|
1163
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1164
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1165
1165
|
*/
|
|
1166
|
-
t(L, "defaultErrorsResponseHandler",
|
|
1166
|
+
t(L, "defaultErrorsResponseHandler", y);
|
|
1167
1167
|
let h = L;
|
|
1168
1168
|
class Ot extends h {
|
|
1169
1169
|
/**
|
|
@@ -1174,7 +1174,7 @@ class Ot extends h {
|
|
|
1174
1174
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1175
1175
|
*/
|
|
1176
1176
|
getCart(r) {
|
|
1177
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
1177
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new fe(e.data));
|
|
1178
1178
|
}
|
|
1179
1179
|
/**
|
|
1180
1180
|
* Удаляет всё содержимое корзины.
|
|
@@ -1212,7 +1212,7 @@ class Ot extends h {
|
|
|
1212
1212
|
isAdditionalSale: e.isAdditionalSale,
|
|
1213
1213
|
...e.configuratorParams
|
|
1214
1214
|
},
|
|
1215
|
-
(i) => new
|
|
1215
|
+
(i) => new fe(i.data),
|
|
1216
1216
|
s
|
|
1217
1217
|
);
|
|
1218
1218
|
}
|
|
@@ -1242,7 +1242,7 @@ class Ot extends h {
|
|
|
1242
1242
|
isAdditionalSale: e.isAdditionalSale,
|
|
1243
1243
|
...e.configuratorParams
|
|
1244
1244
|
},
|
|
1245
|
-
(i) => new
|
|
1245
|
+
(i) => new fe(i.data),
|
|
1246
1246
|
s
|
|
1247
1247
|
);
|
|
1248
1248
|
}
|
|
@@ -1266,7 +1266,7 @@ class Ot extends h {
|
|
|
1266
1266
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1267
1267
|
*/
|
|
1268
1268
|
addCartItemFromCSV(r, e) {
|
|
1269
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new
|
|
1269
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (s) => new fe(s.data));
|
|
1270
1270
|
}
|
|
1271
1271
|
/**
|
|
1272
1272
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -1280,7 +1280,7 @@ class Ot extends h {
|
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
var Wr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Wr || {}), je = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(je || {}), Jr = /* @__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))(Jr || {});
|
|
1283
|
-
class E extends
|
|
1283
|
+
class E extends ge {
|
|
1284
1284
|
/**
|
|
1285
1285
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1286
1286
|
*
|
|
@@ -1312,7 +1312,7 @@ class lr extends b {
|
|
|
1312
1312
|
* Дата и время последнего изменения.
|
|
1313
1313
|
*/
|
|
1314
1314
|
t(this, "updatedAt");
|
|
1315
|
-
this.updatedAt =
|
|
1315
|
+
this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
class Vr extends lr {
|
|
@@ -1327,7 +1327,7 @@ class Vr extends lr {
|
|
|
1327
1327
|
* Дата и время последнего удаления.
|
|
1328
1328
|
*/
|
|
1329
1329
|
t(this, "deletedAt");
|
|
1330
|
-
this.deletedAt =
|
|
1330
|
+
this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
1333
|
class F extends b {
|
|
@@ -1381,7 +1381,7 @@ class Kr extends b {
|
|
|
1381
1381
|
* Дата и время удаления.
|
|
1382
1382
|
*/
|
|
1383
1383
|
t(this, "deletedAt");
|
|
1384
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt =
|
|
1384
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = w(e == null ? void 0 : e.publishedAt) ? a(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 F(e == null ? void 0 : e.owner), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
1387
|
class W extends lr {
|
|
@@ -1400,7 +1400,7 @@ class W extends lr {
|
|
|
1400
1400
|
* Дата и время создания шаблона.
|
|
1401
1401
|
*/
|
|
1402
1402
|
t(this, "createdAt");
|
|
1403
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt =
|
|
1403
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
1406
|
class Z extends x {
|
|
@@ -1547,7 +1547,7 @@ class Ae extends ce {
|
|
|
1547
1547
|
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new Yr(e.pricingRole) : void 0;
|
|
1548
1548
|
}
|
|
1549
1549
|
}
|
|
1550
|
-
class Xr extends
|
|
1550
|
+
class Xr extends ge {
|
|
1551
1551
|
/**
|
|
1552
1552
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1553
1553
|
*
|
|
@@ -1598,7 +1598,7 @@ class we extends Xr {
|
|
|
1598
1598
|
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new we(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Z(o));
|
|
1599
1599
|
}
|
|
1600
1600
|
}
|
|
1601
|
-
class
|
|
1601
|
+
class pr {
|
|
1602
1602
|
/**
|
|
1603
1603
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1604
1604
|
*
|
|
@@ -1613,10 +1613,10 @@ class ur {
|
|
|
1613
1613
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1614
1614
|
*/
|
|
1615
1615
|
t(this, "increasePercent");
|
|
1616
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1616
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
class
|
|
1619
|
+
class Te extends pr {
|
|
1620
1620
|
/**
|
|
1621
1621
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1622
1622
|
*
|
|
@@ -1628,7 +1628,7 @@ class be extends ur {
|
|
|
1628
1628
|
* Базовые данные о продукте.
|
|
1629
1629
|
*/
|
|
1630
1630
|
t(this, "productCategory");
|
|
1631
|
-
this.productCategory = new
|
|
1631
|
+
this.productCategory = new ge(e == null ? void 0 : e.productCategory);
|
|
1632
1632
|
}
|
|
1633
1633
|
}
|
|
1634
1634
|
class ee extends v {
|
|
@@ -1663,7 +1663,7 @@ class Me extends v {
|
|
|
1663
1663
|
e && (this.region = new le(e.region));
|
|
1664
1664
|
}
|
|
1665
1665
|
}
|
|
1666
|
-
class
|
|
1666
|
+
class ur extends b {
|
|
1667
1667
|
/**
|
|
1668
1668
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1669
1669
|
*
|
|
@@ -1699,10 +1699,10 @@ class pr extends b {
|
|
|
1699
1699
|
* Признак активности учетной записи пользователя.
|
|
1700
1700
|
*/
|
|
1701
1701
|
t(this, "isActive");
|
|
1702
|
-
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 N(e.salesDirection) : void 0, this.createdAt =
|
|
1702
|
+
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 N(e.salesDirection) : void 0, this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = w(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
|
-
class
|
|
1705
|
+
class me extends ur {
|
|
1706
1706
|
/**
|
|
1707
1707
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1708
1708
|
*
|
|
@@ -1771,10 +1771,10 @@ class se extends H {
|
|
|
1771
1771
|
* Данные шаблона прайс-листа.
|
|
1772
1772
|
*/
|
|
1773
1773
|
t(this, "priceTemplate");
|
|
1774
|
-
this.createdAt =
|
|
1774
|
+
this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
|
-
class
|
|
1777
|
+
class be extends pr {
|
|
1778
1778
|
/**
|
|
1779
1779
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1780
1780
|
*
|
|
@@ -1848,10 +1848,10 @@ class O {
|
|
|
1848
1848
|
* Окончание периода.
|
|
1849
1849
|
*/
|
|
1850
1850
|
t(this, "to");
|
|
1851
|
-
this.from =
|
|
1851
|
+
this.from = w(r == null ? void 0 : r.from) ? a(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = w(r == null ? void 0 : r.to) ? a(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1852
1852
|
}
|
|
1853
1853
|
}
|
|
1854
|
-
class
|
|
1854
|
+
class Ut {
|
|
1855
1855
|
/**
|
|
1856
1856
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1857
1857
|
*
|
|
@@ -1909,9 +1909,9 @@ class qt {
|
|
|
1909
1909
|
var e, s, i, o;
|
|
1910
1910
|
const r = {};
|
|
1911
1911
|
return Object.keys(this).forEach((c) => {
|
|
1912
|
-
const
|
|
1912
|
+
const p = this[c];
|
|
1913
1913
|
// eslint-disable-next-line prettier/prettier
|
|
1914
|
-
|
|
1914
|
+
A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
1915
1915
|
}), !((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;
|
|
1916
1916
|
}
|
|
1917
1917
|
}
|
|
@@ -1969,7 +1969,7 @@ class We {
|
|
|
1969
1969
|
* Минимальный коэффициент цены.
|
|
1970
1970
|
*/
|
|
1971
1971
|
t(this, "minCoefficient");
|
|
1972
|
-
this.role = new ne(r == null ? void 0 : r.role), this.category = new
|
|
1972
|
+
this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
|
|
1973
1973
|
}
|
|
1974
1974
|
}
|
|
1975
1975
|
class Zr {
|
|
@@ -2005,6 +2005,14 @@ class et {
|
|
|
2005
2005
|
* @inheritDoc
|
|
2006
2006
|
*/
|
|
2007
2007
|
t(this, "portalApiUrl");
|
|
2008
|
+
/**
|
|
2009
|
+
* @inheritDoc
|
|
2010
|
+
*/
|
|
2011
|
+
t(this, "priceHistoryApiUrl");
|
|
2012
|
+
/**
|
|
2013
|
+
* @inheritDoc
|
|
2014
|
+
*/
|
|
2015
|
+
t(this, "recommendationsApiUrl");
|
|
2008
2016
|
/**
|
|
2009
2017
|
* @inheritDoc
|
|
2010
2018
|
*/
|
|
@@ -2013,7 +2021,7 @@ class et {
|
|
|
2013
2021
|
* @inheritDoc
|
|
2014
2022
|
*/
|
|
2015
2023
|
t(this, "responseDataCacheTimeout");
|
|
2016
|
-
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;
|
|
2024
|
+
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.priceHistoryApiUrl = (r == null ? void 0 : r.priceHistoryApiUrl) ?? "", this.recommendationsApiUrl = (r == null ? void 0 : r.recommendationsApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
2017
2025
|
}
|
|
2018
2026
|
}
|
|
2019
2027
|
class rt {
|
|
@@ -2080,7 +2088,7 @@ class tt {
|
|
|
2080
2088
|
* Текущая версия приложения.
|
|
2081
2089
|
*/
|
|
2082
2090
|
t(this, "version");
|
|
2083
|
-
this.date =
|
|
2091
|
+
this.date = w(r == null ? void 0 : r.date) ? a(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";
|
|
2084
2092
|
}
|
|
2085
2093
|
}
|
|
2086
2094
|
class st {
|
|
@@ -2122,7 +2130,7 @@ class st {
|
|
|
2122
2130
|
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"];
|
|
2123
2131
|
}
|
|
2124
2132
|
}
|
|
2125
|
-
class
|
|
2133
|
+
class qt {
|
|
2126
2134
|
/**
|
|
2127
2135
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2128
2136
|
*
|
|
@@ -2203,7 +2211,7 @@ class Gt extends h {
|
|
|
2203
2211
|
*/
|
|
2204
2212
|
// eslint-disable-next-line class-methods-use-this
|
|
2205
2213
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2206
|
-
let c = `${
|
|
2214
|
+
let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2207
2215
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2208
2216
|
}
|
|
2209
2217
|
}
|
|
@@ -2441,12 +2449,12 @@ class jt extends h {
|
|
|
2441
2449
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2442
2450
|
*/
|
|
2443
2451
|
attachTemplate(r, e, s) {
|
|
2444
|
-
const i =
|
|
2452
|
+
const i = D.getConfig().dateFormats.api;
|
|
2445
2453
|
return this.post(
|
|
2446
2454
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2447
2455
|
s && {
|
|
2448
|
-
startAt: s.startAt &&
|
|
2449
|
-
endAt: s.endAt &&
|
|
2456
|
+
startAt: s.startAt && U(s.startAt, i),
|
|
2457
|
+
endAt: s.endAt && U(s.endAt, i)
|
|
2450
2458
|
},
|
|
2451
2459
|
(o) => new se(o.data),
|
|
2452
2460
|
{},
|
|
@@ -2475,12 +2483,12 @@ class jt extends h {
|
|
|
2475
2483
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2476
2484
|
*/
|
|
2477
2485
|
changeTemplate(r, e, s, i) {
|
|
2478
|
-
const o =
|
|
2486
|
+
const o = D.getConfig().dateFormats.api;
|
|
2479
2487
|
return this.patch(
|
|
2480
2488
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2481
2489
|
i && {
|
|
2482
|
-
startAt: i.startAt &&
|
|
2483
|
-
endAt: i.endAt &&
|
|
2490
|
+
startAt: i.startAt && U(i.startAt, o),
|
|
2491
|
+
endAt: i.endAt && U(i.endAt, o)
|
|
2484
2492
|
},
|
|
2485
2493
|
(c) => new se(c.data)
|
|
2486
2494
|
);
|
|
@@ -2558,7 +2566,7 @@ class Mt extends h {
|
|
|
2558
2566
|
showHidden: s,
|
|
2559
2567
|
withPriceCoefficients: e
|
|
2560
2568
|
},
|
|
2561
|
-
(i) =>
|
|
2569
|
+
(i) => he(i.data, (o) => new x(o))
|
|
2562
2570
|
);
|
|
2563
2571
|
}
|
|
2564
2572
|
/**
|
|
@@ -2621,7 +2629,7 @@ class Ht extends h {
|
|
|
2621
2629
|
return this.get(
|
|
2622
2630
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2623
2631
|
{},
|
|
2624
|
-
(e) =>
|
|
2632
|
+
(e) => he(e.data, (s) => new Ge(s))
|
|
2625
2633
|
);
|
|
2626
2634
|
}
|
|
2627
2635
|
/**
|
|
@@ -2698,7 +2706,7 @@ class Bt extends h {
|
|
|
2698
2706
|
showHidden: i,
|
|
2699
2707
|
withPriceCoefficients: s
|
|
2700
2708
|
},
|
|
2701
|
-
(o) =>
|
|
2709
|
+
(o) => he(o.data, (c) => new Z(c))
|
|
2702
2710
|
);
|
|
2703
2711
|
}
|
|
2704
2712
|
}
|
|
@@ -2755,10 +2763,10 @@ class Je {
|
|
|
2755
2763
|
field: this.field,
|
|
2756
2764
|
op: this.op
|
|
2757
2765
|
};
|
|
2758
|
-
return r.value =
|
|
2766
|
+
return r.value = Ie(this.value) ? U(this.value, D.getConfig().dateFormats.api) : this.value, r;
|
|
2759
2767
|
}
|
|
2760
2768
|
}
|
|
2761
|
-
class
|
|
2769
|
+
class pe {
|
|
2762
2770
|
/**
|
|
2763
2771
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2764
2772
|
*
|
|
@@ -2778,7 +2786,7 @@ class ue {
|
|
|
2778
2786
|
*/
|
|
2779
2787
|
t(this, "groups");
|
|
2780
2788
|
var e, s;
|
|
2781
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Je(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new
|
|
2789
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Je(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new pe(i))) ?? [];
|
|
2782
2790
|
}
|
|
2783
2791
|
/**
|
|
2784
2792
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2788,12 +2796,12 @@ class ue {
|
|
|
2788
2796
|
toPrimitive() {
|
|
2789
2797
|
return {
|
|
2790
2798
|
groupOp: this.groupOp,
|
|
2791
|
-
filters: this.filters.map((r) => r instanceof Je &&
|
|
2792
|
-
groups: this.groups.map((r) => r instanceof
|
|
2799
|
+
filters: this.filters.map((r) => r instanceof Je && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2800
|
+
groups: this.groups.map((r) => r instanceof pe ? r.toPrimitive() : r)
|
|
2793
2801
|
};
|
|
2794
2802
|
}
|
|
2795
2803
|
}
|
|
2796
|
-
class
|
|
2804
|
+
class De extends h {
|
|
2797
2805
|
/**
|
|
2798
2806
|
* Получает пагинированный список данных.
|
|
2799
2807
|
*
|
|
@@ -2805,15 +2813,15 @@ class $e extends h {
|
|
|
2805
2813
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2806
2814
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2807
2815
|
*/
|
|
2808
|
-
getPaginated(r, e, s, i, o, c,
|
|
2809
|
-
let
|
|
2816
|
+
getPaginated(r, e, s, i, o, c, p) {
|
|
2817
|
+
let u = {
|
|
2810
2818
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2811
2819
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2812
2820
|
};
|
|
2813
|
-
return e && (
|
|
2821
|
+
return e && (u.filters = JSON.stringify((e instanceof pe ? e : new pe(e)).toPrimitive())), Y(s) || (u.sort = Q(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
|
|
2814
2822
|
}
|
|
2815
2823
|
}
|
|
2816
|
-
class Et extends
|
|
2824
|
+
class Et extends De {
|
|
2817
2825
|
/**
|
|
2818
2826
|
* Возвращает список шаблонов прайс-листа.
|
|
2819
2827
|
*
|
|
@@ -2885,7 +2893,7 @@ class Et extends $e {
|
|
|
2885
2893
|
return this.get(
|
|
2886
2894
|
`/internal/price/templates/${r}/products`,
|
|
2887
2895
|
{},
|
|
2888
|
-
(e) => e.data.map((s) => new
|
|
2896
|
+
(e) => e.data.map((s) => new be(s))
|
|
2889
2897
|
);
|
|
2890
2898
|
}
|
|
2891
2899
|
/**
|
|
@@ -2897,7 +2905,7 @@ class Et extends $e {
|
|
|
2897
2905
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2898
2906
|
*/
|
|
2899
2907
|
getProductTemplatePrice(r, e) {
|
|
2900
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2908
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new be(s.data));
|
|
2901
2909
|
}
|
|
2902
2910
|
/**
|
|
2903
2911
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2916,7 +2924,7 @@ class Et extends $e {
|
|
|
2916
2924
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2917
2925
|
increase_percent: s.value
|
|
2918
2926
|
},
|
|
2919
|
-
(o) => new
|
|
2927
|
+
(o) => new be(o.data)
|
|
2920
2928
|
);
|
|
2921
2929
|
}
|
|
2922
2930
|
/**
|
|
@@ -2941,7 +2949,7 @@ class Et extends $e {
|
|
|
2941
2949
|
return this.get(
|
|
2942
2950
|
`/internal/price/templates/${r}/categories`,
|
|
2943
2951
|
{},
|
|
2944
|
-
(e) => e.data.map((s) => new
|
|
2952
|
+
(e) => e.data.map((s) => new Te(s))
|
|
2945
2953
|
);
|
|
2946
2954
|
}
|
|
2947
2955
|
/**
|
|
@@ -2956,7 +2964,7 @@ class Et extends $e {
|
|
|
2956
2964
|
return this.get(
|
|
2957
2965
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2958
2966
|
{},
|
|
2959
|
-
(s) => new
|
|
2967
|
+
(s) => new Te(s.data)
|
|
2960
2968
|
);
|
|
2961
2969
|
}
|
|
2962
2970
|
/**
|
|
@@ -2982,7 +2990,7 @@ class Et extends $e {
|
|
|
2982
2990
|
},
|
|
2983
2991
|
params: i ? { recursively: !0 } : {}
|
|
2984
2992
|
},
|
|
2985
|
-
(c) => new
|
|
2993
|
+
(c) => new Te(c.data)
|
|
2986
2994
|
);
|
|
2987
2995
|
}
|
|
2988
2996
|
/**
|
|
@@ -3097,7 +3105,7 @@ class Wt extends h {
|
|
|
3097
3105
|
);
|
|
3098
3106
|
}
|
|
3099
3107
|
}
|
|
3100
|
-
class Jt extends
|
|
3108
|
+
class Jt extends De {
|
|
3101
3109
|
/**
|
|
3102
3110
|
* Возвращает пагинированный список свойств.
|
|
3103
3111
|
*
|
|
@@ -3546,15 +3554,15 @@ class lt extends v {
|
|
|
3546
3554
|
}
|
|
3547
3555
|
class re extends v {
|
|
3548
3556
|
}
|
|
3549
|
-
class ut extends v {
|
|
3550
|
-
}
|
|
3551
3557
|
class pt extends v {
|
|
3552
3558
|
}
|
|
3559
|
+
class ut extends v {
|
|
3560
|
+
}
|
|
3553
3561
|
class mr extends v {
|
|
3554
3562
|
}
|
|
3555
3563
|
class fr extends v {
|
|
3556
3564
|
}
|
|
3557
|
-
class
|
|
3565
|
+
class xe extends H {
|
|
3558
3566
|
/**
|
|
3559
3567
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3560
3568
|
*
|
|
@@ -3585,7 +3593,7 @@ class Ne extends H {
|
|
|
3585
3593
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ae(e.currency));
|
|
3586
3594
|
}
|
|
3587
3595
|
}
|
|
3588
|
-
class
|
|
3596
|
+
class Ne extends b {
|
|
3589
3597
|
/**
|
|
3590
3598
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3591
3599
|
*
|
|
@@ -3604,7 +3612,7 @@ class Oe extends b {
|
|
|
3604
3612
|
this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
|
|
3605
3613
|
}
|
|
3606
3614
|
}
|
|
3607
|
-
class M extends
|
|
3615
|
+
class M extends Ne {
|
|
3608
3616
|
/**
|
|
3609
3617
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3610
3618
|
*
|
|
@@ -3636,7 +3644,7 @@ class M extends Oe {
|
|
|
3636
3644
|
* Дата и время последнего удаления.
|
|
3637
3645
|
*/
|
|
3638
3646
|
t(this, "deletedAt");
|
|
3639
|
-
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 =
|
|
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) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3640
3648
|
}
|
|
3641
3649
|
}
|
|
3642
3650
|
class yr extends b {
|
|
@@ -3697,7 +3705,7 @@ class yr extends b {
|
|
|
3697
3705
|
*/
|
|
3698
3706
|
t(this, "updater");
|
|
3699
3707
|
if (e) {
|
|
3700
|
-
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt =
|
|
3708
|
+
if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3701
3709
|
const s = [];
|
|
3702
3710
|
e.contacts.forEach((i) => {
|
|
3703
3711
|
s.push(new M(i));
|
|
@@ -3706,7 +3714,7 @@ class yr extends b {
|
|
|
3706
3714
|
if (e.bankAccounts) {
|
|
3707
3715
|
const s = [];
|
|
3708
3716
|
e.bankAccounts.forEach((i) => {
|
|
3709
|
-
s.push(new
|
|
3717
|
+
s.push(new xe(i));
|
|
3710
3718
|
}), this.bankAccounts = s;
|
|
3711
3719
|
}
|
|
3712
3720
|
}
|
|
@@ -3822,7 +3830,7 @@ class Ce {
|
|
|
3822
3830
|
}
|
|
3823
3831
|
}
|
|
3824
3832
|
}
|
|
3825
|
-
class
|
|
3833
|
+
class Se extends H {
|
|
3826
3834
|
/**
|
|
3827
3835
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3828
3836
|
*
|
|
@@ -3862,7 +3870,7 @@ class mt extends M {
|
|
|
3862
3870
|
*/
|
|
3863
3871
|
addresses: []
|
|
3864
3872
|
});
|
|
3865
|
-
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 Se(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Se(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Se(s))));
|
|
3866
3874
|
}
|
|
3867
3875
|
}
|
|
3868
3876
|
class ve extends Vr {
|
|
@@ -3905,7 +3913,7 @@ class ve extends Vr {
|
|
|
3905
3913
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new cr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(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;
|
|
3906
3914
|
}
|
|
3907
3915
|
}
|
|
3908
|
-
class Qe extends
|
|
3916
|
+
class Qe extends me {
|
|
3909
3917
|
/**
|
|
3910
3918
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3911
3919
|
*
|
|
@@ -3959,7 +3967,7 @@ class Qe extends ge {
|
|
|
3959
3967
|
* Дополнительные данные о клиенте.
|
|
3960
3968
|
*/
|
|
3961
3969
|
t(this, "extraData");
|
|
3962
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
3970
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => Ce.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new re(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new ve(p))) ?? [], this.channelPrimaryInterest = new gr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new fr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new X(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3963
3971
|
}
|
|
3964
3972
|
}
|
|
3965
3973
|
class Kt {
|
|
@@ -4057,11 +4065,11 @@ class Kt {
|
|
|
4057
4065
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
4058
4066
|
*/
|
|
4059
4067
|
t(this, "lastOrder");
|
|
4060
|
-
var e, s, i, o, c,
|
|
4061
|
-
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((
|
|
4068
|
+
var e, s, i, o, c, p;
|
|
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((u) => new Me(u)), 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 O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(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((u) => new Ae(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new N(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new j(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((u) => new re(u)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4062
4070
|
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4063
4071
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4064
|
-
isApproved: (
|
|
4072
|
+
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
4065
4073
|
};
|
|
4066
4074
|
}
|
|
4067
4075
|
/**
|
|
@@ -4117,7 +4125,7 @@ class Kt {
|
|
|
4117
4125
|
this.partnerGroups = [];
|
|
4118
4126
|
break;
|
|
4119
4127
|
case "contact":
|
|
4120
|
-
this.contact = new
|
|
4128
|
+
this.contact = new Ne();
|
|
4121
4129
|
break;
|
|
4122
4130
|
}
|
|
4123
4131
|
return this;
|
|
@@ -4130,9 +4138,9 @@ class Kt {
|
|
|
4130
4138
|
var e, s, i, o;
|
|
4131
4139
|
const r = {};
|
|
4132
4140
|
return Object.keys(this).forEach((c) => {
|
|
4133
|
-
const
|
|
4141
|
+
const p = this[c];
|
|
4134
4142
|
// eslint-disable-next-line prettier/prettier
|
|
4135
|
-
|
|
4143
|
+
A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
4136
4144
|
}), !((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.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4137
4145
|
}
|
|
4138
4146
|
}
|
|
@@ -4156,7 +4164,7 @@ class Cr extends H {
|
|
|
4156
4164
|
* Признак того, что заказ подтвержден в 1С.
|
|
4157
4165
|
*/
|
|
4158
4166
|
t(this, "isApproved1c");
|
|
4159
|
-
this.createdAt =
|
|
4167
|
+
this.createdAt = w(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new F(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4160
4168
|
}
|
|
4161
4169
|
}
|
|
4162
4170
|
class ft extends b {
|
|
@@ -4262,7 +4270,7 @@ class Yt {
|
|
|
4262
4270
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4263
4271
|
}
|
|
4264
4272
|
}
|
|
4265
|
-
class Xt extends
|
|
4273
|
+
class Xt extends De {
|
|
4266
4274
|
/**
|
|
4267
4275
|
* Возвращает данные об указанном клиенте.
|
|
4268
4276
|
*
|
|
@@ -4285,7 +4293,7 @@ class Xt extends $e {
|
|
|
4285
4293
|
getClientsList(r, e, s, i) {
|
|
4286
4294
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4287
4295
|
const c = { ...o.data };
|
|
4288
|
-
return c.data = c.data.map((
|
|
4296
|
+
return c.data = c.data.map((p) => new me(p)), c;
|
|
4289
4297
|
});
|
|
4290
4298
|
}
|
|
4291
4299
|
/**
|
|
@@ -4464,17 +4472,17 @@ class Xt extends $e {
|
|
|
4464
4472
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4465
4473
|
*/
|
|
4466
4474
|
createContragentClientData(r, e, s = {}) {
|
|
4467
|
-
var
|
|
4475
|
+
var u, m, C, $, d, I, S, _;
|
|
4468
4476
|
let i;
|
|
4469
|
-
const o = e, c = e,
|
|
4477
|
+
const o = e, c = e, p = e;
|
|
4470
4478
|
switch (e.opf.slug) {
|
|
4471
4479
|
case k.Ic:
|
|
4472
4480
|
i = {
|
|
4473
4481
|
opf: o.opf.slug,
|
|
4474
4482
|
name: o.name,
|
|
4475
4483
|
alternative_name: o.alternativeName,
|
|
4476
|
-
partner_group_id: (
|
|
4477
|
-
manager_id: (
|
|
4484
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4485
|
+
manager_id: (m = o.manager) == null ? void 0 : m.id,
|
|
4478
4486
|
comment: o.comment,
|
|
4479
4487
|
inn: o.inn,
|
|
4480
4488
|
okpo: o.okpo,
|
|
@@ -4491,8 +4499,8 @@ class Xt extends $e {
|
|
|
4491
4499
|
opf: c.opf.slug,
|
|
4492
4500
|
name: c.name,
|
|
4493
4501
|
alternative_name: c.alternativeName,
|
|
4494
|
-
partner_group_id: (
|
|
4495
|
-
manager_id: (
|
|
4502
|
+
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4503
|
+
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4496
4504
|
comment: c.comment,
|
|
4497
4505
|
inn: c.inn,
|
|
4498
4506
|
kpp: c.kpp,
|
|
@@ -4507,21 +4515,21 @@ class Xt extends $e {
|
|
|
4507
4515
|
break;
|
|
4508
4516
|
case k.UlNr:
|
|
4509
4517
|
i = {
|
|
4510
|
-
opf:
|
|
4511
|
-
name:
|
|
4512
|
-
alternative_name:
|
|
4513
|
-
partner_group_id: (d =
|
|
4514
|
-
manager_id: (I =
|
|
4515
|
-
comment:
|
|
4516
|
-
director_name:
|
|
4517
|
-
director_position:
|
|
4518
|
-
director_acts_on:
|
|
4519
|
-
legal_address:
|
|
4520
|
-
postal_address:
|
|
4521
|
-
actual_address:
|
|
4522
|
-
registration_country_id:
|
|
4523
|
-
registration_number:
|
|
4524
|
-
tax_number:
|
|
4518
|
+
opf: p.opf.slug,
|
|
4519
|
+
name: p.name,
|
|
4520
|
+
alternative_name: p.alternativeName,
|
|
4521
|
+
partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
|
|
4522
|
+
manager_id: (I = p.manager) == null ? void 0 : I.id,
|
|
4523
|
+
comment: p.comment,
|
|
4524
|
+
director_name: p.directorName,
|
|
4525
|
+
director_position: p.directorPosition,
|
|
4526
|
+
director_acts_on: p.directorActsOn,
|
|
4527
|
+
legal_address: p.legalAddress,
|
|
4528
|
+
postal_address: p.postalAddress,
|
|
4529
|
+
actual_address: p.actualAddress,
|
|
4530
|
+
registration_country_id: p.registrationCountry.id,
|
|
4531
|
+
registration_number: p.registrationNumber,
|
|
4532
|
+
tax_number: p.taxNumber || void 0
|
|
4525
4533
|
};
|
|
4526
4534
|
break;
|
|
4527
4535
|
default:
|
|
@@ -4538,7 +4546,7 @@ class Xt extends $e {
|
|
|
4538
4546
|
return this.post(
|
|
4539
4547
|
`/internal/clients/${r}/contragents`,
|
|
4540
4548
|
i,
|
|
4541
|
-
(
|
|
4549
|
+
(q) => Ce.createInstance(q.data),
|
|
4542
4550
|
s
|
|
4543
4551
|
);
|
|
4544
4552
|
}
|
|
@@ -4553,17 +4561,17 @@ class Xt extends $e {
|
|
|
4553
4561
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4554
4562
|
*/
|
|
4555
4563
|
updateContragentClientData(r, e, s = {}) {
|
|
4556
|
-
var
|
|
4564
|
+
var u, m, C, $, d, I, S, _;
|
|
4557
4565
|
let i;
|
|
4558
|
-
const o = e, c = e,
|
|
4566
|
+
const o = e, c = e, p = e;
|
|
4559
4567
|
switch (e.opf.slug) {
|
|
4560
4568
|
case k.Ic:
|
|
4561
4569
|
i = {
|
|
4562
4570
|
opf: o.opf.slug,
|
|
4563
4571
|
name: o.name,
|
|
4564
4572
|
alternative_name: o.alternativeName,
|
|
4565
|
-
partner_group_id: (
|
|
4566
|
-
manager_id: (
|
|
4573
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4574
|
+
manager_id: (m = o.manager) == null ? void 0 : m.id,
|
|
4567
4575
|
comment: o.comment,
|
|
4568
4576
|
inn: o.inn,
|
|
4569
4577
|
okpo: o.okpo,
|
|
@@ -4580,8 +4588,8 @@ class Xt extends $e {
|
|
|
4580
4588
|
opf: c.opf.slug,
|
|
4581
4589
|
name: c.name,
|
|
4582
4590
|
alternative_name: c.alternativeName,
|
|
4583
|
-
partner_group_id: (
|
|
4584
|
-
manager_id: (
|
|
4591
|
+
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4592
|
+
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4585
4593
|
comment: c.comment,
|
|
4586
4594
|
inn: c.inn,
|
|
4587
4595
|
kpp: c.kpp,
|
|
@@ -4596,21 +4604,21 @@ class Xt extends $e {
|
|
|
4596
4604
|
break;
|
|
4597
4605
|
case k.UlNr:
|
|
4598
4606
|
i = {
|
|
4599
|
-
opf:
|
|
4600
|
-
name:
|
|
4601
|
-
alternative_name:
|
|
4602
|
-
partner_group_id: (d =
|
|
4603
|
-
manager_id: (I =
|
|
4604
|
-
comment:
|
|
4605
|
-
director_name:
|
|
4606
|
-
director_position:
|
|
4607
|
-
director_acts_on:
|
|
4608
|
-
legal_address:
|
|
4609
|
-
postal_address:
|
|
4610
|
-
actual_address:
|
|
4611
|
-
registration_country_id:
|
|
4612
|
-
registration_number:
|
|
4613
|
-
tax_number:
|
|
4607
|
+
opf: p.opf.slug,
|
|
4608
|
+
name: p.name,
|
|
4609
|
+
alternative_name: p.alternativeName,
|
|
4610
|
+
partner_group_id: (d = p.partnerGroup) == null ? void 0 : d.id,
|
|
4611
|
+
manager_id: (I = p.manager) == null ? void 0 : I.id,
|
|
4612
|
+
comment: p.comment,
|
|
4613
|
+
director_name: p.directorName,
|
|
4614
|
+
director_position: p.directorPosition,
|
|
4615
|
+
director_acts_on: p.directorActsOn,
|
|
4616
|
+
legal_address: p.legalAddress,
|
|
4617
|
+
postal_address: p.postalAddress,
|
|
4618
|
+
actual_address: p.actualAddress,
|
|
4619
|
+
registration_country_id: p.registrationCountry.id,
|
|
4620
|
+
registration_number: p.registrationNumber,
|
|
4621
|
+
tax_number: p.taxNumber || void 0
|
|
4614
4622
|
};
|
|
4615
4623
|
break;
|
|
4616
4624
|
default:
|
|
@@ -4627,7 +4635,7 @@ class Xt extends $e {
|
|
|
4627
4635
|
return this.patch(
|
|
4628
4636
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4629
4637
|
i,
|
|
4630
|
-
(
|
|
4638
|
+
(q) => Ce.createInstance(q.data),
|
|
4631
4639
|
s
|
|
4632
4640
|
);
|
|
4633
4641
|
}
|
|
@@ -4665,7 +4673,7 @@ class Xt extends $e {
|
|
|
4665
4673
|
}), e.operatingHours && (i.operating_hours = {
|
|
4666
4674
|
from: e.operatingHours.from,
|
|
4667
4675
|
to: e.operatingHours.to
|
|
4668
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (
|
|
4676
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new ve(p.data), s);
|
|
4669
4677
|
}
|
|
4670
4678
|
/**
|
|
4671
4679
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4694,7 +4702,7 @@ class Xt extends $e {
|
|
|
4694
4702
|
}), this.patch(
|
|
4695
4703
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4696
4704
|
i,
|
|
4697
|
-
(
|
|
4705
|
+
(p) => new ve(p.data),
|
|
4698
4706
|
s
|
|
4699
4707
|
);
|
|
4700
4708
|
}
|
|
@@ -4730,7 +4738,7 @@ class Xt extends $e {
|
|
|
4730
4738
|
correspondent_account: s.correspondentAccount,
|
|
4731
4739
|
currency_id: s.currency.id
|
|
4732
4740
|
},
|
|
4733
|
-
(o) => new
|
|
4741
|
+
(o) => new xe(o.data),
|
|
4734
4742
|
i
|
|
4735
4743
|
);
|
|
4736
4744
|
}
|
|
@@ -4756,7 +4764,7 @@ class Xt extends $e {
|
|
|
4756
4764
|
correspondent_account: s.correspondentAccount,
|
|
4757
4765
|
currency_id: s.currency.id
|
|
4758
4766
|
},
|
|
4759
|
-
(o) => new
|
|
4767
|
+
(o) => new xe(o.data),
|
|
4760
4768
|
i
|
|
4761
4769
|
);
|
|
4762
4770
|
}
|
|
@@ -4953,14 +4961,14 @@ class Xt extends $e {
|
|
|
4953
4961
|
* в случае ошибок в запросах.
|
|
4954
4962
|
*/
|
|
4955
4963
|
createContact(r, e, s, i = {}) {
|
|
4956
|
-
var c,
|
|
4964
|
+
var c, p;
|
|
4957
4965
|
const o = {
|
|
4958
4966
|
name: e.name,
|
|
4959
4967
|
position: e.position,
|
|
4960
4968
|
comment: e.comment,
|
|
4961
4969
|
...s
|
|
4962
4970
|
};
|
|
4963
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
4971
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new M(u.data), i);
|
|
4964
4972
|
}
|
|
4965
4973
|
/**
|
|
4966
4974
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4999,7 +5007,7 @@ const V = class V extends h {
|
|
|
4999
5007
|
* Время кэширования данных ответов на запросы (секунд).
|
|
5000
5008
|
*/
|
|
5001
5009
|
t(this, "responseDataCacheTimeout");
|
|
5002
|
-
this.responseDataCacheTimeout =
|
|
5010
|
+
this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
|
|
5003
5011
|
}
|
|
5004
5012
|
/**
|
|
5005
5013
|
* Возвращает кэшированные данные.
|
|
@@ -5036,10 +5044,10 @@ const V = class V extends h {
|
|
|
5036
5044
|
*/
|
|
5037
5045
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5038
5046
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5039
|
-
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`),
|
|
5040
|
-
return
|
|
5041
|
-
const
|
|
5042
|
-
return i &&
|
|
5047
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
5048
|
+
return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
|
|
5049
|
+
const m = u.map((C) => Fe.instanceInitializer(e, C));
|
|
5050
|
+
return i && m && this.cacheResponse(s, m), m;
|
|
5043
5051
|
});
|
|
5044
5052
|
}
|
|
5045
5053
|
};
|
|
@@ -5047,7 +5055,7 @@ const V = class V extends h {
|
|
|
5047
5055
|
* Кэш результатов запросов.
|
|
5048
5056
|
*/
|
|
5049
5057
|
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5050
|
-
let
|
|
5058
|
+
let ue = V;
|
|
5051
5059
|
class Zt extends h {
|
|
5052
5060
|
/**
|
|
5053
5061
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
@@ -5141,8 +5149,8 @@ class rs {
|
|
|
5141
5149
|
const r = kr(/* @__PURE__ */ new Date(), 1);
|
|
5142
5150
|
return {
|
|
5143
5151
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5144
|
-
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to:
|
|
5145
|
-
today: { label: "Сегодня", from:
|
|
5152
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: qr(r) },
|
|
5153
|
+
today: { label: "Сегодня", from: ke(), to: Ur() },
|
|
5146
5154
|
yesterday: { label: "Вчера", from: Or(), to: Nr() },
|
|
5147
5155
|
tomorrow: { label: "Завтра", from: xr(), to: Lr() }
|
|
5148
5156
|
};
|
|
@@ -5205,12 +5213,12 @@ class ts {
|
|
|
5205
5213
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5206
5214
|
}
|
|
5207
5215
|
}
|
|
5208
|
-
class wt extends
|
|
5216
|
+
class wt extends ue {
|
|
5209
5217
|
/**
|
|
5210
5218
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5211
5219
|
*/
|
|
5212
5220
|
async getManagers() {
|
|
5213
|
-
const r = "/internal/managers", e =
|
|
5221
|
+
const r = "/internal/managers", e = ue.getCachedResponse(r);
|
|
5214
5222
|
if (e)
|
|
5215
5223
|
return e;
|
|
5216
5224
|
const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
|
|
@@ -5224,7 +5232,7 @@ class vr extends Cr {
|
|
|
5224
5232
|
* @param data Данные для первоначальной инициализации.
|
|
5225
5233
|
*/
|
|
5226
5234
|
constructor(e) {
|
|
5227
|
-
var s, i, o, c,
|
|
5235
|
+
var s, i, o, c, p, u, m, C;
|
|
5228
5236
|
super(e);
|
|
5229
5237
|
/**
|
|
5230
5238
|
* Краткие данные о клиенте.
|
|
@@ -5266,16 +5274,16 @@ class vr extends Cr {
|
|
|
5266
5274
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5267
5275
|
*/
|
|
5268
5276
|
t(this, "isNotInStock");
|
|
5269
|
-
this.client = new
|
|
5277
|
+
this.client = new me(e == null ? void 0 : e.client), this.payment = {
|
|
5270
5278
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5271
5279
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5272
5280
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5273
5281
|
}, this.delivery = {
|
|
5274
5282
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5275
|
-
date:
|
|
5276
|
-
address: (
|
|
5277
|
-
warehouse: (
|
|
5278
|
-
}, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt =
|
|
5283
|
+
date: w((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? a(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
|
|
5284
|
+
address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ve(e.delivery.address) : void 0,
|
|
5285
|
+
warehouse: (C = e == null ? void 0 : e.delivery) != null && C.warehouse ? new Re(e.delivery.warehouse) : void 0
|
|
5286
|
+
}, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt = w(e == null ? void 0 : e.pendingAt) ? a(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = w(e == null ? void 0 : e.processedAt) ? a(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;
|
|
5279
5287
|
}
|
|
5280
5288
|
}
|
|
5281
5289
|
class at extends H {
|
|
@@ -5404,7 +5412,7 @@ class Ct extends vr {
|
|
|
5404
5412
|
this.products = (e.products ?? []).map((s) => new at(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new v(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5405
5413
|
}
|
|
5406
5414
|
}
|
|
5407
|
-
class ss extends
|
|
5415
|
+
class ss extends De {
|
|
5408
5416
|
/**
|
|
5409
5417
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5410
5418
|
*
|
|
@@ -5438,7 +5446,7 @@ class ss extends $e {
|
|
|
5438
5446
|
return this.get(`/internal/orders/${r}`, {}, (e) => new Ct(e.data));
|
|
5439
5447
|
}
|
|
5440
5448
|
}
|
|
5441
|
-
class
|
|
5449
|
+
class _e {
|
|
5442
5450
|
/**
|
|
5443
5451
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5444
5452
|
*
|
|
@@ -5465,10 +5473,10 @@ class de {
|
|
|
5465
5473
|
* Источник клиентской цены.
|
|
5466
5474
|
*/
|
|
5467
5475
|
t(this, "source");
|
|
5468
|
-
this.client = new
|
|
5476
|
+
this.client = new me(r == null ? void 0 : r.client), this.product = new x(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? je.Product;
|
|
5469
5477
|
}
|
|
5470
5478
|
}
|
|
5471
|
-
const
|
|
5479
|
+
const de = (n) => {
|
|
5472
5480
|
var r, e, s, i, o;
|
|
5473
5481
|
return n ? sr(
|
|
5474
5482
|
{
|
|
@@ -5479,7 +5487,7 @@ const Ie = (n) => {
|
|
|
5479
5487
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5480
5488
|
hideNotActive: n.hideNotActive
|
|
5481
5489
|
},
|
|
5482
|
-
(c) =>
|
|
5490
|
+
(c) => A(c) || (Q(c) || ir(c)) && Y(c)
|
|
5483
5491
|
) : {};
|
|
5484
5492
|
}, Xe = (n) => {
|
|
5485
5493
|
const r = {};
|
|
@@ -5500,9 +5508,9 @@ class is extends h {
|
|
|
5500
5508
|
`/internal/price/products/${r}/analyze`,
|
|
5501
5509
|
{
|
|
5502
5510
|
...Xe(e),
|
|
5503
|
-
filters:
|
|
5511
|
+
filters: de(s)
|
|
5504
5512
|
},
|
|
5505
|
-
(i) => i.data.map((o) => new
|
|
5513
|
+
(i) => i.data.map((o) => new _e(o))
|
|
5506
5514
|
);
|
|
5507
5515
|
}
|
|
5508
5516
|
/**
|
|
@@ -5519,9 +5527,9 @@ class is extends h {
|
|
|
5519
5527
|
`/internal/price/categories/${r}/analyze`,
|
|
5520
5528
|
{
|
|
5521
5529
|
...Xe(e),
|
|
5522
|
-
filters:
|
|
5530
|
+
filters: de(s)
|
|
5523
5531
|
},
|
|
5524
|
-
(i) => i.data.map((o) => new
|
|
5532
|
+
(i) => i.data.map((o) => new _e(o))
|
|
5525
5533
|
);
|
|
5526
5534
|
}
|
|
5527
5535
|
/**
|
|
@@ -5540,9 +5548,9 @@ class is extends h {
|
|
|
5540
5548
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5541
5549
|
{
|
|
5542
5550
|
...e,
|
|
5543
|
-
filters:
|
|
5551
|
+
filters: de(s)
|
|
5544
5552
|
},
|
|
5545
|
-
(i) => i.data.map((o) => new
|
|
5553
|
+
(i) => i.data.map((o) => new _e(o))
|
|
5546
5554
|
);
|
|
5547
5555
|
}
|
|
5548
5556
|
}
|
|
@@ -5593,7 +5601,7 @@ class vt {
|
|
|
5593
5601
|
* @inheritDoc
|
|
5594
5602
|
*/
|
|
5595
5603
|
t(this, "currency");
|
|
5596
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
5604
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = w(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new F(r.client) : void 0, this.executor = r.executor ? new F(r.executor) : void 0, this.currency = r.currency ? new ae(r.currency) : void 0;
|
|
5597
5605
|
}
|
|
5598
5606
|
}
|
|
5599
5607
|
class Pt extends oe {
|
|
@@ -5608,10 +5616,16 @@ class Pt extends oe {
|
|
|
5608
5616
|
* @inheritDoc
|
|
5609
5617
|
*/
|
|
5610
5618
|
t(this, "history");
|
|
5611
|
-
this.history =
|
|
5619
|
+
this.history = he(e.history, (s) => new vt(s));
|
|
5612
5620
|
}
|
|
5613
5621
|
}
|
|
5614
5622
|
class ns extends h {
|
|
5623
|
+
/**
|
|
5624
|
+
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5625
|
+
*/
|
|
5626
|
+
constructor() {
|
|
5627
|
+
super(), this.baseUrl = `${D.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
|
|
5628
|
+
}
|
|
5615
5629
|
/**
|
|
5616
5630
|
* Возвращает данные об истории изменения цен.
|
|
5617
5631
|
*
|
|
@@ -5620,19 +5634,17 @@ class ns extends h {
|
|
|
5620
5634
|
* @see /docs/api#/operations/api_internal_price_history_get
|
|
5621
5635
|
*/
|
|
5622
5636
|
getProductPriceHistory(r) {
|
|
5623
|
-
var o, c,
|
|
5624
|
-
const e =
|
|
5625
|
-
|
|
5637
|
+
var i, o, c, p;
|
|
5638
|
+
const e = D.getConfig().dateFormats.api, s = sr(
|
|
5639
|
+
Oe(r, {
|
|
5626
5640
|
costDate: {
|
|
5627
|
-
from:
|
|
5628
|
-
to:
|
|
5641
|
+
from: Ie((i = r.costDate) == null ? void 0 : i.from) ? U(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
5642
|
+
to: Ie((c = r.costDate) == null ? void 0 : c.to) ? U(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
5629
5643
|
}
|
|
5630
5644
|
}),
|
|
5631
|
-
(
|
|
5632
|
-
)
|
|
5633
|
-
return
|
|
5634
|
-
new Pt(ye(m[0], { history: m }))
|
|
5635
|
-
]);
|
|
5645
|
+
(u) => A(u) || (Q(u) || ir(u)) && Y(u)
|
|
5646
|
+
);
|
|
5647
|
+
return this.get("/internal/history", s, (u) => he(u.data, (m) => new Pt(m)));
|
|
5636
5648
|
}
|
|
5637
5649
|
}
|
|
5638
5650
|
class Ze {
|
|
@@ -5654,6 +5666,12 @@ class Ze {
|
|
|
5654
5666
|
}
|
|
5655
5667
|
}
|
|
5656
5668
|
class os extends h {
|
|
5669
|
+
/**
|
|
5670
|
+
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5671
|
+
*/
|
|
5672
|
+
constructor() {
|
|
5673
|
+
super(), this.baseUrl = `${D.getConfig().http.recommendationsApiUrl ?? ""}/api`;
|
|
5674
|
+
}
|
|
5657
5675
|
/**
|
|
5658
5676
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
5659
5677
|
*
|
|
@@ -5661,7 +5679,7 @@ class os extends h {
|
|
|
5661
5679
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5662
5680
|
*/
|
|
5663
5681
|
getProductCategoryRecommendations(r) {
|
|
5664
|
-
return this.get(`/internal/
|
|
5682
|
+
return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5665
5683
|
}
|
|
5666
5684
|
/**
|
|
5667
5685
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5670,7 +5688,7 @@ class os extends h {
|
|
|
5670
5688
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5671
5689
|
*/
|
|
5672
5690
|
getProductRecommendations(r) {
|
|
5673
|
-
return this.get(`/internal/
|
|
5691
|
+
return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
|
|
5674
5692
|
}
|
|
5675
5693
|
/**
|
|
5676
5694
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5680,7 +5698,7 @@ class os extends h {
|
|
|
5680
5698
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_save
|
|
5681
5699
|
*/
|
|
5682
5700
|
saveProductCategoryRecommendations(r, e) {
|
|
5683
|
-
return this.post(`/internal/
|
|
5701
|
+
return this.post(`/internal/recommendations/categories/${r.id}`, {
|
|
5684
5702
|
product_categories: e.productCategories.map((s) => s.id),
|
|
5685
5703
|
products: e.products.map((s) => s.id)
|
|
5686
5704
|
});
|
|
@@ -5693,13 +5711,13 @@ class os extends h {
|
|
|
5693
5711
|
* @see /docs/api#/operations/api_internal_recommendations_product_save
|
|
5694
5712
|
*/
|
|
5695
5713
|
saveProductRecommendations(r, e) {
|
|
5696
|
-
return this.post(`/internal/
|
|
5714
|
+
return this.post(`/internal/recommendations/products/${r.id}`, {
|
|
5697
5715
|
product_categories: e.productCategories.map((s) => s.id),
|
|
5698
5716
|
products: e.products.map((s) => s.id)
|
|
5699
5717
|
});
|
|
5700
5718
|
}
|
|
5701
5719
|
}
|
|
5702
|
-
class
|
|
5720
|
+
class T extends ue {
|
|
5703
5721
|
/**
|
|
5704
5722
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5705
5723
|
*
|
|
@@ -5758,7 +5776,7 @@ class $ extends pe {
|
|
|
5758
5776
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
5759
5777
|
*/
|
|
5760
5778
|
getPaymentTypes() {
|
|
5761
|
-
return this.getTypedDataArrayRequester(
|
|
5779
|
+
return this.getTypedDataArrayRequester(pt, "/public/references/payment-type", !0);
|
|
5762
5780
|
}
|
|
5763
5781
|
/**
|
|
5764
5782
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
@@ -5812,7 +5830,7 @@ class $ extends pe {
|
|
|
5812
5830
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5813
5831
|
*/
|
|
5814
5832
|
getWarehouses() {
|
|
5815
|
-
return this.getTypedDataArrayRequester(
|
|
5833
|
+
return this.getTypedDataArrayRequester(Re, "/public/references/warehouse", !0);
|
|
5816
5834
|
}
|
|
5817
5835
|
/**
|
|
5818
5836
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
@@ -5824,17 +5842,17 @@ class $ extends pe {
|
|
|
5824
5842
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5825
5843
|
*/
|
|
5826
5844
|
getPriceCoefficients() {
|
|
5827
|
-
return this.getTypedDataArrayRequester(
|
|
5845
|
+
return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
|
|
5828
5846
|
}
|
|
5829
5847
|
/**
|
|
5830
5848
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5831
5849
|
*/
|
|
5832
5850
|
getProductFileType() {
|
|
5833
|
-
return this.getTypedDataArrayRequester(
|
|
5851
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/product-file-type", !0);
|
|
5834
5852
|
}
|
|
5835
5853
|
}
|
|
5836
5854
|
const R = te("__references_private", () => {
|
|
5837
|
-
const n =
|
|
5855
|
+
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), p = f(void 0), u = f(void 0), m = f(void 0), C = f(void 0), $ = f(void 0), d = f(void 0), I = f(void 0), S = f(void 0), _ = f(void 0), q = f(void 0), l = f(void 0);
|
|
5838
5856
|
return {
|
|
5839
5857
|
/**
|
|
5840
5858
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5867,23 +5885,23 @@ const R = te("__references_private", () => {
|
|
|
5867
5885
|
/**
|
|
5868
5886
|
* Справочник статусов оплаты заказа.
|
|
5869
5887
|
*/
|
|
5870
|
-
orderPaymentStatusReference:
|
|
5888
|
+
orderPaymentStatusReference: p,
|
|
5871
5889
|
/**
|
|
5872
5890
|
* Справочник статусов заказов.
|
|
5873
5891
|
*/
|
|
5874
|
-
orderStatusReference:
|
|
5892
|
+
orderStatusReference: u,
|
|
5875
5893
|
/**
|
|
5876
5894
|
* Справочник типов оплаты заказов.
|
|
5877
5895
|
*/
|
|
5878
|
-
paymentTypeReference:
|
|
5896
|
+
paymentTypeReference: m,
|
|
5879
5897
|
/**
|
|
5880
5898
|
* Справочник групп партнеров.
|
|
5881
5899
|
*/
|
|
5882
|
-
partnerGroupReference:
|
|
5900
|
+
partnerGroupReference: C,
|
|
5883
5901
|
/**
|
|
5884
5902
|
* Справочник типов файлов продукктов/категорий.
|
|
5885
5903
|
*/
|
|
5886
|
-
productFileTypeReference:
|
|
5904
|
+
productFileTypeReference: $,
|
|
5887
5905
|
/**
|
|
5888
5906
|
* Справочник типов ресурсов.
|
|
5889
5907
|
*/
|
|
@@ -5903,7 +5921,7 @@ const R = te("__references_private", () => {
|
|
|
5903
5921
|
/**
|
|
5904
5922
|
* Справочник типов свойств.
|
|
5905
5923
|
*/
|
|
5906
|
-
propertyTypesReference:
|
|
5924
|
+
propertyTypesReference: q,
|
|
5907
5925
|
/**
|
|
5908
5926
|
* Справочник коэффициентов цен.
|
|
5909
5927
|
*/
|
|
@@ -5912,89 +5930,89 @@ const R = te("__references_private", () => {
|
|
|
5912
5930
|
}), cs = te("references", () => {
|
|
5913
5931
|
const n = P(() => {
|
|
5914
5932
|
const l = R();
|
|
5915
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5933
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
5916
5934
|
l.channelPrimaryInterestReference = g;
|
|
5917
|
-
}).catch(
|
|
5935
|
+
}).catch(y)), l.channelPrimaryInterestReference;
|
|
5918
5936
|
}), r = P(() => {
|
|
5919
5937
|
const l = R();
|
|
5920
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5938
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
5921
5939
|
l.contactPositionsReference = g;
|
|
5922
|
-
}).catch(
|
|
5940
|
+
}).catch(y)), l.contactPositionsReference;
|
|
5923
5941
|
}), e = P(() => {
|
|
5924
5942
|
const l = R();
|
|
5925
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5943
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
5926
5944
|
l.currencyReference = g;
|
|
5927
|
-
}).catch(
|
|
5945
|
+
}).catch(y)), l.currencyReference;
|
|
5928
5946
|
}), s = P(() => {
|
|
5929
5947
|
const l = R();
|
|
5930
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5948
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
5931
5949
|
l.opfReference = g;
|
|
5932
|
-
}).catch(
|
|
5950
|
+
}).catch(y)), l.opfReference;
|
|
5933
5951
|
}), i = P(() => {
|
|
5934
5952
|
const l = R();
|
|
5935
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5953
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
5936
5954
|
l.orderPaymentStatusReference = g;
|
|
5937
|
-
}).catch(
|
|
5955
|
+
}).catch(y)), l.orderPaymentStatusReference;
|
|
5938
5956
|
}), o = P(() => {
|
|
5939
5957
|
const l = R();
|
|
5940
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5958
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
5941
5959
|
l.orderStatusReference = g;
|
|
5942
|
-
}).catch(
|
|
5960
|
+
}).catch(y)), l.orderStatusReference;
|
|
5943
5961
|
}), c = P(() => {
|
|
5944
5962
|
const l = R();
|
|
5945
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5963
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
5946
5964
|
l.paymentTypeReference = g;
|
|
5947
|
-
}).catch(
|
|
5948
|
-
}),
|
|
5965
|
+
}).catch(y)), l.paymentTypeReference;
|
|
5966
|
+
}), p = P(() => {
|
|
5949
5967
|
const l = R();
|
|
5950
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(
|
|
5968
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
5951
5969
|
l.partnerGroupReference = g;
|
|
5952
|
-
}).catch(
|
|
5953
|
-
}),
|
|
5970
|
+
}).catch(y)), l.partnerGroupReference;
|
|
5971
|
+
}), u = P(() => {
|
|
5954
5972
|
const l = R();
|
|
5955
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(
|
|
5973
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
5956
5974
|
l.productFileTypeReference = g;
|
|
5957
|
-
}).catch(
|
|
5958
|
-
}),
|
|
5975
|
+
}).catch(y)), l.productFileTypeReference;
|
|
5976
|
+
}), m = P(() => {
|
|
5959
5977
|
const l = R();
|
|
5960
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5978
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
5961
5979
|
l.resourceTypesReference = g;
|
|
5962
|
-
}).catch(
|
|
5963
|
-
}),
|
|
5980
|
+
}).catch(y)), l.resourceTypesReference;
|
|
5981
|
+
}), C = P(() => {
|
|
5964
5982
|
const l = R();
|
|
5965
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5983
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
5966
5984
|
l.salesDirectionsReference = g;
|
|
5967
|
-
}).catch(
|
|
5968
|
-
}),
|
|
5985
|
+
}).catch(y)), l.salesDirectionsReference;
|
|
5986
|
+
}), $ = P(() => {
|
|
5969
5987
|
const l = R();
|
|
5970
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5988
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
5971
5989
|
l.sourcePrimaryInterestReference = g;
|
|
5972
|
-
}).catch(
|
|
5990
|
+
}).catch(y)), l.sourcePrimaryInterestReference;
|
|
5973
5991
|
}), d = P(() => {
|
|
5974
5992
|
const l = R();
|
|
5975
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5993
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
5976
5994
|
l.deliveryTypeReference = g;
|
|
5977
|
-
}).catch(
|
|
5995
|
+
}).catch(y)), l.deliveryTypeReference;
|
|
5978
5996
|
}), I = P(() => {
|
|
5979
5997
|
const l = R();
|
|
5980
5998
|
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
|
|
5981
5999
|
l.managersList = g;
|
|
5982
|
-
}).catch(
|
|
6000
|
+
}).catch(y)), l.managersList;
|
|
5983
6001
|
}), S = P(() => {
|
|
5984
6002
|
const l = R();
|
|
5985
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
6003
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
5986
6004
|
l.warehousesReference = g;
|
|
5987
|
-
}).catch(
|
|
6005
|
+
}).catch(y)), l.warehousesReference;
|
|
5988
6006
|
}), _ = P(() => {
|
|
5989
6007
|
const l = R();
|
|
5990
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
6008
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
5991
6009
|
l.propertyTypesReference = g;
|
|
5992
|
-
}).catch(
|
|
5993
|
-
}),
|
|
6010
|
+
}).catch(y)), l.propertyTypesReference;
|
|
6011
|
+
}), q = P(() => {
|
|
5994
6012
|
const l = R();
|
|
5995
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
6013
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
5996
6014
|
l.priceCoefficientsReference = g;
|
|
5997
|
-
}).catch(
|
|
6015
|
+
}).catch(y)), l.priceCoefficientsReference;
|
|
5998
6016
|
});
|
|
5999
6017
|
return {
|
|
6000
6018
|
/**
|
|
@@ -6028,23 +6046,23 @@ const R = te("__references_private", () => {
|
|
|
6028
6046
|
/**
|
|
6029
6047
|
* Справочник групп партнеров.
|
|
6030
6048
|
*/
|
|
6031
|
-
partnerGroupsReference:
|
|
6049
|
+
partnerGroupsReference: p,
|
|
6032
6050
|
/**
|
|
6033
6051
|
* Справочник типов файлов продуктов/категорий.
|
|
6034
6052
|
*/
|
|
6035
|
-
productFilesTypesReference:
|
|
6053
|
+
productFilesTypesReference: u,
|
|
6036
6054
|
/**
|
|
6037
6055
|
* Справочник типов ресурсов.
|
|
6038
6056
|
*/
|
|
6039
|
-
resourceTypesReference:
|
|
6057
|
+
resourceTypesReference: m,
|
|
6040
6058
|
/**
|
|
6041
6059
|
* Справочник направлений продаж.
|
|
6042
6060
|
*/
|
|
6043
|
-
salesDirectionsReference:
|
|
6061
|
+
salesDirectionsReference: C,
|
|
6044
6062
|
/**
|
|
6045
6063
|
* Справочник каналов первичного интереса.
|
|
6046
6064
|
*/
|
|
6047
|
-
sourcePrimaryInterestsReference:
|
|
6065
|
+
sourcePrimaryInterestsReference: $,
|
|
6048
6066
|
/**
|
|
6049
6067
|
* Справочник типов доставки.
|
|
6050
6068
|
*/
|
|
@@ -6064,7 +6082,7 @@ const R = te("__references_private", () => {
|
|
|
6064
6082
|
/**
|
|
6065
6083
|
* Справочник коэффициентов цен.
|
|
6066
6084
|
*/
|
|
6067
|
-
priceCoefficientsReference:
|
|
6085
|
+
priceCoefficientsReference: q
|
|
6068
6086
|
};
|
|
6069
6087
|
});
|
|
6070
6088
|
class Rt {
|
|
@@ -6155,7 +6173,7 @@ class ls extends h {
|
|
|
6155
6173
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6156
6174
|
}
|
|
6157
6175
|
}
|
|
6158
|
-
class
|
|
6176
|
+
class ps extends h {
|
|
6159
6177
|
/**
|
|
6160
6178
|
* Возвращает подсказки по адресам.
|
|
6161
6179
|
*
|
|
@@ -6202,8 +6220,8 @@ class us extends h {
|
|
|
6202
6220
|
});
|
|
6203
6221
|
}
|
|
6204
6222
|
}
|
|
6205
|
-
var
|
|
6206
|
-
class
|
|
6223
|
+
var At = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(At || {});
|
|
6224
|
+
class Dt extends ur {
|
|
6207
6225
|
/**
|
|
6208
6226
|
* Инициализирует экземпляр класса {@link User}.
|
|
6209
6227
|
*
|
|
@@ -6226,12 +6244,12 @@ class At extends pr {
|
|
|
6226
6244
|
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;
|
|
6227
6245
|
}
|
|
6228
6246
|
}
|
|
6229
|
-
class
|
|
6247
|
+
class us extends h {
|
|
6230
6248
|
/**
|
|
6231
6249
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6232
6250
|
*/
|
|
6233
6251
|
constructor() {
|
|
6234
|
-
super(), this.baseUrl = `${
|
|
6252
|
+
super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6235
6253
|
}
|
|
6236
6254
|
/**
|
|
6237
6255
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6248,11 +6266,11 @@ class $t extends h {
|
|
|
6248
6266
|
*/
|
|
6249
6267
|
// eslint-disable-next-line class-methods-use-this
|
|
6250
6268
|
getCurrentUser() {
|
|
6251
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6269
|
+
return this.get("/internal/users/info", {}, (r) => new Dt(r.data));
|
|
6252
6270
|
}
|
|
6253
6271
|
}
|
|
6254
6272
|
const Tt = te("__user_state_private", () => {
|
|
6255
|
-
const n =
|
|
6273
|
+
const n = f({}), r = f(void 0);
|
|
6256
6274
|
return {
|
|
6257
6275
|
/**
|
|
6258
6276
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -6271,7 +6289,7 @@ const Tt = te("__user_state_private", () => {
|
|
|
6271
6289
|
const r = Tt();
|
|
6272
6290
|
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
|
|
6273
6291
|
r.currentUser = e;
|
|
6274
|
-
}).catch(
|
|
6292
|
+
}).catch(y).finally(() => {
|
|
6275
6293
|
r.dataLoaderList.currentUser = !1;
|
|
6276
6294
|
})), r.currentUser;
|
|
6277
6295
|
})
|
|
@@ -6301,12 +6319,12 @@ class gs {
|
|
|
6301
6319
|
}
|
|
6302
6320
|
export {
|
|
6303
6321
|
nt as AnyReference,
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
|
|
6307
|
-
|
|
6322
|
+
qt as AppBaseConfig,
|
|
6323
|
+
D as AppConfigProvider,
|
|
6324
|
+
xe as BankAccount,
|
|
6325
|
+
De as BasePaginationProvider,
|
|
6308
6326
|
Wr as CalculationTypeEnum,
|
|
6309
|
-
|
|
6327
|
+
fe as Cart,
|
|
6310
6328
|
Er as CartItem,
|
|
6311
6329
|
zr as CartItemBase,
|
|
6312
6330
|
Ot as CartProvider,
|
|
@@ -6326,17 +6344,17 @@ export {
|
|
|
6326
6344
|
Z as ClientProduct,
|
|
6327
6345
|
Bt as ClientProductCategoryDataProvider,
|
|
6328
6346
|
zt as ClientProductDataProvider,
|
|
6329
|
-
|
|
6347
|
+
me as ClientShortInfo,
|
|
6330
6348
|
it as ClientsAdditionalDataRequestTypeEnum,
|
|
6331
6349
|
Kt as ClientsListFilters,
|
|
6332
6350
|
oe as CodedIdentity,
|
|
6333
6351
|
es as ConfiguratorProvider,
|
|
6334
|
-
|
|
6352
|
+
Ne as Contact,
|
|
6335
6353
|
Qr as ContactLinks,
|
|
6336
6354
|
M as ContactPerson,
|
|
6337
6355
|
mt as ContactPersonRelated,
|
|
6338
6356
|
ot as ContactPosition,
|
|
6339
|
-
|
|
6357
|
+
Se as ContactRelation,
|
|
6340
6358
|
yr as ContragentBase,
|
|
6341
6359
|
Ce as ContragentFactory,
|
|
6342
6360
|
wr as ContragentIc,
|
|
@@ -6346,7 +6364,7 @@ export {
|
|
|
6346
6364
|
je as CostSourceEnum,
|
|
6347
6365
|
ee as Country,
|
|
6348
6366
|
ae as Currency,
|
|
6349
|
-
|
|
6367
|
+
ps as DataSuggestionProvider,
|
|
6350
6368
|
Qt as DataTablePagination,
|
|
6351
6369
|
yt as DataTablePaginationRequestParams,
|
|
6352
6370
|
Yt as DataTableSortRequestParams,
|
|
@@ -6358,12 +6376,12 @@ export {
|
|
|
6358
6376
|
Zr as DeviceTypeResolutionConfig,
|
|
6359
6377
|
Kr as DiscountShortInfo,
|
|
6360
6378
|
gs as FieldValidationResultData,
|
|
6361
|
-
|
|
6379
|
+
pe as FilterGroup,
|
|
6362
6380
|
Je as FilterItem,
|
|
6363
6381
|
He as FilterOpEnum,
|
|
6364
6382
|
cr as GeoCoordinates,
|
|
6365
6383
|
Hr as HiddenCatalogableItem,
|
|
6366
|
-
|
|
6384
|
+
ue as HttpCachedRequester,
|
|
6367
6385
|
et as HttpParamsConfig,
|
|
6368
6386
|
h as HttpRequester,
|
|
6369
6387
|
H as Identity,
|
|
@@ -6385,27 +6403,27 @@ export {
|
|
|
6385
6403
|
lt as OrderStatus,
|
|
6386
6404
|
ss as OrdersDataProvider,
|
|
6387
6405
|
re as PartnerGroup,
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6406
|
+
pt as PaymentType,
|
|
6407
|
+
ye as PreferencesStorageProvider,
|
|
6408
|
+
_e as PriceAnalyze,
|
|
6391
6409
|
is as PriceAnalyzeProvider,
|
|
6392
|
-
|
|
6410
|
+
Pe as PriceCoefficient,
|
|
6393
6411
|
or as PriceCoefficientEnum,
|
|
6394
6412
|
ns as PriceHistoryDataProvider,
|
|
6395
6413
|
vt as PriceHistoryItem,
|
|
6396
6414
|
W as PriceTemplate,
|
|
6397
|
-
|
|
6415
|
+
Te as PriceTemplateCategory,
|
|
6398
6416
|
se as PriceTemplateClient,
|
|
6399
|
-
|
|
6400
|
-
|
|
6417
|
+
pr as PriceTemplateICatalogableItem,
|
|
6418
|
+
be as PriceTemplateProduct,
|
|
6401
6419
|
Et as PriceTemplateProvider,
|
|
6402
6420
|
ne as PricingRole,
|
|
6403
6421
|
Wt as PricingRoleProvider,
|
|
6404
|
-
|
|
6422
|
+
Le as PrimaryCatalogableItem,
|
|
6405
6423
|
x as Product,
|
|
6406
6424
|
Mt as ProductCategoryDataProvider,
|
|
6407
6425
|
Ht as ProductDataProvider,
|
|
6408
|
-
|
|
6426
|
+
ut as ProductFileType,
|
|
6409
6427
|
Ge as ProductPriceCoefficient,
|
|
6410
6428
|
Pt as ProductPriceHistory,
|
|
6411
6429
|
Jt as PropertiesProvider,
|
|
@@ -6416,7 +6434,7 @@ export {
|
|
|
6416
6434
|
os as RecommendationsDataProvider,
|
|
6417
6435
|
Ze as RecommendationsList,
|
|
6418
6436
|
v as Reference,
|
|
6419
|
-
|
|
6437
|
+
T as ReferenceDataProvider,
|
|
6420
6438
|
le as Region,
|
|
6421
6439
|
mr as ResourceType,
|
|
6422
6440
|
N as SalesDirection,
|
|
@@ -6425,24 +6443,24 @@ export {
|
|
|
6425
6443
|
ls as SeoDataProvider,
|
|
6426
6444
|
fr as SourcePrimaryInterest,
|
|
6427
6445
|
Mr as StockCount,
|
|
6428
|
-
|
|
6446
|
+
Ut as TemplatesListFilters,
|
|
6429
6447
|
Fe as TypedInstanceFactory,
|
|
6430
6448
|
Ye as UnitsHelper,
|
|
6431
6449
|
Zt as UnknownClientDataProvider,
|
|
6432
6450
|
lr as UpdatableNamedIdentity,
|
|
6433
|
-
|
|
6434
|
-
|
|
6435
|
-
|
|
6451
|
+
Dt as User,
|
|
6452
|
+
us as UserAuthDataProvider,
|
|
6453
|
+
ur as UserCommonInfo,
|
|
6436
6454
|
$t as UserDataProvider,
|
|
6437
6455
|
Yr as UserPricingRole,
|
|
6438
6456
|
F as UserShortInfo,
|
|
6439
|
-
|
|
6457
|
+
At as UserTypeEnum,
|
|
6440
6458
|
tt as VersionConfig,
|
|
6441
|
-
|
|
6459
|
+
Re as Warehouse,
|
|
6442
6460
|
st as WebSocketConfig,
|
|
6443
6461
|
Ve as findCatalogItemByIdRecursive,
|
|
6444
6462
|
Ke as flattenCatalogItems,
|
|
6445
|
-
|
|
6463
|
+
$e as useAuthStateStore,
|
|
6446
6464
|
cs as useReferencesStore,
|
|
6447
6465
|
hs as useUserStateStore
|
|
6448
6466
|
};
|