@snabcentr/common-lib 1.62.0 → 1.62.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +7 -3
- package/dist/sc-common-lib.js +731 -727
- 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/http/classes/http-base-cached-requester.d.ts +1 -2
- package/dist/src/http/classes/http-base-cached-requester.d.ts.map +1 -1
- package/dist/src/http/classes/http-base-requester.d.ts +1 -2
- package/dist/src/http/classes/http-base-requester.d.ts.map +1 -1
- package/dist/src/http/classes/http-requester.d.ts.map +1 -1
- package/dist/src/system/classes/identity.d.ts +2 -1
- package/dist/src/system/classes/identity.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
var or = Object.defineProperty;
|
|
2
2
|
var cr = (n, r, e) => r in n ? or(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
|
-
var
|
|
4
|
-
import { isNil as
|
|
5
|
-
import { parseISO as f, format as
|
|
6
|
-
import
|
|
7
|
-
import { objectToSnake as Oe, objectToCamel as
|
|
3
|
+
var s = (n, r, e) => cr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { isNil as U, toUpper as lr, constant as ur, isUndefined as pr, isString as m, cloneDeep as hr, noop as y, toLower as gr, isEmpty as ae, isFunction as Le, map as ce, forEach as mr, isDate as fr, isArray as Be, omitBy as yr, isObject as wr } from "lodash-es";
|
|
5
|
+
import { parseISO as f, format as W, addSeconds as Cr, isAfter as vr, startOfToday as We, addBusinessDays as Pr, endOfTomorrow as Rr, startOfTomorrow as Dr, endOfYesterday as Ar, startOfYesterday as $r, endOfToday as br, endOfDay as Tr, startOfDay as _r } from "date-fns";
|
|
6
|
+
import Sr from "axios";
|
|
7
|
+
import { objectToSnake as Oe, objectToCamel as ar } from "ts-case-convert";
|
|
8
8
|
import { defineStore as me } from "pinia";
|
|
9
9
|
import { ref as C, computed as v } from "vue";
|
|
10
|
-
class
|
|
10
|
+
class z {
|
|
11
11
|
/**
|
|
12
12
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
13
13
|
*
|
|
14
14
|
* @param data Данные для первоначальной инициализации.
|
|
15
|
+
* @param defaultIdValue Значение поля {@link id} по-умолчанию если оно не определено в {@link data}.
|
|
15
16
|
*/
|
|
16
|
-
constructor(r) {
|
|
17
|
+
constructor(r, e) {
|
|
17
18
|
/**
|
|
18
19
|
* @inheritDoc
|
|
19
20
|
*/
|
|
20
|
-
|
|
21
|
+
s(this, "id");
|
|
21
22
|
/**
|
|
22
23
|
* @inheritDoc
|
|
23
24
|
*/
|
|
24
|
-
|
|
25
|
-
this.id = r == null ? void 0 : r.id,
|
|
25
|
+
s(this, "guid");
|
|
26
|
+
this.id = r == null ? void 0 : r.id, U(this.id) && (U(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) ?? "";
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Возвращает признак, что это новая запись.
|
|
29
30
|
*/
|
|
30
31
|
isNewRec() {
|
|
31
|
-
return typeof this.id == "number" ? this.id === -1 :
|
|
32
|
+
return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : U(this.id);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
|
-
class $ extends
|
|
35
|
+
class $ extends z {
|
|
35
36
|
/**
|
|
36
37
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
37
38
|
*
|
|
@@ -42,7 +43,7 @@ class $ extends H {
|
|
|
42
43
|
/**
|
|
43
44
|
* Название.
|
|
44
45
|
*/
|
|
45
|
-
|
|
46
|
+
s(this, "name", "");
|
|
46
47
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
47
48
|
}
|
|
48
49
|
}
|
|
@@ -57,15 +58,15 @@ class je extends $ {
|
|
|
57
58
|
/**
|
|
58
59
|
* Символьное обозначение.
|
|
59
60
|
*/
|
|
60
|
-
|
|
61
|
+
s(this, "slug");
|
|
61
62
|
/**
|
|
62
63
|
* Артикул.
|
|
63
64
|
*/
|
|
64
|
-
|
|
65
|
+
s(this, "code");
|
|
65
66
|
/**
|
|
66
67
|
* Тип элемента.
|
|
67
68
|
*/
|
|
68
|
-
|
|
69
|
+
s(this, "type");
|
|
69
70
|
this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
|
|
70
71
|
}
|
|
71
72
|
}
|
|
@@ -80,7 +81,7 @@ class $e extends je {
|
|
|
80
81
|
/**
|
|
81
82
|
* Признак того, что категория является основной для продукта.
|
|
82
83
|
*/
|
|
83
|
-
|
|
84
|
+
s(this, "isPrimary");
|
|
84
85
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
@@ -95,20 +96,20 @@ class ie extends $e {
|
|
|
95
96
|
/**
|
|
96
97
|
* Признак того, что категория скрыта.
|
|
97
98
|
*/
|
|
98
|
-
|
|
99
|
+
s(this, "isHidden");
|
|
99
100
|
/**
|
|
100
101
|
* Целочисленный идентификатор родителя (родительской записи).
|
|
101
102
|
*/
|
|
102
|
-
|
|
103
|
+
s(this, "parentCategoryId");
|
|
103
104
|
/**
|
|
104
105
|
* Список свойств. Число свойств в объекте не ограничено.
|
|
105
106
|
*/
|
|
106
|
-
|
|
107
|
+
s(this, "properties");
|
|
107
108
|
/**
|
|
108
109
|
* Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
|
|
109
110
|
*/
|
|
110
|
-
|
|
111
|
-
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(([
|
|
111
|
+
s(this, "currencyRates");
|
|
112
|
+
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [lr(t), i])) : void 0;
|
|
112
113
|
}
|
|
113
114
|
}
|
|
114
115
|
var Ve = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ve || {});
|
|
@@ -123,11 +124,11 @@ class w extends $ {
|
|
|
123
124
|
/**
|
|
124
125
|
* Краткое название.
|
|
125
126
|
*/
|
|
126
|
-
|
|
127
|
+
s(this, "slug");
|
|
127
128
|
/**
|
|
128
129
|
* Описание.
|
|
129
130
|
*/
|
|
130
|
-
|
|
131
|
+
s(this, "description");
|
|
131
132
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
132
133
|
}
|
|
133
134
|
}
|
|
@@ -149,23 +150,23 @@ class Ie {
|
|
|
149
150
|
/**
|
|
150
151
|
* Коэффициент цены на продукт.
|
|
151
152
|
*/
|
|
152
|
-
|
|
153
|
+
s(this, "coefficient");
|
|
153
154
|
/**
|
|
154
155
|
* Значение коэффициента.
|
|
155
156
|
*/
|
|
156
|
-
|
|
157
|
+
s(this, "value");
|
|
157
158
|
/**
|
|
158
159
|
* Цена на продукт по коэффициенту в валюте продукта.
|
|
159
160
|
*/
|
|
160
|
-
|
|
161
|
+
s(this, "cost");
|
|
161
162
|
/**
|
|
162
163
|
* Процент скидки от розничной цены по текущему коэффициенту.
|
|
163
164
|
*/
|
|
164
|
-
|
|
165
|
+
s(this, "percent");
|
|
165
166
|
/**
|
|
166
167
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
167
168
|
*/
|
|
168
|
-
|
|
169
|
+
s(this, "readOnly");
|
|
169
170
|
this.coefficient = new fe(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;
|
|
170
171
|
}
|
|
171
172
|
}
|
|
@@ -179,11 +180,11 @@ class Ee {
|
|
|
179
180
|
/**
|
|
180
181
|
* Широта.
|
|
181
182
|
*/
|
|
182
|
-
|
|
183
|
+
s(this, "lat");
|
|
183
184
|
/**
|
|
184
185
|
* Долгота.
|
|
185
186
|
*/
|
|
186
|
-
|
|
187
|
+
s(this, "long");
|
|
187
188
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
188
189
|
}
|
|
189
190
|
}
|
|
@@ -196,29 +197,29 @@ class ye extends w {
|
|
|
196
197
|
* @param data Данные для первоначальной инициализации.
|
|
197
198
|
*/
|
|
198
199
|
constructor(e) {
|
|
199
|
-
var
|
|
200
|
+
var t;
|
|
200
201
|
super(e);
|
|
201
202
|
/**
|
|
202
203
|
* Адрес склада.
|
|
203
204
|
*/
|
|
204
|
-
|
|
205
|
+
s(this, "address");
|
|
205
206
|
/**
|
|
206
207
|
* Признак того, что склад является основным.
|
|
207
208
|
*/
|
|
208
|
-
|
|
209
|
+
s(this, "isMain");
|
|
209
210
|
/**
|
|
210
211
|
* Список типов доставки.
|
|
211
212
|
*/
|
|
212
|
-
|
|
213
|
+
s(this, "deliveryTypes");
|
|
213
214
|
/**
|
|
214
215
|
* Список идентификаторов регионов, в которые осуществляется доставка со склада.
|
|
215
216
|
*/
|
|
216
|
-
|
|
217
|
+
s(this, "regions");
|
|
217
218
|
/**
|
|
218
219
|
* Координаты склада.
|
|
219
220
|
*/
|
|
220
|
-
|
|
221
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((
|
|
221
|
+
s(this, "coordinates");
|
|
222
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Ee(e == null ? void 0 : e.coordinates);
|
|
222
223
|
}
|
|
223
224
|
}
|
|
224
225
|
class Lr {
|
|
@@ -231,31 +232,31 @@ class Lr {
|
|
|
231
232
|
/**
|
|
232
233
|
* Данные склада.
|
|
233
234
|
*/
|
|
234
|
-
|
|
235
|
+
s(this, "warehouse");
|
|
235
236
|
/**
|
|
236
237
|
* Количество остатков товара на складе.
|
|
237
238
|
*/
|
|
238
|
-
|
|
239
|
+
s(this, "count");
|
|
239
240
|
this.warehouse = new ye(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
240
241
|
}
|
|
241
242
|
}
|
|
242
|
-
const
|
|
243
|
+
const V = class V {
|
|
243
244
|
/**
|
|
244
245
|
* Инициализирует и возвращает конфигурацию приложения.
|
|
245
246
|
*
|
|
246
247
|
* @param config Данные для первоначальной инициализации.
|
|
247
248
|
*/
|
|
248
249
|
static init(r) {
|
|
249
|
-
|
|
250
|
+
V.config = r;
|
|
250
251
|
}
|
|
251
252
|
/**
|
|
252
253
|
* Возвращает текущую конфигурацию приложения.
|
|
253
254
|
*/
|
|
254
255
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
255
256
|
static getConfig() {
|
|
256
|
-
if (pr(
|
|
257
|
+
if (pr(V.config))
|
|
257
258
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
258
|
-
return
|
|
259
|
+
return V.config;
|
|
259
260
|
}
|
|
260
261
|
/**
|
|
261
262
|
* Выполняет загрузку конфигурации по указанному пути.
|
|
@@ -263,19 +264,19 @@ const j = class j {
|
|
|
263
264
|
* @param path Путь к конфигурации.
|
|
264
265
|
*/
|
|
265
266
|
static loadRemoteConfig(r = "/config.json") {
|
|
266
|
-
const e = fetch(r).then((
|
|
267
|
+
const e = fetch(r).then((t) => t.ok ? t.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${t.statusText}`)), new Promise((i) => {
|
|
267
268
|
i({});
|
|
268
269
|
})));
|
|
269
|
-
return e.catch((
|
|
270
|
-
console.error(
|
|
270
|
+
return e.catch((t) => {
|
|
271
|
+
console.error(t);
|
|
271
272
|
}), e;
|
|
272
273
|
}
|
|
273
274
|
};
|
|
274
275
|
/**
|
|
275
276
|
* Конфигурация приложения.
|
|
276
277
|
*/
|
|
277
|
-
|
|
278
|
-
let b =
|
|
278
|
+
s(V, "config");
|
|
279
|
+
let b = V;
|
|
279
280
|
class Ir extends je {
|
|
280
281
|
/**
|
|
281
282
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
@@ -287,7 +288,7 @@ class Ir extends je {
|
|
|
287
288
|
/**
|
|
288
289
|
* Признак того, что категория скрыта.
|
|
289
290
|
*/
|
|
290
|
-
|
|
291
|
+
s(this, "isHidden");
|
|
291
292
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
292
293
|
}
|
|
293
294
|
}
|
|
@@ -302,15 +303,15 @@ class xr {
|
|
|
302
303
|
/**
|
|
303
304
|
* Путь к основному изображению.
|
|
304
305
|
*/
|
|
305
|
-
|
|
306
|
+
s(this, "image");
|
|
306
307
|
/**
|
|
307
308
|
* Путь к предпросмотру изображения.
|
|
308
309
|
*/
|
|
309
|
-
|
|
310
|
+
s(this, "preview");
|
|
310
311
|
/**
|
|
311
312
|
* Признак того, что изображение является основным.
|
|
312
313
|
*/
|
|
313
|
-
|
|
314
|
+
s(this, "isDefault");
|
|
314
315
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
315
316
|
}
|
|
316
317
|
}
|
|
@@ -326,89 +327,89 @@ class _ extends Ir {
|
|
|
326
327
|
/**
|
|
327
328
|
* Артикул производителя/поставщика.
|
|
328
329
|
*/
|
|
329
|
-
|
|
330
|
+
s(this, "supplierSku");
|
|
330
331
|
/**
|
|
331
332
|
* Единица измерения.
|
|
332
333
|
*/
|
|
333
|
-
|
|
334
|
+
s(this, "unit");
|
|
334
335
|
/**
|
|
335
336
|
* Норма упаковки.
|
|
336
337
|
*/
|
|
337
|
-
|
|
338
|
+
s(this, "pack");
|
|
338
339
|
/**
|
|
339
340
|
* Минимальное количество товара для заказа.
|
|
340
341
|
*/
|
|
341
|
-
|
|
342
|
+
s(this, "minCount");
|
|
342
343
|
/**
|
|
343
344
|
* Единица измерения количества товара.
|
|
344
345
|
*/
|
|
345
|
-
|
|
346
|
+
s(this, "quantityUnit");
|
|
346
347
|
/**
|
|
347
348
|
* Валюта товара или услуги.
|
|
348
349
|
*/
|
|
349
|
-
|
|
350
|
+
s(this, "currency");
|
|
350
351
|
/**
|
|
351
352
|
* Сигнатура валюты.
|
|
352
353
|
*/
|
|
353
|
-
|
|
354
|
+
s(this, "currencySignature");
|
|
354
355
|
/**
|
|
355
356
|
* Стоимость товара или услуги.
|
|
356
357
|
*/
|
|
357
|
-
|
|
358
|
+
s(this, "cost");
|
|
358
359
|
/**
|
|
359
360
|
* Стоимость продукта в рублях.
|
|
360
361
|
*/
|
|
361
|
-
|
|
362
|
+
s(this, "costRub");
|
|
362
363
|
/**
|
|
363
364
|
* Дата установки цены.
|
|
364
365
|
*/
|
|
365
|
-
|
|
366
|
+
s(this, "costDate");
|
|
366
367
|
/**
|
|
367
368
|
* Признак товара "Под заказ".
|
|
368
369
|
*/
|
|
369
|
-
|
|
370
|
+
s(this, "onOrder");
|
|
370
371
|
/**
|
|
371
372
|
* Данные о количестве товара, доступном на складах.
|
|
372
373
|
*/
|
|
373
|
-
|
|
374
|
+
s(this, "stockCount");
|
|
374
375
|
/**
|
|
375
376
|
* Основная категория продукта.
|
|
376
377
|
*/
|
|
377
|
-
|
|
378
|
+
s(this, "category");
|
|
378
379
|
/**
|
|
379
380
|
* Список категорий продукта.
|
|
380
381
|
*/
|
|
381
|
-
|
|
382
|
+
s(this, "categories");
|
|
382
383
|
/**
|
|
383
384
|
* Список изображений.
|
|
384
385
|
*/
|
|
385
|
-
|
|
386
|
+
s(this, "images");
|
|
386
387
|
/**
|
|
387
388
|
* Список свойств продукта.
|
|
388
389
|
*/
|
|
389
|
-
|
|
390
|
+
s(this, "properties");
|
|
390
391
|
/**
|
|
391
392
|
* Розничная цена.
|
|
392
393
|
*/
|
|
393
|
-
|
|
394
|
+
s(this, "retailCost");
|
|
394
395
|
/**
|
|
395
396
|
* Розничная стоимость продукта в рублях.
|
|
396
397
|
*/
|
|
397
|
-
|
|
398
|
+
s(this, "retailCostRub");
|
|
398
399
|
/**
|
|
399
400
|
* Список коэффициентов цен на продукт.
|
|
400
401
|
*/
|
|
401
|
-
|
|
402
|
+
s(this, "priceCoefficients");
|
|
402
403
|
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) ? f(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((g) => new Lr(g))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
|
|
403
|
-
const
|
|
404
|
-
|
|
404
|
+
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
405
|
+
t && (this.category = new $e({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new $e(g))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((g) => new xr(g, b.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((g) => new Ie(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
405
406
|
}
|
|
406
407
|
/**
|
|
407
408
|
* Возвращает признак, что это измеряемый товар.
|
|
408
409
|
*/
|
|
409
410
|
getIsMeasurable() {
|
|
410
|
-
var
|
|
411
|
-
const e = (
|
|
411
|
+
var t;
|
|
412
|
+
const e = (t = b.getConfig().catalog) == null ? void 0 : t.products.units;
|
|
412
413
|
return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
|
|
413
414
|
}
|
|
414
415
|
/**
|
|
@@ -424,7 +425,7 @@ class _ extends Ir {
|
|
|
424
425
|
return this.retailCostRub ?? this.costRub;
|
|
425
426
|
}
|
|
426
427
|
}
|
|
427
|
-
class kr extends
|
|
428
|
+
class kr extends z {
|
|
428
429
|
/**
|
|
429
430
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
430
431
|
*
|
|
@@ -435,47 +436,47 @@ class kr extends H {
|
|
|
435
436
|
/**
|
|
436
437
|
* Данные о категории.
|
|
437
438
|
*/
|
|
438
|
-
|
|
439
|
+
s(this, "category");
|
|
439
440
|
/**
|
|
440
441
|
* Данные о товаре/услуге.
|
|
441
442
|
*/
|
|
442
|
-
|
|
443
|
+
s(this, "product");
|
|
443
444
|
/**
|
|
444
445
|
* Количество товара/услуги.
|
|
445
446
|
*/
|
|
446
|
-
|
|
447
|
+
s(this, "quantity");
|
|
447
448
|
/**
|
|
448
449
|
* Высота товара.
|
|
449
450
|
*/
|
|
450
|
-
|
|
451
|
+
s(this, "height");
|
|
451
452
|
/**
|
|
452
453
|
* Длина товара.
|
|
453
454
|
*/
|
|
454
|
-
|
|
455
|
+
s(this, "length");
|
|
455
456
|
/**
|
|
456
457
|
* Ширина товара.
|
|
457
458
|
*/
|
|
458
|
-
|
|
459
|
+
s(this, "width");
|
|
459
460
|
/**
|
|
460
461
|
* Штрих-код продукта.
|
|
461
462
|
*/
|
|
462
|
-
|
|
463
|
+
s(this, "barcode");
|
|
463
464
|
/**
|
|
464
465
|
* Пользовательское описание позиции.
|
|
465
466
|
*/
|
|
466
|
-
|
|
467
|
+
s(this, "marker");
|
|
467
468
|
/**
|
|
468
469
|
* Название конфигуратора.
|
|
469
470
|
*/
|
|
470
|
-
|
|
471
|
+
s(this, "configurator");
|
|
471
472
|
/**
|
|
472
473
|
* Параметры конфигуратора.
|
|
473
474
|
*/
|
|
474
|
-
|
|
475
|
+
s(this, "configuratorParams");
|
|
475
476
|
/**
|
|
476
477
|
* Признак того, что позиция является дополнительной продажей.
|
|
477
478
|
*/
|
|
478
|
-
|
|
479
|
+
s(this, "isAdditionalSale");
|
|
479
480
|
this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ie(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && hr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
480
481
|
}
|
|
481
482
|
}
|
|
@@ -490,42 +491,42 @@ class Nr extends kr {
|
|
|
490
491
|
/**
|
|
491
492
|
* Валюта товара или услуги.
|
|
492
493
|
*/
|
|
493
|
-
|
|
494
|
+
s(this, "currency");
|
|
494
495
|
/**
|
|
495
496
|
* Итоговая стоимость товара или услуги в валюте.
|
|
496
497
|
*/
|
|
497
|
-
|
|
498
|
+
s(this, "cost");
|
|
498
499
|
/**
|
|
499
500
|
* Стоимость единицы товара или услуги в валюте.
|
|
500
501
|
*/
|
|
501
|
-
|
|
502
|
+
s(this, "costOne");
|
|
502
503
|
/**
|
|
503
504
|
* Стоимость единицы товара или услуги в рублях.
|
|
504
505
|
*/
|
|
505
|
-
|
|
506
|
+
s(this, "costOneRub");
|
|
506
507
|
/**
|
|
507
508
|
* Итоговая стоимость позиции корзины.
|
|
508
509
|
*/
|
|
509
|
-
|
|
510
|
+
s(this, "costRub");
|
|
510
511
|
/**
|
|
511
512
|
* Идентификатор логической группы товаров/услуг.
|
|
512
513
|
*/
|
|
513
|
-
|
|
514
|
+
s(this, "logicGroupId");
|
|
514
515
|
/**
|
|
515
516
|
* Направление продаж.
|
|
516
517
|
*/
|
|
517
|
-
|
|
518
|
+
s(this, "salesDirection");
|
|
518
519
|
/**
|
|
519
520
|
* URL изображения со спецификацией.
|
|
520
521
|
*/
|
|
521
|
-
|
|
522
|
+
s(this, "specificationImgUrl");
|
|
522
523
|
/**
|
|
523
524
|
* Список допустимых вариантов продольного распила.
|
|
524
525
|
*
|
|
525
526
|
* В качестве значения указывается ширина продукта, а в качестве ключа указывается код продукта,
|
|
526
527
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
527
528
|
*/
|
|
528
|
-
|
|
529
|
+
s(this, "sawing");
|
|
529
530
|
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;
|
|
530
531
|
}
|
|
531
532
|
}
|
|
@@ -539,15 +540,15 @@ class oe {
|
|
|
539
540
|
/**
|
|
540
541
|
* Список позиций товаров/услуг в корзине.
|
|
541
542
|
*/
|
|
542
|
-
|
|
543
|
+
s(this, "items");
|
|
543
544
|
/**
|
|
544
545
|
* Итоговая стоимость корзины в рублях.
|
|
545
546
|
*/
|
|
546
|
-
|
|
547
|
+
s(this, "resultSum");
|
|
547
548
|
/**
|
|
548
549
|
* Список итоговых сумм по направлениям продаж.
|
|
549
550
|
*/
|
|
550
|
-
|
|
551
|
+
s(this, "directionsSum");
|
|
551
552
|
this.items = r.items.map((e) => new Nr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
552
553
|
}
|
|
553
554
|
}
|
|
@@ -561,15 +562,15 @@ class Or {
|
|
|
561
562
|
/**
|
|
562
563
|
* Максимальное разрешение для распознания мобильного телефона.
|
|
563
564
|
*/
|
|
564
|
-
|
|
565
|
+
s(this, "phone");
|
|
565
566
|
/**
|
|
566
567
|
* Минимальное разрешение для распознания планшета.
|
|
567
568
|
*/
|
|
568
|
-
|
|
569
|
+
s(this, "tablet");
|
|
569
570
|
/**
|
|
570
571
|
* Минимальное разрешение для распознания компьютера.
|
|
571
572
|
*/
|
|
572
|
-
|
|
573
|
+
s(this, "laptop");
|
|
573
574
|
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;
|
|
574
575
|
}
|
|
575
576
|
}
|
|
@@ -583,15 +584,15 @@ class dr {
|
|
|
583
584
|
/**
|
|
584
585
|
* API URI для выполнения запросов.
|
|
585
586
|
*/
|
|
586
|
-
|
|
587
|
+
s(this, "apiUri");
|
|
587
588
|
/**
|
|
588
589
|
* URL медиа-сервера.
|
|
589
590
|
*/
|
|
590
|
-
|
|
591
|
+
s(this, "mediaUrl");
|
|
591
592
|
/**
|
|
592
593
|
* Время кэширования данных ответов на запросы (секунд).
|
|
593
594
|
*/
|
|
594
|
-
|
|
595
|
+
s(this, "responseDataCacheTimeout");
|
|
595
596
|
this.apiUri = (r == null ? void 0 : r.apiUri) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
596
597
|
}
|
|
597
598
|
}
|
|
@@ -605,35 +606,35 @@ class qr {
|
|
|
605
606
|
/**
|
|
606
607
|
* DSN подключения к Sentry.
|
|
607
608
|
*/
|
|
608
|
-
|
|
609
|
+
s(this, "dsn");
|
|
609
610
|
/**
|
|
610
611
|
* Тип окружения.
|
|
611
612
|
*/
|
|
612
|
-
|
|
613
|
+
s(this, "environment");
|
|
613
614
|
/**
|
|
614
615
|
* Список игнорируемых ошибок.
|
|
615
616
|
*/
|
|
616
|
-
|
|
617
|
+
s(this, "ignoreErrors");
|
|
617
618
|
/**
|
|
618
619
|
* Настройки трассировкии событий.
|
|
619
620
|
*/
|
|
620
|
-
|
|
621
|
+
s(this, "trace");
|
|
621
622
|
/**
|
|
622
623
|
* Настройки записей сеансов.
|
|
623
624
|
*/
|
|
624
|
-
|
|
625
|
+
s(this, "replay");
|
|
625
626
|
/**
|
|
626
627
|
* Дополнительные параметры.
|
|
627
628
|
*/
|
|
628
|
-
|
|
629
|
-
var e,
|
|
629
|
+
s(this, "additionalParams");
|
|
630
|
+
var e, t, i, o;
|
|
630
631
|
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) ?? [
|
|
631
632
|
/Network\s{1,3}Error/,
|
|
632
633
|
/Request\s{1,3}aborted/,
|
|
633
634
|
/Request\s{1,3}failed\s{1,3}with\s{1,3}status\s{1,3}code\s{1,3}(401|403|422)/
|
|
634
635
|
], this.trace = {
|
|
635
636
|
allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
|
|
636
|
-
sampleRate: ((
|
|
637
|
+
sampleRate: ((t = r == null ? void 0 : r.trace) == null ? void 0 : t.sampleRate) ?? 0
|
|
637
638
|
}, this.replay = {
|
|
638
639
|
replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
|
|
639
640
|
replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
|
|
@@ -650,15 +651,15 @@ class Ur {
|
|
|
650
651
|
/**
|
|
651
652
|
* Дата релиза текущей версии приложения.
|
|
652
653
|
*/
|
|
653
|
-
|
|
654
|
+
s(this, "date");
|
|
654
655
|
/**
|
|
655
656
|
* Название релиза.
|
|
656
657
|
*/
|
|
657
|
-
|
|
658
|
+
s(this, "name");
|
|
658
659
|
/**
|
|
659
660
|
* Текущая версия приложения.
|
|
660
661
|
*/
|
|
661
|
-
|
|
662
|
+
s(this, "version");
|
|
662
663
|
this.date = m(r == null ? void 0 : r.date) ? f(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";
|
|
663
664
|
}
|
|
664
665
|
}
|
|
@@ -672,42 +673,42 @@ class vt {
|
|
|
672
673
|
/**
|
|
673
674
|
* Тип окружения.
|
|
674
675
|
*/
|
|
675
|
-
|
|
676
|
+
s(this, "environment");
|
|
676
677
|
/**
|
|
677
678
|
* Параметры разработки и отладки.
|
|
678
679
|
*/
|
|
679
|
-
|
|
680
|
+
s(this, "devMode");
|
|
680
681
|
/**
|
|
681
682
|
* Параметры HTTP-запросов.
|
|
682
683
|
*/
|
|
683
|
-
|
|
684
|
+
s(this, "http");
|
|
684
685
|
/**
|
|
685
686
|
* Список условного отношения разрешения экрана и типа устройств.
|
|
686
687
|
*/
|
|
687
|
-
|
|
688
|
+
s(this, "deviceTypeByResolution");
|
|
688
689
|
/**
|
|
689
690
|
* Настройки системы журналирования ошибок Sentry.
|
|
690
691
|
*/
|
|
691
|
-
|
|
692
|
+
s(this, "sentry");
|
|
692
693
|
/**
|
|
693
694
|
* Список дополнительных URL-адресов.
|
|
694
695
|
*/
|
|
695
|
-
|
|
696
|
+
s(this, "urls");
|
|
696
697
|
/**
|
|
697
698
|
* Данные о текущем выпуске приложения.
|
|
698
699
|
*/
|
|
699
|
-
|
|
700
|
+
s(this, "version");
|
|
700
701
|
/**
|
|
701
702
|
* Форматы дат.
|
|
702
703
|
*/
|
|
703
|
-
|
|
704
|
-
var e,
|
|
704
|
+
s(this, "dateFormats");
|
|
705
|
+
var e, t, i;
|
|
705
706
|
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new dr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Or(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new qr({
|
|
706
707
|
environment: this.environment,
|
|
707
708
|
...r == null ? void 0 : r.sentry
|
|
708
709
|
}), this.urls = r == null ? void 0 : r.urls, this.version = new Ur(r == null ? void 0 : r.version), this.dateFormats = {
|
|
709
710
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
710
|
-
uiDate: ((
|
|
711
|
+
uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
|
|
711
712
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
712
713
|
};
|
|
713
714
|
}
|
|
@@ -731,18 +732,17 @@ class xe {
|
|
|
731
732
|
return new r(e);
|
|
732
733
|
}
|
|
733
734
|
}
|
|
734
|
-
const
|
|
735
|
+
const a = class a {
|
|
735
736
|
/**
|
|
736
737
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
737
738
|
*
|
|
738
739
|
* @param baseUrl Базовый URL для выполнения запросов.
|
|
739
|
-
* @param extraHeaders Список дополнительных заголовков.
|
|
740
740
|
*/
|
|
741
|
-
constructor(r
|
|
741
|
+
constructor(r) {
|
|
742
742
|
/**
|
|
743
743
|
* Клиент для выполнения запросов данных.
|
|
744
744
|
*/
|
|
745
|
-
|
|
745
|
+
s(this, "httpClient");
|
|
746
746
|
/**
|
|
747
747
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы текущего экземпляра класса.
|
|
748
748
|
*
|
|
@@ -750,24 +750,23 @@ const S = class S {
|
|
|
750
750
|
* - error Данные об ошибке.
|
|
751
751
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
752
752
|
*/
|
|
753
|
-
|
|
754
|
-
const
|
|
755
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
753
|
+
s(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
754
|
+
const e = b.getConfig().version;
|
|
755
|
+
this.defaultInstanceNotificationErrorResponseHandler = a.baseDefaultNotificationErrorResponseHandler, this.httpClient = Sr.create({
|
|
756
756
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
757
757
|
baseURL: r,
|
|
758
758
|
headers: {
|
|
759
|
-
"APP-VERSION": `${
|
|
759
|
+
"APP-VERSION": `${e.name} (${e.version}, ${W(e.date, b.getConfig().dateFormats.uiDate)})`,
|
|
760
760
|
Accept: "application/json",
|
|
761
|
-
"Content-Type": "application/json"
|
|
762
|
-
...e
|
|
761
|
+
"Content-Type": "application/json"
|
|
763
762
|
}
|
|
764
763
|
}), this.httpClient.interceptors.request.use(
|
|
765
|
-
(
|
|
766
|
-
(
|
|
764
|
+
(t) => (t.method && (t.method === "get" && t.params && (t.params = Oe(t.params)), ["put", "patch", "post"].includes(gr(t.method)) && t.data && (t.data = Oe(t.data))), t),
|
|
765
|
+
(t) => Promise.reject(t)
|
|
767
766
|
), this.httpClient.interceptors.response.use(
|
|
768
|
-
(
|
|
767
|
+
(t) => (t.data && (t.data = ar(t.data)), t),
|
|
769
768
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
770
|
-
(
|
|
769
|
+
(t) => a.convertHttpErrorResponse(t)
|
|
771
770
|
);
|
|
772
771
|
}
|
|
773
772
|
/**
|
|
@@ -776,7 +775,7 @@ const S = class S {
|
|
|
776
775
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
777
776
|
*/
|
|
778
777
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
779
|
-
|
|
778
|
+
a.baseDefaultNotificationErrorResponseHandler = r;
|
|
780
779
|
}
|
|
781
780
|
/**
|
|
782
781
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -784,7 +783,7 @@ const S = class S {
|
|
|
784
783
|
* @param type Тип данных, которыми оперирует метод.
|
|
785
784
|
*/
|
|
786
785
|
static getInstance(r) {
|
|
787
|
-
return Object.prototype.hasOwnProperty.call(
|
|
786
|
+
return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = xe.simpleInstanceInitializer(r)), a.instances[r.name];
|
|
788
787
|
}
|
|
789
788
|
/**
|
|
790
789
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -792,12 +791,12 @@ const S = class S {
|
|
|
792
791
|
* @param error Данные об ошибке.
|
|
793
792
|
*/
|
|
794
793
|
static convertHttpErrorResponse(r) {
|
|
795
|
-
var
|
|
794
|
+
var t, i;
|
|
796
795
|
const e = r == null ? void 0 : r.response;
|
|
797
796
|
return Promise.reject({
|
|
798
797
|
status: (e == null ? void 0 : e.status) ?? 0,
|
|
799
798
|
statusText: (e == null ? void 0 : e.statusText) ?? "Unknown",
|
|
800
|
-
message: ((
|
|
799
|
+
message: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.message) ?? "Unknown Error. Probably network error.",
|
|
801
800
|
errors: (i = e == null ? void 0 : e.data) == null ? void 0 : i.errors,
|
|
802
801
|
headers: (e == null ? void 0 : e.headers) ?? {},
|
|
803
802
|
data: e == null ? void 0 : e.data,
|
|
@@ -812,10 +811,10 @@ const S = class S {
|
|
|
812
811
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
813
812
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
814
813
|
*/
|
|
815
|
-
request(r, e = void 0,
|
|
814
|
+
request(r, e = void 0, t = {}, i = !1) {
|
|
816
815
|
const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
|
|
817
816
|
return i || o.catch((c) => {
|
|
818
|
-
this.defaultInstanceNotificationErrorResponseHandler(c,
|
|
817
|
+
this.defaultInstanceNotificationErrorResponseHandler(c, t);
|
|
819
818
|
}), o;
|
|
820
819
|
}
|
|
821
820
|
/**
|
|
@@ -826,8 +825,8 @@ const S = class S {
|
|
|
826
825
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
827
826
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
828
827
|
*/
|
|
829
|
-
get(r, e = {},
|
|
830
|
-
return this.request({ method: "GET", url: r, params: e },
|
|
828
|
+
get(r, e = {}, t = void 0, i = !1) {
|
|
829
|
+
return this.request({ method: "GET", url: r, params: e }, t, {}, i);
|
|
831
830
|
}
|
|
832
831
|
/**
|
|
833
832
|
* Выполняет get-запрос с параметрами по умолчанию и возвращает Blob.
|
|
@@ -837,8 +836,8 @@ const S = class S {
|
|
|
837
836
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
838
837
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
839
838
|
*/
|
|
840
|
-
getBlob(r, e = {},
|
|
841
|
-
return this.request({ method: "GET", url: r, params: e, responseType: "blob" },
|
|
839
|
+
getBlob(r, e = {}, t = void 0, i = !1) {
|
|
840
|
+
return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {}, i);
|
|
842
841
|
}
|
|
843
842
|
/**
|
|
844
843
|
* Выполняет patch-запрос с параметрами по умолчанию.
|
|
@@ -849,8 +848,8 @@ const S = class S {
|
|
|
849
848
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
850
849
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
851
850
|
*/
|
|
852
|
-
patch(r, e = {},
|
|
853
|
-
return this.request({ method: "PATCH", url: r, data: e },
|
|
851
|
+
patch(r, e = {}, t = void 0, i = {}, o = !1) {
|
|
852
|
+
return this.request({ method: "PATCH", url: r, data: e }, t, i, o);
|
|
854
853
|
}
|
|
855
854
|
/**
|
|
856
855
|
* Выполняет post-запрос с параметрами по умолчанию.
|
|
@@ -861,8 +860,8 @@ const S = class S {
|
|
|
861
860
|
* @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
862
861
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
863
862
|
*/
|
|
864
|
-
post(r, e = {},
|
|
865
|
-
return this.request({ method: "POST", url: r, data: e },
|
|
863
|
+
post(r, e = {}, t = void 0, i = {}, o = !1) {
|
|
864
|
+
return this.request({ method: "POST", url: r, data: e }, t, i, o);
|
|
866
865
|
}
|
|
867
866
|
/**
|
|
868
867
|
* Выполняет delete-запрос с параметрами по умолчанию.
|
|
@@ -871,38 +870,37 @@ const S = class S {
|
|
|
871
870
|
* @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
|
|
872
871
|
* @param disableDefaultNotificationErrorResponseHandler Признак необходимости отключить обработчик ошибок по умолчанию используемый для текущего экземпляра класса.
|
|
873
872
|
*/
|
|
874
|
-
delete(r, e = void 0,
|
|
875
|
-
return this.request({ method: "DELETE", url: r }, e, {},
|
|
873
|
+
delete(r, e = void 0, t = !1) {
|
|
874
|
+
return this.request({ method: "DELETE", url: r }, e, {}, t);
|
|
876
875
|
}
|
|
877
876
|
};
|
|
878
877
|
/**
|
|
879
878
|
* Экземпляр объекта текущего класса.
|
|
880
879
|
*/
|
|
881
880
|
// eslint-disable-next-line no-use-before-define
|
|
882
|
-
|
|
881
|
+
s(a, "instances", {}), /**
|
|
883
882
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
884
883
|
*
|
|
885
884
|
* Параметры:
|
|
886
885
|
* - error Данные об ошибке.
|
|
887
886
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
888
887
|
*/
|
|
889
|
-
|
|
890
|
-
let be =
|
|
891
|
-
const
|
|
888
|
+
s(a, "baseDefaultNotificationErrorResponseHandler", y);
|
|
889
|
+
let be = a;
|
|
890
|
+
const E = class E extends be {
|
|
892
891
|
/**
|
|
893
892
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
894
893
|
*
|
|
895
894
|
* @param baseUrl Базовый URL для выполнения запросов.
|
|
896
|
-
* @param extraHeaders Список дополнительных заголовков.
|
|
897
895
|
*/
|
|
898
|
-
constructor(e
|
|
899
|
-
super(e
|
|
896
|
+
constructor(e) {
|
|
897
|
+
super(e);
|
|
900
898
|
/**
|
|
901
899
|
* Время кэширования данных ответов на запросы (секунд).
|
|
902
900
|
*/
|
|
903
|
-
|
|
904
|
-
const
|
|
905
|
-
this.responseDataCacheTimeout =
|
|
901
|
+
s(this, "responseDataCacheTimeout");
|
|
902
|
+
const t = b.getConfig();
|
|
903
|
+
this.responseDataCacheTimeout = t.http.responseDataCacheTimeout;
|
|
906
904
|
}
|
|
907
905
|
/**
|
|
908
906
|
* Возвращает кэшированные данные.
|
|
@@ -911,9 +909,9 @@ const V = class V extends be {
|
|
|
911
909
|
* @param key Ключ запроса.
|
|
912
910
|
*/
|
|
913
911
|
static getCachedResponse(e) {
|
|
914
|
-
const
|
|
915
|
-
if (
|
|
916
|
-
return
|
|
912
|
+
const t = E.responseDataCache.get(e);
|
|
913
|
+
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
914
|
+
return t.val;
|
|
917
915
|
}
|
|
918
916
|
/**
|
|
919
917
|
* Сохраняет указанные данные из запроса в кэш результатов.
|
|
@@ -921,10 +919,10 @@ const V = class V extends be {
|
|
|
921
919
|
* @param url URL запроса.
|
|
922
920
|
* @param data Данные для кэширования.
|
|
923
921
|
*/
|
|
924
|
-
cacheResponse(e,
|
|
925
|
-
|
|
922
|
+
cacheResponse(e, t) {
|
|
923
|
+
E.responseDataCache.set(e, {
|
|
926
924
|
validTo: Cr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
927
|
-
val:
|
|
925
|
+
val: t
|
|
928
926
|
});
|
|
929
927
|
}
|
|
930
928
|
/**
|
|
@@ -937,27 +935,33 @@ const V = class V extends be {
|
|
|
937
935
|
* @param params Дополнительные параметры запроса.
|
|
938
936
|
*/
|
|
939
937
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
940
|
-
getTypedDataArrayRequester(e,
|
|
941
|
-
const c =
|
|
942
|
-
return u ? Promise.resolve(u) : this.get(
|
|
938
|
+
getTypedDataArrayRequester(e, t, i = !1, o = {}) {
|
|
939
|
+
const c = t + (ae(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? E.getCachedResponse(c) : void 0;
|
|
940
|
+
return u ? Promise.resolve(u) : this.get(t, o).then((g) => {
|
|
943
941
|
const R = g.map((A) => xe.instanceInitializer(e, A));
|
|
944
|
-
return i && R && this.cacheResponse(
|
|
942
|
+
return i && R && this.cacheResponse(t, R), R;
|
|
945
943
|
});
|
|
946
944
|
}
|
|
947
945
|
};
|
|
948
946
|
/**
|
|
949
947
|
* Кэш результатов запросов.
|
|
950
948
|
*/
|
|
951
|
-
|
|
952
|
-
let Te =
|
|
949
|
+
s(E, "responseDataCache", /* @__PURE__ */ new Map());
|
|
950
|
+
let Te = E;
|
|
953
951
|
class p extends Te {
|
|
954
952
|
/**
|
|
955
953
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
956
954
|
*/
|
|
957
955
|
constructor() {
|
|
958
|
-
var
|
|
959
|
-
const r = b.getConfig()
|
|
960
|
-
(
|
|
956
|
+
var e;
|
|
957
|
+
const r = b.getConfig();
|
|
958
|
+
super(`${r.http.apiUri}/api`), (e = r.devMode) != null && e.authBearerToken && this.httpClient.interceptors.request.use(
|
|
959
|
+
(t) => {
|
|
960
|
+
var i;
|
|
961
|
+
return t.headers.set("Authorization", `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), t;
|
|
962
|
+
},
|
|
963
|
+
(t) => Promise.reject(t)
|
|
964
|
+
);
|
|
961
965
|
}
|
|
962
966
|
}
|
|
963
967
|
class Pt extends p {
|
|
@@ -992,7 +996,7 @@ class Pt extends p {
|
|
|
992
996
|
*
|
|
993
997
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_item
|
|
994
998
|
*/
|
|
995
|
-
addCartItem(r, e,
|
|
999
|
+
addCartItem(r, e, t = {}) {
|
|
996
1000
|
return this.patch(
|
|
997
1001
|
`internal/clients/${r.id}/cart`,
|
|
998
1002
|
{
|
|
@@ -1008,7 +1012,7 @@ class Pt extends p {
|
|
|
1008
1012
|
...e.configuratorParams
|
|
1009
1013
|
},
|
|
1010
1014
|
(i) => new oe(i.data),
|
|
1011
|
-
|
|
1015
|
+
t
|
|
1012
1016
|
);
|
|
1013
1017
|
}
|
|
1014
1018
|
/**
|
|
@@ -1022,7 +1026,7 @@ class Pt extends p {
|
|
|
1022
1026
|
*
|
|
1023
1027
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_modify_item
|
|
1024
1028
|
*/
|
|
1025
|
-
patchCartItem(r, e,
|
|
1029
|
+
patchCartItem(r, e, t = {}) {
|
|
1026
1030
|
return this.patch(
|
|
1027
1031
|
`internal/clients/${r.id}/cart/${e.id}`,
|
|
1028
1032
|
{
|
|
@@ -1038,7 +1042,7 @@ class Pt extends p {
|
|
|
1038
1042
|
...e.configuratorParams
|
|
1039
1043
|
},
|
|
1040
1044
|
(i) => new oe(i.data),
|
|
1041
|
-
|
|
1045
|
+
t
|
|
1042
1046
|
);
|
|
1043
1047
|
}
|
|
1044
1048
|
/**
|
|
@@ -1071,17 +1075,17 @@ class q extends ie {
|
|
|
1071
1075
|
* @param data Данные для первоначальной инициализации.
|
|
1072
1076
|
*/
|
|
1073
1077
|
constructor(e) {
|
|
1074
|
-
var
|
|
1078
|
+
var t, i;
|
|
1075
1079
|
super(e);
|
|
1076
1080
|
/**
|
|
1077
1081
|
* Данные о вложенных категориях.
|
|
1078
1082
|
*/
|
|
1079
|
-
|
|
1083
|
+
s(this, "categories");
|
|
1080
1084
|
/**
|
|
1081
1085
|
* Список продуктов категории.
|
|
1082
1086
|
*/
|
|
1083
|
-
|
|
1084
|
-
this.categories = (
|
|
1087
|
+
s(this, "products");
|
|
1088
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
|
|
1085
1089
|
}
|
|
1086
1090
|
}
|
|
1087
1091
|
class Ke extends $ {
|
|
@@ -1095,7 +1099,7 @@ class Ke extends $ {
|
|
|
1095
1099
|
/**
|
|
1096
1100
|
* Дата и время последнего изменения.
|
|
1097
1101
|
*/
|
|
1098
|
-
|
|
1102
|
+
s(this, "updatedAt");
|
|
1099
1103
|
this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1100
1104
|
}
|
|
1101
1105
|
}
|
|
@@ -1110,7 +1114,7 @@ class Fr extends Ke {
|
|
|
1110
1114
|
/**
|
|
1111
1115
|
* Дата и время последнего удаления.
|
|
1112
1116
|
*/
|
|
1113
|
-
|
|
1117
|
+
s(this, "deletedAt");
|
|
1114
1118
|
this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1115
1119
|
}
|
|
1116
1120
|
}
|
|
@@ -1124,9 +1128,9 @@ class Rt {
|
|
|
1124
1128
|
const e = localStorage.getItem(r);
|
|
1125
1129
|
if (e)
|
|
1126
1130
|
try {
|
|
1127
|
-
const
|
|
1128
|
-
if (vr(f(
|
|
1129
|
-
return
|
|
1131
|
+
const t = JSON.parse(e);
|
|
1132
|
+
if (vr(f(t.availableFor) || We(), /* @__PURE__ */ new Date()))
|
|
1133
|
+
return t.data ?? {};
|
|
1130
1134
|
} catch {
|
|
1131
1135
|
localStorage.removeItem(r);
|
|
1132
1136
|
}
|
|
@@ -1138,17 +1142,17 @@ class Rt {
|
|
|
1138
1142
|
* @param data Данные, которые необходимо сохранить.
|
|
1139
1143
|
* @param availableFor Дата и время до которого будут храниться настройки.
|
|
1140
1144
|
*/
|
|
1141
|
-
static saveActualDataToStorage(r, e,
|
|
1145
|
+
static saveActualDataToStorage(r, e, t) {
|
|
1142
1146
|
localStorage.setItem(
|
|
1143
1147
|
r,
|
|
1144
1148
|
JSON.stringify({
|
|
1145
|
-
availableFor:
|
|
1149
|
+
availableFor: t,
|
|
1146
1150
|
data: e
|
|
1147
1151
|
})
|
|
1148
1152
|
);
|
|
1149
1153
|
}
|
|
1150
1154
|
}
|
|
1151
|
-
class
|
|
1155
|
+
class G extends $ {
|
|
1152
1156
|
/**
|
|
1153
1157
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1154
1158
|
*
|
|
@@ -1159,7 +1163,7 @@ class U extends $ {
|
|
|
1159
1163
|
/**
|
|
1160
1164
|
* Тип пользователя.
|
|
1161
1165
|
*/
|
|
1162
|
-
|
|
1166
|
+
s(this, "type");
|
|
1163
1167
|
this.type = e == null ? void 0 : e.type;
|
|
1164
1168
|
}
|
|
1165
1169
|
}
|
|
@@ -1174,35 +1178,35 @@ class Hr extends $ {
|
|
|
1174
1178
|
/**
|
|
1175
1179
|
* Коэффициент стоимости продукта от розничной цены.
|
|
1176
1180
|
*/
|
|
1177
|
-
|
|
1181
|
+
s(this, "costCoefficient");
|
|
1178
1182
|
/**
|
|
1179
1183
|
* Признак того, что скидка допускает снижение цены ниже стоп-цены.
|
|
1180
1184
|
*/
|
|
1181
|
-
|
|
1185
|
+
s(this, "isLowPriceAllowed");
|
|
1182
1186
|
/**
|
|
1183
1187
|
* Дата и время начала действия скидки.
|
|
1184
1188
|
*/
|
|
1185
|
-
|
|
1189
|
+
s(this, "publishedAt");
|
|
1186
1190
|
/**
|
|
1187
1191
|
* Описание скидки.
|
|
1188
1192
|
*/
|
|
1189
|
-
|
|
1193
|
+
s(this, "description");
|
|
1190
1194
|
/**
|
|
1191
1195
|
* Процент скидки от розничной цены.
|
|
1192
1196
|
*/
|
|
1193
|
-
|
|
1197
|
+
s(this, "percent");
|
|
1194
1198
|
/**
|
|
1195
1199
|
* Краткие данные о пользователе.
|
|
1196
1200
|
*/
|
|
1197
|
-
|
|
1201
|
+
s(this, "owner");
|
|
1198
1202
|
/**
|
|
1199
1203
|
* Дата и время удаления.
|
|
1200
1204
|
*/
|
|
1201
|
-
|
|
1202
|
-
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) ? f(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
|
|
1205
|
+
s(this, "deletedAt");
|
|
1206
|
+
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) ? f(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) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1203
1207
|
}
|
|
1204
1208
|
}
|
|
1205
|
-
class
|
|
1209
|
+
class j extends Ke {
|
|
1206
1210
|
/**
|
|
1207
1211
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1208
1212
|
*
|
|
@@ -1213,11 +1217,11 @@ class W extends Ke {
|
|
|
1213
1217
|
/**
|
|
1214
1218
|
* Описание шаблона прайс-листа.
|
|
1215
1219
|
*/
|
|
1216
|
-
|
|
1220
|
+
s(this, "description");
|
|
1217
1221
|
/**
|
|
1218
1222
|
* Дата и время создания шаблона.
|
|
1219
1223
|
*/
|
|
1220
|
-
|
|
1224
|
+
s(this, "createdAt");
|
|
1221
1225
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1222
1226
|
}
|
|
1223
1227
|
}
|
|
@@ -1232,32 +1236,32 @@ class Q extends _ {
|
|
|
1232
1236
|
/**
|
|
1233
1237
|
* Коэффициент стоимости продукта от розничной цены.
|
|
1234
1238
|
*/
|
|
1235
|
-
|
|
1239
|
+
s(this, "costCoefficient");
|
|
1236
1240
|
/**
|
|
1237
1241
|
* Источник клиентской цены.
|
|
1238
1242
|
*/
|
|
1239
|
-
|
|
1243
|
+
s(this, "costSource");
|
|
1240
1244
|
/**
|
|
1241
1245
|
* Краткие данные скидки.
|
|
1242
1246
|
*/
|
|
1243
|
-
|
|
1247
|
+
s(this, "discount");
|
|
1244
1248
|
/**
|
|
1245
1249
|
* Данные о шаблоне прайс-листа.
|
|
1246
1250
|
*/
|
|
1247
|
-
|
|
1251
|
+
s(this, "priceTemplate");
|
|
1248
1252
|
/**
|
|
1249
1253
|
* Признак того, что указанный продукт входит в список ранее заказанных клиентом продуктов.
|
|
1250
1254
|
*/
|
|
1251
|
-
|
|
1255
|
+
s(this, "isPreviouslyOrdered");
|
|
1252
1256
|
/**
|
|
1253
1257
|
* Признак того, что указанный продукт входит в список продуктов для доп. продаж клиенту.
|
|
1254
1258
|
*/
|
|
1255
|
-
|
|
1259
|
+
s(this, "isRequired");
|
|
1256
1260
|
/**
|
|
1257
1261
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1258
1262
|
*/
|
|
1259
|
-
|
|
1260
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ke.Product, this.discount = e != null && e.discount ? new Hr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new
|
|
1263
|
+
s(this, "isFavorite");
|
|
1264
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ke.Product, this.discount = e != null && e.discount ? new Hr(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;
|
|
1261
1265
|
}
|
|
1262
1266
|
}
|
|
1263
1267
|
class zr {
|
|
@@ -1270,15 +1274,15 @@ class zr {
|
|
|
1270
1274
|
/**
|
|
1271
1275
|
* Номер телефона. В формате "79203436527" или "+79203436527".
|
|
1272
1276
|
*/
|
|
1273
|
-
|
|
1277
|
+
s(this, "phone");
|
|
1274
1278
|
/**
|
|
1275
1279
|
* Адрес электронной почты.
|
|
1276
1280
|
*/
|
|
1277
|
-
|
|
1281
|
+
s(this, "email");
|
|
1278
1282
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1279
1283
|
}
|
|
1280
1284
|
}
|
|
1281
|
-
class
|
|
1285
|
+
class S extends w {
|
|
1282
1286
|
}
|
|
1283
1287
|
class re extends $ {
|
|
1284
1288
|
/**
|
|
@@ -1291,20 +1295,20 @@ class re extends $ {
|
|
|
1291
1295
|
/**
|
|
1292
1296
|
* Направление продаж.
|
|
1293
1297
|
*/
|
|
1294
|
-
|
|
1298
|
+
s(this, "salesDirection", new S());
|
|
1295
1299
|
/**
|
|
1296
1300
|
* URI путь к фотографии пользователя.
|
|
1297
1301
|
*/
|
|
1298
|
-
|
|
1302
|
+
s(this, "photo");
|
|
1299
1303
|
/**
|
|
1300
1304
|
* Контакты менеджера
|
|
1301
1305
|
*/
|
|
1302
|
-
|
|
1306
|
+
s(this, "contacts");
|
|
1303
1307
|
/**
|
|
1304
1308
|
* Признак того, что менеджер является основным для клиента.
|
|
1305
1309
|
*/
|
|
1306
|
-
|
|
1307
|
-
e && (this.salesDirection = new
|
|
1310
|
+
s(this, "isDefault");
|
|
1311
|
+
e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new zr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1308
1312
|
}
|
|
1309
1313
|
}
|
|
1310
1314
|
class we extends re {
|
|
@@ -1318,23 +1322,23 @@ class we extends re {
|
|
|
1318
1322
|
/**
|
|
1319
1323
|
* Признак активности учетной записи менеджера.
|
|
1320
1324
|
*/
|
|
1321
|
-
|
|
1325
|
+
s(this, "isActive");
|
|
1322
1326
|
/**
|
|
1323
1327
|
* Признак того, что менеджер является супервайзером.
|
|
1324
1328
|
*/
|
|
1325
|
-
|
|
1329
|
+
s(this, "isSupervisor");
|
|
1326
1330
|
/**
|
|
1327
1331
|
* Признак того, что менеджер может работать с рекламациями.
|
|
1328
1332
|
*/
|
|
1329
|
-
|
|
1333
|
+
s(this, "canDoReclamations");
|
|
1330
1334
|
/**
|
|
1331
1335
|
* Дата регистрации.
|
|
1332
1336
|
*/
|
|
1333
|
-
|
|
1337
|
+
s(this, "createdAt");
|
|
1334
1338
|
/**
|
|
1335
1339
|
* Идентификатор супервайзера.
|
|
1336
1340
|
*/
|
|
1337
|
-
|
|
1341
|
+
s(this, "supervisorId");
|
|
1338
1342
|
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;
|
|
1339
1343
|
}
|
|
1340
1344
|
}
|
|
@@ -1349,23 +1353,23 @@ class Br extends ie {
|
|
|
1349
1353
|
/**
|
|
1350
1354
|
* Признак того, что указанная категория входит в список отключенных для клиента категорий.
|
|
1351
1355
|
*/
|
|
1352
|
-
|
|
1356
|
+
s(this, "isDisabled");
|
|
1353
1357
|
/**
|
|
1354
1358
|
* Признак того, что указанная категория входит в список категорий для доп. продаж клиенту.
|
|
1355
1359
|
*/
|
|
1356
|
-
|
|
1360
|
+
s(this, "isRequired");
|
|
1357
1361
|
/**
|
|
1358
1362
|
* Признак того, что указанная категория входит в список избранных категорий клиента.
|
|
1359
1363
|
*/
|
|
1360
|
-
|
|
1364
|
+
s(this, "isFavorite");
|
|
1361
1365
|
/**
|
|
1362
1366
|
* Причина скрытия категории для клиента.
|
|
1363
1367
|
*/
|
|
1364
|
-
|
|
1368
|
+
s(this, "hidingComment");
|
|
1365
1369
|
/**
|
|
1366
1370
|
* Данные о менеджере за которым закреплена категория.
|
|
1367
1371
|
*/
|
|
1368
|
-
|
|
1372
|
+
s(this, "manager");
|
|
1369
1373
|
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 we(e.manager) : void 0;
|
|
1370
1374
|
}
|
|
1371
1375
|
}
|
|
@@ -1376,17 +1380,17 @@ class le extends Br {
|
|
|
1376
1380
|
* @param data Данные для первоначальной инициализации.
|
|
1377
1381
|
*/
|
|
1378
1382
|
constructor(e) {
|
|
1379
|
-
var
|
|
1383
|
+
var t, i;
|
|
1380
1384
|
super(e);
|
|
1381
1385
|
/**
|
|
1382
1386
|
* Данные о вложенных категориях.
|
|
1383
1387
|
*/
|
|
1384
|
-
|
|
1388
|
+
s(this, "categories");
|
|
1385
1389
|
/**
|
|
1386
1390
|
* Список продуктов категории.
|
|
1387
1391
|
*/
|
|
1388
|
-
|
|
1389
|
-
this.categories = (
|
|
1392
|
+
s(this, "products");
|
|
1393
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new le(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Q(o));
|
|
1390
1394
|
}
|
|
1391
1395
|
}
|
|
1392
1396
|
class Je {
|
|
@@ -1399,11 +1403,11 @@ class Je {
|
|
|
1399
1403
|
/**
|
|
1400
1404
|
* Коэффициент цены.
|
|
1401
1405
|
*/
|
|
1402
|
-
|
|
1406
|
+
s(this, "priceCoefficient");
|
|
1403
1407
|
/**
|
|
1404
1408
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1405
1409
|
*/
|
|
1406
|
-
|
|
1410
|
+
s(this, "increasePercent");
|
|
1407
1411
|
this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new fe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1408
1412
|
}
|
|
1409
1413
|
}
|
|
@@ -1418,7 +1422,7 @@ class ve extends Je {
|
|
|
1418
1422
|
/**
|
|
1419
1423
|
* Базовые данные о продукте.
|
|
1420
1424
|
*/
|
|
1421
|
-
|
|
1425
|
+
s(this, "productCategory");
|
|
1422
1426
|
this.productCategory = new ie(e == null ? void 0 : e.productCategory);
|
|
1423
1427
|
}
|
|
1424
1428
|
}
|
|
@@ -1435,7 +1439,7 @@ class te extends w {
|
|
|
1435
1439
|
/**
|
|
1436
1440
|
* Данные о стране, в которой расположен регион.
|
|
1437
1441
|
*/
|
|
1438
|
-
|
|
1442
|
+
s(this, "country", new Y());
|
|
1439
1443
|
e && (this.country = new Y(e.country));
|
|
1440
1444
|
}
|
|
1441
1445
|
}
|
|
@@ -1450,7 +1454,7 @@ class ue extends w {
|
|
|
1450
1454
|
/**
|
|
1451
1455
|
* Данные о регионе, в котором расположен город.
|
|
1452
1456
|
*/
|
|
1453
|
-
|
|
1457
|
+
s(this, "region", new te());
|
|
1454
1458
|
e && (this.region = new te(e.region));
|
|
1455
1459
|
}
|
|
1456
1460
|
}
|
|
@@ -1465,32 +1469,32 @@ class Qe extends $ {
|
|
|
1465
1469
|
/**
|
|
1466
1470
|
* Номер телефона. В формате "79203436527" или "+79203436527".
|
|
1467
1471
|
*/
|
|
1468
|
-
|
|
1472
|
+
s(this, "phone");
|
|
1469
1473
|
/**
|
|
1470
1474
|
* Адрес электронной почты.
|
|
1471
1475
|
*/
|
|
1472
|
-
|
|
1476
|
+
s(this, "email");
|
|
1473
1477
|
/**
|
|
1474
1478
|
* Признак подписки на новости и информационные сообщения.
|
|
1475
1479
|
*/
|
|
1476
|
-
|
|
1480
|
+
s(this, "getNews");
|
|
1477
1481
|
/**
|
|
1478
1482
|
* Направление продаж.
|
|
1479
1483
|
*/
|
|
1480
|
-
|
|
1484
|
+
s(this, "salesDirection");
|
|
1481
1485
|
/**
|
|
1482
1486
|
* Дата и время регистрации пользователя.
|
|
1483
1487
|
*/
|
|
1484
|
-
|
|
1488
|
+
s(this, "createdAt");
|
|
1485
1489
|
/**
|
|
1486
1490
|
* Дата и время последней аутентификации пользователя.
|
|
1487
1491
|
*/
|
|
1488
|
-
|
|
1492
|
+
s(this, "lastLoginAt");
|
|
1489
1493
|
/**
|
|
1490
1494
|
* Признак активности учетной записи пользователя.
|
|
1491
1495
|
*/
|
|
1492
|
-
|
|
1493
|
-
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
|
|
1496
|
+
s(this, "isActive");
|
|
1497
|
+
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 S(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1494
1498
|
}
|
|
1495
1499
|
}
|
|
1496
1500
|
class ne extends Qe {
|
|
@@ -1501,44 +1505,44 @@ class ne extends Qe {
|
|
|
1501
1505
|
*/
|
|
1502
1506
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
1503
1507
|
constructor(e) {
|
|
1504
|
-
var
|
|
1508
|
+
var t;
|
|
1505
1509
|
super(e);
|
|
1506
1510
|
/**
|
|
1507
1511
|
* Направление продаж.
|
|
1508
1512
|
*/
|
|
1509
|
-
|
|
1513
|
+
s(this, "salesDirection");
|
|
1510
1514
|
/**
|
|
1511
1515
|
* Сумма задолженности/переплаты.
|
|
1512
1516
|
*/
|
|
1513
|
-
|
|
1517
|
+
s(this, "debt");
|
|
1514
1518
|
/**
|
|
1515
1519
|
* Альтернативное название клиента.
|
|
1516
1520
|
*/
|
|
1517
|
-
|
|
1521
|
+
s(this, "alternativeName");
|
|
1518
1522
|
/**
|
|
1519
1523
|
* Данные о городе.
|
|
1520
1524
|
*/
|
|
1521
|
-
|
|
1525
|
+
s(this, "city");
|
|
1522
1526
|
/**
|
|
1523
1527
|
* Комментарий к клиенту.
|
|
1524
1528
|
*/
|
|
1525
|
-
|
|
1529
|
+
s(this, "comment");
|
|
1526
1530
|
/**
|
|
1527
1531
|
* Признак того, что телефон клиента подтверждён.
|
|
1528
1532
|
*/
|
|
1529
|
-
|
|
1533
|
+
s(this, "isPhoneApproved");
|
|
1530
1534
|
/**
|
|
1531
1535
|
* Признак того, что адрес электронной почты клиента подтверждён.
|
|
1532
1536
|
*/
|
|
1533
|
-
|
|
1537
|
+
s(this, "isEmailApproved");
|
|
1534
1538
|
/**
|
|
1535
1539
|
* Список менеджеров клиента.
|
|
1536
1540
|
*/
|
|
1537
|
-
|
|
1538
|
-
this.salesDirection = new
|
|
1541
|
+
s(this, "managers");
|
|
1542
|
+
this.salesDirection = new S(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 ue(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((i) => new re(i))) ?? [];
|
|
1539
1543
|
}
|
|
1540
1544
|
}
|
|
1541
|
-
class X extends
|
|
1545
|
+
class X extends z {
|
|
1542
1546
|
/**
|
|
1543
1547
|
* Инициализирует новый экземпляр класса.
|
|
1544
1548
|
*
|
|
@@ -1549,20 +1553,20 @@ class X extends H {
|
|
|
1549
1553
|
/**
|
|
1550
1554
|
* Дата и время начала действия шаблона.
|
|
1551
1555
|
*/
|
|
1552
|
-
|
|
1556
|
+
s(this, "startAt");
|
|
1553
1557
|
/**
|
|
1554
1558
|
* Дата и время окончания действия шаблона.
|
|
1555
1559
|
*/
|
|
1556
|
-
|
|
1560
|
+
s(this, "endAt");
|
|
1557
1561
|
/**
|
|
1558
1562
|
* Данные о клиенте.
|
|
1559
1563
|
*/
|
|
1560
|
-
|
|
1564
|
+
s(this, "client");
|
|
1561
1565
|
/**
|
|
1562
1566
|
* Данные шаблона прайс-листа.
|
|
1563
1567
|
*/
|
|
1564
|
-
|
|
1565
|
-
this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new ne(e == null ? void 0 : e.client), this.priceTemplate = new
|
|
1568
|
+
s(this, "priceTemplate");
|
|
1569
|
+
this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new ne(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
|
|
1566
1570
|
}
|
|
1567
1571
|
}
|
|
1568
1572
|
class Pe extends Je {
|
|
@@ -1576,7 +1580,7 @@ class Pe extends Je {
|
|
|
1576
1580
|
/**
|
|
1577
1581
|
* Базовые данные о продукте.
|
|
1578
1582
|
*/
|
|
1579
|
-
|
|
1583
|
+
s(this, "product");
|
|
1580
1584
|
this.product = new _(e == null ? void 0 : e.product);
|
|
1581
1585
|
}
|
|
1582
1586
|
}
|
|
@@ -1593,19 +1597,19 @@ class Z extends $ {
|
|
|
1593
1597
|
/**
|
|
1594
1598
|
* Тип свойства.
|
|
1595
1599
|
*/
|
|
1596
|
-
|
|
1600
|
+
s(this, "type");
|
|
1597
1601
|
/**
|
|
1598
1602
|
* Описание свойства.
|
|
1599
1603
|
*/
|
|
1600
|
-
|
|
1604
|
+
s(this, "description");
|
|
1601
1605
|
/**
|
|
1602
1606
|
* Дополнительные метаданные свойства.
|
|
1603
1607
|
*/
|
|
1604
|
-
|
|
1608
|
+
s(this, "metadata");
|
|
1605
1609
|
this.type = new Ye(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1606
1610
|
}
|
|
1607
1611
|
}
|
|
1608
|
-
class
|
|
1612
|
+
class B {
|
|
1609
1613
|
/**
|
|
1610
1614
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1611
1615
|
*
|
|
@@ -1615,12 +1619,12 @@ class z {
|
|
|
1615
1619
|
/**
|
|
1616
1620
|
* Данные о свойстве.
|
|
1617
1621
|
*/
|
|
1618
|
-
|
|
1622
|
+
s(this, "property");
|
|
1619
1623
|
/**
|
|
1620
1624
|
* Значение свойства.
|
|
1621
1625
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1622
1626
|
*/
|
|
1623
|
-
|
|
1627
|
+
s(this, "value");
|
|
1624
1628
|
this.property = new Z(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1625
1629
|
}
|
|
1626
1630
|
}
|
|
@@ -1634,11 +1638,11 @@ class O {
|
|
|
1634
1638
|
/**
|
|
1635
1639
|
* Начало периода.
|
|
1636
1640
|
*/
|
|
1637
|
-
|
|
1641
|
+
s(this, "from");
|
|
1638
1642
|
/**
|
|
1639
1643
|
* Окончание периода.
|
|
1640
1644
|
*/
|
|
1641
|
-
|
|
1645
|
+
s(this, "to");
|
|
1642
1646
|
this.from = m(r == null ? void 0 : r.from) ? f(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? f(r.to) : (r == null ? void 0 : r.to) ?? null;
|
|
1643
1647
|
}
|
|
1644
1648
|
}
|
|
@@ -1652,23 +1656,23 @@ class Dt {
|
|
|
1652
1656
|
/**
|
|
1653
1657
|
* Идентификатор шаблона прайс-листа.
|
|
1654
1658
|
*/
|
|
1655
|
-
|
|
1659
|
+
s(this, "id");
|
|
1656
1660
|
/**
|
|
1657
1661
|
* Название шаблона прайс-листа.
|
|
1658
1662
|
*/
|
|
1659
|
-
|
|
1663
|
+
s(this, "name");
|
|
1660
1664
|
/**
|
|
1661
1665
|
* Описание шаблона прайс-листа.
|
|
1662
1666
|
*/
|
|
1663
|
-
|
|
1667
|
+
s(this, "description");
|
|
1664
1668
|
/**
|
|
1665
1669
|
* Период создания.
|
|
1666
1670
|
*/
|
|
1667
|
-
|
|
1671
|
+
s(this, "createdAt", new O());
|
|
1668
1672
|
/**
|
|
1669
1673
|
* Период изменения.
|
|
1670
1674
|
*/
|
|
1671
|
-
|
|
1675
|
+
s(this, "updatedAt", new O());
|
|
1672
1676
|
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);
|
|
1673
1677
|
}
|
|
1674
1678
|
/**
|
|
@@ -1697,13 +1701,13 @@ class Dt {
|
|
|
1697
1701
|
* только актуальные данные.
|
|
1698
1702
|
*/
|
|
1699
1703
|
asClearRaw() {
|
|
1700
|
-
var e,
|
|
1704
|
+
var e, t, i, o;
|
|
1701
1705
|
const r = {};
|
|
1702
1706
|
return Object.keys(this).forEach((c) => {
|
|
1703
1707
|
const u = this[c];
|
|
1704
1708
|
// eslint-disable-next-line prettier/prettier
|
|
1705
|
-
|
|
1706
|
-
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((
|
|
1709
|
+
U(u) || m(u) && u.trim().length === 0 || Le(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
1710
|
+
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
|
|
1707
1711
|
}
|
|
1708
1712
|
}
|
|
1709
1713
|
class Wr extends w {
|
|
@@ -1725,21 +1729,21 @@ class pe extends $ {
|
|
|
1725
1729
|
/**
|
|
1726
1730
|
* Сигнатура валюты.
|
|
1727
1731
|
*/
|
|
1728
|
-
|
|
1732
|
+
s(this, "signature", "");
|
|
1729
1733
|
/**
|
|
1730
1734
|
* Символ валюты.
|
|
1731
1735
|
*/
|
|
1732
|
-
|
|
1736
|
+
s(this, "symbol", "");
|
|
1733
1737
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
1734
1738
|
}
|
|
1735
1739
|
}
|
|
1736
1740
|
var T = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(T || {});
|
|
1737
|
-
class
|
|
1741
|
+
class M extends w {
|
|
1738
1742
|
/**
|
|
1739
1743
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
1740
1744
|
*/
|
|
1741
1745
|
static generatePersonItem() {
|
|
1742
|
-
return new
|
|
1746
|
+
return new M({
|
|
1743
1747
|
id: 1,
|
|
1744
1748
|
guid: "",
|
|
1745
1749
|
slug: T.Person,
|
|
@@ -1751,7 +1755,7 @@ class Vr extends w {
|
|
|
1751
1755
|
}
|
|
1752
1756
|
class Er extends w {
|
|
1753
1757
|
}
|
|
1754
|
-
class
|
|
1758
|
+
class F extends w {
|
|
1755
1759
|
}
|
|
1756
1760
|
class Kr extends w {
|
|
1757
1761
|
}
|
|
@@ -1796,13 +1800,13 @@ class D extends p {
|
|
|
1796
1800
|
* групп партнеров (направлений деятельности).
|
|
1797
1801
|
*/
|
|
1798
1802
|
getPartnerGroup() {
|
|
1799
|
-
return this.getTypedDataArrayRequester(
|
|
1803
|
+
return this.getTypedDataArrayRequester(F, "/internal/references/partner-group", !0);
|
|
1800
1804
|
}
|
|
1801
1805
|
/**
|
|
1802
1806
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
1803
1807
|
*/
|
|
1804
1808
|
getOpf() {
|
|
1805
|
-
return this.getTypedDataArrayRequester(
|
|
1809
|
+
return this.getTypedDataArrayRequester(M, "/public/references/opf", !0);
|
|
1806
1810
|
}
|
|
1807
1811
|
/**
|
|
1808
1812
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
@@ -1832,7 +1836,7 @@ class D extends p {
|
|
|
1832
1836
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
1833
1837
|
*/
|
|
1834
1838
|
getSalesDirections() {
|
|
1835
|
-
return this.getTypedDataArrayRequester(
|
|
1839
|
+
return this.getTypedDataArrayRequester(S, "/public/references/sales-direction", !0);
|
|
1836
1840
|
}
|
|
1837
1841
|
/**
|
|
1838
1842
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -1907,15 +1911,15 @@ class Yr extends Qe {
|
|
|
1907
1911
|
/**
|
|
1908
1912
|
* Тип пользователя.
|
|
1909
1913
|
*/
|
|
1910
|
-
|
|
1914
|
+
s(this, "type");
|
|
1911
1915
|
/**
|
|
1912
1916
|
* Признак того, что менеджер может работать с рекламациями.
|
|
1913
1917
|
*/
|
|
1914
|
-
|
|
1918
|
+
s(this, "canDoReclamations");
|
|
1915
1919
|
/**
|
|
1916
1920
|
* URI путь к фотографии пользователя.
|
|
1917
1921
|
*/
|
|
1918
|
-
|
|
1922
|
+
s(this, "photo");
|
|
1919
1923
|
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;
|
|
1920
1924
|
}
|
|
1921
1925
|
}
|
|
@@ -1938,40 +1942,40 @@ class Zr {
|
|
|
1938
1942
|
/**
|
|
1939
1943
|
* Стоимость товара или услуги.
|
|
1940
1944
|
*/
|
|
1941
|
-
|
|
1945
|
+
s(this, "cost");
|
|
1942
1946
|
/**
|
|
1943
1947
|
* Дата установки цены.
|
|
1944
1948
|
*/
|
|
1945
|
-
|
|
1949
|
+
s(this, "costDate");
|
|
1946
1950
|
/**
|
|
1947
1951
|
* Признак, что цена может быть ниже минимальной.
|
|
1948
1952
|
*/
|
|
1949
|
-
|
|
1953
|
+
s(this, "isLowCost");
|
|
1950
1954
|
/**
|
|
1951
1955
|
* Признак, что это розничная цена.
|
|
1952
1956
|
*/
|
|
1953
|
-
|
|
1957
|
+
s(this, "isRetail");
|
|
1954
1958
|
/**
|
|
1955
1959
|
* Название примененной скидки.
|
|
1956
1960
|
*/
|
|
1957
|
-
|
|
1961
|
+
s(this, "discountName");
|
|
1958
1962
|
/**
|
|
1959
1963
|
* Название примененного шаблона прайс-листа.
|
|
1960
1964
|
*/
|
|
1961
|
-
|
|
1965
|
+
s(this, "priceTemplateName");
|
|
1962
1966
|
/**
|
|
1963
1967
|
* Данные клиента.
|
|
1964
1968
|
*/
|
|
1965
|
-
|
|
1969
|
+
s(this, "client");
|
|
1966
1970
|
/**
|
|
1967
1971
|
* Данные пользователя изменившего цену.
|
|
1968
1972
|
*/
|
|
1969
|
-
|
|
1973
|
+
s(this, "executor");
|
|
1970
1974
|
/**
|
|
1971
1975
|
* Данные о валюте.
|
|
1972
1976
|
*/
|
|
1973
|
-
|
|
1974
|
-
this.cost = r.cost, this.costDate = m(r.costDate) ? f(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
|
|
1977
|
+
s(this, "currency");
|
|
1978
|
+
this.cost = r.cost, this.costDate = m(r.costDate) ? f(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 pe(r.currency) : void 0;
|
|
1975
1979
|
}
|
|
1976
1980
|
}
|
|
1977
1981
|
class de {
|
|
@@ -1984,11 +1988,11 @@ class de {
|
|
|
1984
1988
|
/**
|
|
1985
1989
|
* Список рекомендованных продуктов.
|
|
1986
1990
|
*/
|
|
1987
|
-
|
|
1991
|
+
s(this, "products", []);
|
|
1988
1992
|
/**
|
|
1989
1993
|
* Список рекомендованных категорий продуктов.
|
|
1990
1994
|
*/
|
|
1991
|
-
|
|
1995
|
+
s(this, "productCategories", []);
|
|
1992
1996
|
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
|
|
1993
1997
|
}
|
|
1994
1998
|
}
|
|
@@ -2003,27 +2007,27 @@ class ee extends $ {
|
|
|
2003
2007
|
/**
|
|
2004
2008
|
* Описание роли ценообразования.
|
|
2005
2009
|
*/
|
|
2006
|
-
|
|
2010
|
+
s(this, "description");
|
|
2007
2011
|
/**
|
|
2008
2012
|
* Признак того, что пользователь с данной ролью может устанавливать цены ниже минимальной.
|
|
2009
2013
|
*/
|
|
2010
|
-
|
|
2014
|
+
s(this, "canChangeLowCost");
|
|
2011
2015
|
/**
|
|
2012
2016
|
* Идентификатор родительской роли ценообразования.
|
|
2013
2017
|
*/
|
|
2014
|
-
|
|
2018
|
+
s(this, "parentRoleId");
|
|
2015
2019
|
/**
|
|
2016
2020
|
* Дочерние категории.
|
|
2017
2021
|
*/
|
|
2018
|
-
|
|
2022
|
+
s(this, "subRoles", []);
|
|
2019
2023
|
/**
|
|
2020
2024
|
* Родительская категория.
|
|
2021
2025
|
*/
|
|
2022
|
-
|
|
2026
|
+
s(this, "parentRole");
|
|
2023
2027
|
/**
|
|
2024
2028
|
* Уровень роли ценообразования.
|
|
2025
2029
|
*/
|
|
2026
|
-
|
|
2030
|
+
s(this, "level", 0);
|
|
2027
2031
|
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;
|
|
2028
2032
|
}
|
|
2029
2033
|
}
|
|
@@ -2037,15 +2041,15 @@ class qe {
|
|
|
2037
2041
|
/**
|
|
2038
2042
|
* Роль ценообразования.
|
|
2039
2043
|
*/
|
|
2040
|
-
|
|
2044
|
+
s(this, "role");
|
|
2041
2045
|
/**
|
|
2042
2046
|
* Категория товара.
|
|
2043
2047
|
*/
|
|
2044
|
-
|
|
2048
|
+
s(this, "category");
|
|
2045
2049
|
/**
|
|
2046
2050
|
* Минимальный коэффициент цены.
|
|
2047
2051
|
*/
|
|
2048
|
-
|
|
2052
|
+
s(this, "minCoefficient");
|
|
2049
2053
|
this.role = new ee(r == null ? void 0 : r.role), this.category = new ie(r == null ? void 0 : r.category), this.minCoefficient = new fe(r == null ? void 0 : r.minCoefficient);
|
|
2050
2054
|
}
|
|
2051
2055
|
}
|
|
@@ -2075,9 +2079,9 @@ class $t extends p {
|
|
|
2075
2079
|
* @see /doc/api/internal#/operations/api_internal_price_export
|
|
2076
2080
|
*/
|
|
2077
2081
|
// eslint-disable-next-line class-methods-use-this
|
|
2078
|
-
getPriceExportLink(r = "csv", e = !1,
|
|
2082
|
+
getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
|
|
2079
2083
|
let c = `${b.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
2080
|
-
return
|
|
2084
|
+
return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
|
|
2081
2085
|
}
|
|
2082
2086
|
}
|
|
2083
2087
|
class bt extends p {
|
|
@@ -2101,11 +2105,11 @@ class bt extends p {
|
|
|
2101
2105
|
*
|
|
2102
2106
|
* @see /doc/api/internal#/operations/api_internal_client_price_category_update
|
|
2103
2107
|
*/
|
|
2104
|
-
updateCategoryPrices(r, e,
|
|
2108
|
+
updateCategoryPrices(r, e, t) {
|
|
2105
2109
|
var i;
|
|
2106
2110
|
return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
|
|
2107
|
-
price_coefficient_id: (i =
|
|
2108
|
-
increase_percent:
|
|
2111
|
+
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
2112
|
+
increase_percent: t.value
|
|
2109
2113
|
});
|
|
2110
2114
|
}
|
|
2111
2115
|
/**
|
|
@@ -2150,8 +2154,8 @@ class bt extends p {
|
|
|
2150
2154
|
*
|
|
2151
2155
|
* @see /doc/api/internal#/operations/api_internal_client_price_categories_disabled_mark
|
|
2152
2156
|
*/
|
|
2153
|
-
markCategoryDisabled(r, e,
|
|
2154
|
-
return this.post(`/internal/clients/${r}/price/categories/${e}/disabled`, { comment:
|
|
2157
|
+
markCategoryDisabled(r, e, t) {
|
|
2158
|
+
return this.post(`/internal/clients/${r}/price/categories/${e}/disabled`, { comment: t });
|
|
2155
2159
|
}
|
|
2156
2160
|
/**
|
|
2157
2161
|
* Снимает отметку скрытия категорий в прайсе указанного клиента.
|
|
@@ -2173,8 +2177,8 @@ class bt extends p {
|
|
|
2173
2177
|
*
|
|
2174
2178
|
* @see /doc/api/internal#/operations/api_internal_client_price_categories_manager_add
|
|
2175
2179
|
*/
|
|
2176
|
-
addCategoryManager(r, e,
|
|
2177
|
-
return this.post(`/internal/clients/${r}/price/categories/${e}/manager`, { manager_id:
|
|
2180
|
+
addCategoryManager(r, e, t) {
|
|
2181
|
+
return this.post(`/internal/clients/${r}/price/categories/${e}/manager`, { manager_id: t });
|
|
2178
2182
|
}
|
|
2179
2183
|
/**
|
|
2180
2184
|
* Удаляет менеджера для указанной категории продуктов клиента.
|
|
@@ -2196,13 +2200,13 @@ class bt extends p {
|
|
|
2196
2200
|
*
|
|
2197
2201
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_update
|
|
2198
2202
|
*/
|
|
2199
|
-
updateProductPrice(r, e,
|
|
2203
|
+
updateProductPrice(r, e, t) {
|
|
2200
2204
|
var i;
|
|
2201
2205
|
return this.patch(
|
|
2202
2206
|
`/internal/clients/${r}/price/products/${e}`,
|
|
2203
2207
|
{
|
|
2204
|
-
price_coefficient_id: (i =
|
|
2205
|
-
increase_percent:
|
|
2208
|
+
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
2209
|
+
increase_percent: t.value
|
|
2206
2210
|
},
|
|
2207
2211
|
(o) => new Q(o.data)
|
|
2208
2212
|
);
|
|
@@ -2216,7 +2220,7 @@ class bt extends p {
|
|
|
2216
2220
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
2217
2221
|
*/
|
|
2218
2222
|
removeProductPrice(r, e) {
|
|
2219
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (
|
|
2223
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (t) => new Q(t.data));
|
|
2220
2224
|
}
|
|
2221
2225
|
/**
|
|
2222
2226
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -2249,7 +2253,7 @@ class bt extends p {
|
|
|
2249
2253
|
* @see /doc/api/internal#/operations/api_internal_client_price_commercial_offer_view
|
|
2250
2254
|
*/
|
|
2251
2255
|
getCommercialOfferHtml(r, e) {
|
|
2252
|
-
return this.get(`/internal/clients/${r}/price/commercial-offer/view`, e, (
|
|
2256
|
+
return this.get(`/internal/clients/${r}/price/commercial-offer/view`, e, (t) => new Blob([t.data], { type: "text/html" }));
|
|
2253
2257
|
}
|
|
2254
2258
|
/**
|
|
2255
2259
|
* Возвращает файл коммерческого предложения в формате PDF.
|
|
@@ -2264,7 +2268,7 @@ class bt extends p {
|
|
|
2264
2268
|
`/internal/clients/${r}/price/commercial-offer/download`,
|
|
2265
2269
|
e,
|
|
2266
2270
|
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
2267
|
-
(
|
|
2271
|
+
(t) => new Blob([t.request.response], { type: "application/pdf" })
|
|
2268
2272
|
);
|
|
2269
2273
|
}
|
|
2270
2274
|
/**
|
|
@@ -2291,7 +2295,7 @@ class Tt extends p {
|
|
|
2291
2295
|
return this.get(
|
|
2292
2296
|
`/internal/clients/${r}/price/templates`,
|
|
2293
2297
|
{},
|
|
2294
|
-
(e) => e.data.map((
|
|
2298
|
+
(e) => e.data.map((t) => new X(t))
|
|
2295
2299
|
);
|
|
2296
2300
|
}
|
|
2297
2301
|
/**
|
|
@@ -2313,13 +2317,13 @@ class Tt extends p {
|
|
|
2313
2317
|
*
|
|
2314
2318
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
2315
2319
|
*/
|
|
2316
|
-
attachTemplate(r, e,
|
|
2320
|
+
attachTemplate(r, e, t) {
|
|
2317
2321
|
const i = b.getConfig().dateFormats.api;
|
|
2318
2322
|
return this.post(
|
|
2319
2323
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
2320
|
-
|
|
2321
|
-
startAt:
|
|
2322
|
-
endAt:
|
|
2324
|
+
t && {
|
|
2325
|
+
startAt: t.startAt && W(t.startAt, i),
|
|
2326
|
+
endAt: t.endAt && W(t.endAt, i)
|
|
2323
2327
|
},
|
|
2324
2328
|
(o) => new X(o.data)
|
|
2325
2329
|
);
|
|
@@ -2345,13 +2349,13 @@ class Tt extends p {
|
|
|
2345
2349
|
*
|
|
2346
2350
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
2347
2351
|
*/
|
|
2348
|
-
changeTemplate(r, e,
|
|
2352
|
+
changeTemplate(r, e, t, i) {
|
|
2349
2353
|
const o = b.getConfig().dateFormats.api;
|
|
2350
2354
|
return this.patch(
|
|
2351
|
-
`/internal/clients/${r}/price/templates/${e}/${
|
|
2355
|
+
`/internal/clients/${r}/price/templates/${e}/${t}`,
|
|
2352
2356
|
i && {
|
|
2353
|
-
startAt: i.startAt &&
|
|
2354
|
-
endAt: i.endAt &&
|
|
2357
|
+
startAt: i.startAt && W(i.startAt, o),
|
|
2358
|
+
endAt: i.endAt && W(i.endAt, o)
|
|
2355
2359
|
},
|
|
2356
2360
|
(c) => new X(c.data)
|
|
2357
2361
|
);
|
|
@@ -2365,8 +2369,8 @@ class Tt extends p {
|
|
|
2365
2369
|
*
|
|
2366
2370
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_detach
|
|
2367
2371
|
*/
|
|
2368
|
-
detachTemplate(r, e,
|
|
2369
|
-
return this.delete(`/internal/clients/${r}/price/templates/${e}/${
|
|
2372
|
+
detachTemplate(r, e, t) {
|
|
2373
|
+
return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
|
|
2370
2374
|
}
|
|
2371
2375
|
}
|
|
2372
2376
|
class _t extends p {
|
|
@@ -2383,7 +2387,7 @@ class _t extends p {
|
|
|
2383
2387
|
{
|
|
2384
2388
|
showHidden: r
|
|
2385
2389
|
},
|
|
2386
|
-
(e) => e.data.map((
|
|
2390
|
+
(e) => e.data.map((t) => new q(t))
|
|
2387
2391
|
);
|
|
2388
2392
|
}
|
|
2389
2393
|
/**
|
|
@@ -2395,12 +2399,12 @@ class _t extends p {
|
|
|
2395
2399
|
*
|
|
2396
2400
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
|
|
2397
2401
|
*/
|
|
2398
|
-
getCategoryData(r, e = !1,
|
|
2402
|
+
getCategoryData(r, e = !1, t = !1) {
|
|
2399
2403
|
return this.get(
|
|
2400
2404
|
`/internal/catalog/categories/${r}`,
|
|
2401
2405
|
{
|
|
2402
2406
|
showHidden: e,
|
|
2403
|
-
withNestedCategories:
|
|
2407
|
+
withNestedCategories: t
|
|
2404
2408
|
},
|
|
2405
2409
|
(i) => new q(i.data)
|
|
2406
2410
|
);
|
|
@@ -2422,11 +2426,11 @@ class _t extends p {
|
|
|
2422
2426
|
*
|
|
2423
2427
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
|
|
2424
2428
|
*/
|
|
2425
|
-
getCategoryProductsList(r, e = !0,
|
|
2429
|
+
getCategoryProductsList(r, e = !0, t = !1) {
|
|
2426
2430
|
return this.get(
|
|
2427
2431
|
`/internal/catalog/categories/${r}/products`,
|
|
2428
2432
|
{
|
|
2429
|
-
showHidden:
|
|
2433
|
+
showHidden: t,
|
|
2430
2434
|
withPriceCoefficients: e
|
|
2431
2435
|
},
|
|
2432
2436
|
(i) => ce(i.data, (o) => new _(o))
|
|
@@ -2441,8 +2445,8 @@ class _t extends p {
|
|
|
2441
2445
|
*/
|
|
2442
2446
|
getCategoryProductsCoefficients(r) {
|
|
2443
2447
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2444
|
-
const { data:
|
|
2445
|
-
return mr(
|
|
2448
|
+
const { data: t } = e;
|
|
2449
|
+
return mr(t, (i) => i.map((o) => new Ie(o))), t;
|
|
2446
2450
|
});
|
|
2447
2451
|
}
|
|
2448
2452
|
/**
|
|
@@ -2452,16 +2456,16 @@ class _t extends p {
|
|
|
2452
2456
|
* @param limit Количество возвращаемых записей.
|
|
2453
2457
|
*/
|
|
2454
2458
|
publicSimpleSearch(r, e = 10) {
|
|
2455
|
-
return new Promise((
|
|
2459
|
+
return new Promise((t, i) => {
|
|
2456
2460
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2457
|
-
|
|
2461
|
+
t(o.categories.map((c) => new q(c)));
|
|
2458
2462
|
}).catch((o) => {
|
|
2459
2463
|
i(o);
|
|
2460
2464
|
});
|
|
2461
2465
|
});
|
|
2462
2466
|
}
|
|
2463
2467
|
}
|
|
2464
|
-
class
|
|
2468
|
+
class St extends p {
|
|
2465
2469
|
/**
|
|
2466
2470
|
* Возвращает данные об указанном продукте.
|
|
2467
2471
|
*
|
|
@@ -2471,7 +2475,7 @@ class at extends p {
|
|
|
2471
2475
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2472
2476
|
*/
|
|
2473
2477
|
getProductData(r, e = !1) {
|
|
2474
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (
|
|
2478
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new _(t.data));
|
|
2475
2479
|
}
|
|
2476
2480
|
/**
|
|
2477
2481
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2492,7 +2496,7 @@ class at extends p {
|
|
|
2492
2496
|
return this.get(
|
|
2493
2497
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2494
2498
|
{},
|
|
2495
|
-
(e) => ce(e.data, (
|
|
2499
|
+
(e) => ce(e.data, (t) => new Ie(t))
|
|
2496
2500
|
);
|
|
2497
2501
|
}
|
|
2498
2502
|
/**
|
|
@@ -2504,8 +2508,8 @@ class at extends p {
|
|
|
2504
2508
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_price_products_history_get
|
|
2505
2509
|
*/
|
|
2506
2510
|
getProductPriceHistory(r, e) {
|
|
2507
|
-
const
|
|
2508
|
-
return
|
|
2511
|
+
const t = {};
|
|
2512
|
+
return U(e) || (t.clientId = e), this.get(`/internal/price/products/${r}/history`, t, (i) => ce(i.data, (o) => new Zr(o)));
|
|
2509
2513
|
}
|
|
2510
2514
|
/**
|
|
2511
2515
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -2514,16 +2518,16 @@ class at extends p {
|
|
|
2514
2518
|
* @param limit Количество возвращаемых записей.
|
|
2515
2519
|
*/
|
|
2516
2520
|
publicSimpleSearch(r, e = 10) {
|
|
2517
|
-
return new Promise((
|
|
2521
|
+
return new Promise((t, i) => {
|
|
2518
2522
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2519
|
-
|
|
2523
|
+
t(o.products.map((c) => new _(c)));
|
|
2520
2524
|
}).catch((o) => {
|
|
2521
2525
|
i(o);
|
|
2522
2526
|
});
|
|
2523
2527
|
});
|
|
2524
2528
|
}
|
|
2525
2529
|
}
|
|
2526
|
-
class
|
|
2530
|
+
class at extends p {
|
|
2527
2531
|
/**
|
|
2528
2532
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
2529
2533
|
*
|
|
@@ -2539,7 +2543,7 @@ class St extends p {
|
|
|
2539
2543
|
clientId: r,
|
|
2540
2544
|
showHidden: e
|
|
2541
2545
|
},
|
|
2542
|
-
(
|
|
2546
|
+
(t) => t.data.map((i) => new le(i))
|
|
2543
2547
|
);
|
|
2544
2548
|
}
|
|
2545
2549
|
/**
|
|
@@ -2552,12 +2556,12 @@ class St extends p {
|
|
|
2552
2556
|
*
|
|
2553
2557
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
|
|
2554
2558
|
*/
|
|
2555
|
-
getCategoryData(r, e,
|
|
2559
|
+
getCategoryData(r, e, t = !1, i = !1) {
|
|
2556
2560
|
return this.get(
|
|
2557
2561
|
`/internal/catalog/categories/${e}`,
|
|
2558
2562
|
{
|
|
2559
2563
|
clientId: r,
|
|
2560
|
-
showHidden:
|
|
2564
|
+
showHidden: t,
|
|
2561
2565
|
withNestedCategories: i
|
|
2562
2566
|
},
|
|
2563
2567
|
(o) => new le(o.data)
|
|
@@ -2573,13 +2577,13 @@ class St extends p {
|
|
|
2573
2577
|
*
|
|
2574
2578
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
|
|
2575
2579
|
*/
|
|
2576
|
-
getCategoryProductsList(r, e,
|
|
2580
|
+
getCategoryProductsList(r, e, t = !0, i = !1) {
|
|
2577
2581
|
return this.get(
|
|
2578
2582
|
`/internal/catalog/categories/${e}/products`,
|
|
2579
2583
|
{
|
|
2580
2584
|
client_id: r,
|
|
2581
2585
|
showHidden: i,
|
|
2582
|
-
withPriceCoefficients:
|
|
2586
|
+
withPriceCoefficients: t
|
|
2583
2587
|
},
|
|
2584
2588
|
(o) => ce(o.data, (c) => new Q(c))
|
|
2585
2589
|
);
|
|
@@ -2595,12 +2599,12 @@ class Lt extends p {
|
|
|
2595
2599
|
*
|
|
2596
2600
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2597
2601
|
*/
|
|
2598
|
-
getProductData(r, e,
|
|
2602
|
+
getProductData(r, e, t = !1) {
|
|
2599
2603
|
return this.get(
|
|
2600
2604
|
`/internal/catalog/products/${r}`,
|
|
2601
2605
|
{
|
|
2602
2606
|
clientId: e,
|
|
2603
|
-
withPriceCoefficients:
|
|
2607
|
+
withPriceCoefficients: t
|
|
2604
2608
|
},
|
|
2605
2609
|
(i) => new Q(i.data)
|
|
2606
2610
|
);
|
|
@@ -2617,15 +2621,15 @@ class Ue {
|
|
|
2617
2621
|
/**
|
|
2618
2622
|
* Поле, по которому производится поиск.
|
|
2619
2623
|
*/
|
|
2620
|
-
|
|
2624
|
+
s(this, "field");
|
|
2621
2625
|
/**
|
|
2622
2626
|
* Операция сравнения.
|
|
2623
2627
|
*/
|
|
2624
|
-
|
|
2628
|
+
s(this, "op");
|
|
2625
2629
|
/**
|
|
2626
2630
|
* Значение с которым сравнивается поле.
|
|
2627
2631
|
*/
|
|
2628
|
-
|
|
2632
|
+
s(this, "value");
|
|
2629
2633
|
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Ne.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2630
2634
|
}
|
|
2631
2635
|
/**
|
|
@@ -2638,7 +2642,7 @@ class Ue {
|
|
|
2638
2642
|
field: this.field,
|
|
2639
2643
|
op: this.op
|
|
2640
2644
|
};
|
|
2641
|
-
return r.value = fr(this.value) ?
|
|
2645
|
+
return r.value = fr(this.value) ? W(this.value, b.getConfig().dateFormats.api) : this.value, r;
|
|
2642
2646
|
}
|
|
2643
2647
|
}
|
|
2644
2648
|
class se {
|
|
@@ -2651,17 +2655,17 @@ class se {
|
|
|
2651
2655
|
/**
|
|
2652
2656
|
* Условие объединения фильтров.
|
|
2653
2657
|
*/
|
|
2654
|
-
|
|
2658
|
+
s(this, "groupOp");
|
|
2655
2659
|
/**
|
|
2656
2660
|
* Список фильтров.
|
|
2657
2661
|
*/
|
|
2658
|
-
|
|
2662
|
+
s(this, "filters");
|
|
2659
2663
|
/**
|
|
2660
2664
|
* Список вложенных групп фильтров.
|
|
2661
2665
|
*/
|
|
2662
|
-
|
|
2663
|
-
var e,
|
|
2664
|
-
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 Ue(i))) ?? [], this.groups = ((
|
|
2666
|
+
s(this, "groups");
|
|
2667
|
+
var e, t;
|
|
2668
|
+
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 Ue(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new se(i))) ?? [];
|
|
2665
2669
|
}
|
|
2666
2670
|
/**
|
|
2667
2671
|
* Преобразует группу фильтров в примитивное представление для API.
|
|
@@ -2688,12 +2692,12 @@ class Ce extends p {
|
|
|
2688
2692
|
* @param successHandler Обработчик успешного выполнения запроса.
|
|
2689
2693
|
* @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
|
|
2690
2694
|
*/
|
|
2691
|
-
getPaginated(r, e,
|
|
2695
|
+
getPaginated(r, e, t, i, o, c, u) {
|
|
2692
2696
|
let g = {
|
|
2693
2697
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2694
2698
|
perPage: (i == null ? void 0 : i.pageSize) ?? 10
|
|
2695
2699
|
};
|
|
2696
|
-
return e && (g.filters = JSON.stringify((e instanceof se ? e : new se(e)).toPrimitive())),
|
|
2700
|
+
return e && (g.filters = JSON.stringify((e instanceof se ? e : new se(e)).toPrimitive())), ae(t) || (g.sort = Be(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u);
|
|
2697
2701
|
}
|
|
2698
2702
|
}
|
|
2699
2703
|
class It extends Ce {
|
|
@@ -2706,10 +2710,10 @@ class It extends Ce {
|
|
|
2706
2710
|
*
|
|
2707
2711
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
|
|
2708
2712
|
*/
|
|
2709
|
-
getTemplateList(r, e,
|
|
2710
|
-
return this.getPaginated("/internal/price/templates", r, e,
|
|
2713
|
+
getTemplateList(r, e, t) {
|
|
2714
|
+
return this.getPaginated("/internal/price/templates", r, e, t, {}, (i) => {
|
|
2711
2715
|
const o = { ...i.data };
|
|
2712
|
-
return o.data = o.data.map((c) => new
|
|
2716
|
+
return o.data = o.data.map((c) => new j(c)), o;
|
|
2713
2717
|
});
|
|
2714
2718
|
}
|
|
2715
2719
|
/**
|
|
@@ -2722,7 +2726,7 @@ class It extends Ce {
|
|
|
2722
2726
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_create
|
|
2723
2727
|
*/
|
|
2724
2728
|
createTemplate(r, e = {}) {
|
|
2725
|
-
return this.post("/internal/price/templates", r, (
|
|
2729
|
+
return this.post("/internal/price/templates", r, (t) => new j(t.data), e);
|
|
2726
2730
|
}
|
|
2727
2731
|
/**
|
|
2728
2732
|
* Возвращает данные о шаблоне прайс-листа.
|
|
@@ -2732,7 +2736,7 @@ class It extends Ce {
|
|
|
2732
2736
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_get
|
|
2733
2737
|
*/
|
|
2734
2738
|
getTemplate(r) {
|
|
2735
|
-
return this.get(`/internal/price/templates/${r}`, {}, (e) => new
|
|
2739
|
+
return this.get(`/internal/price/templates/${r}`, {}, (e) => new j(e.data));
|
|
2736
2740
|
}
|
|
2737
2741
|
/**
|
|
2738
2742
|
* Изменяет данные о шаблоне прайс-листа.
|
|
@@ -2744,8 +2748,8 @@ class It extends Ce {
|
|
|
2744
2748
|
* в случае ошибок в запросах.
|
|
2745
2749
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
|
|
2746
2750
|
*/
|
|
2747
|
-
updateTemplate(r, e,
|
|
2748
|
-
return this.patch(`/internal/price/templates/${r}`, e, (i) => new
|
|
2751
|
+
updateTemplate(r, e, t = {}) {
|
|
2752
|
+
return this.patch(`/internal/price/templates/${r}`, e, (i) => new j(i.data), t);
|
|
2749
2753
|
}
|
|
2750
2754
|
/**
|
|
2751
2755
|
* Удаляет данные о шаблоне прайс-листа.
|
|
@@ -2768,7 +2772,7 @@ class It extends Ce {
|
|
|
2768
2772
|
return this.get(
|
|
2769
2773
|
`/internal/price/templates/${r}/products`,
|
|
2770
2774
|
{},
|
|
2771
|
-
(e) => e.data.map((
|
|
2775
|
+
(e) => e.data.map((t) => new Pe(t))
|
|
2772
2776
|
);
|
|
2773
2777
|
}
|
|
2774
2778
|
/**
|
|
@@ -2780,7 +2784,7 @@ class It extends Ce {
|
|
|
2780
2784
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
2781
2785
|
*/
|
|
2782
2786
|
getProductTemplatePrice(r, e) {
|
|
2783
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (
|
|
2787
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new Pe(t.data));
|
|
2784
2788
|
}
|
|
2785
2789
|
/**
|
|
2786
2790
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -2791,13 +2795,13 @@ class It extends Ce {
|
|
|
2791
2795
|
*
|
|
2792
2796
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
|
|
2793
2797
|
*/
|
|
2794
|
-
saveProductTemplatePrice(r, e,
|
|
2798
|
+
saveProductTemplatePrice(r, e, t) {
|
|
2795
2799
|
var i;
|
|
2796
2800
|
return this.post(
|
|
2797
2801
|
`/internal/price/templates/${r}/products/${e}`,
|
|
2798
2802
|
{
|
|
2799
|
-
price_coefficient_id: (i =
|
|
2800
|
-
increase_percent:
|
|
2803
|
+
price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
|
|
2804
|
+
increase_percent: t.value
|
|
2801
2805
|
},
|
|
2802
2806
|
(o) => new Pe(o.data)
|
|
2803
2807
|
);
|
|
@@ -2824,7 +2828,7 @@ class It extends Ce {
|
|
|
2824
2828
|
return this.get(
|
|
2825
2829
|
`/internal/price/templates/${r}/categories`,
|
|
2826
2830
|
{},
|
|
2827
|
-
(e) => e.data.map((
|
|
2831
|
+
(e) => e.data.map((t) => new ve(t))
|
|
2828
2832
|
);
|
|
2829
2833
|
}
|
|
2830
2834
|
/**
|
|
@@ -2839,7 +2843,7 @@ class It extends Ce {
|
|
|
2839
2843
|
return this.get(
|
|
2840
2844
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
2841
2845
|
{},
|
|
2842
|
-
(
|
|
2846
|
+
(t) => new ve(t.data)
|
|
2843
2847
|
);
|
|
2844
2848
|
}
|
|
2845
2849
|
/**
|
|
@@ -2853,15 +2857,15 @@ class It extends Ce {
|
|
|
2853
2857
|
*
|
|
2854
2858
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
|
|
2855
2859
|
*/
|
|
2856
|
-
saveCategoryTemplatePrice(r, e,
|
|
2860
|
+
saveCategoryTemplatePrice(r, e, t, i = !1) {
|
|
2857
2861
|
var o;
|
|
2858
2862
|
return this.request(
|
|
2859
2863
|
{
|
|
2860
2864
|
method: "POST",
|
|
2861
2865
|
url: `/internal/price/templates/${r}/categories/${e}`,
|
|
2862
2866
|
data: {
|
|
2863
|
-
price_coefficient_id: (o =
|
|
2864
|
-
increase_percent:
|
|
2867
|
+
price_coefficient_id: (o = t.coefficient) == null ? void 0 : o.id,
|
|
2868
|
+
increase_percent: t.value
|
|
2865
2869
|
},
|
|
2866
2870
|
params: i ? { recursively: !0 } : {}
|
|
2867
2871
|
},
|
|
@@ -2878,11 +2882,11 @@ class It extends Ce {
|
|
|
2878
2882
|
*
|
|
2879
2883
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_delete
|
|
2880
2884
|
*/
|
|
2881
|
-
deleteCategoryTemplatePrice(r, e,
|
|
2885
|
+
deleteCategoryTemplatePrice(r, e, t = !1) {
|
|
2882
2886
|
return this.request({
|
|
2883
2887
|
method: "DELETE",
|
|
2884
2888
|
url: `/internal/price/templates/${r}/categories/${e}`,
|
|
2885
|
-
params:
|
|
2889
|
+
params: t ? { recursively: !0 } : {}
|
|
2886
2890
|
});
|
|
2887
2891
|
}
|
|
2888
2892
|
/**
|
|
@@ -2896,7 +2900,7 @@ class It extends Ce {
|
|
|
2896
2900
|
return this.get(
|
|
2897
2901
|
`/internal/price/templates/${r}/clients`,
|
|
2898
2902
|
{},
|
|
2899
|
-
(e) => e.data.map((
|
|
2903
|
+
(e) => e.data.map((t) => new X(t))
|
|
2900
2904
|
);
|
|
2901
2905
|
}
|
|
2902
2906
|
}
|
|
@@ -2938,7 +2942,7 @@ class xt extends p {
|
|
|
2938
2942
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
2939
2943
|
*/
|
|
2940
2944
|
updateRole(r, e) {
|
|
2941
|
-
return this.patch(`/internal/price/roles/${r}`, e, (
|
|
2945
|
+
return this.patch(`/internal/price/roles/${r}`, e, (t) => new ee(t.data));
|
|
2942
2946
|
}
|
|
2943
2947
|
/**
|
|
2944
2948
|
* Удаляет роль ценообразования.
|
|
@@ -2961,7 +2965,7 @@ class xt extends p {
|
|
|
2961
2965
|
return this.get(
|
|
2962
2966
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2963
2967
|
{},
|
|
2964
|
-
(e) => e.data.map((
|
|
2968
|
+
(e) => e.data.map((t) => new qe(t))
|
|
2965
2969
|
);
|
|
2966
2970
|
}
|
|
2967
2971
|
/**
|
|
@@ -2976,7 +2980,7 @@ class xt extends p {
|
|
|
2976
2980
|
return this.patch(
|
|
2977
2981
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2978
2982
|
e,
|
|
2979
|
-
(
|
|
2983
|
+
(t) => t.data.map((i) => new qe(i))
|
|
2980
2984
|
);
|
|
2981
2985
|
}
|
|
2982
2986
|
}
|
|
@@ -2990,8 +2994,8 @@ class kt extends Ce {
|
|
|
2990
2994
|
*
|
|
2991
2995
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
|
|
2992
2996
|
*/
|
|
2993
|
-
getProperties(r, e,
|
|
2994
|
-
return this.getPaginated("/internal/catalog/properties", r, e,
|
|
2997
|
+
getProperties(r, e, t) {
|
|
2998
|
+
return this.getPaginated("/internal/catalog/properties", r, e, t, {}, (i) => {
|
|
2995
2999
|
const o = { ...i.data };
|
|
2996
3000
|
return o.data = o.data.map((c) => new Z(c)), o;
|
|
2997
3001
|
});
|
|
@@ -3003,11 +3007,11 @@ class kt extends Ce {
|
|
|
3003
3007
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_create
|
|
3004
3008
|
*/
|
|
3005
3009
|
createProperty(r) {
|
|
3006
|
-
const { typeId: e, ...
|
|
3010
|
+
const { typeId: e, ...t } = r;
|
|
3007
3011
|
return this.post(
|
|
3008
3012
|
"/internal/catalog/properties",
|
|
3009
3013
|
{
|
|
3010
|
-
...
|
|
3014
|
+
...t,
|
|
3011
3015
|
type: e
|
|
3012
3016
|
},
|
|
3013
3017
|
(i) => new Z(i.data)
|
|
@@ -3030,12 +3034,12 @@ class kt extends Ce {
|
|
|
3030
3034
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_update
|
|
3031
3035
|
*/
|
|
3032
3036
|
updateProperty(r, e) {
|
|
3033
|
-
const { typeId:
|
|
3037
|
+
const { typeId: t, ...i } = e;
|
|
3034
3038
|
return this.patch(
|
|
3035
3039
|
`/internal/catalog/properties/${r}`,
|
|
3036
3040
|
{
|
|
3037
3041
|
...i,
|
|
3038
|
-
type:
|
|
3042
|
+
type: t
|
|
3039
3043
|
},
|
|
3040
3044
|
(o) => new Z(o.data)
|
|
3041
3045
|
);
|
|
@@ -3056,7 +3060,7 @@ class kt extends Ce {
|
|
|
3056
3060
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
3057
3061
|
*/
|
|
3058
3062
|
getProductProperties(r) {
|
|
3059
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((
|
|
3063
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((t) => new B(t)));
|
|
3060
3064
|
}
|
|
3061
3065
|
/**
|
|
3062
3066
|
* Возвращает значение свойства продукта.
|
|
@@ -3066,7 +3070,7 @@ class kt extends Ce {
|
|
|
3066
3070
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
3067
3071
|
*/
|
|
3068
3072
|
getProductProperty(r, e) {
|
|
3069
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (
|
|
3073
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new B(t.data));
|
|
3070
3074
|
}
|
|
3071
3075
|
/**
|
|
3072
3076
|
* Обновляет значение свойства продукта.
|
|
@@ -3076,8 +3080,8 @@ class kt extends Ce {
|
|
|
3076
3080
|
* @param value Новое значение свойства.
|
|
3077
3081
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
3078
3082
|
*/
|
|
3079
|
-
updateProductProperty(r, e,
|
|
3080
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value:
|
|
3083
|
+
updateProductProperty(r, e, t) {
|
|
3084
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new B(i.data));
|
|
3081
3085
|
}
|
|
3082
3086
|
/**
|
|
3083
3087
|
* Удаляет значение свойства продукта.
|
|
@@ -3172,8 +3176,8 @@ class kt extends Ce {
|
|
|
3172
3176
|
* @param fileData Данные файла.
|
|
3173
3177
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_files_update
|
|
3174
3178
|
*/
|
|
3175
|
-
updateProductFile(r, e,
|
|
3176
|
-
return this.patch(`/internal/catalog/products/${r}/properties/files/${e}`,
|
|
3179
|
+
updateProductFile(r, e, t) {
|
|
3180
|
+
return this.patch(`/internal/catalog/products/${r}/properties/files/${e}`, t);
|
|
3177
3181
|
}
|
|
3178
3182
|
/**
|
|
3179
3183
|
* Удаляет файл продукта.
|
|
@@ -3202,7 +3206,7 @@ class kt extends Ce {
|
|
|
3202
3206
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
3203
3207
|
*/
|
|
3204
3208
|
getCategoryProperties(r) {
|
|
3205
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((
|
|
3209
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((t) => new B(t)));
|
|
3206
3210
|
}
|
|
3207
3211
|
/**
|
|
3208
3212
|
* Возвращает значение свойства категории.
|
|
@@ -3212,7 +3216,7 @@ class kt extends Ce {
|
|
|
3212
3216
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
3213
3217
|
*/
|
|
3214
3218
|
getCategoryProperty(r, e) {
|
|
3215
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (
|
|
3219
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new B(t.data));
|
|
3216
3220
|
}
|
|
3217
3221
|
/**
|
|
3218
3222
|
* Обновляет значение свойства категории.
|
|
@@ -3222,8 +3226,8 @@ class kt extends Ce {
|
|
|
3222
3226
|
* @param value Новое значение свойства.
|
|
3223
3227
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
3224
3228
|
*/
|
|
3225
|
-
updateCategoryProperty(r, e,
|
|
3226
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value:
|
|
3229
|
+
updateCategoryProperty(r, e, t) {
|
|
3230
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new B(i.data));
|
|
3227
3231
|
}
|
|
3228
3232
|
/**
|
|
3229
3233
|
* Удаляет значение свойства категории.
|
|
@@ -3318,8 +3322,8 @@ class kt extends Ce {
|
|
|
3318
3322
|
* @param fileData Данные для обновления файла.
|
|
3319
3323
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_files_update
|
|
3320
3324
|
*/
|
|
3321
|
-
updateCategoryFile(r, e,
|
|
3322
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/files/${e}`,
|
|
3325
|
+
updateCategoryFile(r, e, t) {
|
|
3326
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/files/${e}`, t);
|
|
3323
3327
|
}
|
|
3324
3328
|
/**
|
|
3325
3329
|
* Удаляет файл категории.
|
|
@@ -3377,8 +3381,8 @@ class Nt extends p {
|
|
|
3377
3381
|
*/
|
|
3378
3382
|
saveProductCategoryRecommendations(r, e) {
|
|
3379
3383
|
return this.post(`/internal/catalog/recommendations/categories/${r.id}`, {
|
|
3380
|
-
product_categories: e.productCategories.map((
|
|
3381
|
-
products: e.products.map((
|
|
3384
|
+
product_categories: e.productCategories.map((t) => t.id),
|
|
3385
|
+
products: e.products.map((t) => t.id)
|
|
3382
3386
|
});
|
|
3383
3387
|
}
|
|
3384
3388
|
/**
|
|
@@ -3389,34 +3393,34 @@ class Nt extends p {
|
|
|
3389
3393
|
*/
|
|
3390
3394
|
saveProductRecommendations(r, e) {
|
|
3391
3395
|
return this.post(`/internal/catalog/recommendations/products/${r.id}`, {
|
|
3392
|
-
product_categories: e.productCategories.map((
|
|
3393
|
-
products: e.products.map((
|
|
3396
|
+
product_categories: e.productCategories.map((t) => t.id),
|
|
3397
|
+
products: e.products.map((t) => t.id)
|
|
3394
3398
|
});
|
|
3395
3399
|
}
|
|
3396
3400
|
}
|
|
3397
3401
|
function Ge(n, r, e) {
|
|
3398
|
-
let
|
|
3402
|
+
let t;
|
|
3399
3403
|
return n.some((i) => {
|
|
3400
3404
|
if (i.type === e && i.id === r)
|
|
3401
|
-
return
|
|
3405
|
+
return t = i, !0;
|
|
3402
3406
|
if (i.type === "product")
|
|
3403
3407
|
return !1;
|
|
3404
3408
|
const o = i;
|
|
3405
3409
|
if (o.products && o.products.length > 0) {
|
|
3406
3410
|
const c = Ge(o.products, r, e);
|
|
3407
3411
|
if (c)
|
|
3408
|
-
return
|
|
3412
|
+
return t = c, !0;
|
|
3409
3413
|
}
|
|
3410
3414
|
if (o.categories && o.categories.length > 0) {
|
|
3411
3415
|
const c = Ge(o.categories, r, e);
|
|
3412
3416
|
if (c)
|
|
3413
|
-
return
|
|
3417
|
+
return t = c, !0;
|
|
3414
3418
|
}
|
|
3415
3419
|
return !1;
|
|
3416
|
-
}),
|
|
3420
|
+
}), t;
|
|
3417
3421
|
}
|
|
3418
3422
|
var et = /* @__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))(et || {});
|
|
3419
|
-
class _e extends
|
|
3423
|
+
class _e extends z {
|
|
3420
3424
|
/**
|
|
3421
3425
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
3422
3426
|
*
|
|
@@ -3427,27 +3431,27 @@ class _e extends H {
|
|
|
3427
3431
|
/**
|
|
3428
3432
|
* Наименование банка.
|
|
3429
3433
|
*/
|
|
3430
|
-
|
|
3434
|
+
s(this, "bankName", "");
|
|
3431
3435
|
/**
|
|
3432
3436
|
* Банковский идентификационный код ЦБ РФ (БИК).
|
|
3433
3437
|
*/
|
|
3434
|
-
|
|
3438
|
+
s(this, "bic", "");
|
|
3435
3439
|
/**
|
|
3436
3440
|
* Номер счёта.
|
|
3437
3441
|
*/
|
|
3438
|
-
|
|
3442
|
+
s(this, "accountNumber", "");
|
|
3439
3443
|
/**
|
|
3440
3444
|
* Корреспондентский счет в ЦБ РФ.
|
|
3441
3445
|
*/
|
|
3442
|
-
|
|
3446
|
+
s(this, "correspondentAccount", "");
|
|
3443
3447
|
/**
|
|
3444
3448
|
* Данные о валюте.
|
|
3445
3449
|
*/
|
|
3446
|
-
|
|
3450
|
+
s(this, "currency", new pe());
|
|
3447
3451
|
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new pe(e.currency));
|
|
3448
3452
|
}
|
|
3449
3453
|
}
|
|
3450
|
-
class
|
|
3454
|
+
class Se extends $ {
|
|
3451
3455
|
/**
|
|
3452
3456
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
3453
3457
|
*
|
|
@@ -3458,15 +3462,15 @@ class ae extends $ {
|
|
|
3458
3462
|
/**
|
|
3459
3463
|
* Номер телефона. В формате "79203436527" или "+79203436527".
|
|
3460
3464
|
*/
|
|
3461
|
-
|
|
3465
|
+
s(this, "phone");
|
|
3462
3466
|
/**
|
|
3463
3467
|
* Адрес электронной почты.
|
|
3464
3468
|
*/
|
|
3465
|
-
|
|
3469
|
+
s(this, "email");
|
|
3466
3470
|
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;
|
|
3467
3471
|
}
|
|
3468
3472
|
}
|
|
3469
|
-
class
|
|
3473
|
+
class H extends Se {
|
|
3470
3474
|
/**
|
|
3471
3475
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
3472
3476
|
*
|
|
@@ -3477,27 +3481,27 @@ class F extends ae {
|
|
|
3477
3481
|
/**
|
|
3478
3482
|
* Признак того, что контакт является основным.
|
|
3479
3483
|
*/
|
|
3480
|
-
|
|
3484
|
+
s(this, "isPrimary");
|
|
3481
3485
|
/**
|
|
3482
3486
|
* Должность контактного лица.
|
|
3483
3487
|
*/
|
|
3484
|
-
|
|
3488
|
+
s(this, "position");
|
|
3485
3489
|
/**
|
|
3486
3490
|
* Признак, что контактное лицо не нужно беспокоить.
|
|
3487
3491
|
*/
|
|
3488
|
-
|
|
3492
|
+
s(this, "notDisturb");
|
|
3489
3493
|
/**
|
|
3490
3494
|
* Комментарий к контактному лицу.
|
|
3491
3495
|
*/
|
|
3492
|
-
|
|
3496
|
+
s(this, "comment");
|
|
3493
3497
|
/**
|
|
3494
3498
|
* Дата и время последнего изменения.
|
|
3495
3499
|
*/
|
|
3496
|
-
|
|
3500
|
+
s(this, "updatedAt");
|
|
3497
3501
|
/**
|
|
3498
3502
|
* Дата и время последнего удаления.
|
|
3499
3503
|
*/
|
|
3500
|
-
|
|
3504
|
+
s(this, "deletedAt");
|
|
3501
3505
|
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) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
3502
3506
|
}
|
|
3503
3507
|
}
|
|
@@ -3513,63 +3517,63 @@ class rr extends $ {
|
|
|
3513
3517
|
/**
|
|
3514
3518
|
* Данные о менеджере.
|
|
3515
3519
|
*/
|
|
3516
|
-
|
|
3520
|
+
s(this, "manager", new re());
|
|
3517
3521
|
/**
|
|
3518
3522
|
* Данные об организационно-правовой форме.
|
|
3519
3523
|
*/
|
|
3520
|
-
|
|
3524
|
+
s(this, "opf", M.generatePersonItem());
|
|
3521
3525
|
/**
|
|
3522
3526
|
* Направление продаж.
|
|
3523
3527
|
*/
|
|
3524
|
-
|
|
3528
|
+
s(this, "salesDirection", new S());
|
|
3525
3529
|
/**
|
|
3526
3530
|
* Группа партнеров (направление деятельности).
|
|
3527
3531
|
*/
|
|
3528
|
-
|
|
3532
|
+
s(this, "partnerGroup", new F());
|
|
3529
3533
|
/**
|
|
3530
3534
|
* Список контактных лиц контрагента.
|
|
3531
3535
|
*/
|
|
3532
|
-
|
|
3536
|
+
s(this, "contacts", []);
|
|
3533
3537
|
/**
|
|
3534
3538
|
* Список банковских счетов контрагента.
|
|
3535
3539
|
*/
|
|
3536
|
-
|
|
3540
|
+
s(this, "bankAccounts", []);
|
|
3537
3541
|
/**
|
|
3538
3542
|
* Комментарий к контрагенту.
|
|
3539
3543
|
*/
|
|
3540
|
-
|
|
3544
|
+
s(this, "comment");
|
|
3541
3545
|
/**
|
|
3542
3546
|
* Альтернативное название контрагента.
|
|
3543
3547
|
*/
|
|
3544
|
-
|
|
3548
|
+
s(this, "alternativeName");
|
|
3545
3549
|
/**
|
|
3546
3550
|
* Дата и время создания записи.
|
|
3547
3551
|
*/
|
|
3548
|
-
|
|
3552
|
+
s(this, "createdAt");
|
|
3549
3553
|
/**
|
|
3550
3554
|
* Данные пользователя, создавшего запись.
|
|
3551
3555
|
*/
|
|
3552
|
-
|
|
3556
|
+
s(this, "creator");
|
|
3553
3557
|
/**
|
|
3554
3558
|
* Дата и время последнего изменения данных.
|
|
3555
3559
|
*/
|
|
3556
|
-
|
|
3560
|
+
s(this, "updatedAt");
|
|
3557
3561
|
/**
|
|
3558
3562
|
* Данные пользователя, который внес последние изменения в запись.
|
|
3559
3563
|
*/
|
|
3560
|
-
|
|
3564
|
+
s(this, "updater");
|
|
3561
3565
|
if (e) {
|
|
3562
|
-
if (this.opf = new
|
|
3563
|
-
const
|
|
3566
|
+
if (this.opf = new M(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new F(e.partnerGroup)), e.manager && (this.manager = new re(e.manager)), e.contacts) {
|
|
3567
|
+
const t = [];
|
|
3564
3568
|
e.contacts.forEach((i) => {
|
|
3565
|
-
|
|
3566
|
-
}), this.contacts =
|
|
3569
|
+
t.push(new H(i));
|
|
3570
|
+
}), this.contacts = t;
|
|
3567
3571
|
}
|
|
3568
3572
|
if (e.bankAccounts) {
|
|
3569
|
-
const
|
|
3573
|
+
const t = [];
|
|
3570
3574
|
e.bankAccounts.forEach((i) => {
|
|
3571
|
-
|
|
3572
|
-
}), this.bankAccounts =
|
|
3575
|
+
t.push(new _e(i));
|
|
3576
|
+
}), this.bankAccounts = t;
|
|
3573
3577
|
}
|
|
3574
3578
|
}
|
|
3575
3579
|
}
|
|
@@ -3595,35 +3599,35 @@ class tr extends rr {
|
|
|
3595
3599
|
/**
|
|
3596
3600
|
* ИНН.
|
|
3597
3601
|
*/
|
|
3598
|
-
|
|
3602
|
+
s(this, "inn", "");
|
|
3599
3603
|
/**
|
|
3600
3604
|
* Код ОКПО.
|
|
3601
3605
|
*/
|
|
3602
|
-
|
|
3606
|
+
s(this, "okpo", "");
|
|
3603
3607
|
/**
|
|
3604
3608
|
* ФИО руководителя.
|
|
3605
3609
|
*/
|
|
3606
|
-
|
|
3610
|
+
s(this, "directorName", "");
|
|
3607
3611
|
/**
|
|
3608
3612
|
* Должность руководителя.
|
|
3609
3613
|
*/
|
|
3610
|
-
|
|
3614
|
+
s(this, "directorPosition", "");
|
|
3611
3615
|
/**
|
|
3612
3616
|
* Основания полномочий руководителя.
|
|
3613
3617
|
*/
|
|
3614
|
-
|
|
3618
|
+
s(this, "directorActsOn", "");
|
|
3615
3619
|
/**
|
|
3616
3620
|
* Юридический адрес.
|
|
3617
3621
|
*/
|
|
3618
|
-
|
|
3622
|
+
s(this, "legalAddress", "");
|
|
3619
3623
|
/**
|
|
3620
3624
|
* Почтовый адрес.
|
|
3621
3625
|
*/
|
|
3622
|
-
|
|
3626
|
+
s(this, "postalAddress", "");
|
|
3623
3627
|
/**
|
|
3624
3628
|
* Фактический адрес.
|
|
3625
3629
|
*/
|
|
3626
|
-
|
|
3630
|
+
s(this, "actualAddress", "");
|
|
3627
3631
|
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 ?? "");
|
|
3628
3632
|
}
|
|
3629
3633
|
}
|
|
@@ -3638,7 +3642,7 @@ class sr extends tr {
|
|
|
3638
3642
|
/**
|
|
3639
3643
|
* КПП организации.
|
|
3640
3644
|
*/
|
|
3641
|
-
|
|
3645
|
+
s(this, "kpp", "");
|
|
3642
3646
|
e && (this.kpp = e.kpp ?? "");
|
|
3643
3647
|
}
|
|
3644
3648
|
}
|
|
@@ -3653,15 +3657,15 @@ class tt extends sr {
|
|
|
3653
3657
|
/**
|
|
3654
3658
|
* Страна регистрации юридического лица нерезидента.
|
|
3655
3659
|
*/
|
|
3656
|
-
|
|
3660
|
+
s(this, "registrationCountry", new Y());
|
|
3657
3661
|
/**
|
|
3658
3662
|
* Регистрационный номер юридического лица нерезидента.
|
|
3659
3663
|
*/
|
|
3660
|
-
|
|
3664
|
+
s(this, "registrationNumber", "");
|
|
3661
3665
|
/**
|
|
3662
3666
|
* Налоговый номер юридического лица нерезидента.
|
|
3663
3667
|
*/
|
|
3664
|
-
|
|
3668
|
+
s(this, "taxNumber", "");
|
|
3665
3669
|
e && (this.registrationCountry = new Y(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
3666
3670
|
}
|
|
3667
3671
|
}
|
|
@@ -3684,7 +3688,7 @@ class he {
|
|
|
3684
3688
|
}
|
|
3685
3689
|
}
|
|
3686
3690
|
}
|
|
3687
|
-
class Re extends
|
|
3691
|
+
class Re extends z {
|
|
3688
3692
|
/**
|
|
3689
3693
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
3690
3694
|
*
|
|
@@ -3695,11 +3699,11 @@ class Re extends H {
|
|
|
3695
3699
|
/**
|
|
3696
3700
|
* Признак того, что контакт является основным.
|
|
3697
3701
|
*/
|
|
3698
|
-
|
|
3702
|
+
s(this, "isPrimary");
|
|
3699
3703
|
this.isPrimary = e.isPrimary;
|
|
3700
3704
|
}
|
|
3701
3705
|
}
|
|
3702
|
-
class st extends
|
|
3706
|
+
class st extends H {
|
|
3703
3707
|
/**
|
|
3704
3708
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
3705
3709
|
*
|
|
@@ -3710,7 +3714,7 @@ class st extends F {
|
|
|
3710
3714
|
/**
|
|
3711
3715
|
* Список связей контактного лица с сущностями.
|
|
3712
3716
|
*/
|
|
3713
|
-
|
|
3717
|
+
s(this, "relations", {
|
|
3714
3718
|
/**
|
|
3715
3719
|
* Список клиентов, с которыми связано контактное лицо.
|
|
3716
3720
|
*/
|
|
@@ -3724,7 +3728,7 @@ class st extends F {
|
|
|
3724
3728
|
*/
|
|
3725
3729
|
addresses: []
|
|
3726
3730
|
});
|
|
3727
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((
|
|
3731
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new Re(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new Re(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new Re(t))));
|
|
3728
3732
|
}
|
|
3729
3733
|
}
|
|
3730
3734
|
class ge extends Fr {
|
|
@@ -3734,37 +3738,37 @@ class ge extends Fr {
|
|
|
3734
3738
|
* @param data Данные для первоначальной инициализации.
|
|
3735
3739
|
*/
|
|
3736
3740
|
constructor(e) {
|
|
3737
|
-
var
|
|
3741
|
+
var t;
|
|
3738
3742
|
super(e);
|
|
3739
3743
|
/**
|
|
3740
3744
|
* Адрес.
|
|
3741
3745
|
*/
|
|
3742
|
-
|
|
3746
|
+
s(this, "address", "");
|
|
3743
3747
|
/**
|
|
3744
3748
|
* Координаты.
|
|
3745
3749
|
*/
|
|
3746
|
-
|
|
3750
|
+
s(this, "coordinates");
|
|
3747
3751
|
/**
|
|
3748
3752
|
* Данные о контактных лицах.
|
|
3749
3753
|
*/
|
|
3750
|
-
|
|
3754
|
+
s(this, "contacts");
|
|
3751
3755
|
/**
|
|
3752
3756
|
* Комментарий к адресу доставки клиента.
|
|
3753
3757
|
*/
|
|
3754
|
-
|
|
3758
|
+
s(this, "comment");
|
|
3755
3759
|
/**
|
|
3756
3760
|
* Данные о времени работы.
|
|
3757
3761
|
*/
|
|
3758
|
-
|
|
3762
|
+
s(this, "operatingHours");
|
|
3759
3763
|
/**
|
|
3760
3764
|
* Признак одноразового адреса (адрес, который удаляется после завершения заказа).
|
|
3761
3765
|
*/
|
|
3762
|
-
|
|
3766
|
+
s(this, "isOneTime");
|
|
3763
3767
|
/**
|
|
3764
3768
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
3765
3769
|
*/
|
|
3766
|
-
|
|
3767
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Ee(e == null ? void 0 : e.coordinates), this.contacts = ((
|
|
3770
|
+
s(this, "isTransportCompanyAddress");
|
|
3771
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Ee(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new H(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;
|
|
3768
3772
|
}
|
|
3769
3773
|
}
|
|
3770
3774
|
class Me extends ne {
|
|
@@ -3775,53 +3779,53 @@ class Me extends ne {
|
|
|
3775
3779
|
*/
|
|
3776
3780
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
3777
3781
|
constructor(e) {
|
|
3778
|
-
var
|
|
3782
|
+
var t, i, o, c;
|
|
3779
3783
|
super(e);
|
|
3780
3784
|
/**
|
|
3781
3785
|
* Список контрагентов клиента.
|
|
3782
3786
|
*/
|
|
3783
|
-
|
|
3787
|
+
s(this, "contragents");
|
|
3784
3788
|
/**
|
|
3785
3789
|
* Список групп партнеров (направлений деятельности), к которым относится клиент.
|
|
3786
3790
|
*/
|
|
3787
|
-
|
|
3791
|
+
s(this, "partnerGroups");
|
|
3788
3792
|
/**
|
|
3789
3793
|
* Список контактов клиента.
|
|
3790
3794
|
*/
|
|
3791
|
-
|
|
3795
|
+
s(this, "contacts");
|
|
3792
3796
|
/**
|
|
3793
3797
|
* Список адресов доставки.
|
|
3794
3798
|
*/
|
|
3795
|
-
|
|
3799
|
+
s(this, "deliveryAddresses");
|
|
3796
3800
|
/**
|
|
3797
3801
|
* Канал первичного интереса.
|
|
3798
3802
|
*/
|
|
3799
|
-
|
|
3803
|
+
s(this, "channelPrimaryInterest");
|
|
3800
3804
|
/**
|
|
3801
3805
|
* Источник первичного интереса.
|
|
3802
3806
|
*/
|
|
3803
|
-
|
|
3807
|
+
s(this, "sourcePrimaryInterest");
|
|
3804
3808
|
/**
|
|
3805
3809
|
* Предпочтительный тип доставки.
|
|
3806
3810
|
*/
|
|
3807
|
-
|
|
3811
|
+
s(this, "preferredDeliveryType");
|
|
3808
3812
|
/**
|
|
3809
3813
|
* Первичный спрос.
|
|
3810
3814
|
*/
|
|
3811
|
-
|
|
3815
|
+
s(this, "primaryDemand");
|
|
3812
3816
|
/**
|
|
3813
3817
|
* Признак того, что клиента необходимо исключить из прозвонника.
|
|
3814
3818
|
*/
|
|
3815
|
-
|
|
3819
|
+
s(this, "isExcludedFromMsCallsToClients");
|
|
3816
3820
|
/**
|
|
3817
3821
|
* Предпочтительный склад для самовывоза.
|
|
3818
3822
|
*/
|
|
3819
|
-
|
|
3823
|
+
s(this, "preferredWarehouse");
|
|
3820
3824
|
/**
|
|
3821
3825
|
* Дополнительные данные о клиенте.
|
|
3822
3826
|
*/
|
|
3823
|
-
|
|
3824
|
-
this.contragents = ((
|
|
3827
|
+
s(this, "extraData");
|
|
3828
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => he.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new F(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new H(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ge(u))) ?? [], this.channelPrimaryInterest = new Xe(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new er(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 ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
3825
3829
|
}
|
|
3826
3830
|
}
|
|
3827
3831
|
class Ot {
|
|
@@ -3834,91 +3838,91 @@ class Ot {
|
|
|
3834
3838
|
/**
|
|
3835
3839
|
* Идентификатор клиента.
|
|
3836
3840
|
*/
|
|
3837
|
-
|
|
3841
|
+
s(this, "id");
|
|
3838
3842
|
/**
|
|
3839
3843
|
* Название клиента.
|
|
3840
3844
|
*/
|
|
3841
|
-
|
|
3845
|
+
s(this, "name");
|
|
3842
3846
|
/**
|
|
3843
3847
|
* Альтернативное название клиента.
|
|
3844
3848
|
*/
|
|
3845
|
-
|
|
3849
|
+
s(this, "alternativeName");
|
|
3846
3850
|
/**
|
|
3847
3851
|
* Строка запроса для поиска клиентов.
|
|
3848
3852
|
*/
|
|
3849
|
-
|
|
3853
|
+
s(this, "searchTerm");
|
|
3850
3854
|
/**
|
|
3851
3855
|
* Данные о городе.
|
|
3852
3856
|
*/
|
|
3853
|
-
|
|
3857
|
+
s(this, "city");
|
|
3854
3858
|
/**
|
|
3855
3859
|
* Данные о регионе.
|
|
3856
3860
|
*/
|
|
3857
|
-
|
|
3861
|
+
s(this, "region");
|
|
3858
3862
|
/**
|
|
3859
3863
|
* Данные о стране.
|
|
3860
3864
|
*/
|
|
3861
|
-
|
|
3865
|
+
s(this, "country");
|
|
3862
3866
|
/**
|
|
3863
3867
|
* Номер телефона.
|
|
3864
3868
|
*/
|
|
3865
|
-
|
|
3869
|
+
s(this, "phone");
|
|
3866
3870
|
/**
|
|
3867
3871
|
* Адрес электронной почты.
|
|
3868
3872
|
*/
|
|
3869
|
-
|
|
3873
|
+
s(this, "email");
|
|
3870
3874
|
/**
|
|
3871
3875
|
* Признак необходимости отображения скрытых/деактивированных клиентов.
|
|
3872
3876
|
*/
|
|
3873
|
-
|
|
3877
|
+
s(this, "isActive");
|
|
3874
3878
|
/**
|
|
3875
3879
|
* Период регистрации.
|
|
3876
3880
|
*/
|
|
3877
|
-
|
|
3881
|
+
s(this, "createdAt", new O());
|
|
3878
3882
|
/**
|
|
3879
3883
|
* Период последнего входа.
|
|
3880
3884
|
*/
|
|
3881
|
-
|
|
3885
|
+
s(this, "lastLoginDate", new O());
|
|
3882
3886
|
/**
|
|
3883
3887
|
* Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
|
|
3884
3888
|
*/
|
|
3885
|
-
|
|
3889
|
+
s(this, "lastLoginDateHasOrder");
|
|
3886
3890
|
/**
|
|
3887
3891
|
* Данные о менеджерах клиентов.
|
|
3888
3892
|
*/
|
|
3889
|
-
|
|
3893
|
+
s(this, "managers");
|
|
3890
3894
|
/**
|
|
3891
3895
|
* Направление продаж.
|
|
3892
3896
|
*/
|
|
3893
|
-
|
|
3897
|
+
s(this, "salesDirection");
|
|
3894
3898
|
/**
|
|
3895
3899
|
* ИНН контрагента.
|
|
3896
3900
|
*/
|
|
3897
|
-
|
|
3901
|
+
s(this, "contragentInn");
|
|
3898
3902
|
/**
|
|
3899
3903
|
* Тип организационно-правовой формы контрагента.
|
|
3900
3904
|
*/
|
|
3901
|
-
|
|
3905
|
+
s(this, "contragentType");
|
|
3902
3906
|
/**
|
|
3903
3907
|
* Предпочитаемый тип доставки.
|
|
3904
3908
|
*/
|
|
3905
|
-
|
|
3909
|
+
s(this, "preferredDeliveryType");
|
|
3906
3910
|
/**
|
|
3907
3911
|
* Группа партнеров (направление деятельности).
|
|
3908
3912
|
*/
|
|
3909
|
-
|
|
3913
|
+
s(this, "partnerGroup");
|
|
3910
3914
|
/**
|
|
3911
3915
|
* Данные контактного лица.
|
|
3912
3916
|
*/
|
|
3913
|
-
|
|
3917
|
+
s(this, "contact");
|
|
3914
3918
|
/**
|
|
3915
3919
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
3916
3920
|
*/
|
|
3917
|
-
|
|
3918
|
-
var e,
|
|
3919
|
-
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.city = new ue(r == null ? void 0 : r.city), this.region = new te(r == null ? void 0 : r.region), this.country = new Y(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((o) => new we(o)) : [], this.salesDirection = new
|
|
3921
|
+
s(this, "lastOrder");
|
|
3922
|
+
var e, t, i;
|
|
3923
|
+
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.city = new ue(r == null ? void 0 : r.city), this.region = new te(r == null ? void 0 : r.region), this.country = new Y(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((o) => new we(o)) : [], this.salesDirection = new S(r == null ? void 0 : r.salesDirection), 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.partnerGroup = new F(r == null ? void 0 : r.partnerGroup), this.contact = new Se(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3920
3924
|
createdAt: new O((e = r == null ? void 0 : r.lastOrder) == null ? void 0 : e.createdAt),
|
|
3921
|
-
creator: (
|
|
3925
|
+
creator: (t = r == null ? void 0 : r.lastOrder) == null ? void 0 : t.creator,
|
|
3922
3926
|
isApproved: (i = r == null ? void 0 : r.lastOrder) == null ? void 0 : i.isApproved
|
|
3923
3927
|
};
|
|
3924
3928
|
}
|
|
@@ -3963,19 +3967,19 @@ class Ot {
|
|
|
3963
3967
|
this.managers = [];
|
|
3964
3968
|
break;
|
|
3965
3969
|
case "salesDirection":
|
|
3966
|
-
this.salesDirection = new
|
|
3970
|
+
this.salesDirection = new S();
|
|
3967
3971
|
break;
|
|
3968
3972
|
case "contragentType":
|
|
3969
|
-
this.contragentType = new
|
|
3973
|
+
this.contragentType = new M();
|
|
3970
3974
|
break;
|
|
3971
3975
|
case "preferredDeliveryType":
|
|
3972
3976
|
this.preferredDeliveryType = new J();
|
|
3973
3977
|
break;
|
|
3974
3978
|
case "partnerGroup":
|
|
3975
|
-
this.partnerGroup = new
|
|
3979
|
+
this.partnerGroup = new F();
|
|
3976
3980
|
break;
|
|
3977
3981
|
case "contact":
|
|
3978
|
-
this.contact = new
|
|
3982
|
+
this.contact = new Se();
|
|
3979
3983
|
break;
|
|
3980
3984
|
}
|
|
3981
3985
|
return this;
|
|
@@ -3985,16 +3989,16 @@ class Ot {
|
|
|
3985
3989
|
* только актуальные данные.
|
|
3986
3990
|
*/
|
|
3987
3991
|
asClearRaw() {
|
|
3988
|
-
var e,
|
|
3992
|
+
var e, t, i, o;
|
|
3989
3993
|
const r = {};
|
|
3990
3994
|
return Object.keys(this).forEach((c) => {
|
|
3991
3995
|
const u = this[c];
|
|
3992
3996
|
// eslint-disable-next-line prettier/prettier
|
|
3993
|
-
|
|
3994
|
-
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((
|
|
3997
|
+
U(u) || m(u) && u.trim().length === 0 || Le(u.isNewRec) && u.isNewRec() || (r[c] = u);
|
|
3998
|
+
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
|
|
3995
3999
|
}
|
|
3996
4000
|
}
|
|
3997
|
-
class ir extends
|
|
4001
|
+
class ir extends z {
|
|
3998
4002
|
/**
|
|
3999
4003
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
4000
4004
|
*
|
|
@@ -4005,16 +4009,16 @@ class ir extends H {
|
|
|
4005
4009
|
/**
|
|
4006
4010
|
* Дата и время создания заказа.
|
|
4007
4011
|
*/
|
|
4008
|
-
|
|
4012
|
+
s(this, "createdAt");
|
|
4009
4013
|
/**
|
|
4010
4014
|
* Краткие данные о пользователе, который создал заказ.
|
|
4011
4015
|
*/
|
|
4012
|
-
|
|
4016
|
+
s(this, "creator");
|
|
4013
4017
|
/**
|
|
4014
4018
|
* Признак того, что заказ подтвержден в 1С.
|
|
4015
4019
|
*/
|
|
4016
|
-
|
|
4017
|
-
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
4020
|
+
s(this, "isApproved1c");
|
|
4021
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(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;
|
|
4018
4022
|
}
|
|
4019
4023
|
}
|
|
4020
4024
|
class it extends $ {
|
|
@@ -4024,33 +4028,33 @@ class it extends $ {
|
|
|
4024
4028
|
* @param data Данные для первоначальной инициализации.
|
|
4025
4029
|
*/
|
|
4026
4030
|
constructor(e) {
|
|
4027
|
-
var
|
|
4031
|
+
var t, i;
|
|
4028
4032
|
super(e);
|
|
4029
4033
|
/**
|
|
4030
4034
|
* Список контактов клиента.
|
|
4031
4035
|
*/
|
|
4032
|
-
|
|
4036
|
+
s(this, "contacts", []);
|
|
4033
4037
|
/**
|
|
4034
4038
|
* Предпочтительный тип доставки.
|
|
4035
4039
|
*/
|
|
4036
|
-
|
|
4040
|
+
s(this, "preferredDeliveryType");
|
|
4037
4041
|
/**
|
|
4038
4042
|
* Список групп партнеров (направлений деятельности), к которым относится клиент.
|
|
4039
4043
|
*/
|
|
4040
|
-
|
|
4044
|
+
s(this, "partnerGroups", []);
|
|
4041
4045
|
/**
|
|
4042
4046
|
* Данные о последнем заказе клиента.
|
|
4043
4047
|
*/
|
|
4044
|
-
|
|
4048
|
+
s(this, "lastOrder");
|
|
4045
4049
|
/**
|
|
4046
4050
|
* Направление продаж.
|
|
4047
4051
|
*/
|
|
4048
|
-
|
|
4052
|
+
s(this, "salesDirection");
|
|
4049
4053
|
/**
|
|
4050
4054
|
* Список менеджеров.
|
|
4051
4055
|
*/
|
|
4052
|
-
|
|
4053
|
-
(
|
|
4056
|
+
s(this, "managers");
|
|
4057
|
+
(t = e.contacts) != null && t.length && (this.contacts = e.contacts.map((o) => new H(o))), e.lastOrder && (this.lastOrder = new ir(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new F(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new S(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new re(o)));
|
|
4054
4058
|
}
|
|
4055
4059
|
}
|
|
4056
4060
|
class nt {
|
|
@@ -4063,11 +4067,11 @@ class nt {
|
|
|
4063
4067
|
/**
|
|
4064
4068
|
* Номер текущей страницы.
|
|
4065
4069
|
*/
|
|
4066
|
-
|
|
4070
|
+
s(this, "page", 1);
|
|
4067
4071
|
/**
|
|
4068
4072
|
* Количество записей на странице.
|
|
4069
4073
|
*/
|
|
4070
|
-
|
|
4074
|
+
s(this, "pageSize", 50);
|
|
4071
4075
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
|
|
4072
4076
|
}
|
|
4073
4077
|
}
|
|
@@ -4082,23 +4086,23 @@ class dt extends nt {
|
|
|
4082
4086
|
/**
|
|
4083
4087
|
* Количество записей в таблице.
|
|
4084
4088
|
*/
|
|
4085
|
-
|
|
4089
|
+
s(this, "itemCount", 0);
|
|
4086
4090
|
/**
|
|
4087
4091
|
* Число страниц с данными.
|
|
4088
4092
|
*/
|
|
4089
|
-
|
|
4093
|
+
s(this, "pageCount", 1);
|
|
4090
4094
|
/**
|
|
4091
4095
|
* Число отображаемых номеров страниц.
|
|
4092
4096
|
*/
|
|
4093
|
-
|
|
4097
|
+
s(this, "pageSlot", 5);
|
|
4094
4098
|
/**
|
|
4095
4099
|
* Значения для выпадающего списка "Количество записей на странице".
|
|
4096
4100
|
*/
|
|
4097
|
-
|
|
4101
|
+
s(this, "pageSizes", [25, 50, 100]);
|
|
4098
4102
|
/**
|
|
4099
4103
|
* Признак необходимости отображать список выбора числа отображаемых записей.
|
|
4100
4104
|
*/
|
|
4101
|
-
|
|
4105
|
+
s(this, "showSizePicker", !0);
|
|
4102
4106
|
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;
|
|
4103
4107
|
}
|
|
4104
4108
|
}
|
|
@@ -4112,11 +4116,11 @@ class qt {
|
|
|
4112
4116
|
/**
|
|
4113
4117
|
* Поле по которому необходимо выполнить сортировку
|
|
4114
4118
|
*/
|
|
4115
|
-
|
|
4119
|
+
s(this, "field");
|
|
4116
4120
|
/**
|
|
4117
4121
|
* Направление сортировки.
|
|
4118
4122
|
*/
|
|
4119
|
-
|
|
4123
|
+
s(this, "direction");
|
|
4120
4124
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
4121
4125
|
}
|
|
4122
4126
|
}
|
|
@@ -4140,8 +4144,8 @@ class Ut extends Ce {
|
|
|
4140
4144
|
*
|
|
4141
4145
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_list
|
|
4142
4146
|
*/
|
|
4143
|
-
getClientsList(r, e,
|
|
4144
|
-
return this.getPaginated("/internal/clients", r, e,
|
|
4147
|
+
getClientsList(r, e, t, i) {
|
|
4148
|
+
return this.getPaginated("/internal/clients", r, e, t, i, (o) => {
|
|
4145
4149
|
const c = { ...o.data };
|
|
4146
4150
|
return c.data = c.data.map((u) => new ne(u)), c;
|
|
4147
4151
|
});
|
|
@@ -4167,8 +4171,8 @@ class Ut extends Ce {
|
|
|
4167
4171
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
|
|
4168
4172
|
*/
|
|
4169
4173
|
getAdditionalClientsData(r, e) {
|
|
4170
|
-
const
|
|
4171
|
-
return this.post("/internal/clients/additional-data", { clients:
|
|
4174
|
+
const t = r.map((i) => i.id);
|
|
4175
|
+
return this.post("/internal/clients/additional-data", { clients: t, requested_data_types: e }, (i) => {
|
|
4172
4176
|
let o = [];
|
|
4173
4177
|
return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new it(c))), o;
|
|
4174
4178
|
});
|
|
@@ -4181,8 +4185,8 @@ class Ut extends Ce {
|
|
|
4181
4185
|
*/
|
|
4182
4186
|
getAllClientContacts(r) {
|
|
4183
4187
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
4184
|
-
let
|
|
4185
|
-
return (e == null ? void 0 : e.data.length) > 0 && (
|
|
4188
|
+
let t = [];
|
|
4189
|
+
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((i) => new st(i))), t;
|
|
4186
4190
|
});
|
|
4187
4191
|
}
|
|
4188
4192
|
/**
|
|
@@ -4195,7 +4199,7 @@ class Ut extends Ce {
|
|
|
4195
4199
|
* @see /doc/api/internal#/Клиенты/api_internal_client_create
|
|
4196
4200
|
*/
|
|
4197
4201
|
createClientCommonData(r, e = {}) {
|
|
4198
|
-
var
|
|
4202
|
+
var t;
|
|
4199
4203
|
return this.post(
|
|
4200
4204
|
"/internal/clients",
|
|
4201
4205
|
{
|
|
@@ -4210,7 +4214,7 @@ class Ut extends Ce {
|
|
|
4210
4214
|
source_primary_interest_id: r.sourcePrimaryInterest.id,
|
|
4211
4215
|
primary_demand: r.primaryDemand,
|
|
4212
4216
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4213
|
-
preferred_warehouse_id: (
|
|
4217
|
+
preferred_warehouse_id: (t = r.preferredWarehouse) == null ? void 0 : t.id
|
|
4214
4218
|
},
|
|
4215
4219
|
(i) => new Me(i.data),
|
|
4216
4220
|
e
|
|
@@ -4226,7 +4230,7 @@ class Ut extends Ce {
|
|
|
4226
4230
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4227
4231
|
*/
|
|
4228
4232
|
updateClientCommonData(r, e = {}) {
|
|
4229
|
-
var
|
|
4233
|
+
var t;
|
|
4230
4234
|
return this.patch(
|
|
4231
4235
|
`/internal/clients/${r.id}`,
|
|
4232
4236
|
{
|
|
@@ -4241,7 +4245,7 @@ class Ut extends Ce {
|
|
|
4241
4245
|
source_primary_interest_id: r.sourcePrimaryInterest.id,
|
|
4242
4246
|
primary_demand: r.primaryDemand,
|
|
4243
4247
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4244
|
-
preferred_warehouse_id: (
|
|
4248
|
+
preferred_warehouse_id: (t = r.preferredWarehouse) == null ? void 0 : t.id
|
|
4245
4249
|
},
|
|
4246
4250
|
void 0,
|
|
4247
4251
|
e
|
|
@@ -4258,12 +4262,12 @@ class Ut extends Ce {
|
|
|
4258
4262
|
* в случае ошибок в запросах.
|
|
4259
4263
|
* @see /doc/api/internal#/Клиенты/api_internal_client_change
|
|
4260
4264
|
*/
|
|
4261
|
-
changeClientPassword(r, e,
|
|
4265
|
+
changeClientPassword(r, e, t, i = {}) {
|
|
4262
4266
|
return this.patch(
|
|
4263
4267
|
`/internal/clients/${r}`,
|
|
4264
4268
|
{
|
|
4265
4269
|
password: e,
|
|
4266
|
-
password_confirmation:
|
|
4270
|
+
password_confirmation: t
|
|
4267
4271
|
},
|
|
4268
4272
|
void 0,
|
|
4269
4273
|
i
|
|
@@ -4296,8 +4300,8 @@ class Ut extends Ce {
|
|
|
4296
4300
|
* @see /doc/api/internal#/Клиенты/api_internal_client_manager_attach
|
|
4297
4301
|
*/
|
|
4298
4302
|
async attachClientToManagers(r, e) {
|
|
4299
|
-
const
|
|
4300
|
-
await Promise.all(
|
|
4303
|
+
const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/attach`, { is_primary: i.isDefault }));
|
|
4304
|
+
await Promise.all(t);
|
|
4301
4305
|
}
|
|
4302
4306
|
/**
|
|
4303
4307
|
* Выполняет открепление указанного клиента от указанных менеджеров.
|
|
@@ -4308,8 +4312,8 @@ class Ut extends Ce {
|
|
|
4308
4312
|
* @see /doc/api/internal#/Клиенты/api_internal_client_manager_detach
|
|
4309
4313
|
*/
|
|
4310
4314
|
async detachClientFromManagers(r, e) {
|
|
4311
|
-
const
|
|
4312
|
-
await Promise.all(
|
|
4315
|
+
const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/detach`));
|
|
4316
|
+
await Promise.all(t);
|
|
4313
4317
|
}
|
|
4314
4318
|
/**
|
|
4315
4319
|
* Создаёт нового контрагента клиента.
|
|
@@ -4321,7 +4325,7 @@ class Ut extends Ce {
|
|
|
4321
4325
|
* в случае ошибок в запросах.
|
|
4322
4326
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
4323
4327
|
*/
|
|
4324
|
-
createContragentClientData(r, e,
|
|
4328
|
+
createContragentClientData(r, e, t = {}) {
|
|
4325
4329
|
var g, R, A, L, I, x, k, N;
|
|
4326
4330
|
let i;
|
|
4327
4331
|
const o = e, c = e, u = e;
|
|
@@ -4397,7 +4401,7 @@ class Ut extends Ce {
|
|
|
4397
4401
|
`/internal/clients/${r}/contragents`,
|
|
4398
4402
|
i,
|
|
4399
4403
|
(d) => he.createInstance(d.data),
|
|
4400
|
-
|
|
4404
|
+
t
|
|
4401
4405
|
);
|
|
4402
4406
|
}
|
|
4403
4407
|
/**
|
|
@@ -4410,7 +4414,7 @@ class Ut extends Ce {
|
|
|
4410
4414
|
* в случае ошибок в запросах.
|
|
4411
4415
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
4412
4416
|
*/
|
|
4413
|
-
updateContragentClientData(r, e,
|
|
4417
|
+
updateContragentClientData(r, e, t = {}) {
|
|
4414
4418
|
var g, R, A, L, I, x, k, N;
|
|
4415
4419
|
let i;
|
|
4416
4420
|
const o = e, c = e, u = e;
|
|
@@ -4486,7 +4490,7 @@ class Ut extends Ce {
|
|
|
4486
4490
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
4487
4491
|
i,
|
|
4488
4492
|
(d) => he.createInstance(d.data),
|
|
4489
|
-
|
|
4493
|
+
t
|
|
4490
4494
|
);
|
|
4491
4495
|
}
|
|
4492
4496
|
/**
|
|
@@ -4509,7 +4513,7 @@ class Ut extends Ce {
|
|
|
4509
4513
|
* в случае ошибок в запросах.
|
|
4510
4514
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_create
|
|
4511
4515
|
*/
|
|
4512
|
-
createClientDeliveryAddress(r, e,
|
|
4516
|
+
createClientDeliveryAddress(r, e, t = {}) {
|
|
4513
4517
|
var o, c;
|
|
4514
4518
|
const i = {
|
|
4515
4519
|
address: e.address,
|
|
@@ -4523,7 +4527,7 @@ class Ut extends Ce {
|
|
|
4523
4527
|
}), e.operatingHours && (i.operating_hours = {
|
|
4524
4528
|
from: e.operatingHours.from,
|
|
4525
4529
|
to: e.operatingHours.to
|
|
4526
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ge(u.data),
|
|
4530
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ge(u.data), t);
|
|
4527
4531
|
}
|
|
4528
4532
|
/**
|
|
4529
4533
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -4535,7 +4539,7 @@ class Ut extends Ce {
|
|
|
4535
4539
|
* в случае ошибок в запросах.
|
|
4536
4540
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
|
|
4537
4541
|
*/
|
|
4538
|
-
updateClientDeliveryAddress(r, e,
|
|
4542
|
+
updateClientDeliveryAddress(r, e, t = {}) {
|
|
4539
4543
|
var o, c;
|
|
4540
4544
|
const i = {
|
|
4541
4545
|
address: e.address,
|
|
@@ -4553,7 +4557,7 @@ class Ut extends Ce {
|
|
|
4553
4557
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
4554
4558
|
i,
|
|
4555
4559
|
(u) => new ge(u.data),
|
|
4556
|
-
|
|
4560
|
+
t
|
|
4557
4561
|
);
|
|
4558
4562
|
}
|
|
4559
4563
|
/**
|
|
@@ -4578,15 +4582,15 @@ class Ut extends Ce {
|
|
|
4578
4582
|
* в случае ошибок в запросах.
|
|
4579
4583
|
* @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
|
|
4580
4584
|
*/
|
|
4581
|
-
createContragentBankAccount(r, e,
|
|
4585
|
+
createContragentBankAccount(r, e, t, i = {}) {
|
|
4582
4586
|
return this.post(
|
|
4583
4587
|
`/internal/clients/${r}/contragents/${e}/bank-accounts`,
|
|
4584
4588
|
{
|
|
4585
|
-
bank_name:
|
|
4586
|
-
bic:
|
|
4587
|
-
account_number:
|
|
4588
|
-
correspondent_account:
|
|
4589
|
-
currency_id:
|
|
4589
|
+
bank_name: t.bankName,
|
|
4590
|
+
bic: t.bic,
|
|
4591
|
+
account_number: t.accountNumber,
|
|
4592
|
+
correspondent_account: t.correspondentAccount,
|
|
4593
|
+
currency_id: t.currency.id
|
|
4590
4594
|
},
|
|
4591
4595
|
(o) => new _e(o.data),
|
|
4592
4596
|
i
|
|
@@ -4604,15 +4608,15 @@ class Ut extends Ce {
|
|
|
4604
4608
|
* в случае ошибок в запросах.
|
|
4605
4609
|
* @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
|
|
4606
4610
|
*/
|
|
4607
|
-
updateContragentBankAccount(r, e,
|
|
4611
|
+
updateContragentBankAccount(r, e, t, i = {}) {
|
|
4608
4612
|
return this.patch(
|
|
4609
|
-
`/internal/clients/${r}/contragents/${e}/bank-accounts/${
|
|
4613
|
+
`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
|
|
4610
4614
|
{
|
|
4611
|
-
bank_name:
|
|
4612
|
-
bic:
|
|
4613
|
-
account_number:
|
|
4614
|
-
correspondent_account:
|
|
4615
|
-
currency_id:
|
|
4615
|
+
bank_name: t.bankName,
|
|
4616
|
+
bic: t.bic,
|
|
4617
|
+
account_number: t.accountNumber,
|
|
4618
|
+
correspondent_account: t.correspondentAccount,
|
|
4619
|
+
currency_id: t.currency.id
|
|
4616
4620
|
},
|
|
4617
4621
|
(o) => new _e(o.data),
|
|
4618
4622
|
i
|
|
@@ -4627,8 +4631,8 @@ class Ut extends Ce {
|
|
|
4627
4631
|
* @param bankAccount Данные банковских реквизитов.
|
|
4628
4632
|
* @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_delete
|
|
4629
4633
|
*/
|
|
4630
|
-
deleteContragentBankAccount(r, e,
|
|
4631
|
-
return this.delete(`/internal/clients/${r}/contragents/${e}/bank-accounts/${
|
|
4634
|
+
deleteContragentBankAccount(r, e, t) {
|
|
4635
|
+
return this.delete(`/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`);
|
|
4632
4636
|
}
|
|
4633
4637
|
/**
|
|
4634
4638
|
* Создаёт новую запись о контактном лице клиента.
|
|
@@ -4640,7 +4644,7 @@ class Ut extends Ce {
|
|
|
4640
4644
|
* в случае ошибок в запросах.
|
|
4641
4645
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4642
4646
|
*/
|
|
4643
|
-
createClientContact(r, e,
|
|
4647
|
+
createClientContact(r, e, t = {}) {
|
|
4644
4648
|
return this.createContact(
|
|
4645
4649
|
r,
|
|
4646
4650
|
e,
|
|
@@ -4651,7 +4655,7 @@ class Ut extends Ce {
|
|
|
4651
4655
|
not_disturb: e.notDisturb ?? !1
|
|
4652
4656
|
}
|
|
4653
4657
|
},
|
|
4654
|
-
|
|
4658
|
+
t
|
|
4655
4659
|
);
|
|
4656
4660
|
}
|
|
4657
4661
|
/**
|
|
@@ -4664,7 +4668,7 @@ class Ut extends Ce {
|
|
|
4664
4668
|
* в случае ошибок в запросах.
|
|
4665
4669
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_change
|
|
4666
4670
|
*/
|
|
4667
|
-
updateClientContact(r, e,
|
|
4671
|
+
updateClientContact(r, e, t = {}) {
|
|
4668
4672
|
return this.patch(
|
|
4669
4673
|
`/internal/clients/${r}/contacts/${e.id}`,
|
|
4670
4674
|
{
|
|
@@ -4675,8 +4679,8 @@ class Ut extends Ce {
|
|
|
4675
4679
|
comment: e.comment,
|
|
4676
4680
|
not_disturb: e.notDisturb
|
|
4677
4681
|
},
|
|
4678
|
-
(i) => new
|
|
4679
|
-
|
|
4682
|
+
(i) => new H(i.data),
|
|
4683
|
+
t
|
|
4680
4684
|
);
|
|
4681
4685
|
}
|
|
4682
4686
|
/**
|
|
@@ -4710,16 +4714,16 @@ class Ut extends Ce {
|
|
|
4710
4714
|
* в случае ошибок в запросах.
|
|
4711
4715
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4712
4716
|
*/
|
|
4713
|
-
createContragentContact(r, e,
|
|
4717
|
+
createContragentContact(r, e, t, i = {}) {
|
|
4714
4718
|
return this.createContact(
|
|
4715
4719
|
r,
|
|
4716
|
-
|
|
4720
|
+
t,
|
|
4717
4721
|
{
|
|
4718
4722
|
contragents: [
|
|
4719
4723
|
{
|
|
4720
4724
|
id: e,
|
|
4721
|
-
is_primary:
|
|
4722
|
-
not_disturb:
|
|
4725
|
+
is_primary: t.isPrimary ?? !1,
|
|
4726
|
+
not_disturb: t.notDisturb ?? !1
|
|
4723
4727
|
}
|
|
4724
4728
|
]
|
|
4725
4729
|
},
|
|
@@ -4734,8 +4738,8 @@ class Ut extends Ce {
|
|
|
4734
4738
|
* @param contactPerson Данные о контактном лице.
|
|
4735
4739
|
* @see /doc/api/internal#/Контакты/api_internal_client_contragent_contact_change_is_primary
|
|
4736
4740
|
*/
|
|
4737
|
-
setPrimaryContragentContact(r, e,
|
|
4738
|
-
return this.setPrimaryContact(`/internal/clients/${r}/contragents/${e}/contacts/${
|
|
4741
|
+
setPrimaryContragentContact(r, e, t) {
|
|
4742
|
+
return this.setPrimaryContact(`/internal/clients/${r}/contragents/${e}/contacts/${t.id}/primary`, t.isPrimary ?? !1);
|
|
4739
4743
|
}
|
|
4740
4744
|
/**
|
|
4741
4745
|
* Удаляет связь между указанным контактным лицом и контрагентом.
|
|
@@ -4745,8 +4749,8 @@ class Ut extends Ce {
|
|
|
4745
4749
|
* @param contactPerson Данные о контактном лице.
|
|
4746
4750
|
* @see /doc/api/internal#/Контакты/api_internal_client_contragent_contact_detach
|
|
4747
4751
|
*/
|
|
4748
|
-
detachContragentContact(r, e,
|
|
4749
|
-
return this.detachContact(`/internal/clients/${r}/contragents/${e}/contacts/${
|
|
4752
|
+
detachContragentContact(r, e, t) {
|
|
4753
|
+
return this.detachContact(`/internal/clients/${r}/contragents/${e}/contacts/${t.id}/detach`);
|
|
4750
4754
|
}
|
|
4751
4755
|
/**
|
|
4752
4756
|
* Создаёт новую запись о контактном лице адреса доставки.
|
|
@@ -4759,16 +4763,16 @@ class Ut extends Ce {
|
|
|
4759
4763
|
* в случае ошибок в запросах.
|
|
4760
4764
|
* @see /doc/api/internal#/Контакты/api_internal_client_contact_create
|
|
4761
4765
|
*/
|
|
4762
|
-
createDeliveryAddressContact(r, e,
|
|
4766
|
+
createDeliveryAddressContact(r, e, t, i = {}) {
|
|
4763
4767
|
return this.createContact(
|
|
4764
4768
|
r,
|
|
4765
|
-
|
|
4769
|
+
t,
|
|
4766
4770
|
{
|
|
4767
4771
|
addresses: [
|
|
4768
4772
|
{
|
|
4769
4773
|
id: e,
|
|
4770
|
-
is_primary:
|
|
4771
|
-
not_disturb:
|
|
4774
|
+
is_primary: t.isPrimary ?? !1,
|
|
4775
|
+
not_disturb: t.notDisturb ?? !1
|
|
4772
4776
|
}
|
|
4773
4777
|
]
|
|
4774
4778
|
},
|
|
@@ -4783,10 +4787,10 @@ class Ut extends Ce {
|
|
|
4783
4787
|
* @param contactPerson Данные о контактном лице.
|
|
4784
4788
|
* @see /doc/api/internal#/Контакты/api_internal_client_delivery_address_contact_change_is_primary
|
|
4785
4789
|
*/
|
|
4786
|
-
setPrimaryDeliveryAddressContact(r, e,
|
|
4790
|
+
setPrimaryDeliveryAddressContact(r, e, t) {
|
|
4787
4791
|
return this.setPrimaryContact(
|
|
4788
|
-
`/internal/clients/${r}/delivery-addresses/${e}/contacts/${
|
|
4789
|
-
|
|
4792
|
+
`/internal/clients/${r}/delivery-addresses/${e}/contacts/${t.id}/primary`,
|
|
4793
|
+
t.isPrimary ?? !1
|
|
4790
4794
|
);
|
|
4791
4795
|
}
|
|
4792
4796
|
/**
|
|
@@ -4797,8 +4801,8 @@ class Ut extends Ce {
|
|
|
4797
4801
|
* @param contactPerson Данные о контактном лице.
|
|
4798
4802
|
* @see /doc/api/internal#/Контакты/api_internal_client_delivery_address_contact_detach
|
|
4799
4803
|
*/
|
|
4800
|
-
detachDeliveryAddressContact(r, e,
|
|
4801
|
-
return this.detachContact(`/internal/clients/${r}/delivery-addresses/${e}/contacts/${
|
|
4804
|
+
detachDeliveryAddressContact(r, e, t) {
|
|
4805
|
+
return this.detachContact(`/internal/clients/${r}/delivery-addresses/${e}/contacts/${t.id}/detach`);
|
|
4802
4806
|
}
|
|
4803
4807
|
/**
|
|
4804
4808
|
* Создаёт новую запись о контактном лице клиента.
|
|
@@ -4810,15 +4814,15 @@ class Ut extends Ce {
|
|
|
4810
4814
|
* установить данные об ошибках валидации
|
|
4811
4815
|
* в случае ошибок в запросах.
|
|
4812
4816
|
*/
|
|
4813
|
-
createContact(r, e,
|
|
4817
|
+
createContact(r, e, t, i = {}) {
|
|
4814
4818
|
var c, u;
|
|
4815
4819
|
const o = {
|
|
4816
4820
|
name: e.name,
|
|
4817
4821
|
position: e.position,
|
|
4818
4822
|
comment: e.comment,
|
|
4819
|
-
...
|
|
4823
|
+
...t
|
|
4820
4824
|
};
|
|
4821
|
-
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (g) => new
|
|
4825
|
+
return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (g) => new H(g.data), i);
|
|
4822
4826
|
}
|
|
4823
4827
|
/**
|
|
4824
4828
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4854,10 +4858,10 @@ class Gt extends p {
|
|
|
4854
4858
|
* @param phone Номер телефона который необходимо проверить.
|
|
4855
4859
|
*/
|
|
4856
4860
|
checkPhoneIsBusy(r) {
|
|
4857
|
-
return new Promise((e,
|
|
4861
|
+
return new Promise((e, t) => {
|
|
4858
4862
|
this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((i) => {
|
|
4859
4863
|
e(!!i.isBusy);
|
|
4860
|
-
}).catch(
|
|
4864
|
+
}).catch(t);
|
|
4861
4865
|
});
|
|
4862
4866
|
}
|
|
4863
4867
|
}
|
|
@@ -4884,7 +4888,7 @@ class Mt extends p {
|
|
|
4884
4888
|
*
|
|
4885
4889
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
|
|
4886
4890
|
*/
|
|
4887
|
-
searchProduct(r, e,
|
|
4891
|
+
searchProduct(r, e, t = {}) {
|
|
4888
4892
|
var o;
|
|
4889
4893
|
const i = this.get(
|
|
4890
4894
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
@@ -4892,7 +4896,7 @@ class Mt extends p {
|
|
|
4892
4896
|
(c) => new _(c.data)
|
|
4893
4897
|
);
|
|
4894
4898
|
return i.catch((c) => {
|
|
4895
|
-
this.defaultInstanceNotificationErrorResponseHandler(c,
|
|
4899
|
+
this.defaultInstanceNotificationErrorResponseHandler(c, t);
|
|
4896
4900
|
}), i;
|
|
4897
4901
|
}
|
|
4898
4902
|
/**
|
|
@@ -4907,7 +4911,7 @@ class Mt extends p {
|
|
|
4907
4911
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_template_create
|
|
4908
4912
|
*/
|
|
4909
4913
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4910
|
-
createTemplate(r, e,
|
|
4914
|
+
createTemplate(r, e, t = {}) {
|
|
4911
4915
|
var i;
|
|
4912
4916
|
return this.post(
|
|
4913
4917
|
`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.editor}/template`,
|
|
@@ -4915,7 +4919,7 @@ class Mt extends p {
|
|
|
4915
4919
|
// eslint-disable-next-line lodash/prefer-noop, @typescript-eslint/no-empty-function
|
|
4916
4920
|
() => {
|
|
4917
4921
|
},
|
|
4918
|
-
|
|
4922
|
+
t
|
|
4919
4923
|
);
|
|
4920
4924
|
}
|
|
4921
4925
|
/**
|
|
@@ -4928,8 +4932,8 @@ class Mt extends p {
|
|
|
4928
4932
|
*/
|
|
4929
4933
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
4930
4934
|
removeTemplate(r, e) {
|
|
4931
|
-
var
|
|
4932
|
-
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(
|
|
4935
|
+
var t;
|
|
4936
|
+
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(t = r.properties) == null ? void 0 : t.editor}/template/${e}`);
|
|
4933
4937
|
}
|
|
4934
4938
|
}
|
|
4935
4939
|
class Ft {
|
|
@@ -4947,14 +4951,14 @@ class Ft {
|
|
|
4947
4951
|
};
|
|
4948
4952
|
}
|
|
4949
4953
|
}
|
|
4950
|
-
const
|
|
4954
|
+
const K = class K {
|
|
4951
4955
|
/**
|
|
4952
4956
|
* Устанавливает список единиц измерения линейной величины.
|
|
4953
4957
|
*
|
|
4954
4958
|
* @param linearValues Список единиц измерения линейной величины.
|
|
4955
4959
|
*/
|
|
4956
4960
|
static setLinearValues(r) {
|
|
4957
|
-
|
|
4961
|
+
K.linearValues = r;
|
|
4958
4962
|
}
|
|
4959
4963
|
/**
|
|
4960
4964
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -4962,7 +4966,7 @@ const E = class E {
|
|
|
4962
4966
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
4963
4967
|
*/
|
|
4964
4968
|
static productIsMeasurable(r) {
|
|
4965
|
-
return
|
|
4969
|
+
return K.linearValues.includes(r.unit);
|
|
4966
4970
|
}
|
|
4967
4971
|
/**
|
|
4968
4972
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -4970,8 +4974,8 @@ const E = class E {
|
|
|
4970
4974
|
* @param product Данные о товаре для которого необходимо вернуть кратность количества.
|
|
4971
4975
|
*/
|
|
4972
4976
|
static getProductMultiplicity(r) {
|
|
4973
|
-
var e,
|
|
4974
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((
|
|
4977
|
+
var e, t;
|
|
4978
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !K.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
4975
4979
|
}
|
|
4976
4980
|
/**
|
|
4977
4981
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -4979,15 +4983,15 @@ const E = class E {
|
|
|
4979
4983
|
* @param product Данные о товаре для которого необходимо вернуть кратность длины.
|
|
4980
4984
|
*/
|
|
4981
4985
|
static getProductLengthMultiplicity(r) {
|
|
4982
|
-
var e,
|
|
4983
|
-
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((
|
|
4986
|
+
var e, t, i;
|
|
4987
|
+
return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
|
|
4984
4988
|
}
|
|
4985
4989
|
};
|
|
4986
4990
|
/**
|
|
4987
4991
|
* Список единиц измерения линейной величины.
|
|
4988
4992
|
*/
|
|
4989
|
-
|
|
4990
|
-
let Fe =
|
|
4993
|
+
s(K, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
4994
|
+
let Fe = K;
|
|
4991
4995
|
class Ht {
|
|
4992
4996
|
/**
|
|
4993
4997
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
@@ -5010,8 +5014,8 @@ class ot extends p {
|
|
|
5010
5014
|
*/
|
|
5011
5015
|
getManagers() {
|
|
5012
5016
|
const r = "/internal/managers", e = p.getCachedResponse(r);
|
|
5013
|
-
return e ? Promise.resolve(e) : this.get(r).then((
|
|
5014
|
-
const i =
|
|
5017
|
+
return e ? Promise.resolve(e) : this.get(r).then((t) => {
|
|
5018
|
+
const i = t.data.map((o) => xe.instanceInitializer(we, o));
|
|
5015
5019
|
return i && this.cacheResponse(r, i), i;
|
|
5016
5020
|
});
|
|
5017
5021
|
}
|
|
@@ -5023,50 +5027,50 @@ class nr extends ir {
|
|
|
5023
5027
|
* @param data Данные для первоначальной инициализации.
|
|
5024
5028
|
*/
|
|
5025
5029
|
constructor(e) {
|
|
5026
|
-
var
|
|
5030
|
+
var t, i, o, c, u, g, R, A;
|
|
5027
5031
|
super(e);
|
|
5028
5032
|
/**
|
|
5029
5033
|
* Краткие данные о клиенте.
|
|
5030
5034
|
*/
|
|
5031
|
-
|
|
5035
|
+
s(this, "client");
|
|
5032
5036
|
/**
|
|
5033
5037
|
* Данные об оплате заказа.
|
|
5034
5038
|
*/
|
|
5035
|
-
|
|
5039
|
+
s(this, "payment");
|
|
5036
5040
|
/**
|
|
5037
5041
|
* Данные о доставке заказа.
|
|
5038
5042
|
*/
|
|
5039
|
-
|
|
5043
|
+
s(this, "delivery");
|
|
5040
5044
|
/**
|
|
5041
5045
|
* Краткие данные о пользователе, за которым закреплен заказ.
|
|
5042
5046
|
*/
|
|
5043
|
-
|
|
5047
|
+
s(this, "attachedUser");
|
|
5044
5048
|
/**
|
|
5045
5049
|
* Идентификатор статуса заказа.
|
|
5046
5050
|
*/
|
|
5047
|
-
|
|
5051
|
+
s(this, "status");
|
|
5048
5052
|
/**
|
|
5049
5053
|
* Направление продаж заказа.
|
|
5050
5054
|
*/
|
|
5051
|
-
|
|
5055
|
+
s(this, "salesDirection");
|
|
5052
5056
|
/**
|
|
5053
5057
|
* Дата и время начала обработки заказа.
|
|
5054
5058
|
*/
|
|
5055
|
-
|
|
5059
|
+
s(this, "pendingAt");
|
|
5056
5060
|
/**
|
|
5057
5061
|
* Дата и время завершения обработки заказа.
|
|
5058
5062
|
*/
|
|
5059
|
-
|
|
5063
|
+
s(this, "processedAt");
|
|
5060
5064
|
/**
|
|
5061
5065
|
* Признак того, что заказ создан из товаров, которые имеют признак "Под заказ".
|
|
5062
5066
|
*/
|
|
5063
|
-
|
|
5067
|
+
s(this, "isOnOrder");
|
|
5064
5068
|
/**
|
|
5065
5069
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
5066
5070
|
*/
|
|
5067
|
-
|
|
5071
|
+
s(this, "isNotInStock");
|
|
5068
5072
|
this.client = new ne(e == null ? void 0 : e.client), this.payment = {
|
|
5069
|
-
type: ((
|
|
5073
|
+
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
5070
5074
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
5071
5075
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
5072
5076
|
}, this.delivery = {
|
|
@@ -5074,10 +5078,10 @@ class nr extends ir {
|
|
|
5074
5078
|
date: m((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
|
|
5075
5079
|
address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new ge(e.delivery.address) : void 0,
|
|
5076
5080
|
warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new ye(e.delivery.warehouse) : void 0
|
|
5077
|
-
}, this.attachedUser = new
|
|
5081
|
+
}, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(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;
|
|
5078
5082
|
}
|
|
5079
5083
|
}
|
|
5080
|
-
class ct extends
|
|
5084
|
+
class ct extends z {
|
|
5081
5085
|
/**
|
|
5082
5086
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
5083
5087
|
*
|
|
@@ -5088,67 +5092,67 @@ class ct extends H {
|
|
|
5088
5092
|
/**
|
|
5089
5093
|
* Данные о продукте.
|
|
5090
5094
|
*/
|
|
5091
|
-
|
|
5095
|
+
s(this, "product");
|
|
5092
5096
|
/**
|
|
5093
5097
|
* Количество товара/услуги.
|
|
5094
5098
|
*/
|
|
5095
|
-
|
|
5099
|
+
s(this, "quantity");
|
|
5096
5100
|
/**
|
|
5097
5101
|
* Валюта товара или услуги.
|
|
5098
5102
|
*/
|
|
5099
|
-
|
|
5103
|
+
s(this, "currency");
|
|
5100
5104
|
/**
|
|
5101
5105
|
* Стоимость единицы товара или услуги в валюте.
|
|
5102
5106
|
*/
|
|
5103
|
-
|
|
5107
|
+
s(this, "costOne");
|
|
5104
5108
|
/**
|
|
5105
5109
|
* Стоимость единицы товара или услуги в рублях.
|
|
5106
5110
|
*/
|
|
5107
|
-
|
|
5111
|
+
s(this, "costOneRub");
|
|
5108
5112
|
/**
|
|
5109
5113
|
* Итоговая стоимость товара или услуги в валюте.
|
|
5110
5114
|
*/
|
|
5111
|
-
|
|
5115
|
+
s(this, "cost");
|
|
5112
5116
|
/**
|
|
5113
5117
|
* Итоговая стоимость товара или услуги в рублях.
|
|
5114
5118
|
*/
|
|
5115
|
-
|
|
5119
|
+
s(this, "costRub");
|
|
5116
5120
|
/**
|
|
5117
5121
|
* Описание позиции.
|
|
5118
5122
|
*/
|
|
5119
|
-
|
|
5123
|
+
s(this, "marker");
|
|
5120
5124
|
/**
|
|
5121
5125
|
* Высота товара.
|
|
5122
5126
|
*/
|
|
5123
|
-
|
|
5127
|
+
s(this, "height");
|
|
5124
5128
|
/**
|
|
5125
5129
|
* Длина товара.
|
|
5126
5130
|
*/
|
|
5127
|
-
|
|
5131
|
+
s(this, "length");
|
|
5128
5132
|
/**
|
|
5129
5133
|
* Ширина товара.
|
|
5130
5134
|
*/
|
|
5131
|
-
|
|
5135
|
+
s(this, "width");
|
|
5132
5136
|
/**
|
|
5133
5137
|
* Идентификатор логической группы товаров/услуг.
|
|
5134
5138
|
*/
|
|
5135
|
-
|
|
5139
|
+
s(this, "logicGroupId");
|
|
5136
5140
|
/**
|
|
5137
5141
|
* Направление продаж.
|
|
5138
5142
|
*/
|
|
5139
|
-
|
|
5143
|
+
s(this, "salesDirection");
|
|
5140
5144
|
/**
|
|
5141
5145
|
* URL изображения со спецификацией.
|
|
5142
5146
|
*/
|
|
5143
|
-
|
|
5147
|
+
s(this, "specificationImgUrl");
|
|
5144
5148
|
/**
|
|
5145
5149
|
* Название (slug) конфигуратора.
|
|
5146
5150
|
*/
|
|
5147
|
-
|
|
5151
|
+
s(this, "configurator");
|
|
5148
5152
|
/**
|
|
5149
5153
|
* Параметры введенные в конфигуратор, при добавлении позиции в корзину.
|
|
5150
5154
|
*/
|
|
5151
|
-
|
|
5155
|
+
s(this, "configuratorParams");
|
|
5152
5156
|
/**
|
|
5153
5157
|
* Вариант продольного распила.
|
|
5154
5158
|
*
|
|
@@ -5156,7 +5160,7 @@ class ct extends H {
|
|
|
5156
5160
|
* а в качестве ключа указывается код продукта,
|
|
5157
5161
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
5158
5162
|
*/
|
|
5159
|
-
|
|
5163
|
+
s(this, "sawing");
|
|
5160
5164
|
this.product = new Q(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;
|
|
5161
5165
|
}
|
|
5162
5166
|
}
|
|
@@ -5171,36 +5175,36 @@ class lt extends nr {
|
|
|
5171
5175
|
/**
|
|
5172
5176
|
* Список продуктов заказа.
|
|
5173
5177
|
*/
|
|
5174
|
-
|
|
5178
|
+
s(this, "products");
|
|
5175
5179
|
/**
|
|
5176
5180
|
* Список счетов заказа.
|
|
5177
5181
|
*/
|
|
5178
|
-
|
|
5182
|
+
s(this, "invoices");
|
|
5179
5183
|
/**
|
|
5180
5184
|
* Комментарий клиента к заказу.
|
|
5181
5185
|
*/
|
|
5182
|
-
|
|
5186
|
+
s(this, "comment");
|
|
5183
5187
|
/**
|
|
5184
5188
|
* Изображение, прикрепленное к заказу клиентом во время создания.
|
|
5185
5189
|
*/
|
|
5186
|
-
|
|
5190
|
+
s(this, "image");
|
|
5187
5191
|
/**
|
|
5188
5192
|
* Данные о контрагенте.
|
|
5189
5193
|
*/
|
|
5190
|
-
|
|
5194
|
+
s(this, "contragent");
|
|
5191
5195
|
/**
|
|
5192
5196
|
* Штрих-код заказа.
|
|
5193
5197
|
*/
|
|
5194
|
-
|
|
5198
|
+
s(this, "barcode");
|
|
5195
5199
|
/**
|
|
5196
5200
|
* Данные об источнике заказа.
|
|
5197
5201
|
*/
|
|
5198
|
-
|
|
5202
|
+
s(this, "orderSource");
|
|
5199
5203
|
/**
|
|
5200
5204
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
5201
5205
|
*/
|
|
5202
|
-
|
|
5203
|
-
this.products = (e.products ?? []).map((
|
|
5206
|
+
s(this, "isAllowProcessingWithoutPayment");
|
|
5207
|
+
this.products = (e.products ?? []).map((t) => new ct(t)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? he.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
5204
5208
|
}
|
|
5205
5209
|
}
|
|
5206
5210
|
class zt extends Ce {
|
|
@@ -5213,8 +5217,8 @@ class zt extends Ce {
|
|
|
5213
5217
|
*
|
|
5214
5218
|
* @see /doc/api/internal#/Заказы/api_internal_orders_get_list
|
|
5215
5219
|
*/
|
|
5216
|
-
getOrders(r, e,
|
|
5217
|
-
return this.getPaginated("/internal/orders", r, e ? [e] : void 0,
|
|
5220
|
+
getOrders(r, e, t) {
|
|
5221
|
+
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, t, {}, (i) => {
|
|
5218
5222
|
const o = { ...i.data };
|
|
5219
5223
|
return o.data = o.data.map((c) => new nr(c)), o;
|
|
5220
5224
|
});
|
|
@@ -5247,38 +5251,38 @@ class De {
|
|
|
5247
5251
|
/**
|
|
5248
5252
|
* Краткие данные о клиенте.
|
|
5249
5253
|
*/
|
|
5250
|
-
|
|
5254
|
+
s(this, "client");
|
|
5251
5255
|
/**
|
|
5252
5256
|
* Базовые данные о продукте.
|
|
5253
5257
|
*/
|
|
5254
|
-
|
|
5258
|
+
s(this, "product");
|
|
5255
5259
|
/**
|
|
5256
5260
|
* Стоимость товара или услуги.
|
|
5257
5261
|
*/
|
|
5258
|
-
|
|
5262
|
+
s(this, "cost");
|
|
5259
5263
|
/**
|
|
5260
5264
|
* Коэффициент стоимости продукта от розничной цены.
|
|
5261
5265
|
*/
|
|
5262
|
-
|
|
5266
|
+
s(this, "costCoefficient");
|
|
5263
5267
|
/**
|
|
5264
5268
|
* Источник клиентской цены.
|
|
5265
5269
|
*/
|
|
5266
|
-
|
|
5270
|
+
s(this, "source");
|
|
5267
5271
|
this.client = new ne(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) ?? ke.Product;
|
|
5268
5272
|
}
|
|
5269
5273
|
}
|
|
5270
5274
|
const Ae = (n) => {
|
|
5271
|
-
var r, e,
|
|
5275
|
+
var r, e, t, i, o;
|
|
5272
5276
|
return n ? yr(
|
|
5273
5277
|
{
|
|
5274
5278
|
cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
|
|
5275
5279
|
clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
|
|
5276
|
-
managers: (
|
|
5280
|
+
managers: (t = n.managers) == null ? void 0 : t.map((c) => c.id),
|
|
5277
5281
|
partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
|
|
5278
5282
|
salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
|
|
5279
5283
|
hideNotActive: n.hideNotActive
|
|
5280
5284
|
},
|
|
5281
|
-
(c) =>
|
|
5285
|
+
(c) => U(c) || (Be(c) || wr(c)) && ae(c)
|
|
5282
5286
|
) : {};
|
|
5283
5287
|
}, He = (n) => {
|
|
5284
5288
|
const r = {};
|
|
@@ -5294,12 +5298,12 @@ class Bt extends p {
|
|
|
5294
5298
|
*
|
|
5295
5299
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
5296
5300
|
*/
|
|
5297
|
-
analyzeProductPrices(r, e,
|
|
5301
|
+
analyzeProductPrices(r, e, t) {
|
|
5298
5302
|
return this.get(
|
|
5299
5303
|
`/internal/price/products/${r}/analyze`,
|
|
5300
5304
|
{
|
|
5301
5305
|
...He(e),
|
|
5302
|
-
filters: Ae(
|
|
5306
|
+
filters: Ae(t)
|
|
5303
5307
|
},
|
|
5304
5308
|
(i) => i.data.map((o) => new De(o))
|
|
5305
5309
|
);
|
|
@@ -5313,12 +5317,12 @@ class Bt extends p {
|
|
|
5313
5317
|
*
|
|
5314
5318
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze
|
|
5315
5319
|
*/
|
|
5316
|
-
analyzeCategoryPrices(r, e,
|
|
5320
|
+
analyzeCategoryPrices(r, e, t) {
|
|
5317
5321
|
return this.get(
|
|
5318
5322
|
`/internal/price/categories/${r}/analyze`,
|
|
5319
5323
|
{
|
|
5320
5324
|
...He(e),
|
|
5321
|
-
filters: Ae(
|
|
5325
|
+
filters: Ae(t)
|
|
5322
5326
|
},
|
|
5323
5327
|
(i) => i.data.map((o) => new De(o))
|
|
5324
5328
|
);
|
|
@@ -5334,12 +5338,12 @@ class Bt extends p {
|
|
|
5334
5338
|
*
|
|
5335
5339
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_categories_analyze_by_square
|
|
5336
5340
|
*/
|
|
5337
|
-
analyzeCategoryPricesBySquare(r, e,
|
|
5341
|
+
analyzeCategoryPricesBySquare(r, e, t) {
|
|
5338
5342
|
return this.get(
|
|
5339
5343
|
`/internal/price/categories/${r}/analyze/square`,
|
|
5340
5344
|
{
|
|
5341
5345
|
...e,
|
|
5342
|
-
filters: Ae(
|
|
5346
|
+
filters: Ae(t)
|
|
5343
5347
|
},
|
|
5344
5348
|
(i) => i.data.map((o) => new De(o))
|
|
5345
5349
|
);
|
|
@@ -5355,11 +5359,11 @@ class ut {
|
|
|
5355
5359
|
/**
|
|
5356
5360
|
* Наименование метатега.
|
|
5357
5361
|
*/
|
|
5358
|
-
|
|
5362
|
+
s(this, "name");
|
|
5359
5363
|
/**
|
|
5360
5364
|
* Значение метатега.
|
|
5361
5365
|
*/
|
|
5362
|
-
|
|
5366
|
+
s(this, "content");
|
|
5363
5367
|
this.name = r.name, this.content = r.content;
|
|
5364
5368
|
}
|
|
5365
5369
|
}
|
|
@@ -5373,33 +5377,33 @@ class ze {
|
|
|
5373
5377
|
/**
|
|
5374
5378
|
* Тип ресурса.
|
|
5375
5379
|
*/
|
|
5376
|
-
|
|
5380
|
+
s(this, "resourceType");
|
|
5377
5381
|
/**
|
|
5378
5382
|
* Идентификатор ресурса.
|
|
5379
5383
|
*/
|
|
5380
|
-
|
|
5384
|
+
s(this, "resourceId");
|
|
5381
5385
|
/**
|
|
5382
5386
|
* Значение заголовка H1 на странице.
|
|
5383
5387
|
*/
|
|
5384
|
-
|
|
5388
|
+
s(this, "h1");
|
|
5385
5389
|
/**
|
|
5386
5390
|
* Значение метатега Title.
|
|
5387
5391
|
*/
|
|
5388
|
-
|
|
5392
|
+
s(this, "title");
|
|
5389
5393
|
/**
|
|
5390
5394
|
* Значение метатега Description.
|
|
5391
5395
|
*/
|
|
5392
|
-
|
|
5396
|
+
s(this, "description");
|
|
5393
5397
|
/**
|
|
5394
5398
|
* Значение метатега Keywords.
|
|
5395
5399
|
*/
|
|
5396
|
-
|
|
5400
|
+
s(this, "keywords");
|
|
5397
5401
|
/**
|
|
5398
5402
|
* Массив дополнительных значений метатегов.
|
|
5399
5403
|
*/
|
|
5400
|
-
|
|
5404
|
+
s(this, "meta");
|
|
5401
5405
|
var e;
|
|
5402
|
-
this.resourceType = new Ze(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((
|
|
5406
|
+
this.resourceType = new Ze(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((t) => new ut(t))) ?? [];
|
|
5403
5407
|
}
|
|
5404
5408
|
}
|
|
5405
5409
|
class Wt extends p {
|
|
@@ -5410,7 +5414,7 @@ class Wt extends p {
|
|
|
5410
5414
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
5411
5415
|
*/
|
|
5412
5416
|
getResourceSeoData(r, e) {
|
|
5413
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (
|
|
5417
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new ze(t.data));
|
|
5414
5418
|
}
|
|
5415
5419
|
/**
|
|
5416
5420
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -5421,7 +5425,7 @@ class Wt extends p {
|
|
|
5421
5425
|
* в случае ошибок в запросах.
|
|
5422
5426
|
*/
|
|
5423
5427
|
saveResourceSeoData(r, e = {}) {
|
|
5424
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (
|
|
5428
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new ze(t.data), e);
|
|
5425
5429
|
}
|
|
5426
5430
|
/**
|
|
5427
5431
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -5434,7 +5438,7 @@ class Wt extends p {
|
|
|
5434
5438
|
}
|
|
5435
5439
|
}
|
|
5436
5440
|
const P = me("__references_private", () => {
|
|
5437
|
-
const n = C({}), r = C(void 0), e = C(void 0),
|
|
5441
|
+
const n = C({}), r = C(void 0), e = C(void 0), t = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), g = C(void 0), R = C(void 0), A = C(void 0), L = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), N = C(void 0), d = C(void 0), l = C(void 0);
|
|
5438
5442
|
return {
|
|
5439
5443
|
/**
|
|
5440
5444
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5451,7 +5455,7 @@ const P = me("__references_private", () => {
|
|
|
5451
5455
|
/**
|
|
5452
5456
|
* Справочник валют.
|
|
5453
5457
|
*/
|
|
5454
|
-
currencyReference:
|
|
5458
|
+
currencyReference: t,
|
|
5455
5459
|
/**
|
|
5456
5460
|
* Справочник типов доставки.
|
|
5457
5461
|
*/
|
|
@@ -5525,7 +5529,7 @@ const P = me("__references_private", () => {
|
|
|
5525
5529
|
return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(D).getCurrency().then((h) => {
|
|
5526
5530
|
l.currencyReference = h;
|
|
5527
5531
|
}).catch(y)), l.currencyReference;
|
|
5528
|
-
}),
|
|
5532
|
+
}), t = v(() => {
|
|
5529
5533
|
const l = P();
|
|
5530
5534
|
return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(D).getOpf().then((h) => {
|
|
5531
5535
|
l.opfReference = h;
|
|
@@ -5612,7 +5616,7 @@ const P = me("__references_private", () => {
|
|
|
5612
5616
|
/**
|
|
5613
5617
|
* Справочник организационно-правовых форм.
|
|
5614
5618
|
*/
|
|
5615
|
-
opfReference:
|
|
5619
|
+
opfReference: t,
|
|
5616
5620
|
/**
|
|
5617
5621
|
* Справочник статусов оплаты заказа.
|
|
5618
5622
|
*/
|
|
@@ -5727,8 +5731,8 @@ class Et extends p {
|
|
|
5727
5731
|
* @param term Терм поиска.
|
|
5728
5732
|
*/
|
|
5729
5733
|
execSuggestionQuery(r, e) {
|
|
5730
|
-
return this.get(r, { query: e }).then((
|
|
5731
|
-
const i = [...
|
|
5734
|
+
return this.get(r, { query: e }).then((t) => {
|
|
5735
|
+
const i = [...t];
|
|
5732
5736
|
let o = 1;
|
|
5733
5737
|
return i.forEach((c) => {
|
|
5734
5738
|
c.id = o++;
|
|
@@ -5747,15 +5751,15 @@ class Kt {
|
|
|
5747
5751
|
/**
|
|
5748
5752
|
* Признак необходимости отображать сообщение об ошибке валидации.
|
|
5749
5753
|
*/
|
|
5750
|
-
|
|
5754
|
+
s(this, "showFeedback", !1);
|
|
5751
5755
|
/**
|
|
5752
5756
|
* Сообщение об ошибке валидации.
|
|
5753
5757
|
*/
|
|
5754
|
-
|
|
5758
|
+
s(this, "feedback", "");
|
|
5755
5759
|
/**
|
|
5756
5760
|
* Статус валидации.
|
|
5757
5761
|
*/
|
|
5758
|
-
|
|
5762
|
+
s(this, "validationStatus");
|
|
5759
5763
|
this.showFeedback = !!r, this.feedback = r, this.validationStatus = e;
|
|
5760
5764
|
}
|
|
5761
5765
|
}
|
|
@@ -5784,15 +5788,15 @@ export {
|
|
|
5784
5788
|
bt as ClientPriceProvider,
|
|
5785
5789
|
Tt as ClientPriceTemplateProvider,
|
|
5786
5790
|
Q as ClientProduct,
|
|
5787
|
-
|
|
5791
|
+
at as ClientProductCategoryDataProvider,
|
|
5788
5792
|
Lt as ClientProductDataProvider,
|
|
5789
5793
|
ne as ClientShortInfo,
|
|
5790
5794
|
et as ClientsAdditionalDataRequestTypeEnum,
|
|
5791
5795
|
Ot as ClientsListFilters,
|
|
5792
5796
|
Mt as ConfiguratorProvider,
|
|
5793
|
-
|
|
5797
|
+
Se as Contact,
|
|
5794
5798
|
zr as ContactLinks,
|
|
5795
|
-
|
|
5799
|
+
H as ContactPerson,
|
|
5796
5800
|
st as ContactPersonRelated,
|
|
5797
5801
|
jr as ContactPosition,
|
|
5798
5802
|
Re as ContactRelation,
|
|
@@ -5825,7 +5829,7 @@ export {
|
|
|
5825
5829
|
be as HttpBaseRequester,
|
|
5826
5830
|
dr as HttpParamsConfig,
|
|
5827
5831
|
p as HttpRequester,
|
|
5828
|
-
|
|
5832
|
+
z as Identity,
|
|
5829
5833
|
xr as Image,
|
|
5830
5834
|
we as Manager,
|
|
5831
5835
|
re as ManagerCommon,
|
|
@@ -5833,7 +5837,7 @@ export {
|
|
|
5833
5837
|
ot as ManagerDataProvider,
|
|
5834
5838
|
ut as MetaTagItem,
|
|
5835
5839
|
$ as NamedIdentity,
|
|
5836
|
-
|
|
5840
|
+
M as Opf,
|
|
5837
5841
|
T as OpfEnum,
|
|
5838
5842
|
lt as Order,
|
|
5839
5843
|
nr as OrderInfo,
|
|
@@ -5842,14 +5846,14 @@ export {
|
|
|
5842
5846
|
ir as OrderShortInfo,
|
|
5843
5847
|
Er as OrderStatus,
|
|
5844
5848
|
zt as OrdersDataProvider,
|
|
5845
|
-
|
|
5849
|
+
F as PartnerGroup,
|
|
5846
5850
|
Kr as PaymentType,
|
|
5847
5851
|
Rt as PreferencesStorageProvider,
|
|
5848
5852
|
De as PriceAnalyze,
|
|
5849
5853
|
Bt as PriceAnalyzeProvider,
|
|
5850
5854
|
fe as PriceCoefficient,
|
|
5851
5855
|
Ve as PriceCoefficientEnum,
|
|
5852
|
-
|
|
5856
|
+
j as PriceTemplate,
|
|
5853
5857
|
ve as PriceTemplateCategory,
|
|
5854
5858
|
X as PriceTemplateClient,
|
|
5855
5859
|
Je as PriceTemplateICatalogableItem,
|
|
@@ -5860,7 +5864,7 @@ export {
|
|
|
5860
5864
|
$e as PrimaryCatalogableItem,
|
|
5861
5865
|
_ as Product,
|
|
5862
5866
|
_t as ProductCategoryDataProvider,
|
|
5863
|
-
|
|
5867
|
+
St as ProductDataProvider,
|
|
5864
5868
|
Jr as ProductFileType,
|
|
5865
5869
|
Ie as ProductPriceCoefficient,
|
|
5866
5870
|
Zr as ProductPriceHistory,
|
|
@@ -5868,14 +5872,14 @@ export {
|
|
|
5868
5872
|
Z as Property,
|
|
5869
5873
|
Ye as PropertyType,
|
|
5870
5874
|
Mr as PropertyTypeEnum,
|
|
5871
|
-
|
|
5875
|
+
B as PropertyValue,
|
|
5872
5876
|
Nt as RecommendationsDataProvider,
|
|
5873
5877
|
de as RecommendationsList,
|
|
5874
5878
|
w as Reference,
|
|
5875
5879
|
D as ReferenceDataProvider,
|
|
5876
5880
|
te as Region,
|
|
5877
5881
|
Ze as ResourceType,
|
|
5878
|
-
|
|
5882
|
+
S as SalesDirection,
|
|
5879
5883
|
qr as SentryConfig,
|
|
5880
5884
|
ze as Seo,
|
|
5881
5885
|
Wt as SeoDataProvider,
|
|
@@ -5889,7 +5893,7 @@ export {
|
|
|
5889
5893
|
Yr as User,
|
|
5890
5894
|
Qe as UserCommonInfo,
|
|
5891
5895
|
Xr as UserDataProvider,
|
|
5892
|
-
|
|
5896
|
+
G as UserShortInfo,
|
|
5893
5897
|
Qr as UserTypeEnum,
|
|
5894
5898
|
Ur as VersionConfig,
|
|
5895
5899
|
ye as Warehouse,
|