@snabcentr/common-lib 2.13.1 → 2.14.0
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 +4 -2
- package/dist/sc-common-lib.js +889 -780
- 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/catalog/classes/category-filter-setting.d.ts +30 -0
- package/dist/src/catalog/classes/category-filter-setting.d.ts.map +1 -0
- package/dist/src/catalog/classes/filter-settings.d.ts +37 -0
- package/dist/src/catalog/classes/filter-settings.d.ts.map +1 -0
- package/dist/src/catalog/classes/index.d.ts +2 -0
- package/dist/src/catalog/classes/index.d.ts.map +1 -1
- package/dist/src/catalog/classes/price-template.d.ts +5 -0
- package/dist/src/catalog/classes/price-template.d.ts.map +1 -1
- package/dist/src/catalog/classes/property.d.ts +4 -0
- package/dist/src/catalog/classes/property.d.ts.map +1 -1
- package/dist/src/catalog/classes/templates-list-filters.d.ts +4 -0
- package/dist/src/catalog/classes/templates-list-filters.d.ts.map +1 -1
- package/dist/src/catalog/enums/index.d.ts +1 -0
- package/dist/src/catalog/enums/index.d.ts.map +1 -1
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts +18 -0
- package/dist/src/catalog/enums/product-filter-type-enum.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts +27 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting-update-data.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting.d.ts +21 -0
- package/dist/src/catalog/interfaces/i-category-filter-setting.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts +27 -0
- package/dist/src/catalog/interfaces/i-filter-settings.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-price-template.d.ts +5 -0
- package/dist/src/catalog/interfaces/i-price-template.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-property.d.ts +4 -0
- package/dist/src/catalog/interfaces/i-property.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-templates-list-filters.d.ts +4 -0
- package/dist/src/catalog/interfaces/i-templates-list-filters.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/index.d.ts +3 -0
- package/dist/src/catalog/interfaces/index.d.ts.map +1 -1
- package/dist/src/catalog/providers/properties-provider.d.ts +26 -0
- package/dist/src/catalog/providers/properties-provider.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 Ur = (
|
|
3
|
-
var s = (
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
1
|
+
var Fr = Object.defineProperty;
|
|
2
|
+
var Ur = (i, r, e) => r in i ? Fr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var s = (i, r, e) => Ur(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as pr } from "jwt-decode";
|
|
5
|
+
import { merge as ge, isNil as d, isEmpty as te, noop as v, mapValues as hr, isArray as H, every as Hr, split as Mr, isString as C, constant as Br, toUpper as jr, cloneDeep as Gr, toLower as zr, isFunction as Me, map as we, forEach as Wr, isDate as qe, isObject as Be, omitBy as gr } from "lodash-es";
|
|
6
6
|
import { objectToCamel as je, objectToSnake as Ye } from "ts-case-convert";
|
|
7
7
|
import { defineStore as W } from "pinia";
|
|
8
|
-
import { ref as y, markRaw as
|
|
9
|
-
import { isAfter as Xe, parseISO as
|
|
10
|
-
import
|
|
11
|
-
class
|
|
8
|
+
import { ref as y, markRaw as Jr, computed as P } from "vue";
|
|
9
|
+
import { isAfter as Xe, parseISO as a, startOfToday as Ne, format as L, addBusinessDays as Vr, endOfTomorrow as Er, startOfTomorrow as Kr, endOfYesterday as Qr, startOfYesterday as Yr, endOfToday as Xr, endOfDay as Zr, startOfDay as et, addSeconds as rt } from "date-fns";
|
|
10
|
+
import tt, { CanceledError as st } from "axios";
|
|
11
|
+
class M {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
14
14
|
*
|
|
@@ -99,7 +99,7 @@ class B {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
s(this, "email", "");
|
|
102
|
-
|
|
102
|
+
ge(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,11 +107,11 @@ class B {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
const e =
|
|
110
|
+
const e = pr(r), t = new M(je(e));
|
|
111
111
|
return t.resourceAccess = e.resource_access, t;
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
class
|
|
114
|
+
class Yt extends M {
|
|
115
115
|
/**
|
|
116
116
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
117
117
|
*
|
|
@@ -143,7 +143,7 @@ class Et extends B {
|
|
|
143
143
|
* @inheritDoc
|
|
144
144
|
*/
|
|
145
145
|
s(this, "address");
|
|
146
|
-
|
|
146
|
+
ge(this, e);
|
|
147
147
|
}
|
|
148
148
|
/**
|
|
149
149
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -151,10 +151,10 @@ class Et extends B {
|
|
|
151
151
|
* @param jwtToken JWT-ключ доступа.
|
|
152
152
|
*/
|
|
153
153
|
static getJwtPayload(e) {
|
|
154
|
-
return new
|
|
154
|
+
return new M(je(pr(e)));
|
|
155
155
|
}
|
|
156
156
|
}
|
|
157
|
-
class
|
|
157
|
+
class it {
|
|
158
158
|
/**
|
|
159
159
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
160
160
|
*
|
|
@@ -176,7 +176,7 @@ class st {
|
|
|
176
176
|
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;
|
|
177
177
|
}
|
|
178
178
|
}
|
|
179
|
-
class
|
|
179
|
+
class nt {
|
|
180
180
|
/**
|
|
181
181
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
182
182
|
*
|
|
@@ -198,7 +198,7 @@ class it {
|
|
|
198
198
|
this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
199
199
|
}
|
|
200
200
|
}
|
|
201
|
-
class
|
|
201
|
+
class ot {
|
|
202
202
|
/**
|
|
203
203
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
204
204
|
*
|
|
@@ -229,7 +229,7 @@ class nt {
|
|
|
229
229
|
* Дополнительные параметры.
|
|
230
230
|
*/
|
|
231
231
|
s(this, "additionalParams");
|
|
232
|
-
var e, t,
|
|
232
|
+
var e, t, n, o;
|
|
233
233
|
this.dsn = (r == null ? void 0 : r.dsn) ?? "", this.environment = (r == null ? void 0 : r.environment) ?? "production", this.ignoreErrors = (r == null ? void 0 : r.ignoreErrors) ?? [
|
|
234
234
|
/Network\s{1,3}Error/,
|
|
235
235
|
/Request\s{1,3}aborted/,
|
|
@@ -238,12 +238,12 @@ class nt {
|
|
|
238
238
|
allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
|
|
239
239
|
sampleRate: ((t = r == null ? void 0 : r.trace) == null ? void 0 : t.sampleRate) ?? 0
|
|
240
240
|
}, this.replay = {
|
|
241
|
-
replaysOnErrorSampleRate: ((
|
|
241
|
+
replaysOnErrorSampleRate: ((n = r == null ? void 0 : r.replay) == null ? void 0 : n.replaysOnErrorSampleRate) ?? 0,
|
|
242
242
|
replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
|
|
243
243
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
class
|
|
246
|
+
class ct {
|
|
247
247
|
/**
|
|
248
248
|
* Инициализирует экземпляр класса {@link WebSocketConfig}.
|
|
249
249
|
*
|
|
@@ -282,7 +282,7 @@ class ot {
|
|
|
282
282
|
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"];
|
|
283
283
|
}
|
|
284
284
|
}
|
|
285
|
-
class
|
|
285
|
+
class lt {
|
|
286
286
|
/**
|
|
287
287
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
288
288
|
*
|
|
@@ -325,41 +325,41 @@ class ct {
|
|
|
325
325
|
* @inheritDoc
|
|
326
326
|
*/
|
|
327
327
|
s(this, "dateFormats");
|
|
328
|
-
var e, t,
|
|
329
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
328
|
+
var e, t, n;
|
|
329
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new nt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new it(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new ot({
|
|
330
330
|
environment: this.environment,
|
|
331
331
|
...r == null ? void 0 : r.sentry
|
|
332
|
-
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new
|
|
332
|
+
}), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new ct(r.websocket) : void 0, this.dateFormats = {
|
|
333
333
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
334
334
|
uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
|
|
335
|
-
uiDateWithTime: ((
|
|
335
|
+
uiDateWithTime: ((n = r == null ? void 0 : r.dateFormats) == null ? void 0 : n.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
336
336
|
};
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
339
|
const k = W("common.config", () => {
|
|
340
|
-
const
|
|
340
|
+
const i = y(new lt());
|
|
341
341
|
return {
|
|
342
342
|
/**
|
|
343
343
|
* Конфигурационные данные приложения.
|
|
344
344
|
*/
|
|
345
|
-
config:
|
|
345
|
+
config: i,
|
|
346
346
|
/**
|
|
347
347
|
* Получает конфигурацию приложения.
|
|
348
348
|
*
|
|
349
349
|
* @returns Конфигурация приложения.
|
|
350
350
|
*/
|
|
351
|
-
getConfig: () =>
|
|
351
|
+
getConfig: () => i.value,
|
|
352
352
|
/**
|
|
353
353
|
* Устанавливает конфигурацию приложения.
|
|
354
354
|
*
|
|
355
355
|
* @param appConfig Конфигурация приложения.
|
|
356
356
|
*/
|
|
357
357
|
setConfig: (t) => {
|
|
358
|
-
|
|
358
|
+
i.value = ge(i.value, t);
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
361
|
});
|
|
362
|
-
class
|
|
362
|
+
class Re {
|
|
363
363
|
/**
|
|
364
364
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
365
365
|
*
|
|
@@ -378,8 +378,8 @@ class Pe {
|
|
|
378
378
|
if (e)
|
|
379
379
|
try {
|
|
380
380
|
const t = JSON.parse(e);
|
|
381
|
-
if (!t.availableFor || Xe(
|
|
382
|
-
if (
|
|
381
|
+
if (!t.availableFor || Xe(a(t.availableFor) || Ne(), /* @__PURE__ */ new Date())) {
|
|
382
|
+
if (d(t.data) || te(t.data))
|
|
383
383
|
throw new Error("Data is empty");
|
|
384
384
|
return t.data;
|
|
385
385
|
}
|
|
@@ -401,16 +401,16 @@ class Pe {
|
|
|
401
401
|
static saveActualDataToStorage(r, e, t) {
|
|
402
402
|
if (this.isLocalStorageAvailable())
|
|
403
403
|
try {
|
|
404
|
-
if (
|
|
404
|
+
if (d(e) || te(e))
|
|
405
405
|
throw new Error("Data is empty");
|
|
406
|
-
const
|
|
406
|
+
const n = JSON.stringify({
|
|
407
407
|
availableFor: t,
|
|
408
408
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
|
409
409
|
data: e
|
|
410
410
|
});
|
|
411
|
-
localStorage.setItem(r,
|
|
412
|
-
} catch (
|
|
413
|
-
if (
|
|
411
|
+
localStorage.setItem(r, n);
|
|
412
|
+
} catch (n) {
|
|
413
|
+
if (n instanceof DOMException && n.code === DOMException.QUOTA_EXCEEDED_ERR) {
|
|
414
414
|
this.clearOldData();
|
|
415
415
|
try {
|
|
416
416
|
const o = JSON.stringify({
|
|
@@ -449,10 +449,10 @@ class Pe {
|
|
|
449
449
|
const t = localStorage.key(e);
|
|
450
450
|
if (t)
|
|
451
451
|
try {
|
|
452
|
-
const
|
|
453
|
-
if (
|
|
454
|
-
const o = JSON.parse(
|
|
455
|
-
o.availableFor && !Xe(
|
|
452
|
+
const n = localStorage.getItem(t);
|
|
453
|
+
if (n) {
|
|
454
|
+
const o = JSON.parse(n);
|
|
455
|
+
o.availableFor && !Xe(a(o.availableFor) || Ne(), /* @__PURE__ */ new Date()) && r.push(t);
|
|
456
456
|
}
|
|
457
457
|
} catch {
|
|
458
458
|
r.push(t);
|
|
@@ -468,19 +468,19 @@ class Pe {
|
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
function Ze(
|
|
471
|
+
function Ze(i) {
|
|
472
472
|
try {
|
|
473
|
-
const r =
|
|
473
|
+
const r = M.getJwtPayload(i);
|
|
474
474
|
return new Date(r.exp * 1e3);
|
|
475
475
|
} catch {
|
|
476
476
|
return;
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
479
|
const Q = W("common.auth_state_private", () => {
|
|
480
|
-
const
|
|
480
|
+
const i = y(
|
|
481
481
|
(() => {
|
|
482
482
|
var u;
|
|
483
|
-
const o =
|
|
483
|
+
const o = Re.getActualDataFromStorage(
|
|
484
484
|
"sc.token"
|
|
485
485
|
/* JwtToken */
|
|
486
486
|
);
|
|
@@ -489,18 +489,18 @@ const Q = W("common.auth_state_private", () => {
|
|
|
489
489
|
const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
|
|
490
490
|
return c ? Promise.resolve(c) : void 0;
|
|
491
491
|
})()
|
|
492
|
-
), r = y(void 0), e = y(void 0), t =
|
|
493
|
-
function
|
|
494
|
-
e.value = void 0,
|
|
495
|
-
const c =
|
|
496
|
-
e.value = c.exp * 1e3 > Date.now() ?
|
|
492
|
+
), r = y(void 0), e = y(void 0), t = Jr(/* @__PURE__ */ new Map());
|
|
493
|
+
function n() {
|
|
494
|
+
e.value = void 0, d(i.value) || i.value.then((o) => {
|
|
495
|
+
const c = M.getJwtPayload(o);
|
|
496
|
+
e.value = c.exp * 1e3 > Date.now() ? hr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
|
|
497
497
|
}).catch(v);
|
|
498
498
|
}
|
|
499
499
|
return {
|
|
500
500
|
/**
|
|
501
501
|
* {@link Promise<string>} для получения jwt-ключа доступа к системам.
|
|
502
502
|
*/
|
|
503
|
-
jwtToken:
|
|
503
|
+
jwtToken: i,
|
|
504
504
|
/**
|
|
505
505
|
* Функция для обновления jwt-ключа доступа к системам.
|
|
506
506
|
*/
|
|
@@ -516,15 +516,15 @@ const Q = W("common.auth_state_private", () => {
|
|
|
516
516
|
/**
|
|
517
517
|
* Принудительно пересчитывает права доступа пользователя на основе текущего JWT токена.
|
|
518
518
|
*/
|
|
519
|
-
recalculateUserPermissions:
|
|
519
|
+
recalculateUserPermissions: n
|
|
520
520
|
};
|
|
521
521
|
}), ke = W("common.auth_state", () => {
|
|
522
|
-
const
|
|
522
|
+
const i = P(() => {
|
|
523
523
|
const o = Q();
|
|
524
|
-
if (
|
|
524
|
+
if (d(o.jwtToken) && !d(o.jwtTokenUpdater)) {
|
|
525
525
|
const c = o.jwtTokenUpdater();
|
|
526
526
|
o.jwtToken = c, c.then((u) => {
|
|
527
|
-
o.jwtToken = Promise.resolve(u),
|
|
527
|
+
o.jwtToken = Promise.resolve(u), Re.saveActualDataToStorage("sc.token", u, Ze(u)), o.recalculateUserPermissions();
|
|
528
528
|
}).catch(v);
|
|
529
529
|
}
|
|
530
530
|
return o.jwtToken;
|
|
@@ -534,31 +534,31 @@ const Q = W("common.auth_state_private", () => {
|
|
|
534
534
|
}
|
|
535
535
|
function e(o) {
|
|
536
536
|
const c = Q();
|
|
537
|
-
c.jwtToken = Promise.resolve(o),
|
|
537
|
+
c.jwtToken = Promise.resolve(o), Re.saveActualDataToStorage("sc.token", o, Ze(o)), c.recalculateUserPermissions();
|
|
538
538
|
}
|
|
539
539
|
function t() {
|
|
540
540
|
const o = Q();
|
|
541
|
-
o.jwtToken = void 0, o.userPermissions = void 0,
|
|
541
|
+
o.jwtToken = void 0, o.userPermissions = void 0, Re.saveActualDataToStorage("sc.token", void 0);
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function n(o) {
|
|
544
544
|
const c = Q();
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
c.userPermissions =
|
|
545
|
+
!d(c.jwtToken) && d(c.userPermissions) && c.jwtToken.then((f) => {
|
|
546
|
+
const m = M.getJwtPayload(f);
|
|
547
|
+
c.userPermissions = m.exp * 1e3 > Date.now() ? hr(m.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
|
|
548
548
|
}).catch(v);
|
|
549
549
|
const u = H(o) ? o.join(" && ") : o;
|
|
550
550
|
if (c.userPermissionsComputedRefs.has(u))
|
|
551
551
|
return c.userPermissionsComputedRefs.get(u);
|
|
552
|
-
const p =
|
|
553
|
-
const
|
|
552
|
+
const p = P(() => {
|
|
553
|
+
const f = (m) => {
|
|
554
554
|
var K;
|
|
555
|
-
const D =
|
|
555
|
+
const D = Mr(m, ".");
|
|
556
556
|
if (D.length < 2)
|
|
557
557
|
return !1;
|
|
558
|
-
const [
|
|
559
|
-
return H(E) && E.includes(
|
|
558
|
+
const [oe, ce] = D, E = (K = Q().userPermissions) == null ? void 0 : K[oe];
|
|
559
|
+
return H(E) && E.includes(ce);
|
|
560
560
|
};
|
|
561
|
-
return H(o) ?
|
|
561
|
+
return H(o) ? Hr(o, (m) => f(m)) : f(o);
|
|
562
562
|
});
|
|
563
563
|
return c.userPermissionsComputedRefs.set(u, p), p;
|
|
564
564
|
}
|
|
@@ -566,7 +566,7 @@ const Q = W("common.auth_state_private", () => {
|
|
|
566
566
|
/**
|
|
567
567
|
* {@link Promise<string>} для получения jwt-ключа доступа к системам.
|
|
568
568
|
*/
|
|
569
|
-
jwtToken:
|
|
569
|
+
jwtToken: i,
|
|
570
570
|
/**
|
|
571
571
|
* Устанавливает механизм для обновления jwt-ключа доступа к системам.
|
|
572
572
|
*
|
|
@@ -588,7 +588,7 @@ const Q = W("common.auth_state_private", () => {
|
|
|
588
588
|
*
|
|
589
589
|
* @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
|
|
590
590
|
*/
|
|
591
|
-
hasUserPermission:
|
|
591
|
+
hasUserPermission: n
|
|
592
592
|
};
|
|
593
593
|
});
|
|
594
594
|
class J {
|
|
@@ -607,13 +607,13 @@ class J {
|
|
|
607
607
|
* @inheritDoc
|
|
608
608
|
*/
|
|
609
609
|
s(this, "guid");
|
|
610
|
-
this.id = r == null ? void 0 : r.id,
|
|
610
|
+
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) ?? "";
|
|
611
611
|
}
|
|
612
612
|
/**
|
|
613
613
|
* Возвращает признак, что это новая запись.
|
|
614
614
|
*/
|
|
615
615
|
isNewRec() {
|
|
616
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
616
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : d(this.id);
|
|
617
617
|
}
|
|
618
618
|
}
|
|
619
619
|
class S extends J {
|
|
@@ -631,7 +631,7 @@ class S extends J {
|
|
|
631
631
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
632
632
|
}
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class _ extends S {
|
|
635
635
|
/**
|
|
636
636
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
637
637
|
*
|
|
@@ -646,7 +646,7 @@ class I extends S {
|
|
|
646
646
|
this.type = e == null ? void 0 : e.type;
|
|
647
647
|
}
|
|
648
648
|
}
|
|
649
|
-
class
|
|
649
|
+
class ut extends S {
|
|
650
650
|
/**
|
|
651
651
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
652
652
|
*
|
|
@@ -682,10 +682,10 @@ class lt extends S {
|
|
|
682
682
|
* Дата и время удаления.
|
|
683
683
|
*/
|
|
684
684
|
s(this, "deletedAt");
|
|
685
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt =
|
|
685
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new _(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
686
686
|
}
|
|
687
687
|
}
|
|
688
|
-
class
|
|
688
|
+
class fr extends S {
|
|
689
689
|
/**
|
|
690
690
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
691
691
|
*
|
|
@@ -697,10 +697,10 @@ class gr extends S {
|
|
|
697
697
|
* Дата и время последнего изменения.
|
|
698
698
|
*/
|
|
699
699
|
s(this, "updatedAt");
|
|
700
|
-
this.updatedAt =
|
|
700
|
+
this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
701
701
|
}
|
|
702
702
|
}
|
|
703
|
-
class Z extends
|
|
703
|
+
class Z extends fr {
|
|
704
704
|
/**
|
|
705
705
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
706
706
|
*
|
|
@@ -716,10 +716,14 @@ class Z extends gr {
|
|
|
716
716
|
* Дата и время создания шаблона.
|
|
717
717
|
*/
|
|
718
718
|
s(this, "createdAt");
|
|
719
|
-
|
|
719
|
+
/**
|
|
720
|
+
* Данные о пользователе, создавшем шаблон прайс-листа.
|
|
721
|
+
*/
|
|
722
|
+
s(this, "owner");
|
|
723
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new _(e.owner) : void 0;
|
|
720
724
|
}
|
|
721
725
|
}
|
|
722
|
-
var mr = /* @__PURE__ */ ((
|
|
726
|
+
var mr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(mr || {});
|
|
723
727
|
class w extends S {
|
|
724
728
|
/**
|
|
725
729
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
@@ -739,7 +743,7 @@ class w extends S {
|
|
|
739
743
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
740
744
|
}
|
|
741
745
|
}
|
|
742
|
-
class
|
|
746
|
+
class Ae extends w {
|
|
743
747
|
/**
|
|
744
748
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
745
749
|
*/
|
|
@@ -774,10 +778,10 @@ class Ge {
|
|
|
774
778
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
775
779
|
*/
|
|
776
780
|
s(this, "readOnly");
|
|
777
|
-
this.coefficient = new
|
|
781
|
+
this.coefficient = new Ae(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;
|
|
778
782
|
}
|
|
779
783
|
}
|
|
780
|
-
class
|
|
784
|
+
class yr {
|
|
781
785
|
/**
|
|
782
786
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
783
787
|
*
|
|
@@ -795,9 +799,9 @@ class fr {
|
|
|
795
799
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
796
800
|
}
|
|
797
801
|
}
|
|
798
|
-
class
|
|
802
|
+
class U extends w {
|
|
799
803
|
}
|
|
800
|
-
class
|
|
804
|
+
class ve extends w {
|
|
801
805
|
/**
|
|
802
806
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
803
807
|
*
|
|
@@ -826,10 +830,10 @@ class we extends w {
|
|
|
826
830
|
* Координаты склада.
|
|
827
831
|
*/
|
|
828
832
|
s(this, "coordinates");
|
|
829
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((
|
|
833
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((n) => new U(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new yr(e == null ? void 0 : e.coordinates);
|
|
830
834
|
}
|
|
831
835
|
}
|
|
832
|
-
class
|
|
836
|
+
class pt {
|
|
833
837
|
/**
|
|
834
838
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
835
839
|
*
|
|
@@ -844,7 +848,7 @@ class ut {
|
|
|
844
848
|
* Количество остатков товара на складе.
|
|
845
849
|
*/
|
|
846
850
|
s(this, "count");
|
|
847
|
-
this.warehouse = new
|
|
851
|
+
this.warehouse = new ve(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
848
852
|
}
|
|
849
853
|
}
|
|
850
854
|
class x extends S {
|
|
@@ -901,7 +905,7 @@ class er extends S {
|
|
|
901
905
|
e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
|
|
902
906
|
}
|
|
903
907
|
}
|
|
904
|
-
class
|
|
908
|
+
class fe extends S {
|
|
905
909
|
/**
|
|
906
910
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
907
911
|
*
|
|
@@ -916,7 +920,7 @@ class ge extends S {
|
|
|
916
920
|
this.code = (e == null ? void 0 : e.code) ?? "";
|
|
917
921
|
}
|
|
918
922
|
}
|
|
919
|
-
class
|
|
923
|
+
class wr extends fe {
|
|
920
924
|
/**
|
|
921
925
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
922
926
|
*
|
|
@@ -935,7 +939,7 @@ class yr extends ge {
|
|
|
935
939
|
this.slug = (e == null ? void 0 : e.slug) ?? "";
|
|
936
940
|
}
|
|
937
941
|
}
|
|
938
|
-
class
|
|
942
|
+
class ht extends wr {
|
|
939
943
|
/**
|
|
940
944
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
941
945
|
*
|
|
@@ -950,7 +954,7 @@ class pt extends yr {
|
|
|
950
954
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
951
955
|
}
|
|
952
956
|
}
|
|
953
|
-
class
|
|
957
|
+
class gt {
|
|
954
958
|
/**
|
|
955
959
|
* Инициализирует экземпляр класса {@link Image}.
|
|
956
960
|
*
|
|
@@ -973,7 +977,7 @@ class ht {
|
|
|
973
977
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
974
978
|
}
|
|
975
979
|
}
|
|
976
|
-
class
|
|
980
|
+
class Fe extends wr {
|
|
977
981
|
/**
|
|
978
982
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
979
983
|
*
|
|
@@ -988,14 +992,14 @@ class Ue extends yr {
|
|
|
988
992
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
989
993
|
}
|
|
990
994
|
}
|
|
991
|
-
class
|
|
995
|
+
class I extends ht {
|
|
992
996
|
/**
|
|
993
997
|
* Инициализирует экземпляр класса {@link Product}.
|
|
994
998
|
*
|
|
995
999
|
* @param data Данные для первоначальной инициализации.
|
|
996
1000
|
*/
|
|
997
1001
|
constructor(e) {
|
|
998
|
-
var
|
|
1002
|
+
var n, o, c, u;
|
|
999
1003
|
super(e);
|
|
1000
1004
|
/**
|
|
1001
1005
|
* Артикул производителя/поставщика.
|
|
@@ -1065,9 +1069,9 @@ class _ extends pt {
|
|
|
1065
1069
|
* Список коэффициентов цен на продукт.
|
|
1066
1070
|
*/
|
|
1067
1071
|
s(this, "priceCoefficients");
|
|
1068
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new er(e.unit) : new er(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new x(e.currency) : new x(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate =
|
|
1072
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new er(e.unit) : new er(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new x(e.currency) : new x(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((p) => new pt(p))) ?? [], this.type = "product";
|
|
1069
1073
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
|
|
1070
|
-
t && (this.category = new
|
|
1074
|
+
t && (this.category = new Fe({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Fe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new gt(p, k().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Ge(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
1071
1075
|
}
|
|
1072
1076
|
/**
|
|
1073
1077
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -1088,8 +1092,8 @@ class _ extends pt {
|
|
|
1088
1092
|
return this.retailCostRub ?? this.costRub;
|
|
1089
1093
|
}
|
|
1090
1094
|
}
|
|
1091
|
-
var ze = /* @__PURE__ */ ((
|
|
1092
|
-
class
|
|
1095
|
+
var ze = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(ze || {});
|
|
1096
|
+
class B extends I {
|
|
1093
1097
|
/**
|
|
1094
1098
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1095
1099
|
*
|
|
@@ -1125,10 +1129,10 @@ class M extends _ {
|
|
|
1125
1129
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1126
1130
|
*/
|
|
1127
1131
|
s(this, "isFavorite");
|
|
1128
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ze.Product, this.discount = e != null && e.discount ? new
|
|
1132
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ze.Product, this.discount = e != null && e.discount ? new ut(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new Z(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;
|
|
1129
1133
|
}
|
|
1130
1134
|
}
|
|
1131
|
-
class
|
|
1135
|
+
class ne extends Fe {
|
|
1132
1136
|
/**
|
|
1133
1137
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
1134
1138
|
*
|
|
@@ -1152,10 +1156,10 @@ class ve extends Ue {
|
|
|
1152
1156
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
1153
1157
|
*/
|
|
1154
1158
|
s(this, "currencyRates");
|
|
1155
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t,
|
|
1159
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, n]) => [jr(t), n])) : void 0;
|
|
1156
1160
|
}
|
|
1157
1161
|
}
|
|
1158
|
-
class
|
|
1162
|
+
class vr extends J {
|
|
1159
1163
|
/**
|
|
1160
1164
|
* Инициализирует экземпляр класса {@link OrderItemBase}.
|
|
1161
1165
|
*
|
|
@@ -1231,10 +1235,10 @@ class wr extends J {
|
|
|
1231
1235
|
* @inheritDoc
|
|
1232
1236
|
*/
|
|
1233
1237
|
s(this, "replacementId");
|
|
1234
|
-
this.product = new
|
|
1238
|
+
this.product = new B(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ne(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Gr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new _(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
|
|
1235
1239
|
}
|
|
1236
1240
|
}
|
|
1237
|
-
let
|
|
1241
|
+
let Cr = class extends vr {
|
|
1238
1242
|
/**
|
|
1239
1243
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
1240
1244
|
*
|
|
@@ -1281,7 +1285,7 @@ let vr = class extends wr {
|
|
|
1281
1285
|
this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = H(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new x(e.currency);
|
|
1282
1286
|
}
|
|
1283
1287
|
};
|
|
1284
|
-
class
|
|
1288
|
+
class le {
|
|
1285
1289
|
/**
|
|
1286
1290
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
1287
1291
|
*
|
|
@@ -1300,7 +1304,7 @@ class oe {
|
|
|
1300
1304
|
* @inheritDoc
|
|
1301
1305
|
*/
|
|
1302
1306
|
s(this, "directionsSum");
|
|
1303
|
-
this.items = r.items.map((e) => new
|
|
1307
|
+
this.items = r.items.map((e) => new Cr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
1304
1308
|
}
|
|
1305
1309
|
}
|
|
1306
1310
|
class We {
|
|
@@ -1322,7 +1326,7 @@ class We {
|
|
|
1322
1326
|
return new r(e);
|
|
1323
1327
|
}
|
|
1324
1328
|
}
|
|
1325
|
-
const
|
|
1329
|
+
const R = class R {
|
|
1326
1330
|
/**
|
|
1327
1331
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
1328
1332
|
*/
|
|
@@ -1361,7 +1365,7 @@ const P = class P {
|
|
|
1361
1365
|
// eslint-disable-next-line class-methods-use-this
|
|
1362
1366
|
s(this, "authRequestInterceptor", async (r) => {
|
|
1363
1367
|
let e;
|
|
1364
|
-
return
|
|
1368
|
+
return d(ke().jwtToken) || (e = await ke().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
1365
1369
|
});
|
|
1366
1370
|
/**
|
|
1367
1371
|
* Перехватчик запроса для вызова пользовательских хуков.
|
|
@@ -1369,14 +1373,14 @@ const P = class P {
|
|
|
1369
1373
|
* @param request Данные запроса.
|
|
1370
1374
|
*/
|
|
1371
1375
|
// eslint-disable-next-line class-methods-use-this
|
|
1372
|
-
s(this, "userRequestHooksInterceptor", async (r) =>
|
|
1376
|
+
s(this, "userRequestHooksInterceptor", async (r) => R.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
1373
1377
|
/**
|
|
1374
1378
|
* Перехватчик запроса для преобразования данных запроса.
|
|
1375
1379
|
*
|
|
1376
1380
|
* @param request Данные запроса.
|
|
1377
1381
|
*/
|
|
1378
1382
|
// eslint-disable-next-line class-methods-use-this
|
|
1379
|
-
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ye(r.params)), ["put", "patch", "post"].includes(
|
|
1383
|
+
s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ye(r.params)), ["put", "patch", "post"].includes(zr(r.method)) && r.data && (r.data = Ye(r.data))), r));
|
|
1380
1384
|
/**
|
|
1381
1385
|
* Перехватчик ошибок ответов на запрос.
|
|
1382
1386
|
*
|
|
@@ -1396,7 +1400,7 @@ const P = class P {
|
|
|
1396
1400
|
s(this, "canceledResponseInterceptor", (r) => {
|
|
1397
1401
|
const e = r.rawError ?? r;
|
|
1398
1402
|
if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
|
|
1399
|
-
throw new
|
|
1403
|
+
throw new st("Request canceled");
|
|
1400
1404
|
return Promise.reject(r);
|
|
1401
1405
|
});
|
|
1402
1406
|
/**
|
|
@@ -1405,7 +1409,7 @@ const P = class P {
|
|
|
1405
1409
|
* @param response Данные ответа на запрос.
|
|
1406
1410
|
*/
|
|
1407
1411
|
// eslint-disable-next-line class-methods-use-this
|
|
1408
|
-
s(this, "userResponseHooksInterceptor", async (r) =>
|
|
1412
|
+
s(this, "userResponseHooksInterceptor", async (r) => R.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
|
|
1409
1413
|
/**
|
|
1410
1414
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
1411
1415
|
*
|
|
@@ -1413,7 +1417,7 @@ const P = class P {
|
|
|
1413
1417
|
*/
|
|
1414
1418
|
// eslint-disable-next-line class-methods-use-this
|
|
1415
1419
|
s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = je(r.data)), r));
|
|
1416
|
-
this.errorResponseHandler =
|
|
1420
|
+
this.errorResponseHandler = R.defaultErrorsResponseHandler, this.httpClient = tt.create({
|
|
1417
1421
|
headers: {
|
|
1418
1422
|
Accept: "application/json",
|
|
1419
1423
|
"Content-Type": "application/json"
|
|
@@ -1423,7 +1427,7 @@ const P = class P {
|
|
|
1423
1427
|
(r) => Promise.reject(r)
|
|
1424
1428
|
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1425
1429
|
(r) => r,
|
|
1426
|
-
(r) =>
|
|
1430
|
+
(r) => R.convertHttpErrorResponse(r)
|
|
1427
1431
|
), this.interceptorIds.response.canceledResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.canceledResponseInterceptor), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
1428
1432
|
this.dataConverterResponseInterceptor,
|
|
1429
1433
|
(r) => Promise.reject(r)
|
|
@@ -1435,7 +1439,7 @@ const P = class P {
|
|
|
1435
1439
|
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
1436
1440
|
*/
|
|
1437
1441
|
static setDefaultErrorsResponseHandler(r) {
|
|
1438
|
-
|
|
1442
|
+
R.defaultErrorsResponseHandler = r;
|
|
1439
1443
|
}
|
|
1440
1444
|
/**
|
|
1441
1445
|
* Регистрирует хук, который будет вызываться перед выполнением каждого HTTP запроса.
|
|
@@ -1443,7 +1447,7 @@ const P = class P {
|
|
|
1443
1447
|
* @param hook Функция-хук для обработки запроса.
|
|
1444
1448
|
*/
|
|
1445
1449
|
static addRequestHook(r) {
|
|
1446
|
-
|
|
1450
|
+
R.requestHooks.includes(r) || R.requestHooks.push(r);
|
|
1447
1451
|
}
|
|
1448
1452
|
/**
|
|
1449
1453
|
* Удаляет зарегистрированный хук запроса.
|
|
@@ -1451,8 +1455,8 @@ const P = class P {
|
|
|
1451
1455
|
* @param hook Функция-хук для удаления.
|
|
1452
1456
|
*/
|
|
1453
1457
|
static removeRequestHook(r) {
|
|
1454
|
-
const e =
|
|
1455
|
-
e !== -1 &&
|
|
1458
|
+
const e = R.requestHooks.indexOf(r);
|
|
1459
|
+
e !== -1 && R.requestHooks.splice(e, 1);
|
|
1456
1460
|
}
|
|
1457
1461
|
/**
|
|
1458
1462
|
* Регистрирует хук, который будет вызываться после получения ответа на каждый HTTP запрос.
|
|
@@ -1460,7 +1464,7 @@ const P = class P {
|
|
|
1460
1464
|
* @param hook Функция-хук для обработки ответа.
|
|
1461
1465
|
*/
|
|
1462
1466
|
static addResponseHook(r) {
|
|
1463
|
-
|
|
1467
|
+
R.responseHooks.includes(r) || R.responseHooks.push(r);
|
|
1464
1468
|
}
|
|
1465
1469
|
/**
|
|
1466
1470
|
* Удаляет зарегистрированный хук ответа.
|
|
@@ -1468,8 +1472,8 @@ const P = class P {
|
|
|
1468
1472
|
* @param hook Функция-хук для удаления.
|
|
1469
1473
|
*/
|
|
1470
1474
|
static removeResponseHook(r) {
|
|
1471
|
-
const e =
|
|
1472
|
-
e !== -1 &&
|
|
1475
|
+
const e = R.responseHooks.indexOf(r);
|
|
1476
|
+
e !== -1 && R.responseHooks.splice(e, 1);
|
|
1473
1477
|
}
|
|
1474
1478
|
/**
|
|
1475
1479
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -1477,7 +1481,7 @@ const P = class P {
|
|
|
1477
1481
|
* @param type Тип данных, которыми оперирует метод.
|
|
1478
1482
|
*/
|
|
1479
1483
|
static getInstance(r) {
|
|
1480
|
-
return Object.prototype.hasOwnProperty.call(
|
|
1484
|
+
return Object.prototype.hasOwnProperty.call(R.instances, r.name) || (R.instances[r.name] = We.simpleInstanceInitializer(r)), R.instances[r.name];
|
|
1481
1485
|
}
|
|
1482
1486
|
/**
|
|
1483
1487
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -1486,15 +1490,15 @@ const P = class P {
|
|
|
1486
1490
|
*/
|
|
1487
1491
|
static convertHttpErrorResponse(r) {
|
|
1488
1492
|
var e, t;
|
|
1489
|
-
if (
|
|
1490
|
-
const
|
|
1493
|
+
if (d(r) || !d(r.request) || !d(r.response)) {
|
|
1494
|
+
const n = d(r) ? {} : r == null ? void 0 : r.response;
|
|
1491
1495
|
return Promise.reject({
|
|
1492
|
-
status: (
|
|
1493
|
-
statusText: (
|
|
1494
|
-
message: ((e =
|
|
1495
|
-
errors: (t =
|
|
1496
|
-
headers: (
|
|
1497
|
-
data:
|
|
1496
|
+
status: (n == null ? void 0 : n.status) ?? 0,
|
|
1497
|
+
statusText: (n == null ? void 0 : n.statusText) ?? "Unknown",
|
|
1498
|
+
message: ((e = n == null ? void 0 : n.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
|
|
1499
|
+
errors: (t = n == null ? void 0 : n.data) == null ? void 0 : t.errors,
|
|
1500
|
+
headers: (n == null ? void 0 : n.headers) ?? {},
|
|
1501
|
+
data: n == null ? void 0 : n.data,
|
|
1498
1502
|
rawError: r
|
|
1499
1503
|
});
|
|
1500
1504
|
}
|
|
@@ -1508,10 +1512,10 @@ const P = class P {
|
|
|
1508
1512
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1509
1513
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1510
1514
|
*/
|
|
1511
|
-
request(r, e = void 0, t = {},
|
|
1515
|
+
request(r, e = void 0, t = {}, n = !1) {
|
|
1512
1516
|
const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
|
|
1513
1517
|
return o.catch((c) => {
|
|
1514
|
-
(c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(c, t,
|
|
1518
|
+
(c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(c, t, n);
|
|
1515
1519
|
}), o;
|
|
1516
1520
|
}
|
|
1517
1521
|
/**
|
|
@@ -1523,8 +1527,8 @@ const P = class P {
|
|
|
1523
1527
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1524
1528
|
* @param signal Сигнал отмены запроса.
|
|
1525
1529
|
*/
|
|
1526
|
-
get(r, e = {}, t = void 0,
|
|
1527
|
-
return this.request({ method: "GET", url: r, params: e, signal: o }, t, {},
|
|
1530
|
+
get(r, e = {}, t = void 0, n = !1, o = void 0) {
|
|
1531
|
+
return this.request({ method: "GET", url: r, params: e, signal: o }, t, {}, n);
|
|
1528
1532
|
}
|
|
1529
1533
|
/**
|
|
1530
1534
|
* Выполняет get-запрос с параметрами по умолчанию и возвращает Blob.
|
|
@@ -1534,8 +1538,8 @@ const P = class P {
|
|
|
1534
1538
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1535
1539
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1536
1540
|
*/
|
|
1537
|
-
getBlob(r, e = {}, t = void 0,
|
|
1538
|
-
return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {},
|
|
1541
|
+
getBlob(r, e = {}, t = void 0, n = !1) {
|
|
1542
|
+
return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {}, n);
|
|
1539
1543
|
}
|
|
1540
1544
|
/**
|
|
1541
1545
|
* Выполняет patch-запрос с параметрами по умолчанию.
|
|
@@ -1546,8 +1550,8 @@ const P = class P {
|
|
|
1546
1550
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1547
1551
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1548
1552
|
*/
|
|
1549
|
-
patch(r, e = {}, t = void 0,
|
|
1550
|
-
return this.request({ method: "PATCH", url: r, data: e }, t,
|
|
1553
|
+
patch(r, e = {}, t = void 0, n = {}, o = !1) {
|
|
1554
|
+
return this.request({ method: "PATCH", url: r, data: e }, t, n, o);
|
|
1551
1555
|
}
|
|
1552
1556
|
/**
|
|
1553
1557
|
* Выполняет post-запрос с параметрами по умолчанию.
|
|
@@ -1558,8 +1562,8 @@ const P = class P {
|
|
|
1558
1562
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1559
1563
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1560
1564
|
*/
|
|
1561
|
-
post(r, e = {}, t = void 0,
|
|
1562
|
-
return this.request({ method: "POST", url: r, data: e }, t,
|
|
1565
|
+
post(r, e = {}, t = void 0, n = {}, o = !1) {
|
|
1566
|
+
return this.request({ method: "POST", url: r, data: e }, t, n, o);
|
|
1563
1567
|
}
|
|
1564
1568
|
/**
|
|
1565
1569
|
* Выполняет delete-запрос с параметрами по умолчанию.
|
|
@@ -1576,22 +1580,22 @@ const P = class P {
|
|
|
1576
1580
|
* Экземпляр объекта текущего класса.
|
|
1577
1581
|
*/
|
|
1578
1582
|
// eslint-disable-next-line no-use-before-define
|
|
1579
|
-
s(
|
|
1583
|
+
s(R, "instances", {}), /**
|
|
1580
1584
|
* Базовый обработчик ошибок выполнения запросов.
|
|
1581
1585
|
*
|
|
1582
1586
|
* @param error Данные об ошибке.
|
|
1583
1587
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1584
1588
|
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1585
1589
|
*/
|
|
1586
|
-
s(
|
|
1590
|
+
s(R, "defaultErrorsResponseHandler", v), /**
|
|
1587
1591
|
* Список зарегистрированных хуков для запросов.
|
|
1588
1592
|
*/
|
|
1589
|
-
s(
|
|
1593
|
+
s(R, "requestHooks", []), /**
|
|
1590
1594
|
* Список зарегистрированных хуков для ответов.
|
|
1591
1595
|
*/
|
|
1592
|
-
s(
|
|
1593
|
-
let h =
|
|
1594
|
-
class
|
|
1596
|
+
s(R, "responseHooks", []);
|
|
1597
|
+
let h = R;
|
|
1598
|
+
class Zt extends h {
|
|
1595
1599
|
/**
|
|
1596
1600
|
* Возвращает содержимое корзины указанного клиента.
|
|
1597
1601
|
*
|
|
@@ -1600,7 +1604,7 @@ class Qt extends h {
|
|
|
1600
1604
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1601
1605
|
*/
|
|
1602
1606
|
getCart(r) {
|
|
1603
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
1607
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new le(e.data));
|
|
1604
1608
|
}
|
|
1605
1609
|
/**
|
|
1606
1610
|
* Удаляет всё содержимое корзины.
|
|
@@ -1638,7 +1642,7 @@ class Qt extends h {
|
|
|
1638
1642
|
is_additional_sale: e.isAdditionalSale,
|
|
1639
1643
|
...e.configuratorParams
|
|
1640
1644
|
},
|
|
1641
|
-
(
|
|
1645
|
+
(n) => new le(n.data),
|
|
1642
1646
|
t
|
|
1643
1647
|
);
|
|
1644
1648
|
}
|
|
@@ -1668,7 +1672,7 @@ class Qt extends h {
|
|
|
1668
1672
|
is_additional_sale: e.isAdditionalSale,
|
|
1669
1673
|
...e.configuratorParams
|
|
1670
1674
|
},
|
|
1671
|
-
(
|
|
1675
|
+
(n) => new le(n.data),
|
|
1672
1676
|
t
|
|
1673
1677
|
);
|
|
1674
1678
|
}
|
|
@@ -1681,7 +1685,7 @@ class Qt extends h {
|
|
|
1681
1685
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_delete_item
|
|
1682
1686
|
*/
|
|
1683
1687
|
deleteCartItem(r, e) {
|
|
1684
|
-
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new
|
|
1688
|
+
return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new le(t.data));
|
|
1685
1689
|
}
|
|
1686
1690
|
/**
|
|
1687
1691
|
* Добавляет продукты в корзину из файла CSV.
|
|
@@ -1692,7 +1696,7 @@ class Qt extends h {
|
|
|
1692
1696
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1693
1697
|
*/
|
|
1694
1698
|
addCartItemFromCSV(r, e) {
|
|
1695
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new
|
|
1699
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new le(t.data));
|
|
1696
1700
|
}
|
|
1697
1701
|
/**
|
|
1698
1702
|
* Возвращает пример CSV файла для добавления продуктов в корзину.
|
|
@@ -1705,15 +1709,15 @@ class Qt extends h {
|
|
|
1705
1709
|
return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
|
|
1706
1710
|
}
|
|
1707
1711
|
}
|
|
1708
|
-
var
|
|
1709
|
-
class N extends
|
|
1712
|
+
var ft = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(ft || {}), mt = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))(mt || {}), yt = /* @__PURE__ */ ((i) => (i.Checkbox = "checkbox", i.Range = "range", i.Toggle = "toggle", i))(yt || {});
|
|
1713
|
+
class N extends ne {
|
|
1710
1714
|
/**
|
|
1711
1715
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1712
1716
|
*
|
|
1713
1717
|
* @param data Данные для первоначальной инициализации.
|
|
1714
1718
|
*/
|
|
1715
1719
|
constructor(e) {
|
|
1716
|
-
var t,
|
|
1720
|
+
var t, n;
|
|
1717
1721
|
super(e);
|
|
1718
1722
|
/**
|
|
1719
1723
|
* Данные о вложенных категориях.
|
|
@@ -1723,7 +1727,7 @@ class N extends ve {
|
|
|
1723
1727
|
* Список продуктов категории.
|
|
1724
1728
|
*/
|
|
1725
1729
|
s(this, "products");
|
|
1726
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new N(o)), this.products = (
|
|
1730
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new I(o));
|
|
1727
1731
|
}
|
|
1728
1732
|
}
|
|
1729
1733
|
class ar {
|
|
@@ -1779,7 +1783,7 @@ class Je extends S {
|
|
|
1779
1783
|
}
|
|
1780
1784
|
class Ve extends w {
|
|
1781
1785
|
}
|
|
1782
|
-
class
|
|
1786
|
+
class Rr extends S {
|
|
1783
1787
|
/**
|
|
1784
1788
|
* Инициализирует экземпляр класса {@link IUserPricingRole}.
|
|
1785
1789
|
*
|
|
@@ -1802,7 +1806,7 @@ class Cr extends S {
|
|
|
1802
1806
|
this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
|
|
1803
1807
|
}
|
|
1804
1808
|
}
|
|
1805
|
-
class
|
|
1809
|
+
class Ce extends Je {
|
|
1806
1810
|
/**
|
|
1807
1811
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1808
1812
|
*
|
|
@@ -1839,10 +1843,10 @@ class ae extends Je {
|
|
|
1839
1843
|
* Список направлений кураторства.
|
|
1840
1844
|
*/
|
|
1841
1845
|
s(this, "curatedDirections");
|
|
1842
|
-
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
|
|
1846
|
+
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 Rr(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((n) => new Ve(n))) ?? [];
|
|
1843
1847
|
}
|
|
1844
1848
|
}
|
|
1845
|
-
class
|
|
1849
|
+
class wt extends ne {
|
|
1846
1850
|
/**
|
|
1847
1851
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1848
1852
|
*
|
|
@@ -1870,17 +1874,17 @@ class ft extends ve {
|
|
|
1870
1874
|
* Данные о менеджере за которым закреплена категория.
|
|
1871
1875
|
*/
|
|
1872
1876
|
s(this, "manager");
|
|
1873
|
-
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
|
|
1877
|
+
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 Ce(e.manager) : void 0;
|
|
1874
1878
|
}
|
|
1875
1879
|
}
|
|
1876
|
-
class
|
|
1880
|
+
class Pe extends wt {
|
|
1877
1881
|
/**
|
|
1878
1882
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1879
1883
|
*
|
|
1880
1884
|
* @param data Данные для первоначальной инициализации.
|
|
1881
1885
|
*/
|
|
1882
1886
|
constructor(e) {
|
|
1883
|
-
var t,
|
|
1887
|
+
var t, n;
|
|
1884
1888
|
super(e);
|
|
1885
1889
|
/**
|
|
1886
1890
|
* Данные о вложенных категориях.
|
|
@@ -1890,7 +1894,7 @@ class Re extends ft {
|
|
|
1890
1894
|
* Список продуктов категории.
|
|
1891
1895
|
*/
|
|
1892
1896
|
s(this, "products");
|
|
1893
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
1897
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Pe(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new B(o));
|
|
1894
1898
|
}
|
|
1895
1899
|
}
|
|
1896
1900
|
class Pr {
|
|
@@ -1908,7 +1912,7 @@ class Pr {
|
|
|
1908
1912
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1909
1913
|
*/
|
|
1910
1914
|
s(this, "increasePercent");
|
|
1911
|
-
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new
|
|
1915
|
+
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Ae(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1912
1916
|
}
|
|
1913
1917
|
}
|
|
1914
1918
|
class Le extends Pr {
|
|
@@ -1923,7 +1927,7 @@ class Le extends Pr {
|
|
|
1923
1927
|
* Базовые данные о продукте.
|
|
1924
1928
|
*/
|
|
1925
1929
|
s(this, "productCategory");
|
|
1926
|
-
this.productCategory = new
|
|
1930
|
+
this.productCategory = new ne(e == null ? void 0 : e.productCategory);
|
|
1927
1931
|
}
|
|
1928
1932
|
}
|
|
1929
1933
|
class Ee extends S {
|
|
@@ -1949,7 +1953,7 @@ class Ee extends S {
|
|
|
1949
1953
|
this.photo = e.photo, this.contacts = new ar(e.contacts), this.curatedDirection = new Ve(e.curatedDirection);
|
|
1950
1954
|
}
|
|
1951
1955
|
}
|
|
1952
|
-
class
|
|
1956
|
+
class se extends w {
|
|
1953
1957
|
}
|
|
1954
1958
|
class me extends w {
|
|
1955
1959
|
/**
|
|
@@ -1962,11 +1966,11 @@ class me extends w {
|
|
|
1962
1966
|
/**
|
|
1963
1967
|
* Данные о стране, в которой расположен регион.
|
|
1964
1968
|
*/
|
|
1965
|
-
s(this, "country", new
|
|
1966
|
-
e && (this.country = new
|
|
1969
|
+
s(this, "country", new se());
|
|
1970
|
+
e && (this.country = new se(e.country));
|
|
1967
1971
|
}
|
|
1968
1972
|
}
|
|
1969
|
-
class
|
|
1973
|
+
class $e extends w {
|
|
1970
1974
|
/**
|
|
1971
1975
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1972
1976
|
*
|
|
@@ -1981,7 +1985,7 @@ class Ae extends w {
|
|
|
1981
1985
|
e && (this.region = new me(e.region));
|
|
1982
1986
|
}
|
|
1983
1987
|
}
|
|
1984
|
-
class
|
|
1988
|
+
class Dr extends S {
|
|
1985
1989
|
/**
|
|
1986
1990
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1987
1991
|
*
|
|
@@ -2017,10 +2021,10 @@ class Rr extends S {
|
|
|
2017
2021
|
* Признак активности учетной записи пользователя.
|
|
2018
2022
|
*/
|
|
2019
2023
|
s(this, "isActive");
|
|
2020
|
-
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 q(e.salesDirection) : void 0, this.createdAt =
|
|
2024
|
+
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 q(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
2021
2025
|
}
|
|
2022
2026
|
}
|
|
2023
|
-
class V extends
|
|
2027
|
+
class V extends Dr {
|
|
2024
2028
|
/**
|
|
2025
2029
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2026
2030
|
*
|
|
@@ -2028,7 +2032,7 @@ class V extends Rr {
|
|
|
2028
2032
|
*/
|
|
2029
2033
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
2030
2034
|
constructor(e) {
|
|
2031
|
-
var t,
|
|
2035
|
+
var t, n;
|
|
2032
2036
|
super(e);
|
|
2033
2037
|
/**
|
|
2034
2038
|
* Направление продаж.
|
|
@@ -2066,10 +2070,10 @@ class V extends Rr {
|
|
|
2066
2070
|
* @inheritDoc
|
|
2067
2071
|
*/
|
|
2068
2072
|
s(this, "curators");
|
|
2069
|
-
this.salesDirection = new q(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
|
|
2073
|
+
this.salesDirection = new q(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 $e(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Je(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new Ee(o))) ?? void 0;
|
|
2070
2074
|
}
|
|
2071
2075
|
}
|
|
2072
|
-
class
|
|
2076
|
+
class ue extends J {
|
|
2073
2077
|
/**
|
|
2074
2078
|
* Инициализирует новый экземпляр класса.
|
|
2075
2079
|
*
|
|
@@ -2093,7 +2097,7 @@ class ce extends J {
|
|
|
2093
2097
|
* Данные шаблона прайс-листа.
|
|
2094
2098
|
*/
|
|
2095
2099
|
s(this, "priceTemplate");
|
|
2096
|
-
this.createdAt =
|
|
2100
|
+
this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new V(e == null ? void 0 : e.client), this.priceTemplate = new Z(e == null ? void 0 : e.priceTemplate);
|
|
2097
2101
|
}
|
|
2098
2102
|
}
|
|
2099
2103
|
class _e extends Pr {
|
|
@@ -2108,12 +2112,12 @@ class _e extends Pr {
|
|
|
2108
2112
|
* Базовые данные о продукте.
|
|
2109
2113
|
*/
|
|
2110
2114
|
s(this, "product");
|
|
2111
|
-
this.product = new
|
|
2115
|
+
this.product = new I(e == null ? void 0 : e.product);
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
2114
|
-
class
|
|
2118
|
+
class Ar extends w {
|
|
2115
2119
|
}
|
|
2116
|
-
class
|
|
2120
|
+
class ee extends S {
|
|
2117
2121
|
/**
|
|
2118
2122
|
* Инициализирует экземпляр класса {@link Property}.
|
|
2119
2123
|
*
|
|
@@ -2133,7 +2137,11 @@ class le extends S {
|
|
|
2133
2137
|
* Дополнительные метаданные свойства.
|
|
2134
2138
|
*/
|
|
2135
2139
|
s(this, "metadata");
|
|
2136
|
-
|
|
2140
|
+
/**
|
|
2141
|
+
* Признак того, что по свойству может производиться фильтрация в каталоге.
|
|
2142
|
+
*/
|
|
2143
|
+
s(this, "isFilterable");
|
|
2144
|
+
this.type = new Ar(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
|
|
2137
2145
|
}
|
|
2138
2146
|
}
|
|
2139
2147
|
class Y {
|
|
@@ -2152,10 +2160,10 @@ class Y {
|
|
|
2152
2160
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
2153
2161
|
*/
|
|
2154
2162
|
s(this, "value");
|
|
2155
|
-
this.property = new
|
|
2163
|
+
this.property = new ee(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2156
2164
|
}
|
|
2157
2165
|
}
|
|
2158
|
-
class
|
|
2166
|
+
class $ {
|
|
2159
2167
|
/**
|
|
2160
2168
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
2161
2169
|
*
|
|
@@ -2170,10 +2178,10 @@ class A {
|
|
|
2170
2178
|
* Окончание периода.
|
|
2171
2179
|
*/
|
|
2172
2180
|
s(this, "to");
|
|
2173
|
-
this.from =
|
|
2181
|
+
this.from = C(r == null ? void 0 : r.from) ? a(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = C(r == null ? void 0 : r.to) ? a(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
2174
2182
|
}
|
|
2175
2183
|
}
|
|
2176
|
-
class
|
|
2184
|
+
class es {
|
|
2177
2185
|
/**
|
|
2178
2186
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
2179
2187
|
*
|
|
@@ -2192,15 +2200,19 @@ class Yt {
|
|
|
2192
2200
|
* Описание шаблона прайс-листа.
|
|
2193
2201
|
*/
|
|
2194
2202
|
s(this, "description");
|
|
2203
|
+
/**
|
|
2204
|
+
* ФИО автора шаблона прайс-листа.
|
|
2205
|
+
*/
|
|
2206
|
+
s(this, "ownerName");
|
|
2195
2207
|
/**
|
|
2196
2208
|
* Период создания.
|
|
2197
2209
|
*/
|
|
2198
|
-
s(this, "createdAt", new
|
|
2210
|
+
s(this, "createdAt", new $());
|
|
2199
2211
|
/**
|
|
2200
2212
|
* Период изменения.
|
|
2201
2213
|
*/
|
|
2202
|
-
s(this, "updatedAt", new
|
|
2203
|
-
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
|
|
2214
|
+
s(this, "updatedAt", new $());
|
|
2215
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.ownerName = r == null ? void 0 : r.ownerName, this.createdAt = new $(r == null ? void 0 : r.createdAt), this.updatedAt = new $(r == null ? void 0 : r.updatedAt);
|
|
2204
2216
|
}
|
|
2205
2217
|
/**
|
|
2206
2218
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -2212,6 +2224,7 @@ class Yt {
|
|
|
2212
2224
|
case "id":
|
|
2213
2225
|
case "name":
|
|
2214
2226
|
case "description":
|
|
2227
|
+
case "ownerName":
|
|
2215
2228
|
this[r] = void 0;
|
|
2216
2229
|
break;
|
|
2217
2230
|
case "createdAt":
|
|
@@ -2228,16 +2241,16 @@ class Yt {
|
|
|
2228
2241
|
* только актуальные данные.
|
|
2229
2242
|
*/
|
|
2230
2243
|
asClearRaw() {
|
|
2231
|
-
var e, t,
|
|
2244
|
+
var e, t, n, o;
|
|
2232
2245
|
const r = {};
|
|
2233
2246
|
return Object.keys(this).forEach((c) => {
|
|
2234
2247
|
const u = this[c];
|
|
2235
2248
|
// eslint-disable-next-line prettier/prettier
|
|
2236
|
-
|
|
2237
|
-
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((
|
|
2249
|
+
d(u) || C(u) && u.trim().length === 0 || Me(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
2250
|
+
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((n = r == null ? void 0 : r.updatedAt) != null && n.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
2238
2251
|
}
|
|
2239
2252
|
}
|
|
2240
|
-
class
|
|
2253
|
+
class pe extends S {
|
|
2241
2254
|
/**
|
|
2242
2255
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2243
2256
|
*
|
|
@@ -2291,10 +2304,65 @@ class rr {
|
|
|
2291
2304
|
* Минимальный коэффициент цены.
|
|
2292
2305
|
*/
|
|
2293
2306
|
s(this, "minCoefficient");
|
|
2294
|
-
this.role = new
|
|
2307
|
+
this.role = new pe(r == null ? void 0 : r.role), this.category = new ne(r == null ? void 0 : r.category), this.minCoefficient = new Ae(r == null ? void 0 : r.minCoefficient);
|
|
2308
|
+
}
|
|
2309
|
+
}
|
|
2310
|
+
class vt {
|
|
2311
|
+
/**
|
|
2312
|
+
* Инициализирует экземпляр класса {@link FilterSettings}.
|
|
2313
|
+
*
|
|
2314
|
+
* Значения по умолчанию заданы намеренно: API не возвращает поля, значения которых совпадают
|
|
2315
|
+
* с настройками по умолчанию, поэтому отсутствующее поле означает значение по умолчанию.
|
|
2316
|
+
*
|
|
2317
|
+
* @param data Данные для первоначальной инициализации.
|
|
2318
|
+
*/
|
|
2319
|
+
constructor(r) {
|
|
2320
|
+
/**
|
|
2321
|
+
* @inheritDoc
|
|
2322
|
+
*/
|
|
2323
|
+
s(this, "isFake");
|
|
2324
|
+
/**
|
|
2325
|
+
* @inheritDoc
|
|
2326
|
+
*/
|
|
2327
|
+
s(this, "isHidden");
|
|
2328
|
+
/**
|
|
2329
|
+
* @inheritDoc
|
|
2330
|
+
*/
|
|
2331
|
+
s(this, "isMultiple");
|
|
2332
|
+
/**
|
|
2333
|
+
* @inheritDoc
|
|
2334
|
+
*/
|
|
2335
|
+
s(this, "type");
|
|
2336
|
+
/**
|
|
2337
|
+
* @inheritDoc
|
|
2338
|
+
*/
|
|
2339
|
+
s(this, "ord");
|
|
2340
|
+
this.isFake = (r == null ? void 0 : r.isFake) ?? !1, this.isHidden = (r == null ? void 0 : r.isHidden) ?? !1, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.type = (r == null ? void 0 : r.type) ?? null, this.ord = (r == null ? void 0 : r.ord) ?? 0;
|
|
2341
|
+
}
|
|
2342
|
+
}
|
|
2343
|
+
class tr {
|
|
2344
|
+
/**
|
|
2345
|
+
* Инициализирует экземпляр класса {@link CategoryFilterSetting}.
|
|
2346
|
+
*
|
|
2347
|
+
* @param data Данные для первоначальной инициализации.
|
|
2348
|
+
*/
|
|
2349
|
+
constructor(r) {
|
|
2350
|
+
/**
|
|
2351
|
+
* @inheritDoc
|
|
2352
|
+
*/
|
|
2353
|
+
s(this, "category");
|
|
2354
|
+
/**
|
|
2355
|
+
* @inheritDoc
|
|
2356
|
+
*/
|
|
2357
|
+
s(this, "property");
|
|
2358
|
+
/**
|
|
2359
|
+
* @inheritDoc
|
|
2360
|
+
*/
|
|
2361
|
+
s(this, "settings");
|
|
2362
|
+
this.category = new ne(r == null ? void 0 : r.category), this.property = new ee(r == null ? void 0 : r.property), this.settings = new vt(r == null ? void 0 : r.settings);
|
|
2295
2363
|
}
|
|
2296
2364
|
}
|
|
2297
|
-
class
|
|
2365
|
+
class rs extends h {
|
|
2298
2366
|
/**
|
|
2299
2367
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2300
2368
|
*
|
|
@@ -2320,12 +2388,12 @@ class Xt extends h {
|
|
|
2320
2388
|
* @see /doc/api/internal#/operations/api_internal_price_export
|
|
2321
2389
|
*/
|
|
2322
2390
|
// eslint-disable-next-line class-methods-use-this
|
|
2323
|
-
getPriceExportLink(r = "csv", e = !1, t = void 0,
|
|
2391
|
+
getPriceExportLink(r = "csv", e = !1, t = void 0, n = void 0) {
|
|
2324
2392
|
let c = `${k().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2325
|
-
return t && (c += `&category_id=${t}`),
|
|
2393
|
+
return t && (c += `&category_id=${t}`), n && (c += `&client_id=${n}`), c;
|
|
2326
2394
|
}
|
|
2327
2395
|
}
|
|
2328
|
-
class
|
|
2396
|
+
class ts extends h {
|
|
2329
2397
|
/**
|
|
2330
2398
|
* Импортирует цены клиента из CSV файла.
|
|
2331
2399
|
*
|
|
@@ -2347,9 +2415,9 @@ class Zt extends h {
|
|
|
2347
2415
|
* @see /doc/api/internal#/operations/api_internal_client_price_category_update
|
|
2348
2416
|
*/
|
|
2349
2417
|
updateCategoryPrices(r, e, t) {
|
|
2350
|
-
var
|
|
2418
|
+
var n;
|
|
2351
2419
|
return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
|
|
2352
|
-
price_coefficient_id: (
|
|
2420
|
+
price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
|
|
2353
2421
|
increase_percent: t.value
|
|
2354
2422
|
});
|
|
2355
2423
|
}
|
|
@@ -2442,14 +2510,14 @@ class Zt extends h {
|
|
|
2442
2510
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_update
|
|
2443
2511
|
*/
|
|
2444
2512
|
updateProductPrice(r, e, t) {
|
|
2445
|
-
var
|
|
2513
|
+
var n;
|
|
2446
2514
|
return this.patch(
|
|
2447
2515
|
`/internal/clients/${r}/price/products/${e}`,
|
|
2448
2516
|
{
|
|
2449
|
-
price_coefficient_id: (
|
|
2517
|
+
price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
|
|
2450
2518
|
increase_percent: t.value
|
|
2451
2519
|
},
|
|
2452
|
-
(o) => new
|
|
2520
|
+
(o) => new B(o.data)
|
|
2453
2521
|
);
|
|
2454
2522
|
}
|
|
2455
2523
|
/**
|
|
@@ -2461,7 +2529,7 @@ class Zt extends h {
|
|
|
2461
2529
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2462
2530
|
*/
|
|
2463
2531
|
removeProductPrice(r, e) {
|
|
2464
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new
|
|
2532
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new B(t.data));
|
|
2465
2533
|
}
|
|
2466
2534
|
/**
|
|
2467
2535
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2524,7 +2592,7 @@ class Zt extends h {
|
|
|
2524
2592
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2525
2593
|
}
|
|
2526
2594
|
}
|
|
2527
|
-
class
|
|
2595
|
+
class ss extends h {
|
|
2528
2596
|
/**
|
|
2529
2597
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2530
2598
|
*
|
|
@@ -2536,7 +2604,7 @@ class es extends h {
|
|
|
2536
2604
|
return this.get(
|
|
2537
2605
|
`/internal/clients/${r}/price/templates`,
|
|
2538
2606
|
{},
|
|
2539
|
-
(e) => e.data.map((t) => new
|
|
2607
|
+
(e) => e.data.map((t) => new ue(t))
|
|
2540
2608
|
);
|
|
2541
2609
|
}
|
|
2542
2610
|
/**
|
|
@@ -2547,7 +2615,7 @@ class es extends h {
|
|
|
2547
2615
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2548
2616
|
*/
|
|
2549
2617
|
getActiveTemplate(r) {
|
|
2550
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2618
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ue(e.data), !0);
|
|
2551
2619
|
}
|
|
2552
2620
|
/**
|
|
2553
2621
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2559,14 +2627,14 @@ class es extends h {
|
|
|
2559
2627
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2560
2628
|
*/
|
|
2561
2629
|
attachTemplate(r, e, t) {
|
|
2562
|
-
const
|
|
2630
|
+
const n = k().config.dateFormats.api;
|
|
2563
2631
|
return this.post(
|
|
2564
2632
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2565
2633
|
t && {
|
|
2566
|
-
startAt: t.startAt && L(t.startAt,
|
|
2567
|
-
endAt: t.endAt && L(t.endAt,
|
|
2634
|
+
startAt: t.startAt && L(t.startAt, n),
|
|
2635
|
+
endAt: t.endAt && L(t.endAt, n)
|
|
2568
2636
|
},
|
|
2569
|
-
(o) => new
|
|
2637
|
+
(o) => new ue(o.data),
|
|
2570
2638
|
{},
|
|
2571
2639
|
!0
|
|
2572
2640
|
);
|
|
@@ -2592,15 +2660,15 @@ class es extends h {
|
|
|
2592
2660
|
*
|
|
2593
2661
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2594
2662
|
*/
|
|
2595
|
-
changeTemplate(r, e, t,
|
|
2663
|
+
changeTemplate(r, e, t, n) {
|
|
2596
2664
|
const o = k().config.dateFormats.api;
|
|
2597
2665
|
return this.patch(
|
|
2598
2666
|
`/internal/clients/${r}/price/templates/${e}/${t}`,
|
|
2599
|
-
|
|
2600
|
-
startAt:
|
|
2601
|
-
endAt:
|
|
2667
|
+
n && {
|
|
2668
|
+
startAt: n.startAt && L(n.startAt, o),
|
|
2669
|
+
endAt: n.endAt && L(n.endAt, o)
|
|
2602
2670
|
},
|
|
2603
|
-
(c) => new
|
|
2671
|
+
(c) => new ue(c.data)
|
|
2604
2672
|
);
|
|
2605
2673
|
}
|
|
2606
2674
|
/**
|
|
@@ -2616,7 +2684,7 @@ class es extends h {
|
|
|
2616
2684
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
2617
2685
|
}
|
|
2618
2686
|
}
|
|
2619
|
-
class
|
|
2687
|
+
class is extends h {
|
|
2620
2688
|
/**
|
|
2621
2689
|
* Возвращает список данных о корневых категориях.
|
|
2622
2690
|
*
|
|
@@ -2649,7 +2717,7 @@ class rs extends h {
|
|
|
2649
2717
|
showHidden: e,
|
|
2650
2718
|
withNestedCategories: t
|
|
2651
2719
|
},
|
|
2652
|
-
(
|
|
2720
|
+
(n) => new N(n.data)
|
|
2653
2721
|
);
|
|
2654
2722
|
}
|
|
2655
2723
|
/**
|
|
@@ -2676,7 +2744,7 @@ class rs extends h {
|
|
|
2676
2744
|
showHidden: t,
|
|
2677
2745
|
withPriceCoefficients: e
|
|
2678
2746
|
},
|
|
2679
|
-
(
|
|
2747
|
+
(n) => we(n.data, (o) => new I(o))
|
|
2680
2748
|
);
|
|
2681
2749
|
}
|
|
2682
2750
|
/**
|
|
@@ -2689,7 +2757,7 @@ class rs extends h {
|
|
|
2689
2757
|
getCategoryProductsCoefficients(r) {
|
|
2690
2758
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2691
2759
|
const { data: t } = e;
|
|
2692
|
-
return
|
|
2760
|
+
return Wr(t, (n) => n.map((o) => new Ge(o))), t;
|
|
2693
2761
|
});
|
|
2694
2762
|
}
|
|
2695
2763
|
/**
|
|
@@ -2699,16 +2767,16 @@ class rs extends h {
|
|
|
2699
2767
|
* @param limit Количество возвращаемых записей.
|
|
2700
2768
|
*/
|
|
2701
2769
|
publicSimpleSearch(r, e = 10) {
|
|
2702
|
-
return new Promise((t,
|
|
2770
|
+
return new Promise((t, n) => {
|
|
2703
2771
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2704
2772
|
t(o.categories.map((c) => new N(c)));
|
|
2705
2773
|
}).catch((o) => {
|
|
2706
|
-
|
|
2774
|
+
n(o);
|
|
2707
2775
|
});
|
|
2708
2776
|
});
|
|
2709
2777
|
}
|
|
2710
2778
|
}
|
|
2711
|
-
class
|
|
2779
|
+
class ns extends h {
|
|
2712
2780
|
/**
|
|
2713
2781
|
* Возвращает данные об указанном продукте.
|
|
2714
2782
|
*
|
|
@@ -2718,7 +2786,7 @@ class ts extends h {
|
|
|
2718
2786
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2719
2787
|
*/
|
|
2720
2788
|
getProductData(r, e = !1) {
|
|
2721
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new
|
|
2789
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new I(t.data));
|
|
2722
2790
|
}
|
|
2723
2791
|
/**
|
|
2724
2792
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2726,7 +2794,7 @@ class ts extends h {
|
|
|
2726
2794
|
* @param productId Идентификатор продукта.
|
|
2727
2795
|
*/
|
|
2728
2796
|
getPublicProductData(r) {
|
|
2729
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2797
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
|
|
2730
2798
|
}
|
|
2731
2799
|
/**
|
|
2732
2800
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2739,7 +2807,7 @@ class ts extends h {
|
|
|
2739
2807
|
return this.get(
|
|
2740
2808
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2741
2809
|
{},
|
|
2742
|
-
(e) =>
|
|
2810
|
+
(e) => we(e.data, (t) => new Ge(t))
|
|
2743
2811
|
);
|
|
2744
2812
|
}
|
|
2745
2813
|
/**
|
|
@@ -2749,16 +2817,16 @@ class ts extends h {
|
|
|
2749
2817
|
* @param limit Количество возвращаемых записей.
|
|
2750
2818
|
*/
|
|
2751
2819
|
publicSimpleSearch(r, e = 10) {
|
|
2752
|
-
return new Promise((t,
|
|
2820
|
+
return new Promise((t, n) => {
|
|
2753
2821
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2754
|
-
t(o.products.map((c) => new
|
|
2822
|
+
t(o.products.map((c) => new I(c)));
|
|
2755
2823
|
}).catch((o) => {
|
|
2756
|
-
|
|
2824
|
+
n(o);
|
|
2757
2825
|
});
|
|
2758
2826
|
});
|
|
2759
2827
|
}
|
|
2760
2828
|
}
|
|
2761
|
-
class
|
|
2829
|
+
class os extends h {
|
|
2762
2830
|
/**
|
|
2763
2831
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2764
2832
|
*
|
|
@@ -2774,7 +2842,7 @@ class ss extends h {
|
|
|
2774
2842
|
clientId: r,
|
|
2775
2843
|
showHidden: e
|
|
2776
2844
|
},
|
|
2777
|
-
(t) => t.data.map((
|
|
2845
|
+
(t) => t.data.map((n) => new Pe(n))
|
|
2778
2846
|
);
|
|
2779
2847
|
}
|
|
2780
2848
|
/**
|
|
@@ -2787,15 +2855,15 @@ class ss extends h {
|
|
|
2787
2855
|
*
|
|
2788
2856
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
|
|
2789
2857
|
*/
|
|
2790
|
-
getCategoryData(r, e, t = !1,
|
|
2858
|
+
getCategoryData(r, e, t = !1, n = !1) {
|
|
2791
2859
|
return this.get(
|
|
2792
2860
|
`/internal/catalog/categories/${e}`,
|
|
2793
2861
|
{
|
|
2794
2862
|
clientId: r,
|
|
2795
2863
|
showHidden: t,
|
|
2796
|
-
withNestedCategories:
|
|
2864
|
+
withNestedCategories: n
|
|
2797
2865
|
},
|
|
2798
|
-
(o) => new
|
|
2866
|
+
(o) => new Pe(o.data)
|
|
2799
2867
|
);
|
|
2800
2868
|
}
|
|
2801
2869
|
/**
|
|
@@ -2808,19 +2876,19 @@ class ss extends h {
|
|
|
2808
2876
|
*
|
|
2809
2877
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
|
|
2810
2878
|
*/
|
|
2811
|
-
getCategoryProductsList(r, e, t = !0,
|
|
2879
|
+
getCategoryProductsList(r, e, t = !0, n = !1) {
|
|
2812
2880
|
return this.get(
|
|
2813
2881
|
`/internal/catalog/categories/${e}/products`,
|
|
2814
2882
|
{
|
|
2815
2883
|
client_id: r,
|
|
2816
|
-
showHidden:
|
|
2884
|
+
showHidden: n,
|
|
2817
2885
|
withPriceCoefficients: t
|
|
2818
2886
|
},
|
|
2819
|
-
(o) =>
|
|
2887
|
+
(o) => we(o.data, (c) => new B(c))
|
|
2820
2888
|
);
|
|
2821
2889
|
}
|
|
2822
2890
|
}
|
|
2823
|
-
class
|
|
2891
|
+
class cs extends h {
|
|
2824
2892
|
/**
|
|
2825
2893
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2826
2894
|
*
|
|
@@ -2837,12 +2905,12 @@ class is extends h {
|
|
|
2837
2905
|
clientId: e,
|
|
2838
2906
|
withPriceCoefficients: t
|
|
2839
2907
|
},
|
|
2840
|
-
(
|
|
2908
|
+
(n) => new B(n.data)
|
|
2841
2909
|
);
|
|
2842
2910
|
}
|
|
2843
2911
|
}
|
|
2844
|
-
var Ke = /* @__PURE__ */ ((
|
|
2845
|
-
class
|
|
2912
|
+
var Ke = /* @__PURE__ */ ((i) => (i.BeginWith = "bw", i.Contains = "cn", i.Custom = "custom", i.EndsWith = "ew", i.Equals = "eq", i.GreaterOrEqual = "ge", i.GreaterThan = "gt", i.InList = "in", i.LessOrEqual = "le", i.LessThan = "lt", i.NotBeginWith = "bn", i.NotContains = "nc", i.NotEndsWith = "en", i.NotEqual = "ne", i.NotInList = "ni", i.NotNull = "nn", i.Null = "nu", i))(Ke || {});
|
|
2913
|
+
class sr {
|
|
2846
2914
|
/**
|
|
2847
2915
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2848
2916
|
*
|
|
@@ -2873,7 +2941,7 @@ class tr {
|
|
|
2873
2941
|
field: this.field,
|
|
2874
2942
|
op: this.op
|
|
2875
2943
|
};
|
|
2876
|
-
return qe(this.value) ? e.value = L(this.value, r) :
|
|
2944
|
+
return qe(this.value) ? e.value = L(this.value, r) : Be(this.value) ? e.value = {
|
|
2877
2945
|
from: this.value.from ? L(this.value.from, r) : null,
|
|
2878
2946
|
to: this.value.to ? L(this.value.to, r) : null
|
|
2879
2947
|
} : e.value = this.value, e;
|
|
@@ -2899,7 +2967,7 @@ class j {
|
|
|
2899
2967
|
*/
|
|
2900
2968
|
s(this, "groups");
|
|
2901
2969
|
var e, t;
|
|
2902
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((
|
|
2970
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((n) => new sr(n))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((n) => new j(n))) ?? [];
|
|
2903
2971
|
}
|
|
2904
2972
|
/**
|
|
2905
2973
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2909,12 +2977,12 @@ class j {
|
|
|
2909
2977
|
toPrimitive() {
|
|
2910
2978
|
return {
|
|
2911
2979
|
groupOp: this.groupOp,
|
|
2912
|
-
filters: this.filters.map((r) => r instanceof
|
|
2980
|
+
filters: this.filters.map((r) => r instanceof sr && Me(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2913
2981
|
groups: this.groups.map((r) => r instanceof j ? r.toPrimitive() : r)
|
|
2914
2982
|
};
|
|
2915
2983
|
}
|
|
2916
2984
|
}
|
|
2917
|
-
class
|
|
2985
|
+
class ae extends h {
|
|
2918
2986
|
/**
|
|
2919
2987
|
* Получает пагинированный список данных.
|
|
2920
2988
|
*
|
|
@@ -2927,15 +2995,15 @@ class Ce extends h {
|
|
|
2927
2995
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2928
2996
|
* @param signal Сигнал отмены запроса.
|
|
2929
2997
|
*/
|
|
2930
|
-
getPaginated(r, e, t,
|
|
2931
|
-
let
|
|
2932
|
-
page: (
|
|
2933
|
-
perPage: (
|
|
2998
|
+
getPaginated(r, e, t, n, o, c, u, p = void 0) {
|
|
2999
|
+
let f = {
|
|
3000
|
+
page: (n == null ? void 0 : n.page) ?? 1,
|
|
3001
|
+
perPage: (n == null ? void 0 : n.pageSize) ?? 10
|
|
2934
3002
|
};
|
|
2935
|
-
return e && (
|
|
3003
|
+
return e && (f.filters = JSON.stringify((e instanceof j ? e : new j(e)).toPrimitive())), te(t) || (f.sort = H(t) ? t : [t]), o && (f = { ...f, ...o }), this.get(r, f, c, u, p);
|
|
2936
3004
|
}
|
|
2937
3005
|
}
|
|
2938
|
-
class
|
|
3006
|
+
class ls extends ae {
|
|
2939
3007
|
/**
|
|
2940
3008
|
* Возвращает список шаблонов прайс-листа.
|
|
2941
3009
|
*
|
|
@@ -2946,8 +3014,8 @@ class ns extends Ce {
|
|
|
2946
3014
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
|
|
2947
3015
|
*/
|
|
2948
3016
|
getTemplateList(r, e, t) {
|
|
2949
|
-
return this.getPaginated("/internal/price/templates", r, e, t, {}, (
|
|
2950
|
-
const o = { ...
|
|
3017
|
+
return this.getPaginated("/internal/price/templates", r, e, t, {}, (n) => {
|
|
3018
|
+
const o = { ...n.data };
|
|
2951
3019
|
return o.data = o.data.map((c) => new Z(c)), o;
|
|
2952
3020
|
});
|
|
2953
3021
|
}
|
|
@@ -2984,7 +3052,7 @@ class ns extends Ce {
|
|
|
2984
3052
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2985
3053
|
*/
|
|
2986
3054
|
updateTemplate(r, e, t = {}) {
|
|
2987
|
-
return this.patch(`/internal/price/templates/${r}`, e, (
|
|
3055
|
+
return this.patch(`/internal/price/templates/${r}`, e, (n) => new Z(n.data), t);
|
|
2988
3056
|
}
|
|
2989
3057
|
/**
|
|
2990
3058
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -3031,11 +3099,11 @@ class ns extends Ce {
|
|
|
3031
3099
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
|
|
3032
3100
|
*/
|
|
3033
3101
|
saveProductTemplatePrice(r, e, t) {
|
|
3034
|
-
var
|
|
3102
|
+
var n;
|
|
3035
3103
|
return this.post(
|
|
3036
3104
|
`/internal/price/templates/${r}/products/${e}`,
|
|
3037
3105
|
{
|
|
3038
|
-
price_coefficient_id: (
|
|
3106
|
+
price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
|
|
3039
3107
|
increase_percent: t.value
|
|
3040
3108
|
},
|
|
3041
3109
|
(o) => new _e(o.data)
|
|
@@ -3092,7 +3160,7 @@ class ns extends Ce {
|
|
|
3092
3160
|
*
|
|
3093
3161
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
|
|
3094
3162
|
*/
|
|
3095
|
-
saveCategoryTemplatePrice(r, e, t,
|
|
3163
|
+
saveCategoryTemplatePrice(r, e, t, n = !1) {
|
|
3096
3164
|
var o;
|
|
3097
3165
|
return this.request(
|
|
3098
3166
|
{
|
|
@@ -3102,7 +3170,7 @@ class ns extends Ce {
|
|
|
3102
3170
|
price_coefficient_id: (o = t.coefficient) == null ? void 0 : o.id,
|
|
3103
3171
|
increase_percent: t.value
|
|
3104
3172
|
},
|
|
3105
|
-
params:
|
|
3173
|
+
params: n ? { recursively: !0 } : {}
|
|
3106
3174
|
},
|
|
3107
3175
|
(c) => new Le(c.data)
|
|
3108
3176
|
);
|
|
@@ -3135,18 +3203,18 @@ class ns extends Ce {
|
|
|
3135
3203
|
return this.get(
|
|
3136
3204
|
`/internal/price/templates/${r}/clients`,
|
|
3137
3205
|
{},
|
|
3138
|
-
(e) => e.data.map((t) => new
|
|
3206
|
+
(e) => e.data.map((t) => new ue(t))
|
|
3139
3207
|
);
|
|
3140
3208
|
}
|
|
3141
3209
|
}
|
|
3142
|
-
class
|
|
3210
|
+
class us extends h {
|
|
3143
3211
|
/**
|
|
3144
3212
|
* Возвращает список ролей ценообразования.
|
|
3145
3213
|
*
|
|
3146
3214
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3147
3215
|
*/
|
|
3148
3216
|
getRoles() {
|
|
3149
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3217
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new pe(e)));
|
|
3150
3218
|
}
|
|
3151
3219
|
/**
|
|
3152
3220
|
* Добавляет новую роль ценообразования.
|
|
@@ -3156,7 +3224,7 @@ class os extends h {
|
|
|
3156
3224
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3157
3225
|
*/
|
|
3158
3226
|
createRole(r) {
|
|
3159
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3227
|
+
return this.post("/internal/price/roles", r, (e) => new pe(e.data));
|
|
3160
3228
|
}
|
|
3161
3229
|
/**
|
|
3162
3230
|
* Возвращает данные роли ценообразования.
|
|
@@ -3166,7 +3234,7 @@ class os extends h {
|
|
|
3166
3234
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3167
3235
|
*/
|
|
3168
3236
|
getRole(r) {
|
|
3169
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3237
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new pe(e.data));
|
|
3170
3238
|
}
|
|
3171
3239
|
/**
|
|
3172
3240
|
* Обновляет данные роли ценообразования.
|
|
@@ -3177,7 +3245,7 @@ class os extends h {
|
|
|
3177
3245
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3178
3246
|
*/
|
|
3179
3247
|
updateRole(r, e) {
|
|
3180
|
-
return this.patch(`/internal/price/roles/${r}`, e, (t) => new
|
|
3248
|
+
return this.patch(`/internal/price/roles/${r}`, e, (t) => new pe(t.data));
|
|
3181
3249
|
}
|
|
3182
3250
|
/**
|
|
3183
3251
|
* Удаляет роль ценообразования.
|
|
@@ -3215,11 +3283,11 @@ class os extends h {
|
|
|
3215
3283
|
return this.patch(
|
|
3216
3284
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3217
3285
|
e,
|
|
3218
|
-
(t) => t.data.map((
|
|
3286
|
+
(t) => t.data.map((n) => new rr(n))
|
|
3219
3287
|
);
|
|
3220
3288
|
}
|
|
3221
3289
|
}
|
|
3222
|
-
class
|
|
3290
|
+
class ps extends ae {
|
|
3223
3291
|
/**
|
|
3224
3292
|
* Возвращает пагинированный список свойств.
|
|
3225
3293
|
*
|
|
@@ -3230,9 +3298,9 @@ class cs extends Ce {
|
|
|
3230
3298
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
|
|
3231
3299
|
*/
|
|
3232
3300
|
getProperties(r, e, t) {
|
|
3233
|
-
return this.getPaginated("/internal/catalog/properties", r, e, t, {}, (
|
|
3234
|
-
const o = { ...
|
|
3235
|
-
return o.data = o.data.map((c) => new
|
|
3301
|
+
return this.getPaginated("/internal/catalog/properties", r, e, t, {}, (n) => {
|
|
3302
|
+
const o = { ...n.data };
|
|
3303
|
+
return o.data = o.data.map((c) => new ee(c)), o;
|
|
3236
3304
|
});
|
|
3237
3305
|
}
|
|
3238
3306
|
/**
|
|
@@ -3249,7 +3317,7 @@ class cs extends Ce {
|
|
|
3249
3317
|
...t,
|
|
3250
3318
|
type: e
|
|
3251
3319
|
},
|
|
3252
|
-
(
|
|
3320
|
+
(n) => new ee(n.data)
|
|
3253
3321
|
);
|
|
3254
3322
|
}
|
|
3255
3323
|
/**
|
|
@@ -3259,7 +3327,7 @@ class cs extends Ce {
|
|
|
3259
3327
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3260
3328
|
*/
|
|
3261
3329
|
getProperty(r) {
|
|
3262
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3330
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ee(e.data));
|
|
3263
3331
|
}
|
|
3264
3332
|
/**
|
|
3265
3333
|
* Обновляет существующее свойство.
|
|
@@ -3269,14 +3337,14 @@ class cs extends Ce {
|
|
|
3269
3337
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_update
|
|
3270
3338
|
*/
|
|
3271
3339
|
updateProperty(r, e) {
|
|
3272
|
-
const { typeId: t, ...
|
|
3340
|
+
const { typeId: t, ...n } = e;
|
|
3273
3341
|
return this.patch(
|
|
3274
3342
|
`/internal/catalog/properties/${r}`,
|
|
3275
3343
|
{
|
|
3276
|
-
...
|
|
3344
|
+
...n,
|
|
3277
3345
|
type: t
|
|
3278
3346
|
},
|
|
3279
|
-
(o) => new
|
|
3347
|
+
(o) => new ee(o.data)
|
|
3280
3348
|
);
|
|
3281
3349
|
}
|
|
3282
3350
|
/**
|
|
@@ -3316,7 +3384,7 @@ class cs extends Ce {
|
|
|
3316
3384
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3317
3385
|
*/
|
|
3318
3386
|
updateProductProperty(r, e, t) {
|
|
3319
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (
|
|
3387
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (n) => new Y(n.data));
|
|
3320
3388
|
}
|
|
3321
3389
|
/**
|
|
3322
3390
|
* Удаляет значение свойства продукта.
|
|
@@ -3462,7 +3530,7 @@ class cs extends Ce {
|
|
|
3462
3530
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3463
3531
|
*/
|
|
3464
3532
|
updateCategoryProperty(r, e, t) {
|
|
3465
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (
|
|
3533
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (n) => new Y(n.data));
|
|
3466
3534
|
}
|
|
3467
3535
|
/**
|
|
3468
3536
|
* Удаляет значение свойства категории.
|
|
@@ -3590,8 +3658,46 @@ class cs extends Ce {
|
|
|
3590
3658
|
updateCategoryImage(r, e) {
|
|
3591
3659
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3592
3660
|
}
|
|
3661
|
+
/**
|
|
3662
|
+
* Возвращает список настроенных фильтров категории.
|
|
3663
|
+
*
|
|
3664
|
+
* @param categoryId Идентификатор категории.
|
|
3665
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_get_list
|
|
3666
|
+
*/
|
|
3667
|
+
getCategoryFilterSettings(r) {
|
|
3668
|
+
return this.get(
|
|
3669
|
+
`/internal/catalog/categories/${r}/filter-settings`,
|
|
3670
|
+
{},
|
|
3671
|
+
(e) => e.data.map((t) => new tr(t))
|
|
3672
|
+
);
|
|
3673
|
+
}
|
|
3674
|
+
/**
|
|
3675
|
+
* Сохраняет настройки фильтра в категории.
|
|
3676
|
+
*
|
|
3677
|
+
* @param categoryId Идентификатор категории.
|
|
3678
|
+
* @param propertyId Идентификатор свойства.
|
|
3679
|
+
* @param settingsData Данные настроек фильтра.
|
|
3680
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_save
|
|
3681
|
+
*/
|
|
3682
|
+
saveCategoryFilterSetting(r, e, t) {
|
|
3683
|
+
return this.patch(
|
|
3684
|
+
`/internal/catalog/categories/${r}/filter-settings/${e}`,
|
|
3685
|
+
t,
|
|
3686
|
+
(n) => new tr(n.data)
|
|
3687
|
+
);
|
|
3688
|
+
}
|
|
3689
|
+
/**
|
|
3690
|
+
* Удаляет настройки фильтра в категории, возвращая фильтру настройки по умолчанию.
|
|
3691
|
+
*
|
|
3692
|
+
* @param categoryId Идентификатор категории.
|
|
3693
|
+
* @param propertyId Идентификатор свойства.
|
|
3694
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_delete
|
|
3695
|
+
*/
|
|
3696
|
+
deleteCategoryFilterSetting(r, e) {
|
|
3697
|
+
return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
|
|
3698
|
+
}
|
|
3593
3699
|
}
|
|
3594
|
-
class
|
|
3700
|
+
class hs extends h {
|
|
3595
3701
|
/**
|
|
3596
3702
|
* Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
|
|
3597
3703
|
*
|
|
@@ -3607,7 +3713,7 @@ class ls extends h {
|
|
|
3607
3713
|
priceTemplateId: r,
|
|
3608
3714
|
showHidden: e
|
|
3609
3715
|
},
|
|
3610
|
-
(t) => t.data.map((
|
|
3716
|
+
(t) => t.data.map((n) => new N(n))
|
|
3611
3717
|
);
|
|
3612
3718
|
}
|
|
3613
3719
|
/**
|
|
@@ -3620,13 +3726,13 @@ class ls extends h {
|
|
|
3620
3726
|
*
|
|
3621
3727
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
|
|
3622
3728
|
*/
|
|
3623
|
-
getCategoryData(r, e, t = !1,
|
|
3729
|
+
getCategoryData(r, e, t = !1, n = !1) {
|
|
3624
3730
|
return this.get(
|
|
3625
3731
|
`/internal/catalog/categories/${e}`,
|
|
3626
3732
|
{
|
|
3627
3733
|
priceTemplateId: r,
|
|
3628
3734
|
showHidden: t,
|
|
3629
|
-
withNestedCategories:
|
|
3735
|
+
withNestedCategories: n
|
|
3630
3736
|
},
|
|
3631
3737
|
(o) => new N(o.data)
|
|
3632
3738
|
);
|
|
@@ -3641,50 +3747,50 @@ class ls extends h {
|
|
|
3641
3747
|
*
|
|
3642
3748
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
|
|
3643
3749
|
*/
|
|
3644
|
-
getCategoryProductsList(r, e, t = !0,
|
|
3750
|
+
getCategoryProductsList(r, e, t = !0, n = !1) {
|
|
3645
3751
|
return this.get(
|
|
3646
3752
|
`/internal/catalog/categories/${e}/products`,
|
|
3647
3753
|
{
|
|
3648
3754
|
priceTemplateId: r,
|
|
3649
|
-
showHidden:
|
|
3755
|
+
showHidden: n,
|
|
3650
3756
|
withPriceCoefficients: t
|
|
3651
3757
|
},
|
|
3652
|
-
(o) =>
|
|
3758
|
+
(o) => we(o.data, (c) => new I(c))
|
|
3653
3759
|
);
|
|
3654
3760
|
}
|
|
3655
3761
|
}
|
|
3656
|
-
function
|
|
3762
|
+
function ir(i, r, e) {
|
|
3657
3763
|
let t;
|
|
3658
|
-
return
|
|
3659
|
-
if (
|
|
3660
|
-
return t =
|
|
3661
|
-
if (
|
|
3764
|
+
return i.some((n) => {
|
|
3765
|
+
if (n.type === e && n.id === r)
|
|
3766
|
+
return t = n, !0;
|
|
3767
|
+
if (n.type === "product")
|
|
3662
3768
|
return !1;
|
|
3663
|
-
const o =
|
|
3769
|
+
const o = n;
|
|
3664
3770
|
if (o.products && o.products.length > 0) {
|
|
3665
|
-
const c =
|
|
3771
|
+
const c = ir(o.products, r, e);
|
|
3666
3772
|
if (c)
|
|
3667
3773
|
return t = c, !0;
|
|
3668
3774
|
}
|
|
3669
3775
|
if (o.categories && o.categories.length > 0) {
|
|
3670
|
-
const c =
|
|
3776
|
+
const c = ir(o.categories, r, e);
|
|
3671
3777
|
if (c)
|
|
3672
3778
|
return t = c, !0;
|
|
3673
3779
|
}
|
|
3674
3780
|
return !1;
|
|
3675
3781
|
}), t;
|
|
3676
3782
|
}
|
|
3677
|
-
function
|
|
3783
|
+
function nr(i) {
|
|
3678
3784
|
const r = [];
|
|
3679
|
-
return
|
|
3785
|
+
return i.forEach((e) => {
|
|
3680
3786
|
if (r.push(e), e.type === "category") {
|
|
3681
3787
|
const t = e;
|
|
3682
|
-
t.products && t.products.length > 0 && r.push(...
|
|
3788
|
+
t.products && t.products.length > 0 && r.push(...nr(t.products)), t.categories && t.categories.length > 0 && r.push(...nr(t.categories));
|
|
3683
3789
|
}
|
|
3684
3790
|
}), r;
|
|
3685
3791
|
}
|
|
3686
|
-
var
|
|
3687
|
-
class
|
|
3792
|
+
var Ct = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i.SalesDirection = "sales_direction", i.Managers = "managers", i.Curators = "curators", i))(Ct || {}), F = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(F || {});
|
|
3793
|
+
class Ue extends J {
|
|
3688
3794
|
/**
|
|
3689
3795
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3690
3796
|
*
|
|
@@ -3766,7 +3872,7 @@ class G extends He {
|
|
|
3766
3872
|
* Дата и время последнего удаления.
|
|
3767
3873
|
*/
|
|
3768
3874
|
s(this, "deletedAt");
|
|
3769
|
-
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 =
|
|
3875
|
+
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 = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3770
3876
|
}
|
|
3771
3877
|
}
|
|
3772
3878
|
class z extends w {
|
|
@@ -3777,14 +3883,14 @@ class z extends w {
|
|
|
3777
3883
|
return new z({
|
|
3778
3884
|
id: 1,
|
|
3779
3885
|
guid: "",
|
|
3780
|
-
slug:
|
|
3886
|
+
slug: F.Person,
|
|
3781
3887
|
name: ""
|
|
3782
3888
|
});
|
|
3783
3889
|
}
|
|
3784
3890
|
}
|
|
3785
|
-
class
|
|
3891
|
+
class ie extends w {
|
|
3786
3892
|
}
|
|
3787
|
-
class
|
|
3893
|
+
class $r extends fr {
|
|
3788
3894
|
/**
|
|
3789
3895
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
3790
3896
|
*
|
|
@@ -3796,10 +3902,10 @@ class dr extends gr {
|
|
|
3796
3902
|
* Дата и время последнего удаления.
|
|
3797
3903
|
*/
|
|
3798
3904
|
s(this, "deletedAt");
|
|
3799
|
-
this.deletedAt =
|
|
3905
|
+
this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3800
3906
|
}
|
|
3801
3907
|
}
|
|
3802
|
-
class
|
|
3908
|
+
class dr extends $r {
|
|
3803
3909
|
/**
|
|
3804
3910
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3805
3911
|
*
|
|
@@ -3815,7 +3921,7 @@ class Ar extends dr {
|
|
|
3815
3921
|
/**
|
|
3816
3922
|
* Группа партнеров (направление деятельности).
|
|
3817
3923
|
*/
|
|
3818
|
-
s(this, "partnerGroup", new
|
|
3924
|
+
s(this, "partnerGroup", new ie());
|
|
3819
3925
|
/**
|
|
3820
3926
|
* Список контактных лиц контрагента.
|
|
3821
3927
|
*/
|
|
@@ -3845,22 +3951,22 @@ class Ar extends dr {
|
|
|
3845
3951
|
*/
|
|
3846
3952
|
s(this, "updater");
|
|
3847
3953
|
if (e) {
|
|
3848
|
-
if (this.opf = new z(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt =
|
|
3954
|
+
if (this.opf = new z(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new _(e.creator) : void 0, this.updater = e.updater ? new _(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ie(e.partnerGroup)), e.contacts) {
|
|
3849
3955
|
const t = [];
|
|
3850
|
-
e.contacts.forEach((
|
|
3851
|
-
t.push(new G(
|
|
3956
|
+
e.contacts.forEach((n) => {
|
|
3957
|
+
t.push(new G(n));
|
|
3852
3958
|
}), this.contacts = t;
|
|
3853
3959
|
}
|
|
3854
3960
|
if (e.bankAccounts) {
|
|
3855
3961
|
const t = [];
|
|
3856
|
-
e.bankAccounts.forEach((
|
|
3857
|
-
t.push(new
|
|
3962
|
+
e.bankAccounts.forEach((n) => {
|
|
3963
|
+
t.push(new Ue(n));
|
|
3858
3964
|
}), this.bankAccounts = t;
|
|
3859
3965
|
}
|
|
3860
3966
|
}
|
|
3861
3967
|
}
|
|
3862
3968
|
}
|
|
3863
|
-
class
|
|
3969
|
+
class at extends dr {
|
|
3864
3970
|
/**
|
|
3865
3971
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3866
3972
|
*
|
|
@@ -3870,7 +3976,7 @@ class wt extends Ar {
|
|
|
3870
3976
|
super(r);
|
|
3871
3977
|
}
|
|
3872
3978
|
}
|
|
3873
|
-
class
|
|
3979
|
+
class Tr extends dr {
|
|
3874
3980
|
/**
|
|
3875
3981
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3876
3982
|
*
|
|
@@ -3913,7 +4019,7 @@ class $r extends Ar {
|
|
|
3913
4019
|
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 ?? "");
|
|
3914
4020
|
}
|
|
3915
4021
|
}
|
|
3916
|
-
class
|
|
4022
|
+
class br extends Tr {
|
|
3917
4023
|
/**
|
|
3918
4024
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3919
4025
|
*
|
|
@@ -3928,7 +4034,7 @@ class Tr extends $r {
|
|
|
3928
4034
|
e && (this.kpp = e.kpp ?? "");
|
|
3929
4035
|
}
|
|
3930
4036
|
}
|
|
3931
|
-
class
|
|
4037
|
+
class Rt extends br {
|
|
3932
4038
|
/**
|
|
3933
4039
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3934
4040
|
*
|
|
@@ -3939,7 +4045,7 @@ class vt extends Tr {
|
|
|
3939
4045
|
/**
|
|
3940
4046
|
* Страна регистрации юридического лица нерезидента.
|
|
3941
4047
|
*/
|
|
3942
|
-
s(this, "registrationCountry", new
|
|
4048
|
+
s(this, "registrationCountry", new se());
|
|
3943
4049
|
/**
|
|
3944
4050
|
* Регистрационный номер юридического лица нерезидента.
|
|
3945
4051
|
*/
|
|
@@ -3948,7 +4054,7 @@ class vt extends Tr {
|
|
|
3948
4054
|
* Налоговый номер юридического лица нерезидента.
|
|
3949
4055
|
*/
|
|
3950
4056
|
s(this, "taxNumber", "");
|
|
3951
|
-
e && (this.registrationCountry = new
|
|
4057
|
+
e && (this.registrationCountry = new se(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3952
4058
|
}
|
|
3953
4059
|
}
|
|
3954
4060
|
class De {
|
|
@@ -3959,18 +4065,18 @@ class De {
|
|
|
3959
4065
|
*/
|
|
3960
4066
|
static createInstance(r) {
|
|
3961
4067
|
switch (r.opf.slug) {
|
|
3962
|
-
case
|
|
3963
|
-
return new $r(r);
|
|
3964
|
-
case U.UlR:
|
|
4068
|
+
case F.Ic:
|
|
3965
4069
|
return new Tr(r);
|
|
3966
|
-
case
|
|
3967
|
-
return new
|
|
4070
|
+
case F.UlR:
|
|
4071
|
+
return new br(r);
|
|
4072
|
+
case F.UlNr:
|
|
4073
|
+
return new Rt(r);
|
|
3968
4074
|
default:
|
|
3969
|
-
return new
|
|
4075
|
+
return new at(r);
|
|
3970
4076
|
}
|
|
3971
4077
|
}
|
|
3972
4078
|
}
|
|
3973
|
-
class
|
|
4079
|
+
class he extends $r {
|
|
3974
4080
|
/**
|
|
3975
4081
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3976
4082
|
*
|
|
@@ -4007,14 +4113,14 @@ class pe extends dr {
|
|
|
4007
4113
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
4008
4114
|
*/
|
|
4009
4115
|
s(this, "isTransportCompanyAddress");
|
|
4010
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4116
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new yr(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((n) => new G(n))) ?? [], 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;
|
|
4011
4117
|
}
|
|
4012
4118
|
}
|
|
4013
|
-
class br extends w {
|
|
4014
|
-
}
|
|
4015
4119
|
class Sr extends w {
|
|
4016
4120
|
}
|
|
4017
|
-
class
|
|
4121
|
+
class kr extends w {
|
|
4122
|
+
}
|
|
4123
|
+
class or extends V {
|
|
4018
4124
|
/**
|
|
4019
4125
|
* Инициализирует экземпляр класса {@link Client}.
|
|
4020
4126
|
*
|
|
@@ -4022,7 +4128,7 @@ class nr extends V {
|
|
|
4022
4128
|
*/
|
|
4023
4129
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
4024
4130
|
constructor(e) {
|
|
4025
|
-
var t,
|
|
4131
|
+
var t, n, o, c;
|
|
4026
4132
|
super(e);
|
|
4027
4133
|
/**
|
|
4028
4134
|
* @inheritDoc
|
|
@@ -4064,7 +4170,7 @@ class nr extends V {
|
|
|
4064
4170
|
* @inheritDoc
|
|
4065
4171
|
*/
|
|
4066
4172
|
s(this, "extraData");
|
|
4067
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((
|
|
4173
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => De.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ie(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new G(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new he(u))) ?? [], this.channelPrimaryInterest = new Sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new kr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new U(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ve(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4068
4174
|
}
|
|
4069
4175
|
}
|
|
4070
4176
|
class Qe {
|
|
@@ -4076,19 +4182,19 @@ class Qe {
|
|
|
4076
4182
|
const r = {};
|
|
4077
4183
|
return Object.keys(this).forEach((e) => {
|
|
4078
4184
|
const t = this[e];
|
|
4079
|
-
|
|
4080
|
-
|
|
4185
|
+
d(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
|
|
4186
|
+
C(t) && t.trim().length === 0 || Me(t.isNewRec) && t.isNewRec() || (r[e] = t);
|
|
4081
4187
|
}), r;
|
|
4082
4188
|
}
|
|
4083
4189
|
}
|
|
4084
|
-
class
|
|
4190
|
+
class gs extends Qe {
|
|
4085
4191
|
/**
|
|
4086
4192
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4087
4193
|
*
|
|
4088
4194
|
* @param data Данные для первоначальной инициализации.
|
|
4089
4195
|
*/
|
|
4090
4196
|
constructor(e) {
|
|
4091
|
-
var t,
|
|
4197
|
+
var t, n, o, c, u, p, f, m;
|
|
4092
4198
|
super();
|
|
4093
4199
|
/**
|
|
4094
4200
|
* @inheritDoc
|
|
@@ -4133,11 +4239,11 @@ class us extends Qe {
|
|
|
4133
4239
|
/**
|
|
4134
4240
|
* @inheritDoc
|
|
4135
4241
|
*/
|
|
4136
|
-
s(this, "createdAt", new
|
|
4242
|
+
s(this, "createdAt", new $());
|
|
4137
4243
|
/**
|
|
4138
4244
|
* @inheritDoc
|
|
4139
4245
|
*/
|
|
4140
|
-
s(this, "lastLoginDate", new
|
|
4246
|
+
s(this, "lastLoginDate", new $());
|
|
4141
4247
|
/**
|
|
4142
4248
|
* @inheritDoc
|
|
4143
4249
|
*/
|
|
@@ -4189,12 +4295,12 @@ class us extends Qe {
|
|
|
4189
4295
|
/**
|
|
4190
4296
|
* @inheritDoc
|
|
4191
4297
|
*/
|
|
4192
|
-
s(this, "noOrdersPeriod", new
|
|
4193
|
-
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new
|
|
4194
|
-
createdAt: new
|
|
4195
|
-
creator: (
|
|
4196
|
-
isApproved: (
|
|
4197
|
-
}, this.noOrdersPeriod = new
|
|
4298
|
+
s(this, "noOrdersPeriod", new $());
|
|
4299
|
+
this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((D) => new $e(D)), this.region = new me(e == null ? void 0 : e.region), this.country = new se(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new $(e == null ? void 0 : e.createdAt), this.lastLoginDate = new $(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((D) => new Ce(D))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new Ee(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new q(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new z(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ie(D)), this.contact = new He(e == null ? void 0 : e.contact), this.lastOrder = {
|
|
4300
|
+
createdAt: new $((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
|
|
4301
|
+
creator: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.creator,
|
|
4302
|
+
isApproved: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.isApproved
|
|
4303
|
+
}, this.noOrdersPeriod = new $(e == null ? void 0 : e.noOrdersPeriod);
|
|
4198
4304
|
}
|
|
4199
4305
|
/**
|
|
4200
4306
|
* @inheritDoc
|
|
@@ -4235,7 +4341,7 @@ class us extends Qe {
|
|
|
4235
4341
|
this.contragentType = new z();
|
|
4236
4342
|
break;
|
|
4237
4343
|
case "preferredDeliveryType":
|
|
4238
|
-
this.preferredDeliveryType = new
|
|
4344
|
+
this.preferredDeliveryType = new U();
|
|
4239
4345
|
break;
|
|
4240
4346
|
case "partnerGroups":
|
|
4241
4347
|
this.partnerGroups = [];
|
|
@@ -4253,12 +4359,12 @@ class us extends Qe {
|
|
|
4253
4359
|
* @inheritDoc
|
|
4254
4360
|
*/
|
|
4255
4361
|
asClearRaw() {
|
|
4256
|
-
var t,
|
|
4362
|
+
var t, n, o, c, u, p;
|
|
4257
4363
|
const e = super.asClearRaw();
|
|
4258
|
-
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((
|
|
4364
|
+
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
|
|
4259
4365
|
}
|
|
4260
4366
|
}
|
|
4261
|
-
class
|
|
4367
|
+
class Lr extends J {
|
|
4262
4368
|
/**
|
|
4263
4369
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4264
4370
|
*
|
|
@@ -4274,17 +4380,17 @@ class kr extends J {
|
|
|
4274
4380
|
* @inheritDoc
|
|
4275
4381
|
*/
|
|
4276
4382
|
s(this, "creator");
|
|
4277
|
-
this.createdAt =
|
|
4383
|
+
this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new _(e == null ? void 0 : e.creator);
|
|
4278
4384
|
}
|
|
4279
4385
|
}
|
|
4280
|
-
class
|
|
4386
|
+
class Pt extends S {
|
|
4281
4387
|
/**
|
|
4282
4388
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4283
4389
|
*
|
|
4284
4390
|
* @param data Данные для первоначальной инициализации.
|
|
4285
4391
|
*/
|
|
4286
4392
|
constructor(e) {
|
|
4287
|
-
var t,
|
|
4393
|
+
var t, n, o, c;
|
|
4288
4394
|
super(e);
|
|
4289
4395
|
/**
|
|
4290
4396
|
* @inheritDoc
|
|
@@ -4314,7 +4420,7 @@ class at extends S {
|
|
|
4314
4420
|
* @inheritDoc
|
|
4315
4421
|
*/
|
|
4316
4422
|
s(this, "curators");
|
|
4317
|
-
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new
|
|
4423
|
+
this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new G(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Lr(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ie(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new q(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Je(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Ee(u))) ?? void 0;
|
|
4318
4424
|
}
|
|
4319
4425
|
}
|
|
4320
4426
|
class Ie extends J {
|
|
@@ -4332,7 +4438,7 @@ class Ie extends J {
|
|
|
4332
4438
|
this.isPrimary = e.isPrimary;
|
|
4333
4439
|
}
|
|
4334
4440
|
}
|
|
4335
|
-
class
|
|
4441
|
+
class Dt extends G {
|
|
4336
4442
|
/**
|
|
4337
4443
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
4338
4444
|
*
|
|
@@ -4360,7 +4466,7 @@ class Ct extends G {
|
|
|
4360
4466
|
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new Ie(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new Ie(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new Ie(t))));
|
|
4361
4467
|
}
|
|
4362
4468
|
}
|
|
4363
|
-
class O extends
|
|
4469
|
+
class O extends ae {
|
|
4364
4470
|
/**
|
|
4365
4471
|
* Преобразует данные о клиенте в данные требуемые для запроса.
|
|
4366
4472
|
*
|
|
@@ -4371,7 +4477,7 @@ class O extends Ce {
|
|
|
4371
4477
|
return {
|
|
4372
4478
|
name: r.name,
|
|
4373
4479
|
alternative_name: r.alternativeName,
|
|
4374
|
-
partner_groups: r.partnerGroups.map((
|
|
4480
|
+
partner_groups: r.partnerGroups.map((n) => n.id),
|
|
4375
4481
|
phone: r.phone,
|
|
4376
4482
|
email: r.email,
|
|
4377
4483
|
city_id: r.city.id,
|
|
@@ -4388,11 +4494,11 @@ class O extends Ce {
|
|
|
4388
4494
|
* @param contragent Данные о контрагенте клиента.
|
|
4389
4495
|
*/
|
|
4390
4496
|
static transformContragentClientDataToRequest(r) {
|
|
4391
|
-
var c, u, p,
|
|
4497
|
+
var c, u, p, f;
|
|
4392
4498
|
let e;
|
|
4393
|
-
const t = r,
|
|
4499
|
+
const t = r, n = r, o = r;
|
|
4394
4500
|
switch (r.opf.slug) {
|
|
4395
|
-
case
|
|
4501
|
+
case F.Ic:
|
|
4396
4502
|
e = {
|
|
4397
4503
|
opf: t.opf.slug,
|
|
4398
4504
|
name: t.name,
|
|
@@ -4409,25 +4515,25 @@ class O extends Ce {
|
|
|
4409
4515
|
actual_address: t.actualAddress
|
|
4410
4516
|
};
|
|
4411
4517
|
break;
|
|
4412
|
-
case
|
|
4518
|
+
case F.UlR:
|
|
4413
4519
|
e = {
|
|
4414
|
-
opf:
|
|
4415
|
-
name:
|
|
4416
|
-
alternative_name:
|
|
4417
|
-
partner_group_id: (u =
|
|
4418
|
-
comment:
|
|
4419
|
-
inn:
|
|
4420
|
-
kpp:
|
|
4421
|
-
okpo:
|
|
4422
|
-
director_name:
|
|
4423
|
-
director_position:
|
|
4424
|
-
director_acts_on:
|
|
4425
|
-
legal_address:
|
|
4426
|
-
postal_address:
|
|
4427
|
-
actual_address:
|
|
4520
|
+
opf: n.opf.slug,
|
|
4521
|
+
name: n.name,
|
|
4522
|
+
alternative_name: n.alternativeName,
|
|
4523
|
+
partner_group_id: (u = n.partnerGroup) == null ? void 0 : u.id,
|
|
4524
|
+
comment: n.comment,
|
|
4525
|
+
inn: n.inn,
|
|
4526
|
+
kpp: n.kpp,
|
|
4527
|
+
okpo: n.okpo,
|
|
4528
|
+
director_name: n.directorName,
|
|
4529
|
+
director_position: n.directorPosition,
|
|
4530
|
+
director_acts_on: n.directorActsOn,
|
|
4531
|
+
legal_address: n.legalAddress,
|
|
4532
|
+
postal_address: n.postalAddress,
|
|
4533
|
+
actual_address: n.actualAddress
|
|
4428
4534
|
};
|
|
4429
4535
|
break;
|
|
4430
|
-
case
|
|
4536
|
+
case F.UlNr:
|
|
4431
4537
|
e = {
|
|
4432
4538
|
opf: o.opf.slug,
|
|
4433
4539
|
name: o.name,
|
|
@@ -4450,7 +4556,7 @@ class O extends Ce {
|
|
|
4450
4556
|
opf: r.opf.slug,
|
|
4451
4557
|
name: r.name,
|
|
4452
4558
|
alternative_name: r.alternativeName,
|
|
4453
|
-
partner_group_id: (
|
|
4559
|
+
partner_group_id: (f = r.partnerGroup) == null ? void 0 : f.id,
|
|
4454
4560
|
comment: r.comment
|
|
4455
4561
|
};
|
|
4456
4562
|
break;
|
|
@@ -4463,7 +4569,7 @@ class O extends Ce {
|
|
|
4463
4569
|
* @param deliveryAddress Данные об адресе доставки клиенту.
|
|
4464
4570
|
*/
|
|
4465
4571
|
static transformClientDeliveryAddressToRequest(r) {
|
|
4466
|
-
var t,
|
|
4572
|
+
var t, n;
|
|
4467
4573
|
const e = {
|
|
4468
4574
|
address: r.address,
|
|
4469
4575
|
is_one_time: r.isOneTime ?? !1,
|
|
@@ -4472,7 +4578,7 @@ class O extends Ce {
|
|
|
4472
4578
|
};
|
|
4473
4579
|
return r.coordinates && (e.coordinates = {
|
|
4474
4580
|
lat: (t = r.coordinates) == null ? void 0 : t.lat,
|
|
4475
|
-
long: (
|
|
4581
|
+
long: (n = r.coordinates) == null ? void 0 : n.long
|
|
4476
4582
|
}), r.operatingHours && (e.operating_hours = {
|
|
4477
4583
|
from: r.operatingHours.from,
|
|
4478
4584
|
to: r.operatingHours.to
|
|
@@ -4499,7 +4605,7 @@ class O extends Ce {
|
|
|
4499
4605
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4500
4606
|
*/
|
|
4501
4607
|
getClient(r) {
|
|
4502
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4608
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new or(e.data));
|
|
4503
4609
|
}
|
|
4504
4610
|
/**
|
|
4505
4611
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4512,13 +4618,13 @@ class O extends Ce {
|
|
|
4512
4618
|
*
|
|
4513
4619
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_list
|
|
4514
4620
|
*/
|
|
4515
|
-
getClientsList(r, e, t,
|
|
4621
|
+
getClientsList(r, e, t, n, o = void 0) {
|
|
4516
4622
|
return this.getPaginated(
|
|
4517
4623
|
"/internal/clients",
|
|
4518
4624
|
r,
|
|
4519
4625
|
e,
|
|
4520
4626
|
t,
|
|
4521
|
-
|
|
4627
|
+
n,
|
|
4522
4628
|
(c) => {
|
|
4523
4629
|
const u = { ...c.data };
|
|
4524
4630
|
return u.data = u.data.map((p) => new V(p)), u;
|
|
@@ -4558,10 +4664,10 @@ class O extends Ce {
|
|
|
4558
4664
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
|
|
4559
4665
|
*/
|
|
4560
4666
|
getAdditionalClientsData(r, e) {
|
|
4561
|
-
const t = r.map((
|
|
4562
|
-
return this.post("/internal/clients/additional-data", { clients: t, requested_data_types: e }, (
|
|
4667
|
+
const t = r.map((n) => n.id);
|
|
4668
|
+
return this.post("/internal/clients/additional-data", { clients: t, requested_data_types: e }, (n) => {
|
|
4563
4669
|
let o = [];
|
|
4564
|
-
return (
|
|
4670
|
+
return (n == null ? void 0 : n.data.length) > 0 && (o = n.data.map((c) => new Pt(c))), o;
|
|
4565
4671
|
});
|
|
4566
4672
|
}
|
|
4567
4673
|
/**
|
|
@@ -4573,7 +4679,7 @@ class O extends Ce {
|
|
|
4573
4679
|
getAllClientContacts(r) {
|
|
4574
4680
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4575
4681
|
let t = [];
|
|
4576
|
-
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((
|
|
4682
|
+
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((n) => new Dt(n))), t;
|
|
4577
4683
|
});
|
|
4578
4684
|
}
|
|
4579
4685
|
/**
|
|
@@ -4584,7 +4690,7 @@ class O extends Ce {
|
|
|
4584
4690
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4585
4691
|
*/
|
|
4586
4692
|
createClientCommonData(r, e = {}) {
|
|
4587
|
-
return this.post("/internal/clients", O.transformClientDataToRequest(r), (t) => new
|
|
4693
|
+
return this.post("/internal/clients", O.transformClientDataToRequest(r), (t) => new or(t.data), e);
|
|
4588
4694
|
}
|
|
4589
4695
|
/**
|
|
4590
4696
|
* Обновляет данные указанного клиента.
|
|
@@ -4618,7 +4724,7 @@ class O extends Ce {
|
|
|
4618
4724
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4619
4725
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4620
4726
|
*/
|
|
4621
|
-
changeClientPassword(r, e, t,
|
|
4727
|
+
changeClientPassword(r, e, t, n = {}) {
|
|
4622
4728
|
return this.patch(
|
|
4623
4729
|
`/internal/clients/${r}`,
|
|
4624
4730
|
{
|
|
@@ -4626,7 +4732,7 @@ class O extends Ce {
|
|
|
4626
4732
|
password_confirmation: t
|
|
4627
4733
|
},
|
|
4628
4734
|
void 0,
|
|
4629
|
-
|
|
4735
|
+
n
|
|
4630
4736
|
);
|
|
4631
4737
|
}
|
|
4632
4738
|
/**
|
|
@@ -4656,7 +4762,7 @@ class O extends Ce {
|
|
|
4656
4762
|
* @see /doc/api/internal#/Клиенты/api_internal_client_manager_attach
|
|
4657
4763
|
*/
|
|
4658
4764
|
async attachClientToManagers(r, e) {
|
|
4659
|
-
const t = e.map((
|
|
4765
|
+
const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/attach`, { is_primary: n.isDefault }));
|
|
4660
4766
|
await Promise.all(t);
|
|
4661
4767
|
}
|
|
4662
4768
|
/**
|
|
@@ -4668,7 +4774,7 @@ class O extends Ce {
|
|
|
4668
4774
|
* @see /doc/api/internal#/Клиенты/api_internal_client_manager_detach
|
|
4669
4775
|
*/
|
|
4670
4776
|
async detachClientFromManagers(r, e) {
|
|
4671
|
-
const t = e.map((
|
|
4777
|
+
const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/detach`));
|
|
4672
4778
|
await Promise.all(t);
|
|
4673
4779
|
}
|
|
4674
4780
|
/**
|
|
@@ -4724,7 +4830,7 @@ class O extends Ce {
|
|
|
4724
4830
|
return this.post(
|
|
4725
4831
|
`/internal/clients/${r}/contragents`,
|
|
4726
4832
|
O.transformContragentClientDataToRequest(e),
|
|
4727
|
-
(
|
|
4833
|
+
(n) => De.createInstance(n.data),
|
|
4728
4834
|
t
|
|
4729
4835
|
);
|
|
4730
4836
|
}
|
|
@@ -4740,7 +4846,7 @@ class O extends Ce {
|
|
|
4740
4846
|
return this.patch(
|
|
4741
4847
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4742
4848
|
O.transformContragentClientDataToRequest(e),
|
|
4743
|
-
(
|
|
4849
|
+
(n) => De.createInstance(n.data),
|
|
4744
4850
|
t
|
|
4745
4851
|
);
|
|
4746
4852
|
}
|
|
@@ -4764,7 +4870,7 @@ class O extends Ce {
|
|
|
4764
4870
|
return this.get(
|
|
4765
4871
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4766
4872
|
{},
|
|
4767
|
-
(e) => e.data.map((t) => new
|
|
4873
|
+
(e) => e.data.map((t) => new he(t))
|
|
4768
4874
|
);
|
|
4769
4875
|
}
|
|
4770
4876
|
/**
|
|
@@ -4779,7 +4885,7 @@ class O extends Ce {
|
|
|
4779
4885
|
return this.post(
|
|
4780
4886
|
`/internal/clients/${r}/delivery-addresses`,
|
|
4781
4887
|
O.transformClientDeliveryAddressToRequest(e),
|
|
4782
|
-
(
|
|
4888
|
+
(n) => new he(n.data),
|
|
4783
4889
|
t
|
|
4784
4890
|
);
|
|
4785
4891
|
}
|
|
@@ -4795,7 +4901,7 @@ class O extends Ce {
|
|
|
4795
4901
|
return this.patch(
|
|
4796
4902
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4797
4903
|
O.transformClientDeliveryAddressToRequest(e),
|
|
4798
|
-
(
|
|
4904
|
+
(n) => new he(n.data),
|
|
4799
4905
|
t
|
|
4800
4906
|
);
|
|
4801
4907
|
}
|
|
@@ -4818,12 +4924,12 @@ class O extends Ce {
|
|
|
4818
4924
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4819
4925
|
* @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
|
|
4820
4926
|
*/
|
|
4821
|
-
createContragentBankAccount(r, e, t,
|
|
4927
|
+
createContragentBankAccount(r, e, t, n = {}) {
|
|
4822
4928
|
return this.post(
|
|
4823
4929
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4824
4930
|
O.transformClientContragentBankAccountToRequest(t),
|
|
4825
|
-
(o) => new
|
|
4826
|
-
|
|
4931
|
+
(o) => new Ue(o.data),
|
|
4932
|
+
n
|
|
4827
4933
|
);
|
|
4828
4934
|
}
|
|
4829
4935
|
/**
|
|
@@ -4835,12 +4941,12 @@ class O extends Ce {
|
|
|
4835
4941
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4836
4942
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
|
|
4837
4943
|
*/
|
|
4838
|
-
updateContragentBankAccount(r, e, t,
|
|
4944
|
+
updateContragentBankAccount(r, e, t, n = {}) {
|
|
4839
4945
|
return this.patch(
|
|
4840
4946
|
`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
|
|
4841
4947
|
O.transformClientContragentBankAccountToRequest(t),
|
|
4842
|
-
(o) => new
|
|
4843
|
-
|
|
4948
|
+
(o) => new Ue(o.data),
|
|
4949
|
+
n
|
|
4844
4950
|
);
|
|
4845
4951
|
}
|
|
4846
4952
|
/**
|
|
@@ -4895,7 +5001,7 @@ class O extends Ce {
|
|
|
4895
5001
|
comment: e.comment,
|
|
4896
5002
|
not_disturb: e.notDisturb
|
|
4897
5003
|
},
|
|
4898
|
-
(
|
|
5004
|
+
(n) => new G(n.data),
|
|
4899
5005
|
t
|
|
4900
5006
|
);
|
|
4901
5007
|
}
|
|
@@ -4928,7 +5034,7 @@ class O extends Ce {
|
|
|
4928
5034
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4929
5035
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4930
5036
|
*/
|
|
4931
|
-
createContragentContact(r, e, t,
|
|
5037
|
+
createContragentContact(r, e, t, n = {}) {
|
|
4932
5038
|
return this.createContact(
|
|
4933
5039
|
r,
|
|
4934
5040
|
t,
|
|
@@ -4941,7 +5047,7 @@ class O extends Ce {
|
|
|
4941
5047
|
}
|
|
4942
5048
|
]
|
|
4943
5049
|
},
|
|
4944
|
-
|
|
5050
|
+
n
|
|
4945
5051
|
);
|
|
4946
5052
|
}
|
|
4947
5053
|
/**
|
|
@@ -4975,7 +5081,7 @@ class O extends Ce {
|
|
|
4975
5081
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
4976
5082
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4977
5083
|
*/
|
|
4978
|
-
createDeliveryAddressContact(r, e, t,
|
|
5084
|
+
createDeliveryAddressContact(r, e, t, n = {}) {
|
|
4979
5085
|
return this.createContact(
|
|
4980
5086
|
r,
|
|
4981
5087
|
t,
|
|
@@ -4988,7 +5094,7 @@ class O extends Ce {
|
|
|
4988
5094
|
}
|
|
4989
5095
|
]
|
|
4990
5096
|
},
|
|
4991
|
-
|
|
5097
|
+
n
|
|
4992
5098
|
);
|
|
4993
5099
|
}
|
|
4994
5100
|
/**
|
|
@@ -5024,7 +5130,7 @@ class O extends Ce {
|
|
|
5024
5130
|
* @param extraData Дополнительные данные
|
|
5025
5131
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
5026
5132
|
*/
|
|
5027
|
-
createContact(r, e, t,
|
|
5133
|
+
createContact(r, e, t, n = {}) {
|
|
5028
5134
|
var c, u;
|
|
5029
5135
|
const o = {
|
|
5030
5136
|
name: e.name,
|
|
@@ -5032,7 +5138,7 @@ class O extends Ce {
|
|
|
5032
5138
|
comment: e.comment,
|
|
5033
5139
|
...t
|
|
5034
5140
|
};
|
|
5035
|
-
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 G(p.data),
|
|
5141
|
+
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 G(p.data), n);
|
|
5036
5142
|
}
|
|
5037
5143
|
/**
|
|
5038
5144
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5061,7 +5167,7 @@ class O extends Ce {
|
|
|
5061
5167
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5062
5168
|
}
|
|
5063
5169
|
}
|
|
5064
|
-
class
|
|
5170
|
+
class fs extends h {
|
|
5065
5171
|
/**
|
|
5066
5172
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5067
5173
|
*
|
|
@@ -5069,13 +5175,13 @@ class ps extends h {
|
|
|
5069
5175
|
*/
|
|
5070
5176
|
checkPhoneIsBusy(r) {
|
|
5071
5177
|
return new Promise((e, t) => {
|
|
5072
|
-
this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((
|
|
5073
|
-
e(!!
|
|
5178
|
+
this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((n) => {
|
|
5179
|
+
e(!!n.isBusy);
|
|
5074
5180
|
}).catch(t);
|
|
5075
5181
|
});
|
|
5076
5182
|
}
|
|
5077
5183
|
}
|
|
5078
|
-
class
|
|
5184
|
+
class ms {
|
|
5079
5185
|
/**
|
|
5080
5186
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
5081
5187
|
*
|
|
@@ -5094,11 +5200,11 @@ class hs {
|
|
|
5094
5200
|
* Текущая версия приложения.
|
|
5095
5201
|
*/
|
|
5096
5202
|
s(this, "version");
|
|
5097
|
-
this.date =
|
|
5203
|
+
this.date = C(r == null ? void 0 : r.date) ? a(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
5098
5204
|
}
|
|
5099
5205
|
}
|
|
5100
|
-
var
|
|
5101
|
-
class
|
|
5206
|
+
var At = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i.SandwichM2 = "sandwich_m2", i))(At || {});
|
|
5207
|
+
class ys extends h {
|
|
5102
5208
|
/**
|
|
5103
5209
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5104
5210
|
*
|
|
@@ -5123,15 +5229,15 @@ class gs extends h {
|
|
|
5123
5229
|
*
|
|
5124
5230
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
|
|
5125
5231
|
*/
|
|
5126
|
-
searchProduct(r, e, t,
|
|
5232
|
+
searchProduct(r, e, t, n = {}) {
|
|
5127
5233
|
var c;
|
|
5128
5234
|
const o = this.get(
|
|
5129
5235
|
`internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
|
|
5130
5236
|
{ params: t, client_id: e },
|
|
5131
|
-
(u) => new
|
|
5237
|
+
(u) => new I(u.data)
|
|
5132
5238
|
);
|
|
5133
5239
|
return o.catch((u) => {
|
|
5134
|
-
this.errorResponseHandler(u,
|
|
5240
|
+
this.errorResponseHandler(u, n);
|
|
5135
5241
|
}), o;
|
|
5136
5242
|
}
|
|
5137
5243
|
/**
|
|
@@ -5147,7 +5253,7 @@ class gs extends h {
|
|
|
5147
5253
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_template_create
|
|
5148
5254
|
*/
|
|
5149
5255
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5150
|
-
createTemplate(r, e, t,
|
|
5256
|
+
createTemplate(r, e, t, n = {}) {
|
|
5151
5257
|
var o;
|
|
5152
5258
|
return this.post(
|
|
5153
5259
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/template?client_id=${e}`,
|
|
@@ -5155,7 +5261,7 @@ class gs extends h {
|
|
|
5155
5261
|
// eslint-disable-next-line lodash/prefer-noop, @typescript-eslint/no-empty-function
|
|
5156
5262
|
() => {
|
|
5157
5263
|
},
|
|
5158
|
-
|
|
5264
|
+
n
|
|
5159
5265
|
);
|
|
5160
5266
|
}
|
|
5161
5267
|
/**
|
|
@@ -5169,8 +5275,8 @@ class gs extends h {
|
|
|
5169
5275
|
*/
|
|
5170
5276
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5171
5277
|
removeTemplate(r, e, t) {
|
|
5172
|
-
var
|
|
5173
|
-
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(
|
|
5278
|
+
var n;
|
|
5279
|
+
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/template/${t}?client_id=${e}`);
|
|
5174
5280
|
}
|
|
5175
5281
|
/**
|
|
5176
5282
|
* Выполняет расчет, через указанный конфигуратор с переданными параметрами.
|
|
@@ -5182,14 +5288,14 @@ class gs extends h {
|
|
|
5182
5288
|
* @see /doc/api/internal#/Каталог/api_public_catalog_categories_category_configurator_calculate
|
|
5183
5289
|
*/
|
|
5184
5290
|
calculate(r, e, t) {
|
|
5185
|
-
var
|
|
5186
|
-
return this.get(`internal/catalog/categories/${r.id}/configurators/${(
|
|
5291
|
+
var n;
|
|
5292
|
+
return this.get(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/calculate`, {
|
|
5187
5293
|
client_id: e,
|
|
5188
5294
|
...t
|
|
5189
5295
|
});
|
|
5190
5296
|
}
|
|
5191
5297
|
}
|
|
5192
|
-
class
|
|
5298
|
+
class $t {
|
|
5193
5299
|
/**
|
|
5194
5300
|
* Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
|
|
5195
5301
|
*
|
|
@@ -5207,7 +5313,7 @@ class Rt {
|
|
|
5207
5313
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
5208
5314
|
}
|
|
5209
5315
|
}
|
|
5210
|
-
class
|
|
5316
|
+
class ws extends $t {
|
|
5211
5317
|
/**
|
|
5212
5318
|
* Инициализирует экземпляр класса {@link TableDataPagination}.
|
|
5213
5319
|
*
|
|
@@ -5238,7 +5344,7 @@ class ms extends Rt {
|
|
|
5238
5344
|
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;
|
|
5239
5345
|
}
|
|
5240
5346
|
}
|
|
5241
|
-
class
|
|
5347
|
+
class vs {
|
|
5242
5348
|
/**
|
|
5243
5349
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
5244
5350
|
*
|
|
@@ -5256,22 +5362,22 @@ class fs {
|
|
|
5256
5362
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
5257
5363
|
}
|
|
5258
5364
|
}
|
|
5259
|
-
class
|
|
5365
|
+
class Cs {
|
|
5260
5366
|
/**
|
|
5261
5367
|
* Возвращает диапазон дат по умолчанию.
|
|
5262
5368
|
*/
|
|
5263
5369
|
static defaultDateRanges() {
|
|
5264
|
-
const r =
|
|
5370
|
+
const r = Vr(/* @__PURE__ */ new Date(), 1);
|
|
5265
5371
|
return {
|
|
5266
5372
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5267
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5268
|
-
today: { label: "Сегодня", from: Ne(), to:
|
|
5269
|
-
yesterday: { label: "Вчера", from:
|
|
5270
|
-
tomorrow: { label: "Завтра", from:
|
|
5373
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: et(r), to: Zr(r) },
|
|
5374
|
+
today: { label: "Сегодня", from: Ne(), to: Xr() },
|
|
5375
|
+
yesterday: { label: "Вчера", from: Yr(), to: Qr() },
|
|
5376
|
+
tomorrow: { label: "Завтра", from: Kr(), to: Er() }
|
|
5271
5377
|
};
|
|
5272
5378
|
}
|
|
5273
5379
|
}
|
|
5274
|
-
class
|
|
5380
|
+
class _r {
|
|
5275
5381
|
/**
|
|
5276
5382
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
5277
5383
|
*
|
|
@@ -5287,7 +5393,7 @@ class Lr {
|
|
|
5287
5393
|
*/
|
|
5288
5394
|
static getProductMultiplicity(r) {
|
|
5289
5395
|
var e, t;
|
|
5290
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !
|
|
5396
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !_r.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5291
5397
|
}
|
|
5292
5398
|
/**
|
|
5293
5399
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5295,11 +5401,11 @@ class Lr {
|
|
|
5295
5401
|
* @param product Данные о товаре для которого необходимо вернуть кратность длины.
|
|
5296
5402
|
*/
|
|
5297
5403
|
static getProductLengthMultiplicity(r) {
|
|
5298
|
-
var e, t,
|
|
5299
|
-
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((
|
|
5404
|
+
var e, t, n;
|
|
5405
|
+
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((n = r.properties) != null && n.minCount) ? r.properties.minCount : 0.01;
|
|
5300
5406
|
}
|
|
5301
5407
|
}
|
|
5302
|
-
const
|
|
5408
|
+
const re = class re extends h {
|
|
5303
5409
|
/**
|
|
5304
5410
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
5305
5411
|
*/
|
|
@@ -5319,7 +5425,7 @@ const ee = class ee extends h {
|
|
|
5319
5425
|
*/
|
|
5320
5426
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5321
5427
|
static getCachedResponse(e) {
|
|
5322
|
-
const t =
|
|
5428
|
+
const t = re.responseDataCache.get(e);
|
|
5323
5429
|
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
5324
5430
|
return t.val;
|
|
5325
5431
|
}
|
|
@@ -5330,8 +5436,8 @@ const ee = class ee extends h {
|
|
|
5330
5436
|
* @param data Данные для кэширования.
|
|
5331
5437
|
*/
|
|
5332
5438
|
cacheResponse(e, t) {
|
|
5333
|
-
|
|
5334
|
-
validTo:
|
|
5439
|
+
re.responseDataCache.set(e, {
|
|
5440
|
+
validTo: rt(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
5335
5441
|
val: t
|
|
5336
5442
|
});
|
|
5337
5443
|
}
|
|
@@ -5345,29 +5451,29 @@ const ee = class ee extends h {
|
|
|
5345
5451
|
* @param params Дополнительные параметры запроса.
|
|
5346
5452
|
*/
|
|
5347
5453
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
5348
|
-
getTypedDataArrayRequester(e, t,
|
|
5349
|
-
const c = t + (
|
|
5454
|
+
getTypedDataArrayRequester(e, t, n = !1, o = {}) {
|
|
5455
|
+
const c = t + (te(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = n ? re.getCachedResponse(c) : void 0;
|
|
5350
5456
|
return u ? Promise.resolve(u) : this.get(t, o).then((p) => {
|
|
5351
|
-
const
|
|
5352
|
-
return
|
|
5457
|
+
const f = p.map((m) => We.instanceInitializer(e, m));
|
|
5458
|
+
return n && f && this.cacheResponse(t, f), f;
|
|
5353
5459
|
});
|
|
5354
5460
|
}
|
|
5355
5461
|
};
|
|
5356
5462
|
/**
|
|
5357
5463
|
* Кэш результатов запросов.
|
|
5358
5464
|
*/
|
|
5359
|
-
s(
|
|
5360
|
-
let
|
|
5361
|
-
function
|
|
5465
|
+
s(re, "responseDataCache", /* @__PURE__ */ new Map());
|
|
5466
|
+
let ye = re;
|
|
5467
|
+
function as(i, r) {
|
|
5362
5468
|
const e = [2, 0, 1, 1, 1, 2];
|
|
5363
|
-
return r[
|
|
5469
|
+
return r[i % 100 > 4 && i % 100 < 20 ? 2 : e[Math.min(i % 10, 5)]];
|
|
5364
5470
|
}
|
|
5365
|
-
class
|
|
5471
|
+
class Rs {
|
|
5366
5472
|
/**
|
|
5367
5473
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5368
5474
|
*/
|
|
5369
5475
|
static generateUndefinedManagerInstance() {
|
|
5370
|
-
return new
|
|
5476
|
+
return new Ce({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5371
5477
|
}
|
|
5372
5478
|
/**
|
|
5373
5479
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5378,19 +5484,19 @@ class vs {
|
|
|
5378
5484
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5379
5485
|
}
|
|
5380
5486
|
}
|
|
5381
|
-
class
|
|
5487
|
+
class dt extends ye {
|
|
5382
5488
|
/**
|
|
5383
5489
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5384
5490
|
*/
|
|
5385
5491
|
async getManagers() {
|
|
5386
|
-
const r = "/internal/managers", e =
|
|
5492
|
+
const r = "/internal/managers", e = ye.getCachedResponse(r);
|
|
5387
5493
|
if (e)
|
|
5388
5494
|
return e;
|
|
5389
|
-
const
|
|
5390
|
-
return this.cacheResponse(r,
|
|
5495
|
+
const n = (await this.get(r)).data.map((o) => We.instanceInitializer(Ce, o));
|
|
5496
|
+
return this.cacheResponse(r, n), n;
|
|
5391
5497
|
}
|
|
5392
5498
|
}
|
|
5393
|
-
class
|
|
5499
|
+
class Ir extends J {
|
|
5394
5500
|
/**
|
|
5395
5501
|
* Инициализирует экземпляр класса {@link OfferShortInfo}.
|
|
5396
5502
|
*
|
|
@@ -5414,10 +5520,10 @@ class _r extends J {
|
|
|
5414
5520
|
* @inheritDoc
|
|
5415
5521
|
*/
|
|
5416
5522
|
s(this, "sum");
|
|
5417
|
-
this.name = e == null ? void 0 : e.name, this.createdAt =
|
|
5523
|
+
this.name = e == null ? void 0 : e.name, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new V(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum;
|
|
5418
5524
|
}
|
|
5419
5525
|
}
|
|
5420
|
-
class X extends
|
|
5526
|
+
class X extends Ir {
|
|
5421
5527
|
/**
|
|
5422
5528
|
* Инициализирует экземпляр класса {@link Offer}.
|
|
5423
5529
|
*
|
|
@@ -5433,10 +5539,10 @@ class X extends _r {
|
|
|
5433
5539
|
* @inheritDoc
|
|
5434
5540
|
*/
|
|
5435
5541
|
s(this, "products");
|
|
5436
|
-
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => new
|
|
5542
|
+
this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => new Cr(t));
|
|
5437
5543
|
}
|
|
5438
5544
|
}
|
|
5439
|
-
class
|
|
5545
|
+
class Ps extends Qe {
|
|
5440
5546
|
/**
|
|
5441
5547
|
* Инициализирует экземпляр класса {@link OffersListFilters}.
|
|
5442
5548
|
*
|
|
@@ -5459,8 +5565,8 @@ class as extends Qe {
|
|
|
5459
5565
|
/**
|
|
5460
5566
|
* @inheritDoc
|
|
5461
5567
|
*/
|
|
5462
|
-
s(this, "createdAt", new
|
|
5463
|
-
this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new
|
|
5568
|
+
s(this, "createdAt", new $());
|
|
5569
|
+
this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new $(e == null ? void 0 : e.createdAt);
|
|
5464
5570
|
}
|
|
5465
5571
|
/**
|
|
5466
5572
|
* @inheritDoc
|
|
@@ -5472,21 +5578,21 @@ class as extends Qe {
|
|
|
5472
5578
|
* @inheritDoc
|
|
5473
5579
|
*/
|
|
5474
5580
|
asClearRaw() {
|
|
5475
|
-
var t,
|
|
5581
|
+
var t, n;
|
|
5476
5582
|
const e = super.asClearRaw();
|
|
5477
|
-
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((
|
|
5583
|
+
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, e;
|
|
5478
5584
|
}
|
|
5479
5585
|
}
|
|
5480
|
-
class
|
|
5586
|
+
class de extends w {
|
|
5481
5587
|
}
|
|
5482
|
-
class
|
|
5588
|
+
class Or extends Lr {
|
|
5483
5589
|
/**
|
|
5484
5590
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5485
5591
|
*
|
|
5486
5592
|
* @param data Данные для первоначальной инициализации.
|
|
5487
5593
|
*/
|
|
5488
5594
|
constructor(e) {
|
|
5489
|
-
var t,
|
|
5595
|
+
var t, n, o, c, u, p, f, m;
|
|
5490
5596
|
super(e);
|
|
5491
5597
|
/**
|
|
5492
5598
|
* @inheritDoc
|
|
@@ -5538,17 +5644,17 @@ class Ir extends kr {
|
|
|
5538
5644
|
s(this, "isLargeOrder");
|
|
5539
5645
|
this.client = new V(e == null ? void 0 : e.client), this.payment = {
|
|
5540
5646
|
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
5541
|
-
status: ((
|
|
5647
|
+
status: ((n = e == null ? void 0 : e.payment) == null ? void 0 : n.status) ?? -1,
|
|
5542
5648
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5543
5649
|
}, this.delivery = {
|
|
5544
5650
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5545
|
-
date:
|
|
5546
|
-
address: (
|
|
5547
|
-
warehouse: (
|
|
5548
|
-
}, this.attachedUser = e != null && e.attachedUser ? new
|
|
5651
|
+
date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
|
|
5652
|
+
address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new he(e.delivery.address) : void 0,
|
|
5653
|
+
warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new ve(e.delivery.warehouse) : void 0
|
|
5654
|
+
}, this.attachedUser = e != null && e.attachedUser ? new _(e == null ? void 0 : e.attachedUser) : void 0, this.status = new de(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
|
|
5549
5655
|
}
|
|
5550
5656
|
}
|
|
5551
|
-
class
|
|
5657
|
+
class Tt extends vr {
|
|
5552
5658
|
/**
|
|
5553
5659
|
* Инициализирует экземпляр класса {@link OrderItem}.
|
|
5554
5660
|
*
|
|
@@ -5605,10 +5711,10 @@ class dt extends wr {
|
|
|
5605
5711
|
* Продукт, которым заменена текущая запись.
|
|
5606
5712
|
*/
|
|
5607
5713
|
s(this, "replacement");
|
|
5608
|
-
this.product = new
|
|
5714
|
+
this.product = new B(e.product), this.currency = new x(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
|
|
5609
5715
|
}
|
|
5610
5716
|
}
|
|
5611
|
-
class b extends
|
|
5717
|
+
class b extends Or {
|
|
5612
5718
|
/**
|
|
5613
5719
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5614
5720
|
*
|
|
@@ -5669,14 +5775,14 @@ class b extends Ir {
|
|
|
5669
5775
|
* @inheritDoc
|
|
5670
5776
|
*/
|
|
5671
5777
|
s(this, "erpOrderUrl");
|
|
5672
|
-
this.products = (e.products ?? []).map((
|
|
5778
|
+
this.products = (e.products ?? []).map((n) => {
|
|
5673
5779
|
var c;
|
|
5674
|
-
const o =
|
|
5675
|
-
return new
|
|
5676
|
-
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? De.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((
|
|
5780
|
+
const o = n.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === n.replacementId) : void 0;
|
|
5781
|
+
return new Tt(n, o);
|
|
5782
|
+
}), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? De.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((n) => new de(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
|
|
5677
5783
|
}
|
|
5678
5784
|
}
|
|
5679
|
-
class
|
|
5785
|
+
class Ds extends ae {
|
|
5680
5786
|
/**
|
|
5681
5787
|
* Возвращает список заказов-черновиков, удовлетворяющих указанным параметрам поиска.
|
|
5682
5788
|
*
|
|
@@ -5687,7 +5793,7 @@ class Cs extends Ce {
|
|
|
5687
5793
|
*
|
|
5688
5794
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get_list
|
|
5689
5795
|
*/
|
|
5690
|
-
getOffers(r, e, t,
|
|
5796
|
+
getOffers(r, e, t, n = void 0) {
|
|
5691
5797
|
return this.getPaginated(
|
|
5692
5798
|
"/internal/orders/offers",
|
|
5693
5799
|
r,
|
|
@@ -5696,10 +5802,10 @@ class Cs extends Ce {
|
|
|
5696
5802
|
{},
|
|
5697
5803
|
(o) => {
|
|
5698
5804
|
const c = { ...o.data };
|
|
5699
|
-
return c.data = c.data.map((u) => new
|
|
5805
|
+
return c.data = c.data.map((u) => new Ir(u)), c;
|
|
5700
5806
|
},
|
|
5701
5807
|
void 0,
|
|
5702
|
-
|
|
5808
|
+
n
|
|
5703
5809
|
);
|
|
5704
5810
|
}
|
|
5705
5811
|
/**
|
|
@@ -5719,7 +5825,7 @@ class Cs extends Ce {
|
|
|
5719
5825
|
name: e,
|
|
5720
5826
|
items: t != null && t.length ? t : void 0
|
|
5721
5827
|
},
|
|
5722
|
-
(
|
|
5828
|
+
(n) => new X(n.data)
|
|
5723
5829
|
);
|
|
5724
5830
|
}
|
|
5725
5831
|
/**
|
|
@@ -5766,7 +5872,7 @@ class Cs extends Ce {
|
|
|
5766
5872
|
*
|
|
5767
5873
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
|
|
5768
5874
|
*/
|
|
5769
|
-
createOrderFromDraft(r, e, t,
|
|
5875
|
+
createOrderFromDraft(r, e, t, n = {}) {
|
|
5770
5876
|
const o = k().config.dateFormats.api;
|
|
5771
5877
|
return this.post(
|
|
5772
5878
|
`/internal/orders/offers/${r}/create-order`,
|
|
@@ -5776,7 +5882,7 @@ class Cs extends Ce {
|
|
|
5776
5882
|
items: t != null && t.length ? t : void 0
|
|
5777
5883
|
},
|
|
5778
5884
|
(c) => c.data.map((u) => new b(u)),
|
|
5779
|
-
|
|
5885
|
+
n
|
|
5780
5886
|
);
|
|
5781
5887
|
}
|
|
5782
5888
|
/**
|
|
@@ -5804,7 +5910,7 @@ class Cs extends Ce {
|
|
|
5804
5910
|
is_additional_sale: e.isAdditionalSale,
|
|
5805
5911
|
...e.configuratorParams
|
|
5806
5912
|
},
|
|
5807
|
-
(
|
|
5913
|
+
(n) => new X(n.data),
|
|
5808
5914
|
t
|
|
5809
5915
|
);
|
|
5810
5916
|
}
|
|
@@ -5819,7 +5925,7 @@ class Cs extends Ce {
|
|
|
5819
5925
|
*
|
|
5820
5926
|
* @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_product_modify
|
|
5821
5927
|
*/
|
|
5822
|
-
patchOfferProduct(r, e, t,
|
|
5928
|
+
patchOfferProduct(r, e, t, n = {}) {
|
|
5823
5929
|
return this.patch(
|
|
5824
5930
|
`/internal/orders/offers/${r}/products/${e}`,
|
|
5825
5931
|
{
|
|
@@ -5834,7 +5940,7 @@ class Cs extends Ce {
|
|
|
5834
5940
|
...t.configuratorParams
|
|
5835
5941
|
},
|
|
5836
5942
|
(o) => new X(o.data),
|
|
5837
|
-
|
|
5943
|
+
n
|
|
5838
5944
|
);
|
|
5839
5945
|
}
|
|
5840
5946
|
/**
|
|
@@ -5886,8 +5992,8 @@ class Cs extends Ce {
|
|
|
5886
5992
|
return this.post(`/internal/orders/offers/${r}/send`, e);
|
|
5887
5993
|
}
|
|
5888
5994
|
}
|
|
5889
|
-
var
|
|
5890
|
-
class
|
|
5995
|
+
var bt = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.ChangeAttachedOperator = "change_attached_operator", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))(bt || {});
|
|
5996
|
+
class As {
|
|
5891
5997
|
/**
|
|
5892
5998
|
* Инициализирует экземпляр класса {@link OrderEditorData}.
|
|
5893
5999
|
*
|
|
@@ -5950,22 +6056,22 @@ class Ps {
|
|
|
5950
6056
|
* @inheritDoc
|
|
5951
6057
|
*/
|
|
5952
6058
|
s(this, "isAdditionalSale");
|
|
5953
|
-
var e, t,
|
|
5954
|
-
this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (
|
|
6059
|
+
var e, t, n;
|
|
6060
|
+
this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
|
|
5955
6061
|
}
|
|
5956
6062
|
}
|
|
5957
|
-
class Or extends w {
|
|
5958
|
-
}
|
|
5959
6063
|
class xr extends w {
|
|
5960
6064
|
}
|
|
5961
|
-
class
|
|
6065
|
+
class qr extends w {
|
|
6066
|
+
}
|
|
6067
|
+
class $s extends Qe {
|
|
5962
6068
|
/**
|
|
5963
6069
|
* Инициализирует экземпляр класса {@link OrdersListFilters}.
|
|
5964
6070
|
*
|
|
5965
6071
|
* @param data Данные для первоначальной инициализации.
|
|
5966
6072
|
*/
|
|
5967
6073
|
constructor(e) {
|
|
5968
|
-
var t,
|
|
6074
|
+
var t, n, o, c;
|
|
5969
6075
|
super();
|
|
5970
6076
|
/**
|
|
5971
6077
|
* @inheritDoc
|
|
@@ -5986,7 +6092,7 @@ class Rs extends Qe {
|
|
|
5986
6092
|
/**
|
|
5987
6093
|
* @inheritDoc
|
|
5988
6094
|
*/
|
|
5989
|
-
s(this, "createdAt", new
|
|
6095
|
+
s(this, "createdAt", new $());
|
|
5990
6096
|
/**
|
|
5991
6097
|
* @inheritDoc
|
|
5992
6098
|
*/
|
|
@@ -5994,7 +6100,7 @@ class Rs extends Qe {
|
|
|
5994
6100
|
/**
|
|
5995
6101
|
* @inheritDoc
|
|
5996
6102
|
*/
|
|
5997
|
-
s(this, "deliveryDate", new
|
|
6103
|
+
s(this, "deliveryDate", new $());
|
|
5998
6104
|
/**
|
|
5999
6105
|
* @inheritDoc
|
|
6000
6106
|
*/
|
|
@@ -6022,7 +6128,7 @@ class Rs extends Qe {
|
|
|
6022
6128
|
/**
|
|
6023
6129
|
* @inheritDoc
|
|
6024
6130
|
*/
|
|
6025
|
-
s(this, "attachedAt", new
|
|
6131
|
+
s(this, "attachedAt", new $());
|
|
6026
6132
|
/**
|
|
6027
6133
|
* @inheritDoc
|
|
6028
6134
|
*/
|
|
@@ -6059,7 +6165,7 @@ class Rs extends Qe {
|
|
|
6059
6165
|
* @inheritDoc
|
|
6060
6166
|
*/
|
|
6061
6167
|
s(this, "onlyMyRegions");
|
|
6062
|
-
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new
|
|
6168
|
+
this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new Ce(u) : new xr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new V(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new $(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new _(e.creator) : void 0, this.deliveryDate = new $(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new $e(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new $(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new qr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ve(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
|
|
6063
6169
|
}
|
|
6064
6170
|
/**
|
|
6065
6171
|
* @inheritDoc
|
|
@@ -6076,7 +6182,7 @@ class Rs extends Qe {
|
|
|
6076
6182
|
this.deliveryDate.from = null, this.deliveryDate.to = null;
|
|
6077
6183
|
break;
|
|
6078
6184
|
case "deliveryType":
|
|
6079
|
-
this.deliveryType = new
|
|
6185
|
+
this.deliveryType = new U();
|
|
6080
6186
|
break;
|
|
6081
6187
|
case "clientCities":
|
|
6082
6188
|
this.clientCities = [];
|
|
@@ -6103,12 +6209,12 @@ class Rs extends Qe {
|
|
|
6103
6209
|
* @inheritDoc
|
|
6104
6210
|
*/
|
|
6105
6211
|
asClearRaw() {
|
|
6106
|
-
var t,
|
|
6212
|
+
var t, n, o, c, u, p;
|
|
6107
6213
|
const e = super.asClearRaw();
|
|
6108
|
-
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((
|
|
6214
|
+
return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
|
|
6109
6215
|
}
|
|
6110
6216
|
}
|
|
6111
|
-
class
|
|
6217
|
+
class St {
|
|
6112
6218
|
/**
|
|
6113
6219
|
* Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
|
|
6114
6220
|
*
|
|
@@ -6131,10 +6237,10 @@ class $t {
|
|
|
6131
6237
|
* @inheritDoc
|
|
6132
6238
|
*/
|
|
6133
6239
|
s(this, "createdAt");
|
|
6134
|
-
this.user = new
|
|
6240
|
+
this.user = new _(r == null ? void 0 : r.user), this.status = new de(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
|
|
6135
6241
|
}
|
|
6136
6242
|
}
|
|
6137
|
-
class
|
|
6243
|
+
class ds extends ae {
|
|
6138
6244
|
/**
|
|
6139
6245
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
6140
6246
|
*
|
|
@@ -6145,7 +6251,7 @@ class Ds extends Ce {
|
|
|
6145
6251
|
*
|
|
6146
6252
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get_list
|
|
6147
6253
|
*/
|
|
6148
|
-
getOrders(r, e, t,
|
|
6254
|
+
getOrders(r, e, t, n = void 0) {
|
|
6149
6255
|
return this.getPaginated(
|
|
6150
6256
|
"/internal/orders",
|
|
6151
6257
|
r,
|
|
@@ -6154,10 +6260,10 @@ class Ds extends Ce {
|
|
|
6154
6260
|
{},
|
|
6155
6261
|
(o) => {
|
|
6156
6262
|
const c = { ...o.data };
|
|
6157
|
-
return c.data = c.data.map((u) => new
|
|
6263
|
+
return c.data = c.data.map((u) => new Or(u)), c;
|
|
6158
6264
|
},
|
|
6159
6265
|
void 0,
|
|
6160
|
-
|
|
6266
|
+
n
|
|
6161
6267
|
);
|
|
6162
6268
|
}
|
|
6163
6269
|
/**
|
|
@@ -6211,14 +6317,14 @@ class Ds extends Ce {
|
|
|
6211
6317
|
* в случае ошибок в запросах.
|
|
6212
6318
|
* @see /doc/api/internal#/operations/api_internal_client_orders_create
|
|
6213
6319
|
*/
|
|
6214
|
-
createClientOrder(r, e, t,
|
|
6320
|
+
createClientOrder(r, e, t, n, o = {}) {
|
|
6215
6321
|
const c = k().config.dateFormats.api;
|
|
6216
6322
|
return this.post(
|
|
6217
6323
|
`/internal/clients/${r}/orders/${e}`,
|
|
6218
6324
|
{
|
|
6219
6325
|
...t,
|
|
6220
6326
|
deliveryDate: L(t.deliveryDate, c),
|
|
6221
|
-
items:
|
|
6327
|
+
items: n != null && n.length ? n : void 0
|
|
6222
6328
|
},
|
|
6223
6329
|
(u) => u.data.map((p) => new b(p)),
|
|
6224
6330
|
o
|
|
@@ -6287,12 +6393,12 @@ class Ds extends Ce {
|
|
|
6287
6393
|
* @see /doc/api/internal#/Заказы/api_internal_orders_update
|
|
6288
6394
|
*/
|
|
6289
6395
|
updateOrder(r, e, t = {}) {
|
|
6290
|
-
const
|
|
6396
|
+
const n = k().config.dateFormats.api;
|
|
6291
6397
|
return this.patch(
|
|
6292
6398
|
`/internal/orders/${r}`,
|
|
6293
6399
|
{
|
|
6294
6400
|
...e,
|
|
6295
|
-
deliveryDate: e.deliveryDate ? L(e.deliveryDate,
|
|
6401
|
+
deliveryDate: e.deliveryDate ? L(e.deliveryDate, n) : void 0
|
|
6296
6402
|
},
|
|
6297
6403
|
(o) => new b(o.data),
|
|
6298
6404
|
t
|
|
@@ -6324,7 +6430,7 @@ class Ds extends Ce {
|
|
|
6324
6430
|
is_additional_sale: e.isAdditionalSale,
|
|
6325
6431
|
...e.configuratorParams
|
|
6326
6432
|
},
|
|
6327
|
-
(
|
|
6433
|
+
(n) => new b(n.data),
|
|
6328
6434
|
t
|
|
6329
6435
|
);
|
|
6330
6436
|
}
|
|
@@ -6340,7 +6446,7 @@ class Ds extends Ce {
|
|
|
6340
6446
|
*
|
|
6341
6447
|
* @see /doc/api/internal#/Заказы/api_internal_orders_status_change
|
|
6342
6448
|
*/
|
|
6343
|
-
changeOrderStatus(r, e, t,
|
|
6449
|
+
changeOrderStatus(r, e, t, n = {}) {
|
|
6344
6450
|
return this.patch(
|
|
6345
6451
|
`/internal/orders/${r}/status`,
|
|
6346
6452
|
{
|
|
@@ -6348,7 +6454,7 @@ class Ds extends Ce {
|
|
|
6348
6454
|
statusDetail: t
|
|
6349
6455
|
},
|
|
6350
6456
|
(o) => new b(o.data),
|
|
6351
|
-
|
|
6457
|
+
n
|
|
6352
6458
|
);
|
|
6353
6459
|
}
|
|
6354
6460
|
/**
|
|
@@ -6374,7 +6480,7 @@ class Ds extends Ce {
|
|
|
6374
6480
|
return this.get(
|
|
6375
6481
|
`/internal/orders/${r}/history`,
|
|
6376
6482
|
{},
|
|
6377
|
-
(e) => e.data.map((t) => new
|
|
6483
|
+
(e) => e.data.map((t) => new St(t))
|
|
6378
6484
|
);
|
|
6379
6485
|
}
|
|
6380
6486
|
/**
|
|
@@ -6454,7 +6560,7 @@ class Ds extends Ce {
|
|
|
6454
6560
|
*
|
|
6455
6561
|
* @see /doc/api/internal#/Заказы/api_internal_orders_product_update
|
|
6456
6562
|
*/
|
|
6457
|
-
patchOrderProduct(r, e, t,
|
|
6563
|
+
patchOrderProduct(r, e, t, n = {}) {
|
|
6458
6564
|
return this.patch(
|
|
6459
6565
|
`/internal/orders/${r}/products/${e}`,
|
|
6460
6566
|
{
|
|
@@ -6469,7 +6575,7 @@ class Ds extends Ce {
|
|
|
6469
6575
|
...t.configuratorParams
|
|
6470
6576
|
},
|
|
6471
6577
|
(o) => new b(o.data),
|
|
6472
|
-
|
|
6578
|
+
n
|
|
6473
6579
|
);
|
|
6474
6580
|
}
|
|
6475
6581
|
/**
|
|
@@ -6502,7 +6608,7 @@ class Ds extends Ce {
|
|
|
6502
6608
|
*
|
|
6503
6609
|
* @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
|
|
6504
6610
|
*/
|
|
6505
|
-
getDeliveryCost(r, e, t,
|
|
6611
|
+
getDeliveryCost(r, e, t, n = void 0) {
|
|
6506
6612
|
const o = k().config.dateFormats.api;
|
|
6507
6613
|
return this.get(
|
|
6508
6614
|
`/internal/orders/delivery/${r}/cost`,
|
|
@@ -6512,7 +6618,7 @@ class Ds extends Ce {
|
|
|
6512
6618
|
},
|
|
6513
6619
|
(c) => c.data,
|
|
6514
6620
|
void 0,
|
|
6515
|
-
|
|
6621
|
+
n
|
|
6516
6622
|
);
|
|
6517
6623
|
}
|
|
6518
6624
|
}
|
|
@@ -6543,27 +6649,27 @@ class Oe {
|
|
|
6543
6649
|
* Источник клиентской цены.
|
|
6544
6650
|
*/
|
|
6545
6651
|
s(this, "source");
|
|
6546
|
-
this.client = new V(r == null ? void 0 : r.client), this.product = new
|
|
6652
|
+
this.client = new V(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) ?? ze.Product;
|
|
6547
6653
|
}
|
|
6548
6654
|
}
|
|
6549
|
-
const xe = (
|
|
6550
|
-
var r, e, t,
|
|
6551
|
-
return
|
|
6655
|
+
const xe = (i) => {
|
|
6656
|
+
var r, e, t, n, o;
|
|
6657
|
+
return i ? gr(
|
|
6552
6658
|
{
|
|
6553
|
-
cities: (r =
|
|
6554
|
-
clients: (e =
|
|
6555
|
-
managers: (t =
|
|
6556
|
-
partnerGroups: (
|
|
6557
|
-
salesDirections: (o =
|
|
6558
|
-
hideNotActive:
|
|
6659
|
+
cities: (r = i.cities) == null ? void 0 : r.map((c) => c.id),
|
|
6660
|
+
clients: (e = i.clients) == null ? void 0 : e.map((c) => c.id),
|
|
6661
|
+
managers: (t = i.managers) == null ? void 0 : t.map((c) => c.id),
|
|
6662
|
+
partnerGroups: (n = i.partnerGroups) == null ? void 0 : n.map((c) => c.id),
|
|
6663
|
+
salesDirections: (o = i.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
6664
|
+
hideNotActive: i.hideNotActive
|
|
6559
6665
|
},
|
|
6560
|
-
(c) =>
|
|
6666
|
+
(c) => d(c) || (H(c) || Be(c)) && te(c)
|
|
6561
6667
|
) : {};
|
|
6562
|
-
},
|
|
6668
|
+
}, cr = (i) => {
|
|
6563
6669
|
const r = {};
|
|
6564
|
-
return
|
|
6670
|
+
return i.from && (i.from.coefficient || i.from.value) && (r.from = {}, i.from.coefficient && (r.from.priceCoefficientId = i.from.coefficient.id), i.from.value && (r.from.increasePercent = i.from.value)), i.to && (i.to.coefficient || i.to.value) && (r.to = {}, i.to.coefficient && (r.to.priceCoefficientId = i.to.coefficient.id), i.to.value && (r.to.increasePercent = i.to.value)), r;
|
|
6565
6671
|
};
|
|
6566
|
-
class
|
|
6672
|
+
class Ts extends h {
|
|
6567
6673
|
/**
|
|
6568
6674
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
6569
6675
|
*
|
|
@@ -6577,10 +6683,10 @@ class ds extends h {
|
|
|
6577
6683
|
return this.get(
|
|
6578
6684
|
`/internal/price/products/${r}/analyze`,
|
|
6579
6685
|
{
|
|
6580
|
-
...
|
|
6686
|
+
...cr(e),
|
|
6581
6687
|
filters: xe(t)
|
|
6582
6688
|
},
|
|
6583
|
-
(
|
|
6689
|
+
(n) => n.data.map((o) => new Oe(o))
|
|
6584
6690
|
);
|
|
6585
6691
|
}
|
|
6586
6692
|
/**
|
|
@@ -6596,10 +6702,10 @@ class ds extends h {
|
|
|
6596
6702
|
return this.get(
|
|
6597
6703
|
`/internal/price/categories/${r}/analyze`,
|
|
6598
6704
|
{
|
|
6599
|
-
...
|
|
6705
|
+
...cr(e),
|
|
6600
6706
|
filters: xe(t)
|
|
6601
6707
|
},
|
|
6602
|
-
(
|
|
6708
|
+
(n) => n.data.map((o) => new Oe(o))
|
|
6603
6709
|
);
|
|
6604
6710
|
}
|
|
6605
6711
|
/**
|
|
@@ -6620,11 +6726,11 @@ class ds extends h {
|
|
|
6620
6726
|
...e,
|
|
6621
6727
|
filters: xe(t)
|
|
6622
6728
|
},
|
|
6623
|
-
(
|
|
6729
|
+
(n) => n.data.map((o) => new Oe(o))
|
|
6624
6730
|
);
|
|
6625
6731
|
}
|
|
6626
6732
|
}
|
|
6627
|
-
class
|
|
6733
|
+
class kt {
|
|
6628
6734
|
/**
|
|
6629
6735
|
* Инициализирует экземпляр класса {@link PriceHistoryItem}.
|
|
6630
6736
|
*
|
|
@@ -6671,10 +6777,10 @@ class Tt {
|
|
|
6671
6777
|
* @inheritDoc
|
|
6672
6778
|
*/
|
|
6673
6779
|
s(this, "currency");
|
|
6674
|
-
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate =
|
|
6780
|
+
this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new fe(r.product) : void 0, this.client = r.client ? new _(r.client) : void 0, this.executor = r.executor ? new _(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
|
|
6675
6781
|
}
|
|
6676
6782
|
}
|
|
6677
|
-
class
|
|
6783
|
+
class Lt extends fe {
|
|
6678
6784
|
/**
|
|
6679
6785
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
6680
6786
|
*
|
|
@@ -6686,10 +6792,10 @@ class bt extends ge {
|
|
|
6686
6792
|
* @inheritDoc
|
|
6687
6793
|
*/
|
|
6688
6794
|
s(this, "history");
|
|
6689
|
-
this.history =
|
|
6795
|
+
this.history = we(e.history, (t) => new kt(t));
|
|
6690
6796
|
}
|
|
6691
6797
|
}
|
|
6692
|
-
class
|
|
6798
|
+
class bs extends h {
|
|
6693
6799
|
/**
|
|
6694
6800
|
* Возвращает данные об истории изменения цен.
|
|
6695
6801
|
*
|
|
@@ -6698,22 +6804,22 @@ class As extends h {
|
|
|
6698
6804
|
* @see /docs/api#/operations/api_internal_price_history_get
|
|
6699
6805
|
*/
|
|
6700
6806
|
getProductPriceHistory(r) {
|
|
6701
|
-
var o, c, u, p,
|
|
6702
|
-
const e = k().config.dateFormats.api, t =
|
|
6703
|
-
|
|
6807
|
+
var o, c, u, p, f;
|
|
6808
|
+
const e = k().config.dateFormats.api, t = gr(
|
|
6809
|
+
ge(r, {
|
|
6704
6810
|
costDate: {
|
|
6705
6811
|
from: qe((o = r.costDate) == null ? void 0 : o.from) ? L(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
|
|
6706
6812
|
to: qe((u = r.costDate) == null ? void 0 : u.to) ? L(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
|
|
6707
6813
|
}
|
|
6708
6814
|
}),
|
|
6709
|
-
(
|
|
6710
|
-
),
|
|
6711
|
-
return delete t.product, this.get(`/internal/price/products/${
|
|
6712
|
-
new
|
|
6815
|
+
(m) => d(m) || (H(m) || Be(m)) && te(m)
|
|
6816
|
+
), n = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
|
|
6817
|
+
return delete t.product, this.get(`/internal/price/products/${n}/history`, t).then((m) => [
|
|
6818
|
+
new Lt(ge(m[0], { history: m }))
|
|
6713
6819
|
]);
|
|
6714
6820
|
}
|
|
6715
6821
|
}
|
|
6716
|
-
class
|
|
6822
|
+
class lr {
|
|
6717
6823
|
/**
|
|
6718
6824
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
6719
6825
|
*
|
|
@@ -6728,10 +6834,10 @@ class cr {
|
|
|
6728
6834
|
* Список рекомендованных категорий продуктов.
|
|
6729
6835
|
*/
|
|
6730
6836
|
s(this, "productCategories", []);
|
|
6731
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
6837
|
+
r != null && r.products && (this.products = r.products.map((e) => new fe(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new fe(e)));
|
|
6732
6838
|
}
|
|
6733
6839
|
}
|
|
6734
|
-
class
|
|
6840
|
+
class Ss extends h {
|
|
6735
6841
|
/**
|
|
6736
6842
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
6737
6843
|
*
|
|
@@ -6739,7 +6845,7 @@ class $s extends h {
|
|
|
6739
6845
|
* @see /docs/api#/operations/api_internal_recommendations_product_category_get
|
|
6740
6846
|
*/
|
|
6741
6847
|
getProductCategoryRecommendations(r) {
|
|
6742
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
6848
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new lr(e.data));
|
|
6743
6849
|
}
|
|
6744
6850
|
/**
|
|
6745
6851
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -6748,7 +6854,7 @@ class $s extends h {
|
|
|
6748
6854
|
* @see /docs/api#/operations/api_internal_recommendations_product_get
|
|
6749
6855
|
*/
|
|
6750
6856
|
getProductRecommendations(r) {
|
|
6751
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
6857
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new lr(e.data));
|
|
6752
6858
|
}
|
|
6753
6859
|
/**
|
|
6754
6860
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -6777,20 +6883,20 @@ class $s extends h {
|
|
|
6777
6883
|
});
|
|
6778
6884
|
}
|
|
6779
6885
|
}
|
|
6780
|
-
var
|
|
6781
|
-
class
|
|
6886
|
+
var _t = /* @__PURE__ */ ((i) => (i.New = "new", i.Processing = "processing", i.AwaitingSupplyProducts = "awaiting_supply_products", i.InvoiceIssued = "invoice_issued", i.ProcessingOnStock = "processing_on_stock", i.Finished = "finished", i.OrderUpdated = "order_updated", i.Canceled = "canceled", i.Error = "error", i))(_t || {}), It = /* @__PURE__ */ ((i) => (i.CanceledBy1c = "canceled_by1c", i.CanceledByClient = "canceled_by_client", i.FinishedNotApproved = "finished_not_approved", i.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", i.WillWaiting = "will_waiting", i))(It || {});
|
|
6887
|
+
class Ot extends w {
|
|
6782
6888
|
}
|
|
6783
|
-
class
|
|
6889
|
+
class ks extends w {
|
|
6784
6890
|
}
|
|
6785
|
-
class
|
|
6891
|
+
class xt extends w {
|
|
6786
6892
|
}
|
|
6787
|
-
class
|
|
6893
|
+
class qt extends w {
|
|
6788
6894
|
}
|
|
6789
|
-
class
|
|
6895
|
+
class Nt extends w {
|
|
6790
6896
|
}
|
|
6791
|
-
class
|
|
6897
|
+
class Ft extends w {
|
|
6792
6898
|
}
|
|
6793
|
-
class
|
|
6899
|
+
class Ls {
|
|
6794
6900
|
/**
|
|
6795
6901
|
* Генерирует и возвращает данные-заглушку неопределённой записи справочника.
|
|
6796
6902
|
*
|
|
@@ -6809,9 +6915,9 @@ class bs {
|
|
|
6809
6915
|
return r.id === 0 && r.slug === "-undefined-";
|
|
6810
6916
|
}
|
|
6811
6917
|
}
|
|
6812
|
-
class
|
|
6918
|
+
class Nr extends w {
|
|
6813
6919
|
}
|
|
6814
|
-
class T extends
|
|
6920
|
+
class T extends ye {
|
|
6815
6921
|
/**
|
|
6816
6922
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
6817
6923
|
*
|
|
@@ -6820,20 +6926,20 @@ class T extends fe {
|
|
|
6820
6926
|
* и использовать в случае аналогичных запросов.
|
|
6821
6927
|
*/
|
|
6822
6928
|
getReference(r, e = !1) {
|
|
6823
|
-
return this.getTypedDataArrayRequester(
|
|
6929
|
+
return this.getTypedDataArrayRequester(Ot, `/internal/references/${r}`, e);
|
|
6824
6930
|
}
|
|
6825
6931
|
/**
|
|
6826
6932
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
6827
6933
|
* первичного интереса.
|
|
6828
6934
|
*/
|
|
6829
6935
|
getChannelPrimaryInterest() {
|
|
6830
|
-
return this.getTypedDataArrayRequester(
|
|
6936
|
+
return this.getTypedDataArrayRequester(Sr, "/internal/references/channel-primary-interest", !0);
|
|
6831
6937
|
}
|
|
6832
6938
|
/**
|
|
6833
6939
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
6834
6940
|
*/
|
|
6835
6941
|
getContactPositions() {
|
|
6836
|
-
return this.getTypedDataArrayRequester(
|
|
6942
|
+
return this.getTypedDataArrayRequester(xt, "/internal/references/contact-position", !0);
|
|
6837
6943
|
}
|
|
6838
6944
|
/**
|
|
6839
6945
|
* Возвращает {@link Promise} для получения справочника списка направлений кураторства.
|
|
@@ -6852,7 +6958,7 @@ class T extends fe {
|
|
|
6852
6958
|
* групп партнеров (направлений деятельности).
|
|
6853
6959
|
*/
|
|
6854
6960
|
getPartnerGroup() {
|
|
6855
|
-
return this.getTypedDataArrayRequester(
|
|
6961
|
+
return this.getTypedDataArrayRequester(ie, "/internal/references/partner-group", !0);
|
|
6856
6962
|
}
|
|
6857
6963
|
/**
|
|
6858
6964
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
@@ -6864,37 +6970,37 @@ class T extends fe {
|
|
|
6864
6970
|
* Возвращает {@link Promise} для получения справочника операторов.
|
|
6865
6971
|
*/
|
|
6866
6972
|
getOperators() {
|
|
6867
|
-
return this.getTypedDataArrayRequester(
|
|
6973
|
+
return this.getTypedDataArrayRequester(xr, "/internal/references/operator", !0);
|
|
6868
6974
|
}
|
|
6869
6975
|
/**
|
|
6870
6976
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
6871
6977
|
*/
|
|
6872
6978
|
getOrderPaymentStatuses() {
|
|
6873
|
-
return this.getTypedDataArrayRequester(
|
|
6979
|
+
return this.getTypedDataArrayRequester(qt, "/public/references/order-payment-status", !0);
|
|
6874
6980
|
}
|
|
6875
6981
|
/**
|
|
6876
6982
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
6877
6983
|
*/
|
|
6878
6984
|
getOrderStatuses() {
|
|
6879
|
-
return this.getTypedDataArrayRequester(
|
|
6985
|
+
return this.getTypedDataArrayRequester(de, "/internal/references/order-status", !0);
|
|
6880
6986
|
}
|
|
6881
6987
|
/**
|
|
6882
6988
|
* Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
|
|
6883
6989
|
*/
|
|
6884
6990
|
getOrderStatusDetails() {
|
|
6885
|
-
return this.getTypedDataArrayRequester(
|
|
6991
|
+
return this.getTypedDataArrayRequester(Nt, "/internal/references/order-status-detail", !0);
|
|
6886
6992
|
}
|
|
6887
6993
|
/**
|
|
6888
6994
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
6889
6995
|
*/
|
|
6890
6996
|
getPaymentTypes() {
|
|
6891
|
-
return this.getTypedDataArrayRequester(
|
|
6997
|
+
return this.getTypedDataArrayRequester(qr, "/public/references/payment-type", !0);
|
|
6892
6998
|
}
|
|
6893
6999
|
/**
|
|
6894
7000
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
6895
7001
|
*/
|
|
6896
7002
|
getResourceTypes() {
|
|
6897
|
-
return this.getTypedDataArrayRequester(
|
|
7003
|
+
return this.getTypedDataArrayRequester(Nr, "/internal/references/resource-type", !0);
|
|
6898
7004
|
}
|
|
6899
7005
|
/**
|
|
6900
7006
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
@@ -6906,7 +7012,7 @@ class T extends fe {
|
|
|
6906
7012
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
6907
7013
|
*/
|
|
6908
7014
|
getSourcePrimaryInterest() {
|
|
6909
|
-
return this.getTypedDataArrayRequester(
|
|
7015
|
+
return this.getTypedDataArrayRequester(kr, "/internal/references/source-primary-interest", !0);
|
|
6910
7016
|
}
|
|
6911
7017
|
/**
|
|
6912
7018
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -6914,7 +7020,7 @@ class T extends fe {
|
|
|
6914
7020
|
* @param term Терм поиска.
|
|
6915
7021
|
*/
|
|
6916
7022
|
searchCity(r) {
|
|
6917
|
-
return this.getTypedDataArrayRequester(
|
|
7023
|
+
return this.getTypedDataArrayRequester($e, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
6918
7024
|
}
|
|
6919
7025
|
/**
|
|
6920
7026
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -6930,46 +7036,46 @@ class T extends fe {
|
|
|
6930
7036
|
* @param term Терм поиска.
|
|
6931
7037
|
*/
|
|
6932
7038
|
searchCountry(r) {
|
|
6933
|
-
return this.getTypedDataArrayRequester(
|
|
7039
|
+
return this.getTypedDataArrayRequester(se, `/internal/references/country/search?term=${r}`);
|
|
6934
7040
|
}
|
|
6935
7041
|
/**
|
|
6936
7042
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
6937
7043
|
*/
|
|
6938
7044
|
getDeliveryTypes() {
|
|
6939
|
-
return this.getTypedDataArrayRequester(
|
|
7045
|
+
return this.getTypedDataArrayRequester(U, "/internal/references/delivery-type", !0);
|
|
6940
7046
|
}
|
|
6941
7047
|
/**
|
|
6942
7048
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
6943
7049
|
*/
|
|
6944
7050
|
getWarehouses() {
|
|
6945
|
-
return this.getTypedDataArrayRequester(
|
|
7051
|
+
return this.getTypedDataArrayRequester(ve, "/public/references/warehouse", !0);
|
|
6946
7052
|
}
|
|
6947
7053
|
/**
|
|
6948
7054
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
6949
7055
|
*/
|
|
6950
7056
|
getPropertyTypes() {
|
|
6951
|
-
return this.getTypedDataArrayRequester(
|
|
7057
|
+
return this.getTypedDataArrayRequester(Ar, "/internal/references/property-type", !0);
|
|
6952
7058
|
}
|
|
6953
7059
|
/**
|
|
6954
7060
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
6955
7061
|
*/
|
|
6956
7062
|
getPriceCoefficients() {
|
|
6957
|
-
return this.getTypedDataArrayRequester(
|
|
7063
|
+
return this.getTypedDataArrayRequester(Ae, "/internal/references/price-coefficient", !0);
|
|
6958
7064
|
}
|
|
6959
7065
|
/**
|
|
6960
7066
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
6961
7067
|
*/
|
|
6962
7068
|
getProductFileType() {
|
|
6963
|
-
return this.getTypedDataArrayRequester(
|
|
7069
|
+
return this.getTypedDataArrayRequester(Ft, "/public/references/product-file-type", !0);
|
|
6964
7070
|
}
|
|
6965
7071
|
}
|
|
6966
|
-
const
|
|
6967
|
-
const
|
|
7072
|
+
const A = W("common.references_private", () => {
|
|
7073
|
+
const i = y({}), r = y(void 0), e = y(void 0), t = y(void 0), n = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), f = y(void 0), m = y(void 0), D = y(void 0), oe = y(void 0), ce = y(void 0), E = y(void 0), K = y(void 0), Te = y(void 0), be = y(void 0), Se = y(void 0), l = y(void 0);
|
|
6968
7074
|
return {
|
|
6969
7075
|
/**
|
|
6970
7076
|
* Список загружаемых/загруженных на данный момент значений.
|
|
6971
7077
|
*/
|
|
6972
|
-
dataLoaderList:
|
|
7078
|
+
dataLoaderList: i,
|
|
6973
7079
|
/**
|
|
6974
7080
|
* Справочник каналов первичного интереса.
|
|
6975
7081
|
*/
|
|
@@ -6985,7 +7091,7 @@ const d = W("common.references_private", () => {
|
|
|
6985
7091
|
/**
|
|
6986
7092
|
* Справочник типов доставки.
|
|
6987
7093
|
*/
|
|
6988
|
-
deliveryTypeReference:
|
|
7094
|
+
deliveryTypeReference: n,
|
|
6989
7095
|
/**
|
|
6990
7096
|
* Список менеджеров.
|
|
6991
7097
|
*/
|
|
@@ -7005,11 +7111,11 @@ const d = W("common.references_private", () => {
|
|
|
7005
7111
|
/**
|
|
7006
7112
|
* Справочник статусов заказов.
|
|
7007
7113
|
*/
|
|
7008
|
-
orderStatusReference:
|
|
7114
|
+
orderStatusReference: f,
|
|
7009
7115
|
/**
|
|
7010
7116
|
* Справочник детализирующих статусов (подстатусов) заказов.
|
|
7011
7117
|
*/
|
|
7012
|
-
orderStatusDetailReference:
|
|
7118
|
+
orderStatusDetailReference: m,
|
|
7013
7119
|
/**
|
|
7014
7120
|
* Справочник типов оплаты заказов.
|
|
7015
7121
|
*/
|
|
@@ -7017,11 +7123,11 @@ const d = W("common.references_private", () => {
|
|
|
7017
7123
|
/**
|
|
7018
7124
|
* Справочник групп партнеров.
|
|
7019
7125
|
*/
|
|
7020
|
-
partnerGroupReference:
|
|
7126
|
+
partnerGroupReference: oe,
|
|
7021
7127
|
/**
|
|
7022
7128
|
* Справочник типов файлов продукктов/категорий.
|
|
7023
7129
|
*/
|
|
7024
|
-
productFileTypeReference:
|
|
7130
|
+
productFileTypeReference: ce,
|
|
7025
7131
|
/**
|
|
7026
7132
|
* Справочник типов ресурсов.
|
|
7027
7133
|
*/
|
|
@@ -7047,99 +7153,99 @@ const d = W("common.references_private", () => {
|
|
|
7047
7153
|
*/
|
|
7048
7154
|
priceCoefficientsReference: l
|
|
7049
7155
|
};
|
|
7050
|
-
}),
|
|
7051
|
-
const
|
|
7052
|
-
const l =
|
|
7156
|
+
}), _s = W("common.references", () => {
|
|
7157
|
+
const i = P(() => {
|
|
7158
|
+
const l = A();
|
|
7053
7159
|
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
|
|
7054
7160
|
l.channelPrimaryInterestReference = g;
|
|
7055
7161
|
}).catch(v)), l.channelPrimaryInterestReference;
|
|
7056
|
-
}), r =
|
|
7057
|
-
const l =
|
|
7162
|
+
}), r = P(() => {
|
|
7163
|
+
const l = A();
|
|
7058
7164
|
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
|
|
7059
7165
|
l.contactPositionsReference = g;
|
|
7060
7166
|
}).catch(v)), l.contactPositionsReference;
|
|
7061
|
-
}), e =
|
|
7062
|
-
const l =
|
|
7167
|
+
}), e = P(() => {
|
|
7168
|
+
const l = A();
|
|
7063
7169
|
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
|
|
7064
7170
|
l.currencyReference = g;
|
|
7065
7171
|
}).catch(v)), l.currencyReference;
|
|
7066
|
-
}), t =
|
|
7067
|
-
const l =
|
|
7172
|
+
}), t = P(() => {
|
|
7173
|
+
const l = A();
|
|
7068
7174
|
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
|
|
7069
7175
|
l.opfReference = g;
|
|
7070
7176
|
}).catch(v)), l.opfReference;
|
|
7071
|
-
}),
|
|
7072
|
-
const l =
|
|
7177
|
+
}), n = P(() => {
|
|
7178
|
+
const l = A();
|
|
7073
7179
|
return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(T).getOperators().then((g) => {
|
|
7074
7180
|
l.operatorReference = g;
|
|
7075
7181
|
}).catch(v)), l.operatorReference;
|
|
7076
|
-
}), o =
|
|
7077
|
-
const l =
|
|
7182
|
+
}), o = P(() => {
|
|
7183
|
+
const l = A();
|
|
7078
7184
|
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
|
|
7079
7185
|
l.orderPaymentStatusReference = g;
|
|
7080
7186
|
}).catch(v)), l.orderPaymentStatusReference;
|
|
7081
|
-
}), c =
|
|
7082
|
-
const l =
|
|
7187
|
+
}), c = P(() => {
|
|
7188
|
+
const l = A();
|
|
7083
7189
|
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
|
|
7084
7190
|
l.orderStatusReference = g;
|
|
7085
7191
|
}).catch(v)), l.orderStatusReference;
|
|
7086
|
-
}), u =
|
|
7087
|
-
const l =
|
|
7192
|
+
}), u = P(() => {
|
|
7193
|
+
const l = A();
|
|
7088
7194
|
return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(T).getOrderStatusDetails().then((g) => {
|
|
7089
7195
|
l.orderStatusDetailReference = g;
|
|
7090
7196
|
}).catch(v)), l.orderStatusDetailReference;
|
|
7091
|
-
}), p =
|
|
7092
|
-
const l =
|
|
7197
|
+
}), p = P(() => {
|
|
7198
|
+
const l = A();
|
|
7093
7199
|
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
|
|
7094
7200
|
l.paymentTypeReference = g;
|
|
7095
7201
|
}).catch(v)), l.paymentTypeReference;
|
|
7096
|
-
}),
|
|
7097
|
-
const l =
|
|
7202
|
+
}), f = P(() => {
|
|
7203
|
+
const l = A();
|
|
7098
7204
|
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
|
|
7099
7205
|
l.partnerGroupReference = g;
|
|
7100
7206
|
}).catch(v)), l.partnerGroupReference;
|
|
7101
|
-
}),
|
|
7102
|
-
const l =
|
|
7207
|
+
}), m = P(() => {
|
|
7208
|
+
const l = A();
|
|
7103
7209
|
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
|
|
7104
7210
|
l.productFileTypeReference = g;
|
|
7105
7211
|
}).catch(v)), l.productFileTypeReference;
|
|
7106
|
-
}), D =
|
|
7107
|
-
const l =
|
|
7212
|
+
}), D = P(() => {
|
|
7213
|
+
const l = A();
|
|
7108
7214
|
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
|
|
7109
7215
|
l.resourceTypesReference = g;
|
|
7110
7216
|
}).catch(v)), l.resourceTypesReference;
|
|
7111
|
-
}),
|
|
7112
|
-
const l =
|
|
7217
|
+
}), oe = P(() => {
|
|
7218
|
+
const l = A();
|
|
7113
7219
|
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
|
|
7114
7220
|
l.salesDirectionsReference = g;
|
|
7115
7221
|
}).catch(v)), l.salesDirectionsReference;
|
|
7116
|
-
}),
|
|
7117
|
-
const l =
|
|
7222
|
+
}), ce = P(() => {
|
|
7223
|
+
const l = A();
|
|
7118
7224
|
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
|
|
7119
7225
|
l.sourcePrimaryInterestReference = g;
|
|
7120
7226
|
}).catch(v)), l.sourcePrimaryInterestReference;
|
|
7121
|
-
}), E =
|
|
7122
|
-
const l =
|
|
7227
|
+
}), E = P(() => {
|
|
7228
|
+
const l = A();
|
|
7123
7229
|
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
|
|
7124
7230
|
l.deliveryTypeReference = g;
|
|
7125
7231
|
}).catch(v)), l.deliveryTypeReference;
|
|
7126
|
-
}), K =
|
|
7127
|
-
const l =
|
|
7128
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(
|
|
7232
|
+
}), K = P(() => {
|
|
7233
|
+
const l = A();
|
|
7234
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(dt).getManagers().then((g) => {
|
|
7129
7235
|
l.managersList = g;
|
|
7130
7236
|
}).catch(v)), l.managersList;
|
|
7131
|
-
}), Te =
|
|
7132
|
-
const l =
|
|
7237
|
+
}), Te = P(() => {
|
|
7238
|
+
const l = A();
|
|
7133
7239
|
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
|
|
7134
7240
|
l.warehousesReference = g;
|
|
7135
7241
|
}).catch(v)), l.warehousesReference;
|
|
7136
|
-
}), be =
|
|
7137
|
-
const l =
|
|
7242
|
+
}), be = P(() => {
|
|
7243
|
+
const l = A();
|
|
7138
7244
|
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
|
|
7139
7245
|
l.propertyTypesReference = g;
|
|
7140
7246
|
}).catch(v)), l.propertyTypesReference;
|
|
7141
|
-
}), Se =
|
|
7142
|
-
const l =
|
|
7247
|
+
}), Se = P(() => {
|
|
7248
|
+
const l = A();
|
|
7143
7249
|
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
|
|
7144
7250
|
l.priceCoefficientsReference = g;
|
|
7145
7251
|
}).catch(v)), l.priceCoefficientsReference;
|
|
@@ -7148,7 +7254,7 @@ const d = W("common.references_private", () => {
|
|
|
7148
7254
|
/**
|
|
7149
7255
|
* Справочник каналов первичного интереса.
|
|
7150
7256
|
*/
|
|
7151
|
-
channelPrimaryInterestsReference:
|
|
7257
|
+
channelPrimaryInterestsReference: i,
|
|
7152
7258
|
/**
|
|
7153
7259
|
* Справочник должностей контактных лиц.
|
|
7154
7260
|
*/
|
|
@@ -7164,7 +7270,7 @@ const d = W("common.references_private", () => {
|
|
|
7164
7270
|
/**
|
|
7165
7271
|
* Справочник операторов.
|
|
7166
7272
|
*/
|
|
7167
|
-
operatorReference:
|
|
7273
|
+
operatorReference: n,
|
|
7168
7274
|
/**
|
|
7169
7275
|
* Справочник статусов оплаты заказа.
|
|
7170
7276
|
*/
|
|
@@ -7184,11 +7290,11 @@ const d = W("common.references_private", () => {
|
|
|
7184
7290
|
/**
|
|
7185
7291
|
* Справочник групп партнеров.
|
|
7186
7292
|
*/
|
|
7187
|
-
partnerGroupsReference:
|
|
7293
|
+
partnerGroupsReference: f,
|
|
7188
7294
|
/**
|
|
7189
7295
|
* Справочник типов файлов продуктов/категорий.
|
|
7190
7296
|
*/
|
|
7191
|
-
productFilesTypesReference:
|
|
7297
|
+
productFilesTypesReference: m,
|
|
7192
7298
|
/**
|
|
7193
7299
|
* Справочник типов ресурсов.
|
|
7194
7300
|
*/
|
|
@@ -7196,11 +7302,11 @@ const d = W("common.references_private", () => {
|
|
|
7196
7302
|
/**
|
|
7197
7303
|
* Справочник направлений продаж.
|
|
7198
7304
|
*/
|
|
7199
|
-
salesDirectionsReference:
|
|
7305
|
+
salesDirectionsReference: oe,
|
|
7200
7306
|
/**
|
|
7201
7307
|
* Справочник каналов первичного интереса.
|
|
7202
7308
|
*/
|
|
7203
|
-
sourcePrimaryInterestsReference:
|
|
7309
|
+
sourcePrimaryInterestsReference: ce,
|
|
7204
7310
|
/**
|
|
7205
7311
|
* Справочник типов доставки.
|
|
7206
7312
|
*/
|
|
@@ -7223,7 +7329,7 @@ const d = W("common.references_private", () => {
|
|
|
7223
7329
|
priceCoefficientsReference: Se
|
|
7224
7330
|
};
|
|
7225
7331
|
});
|
|
7226
|
-
class
|
|
7332
|
+
class Ut {
|
|
7227
7333
|
/**
|
|
7228
7334
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
7229
7335
|
*
|
|
@@ -7241,7 +7347,7 @@ class qt {
|
|
|
7241
7347
|
this.name = r.name, this.content = r.content;
|
|
7242
7348
|
}
|
|
7243
7349
|
}
|
|
7244
|
-
class
|
|
7350
|
+
class ur {
|
|
7245
7351
|
/**
|
|
7246
7352
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
7247
7353
|
*
|
|
@@ -7281,10 +7387,10 @@ class lr {
|
|
|
7281
7387
|
*/
|
|
7282
7388
|
s(this, "tags");
|
|
7283
7389
|
var e;
|
|
7284
|
-
this.resourceType = new
|
|
7390
|
+
this.resourceType = new Nr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((t) => new Ut(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
|
|
7285
7391
|
}
|
|
7286
7392
|
}
|
|
7287
|
-
class
|
|
7393
|
+
class Is extends h {
|
|
7288
7394
|
/**
|
|
7289
7395
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
7290
7396
|
*
|
|
@@ -7292,7 +7398,7 @@ class ks extends h {
|
|
|
7292
7398
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
7293
7399
|
*/
|
|
7294
7400
|
getResourceSeoData(r, e) {
|
|
7295
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
7401
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new ur(t.data));
|
|
7296
7402
|
}
|
|
7297
7403
|
/**
|
|
7298
7404
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -7303,7 +7409,7 @@ class ks extends h {
|
|
|
7303
7409
|
* в случае ошибок в запросах.
|
|
7304
7410
|
*/
|
|
7305
7411
|
saveResourceSeoData(r, e = {}) {
|
|
7306
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
7412
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new ur(t.data), e);
|
|
7307
7413
|
}
|
|
7308
7414
|
/**
|
|
7309
7415
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -7315,7 +7421,7 @@ class ks extends h {
|
|
|
7315
7421
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
7316
7422
|
}
|
|
7317
7423
|
}
|
|
7318
|
-
class
|
|
7424
|
+
class Os extends h {
|
|
7319
7425
|
/**
|
|
7320
7426
|
* Возвращает подсказки по адресам.
|
|
7321
7427
|
*
|
|
@@ -7354,16 +7460,16 @@ class Ls extends h {
|
|
|
7354
7460
|
*/
|
|
7355
7461
|
execSuggestionQuery(r, e) {
|
|
7356
7462
|
return this.get(r, { query: e }).then((t) => {
|
|
7357
|
-
const
|
|
7463
|
+
const n = [...t];
|
|
7358
7464
|
let o = 1;
|
|
7359
|
-
return
|
|
7465
|
+
return n.forEach((c) => {
|
|
7360
7466
|
c.id = o++;
|
|
7361
|
-
}),
|
|
7467
|
+
}), n;
|
|
7362
7468
|
});
|
|
7363
7469
|
}
|
|
7364
7470
|
}
|
|
7365
|
-
var
|
|
7366
|
-
class
|
|
7471
|
+
var Ht = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(Ht || {});
|
|
7472
|
+
class Mt extends Dr {
|
|
7367
7473
|
/**
|
|
7368
7474
|
* Инициализирует экземпляр класса {@link User}.
|
|
7369
7475
|
*
|
|
@@ -7387,10 +7493,10 @@ class Ut extends Rr {
|
|
|
7387
7493
|
* Роль ценообразования текущего пользователя.
|
|
7388
7494
|
*/
|
|
7389
7495
|
s(this, "pricingRole");
|
|
7390
|
-
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new
|
|
7496
|
+
this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new Rr(e.pricingRole) : void 0;
|
|
7391
7497
|
}
|
|
7392
7498
|
}
|
|
7393
|
-
class
|
|
7499
|
+
class xs extends h {
|
|
7394
7500
|
/**
|
|
7395
7501
|
* Инициализирует экземпляр класса {@link UserAuthDataProvider}.
|
|
7396
7502
|
*/
|
|
@@ -7406,41 +7512,41 @@ class _s extends h {
|
|
|
7406
7512
|
return this.get("internal/users/current-tokens").then((r) => r.accessToken);
|
|
7407
7513
|
}
|
|
7408
7514
|
}
|
|
7409
|
-
class
|
|
7515
|
+
class Bt extends h {
|
|
7410
7516
|
/**
|
|
7411
7517
|
* Возвращает данные о текущем пользователе.
|
|
7412
7518
|
*/
|
|
7413
7519
|
// eslint-disable-next-line class-methods-use-this
|
|
7414
7520
|
getCurrentUser() {
|
|
7415
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
7521
|
+
return this.get("/internal/users/info", {}, (r) => new Mt(r.data), !0);
|
|
7416
7522
|
}
|
|
7417
7523
|
}
|
|
7418
|
-
const
|
|
7419
|
-
const
|
|
7524
|
+
const jt = W("common.user_state_private", () => {
|
|
7525
|
+
const i = y({}), r = y(void 0);
|
|
7420
7526
|
return {
|
|
7421
7527
|
/**
|
|
7422
7528
|
* Список загружаемых/загруженных на данный момент значений.
|
|
7423
7529
|
*/
|
|
7424
|
-
dataLoaderList:
|
|
7530
|
+
dataLoaderList: i,
|
|
7425
7531
|
/**
|
|
7426
7532
|
* Данные о текущем пользователе.
|
|
7427
7533
|
*/
|
|
7428
7534
|
currentUser: r
|
|
7429
7535
|
};
|
|
7430
|
-
}),
|
|
7536
|
+
}), qs = W("common.user_state", () => ({
|
|
7431
7537
|
/**
|
|
7432
7538
|
* Данные о текущем пользователе.
|
|
7433
7539
|
*/
|
|
7434
|
-
currentUser:
|
|
7435
|
-
const r =
|
|
7436
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(
|
|
7540
|
+
currentUser: P(() => {
|
|
7541
|
+
const r = jt();
|
|
7542
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Bt).getCurrentUser().then((e) => {
|
|
7437
7543
|
r.currentUser = e;
|
|
7438
7544
|
}).catch(v).finally(() => {
|
|
7439
7545
|
r.dataLoaderList.currentUser = !1;
|
|
7440
7546
|
})), r.currentUser;
|
|
7441
7547
|
})
|
|
7442
7548
|
}));
|
|
7443
|
-
class
|
|
7549
|
+
class Ns {
|
|
7444
7550
|
/**
|
|
7445
7551
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
7446
7552
|
*
|
|
@@ -7464,168 +7570,171 @@ class Os {
|
|
|
7464
7570
|
}
|
|
7465
7571
|
}
|
|
7466
7572
|
export {
|
|
7467
|
-
|
|
7468
|
-
|
|
7469
|
-
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7473
|
-
|
|
7474
|
-
|
|
7475
|
-
|
|
7573
|
+
Ot as AnyReference,
|
|
7574
|
+
lt as AppBaseConfig,
|
|
7575
|
+
Ue as BankAccount,
|
|
7576
|
+
ae as BasePaginationProvider,
|
|
7577
|
+
ft as CalculationTypeEnum,
|
|
7578
|
+
le as Cart,
|
|
7579
|
+
Zt as CartProvider,
|
|
7580
|
+
rs as CatalogProvider,
|
|
7581
|
+
wr as CatalogableItem,
|
|
7476
7582
|
N as Category,
|
|
7583
|
+
tr as CategoryFilterSetting,
|
|
7477
7584
|
rr as CategoryPricingRule,
|
|
7478
|
-
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7482
|
-
|
|
7483
|
-
|
|
7585
|
+
Sr as ChannelPrimaryInterest,
|
|
7586
|
+
ks as City,
|
|
7587
|
+
$e as CityWithRegionAndCountry,
|
|
7588
|
+
or as Client,
|
|
7589
|
+
Pt as ClientAdditionalData,
|
|
7590
|
+
Pe as ClientCategory,
|
|
7484
7591
|
O as ClientDataProvider,
|
|
7485
|
-
|
|
7486
|
-
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7592
|
+
ts as ClientPriceProvider,
|
|
7593
|
+
ss as ClientPriceTemplateProvider,
|
|
7594
|
+
B as ClientProduct,
|
|
7595
|
+
os as ClientProductCategoryDataProvider,
|
|
7596
|
+
cs as ClientProductDataProvider,
|
|
7490
7597
|
V as ClientShortInfo,
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7598
|
+
Ct as ClientsAdditionalDataRequestTypeEnum,
|
|
7599
|
+
gs as ClientsListFilters,
|
|
7600
|
+
fe as CodedIdentity,
|
|
7601
|
+
ys as ConfiguratorProvider,
|
|
7602
|
+
At as ConfiguratorsEnum,
|
|
7496
7603
|
He as Contact,
|
|
7497
7604
|
ar as ContactLinks,
|
|
7498
7605
|
G as ContactPerson,
|
|
7499
|
-
|
|
7500
|
-
|
|
7606
|
+
Dt as ContactPersonRelated,
|
|
7607
|
+
xt as ContactPosition,
|
|
7501
7608
|
Ie as ContactRelation,
|
|
7502
|
-
|
|
7609
|
+
dr as ContragentBase,
|
|
7503
7610
|
De as ContragentFactory,
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7611
|
+
Tr as ContragentIc,
|
|
7612
|
+
at as ContragentPerson,
|
|
7613
|
+
Rt as ContragentUlNr,
|
|
7614
|
+
br as ContragentUlR,
|
|
7508
7615
|
ze as CostSourceEnum,
|
|
7509
|
-
|
|
7616
|
+
se as Country,
|
|
7510
7617
|
Ve as CuratedDirection,
|
|
7511
7618
|
Ee as Curator,
|
|
7512
7619
|
x as Currency,
|
|
7513
|
-
|
|
7514
|
-
|
|
7515
|
-
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
|
|
7620
|
+
Os as DataSuggestionProvider,
|
|
7621
|
+
Cs as DateTimeProvider,
|
|
7622
|
+
$r as DeletableNamedIdentity,
|
|
7623
|
+
he as DeliveryAddress,
|
|
7624
|
+
U as DeliveryType,
|
|
7625
|
+
Yt as DetailedJwtPayload,
|
|
7626
|
+
it as DeviceTypeResolutionConfig,
|
|
7627
|
+
ut as DiscountShortInfo,
|
|
7628
|
+
Ns as FieldValidationResultData,
|
|
7522
7629
|
j as FilterGroup,
|
|
7523
|
-
|
|
7630
|
+
sr as FilterItem,
|
|
7524
7631
|
Ke as FilterOpEnum,
|
|
7525
|
-
|
|
7526
|
-
|
|
7527
|
-
|
|
7528
|
-
|
|
7632
|
+
vt as FilterSettings,
|
|
7633
|
+
yr as GeoCoordinates,
|
|
7634
|
+
ht as HiddenCatalogableItem,
|
|
7635
|
+
ye as HttpCachedRequester,
|
|
7636
|
+
nt as HttpParamsConfig,
|
|
7529
7637
|
h as HttpRequester,
|
|
7530
7638
|
J as Identity,
|
|
7531
|
-
|
|
7532
|
-
|
|
7533
|
-
|
|
7639
|
+
gt as Image,
|
|
7640
|
+
M as JwtPayload,
|
|
7641
|
+
Ce as Manager,
|
|
7534
7642
|
Je as ManagerCommon,
|
|
7535
|
-
|
|
7536
|
-
|
|
7537
|
-
|
|
7643
|
+
Rs as ManagerDataFactory,
|
|
7644
|
+
dt as ManagerDataProvider,
|
|
7645
|
+
Ut as MetaTagItem,
|
|
7538
7646
|
S as NamedIdentity,
|
|
7539
7647
|
X as Offer,
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7648
|
+
Ir as OfferShortInfo,
|
|
7649
|
+
Ds as OffersDataProvider,
|
|
7650
|
+
Ps as OffersListFilters,
|
|
7651
|
+
xr as Operator,
|
|
7544
7652
|
z as Opf,
|
|
7545
|
-
|
|
7653
|
+
F as OpfEnum,
|
|
7546
7654
|
b as Order,
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
7557
|
-
|
|
7558
|
-
|
|
7559
|
-
|
|
7560
|
-
|
|
7655
|
+
bt as OrderAction,
|
|
7656
|
+
As as OrderEditorData,
|
|
7657
|
+
Or as OrderInfo,
|
|
7658
|
+
Tt as OrderItem,
|
|
7659
|
+
vr as OrderItemBase,
|
|
7660
|
+
qt as OrderPaymentStatus,
|
|
7661
|
+
Lr as OrderShortInfo,
|
|
7662
|
+
de as OrderStatus,
|
|
7663
|
+
Nt as OrderStatusDetail,
|
|
7664
|
+
It as OrderStatusDetailEnum,
|
|
7665
|
+
_t as OrderStatusEnum,
|
|
7666
|
+
St as OrderStatusHistoryInfo,
|
|
7667
|
+
ds as OrdersDataProvider,
|
|
7668
|
+
$s as OrdersListFilters,
|
|
7561
7669
|
Qe as PaginationFiltersBase,
|
|
7562
|
-
|
|
7563
|
-
|
|
7564
|
-
|
|
7670
|
+
ie as PartnerGroup,
|
|
7671
|
+
qr as PaymentType,
|
|
7672
|
+
Re as PreferencesStorageProvider,
|
|
7565
7673
|
Oe as PriceAnalyze,
|
|
7566
|
-
|
|
7567
|
-
|
|
7674
|
+
Ts as PriceAnalyzeProvider,
|
|
7675
|
+
Ae as PriceCoefficient,
|
|
7568
7676
|
mr as PriceCoefficientEnum,
|
|
7569
|
-
|
|
7570
|
-
|
|
7677
|
+
bs as PriceHistoryDataProvider,
|
|
7678
|
+
kt as PriceHistoryItem,
|
|
7571
7679
|
Z as PriceTemplate,
|
|
7572
7680
|
Le as PriceTemplateCategory,
|
|
7573
|
-
|
|
7681
|
+
ue as PriceTemplateClient,
|
|
7574
7682
|
Pr as PriceTemplateICatalogableItem,
|
|
7575
7683
|
_e as PriceTemplateProduct,
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
|
|
7583
|
-
|
|
7684
|
+
ls as PriceTemplateProvider,
|
|
7685
|
+
pe as PricingRole,
|
|
7686
|
+
us as PricingRoleProvider,
|
|
7687
|
+
Fe as PrimaryCatalogableItem,
|
|
7688
|
+
I as Product,
|
|
7689
|
+
is as ProductCategoryDataProvider,
|
|
7690
|
+
ns as ProductDataProvider,
|
|
7691
|
+
Ft as ProductFileType,
|
|
7692
|
+
yt as ProductFilterTypeEnum,
|
|
7584
7693
|
Ge as ProductPriceCoefficient,
|
|
7585
|
-
|
|
7694
|
+
Lt as ProductPriceHistory,
|
|
7586
7695
|
er as ProductUnit,
|
|
7587
|
-
|
|
7588
|
-
|
|
7589
|
-
|
|
7696
|
+
ps as PropertiesProvider,
|
|
7697
|
+
ee as Property,
|
|
7698
|
+
Ar as PropertyType,
|
|
7590
7699
|
mt as PropertyTypeEnum,
|
|
7591
7700
|
Y as PropertyValue,
|
|
7592
|
-
|
|
7593
|
-
|
|
7701
|
+
Ss as RecommendationsDataProvider,
|
|
7702
|
+
lr as RecommendationsList,
|
|
7594
7703
|
w as Reference,
|
|
7595
|
-
|
|
7704
|
+
Ls as ReferenceDataFactory,
|
|
7596
7705
|
T as ReferenceDataProvider,
|
|
7597
7706
|
me as Region,
|
|
7598
|
-
|
|
7707
|
+
Nr as ResourceType,
|
|
7599
7708
|
q as SalesDirection,
|
|
7600
|
-
|
|
7601
|
-
|
|
7602
|
-
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
|
|
7606
|
-
|
|
7607
|
-
|
|
7608
|
-
|
|
7609
|
-
|
|
7709
|
+
ot as SentryConfig,
|
|
7710
|
+
ur as Seo,
|
|
7711
|
+
Is as SeoDataProvider,
|
|
7712
|
+
kr as SourcePrimaryInterest,
|
|
7713
|
+
pt as StockCount,
|
|
7714
|
+
ws as TableDataPagination,
|
|
7715
|
+
$t as TableDataPaginationRequestParams,
|
|
7716
|
+
vs as TableDataSortRequestParams,
|
|
7717
|
+
hs as TemplateProductCategoryDataProvider,
|
|
7718
|
+
es as TemplatesListFilters,
|
|
7610
7719
|
We as TypedInstanceFactory,
|
|
7611
|
-
|
|
7612
|
-
|
|
7613
|
-
|
|
7614
|
-
|
|
7615
|
-
|
|
7616
|
-
|
|
7617
|
-
|
|
7618
|
-
|
|
7619
|
-
|
|
7620
|
-
|
|
7621
|
-
|
|
7622
|
-
|
|
7623
|
-
|
|
7624
|
-
|
|
7625
|
-
|
|
7626
|
-
|
|
7720
|
+
_r as UnitsHelper,
|
|
7721
|
+
fs as UnknownClientDataProvider,
|
|
7722
|
+
fr as UpdatableNamedIdentity,
|
|
7723
|
+
Mt as User,
|
|
7724
|
+
xs as UserAuthDataProvider,
|
|
7725
|
+
Dr as UserCommonInfo,
|
|
7726
|
+
Bt as UserDataProvider,
|
|
7727
|
+
Rr as UserPricingRole,
|
|
7728
|
+
_ as UserShortInfo,
|
|
7729
|
+
Ht as UserTypeEnum,
|
|
7730
|
+
ms as VersionConfig,
|
|
7731
|
+
ve as Warehouse,
|
|
7732
|
+
ct as WebSocketConfig,
|
|
7733
|
+
ir as findCatalogItemByIdRecursive,
|
|
7734
|
+
nr as flattenCatalogItems,
|
|
7735
|
+
as as pluralize,
|
|
7627
7736
|
ke as useAuthStateStore,
|
|
7628
7737
|
k as useBaseConfigStateStore,
|
|
7629
|
-
|
|
7630
|
-
|
|
7738
|
+
_s as useReferencesStore,
|
|
7739
|
+
qs as useUserStateStore
|
|
7631
7740
|
};
|