@snabcentr/common-lib 1.65.2 → 1.67.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 +3 -3
- package/dist/sc-common-lib.js +1076 -1037
- 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/auth/index.d.ts +1 -0
- package/dist/src/auth/index.d.ts.map +1 -1
- package/dist/src/auth/states/auth-state-store.d.ts +50 -0
- package/dist/src/auth/states/auth-state-store.d.ts.map +1 -0
- package/dist/src/auth/states/index.d.ts +2 -0
- package/dist/src/auth/states/index.d.ts.map +1 -0
- package/dist/src/http/classes/http-requester.d.ts +36 -46
- package/dist/src/http/classes/http-requester.d.ts.map +1 -1
- package/dist/src/http/types/error-response-notification-handler.d.ts +4 -4
- package/dist/src/http/types/error-response-notification-handler.d.ts.map +1 -1
- package/dist/src/index.d.ts +0 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/references/index.d.ts +1 -0
- package/dist/src/references/index.d.ts.map +1 -1
- package/dist/src/references/states/index.d.ts +2 -0
- package/dist/src/references/states/index.d.ts.map +1 -0
- package/dist/src/{states/references-store.d.ts → references/states/references-state-store.d.ts} +18 -18
- package/dist/src/references/states/references-state-store.d.ts.map +1 -0
- package/dist/src/user/index.d.ts +1 -0
- package/dist/src/user/index.d.ts.map +1 -1
- package/dist/src/user/providers/user-auth-data-provider.d.ts +17 -0
- package/dist/src/user/providers/user-auth-data-provider.d.ts.map +1 -0
- package/dist/src/user/states/index.d.ts +2 -0
- package/dist/src/user/states/index.d.ts.map +1 -0
- package/dist/src/{states → user/states}/user-state-store.d.ts +5 -5
- package/dist/src/user/states/user-state-store.d.ts.map +1 -0
- package/package.json +2 -1
- package/dist/src/states/index.d.ts +0 -3
- package/dist/src/states/index.d.ts.map +0 -1
- package/dist/src/states/references-store.d.ts.map +0 -1
- package/dist/src/states/user-state-store.d.ts.map +0 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var t = (n, r, e) =>
|
|
4
|
-
import { jwtDecode as
|
|
5
|
-
import { merge as
|
|
6
|
-
import { objectToCamel as
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
1
|
+
var hr = Object.defineProperty;
|
|
2
|
+
var gr = (n, r, e) => r in n ? hr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
+
var t = (n, r, e) => gr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { jwtDecode as Ve } from "jwt-decode";
|
|
5
|
+
import { merge as Ee, isUndefined as mr, isNil as T, noop as C, toUpper as fr, constant as yr, isString as m, cloneDeep as wr, toLower as Cr, isFunction as Ie, isEmpty as Le, map as pe, forEach as vr, isDate as Pr, isArray as Je, omitBy as Rr, isObject as Ar } from "lodash-es";
|
|
6
|
+
import { objectToCamel as ke, objectToSnake as Ue } from "ts-case-convert";
|
|
7
|
+
import { defineStore as X } from "pinia";
|
|
8
|
+
import { ref as f, computed as v } from "vue";
|
|
9
|
+
import { parseISO as y, format as z, isAfter as ar, startOfToday as Ke, addSeconds as Dr, addBusinessDays as $r, endOfTomorrow as Tr, startOfTomorrow as br, endOfYesterday as _r, startOfYesterday as Sr, endOfToday as Ir, endOfDay as Lr, startOfDay as kr } from "date-fns";
|
|
10
|
+
import dr from "axios";
|
|
11
11
|
class ue {
|
|
12
12
|
/**
|
|
13
13
|
* Инициализирует экземпляр класса {@link JwtPayload}.
|
|
@@ -99,7 +99,7 @@ class ue {
|
|
|
99
99
|
* @inheritDoc
|
|
100
100
|
*/
|
|
101
101
|
t(this, "email", "");
|
|
102
|
-
|
|
102
|
+
Ee(this, r);
|
|
103
103
|
}
|
|
104
104
|
/**
|
|
105
105
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -107,10 +107,10 @@ class ue {
|
|
|
107
107
|
* @param jwtToken JWT-ключ доступа.
|
|
108
108
|
*/
|
|
109
109
|
static getJwtPayload(r) {
|
|
110
|
-
return new ue(
|
|
110
|
+
return new ue(ke(Ve(r)));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
class
|
|
113
|
+
class Dt extends ue {
|
|
114
114
|
/**
|
|
115
115
|
* Инициализирует экземпляр класса {@link DetailedJwtPayload}.
|
|
116
116
|
*
|
|
@@ -142,7 +142,7 @@ class At extends ue {
|
|
|
142
142
|
* @inheritDoc
|
|
143
143
|
*/
|
|
144
144
|
t(this, "address");
|
|
145
|
-
|
|
145
|
+
Ee(this, e);
|
|
146
146
|
}
|
|
147
147
|
/**
|
|
148
148
|
* Возвращает данные полезной нагрузки для указанного JWT-токена.
|
|
@@ -150,9 +150,93 @@ class At extends ue {
|
|
|
150
150
|
* @param jwtToken JWT-ключ доступа.
|
|
151
151
|
*/
|
|
152
152
|
static getJwtPayload(e) {
|
|
153
|
-
return new ue(
|
|
153
|
+
return new ue(ke(Ve(e)));
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
+
const W = class W {
|
|
157
|
+
/**
|
|
158
|
+
* Инициализирует и возвращает конфигурацию приложения.
|
|
159
|
+
*
|
|
160
|
+
* @param config Данные для первоначальной инициализации.
|
|
161
|
+
*/
|
|
162
|
+
static init(r) {
|
|
163
|
+
W.config = r;
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Возвращает текущую конфигурацию приложения.
|
|
167
|
+
*/
|
|
168
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
169
|
+
static getConfig() {
|
|
170
|
+
if (mr(W.config))
|
|
171
|
+
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
172
|
+
return W.config;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Выполняет загрузку конфигурации по указанному пути.
|
|
176
|
+
*
|
|
177
|
+
* @param path Путь к конфигурации.
|
|
178
|
+
*/
|
|
179
|
+
static loadRemoteConfig(r = "/config.json") {
|
|
180
|
+
const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
|
|
181
|
+
i({});
|
|
182
|
+
})));
|
|
183
|
+
return e.catch((s) => {
|
|
184
|
+
console.error(s);
|
|
185
|
+
}), e;
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Конфигурация приложения.
|
|
190
|
+
*/
|
|
191
|
+
t(W, "config");
|
|
192
|
+
let D = W;
|
|
193
|
+
const Pe = X("__auth_state_private", () => {
|
|
194
|
+
var e;
|
|
195
|
+
const n = f(Promise.resolve((e = D.getConfig().devMode) == null ? void 0 : e.initAuthBearerToken)), r = f(void 0);
|
|
196
|
+
return {
|
|
197
|
+
/**
|
|
198
|
+
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
199
|
+
*/
|
|
200
|
+
accessToken: n,
|
|
201
|
+
/**
|
|
202
|
+
* Функция для обновления ключа доступа к системам.
|
|
203
|
+
*/
|
|
204
|
+
accessTokenUpdater: r
|
|
205
|
+
};
|
|
206
|
+
}), Re = X("__auth_state", () => {
|
|
207
|
+
const n = v(() => {
|
|
208
|
+
const s = Pe();
|
|
209
|
+
if (T(s.accessToken) && !T(s.accessTokenUpdater)) {
|
|
210
|
+
const i = s.accessTokenUpdater();
|
|
211
|
+
s.accessToken = i, i.then((o) => {
|
|
212
|
+
s.accessToken = Promise.resolve(o);
|
|
213
|
+
}).catch(C);
|
|
214
|
+
}
|
|
215
|
+
return s.accessToken;
|
|
216
|
+
});
|
|
217
|
+
function r(s) {
|
|
218
|
+
Pe().accessTokenUpdater = s;
|
|
219
|
+
}
|
|
220
|
+
function e() {
|
|
221
|
+
Pe().accessToken = void 0;
|
|
222
|
+
}
|
|
223
|
+
return {
|
|
224
|
+
/**
|
|
225
|
+
* {@link Promise<string>} для получения ключа доступа к системам.
|
|
226
|
+
*/
|
|
227
|
+
accessToken: n,
|
|
228
|
+
/**
|
|
229
|
+
* Устанавливает механизм для обновления ключа доступа к системам.
|
|
230
|
+
*
|
|
231
|
+
* @param updater Механизм для обновления ключа доступа к системам.
|
|
232
|
+
*/
|
|
233
|
+
setAccessTokenUpdater: r,
|
|
234
|
+
/**
|
|
235
|
+
* Выполняет очистку ключа доступа к системам.
|
|
236
|
+
*/
|
|
237
|
+
invalidateAccessToken: e
|
|
238
|
+
};
|
|
239
|
+
});
|
|
156
240
|
class B {
|
|
157
241
|
/**
|
|
158
242
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
@@ -169,13 +253,13 @@ class B {
|
|
|
169
253
|
* @inheritDoc
|
|
170
254
|
*/
|
|
171
255
|
t(this, "guid");
|
|
172
|
-
this.id = r == null ? void 0 : r.id,
|
|
256
|
+
this.id = r == null ? void 0 : r.id, T(this.id) && (T(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) ?? "";
|
|
173
257
|
}
|
|
174
258
|
/**
|
|
175
259
|
* Возвращает признак, что это новая запись.
|
|
176
260
|
*/
|
|
177
261
|
isNewRec() {
|
|
178
|
-
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" :
|
|
262
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
|
|
179
263
|
}
|
|
180
264
|
}
|
|
181
265
|
class $ extends B {
|
|
@@ -193,7 +277,7 @@ class $ extends B {
|
|
|
193
277
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
194
278
|
}
|
|
195
279
|
}
|
|
196
|
-
class
|
|
280
|
+
class Qe extends $ {
|
|
197
281
|
/**
|
|
198
282
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
199
283
|
*
|
|
@@ -216,7 +300,7 @@ class Je extends $ {
|
|
|
216
300
|
this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
|
|
217
301
|
}
|
|
218
302
|
}
|
|
219
|
-
class
|
|
303
|
+
class be extends Qe {
|
|
220
304
|
/**
|
|
221
305
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
222
306
|
*
|
|
@@ -231,7 +315,7 @@ class $e extends Je {
|
|
|
231
315
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
232
316
|
}
|
|
233
317
|
}
|
|
234
|
-
class
|
|
318
|
+
class oe extends be {
|
|
235
319
|
/**
|
|
236
320
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
237
321
|
*
|
|
@@ -255,10 +339,10 @@ class ne extends $e {
|
|
|
255
339
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
256
340
|
*/
|
|
257
341
|
t(this, "currencyRates");
|
|
258
|
-
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [
|
|
342
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([s, i]) => [fr(s), i])) : void 0;
|
|
259
343
|
}
|
|
260
344
|
}
|
|
261
|
-
var
|
|
345
|
+
var Ye = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ye || {});
|
|
262
346
|
class w extends $ {
|
|
263
347
|
/**
|
|
264
348
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
@@ -283,10 +367,10 @@ class ye extends w {
|
|
|
283
367
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
284
368
|
*/
|
|
285
369
|
static getRetailPriceCoefficient() {
|
|
286
|
-
return { id: -2, slug:
|
|
370
|
+
return { id: -2, slug: Ye.Retail, name: "Розн. цена", guid: "", isNewRec: yr(!0) };
|
|
287
371
|
}
|
|
288
372
|
}
|
|
289
|
-
class
|
|
373
|
+
class de {
|
|
290
374
|
/**
|
|
291
375
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
292
376
|
*
|
|
@@ -316,7 +400,7 @@ class Le {
|
|
|
316
400
|
this.coefficient = new ye(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;
|
|
317
401
|
}
|
|
318
402
|
}
|
|
319
|
-
class
|
|
403
|
+
class Xe {
|
|
320
404
|
/**
|
|
321
405
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
322
406
|
*
|
|
@@ -365,7 +449,7 @@ class we extends w {
|
|
|
365
449
|
* Координаты склада.
|
|
366
450
|
*/
|
|
367
451
|
t(this, "coordinates");
|
|
368
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
452
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Xe(e == null ? void 0 : e.coordinates);
|
|
369
453
|
}
|
|
370
454
|
}
|
|
371
455
|
class xr {
|
|
@@ -386,44 +470,7 @@ class xr {
|
|
|
386
470
|
this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
387
471
|
}
|
|
388
472
|
}
|
|
389
|
-
|
|
390
|
-
/**
|
|
391
|
-
* Инициализирует и возвращает конфигурацию приложения.
|
|
392
|
-
*
|
|
393
|
-
* @param config Данные для первоначальной инициализации.
|
|
394
|
-
*/
|
|
395
|
-
static init(r) {
|
|
396
|
-
W.config = r;
|
|
397
|
-
}
|
|
398
|
-
/**
|
|
399
|
-
* Возвращает текущую конфигурацию приложения.
|
|
400
|
-
*/
|
|
401
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
402
|
-
static getConfig() {
|
|
403
|
-
if (mr(W.config))
|
|
404
|
-
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
405
|
-
return W.config;
|
|
406
|
-
}
|
|
407
|
-
/**
|
|
408
|
-
* Выполняет загрузку конфигурации по указанному пути.
|
|
409
|
-
*
|
|
410
|
-
* @param path Путь к конфигурации.
|
|
411
|
-
*/
|
|
412
|
-
static loadRemoteConfig(r = "/config.json") {
|
|
413
|
-
const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
|
|
414
|
-
i({});
|
|
415
|
-
})));
|
|
416
|
-
return e.catch((s) => {
|
|
417
|
-
console.error(s);
|
|
418
|
-
}), e;
|
|
419
|
-
}
|
|
420
|
-
};
|
|
421
|
-
/**
|
|
422
|
-
* Конфигурация приложения.
|
|
423
|
-
*/
|
|
424
|
-
t(W, "config");
|
|
425
|
-
let a = W;
|
|
426
|
-
class kr extends Je {
|
|
473
|
+
class Nr extends Qe {
|
|
427
474
|
/**
|
|
428
475
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
429
476
|
*
|
|
@@ -438,7 +485,7 @@ class kr extends Je {
|
|
|
438
485
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
439
486
|
}
|
|
440
487
|
}
|
|
441
|
-
class
|
|
488
|
+
class Or {
|
|
442
489
|
/**
|
|
443
490
|
* Инициализирует экземпляр класса {@link Image}.
|
|
444
491
|
*
|
|
@@ -461,14 +508,14 @@ class dr {
|
|
|
461
508
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
462
509
|
}
|
|
463
510
|
}
|
|
464
|
-
class
|
|
511
|
+
class _ extends Nr {
|
|
465
512
|
/**
|
|
466
513
|
* Инициализирует экземпляр класса {@link Product}.
|
|
467
514
|
*
|
|
468
515
|
* @param data Данные для первоначальной инициализации.
|
|
469
516
|
*/
|
|
470
517
|
constructor(e) {
|
|
471
|
-
var i, o, c,
|
|
518
|
+
var i, o, c, p;
|
|
472
519
|
super(e);
|
|
473
520
|
/**
|
|
474
521
|
* Артикул производителя/поставщика.
|
|
@@ -546,16 +593,16 @@ class b extends kr {
|
|
|
546
593
|
* Список коэффициентов цен на продукт.
|
|
547
594
|
*/
|
|
548
595
|
t(this, "priceCoefficients");
|
|
549
|
-
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate =
|
|
550
|
-
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
551
|
-
s && (this.category = new
|
|
596
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? y(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((u) => new xr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
597
|
+
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
|
|
598
|
+
s && (this.category = new be({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new be(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Or(u, D.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new de(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
552
599
|
}
|
|
553
600
|
/**
|
|
554
601
|
* Возвращает признак, что это измеряемый товар.
|
|
555
602
|
*/
|
|
556
603
|
getIsMeasurable() {
|
|
557
604
|
var s;
|
|
558
|
-
const e = (s =
|
|
605
|
+
const e = (s = D.getConfig().catalog) == null ? void 0 : s.products.units;
|
|
559
606
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
560
607
|
}
|
|
561
608
|
/**
|
|
@@ -571,7 +618,7 @@ class b extends kr {
|
|
|
571
618
|
return this.retailCostRub ?? this.costRub;
|
|
572
619
|
}
|
|
573
620
|
}
|
|
574
|
-
class
|
|
621
|
+
class qr extends B {
|
|
575
622
|
/**
|
|
576
623
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
577
624
|
*
|
|
@@ -623,10 +670,10 @@ class Nr extends B {
|
|
|
623
670
|
* Признак того, что позиция является дополнительной продажей.
|
|
624
671
|
*/
|
|
625
672
|
t(this, "isAdditionalSale");
|
|
626
|
-
this.product = new
|
|
673
|
+
this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new oe(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && wr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
627
674
|
}
|
|
628
675
|
}
|
|
629
|
-
class
|
|
676
|
+
class Ur extends qr {
|
|
630
677
|
/**
|
|
631
678
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
632
679
|
*
|
|
@@ -676,7 +723,7 @@ class Or extends Nr {
|
|
|
676
723
|
this.currency = e.currency, this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
|
|
677
724
|
}
|
|
678
725
|
}
|
|
679
|
-
class
|
|
726
|
+
class le {
|
|
680
727
|
/**
|
|
681
728
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
682
729
|
*
|
|
@@ -695,168 +742,7 @@ class ce {
|
|
|
695
742
|
* Список итоговых сумм по направлениям продаж.
|
|
696
743
|
*/
|
|
697
744
|
t(this, "directionsSum");
|
|
698
|
-
this.items = r.items.map((e) => new
|
|
699
|
-
}
|
|
700
|
-
}
|
|
701
|
-
class qr {
|
|
702
|
-
/**
|
|
703
|
-
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
704
|
-
*
|
|
705
|
-
* @param data Данные для первоначальной инициализации.
|
|
706
|
-
*/
|
|
707
|
-
constructor(r) {
|
|
708
|
-
/**
|
|
709
|
-
* Максимальное разрешение для распознания мобильного телефона.
|
|
710
|
-
*/
|
|
711
|
-
t(this, "phone");
|
|
712
|
-
/**
|
|
713
|
-
* Минимальное разрешение для распознания планшета.
|
|
714
|
-
*/
|
|
715
|
-
t(this, "tablet");
|
|
716
|
-
/**
|
|
717
|
-
* Минимальное разрешение для распознания компьютера.
|
|
718
|
-
*/
|
|
719
|
-
t(this, "laptop");
|
|
720
|
-
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;
|
|
721
|
-
}
|
|
722
|
-
}
|
|
723
|
-
class Ur {
|
|
724
|
-
/**
|
|
725
|
-
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
726
|
-
*
|
|
727
|
-
* @param data Данные для первоначальной инициализации.
|
|
728
|
-
*/
|
|
729
|
-
constructor(r) {
|
|
730
|
-
/**
|
|
731
|
-
* @inheritDoc
|
|
732
|
-
*/
|
|
733
|
-
t(this, "portalApiUrl");
|
|
734
|
-
/**
|
|
735
|
-
* @inheritDoc
|
|
736
|
-
*/
|
|
737
|
-
t(this, "mediaUrl");
|
|
738
|
-
/**
|
|
739
|
-
* @inheritDoc
|
|
740
|
-
*/
|
|
741
|
-
t(this, "responseDataCacheTimeout");
|
|
742
|
-
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;
|
|
743
|
-
}
|
|
744
|
-
}
|
|
745
|
-
class Gr {
|
|
746
|
-
/**
|
|
747
|
-
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
748
|
-
*
|
|
749
|
-
* @param data Данные для первоначальной инициализации.
|
|
750
|
-
*/
|
|
751
|
-
constructor(r) {
|
|
752
|
-
/**
|
|
753
|
-
* DSN подключения к Sentry.
|
|
754
|
-
*/
|
|
755
|
-
t(this, "dsn");
|
|
756
|
-
/**
|
|
757
|
-
* Тип окружения.
|
|
758
|
-
*/
|
|
759
|
-
t(this, "environment");
|
|
760
|
-
/**
|
|
761
|
-
* Список игнорируемых ошибок.
|
|
762
|
-
*/
|
|
763
|
-
t(this, "ignoreErrors");
|
|
764
|
-
/**
|
|
765
|
-
* Настройки трассировкии событий.
|
|
766
|
-
*/
|
|
767
|
-
t(this, "trace");
|
|
768
|
-
/**
|
|
769
|
-
* Настройки записей сеансов.
|
|
770
|
-
*/
|
|
771
|
-
t(this, "replay");
|
|
772
|
-
/**
|
|
773
|
-
* Дополнительные параметры.
|
|
774
|
-
*/
|
|
775
|
-
t(this, "additionalParams");
|
|
776
|
-
var e, s, i, o;
|
|
777
|
-
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) ?? [
|
|
778
|
-
/Network\s{1,3}Error/,
|
|
779
|
-
/Request\s{1,3}aborted/,
|
|
780
|
-
/Request\s{1,3}failed\s{1,3}with\s{1,3}status\s{1,3}code\s{1,3}(401|403|422)/
|
|
781
|
-
], this.trace = {
|
|
782
|
-
allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
|
|
783
|
-
sampleRate: ((s = r == null ? void 0 : r.trace) == null ? void 0 : s.sampleRate) ?? 0
|
|
784
|
-
}, this.replay = {
|
|
785
|
-
replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
|
|
786
|
-
replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
|
|
787
|
-
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
788
|
-
}
|
|
789
|
-
}
|
|
790
|
-
class Mr {
|
|
791
|
-
/**
|
|
792
|
-
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
793
|
-
*
|
|
794
|
-
* @param data Данные для первоначальной инициализации.
|
|
795
|
-
*/
|
|
796
|
-
constructor(r) {
|
|
797
|
-
/**
|
|
798
|
-
* Дата релиза текущей версии приложения.
|
|
799
|
-
*/
|
|
800
|
-
t(this, "date");
|
|
801
|
-
/**
|
|
802
|
-
* Название релиза.
|
|
803
|
-
*/
|
|
804
|
-
t(this, "name");
|
|
805
|
-
/**
|
|
806
|
-
* Текущая версия приложения.
|
|
807
|
-
*/
|
|
808
|
-
t(this, "version");
|
|
809
|
-
this.date = f(r == null ? void 0 : r.date) ? y(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";
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
class Dt {
|
|
813
|
-
/**
|
|
814
|
-
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
815
|
-
*
|
|
816
|
-
* @param data Данные для первоначальной инициализации.
|
|
817
|
-
*/
|
|
818
|
-
constructor(r) {
|
|
819
|
-
/**
|
|
820
|
-
* Тип окружения.
|
|
821
|
-
*/
|
|
822
|
-
t(this, "environment");
|
|
823
|
-
/**
|
|
824
|
-
* Параметры разработки и отладки.
|
|
825
|
-
*/
|
|
826
|
-
t(this, "devMode");
|
|
827
|
-
/**
|
|
828
|
-
* Параметры HTTP-запросов.
|
|
829
|
-
*/
|
|
830
|
-
t(this, "http");
|
|
831
|
-
/**
|
|
832
|
-
* Список условного отношения разрешения экрана и типа устройств.
|
|
833
|
-
*/
|
|
834
|
-
t(this, "deviceTypeByResolution");
|
|
835
|
-
/**
|
|
836
|
-
* Настройки системы журналирования ошибок Sentry.
|
|
837
|
-
*/
|
|
838
|
-
t(this, "sentry");
|
|
839
|
-
/**
|
|
840
|
-
* Список дополнительных URL-адресов.
|
|
841
|
-
*/
|
|
842
|
-
t(this, "urls");
|
|
843
|
-
/**
|
|
844
|
-
* Данные о текущем выпуске приложения.
|
|
845
|
-
*/
|
|
846
|
-
t(this, "version");
|
|
847
|
-
/**
|
|
848
|
-
* Форматы дат.
|
|
849
|
-
*/
|
|
850
|
-
t(this, "dateFormats");
|
|
851
|
-
var e, s, i;
|
|
852
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Ur(r == null ? void 0 : r.http), this.deviceTypeByResolution = new qr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Gr({
|
|
853
|
-
environment: this.environment,
|
|
854
|
-
...r == null ? void 0 : r.sentry
|
|
855
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new Mr(r == null ? void 0 : r.version), this.dateFormats = {
|
|
856
|
-
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
857
|
-
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
858
|
-
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
859
|
-
};
|
|
745
|
+
this.items = r.items.map((e) => new Ur(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
860
746
|
}
|
|
861
747
|
}
|
|
862
748
|
class xe {
|
|
@@ -878,7 +764,7 @@ class xe {
|
|
|
878
764
|
return new r(e);
|
|
879
765
|
}
|
|
880
766
|
}
|
|
881
|
-
const
|
|
767
|
+
const S = class S {
|
|
882
768
|
/**
|
|
883
769
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
884
770
|
*/
|
|
@@ -888,52 +774,36 @@ const _ = class _ {
|
|
|
888
774
|
*/
|
|
889
775
|
t(this, "httpClient");
|
|
890
776
|
/**
|
|
891
|
-
* Базовый
|
|
892
|
-
*
|
|
893
|
-
* Параметры:
|
|
894
|
-
* - error Данные об ошибке.
|
|
895
|
-
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
777
|
+
* Базовый URL путь для выполнения запросов.
|
|
896
778
|
*/
|
|
897
|
-
t(this, "
|
|
779
|
+
t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
|
|
898
780
|
/**
|
|
899
|
-
*
|
|
781
|
+
* Обработчик ошибок выполнения запросов текущего экземпляра класса.
|
|
782
|
+
*
|
|
783
|
+
* @param error Данные об ошибке.
|
|
784
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
785
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
900
786
|
*/
|
|
901
|
-
|
|
902
|
-
t(this, "getBaseUrl", () => `${a.getConfig().http.portalApiUrl}/api`);
|
|
787
|
+
t(this, "errorResponseHandler", C);
|
|
903
788
|
/**
|
|
904
|
-
*
|
|
789
|
+
* Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
|
|
905
790
|
*/
|
|
906
|
-
|
|
907
|
-
t(this, "getAccessToken", () => {
|
|
908
|
-
var s, i;
|
|
909
|
-
let r;
|
|
910
|
-
const e = a.getConfig();
|
|
911
|
-
return (s = e.devMode) != null && s.authBearerToken && (r = (i = e.devMode) == null ? void 0 : i.authBearerToken), Promise.resolve(r);
|
|
912
|
-
});
|
|
791
|
+
t(this, "interceptorIds", { request: {}, response: {} });
|
|
913
792
|
/**
|
|
914
|
-
*
|
|
793
|
+
* Перехватчик запроса для установки URL для выполнения запросов.
|
|
794
|
+
*
|
|
795
|
+
* @param request Данные запроса.
|
|
915
796
|
*/
|
|
916
|
-
t(this, "
|
|
797
|
+
t(this, "setBaseUrlRequestInterceptor", (r) => (r.baseURL = this.baseUrl, r));
|
|
917
798
|
/**
|
|
918
|
-
*
|
|
919
|
-
*
|
|
920
|
-
* @param error Данные об ошибке.
|
|
921
|
-
*/
|
|
922
|
-
t(this, "requestErrorHandler", m);
|
|
923
|
-
/**
|
|
924
|
-
* Перехватчик запроса для установки URL для выполнения запросов.
|
|
925
|
-
*
|
|
926
|
-
* @param request Данные запроса.
|
|
927
|
-
*/
|
|
928
|
-
t(this, "setBaseUrlRequestInterceptor", (r) => (r.baseURL = this.getBaseUrl(), r));
|
|
929
|
-
/**
|
|
930
|
-
* Перехватчик запроса для установки заголовков аутентификации.
|
|
799
|
+
* Перехватчик запроса для установки заголовков аутентификации.
|
|
931
800
|
*
|
|
932
801
|
* @param request Данные запроса.
|
|
933
802
|
*/
|
|
803
|
+
// eslint-disable-next-line class-methods-use-this
|
|
934
804
|
t(this, "authRequestInterceptor", async (r) => {
|
|
935
|
-
|
|
936
|
-
return e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
805
|
+
let e;
|
|
806
|
+
return T(Re().accessToken) || (e = await Re().accessToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
|
|
937
807
|
});
|
|
938
808
|
/**
|
|
939
809
|
* Перехватчик запроса для преобразования данных запроса.
|
|
@@ -941,7 +811,7 @@ const _ = class _ {
|
|
|
941
811
|
* @param request Данные запроса.
|
|
942
812
|
*/
|
|
943
813
|
// eslint-disable-next-line class-methods-use-this
|
|
944
|
-
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params =
|
|
814
|
+
t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ue(r.params)), ["put", "patch", "post"].includes(Cr(r.method)) && r.data && (r.data = Ue(r.data))), r));
|
|
945
815
|
/**
|
|
946
816
|
* Перехватчик ошибок ответов на запрос.
|
|
947
817
|
*
|
|
@@ -950,7 +820,7 @@ const _ = class _ {
|
|
|
950
820
|
t(this, "authErrorsResponseInterceptors", (r) => {
|
|
951
821
|
var s;
|
|
952
822
|
const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
|
|
953
|
-
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (
|
|
823
|
+
return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Re().invalidateAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
|
|
954
824
|
});
|
|
955
825
|
/**
|
|
956
826
|
* Перехватчик ответа для преобразования данных ответа на запрос.
|
|
@@ -958,27 +828,32 @@ const _ = class _ {
|
|
|
958
828
|
* @param response Данные ответа на запрос.
|
|
959
829
|
*/
|
|
960
830
|
// eslint-disable-next-line class-methods-use-this
|
|
961
|
-
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data =
|
|
962
|
-
const r =
|
|
963
|
-
this.
|
|
831
|
+
t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = ke(r.data)), r));
|
|
832
|
+
const r = D.getConfig().version;
|
|
833
|
+
this.errorResponseHandler = S.defaultErrorsResponseHandler, this.httpClient = dr.create({
|
|
964
834
|
headers: {
|
|
965
|
-
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date,
|
|
835
|
+
"APP-VERSION": `${r.name} (${r.version}, ${z(r.date, D.getConfig().dateFormats.uiDate)})`,
|
|
966
836
|
Accept: "application/json",
|
|
967
837
|
"Content-Type": "application/json"
|
|
968
838
|
}
|
|
969
|
-
}), this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.
|
|
839
|
+
}), this.interceptorIds.request.setBaseUrlRequestInterceptor = this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.authRequestInterceptor = this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.dataConverterRequestInterceptor = this.httpClient.interceptors.request.use(
|
|
840
|
+
this.dataConverterRequestInterceptor,
|
|
841
|
+
(e) => Promise.reject(e)
|
|
842
|
+
), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
843
|
+
(e) => e,
|
|
844
|
+
(e) => S.convertHttpErrorResponse(e)
|
|
845
|
+
), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
|
|
970
846
|
this.dataConverterResponseInterceptor,
|
|
971
|
-
|
|
972
|
-
(e) => _.convertHttpErrorResponse(e)
|
|
847
|
+
(e) => Promise.reject(e)
|
|
973
848
|
);
|
|
974
849
|
}
|
|
975
850
|
/**
|
|
976
|
-
* Устанавливает обработчик
|
|
851
|
+
* Устанавливает базовый обработчик ошибок выполнения запросов.
|
|
977
852
|
*
|
|
978
|
-
* @param handler Ссылка на функцию-обработчик
|
|
853
|
+
* @param handler Ссылка на функцию-обработчик ошибок.
|
|
979
854
|
*/
|
|
980
|
-
static
|
|
981
|
-
|
|
855
|
+
static setDefaultErrorsResponseHandler(r) {
|
|
856
|
+
S.defaultErrorsResponseHandler = r;
|
|
982
857
|
}
|
|
983
858
|
/**
|
|
984
859
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -986,7 +861,7 @@ const _ = class _ {
|
|
|
986
861
|
* @param type Тип данных, которыми оперирует метод.
|
|
987
862
|
*/
|
|
988
863
|
static getInstance(r) {
|
|
989
|
-
return Object.prototype.hasOwnProperty.call(
|
|
864
|
+
return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = xe.simpleInstanceInitializer(r)), S.instances[r.name];
|
|
990
865
|
}
|
|
991
866
|
/**
|
|
992
867
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -994,17 +869,20 @@ const _ = class _ {
|
|
|
994
869
|
* @param error Данные об ошибке.
|
|
995
870
|
*/
|
|
996
871
|
static convertHttpErrorResponse(r) {
|
|
997
|
-
var
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
872
|
+
var e, s;
|
|
873
|
+
if (!T(r.request) || !T(r.response)) {
|
|
874
|
+
const i = r == null ? void 0 : r.response;
|
|
875
|
+
return Promise.reject({
|
|
876
|
+
status: (i == null ? void 0 : i.status) ?? 0,
|
|
877
|
+
statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
|
|
878
|
+
message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
|
|
879
|
+
errors: (s = i == null ? void 0 : i.data) == null ? void 0 : s.errors,
|
|
880
|
+
headers: (i == null ? void 0 : i.headers) ?? {},
|
|
881
|
+
data: i == null ? void 0 : i.data,
|
|
882
|
+
rawError: r
|
|
883
|
+
});
|
|
884
|
+
}
|
|
885
|
+
return Promise.reject(r);
|
|
1008
886
|
}
|
|
1009
887
|
/**
|
|
1010
888
|
* Выполняет запрос с указанными параметрами.
|
|
@@ -1012,12 +890,12 @@ const _ = class _ {
|
|
|
1012
890
|
* @param config Параметры запроса.
|
|
1013
891
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1014
892
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1015
|
-
* @param
|
|
893
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1016
894
|
*/
|
|
1017
895
|
request(r, e = void 0, s = {}, i = !1) {
|
|
1018
896
|
const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
|
|
1019
|
-
return
|
|
1020
|
-
this.
|
|
897
|
+
return o.catch((c) => {
|
|
898
|
+
this.errorResponseHandler(c, s, i);
|
|
1021
899
|
}), o;
|
|
1022
900
|
}
|
|
1023
901
|
/**
|
|
@@ -1026,7 +904,7 @@ const _ = class _ {
|
|
|
1026
904
|
* @param url URL запроса.
|
|
1027
905
|
* @param params Параметры запроса.
|
|
1028
906
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1029
|
-
* @param
|
|
907
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1030
908
|
*/
|
|
1031
909
|
get(r, e = {}, s = void 0, i = !1) {
|
|
1032
910
|
return this.request({ method: "GET", url: r, params: e }, s, {}, i);
|
|
@@ -1037,7 +915,7 @@ const _ = class _ {
|
|
|
1037
915
|
* @param url URL запроса.
|
|
1038
916
|
* @param params Параметры запроса.
|
|
1039
917
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1040
|
-
* @param
|
|
918
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1041
919
|
*/
|
|
1042
920
|
getBlob(r, e = {}, s = void 0, i = !1) {
|
|
1043
921
|
return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, s, {}, i);
|
|
@@ -1049,7 +927,7 @@ const _ = class _ {
|
|
|
1049
927
|
* @param data Данные запроса.
|
|
1050
928
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1051
929
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1052
|
-
* @param
|
|
930
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1053
931
|
*/
|
|
1054
932
|
patch(r, e = {}, s = void 0, i = {}, o = !1) {
|
|
1055
933
|
return this.request({ method: "PATCH", url: r, data: e }, s, i, o);
|
|
@@ -1061,7 +939,7 @@ const _ = class _ {
|
|
|
1061
939
|
* @param data Данные запроса.
|
|
1062
940
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1063
941
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
1064
|
-
* @param
|
|
942
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1065
943
|
*/
|
|
1066
944
|
post(r, e = {}, s = void 0, i = {}, o = !1) {
|
|
1067
945
|
return this.request({ method: "POST", url: r, data: e }, s, i, o);
|
|
@@ -1071,7 +949,7 @@ const _ = class _ {
|
|
|
1071
949
|
*
|
|
1072
950
|
* @param url URL запроса.
|
|
1073
951
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
1074
|
-
* @param
|
|
952
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1075
953
|
*/
|
|
1076
954
|
delete(r, e = void 0, s = !1) {
|
|
1077
955
|
return this.request({ method: "DELETE", url: r }, e, {}, s);
|
|
@@ -1081,16 +959,16 @@ const _ = class _ {
|
|
|
1081
959
|
* Экземпляр объекта текущего класса.
|
|
1082
960
|
*/
|
|
1083
961
|
// eslint-disable-next-line no-use-before-define
|
|
1084
|
-
t(
|
|
1085
|
-
* Базовый обработчик
|
|
962
|
+
t(S, "instances", {}), /**
|
|
963
|
+
* Базовый обработчик ошибок выполнения запросов.
|
|
1086
964
|
*
|
|
1087
|
-
*
|
|
1088
|
-
*
|
|
1089
|
-
*
|
|
965
|
+
* @param error Данные об ошибке.
|
|
966
|
+
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
967
|
+
* @param disableNotifications Признак необходимости отключить уведомления об ошибках.
|
|
1090
968
|
*/
|
|
1091
|
-
t(
|
|
1092
|
-
let h =
|
|
1093
|
-
class
|
|
969
|
+
t(S, "defaultErrorsResponseHandler", C);
|
|
970
|
+
let h = S;
|
|
971
|
+
class $t extends h {
|
|
1094
972
|
/**
|
|
1095
973
|
* Возвращает содержимое корзины указанного клиента.
|
|
1096
974
|
*
|
|
@@ -1099,7 +977,7 @@ class at extends h {
|
|
|
1099
977
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
1100
978
|
*/
|
|
1101
979
|
getCart(r) {
|
|
1102
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
980
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new le(e.data));
|
|
1103
981
|
}
|
|
1104
982
|
/**
|
|
1105
983
|
* Удаляет всё содержимое корзины.
|
|
@@ -1137,7 +1015,7 @@ class at extends h {
|
|
|
1137
1015
|
isAdditionalSale: e.isAdditionalSale,
|
|
1138
1016
|
...e.configuratorParams
|
|
1139
1017
|
},
|
|
1140
|
-
(i) => new
|
|
1018
|
+
(i) => new le(i.data),
|
|
1141
1019
|
s
|
|
1142
1020
|
);
|
|
1143
1021
|
}
|
|
@@ -1167,7 +1045,7 @@ class at extends h {
|
|
|
1167
1045
|
isAdditionalSale: e.isAdditionalSale,
|
|
1168
1046
|
...e.configuratorParams
|
|
1169
1047
|
},
|
|
1170
|
-
(i) => new
|
|
1048
|
+
(i) => new le(i.data),
|
|
1171
1049
|
s
|
|
1172
1050
|
);
|
|
1173
1051
|
}
|
|
@@ -1190,11 +1068,11 @@ class at extends h {
|
|
|
1190
1068
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1191
1069
|
*/
|
|
1192
1070
|
addCartItemFromCSV(r) {
|
|
1193
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new
|
|
1071
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new le(e.data));
|
|
1194
1072
|
}
|
|
1195
1073
|
}
|
|
1196
|
-
var
|
|
1197
|
-
class
|
|
1074
|
+
var Gr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Gr || {}), Ne = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ne || {}), Mr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(Mr || {});
|
|
1075
|
+
class U extends oe {
|
|
1198
1076
|
/**
|
|
1199
1077
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1200
1078
|
*
|
|
@@ -1211,10 +1089,10 @@ class q extends ne {
|
|
|
1211
1089
|
* Список продуктов категории.
|
|
1212
1090
|
*/
|
|
1213
1091
|
t(this, "products");
|
|
1214
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1092
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new U(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
|
|
1215
1093
|
}
|
|
1216
1094
|
}
|
|
1217
|
-
class
|
|
1095
|
+
class Ze extends $ {
|
|
1218
1096
|
/**
|
|
1219
1097
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1220
1098
|
*
|
|
@@ -1226,10 +1104,10 @@ class Ye extends $ {
|
|
|
1226
1104
|
* Дата и время последнего изменения.
|
|
1227
1105
|
*/
|
|
1228
1106
|
t(this, "updatedAt");
|
|
1229
|
-
this.updatedAt =
|
|
1107
|
+
this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1230
1108
|
}
|
|
1231
1109
|
}
|
|
1232
|
-
class
|
|
1110
|
+
class Fr extends Ze {
|
|
1233
1111
|
/**
|
|
1234
1112
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1235
1113
|
*
|
|
@@ -1241,10 +1119,10 @@ class Hr extends Ye {
|
|
|
1241
1119
|
* Дата и время последнего удаления.
|
|
1242
1120
|
*/
|
|
1243
1121
|
t(this, "deletedAt");
|
|
1244
|
-
this.deletedAt =
|
|
1122
|
+
this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1245
1123
|
}
|
|
1246
1124
|
}
|
|
1247
|
-
class
|
|
1125
|
+
class Tt {
|
|
1248
1126
|
/**
|
|
1249
1127
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1250
1128
|
*
|
|
@@ -1255,7 +1133,7 @@ class $t {
|
|
|
1255
1133
|
if (e)
|
|
1256
1134
|
try {
|
|
1257
1135
|
const s = JSON.parse(e);
|
|
1258
|
-
if (
|
|
1136
|
+
if (ar(y(s.availableFor) || Ke(), /* @__PURE__ */ new Date()))
|
|
1259
1137
|
return s.data ?? {};
|
|
1260
1138
|
} catch {
|
|
1261
1139
|
localStorage.removeItem(r);
|
|
@@ -1293,7 +1171,7 @@ class G extends $ {
|
|
|
1293
1171
|
this.type = e == null ? void 0 : e.type;
|
|
1294
1172
|
}
|
|
1295
1173
|
}
|
|
1296
|
-
class
|
|
1174
|
+
class Br extends $ {
|
|
1297
1175
|
/**
|
|
1298
1176
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1299
1177
|
*
|
|
@@ -1329,10 +1207,10 @@ class zr extends $ {
|
|
|
1329
1207
|
* Дата и время удаления.
|
|
1330
1208
|
*/
|
|
1331
1209
|
t(this, "deletedAt");
|
|
1332
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt =
|
|
1210
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? y(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 G(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1333
1211
|
}
|
|
1334
1212
|
}
|
|
1335
|
-
class j extends
|
|
1213
|
+
class j extends Ze {
|
|
1336
1214
|
/**
|
|
1337
1215
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1338
1216
|
*
|
|
@@ -1348,10 +1226,10 @@ class j extends Ye {
|
|
|
1348
1226
|
* Дата и время создания шаблона.
|
|
1349
1227
|
*/
|
|
1350
1228
|
t(this, "createdAt");
|
|
1351
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt =
|
|
1229
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1352
1230
|
}
|
|
1353
1231
|
}
|
|
1354
|
-
class K extends
|
|
1232
|
+
class K extends _ {
|
|
1355
1233
|
/**
|
|
1356
1234
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1357
1235
|
*
|
|
@@ -1387,10 +1265,10 @@ class K extends b {
|
|
|
1387
1265
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1388
1266
|
*/
|
|
1389
1267
|
t(this, "isFavorite");
|
|
1390
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1268
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new Br(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new j(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;
|
|
1391
1269
|
}
|
|
1392
1270
|
}
|
|
1393
|
-
class
|
|
1271
|
+
class Hr {
|
|
1394
1272
|
/**
|
|
1395
1273
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1396
1274
|
*
|
|
@@ -1408,9 +1286,9 @@ class jr {
|
|
|
1408
1286
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1409
1287
|
}
|
|
1410
1288
|
}
|
|
1411
|
-
class
|
|
1289
|
+
class I extends w {
|
|
1412
1290
|
}
|
|
1413
|
-
class
|
|
1291
|
+
class te extends $ {
|
|
1414
1292
|
/**
|
|
1415
1293
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1416
1294
|
*
|
|
@@ -1421,7 +1299,7 @@ class re extends $ {
|
|
|
1421
1299
|
/**
|
|
1422
1300
|
* Направление продаж.
|
|
1423
1301
|
*/
|
|
1424
|
-
t(this, "salesDirection", new
|
|
1302
|
+
t(this, "salesDirection", new I());
|
|
1425
1303
|
/**
|
|
1426
1304
|
* URI путь к фотографии пользователя.
|
|
1427
1305
|
*/
|
|
@@ -1434,10 +1312,10 @@ class re extends $ {
|
|
|
1434
1312
|
* Признак того, что менеджер является основным для клиента.
|
|
1435
1313
|
*/
|
|
1436
1314
|
t(this, "isDefault");
|
|
1437
|
-
e && (this.salesDirection = new
|
|
1315
|
+
e && (this.salesDirection = new I(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Hr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1438
1316
|
}
|
|
1439
1317
|
}
|
|
1440
|
-
class Ce extends
|
|
1318
|
+
class Ce extends te {
|
|
1441
1319
|
/**
|
|
1442
1320
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1443
1321
|
*
|
|
@@ -1468,7 +1346,7 @@ class Ce extends re {
|
|
|
1468
1346
|
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;
|
|
1469
1347
|
}
|
|
1470
1348
|
}
|
|
1471
|
-
class
|
|
1349
|
+
class zr extends oe {
|
|
1472
1350
|
/**
|
|
1473
1351
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1474
1352
|
*
|
|
@@ -1499,7 +1377,7 @@ class Wr extends ne {
|
|
|
1499
1377
|
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;
|
|
1500
1378
|
}
|
|
1501
1379
|
}
|
|
1502
|
-
class
|
|
1380
|
+
class he extends zr {
|
|
1503
1381
|
/**
|
|
1504
1382
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1505
1383
|
*
|
|
@@ -1516,10 +1394,10 @@ class pe extends Wr {
|
|
|
1516
1394
|
* Список продуктов категории.
|
|
1517
1395
|
*/
|
|
1518
1396
|
t(this, "products");
|
|
1519
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1397
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new he(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
|
|
1520
1398
|
}
|
|
1521
1399
|
}
|
|
1522
|
-
class
|
|
1400
|
+
class er {
|
|
1523
1401
|
/**
|
|
1524
1402
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1525
1403
|
*
|
|
@@ -1537,7 +1415,7 @@ class Xe {
|
|
|
1537
1415
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ye(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1538
1416
|
}
|
|
1539
1417
|
}
|
|
1540
|
-
class
|
|
1418
|
+
class Ae extends er {
|
|
1541
1419
|
/**
|
|
1542
1420
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1543
1421
|
*
|
|
@@ -1549,12 +1427,12 @@ class Pe extends Xe {
|
|
|
1549
1427
|
* Базовые данные о продукте.
|
|
1550
1428
|
*/
|
|
1551
1429
|
t(this, "productCategory");
|
|
1552
|
-
this.productCategory = new
|
|
1430
|
+
this.productCategory = new oe(e == null ? void 0 : e.productCategory);
|
|
1553
1431
|
}
|
|
1554
1432
|
}
|
|
1555
1433
|
class Q extends w {
|
|
1556
1434
|
}
|
|
1557
|
-
class
|
|
1435
|
+
class se extends w {
|
|
1558
1436
|
/**
|
|
1559
1437
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1560
1438
|
*
|
|
@@ -1569,7 +1447,7 @@ class te extends w {
|
|
|
1569
1447
|
e && (this.country = new Q(e.country));
|
|
1570
1448
|
}
|
|
1571
1449
|
}
|
|
1572
|
-
class
|
|
1450
|
+
class Oe extends w {
|
|
1573
1451
|
/**
|
|
1574
1452
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1575
1453
|
*
|
|
@@ -1580,11 +1458,11 @@ class de extends w {
|
|
|
1580
1458
|
/**
|
|
1581
1459
|
* Данные о регионе, в котором расположен город.
|
|
1582
1460
|
*/
|
|
1583
|
-
t(this, "region", new
|
|
1584
|
-
e && (this.region = new
|
|
1461
|
+
t(this, "region", new se());
|
|
1462
|
+
e && (this.region = new se(e.region));
|
|
1585
1463
|
}
|
|
1586
1464
|
}
|
|
1587
|
-
class
|
|
1465
|
+
class rr extends $ {
|
|
1588
1466
|
/**
|
|
1589
1467
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1590
1468
|
*
|
|
@@ -1620,10 +1498,10 @@ class Ze extends $ {
|
|
|
1620
1498
|
* Признак активности учетной записи пользователя.
|
|
1621
1499
|
*/
|
|
1622
1500
|
t(this, "isActive");
|
|
1623
|
-
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
|
|
1501
|
+
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 I(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? y(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1624
1502
|
}
|
|
1625
1503
|
}
|
|
1626
|
-
class
|
|
1504
|
+
class ce extends rr {
|
|
1627
1505
|
/**
|
|
1628
1506
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1629
1507
|
*
|
|
@@ -1665,10 +1543,10 @@ class oe extends Ze {
|
|
|
1665
1543
|
* Список менеджеров клиента.
|
|
1666
1544
|
*/
|
|
1667
1545
|
t(this, "managers");
|
|
1668
|
-
this.salesDirection = new
|
|
1546
|
+
this.salesDirection = new I(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 Oe(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new te(i))) ?? [];
|
|
1669
1547
|
}
|
|
1670
1548
|
}
|
|
1671
|
-
class
|
|
1549
|
+
class Z extends B {
|
|
1672
1550
|
/**
|
|
1673
1551
|
* Инициализирует новый экземпляр класса.
|
|
1674
1552
|
*
|
|
@@ -1692,10 +1570,10 @@ class X extends B {
|
|
|
1692
1570
|
* Данные шаблона прайс-листа.
|
|
1693
1571
|
*/
|
|
1694
1572
|
t(this, "priceTemplate");
|
|
1695
|
-
this.createdAt =
|
|
1573
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ce(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
|
|
1696
1574
|
}
|
|
1697
1575
|
}
|
|
1698
|
-
class
|
|
1576
|
+
class ae extends er {
|
|
1699
1577
|
/**
|
|
1700
1578
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1701
1579
|
*
|
|
@@ -1707,12 +1585,12 @@ class Re extends Xe {
|
|
|
1707
1585
|
* Базовые данные о продукте.
|
|
1708
1586
|
*/
|
|
1709
1587
|
t(this, "product");
|
|
1710
|
-
this.product = new
|
|
1588
|
+
this.product = new _(e == null ? void 0 : e.product);
|
|
1711
1589
|
}
|
|
1712
1590
|
}
|
|
1713
|
-
class
|
|
1591
|
+
class tr extends w {
|
|
1714
1592
|
}
|
|
1715
|
-
class
|
|
1593
|
+
class ee extends $ {
|
|
1716
1594
|
/**
|
|
1717
1595
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1718
1596
|
*
|
|
@@ -1732,7 +1610,7 @@ class Z extends $ {
|
|
|
1732
1610
|
* Дополнительные метаданные свойства.
|
|
1733
1611
|
*/
|
|
1734
1612
|
t(this, "metadata");
|
|
1735
|
-
this.type = new
|
|
1613
|
+
this.type = new tr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1736
1614
|
}
|
|
1737
1615
|
}
|
|
1738
1616
|
class H {
|
|
@@ -1751,10 +1629,10 @@ class H {
|
|
|
1751
1629
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1752
1630
|
*/
|
|
1753
1631
|
t(this, "value");
|
|
1754
|
-
this.property = new
|
|
1632
|
+
this.property = new ee(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1755
1633
|
}
|
|
1756
1634
|
}
|
|
1757
|
-
class
|
|
1635
|
+
class O {
|
|
1758
1636
|
/**
|
|
1759
1637
|
* Инициализирует экземпляр класса {@link DatePeriod}.
|
|
1760
1638
|
*
|
|
@@ -1769,10 +1647,10 @@ class N {
|
|
|
1769
1647
|
* Окончание периода.
|
|
1770
1648
|
*/
|
|
1771
1649
|
t(this, "to");
|
|
1772
|
-
this.from =
|
|
1650
|
+
this.from = m(r == null ? void 0 : r.from) ? y(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? y(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1773
1651
|
}
|
|
1774
1652
|
}
|
|
1775
|
-
class
|
|
1653
|
+
class bt {
|
|
1776
1654
|
/**
|
|
1777
1655
|
* Инициализирует экземпляр класса {@link TemplatesListFilters}.
|
|
1778
1656
|
*
|
|
@@ -1794,12 +1672,12 @@ class Tt {
|
|
|
1794
1672
|
/**
|
|
1795
1673
|
* Период создания.
|
|
1796
1674
|
*/
|
|
1797
|
-
t(this, "createdAt", new
|
|
1675
|
+
t(this, "createdAt", new O());
|
|
1798
1676
|
/**
|
|
1799
1677
|
* Период изменения.
|
|
1800
1678
|
*/
|
|
1801
|
-
t(this, "updatedAt", new
|
|
1802
|
-
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
|
|
1679
|
+
t(this, "updatedAt", new O());
|
|
1680
|
+
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 O(r == null ? void 0 : r.createdAt), this.updatedAt = new O(r == null ? void 0 : r.updatedAt);
|
|
1803
1681
|
}
|
|
1804
1682
|
/**
|
|
1805
1683
|
* Выполняет сброс указанного фильтра в значение по умолчанию.
|
|
@@ -1830,21 +1708,21 @@ class Tt {
|
|
|
1830
1708
|
var e, s, i, o;
|
|
1831
1709
|
const r = {};
|
|
1832
1710
|
return Object.keys(this).forEach((c) => {
|
|
1833
|
-
const
|
|
1711
|
+
const p = this[c];
|
|
1834
1712
|
// eslint-disable-next-line prettier/prettier
|
|
1835
|
-
|
|
1713
|
+
T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
1836
1714
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
|
|
1837
1715
|
}
|
|
1838
1716
|
}
|
|
1839
|
-
class
|
|
1717
|
+
class jr extends w {
|
|
1840
1718
|
}
|
|
1841
|
-
class
|
|
1719
|
+
class sr extends w {
|
|
1842
1720
|
}
|
|
1843
|
-
class
|
|
1721
|
+
class _t extends w {
|
|
1844
1722
|
}
|
|
1845
|
-
class
|
|
1723
|
+
class Wr extends w {
|
|
1846
1724
|
}
|
|
1847
|
-
class
|
|
1725
|
+
class ge extends $ {
|
|
1848
1726
|
/**
|
|
1849
1727
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1850
1728
|
*
|
|
@@ -1863,7 +1741,7 @@ class he extends $ {
|
|
|
1863
1741
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
1864
1742
|
}
|
|
1865
1743
|
}
|
|
1866
|
-
var
|
|
1744
|
+
var b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
|
|
1867
1745
|
class M extends w {
|
|
1868
1746
|
/**
|
|
1869
1747
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
@@ -1872,26 +1750,26 @@ class M extends w {
|
|
|
1872
1750
|
return new M({
|
|
1873
1751
|
id: 1,
|
|
1874
1752
|
guid: "",
|
|
1875
|
-
slug:
|
|
1753
|
+
slug: b.Person,
|
|
1876
1754
|
name: ""
|
|
1877
1755
|
});
|
|
1878
1756
|
}
|
|
1879
1757
|
}
|
|
1880
|
-
class
|
|
1758
|
+
class Vr extends w {
|
|
1881
1759
|
}
|
|
1882
|
-
class
|
|
1760
|
+
class Er extends w {
|
|
1883
1761
|
}
|
|
1884
1762
|
class Y extends w {
|
|
1885
1763
|
}
|
|
1886
|
-
class
|
|
1764
|
+
class Jr extends w {
|
|
1887
1765
|
}
|
|
1888
|
-
class
|
|
1766
|
+
class Kr extends w {
|
|
1889
1767
|
}
|
|
1890
|
-
class
|
|
1768
|
+
class ir extends w {
|
|
1891
1769
|
}
|
|
1892
|
-
class
|
|
1770
|
+
class nr extends w {
|
|
1893
1771
|
}
|
|
1894
|
-
const
|
|
1772
|
+
const V = class V extends h {
|
|
1895
1773
|
/**
|
|
1896
1774
|
* Инициализирует экземпляр класса {@link HttpCachedRequester}.
|
|
1897
1775
|
*/
|
|
@@ -1901,7 +1779,7 @@ const E = class E extends h {
|
|
|
1901
1779
|
* Время кэширования данных ответов на запросы (секунд).
|
|
1902
1780
|
*/
|
|
1903
1781
|
t(this, "responseDataCacheTimeout");
|
|
1904
|
-
this.responseDataCacheTimeout =
|
|
1782
|
+
this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
|
|
1905
1783
|
}
|
|
1906
1784
|
/**
|
|
1907
1785
|
* Возвращает кэшированные данные.
|
|
@@ -1911,7 +1789,7 @@ const E = class E extends h {
|
|
|
1911
1789
|
*/
|
|
1912
1790
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
1913
1791
|
static getCachedResponse(e) {
|
|
1914
|
-
const s =
|
|
1792
|
+
const s = V.responseDataCache.get(e);
|
|
1915
1793
|
if (s && s.validTo > /* @__PURE__ */ new Date())
|
|
1916
1794
|
return s.val;
|
|
1917
1795
|
}
|
|
@@ -1922,8 +1800,8 @@ const E = class E extends h {
|
|
|
1922
1800
|
* @param data Данные для кэширования.
|
|
1923
1801
|
*/
|
|
1924
1802
|
cacheResponse(e, s) {
|
|
1925
|
-
|
|
1926
|
-
validTo:
|
|
1803
|
+
V.responseDataCache.set(e, {
|
|
1804
|
+
validTo: Dr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
1927
1805
|
val: s
|
|
1928
1806
|
});
|
|
1929
1807
|
}
|
|
@@ -1938,9 +1816,9 @@ const E = class E extends h {
|
|
|
1938
1816
|
*/
|
|
1939
1817
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
1940
1818
|
getTypedDataArrayRequester(e, s, i = !1, o = {}) {
|
|
1941
|
-
const c = s + (
|
|
1942
|
-
return
|
|
1943
|
-
const R =
|
|
1819
|
+
const c = s + (Le(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
|
|
1820
|
+
return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
|
|
1821
|
+
const R = u.map((a) => xe.instanceInitializer(e, a));
|
|
1944
1822
|
return i && R && this.cacheResponse(s, R), R;
|
|
1945
1823
|
});
|
|
1946
1824
|
}
|
|
@@ -1948,9 +1826,9 @@ const E = class E extends h {
|
|
|
1948
1826
|
/**
|
|
1949
1827
|
* Кэш результатов запросов.
|
|
1950
1828
|
*/
|
|
1951
|
-
t(
|
|
1952
|
-
let
|
|
1953
|
-
class A extends
|
|
1829
|
+
t(V, "responseDataCache", /* @__PURE__ */ new Map());
|
|
1830
|
+
let ie = V;
|
|
1831
|
+
class A extends ie {
|
|
1954
1832
|
/**
|
|
1955
1833
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
1956
1834
|
*
|
|
@@ -1959,26 +1837,26 @@ class A extends se {
|
|
|
1959
1837
|
* и использовать в случае аналогичных запросов.
|
|
1960
1838
|
*/
|
|
1961
1839
|
getReference(r, e = !1) {
|
|
1962
|
-
return this.getTypedDataArrayRequester(
|
|
1840
|
+
return this.getTypedDataArrayRequester(jr, `/internal/references/${r}`, e);
|
|
1963
1841
|
}
|
|
1964
1842
|
/**
|
|
1965
1843
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
1966
1844
|
* первичного интереса.
|
|
1967
1845
|
*/
|
|
1968
1846
|
getChannelPrimaryInterest() {
|
|
1969
|
-
return this.getTypedDataArrayRequester(
|
|
1847
|
+
return this.getTypedDataArrayRequester(sr, "/internal/references/channel-primary-interest", !0);
|
|
1970
1848
|
}
|
|
1971
1849
|
/**
|
|
1972
1850
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1973
1851
|
*/
|
|
1974
1852
|
getContactPositions() {
|
|
1975
|
-
return this.getTypedDataArrayRequester(
|
|
1853
|
+
return this.getTypedDataArrayRequester(Wr, "/internal/references/contact-position", !0);
|
|
1976
1854
|
}
|
|
1977
1855
|
/**
|
|
1978
1856
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
1979
1857
|
*/
|
|
1980
1858
|
getCurrency() {
|
|
1981
|
-
return this.getTypedDataArrayRequester(
|
|
1859
|
+
return this.getTypedDataArrayRequester(ge, "/public/references/currency", !0);
|
|
1982
1860
|
}
|
|
1983
1861
|
/**
|
|
1984
1862
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -1997,37 +1875,37 @@ class A extends se {
|
|
|
1997
1875
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1998
1876
|
*/
|
|
1999
1877
|
getOrderPaymentStatuses() {
|
|
2000
|
-
return this.getTypedDataArrayRequester(
|
|
1878
|
+
return this.getTypedDataArrayRequester(Vr, "/public/references/order-payment-status", !0);
|
|
2001
1879
|
}
|
|
2002
1880
|
/**
|
|
2003
1881
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
2004
1882
|
*/
|
|
2005
1883
|
getOrderStatuses() {
|
|
2006
|
-
return this.getTypedDataArrayRequester(
|
|
1884
|
+
return this.getTypedDataArrayRequester(Er, "/public/references/order-status", !0);
|
|
2007
1885
|
}
|
|
2008
1886
|
/**
|
|
2009
1887
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
2010
1888
|
*/
|
|
2011
1889
|
getPaymentTypes() {
|
|
2012
|
-
return this.getTypedDataArrayRequester(
|
|
1890
|
+
return this.getTypedDataArrayRequester(Jr, "/public/references/payment-type", !0);
|
|
2013
1891
|
}
|
|
2014
1892
|
/**
|
|
2015
1893
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
2016
1894
|
*/
|
|
2017
1895
|
getResourceTypes() {
|
|
2018
|
-
return this.getTypedDataArrayRequester(
|
|
1896
|
+
return this.getTypedDataArrayRequester(ir, "/internal/references/resource-type", !0);
|
|
2019
1897
|
}
|
|
2020
1898
|
/**
|
|
2021
1899
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
2022
1900
|
*/
|
|
2023
1901
|
getSalesDirections() {
|
|
2024
|
-
return this.getTypedDataArrayRequester(
|
|
1902
|
+
return this.getTypedDataArrayRequester(I, "/public/references/sales-direction", !0);
|
|
2025
1903
|
}
|
|
2026
1904
|
/**
|
|
2027
1905
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
2028
1906
|
*/
|
|
2029
1907
|
getSourcePrimaryInterest() {
|
|
2030
|
-
return this.getTypedDataArrayRequester(
|
|
1908
|
+
return this.getTypedDataArrayRequester(nr, "/internal/references/source-primary-interest", !0);
|
|
2031
1909
|
}
|
|
2032
1910
|
/**
|
|
2033
1911
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -2035,7 +1913,7 @@ class A extends se {
|
|
|
2035
1913
|
* @param term Терм поиска.
|
|
2036
1914
|
*/
|
|
2037
1915
|
searchCity(r) {
|
|
2038
|
-
return this.getTypedDataArrayRequester(
|
|
1916
|
+
return this.getTypedDataArrayRequester(Oe, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
2039
1917
|
}
|
|
2040
1918
|
/**
|
|
2041
1919
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -2043,7 +1921,7 @@ class A extends se {
|
|
|
2043
1921
|
* @param term Терм поиска.
|
|
2044
1922
|
*/
|
|
2045
1923
|
searchRegion(r) {
|
|
2046
|
-
return this.getTypedDataArrayRequester(
|
|
1924
|
+
return this.getTypedDataArrayRequester(se, `/internal/references/region-with-country/search?term=${r}`);
|
|
2047
1925
|
}
|
|
2048
1926
|
/**
|
|
2049
1927
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -2069,7 +1947,7 @@ class A extends se {
|
|
|
2069
1947
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
2070
1948
|
*/
|
|
2071
1949
|
getPropertyTypes() {
|
|
2072
|
-
return this.getTypedDataArrayRequester(
|
|
1950
|
+
return this.getTypedDataArrayRequester(tr, "/internal/references/property-type", !0);
|
|
2073
1951
|
}
|
|
2074
1952
|
/**
|
|
2075
1953
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -2081,11 +1959,257 @@ class A extends se {
|
|
|
2081
1959
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
2082
1960
|
*/
|
|
2083
1961
|
getProductFileType() {
|
|
2084
|
-
return this.getTypedDataArrayRequester(
|
|
1962
|
+
return this.getTypedDataArrayRequester(Kr, "/public/references/product-file-type", !0);
|
|
2085
1963
|
}
|
|
2086
1964
|
}
|
|
2087
|
-
|
|
2088
|
-
|
|
1965
|
+
class Qr extends ie {
|
|
1966
|
+
/**
|
|
1967
|
+
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
1968
|
+
*/
|
|
1969
|
+
async getManagers() {
|
|
1970
|
+
const r = "/internal/managers", e = ie.getCachedResponse(r);
|
|
1971
|
+
if (e)
|
|
1972
|
+
return e;
|
|
1973
|
+
const i = (await this.get(r)).data.map((o) => xe.instanceInitializer(Ce, o));
|
|
1974
|
+
return this.cacheResponse(r, i), i;
|
|
1975
|
+
}
|
|
1976
|
+
}
|
|
1977
|
+
const P = X("__references_private", () => {
|
|
1978
|
+
const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), R = f(void 0), a = f(void 0), L = f(void 0), k = f(void 0), d = f(void 0), x = f(void 0), N = f(void 0), q = f(void 0), l = f(void 0);
|
|
1979
|
+
return {
|
|
1980
|
+
/**
|
|
1981
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
1982
|
+
*/
|
|
1983
|
+
dataLoaderList: n,
|
|
1984
|
+
/**
|
|
1985
|
+
* Справочник каналов первичного интереса.
|
|
1986
|
+
*/
|
|
1987
|
+
channelPrimaryInterestReference: r,
|
|
1988
|
+
/**
|
|
1989
|
+
* Справочник должностей контактных лиц.
|
|
1990
|
+
*/
|
|
1991
|
+
contactPositionsReference: e,
|
|
1992
|
+
/**
|
|
1993
|
+
* Справочник валют.
|
|
1994
|
+
*/
|
|
1995
|
+
currencyReference: s,
|
|
1996
|
+
/**
|
|
1997
|
+
* Справочник типов доставки.
|
|
1998
|
+
*/
|
|
1999
|
+
deliveryTypeReference: i,
|
|
2000
|
+
/**
|
|
2001
|
+
* Список менеджеров.
|
|
2002
|
+
*/
|
|
2003
|
+
managersList: o,
|
|
2004
|
+
/**
|
|
2005
|
+
* Справочник организационно-правовых форм.
|
|
2006
|
+
*/
|
|
2007
|
+
opfReference: c,
|
|
2008
|
+
/**
|
|
2009
|
+
* Справочник статусов оплаты заказа.
|
|
2010
|
+
*/
|
|
2011
|
+
orderPaymentStatusReference: p,
|
|
2012
|
+
/**
|
|
2013
|
+
* Справочник статусов заказов.
|
|
2014
|
+
*/
|
|
2015
|
+
orderStatusReference: u,
|
|
2016
|
+
/**
|
|
2017
|
+
* Справочник типов оплаты заказов.
|
|
2018
|
+
*/
|
|
2019
|
+
paymentTypeReference: R,
|
|
2020
|
+
/**
|
|
2021
|
+
* Справочник групп партнеров.
|
|
2022
|
+
*/
|
|
2023
|
+
partnerGroupReference: a,
|
|
2024
|
+
/**
|
|
2025
|
+
* Справочник типов файлов продукктов/категорий.
|
|
2026
|
+
*/
|
|
2027
|
+
productFileTypeReference: L,
|
|
2028
|
+
/**
|
|
2029
|
+
* Справочник типов ресурсов.
|
|
2030
|
+
*/
|
|
2031
|
+
resourceTypesReference: k,
|
|
2032
|
+
/**
|
|
2033
|
+
* Справочник направлений продаж.
|
|
2034
|
+
*/
|
|
2035
|
+
salesDirectionsReference: d,
|
|
2036
|
+
/**
|
|
2037
|
+
* Справочник источников первичного интереса.
|
|
2038
|
+
*/
|
|
2039
|
+
sourcePrimaryInterestReference: x,
|
|
2040
|
+
/**
|
|
2041
|
+
* Справочник складов.
|
|
2042
|
+
*/
|
|
2043
|
+
warehousesReference: N,
|
|
2044
|
+
/**
|
|
2045
|
+
* Справочник типов свойств.
|
|
2046
|
+
*/
|
|
2047
|
+
propertyTypesReference: q,
|
|
2048
|
+
/**
|
|
2049
|
+
* Справочник коэффициентов цен.
|
|
2050
|
+
*/
|
|
2051
|
+
priceCoefficientsReference: l
|
|
2052
|
+
};
|
|
2053
|
+
}), St = X("references", () => {
|
|
2054
|
+
const n = v(() => {
|
|
2055
|
+
const l = P();
|
|
2056
|
+
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
|
|
2057
|
+
l.channelPrimaryInterestReference = g;
|
|
2058
|
+
}).catch(C)), l.channelPrimaryInterestReference;
|
|
2059
|
+
}), r = v(() => {
|
|
2060
|
+
const l = P();
|
|
2061
|
+
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
|
|
2062
|
+
l.contactPositionsReference = g;
|
|
2063
|
+
}).catch(C)), l.contactPositionsReference;
|
|
2064
|
+
}), e = v(() => {
|
|
2065
|
+
const l = P();
|
|
2066
|
+
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
|
|
2067
|
+
l.currencyReference = g;
|
|
2068
|
+
}).catch(C)), l.currencyReference;
|
|
2069
|
+
}), s = v(() => {
|
|
2070
|
+
const l = P();
|
|
2071
|
+
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
|
|
2072
|
+
l.opfReference = g;
|
|
2073
|
+
}).catch(C)), l.opfReference;
|
|
2074
|
+
}), i = v(() => {
|
|
2075
|
+
const l = P();
|
|
2076
|
+
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
|
|
2077
|
+
l.orderPaymentStatusReference = g;
|
|
2078
|
+
}).catch(C)), l.orderPaymentStatusReference;
|
|
2079
|
+
}), o = v(() => {
|
|
2080
|
+
const l = P();
|
|
2081
|
+
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
|
|
2082
|
+
l.orderStatusReference = g;
|
|
2083
|
+
}).catch(C)), l.orderStatusReference;
|
|
2084
|
+
}), c = v(() => {
|
|
2085
|
+
const l = P();
|
|
2086
|
+
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
|
|
2087
|
+
l.paymentTypeReference = g;
|
|
2088
|
+
}).catch(C)), l.paymentTypeReference;
|
|
2089
|
+
}), p = v(() => {
|
|
2090
|
+
const l = P();
|
|
2091
|
+
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
|
|
2092
|
+
l.partnerGroupReference = g;
|
|
2093
|
+
}).catch(C)), l.partnerGroupReference;
|
|
2094
|
+
}), u = v(() => {
|
|
2095
|
+
const l = P();
|
|
2096
|
+
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
|
|
2097
|
+
l.productFileTypeReference = g;
|
|
2098
|
+
}).catch(C)), l.productFileTypeReference;
|
|
2099
|
+
}), R = v(() => {
|
|
2100
|
+
const l = P();
|
|
2101
|
+
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
|
|
2102
|
+
l.resourceTypesReference = g;
|
|
2103
|
+
}).catch(C)), l.resourceTypesReference;
|
|
2104
|
+
}), a = v(() => {
|
|
2105
|
+
const l = P();
|
|
2106
|
+
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
|
|
2107
|
+
l.salesDirectionsReference = g;
|
|
2108
|
+
}).catch(C)), l.salesDirectionsReference;
|
|
2109
|
+
}), L = v(() => {
|
|
2110
|
+
const l = P();
|
|
2111
|
+
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
|
|
2112
|
+
l.sourcePrimaryInterestReference = g;
|
|
2113
|
+
}).catch(C)), l.sourcePrimaryInterestReference;
|
|
2114
|
+
}), k = v(() => {
|
|
2115
|
+
const l = P();
|
|
2116
|
+
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
|
|
2117
|
+
l.deliveryTypeReference = g;
|
|
2118
|
+
}).catch(C)), l.deliveryTypeReference;
|
|
2119
|
+
}), d = v(() => {
|
|
2120
|
+
const l = P();
|
|
2121
|
+
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Qr).getManagers().then((g) => {
|
|
2122
|
+
l.managersList = g;
|
|
2123
|
+
}).catch(C)), l.managersList;
|
|
2124
|
+
}), x = v(() => {
|
|
2125
|
+
const l = P();
|
|
2126
|
+
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
|
|
2127
|
+
l.warehousesReference = g;
|
|
2128
|
+
}).catch(C)), l.warehousesReference;
|
|
2129
|
+
}), N = v(() => {
|
|
2130
|
+
const l = P();
|
|
2131
|
+
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
|
|
2132
|
+
l.propertyTypesReference = g;
|
|
2133
|
+
}).catch(C)), l.propertyTypesReference;
|
|
2134
|
+
}), q = v(() => {
|
|
2135
|
+
const l = P();
|
|
2136
|
+
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
|
|
2137
|
+
l.priceCoefficientsReference = g;
|
|
2138
|
+
}).catch(C)), l.priceCoefficientsReference;
|
|
2139
|
+
});
|
|
2140
|
+
return {
|
|
2141
|
+
/**
|
|
2142
|
+
* Справочник каналов первичного интереса.
|
|
2143
|
+
*/
|
|
2144
|
+
channelPrimaryInterestsReference: n,
|
|
2145
|
+
/**
|
|
2146
|
+
* Справочник должностей контактных лиц.
|
|
2147
|
+
*/
|
|
2148
|
+
contactPositionsReference: r,
|
|
2149
|
+
/**
|
|
2150
|
+
* Справочник валют.
|
|
2151
|
+
*/
|
|
2152
|
+
currencyReference: e,
|
|
2153
|
+
/**
|
|
2154
|
+
* Справочник организационно-правовых форм.
|
|
2155
|
+
*/
|
|
2156
|
+
opfReference: s,
|
|
2157
|
+
/**
|
|
2158
|
+
* Справочник статусов оплаты заказа.
|
|
2159
|
+
*/
|
|
2160
|
+
orderPaymentStatusReference: i,
|
|
2161
|
+
/**
|
|
2162
|
+
* Справочник статусов заказов.
|
|
2163
|
+
*/
|
|
2164
|
+
orderStatusReference: o,
|
|
2165
|
+
/**
|
|
2166
|
+
* Справочник типов оплаты заказов.
|
|
2167
|
+
*/
|
|
2168
|
+
paymentTypeReference: c,
|
|
2169
|
+
/**
|
|
2170
|
+
* Справочник групп партнеров.
|
|
2171
|
+
*/
|
|
2172
|
+
partnerGroupsReference: p,
|
|
2173
|
+
/**
|
|
2174
|
+
* Справочник типов файлов продуктов/категорий.
|
|
2175
|
+
*/
|
|
2176
|
+
productFilesTypesReference: u,
|
|
2177
|
+
/**
|
|
2178
|
+
* Справочник типов ресурсов.
|
|
2179
|
+
*/
|
|
2180
|
+
resourceTypesReference: R,
|
|
2181
|
+
/**
|
|
2182
|
+
* Справочник направлений продаж.
|
|
2183
|
+
*/
|
|
2184
|
+
salesDirectionsReference: a,
|
|
2185
|
+
/**
|
|
2186
|
+
* Справочник каналов первичного интереса.
|
|
2187
|
+
*/
|
|
2188
|
+
sourcePrimaryInterestsReference: L,
|
|
2189
|
+
/**
|
|
2190
|
+
* Справочник типов доставки.
|
|
2191
|
+
*/
|
|
2192
|
+
deliveryTypeReference: k,
|
|
2193
|
+
/**
|
|
2194
|
+
* Список менеджеров.
|
|
2195
|
+
*/
|
|
2196
|
+
managersList: d,
|
|
2197
|
+
/**
|
|
2198
|
+
* Справочник складов.
|
|
2199
|
+
*/
|
|
2200
|
+
warehousesReference: x,
|
|
2201
|
+
/**
|
|
2202
|
+
* Справочник типов свойств.
|
|
2203
|
+
*/
|
|
2204
|
+
propertyTypesReference: N,
|
|
2205
|
+
/**
|
|
2206
|
+
* Справочник коэффициентов цен.
|
|
2207
|
+
*/
|
|
2208
|
+
priceCoefficientsReference: q
|
|
2209
|
+
};
|
|
2210
|
+
});
|
|
2211
|
+
var Yr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Yr || {});
|
|
2212
|
+
class Xr extends rr {
|
|
2089
2213
|
/**
|
|
2090
2214
|
* Инициализирует экземпляр класса {@link User}.
|
|
2091
2215
|
*
|
|
@@ -2108,15 +2232,36 @@ class Zr extends Ze {
|
|
|
2108
2232
|
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;
|
|
2109
2233
|
}
|
|
2110
2234
|
}
|
|
2111
|
-
class
|
|
2235
|
+
class Zr extends h {
|
|
2112
2236
|
/**
|
|
2113
2237
|
* Возвращает данные о текущем пользователе.
|
|
2114
2238
|
*/
|
|
2115
2239
|
// eslint-disable-next-line class-methods-use-this
|
|
2116
2240
|
getCurrentUser() {
|
|
2117
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
2241
|
+
return this.get("/internal/users/info", {}, (r) => new Xr(r.data));
|
|
2118
2242
|
}
|
|
2119
2243
|
}
|
|
2244
|
+
const et = X("__user_state_private", () => {
|
|
2245
|
+
const n = f({}), r = f(void 0);
|
|
2246
|
+
return {
|
|
2247
|
+
/**
|
|
2248
|
+
* Список загружаемых/загруженных на данный момент значений.
|
|
2249
|
+
*/
|
|
2250
|
+
dataLoaderList: n,
|
|
2251
|
+
/**
|
|
2252
|
+
* Данные о текущем пользователе.
|
|
2253
|
+
*/
|
|
2254
|
+
currentUser: r
|
|
2255
|
+
};
|
|
2256
|
+
}), It = X("user_state", () => ({
|
|
2257
|
+
/**
|
|
2258
|
+
* Данные о текущем пользователе.
|
|
2259
|
+
*/
|
|
2260
|
+
currentUser: v(async () => {
|
|
2261
|
+
const r = et();
|
|
2262
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, r.currentUser = await h.getInstance(Zr).getCurrentUser()), r.currentUser;
|
|
2263
|
+
})
|
|
2264
|
+
}));
|
|
2120
2265
|
class rt {
|
|
2121
2266
|
/**
|
|
2122
2267
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
@@ -2160,10 +2305,10 @@ class rt {
|
|
|
2160
2305
|
* Данные о валюте.
|
|
2161
2306
|
*/
|
|
2162
2307
|
t(this, "currency");
|
|
2163
|
-
this.cost = r.cost, this.costDate =
|
|
2308
|
+
this.cost = r.cost, this.costDate = m(r.costDate) ? y(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new ge(r.currency) : void 0;
|
|
2164
2309
|
}
|
|
2165
2310
|
}
|
|
2166
|
-
class
|
|
2311
|
+
class Ge {
|
|
2167
2312
|
/**
|
|
2168
2313
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
2169
2314
|
*
|
|
@@ -2178,10 +2323,10 @@ class qe {
|
|
|
2178
2323
|
* Список рекомендованных категорий продуктов.
|
|
2179
2324
|
*/
|
|
2180
2325
|
t(this, "productCategories", []);
|
|
2181
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
2326
|
+
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new U(e)));
|
|
2182
2327
|
}
|
|
2183
2328
|
}
|
|
2184
|
-
class
|
|
2329
|
+
class re extends $ {
|
|
2185
2330
|
/**
|
|
2186
2331
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
2187
2332
|
*
|
|
@@ -2216,7 +2361,7 @@ class ee extends $ {
|
|
|
2216
2361
|
this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
|
|
2217
2362
|
}
|
|
2218
2363
|
}
|
|
2219
|
-
class
|
|
2364
|
+
class Me {
|
|
2220
2365
|
/**
|
|
2221
2366
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
2222
2367
|
*
|
|
@@ -2224,21 +2369,182 @@ class Ue {
|
|
|
2224
2369
|
*/
|
|
2225
2370
|
constructor(r) {
|
|
2226
2371
|
/**
|
|
2227
|
-
* Роль ценообразования.
|
|
2372
|
+
* Роль ценообразования.
|
|
2373
|
+
*/
|
|
2374
|
+
t(this, "role");
|
|
2375
|
+
/**
|
|
2376
|
+
* Категория товара.
|
|
2377
|
+
*/
|
|
2378
|
+
t(this, "category");
|
|
2379
|
+
/**
|
|
2380
|
+
* Минимальный коэффициент цены.
|
|
2381
|
+
*/
|
|
2382
|
+
t(this, "minCoefficient");
|
|
2383
|
+
this.role = new re(r == null ? void 0 : r.role), this.category = new oe(r == null ? void 0 : r.category), this.minCoefficient = new ye(r == null ? void 0 : r.minCoefficient);
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
class tt {
|
|
2387
|
+
/**
|
|
2388
|
+
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
2389
|
+
*
|
|
2390
|
+
* @param data Данные для первоначальной инициализации.
|
|
2391
|
+
*/
|
|
2392
|
+
constructor(r) {
|
|
2393
|
+
/**
|
|
2394
|
+
* Максимальное разрешение для распознания мобильного телефона.
|
|
2395
|
+
*/
|
|
2396
|
+
t(this, "phone");
|
|
2397
|
+
/**
|
|
2398
|
+
* Минимальное разрешение для распознания планшета.
|
|
2399
|
+
*/
|
|
2400
|
+
t(this, "tablet");
|
|
2401
|
+
/**
|
|
2402
|
+
* Минимальное разрешение для распознания компьютера.
|
|
2403
|
+
*/
|
|
2404
|
+
t(this, "laptop");
|
|
2405
|
+
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;
|
|
2406
|
+
}
|
|
2407
|
+
}
|
|
2408
|
+
class st {
|
|
2409
|
+
/**
|
|
2410
|
+
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
2411
|
+
*
|
|
2412
|
+
* @param data Данные для первоначальной инициализации.
|
|
2413
|
+
*/
|
|
2414
|
+
constructor(r) {
|
|
2415
|
+
/**
|
|
2416
|
+
* @inheritDoc
|
|
2417
|
+
*/
|
|
2418
|
+
t(this, "portalApiUrl");
|
|
2419
|
+
/**
|
|
2420
|
+
* @inheritDoc
|
|
2421
|
+
*/
|
|
2422
|
+
t(this, "mediaUrl");
|
|
2423
|
+
/**
|
|
2424
|
+
* @inheritDoc
|
|
2425
|
+
*/
|
|
2426
|
+
t(this, "responseDataCacheTimeout");
|
|
2427
|
+
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;
|
|
2428
|
+
}
|
|
2429
|
+
}
|
|
2430
|
+
class it {
|
|
2431
|
+
/**
|
|
2432
|
+
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
2433
|
+
*
|
|
2434
|
+
* @param data Данные для первоначальной инициализации.
|
|
2435
|
+
*/
|
|
2436
|
+
constructor(r) {
|
|
2437
|
+
/**
|
|
2438
|
+
* DSN подключения к Sentry.
|
|
2439
|
+
*/
|
|
2440
|
+
t(this, "dsn");
|
|
2441
|
+
/**
|
|
2442
|
+
* Тип окружения.
|
|
2443
|
+
*/
|
|
2444
|
+
t(this, "environment");
|
|
2445
|
+
/**
|
|
2446
|
+
* Список игнорируемых ошибок.
|
|
2447
|
+
*/
|
|
2448
|
+
t(this, "ignoreErrors");
|
|
2449
|
+
/**
|
|
2450
|
+
* Настройки трассировкии событий.
|
|
2451
|
+
*/
|
|
2452
|
+
t(this, "trace");
|
|
2453
|
+
/**
|
|
2454
|
+
* Настройки записей сеансов.
|
|
2455
|
+
*/
|
|
2456
|
+
t(this, "replay");
|
|
2457
|
+
/**
|
|
2458
|
+
* Дополнительные параметры.
|
|
2459
|
+
*/
|
|
2460
|
+
t(this, "additionalParams");
|
|
2461
|
+
var e, s, i, o;
|
|
2462
|
+
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) ?? [
|
|
2463
|
+
/Network\s{1,3}Error/,
|
|
2464
|
+
/Request\s{1,3}aborted/,
|
|
2465
|
+
/Request\s{1,3}failed\s{1,3}with\s{1,3}status\s{1,3}code\s{1,3}(401|403|422)/
|
|
2466
|
+
], this.trace = {
|
|
2467
|
+
allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
|
|
2468
|
+
sampleRate: ((s = r == null ? void 0 : r.trace) == null ? void 0 : s.sampleRate) ?? 0
|
|
2469
|
+
}, this.replay = {
|
|
2470
|
+
replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
|
|
2471
|
+
replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
|
|
2472
|
+
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
2473
|
+
}
|
|
2474
|
+
}
|
|
2475
|
+
class nt {
|
|
2476
|
+
/**
|
|
2477
|
+
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
2478
|
+
*
|
|
2479
|
+
* @param data Данные для первоначальной инициализации.
|
|
2480
|
+
*/
|
|
2481
|
+
constructor(r) {
|
|
2482
|
+
/**
|
|
2483
|
+
* Дата релиза текущей версии приложения.
|
|
2484
|
+
*/
|
|
2485
|
+
t(this, "date");
|
|
2486
|
+
/**
|
|
2487
|
+
* Название релиза.
|
|
2488
|
+
*/
|
|
2489
|
+
t(this, "name");
|
|
2490
|
+
/**
|
|
2491
|
+
* Текущая версия приложения.
|
|
2492
|
+
*/
|
|
2493
|
+
t(this, "version");
|
|
2494
|
+
this.date = m(r == null ? void 0 : r.date) ? y(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";
|
|
2495
|
+
}
|
|
2496
|
+
}
|
|
2497
|
+
class Lt {
|
|
2498
|
+
/**
|
|
2499
|
+
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
2500
|
+
*
|
|
2501
|
+
* @param data Данные для первоначальной инициализации.
|
|
2502
|
+
*/
|
|
2503
|
+
constructor(r) {
|
|
2504
|
+
/**
|
|
2505
|
+
* Тип окружения.
|
|
2506
|
+
*/
|
|
2507
|
+
t(this, "environment");
|
|
2508
|
+
/**
|
|
2509
|
+
* Параметры разработки и отладки.
|
|
2510
|
+
*/
|
|
2511
|
+
t(this, "devMode");
|
|
2512
|
+
/**
|
|
2513
|
+
* Параметры HTTP-запросов.
|
|
2514
|
+
*/
|
|
2515
|
+
t(this, "http");
|
|
2516
|
+
/**
|
|
2517
|
+
* Список условного отношения разрешения экрана и типа устройств.
|
|
2518
|
+
*/
|
|
2519
|
+
t(this, "deviceTypeByResolution");
|
|
2520
|
+
/**
|
|
2521
|
+
* Настройки системы журналирования ошибок Sentry.
|
|
2522
|
+
*/
|
|
2523
|
+
t(this, "sentry");
|
|
2524
|
+
/**
|
|
2525
|
+
* Список дополнительных URL-адресов.
|
|
2228
2526
|
*/
|
|
2229
|
-
t(this, "
|
|
2527
|
+
t(this, "urls");
|
|
2230
2528
|
/**
|
|
2231
|
-
*
|
|
2529
|
+
* Данные о текущем выпуске приложения.
|
|
2232
2530
|
*/
|
|
2233
|
-
t(this, "
|
|
2531
|
+
t(this, "version");
|
|
2234
2532
|
/**
|
|
2235
|
-
*
|
|
2533
|
+
* Форматы дат.
|
|
2236
2534
|
*/
|
|
2237
|
-
t(this, "
|
|
2238
|
-
|
|
2535
|
+
t(this, "dateFormats");
|
|
2536
|
+
var e, s, i;
|
|
2537
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new st(r == null ? void 0 : r.http), this.deviceTypeByResolution = new tt(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new it({
|
|
2538
|
+
environment: this.environment,
|
|
2539
|
+
...r == null ? void 0 : r.sentry
|
|
2540
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new nt(r == null ? void 0 : r.version), this.dateFormats = {
|
|
2541
|
+
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
2542
|
+
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
2543
|
+
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
2544
|
+
};
|
|
2239
2545
|
}
|
|
2240
2546
|
}
|
|
2241
|
-
class
|
|
2547
|
+
class kt extends h {
|
|
2242
2548
|
/**
|
|
2243
2549
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
2244
2550
|
*
|
|
@@ -2265,11 +2571,11 @@ class _t extends h {
|
|
|
2265
2571
|
*/
|
|
2266
2572
|
// eslint-disable-next-line class-methods-use-this
|
|
2267
2573
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
2268
|
-
let c = `${
|
|
2574
|
+
let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2269
2575
|
return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
|
|
2270
2576
|
}
|
|
2271
2577
|
}
|
|
2272
|
-
class
|
|
2578
|
+
class dt extends h {
|
|
2273
2579
|
/**
|
|
2274
2580
|
* Импортирует цены клиента из CSV файла.
|
|
2275
2581
|
*
|
|
@@ -2468,7 +2774,7 @@ class St extends h {
|
|
|
2468
2774
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
2469
2775
|
}
|
|
2470
2776
|
}
|
|
2471
|
-
class
|
|
2777
|
+
class xt extends h {
|
|
2472
2778
|
/**
|
|
2473
2779
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
2474
2780
|
*
|
|
@@ -2480,7 +2786,7 @@ class It extends h {
|
|
|
2480
2786
|
return this.get(
|
|
2481
2787
|
`/internal/clients/${r}/price/templates`,
|
|
2482
2788
|
{},
|
|
2483
|
-
(e) => e.data.map((s) => new
|
|
2789
|
+
(e) => e.data.map((s) => new Z(s))
|
|
2484
2790
|
);
|
|
2485
2791
|
}
|
|
2486
2792
|
/**
|
|
@@ -2491,7 +2797,7 @@ class It extends h {
|
|
|
2491
2797
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
2492
2798
|
*/
|
|
2493
2799
|
getActiveTemplate(r) {
|
|
2494
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
2800
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Z(e.data));
|
|
2495
2801
|
}
|
|
2496
2802
|
/**
|
|
2497
2803
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -2503,14 +2809,14 @@ class It extends h {
|
|
|
2503
2809
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2504
2810
|
*/
|
|
2505
2811
|
attachTemplate(r, e, s) {
|
|
2506
|
-
const i =
|
|
2812
|
+
const i = D.getConfig().dateFormats.api;
|
|
2507
2813
|
return this.post(
|
|
2508
2814
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2509
2815
|
s && {
|
|
2510
2816
|
startAt: s.startAt && z(s.startAt, i),
|
|
2511
2817
|
endAt: s.endAt && z(s.endAt, i)
|
|
2512
2818
|
},
|
|
2513
|
-
(o) => new
|
|
2819
|
+
(o) => new Z(o.data),
|
|
2514
2820
|
{},
|
|
2515
2821
|
!0
|
|
2516
2822
|
);
|
|
@@ -2537,14 +2843,14 @@ class It extends h {
|
|
|
2537
2843
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2538
2844
|
*/
|
|
2539
2845
|
changeTemplate(r, e, s, i) {
|
|
2540
|
-
const o =
|
|
2846
|
+
const o = D.getConfig().dateFormats.api;
|
|
2541
2847
|
return this.patch(
|
|
2542
2848
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
2543
2849
|
i && {
|
|
2544
2850
|
startAt: i.startAt && z(i.startAt, o),
|
|
2545
2851
|
endAt: i.endAt && z(i.endAt, o)
|
|
2546
2852
|
},
|
|
2547
|
-
(c) => new
|
|
2853
|
+
(c) => new Z(c.data)
|
|
2548
2854
|
);
|
|
2549
2855
|
}
|
|
2550
2856
|
/**
|
|
@@ -2560,7 +2866,7 @@ class It extends h {
|
|
|
2560
2866
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
2561
2867
|
}
|
|
2562
2868
|
}
|
|
2563
|
-
class
|
|
2869
|
+
class Nt extends h {
|
|
2564
2870
|
/**
|
|
2565
2871
|
* Возвращает список данных о корневых категориях.
|
|
2566
2872
|
*
|
|
@@ -2574,7 +2880,7 @@ class Lt extends h {
|
|
|
2574
2880
|
{
|
|
2575
2881
|
showHidden: r
|
|
2576
2882
|
},
|
|
2577
|
-
(e) => e.data.map((s) => new
|
|
2883
|
+
(e) => e.data.map((s) => new U(s))
|
|
2578
2884
|
);
|
|
2579
2885
|
}
|
|
2580
2886
|
/**
|
|
@@ -2593,7 +2899,7 @@ class Lt extends h {
|
|
|
2593
2899
|
showHidden: e,
|
|
2594
2900
|
withNestedCategories: s
|
|
2595
2901
|
},
|
|
2596
|
-
(i) => new
|
|
2902
|
+
(i) => new U(i.data)
|
|
2597
2903
|
);
|
|
2598
2904
|
}
|
|
2599
2905
|
/**
|
|
@@ -2602,7 +2908,7 @@ class Lt extends h {
|
|
|
2602
2908
|
* @param categoryID Идентификатор категории продуктов.
|
|
2603
2909
|
*/
|
|
2604
2910
|
getPublicCategoryData(r) {
|
|
2605
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2911
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
|
|
2606
2912
|
}
|
|
2607
2913
|
/**
|
|
2608
2914
|
* Возвращает список продуктов категории.
|
|
@@ -2620,7 +2926,7 @@ class Lt extends h {
|
|
|
2620
2926
|
showHidden: s,
|
|
2621
2927
|
withPriceCoefficients: e
|
|
2622
2928
|
},
|
|
2623
|
-
(i) =>
|
|
2929
|
+
(i) => pe(i.data, (o) => new _(o))
|
|
2624
2930
|
);
|
|
2625
2931
|
}
|
|
2626
2932
|
/**
|
|
@@ -2633,7 +2939,7 @@ class Lt extends h {
|
|
|
2633
2939
|
getCategoryProductsCoefficients(r) {
|
|
2634
2940
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2635
2941
|
const { data: s } = e;
|
|
2636
|
-
return
|
|
2942
|
+
return vr(s, (i) => i.map((o) => new de(o))), s;
|
|
2637
2943
|
});
|
|
2638
2944
|
}
|
|
2639
2945
|
/**
|
|
@@ -2645,14 +2951,14 @@ class Lt extends h {
|
|
|
2645
2951
|
publicSimpleSearch(r, e = 10) {
|
|
2646
2952
|
return new Promise((s, i) => {
|
|
2647
2953
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2648
|
-
s(o.categories.map((c) => new
|
|
2954
|
+
s(o.categories.map((c) => new U(c)));
|
|
2649
2955
|
}).catch((o) => {
|
|
2650
2956
|
i(o);
|
|
2651
2957
|
});
|
|
2652
2958
|
});
|
|
2653
2959
|
}
|
|
2654
2960
|
}
|
|
2655
|
-
class
|
|
2961
|
+
class Ot extends h {
|
|
2656
2962
|
/**
|
|
2657
2963
|
* Возвращает данные об указанном продукте.
|
|
2658
2964
|
*
|
|
@@ -2662,7 +2968,7 @@ class xt extends h {
|
|
|
2662
2968
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2663
2969
|
*/
|
|
2664
2970
|
getProductData(r, e = !1) {
|
|
2665
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2971
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new _(s.data));
|
|
2666
2972
|
}
|
|
2667
2973
|
/**
|
|
2668
2974
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2670,7 +2976,7 @@ class xt extends h {
|
|
|
2670
2976
|
* @param productId Идентификатор продукта.
|
|
2671
2977
|
*/
|
|
2672
2978
|
getPublicProductData(r) {
|
|
2673
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2979
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
|
|
2674
2980
|
}
|
|
2675
2981
|
/**
|
|
2676
2982
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2683,7 +2989,7 @@ class xt extends h {
|
|
|
2683
2989
|
return this.get(
|
|
2684
2990
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2685
2991
|
{},
|
|
2686
|
-
(e) =>
|
|
2992
|
+
(e) => pe(e.data, (s) => new de(s))
|
|
2687
2993
|
);
|
|
2688
2994
|
}
|
|
2689
2995
|
/**
|
|
@@ -2696,7 +3002,7 @@ class xt extends h {
|
|
|
2696
3002
|
*/
|
|
2697
3003
|
getProductPriceHistory(r, e) {
|
|
2698
3004
|
const s = {};
|
|
2699
|
-
return
|
|
3005
|
+
return T(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => pe(i.data, (o) => new rt(o)));
|
|
2700
3006
|
}
|
|
2701
3007
|
/**
|
|
2702
3008
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -2707,14 +3013,14 @@ class xt extends h {
|
|
|
2707
3013
|
publicSimpleSearch(r, e = 10) {
|
|
2708
3014
|
return new Promise((s, i) => {
|
|
2709
3015
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2710
|
-
s(o.products.map((c) => new
|
|
3016
|
+
s(o.products.map((c) => new _(c)));
|
|
2711
3017
|
}).catch((o) => {
|
|
2712
3018
|
i(o);
|
|
2713
3019
|
});
|
|
2714
3020
|
});
|
|
2715
3021
|
}
|
|
2716
3022
|
}
|
|
2717
|
-
class
|
|
3023
|
+
class qt extends h {
|
|
2718
3024
|
/**
|
|
2719
3025
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2720
3026
|
*
|
|
@@ -2730,7 +3036,7 @@ class kt extends h {
|
|
|
2730
3036
|
clientId: r,
|
|
2731
3037
|
showHidden: e
|
|
2732
3038
|
},
|
|
2733
|
-
(s) => s.data.map((i) => new
|
|
3039
|
+
(s) => s.data.map((i) => new he(i))
|
|
2734
3040
|
);
|
|
2735
3041
|
}
|
|
2736
3042
|
/**
|
|
@@ -2751,7 +3057,7 @@ class kt extends h {
|
|
|
2751
3057
|
showHidden: s,
|
|
2752
3058
|
withNestedCategories: i
|
|
2753
3059
|
},
|
|
2754
|
-
(o) => new
|
|
3060
|
+
(o) => new he(o.data)
|
|
2755
3061
|
);
|
|
2756
3062
|
}
|
|
2757
3063
|
/**
|
|
@@ -2772,11 +3078,11 @@ class kt extends h {
|
|
|
2772
3078
|
showHidden: i,
|
|
2773
3079
|
withPriceCoefficients: s
|
|
2774
3080
|
},
|
|
2775
|
-
(o) =>
|
|
3081
|
+
(o) => pe(o.data, (c) => new K(c))
|
|
2776
3082
|
);
|
|
2777
3083
|
}
|
|
2778
3084
|
}
|
|
2779
|
-
class
|
|
3085
|
+
class Ut extends h {
|
|
2780
3086
|
/**
|
|
2781
3087
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2782
3088
|
*
|
|
@@ -2797,8 +3103,8 @@ class dt extends h {
|
|
|
2797
3103
|
);
|
|
2798
3104
|
}
|
|
2799
3105
|
}
|
|
2800
|
-
var
|
|
2801
|
-
class
|
|
3106
|
+
var qe = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(qe || {});
|
|
3107
|
+
class Fe {
|
|
2802
3108
|
/**
|
|
2803
3109
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2804
3110
|
*
|
|
@@ -2817,7 +3123,7 @@ class Ge {
|
|
|
2817
3123
|
* Значение с которым сравнивается поле.
|
|
2818
3124
|
*/
|
|
2819
3125
|
t(this, "value");
|
|
2820
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
3126
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? qe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2821
3127
|
}
|
|
2822
3128
|
/**
|
|
2823
3129
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2829,10 +3135,10 @@ class Ge {
|
|
|
2829
3135
|
field: this.field,
|
|
2830
3136
|
op: this.op
|
|
2831
3137
|
};
|
|
2832
|
-
return r.value =
|
|
3138
|
+
return r.value = Pr(this.value) ? z(this.value, D.getConfig().dateFormats.api) : this.value, r;
|
|
2833
3139
|
}
|
|
2834
3140
|
}
|
|
2835
|
-
class
|
|
3141
|
+
class ne {
|
|
2836
3142
|
/**
|
|
2837
3143
|
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2838
3144
|
*
|
|
@@ -2852,7 +3158,7 @@ class ie {
|
|
|
2852
3158
|
*/
|
|
2853
3159
|
t(this, "groups");
|
|
2854
3160
|
var e, s;
|
|
2855
|
-
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new
|
|
3161
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Fe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
|
|
2856
3162
|
}
|
|
2857
3163
|
/**
|
|
2858
3164
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2862,8 +3168,8 @@ class ie {
|
|
|
2862
3168
|
toPrimitive() {
|
|
2863
3169
|
return {
|
|
2864
3170
|
groupOp: this.groupOp,
|
|
2865
|
-
filters: this.filters.map((r) => r instanceof
|
|
2866
|
-
groups: this.groups.map((r) => r instanceof
|
|
3171
|
+
filters: this.filters.map((r) => r instanceof Fe && Ie(r.toPrimitive) ? r.toPrimitive() : r),
|
|
3172
|
+
groups: this.groups.map((r) => r instanceof ne ? r.toPrimitive() : r)
|
|
2867
3173
|
};
|
|
2868
3174
|
}
|
|
2869
3175
|
}
|
|
@@ -2879,15 +3185,15 @@ class ve extends h {
|
|
|
2879
3185
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2880
3186
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2881
3187
|
*/
|
|
2882
|
-
getPaginated(r, e, s, i, o, c,
|
|
2883
|
-
let
|
|
3188
|
+
getPaginated(r, e, s, i, o, c, p) {
|
|
3189
|
+
let u = {
|
|
2884
3190
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2885
3191
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2886
3192
|
};
|
|
2887
|
-
return e && (
|
|
3193
|
+
return e && (u.filters = JSON.stringify((e instanceof ne ? e : new ne(e)).toPrimitive())), Le(s) || (u.sort = Je(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
|
|
2888
3194
|
}
|
|
2889
3195
|
}
|
|
2890
|
-
class
|
|
3196
|
+
class Gt extends ve {
|
|
2891
3197
|
/**
|
|
2892
3198
|
* Возвращает список шаблонов прайс-листа.
|
|
2893
3199
|
*
|
|
@@ -2959,7 +3265,7 @@ class Nt extends ve {
|
|
|
2959
3265
|
return this.get(
|
|
2960
3266
|
`/internal/price/templates/${r}/products`,
|
|
2961
3267
|
{},
|
|
2962
|
-
(e) => e.data.map((s) => new
|
|
3268
|
+
(e) => e.data.map((s) => new ae(s))
|
|
2963
3269
|
);
|
|
2964
3270
|
}
|
|
2965
3271
|
/**
|
|
@@ -2971,7 +3277,7 @@ class Nt extends ve {
|
|
|
2971
3277
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2972
3278
|
*/
|
|
2973
3279
|
getProductTemplatePrice(r, e) {
|
|
2974
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
3280
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
|
|
2975
3281
|
}
|
|
2976
3282
|
/**
|
|
2977
3283
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2990,7 +3296,7 @@ class Nt extends ve {
|
|
|
2990
3296
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
2991
3297
|
increase_percent: s.value
|
|
2992
3298
|
},
|
|
2993
|
-
(o) => new
|
|
3299
|
+
(o) => new ae(o.data)
|
|
2994
3300
|
);
|
|
2995
3301
|
}
|
|
2996
3302
|
/**
|
|
@@ -3015,7 +3321,7 @@ class Nt extends ve {
|
|
|
3015
3321
|
return this.get(
|
|
3016
3322
|
`/internal/price/templates/${r}/categories`,
|
|
3017
3323
|
{},
|
|
3018
|
-
(e) => e.data.map((s) => new
|
|
3324
|
+
(e) => e.data.map((s) => new Ae(s))
|
|
3019
3325
|
);
|
|
3020
3326
|
}
|
|
3021
3327
|
/**
|
|
@@ -3030,7 +3336,7 @@ class Nt extends ve {
|
|
|
3030
3336
|
return this.get(
|
|
3031
3337
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
3032
3338
|
{},
|
|
3033
|
-
(s) => new
|
|
3339
|
+
(s) => new Ae(s.data)
|
|
3034
3340
|
);
|
|
3035
3341
|
}
|
|
3036
3342
|
/**
|
|
@@ -3056,7 +3362,7 @@ class Nt extends ve {
|
|
|
3056
3362
|
},
|
|
3057
3363
|
params: i ? { recursively: !0 } : {}
|
|
3058
3364
|
},
|
|
3059
|
-
(c) => new
|
|
3365
|
+
(c) => new Ae(c.data)
|
|
3060
3366
|
);
|
|
3061
3367
|
}
|
|
3062
3368
|
/**
|
|
@@ -3087,18 +3393,18 @@ class Nt extends ve {
|
|
|
3087
3393
|
return this.get(
|
|
3088
3394
|
`/internal/price/templates/${r}/clients`,
|
|
3089
3395
|
{},
|
|
3090
|
-
(e) => e.data.map((s) => new
|
|
3396
|
+
(e) => e.data.map((s) => new Z(s))
|
|
3091
3397
|
);
|
|
3092
3398
|
}
|
|
3093
3399
|
}
|
|
3094
|
-
class
|
|
3400
|
+
class Mt extends h {
|
|
3095
3401
|
/**
|
|
3096
3402
|
* Возвращает список ролей ценообразования.
|
|
3097
3403
|
*
|
|
3098
3404
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
3099
3405
|
*/
|
|
3100
3406
|
getRoles() {
|
|
3101
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
3407
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new re(e)));
|
|
3102
3408
|
}
|
|
3103
3409
|
/**
|
|
3104
3410
|
* Добавляет новую роль ценообразования.
|
|
@@ -3108,7 +3414,7 @@ class Ot extends h {
|
|
|
3108
3414
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
3109
3415
|
*/
|
|
3110
3416
|
createRole(r) {
|
|
3111
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
3417
|
+
return this.post("/internal/price/roles", r, (e) => new re(e.data));
|
|
3112
3418
|
}
|
|
3113
3419
|
/**
|
|
3114
3420
|
* Возвращает данные роли ценообразования.
|
|
@@ -3118,7 +3424,7 @@ class Ot extends h {
|
|
|
3118
3424
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
3119
3425
|
*/
|
|
3120
3426
|
getRole(r) {
|
|
3121
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
3427
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new re(e.data));
|
|
3122
3428
|
}
|
|
3123
3429
|
/**
|
|
3124
3430
|
* Обновляет данные роли ценообразования.
|
|
@@ -3129,7 +3435,7 @@ class Ot extends h {
|
|
|
3129
3435
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
3130
3436
|
*/
|
|
3131
3437
|
updateRole(r, e) {
|
|
3132
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
3438
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new re(s.data));
|
|
3133
3439
|
}
|
|
3134
3440
|
/**
|
|
3135
3441
|
* Удаляет роль ценообразования.
|
|
@@ -3152,7 +3458,7 @@ class Ot extends h {
|
|
|
3152
3458
|
return this.get(
|
|
3153
3459
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3154
3460
|
{},
|
|
3155
|
-
(e) => e.data.map((s) => new
|
|
3461
|
+
(e) => e.data.map((s) => new Me(s))
|
|
3156
3462
|
);
|
|
3157
3463
|
}
|
|
3158
3464
|
/**
|
|
@@ -3167,11 +3473,11 @@ class Ot extends h {
|
|
|
3167
3473
|
return this.patch(
|
|
3168
3474
|
`/internal/price/roles/rules/categories/${r}`,
|
|
3169
3475
|
e,
|
|
3170
|
-
(s) => s.data.map((i) => new
|
|
3476
|
+
(s) => s.data.map((i) => new Me(i))
|
|
3171
3477
|
);
|
|
3172
3478
|
}
|
|
3173
3479
|
}
|
|
3174
|
-
class
|
|
3480
|
+
class Ft extends ve {
|
|
3175
3481
|
/**
|
|
3176
3482
|
* Возвращает пагинированный список свойств.
|
|
3177
3483
|
*
|
|
@@ -3184,7 +3490,7 @@ class qt extends ve {
|
|
|
3184
3490
|
getProperties(r, e, s) {
|
|
3185
3491
|
return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
|
|
3186
3492
|
const o = { ...i.data };
|
|
3187
|
-
return o.data = o.data.map((c) => new
|
|
3493
|
+
return o.data = o.data.map((c) => new ee(c)), o;
|
|
3188
3494
|
});
|
|
3189
3495
|
}
|
|
3190
3496
|
/**
|
|
@@ -3201,7 +3507,7 @@ class qt extends ve {
|
|
|
3201
3507
|
...s,
|
|
3202
3508
|
type: e
|
|
3203
3509
|
},
|
|
3204
|
-
(i) => new
|
|
3510
|
+
(i) => new ee(i.data)
|
|
3205
3511
|
);
|
|
3206
3512
|
}
|
|
3207
3513
|
/**
|
|
@@ -3211,7 +3517,7 @@ class qt extends ve {
|
|
|
3211
3517
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
3212
3518
|
*/
|
|
3213
3519
|
getProperty(r) {
|
|
3214
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
3520
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ee(e.data));
|
|
3215
3521
|
}
|
|
3216
3522
|
/**
|
|
3217
3523
|
* Обновляет существующее свойство.
|
|
@@ -3228,7 +3534,7 @@ class qt extends ve {
|
|
|
3228
3534
|
...i,
|
|
3229
3535
|
type: s
|
|
3230
3536
|
},
|
|
3231
|
-
(o) => new
|
|
3537
|
+
(o) => new ee(o.data)
|
|
3232
3538
|
);
|
|
3233
3539
|
}
|
|
3234
3540
|
/**
|
|
@@ -3543,14 +3849,14 @@ class qt extends ve {
|
|
|
3543
3849
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3544
3850
|
}
|
|
3545
3851
|
}
|
|
3546
|
-
class
|
|
3852
|
+
class Bt extends h {
|
|
3547
3853
|
/**
|
|
3548
3854
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
3549
3855
|
*
|
|
3550
3856
|
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
3551
3857
|
*/
|
|
3552
3858
|
getProductCategoryRecommendations(r) {
|
|
3553
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
3859
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ge(e.data));
|
|
3554
3860
|
}
|
|
3555
3861
|
/**
|
|
3556
3862
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -3558,7 +3864,7 @@ class Ut extends h {
|
|
|
3558
3864
|
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
3559
3865
|
*/
|
|
3560
3866
|
getProductRecommendations(r) {
|
|
3561
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
3867
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ge(e.data));
|
|
3562
3868
|
}
|
|
3563
3869
|
/**
|
|
3564
3870
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -3585,7 +3891,7 @@ class Ut extends h {
|
|
|
3585
3891
|
});
|
|
3586
3892
|
}
|
|
3587
3893
|
}
|
|
3588
|
-
function
|
|
3894
|
+
function Be(n, r, e) {
|
|
3589
3895
|
let s;
|
|
3590
3896
|
return n.some((i) => {
|
|
3591
3897
|
if (i.type === e && i.id === r)
|
|
@@ -3594,20 +3900,20 @@ function Me(n, r, e) {
|
|
|
3594
3900
|
return !1;
|
|
3595
3901
|
const o = i;
|
|
3596
3902
|
if (o.products && o.products.length > 0) {
|
|
3597
|
-
const c =
|
|
3903
|
+
const c = Be(o.products, r, e);
|
|
3598
3904
|
if (c)
|
|
3599
3905
|
return s = c, !0;
|
|
3600
3906
|
}
|
|
3601
3907
|
if (o.categories && o.categories.length > 0) {
|
|
3602
|
-
const c =
|
|
3908
|
+
const c = Be(o.categories, r, e);
|
|
3603
3909
|
if (c)
|
|
3604
3910
|
return s = c, !0;
|
|
3605
3911
|
}
|
|
3606
3912
|
return !1;
|
|
3607
3913
|
}), s;
|
|
3608
3914
|
}
|
|
3609
|
-
var
|
|
3610
|
-
class
|
|
3915
|
+
var ot = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(ot || {});
|
|
3916
|
+
class _e extends B {
|
|
3611
3917
|
/**
|
|
3612
3918
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3613
3919
|
*
|
|
@@ -3634,11 +3940,11 @@ class Te extends B {
|
|
|
3634
3940
|
/**
|
|
3635
3941
|
* Данные о валюте.
|
|
3636
3942
|
*/
|
|
3637
|
-
t(this, "currency", new
|
|
3638
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
3943
|
+
t(this, "currency", new ge());
|
|
3944
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ge(e.currency));
|
|
3639
3945
|
}
|
|
3640
3946
|
}
|
|
3641
|
-
class
|
|
3947
|
+
class Se extends $ {
|
|
3642
3948
|
/**
|
|
3643
3949
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3644
3950
|
*
|
|
@@ -3657,7 +3963,7 @@ class be extends $ {
|
|
|
3657
3963
|
this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
|
|
3658
3964
|
}
|
|
3659
3965
|
}
|
|
3660
|
-
class F extends
|
|
3966
|
+
class F extends Se {
|
|
3661
3967
|
/**
|
|
3662
3968
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3663
3969
|
*
|
|
@@ -3689,10 +3995,10 @@ class F extends be {
|
|
|
3689
3995
|
* Дата и время последнего удаления.
|
|
3690
3996
|
*/
|
|
3691
3997
|
t(this, "deletedAt");
|
|
3692
|
-
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 =
|
|
3998
|
+
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 = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3693
3999
|
}
|
|
3694
4000
|
}
|
|
3695
|
-
class
|
|
4001
|
+
class or extends $ {
|
|
3696
4002
|
/**
|
|
3697
4003
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
3698
4004
|
*
|
|
@@ -3704,7 +4010,7 @@ class ir extends $ {
|
|
|
3704
4010
|
/**
|
|
3705
4011
|
* Данные о менеджере.
|
|
3706
4012
|
*/
|
|
3707
|
-
t(this, "manager", new
|
|
4013
|
+
t(this, "manager", new te());
|
|
3708
4014
|
/**
|
|
3709
4015
|
* Данные об организационно-правовой форме.
|
|
3710
4016
|
*/
|
|
@@ -3712,7 +4018,7 @@ class ir extends $ {
|
|
|
3712
4018
|
/**
|
|
3713
4019
|
* Направление продаж.
|
|
3714
4020
|
*/
|
|
3715
|
-
t(this, "salesDirection", new
|
|
4021
|
+
t(this, "salesDirection", new I());
|
|
3716
4022
|
/**
|
|
3717
4023
|
* Группа партнеров (направление деятельности).
|
|
3718
4024
|
*/
|
|
@@ -3750,7 +4056,7 @@ class ir extends $ {
|
|
|
3750
4056
|
*/
|
|
3751
4057
|
t(this, "updater");
|
|
3752
4058
|
if (e) {
|
|
3753
|
-
if (this.opf = new M(e.opf), this.salesDirection = new
|
|
4059
|
+
if (this.opf = new M(e.opf), this.salesDirection = new I(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Y(e.partnerGroup)), e.manager && (this.manager = new te(e.manager)), e.contacts) {
|
|
3754
4060
|
const s = [];
|
|
3755
4061
|
e.contacts.forEach((i) => {
|
|
3756
4062
|
s.push(new F(i));
|
|
@@ -3759,13 +4065,13 @@ class ir extends $ {
|
|
|
3759
4065
|
if (e.bankAccounts) {
|
|
3760
4066
|
const s = [];
|
|
3761
4067
|
e.bankAccounts.forEach((i) => {
|
|
3762
|
-
s.push(new
|
|
4068
|
+
s.push(new _e(i));
|
|
3763
4069
|
}), this.bankAccounts = s;
|
|
3764
4070
|
}
|
|
3765
4071
|
}
|
|
3766
4072
|
}
|
|
3767
4073
|
}
|
|
3768
|
-
class
|
|
4074
|
+
class ct extends or {
|
|
3769
4075
|
/**
|
|
3770
4076
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
3771
4077
|
*
|
|
@@ -3775,7 +4081,7 @@ class st extends ir {
|
|
|
3775
4081
|
super(r);
|
|
3776
4082
|
}
|
|
3777
4083
|
}
|
|
3778
|
-
class
|
|
4084
|
+
class cr extends or {
|
|
3779
4085
|
/**
|
|
3780
4086
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
3781
4087
|
*
|
|
@@ -3818,7 +4124,7 @@ class nr extends ir {
|
|
|
3818
4124
|
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 ?? "");
|
|
3819
4125
|
}
|
|
3820
4126
|
}
|
|
3821
|
-
class
|
|
4127
|
+
class lr extends cr {
|
|
3822
4128
|
/**
|
|
3823
4129
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
3824
4130
|
*
|
|
@@ -3833,7 +4139,7 @@ class or extends nr {
|
|
|
3833
4139
|
e && (this.kpp = e.kpp ?? "");
|
|
3834
4140
|
}
|
|
3835
4141
|
}
|
|
3836
|
-
class
|
|
4142
|
+
class lt extends lr {
|
|
3837
4143
|
/**
|
|
3838
4144
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
3839
4145
|
*
|
|
@@ -3856,7 +4162,7 @@ class it extends or {
|
|
|
3856
4162
|
e && (this.registrationCountry = new Q(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3857
4163
|
}
|
|
3858
4164
|
}
|
|
3859
|
-
class
|
|
4165
|
+
class me {
|
|
3860
4166
|
/**
|
|
3861
4167
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
3862
4168
|
*
|
|
@@ -3864,18 +4170,18 @@ class ge {
|
|
|
3864
4170
|
*/
|
|
3865
4171
|
static createInstance(r) {
|
|
3866
4172
|
switch (r.opf.slug) {
|
|
3867
|
-
case
|
|
3868
|
-
return new
|
|
3869
|
-
case
|
|
3870
|
-
return new
|
|
3871
|
-
case
|
|
3872
|
-
return new
|
|
4173
|
+
case b.Ic:
|
|
4174
|
+
return new cr(r);
|
|
4175
|
+
case b.UlR:
|
|
4176
|
+
return new lr(r);
|
|
4177
|
+
case b.UlNr:
|
|
4178
|
+
return new lt(r);
|
|
3873
4179
|
default:
|
|
3874
|
-
return new
|
|
4180
|
+
return new ct(r);
|
|
3875
4181
|
}
|
|
3876
4182
|
}
|
|
3877
4183
|
}
|
|
3878
|
-
class
|
|
4184
|
+
class De extends B {
|
|
3879
4185
|
/**
|
|
3880
4186
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3881
4187
|
*
|
|
@@ -3890,7 +4196,7 @@ class Ae extends B {
|
|
|
3890
4196
|
this.isPrimary = e.isPrimary;
|
|
3891
4197
|
}
|
|
3892
4198
|
}
|
|
3893
|
-
class
|
|
4199
|
+
class pt extends F {
|
|
3894
4200
|
/**
|
|
3895
4201
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3896
4202
|
*
|
|
@@ -3915,10 +4221,10 @@ class nt extends F {
|
|
|
3915
4221
|
*/
|
|
3916
4222
|
addresses: []
|
|
3917
4223
|
});
|
|
3918
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
4224
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new De(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new De(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new De(s))));
|
|
3919
4225
|
}
|
|
3920
4226
|
}
|
|
3921
|
-
class
|
|
4227
|
+
class fe extends Fr {
|
|
3922
4228
|
/**
|
|
3923
4229
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
3924
4230
|
*
|
|
@@ -3955,10 +4261,10 @@ class me extends Hr {
|
|
|
3955
4261
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3956
4262
|
*/
|
|
3957
4263
|
t(this, "isTransportCompanyAddress");
|
|
3958
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
4264
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Xe(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
3959
4265
|
}
|
|
3960
4266
|
}
|
|
3961
|
-
class
|
|
4267
|
+
class He extends ce {
|
|
3962
4268
|
/**
|
|
3963
4269
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3964
4270
|
*
|
|
@@ -4012,10 +4318,10 @@ class Fe extends oe {
|
|
|
4012
4318
|
* Дополнительные данные о клиенте.
|
|
4013
4319
|
*/
|
|
4014
4320
|
t(this, "extraData");
|
|
4015
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((
|
|
4321
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => me.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new Y(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new fe(p))) ?? [], this.channelPrimaryInterest = new sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new nr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
4016
4322
|
}
|
|
4017
4323
|
}
|
|
4018
|
-
class
|
|
4324
|
+
class Ht {
|
|
4019
4325
|
/**
|
|
4020
4326
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
4021
4327
|
*
|
|
@@ -4065,11 +4371,11 @@ class Gt {
|
|
|
4065
4371
|
/**
|
|
4066
4372
|
* Период регистрации.
|
|
4067
4373
|
*/
|
|
4068
|
-
t(this, "createdAt", new
|
|
4374
|
+
t(this, "createdAt", new O());
|
|
4069
4375
|
/**
|
|
4070
4376
|
* Период последнего входа.
|
|
4071
4377
|
*/
|
|
4072
|
-
t(this, "lastLoginDate", new
|
|
4378
|
+
t(this, "lastLoginDate", new O());
|
|
4073
4379
|
/**
|
|
4074
4380
|
* Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
|
|
4075
4381
|
*/
|
|
@@ -4110,11 +4416,11 @@ class Gt {
|
|
|
4110
4416
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
4111
4417
|
*/
|
|
4112
4418
|
t(this, "lastOrder");
|
|
4113
|
-
var e, s, i, o, c,
|
|
4114
|
-
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((
|
|
4115
|
-
createdAt: new
|
|
4419
|
+
var e, s, i, o, c, p;
|
|
4420
|
+
this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new Oe(u)), this.region = new se(r == null ? void 0 : r.region), this.country = new Q(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((u) => new Ce(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new I(u)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new M(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new J(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((u) => new Y(u)), this.contact = new Se(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
4421
|
+
createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
|
|
4116
4422
|
creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
|
|
4117
|
-
isApproved: (
|
|
4423
|
+
isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
|
|
4118
4424
|
};
|
|
4119
4425
|
}
|
|
4120
4426
|
/**
|
|
@@ -4137,7 +4443,7 @@ class Gt {
|
|
|
4137
4443
|
this.cities = [];
|
|
4138
4444
|
break;
|
|
4139
4445
|
case "region":
|
|
4140
|
-
this.region = new
|
|
4446
|
+
this.region = new se();
|
|
4141
4447
|
break;
|
|
4142
4448
|
case "isActive":
|
|
4143
4449
|
this.isActive = !0;
|
|
@@ -4170,7 +4476,7 @@ class Gt {
|
|
|
4170
4476
|
this.partnerGroups = [];
|
|
4171
4477
|
break;
|
|
4172
4478
|
case "contact":
|
|
4173
|
-
this.contact = new
|
|
4479
|
+
this.contact = new Se();
|
|
4174
4480
|
break;
|
|
4175
4481
|
}
|
|
4176
4482
|
return this;
|
|
@@ -4183,13 +4489,13 @@ class Gt {
|
|
|
4183
4489
|
var e, s, i, o;
|
|
4184
4490
|
const r = {};
|
|
4185
4491
|
return Object.keys(this).forEach((c) => {
|
|
4186
|
-
const
|
|
4492
|
+
const p = this[c];
|
|
4187
4493
|
// eslint-disable-next-line prettier/prettier
|
|
4188
|
-
|
|
4494
|
+
T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
|
|
4189
4495
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
4190
4496
|
}
|
|
4191
4497
|
}
|
|
4192
|
-
class
|
|
4498
|
+
class pr extends B {
|
|
4193
4499
|
/**
|
|
4194
4500
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4195
4501
|
*
|
|
@@ -4209,10 +4515,10 @@ class cr extends B {
|
|
|
4209
4515
|
* Признак того, что заказ подтвержден в 1С.
|
|
4210
4516
|
*/
|
|
4211
4517
|
t(this, "isApproved1c");
|
|
4212
|
-
this.createdAt =
|
|
4518
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
4213
4519
|
}
|
|
4214
4520
|
}
|
|
4215
|
-
class
|
|
4521
|
+
class ut extends $ {
|
|
4216
4522
|
/**
|
|
4217
4523
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
4218
4524
|
*
|
|
@@ -4245,10 +4551,10 @@ class ot extends $ {
|
|
|
4245
4551
|
* Список менеджеров.
|
|
4246
4552
|
*/
|
|
4247
4553
|
t(this, "managers");
|
|
4248
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new
|
|
4554
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new Y(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new I(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new te(o)));
|
|
4249
4555
|
}
|
|
4250
4556
|
}
|
|
4251
|
-
class
|
|
4557
|
+
class ht {
|
|
4252
4558
|
/**
|
|
4253
4559
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
4254
4560
|
*
|
|
@@ -4266,7 +4572,7 @@ class ct {
|
|
|
4266
4572
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4267
4573
|
}
|
|
4268
4574
|
}
|
|
4269
|
-
class
|
|
4575
|
+
class zt extends ht {
|
|
4270
4576
|
/**
|
|
4271
4577
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
4272
4578
|
*
|
|
@@ -4297,7 +4603,7 @@ class Mt extends ct {
|
|
|
4297
4603
|
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;
|
|
4298
4604
|
}
|
|
4299
4605
|
}
|
|
4300
|
-
class
|
|
4606
|
+
class jt {
|
|
4301
4607
|
/**
|
|
4302
4608
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
4303
4609
|
*
|
|
@@ -4315,7 +4621,7 @@ class Ft {
|
|
|
4315
4621
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4316
4622
|
}
|
|
4317
4623
|
}
|
|
4318
|
-
class
|
|
4624
|
+
class Wt extends ve {
|
|
4319
4625
|
/**
|
|
4320
4626
|
* Возвращает данные об указанном клиенте.
|
|
4321
4627
|
*
|
|
@@ -4323,7 +4629,7 @@ class Bt extends ve {
|
|
|
4323
4629
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4324
4630
|
*/
|
|
4325
4631
|
getClient(r) {
|
|
4326
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4632
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new He(e.data));
|
|
4327
4633
|
}
|
|
4328
4634
|
/**
|
|
4329
4635
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4338,7 +4644,7 @@ class Bt extends ve {
|
|
|
4338
4644
|
getClientsList(r, e, s, i) {
|
|
4339
4645
|
return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
|
|
4340
4646
|
const c = { ...o.data };
|
|
4341
|
-
return c.data = c.data.map((
|
|
4647
|
+
return c.data = c.data.map((p) => new ce(p)), c;
|
|
4342
4648
|
});
|
|
4343
4649
|
}
|
|
4344
4650
|
/**
|
|
@@ -4351,7 +4657,7 @@ class Bt extends ve {
|
|
|
4351
4657
|
return this.getClientsList({
|
|
4352
4658
|
groupOp: "and",
|
|
4353
4659
|
groups: [],
|
|
4354
|
-
filters: [{ field: "phone", op:
|
|
4660
|
+
filters: [{ field: "phone", op: qe.Contains, value: r }]
|
|
4355
4661
|
});
|
|
4356
4662
|
}
|
|
4357
4663
|
/**
|
|
@@ -4365,7 +4671,7 @@ class Bt extends ve {
|
|
|
4365
4671
|
const s = r.map((i) => i.id);
|
|
4366
4672
|
return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
|
|
4367
4673
|
let o = [];
|
|
4368
|
-
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new
|
|
4674
|
+
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ut(c))), o;
|
|
4369
4675
|
});
|
|
4370
4676
|
}
|
|
4371
4677
|
/**
|
|
@@ -4377,7 +4683,7 @@ class Bt extends ve {
|
|
|
4377
4683
|
getAllClientContacts(r) {
|
|
4378
4684
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4379
4685
|
let s = [];
|
|
4380
|
-
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new
|
|
4686
|
+
return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new pt(i))), s;
|
|
4381
4687
|
});
|
|
4382
4688
|
}
|
|
4383
4689
|
/**
|
|
@@ -4407,7 +4713,7 @@ class Bt extends ve {
|
|
|
4407
4713
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4408
4714
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4409
4715
|
},
|
|
4410
|
-
(i) => new
|
|
4716
|
+
(i) => new He(i.data),
|
|
4411
4717
|
e
|
|
4412
4718
|
);
|
|
4413
4719
|
}
|
|
@@ -4517,16 +4823,16 @@ class Bt extends ve {
|
|
|
4517
4823
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4518
4824
|
*/
|
|
4519
4825
|
createContragentClientData(r, e, s = {}) {
|
|
4520
|
-
var
|
|
4826
|
+
var u, R, a, L, k, d, x, N;
|
|
4521
4827
|
let i;
|
|
4522
|
-
const o = e, c = e,
|
|
4828
|
+
const o = e, c = e, p = e;
|
|
4523
4829
|
switch (e.opf.slug) {
|
|
4524
|
-
case
|
|
4830
|
+
case b.Ic:
|
|
4525
4831
|
i = {
|
|
4526
4832
|
opf: o.opf.slug,
|
|
4527
4833
|
name: o.name,
|
|
4528
4834
|
alternative_name: o.alternativeName,
|
|
4529
|
-
partner_group_id: (
|
|
4835
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4530
4836
|
manager_id: (R = o.manager) == null ? void 0 : R.id,
|
|
4531
4837
|
comment: o.comment,
|
|
4532
4838
|
inn: o.inn,
|
|
@@ -4539,13 +4845,13 @@ class Bt extends ve {
|
|
|
4539
4845
|
actual_address: o.actualAddress
|
|
4540
4846
|
};
|
|
4541
4847
|
break;
|
|
4542
|
-
case
|
|
4848
|
+
case b.UlR:
|
|
4543
4849
|
i = {
|
|
4544
4850
|
opf: c.opf.slug,
|
|
4545
4851
|
name: c.name,
|
|
4546
4852
|
alternative_name: c.alternativeName,
|
|
4547
|
-
partner_group_id: (
|
|
4548
|
-
manager_id: (
|
|
4853
|
+
partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
|
|
4854
|
+
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4549
4855
|
comment: c.comment,
|
|
4550
4856
|
inn: c.inn,
|
|
4551
4857
|
kpp: c.kpp,
|
|
@@ -4558,23 +4864,23 @@ class Bt extends ve {
|
|
|
4558
4864
|
actual_address: c.actualAddress
|
|
4559
4865
|
};
|
|
4560
4866
|
break;
|
|
4561
|
-
case
|
|
4867
|
+
case b.UlNr:
|
|
4562
4868
|
i = {
|
|
4563
|
-
opf:
|
|
4564
|
-
name:
|
|
4565
|
-
alternative_name:
|
|
4566
|
-
partner_group_id: (
|
|
4567
|
-
manager_id: (
|
|
4568
|
-
comment:
|
|
4569
|
-
director_name:
|
|
4570
|
-
director_position:
|
|
4571
|
-
director_acts_on:
|
|
4572
|
-
legal_address:
|
|
4573
|
-
postal_address:
|
|
4574
|
-
actual_address:
|
|
4575
|
-
registration_country_id:
|
|
4576
|
-
registration_number:
|
|
4577
|
-
tax_number:
|
|
4869
|
+
opf: p.opf.slug,
|
|
4870
|
+
name: p.name,
|
|
4871
|
+
alternative_name: p.alternativeName,
|
|
4872
|
+
partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
|
|
4873
|
+
manager_id: (d = p.manager) == null ? void 0 : d.id,
|
|
4874
|
+
comment: p.comment,
|
|
4875
|
+
director_name: p.directorName,
|
|
4876
|
+
director_position: p.directorPosition,
|
|
4877
|
+
director_acts_on: p.directorActsOn,
|
|
4878
|
+
legal_address: p.legalAddress,
|
|
4879
|
+
postal_address: p.postalAddress,
|
|
4880
|
+
actual_address: p.actualAddress,
|
|
4881
|
+
registration_country_id: p.registrationCountry.id,
|
|
4882
|
+
registration_number: p.registrationNumber,
|
|
4883
|
+
tax_number: p.taxNumber || void 0
|
|
4578
4884
|
};
|
|
4579
4885
|
break;
|
|
4580
4886
|
default:
|
|
@@ -4582,8 +4888,8 @@ class Bt extends ve {
|
|
|
4582
4888
|
opf: e.opf.slug,
|
|
4583
4889
|
name: e.name,
|
|
4584
4890
|
alternative_name: e.alternativeName,
|
|
4585
|
-
partner_group_id: (
|
|
4586
|
-
manager_id: (
|
|
4891
|
+
partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
|
|
4892
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
4587
4893
|
comment: e.comment
|
|
4588
4894
|
};
|
|
4589
4895
|
break;
|
|
@@ -4591,7 +4897,7 @@ class Bt extends ve {
|
|
|
4591
4897
|
return this.post(
|
|
4592
4898
|
`/internal/clients/${r}/contragents`,
|
|
4593
4899
|
i,
|
|
4594
|
-
(
|
|
4900
|
+
(q) => me.createInstance(q.data),
|
|
4595
4901
|
s
|
|
4596
4902
|
);
|
|
4597
4903
|
}
|
|
@@ -4606,16 +4912,16 @@ class Bt extends ve {
|
|
|
4606
4912
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4607
4913
|
*/
|
|
4608
4914
|
updateContragentClientData(r, e, s = {}) {
|
|
4609
|
-
var
|
|
4915
|
+
var u, R, a, L, k, d, x, N;
|
|
4610
4916
|
let i;
|
|
4611
|
-
const o = e, c = e,
|
|
4917
|
+
const o = e, c = e, p = e;
|
|
4612
4918
|
switch (e.opf.slug) {
|
|
4613
|
-
case
|
|
4919
|
+
case b.Ic:
|
|
4614
4920
|
i = {
|
|
4615
4921
|
opf: o.opf.slug,
|
|
4616
4922
|
name: o.name,
|
|
4617
4923
|
alternative_name: o.alternativeName,
|
|
4618
|
-
partner_group_id: (
|
|
4924
|
+
partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
|
|
4619
4925
|
manager_id: (R = o.manager) == null ? void 0 : R.id,
|
|
4620
4926
|
comment: o.comment,
|
|
4621
4927
|
inn: o.inn,
|
|
@@ -4628,13 +4934,13 @@ class Bt extends ve {
|
|
|
4628
4934
|
actual_address: o.actualAddress
|
|
4629
4935
|
};
|
|
4630
4936
|
break;
|
|
4631
|
-
case
|
|
4937
|
+
case b.UlR:
|
|
4632
4938
|
i = {
|
|
4633
4939
|
opf: c.opf.slug,
|
|
4634
4940
|
name: c.name,
|
|
4635
4941
|
alternative_name: c.alternativeName,
|
|
4636
|
-
partner_group_id: (
|
|
4637
|
-
manager_id: (
|
|
4942
|
+
partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
|
|
4943
|
+
manager_id: (L = c.manager) == null ? void 0 : L.id,
|
|
4638
4944
|
comment: c.comment,
|
|
4639
4945
|
inn: c.inn,
|
|
4640
4946
|
kpp: c.kpp,
|
|
@@ -4647,23 +4953,23 @@ class Bt extends ve {
|
|
|
4647
4953
|
actual_address: c.actualAddress
|
|
4648
4954
|
};
|
|
4649
4955
|
break;
|
|
4650
|
-
case
|
|
4956
|
+
case b.UlNr:
|
|
4651
4957
|
i = {
|
|
4652
|
-
opf:
|
|
4653
|
-
name:
|
|
4654
|
-
alternative_name:
|
|
4655
|
-
partner_group_id: (
|
|
4656
|
-
manager_id: (
|
|
4657
|
-
comment:
|
|
4658
|
-
director_name:
|
|
4659
|
-
director_position:
|
|
4660
|
-
director_acts_on:
|
|
4661
|
-
legal_address:
|
|
4662
|
-
postal_address:
|
|
4663
|
-
actual_address:
|
|
4664
|
-
registration_country_id:
|
|
4665
|
-
registration_number:
|
|
4666
|
-
tax_number:
|
|
4958
|
+
opf: p.opf.slug,
|
|
4959
|
+
name: p.name,
|
|
4960
|
+
alternative_name: p.alternativeName,
|
|
4961
|
+
partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
|
|
4962
|
+
manager_id: (d = p.manager) == null ? void 0 : d.id,
|
|
4963
|
+
comment: p.comment,
|
|
4964
|
+
director_name: p.directorName,
|
|
4965
|
+
director_position: p.directorPosition,
|
|
4966
|
+
director_acts_on: p.directorActsOn,
|
|
4967
|
+
legal_address: p.legalAddress,
|
|
4968
|
+
postal_address: p.postalAddress,
|
|
4969
|
+
actual_address: p.actualAddress,
|
|
4970
|
+
registration_country_id: p.registrationCountry.id,
|
|
4971
|
+
registration_number: p.registrationNumber,
|
|
4972
|
+
tax_number: p.taxNumber || void 0
|
|
4667
4973
|
};
|
|
4668
4974
|
break;
|
|
4669
4975
|
default:
|
|
@@ -4671,8 +4977,8 @@ class Bt extends ve {
|
|
|
4671
4977
|
opf: e.opf.slug,
|
|
4672
4978
|
name: e.name,
|
|
4673
4979
|
alternative_name: e.alternativeName,
|
|
4674
|
-
partner_group_id: (
|
|
4675
|
-
manager_id: (
|
|
4980
|
+
partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
|
|
4981
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
4676
4982
|
comment: e.comment
|
|
4677
4983
|
};
|
|
4678
4984
|
break;
|
|
@@ -4680,7 +4986,7 @@ class Bt extends ve {
|
|
|
4680
4986
|
return this.patch(
|
|
4681
4987
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4682
4988
|
i,
|
|
4683
|
-
(
|
|
4989
|
+
(q) => me.createInstance(q.data),
|
|
4684
4990
|
s
|
|
4685
4991
|
);
|
|
4686
4992
|
}
|
|
@@ -4718,7 +5024,7 @@ class Bt extends ve {
|
|
|
4718
5024
|
}), e.operatingHours && (i.operating_hours = {
|
|
4719
5025
|
from: e.operatingHours.from,
|
|
4720
5026
|
to: e.operatingHours.to
|
|
4721
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (
|
|
5027
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new fe(p.data), s);
|
|
4722
5028
|
}
|
|
4723
5029
|
/**
|
|
4724
5030
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4747,7 +5053,7 @@ class Bt extends ve {
|
|
|
4747
5053
|
}), this.patch(
|
|
4748
5054
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4749
5055
|
i,
|
|
4750
|
-
(
|
|
5056
|
+
(p) => new fe(p.data),
|
|
4751
5057
|
s
|
|
4752
5058
|
);
|
|
4753
5059
|
}
|
|
@@ -4783,7 +5089,7 @@ class Bt extends ve {
|
|
|
4783
5089
|
correspondent_account: s.correspondentAccount,
|
|
4784
5090
|
currency_id: s.currency.id
|
|
4785
5091
|
},
|
|
4786
|
-
(o) => new
|
|
5092
|
+
(o) => new _e(o.data),
|
|
4787
5093
|
i
|
|
4788
5094
|
);
|
|
4789
5095
|
}
|
|
@@ -4809,7 +5115,7 @@ class Bt extends ve {
|
|
|
4809
5115
|
correspondent_account: s.correspondentAccount,
|
|
4810
5116
|
currency_id: s.currency.id
|
|
4811
5117
|
},
|
|
4812
|
-
(o) => new
|
|
5118
|
+
(o) => new _e(o.data),
|
|
4813
5119
|
i
|
|
4814
5120
|
);
|
|
4815
5121
|
}
|
|
@@ -5006,14 +5312,14 @@ class Bt extends ve {
|
|
|
5006
5312
|
* в случае ошибок в запросах.
|
|
5007
5313
|
*/
|
|
5008
5314
|
createContact(r, e, s, i = {}) {
|
|
5009
|
-
var c,
|
|
5315
|
+
var c, p;
|
|
5010
5316
|
const o = {
|
|
5011
5317
|
name: e.name,
|
|
5012
5318
|
position: e.position,
|
|
5013
5319
|
comment: e.comment,
|
|
5014
5320
|
...s
|
|
5015
5321
|
};
|
|
5016
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (
|
|
5322
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new F(u.data), i);
|
|
5017
5323
|
}
|
|
5018
5324
|
/**
|
|
5019
5325
|
* Устанавливает признак основного контактного лица.
|
|
@@ -5042,7 +5348,7 @@ class Bt extends ve {
|
|
|
5042
5348
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
5043
5349
|
}
|
|
5044
5350
|
}
|
|
5045
|
-
class
|
|
5351
|
+
class Vt extends h {
|
|
5046
5352
|
/**
|
|
5047
5353
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
5048
5354
|
*
|
|
@@ -5056,7 +5362,7 @@ class Ht extends h {
|
|
|
5056
5362
|
});
|
|
5057
5363
|
}
|
|
5058
5364
|
}
|
|
5059
|
-
class
|
|
5365
|
+
class Et extends h {
|
|
5060
5366
|
/**
|
|
5061
5367
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
5062
5368
|
*
|
|
@@ -5084,10 +5390,10 @@ class zt extends h {
|
|
|
5084
5390
|
const i = this.get(
|
|
5085
5391
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
5086
5392
|
{ params: e },
|
|
5087
|
-
(c) => new
|
|
5393
|
+
(c) => new _(c.data)
|
|
5088
5394
|
);
|
|
5089
5395
|
return i.catch((c) => {
|
|
5090
|
-
this.
|
|
5396
|
+
this.errorResponseHandler(c, s);
|
|
5091
5397
|
}), i;
|
|
5092
5398
|
}
|
|
5093
5399
|
/**
|
|
@@ -5127,29 +5433,29 @@ class zt extends h {
|
|
|
5127
5433
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
5128
5434
|
}
|
|
5129
5435
|
}
|
|
5130
|
-
class
|
|
5436
|
+
class Jt {
|
|
5131
5437
|
/**
|
|
5132
5438
|
* Возвращает диапазон дат по умолчанию.
|
|
5133
5439
|
*/
|
|
5134
5440
|
static defaultDateRanges() {
|
|
5135
|
-
const r =
|
|
5441
|
+
const r = $r(/* @__PURE__ */ new Date(), 1);
|
|
5136
5442
|
return {
|
|
5137
5443
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5138
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5139
|
-
today: { label: "Сегодня", from:
|
|
5140
|
-
yesterday: { label: "Вчера", from:
|
|
5141
|
-
tomorrow: { label: "Завтра", from:
|
|
5444
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: kr(r), to: Lr(r) },
|
|
5445
|
+
today: { label: "Сегодня", from: Ke(), to: Ir() },
|
|
5446
|
+
yesterday: { label: "Вчера", from: Sr(), to: _r() },
|
|
5447
|
+
tomorrow: { label: "Завтра", from: br(), to: Tr() }
|
|
5142
5448
|
};
|
|
5143
5449
|
}
|
|
5144
5450
|
}
|
|
5145
|
-
const
|
|
5451
|
+
const E = class E {
|
|
5146
5452
|
/**
|
|
5147
5453
|
* Устанавливает список единиц измерения линейной величины.
|
|
5148
5454
|
*
|
|
5149
5455
|
* @param linearValues Список единиц измерения линейной величины.
|
|
5150
5456
|
*/
|
|
5151
5457
|
static setLinearValues(r) {
|
|
5152
|
-
|
|
5458
|
+
E.linearValues = r;
|
|
5153
5459
|
}
|
|
5154
5460
|
/**
|
|
5155
5461
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -5157,7 +5463,7 @@ const V = class V {
|
|
|
5157
5463
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
5158
5464
|
*/
|
|
5159
5465
|
static productIsMeasurable(r) {
|
|
5160
|
-
return
|
|
5466
|
+
return E.linearValues.includes(r.unit);
|
|
5161
5467
|
}
|
|
5162
5468
|
/**
|
|
5163
5469
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -5166,7 +5472,7 @@ const V = class V {
|
|
|
5166
5472
|
*/
|
|
5167
5473
|
static getProductMultiplicity(r) {
|
|
5168
5474
|
var e, s;
|
|
5169
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !
|
|
5475
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !E.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
5170
5476
|
}
|
|
5171
5477
|
/**
|
|
5172
5478
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -5181,9 +5487,9 @@ const V = class V {
|
|
|
5181
5487
|
/**
|
|
5182
5488
|
* Список единиц измерения линейной величины.
|
|
5183
5489
|
*/
|
|
5184
|
-
t(
|
|
5185
|
-
let
|
|
5186
|
-
class
|
|
5490
|
+
t(E, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5491
|
+
let ze = E;
|
|
5492
|
+
class Kt {
|
|
5187
5493
|
/**
|
|
5188
5494
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5189
5495
|
*/
|
|
@@ -5199,26 +5505,14 @@ class Wt {
|
|
|
5199
5505
|
return r.id === 0 && r.guid === "-undefined-";
|
|
5200
5506
|
}
|
|
5201
5507
|
}
|
|
5202
|
-
class
|
|
5203
|
-
/**
|
|
5204
|
-
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
5205
|
-
*/
|
|
5206
|
-
async getManagers() {
|
|
5207
|
-
const r = "/internal/managers", e = se.getCachedResponse(r);
|
|
5208
|
-
if (e)
|
|
5209
|
-
return e;
|
|
5210
|
-
const i = (await this.get(r)).data.map((o) => xe.instanceInitializer(Ce, o));
|
|
5211
|
-
return this.cacheResponse(r, i), i;
|
|
5212
|
-
}
|
|
5213
|
-
}
|
|
5214
|
-
class lr extends cr {
|
|
5508
|
+
class ur extends pr {
|
|
5215
5509
|
/**
|
|
5216
5510
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
5217
5511
|
*
|
|
5218
5512
|
* @param data Данные для первоначальной инициализации.
|
|
5219
5513
|
*/
|
|
5220
5514
|
constructor(e) {
|
|
5221
|
-
var s, i, o, c,
|
|
5515
|
+
var s, i, o, c, p, u, R, a;
|
|
5222
5516
|
super(e);
|
|
5223
5517
|
/**
|
|
5224
5518
|
* Краткие данные о клиенте.
|
|
@@ -5260,19 +5554,19 @@ class lr extends cr {
|
|
|
5260
5554
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5261
5555
|
*/
|
|
5262
5556
|
t(this, "isNotInStock");
|
|
5263
|
-
this.client = new
|
|
5557
|
+
this.client = new ce(e == null ? void 0 : e.client), this.payment = {
|
|
5264
5558
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
5265
5559
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5266
5560
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5267
5561
|
}, this.delivery = {
|
|
5268
5562
|
type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
|
|
5269
|
-
date:
|
|
5270
|
-
address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new
|
|
5271
|
-
warehouse: (
|
|
5272
|
-
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new
|
|
5563
|
+
date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? y(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
|
|
5564
|
+
address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new fe(e.delivery.address) : void 0,
|
|
5565
|
+
warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new we(e.delivery.warehouse) : void 0
|
|
5566
|
+
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? y(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? y(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
5273
5567
|
}
|
|
5274
5568
|
}
|
|
5275
|
-
class
|
|
5569
|
+
class gt extends B {
|
|
5276
5570
|
/**
|
|
5277
5571
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5278
5572
|
*
|
|
@@ -5355,7 +5649,7 @@ class ut extends B {
|
|
|
5355
5649
|
this.product = new K(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
5356
5650
|
}
|
|
5357
5651
|
}
|
|
5358
|
-
class
|
|
5652
|
+
class mt extends ur {
|
|
5359
5653
|
/**
|
|
5360
5654
|
* Инициализирует экземпляр класса {@link Order}.
|
|
5361
5655
|
*
|
|
@@ -5395,10 +5689,10 @@ class pt extends lr {
|
|
|
5395
5689
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5396
5690
|
*/
|
|
5397
5691
|
t(this, "isAllowProcessingWithoutPayment");
|
|
5398
|
-
this.products = (e.products ?? []).map((s) => new
|
|
5692
|
+
this.products = (e.products ?? []).map((s) => new gt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? me.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5399
5693
|
}
|
|
5400
5694
|
}
|
|
5401
|
-
class
|
|
5695
|
+
class Qt extends ve {
|
|
5402
5696
|
/**
|
|
5403
5697
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
5404
5698
|
*
|
|
@@ -5411,7 +5705,7 @@ class Et extends ve {
|
|
|
5411
5705
|
getOrders(r, e, s) {
|
|
5412
5706
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
|
|
5413
5707
|
const o = { ...i.data };
|
|
5414
|
-
return o.data = o.data.map((c) => new
|
|
5708
|
+
return o.data = o.data.map((c) => new ur(c)), o;
|
|
5415
5709
|
});
|
|
5416
5710
|
}
|
|
5417
5711
|
/**
|
|
@@ -5429,10 +5723,10 @@ class Et extends ve {
|
|
|
5429
5723
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
5430
5724
|
*/
|
|
5431
5725
|
getOrder(r) {
|
|
5432
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
5726
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new mt(e.data));
|
|
5433
5727
|
}
|
|
5434
5728
|
}
|
|
5435
|
-
class
|
|
5729
|
+
class $e {
|
|
5436
5730
|
/**
|
|
5437
5731
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
5438
5732
|
*
|
|
@@ -5459,12 +5753,12 @@ class De {
|
|
|
5459
5753
|
* Источник клиентской цены.
|
|
5460
5754
|
*/
|
|
5461
5755
|
t(this, "source");
|
|
5462
|
-
this.client = new
|
|
5756
|
+
this.client = new ce(r == null ? void 0 : r.client), this.product = new _(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) ?? Ne.Product;
|
|
5463
5757
|
}
|
|
5464
5758
|
}
|
|
5465
|
-
const
|
|
5759
|
+
const Te = (n) => {
|
|
5466
5760
|
var r, e, s, i, o;
|
|
5467
|
-
return n ?
|
|
5761
|
+
return n ? Rr(
|
|
5468
5762
|
{
|
|
5469
5763
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5470
5764
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
@@ -5473,13 +5767,13 @@ const ae = (n) => {
|
|
|
5473
5767
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5474
5768
|
hideNotActive: n.hideNotActive
|
|
5475
5769
|
},
|
|
5476
|
-
(c) =>
|
|
5770
|
+
(c) => T(c) || (Je(c) || Ar(c)) && Le(c)
|
|
5477
5771
|
) : {};
|
|
5478
|
-
},
|
|
5772
|
+
}, je = (n) => {
|
|
5479
5773
|
const r = {};
|
|
5480
5774
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
5481
5775
|
};
|
|
5482
|
-
class
|
|
5776
|
+
class Yt extends h {
|
|
5483
5777
|
/**
|
|
5484
5778
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
5485
5779
|
*
|
|
@@ -5493,10 +5787,10 @@ class Vt extends h {
|
|
|
5493
5787
|
return this.get(
|
|
5494
5788
|
`/internal/price/products/${r}/analyze`,
|
|
5495
5789
|
{
|
|
5496
|
-
...
|
|
5497
|
-
filters:
|
|
5790
|
+
...je(e),
|
|
5791
|
+
filters: Te(s)
|
|
5498
5792
|
},
|
|
5499
|
-
(i) => i.data.map((o) => new
|
|
5793
|
+
(i) => i.data.map((o) => new $e(o))
|
|
5500
5794
|
);
|
|
5501
5795
|
}
|
|
5502
5796
|
/**
|
|
@@ -5512,10 +5806,10 @@ class Vt extends h {
|
|
|
5512
5806
|
return this.get(
|
|
5513
5807
|
`/internal/price/categories/${r}/analyze`,
|
|
5514
5808
|
{
|
|
5515
|
-
...
|
|
5516
|
-
filters:
|
|
5809
|
+
...je(e),
|
|
5810
|
+
filters: Te(s)
|
|
5517
5811
|
},
|
|
5518
|
-
(i) => i.data.map((o) => new
|
|
5812
|
+
(i) => i.data.map((o) => new $e(o))
|
|
5519
5813
|
);
|
|
5520
5814
|
}
|
|
5521
5815
|
/**
|
|
@@ -5534,13 +5828,13 @@ class Vt extends h {
|
|
|
5534
5828
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5535
5829
|
{
|
|
5536
5830
|
...e,
|
|
5537
|
-
filters:
|
|
5831
|
+
filters: Te(s)
|
|
5538
5832
|
},
|
|
5539
|
-
(i) => i.data.map((o) => new
|
|
5833
|
+
(i) => i.data.map((o) => new $e(o))
|
|
5540
5834
|
);
|
|
5541
5835
|
}
|
|
5542
5836
|
}
|
|
5543
|
-
class
|
|
5837
|
+
class ft {
|
|
5544
5838
|
/**
|
|
5545
5839
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
5546
5840
|
*
|
|
@@ -5558,7 +5852,7 @@ class ht {
|
|
|
5558
5852
|
this.name = r.name, this.content = r.content;
|
|
5559
5853
|
}
|
|
5560
5854
|
}
|
|
5561
|
-
class
|
|
5855
|
+
class We {
|
|
5562
5856
|
/**
|
|
5563
5857
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5564
5858
|
*
|
|
@@ -5594,10 +5888,10 @@ class ze {
|
|
|
5594
5888
|
*/
|
|
5595
5889
|
t(this, "meta");
|
|
5596
5890
|
var e;
|
|
5597
|
-
this.resourceType = new
|
|
5891
|
+
this.resourceType = new ir(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new ft(s))) ?? [];
|
|
5598
5892
|
}
|
|
5599
5893
|
}
|
|
5600
|
-
class
|
|
5894
|
+
class Xt extends h {
|
|
5601
5895
|
/**
|
|
5602
5896
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
5603
5897
|
*
|
|
@@ -5605,7 +5899,7 @@ class Jt extends h {
|
|
|
5605
5899
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
5606
5900
|
*/
|
|
5607
5901
|
getResourceSeoData(r, e) {
|
|
5608
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
5902
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new We(s.data));
|
|
5609
5903
|
}
|
|
5610
5904
|
/**
|
|
5611
5905
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -5616,7 +5910,7 @@ class Jt extends h {
|
|
|
5616
5910
|
* в случае ошибок в запросах.
|
|
5617
5911
|
*/
|
|
5618
5912
|
saveResourceSeoData(r, e = {}) {
|
|
5619
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
5913
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new We(s.data), e);
|
|
5620
5914
|
}
|
|
5621
5915
|
/**
|
|
5622
5916
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -5628,263 +5922,7 @@ class Jt extends h {
|
|
|
5628
5922
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
5629
5923
|
}
|
|
5630
5924
|
}
|
|
5631
|
-
|
|
5632
|
-
const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), p = C(void 0), R = C(void 0), D = C(void 0), I = C(void 0), L = C(void 0), x = C(void 0), k = C(void 0), d = C(void 0), O = C(void 0), l = C(void 0);
|
|
5633
|
-
return {
|
|
5634
|
-
/**
|
|
5635
|
-
* Список загружаемых/загруженных на данный момент значений.
|
|
5636
|
-
*/
|
|
5637
|
-
dataLoaderList: n,
|
|
5638
|
-
/**
|
|
5639
|
-
* Справочник каналов первичного интереса.
|
|
5640
|
-
*/
|
|
5641
|
-
channelPrimaryInterestReference: r,
|
|
5642
|
-
/**
|
|
5643
|
-
* Справочник должностей контактных лиц.
|
|
5644
|
-
*/
|
|
5645
|
-
contactPositionsReference: e,
|
|
5646
|
-
/**
|
|
5647
|
-
* Справочник валют.
|
|
5648
|
-
*/
|
|
5649
|
-
currencyReference: s,
|
|
5650
|
-
/**
|
|
5651
|
-
* Справочник типов доставки.
|
|
5652
|
-
*/
|
|
5653
|
-
deliveryTypeReference: i,
|
|
5654
|
-
/**
|
|
5655
|
-
* Список менеджеров.
|
|
5656
|
-
*/
|
|
5657
|
-
managersList: o,
|
|
5658
|
-
/**
|
|
5659
|
-
* Справочник организационно-правовых форм.
|
|
5660
|
-
*/
|
|
5661
|
-
opfReference: c,
|
|
5662
|
-
/**
|
|
5663
|
-
* Справочник статусов оплаты заказа.
|
|
5664
|
-
*/
|
|
5665
|
-
orderPaymentStatusReference: u,
|
|
5666
|
-
/**
|
|
5667
|
-
* Справочник статусов заказов.
|
|
5668
|
-
*/
|
|
5669
|
-
orderStatusReference: p,
|
|
5670
|
-
/**
|
|
5671
|
-
* Справочник типов оплаты заказов.
|
|
5672
|
-
*/
|
|
5673
|
-
paymentTypeReference: R,
|
|
5674
|
-
/**
|
|
5675
|
-
* Справочник групп партнеров.
|
|
5676
|
-
*/
|
|
5677
|
-
partnerGroupReference: D,
|
|
5678
|
-
/**
|
|
5679
|
-
* Справочник типов файлов продукктов/категорий.
|
|
5680
|
-
*/
|
|
5681
|
-
productFileTypeReference: I,
|
|
5682
|
-
/**
|
|
5683
|
-
* Справочник типов ресурсов.
|
|
5684
|
-
*/
|
|
5685
|
-
resourceTypesReference: L,
|
|
5686
|
-
/**
|
|
5687
|
-
* Справочник направлений продаж.
|
|
5688
|
-
*/
|
|
5689
|
-
salesDirectionsReference: x,
|
|
5690
|
-
/**
|
|
5691
|
-
* Справочник источников первичного интереса.
|
|
5692
|
-
*/
|
|
5693
|
-
sourcePrimaryInterestReference: k,
|
|
5694
|
-
/**
|
|
5695
|
-
* Справочник складов.
|
|
5696
|
-
*/
|
|
5697
|
-
warehousesReference: d,
|
|
5698
|
-
/**
|
|
5699
|
-
* Справочник типов свойств.
|
|
5700
|
-
*/
|
|
5701
|
-
propertyTypesReference: O,
|
|
5702
|
-
/**
|
|
5703
|
-
* Справочник коэффициентов цен.
|
|
5704
|
-
*/
|
|
5705
|
-
priceCoefficientsReference: l
|
|
5706
|
-
};
|
|
5707
|
-
}), Kt = fe("references", () => {
|
|
5708
|
-
const n = v(() => {
|
|
5709
|
-
const l = P();
|
|
5710
|
-
return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
|
|
5711
|
-
l.channelPrimaryInterestReference = g;
|
|
5712
|
-
}).catch(m)), l.channelPrimaryInterestReference;
|
|
5713
|
-
}), r = v(() => {
|
|
5714
|
-
const l = P();
|
|
5715
|
-
return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
|
|
5716
|
-
l.contactPositionsReference = g;
|
|
5717
|
-
}).catch(m)), l.contactPositionsReference;
|
|
5718
|
-
}), e = v(() => {
|
|
5719
|
-
const l = P();
|
|
5720
|
-
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
|
|
5721
|
-
l.currencyReference = g;
|
|
5722
|
-
}).catch(m)), l.currencyReference;
|
|
5723
|
-
}), s = v(() => {
|
|
5724
|
-
const l = P();
|
|
5725
|
-
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
|
|
5726
|
-
l.opfReference = g;
|
|
5727
|
-
}).catch(m)), l.opfReference;
|
|
5728
|
-
}), i = v(() => {
|
|
5729
|
-
const l = P();
|
|
5730
|
-
return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
|
|
5731
|
-
l.orderPaymentStatusReference = g;
|
|
5732
|
-
}).catch(m)), l.orderPaymentStatusReference;
|
|
5733
|
-
}), o = v(() => {
|
|
5734
|
-
const l = P();
|
|
5735
|
-
return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
|
|
5736
|
-
l.orderStatusReference = g;
|
|
5737
|
-
}).catch(m)), l.orderStatusReference;
|
|
5738
|
-
}), c = v(() => {
|
|
5739
|
-
const l = P();
|
|
5740
|
-
return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
|
|
5741
|
-
l.paymentTypeReference = g;
|
|
5742
|
-
}).catch(m)), l.paymentTypeReference;
|
|
5743
|
-
}), u = v(() => {
|
|
5744
|
-
const l = P();
|
|
5745
|
-
return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
|
|
5746
|
-
l.partnerGroupReference = g;
|
|
5747
|
-
}).catch(m)), l.partnerGroupReference;
|
|
5748
|
-
}), p = v(() => {
|
|
5749
|
-
const l = P();
|
|
5750
|
-
return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
|
|
5751
|
-
l.productFileTypeReference = g;
|
|
5752
|
-
}).catch(m)), l.productFileTypeReference;
|
|
5753
|
-
}), R = v(() => {
|
|
5754
|
-
const l = P();
|
|
5755
|
-
return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
|
|
5756
|
-
l.resourceTypesReference = g;
|
|
5757
|
-
}).catch(m)), l.resourceTypesReference;
|
|
5758
|
-
}), D = v(() => {
|
|
5759
|
-
const l = P();
|
|
5760
|
-
return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
|
|
5761
|
-
l.salesDirectionsReference = g;
|
|
5762
|
-
}).catch(m)), l.salesDirectionsReference;
|
|
5763
|
-
}), I = v(() => {
|
|
5764
|
-
const l = P();
|
|
5765
|
-
return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
|
|
5766
|
-
l.sourcePrimaryInterestReference = g;
|
|
5767
|
-
}).catch(m)), l.sourcePrimaryInterestReference;
|
|
5768
|
-
}), L = v(() => {
|
|
5769
|
-
const l = P();
|
|
5770
|
-
return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
|
|
5771
|
-
l.deliveryTypeReference = g;
|
|
5772
|
-
}).catch(m)), l.deliveryTypeReference;
|
|
5773
|
-
}), x = v(() => {
|
|
5774
|
-
const l = P();
|
|
5775
|
-
return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(lt).getManagers().then((g) => {
|
|
5776
|
-
l.managersList = g;
|
|
5777
|
-
}).catch(m)), l.managersList;
|
|
5778
|
-
}), k = v(() => {
|
|
5779
|
-
const l = P();
|
|
5780
|
-
return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
|
|
5781
|
-
l.warehousesReference = g;
|
|
5782
|
-
}).catch(m)), l.warehousesReference;
|
|
5783
|
-
}), d = v(() => {
|
|
5784
|
-
const l = P();
|
|
5785
|
-
return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
|
|
5786
|
-
l.propertyTypesReference = g;
|
|
5787
|
-
}).catch(m)), l.propertyTypesReference;
|
|
5788
|
-
}), O = v(() => {
|
|
5789
|
-
const l = P();
|
|
5790
|
-
return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
|
|
5791
|
-
l.priceCoefficientsReference = g;
|
|
5792
|
-
}).catch(m)), l.priceCoefficientsReference;
|
|
5793
|
-
});
|
|
5794
|
-
return {
|
|
5795
|
-
/**
|
|
5796
|
-
* Справочник каналов первичного интереса.
|
|
5797
|
-
*/
|
|
5798
|
-
channelPrimaryInterestsReference: n,
|
|
5799
|
-
/**
|
|
5800
|
-
* Справочник должностей контактных лиц.
|
|
5801
|
-
*/
|
|
5802
|
-
contactPositionsReference: r,
|
|
5803
|
-
/**
|
|
5804
|
-
* Справочник валют.
|
|
5805
|
-
*/
|
|
5806
|
-
currencyReference: e,
|
|
5807
|
-
/**
|
|
5808
|
-
* Справочник организационно-правовых форм.
|
|
5809
|
-
*/
|
|
5810
|
-
opfReference: s,
|
|
5811
|
-
/**
|
|
5812
|
-
* Справочник статусов оплаты заказа.
|
|
5813
|
-
*/
|
|
5814
|
-
orderPaymentStatusReference: i,
|
|
5815
|
-
/**
|
|
5816
|
-
* Справочник статусов заказов.
|
|
5817
|
-
*/
|
|
5818
|
-
orderStatusReference: o,
|
|
5819
|
-
/**
|
|
5820
|
-
* Справочник типов оплаты заказов.
|
|
5821
|
-
*/
|
|
5822
|
-
paymentTypeReference: c,
|
|
5823
|
-
/**
|
|
5824
|
-
* Справочник групп партнеров.
|
|
5825
|
-
*/
|
|
5826
|
-
partnerGroupsReference: u,
|
|
5827
|
-
/**
|
|
5828
|
-
* Справочник типов файлов продуктов/категорий.
|
|
5829
|
-
*/
|
|
5830
|
-
productFilesTypesReference: p,
|
|
5831
|
-
/**
|
|
5832
|
-
* Справочник типов ресурсов.
|
|
5833
|
-
*/
|
|
5834
|
-
resourceTypesReference: R,
|
|
5835
|
-
/**
|
|
5836
|
-
* Справочник направлений продаж.
|
|
5837
|
-
*/
|
|
5838
|
-
salesDirectionsReference: D,
|
|
5839
|
-
/**
|
|
5840
|
-
* Справочник каналов первичного интереса.
|
|
5841
|
-
*/
|
|
5842
|
-
sourcePrimaryInterestsReference: I,
|
|
5843
|
-
/**
|
|
5844
|
-
* Справочник типов доставки.
|
|
5845
|
-
*/
|
|
5846
|
-
deliveryTypeReference: L,
|
|
5847
|
-
/**
|
|
5848
|
-
* Список менеджеров.
|
|
5849
|
-
*/
|
|
5850
|
-
managersList: x,
|
|
5851
|
-
/**
|
|
5852
|
-
* Справочник складов.
|
|
5853
|
-
*/
|
|
5854
|
-
warehousesReference: k,
|
|
5855
|
-
/**
|
|
5856
|
-
* Справочник типов свойств.
|
|
5857
|
-
*/
|
|
5858
|
-
propertyTypesReference: d,
|
|
5859
|
-
/**
|
|
5860
|
-
* Справочник коэффициентов цен.
|
|
5861
|
-
*/
|
|
5862
|
-
priceCoefficientsReference: O
|
|
5863
|
-
};
|
|
5864
|
-
}), gt = fe("__user_state_private", () => {
|
|
5865
|
-
const n = C({}), r = C(void 0);
|
|
5866
|
-
return {
|
|
5867
|
-
/**
|
|
5868
|
-
* Список загружаемых/загруженных на данный момент значений.
|
|
5869
|
-
*/
|
|
5870
|
-
dataLoaderList: n,
|
|
5871
|
-
/**
|
|
5872
|
-
* Данные о текущем пользователе.
|
|
5873
|
-
*/
|
|
5874
|
-
currentUser: r
|
|
5875
|
-
};
|
|
5876
|
-
}), Qt = fe("user_state", () => ({
|
|
5877
|
-
/**
|
|
5878
|
-
* Данные о текущем пользователе.
|
|
5879
|
-
*/
|
|
5880
|
-
currentUser: v(() => {
|
|
5881
|
-
const r = gt();
|
|
5882
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(et).getCurrentUser().then((e) => {
|
|
5883
|
-
r.currentUser = e;
|
|
5884
|
-
}).catch(m).finally(m)), r.currentUser;
|
|
5885
|
-
})
|
|
5886
|
-
}));
|
|
5887
|
-
class Yt extends h {
|
|
5925
|
+
class Zt extends h {
|
|
5888
5926
|
/**
|
|
5889
5927
|
* Возвращает подсказки по адресам.
|
|
5890
5928
|
*
|
|
@@ -5931,7 +5969,7 @@ class Yt extends h {
|
|
|
5931
5969
|
});
|
|
5932
5970
|
}
|
|
5933
5971
|
}
|
|
5934
|
-
class
|
|
5972
|
+
class es {
|
|
5935
5973
|
/**
|
|
5936
5974
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
5937
5975
|
*
|
|
@@ -5955,142 +5993,143 @@ class Xt {
|
|
|
5955
5993
|
}
|
|
5956
5994
|
}
|
|
5957
5995
|
export {
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5996
|
+
jr as AnyReference,
|
|
5997
|
+
Lt as AppBaseConfig,
|
|
5998
|
+
D as AppConfigProvider,
|
|
5999
|
+
_e as BankAccount,
|
|
5962
6000
|
ve as BasePaginationProvider,
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
6001
|
+
Gr as CalculationTypeEnum,
|
|
6002
|
+
le as Cart,
|
|
6003
|
+
Ur as CartItem,
|
|
6004
|
+
qr as CartItemBase,
|
|
6005
|
+
$t as CartProvider,
|
|
6006
|
+
kt as CatalogProvider,
|
|
6007
|
+
Qe as CatalogableItem,
|
|
6008
|
+
U as Category,
|
|
6009
|
+
Me as CategoryPricingRule,
|
|
6010
|
+
sr as ChannelPrimaryInterest,
|
|
6011
|
+
_t as City,
|
|
6012
|
+
Oe as CityWithRegionAndCountry,
|
|
6013
|
+
He as Client,
|
|
6014
|
+
ut as ClientAdditionalData,
|
|
6015
|
+
he as ClientCategory,
|
|
6016
|
+
Wt as ClientDataProvider,
|
|
6017
|
+
dt as ClientPriceProvider,
|
|
6018
|
+
xt as ClientPriceTemplateProvider,
|
|
5981
6019
|
K as ClientProduct,
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
6020
|
+
qt as ClientProductCategoryDataProvider,
|
|
6021
|
+
Ut as ClientProductDataProvider,
|
|
6022
|
+
ce as ClientShortInfo,
|
|
6023
|
+
ot as ClientsAdditionalDataRequestTypeEnum,
|
|
6024
|
+
Ht as ClientsListFilters,
|
|
6025
|
+
Et as ConfiguratorProvider,
|
|
6026
|
+
Se as Contact,
|
|
6027
|
+
Hr as ContactLinks,
|
|
5990
6028
|
F as ContactPerson,
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6029
|
+
pt as ContactPersonRelated,
|
|
6030
|
+
Wr as ContactPosition,
|
|
6031
|
+
De as ContactRelation,
|
|
6032
|
+
or as ContragentBase,
|
|
6033
|
+
me as ContragentFactory,
|
|
6034
|
+
cr as ContragentIc,
|
|
6035
|
+
ct as ContragentPerson,
|
|
6036
|
+
lt as ContragentUlNr,
|
|
6037
|
+
lr as ContragentUlR,
|
|
6038
|
+
Ne as CostSourceEnum,
|
|
6001
6039
|
Q as Country,
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6040
|
+
ge as Currency,
|
|
6041
|
+
Zt as DataSuggestionProvider,
|
|
6042
|
+
zt as DataTablePagination,
|
|
6043
|
+
ht as DataTablePaginationRequestParams,
|
|
6044
|
+
jt as DataTableSortRequestParams,
|
|
6045
|
+
Jt as DateTimeProvider,
|
|
6046
|
+
Fr as DeletableNamedIdentity,
|
|
6047
|
+
fe as DeliveryAddress,
|
|
6010
6048
|
J as DeliveryType,
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6049
|
+
Dt as DetailedJwtPayload,
|
|
6050
|
+
tt as DeviceTypeResolutionConfig,
|
|
6051
|
+
Br as DiscountShortInfo,
|
|
6052
|
+
es as FieldValidationResultData,
|
|
6053
|
+
ne as FilterGroup,
|
|
6054
|
+
Fe as FilterItem,
|
|
6055
|
+
qe as FilterOpEnum,
|
|
6056
|
+
Xe as GeoCoordinates,
|
|
6057
|
+
Nr as HiddenCatalogableItem,
|
|
6058
|
+
ie as HttpCachedRequester,
|
|
6059
|
+
st as HttpParamsConfig,
|
|
6022
6060
|
h as HttpRequester,
|
|
6023
6061
|
B as Identity,
|
|
6024
|
-
|
|
6062
|
+
Or as Image,
|
|
6025
6063
|
ue as JwtPayload,
|
|
6026
6064
|
Ce as Manager,
|
|
6027
|
-
|
|
6028
|
-
|
|
6029
|
-
|
|
6030
|
-
|
|
6065
|
+
te as ManagerCommon,
|
|
6066
|
+
Kt as ManagerDataFactory,
|
|
6067
|
+
Qr as ManagerDataProvider,
|
|
6068
|
+
ft as MetaTagItem,
|
|
6031
6069
|
$ as NamedIdentity,
|
|
6032
6070
|
M as Opf,
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6071
|
+
b as OpfEnum,
|
|
6072
|
+
mt as Order,
|
|
6073
|
+
ur as OrderInfo,
|
|
6074
|
+
Vr as OrderPaymentStatus,
|
|
6075
|
+
gt as OrderProduct,
|
|
6076
|
+
pr as OrderShortInfo,
|
|
6077
|
+
Er as OrderStatus,
|
|
6078
|
+
Qt as OrdersDataProvider,
|
|
6041
6079
|
Y as PartnerGroup,
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
|
|
6045
|
-
|
|
6080
|
+
Jr as PaymentType,
|
|
6081
|
+
Tt as PreferencesStorageProvider,
|
|
6082
|
+
$e as PriceAnalyze,
|
|
6083
|
+
Yt as PriceAnalyzeProvider,
|
|
6046
6084
|
ye as PriceCoefficient,
|
|
6047
|
-
|
|
6085
|
+
Ye as PriceCoefficientEnum,
|
|
6048
6086
|
j as PriceTemplate,
|
|
6049
|
-
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
|
|
6057
|
-
|
|
6058
|
-
|
|
6059
|
-
|
|
6060
|
-
|
|
6061
|
-
|
|
6087
|
+
Ae as PriceTemplateCategory,
|
|
6088
|
+
Z as PriceTemplateClient,
|
|
6089
|
+
er as PriceTemplateICatalogableItem,
|
|
6090
|
+
ae as PriceTemplateProduct,
|
|
6091
|
+
Gt as PriceTemplateProvider,
|
|
6092
|
+
re as PricingRole,
|
|
6093
|
+
Mt as PricingRoleProvider,
|
|
6094
|
+
be as PrimaryCatalogableItem,
|
|
6095
|
+
_ as Product,
|
|
6096
|
+
Nt as ProductCategoryDataProvider,
|
|
6097
|
+
Ot as ProductDataProvider,
|
|
6098
|
+
Kr as ProductFileType,
|
|
6099
|
+
de as ProductPriceCoefficient,
|
|
6062
6100
|
rt as ProductPriceHistory,
|
|
6063
|
-
|
|
6064
|
-
|
|
6065
|
-
|
|
6066
|
-
|
|
6101
|
+
Ft as PropertiesProvider,
|
|
6102
|
+
ee as Property,
|
|
6103
|
+
tr as PropertyType,
|
|
6104
|
+
Mr as PropertyTypeEnum,
|
|
6067
6105
|
H as PropertyValue,
|
|
6068
|
-
|
|
6069
|
-
|
|
6106
|
+
Bt as RecommendationsDataProvider,
|
|
6107
|
+
Ge as RecommendationsList,
|
|
6070
6108
|
w as Reference,
|
|
6071
6109
|
A as ReferenceDataProvider,
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
|
|
6078
|
-
|
|
6110
|
+
se as Region,
|
|
6111
|
+
ir as ResourceType,
|
|
6112
|
+
I as SalesDirection,
|
|
6113
|
+
it as SentryConfig,
|
|
6114
|
+
We as Seo,
|
|
6115
|
+
Xt as SeoDataProvider,
|
|
6116
|
+
nr as SourcePrimaryInterest,
|
|
6079
6117
|
xr as StockCount,
|
|
6080
|
-
|
|
6118
|
+
bt as TemplatesListFilters,
|
|
6081
6119
|
xe as TypedInstanceFactory,
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6120
|
+
ze as UnitsHelper,
|
|
6121
|
+
Vt as UnknownClientDataProvider,
|
|
6122
|
+
Ze as UpdatableNamedIdentity,
|
|
6123
|
+
Xr as User,
|
|
6124
|
+
rr as UserCommonInfo,
|
|
6125
|
+
Zr as UserDataProvider,
|
|
6088
6126
|
G as UserShortInfo,
|
|
6089
|
-
|
|
6090
|
-
|
|
6127
|
+
Yr as UserTypeEnum,
|
|
6128
|
+
nt as VersionConfig,
|
|
6091
6129
|
we as Warehouse,
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6130
|
+
Be as findCatalogItemByIdRecursive,
|
|
6131
|
+
Re as useAuthStateStore,
|
|
6132
|
+
St as useReferencesStore,
|
|
6133
|
+
It as useUserStateStore
|
|
6095
6134
|
};
|
|
6096
6135
|
//# sourceMappingURL=sc-common-lib.js.map
|