@snabcentr/common-lib 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +782 -867
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/clients/classes/client.d.ts +15 -11
- package/dist/src/clients/classes/client.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-client.d.ts +4 -0
- package/dist/src/clients/interfaces/i-client.d.ts.map +1 -1
- package/dist/src/clients/providers/client-data-provider.d.ts +49 -48
- package/dist/src/clients/providers/client-data-provider.d.ts.map +1 -1
- package/dist/src/managers/classes/manager-common.d.ts +8 -4
- package/dist/src/managers/classes/manager-common.d.ts.map +1 -1
- package/dist/src/managers/interfaces/i-manager-common.d.ts +4 -0
- package/dist/src/managers/interfaces/i-manager-common.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import { isAfter as ze, parseISO as
|
|
1
|
+
var Ar = Object.defineProperty;
|
|
2
|
+
var Dr = (n, r, e) => r in n ? Ar(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => Dr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as tr } from "jwt-decode";
|
|
5
|
+
import { merge as de, isUndefined as Tr, isNil as D, isEmpty as Y, noop as f, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as ar, constant as Sr, isString as y, cloneDeep as Ir, toLower as Lr, isFunction as Ue, map as he, forEach as xr, isDate as ke, omitBy as ir, isObject as nr } from "lodash-es";
|
|
6
|
+
import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
|
|
7
|
+
import { isAfter as ze, parseISO as w, startOfToday as _e, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as Nr, startOfYesterday as dr, endOfToday as Ur, endOfDay as Fr, startOfDay as Mr } from "date-fns";
|
|
8
8
|
import { defineStore as te } from "pinia";
|
|
9
|
-
import { ref as
|
|
10
|
-
import
|
|
11
|
-
class
|
|
9
|
+
import { ref as m, markRaw as jr, computed as P } from "vue";
|
|
10
|
+
import Gr from "axios";
|
|
11
|
+
class d {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class G {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
de(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class G {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = tr(r), s = new d(Fe(e));
|
|
111
111
|
return s.resourceAccess = e.resource_access, s;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class Nt extends
|
|
114
|
+
class Nt extends d {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class Nt extends G {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
t(this, "address");
|
|
146
|
-
|
|
146
|
+
de(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
|
|
154
|
+
return new d(Fe(tr(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 (Tr(J.config))
|
|
172
172
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
173
173
|
return J.config;
|
|
174
174
|
}
|
|
@@ -190,7 +190,7 @@ const J = class J {
|
|
|
190
190
|
* Конфигурация приложения.
|
|
191
191
|
*/
|
|
192
192
|
t(J, "config");
|
|
193
|
-
let
|
|
193
|
+
let T = J;
|
|
194
194
|
class ye {
|
|
195
195
|
/**
|
|
196
196
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
@@ -210,8 +210,8 @@ class ye {
|
|
|
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(w(s.availableFor) || _e(), /* @__PURE__ */ new Date())) {
|
|
214
|
+
if (D(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 ye {
|
|
|
233
233
|
static saveActualDataToStorage(r, e, s) {
|
|
234
234
|
if (this.isLocalStorageAvailable())
|
|
235
235
|
try {
|
|
236
|
-
if (
|
|
236
|
+
if (D(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 ye {
|
|
|
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(w(o.availableFor) || _e(), /* @__PURE__ */ new Date()) && r.push(s);
|
|
288
288
|
}
|
|
289
289
|
} catch {
|
|
290
290
|
r.push(s);
|
|
@@ -300,33 +300,33 @@ class ye {
|
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
}
|
|
303
|
-
function
|
|
303
|
+
function We(n) {
|
|
304
304
|
try {
|
|
305
|
-
const r =
|
|
305
|
+
const r = d.getJwtPayload(n);
|
|
306
306
|
return new Date(r.exp * 1e3);
|
|
307
307
|
} catch {
|
|
308
308
|
return;
|
|
309
309
|
}
|
|
310
310
|
}
|
|
311
311
|
const B = te("__auth_state_private", () => {
|
|
312
|
-
const n =
|
|
312
|
+
const n = m(
|
|
313
313
|
(() => {
|
|
314
|
-
var
|
|
314
|
+
var u;
|
|
315
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 = (u = T.getConfig().devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
322
322
|
return c ? Promise.resolve(c) : void 0;
|
|
323
323
|
})()
|
|
324
|
-
), r =
|
|
324
|
+
), r = m(void 0), e = m(void 0), s = jr(/* @__PURE__ */ new Map());
|
|
325
325
|
function i() {
|
|
326
|
-
e.value = void 0,
|
|
327
|
-
const c =
|
|
328
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
329
|
-
}).catch(
|
|
326
|
+
e.value = void 0, D(n.value) || n.value.then((o) => {
|
|
327
|
+
const c = d.getJwtPayload(o);
|
|
328
|
+
e.value = c.exp * 1e3 > Date.now() ? sr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
329
|
+
}).catch(f);
|
|
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
|
+
}), be = te("__auth_state", () => {
|
|
354
354
|
const n = P(() => {
|
|
355
355
|
const o = B();
|
|
356
|
-
if (
|
|
356
|
+
if (D(o.jwtToken) && !D(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((u) => {
|
|
359
|
+
o.jwtToken = Promise.resolve(u), ye.saveActualDataToStorage("sc.token", u, We(u)), o.recalculateUserPermissions();
|
|
360
|
+
}).catch(f);
|
|
361
361
|
}
|
|
362
362
|
return o.jwtToken;
|
|
363
363
|
});
|
|
@@ -366,7 +366,7 @@ const B = te("__auth_state_private", () => {
|
|
|
366
366
|
}
|
|
367
367
|
function e(o) {
|
|
368
368
|
const c = B();
|
|
369
|
-
c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o,
|
|
369
|
+
c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
|
|
370
370
|
}
|
|
371
371
|
function s() {
|
|
372
372
|
const o = B();
|
|
@@ -374,25 +374,25 @@ const B = te("__auth_state_private", () => {
|
|
|
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
|
|
386
|
-
var
|
|
387
|
-
const
|
|
388
|
-
if (
|
|
377
|
+
!D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((v) => {
|
|
378
|
+
const R = d.getJwtPayload(v);
|
|
379
|
+
c.userPermissions = R.exp * 1e3 > Date.now() ? sr(R.resourceAccess, (a) => (a == null ? void 0 : a.roles) ?? []) : void 0;
|
|
380
|
+
}).catch(f);
|
|
381
|
+
const u = Q(o) ? o.join(" && ") : o;
|
|
382
|
+
if (c.userPermissionsComputedRefs.has(u))
|
|
383
|
+
return c.userPermissionsComputedRefs.get(u);
|
|
384
|
+
const p = P(() => {
|
|
385
|
+
const v = (R) => {
|
|
386
|
+
var H;
|
|
387
|
+
const a = br(R, ".");
|
|
388
|
+
if (a.length < 2)
|
|
389
389
|
return !1;
|
|
390
|
-
const [
|
|
391
|
-
return Q(
|
|
390
|
+
const [_, O] = a, G = (H = B().userPermissions) == null ? void 0 : H[_];
|
|
391
|
+
return Q(G) && G.includes(O);
|
|
392
392
|
};
|
|
393
|
-
return Q(o) ?
|
|
393
|
+
return Q(o) ? $r(o, (R) => v(R)) : v(o);
|
|
394
394
|
});
|
|
395
|
-
return c.userPermissionsComputedRefs.set(
|
|
395
|
+
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
396
396
|
}
|
|
397
397
|
return {
|
|
398
398
|
/**
|
|
@@ -423,7 +423,7 @@ const B = te("__auth_state_private", () => {
|
|
|
423
423
|
hasUserPermission: i
|
|
424
424
|
};
|
|
425
425
|
});
|
|
426
|
-
class
|
|
426
|
+
class j {
|
|
427
427
|
/**
|
|
428
428
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
429
429
|
*
|
|
@@ -439,16 +439,16 @@ 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, D(this.id) && (D(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 === "" : D(this.id);
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
|
-
class b extends
|
|
451
|
+
class b extends j {
|
|
452
452
|
/**
|
|
453
453
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
454
454
|
*
|
|
@@ -478,7 +478,7 @@ class oe extends b {
|
|
|
478
478
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
479
479
|
}
|
|
480
480
|
}
|
|
481
|
-
class
|
|
481
|
+
class or extends oe {
|
|
482
482
|
/**
|
|
483
483
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
484
484
|
*
|
|
@@ -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 Oe extends or {
|
|
501
501
|
/**
|
|
502
502
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
503
503
|
*
|
|
@@ -512,7 +512,7 @@ class Le extends nr {
|
|
|
512
512
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
class ge extends
|
|
515
|
+
class ge extends Oe {
|
|
516
516
|
/**
|
|
517
517
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
518
518
|
*
|
|
@@ -536,11 +536,11 @@ class ge extends Le {
|
|
|
536
536
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
537
537
|
*/
|
|
538
538
|
t(this, "currencyRates");
|
|
539
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
539
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [ar(s), i])) : void 0;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
var
|
|
543
|
-
class
|
|
542
|
+
var cr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(cr || {});
|
|
543
|
+
class C extends b {
|
|
544
544
|
/**
|
|
545
545
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
546
546
|
*
|
|
@@ -559,15 +559,15 @@ 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 Re extends C {
|
|
563
563
|
/**
|
|
564
564
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
565
565
|
*/
|
|
566
566
|
static getRetailPriceCoefficient() {
|
|
567
|
-
return { id: -2, slug:
|
|
567
|
+
return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec: Sr(!0) };
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
class
|
|
570
|
+
class Me {
|
|
571
571
|
/**
|
|
572
572
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
573
573
|
*
|
|
@@ -594,10 +594,10 @@ class Ge {
|
|
|
594
594
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
595
595
|
*/
|
|
596
596
|
t(this, "readOnly");
|
|
597
|
-
this.coefficient = new
|
|
597
|
+
this.coefficient = new Re(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
|
-
class
|
|
600
|
+
class lr {
|
|
601
601
|
/**
|
|
602
602
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
603
603
|
*
|
|
@@ -615,9 +615,9 @@ class cr {
|
|
|
615
615
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
616
616
|
}
|
|
617
617
|
}
|
|
618
|
-
class X extends
|
|
618
|
+
class X extends C {
|
|
619
619
|
}
|
|
620
|
-
class
|
|
620
|
+
class Ae extends C {
|
|
621
621
|
/**
|
|
622
622
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
623
623
|
*
|
|
@@ -646,10 +646,10 @@ class Re extends v {
|
|
|
646
646
|
* Координаты склада.
|
|
647
647
|
*/
|
|
648
648
|
t(this, "coordinates");
|
|
649
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
649
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new lr(e == null ? void 0 : e.coordinates);
|
|
650
650
|
}
|
|
651
651
|
}
|
|
652
|
-
class
|
|
652
|
+
class Hr {
|
|
653
653
|
/**
|
|
654
654
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
655
655
|
*
|
|
@@ -664,10 +664,10 @@ class Mr {
|
|
|
664
664
|
* Количество остатков товара на складе.
|
|
665
665
|
*/
|
|
666
666
|
t(this, "count");
|
|
667
|
-
this.warehouse = new
|
|
667
|
+
this.warehouse = new Ae(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
class
|
|
670
|
+
class Br extends or {
|
|
671
671
|
/**
|
|
672
672
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
673
673
|
*
|
|
@@ -682,7 +682,7 @@ class Hr extends nr {
|
|
|
682
682
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
683
683
|
}
|
|
684
684
|
}
|
|
685
|
-
class
|
|
685
|
+
class Er {
|
|
686
686
|
/**
|
|
687
687
|
* Инициализирует экземпляр класса {@link Image}.
|
|
688
688
|
*
|
|
@@ -705,14 +705,14 @@ class Br {
|
|
|
705
705
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
706
706
|
}
|
|
707
707
|
}
|
|
708
|
-
class
|
|
708
|
+
class I extends Br {
|
|
709
709
|
/**
|
|
710
710
|
* Инициализирует экземпляр класса {@link Product}.
|
|
711
711
|
*
|
|
712
712
|
* @param data Данные для первоначальной инициализации.
|
|
713
713
|
*/
|
|
714
714
|
constructor(e) {
|
|
715
|
-
var i, o, c,
|
|
715
|
+
var i, o, c, u;
|
|
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 = y(e == null ? void 0 : e.costDate) ? w(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Hr(p))) ?? [], 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((p) => p.isPrimary));
|
|
795
|
+
s && (this.category = new Oe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Oe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Er(p, T.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
796
796
|
}
|
|
797
797
|
/**
|
|
798
798
|
* Возвращает признак, что это измеряемый товар.
|
|
799
799
|
*/
|
|
800
800
|
getIsMeasurable() {
|
|
801
801
|
var s;
|
|
802
|
-
const e = (s =
|
|
802
|
+
const e = (s = T.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
|
/**
|
|
@@ -815,7 +815,7 @@ class x extends Hr {
|
|
|
815
815
|
return this.retailCostRub ?? this.costRub;
|
|
816
816
|
}
|
|
817
817
|
}
|
|
818
|
-
class zr extends
|
|
818
|
+
class zr extends j {
|
|
819
819
|
/**
|
|
820
820
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
821
821
|
*
|
|
@@ -867,10 +867,10 @@ class zr extends H {
|
|
|
867
867
|
* Признак того, что позиция является дополнительной продажей.
|
|
868
868
|
*/
|
|
869
869
|
t(this, "isAdditionalSale");
|
|
870
|
-
this.product = new
|
|
870
|
+
this.product = new I(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 && Ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
871
871
|
}
|
|
872
872
|
}
|
|
873
|
-
class
|
|
873
|
+
class Wr extends zr {
|
|
874
874
|
/**
|
|
875
875
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
876
876
|
*
|
|
@@ -939,10 +939,10 @@ class fe {
|
|
|
939
939
|
* Список итоговых сумм по направлениям продаж.
|
|
940
940
|
*/
|
|
941
941
|
t(this, "directionsSum");
|
|
942
|
-
this.items = r.items.map((e) => new
|
|
942
|
+
this.items = r.items.map((e) => new Wr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
|
-
class
|
|
945
|
+
class je {
|
|
946
946
|
/**
|
|
947
947
|
* Инициализирует экземпляр указанного класса.
|
|
948
948
|
*
|
|
@@ -961,7 +961,7 @@ class Fe {
|
|
|
961
961
|
return new r(e);
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
const
|
|
964
|
+
const S = class S {
|
|
965
965
|
/**
|
|
966
966
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
967
967
|
*/
|
|
@@ -973,7 +973,7 @@ const L = class L {
|
|
|
973
973
|
/**
|
|
974
974
|
* Базовый URL путь для выполнения запросов.
|
|
975
975
|
*/
|
|
976
|
-
t(this, "baseUrl", `${
|
|
976
|
+
t(this, "baseUrl", `${T.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", f);
|
|
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 D(be().jwtToken) || (e = await be().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1004
1004
|
});
|
|
1005
1005
|
/**
|
|
1006
1006
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -1008,7 +1008,7 @@ const L = class L {
|
|
|
1008
1008
|
* @param request Данные запроса.
|
|
1009
1009
|
*/
|
|
1010
1010
|
// eslint-disable-next-line class-methods-use-this
|
|
1011
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
1011
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(Lr(r.method)) && r.data && (r.data = Ee(r.data))), r));
|
|
1012
1012
|
/**
|
|
1013
1013
|
* Перехватчик ошибок ответов на запрос.
|
|
1014
1014
|
*
|
|
@@ -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) : (be().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 =
|
|
1030
|
-
this.errorResponseHandler =
|
|
1028
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
|
|
1029
|
+
const r = T.getConfig().version;
|
|
1030
|
+
this.errorResponseHandler = S.defaultErrorsResponseHandler, this.httpClient = Gr.create({
|
|
1031
1031
|
headers: {
|
|
1032
|
-
"APP-VERSION": `${r.name} (${r.version}, ${
|
|
1032
|
+
"APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
|
|
1033
1033
|
Accept: "application/json",
|
|
1034
1034
|
"Content-Type": "application/json"
|
|
1035
1035
|
}
|
|
@@ -1038,7 +1038,7 @@ const L = class L {
|
|
|
1038
1038
|
(e) => Promise.reject(e)
|
|
1039
1039
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1040
1040
|
(e) => e,
|
|
1041
|
-
(e) =>
|
|
1041
|
+
(e) => S.convertHttpErrorResponse(e)
|
|
1042
1042
|
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1043
1043
|
this.dataConverterResponseInterceptor,
|
|
1044
1044
|
(e) => Promise.reject(e)
|
|
@@ -1050,7 +1050,7 @@ const L = class L {
|
|
|
1050
1050
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1051
1051
|
*/
|
|
1052
1052
|
static setDefaultErrorsResponseHandler(r) {
|
|
1053
|
-
|
|
1053
|
+
S.defaultErrorsResponseHandler = r;
|
|
1054
1054
|
}
|
|
1055
1055
|
/**
|
|
1056
1056
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1058,7 +1058,7 @@ const L = class L {
|
|
|
1058
1058
|
* @param type Тип данных, которыми оперирует метод.
|
|
1059
1059
|
*/
|
|
1060
1060
|
static getInstance(r) {
|
|
1061
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1061
|
+
return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = je.simpleInstanceInitializer(r)), S.instances[r.name];
|
|
1062
1062
|
}
|
|
1063
1063
|
/**
|
|
1064
1064
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1067,7 +1067,7 @@ const L = class L {
|
|
|
1067
1067
|
*/
|
|
1068
1068
|
static convertHttpErrorResponse(r) {
|
|
1069
1069
|
var e, s;
|
|
1070
|
-
if (!
|
|
1070
|
+
if (!D(r.request) || !D(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,
|
|
@@ -1156,16 +1156,16 @@ const L = class L {
|
|
|
1156
1156
|
* Экземпляр объекта текущего класса.
|
|
1157
1157
|
*/
|
|
1158
1158
|
// eslint-disable-next-line no-use-before-define
|
|
1159
|
-
t(
|
|
1159
|
+
t(S, "instances", {}), /**
|
|
1160
1160
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1161
1161
|
*
|
|
1162
1162
|
* @param error Данные об ошибке.
|
|
1163
1163
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1164
1164
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1165
1165
|
*/
|
|
1166
|
-
t(
|
|
1167
|
-
let h =
|
|
1168
|
-
class
|
|
1166
|
+
t(S, "defaultErrorsResponseHandler", f);
|
|
1167
|
+
let h = S;
|
|
1168
|
+
class dt extends h {
|
|
1169
1169
|
/**
|
|
1170
1170
|
* Возвращает содержимое корзины указанного клиента.
|
|
1171
1171
|
*
|
|
@@ -1279,8 +1279,8 @@ class Ot extends h {
|
|
|
1279
1279
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
|
-
var
|
|
1283
|
-
class
|
|
1282
|
+
var Jr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Jr || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), Vr = /* @__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))(Vr || {});
|
|
1283
|
+
class z extends ge {
|
|
1284
1284
|
/**
|
|
1285
1285
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1286
1286
|
*
|
|
@@ -1297,10 +1297,10 @@ class E extends ge {
|
|
|
1297
1297
|
* Список продуктов категории.
|
|
1298
1298
|
*/
|
|
1299
1299
|
t(this, "products");
|
|
1300
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1300
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new z(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new I(o));
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
class
|
|
1303
|
+
class ur extends b {
|
|
1304
1304
|
/**
|
|
1305
1305
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1306
1306
|
*
|
|
@@ -1312,10 +1312,10 @@ class lr extends b {
|
|
|
1312
1312
|
* Дата и время последнего изменения.
|
|
1313
1313
|
*/
|
|
1314
1314
|
t(this, "updatedAt");
|
|
1315
|
-
this.updatedAt =
|
|
1315
|
+
this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
|
-
class
|
|
1318
|
+
class Kr extends ur {
|
|
1319
1319
|
/**
|
|
1320
1320
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1321
1321
|
*
|
|
@@ -1327,10 +1327,10 @@ class Vr extends lr {
|
|
|
1327
1327
|
* Дата и время последнего удаления.
|
|
1328
1328
|
*/
|
|
1329
1329
|
t(this, "deletedAt");
|
|
1330
|
-
this.deletedAt =
|
|
1330
|
+
this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
class
|
|
1333
|
+
class U extends b {
|
|
1334
1334
|
/**
|
|
1335
1335
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1336
1336
|
*
|
|
@@ -1345,7 +1345,7 @@ class F extends b {
|
|
|
1345
1345
|
this.type = e == null ? void 0 : e.type;
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
class
|
|
1348
|
+
class Qr extends b {
|
|
1349
1349
|
/**
|
|
1350
1350
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1351
1351
|
*
|
|
@@ -1381,10 +1381,10 @@ 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 = y(e == null ? void 0 : e.publishedAt) ? w(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 U(e == null ? void 0 : e.owner), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1385
1385
|
}
|
|
1386
1386
|
}
|
|
1387
|
-
class W extends
|
|
1387
|
+
class W extends ur {
|
|
1388
1388
|
/**
|
|
1389
1389
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1390
1390
|
*
|
|
@@ -1400,10 +1400,10 @@ 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 = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1404
1404
|
}
|
|
1405
1405
|
}
|
|
1406
|
-
class Z extends
|
|
1406
|
+
class Z extends I {
|
|
1407
1407
|
/**
|
|
1408
1408
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1409
1409
|
*
|
|
@@ -1439,10 +1439,10 @@ class Z extends x {
|
|
|
1439
1439
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1440
1440
|
*/
|
|
1441
1441
|
t(this, "isFavorite");
|
|
1442
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1442
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new Qr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1443
1443
|
}
|
|
1444
1444
|
}
|
|
1445
|
-
class
|
|
1445
|
+
class Yr {
|
|
1446
1446
|
/**
|
|
1447
1447
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1448
1448
|
*
|
|
@@ -1460,7 +1460,7 @@ class Qr {
|
|
|
1460
1460
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1461
1461
|
}
|
|
1462
1462
|
}
|
|
1463
|
-
class
|
|
1463
|
+
class L extends C {
|
|
1464
1464
|
}
|
|
1465
1465
|
class ce extends b {
|
|
1466
1466
|
/**
|
|
@@ -1471,25 +1471,29 @@ class ce extends b {
|
|
|
1471
1471
|
constructor(e) {
|
|
1472
1472
|
super(e);
|
|
1473
1473
|
/**
|
|
1474
|
-
*
|
|
1474
|
+
* @inheritDoc
|
|
1475
1475
|
*/
|
|
1476
|
-
t(this, "salesDirection"
|
|
1476
|
+
t(this, "salesDirection");
|
|
1477
1477
|
/**
|
|
1478
|
-
*
|
|
1478
|
+
* @inheritDoc
|
|
1479
1479
|
*/
|
|
1480
1480
|
t(this, "photo");
|
|
1481
1481
|
/**
|
|
1482
|
-
*
|
|
1482
|
+
* @inheritDoc
|
|
1483
1483
|
*/
|
|
1484
1484
|
t(this, "contacts");
|
|
1485
1485
|
/**
|
|
1486
|
-
*
|
|
1486
|
+
* @inheritDoc
|
|
1487
1487
|
*/
|
|
1488
1488
|
t(this, "isDefault");
|
|
1489
|
-
|
|
1489
|
+
/**
|
|
1490
|
+
* @inheritDoc
|
|
1491
|
+
*/
|
|
1492
|
+
t(this, "isRegionalDirector");
|
|
1493
|
+
this.salesDirection = e != null && e.salesDirection ? new L(e.salesDirection) : new L(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Yr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
|
|
1490
1494
|
}
|
|
1491
1495
|
}
|
|
1492
|
-
class
|
|
1496
|
+
class Xr extends b {
|
|
1493
1497
|
/**
|
|
1494
1498
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1495
1499
|
*
|
|
@@ -1512,7 +1516,7 @@ class Yr extends b {
|
|
|
1512
1516
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1513
1517
|
}
|
|
1514
1518
|
}
|
|
1515
|
-
class
|
|
1519
|
+
class De extends ce {
|
|
1516
1520
|
/**
|
|
1517
1521
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1518
1522
|
*
|
|
@@ -1544,10 +1548,10 @@ class Ae extends ce {
|
|
|
1544
1548
|
* Данные роли ценообразования менеджера.
|
|
1545
1549
|
*/
|
|
1546
1550
|
t(this, "pricingRole");
|
|
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
|
|
1551
|
+
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 Xr(e.pricingRole) : void 0;
|
|
1548
1552
|
}
|
|
1549
1553
|
}
|
|
1550
|
-
class
|
|
1554
|
+
class Zr extends ge {
|
|
1551
1555
|
/**
|
|
1552
1556
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1553
1557
|
*
|
|
@@ -1575,10 +1579,10 @@ class Xr extends ge {
|
|
|
1575
1579
|
* Данные о менеджере за которым закреплена категория.
|
|
1576
1580
|
*/
|
|
1577
1581
|
t(this, "manager");
|
|
1578
|
-
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new
|
|
1582
|
+
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new De(e.manager) : void 0;
|
|
1579
1583
|
}
|
|
1580
1584
|
}
|
|
1581
|
-
class we extends
|
|
1585
|
+
class we extends Zr {
|
|
1582
1586
|
/**
|
|
1583
1587
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1584
1588
|
*
|
|
@@ -1613,10 +1617,10 @@ class pr {
|
|
|
1613
1617
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1614
1618
|
*/
|
|
1615
1619
|
t(this, "increasePercent");
|
|
1616
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1620
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1617
1621
|
}
|
|
1618
1622
|
}
|
|
1619
|
-
class
|
|
1623
|
+
class ae extends pr {
|
|
1620
1624
|
/**
|
|
1621
1625
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1622
1626
|
*
|
|
@@ -1631,9 +1635,9 @@ class Te extends pr {
|
|
|
1631
1635
|
this.productCategory = new ge(e == null ? void 0 : e.productCategory);
|
|
1632
1636
|
}
|
|
1633
1637
|
}
|
|
1634
|
-
class ee extends
|
|
1638
|
+
class ee extends C {
|
|
1635
1639
|
}
|
|
1636
|
-
class le extends
|
|
1640
|
+
class le extends C {
|
|
1637
1641
|
/**
|
|
1638
1642
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1639
1643
|
*
|
|
@@ -1648,7 +1652,7 @@ class le extends v {
|
|
|
1648
1652
|
e && (this.country = new ee(e.country));
|
|
1649
1653
|
}
|
|
1650
1654
|
}
|
|
1651
|
-
class
|
|
1655
|
+
class He extends C {
|
|
1652
1656
|
/**
|
|
1653
1657
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1654
1658
|
*
|
|
@@ -1663,7 +1667,7 @@ class Me extends v {
|
|
|
1663
1667
|
e && (this.region = new le(e.region));
|
|
1664
1668
|
}
|
|
1665
1669
|
}
|
|
1666
|
-
class
|
|
1670
|
+
class hr extends b {
|
|
1667
1671
|
/**
|
|
1668
1672
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1669
1673
|
*
|
|
@@ -1699,10 +1703,10 @@ class ur extends b {
|
|
|
1699
1703
|
* Признак активности учетной записи пользователя.
|
|
1700
1704
|
*/
|
|
1701
1705
|
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
|
|
1706
|
+
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new L(e.salesDirection) : void 0, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = y(e == null ? void 0 : e.lastLoginAt) ? w(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1703
1707
|
}
|
|
1704
1708
|
}
|
|
1705
|
-
class me extends
|
|
1709
|
+
class me extends hr {
|
|
1706
1710
|
/**
|
|
1707
1711
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1708
1712
|
*
|
|
@@ -1744,10 +1748,10 @@ class me extends ur {
|
|
|
1744
1748
|
* Список менеджеров клиента.
|
|
1745
1749
|
*/
|
|
1746
1750
|
t(this, "managers");
|
|
1747
|
-
this.salesDirection = new
|
|
1751
|
+
this.salesDirection = new L(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new He(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ce(i))) ?? [];
|
|
1748
1752
|
}
|
|
1749
1753
|
}
|
|
1750
|
-
class se extends
|
|
1754
|
+
class se extends j {
|
|
1751
1755
|
/**
|
|
1752
1756
|
* Инициализирует новый экземпляр класса.
|
|
1753
1757
|
*
|
|
@@ -1771,10 +1775,10 @@ class se extends H {
|
|
|
1771
1775
|
* Данные шаблона прайс-листа.
|
|
1772
1776
|
*/
|
|
1773
1777
|
t(this, "priceTemplate");
|
|
1774
|
-
this.createdAt =
|
|
1778
|
+
this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(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
1779
|
}
|
|
1776
1780
|
}
|
|
1777
|
-
class
|
|
1781
|
+
class Se extends pr {
|
|
1778
1782
|
/**
|
|
1779
1783
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1780
1784
|
*
|
|
@@ -1786,10 +1790,10 @@ class be extends pr {
|
|
|
1786
1790
|
* Базовые данные о продукте.
|
|
1787
1791
|
*/
|
|
1788
1792
|
t(this, "product");
|
|
1789
|
-
this.product = new
|
|
1793
|
+
this.product = new I(e == null ? void 0 : e.product);
|
|
1790
1794
|
}
|
|
1791
1795
|
}
|
|
1792
|
-
class
|
|
1796
|
+
class gr extends C {
|
|
1793
1797
|
}
|
|
1794
1798
|
class ie extends b {
|
|
1795
1799
|
/**
|
|
@@ -1811,10 +1815,10 @@ class ie extends b {
|
|
|
1811
1815
|
* Дополнительные метаданные свойства.
|
|
1812
1816
|
*/
|
|
1813
1817
|
t(this, "metadata");
|
|
1814
|
-
this.type = new
|
|
1818
|
+
this.type = new gr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1815
1819
|
}
|
|
1816
1820
|
}
|
|
1817
|
-
class
|
|
1821
|
+
class E {
|
|
1818
1822
|
/**
|
|
1819
1823
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1820
1824
|
*
|
|
@@ -1833,7 +1837,7 @@ class z {
|
|
|
1833
1837
|
this.property = new ie(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1834
1838
|
}
|
|
1835
1839
|
}
|
|
1836
|
-
class
|
|
1840
|
+
class k {
|
|
1837
1841
|
/**
|
|
1838
1842
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
1839
1843
|
*
|
|
@@ -1848,7 +1852,7 @@ class O {
|
|
|
1848
1852
|
* Окончание периода.
|
|
1849
1853
|
*/
|
|
1850
1854
|
t(this, "to");
|
|
1851
|
-
this.from =
|
|
1855
|
+
this.from = y(r == null ? void 0 : r.from) ? w(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = y(r == null ? void 0 : r.to) ? w(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1852
1856
|
}
|
|
1853
1857
|
}
|
|
1854
1858
|
class Ut {
|
|
@@ -1873,12 +1877,12 @@ class Ut {
|
|
|
1873
1877
|
/**
|
|
1874
1878
|
* Период создания.
|
|
1875
1879
|
*/
|
|
1876
|
-
t(this, "createdAt", new
|
|
1880
|
+
t(this, "createdAt", new k());
|
|
1877
1881
|
/**
|
|
1878
1882
|
* Период изменения.
|
|
1879
1883
|
*/
|
|
1880
|
-
t(this, "updatedAt", new
|
|
1881
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new
|
|
1884
|
+
t(this, "updatedAt", new k());
|
|
1885
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.updatedAt = new k(r == null ? void 0 : r.updatedAt);
|
|
1882
1886
|
}
|
|
1883
1887
|
/**
|
|
1884
1888
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -1909,9 +1913,9 @@ class Ut {
|
|
|
1909
1913
|
var e, s, i, o;
|
|
1910
1914
|
const r = {};
|
|
1911
1915
|
return Object.keys(this).forEach((c) => {
|
|
1912
|
-
const
|
|
1916
|
+
const u = this[c];
|
|
1913
1917
|
// eslint-disable-next-line prettier/prettier
|
|
1914
|
-
|
|
1918
|
+
D(u) || y(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
1915
1919
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1916
1920
|
}
|
|
1917
1921
|
}
|
|
@@ -1950,7 +1954,7 @@ class ne extends b {
|
|
|
1950
1954
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
1951
1955
|
}
|
|
1952
1956
|
}
|
|
1953
|
-
class
|
|
1957
|
+
class Je {
|
|
1954
1958
|
/**
|
|
1955
1959
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1956
1960
|
*
|
|
@@ -1969,10 +1973,10 @@ class We {
|
|
|
1969
1973
|
* Минимальный коэффициент цены.
|
|
1970
1974
|
*/
|
|
1971
1975
|
t(this, "minCoefficient");
|
|
1972
|
-
this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new
|
|
1976
|
+
this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
|
|
1973
1977
|
}
|
|
1974
1978
|
}
|
|
1975
|
-
class
|
|
1979
|
+
class et {
|
|
1976
1980
|
/**
|
|
1977
1981
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
1978
1982
|
*
|
|
@@ -1994,7 +1998,7 @@ class Zr {
|
|
|
1994
1998
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
1995
1999
|
}
|
|
1996
2000
|
}
|
|
1997
|
-
class
|
|
2001
|
+
class rt {
|
|
1998
2002
|
/**
|
|
1999
2003
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
2000
2004
|
*
|
|
@@ -2024,7 +2028,7 @@ class et {
|
|
|
2024
2028
|
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;
|
|
2025
2029
|
}
|
|
2026
2030
|
}
|
|
2027
|
-
class
|
|
2031
|
+
class tt {
|
|
2028
2032
|
/**
|
|
2029
2033
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
2030
2034
|
*
|
|
@@ -2069,7 +2073,7 @@ class rt {
|
|
|
2069
2073
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
2070
2074
|
}
|
|
2071
2075
|
}
|
|
2072
|
-
class
|
|
2076
|
+
class st {
|
|
2073
2077
|
/**
|
|
2074
2078
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
2075
2079
|
*
|
|
@@ -2088,10 +2092,10 @@ class tt {
|
|
|
2088
2092
|
* Текущая версия приложения.
|
|
2089
2093
|
*/
|
|
2090
2094
|
t(this, "version");
|
|
2091
|
-
this.date =
|
|
2095
|
+
this.date = y(r == null ? void 0 : r.date) ? w(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";
|
|
2092
2096
|
}
|
|
2093
2097
|
}
|
|
2094
|
-
class
|
|
2098
|
+
class it {
|
|
2095
2099
|
/**
|
|
2096
2100
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
2097
2101
|
*
|
|
@@ -2130,7 +2134,7 @@ class st {
|
|
|
2130
2134
|
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"];
|
|
2131
2135
|
}
|
|
2132
2136
|
}
|
|
2133
|
-
class
|
|
2137
|
+
class Ft {
|
|
2134
2138
|
/**
|
|
2135
2139
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2136
2140
|
*
|
|
@@ -2174,17 +2178,17 @@ class qt {
|
|
|
2174
2178
|
*/
|
|
2175
2179
|
t(this, "dateFormats");
|
|
2176
2180
|
var e, s, i;
|
|
2177
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
2181
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new rt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new et(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new tt({
|
|
2178
2182
|
environment: this.environment,
|
|
2179
2183
|
...r == null ? void 0 : r.sentry
|
|
2180
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
2184
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
|
|
2181
2185
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2182
2186
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2183
2187
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2184
2188
|
};
|
|
2185
2189
|
}
|
|
2186
2190
|
}
|
|
2187
|
-
class
|
|
2191
|
+
class Mt extends h {
|
|
2188
2192
|
/**
|
|
2189
2193
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2190
2194
|
*
|
|
@@ -2211,11 +2215,11 @@ class Gt extends h {
|
|
|
2211
2215
|
*/
|
|
2212
2216
|
// eslint-disable-next-line class-methods-use-this
|
|
2213
2217
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2214
|
-
let c = `${
|
|
2218
|
+
let c = `${T.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2215
2219
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2216
2220
|
}
|
|
2217
2221
|
}
|
|
2218
|
-
class
|
|
2222
|
+
class jt extends h {
|
|
2219
2223
|
/**
|
|
2220
2224
|
* Импортирует цены клиента из CSV файла.
|
|
2221
2225
|
*
|
|
@@ -2414,7 +2418,7 @@ class Ft extends h {
|
|
|
2414
2418
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2415
2419
|
}
|
|
2416
2420
|
}
|
|
2417
|
-
class
|
|
2421
|
+
class Gt extends h {
|
|
2418
2422
|
/**
|
|
2419
2423
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2420
2424
|
*
|
|
@@ -2449,12 +2453,12 @@ class jt extends h {
|
|
|
2449
2453
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2450
2454
|
*/
|
|
2451
2455
|
attachTemplate(r, e, s) {
|
|
2452
|
-
const i =
|
|
2456
|
+
const i = T.getConfig().dateFormats.api;
|
|
2453
2457
|
return this.post(
|
|
2454
2458
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2455
2459
|
s && {
|
|
2456
|
-
startAt: s.startAt &&
|
|
2457
|
-
endAt: s.endAt &&
|
|
2460
|
+
startAt: s.startAt && q(s.startAt, i),
|
|
2461
|
+
endAt: s.endAt && q(s.endAt, i)
|
|
2458
2462
|
},
|
|
2459
2463
|
(o) => new se(o.data),
|
|
2460
2464
|
{},
|
|
@@ -2483,12 +2487,12 @@ class jt extends h {
|
|
|
2483
2487
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2484
2488
|
*/
|
|
2485
2489
|
changeTemplate(r, e, s, i) {
|
|
2486
|
-
const o =
|
|
2490
|
+
const o = T.getConfig().dateFormats.api;
|
|
2487
2491
|
return this.patch(
|
|
2488
2492
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2489
2493
|
i && {
|
|
2490
|
-
startAt: i.startAt &&
|
|
2491
|
-
endAt: i.endAt &&
|
|
2494
|
+
startAt: i.startAt && q(i.startAt, o),
|
|
2495
|
+
endAt: i.endAt && q(i.endAt, o)
|
|
2492
2496
|
},
|
|
2493
2497
|
(c) => new se(c.data)
|
|
2494
2498
|
);
|
|
@@ -2506,7 +2510,7 @@ class jt extends h {
|
|
|
2506
2510
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2507
2511
|
}
|
|
2508
2512
|
}
|
|
2509
|
-
class
|
|
2513
|
+
class Ht extends h {
|
|
2510
2514
|
/**
|
|
2511
2515
|
* Возвращает список данных о корневых категориях.
|
|
2512
2516
|
*
|
|
@@ -2520,7 +2524,7 @@ class Mt extends h {
|
|
|
2520
2524
|
{
|
|
2521
2525
|
showHidden: r
|
|
2522
2526
|
},
|
|
2523
|
-
(e) => e.data.map((s) => new
|
|
2527
|
+
(e) => e.data.map((s) => new z(s))
|
|
2524
2528
|
);
|
|
2525
2529
|
}
|
|
2526
2530
|
/**
|
|
@@ -2539,7 +2543,7 @@ class Mt extends h {
|
|
|
2539
2543
|
showHidden: e,
|
|
2540
2544
|
withNestedCategories: s
|
|
2541
2545
|
},
|
|
2542
|
-
(i) => new
|
|
2546
|
+
(i) => new z(i.data)
|
|
2543
2547
|
);
|
|
2544
2548
|
}
|
|
2545
2549
|
/**
|
|
@@ -2548,7 +2552,7 @@ class Mt extends h {
|
|
|
2548
2552
|
* @param categoryID Идентификатор категории продуктов.
|
|
2549
2553
|
*/
|
|
2550
2554
|
getPublicCategoryData(r) {
|
|
2551
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2555
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new z(e.data));
|
|
2552
2556
|
}
|
|
2553
2557
|
/**
|
|
2554
2558
|
* Возвращает список продуктов категории.
|
|
@@ -2566,7 +2570,7 @@ class Mt extends h {
|
|
|
2566
2570
|
showHidden: s,
|
|
2567
2571
|
withPriceCoefficients: e
|
|
2568
2572
|
},
|
|
2569
|
-
(i) => he(i.data, (o) => new
|
|
2573
|
+
(i) => he(i.data, (o) => new I(o))
|
|
2570
2574
|
);
|
|
2571
2575
|
}
|
|
2572
2576
|
/**
|
|
@@ -2579,7 +2583,7 @@ class Mt extends h {
|
|
|
2579
2583
|
getCategoryProductsCoefficients(r) {
|
|
2580
2584
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2581
2585
|
const { data: s } = e;
|
|
2582
|
-
return
|
|
2586
|
+
return xr(s, (i) => i.map((o) => new Me(o))), s;
|
|
2583
2587
|
});
|
|
2584
2588
|
}
|
|
2585
2589
|
/**
|
|
@@ -2591,14 +2595,14 @@ class Mt extends h {
|
|
|
2591
2595
|
publicSimpleSearch(r, e = 10) {
|
|
2592
2596
|
return new Promise((s, i) => {
|
|
2593
2597
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2594
|
-
s(o.categories.map((c) => new
|
|
2598
|
+
s(o.categories.map((c) => new z(c)));
|
|
2595
2599
|
}).catch((o) => {
|
|
2596
2600
|
i(o);
|
|
2597
2601
|
});
|
|
2598
2602
|
});
|
|
2599
2603
|
}
|
|
2600
2604
|
}
|
|
2601
|
-
class
|
|
2605
|
+
class Bt extends h {
|
|
2602
2606
|
/**
|
|
2603
2607
|
* Возвращает данные об указанном продукте.
|
|
2604
2608
|
*
|
|
@@ -2608,7 +2612,7 @@ class Ht extends h {
|
|
|
2608
2612
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2609
2613
|
*/
|
|
2610
2614
|
getProductData(r, e = !1) {
|
|
2611
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2615
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new I(s.data));
|
|
2612
2616
|
}
|
|
2613
2617
|
/**
|
|
2614
2618
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2616,7 +2620,7 @@ class Ht extends h {
|
|
|
2616
2620
|
* @param productId Идентификатор продукта.
|
|
2617
2621
|
*/
|
|
2618
2622
|
getPublicProductData(r) {
|
|
2619
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2623
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
|
|
2620
2624
|
}
|
|
2621
2625
|
/**
|
|
2622
2626
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2629,7 +2633,7 @@ class Ht extends h {
|
|
|
2629
2633
|
return this.get(
|
|
2630
2634
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2631
2635
|
{},
|
|
2632
|
-
(e) => he(e.data, (s) => new
|
|
2636
|
+
(e) => he(e.data, (s) => new Me(s))
|
|
2633
2637
|
);
|
|
2634
2638
|
}
|
|
2635
2639
|
/**
|
|
@@ -2641,14 +2645,14 @@ class Ht extends h {
|
|
|
2641
2645
|
publicSimpleSearch(r, e = 10) {
|
|
2642
2646
|
return new Promise((s, i) => {
|
|
2643
2647
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2644
|
-
s(o.products.map((c) => new
|
|
2648
|
+
s(o.products.map((c) => new I(c)));
|
|
2645
2649
|
}).catch((o) => {
|
|
2646
2650
|
i(o);
|
|
2647
2651
|
});
|
|
2648
2652
|
});
|
|
2649
2653
|
}
|
|
2650
2654
|
}
|
|
2651
|
-
class
|
|
2655
|
+
class Et extends h {
|
|
2652
2656
|
/**
|
|
2653
2657
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2654
2658
|
*
|
|
@@ -2731,8 +2735,8 @@ class zt extends h {
|
|
|
2731
2735
|
);
|
|
2732
2736
|
}
|
|
2733
2737
|
}
|
|
2734
|
-
var
|
|
2735
|
-
class
|
|
2738
|
+
var Be = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Be || {});
|
|
2739
|
+
class Ve {
|
|
2736
2740
|
/**
|
|
2737
2741
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2738
2742
|
*
|
|
@@ -2751,7 +2755,7 @@ class Je {
|
|
|
2751
2755
|
* Значение с которым сравнивается поле.
|
|
2752
2756
|
*/
|
|
2753
2757
|
t(this, "value");
|
|
2754
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2758
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Be.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2755
2759
|
}
|
|
2756
2760
|
/**
|
|
2757
2761
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2763,10 +2767,10 @@ class Je {
|
|
|
2763
2767
|
field: this.field,
|
|
2764
2768
|
op: this.op
|
|
2765
2769
|
};
|
|
2766
|
-
return r.value =
|
|
2770
|
+
return r.value = ke(this.value) ? q(this.value, T.getConfig().dateFormats.api) : this.value, r;
|
|
2767
2771
|
}
|
|
2768
2772
|
}
|
|
2769
|
-
class
|
|
2773
|
+
class ue {
|
|
2770
2774
|
/**
|
|
2771
2775
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2772
2776
|
*
|
|
@@ -2786,7 +2790,7 @@ class pe {
|
|
|
2786
2790
|
*/
|
|
2787
2791
|
t(this, "groups");
|
|
2788
2792
|
var e, s;
|
|
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
|
|
2793
|
+
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 Ve(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ue(i))) ?? [];
|
|
2790
2794
|
}
|
|
2791
2795
|
/**
|
|
2792
2796
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2796,12 +2800,12 @@ class pe {
|
|
|
2796
2800
|
toPrimitive() {
|
|
2797
2801
|
return {
|
|
2798
2802
|
groupOp: this.groupOp,
|
|
2799
|
-
filters: this.filters.map((r) => r instanceof
|
|
2800
|
-
groups: this.groups.map((r) => r instanceof
|
|
2803
|
+
filters: this.filters.map((r) => r instanceof Ve && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2804
|
+
groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
|
|
2801
2805
|
};
|
|
2802
2806
|
}
|
|
2803
2807
|
}
|
|
2804
|
-
class
|
|
2808
|
+
class Te extends h {
|
|
2805
2809
|
/**
|
|
2806
2810
|
* Получает пагинированный список данных.
|
|
2807
2811
|
*
|
|
@@ -2813,15 +2817,15 @@ class De extends h {
|
|
|
2813
2817
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2814
2818
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2815
2819
|
*/
|
|
2816
|
-
getPaginated(r, e, s, i, o, c,
|
|
2817
|
-
let
|
|
2820
|
+
getPaginated(r, e, s, i, o, c, u) {
|
|
2821
|
+
let p = {
|
|
2818
2822
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2819
2823
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2820
2824
|
};
|
|
2821
|
-
return e && (
|
|
2825
|
+
return e && (p.filters = JSON.stringify((e instanceof ue ? e : new ue(e)).toPrimitive())), Y(s) || (p.sort = Q(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
|
|
2822
2826
|
}
|
|
2823
2827
|
}
|
|
2824
|
-
class
|
|
2828
|
+
class Wt extends Te {
|
|
2825
2829
|
/**
|
|
2826
2830
|
* Возвращает список шаблонов прайс-листа.
|
|
2827
2831
|
*
|
|
@@ -2893,7 +2897,7 @@ class Et extends De {
|
|
|
2893
2897
|
return this.get(
|
|
2894
2898
|
`/internal/price/templates/${r}/products`,
|
|
2895
2899
|
{},
|
|
2896
|
-
(e) => e.data.map((s) => new
|
|
2900
|
+
(e) => e.data.map((s) => new Se(s))
|
|
2897
2901
|
);
|
|
2898
2902
|
}
|
|
2899
2903
|
/**
|
|
@@ -2905,7 +2909,7 @@ class Et extends De {
|
|
|
2905
2909
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2906
2910
|
*/
|
|
2907
2911
|
getProductTemplatePrice(r, e) {
|
|
2908
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
2912
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Se(s.data));
|
|
2909
2913
|
}
|
|
2910
2914
|
/**
|
|
2911
2915
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2924,7 +2928,7 @@ class Et extends De {
|
|
|
2924
2928
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2925
2929
|
increase_percent: s.value
|
|
2926
2930
|
},
|
|
2927
|
-
(o) => new
|
|
2931
|
+
(o) => new Se(o.data)
|
|
2928
2932
|
);
|
|
2929
2933
|
}
|
|
2930
2934
|
/**
|
|
@@ -2949,7 +2953,7 @@ class Et extends De {
|
|
|
2949
2953
|
return this.get(
|
|
2950
2954
|
`/internal/price/templates/${r}/categories`,
|
|
2951
2955
|
{},
|
|
2952
|
-
(e) => e.data.map((s) => new
|
|
2956
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2953
2957
|
);
|
|
2954
2958
|
}
|
|
2955
2959
|
/**
|
|
@@ -2964,7 +2968,7 @@ class Et extends De {
|
|
|
2964
2968
|
return this.get(
|
|
2965
2969
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2966
2970
|
{},
|
|
2967
|
-
(s) => new
|
|
2971
|
+
(s) => new ae(s.data)
|
|
2968
2972
|
);
|
|
2969
2973
|
}
|
|
2970
2974
|
/**
|
|
@@ -2990,7 +2994,7 @@ class Et extends De {
|
|
|
2990
2994
|
},
|
|
2991
2995
|
params: i ? { recursively: !0 } : {}
|
|
2992
2996
|
},
|
|
2993
|
-
(c) => new
|
|
2997
|
+
(c) => new ae(c.data)
|
|
2994
2998
|
);
|
|
2995
2999
|
}
|
|
2996
3000
|
/**
|
|
@@ -3025,7 +3029,7 @@ class Et extends De {
|
|
|
3025
3029
|
);
|
|
3026
3030
|
}
|
|
3027
3031
|
}
|
|
3028
|
-
class
|
|
3032
|
+
class Jt extends h {
|
|
3029
3033
|
/**
|
|
3030
3034
|
* Возвращает список ролей ценообразования.
|
|
3031
3035
|
*
|
|
@@ -3086,7 +3090,7 @@ class Wt extends h {
|
|
|
3086
3090
|
return this.get(
|
|
3087
3091
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3088
3092
|
{},
|
|
3089
|
-
(e) => e.data.map((s) => new
|
|
3093
|
+
(e) => e.data.map((s) => new Je(s))
|
|
3090
3094
|
);
|
|
3091
3095
|
}
|
|
3092
3096
|
/**
|
|
@@ -3101,11 +3105,11 @@ class Wt extends h {
|
|
|
3101
3105
|
return this.patch(
|
|
3102
3106
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3103
3107
|
e,
|
|
3104
|
-
(s) => s.data.map((i) => new
|
|
3108
|
+
(s) => s.data.map((i) => new Je(i))
|
|
3105
3109
|
);
|
|
3106
3110
|
}
|
|
3107
3111
|
}
|
|
3108
|
-
class
|
|
3112
|
+
class Vt extends Te {
|
|
3109
3113
|
/**
|
|
3110
3114
|
* Возвращает пагинированный список свойств.
|
|
3111
3115
|
*
|
|
@@ -3181,7 +3185,7 @@ class Jt extends De {
|
|
|
3181
3185
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3182
3186
|
*/
|
|
3183
3187
|
getProductProperties(r) {
|
|
3184
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3188
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
|
|
3185
3189
|
}
|
|
3186
3190
|
/**
|
|
3187
3191
|
* Возвращает значение свойства продукта.
|
|
@@ -3191,7 +3195,7 @@ class Jt extends De {
|
|
|
3191
3195
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3192
3196
|
*/
|
|
3193
3197
|
getProductProperty(r, e) {
|
|
3194
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
3198
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new E(s.data));
|
|
3195
3199
|
}
|
|
3196
3200
|
/**
|
|
3197
3201
|
* Обновляет значение свойства продукта.
|
|
@@ -3202,7 +3206,7 @@ class Jt extends De {
|
|
|
3202
3206
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3203
3207
|
*/
|
|
3204
3208
|
updateProductProperty(r, e, s) {
|
|
3205
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3209
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
|
|
3206
3210
|
}
|
|
3207
3211
|
/**
|
|
3208
3212
|
* Удаляет значение свойства продукта.
|
|
@@ -3327,7 +3331,7 @@ class Jt extends De {
|
|
|
3327
3331
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3328
3332
|
*/
|
|
3329
3333
|
getCategoryProperties(r) {
|
|
3330
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
3334
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
|
|
3331
3335
|
}
|
|
3332
3336
|
/**
|
|
3333
3337
|
* Возвращает значение свойства категории.
|
|
@@ -3337,7 +3341,7 @@ class Jt extends De {
|
|
|
3337
3341
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3338
3342
|
*/
|
|
3339
3343
|
getCategoryProperty(r, e) {
|
|
3340
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
3344
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new E(s.data));
|
|
3341
3345
|
}
|
|
3342
3346
|
/**
|
|
3343
3347
|
* Обновляет значение свойства категории.
|
|
@@ -3348,7 +3352,7 @@ class Jt extends De {
|
|
|
3348
3352
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3349
3353
|
*/
|
|
3350
3354
|
updateCategoryProperty(r, e, s) {
|
|
3351
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
3355
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
|
|
3352
3356
|
}
|
|
3353
3357
|
/**
|
|
3354
3358
|
* Удаляет значение свойства категории.
|
|
@@ -3477,7 +3481,7 @@ class Jt extends De {
|
|
|
3477
3481
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3478
3482
|
}
|
|
3479
3483
|
}
|
|
3480
|
-
function
|
|
3484
|
+
function Ke(n, r, e) {
|
|
3481
3485
|
let s;
|
|
3482
3486
|
return n.some((i) => {
|
|
3483
3487
|
if (i.type === e && i.id === r)
|
|
@@ -3486,37 +3490,37 @@ function Ve(n, r, e) {
|
|
|
3486
3490
|
return !1;
|
|
3487
3491
|
const o = i;
|
|
3488
3492
|
if (o.products && o.products.length > 0) {
|
|
3489
|
-
const c =
|
|
3493
|
+
const c = Ke(o.products, r, e);
|
|
3490
3494
|
if (c)
|
|
3491
3495
|
return s = c, !0;
|
|
3492
3496
|
}
|
|
3493
3497
|
if (o.categories && o.categories.length > 0) {
|
|
3494
|
-
const c =
|
|
3498
|
+
const c = Ke(o.categories, r, e);
|
|
3495
3499
|
if (c)
|
|
3496
3500
|
return s = c, !0;
|
|
3497
3501
|
}
|
|
3498
3502
|
return !1;
|
|
3499
3503
|
}), s;
|
|
3500
3504
|
}
|
|
3501
|
-
function
|
|
3505
|
+
function Qe(n) {
|
|
3502
3506
|
const r = [];
|
|
3503
3507
|
return n.forEach((e) => {
|
|
3504
3508
|
if (r.push(e), e.type === "category") {
|
|
3505
3509
|
const s = e;
|
|
3506
|
-
s.products && s.products.length > 0 && r.push(...
|
|
3510
|
+
s.products && s.products.length > 0 && r.push(...Qe(s.products)), s.categories && s.categories.length > 0 && r.push(...Qe(s.categories));
|
|
3507
3511
|
}
|
|
3508
3512
|
}), r;
|
|
3509
3513
|
}
|
|
3510
|
-
var
|
|
3511
|
-
class
|
|
3514
|
+
var nt = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(nt || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
|
|
3515
|
+
class ot extends C {
|
|
3512
3516
|
}
|
|
3513
|
-
class
|
|
3517
|
+
class mr extends C {
|
|
3514
3518
|
}
|
|
3515
|
-
class
|
|
3519
|
+
class Kt extends C {
|
|
3516
3520
|
}
|
|
3517
|
-
class
|
|
3521
|
+
class ct extends C {
|
|
3518
3522
|
}
|
|
3519
|
-
class
|
|
3523
|
+
class Ce extends b {
|
|
3520
3524
|
/**
|
|
3521
3525
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
3522
3526
|
*
|
|
@@ -3535,34 +3539,34 @@ class ae extends b {
|
|
|
3535
3539
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
3536
3540
|
}
|
|
3537
3541
|
}
|
|
3538
|
-
class
|
|
3542
|
+
class F extends C {
|
|
3539
3543
|
/**
|
|
3540
3544
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
3541
3545
|
*/
|
|
3542
3546
|
static generatePersonItem() {
|
|
3543
|
-
return new
|
|
3547
|
+
return new F({
|
|
3544
3548
|
id: 1,
|
|
3545
3549
|
guid: "",
|
|
3546
|
-
slug:
|
|
3550
|
+
slug: N.Person,
|
|
3547
3551
|
name: ""
|
|
3548
3552
|
});
|
|
3549
3553
|
}
|
|
3550
3554
|
}
|
|
3551
|
-
class
|
|
3555
|
+
class lt extends C {
|
|
3552
3556
|
}
|
|
3553
|
-
class
|
|
3557
|
+
class ut extends C {
|
|
3554
3558
|
}
|
|
3555
|
-
class re extends
|
|
3559
|
+
class re extends C {
|
|
3556
3560
|
}
|
|
3557
|
-
class pt extends
|
|
3561
|
+
class pt extends C {
|
|
3558
3562
|
}
|
|
3559
|
-
class
|
|
3563
|
+
class ht extends C {
|
|
3560
3564
|
}
|
|
3561
|
-
class
|
|
3565
|
+
class fr extends C {
|
|
3562
3566
|
}
|
|
3563
|
-
class
|
|
3567
|
+
class yr extends C {
|
|
3564
3568
|
}
|
|
3565
|
-
class
|
|
3569
|
+
class qe extends j {
|
|
3566
3570
|
/**
|
|
3567
3571
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3568
3572
|
*
|
|
@@ -3589,8 +3593,8 @@ class xe extends H {
|
|
|
3589
3593
|
/**
|
|
3590
3594
|
* Данные о валюте.
|
|
3591
3595
|
*/
|
|
3592
|
-
t(this, "currency", new
|
|
3593
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3596
|
+
t(this, "currency", new Ce());
|
|
3597
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new Ce(e.currency));
|
|
3594
3598
|
}
|
|
3595
3599
|
}
|
|
3596
3600
|
class Ne extends b {
|
|
@@ -3644,10 +3648,10 @@ class M extends Ne {
|
|
|
3644
3648
|
* Дата и время последнего удаления.
|
|
3645
3649
|
*/
|
|
3646
3650
|
t(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 =
|
|
3651
|
+
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 = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3648
3652
|
}
|
|
3649
3653
|
}
|
|
3650
|
-
class
|
|
3654
|
+
class wr extends b {
|
|
3651
3655
|
/**
|
|
3652
3656
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3653
3657
|
*
|
|
@@ -3663,11 +3667,11 @@ class yr extends b {
|
|
|
3663
3667
|
/**
|
|
3664
3668
|
* Данные об организационно-правовой форме.
|
|
3665
3669
|
*/
|
|
3666
|
-
t(this, "opf",
|
|
3670
|
+
t(this, "opf", F.generatePersonItem());
|
|
3667
3671
|
/**
|
|
3668
3672
|
* Направление продаж.
|
|
3669
3673
|
*/
|
|
3670
|
-
t(this, "salesDirection", new
|
|
3674
|
+
t(this, "salesDirection", new L());
|
|
3671
3675
|
/**
|
|
3672
3676
|
* Группа партнеров (направление деятельности).
|
|
3673
3677
|
*/
|
|
@@ -3705,7 +3709,7 @@ class yr extends b {
|
|
|
3705
3709
|
*/
|
|
3706
3710
|
t(this, "updater");
|
|
3707
3711
|
if (e) {
|
|
3708
|
-
if (this.opf = new
|
|
3712
|
+
if (this.opf = new F(e.opf), this.salesDirection = new L(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
|
|
3709
3713
|
const s = [];
|
|
3710
3714
|
e.contacts.forEach((i) => {
|
|
3711
3715
|
s.push(new M(i));
|
|
@@ -3714,13 +3718,13 @@ class yr extends b {
|
|
|
3714
3718
|
if (e.bankAccounts) {
|
|
3715
3719
|
const s = [];
|
|
3716
3720
|
e.bankAccounts.forEach((i) => {
|
|
3717
|
-
s.push(new
|
|
3721
|
+
s.push(new qe(i));
|
|
3718
3722
|
}), this.bankAccounts = s;
|
|
3719
3723
|
}
|
|
3720
3724
|
}
|
|
3721
3725
|
}
|
|
3722
3726
|
}
|
|
3723
|
-
class
|
|
3727
|
+
class gt extends wr {
|
|
3724
3728
|
/**
|
|
3725
3729
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3726
3730
|
*
|
|
@@ -3730,7 +3734,7 @@ class ht extends yr {
|
|
|
3730
3734
|
super(r);
|
|
3731
3735
|
}
|
|
3732
3736
|
}
|
|
3733
|
-
class
|
|
3737
|
+
class Cr extends wr {
|
|
3734
3738
|
/**
|
|
3735
3739
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3736
3740
|
*
|
|
@@ -3773,7 +3777,7 @@ class wr extends yr {
|
|
|
3773
3777
|
e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
|
|
3774
3778
|
}
|
|
3775
3779
|
}
|
|
3776
|
-
class
|
|
3780
|
+
class vr extends Cr {
|
|
3777
3781
|
/**
|
|
3778
3782
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3779
3783
|
*
|
|
@@ -3788,7 +3792,7 @@ class ar extends wr {
|
|
|
3788
3792
|
e && (this.kpp = e.kpp ?? "");
|
|
3789
3793
|
}
|
|
3790
3794
|
}
|
|
3791
|
-
class
|
|
3795
|
+
class mt extends vr {
|
|
3792
3796
|
/**
|
|
3793
3797
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3794
3798
|
*
|
|
@@ -3811,7 +3815,7 @@ class gt extends ar {
|
|
|
3811
3815
|
e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3812
3816
|
}
|
|
3813
3817
|
}
|
|
3814
|
-
class
|
|
3818
|
+
class ve {
|
|
3815
3819
|
/**
|
|
3816
3820
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3817
3821
|
*
|
|
@@ -3819,18 +3823,18 @@ class Ce {
|
|
|
3819
3823
|
*/
|
|
3820
3824
|
static createInstance(r) {
|
|
3821
3825
|
switch (r.opf.slug) {
|
|
3822
|
-
case
|
|
3823
|
-
return new
|
|
3824
|
-
case
|
|
3825
|
-
return new
|
|
3826
|
-
case
|
|
3827
|
-
return new
|
|
3826
|
+
case N.Ic:
|
|
3827
|
+
return new Cr(r);
|
|
3828
|
+
case N.UlR:
|
|
3829
|
+
return new vr(r);
|
|
3830
|
+
case N.UlNr:
|
|
3831
|
+
return new mt(r);
|
|
3828
3832
|
default:
|
|
3829
|
-
return new
|
|
3833
|
+
return new gt(r);
|
|
3830
3834
|
}
|
|
3831
3835
|
}
|
|
3832
3836
|
}
|
|
3833
|
-
class
|
|
3837
|
+
class Ie extends j {
|
|
3834
3838
|
/**
|
|
3835
3839
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3836
3840
|
*
|
|
@@ -3845,7 +3849,7 @@ class Se extends H {
|
|
|
3845
3849
|
this.isPrimary = e.isPrimary;
|
|
3846
3850
|
}
|
|
3847
3851
|
}
|
|
3848
|
-
class
|
|
3852
|
+
class ft extends M {
|
|
3849
3853
|
/**
|
|
3850
3854
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3851
3855
|
*
|
|
@@ -3870,10 +3874,10 @@ class mt extends M {
|
|
|
3870
3874
|
*/
|
|
3871
3875
|
addresses: []
|
|
3872
3876
|
});
|
|
3873
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
3877
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
|
|
3874
3878
|
}
|
|
3875
3879
|
}
|
|
3876
|
-
class
|
|
3880
|
+
class Pe extends Kr {
|
|
3877
3881
|
/**
|
|
3878
3882
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3879
3883
|
*
|
|
@@ -3910,10 +3914,10 @@ class ve extends Vr {
|
|
|
3910
3914
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3911
3915
|
*/
|
|
3912
3916
|
t(this, "isTransportCompanyAddress");
|
|
3913
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
3917
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new lr(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;
|
|
3914
3918
|
}
|
|
3915
3919
|
}
|
|
3916
|
-
class
|
|
3920
|
+
class Ye extends me {
|
|
3917
3921
|
/**
|
|
3918
3922
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3919
3923
|
*
|
|
@@ -3924,53 +3928,57 @@ class Qe extends me {
|
|
|
3924
3928
|
var s, i, o, c;
|
|
3925
3929
|
super(e);
|
|
3926
3930
|
/**
|
|
3927
|
-
*
|
|
3931
|
+
* @inheritDoc
|
|
3928
3932
|
*/
|
|
3929
3933
|
t(this, "contragents");
|
|
3930
3934
|
/**
|
|
3931
|
-
*
|
|
3935
|
+
* @inheritDoc
|
|
3932
3936
|
*/
|
|
3933
3937
|
t(this, "partnerGroups");
|
|
3934
3938
|
/**
|
|
3935
|
-
*
|
|
3939
|
+
* @inheritDoc
|
|
3936
3940
|
*/
|
|
3937
3941
|
t(this, "contacts");
|
|
3938
3942
|
/**
|
|
3939
|
-
*
|
|
3943
|
+
* @inheritDoc
|
|
3940
3944
|
*/
|
|
3941
3945
|
t(this, "deliveryAddresses");
|
|
3942
3946
|
/**
|
|
3943
|
-
*
|
|
3947
|
+
* @inheritDoc
|
|
3944
3948
|
*/
|
|
3945
3949
|
t(this, "channelPrimaryInterest");
|
|
3946
3950
|
/**
|
|
3947
|
-
*
|
|
3951
|
+
* @inheritDoc
|
|
3948
3952
|
*/
|
|
3949
3953
|
t(this, "sourcePrimaryInterest");
|
|
3950
3954
|
/**
|
|
3951
|
-
*
|
|
3955
|
+
* @inheritDoc
|
|
3952
3956
|
*/
|
|
3953
3957
|
t(this, "preferredDeliveryType");
|
|
3954
3958
|
/**
|
|
3955
|
-
*
|
|
3959
|
+
* @inheritDoc
|
|
3956
3960
|
*/
|
|
3957
3961
|
t(this, "primaryDemand");
|
|
3958
3962
|
/**
|
|
3959
|
-
*
|
|
3963
|
+
* @inheritDoc
|
|
3960
3964
|
*/
|
|
3961
3965
|
t(this, "isExcludedFromMsCallsToClients");
|
|
3962
3966
|
/**
|
|
3963
|
-
*
|
|
3967
|
+
* @inheritDoc
|
|
3968
|
+
*/
|
|
3969
|
+
t(this, "reasonExcludedFromMsCallsToClients");
|
|
3970
|
+
/**
|
|
3971
|
+
* @inheritDoc
|
|
3964
3972
|
*/
|
|
3965
3973
|
t(this, "preferredWarehouse");
|
|
3966
3974
|
/**
|
|
3967
|
-
*
|
|
3975
|
+
* @inheritDoc
|
|
3968
3976
|
*/
|
|
3969
3977
|
t(this, "extraData");
|
|
3970
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
3978
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ve.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new M(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Pe(u))) ?? [], this.channelPrimaryInterest = new mr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new yr(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.reasonExcludedFromMsCallsToClients = e == null ? void 0 : e.reasonExcludedFromMsCallsToClients, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Ae(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3971
3979
|
}
|
|
3972
3980
|
}
|
|
3973
|
-
class
|
|
3981
|
+
class Qt {
|
|
3974
3982
|
/**
|
|
3975
3983
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3976
3984
|
*
|
|
@@ -4020,11 +4028,11 @@ class Kt {
|
|
|
4020
4028
|
/**
|
|
4021
4029
|
* Период регистрации.
|
|
4022
4030
|
*/
|
|
4023
|
-
t(this, "createdAt", new
|
|
4031
|
+
t(this, "createdAt", new k());
|
|
4024
4032
|
/**
|
|
4025
4033
|
* Период последнего входа.
|
|
4026
4034
|
*/
|
|
4027
|
-
t(this, "lastLoginDate", new
|
|
4035
|
+
t(this, "lastLoginDate", new k());
|
|
4028
4036
|
/**
|
|
4029
4037
|
* Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
|
|
4030
4038
|
*/
|
|
@@ -4065,11 +4073,11 @@ class Kt {
|
|
|
4065
4073
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
4066
4074
|
*/
|
|
4067
4075
|
t(this, "lastOrder");
|
|
4068
|
-
var e, s, i, o, c,
|
|
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((
|
|
4070
|
-
createdAt: new
|
|
4076
|
+
var e, s, i, o, c, u;
|
|
4077
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new He(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new De(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new L(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4078
|
+
createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4071
4079
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4072
|
-
isApproved: (
|
|
4080
|
+
isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
|
|
4073
4081
|
};
|
|
4074
4082
|
}
|
|
4075
4083
|
/**
|
|
@@ -4116,7 +4124,7 @@ class Kt {
|
|
|
4116
4124
|
this.salesDirections = [];
|
|
4117
4125
|
break;
|
|
4118
4126
|
case "contragentType":
|
|
4119
|
-
this.contragentType = new
|
|
4127
|
+
this.contragentType = new F();
|
|
4120
4128
|
break;
|
|
4121
4129
|
case "preferredDeliveryType":
|
|
4122
4130
|
this.preferredDeliveryType = new X();
|
|
@@ -4138,13 +4146,13 @@ class Kt {
|
|
|
4138
4146
|
var e, s, i, o;
|
|
4139
4147
|
const r = {};
|
|
4140
4148
|
return Object.keys(this).forEach((c) => {
|
|
4141
|
-
const
|
|
4149
|
+
const u = this[c];
|
|
4142
4150
|
// eslint-disable-next-line prettier/prettier
|
|
4143
|
-
|
|
4151
|
+
D(u) || y(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
4144
4152
|
}), !((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;
|
|
4145
4153
|
}
|
|
4146
4154
|
}
|
|
4147
|
-
class
|
|
4155
|
+
class Pr extends j {
|
|
4148
4156
|
/**
|
|
4149
4157
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4150
4158
|
*
|
|
@@ -4164,10 +4172,10 @@ class Cr extends H {
|
|
|
4164
4172
|
* Признак того, что заказ подтвержден в 1С.
|
|
4165
4173
|
*/
|
|
4166
4174
|
t(this, "isApproved1c");
|
|
4167
|
-
this.createdAt =
|
|
4175
|
+
this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new U(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4168
4176
|
}
|
|
4169
4177
|
}
|
|
4170
|
-
class
|
|
4178
|
+
class yt extends b {
|
|
4171
4179
|
/**
|
|
4172
4180
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4173
4181
|
*
|
|
@@ -4200,10 +4208,10 @@ class ft extends b {
|
|
|
4200
4208
|
* Список менеджеров.
|
|
4201
4209
|
*/
|
|
4202
4210
|
t(this, "managers");
|
|
4203
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new
|
|
4211
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new L(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
|
|
4204
4212
|
}
|
|
4205
4213
|
}
|
|
4206
|
-
class
|
|
4214
|
+
class wt {
|
|
4207
4215
|
/**
|
|
4208
4216
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4209
4217
|
*
|
|
@@ -4221,7 +4229,7 @@ class yt {
|
|
|
4221
4229
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4222
4230
|
}
|
|
4223
4231
|
}
|
|
4224
|
-
class
|
|
4232
|
+
class Yt extends wt {
|
|
4225
4233
|
/**
|
|
4226
4234
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4227
4235
|
*
|
|
@@ -4252,7 +4260,7 @@ class Qt extends yt {
|
|
|
4252
4260
|
this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
|
|
4253
4261
|
}
|
|
4254
4262
|
}
|
|
4255
|
-
class
|
|
4263
|
+
class Xt {
|
|
4256
4264
|
/**
|
|
4257
4265
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4258
4266
|
*
|
|
@@ -4270,7 +4278,144 @@ class Yt {
|
|
|
4270
4278
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4271
4279
|
}
|
|
4272
4280
|
}
|
|
4273
|
-
class
|
|
4281
|
+
class x extends Te {
|
|
4282
|
+
/**
|
|
4283
|
+
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4284
|
+
*
|
|
4285
|
+
* @param client Данные о клиенте.
|
|
4286
|
+
*/
|
|
4287
|
+
static transformClientDataToRequest(r) {
|
|
4288
|
+
var s;
|
|
4289
|
+
const e = {
|
|
4290
|
+
name: r.name,
|
|
4291
|
+
alternative_name: r.alternativeName,
|
|
4292
|
+
partner_groups: r.partnerGroups.map((i) => i.id),
|
|
4293
|
+
phone: r.phone,
|
|
4294
|
+
email: r.email,
|
|
4295
|
+
city_id: r.city.id,
|
|
4296
|
+
get_news: r.getNews,
|
|
4297
|
+
channel_primary_interest_id: r.channelPrimaryInterest.id,
|
|
4298
|
+
source_primary_interest_id: r.sourcePrimaryInterest.id,
|
|
4299
|
+
primary_demand: r.primaryDemand,
|
|
4300
|
+
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4301
|
+
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4302
|
+
};
|
|
4303
|
+
return r.isExcludedFromMsCallsToClients && (e.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), e;
|
|
4304
|
+
}
|
|
4305
|
+
/**
|
|
4306
|
+
* Преобразует данные о контрагенте клиента в данные требуемые для запроса.
|
|
4307
|
+
*
|
|
4308
|
+
* @param contragent Данные о контрагенте клиента.
|
|
4309
|
+
*/
|
|
4310
|
+
static transformContragentClientDataToRequest(r) {
|
|
4311
|
+
var c, u, p, v, R, a, _, O;
|
|
4312
|
+
let e;
|
|
4313
|
+
const s = r, i = r, o = r;
|
|
4314
|
+
switch (r.opf.slug) {
|
|
4315
|
+
case N.Ic:
|
|
4316
|
+
e = {
|
|
4317
|
+
opf: s.opf.slug,
|
|
4318
|
+
name: s.name,
|
|
4319
|
+
alternative_name: s.alternativeName,
|
|
4320
|
+
partner_group_id: (c = s.partnerGroup) == null ? void 0 : c.id,
|
|
4321
|
+
manager_id: (u = s.manager) == null ? void 0 : u.id,
|
|
4322
|
+
comment: s.comment,
|
|
4323
|
+
inn: s.inn,
|
|
4324
|
+
okpo: s.okpo,
|
|
4325
|
+
director_name: s.directorName,
|
|
4326
|
+
director_position: s.directorPosition,
|
|
4327
|
+
director_acts_on: s.directorActsOn,
|
|
4328
|
+
legal_address: s.legalAddress,
|
|
4329
|
+
postal_address: s.postalAddress,
|
|
4330
|
+
actual_address: s.actualAddress
|
|
4331
|
+
};
|
|
4332
|
+
break;
|
|
4333
|
+
case N.UlR:
|
|
4334
|
+
e = {
|
|
4335
|
+
opf: i.opf.slug,
|
|
4336
|
+
name: i.name,
|
|
4337
|
+
alternative_name: i.alternativeName,
|
|
4338
|
+
partner_group_id: (p = i.partnerGroup) == null ? void 0 : p.id,
|
|
4339
|
+
manager_id: (v = i.manager) == null ? void 0 : v.id,
|
|
4340
|
+
comment: i.comment,
|
|
4341
|
+
inn: i.inn,
|
|
4342
|
+
kpp: i.kpp,
|
|
4343
|
+
okpo: i.okpo,
|
|
4344
|
+
director_name: i.directorName,
|
|
4345
|
+
director_position: i.directorPosition,
|
|
4346
|
+
director_acts_on: i.directorActsOn,
|
|
4347
|
+
legal_address: i.legalAddress,
|
|
4348
|
+
postal_address: i.postalAddress,
|
|
4349
|
+
actual_address: i.actualAddress
|
|
4350
|
+
};
|
|
4351
|
+
break;
|
|
4352
|
+
case N.UlNr:
|
|
4353
|
+
e = {
|
|
4354
|
+
opf: o.opf.slug,
|
|
4355
|
+
name: o.name,
|
|
4356
|
+
alternative_name: o.alternativeName,
|
|
4357
|
+
partner_group_id: (R = o.partnerGroup) == null ? void 0 : R.id,
|
|
4358
|
+
manager_id: (a = o.manager) == null ? void 0 : a.id,
|
|
4359
|
+
comment: o.comment,
|
|
4360
|
+
director_name: o.directorName,
|
|
4361
|
+
director_position: o.directorPosition,
|
|
4362
|
+
director_acts_on: o.directorActsOn,
|
|
4363
|
+
legal_address: o.legalAddress,
|
|
4364
|
+
postal_address: o.postalAddress,
|
|
4365
|
+
actual_address: o.actualAddress,
|
|
4366
|
+
registration_country_id: o.registrationCountry.id,
|
|
4367
|
+
registration_number: o.registrationNumber,
|
|
4368
|
+
tax_number: o.taxNumber || void 0
|
|
4369
|
+
};
|
|
4370
|
+
break;
|
|
4371
|
+
default:
|
|
4372
|
+
e = {
|
|
4373
|
+
opf: r.opf.slug,
|
|
4374
|
+
name: r.name,
|
|
4375
|
+
alternative_name: r.alternativeName,
|
|
4376
|
+
partner_group_id: (_ = r.partnerGroup) == null ? void 0 : _.id,
|
|
4377
|
+
manager_id: (O = r.manager) == null ? void 0 : O.id,
|
|
4378
|
+
comment: r.comment
|
|
4379
|
+
};
|
|
4380
|
+
break;
|
|
4381
|
+
}
|
|
4382
|
+
return e;
|
|
4383
|
+
}
|
|
4384
|
+
/**
|
|
4385
|
+
* Преобразует данные об адресе доставки клиенту в данные требуемые для запроса.
|
|
4386
|
+
*
|
|
4387
|
+
* @param deliveryAddress Данные об адресе доставки клиенту.
|
|
4388
|
+
*/
|
|
4389
|
+
static transformClientDeliveryAddressToRequest(r) {
|
|
4390
|
+
var s, i;
|
|
4391
|
+
const e = {
|
|
4392
|
+
address: r.address,
|
|
4393
|
+
is_one_time: r.isOneTime ?? !1,
|
|
4394
|
+
is_transport_company_address: r.isTransportCompanyAddress ?? !1,
|
|
4395
|
+
comment: r.comment ?? ""
|
|
4396
|
+
};
|
|
4397
|
+
return r.coordinates && (e.coordinates = {
|
|
4398
|
+
lat: (s = r.coordinates) == null ? void 0 : s.lat,
|
|
4399
|
+
long: (i = r.coordinates) == null ? void 0 : i.long
|
|
4400
|
+
}), r.operatingHours && (e.operating_hours = {
|
|
4401
|
+
from: r.operatingHours.from,
|
|
4402
|
+
to: r.operatingHours.to
|
|
4403
|
+
}), e;
|
|
4404
|
+
}
|
|
4405
|
+
/**
|
|
4406
|
+
* Преобразует данные о банковских реквизитах контрагента в данные требуемые для запроса.
|
|
4407
|
+
*
|
|
4408
|
+
* @param bankAccount Данные о банковских реквизитах контрагента.
|
|
4409
|
+
*/
|
|
4410
|
+
static transformClientContragentBankAccountToRequest(r) {
|
|
4411
|
+
return {
|
|
4412
|
+
bank_name: r.bankName,
|
|
4413
|
+
bic: r.bic,
|
|
4414
|
+
account_number: r.accountNumber,
|
|
4415
|
+
correspondent_account: r.correspondentAccount,
|
|
4416
|
+
currency_id: r.currency.id
|
|
4417
|
+
};
|
|
4418
|
+
}
|
|
4274
4419
|
/**
|
|
4275
4420
|
* Возвращает данные об указанном клиенте.
|
|
4276
4421
|
*
|
|
@@ -4278,7 +4423,7 @@ class Xt extends De {
|
|
|
4278
4423
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4279
4424
|
*/
|
|
4280
4425
|
getClient(r) {
|
|
4281
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4426
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Ye(e.data));
|
|
4282
4427
|
}
|
|
4283
4428
|
/**
|
|
4284
4429
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4293,7 +4438,7 @@ class Xt extends De {
|
|
|
4293
4438
|
getClientsList(r, e, s, i) {
|
|
4294
4439
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4295
4440
|
const c = { ...o.data };
|
|
4296
|
-
return c.data = c.data.map((
|
|
4441
|
+
return c.data = c.data.map((u) => new me(u)), c;
|
|
4297
4442
|
});
|
|
4298
4443
|
}
|
|
4299
4444
|
/**
|
|
@@ -4306,7 +4451,7 @@ class Xt extends De {
|
|
|
4306
4451
|
return this.getClientsList({
|
|
4307
4452
|
groupOp: "and",
|
|
4308
4453
|
groups: [],
|
|
4309
|
-
filters: [{ field: "phone", op:
|
|
4454
|
+
filters: [{ field: "phone", op: Be.Contains, value: r }]
|
|
4310
4455
|
});
|
|
4311
4456
|
}
|
|
4312
4457
|
/**
|
|
@@ -4320,7 +4465,7 @@ class Xt extends De {
|
|
|
4320
4465
|
const s = r.map((i) => i.id);
|
|
4321
4466
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4322
4467
|
let o = [];
|
|
4323
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4468
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new yt(c))), o;
|
|
4324
4469
|
});
|
|
4325
4470
|
}
|
|
4326
4471
|
/**
|
|
@@ -4332,70 +4477,42 @@ class Xt extends De {
|
|
|
4332
4477
|
getAllClientContacts(r) {
|
|
4333
4478
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4334
4479
|
let s = [];
|
|
4335
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4480
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ft(i))), s;
|
|
4336
4481
|
});
|
|
4337
4482
|
}
|
|
4338
4483
|
/**
|
|
4339
4484
|
* Создаёт нового клиента на основе указанных данных.
|
|
4340
4485
|
*
|
|
4341
4486
|
* @param client Данные о клиенте.
|
|
4342
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4343
|
-
* установить данные об ошибках валидации
|
|
4344
|
-
* в случае ошибок в запросах.
|
|
4487
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4345
4488
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4346
4489
|
*/
|
|
4347
4490
|
createClientCommonData(r, e = {}) {
|
|
4348
|
-
|
|
4349
|
-
return this.post(
|
|
4350
|
-
"/internal/clients",
|
|
4351
|
-
{
|
|
4352
|
-
name: r.name,
|
|
4353
|
-
alternative_name: r.alternativeName,
|
|
4354
|
-
partner_groups: r.partnerGroups.map((i) => i.id),
|
|
4355
|
-
phone: r.phone,
|
|
4356
|
-
email: r.email,
|
|
4357
|
-
city_id: r.city.id,
|
|
4358
|
-
get_news: r.getNews,
|
|
4359
|
-
channel_primary_interest_id: r.channelPrimaryInterest.id,
|
|
4360
|
-
source_primary_interest_id: r.sourcePrimaryInterest.id,
|
|
4361
|
-
primary_demand: r.primaryDemand,
|
|
4362
|
-
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4363
|
-
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4364
|
-
},
|
|
4365
|
-
(i) => new Qe(i.data),
|
|
4366
|
-
e
|
|
4367
|
-
);
|
|
4491
|
+
return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
|
|
4368
4492
|
}
|
|
4369
4493
|
/**
|
|
4370
4494
|
* Обновляет данные указанного клиента.
|
|
4371
4495
|
*
|
|
4372
4496
|
* @param client Данные о клиенте.
|
|
4373
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4374
|
-
* установить данные об ошибках валидации
|
|
4375
|
-
* в случае ошибок в запросах.
|
|
4497
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4376
4498
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4377
4499
|
*/
|
|
4378
4500
|
updateClientCommonData(r, e = {}) {
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4395
|
-
},
|
|
4396
|
-
void 0,
|
|
4397
|
-
e
|
|
4398
|
-
);
|
|
4501
|
+
return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
|
|
4502
|
+
}
|
|
4503
|
+
/**
|
|
4504
|
+
* Обновляет данные "Не беспокоить" указанного клиента.
|
|
4505
|
+
*
|
|
4506
|
+
* @param client Данные о клиенте.
|
|
4507
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4508
|
+
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4509
|
+
*/
|
|
4510
|
+
updateClientNotDistribCommonData(r, e = {}) {
|
|
4511
|
+
const s = {
|
|
4512
|
+
get_news: r.getNews,
|
|
4513
|
+
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients
|
|
4514
|
+
};
|
|
4515
|
+
return r.isExcludedFromMsCallsToClients && (s.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), this.patch(`/internal/clients/${r.id}`, s, void 0, e);
|
|
4399
4516
|
}
|
|
4400
4517
|
/**
|
|
4401
4518
|
* Изменяет пароль клиента.
|
|
@@ -4403,9 +4520,7 @@ class Xt extends De {
|
|
|
4403
4520
|
* @param clientId Идентификатор клиента которому необходимо поменять пароль.
|
|
4404
4521
|
* @param password Новый пароль.
|
|
4405
4522
|
* @param passwordConfirm Пароль-подтверждение.
|
|
4406
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4407
|
-
* установить данные об ошибках валидации
|
|
4408
|
-
* в случае ошибок в запросах.
|
|
4523
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4409
4524
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4410
4525
|
*/
|
|
4411
4526
|
changeClientPassword(r, e, s, i = {}) {
|
|
@@ -4466,87 +4581,14 @@ class Xt extends De {
|
|
|
4466
4581
|
*
|
|
4467
4582
|
* @param clientId Идентификатор клиента, к которому необходимо привязать контрагента.
|
|
4468
4583
|
* @param contragent Данные о контрагенте клиента.
|
|
4469
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4470
|
-
* установить данные об ошибках валидации
|
|
4471
|
-
* в случае ошибок в запросах.
|
|
4584
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4472
4585
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4473
4586
|
*/
|
|
4474
4587
|
createContragentClientData(r, e, s = {}) {
|
|
4475
|
-
var u, m, C, $, d, I, S, _;
|
|
4476
|
-
let i;
|
|
4477
|
-
const o = e, c = e, p = e;
|
|
4478
|
-
switch (e.opf.slug) {
|
|
4479
|
-
case k.Ic:
|
|
4480
|
-
i = {
|
|
4481
|
-
opf: o.opf.slug,
|
|
4482
|
-
name: o.name,
|
|
4483
|
-
alternative_name: o.alternativeName,
|
|
4484
|
-
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4485
|
-
manager_id: (m = o.manager) == null ? void 0 : m.id,
|
|
4486
|
-
comment: o.comment,
|
|
4487
|
-
inn: o.inn,
|
|
4488
|
-
okpo: o.okpo,
|
|
4489
|
-
director_name: o.directorName,
|
|
4490
|
-
director_position: o.directorPosition,
|
|
4491
|
-
director_acts_on: o.directorActsOn,
|
|
4492
|
-
legal_address: o.legalAddress,
|
|
4493
|
-
postal_address: o.postalAddress,
|
|
4494
|
-
actual_address: o.actualAddress
|
|
4495
|
-
};
|
|
4496
|
-
break;
|
|
4497
|
-
case k.UlR:
|
|
4498
|
-
i = {
|
|
4499
|
-
opf: c.opf.slug,
|
|
4500
|
-
name: c.name,
|
|
4501
|
-
alternative_name: c.alternativeName,
|
|
4502
|
-
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4503
|
-
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4504
|
-
comment: c.comment,
|
|
4505
|
-
inn: c.inn,
|
|
4506
|
-
kpp: c.kpp,
|
|
4507
|
-
okpo: c.okpo,
|
|
4508
|
-
director_name: c.directorName,
|
|
4509
|
-
director_position: c.directorPosition,
|
|
4510
|
-
director_acts_on: c.directorActsOn,
|
|
4511
|
-
legal_address: c.legalAddress,
|
|
4512
|
-
postal_address: c.postalAddress,
|
|
4513
|
-
actual_address: c.actualAddress
|
|
4514
|
-
};
|
|
4515
|
-
break;
|
|
4516
|
-
case k.UlNr:
|
|
4517
|
-
i = {
|
|
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
|
|
4533
|
-
};
|
|
4534
|
-
break;
|
|
4535
|
-
default:
|
|
4536
|
-
i = {
|
|
4537
|
-
opf: e.opf.slug,
|
|
4538
|
-
name: e.name,
|
|
4539
|
-
alternative_name: e.alternativeName,
|
|
4540
|
-
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4541
|
-
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4542
|
-
comment: e.comment
|
|
4543
|
-
};
|
|
4544
|
-
break;
|
|
4545
|
-
}
|
|
4546
4588
|
return this.post(
|
|
4547
4589
|
`/internal/clients/${r}/contragents`,
|
|
4548
|
-
|
|
4549
|
-
(
|
|
4590
|
+
x.transformContragentClientDataToRequest(e),
|
|
4591
|
+
(i) => ve.createInstance(i.data),
|
|
4550
4592
|
s
|
|
4551
4593
|
);
|
|
4552
4594
|
}
|
|
@@ -4555,87 +4597,14 @@ class Xt extends De {
|
|
|
4555
4597
|
*
|
|
4556
4598
|
* @param clientId Идентификатор клиента, к которому привязан контрагент.
|
|
4557
4599
|
* @param contragent Данные о контрагенте клиента.
|
|
4558
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4559
|
-
* установить данные об ошибках валидации
|
|
4560
|
-
* в случае ошибок в запросах.
|
|
4600
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4561
4601
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4562
4602
|
*/
|
|
4563
4603
|
updateContragentClientData(r, e, s = {}) {
|
|
4564
|
-
var u, m, C, $, d, I, S, _;
|
|
4565
|
-
let i;
|
|
4566
|
-
const o = e, c = e, p = e;
|
|
4567
|
-
switch (e.opf.slug) {
|
|
4568
|
-
case k.Ic:
|
|
4569
|
-
i = {
|
|
4570
|
-
opf: o.opf.slug,
|
|
4571
|
-
name: o.name,
|
|
4572
|
-
alternative_name: o.alternativeName,
|
|
4573
|
-
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4574
|
-
manager_id: (m = o.manager) == null ? void 0 : m.id,
|
|
4575
|
-
comment: o.comment,
|
|
4576
|
-
inn: o.inn,
|
|
4577
|
-
okpo: o.okpo,
|
|
4578
|
-
director_name: o.directorName,
|
|
4579
|
-
director_position: o.directorPosition,
|
|
4580
|
-
director_acts_on: o.directorActsOn,
|
|
4581
|
-
legal_address: o.legalAddress,
|
|
4582
|
-
postal_address: o.postalAddress,
|
|
4583
|
-
actual_address: o.actualAddress
|
|
4584
|
-
};
|
|
4585
|
-
break;
|
|
4586
|
-
case k.UlR:
|
|
4587
|
-
i = {
|
|
4588
|
-
opf: c.opf.slug,
|
|
4589
|
-
name: c.name,
|
|
4590
|
-
alternative_name: c.alternativeName,
|
|
4591
|
-
partner_group_id: (C = c.partnerGroup) == null ? void 0 : C.id,
|
|
4592
|
-
manager_id: ($ = c.manager) == null ? void 0 : $.id,
|
|
4593
|
-
comment: c.comment,
|
|
4594
|
-
inn: c.inn,
|
|
4595
|
-
kpp: c.kpp,
|
|
4596
|
-
okpo: c.okpo,
|
|
4597
|
-
director_name: c.directorName,
|
|
4598
|
-
director_position: c.directorPosition,
|
|
4599
|
-
director_acts_on: c.directorActsOn,
|
|
4600
|
-
legal_address: c.legalAddress,
|
|
4601
|
-
postal_address: c.postalAddress,
|
|
4602
|
-
actual_address: c.actualAddress
|
|
4603
|
-
};
|
|
4604
|
-
break;
|
|
4605
|
-
case k.UlNr:
|
|
4606
|
-
i = {
|
|
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
|
|
4622
|
-
};
|
|
4623
|
-
break;
|
|
4624
|
-
default:
|
|
4625
|
-
i = {
|
|
4626
|
-
opf: e.opf.slug,
|
|
4627
|
-
name: e.name,
|
|
4628
|
-
alternative_name: e.alternativeName,
|
|
4629
|
-
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
4630
|
-
manager_id: (_ = e.manager) == null ? void 0 : _.id,
|
|
4631
|
-
comment: e.comment
|
|
4632
|
-
};
|
|
4633
|
-
break;
|
|
4634
|
-
}
|
|
4635
4604
|
return this.patch(
|
|
4636
4605
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4637
|
-
|
|
4638
|
-
(
|
|
4606
|
+
x.transformContragentClientDataToRequest(e),
|
|
4607
|
+
(i) => ve.createInstance(i.data),
|
|
4639
4608
|
s
|
|
4640
4609
|
);
|
|
4641
4610
|
}
|
|
@@ -4654,55 +4623,30 @@ class Xt extends De {
|
|
|
4654
4623
|
*
|
|
4655
4624
|
* @param clientId Идентификатор клиента, к которому необходимо привязать адрес доставки.
|
|
4656
4625
|
* @param deliveryAddress Данные об адресе доставки.
|
|
4657
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4658
|
-
* установить данные об ошибках валидации
|
|
4659
|
-
* в случае ошибок в запросах.
|
|
4626
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4660
4627
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_create
|
|
4661
4628
|
*/
|
|
4662
4629
|
createClientDeliveryAddress(r, e, s = {}) {
|
|
4663
|
-
|
|
4664
|
-
|
|
4665
|
-
|
|
4666
|
-
|
|
4667
|
-
|
|
4668
|
-
|
|
4669
|
-
};
|
|
4670
|
-
return e.coordinates && (i.coordinates = {
|
|
4671
|
-
lat: (o = e.coordinates) == null ? void 0 : o.lat,
|
|
4672
|
-
long: (c = e.coordinates) == null ? void 0 : c.long
|
|
4673
|
-
}), e.operatingHours && (i.operating_hours = {
|
|
4674
|
-
from: e.operatingHours.from,
|
|
4675
|
-
to: e.operatingHours.to
|
|
4676
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new ve(p.data), s);
|
|
4630
|
+
return this.post(
|
|
4631
|
+
`/internal/clients/${r}/delivery-addresses`,
|
|
4632
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4633
|
+
(i) => new Pe(i.data),
|
|
4634
|
+
s
|
|
4635
|
+
);
|
|
4677
4636
|
}
|
|
4678
4637
|
/**
|
|
4679
4638
|
* Обновляет данные об адресе доставки клиента.
|
|
4680
4639
|
*
|
|
4681
4640
|
* @param clientId Идентификатор клиента, к которому привязан адрес доставки.
|
|
4682
4641
|
* @param deliveryAddress Данные об адресе доставки.
|
|
4683
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4684
|
-
* установить данные об ошибках валидации
|
|
4685
|
-
* в случае ошибок в запросах.
|
|
4642
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4686
4643
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
|
|
4687
4644
|
*/
|
|
4688
4645
|
updateClientDeliveryAddress(r, e, s = {}) {
|
|
4689
|
-
|
|
4690
|
-
const i = {
|
|
4691
|
-
address: e.address,
|
|
4692
|
-
is_one_time: e.isOneTime ?? !1,
|
|
4693
|
-
is_transport_company_address: e.isTransportCompanyAddress ?? !1,
|
|
4694
|
-
comment: e.comment ?? ""
|
|
4695
|
-
};
|
|
4696
|
-
return e.operatingHours && (i.operating_hours = {
|
|
4697
|
-
from: e.operatingHours.from,
|
|
4698
|
-
to: e.operatingHours.to
|
|
4699
|
-
}), e.coordinates && (i.coordinates = {
|
|
4700
|
-
lat: (o = e.coordinates) == null ? void 0 : o.lat,
|
|
4701
|
-
long: (c = e.coordinates) == null ? void 0 : c.long
|
|
4702
|
-
}), this.patch(
|
|
4646
|
+
return this.patch(
|
|
4703
4647
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4704
|
-
|
|
4705
|
-
(
|
|
4648
|
+
x.transformClientDeliveryAddressToRequest(e),
|
|
4649
|
+
(i) => new Pe(i.data),
|
|
4706
4650
|
s
|
|
4707
4651
|
);
|
|
4708
4652
|
}
|
|
@@ -4720,25 +4664,16 @@ class Xt extends De {
|
|
|
4720
4664
|
* Создаёт новую запись банковских реквизитов контрагента.
|
|
4721
4665
|
*
|
|
4722
4666
|
* @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
|
|
4723
|
-
* @param contragentId Идентификатор контрагента, к которому необходимо
|
|
4724
|
-
* привязать банковские реквизиты.
|
|
4667
|
+
* @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
|
|
4725
4668
|
* @param bankAccount Данные банковских реквизитов.
|
|
4726
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4727
|
-
* установить данные об ошибках валидации
|
|
4728
|
-
* в случае ошибок в запросах.
|
|
4669
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4729
4670
|
* @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
|
|
4730
4671
|
*/
|
|
4731
4672
|
createContragentBankAccount(r, e, s, i = {}) {
|
|
4732
4673
|
return this.post(
|
|
4733
4674
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
bic: s.bic,
|
|
4737
|
-
account_number: s.accountNumber,
|
|
4738
|
-
correspondent_account: s.correspondentAccount,
|
|
4739
|
-
currency_id: s.currency.id
|
|
4740
|
-
},
|
|
4741
|
-
(o) => new xe(o.data),
|
|
4675
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4676
|
+
(o) => new qe(o.data),
|
|
4742
4677
|
i
|
|
4743
4678
|
);
|
|
4744
4679
|
}
|
|
@@ -4746,25 +4681,16 @@ class Xt extends De {
|
|
|
4746
4681
|
* Обновляет данные о банковских реквизитах контрагента.
|
|
4747
4682
|
*
|
|
4748
4683
|
* @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
|
|
4749
|
-
* @param contragentId Идентификатор контрагента, к которому необходимо
|
|
4750
|
-
* привязать банковские реквизиты.
|
|
4684
|
+
* @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
|
|
4751
4685
|
* @param bankAccount Данные банковских реквизитов.
|
|
4752
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4753
|
-
* установить данные об ошибках валидации
|
|
4754
|
-
* в случае ошибок в запросах.
|
|
4686
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4755
4687
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
|
|
4756
4688
|
*/
|
|
4757
4689
|
updateContragentBankAccount(r, e, s, i = {}) {
|
|
4758
4690
|
return this.patch(
|
|
4759
4691
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
bic: s.bic,
|
|
4763
|
-
account_number: s.accountNumber,
|
|
4764
|
-
correspondent_account: s.correspondentAccount,
|
|
4765
|
-
currency_id: s.currency.id
|
|
4766
|
-
},
|
|
4767
|
-
(o) => new xe(o.data),
|
|
4692
|
+
x.transformClientContragentBankAccountToRequest(s),
|
|
4693
|
+
(o) => new qe(o.data),
|
|
4768
4694
|
i
|
|
4769
4695
|
);
|
|
4770
4696
|
}
|
|
@@ -4772,8 +4698,7 @@ class Xt extends De {
|
|
|
4772
4698
|
* Удаляет указанные банковские реквизиты контрагента.
|
|
4773
4699
|
*
|
|
4774
4700
|
* @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
|
|
4775
|
-
* @param contragentId Идентификатор контрагента, к которому необходимо
|
|
4776
|
-
* привязать банковские реквизиты.
|
|
4701
|
+
* @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
|
|
4777
4702
|
* @param bankAccount Данные банковских реквизитов.
|
|
4778
4703
|
* @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_delete
|
|
4779
4704
|
*/
|
|
@@ -4785,9 +4710,7 @@ class Xt extends De {
|
|
|
4785
4710
|
*
|
|
4786
4711
|
* @param clientId Идентификатор клиента, к которому привязано контактное лицо.
|
|
4787
4712
|
* @param contactPerson Данные о контактном лице.
|
|
4788
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4789
|
-
* установить данные об ошибках валидации
|
|
4790
|
-
* в случае ошибок в запросах.
|
|
4713
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4791
4714
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4792
4715
|
*/
|
|
4793
4716
|
createClientContact(r, e, s = {}) {
|
|
@@ -4809,9 +4732,7 @@ class Xt extends De {
|
|
|
4809
4732
|
*
|
|
4810
4733
|
* @param clientId Идентификатор клиента, к которому привязано контактное лицо.
|
|
4811
4734
|
* @param contactPerson Данные о контактном лице.
|
|
4812
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4813
|
-
* установить данные об ошибках валидации
|
|
4814
|
-
* в случае ошибок в запросах.
|
|
4735
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4815
4736
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_change
|
|
4816
4737
|
*/
|
|
4817
4738
|
updateClientContact(r, e, s = {}) {
|
|
@@ -4855,9 +4776,7 @@ class Xt extends De {
|
|
|
4855
4776
|
* @param clientId Идентификатор клиента, к которому привязано контактное лицо.
|
|
4856
4777
|
* @param contragentId Идентификатор контрагента, к которому привязано контактное лицо.
|
|
4857
4778
|
* @param contactPerson Данные о контактном лице.
|
|
4858
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4859
|
-
* установить данные об ошибках валидации
|
|
4860
|
-
* в случае ошибок в запросах.
|
|
4779
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4861
4780
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4862
4781
|
*/
|
|
4863
4782
|
createContragentContact(r, e, s, i = {}) {
|
|
@@ -4904,9 +4823,7 @@ class Xt extends De {
|
|
|
4904
4823
|
* @param clientId Идентификатор клиента, к которому привязано контактное лицо.
|
|
4905
4824
|
* @param deliveryAddressId Идентификатор контрагента, к которому привязано контактное лицо.
|
|
4906
4825
|
* @param contactPerson Данные о контактном лице.
|
|
4907
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4908
|
-
* установить данные об ошибках валидации
|
|
4909
|
-
* в случае ошибок в запросах.
|
|
4826
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4910
4827
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4911
4828
|
*/
|
|
4912
4829
|
createDeliveryAddressContact(r, e, s, i = {}) {
|
|
@@ -4956,19 +4873,17 @@ class Xt extends De {
|
|
|
4956
4873
|
* @param clientId Идентификатор клиента, к которому привязано контактное лицо.
|
|
4957
4874
|
* @param contactPerson Данные о контактном лице.
|
|
4958
4875
|
* @param extraData Дополнительные данные
|
|
4959
|
-
* @param validationFieldResultData Список полей, для которых необходимо
|
|
4960
|
-
* установить данные об ошибках валидации
|
|
4961
|
-
* в случае ошибок в запросах.
|
|
4876
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4962
4877
|
*/
|
|
4963
4878
|
createContact(r, e, s, i = {}) {
|
|
4964
|
-
var c,
|
|
4879
|
+
var c, u;
|
|
4965
4880
|
const o = {
|
|
4966
4881
|
name: e.name,
|
|
4967
4882
|
position: e.position,
|
|
4968
4883
|
comment: e.comment,
|
|
4969
4884
|
...s
|
|
4970
4885
|
};
|
|
4971
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
4886
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new M(p.data), i);
|
|
4972
4887
|
}
|
|
4973
4888
|
/**
|
|
4974
4889
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5007,7 +4922,7 @@ const V = class V extends h {
|
|
|
5007
4922
|
* Время кэширования данных ответов на запросы (секунд).
|
|
5008
4923
|
*/
|
|
5009
4924
|
t(this, "responseDataCacheTimeout");
|
|
5010
|
-
this.responseDataCacheTimeout =
|
|
4925
|
+
this.responseDataCacheTimeout = T.getConfig().http.responseDataCacheTimeout;
|
|
5011
4926
|
}
|
|
5012
4927
|
/**
|
|
5013
4928
|
* Возвращает кэшированные данные.
|
|
@@ -5029,7 +4944,7 @@ const V = class V extends h {
|
|
|
5029
4944
|
*/
|
|
5030
4945
|
cacheResponse(e, s) {
|
|
5031
4946
|
V.responseDataCache.set(e, {
|
|
5032
|
-
validTo:
|
|
4947
|
+
validTo: kr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5033
4948
|
val: s
|
|
5034
4949
|
});
|
|
5035
4950
|
}
|
|
@@ -5044,10 +4959,10 @@ const V = class V extends h {
|
|
|
5044
4959
|
*/
|
|
5045
4960
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5046
4961
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
5047
|
-
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`),
|
|
5048
|
-
return
|
|
5049
|
-
const
|
|
5050
|
-
return i &&
|
|
4962
|
+
const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
|
|
4963
|
+
return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
|
|
4964
|
+
const v = p.map((R) => je.instanceInitializer(e, R));
|
|
4965
|
+
return i && v && this.cacheResponse(s, v), v;
|
|
5051
4966
|
});
|
|
5052
4967
|
}
|
|
5053
4968
|
};
|
|
@@ -5055,7 +4970,7 @@ const V = class V extends h {
|
|
|
5055
4970
|
* Кэш результатов запросов.
|
|
5056
4971
|
*/
|
|
5057
4972
|
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5058
|
-
let
|
|
4973
|
+
let pe = V;
|
|
5059
4974
|
class Zt extends h {
|
|
5060
4975
|
/**
|
|
5061
4976
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
@@ -5098,7 +5013,7 @@ class es extends h {
|
|
|
5098
5013
|
const i = this.get(
|
|
5099
5014
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
|
|
5100
5015
|
{ params: e },
|
|
5101
|
-
(c) => new
|
|
5016
|
+
(c) => new I(c.data)
|
|
5102
5017
|
);
|
|
5103
5018
|
return i.catch((c) => {
|
|
5104
5019
|
this.errorResponseHandler(c, s);
|
|
@@ -5146,13 +5061,13 @@ class rs {
|
|
|
5146
5061
|
* Возвращает диапазон дат по умолчанию.
|
|
5147
5062
|
*/
|
|
5148
5063
|
static defaultDateRanges() {
|
|
5149
|
-
const r =
|
|
5064
|
+
const r = _r(/* @__PURE__ */ new Date(), 1);
|
|
5150
5065
|
return {
|
|
5151
5066
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5152
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5153
|
-
today: { label: "Сегодня", from:
|
|
5154
|
-
yesterday: { label: "Вчера", from:
|
|
5155
|
-
tomorrow: { label: "Завтра", from:
|
|
5067
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
|
|
5068
|
+
today: { label: "Сегодня", from: _e(), to: Ur() },
|
|
5069
|
+
yesterday: { label: "Вчера", from: dr(), to: Nr() },
|
|
5070
|
+
tomorrow: { label: "Завтра", from: qr(), to: Or() }
|
|
5156
5071
|
};
|
|
5157
5072
|
}
|
|
5158
5073
|
}
|
|
@@ -5196,13 +5111,13 @@ const K = class K {
|
|
|
5196
5111
|
* Список единиц измерения линейной величины.
|
|
5197
5112
|
*/
|
|
5198
5113
|
t(K, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5199
|
-
let
|
|
5114
|
+
let Xe = K;
|
|
5200
5115
|
class ts {
|
|
5201
5116
|
/**
|
|
5202
5117
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5203
5118
|
*/
|
|
5204
5119
|
static generateUndefinedManagerInstance() {
|
|
5205
|
-
return new
|
|
5120
|
+
return new De({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5206
5121
|
}
|
|
5207
5122
|
/**
|
|
5208
5123
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5213,26 +5128,26 @@ class ts {
|
|
|
5213
5128
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5214
5129
|
}
|
|
5215
5130
|
}
|
|
5216
|
-
class
|
|
5131
|
+
class Ct extends pe {
|
|
5217
5132
|
/**
|
|
5218
5133
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5219
5134
|
*/
|
|
5220
5135
|
async getManagers() {
|
|
5221
|
-
const r = "/internal/managers", e =
|
|
5136
|
+
const r = "/internal/managers", e = pe.getCachedResponse(r);
|
|
5222
5137
|
if (e)
|
|
5223
5138
|
return e;
|
|
5224
|
-
const i = (await this.get(r)).data.map((o) =>
|
|
5139
|
+
const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
|
|
5225
5140
|
return this.cacheResponse(r, i), i;
|
|
5226
5141
|
}
|
|
5227
5142
|
}
|
|
5228
|
-
class
|
|
5143
|
+
class Rr extends Pr {
|
|
5229
5144
|
/**
|
|
5230
5145
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5231
5146
|
*
|
|
5232
5147
|
* @param data Данные для первоначальной инициализации.
|
|
5233
5148
|
*/
|
|
5234
5149
|
constructor(e) {
|
|
5235
|
-
var s, i, o, c,
|
|
5150
|
+
var s, i, o, c, u, p, v, R;
|
|
5236
5151
|
super(e);
|
|
5237
5152
|
/**
|
|
5238
5153
|
* Краткие данные о клиенте.
|
|
@@ -5280,13 +5195,13 @@ class vr extends Cr {
|
|
|
5280
5195
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5281
5196
|
}, this.delivery = {
|
|
5282
5197
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5283
|
-
date:
|
|
5284
|
-
address: (
|
|
5285
|
-
warehouse: (
|
|
5286
|
-
}, this.attachedUser = new
|
|
5198
|
+
date: y((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? w(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5199
|
+
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
|
|
5200
|
+
warehouse: (R = e == null ? void 0 : e.delivery) != null && R.warehouse ? new Ae(e.delivery.warehouse) : void 0
|
|
5201
|
+
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new L(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? w(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? w(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;
|
|
5287
5202
|
}
|
|
5288
5203
|
}
|
|
5289
|
-
class
|
|
5204
|
+
class vt extends j {
|
|
5290
5205
|
/**
|
|
5291
5206
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5292
5207
|
*
|
|
@@ -5369,7 +5284,7 @@ class at extends H {
|
|
|
5369
5284
|
this.product = new Z(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5370
5285
|
}
|
|
5371
5286
|
}
|
|
5372
|
-
class
|
|
5287
|
+
class Pt extends Rr {
|
|
5373
5288
|
/**
|
|
5374
5289
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5375
5290
|
*
|
|
@@ -5409,10 +5324,10 @@ class Ct extends vr {
|
|
|
5409
5324
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5410
5325
|
*/
|
|
5411
5326
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5412
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5327
|
+
this.products = (e.products ?? []).map((s) => new vt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ve.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new C(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5413
5328
|
}
|
|
5414
5329
|
}
|
|
5415
|
-
class ss extends
|
|
5330
|
+
class ss extends Te {
|
|
5416
5331
|
/**
|
|
5417
5332
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5418
5333
|
*
|
|
@@ -5425,7 +5340,7 @@ class ss extends De {
|
|
|
5425
5340
|
getOrders(r, e, s) {
|
|
5426
5341
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5427
5342
|
const o = { ...i.data };
|
|
5428
|
-
return o.data = o.data.map((c) => new
|
|
5343
|
+
return o.data = o.data.map((c) => new Rr(c)), o;
|
|
5429
5344
|
});
|
|
5430
5345
|
}
|
|
5431
5346
|
/**
|
|
@@ -5443,10 +5358,10 @@ class ss extends De {
|
|
|
5443
5358
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5444
5359
|
*/
|
|
5445
5360
|
getOrder(r) {
|
|
5446
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5361
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
|
|
5447
5362
|
}
|
|
5448
5363
|
}
|
|
5449
|
-
class
|
|
5364
|
+
class Le {
|
|
5450
5365
|
/**
|
|
5451
5366
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5452
5367
|
*
|
|
@@ -5473,12 +5388,12 @@ class _e {
|
|
|
5473
5388
|
* Источник клиентской цены.
|
|
5474
5389
|
*/
|
|
5475
5390
|
t(this, "source");
|
|
5476
|
-
this.client = new me(r == null ? void 0 : r.client), this.product = new
|
|
5391
|
+
this.client = new me(r == null ? void 0 : r.client), this.product = new I(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) ?? Ge.Product;
|
|
5477
5392
|
}
|
|
5478
5393
|
}
|
|
5479
|
-
const
|
|
5394
|
+
const xe = (n) => {
|
|
5480
5395
|
var r, e, s, i, o;
|
|
5481
|
-
return n ?
|
|
5396
|
+
return n ? ir(
|
|
5482
5397
|
{
|
|
5483
5398
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5484
5399
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5487,9 +5402,9 @@ const de = (n) => {
|
|
|
5487
5402
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5488
5403
|
hideNotActive: n.hideNotActive
|
|
5489
5404
|
},
|
|
5490
|
-
(c) =>
|
|
5405
|
+
(c) => D(c) || (Q(c) || nr(c)) && Y(c)
|
|
5491
5406
|
) : {};
|
|
5492
|
-
},
|
|
5407
|
+
}, Ze = (n) => {
|
|
5493
5408
|
const r = {};
|
|
5494
5409
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
5495
5410
|
};
|
|
@@ -5507,10 +5422,10 @@ class is extends h {
|
|
|
5507
5422
|
return this.get(
|
|
5508
5423
|
`/internal/price/products/${r}/analyze`,
|
|
5509
5424
|
{
|
|
5510
|
-
...
|
|
5511
|
-
filters:
|
|
5425
|
+
...Ze(e),
|
|
5426
|
+
filters: xe(s)
|
|
5512
5427
|
},
|
|
5513
|
-
(i) => i.data.map((o) => new
|
|
5428
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5514
5429
|
);
|
|
5515
5430
|
}
|
|
5516
5431
|
/**
|
|
@@ -5526,10 +5441,10 @@ class is extends h {
|
|
|
5526
5441
|
return this.get(
|
|
5527
5442
|
`/internal/price/categories/${r}/analyze`,
|
|
5528
5443
|
{
|
|
5529
|
-
...
|
|
5530
|
-
filters:
|
|
5444
|
+
...Ze(e),
|
|
5445
|
+
filters: xe(s)
|
|
5531
5446
|
},
|
|
5532
|
-
(i) => i.data.map((o) => new
|
|
5447
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5533
5448
|
);
|
|
5534
5449
|
}
|
|
5535
5450
|
/**
|
|
@@ -5548,13 +5463,13 @@ class is extends h {
|
|
|
5548
5463
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5549
5464
|
{
|
|
5550
5465
|
...e,
|
|
5551
|
-
filters:
|
|
5466
|
+
filters: xe(s)
|
|
5552
5467
|
},
|
|
5553
|
-
(i) => i.data.map((o) => new
|
|
5468
|
+
(i) => i.data.map((o) => new Le(o))
|
|
5554
5469
|
);
|
|
5555
5470
|
}
|
|
5556
5471
|
}
|
|
5557
|
-
class
|
|
5472
|
+
class Rt {
|
|
5558
5473
|
/**
|
|
5559
5474
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
5560
5475
|
*
|
|
@@ -5601,10 +5516,10 @@ class vt {
|
|
|
5601
5516
|
* @inheritDoc
|
|
5602
5517
|
*/
|
|
5603
5518
|
t(this, "currency");
|
|
5604
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
5519
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? w(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 U(r.client) : void 0, this.executor = r.executor ? new U(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
|
|
5605
5520
|
}
|
|
5606
5521
|
}
|
|
5607
|
-
class
|
|
5522
|
+
class At extends oe {
|
|
5608
5523
|
/**
|
|
5609
5524
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
5610
5525
|
*
|
|
@@ -5616,7 +5531,7 @@ class Pt extends oe {
|
|
|
5616
5531
|
* @inheritDoc
|
|
5617
5532
|
*/
|
|
5618
5533
|
t(this, "history");
|
|
5619
|
-
this.history = he(e.history, (s) => new
|
|
5534
|
+
this.history = he(e.history, (s) => new Rt(s));
|
|
5620
5535
|
}
|
|
5621
5536
|
}
|
|
5622
5537
|
class ns extends h {
|
|
@@ -5624,7 +5539,7 @@ class ns extends h {
|
|
|
5624
5539
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5625
5540
|
*/
|
|
5626
5541
|
constructor() {
|
|
5627
|
-
super(), this.baseUrl = `${
|
|
5542
|
+
super(), this.baseUrl = `${T.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
|
|
5628
5543
|
}
|
|
5629
5544
|
/**
|
|
5630
5545
|
* Возвращает данные об истории изменения цен.
|
|
@@ -5634,20 +5549,20 @@ class ns extends h {
|
|
|
5634
5549
|
* @see /docs/api#/operations/api_internal_price_history_get
|
|
5635
5550
|
*/
|
|
5636
5551
|
getProductPriceHistory(r) {
|
|
5637
|
-
var i, o, c,
|
|
5638
|
-
const e =
|
|
5639
|
-
|
|
5552
|
+
var i, o, c, u;
|
|
5553
|
+
const e = T.getConfig().dateFormats.api, s = ir(
|
|
5554
|
+
de(r, {
|
|
5640
5555
|
costDate: {
|
|
5641
|
-
from:
|
|
5642
|
-
to:
|
|
5556
|
+
from: ke((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
|
|
5557
|
+
to: ke((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (u = r.costDate) == null ? void 0 : u.to
|
|
5643
5558
|
}
|
|
5644
5559
|
}),
|
|
5645
|
-
(
|
|
5560
|
+
(p) => D(p) || (Q(p) || nr(p)) && Y(p)
|
|
5646
5561
|
);
|
|
5647
|
-
return this.get("/internal/history", s, (
|
|
5562
|
+
return this.get("/internal/history", s, (p) => he(p.data, (v) => new At(v)));
|
|
5648
5563
|
}
|
|
5649
5564
|
}
|
|
5650
|
-
class
|
|
5565
|
+
class er {
|
|
5651
5566
|
/**
|
|
5652
5567
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
5653
5568
|
*
|
|
@@ -5670,7 +5585,7 @@ class os extends h {
|
|
|
5670
5585
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
5671
5586
|
*/
|
|
5672
5587
|
constructor() {
|
|
5673
|
-
super(), this.baseUrl = `${
|
|
5588
|
+
super(), this.baseUrl = `${T.getConfig().http.recommendationsApiUrl ?? ""}/api`;
|
|
5674
5589
|
}
|
|
5675
5590
|
/**
|
|
5676
5591
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
@@ -5679,7 +5594,7 @@ class os extends h {
|
|
|
5679
5594
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
5680
5595
|
*/
|
|
5681
5596
|
getProductCategoryRecommendations(r) {
|
|
5682
|
-
return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new
|
|
5597
|
+
return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new er(e.data));
|
|
5683
5598
|
}
|
|
5684
5599
|
/**
|
|
5685
5600
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -5688,7 +5603,7 @@ class os extends h {
|
|
|
5688
5603
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
5689
5604
|
*/
|
|
5690
5605
|
getProductRecommendations(r) {
|
|
5691
|
-
return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new
|
|
5606
|
+
return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new er(e.data));
|
|
5692
5607
|
}
|
|
5693
5608
|
/**
|
|
5694
5609
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -5717,7 +5632,7 @@ class os extends h {
|
|
|
5717
5632
|
});
|
|
5718
5633
|
}
|
|
5719
5634
|
}
|
|
5720
|
-
class
|
|
5635
|
+
class $ extends pe {
|
|
5721
5636
|
/**
|
|
5722
5637
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
5723
5638
|
*
|
|
@@ -5726,26 +5641,26 @@ class T extends ue {
|
|
|
5726
5641
|
* и использовать в случае аналогичных запросов.
|
|
5727
5642
|
*/
|
|
5728
5643
|
getReference(r, e = !1) {
|
|
5729
|
-
return this.getTypedDataArrayRequester(
|
|
5644
|
+
return this.getTypedDataArrayRequester(ot, `/internal/references/${r}`, e);
|
|
5730
5645
|
}
|
|
5731
5646
|
/**
|
|
5732
5647
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
5733
5648
|
* первичного интереса.
|
|
5734
5649
|
*/
|
|
5735
5650
|
getChannelPrimaryInterest() {
|
|
5736
|
-
return this.getTypedDataArrayRequester(
|
|
5651
|
+
return this.getTypedDataArrayRequester(mr, "/internal/references/channel-primary-interest", !0);
|
|
5737
5652
|
}
|
|
5738
5653
|
/**
|
|
5739
5654
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
5740
5655
|
*/
|
|
5741
5656
|
getContactPositions() {
|
|
5742
|
-
return this.getTypedDataArrayRequester(
|
|
5657
|
+
return this.getTypedDataArrayRequester(ct, "/internal/references/contact-position", !0);
|
|
5743
5658
|
}
|
|
5744
5659
|
/**
|
|
5745
5660
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
5746
5661
|
*/
|
|
5747
5662
|
getCurrency() {
|
|
5748
|
-
return this.getTypedDataArrayRequester(
|
|
5663
|
+
return this.getTypedDataArrayRequester(Ce, "/public/references/currency", !0);
|
|
5749
5664
|
}
|
|
5750
5665
|
/**
|
|
5751
5666
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -5758,19 +5673,19 @@ class T extends ue {
|
|
|
5758
5673
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
5759
5674
|
*/
|
|
5760
5675
|
getOpf() {
|
|
5761
|
-
return this.getTypedDataArrayRequester(
|
|
5676
|
+
return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
|
|
5762
5677
|
}
|
|
5763
5678
|
/**
|
|
5764
5679
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
5765
5680
|
*/
|
|
5766
5681
|
getOrderPaymentStatuses() {
|
|
5767
|
-
return this.getTypedDataArrayRequester(
|
|
5682
|
+
return this.getTypedDataArrayRequester(lt, "/public/references/order-payment-status", !0);
|
|
5768
5683
|
}
|
|
5769
5684
|
/**
|
|
5770
5685
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
5771
5686
|
*/
|
|
5772
5687
|
getOrderStatuses() {
|
|
5773
|
-
return this.getTypedDataArrayRequester(
|
|
5688
|
+
return this.getTypedDataArrayRequester(ut, "/public/references/order-status", !0);
|
|
5774
5689
|
}
|
|
5775
5690
|
/**
|
|
5776
5691
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
@@ -5782,19 +5697,19 @@ class T extends ue {
|
|
|
5782
5697
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
5783
5698
|
*/
|
|
5784
5699
|
getResourceTypes() {
|
|
5785
|
-
return this.getTypedDataArrayRequester(
|
|
5700
|
+
return this.getTypedDataArrayRequester(fr, "/internal/references/resource-type", !0);
|
|
5786
5701
|
}
|
|
5787
5702
|
/**
|
|
5788
5703
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
5789
5704
|
*/
|
|
5790
5705
|
getSalesDirections() {
|
|
5791
|
-
return this.getTypedDataArrayRequester(
|
|
5706
|
+
return this.getTypedDataArrayRequester(L, "/public/references/sales-direction", !0);
|
|
5792
5707
|
}
|
|
5793
5708
|
/**
|
|
5794
5709
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
5795
5710
|
*/
|
|
5796
5711
|
getSourcePrimaryInterest() {
|
|
5797
|
-
return this.getTypedDataArrayRequester(
|
|
5712
|
+
return this.getTypedDataArrayRequester(yr, "/internal/references/source-primary-interest", !0);
|
|
5798
5713
|
}
|
|
5799
5714
|
/**
|
|
5800
5715
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -5802,7 +5717,7 @@ class T extends ue {
|
|
|
5802
5717
|
* @param term Терм поиска.
|
|
5803
5718
|
*/
|
|
5804
5719
|
searchCity(r) {
|
|
5805
|
-
return this.getTypedDataArrayRequester(
|
|
5720
|
+
return this.getTypedDataArrayRequester(He, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
5806
5721
|
}
|
|
5807
5722
|
/**
|
|
5808
5723
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -5830,29 +5745,29 @@ class T extends ue {
|
|
|
5830
5745
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
5831
5746
|
*/
|
|
5832
5747
|
getWarehouses() {
|
|
5833
|
-
return this.getTypedDataArrayRequester(
|
|
5748
|
+
return this.getTypedDataArrayRequester(Ae, "/public/references/warehouse", !0);
|
|
5834
5749
|
}
|
|
5835
5750
|
/**
|
|
5836
5751
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
5837
5752
|
*/
|
|
5838
5753
|
getPropertyTypes() {
|
|
5839
|
-
return this.getTypedDataArrayRequester(
|
|
5754
|
+
return this.getTypedDataArrayRequester(gr, "/internal/references/property-type", !0);
|
|
5840
5755
|
}
|
|
5841
5756
|
/**
|
|
5842
5757
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
5843
5758
|
*/
|
|
5844
5759
|
getPriceCoefficients() {
|
|
5845
|
-
return this.getTypedDataArrayRequester(
|
|
5760
|
+
return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
|
|
5846
5761
|
}
|
|
5847
5762
|
/**
|
|
5848
5763
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
5849
5764
|
*/
|
|
5850
5765
|
getProductFileType() {
|
|
5851
|
-
return this.getTypedDataArrayRequester(
|
|
5766
|
+
return this.getTypedDataArrayRequester(ht, "/public/references/product-file-type", !0);
|
|
5852
5767
|
}
|
|
5853
5768
|
}
|
|
5854
|
-
const
|
|
5855
|
-
const n =
|
|
5769
|
+
const A = te("__references_private", () => {
|
|
5770
|
+
const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0), a = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0), H = m(void 0), $e = m(void 0), l = m(void 0);
|
|
5856
5771
|
return {
|
|
5857
5772
|
/**
|
|
5858
5773
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5885,43 +5800,43 @@ const R = te("__references_private", () => {
|
|
|
5885
5800
|
/**
|
|
5886
5801
|
* Справочник статусов оплаты заказа.
|
|
5887
5802
|
*/
|
|
5888
|
-
orderPaymentStatusReference:
|
|
5803
|
+
orderPaymentStatusReference: u,
|
|
5889
5804
|
/**
|
|
5890
5805
|
* Справочник статусов заказов.
|
|
5891
5806
|
*/
|
|
5892
|
-
orderStatusReference:
|
|
5807
|
+
orderStatusReference: p,
|
|
5893
5808
|
/**
|
|
5894
5809
|
* Справочник типов оплаты заказов.
|
|
5895
5810
|
*/
|
|
5896
|
-
paymentTypeReference:
|
|
5811
|
+
paymentTypeReference: v,
|
|
5897
5812
|
/**
|
|
5898
5813
|
* Справочник групп партнеров.
|
|
5899
5814
|
*/
|
|
5900
|
-
partnerGroupReference:
|
|
5815
|
+
partnerGroupReference: R,
|
|
5901
5816
|
/**
|
|
5902
5817
|
* Справочник типов файлов продукктов/категорий.
|
|
5903
5818
|
*/
|
|
5904
|
-
productFileTypeReference:
|
|
5819
|
+
productFileTypeReference: a,
|
|
5905
5820
|
/**
|
|
5906
5821
|
* Справочник типов ресурсов.
|
|
5907
5822
|
*/
|
|
5908
|
-
resourceTypesReference:
|
|
5823
|
+
resourceTypesReference: _,
|
|
5909
5824
|
/**
|
|
5910
5825
|
* Справочник направлений продаж.
|
|
5911
5826
|
*/
|
|
5912
|
-
salesDirectionsReference:
|
|
5827
|
+
salesDirectionsReference: O,
|
|
5913
5828
|
/**
|
|
5914
5829
|
* Справочник источников первичного интереса.
|
|
5915
5830
|
*/
|
|
5916
|
-
sourcePrimaryInterestReference:
|
|
5831
|
+
sourcePrimaryInterestReference: G,
|
|
5917
5832
|
/**
|
|
5918
5833
|
* Справочник складов.
|
|
5919
5834
|
*/
|
|
5920
|
-
warehousesReference:
|
|
5835
|
+
warehousesReference: H,
|
|
5921
5836
|
/**
|
|
5922
5837
|
* Справочник типов свойств.
|
|
5923
5838
|
*/
|
|
5924
|
-
propertyTypesReference:
|
|
5839
|
+
propertyTypesReference: $e,
|
|
5925
5840
|
/**
|
|
5926
5841
|
* Справочник коэффициентов цен.
|
|
5927
5842
|
*/
|
|
@@ -5929,90 +5844,90 @@ const R = te("__references_private", () => {
|
|
|
5929
5844
|
};
|
|
5930
5845
|
}), cs = te("references", () => {
|
|
5931
5846
|
const n = P(() => {
|
|
5932
|
-
const l =
|
|
5933
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(
|
|
5847
|
+
const l = A();
|
|
5848
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
|
|
5934
5849
|
l.channelPrimaryInterestReference = g;
|
|
5935
|
-
}).catch(
|
|
5850
|
+
}).catch(f)), l.channelPrimaryInterestReference;
|
|
5936
5851
|
}), r = P(() => {
|
|
5937
|
-
const l =
|
|
5938
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(
|
|
5852
|
+
const l = A();
|
|
5853
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
|
|
5939
5854
|
l.contactPositionsReference = g;
|
|
5940
|
-
}).catch(
|
|
5855
|
+
}).catch(f)), l.contactPositionsReference;
|
|
5941
5856
|
}), e = P(() => {
|
|
5942
|
-
const l =
|
|
5943
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(
|
|
5857
|
+
const l = A();
|
|
5858
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
|
|
5944
5859
|
l.currencyReference = g;
|
|
5945
|
-
}).catch(
|
|
5860
|
+
}).catch(f)), l.currencyReference;
|
|
5946
5861
|
}), s = P(() => {
|
|
5947
|
-
const l =
|
|
5948
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(
|
|
5862
|
+
const l = A();
|
|
5863
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
|
|
5949
5864
|
l.opfReference = g;
|
|
5950
|
-
}).catch(
|
|
5865
|
+
}).catch(f)), l.opfReference;
|
|
5951
5866
|
}), i = P(() => {
|
|
5952
|
-
const l =
|
|
5953
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(
|
|
5867
|
+
const l = A();
|
|
5868
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
|
|
5954
5869
|
l.orderPaymentStatusReference = g;
|
|
5955
|
-
}).catch(
|
|
5870
|
+
}).catch(f)), l.orderPaymentStatusReference;
|
|
5956
5871
|
}), o = P(() => {
|
|
5957
|
-
const l =
|
|
5958
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(
|
|
5872
|
+
const l = A();
|
|
5873
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
|
|
5959
5874
|
l.orderStatusReference = g;
|
|
5960
|
-
}).catch(
|
|
5875
|
+
}).catch(f)), l.orderStatusReference;
|
|
5961
5876
|
}), c = P(() => {
|
|
5962
|
-
const l =
|
|
5963
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(
|
|
5877
|
+
const l = A();
|
|
5878
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
|
|
5964
5879
|
l.paymentTypeReference = g;
|
|
5965
|
-
}).catch(
|
|
5966
|
-
}), p = P(() => {
|
|
5967
|
-
const l = R();
|
|
5968
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
5969
|
-
l.partnerGroupReference = g;
|
|
5970
|
-
}).catch(y)), l.partnerGroupReference;
|
|
5880
|
+
}).catch(f)), l.paymentTypeReference;
|
|
5971
5881
|
}), u = P(() => {
|
|
5972
|
-
const l =
|
|
5973
|
-
return !l.
|
|
5882
|
+
const l = A();
|
|
5883
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
|
|
5884
|
+
l.partnerGroupReference = g;
|
|
5885
|
+
}).catch(f)), l.partnerGroupReference;
|
|
5886
|
+
}), p = P(() => {
|
|
5887
|
+
const l = A();
|
|
5888
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
|
|
5974
5889
|
l.productFileTypeReference = g;
|
|
5975
|
-
}).catch(
|
|
5976
|
-
}),
|
|
5977
|
-
const l =
|
|
5978
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(
|
|
5890
|
+
}).catch(f)), l.productFileTypeReference;
|
|
5891
|
+
}), v = P(() => {
|
|
5892
|
+
const l = A();
|
|
5893
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
|
|
5979
5894
|
l.resourceTypesReference = g;
|
|
5980
|
-
}).catch(
|
|
5981
|
-
}),
|
|
5982
|
-
const l =
|
|
5983
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(
|
|
5895
|
+
}).catch(f)), l.resourceTypesReference;
|
|
5896
|
+
}), R = P(() => {
|
|
5897
|
+
const l = A();
|
|
5898
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
|
|
5984
5899
|
l.salesDirectionsReference = g;
|
|
5985
|
-
}).catch(
|
|
5986
|
-
}),
|
|
5987
|
-
const l =
|
|
5988
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(
|
|
5900
|
+
}).catch(f)), l.salesDirectionsReference;
|
|
5901
|
+
}), a = P(() => {
|
|
5902
|
+
const l = A();
|
|
5903
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
|
|
5989
5904
|
l.sourcePrimaryInterestReference = g;
|
|
5990
|
-
}).catch(
|
|
5991
|
-
}),
|
|
5992
|
-
const l =
|
|
5993
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(
|
|
5905
|
+
}).catch(f)), l.sourcePrimaryInterestReference;
|
|
5906
|
+
}), _ = P(() => {
|
|
5907
|
+
const l = A();
|
|
5908
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
|
|
5994
5909
|
l.deliveryTypeReference = g;
|
|
5995
|
-
}).catch(
|
|
5996
|
-
}),
|
|
5997
|
-
const l =
|
|
5998
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
5910
|
+
}).catch(f)), l.deliveryTypeReference;
|
|
5911
|
+
}), O = P(() => {
|
|
5912
|
+
const l = A();
|
|
5913
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
|
|
5999
5914
|
l.managersList = g;
|
|
6000
|
-
}).catch(
|
|
6001
|
-
}),
|
|
6002
|
-
const l =
|
|
6003
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(
|
|
5915
|
+
}).catch(f)), l.managersList;
|
|
5916
|
+
}), G = P(() => {
|
|
5917
|
+
const l = A();
|
|
5918
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
|
|
6004
5919
|
l.warehousesReference = g;
|
|
6005
|
-
}).catch(
|
|
6006
|
-
}),
|
|
6007
|
-
const l =
|
|
6008
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(
|
|
5920
|
+
}).catch(f)), l.warehousesReference;
|
|
5921
|
+
}), H = P(() => {
|
|
5922
|
+
const l = A();
|
|
5923
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
|
|
6009
5924
|
l.propertyTypesReference = g;
|
|
6010
|
-
}).catch(
|
|
6011
|
-
}),
|
|
6012
|
-
const l =
|
|
6013
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(
|
|
5925
|
+
}).catch(f)), l.propertyTypesReference;
|
|
5926
|
+
}), $e = P(() => {
|
|
5927
|
+
const l = A();
|
|
5928
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
|
|
6014
5929
|
l.priceCoefficientsReference = g;
|
|
6015
|
-
}).catch(
|
|
5930
|
+
}).catch(f)), l.priceCoefficientsReference;
|
|
6016
5931
|
});
|
|
6017
5932
|
return {
|
|
6018
5933
|
/**
|
|
@@ -6046,46 +5961,46 @@ const R = te("__references_private", () => {
|
|
|
6046
5961
|
/**
|
|
6047
5962
|
* Справочник групп партнеров.
|
|
6048
5963
|
*/
|
|
6049
|
-
partnerGroupsReference:
|
|
5964
|
+
partnerGroupsReference: u,
|
|
6050
5965
|
/**
|
|
6051
5966
|
* Справочник типов файлов продуктов/категорий.
|
|
6052
5967
|
*/
|
|
6053
|
-
productFilesTypesReference:
|
|
5968
|
+
productFilesTypesReference: p,
|
|
6054
5969
|
/**
|
|
6055
5970
|
* Справочник типов ресурсов.
|
|
6056
5971
|
*/
|
|
6057
|
-
resourceTypesReference:
|
|
5972
|
+
resourceTypesReference: v,
|
|
6058
5973
|
/**
|
|
6059
5974
|
* Справочник направлений продаж.
|
|
6060
5975
|
*/
|
|
6061
|
-
salesDirectionsReference:
|
|
5976
|
+
salesDirectionsReference: R,
|
|
6062
5977
|
/**
|
|
6063
5978
|
* Справочник каналов первичного интереса.
|
|
6064
5979
|
*/
|
|
6065
|
-
sourcePrimaryInterestsReference:
|
|
5980
|
+
sourcePrimaryInterestsReference: a,
|
|
6066
5981
|
/**
|
|
6067
5982
|
* Справочник типов доставки.
|
|
6068
5983
|
*/
|
|
6069
|
-
deliveryTypeReference:
|
|
5984
|
+
deliveryTypeReference: _,
|
|
6070
5985
|
/**
|
|
6071
5986
|
* Список менеджеров.
|
|
6072
5987
|
*/
|
|
6073
|
-
managersList:
|
|
5988
|
+
managersList: O,
|
|
6074
5989
|
/**
|
|
6075
5990
|
* Справочник складов.
|
|
6076
5991
|
*/
|
|
6077
|
-
warehousesReference:
|
|
5992
|
+
warehousesReference: G,
|
|
6078
5993
|
/**
|
|
6079
5994
|
* Справочник типов свойств.
|
|
6080
5995
|
*/
|
|
6081
|
-
propertyTypesReference:
|
|
5996
|
+
propertyTypesReference: H,
|
|
6082
5997
|
/**
|
|
6083
5998
|
* Справочник коэффициентов цен.
|
|
6084
5999
|
*/
|
|
6085
|
-
priceCoefficientsReference:
|
|
6000
|
+
priceCoefficientsReference: $e
|
|
6086
6001
|
};
|
|
6087
6002
|
});
|
|
6088
|
-
class
|
|
6003
|
+
class Dt {
|
|
6089
6004
|
/**
|
|
6090
6005
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
6091
6006
|
*
|
|
@@ -6103,7 +6018,7 @@ class Rt {
|
|
|
6103
6018
|
this.name = r.name, this.content = r.content;
|
|
6104
6019
|
}
|
|
6105
6020
|
}
|
|
6106
|
-
class
|
|
6021
|
+
class rr {
|
|
6107
6022
|
/**
|
|
6108
6023
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
6109
6024
|
*
|
|
@@ -6139,7 +6054,7 @@ class er {
|
|
|
6139
6054
|
*/
|
|
6140
6055
|
t(this, "meta");
|
|
6141
6056
|
var e;
|
|
6142
|
-
this.resourceType = new
|
|
6057
|
+
this.resourceType = new fr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new Dt(s))) ?? [];
|
|
6143
6058
|
}
|
|
6144
6059
|
}
|
|
6145
6060
|
class ls extends h {
|
|
@@ -6150,7 +6065,7 @@ class ls extends h {
|
|
|
6150
6065
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
6151
6066
|
*/
|
|
6152
6067
|
getResourceSeoData(r, e) {
|
|
6153
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
6068
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new rr(s.data));
|
|
6154
6069
|
}
|
|
6155
6070
|
/**
|
|
6156
6071
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -6161,7 +6076,7 @@ class ls extends h {
|
|
|
6161
6076
|
* в случае ошибок в запросах.
|
|
6162
6077
|
*/
|
|
6163
6078
|
saveResourceSeoData(r, e = {}) {
|
|
6164
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
6079
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new rr(s.data), e);
|
|
6165
6080
|
}
|
|
6166
6081
|
/**
|
|
6167
6082
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -6173,7 +6088,7 @@ class ls extends h {
|
|
|
6173
6088
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
6174
6089
|
}
|
|
6175
6090
|
}
|
|
6176
|
-
class
|
|
6091
|
+
class us extends h {
|
|
6177
6092
|
/**
|
|
6178
6093
|
* Возвращает подсказки по адресам.
|
|
6179
6094
|
*
|
|
@@ -6220,8 +6135,8 @@ class ps extends h {
|
|
|
6220
6135
|
});
|
|
6221
6136
|
}
|
|
6222
6137
|
}
|
|
6223
|
-
var
|
|
6224
|
-
class
|
|
6138
|
+
var Tt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Tt || {});
|
|
6139
|
+
class $t extends hr {
|
|
6225
6140
|
/**
|
|
6226
6141
|
* Инициализирует экземпляр класса {@link User}.
|
|
6227
6142
|
*
|
|
@@ -6244,12 +6159,12 @@ class Dt extends ur {
|
|
|
6244
6159
|
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;
|
|
6245
6160
|
}
|
|
6246
6161
|
}
|
|
6247
|
-
class
|
|
6162
|
+
class ps extends h {
|
|
6248
6163
|
/**
|
|
6249
6164
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
6250
6165
|
*/
|
|
6251
6166
|
constructor() {
|
|
6252
|
-
super(), this.baseUrl = `${
|
|
6167
|
+
super(), this.baseUrl = `${T.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
|
|
6253
6168
|
}
|
|
6254
6169
|
/**
|
|
6255
6170
|
* Функция для получения обновленных токенов доступа.
|
|
@@ -6260,17 +6175,17 @@ class us extends h {
|
|
|
6260
6175
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
6261
6176
|
}
|
|
6262
6177
|
}
|
|
6263
|
-
class
|
|
6178
|
+
class bt extends h {
|
|
6264
6179
|
/**
|
|
6265
6180
|
* Возвращает данные о текущем пользователе.
|
|
6266
6181
|
*/
|
|
6267
6182
|
// eslint-disable-next-line class-methods-use-this
|
|
6268
6183
|
getCurrentUser() {
|
|
6269
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
6184
|
+
return this.get("/internal/users/info", {}, (r) => new $t(r.data));
|
|
6270
6185
|
}
|
|
6271
6186
|
}
|
|
6272
|
-
const
|
|
6273
|
-
const n =
|
|
6187
|
+
const at = te("__user_state_private", () => {
|
|
6188
|
+
const n = m({}), r = m(void 0);
|
|
6274
6189
|
return {
|
|
6275
6190
|
/**
|
|
6276
6191
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -6286,10 +6201,10 @@ const Tt = te("__user_state_private", () => {
|
|
|
6286
6201
|
* Данные о текущем пользователе.
|
|
6287
6202
|
*/
|
|
6288
6203
|
currentUser: P(() => {
|
|
6289
|
-
const r =
|
|
6290
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
6204
|
+
const r = at();
|
|
6205
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(bt).getCurrentUser().then((e) => {
|
|
6291
6206
|
r.currentUser = e;
|
|
6292
|
-
}).catch(
|
|
6207
|
+
}).catch(f).finally(() => {
|
|
6293
6208
|
r.dataLoaderList.currentUser = !1;
|
|
6294
6209
|
})), r.currentUser;
|
|
6295
6210
|
})
|
|
@@ -6318,149 +6233,149 @@ class gs {
|
|
|
6318
6233
|
}
|
|
6319
6234
|
}
|
|
6320
6235
|
export {
|
|
6321
|
-
|
|
6322
|
-
|
|
6323
|
-
|
|
6324
|
-
|
|
6325
|
-
|
|
6326
|
-
|
|
6236
|
+
ot as AnyReference,
|
|
6237
|
+
Ft as AppBaseConfig,
|
|
6238
|
+
T as AppConfigProvider,
|
|
6239
|
+
qe as BankAccount,
|
|
6240
|
+
Te as BasePaginationProvider,
|
|
6241
|
+
Jr as CalculationTypeEnum,
|
|
6327
6242
|
fe as Cart,
|
|
6328
|
-
|
|
6243
|
+
Wr as CartItem,
|
|
6329
6244
|
zr as CartItemBase,
|
|
6330
|
-
|
|
6331
|
-
|
|
6332
|
-
|
|
6333
|
-
|
|
6334
|
-
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
|
|
6245
|
+
dt as CartProvider,
|
|
6246
|
+
Mt as CatalogProvider,
|
|
6247
|
+
or as CatalogableItem,
|
|
6248
|
+
z as Category,
|
|
6249
|
+
Je as CategoryPricingRule,
|
|
6250
|
+
mr as ChannelPrimaryInterest,
|
|
6251
|
+
Kt as City,
|
|
6252
|
+
He as CityWithRegionAndCountry,
|
|
6253
|
+
Ye as Client,
|
|
6254
|
+
yt as ClientAdditionalData,
|
|
6340
6255
|
we as ClientCategory,
|
|
6341
|
-
|
|
6342
|
-
|
|
6343
|
-
|
|
6256
|
+
x as ClientDataProvider,
|
|
6257
|
+
jt as ClientPriceProvider,
|
|
6258
|
+
Gt as ClientPriceTemplateProvider,
|
|
6344
6259
|
Z as ClientProduct,
|
|
6345
|
-
|
|
6260
|
+
Et as ClientProductCategoryDataProvider,
|
|
6346
6261
|
zt as ClientProductDataProvider,
|
|
6347
6262
|
me as ClientShortInfo,
|
|
6348
|
-
|
|
6349
|
-
|
|
6263
|
+
nt as ClientsAdditionalDataRequestTypeEnum,
|
|
6264
|
+
Qt as ClientsListFilters,
|
|
6350
6265
|
oe as CodedIdentity,
|
|
6351
6266
|
es as ConfiguratorProvider,
|
|
6352
6267
|
Ne as Contact,
|
|
6353
|
-
|
|
6268
|
+
Yr as ContactLinks,
|
|
6354
6269
|
M as ContactPerson,
|
|
6355
|
-
|
|
6356
|
-
|
|
6357
|
-
|
|
6358
|
-
|
|
6359
|
-
|
|
6360
|
-
|
|
6361
|
-
|
|
6362
|
-
|
|
6363
|
-
|
|
6364
|
-
|
|
6270
|
+
ft as ContactPersonRelated,
|
|
6271
|
+
ct as ContactPosition,
|
|
6272
|
+
Ie as ContactRelation,
|
|
6273
|
+
wr as ContragentBase,
|
|
6274
|
+
ve as ContragentFactory,
|
|
6275
|
+
Cr as ContragentIc,
|
|
6276
|
+
gt as ContragentPerson,
|
|
6277
|
+
mt as ContragentUlNr,
|
|
6278
|
+
vr as ContragentUlR,
|
|
6279
|
+
Ge as CostSourceEnum,
|
|
6365
6280
|
ee as Country,
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6281
|
+
Ce as Currency,
|
|
6282
|
+
us as DataSuggestionProvider,
|
|
6283
|
+
Yt as DataTablePagination,
|
|
6284
|
+
wt as DataTablePaginationRequestParams,
|
|
6285
|
+
Xt as DataTableSortRequestParams,
|
|
6371
6286
|
rs as DateTimeProvider,
|
|
6372
|
-
|
|
6373
|
-
|
|
6287
|
+
Kr as DeletableNamedIdentity,
|
|
6288
|
+
Pe as DeliveryAddress,
|
|
6374
6289
|
X as DeliveryType,
|
|
6375
6290
|
Nt as DetailedJwtPayload,
|
|
6376
|
-
|
|
6377
|
-
|
|
6291
|
+
et as DeviceTypeResolutionConfig,
|
|
6292
|
+
Qr as DiscountShortInfo,
|
|
6378
6293
|
gs as FieldValidationResultData,
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6294
|
+
ue as FilterGroup,
|
|
6295
|
+
Ve as FilterItem,
|
|
6296
|
+
Be as FilterOpEnum,
|
|
6297
|
+
lr as GeoCoordinates,
|
|
6298
|
+
Br as HiddenCatalogableItem,
|
|
6299
|
+
pe as HttpCachedRequester,
|
|
6300
|
+
rt as HttpParamsConfig,
|
|
6386
6301
|
h as HttpRequester,
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6302
|
+
j as Identity,
|
|
6303
|
+
Er as Image,
|
|
6304
|
+
d as JwtPayload,
|
|
6305
|
+
De as Manager,
|
|
6391
6306
|
ce as ManagerCommon,
|
|
6392
6307
|
ts as ManagerDataFactory,
|
|
6393
|
-
|
|
6394
|
-
|
|
6308
|
+
Ct as ManagerDataProvider,
|
|
6309
|
+
Dt as MetaTagItem,
|
|
6395
6310
|
b as NamedIdentity,
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6311
|
+
F as Opf,
|
|
6312
|
+
N as OpfEnum,
|
|
6313
|
+
Pt as Order,
|
|
6314
|
+
Rr as OrderInfo,
|
|
6315
|
+
lt as OrderPaymentStatus,
|
|
6316
|
+
vt as OrderProduct,
|
|
6317
|
+
Pr as OrderShortInfo,
|
|
6318
|
+
ut as OrderStatus,
|
|
6404
6319
|
ss as OrdersDataProvider,
|
|
6405
6320
|
re as PartnerGroup,
|
|
6406
6321
|
pt as PaymentType,
|
|
6407
6322
|
ye as PreferencesStorageProvider,
|
|
6408
|
-
|
|
6323
|
+
Le as PriceAnalyze,
|
|
6409
6324
|
is as PriceAnalyzeProvider,
|
|
6410
|
-
|
|
6411
|
-
|
|
6325
|
+
Re as PriceCoefficient,
|
|
6326
|
+
cr as PriceCoefficientEnum,
|
|
6412
6327
|
ns as PriceHistoryDataProvider,
|
|
6413
|
-
|
|
6328
|
+
Rt as PriceHistoryItem,
|
|
6414
6329
|
W as PriceTemplate,
|
|
6415
|
-
|
|
6330
|
+
ae as PriceTemplateCategory,
|
|
6416
6331
|
se as PriceTemplateClient,
|
|
6417
6332
|
pr as PriceTemplateICatalogableItem,
|
|
6418
|
-
|
|
6419
|
-
|
|
6333
|
+
Se as PriceTemplateProduct,
|
|
6334
|
+
Wt as PriceTemplateProvider,
|
|
6420
6335
|
ne as PricingRole,
|
|
6421
|
-
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6336
|
+
Jt as PricingRoleProvider,
|
|
6337
|
+
Oe as PrimaryCatalogableItem,
|
|
6338
|
+
I as Product,
|
|
6339
|
+
Ht as ProductCategoryDataProvider,
|
|
6340
|
+
Bt as ProductDataProvider,
|
|
6341
|
+
ht as ProductFileType,
|
|
6342
|
+
Me as ProductPriceCoefficient,
|
|
6343
|
+
At as ProductPriceHistory,
|
|
6344
|
+
Vt as PropertiesProvider,
|
|
6430
6345
|
ie as Property,
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6346
|
+
gr as PropertyType,
|
|
6347
|
+
Vr as PropertyTypeEnum,
|
|
6348
|
+
E as PropertyValue,
|
|
6434
6349
|
os as RecommendationsDataProvider,
|
|
6435
|
-
|
|
6436
|
-
|
|
6437
|
-
|
|
6350
|
+
er as RecommendationsList,
|
|
6351
|
+
C as Reference,
|
|
6352
|
+
$ as ReferenceDataProvider,
|
|
6438
6353
|
le as Region,
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6442
|
-
|
|
6354
|
+
fr as ResourceType,
|
|
6355
|
+
L as SalesDirection,
|
|
6356
|
+
tt as SentryConfig,
|
|
6357
|
+
rr as Seo,
|
|
6443
6358
|
ls as SeoDataProvider,
|
|
6444
|
-
|
|
6445
|
-
|
|
6359
|
+
yr as SourcePrimaryInterest,
|
|
6360
|
+
Hr as StockCount,
|
|
6446
6361
|
Ut as TemplatesListFilters,
|
|
6447
|
-
|
|
6448
|
-
|
|
6362
|
+
je as TypedInstanceFactory,
|
|
6363
|
+
Xe as UnitsHelper,
|
|
6449
6364
|
Zt as UnknownClientDataProvider,
|
|
6450
|
-
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6365
|
+
ur as UpdatableNamedIdentity,
|
|
6366
|
+
$t as User,
|
|
6367
|
+
ps as UserAuthDataProvider,
|
|
6368
|
+
hr as UserCommonInfo,
|
|
6369
|
+
bt as UserDataProvider,
|
|
6370
|
+
Xr as UserPricingRole,
|
|
6371
|
+
U as UserShortInfo,
|
|
6372
|
+
Tt as UserTypeEnum,
|
|
6373
|
+
st as VersionConfig,
|
|
6374
|
+
Ae as Warehouse,
|
|
6375
|
+
it as WebSocketConfig,
|
|
6376
|
+
Ke as findCatalogItemByIdRecursive,
|
|
6377
|
+
Qe as flattenCatalogItems,
|
|
6378
|
+
be as useAuthStateStore,
|
|
6464
6379
|
cs as useReferencesStore,
|
|
6465
6380
|
hs as useUserStateStore
|
|
6466
6381
|
};
|