@snabcentr/common-lib 1.40.4 → 1.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +4 -2
- package/dist/sc-common-lib.js +508 -465
- package/dist/sc-common-lib.js.map +1 -1
- package/dist/sc-common-lib.umd.cjs +1 -1
- package/dist/sc-common-lib.umd.cjs.map +1 -1
- package/dist/src/catalog/classes/{category-pricing-role.d.ts → category-pricing-rule.d.ts} +8 -8
- package/dist/src/catalog/classes/category-pricing-rule.d.ts.map +1 -0
- package/dist/src/catalog/classes/index.d.ts +1 -1
- package/dist/src/catalog/classes/pricing-role.d.ts +12 -0
- package/dist/src/catalog/classes/pricing-role.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/{i-category-pricing-role-update-data.d.ts → i-category-pricing-rule-update-data.d.ts} +3 -3
- package/dist/src/catalog/interfaces/{i-category-pricing-role-update-data.d.ts.map → i-category-pricing-rule-update-data.d.ts.map} +1 -1
- package/dist/src/catalog/interfaces/{i-category-pricing-role.d.ts → i-category-pricing-rule.d.ts} +4 -4
- package/dist/src/catalog/interfaces/i-category-pricing-rule.d.ts.map +1 -0
- package/dist/src/catalog/interfaces/i-pricing-role.d.ts +12 -0
- package/dist/src/catalog/interfaces/i-pricing-role.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/index.d.ts +2 -2
- package/dist/src/catalog/providers/pricing-role-provider.d.ts +4 -4
- package/dist/src/catalog/providers/pricing-role-provider.d.ts.map +1 -1
- package/dist/src/http/classes/http-base-requester.d.ts +1 -3
- package/dist/src/http/classes/http-base-requester.d.ts.map +1 -1
- package/dist/src/http/interfaces/i-http-response-error.d.ts +4 -0
- package/dist/src/http/interfaces/i-http-response-error.d.ts.map +1 -1
- package/dist/src/references/classes/index.d.ts +1 -0
- package/dist/src/references/classes/index.d.ts.map +1 -1
- package/dist/src/references/classes/product-file-type.d.ts +8 -0
- package/dist/src/references/classes/product-file-type.d.ts.map +1 -0
- package/dist/src/references/interfaces/i-product-file-type.d.ts +7 -0
- package/dist/src/references/interfaces/i-product-file-type.d.ts.map +1 -0
- package/dist/src/references/interfaces/index.d.ts +1 -0
- package/dist/src/references/interfaces/index.d.ts.map +1 -1
- package/dist/src/references/providers/reference-data-provider.d.ts +5 -0
- package/dist/src/references/providers/reference-data-provider.d.ts.map +1 -1
- package/dist/src/states/references-store.d.ts +14 -1
- package/dist/src/states/references-store.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/catalog/classes/category-pricing-role.d.ts.map +0 -1
- package/dist/src/catalog/interfaces/i-category-pricing-role.d.ts.map +0 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var s = (i, r, e) =>
|
|
4
|
-
import { isUndefined as
|
|
5
|
-
import { format as
|
|
6
|
-
import
|
|
7
|
-
import { objectToSnake as
|
|
8
|
-
import { defineStore as
|
|
1
|
+
var Ve = Object.defineProperty;
|
|
2
|
+
var Ee = (i, r, e) => r in i ? Ve(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
|
|
3
|
+
var s = (i, r, e) => Ee(i, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
+
import { isUndefined as Ie, cloneDeep as Ke, noop as m, toLower as Je, isString as D, map as Z, forEach as Qe, isNil as Ye, isEmpty as Xe, isArray as Ze, isFunction as er } from "lodash-es";
|
|
5
|
+
import { format as rr, addSeconds as sr, parseISO as N, isAfter as tr, startOfToday as me, parse as j, getDay as nr, startOfTomorrow as he, nextMonday as ir, getUnixTime as k, endOfTomorrow as or, endOfYesterday as cr, startOfYesterday as lr, endOfToday as ur, endOfDay as pr, startOfDay as hr } from "date-fns";
|
|
6
|
+
import gr from "axios";
|
|
7
|
+
import { objectToSnake as be, objectToCamel as mr } from "ts-case-convert";
|
|
8
|
+
import { defineStore as oe } from "pinia";
|
|
9
9
|
import { ref as w, computed as C } from "vue";
|
|
10
10
|
class K {
|
|
11
11
|
/**
|
|
@@ -46,7 +46,7 @@ class P extends K {
|
|
|
46
46
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class xe extends P {
|
|
50
50
|
/**
|
|
51
51
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
52
52
|
*
|
|
@@ -69,7 +69,7 @@ class Le extends P {
|
|
|
69
69
|
this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
|
-
class
|
|
72
|
+
class fe extends xe {
|
|
73
73
|
/**
|
|
74
74
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
75
75
|
*
|
|
@@ -84,7 +84,7 @@ class me extends Le {
|
|
|
84
84
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
class
|
|
87
|
+
class ce extends fe {
|
|
88
88
|
/**
|
|
89
89
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
90
90
|
*
|
|
@@ -126,9 +126,9 @@ class f extends P {
|
|
|
126
126
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
-
class
|
|
129
|
+
class Re extends f {
|
|
130
130
|
}
|
|
131
|
-
class
|
|
131
|
+
class De {
|
|
132
132
|
/**
|
|
133
133
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
134
134
|
*
|
|
@@ -155,10 +155,10 @@ class ve {
|
|
|
155
155
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
156
156
|
*/
|
|
157
157
|
s(this, "readOnly");
|
|
158
|
-
this.coefficient = new
|
|
158
|
+
this.coefficient = new Re(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
class
|
|
161
|
+
class ke {
|
|
162
162
|
/**
|
|
163
163
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
164
164
|
*
|
|
@@ -178,7 +178,7 @@ class Ie {
|
|
|
178
178
|
}
|
|
179
179
|
class V extends f {
|
|
180
180
|
}
|
|
181
|
-
class
|
|
181
|
+
class le extends f {
|
|
182
182
|
/**
|
|
183
183
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
184
184
|
*
|
|
@@ -207,10 +207,10 @@ class ce extends f {
|
|
|
207
207
|
* Координаты склада.
|
|
208
208
|
*/
|
|
209
209
|
s(this, "coordinates");
|
|
210
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((n) => new V(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new
|
|
210
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((n) => new V(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new ke(e == null ? void 0 : e.coordinates);
|
|
211
211
|
}
|
|
212
212
|
}
|
|
213
|
-
class
|
|
213
|
+
class fr {
|
|
214
214
|
/**
|
|
215
215
|
* Инициализирует экземпляр класса {@link StockCount}.
|
|
216
216
|
*
|
|
@@ -225,26 +225,26 @@ class gr {
|
|
|
225
225
|
* Количество остатков товара на складе.
|
|
226
226
|
*/
|
|
227
227
|
s(this, "count");
|
|
228
|
-
this.warehouse = new
|
|
228
|
+
this.warehouse = new le(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
229
229
|
}
|
|
230
230
|
}
|
|
231
|
-
const
|
|
231
|
+
const B = class B {
|
|
232
232
|
/**
|
|
233
233
|
* Инициализирует и возвращает конфигурацию приложения.
|
|
234
234
|
*
|
|
235
235
|
* @param config Данные для первоначальной инициализации.
|
|
236
236
|
*/
|
|
237
237
|
static init(r) {
|
|
238
|
-
|
|
238
|
+
B.config = r;
|
|
239
239
|
}
|
|
240
240
|
/**
|
|
241
241
|
* Возвращает текущую конфигурацию приложения.
|
|
242
242
|
*/
|
|
243
243
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
244
244
|
static getConfig() {
|
|
245
|
-
if (
|
|
245
|
+
if (Ie(B.config))
|
|
246
246
|
throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
|
|
247
|
-
return
|
|
247
|
+
return B.config;
|
|
248
248
|
}
|
|
249
249
|
/**
|
|
250
250
|
* Выполняет загрузку конфигурации по указанному пути.
|
|
@@ -263,9 +263,9 @@ const W = class W {
|
|
|
263
263
|
/**
|
|
264
264
|
* Конфигурация приложения.
|
|
265
265
|
*/
|
|
266
|
-
s(
|
|
267
|
-
let
|
|
268
|
-
class
|
|
266
|
+
s(B, "config");
|
|
267
|
+
let d = B;
|
|
268
|
+
class yr extends xe {
|
|
269
269
|
/**
|
|
270
270
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
271
271
|
*
|
|
@@ -280,7 +280,7 @@ class mr extends Le {
|
|
|
280
280
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
|
-
class
|
|
283
|
+
class wr {
|
|
284
284
|
/**
|
|
285
285
|
* Инициализирует экземпляр класса {@link Image}.
|
|
286
286
|
*
|
|
@@ -303,7 +303,7 @@ class fr {
|
|
|
303
303
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
304
304
|
}
|
|
305
305
|
}
|
|
306
|
-
class x extends
|
|
306
|
+
class x extends yr {
|
|
307
307
|
/**
|
|
308
308
|
* Инициализирует экземпляр класса {@link Product}.
|
|
309
309
|
*
|
|
@@ -376,22 +376,22 @@ class x extends mr {
|
|
|
376
376
|
* Список коэффициентов цен на продукт.
|
|
377
377
|
*/
|
|
378
378
|
s(this, "priceCoefficients");
|
|
379
|
-
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 = e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((
|
|
380
|
-
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((
|
|
381
|
-
t && (this.category = new
|
|
379
|
+
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 = e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((g) => new fr(g))) ?? [], this.type = "product";
|
|
380
|
+
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
381
|
+
t && (this.category = new fe({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new fe(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => {
|
|
382
382
|
var y;
|
|
383
|
-
return new
|
|
384
|
-
})) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((
|
|
383
|
+
return new wr(g, (y = d.getConfig().urls) == null ? void 0 : y.mediaServer);
|
|
384
|
+
})) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((g) => new De(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
385
385
|
}
|
|
386
386
|
/**
|
|
387
387
|
* Возвращает признак, что это измеряемый товар.
|
|
388
388
|
*/
|
|
389
389
|
getIsMeasurable() {
|
|
390
|
-
const e =
|
|
390
|
+
const e = d.getConfig().products.units;
|
|
391
391
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
class
|
|
394
|
+
class Cr extends K {
|
|
395
395
|
/**
|
|
396
396
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
397
397
|
*
|
|
@@ -443,10 +443,10 @@ class yr extends K {
|
|
|
443
443
|
* Признак того, что позиция является дополнительной продажей.
|
|
444
444
|
*/
|
|
445
445
|
s(this, "isAdditionalSale");
|
|
446
|
-
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new
|
|
446
|
+
this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ce(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ke(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
447
447
|
}
|
|
448
448
|
}
|
|
449
|
-
class
|
|
449
|
+
class vr extends Cr {
|
|
450
450
|
/**
|
|
451
451
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
452
452
|
*
|
|
@@ -496,7 +496,7 @@ class wr extends yr {
|
|
|
496
496
|
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;
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
class
|
|
499
|
+
class X {
|
|
500
500
|
/**
|
|
501
501
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
502
502
|
*
|
|
@@ -515,10 +515,10 @@ class Y {
|
|
|
515
515
|
* Список итоговых сумм по направлениям продаж.
|
|
516
516
|
*/
|
|
517
517
|
s(this, "directionsSum");
|
|
518
|
-
this.items = r.items.map((e) => new
|
|
518
|
+
this.items = r.items.map((e) => new vr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
class
|
|
521
|
+
class Rr {
|
|
522
522
|
/**
|
|
523
523
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
524
524
|
*
|
|
@@ -540,7 +540,7 @@ class Cr {
|
|
|
540
540
|
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;
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
|
-
class
|
|
543
|
+
class Dr {
|
|
544
544
|
/**
|
|
545
545
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
546
546
|
*
|
|
@@ -558,7 +558,7 @@ class vr {
|
|
|
558
558
|
this.apiUri = (r == null ? void 0 : r.apiUri) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
|
-
class
|
|
561
|
+
class Pr {
|
|
562
562
|
/**
|
|
563
563
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
564
564
|
*
|
|
@@ -603,7 +603,7 @@ class Rr {
|
|
|
603
603
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
class
|
|
606
|
+
class Ar {
|
|
607
607
|
/**
|
|
608
608
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
609
609
|
*
|
|
@@ -622,10 +622,10 @@ class Dr {
|
|
|
622
622
|
* Текущая версия приложения.
|
|
623
623
|
*/
|
|
624
624
|
s(this, "version");
|
|
625
|
-
this.date = (r == null ? void 0 : r.date) ??
|
|
625
|
+
this.date = (r == null ? void 0 : r.date) ?? rr(/* @__PURE__ */ new Date(), "dd.MM.yyyy"), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
626
626
|
}
|
|
627
627
|
}
|
|
628
|
-
class
|
|
628
|
+
class ns {
|
|
629
629
|
/**
|
|
630
630
|
* Инициализирует экземпляр класса {@link AppBaseConfig}.
|
|
631
631
|
*
|
|
@@ -668,19 +668,19 @@ class ss {
|
|
|
668
668
|
* Данные о текущем выпуске приложения.
|
|
669
669
|
*/
|
|
670
670
|
s(this, "version");
|
|
671
|
-
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.currentDomain = (r == null ? void 0 : r.currentDomain) ?? "", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new
|
|
671
|
+
this.environment = (r == null ? void 0 : r.environment) ?? "production", this.currentDomain = (r == null ? void 0 : r.currentDomain) ?? "", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Dr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Rr(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
|
|
672
672
|
units: {
|
|
673
673
|
linear: ["пог.м.", "м."],
|
|
674
674
|
square: ["м2"]
|
|
675
675
|
},
|
|
676
676
|
...r == null ? void 0 : r.products
|
|
677
|
-
}, this.sentry = new
|
|
677
|
+
}, this.sentry = new Pr({
|
|
678
678
|
environment: this.environment,
|
|
679
679
|
...r == null ? void 0 : r.sentry
|
|
680
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
680
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new Ar(r == null ? void 0 : r.version);
|
|
681
681
|
}
|
|
682
682
|
}
|
|
683
|
-
class
|
|
683
|
+
class Pe {
|
|
684
684
|
/**
|
|
685
685
|
* Инициализирует экземпляр указанного класса.
|
|
686
686
|
*
|
|
@@ -719,8 +719,8 @@ const b = class b {
|
|
|
719
719
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
720
720
|
*/
|
|
721
721
|
s(this, "defaultInstanceNotificationErrorResponseHandler", m);
|
|
722
|
-
const t =
|
|
723
|
-
this.defaultInstanceNotificationErrorResponseHandler = b.baseDefaultNotificationErrorResponseHandler, this.httpClient =
|
|
722
|
+
const t = d.getConfig().version;
|
|
723
|
+
this.defaultInstanceNotificationErrorResponseHandler = b.baseDefaultNotificationErrorResponseHandler, this.httpClient = gr.create({
|
|
724
724
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
725
725
|
baseURL: r,
|
|
726
726
|
headers: {
|
|
@@ -730,10 +730,10 @@ const b = class b {
|
|
|
730
730
|
...e
|
|
731
731
|
}
|
|
732
732
|
}), this.httpClient.interceptors.request.use(
|
|
733
|
-
(n) => (n.method && (n.method === "get" && n.params && (n.params =
|
|
733
|
+
(n) => (n.method && (n.method === "get" && n.params && (n.params = be(n.params)), ["put", "patch", "post"].includes(Je(n.method)) && n.data && (n.data = be(n.data))), n),
|
|
734
734
|
(n) => Promise.reject(n)
|
|
735
735
|
), this.httpClient.interceptors.response.use(
|
|
736
|
-
(n) => (n.data && (n.data =
|
|
736
|
+
(n) => (n.data && (n.data = mr(n.data)), n),
|
|
737
737
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
738
738
|
(n) => b.convertHttpErrorResponse(n)
|
|
739
739
|
);
|
|
@@ -752,7 +752,7 @@ const b = class b {
|
|
|
752
752
|
* @param type Тип данных, которыми оперирует метод.
|
|
753
753
|
*/
|
|
754
754
|
static getInstance(r) {
|
|
755
|
-
return Object.prototype.hasOwnProperty.call(b.instances, r.name) || (b.instances[r.name] =
|
|
755
|
+
return Object.prototype.hasOwnProperty.call(b.instances, r.name) || (b.instances[r.name] = Pe.simpleInstanceInitializer(r)), b.instances[r.name];
|
|
756
756
|
}
|
|
757
757
|
/**
|
|
758
758
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -768,6 +768,7 @@ const b = class b {
|
|
|
768
768
|
message: ((t = e == null ? void 0 : e.data) == null ? void 0 : t.message) ?? "Unknown Error. Probably network error.",
|
|
769
769
|
errors: (n = e == null ? void 0 : e.data) == null ? void 0 : n.errors,
|
|
770
770
|
headers: (e == null ? void 0 : e.headers) ?? {},
|
|
771
|
+
data: e == null ? void 0 : e.data,
|
|
771
772
|
rawError: r
|
|
772
773
|
});
|
|
773
774
|
}
|
|
@@ -842,8 +843,8 @@ s(b, "instances", {}), /**
|
|
|
842
843
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
843
844
|
*/
|
|
844
845
|
s(b, "baseDefaultNotificationErrorResponseHandler", m);
|
|
845
|
-
let
|
|
846
|
-
const
|
|
846
|
+
let ye = b;
|
|
847
|
+
const W = class W extends ye {
|
|
847
848
|
/**
|
|
848
849
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
849
850
|
*
|
|
@@ -856,7 +857,7 @@ const z = class z extends fe {
|
|
|
856
857
|
* Время кэширования данных ответов на запросы (секунд).
|
|
857
858
|
*/
|
|
858
859
|
s(this, "responseDataCacheTimeout");
|
|
859
|
-
const n =
|
|
860
|
+
const n = d.getConfig();
|
|
860
861
|
this.responseDataCacheTimeout = n.http.responseDataCacheTimeout;
|
|
861
862
|
}
|
|
862
863
|
/**
|
|
@@ -866,7 +867,7 @@ const z = class z extends fe {
|
|
|
866
867
|
* @param url URL запроса.
|
|
867
868
|
*/
|
|
868
869
|
static getCachedResponse(e) {
|
|
869
|
-
const t =
|
|
870
|
+
const t = W.responseDataCache.get(e);
|
|
870
871
|
if (t && t.validTo > /* @__PURE__ */ new Date())
|
|
871
872
|
return t.val;
|
|
872
873
|
}
|
|
@@ -877,8 +878,8 @@ const z = class z extends fe {
|
|
|
877
878
|
* @param data Данные для кэширования.
|
|
878
879
|
*/
|
|
879
880
|
cacheResponse(e, t) {
|
|
880
|
-
|
|
881
|
-
validTo:
|
|
881
|
+
W.responseDataCache.set(e, {
|
|
882
|
+
validTo: sr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
|
|
882
883
|
val: t
|
|
883
884
|
});
|
|
884
885
|
}
|
|
@@ -892,9 +893,9 @@ const z = class z extends fe {
|
|
|
892
893
|
*/
|
|
893
894
|
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
|
|
894
895
|
getTypedDataArrayRequester(e, t, n = !1) {
|
|
895
|
-
const o = n ?
|
|
896
|
+
const o = n ? W.getCachedResponse(t) : void 0;
|
|
896
897
|
return o ? Promise.resolve(o) : this.get(t).then((l) => {
|
|
897
|
-
const u = l.map((
|
|
898
|
+
const u = l.map((g) => Pe.instanceInitializer(e, g));
|
|
898
899
|
return n && u && this.cacheResponse(t, u), u;
|
|
899
900
|
});
|
|
900
901
|
}
|
|
@@ -902,19 +903,19 @@ const z = class z extends fe {
|
|
|
902
903
|
/**
|
|
903
904
|
* Кэш результатов запросов.
|
|
904
905
|
*/
|
|
905
|
-
s(
|
|
906
|
-
let
|
|
907
|
-
class p extends
|
|
906
|
+
s(W, "responseDataCache", /* @__PURE__ */ new Map());
|
|
907
|
+
let we = W;
|
|
908
|
+
class p extends we {
|
|
908
909
|
/**
|
|
909
910
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
910
911
|
*/
|
|
911
912
|
constructor() {
|
|
912
913
|
var t, n;
|
|
913
|
-
const r =
|
|
914
|
+
const r = d.getConfig(), e = {};
|
|
914
915
|
(t = r.devMode) != null && t.authBearerToken && (e.Authorization = `Bearer ${(n = r.devMode) == null ? void 0 : n.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
|
|
915
916
|
}
|
|
916
917
|
}
|
|
917
|
-
class
|
|
918
|
+
class is extends p {
|
|
918
919
|
/**
|
|
919
920
|
* Возвращает содержимое корзины указанного клиента.
|
|
920
921
|
*
|
|
@@ -923,7 +924,7 @@ class ts extends p {
|
|
|
923
924
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
924
925
|
*/
|
|
925
926
|
getCart(r) {
|
|
926
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
927
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new X(e.data));
|
|
927
928
|
}
|
|
928
929
|
/**
|
|
929
930
|
* Удаляет всё содержимое корзины.
|
|
@@ -961,7 +962,7 @@ class ts extends p {
|
|
|
961
962
|
isAdditionalSale: e.isAdditionalSale,
|
|
962
963
|
...e.configuratorParams
|
|
963
964
|
},
|
|
964
|
-
(n) => new
|
|
965
|
+
(n) => new X(n.data),
|
|
965
966
|
t
|
|
966
967
|
);
|
|
967
968
|
}
|
|
@@ -991,7 +992,7 @@ class ts extends p {
|
|
|
991
992
|
isAdditionalSale: e.isAdditionalSale,
|
|
992
993
|
...e.configuratorParams
|
|
993
994
|
},
|
|
994
|
-
(n) => new
|
|
995
|
+
(n) => new X(n.data),
|
|
995
996
|
t
|
|
996
997
|
);
|
|
997
998
|
}
|
|
@@ -1014,11 +1015,11 @@ class ts extends p {
|
|
|
1014
1015
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1015
1016
|
*/
|
|
1016
1017
|
addCartItemFromCSV(r) {
|
|
1017
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new
|
|
1018
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new X(e.data));
|
|
1018
1019
|
}
|
|
1019
1020
|
}
|
|
1020
|
-
var
|
|
1021
|
-
class
|
|
1021
|
+
var Ne = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(Ne || {}), $r = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))($r || {}), br = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i))(br || {});
|
|
1022
|
+
class U extends ce {
|
|
1022
1023
|
/**
|
|
1023
1024
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1024
1025
|
*
|
|
@@ -1035,10 +1036,10 @@ class d extends oe {
|
|
|
1035
1036
|
* Список продуктов категории.
|
|
1036
1037
|
*/
|
|
1037
1038
|
s(this, "products");
|
|
1038
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
1039
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new U(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new x(o));
|
|
1039
1040
|
}
|
|
1040
1041
|
}
|
|
1041
|
-
class
|
|
1042
|
+
class de extends P {
|
|
1042
1043
|
/**
|
|
1043
1044
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1044
1045
|
*
|
|
@@ -1053,7 +1054,7 @@ class ke extends P {
|
|
|
1053
1054
|
this.updatedAt = e == null ? void 0 : e.updatedAt;
|
|
1054
1055
|
}
|
|
1055
1056
|
}
|
|
1056
|
-
class
|
|
1057
|
+
class Tr extends de {
|
|
1057
1058
|
/**
|
|
1058
1059
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1059
1060
|
*
|
|
@@ -1068,7 +1069,7 @@ class $r extends ke {
|
|
|
1068
1069
|
this.deletedAt = e != null && e.deletedAt ? D(e.deletedAt) ? N(e.deletedAt) : e.deletedAt : void 0;
|
|
1069
1070
|
}
|
|
1070
1071
|
}
|
|
1071
|
-
class
|
|
1072
|
+
class os {
|
|
1072
1073
|
/**
|
|
1073
1074
|
* Возвращает актуальные и не просроченные данные из хранилища.
|
|
1074
1075
|
*
|
|
@@ -1079,7 +1080,7 @@ class ns {
|
|
|
1079
1080
|
if (e)
|
|
1080
1081
|
try {
|
|
1081
1082
|
const t = JSON.parse(e);
|
|
1082
|
-
if (
|
|
1083
|
+
if (tr(N(t.availableFor) || me(), /* @__PURE__ */ new Date()))
|
|
1083
1084
|
return t.data || {};
|
|
1084
1085
|
} catch {
|
|
1085
1086
|
localStorage.removeItem(r);
|
|
@@ -1102,7 +1103,7 @@ class ns {
|
|
|
1102
1103
|
);
|
|
1103
1104
|
}
|
|
1104
1105
|
}
|
|
1105
|
-
class
|
|
1106
|
+
class q extends P {
|
|
1106
1107
|
/**
|
|
1107
1108
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1108
1109
|
*
|
|
@@ -1117,7 +1118,7 @@ class U extends P {
|
|
|
1117
1118
|
this.type = e == null ? void 0 : e.type;
|
|
1118
1119
|
}
|
|
1119
1120
|
}
|
|
1120
|
-
class
|
|
1121
|
+
class Sr extends P {
|
|
1121
1122
|
/**
|
|
1122
1123
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1123
1124
|
*
|
|
@@ -1153,10 +1154,10 @@ class br extends P {
|
|
|
1153
1154
|
* Дата и время удаления в формате Y-m-d H:i:s.
|
|
1154
1155
|
*/
|
|
1155
1156
|
s(this, "deletedAt");
|
|
1156
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ? D(e.publishedAt) ? N(e.publishedAt) : e.publishedAt : void 0, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new
|
|
1157
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ? D(e.publishedAt) ? N(e.publishedAt) : e.publishedAt : void 0, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new q(e == null ? void 0 : e.owner), this.deletedAt = e != null && e.deletedAt ? D(e.deletedAt) ? N(e.deletedAt) : e.deletedAt : void 0;
|
|
1157
1158
|
}
|
|
1158
1159
|
}
|
|
1159
|
-
class
|
|
1160
|
+
class _r extends de {
|
|
1160
1161
|
/**
|
|
1161
1162
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1162
1163
|
*
|
|
@@ -1175,7 +1176,7 @@ class Sr extends ke {
|
|
|
1175
1176
|
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = e != null && e.createdAt ? D(e.createdAt) ? N(e.createdAt) : e.createdAt : /* @__PURE__ */ new Date();
|
|
1176
1177
|
}
|
|
1177
1178
|
}
|
|
1178
|
-
class
|
|
1179
|
+
class ue extends x {
|
|
1179
1180
|
/**
|
|
1180
1181
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1181
1182
|
*
|
|
@@ -1211,10 +1212,10 @@ class le extends x {
|
|
|
1211
1212
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1212
1213
|
*/
|
|
1213
1214
|
s(this, "isFavorite");
|
|
1214
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1215
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new Sr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new _r(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;
|
|
1215
1216
|
}
|
|
1216
1217
|
}
|
|
1217
|
-
class
|
|
1218
|
+
class Lr {
|
|
1218
1219
|
/**
|
|
1219
1220
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1220
1221
|
*
|
|
@@ -1232,9 +1233,9 @@ class _r {
|
|
|
1232
1233
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1233
1234
|
}
|
|
1234
1235
|
}
|
|
1235
|
-
class
|
|
1236
|
+
class T extends f {
|
|
1236
1237
|
}
|
|
1237
|
-
class
|
|
1238
|
+
class ee extends P {
|
|
1238
1239
|
/**
|
|
1239
1240
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1240
1241
|
*
|
|
@@ -1245,7 +1246,7 @@ class Z extends P {
|
|
|
1245
1246
|
/**
|
|
1246
1247
|
* Направление продаж.
|
|
1247
1248
|
*/
|
|
1248
|
-
s(this, "salesDirection", new
|
|
1249
|
+
s(this, "salesDirection", new T());
|
|
1249
1250
|
/**
|
|
1250
1251
|
* URI путь к фотографии пользователя.
|
|
1251
1252
|
*/
|
|
@@ -1258,10 +1259,10 @@ class Z extends P {
|
|
|
1258
1259
|
* Признак того, что менеджер является основным для клиента.
|
|
1259
1260
|
*/
|
|
1260
1261
|
s(this, "isDefault");
|
|
1261
|
-
e && (this.salesDirection = new
|
|
1262
|
+
e && (this.salesDirection = new T(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Lr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1262
1263
|
}
|
|
1263
1264
|
}
|
|
1264
|
-
class
|
|
1265
|
+
class pe extends ee {
|
|
1265
1266
|
/**
|
|
1266
1267
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1267
1268
|
*
|
|
@@ -1292,7 +1293,7 @@ class ue extends Z {
|
|
|
1292
1293
|
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;
|
|
1293
1294
|
}
|
|
1294
1295
|
}
|
|
1295
|
-
class
|
|
1296
|
+
class ar extends ce {
|
|
1296
1297
|
/**
|
|
1297
1298
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1298
1299
|
*
|
|
@@ -1320,10 +1321,10 @@ class Tr extends oe {
|
|
|
1320
1321
|
* Данные о менеджере за которым закреплена категория.
|
|
1321
1322
|
*/
|
|
1322
1323
|
s(this, "manager");
|
|
1323
|
-
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
|
|
1324
|
+
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 pe(e.manager) : void 0;
|
|
1324
1325
|
}
|
|
1325
1326
|
}
|
|
1326
|
-
class
|
|
1327
|
+
class re extends ar {
|
|
1327
1328
|
/**
|
|
1328
1329
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1329
1330
|
*
|
|
@@ -1340,10 +1341,10 @@ class ee extends Tr {
|
|
|
1340
1341
|
* Список продуктов категории.
|
|
1341
1342
|
*/
|
|
1342
1343
|
s(this, "products");
|
|
1343
|
-
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new
|
|
1344
|
+
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new re(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new ue(o));
|
|
1344
1345
|
}
|
|
1345
1346
|
}
|
|
1346
|
-
class
|
|
1347
|
+
class Oe extends f {
|
|
1347
1348
|
}
|
|
1348
1349
|
class J extends P {
|
|
1349
1350
|
/**
|
|
@@ -1365,10 +1366,10 @@ class J extends P {
|
|
|
1365
1366
|
* Дополнительные метаданные свойства.
|
|
1366
1367
|
*/
|
|
1367
1368
|
s(this, "metadata");
|
|
1368
|
-
this.type = new
|
|
1369
|
+
this.type = new Oe(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1369
1370
|
}
|
|
1370
1371
|
}
|
|
1371
|
-
class
|
|
1372
|
+
class F {
|
|
1372
1373
|
/**
|
|
1373
1374
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1374
1375
|
*
|
|
@@ -1387,15 +1388,15 @@ class H {
|
|
|
1387
1388
|
this.property = new J(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1388
1389
|
}
|
|
1389
1390
|
}
|
|
1390
|
-
class
|
|
1391
|
+
class Ir extends f {
|
|
1391
1392
|
}
|
|
1392
|
-
class
|
|
1393
|
+
class Ue extends f {
|
|
1393
1394
|
}
|
|
1394
|
-
class
|
|
1395
|
+
class cs extends f {
|
|
1395
1396
|
}
|
|
1396
1397
|
class E extends f {
|
|
1397
1398
|
}
|
|
1398
|
-
class
|
|
1399
|
+
class Y extends f {
|
|
1399
1400
|
/**
|
|
1400
1401
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1401
1402
|
*
|
|
@@ -1410,7 +1411,7 @@ class Q extends f {
|
|
|
1410
1411
|
e && (this.country = new E(e.country));
|
|
1411
1412
|
}
|
|
1412
1413
|
}
|
|
1413
|
-
class
|
|
1414
|
+
class se extends f {
|
|
1414
1415
|
/**
|
|
1415
1416
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1416
1417
|
*
|
|
@@ -1421,13 +1422,13 @@ class re extends f {
|
|
|
1421
1422
|
/**
|
|
1422
1423
|
* Данные о регионе, в котором расположен город.
|
|
1423
1424
|
*/
|
|
1424
|
-
s(this, "region", new
|
|
1425
|
-
e && (this.region = new
|
|
1425
|
+
s(this, "region", new Y());
|
|
1426
|
+
e && (this.region = new Y(e.region));
|
|
1426
1427
|
}
|
|
1427
1428
|
}
|
|
1428
|
-
class
|
|
1429
|
+
class xr extends f {
|
|
1429
1430
|
}
|
|
1430
|
-
class
|
|
1431
|
+
class te extends P {
|
|
1431
1432
|
/**
|
|
1432
1433
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1433
1434
|
*
|
|
@@ -1447,12 +1448,12 @@ class se extends P {
|
|
|
1447
1448
|
}
|
|
1448
1449
|
}
|
|
1449
1450
|
var $ = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))($ || {});
|
|
1450
|
-
class
|
|
1451
|
+
class G extends f {
|
|
1451
1452
|
/**
|
|
1452
1453
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
1453
1454
|
*/
|
|
1454
1455
|
static generatePersonItem() {
|
|
1455
|
-
return new
|
|
1456
|
+
return new G({
|
|
1456
1457
|
id: 1,
|
|
1457
1458
|
guid: "",
|
|
1458
1459
|
slug: $.Person,
|
|
@@ -1460,17 +1461,19 @@ class q extends f {
|
|
|
1460
1461
|
});
|
|
1461
1462
|
}
|
|
1462
1463
|
}
|
|
1463
|
-
class
|
|
1464
|
+
class kr extends f {
|
|
1464
1465
|
}
|
|
1465
|
-
class
|
|
1466
|
+
class Nr extends f {
|
|
1466
1467
|
}
|
|
1467
|
-
class
|
|
1468
|
+
class M extends f {
|
|
1468
1469
|
}
|
|
1469
|
-
class
|
|
1470
|
+
class dr extends f {
|
|
1470
1471
|
}
|
|
1471
|
-
class
|
|
1472
|
+
class Or extends f {
|
|
1472
1473
|
}
|
|
1473
|
-
class
|
|
1474
|
+
class qe extends f {
|
|
1475
|
+
}
|
|
1476
|
+
class Ge extends f {
|
|
1474
1477
|
}
|
|
1475
1478
|
class R extends p {
|
|
1476
1479
|
/**
|
|
@@ -1481,75 +1484,75 @@ class R extends p {
|
|
|
1481
1484
|
* и использовать в случае аналогичных запросов.
|
|
1482
1485
|
*/
|
|
1483
1486
|
getReference(r, e = !1) {
|
|
1484
|
-
return this.getTypedDataArrayRequester(
|
|
1487
|
+
return this.getTypedDataArrayRequester(Ir, `/internal/references/${r}`, e);
|
|
1485
1488
|
}
|
|
1486
1489
|
/**
|
|
1487
1490
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
1488
1491
|
* первичного интереса.
|
|
1489
1492
|
*/
|
|
1490
1493
|
getChannelPrimaryInterest() {
|
|
1491
|
-
return this.getTypedDataArrayRequester(
|
|
1494
|
+
return this.getTypedDataArrayRequester(Ue, "/internal/references/channel-primary-interest", !0);
|
|
1492
1495
|
}
|
|
1493
1496
|
/**
|
|
1494
1497
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1495
1498
|
*/
|
|
1496
1499
|
getContactPositions() {
|
|
1497
|
-
return this.getTypedDataArrayRequester(
|
|
1500
|
+
return this.getTypedDataArrayRequester(xr, "/internal/references/contact-position", !0);
|
|
1498
1501
|
}
|
|
1499
1502
|
/**
|
|
1500
1503
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
1501
1504
|
*/
|
|
1502
1505
|
getCurrency() {
|
|
1503
|
-
return this.getTypedDataArrayRequester(
|
|
1506
|
+
return this.getTypedDataArrayRequester(te, "/public/references/currency", !0);
|
|
1504
1507
|
}
|
|
1505
1508
|
/**
|
|
1506
1509
|
* Возвращает {@link Promise} для получения справочника данных
|
|
1507
1510
|
* групп партнеров (направлений деятельности).
|
|
1508
1511
|
*/
|
|
1509
1512
|
getPartnerGroup() {
|
|
1510
|
-
return this.getTypedDataArrayRequester(
|
|
1513
|
+
return this.getTypedDataArrayRequester(M, "/internal/references/partner-group", !0);
|
|
1511
1514
|
}
|
|
1512
1515
|
/**
|
|
1513
1516
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
1514
1517
|
*/
|
|
1515
1518
|
getOpf() {
|
|
1516
|
-
return this.getTypedDataArrayRequester(
|
|
1519
|
+
return this.getTypedDataArrayRequester(G, "/public/references/opf", !0);
|
|
1517
1520
|
}
|
|
1518
1521
|
/**
|
|
1519
1522
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1520
1523
|
*/
|
|
1521
1524
|
getOrderPaymentStatuses() {
|
|
1522
|
-
return this.getTypedDataArrayRequester(
|
|
1525
|
+
return this.getTypedDataArrayRequester(kr, "/public/references/order-payment-status", !0);
|
|
1523
1526
|
}
|
|
1524
1527
|
/**
|
|
1525
1528
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
1526
1529
|
*/
|
|
1527
1530
|
getOrderStatuses() {
|
|
1528
|
-
return this.getTypedDataArrayRequester(
|
|
1531
|
+
return this.getTypedDataArrayRequester(Nr, "/public/references/order-status", !0);
|
|
1529
1532
|
}
|
|
1530
1533
|
/**
|
|
1531
1534
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
1532
1535
|
*/
|
|
1533
1536
|
getPaymentTypes() {
|
|
1534
|
-
return this.getTypedDataArrayRequester(
|
|
1537
|
+
return this.getTypedDataArrayRequester(dr, "/public/references/payment-type", !0);
|
|
1535
1538
|
}
|
|
1536
1539
|
/**
|
|
1537
1540
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
1538
1541
|
*/
|
|
1539
1542
|
getResourceTypes() {
|
|
1540
|
-
return this.getTypedDataArrayRequester(
|
|
1543
|
+
return this.getTypedDataArrayRequester(qe, "/internal/references/resource-type", !0);
|
|
1541
1544
|
}
|
|
1542
1545
|
/**
|
|
1543
1546
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
1544
1547
|
*/
|
|
1545
1548
|
getSalesDirections() {
|
|
1546
|
-
return this.getTypedDataArrayRequester(
|
|
1549
|
+
return this.getTypedDataArrayRequester(T, "/public/references/sales-direction", !0);
|
|
1547
1550
|
}
|
|
1548
1551
|
/**
|
|
1549
1552
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
1550
1553
|
*/
|
|
1551
1554
|
getSourcePrimaryInterest() {
|
|
1552
|
-
return this.getTypedDataArrayRequester(
|
|
1555
|
+
return this.getTypedDataArrayRequester(Ge, "/internal/references/source-primary-interest", !0);
|
|
1553
1556
|
}
|
|
1554
1557
|
/**
|
|
1555
1558
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -1557,7 +1560,7 @@ class R extends p {
|
|
|
1557
1560
|
* @param term Терм поиска.
|
|
1558
1561
|
*/
|
|
1559
1562
|
searchCity(r) {
|
|
1560
|
-
return this.getTypedDataArrayRequester(
|
|
1563
|
+
return this.getTypedDataArrayRequester(se, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
1561
1564
|
}
|
|
1562
1565
|
/**
|
|
1563
1566
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -1565,7 +1568,7 @@ class R extends p {
|
|
|
1565
1568
|
* @param term Терм поиска.
|
|
1566
1569
|
*/
|
|
1567
1570
|
searchRegion(r) {
|
|
1568
|
-
return this.getTypedDataArrayRequester(
|
|
1571
|
+
return this.getTypedDataArrayRequester(Y, `/internal/references/region-with-country/search?term=${r}`);
|
|
1569
1572
|
}
|
|
1570
1573
|
/**
|
|
1571
1574
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -1585,23 +1588,29 @@ class R extends p {
|
|
|
1585
1588
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
1586
1589
|
*/
|
|
1587
1590
|
getWarehouses() {
|
|
1588
|
-
return this.getTypedDataArrayRequester(
|
|
1591
|
+
return this.getTypedDataArrayRequester(le, "/public/references/warehouse", !0);
|
|
1589
1592
|
}
|
|
1590
1593
|
/**
|
|
1591
1594
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
1592
1595
|
*/
|
|
1593
1596
|
getPropertyTypes() {
|
|
1594
|
-
return this.getTypedDataArrayRequester(
|
|
1597
|
+
return this.getTypedDataArrayRequester(Oe, "/internal/references/property-type", !0);
|
|
1595
1598
|
}
|
|
1596
1599
|
/**
|
|
1597
1600
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
1598
1601
|
*/
|
|
1599
1602
|
getPriceCoefficients() {
|
|
1600
|
-
return this.getTypedDataArrayRequester(
|
|
1603
|
+
return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
|
|
1604
|
+
}
|
|
1605
|
+
/**
|
|
1606
|
+
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
1607
|
+
*/
|
|
1608
|
+
getProductFileType() {
|
|
1609
|
+
return this.getTypedDataArrayRequester(Or, "/public/references/product-file-type", !0);
|
|
1601
1610
|
}
|
|
1602
1611
|
}
|
|
1603
|
-
var
|
|
1604
|
-
class
|
|
1612
|
+
var Ur = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(Ur || {});
|
|
1613
|
+
class Me extends P {
|
|
1605
1614
|
/**
|
|
1606
1615
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1607
1616
|
*
|
|
@@ -1637,10 +1646,10 @@ class qe extends P {
|
|
|
1637
1646
|
* Признак активности учетной записи пользователя.
|
|
1638
1647
|
*/
|
|
1639
1648
|
s(this, "isActive");
|
|
1640
|
-
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
|
|
1649
|
+
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 T(e.salesDirection) : void 0, this.createdAt = D(e == null ? void 0 : e.createdAt) ? N(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = D(e == null ? void 0 : e.lastLoginAt) ? N(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1641
1650
|
}
|
|
1642
1651
|
}
|
|
1643
|
-
class
|
|
1652
|
+
class qr extends Me {
|
|
1644
1653
|
/**
|
|
1645
1654
|
* Инициализирует экземпляр класса {@link User}.
|
|
1646
1655
|
*
|
|
@@ -1663,16 +1672,16 @@ class Or extends qe {
|
|
|
1663
1672
|
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;
|
|
1664
1673
|
}
|
|
1665
1674
|
}
|
|
1666
|
-
class
|
|
1675
|
+
class Gr extends p {
|
|
1667
1676
|
/**
|
|
1668
1677
|
* Возвращает данные о текущем пользователе.
|
|
1669
1678
|
*/
|
|
1670
1679
|
// eslint-disable-next-line class-methods-use-this
|
|
1671
1680
|
getCurrentUser() {
|
|
1672
|
-
return this.get("/internal/users/info", {}, (r) => new
|
|
1681
|
+
return this.get("/internal/users/info", {}, (r) => new qr(r.data));
|
|
1673
1682
|
}
|
|
1674
1683
|
}
|
|
1675
|
-
class
|
|
1684
|
+
class Mr {
|
|
1676
1685
|
/**
|
|
1677
1686
|
* Инициализирует экземпляр класса {@link ProductPriceHistory}.
|
|
1678
1687
|
*
|
|
@@ -1715,10 +1724,10 @@ class Ur {
|
|
|
1715
1724
|
* Данные о валюте.
|
|
1716
1725
|
*/
|
|
1717
1726
|
s(this, "currency");
|
|
1718
|
-
this.cost = r.cost, this.costDate = D(r.costDate) ? N(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
|
|
1727
|
+
this.cost = r.cost, this.costDate = D(r.costDate) ? N(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 q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new te(r.currency) : void 0;
|
|
1719
1728
|
}
|
|
1720
1729
|
}
|
|
1721
|
-
class
|
|
1730
|
+
class Te {
|
|
1722
1731
|
/**
|
|
1723
1732
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
1724
1733
|
*
|
|
@@ -1733,10 +1742,10 @@ class $e {
|
|
|
1733
1742
|
* Список рекомендованных категорий продуктов.
|
|
1734
1743
|
*/
|
|
1735
1744
|
s(this, "productCategories", []);
|
|
1736
|
-
r != null && r.products && (this.products = r.products.map((e) => new x(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new
|
|
1745
|
+
r != null && r.products && (this.products = r.products.map((e) => new x(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new U(e)));
|
|
1737
1746
|
}
|
|
1738
1747
|
}
|
|
1739
|
-
class
|
|
1748
|
+
class Q extends P {
|
|
1740
1749
|
/**
|
|
1741
1750
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
1742
1751
|
*
|
|
@@ -1756,10 +1765,22 @@ class B extends P {
|
|
|
1756
1765
|
* Идентификатор родительской роли ценообразования.
|
|
1757
1766
|
*/
|
|
1758
1767
|
s(this, "parentRoleId");
|
|
1768
|
+
/**
|
|
1769
|
+
* Дочерние категории.
|
|
1770
|
+
*/
|
|
1771
|
+
s(this, "subRoles", []);
|
|
1772
|
+
/**
|
|
1773
|
+
* Родительская категория.
|
|
1774
|
+
*/
|
|
1775
|
+
s(this, "parentRole");
|
|
1776
|
+
/**
|
|
1777
|
+
* Уровень роли ценообразования.
|
|
1778
|
+
*/
|
|
1779
|
+
s(this, "level", 0);
|
|
1759
1780
|
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;
|
|
1760
1781
|
}
|
|
1761
1782
|
}
|
|
1762
|
-
class
|
|
1783
|
+
class Se {
|
|
1763
1784
|
/**
|
|
1764
1785
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1765
1786
|
*
|
|
@@ -1778,10 +1799,10 @@ class qr {
|
|
|
1778
1799
|
* Минимальный коэффициент цены.
|
|
1779
1800
|
*/
|
|
1780
1801
|
s(this, "minCoefficient");
|
|
1781
|
-
this.role = new
|
|
1802
|
+
this.role = new Q(r == null ? void 0 : r.role), this.category = new ce(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
|
|
1782
1803
|
}
|
|
1783
1804
|
}
|
|
1784
|
-
class
|
|
1805
|
+
class ls extends p {
|
|
1785
1806
|
/**
|
|
1786
1807
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
1787
1808
|
*
|
|
@@ -1807,11 +1828,11 @@ class os extends p {
|
|
|
1807
1828
|
*/
|
|
1808
1829
|
// eslint-disable-next-line class-methods-use-this
|
|
1809
1830
|
getPriceExportLink(r = "csv", e = !1, t = void 0) {
|
|
1810
|
-
let o = `${
|
|
1831
|
+
let o = `${d.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
1811
1832
|
return t && (o += `&client_id=${t}`), o;
|
|
1812
1833
|
}
|
|
1813
1834
|
}
|
|
1814
|
-
class
|
|
1835
|
+
class us extends p {
|
|
1815
1836
|
/**
|
|
1816
1837
|
* Возвращает список данных о корневых категориях.
|
|
1817
1838
|
*
|
|
@@ -1825,7 +1846,7 @@ class cs extends p {
|
|
|
1825
1846
|
{
|
|
1826
1847
|
showHidden: r
|
|
1827
1848
|
},
|
|
1828
|
-
(e) => e.data.map((t) => new
|
|
1849
|
+
(e) => e.data.map((t) => new U(t))
|
|
1829
1850
|
);
|
|
1830
1851
|
}
|
|
1831
1852
|
/**
|
|
@@ -1844,7 +1865,7 @@ class cs extends p {
|
|
|
1844
1865
|
showHidden: e,
|
|
1845
1866
|
withNestedCategories: t
|
|
1846
1867
|
},
|
|
1847
|
-
(n) => new
|
|
1868
|
+
(n) => new U(n.data)
|
|
1848
1869
|
);
|
|
1849
1870
|
}
|
|
1850
1871
|
/**
|
|
@@ -1853,7 +1874,7 @@ class cs extends p {
|
|
|
1853
1874
|
* @param categoryID Идентификатор категории продуктов.
|
|
1854
1875
|
*/
|
|
1855
1876
|
getPublicCategoryData(r) {
|
|
1856
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
1877
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
|
|
1857
1878
|
}
|
|
1858
1879
|
/**
|
|
1859
1880
|
* Возвращает список продуктов категории.
|
|
@@ -1871,7 +1892,7 @@ class cs extends p {
|
|
|
1871
1892
|
showHidden: t,
|
|
1872
1893
|
withPriceCoefficients: e
|
|
1873
1894
|
},
|
|
1874
|
-
(n) =>
|
|
1895
|
+
(n) => Z(n.data, (o) => new x(o))
|
|
1875
1896
|
);
|
|
1876
1897
|
}
|
|
1877
1898
|
/**
|
|
@@ -1884,7 +1905,7 @@ class cs extends p {
|
|
|
1884
1905
|
getCategoryProductsCoefficients(r) {
|
|
1885
1906
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
1886
1907
|
const { data: t } = e;
|
|
1887
|
-
return
|
|
1908
|
+
return Qe(t, (n) => n.map((o) => new De(o))), t;
|
|
1888
1909
|
});
|
|
1889
1910
|
}
|
|
1890
1911
|
/**
|
|
@@ -1896,14 +1917,14 @@ class cs extends p {
|
|
|
1896
1917
|
publicSimpleSearch(r, e = 10) {
|
|
1897
1918
|
return new Promise((t, n) => {
|
|
1898
1919
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
1899
|
-
t(o.categories.map((l) => new
|
|
1920
|
+
t(o.categories.map((l) => new U(l)));
|
|
1900
1921
|
}).catch((o) => {
|
|
1901
1922
|
n(o);
|
|
1902
1923
|
});
|
|
1903
1924
|
});
|
|
1904
1925
|
}
|
|
1905
1926
|
}
|
|
1906
|
-
class
|
|
1927
|
+
class ps extends p {
|
|
1907
1928
|
/**
|
|
1908
1929
|
* Возвращает данные об указанном продукте.
|
|
1909
1930
|
*
|
|
@@ -1934,7 +1955,7 @@ class ls extends p {
|
|
|
1934
1955
|
return this.get(
|
|
1935
1956
|
`/internal/catalog/products/${r}/coefficients`,
|
|
1936
1957
|
{},
|
|
1937
|
-
(e) =>
|
|
1958
|
+
(e) => Z(e.data, (t) => new De(t))
|
|
1938
1959
|
);
|
|
1939
1960
|
}
|
|
1940
1961
|
/**
|
|
@@ -1947,7 +1968,7 @@ class ls extends p {
|
|
|
1947
1968
|
*/
|
|
1948
1969
|
getProductPriceHistory(r, e) {
|
|
1949
1970
|
const t = {};
|
|
1950
|
-
return
|
|
1971
|
+
return Ye(e) || (t.clientId = e), this.get(`/internal/price/products/${r}/history`, t, (n) => Z(n.data, (o) => new Mr(o)));
|
|
1951
1972
|
}
|
|
1952
1973
|
/**
|
|
1953
1974
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -1965,7 +1986,7 @@ class ls extends p {
|
|
|
1965
1986
|
});
|
|
1966
1987
|
}
|
|
1967
1988
|
}
|
|
1968
|
-
class
|
|
1989
|
+
class hs extends p {
|
|
1969
1990
|
/**
|
|
1970
1991
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
1971
1992
|
*
|
|
@@ -1981,7 +2002,7 @@ class us extends p {
|
|
|
1981
2002
|
clientId: r,
|
|
1982
2003
|
showHidden: e
|
|
1983
2004
|
},
|
|
1984
|
-
(t) => t.data.map((n) => new
|
|
2005
|
+
(t) => t.data.map((n) => new re(n))
|
|
1985
2006
|
);
|
|
1986
2007
|
}
|
|
1987
2008
|
/**
|
|
@@ -2002,7 +2023,7 @@ class us extends p {
|
|
|
2002
2023
|
showHidden: t,
|
|
2003
2024
|
withNestedCategories: n
|
|
2004
2025
|
},
|
|
2005
|
-
(o) => new
|
|
2026
|
+
(o) => new re(o.data)
|
|
2006
2027
|
);
|
|
2007
2028
|
}
|
|
2008
2029
|
/**
|
|
@@ -2023,11 +2044,11 @@ class us extends p {
|
|
|
2023
2044
|
showHidden: n,
|
|
2024
2045
|
withPriceCoefficients: t
|
|
2025
2046
|
},
|
|
2026
|
-
(o) =>
|
|
2047
|
+
(o) => Z(o.data, (l) => new ue(l))
|
|
2027
2048
|
);
|
|
2028
2049
|
}
|
|
2029
2050
|
}
|
|
2030
|
-
class
|
|
2051
|
+
class gs extends p {
|
|
2031
2052
|
/**
|
|
2032
2053
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
2033
2054
|
*
|
|
@@ -2044,18 +2065,18 @@ class ps extends p {
|
|
|
2044
2065
|
clientId: e,
|
|
2045
2066
|
withPriceCoefficients: t
|
|
2046
2067
|
},
|
|
2047
|
-
(n) => new
|
|
2068
|
+
(n) => new ue(n.data)
|
|
2048
2069
|
);
|
|
2049
2070
|
}
|
|
2050
2071
|
}
|
|
2051
|
-
class
|
|
2072
|
+
class ms extends p {
|
|
2052
2073
|
/**
|
|
2053
2074
|
* Возвращает список ролей ценообразования.
|
|
2054
2075
|
*
|
|
2055
2076
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
2056
2077
|
*/
|
|
2057
2078
|
getRoles() {
|
|
2058
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
2079
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new Q(e)));
|
|
2059
2080
|
}
|
|
2060
2081
|
/**
|
|
2061
2082
|
* Добавляет новую роль ценообразования.
|
|
@@ -2065,7 +2086,7 @@ class hs extends p {
|
|
|
2065
2086
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
2066
2087
|
*/
|
|
2067
2088
|
createRole(r) {
|
|
2068
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
2089
|
+
return this.post("/internal/price/roles", r, (e) => new Q(e.data));
|
|
2069
2090
|
}
|
|
2070
2091
|
/**
|
|
2071
2092
|
* Возвращает данные роли ценообразования.
|
|
@@ -2075,7 +2096,7 @@ class hs extends p {
|
|
|
2075
2096
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
2076
2097
|
*/
|
|
2077
2098
|
getRole(r) {
|
|
2078
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
2099
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new Q(e.data));
|
|
2079
2100
|
}
|
|
2080
2101
|
/**
|
|
2081
2102
|
* Обновляет данные роли ценообразования.
|
|
@@ -2086,7 +2107,7 @@ class hs extends p {
|
|
|
2086
2107
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
2087
2108
|
*/
|
|
2088
2109
|
updateRole(r, e) {
|
|
2089
|
-
return this.patch(`/internal/price/roles/${r}`, e, (t) => new
|
|
2110
|
+
return this.patch(`/internal/price/roles/${r}`, e, (t) => new Q(t.data));
|
|
2090
2111
|
}
|
|
2091
2112
|
/**
|
|
2092
2113
|
* Удаляет роль ценообразования.
|
|
@@ -2106,7 +2127,11 @@ class hs extends p {
|
|
|
2106
2127
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_category_rules_get
|
|
2107
2128
|
*/
|
|
2108
2129
|
getCategoryRules(r) {
|
|
2109
|
-
return this.get(
|
|
2130
|
+
return this.get(
|
|
2131
|
+
`/internal/price/roles/rules/categories/${r}`,
|
|
2132
|
+
{},
|
|
2133
|
+
(e) => e.data.map((t) => new Se(t))
|
|
2134
|
+
);
|
|
2110
2135
|
}
|
|
2111
2136
|
/**
|
|
2112
2137
|
* Обновляет правила для роли ценообразования по указанной категории.
|
|
@@ -2117,10 +2142,14 @@ class hs extends p {
|
|
|
2117
2142
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_category_rules_update
|
|
2118
2143
|
*/
|
|
2119
2144
|
updateCategoryRules(r, e) {
|
|
2120
|
-
return this.patch(
|
|
2145
|
+
return this.patch(
|
|
2146
|
+
`/internal/price/roles/rules/categories/${r}`,
|
|
2147
|
+
e,
|
|
2148
|
+
(t) => t.data.map((n) => new Se(n))
|
|
2149
|
+
);
|
|
2121
2150
|
}
|
|
2122
2151
|
}
|
|
2123
|
-
class
|
|
2152
|
+
class Ae extends p {
|
|
2124
2153
|
/**
|
|
2125
2154
|
* Получает пагинированный список данных.
|
|
2126
2155
|
*
|
|
@@ -2136,12 +2165,12 @@ class De extends p {
|
|
|
2136
2165
|
page: (n == null ? void 0 : n.page) ?? 1,
|
|
2137
2166
|
per_page: (n == null ? void 0 : n.pageSize) ?? (n == null ? void 0 : n.perPage) ?? 10
|
|
2138
2167
|
};
|
|
2139
|
-
return e && (u.filters = JSON.stringify(e)),
|
|
2140
|
-
u[`sort[${y}][field]`] =
|
|
2168
|
+
return e && (u.filters = JSON.stringify(e)), Xe(t) || (Ze(t) ? t : [t]).forEach((g, y) => {
|
|
2169
|
+
u[`sort[${y}][field]`] = g.field, u[`sort[${y}][direction]`] = g.direction;
|
|
2141
2170
|
}), this.get(r, u, o, l);
|
|
2142
2171
|
}
|
|
2143
2172
|
}
|
|
2144
|
-
class
|
|
2173
|
+
class fs extends Ae {
|
|
2145
2174
|
/**
|
|
2146
2175
|
* Возвращает пагинированный список свойств.
|
|
2147
2176
|
*
|
|
@@ -2216,7 +2245,7 @@ class gs extends De {
|
|
|
2216
2245
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
2217
2246
|
*/
|
|
2218
2247
|
getProductProperties(r) {
|
|
2219
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((t) => new
|
|
2248
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((t) => new F(t)));
|
|
2220
2249
|
}
|
|
2221
2250
|
/**
|
|
2222
2251
|
* Возвращает значение свойства продукта.
|
|
@@ -2226,7 +2255,7 @@ class gs extends De {
|
|
|
2226
2255
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
2227
2256
|
*/
|
|
2228
2257
|
getProductProperty(r, e) {
|
|
2229
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new
|
|
2258
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (t) => new F(t.data));
|
|
2230
2259
|
}
|
|
2231
2260
|
/**
|
|
2232
2261
|
* Обновляет значение свойства продукта.
|
|
@@ -2237,7 +2266,7 @@ class gs extends De {
|
|
|
2237
2266
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
2238
2267
|
*/
|
|
2239
2268
|
updateProductProperty(r, e, t) {
|
|
2240
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (n) => new
|
|
2269
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (n) => new F(n.data));
|
|
2241
2270
|
}
|
|
2242
2271
|
/**
|
|
2243
2272
|
* Удаляет значение свойства продукта.
|
|
@@ -2362,7 +2391,7 @@ class gs extends De {
|
|
|
2362
2391
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
2363
2392
|
*/
|
|
2364
2393
|
getCategoryProperties(r) {
|
|
2365
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((t) => new
|
|
2394
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((t) => new F(t)));
|
|
2366
2395
|
}
|
|
2367
2396
|
/**
|
|
2368
2397
|
* Возвращает значение свойства категории.
|
|
@@ -2372,7 +2401,7 @@ class gs extends De {
|
|
|
2372
2401
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
2373
2402
|
*/
|
|
2374
2403
|
getCategoryProperty(r, e) {
|
|
2375
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new
|
|
2404
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (t) => new F(t.data));
|
|
2376
2405
|
}
|
|
2377
2406
|
/**
|
|
2378
2407
|
* Обновляет значение свойства категории.
|
|
@@ -2383,7 +2412,7 @@ class gs extends De {
|
|
|
2383
2412
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
2384
2413
|
*/
|
|
2385
2414
|
updateCategoryProperty(r, e, t) {
|
|
2386
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (n) => new
|
|
2415
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (n) => new F(n.data));
|
|
2387
2416
|
}
|
|
2388
2417
|
/**
|
|
2389
2418
|
* Удаляет значение свойства категории.
|
|
@@ -2502,14 +2531,14 @@ class gs extends De {
|
|
|
2502
2531
|
return this.patch(`/internal/catalog/categories/${r}/properties/slug`, { slug: e });
|
|
2503
2532
|
}
|
|
2504
2533
|
}
|
|
2505
|
-
class
|
|
2534
|
+
class ys extends p {
|
|
2506
2535
|
/**
|
|
2507
2536
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
2508
2537
|
*
|
|
2509
2538
|
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
2510
2539
|
*/
|
|
2511
2540
|
getProductCategoryRecommendations(r) {
|
|
2512
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
2541
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Te(e.data));
|
|
2513
2542
|
}
|
|
2514
2543
|
/**
|
|
2515
2544
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -2517,7 +2546,7 @@ class ms extends p {
|
|
|
2517
2546
|
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
2518
2547
|
*/
|
|
2519
2548
|
getProductRecommendations(r) {
|
|
2520
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
2549
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Te(e.data));
|
|
2521
2550
|
}
|
|
2522
2551
|
/**
|
|
2523
2552
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -2544,8 +2573,8 @@ class ms extends p {
|
|
|
2544
2573
|
});
|
|
2545
2574
|
}
|
|
2546
2575
|
}
|
|
2547
|
-
var
|
|
2548
|
-
class
|
|
2576
|
+
var Hr = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i))(Hr || {});
|
|
2577
|
+
class Ce extends K {
|
|
2549
2578
|
/**
|
|
2550
2579
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
2551
2580
|
*
|
|
@@ -2572,11 +2601,11 @@ class we extends K {
|
|
|
2572
2601
|
/**
|
|
2573
2602
|
* Данные о валюте.
|
|
2574
2603
|
*/
|
|
2575
|
-
s(this, "currency", new
|
|
2576
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
2604
|
+
s(this, "currency", new te());
|
|
2605
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new te(e.currency));
|
|
2577
2606
|
}
|
|
2578
2607
|
}
|
|
2579
|
-
class
|
|
2608
|
+
class ve extends P {
|
|
2580
2609
|
/**
|
|
2581
2610
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
2582
2611
|
*
|
|
@@ -2595,7 +2624,7 @@ class Ce extends P {
|
|
|
2595
2624
|
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;
|
|
2596
2625
|
}
|
|
2597
2626
|
}
|
|
2598
|
-
class
|
|
2627
|
+
class H extends ve {
|
|
2599
2628
|
/**
|
|
2600
2629
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
2601
2630
|
*
|
|
@@ -2630,7 +2659,7 @@ class M extends Ce {
|
|
|
2630
2659
|
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 = e == null ? void 0 : e.deletedAt;
|
|
2631
2660
|
}
|
|
2632
2661
|
}
|
|
2633
|
-
class
|
|
2662
|
+
class He extends P {
|
|
2634
2663
|
/**
|
|
2635
2664
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
2636
2665
|
*
|
|
@@ -2642,19 +2671,19 @@ class Ge extends P {
|
|
|
2642
2671
|
/**
|
|
2643
2672
|
* Данные о менеджере.
|
|
2644
2673
|
*/
|
|
2645
|
-
s(this, "manager", new
|
|
2674
|
+
s(this, "manager", new ee());
|
|
2646
2675
|
/**
|
|
2647
2676
|
* Данные об организационно-правовой форме.
|
|
2648
2677
|
*/
|
|
2649
|
-
s(this, "opf",
|
|
2678
|
+
s(this, "opf", G.generatePersonItem());
|
|
2650
2679
|
/**
|
|
2651
2680
|
* Направление продаж.
|
|
2652
2681
|
*/
|
|
2653
|
-
s(this, "salesDirection", new
|
|
2682
|
+
s(this, "salesDirection", new T());
|
|
2654
2683
|
/**
|
|
2655
2684
|
* Группа партнеров (направление деятельности).
|
|
2656
2685
|
*/
|
|
2657
|
-
s(this, "partnerGroup", new
|
|
2686
|
+
s(this, "partnerGroup", new M());
|
|
2658
2687
|
/**
|
|
2659
2688
|
* Список контактных лиц контрагента.
|
|
2660
2689
|
*/
|
|
@@ -2688,22 +2717,22 @@ class Ge extends P {
|
|
|
2688
2717
|
*/
|
|
2689
2718
|
s(this, "updater");
|
|
2690
2719
|
if (e) {
|
|
2691
|
-
if (this.opf = new
|
|
2720
|
+
if (this.opf = new G(e.opf), this.salesDirection = new T(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = D(e == null ? void 0 : e.createdAt) ? j(e == null ? void 0 : e.createdAt, "yyyy-MM-dd HH:mm:ss", /* @__PURE__ */ new Date()) : e.createdAt, this.creator = e.creator ? new q(e.creator) : void 0, this.updatedAt = D(e == null ? void 0 : e.updatedAt) ? j(e == null ? void 0 : e.updatedAt, "yyyy-MM-dd HH:mm:ss", /* @__PURE__ */ new Date()) : e.updatedAt, this.updater = e.updater ? new q(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new M(e.partnerGroup)), e.manager && (this.manager = new ee(e.manager)), e.contacts) {
|
|
2692
2721
|
const t = [];
|
|
2693
2722
|
e.contacts.forEach((n) => {
|
|
2694
|
-
t.push(new
|
|
2723
|
+
t.push(new H(n));
|
|
2695
2724
|
}), this.contacts = t;
|
|
2696
2725
|
}
|
|
2697
2726
|
if (e.bankAccounts) {
|
|
2698
2727
|
const t = [];
|
|
2699
2728
|
e.bankAccounts.forEach((n) => {
|
|
2700
|
-
t.push(new
|
|
2729
|
+
t.push(new Ce(n));
|
|
2701
2730
|
}), this.bankAccounts = t;
|
|
2702
2731
|
}
|
|
2703
2732
|
}
|
|
2704
2733
|
}
|
|
2705
2734
|
}
|
|
2706
|
-
class
|
|
2735
|
+
class Fr extends He {
|
|
2707
2736
|
/**
|
|
2708
2737
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
2709
2738
|
*
|
|
@@ -2713,7 +2742,7 @@ class Mr extends Ge {
|
|
|
2713
2742
|
super(r);
|
|
2714
2743
|
}
|
|
2715
2744
|
}
|
|
2716
|
-
class
|
|
2745
|
+
class Fe extends He {
|
|
2717
2746
|
/**
|
|
2718
2747
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
2719
2748
|
*
|
|
@@ -2756,7 +2785,7 @@ class Me extends Ge {
|
|
|
2756
2785
|
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 ?? "");
|
|
2757
2786
|
}
|
|
2758
2787
|
}
|
|
2759
|
-
class
|
|
2788
|
+
class Be extends Fe {
|
|
2760
2789
|
/**
|
|
2761
2790
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
2762
2791
|
*
|
|
@@ -2771,7 +2800,7 @@ class He extends Me {
|
|
|
2771
2800
|
e && (this.kpp = e.kpp ?? "");
|
|
2772
2801
|
}
|
|
2773
2802
|
}
|
|
2774
|
-
class
|
|
2803
|
+
class Br extends Be {
|
|
2775
2804
|
/**
|
|
2776
2805
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
2777
2806
|
*
|
|
@@ -2794,7 +2823,7 @@ class Hr extends He {
|
|
|
2794
2823
|
e && (this.registrationCountry = new E(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
2795
2824
|
}
|
|
2796
2825
|
}
|
|
2797
|
-
class
|
|
2826
|
+
class ne {
|
|
2798
2827
|
/**
|
|
2799
2828
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
2800
2829
|
*
|
|
@@ -2803,17 +2832,17 @@ class te {
|
|
|
2803
2832
|
static createInstance(r) {
|
|
2804
2833
|
switch (r.opf.slug) {
|
|
2805
2834
|
case $.Ic:
|
|
2806
|
-
return new
|
|
2835
|
+
return new Fe(r);
|
|
2807
2836
|
case $.UlR:
|
|
2808
|
-
return new
|
|
2837
|
+
return new Be(r);
|
|
2809
2838
|
case $.UlNr:
|
|
2810
|
-
return new
|
|
2839
|
+
return new Br(r);
|
|
2811
2840
|
default:
|
|
2812
|
-
return new
|
|
2841
|
+
return new Fr(r);
|
|
2813
2842
|
}
|
|
2814
2843
|
}
|
|
2815
2844
|
}
|
|
2816
|
-
class
|
|
2845
|
+
class $e extends Me {
|
|
2817
2846
|
/**
|
|
2818
2847
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2819
2848
|
*
|
|
@@ -2855,10 +2884,10 @@ class Pe extends qe {
|
|
|
2855
2884
|
* Список менеджеров клиента.
|
|
2856
2885
|
*/
|
|
2857
2886
|
s(this, "managers");
|
|
2858
|
-
this.salesDirection = new
|
|
2887
|
+
this.salesDirection = new T(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 se(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((n) => new ee(n))) ?? [];
|
|
2859
2888
|
}
|
|
2860
2889
|
}
|
|
2861
|
-
class
|
|
2890
|
+
class ge extends K {
|
|
2862
2891
|
/**
|
|
2863
2892
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
2864
2893
|
*
|
|
@@ -2873,7 +2902,7 @@ class he extends K {
|
|
|
2873
2902
|
this.isPrimary = e.isPrimary;
|
|
2874
2903
|
}
|
|
2875
2904
|
}
|
|
2876
|
-
class
|
|
2905
|
+
class Wr extends H {
|
|
2877
2906
|
/**
|
|
2878
2907
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
2879
2908
|
*
|
|
@@ -2898,10 +2927,10 @@ class Br extends M {
|
|
|
2898
2927
|
*/
|
|
2899
2928
|
addresses: []
|
|
2900
2929
|
});
|
|
2901
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new
|
|
2930
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new ge(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new ge(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new ge(t))));
|
|
2902
2931
|
}
|
|
2903
2932
|
}
|
|
2904
|
-
class
|
|
2933
|
+
class ie extends Tr {
|
|
2905
2934
|
/**
|
|
2906
2935
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
2907
2936
|
*
|
|
@@ -2938,10 +2967,10 @@ class ne extends $r {
|
|
|
2938
2967
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
2939
2968
|
*/
|
|
2940
2969
|
s(this, "isTransportCompanyAddress");
|
|
2941
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
2970
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new ke(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((n) => new H(n))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
2942
2971
|
}
|
|
2943
2972
|
}
|
|
2944
|
-
class
|
|
2973
|
+
class _e extends $e {
|
|
2945
2974
|
/**
|
|
2946
2975
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2947
2976
|
*
|
|
@@ -2995,10 +3024,10 @@ class be extends Pe {
|
|
|
2995
3024
|
* Дополнительные данные о клиенте.
|
|
2996
3025
|
*/
|
|
2997
3026
|
s(this, "extraData");
|
|
2998
|
-
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) =>
|
|
3027
|
+
this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => ne.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new M(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new H(u))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((u) => new ie(u))) ?? [], this.channelPrimaryInterest = new Ue(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ge(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new V(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 le(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
2999
3028
|
}
|
|
3000
3029
|
}
|
|
3001
|
-
class
|
|
3030
|
+
class ws {
|
|
3002
3031
|
/**
|
|
3003
3032
|
* Инициализирует экземпляр класса {@link ClientsListFilters}.
|
|
3004
3033
|
*
|
|
@@ -3095,17 +3124,17 @@ class fs {
|
|
|
3095
3124
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
3096
3125
|
*/
|
|
3097
3126
|
s(this, "lastOrder");
|
|
3098
|
-
var e, t, n, o, l, u,
|
|
3099
|
-
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.city = new
|
|
3127
|
+
var e, t, n, o, l, u, g;
|
|
3128
|
+
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.city = new se(r == null ? void 0 : r.city), this.region = new Y(r == null ? void 0 : r.region), this.country = new E(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 = {
|
|
3100
3129
|
from: ((e = r == null ? void 0 : r.createdAt) == null ? void 0 : e.from) ?? null,
|
|
3101
3130
|
to: ((t = r == null ? void 0 : r.createdAt) == null ? void 0 : t.to) ?? null
|
|
3102
3131
|
}, this.lastLoginDate = {
|
|
3103
3132
|
from: ((n = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : n.from) ?? null,
|
|
3104
3133
|
to: ((o = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : o.to) ?? null
|
|
3105
|
-
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((y) => new
|
|
3134
|
+
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((y) => new pe(y)) : [], this.salesDirection = new T(r == null ? void 0 : r.salesDirection), this.contragentInn = (r == null ? void 0 : r.contragentInn) ?? "", this.contragentType = new G(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new V(r == null ? void 0 : r.preferredDeliveryType), this.hasCostLessThenStop = r != null && r.hasCostLessThenStop ? !0 : void 0, this.partnerGroup = new M(r == null ? void 0 : r.partnerGroup), this.contact = new ve(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
3106
3135
|
createdAt: (l = r == null ? void 0 : r.lastOrder) == null ? void 0 : l.createdAt,
|
|
3107
3136
|
creator: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.creator,
|
|
3108
|
-
isApproved: (
|
|
3137
|
+
isApproved: (g = r == null ? void 0 : r.lastOrder) == null ? void 0 : g.isApproved
|
|
3109
3138
|
};
|
|
3110
3139
|
}
|
|
3111
3140
|
/**
|
|
@@ -3124,10 +3153,10 @@ class fs {
|
|
|
3124
3153
|
this[r] = "";
|
|
3125
3154
|
break;
|
|
3126
3155
|
case "city":
|
|
3127
|
-
this.city = new
|
|
3156
|
+
this.city = new se();
|
|
3128
3157
|
break;
|
|
3129
3158
|
case "region":
|
|
3130
|
-
this.region = new
|
|
3159
|
+
this.region = new Y();
|
|
3131
3160
|
break;
|
|
3132
3161
|
case "isActive":
|
|
3133
3162
|
this.isActive = !0;
|
|
@@ -3148,22 +3177,22 @@ class fs {
|
|
|
3148
3177
|
this.managers = [];
|
|
3149
3178
|
break;
|
|
3150
3179
|
case "salesDirection":
|
|
3151
|
-
this.salesDirection = new
|
|
3180
|
+
this.salesDirection = new T();
|
|
3152
3181
|
break;
|
|
3153
3182
|
case "contragentType":
|
|
3154
|
-
this.contragentType = new
|
|
3183
|
+
this.contragentType = new G();
|
|
3155
3184
|
break;
|
|
3156
3185
|
case "preferredDeliveryType":
|
|
3157
3186
|
this.preferredDeliveryType = new V();
|
|
3158
3187
|
break;
|
|
3159
3188
|
case "partnerGroup":
|
|
3160
|
-
this.partnerGroup = new
|
|
3189
|
+
this.partnerGroup = new M();
|
|
3161
3190
|
break;
|
|
3162
3191
|
case "hasCostLessThenStop":
|
|
3163
3192
|
this.hasCostLessThenStop = void 0;
|
|
3164
3193
|
break;
|
|
3165
3194
|
case "contact":
|
|
3166
|
-
this.contact = new
|
|
3195
|
+
this.contact = new ve();
|
|
3167
3196
|
break;
|
|
3168
3197
|
}
|
|
3169
3198
|
return this;
|
|
@@ -3178,11 +3207,11 @@ class fs {
|
|
|
3178
3207
|
return Object.keys(this).forEach((l) => {
|
|
3179
3208
|
const u = this[l];
|
|
3180
3209
|
// eslint-disable-next-line prettier/prettier
|
|
3181
|
-
|
|
3210
|
+
Ie(u) || D(u) && u.trim().length === 0 || er(u.isNewRec) && u.isNewRec() || (r[l] = u);
|
|
3182
3211
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((n = r == null ? void 0 : r.lastLoginDate) != null && n.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
3183
3212
|
}
|
|
3184
3213
|
}
|
|
3185
|
-
class
|
|
3214
|
+
class We extends K {
|
|
3186
3215
|
/**
|
|
3187
3216
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
3188
3217
|
*
|
|
@@ -3202,17 +3231,17 @@ class Be extends K {
|
|
|
3202
3231
|
* Признак того, что заказ подтвержден в 1С.
|
|
3203
3232
|
*/
|
|
3204
3233
|
s(this, "isApproved1c");
|
|
3205
|
-
this.createdAt = D(e == null ? void 0 : e.createdAt) ? j(e.createdAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
3234
|
+
this.createdAt = D(e == null ? void 0 : e.createdAt) ? j(e.createdAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new q(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
3206
3235
|
}
|
|
3207
3236
|
}
|
|
3208
|
-
class
|
|
3237
|
+
class ze extends We {
|
|
3209
3238
|
/**
|
|
3210
3239
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
3211
3240
|
*
|
|
3212
3241
|
* @param data Данные для первоначальной инициализации.
|
|
3213
3242
|
*/
|
|
3214
3243
|
constructor(e) {
|
|
3215
|
-
var t, n, o, l, u,
|
|
3244
|
+
var t, n, o, l, u, g, y, A;
|
|
3216
3245
|
super(e);
|
|
3217
3246
|
/**
|
|
3218
3247
|
* Краткие данные о клиенте.
|
|
@@ -3254,19 +3283,19 @@ class We extends Be {
|
|
|
3254
3283
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
3255
3284
|
*/
|
|
3256
3285
|
s(this, "isNotInStock");
|
|
3257
|
-
this.client = new
|
|
3286
|
+
this.client = new $e(e == null ? void 0 : e.client), this.payment = {
|
|
3258
3287
|
type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
|
|
3259
3288
|
status: ((n = e == null ? void 0 : e.payment) == null ? void 0 : n.status) ?? -1,
|
|
3260
3289
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
3261
3290
|
}, this.delivery = {
|
|
3262
3291
|
type: ((l = e == null ? void 0 : e.delivery) == null ? void 0 : l.type) ?? -1,
|
|
3263
|
-
date: D((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? j(e == null ? void 0 : e.delivery.date, "dd.MM.yyyy", /* @__PURE__ */ new Date()) : ((
|
|
3264
|
-
address: (y = e == null ? void 0 : e.delivery) != null && y.address ? new
|
|
3265
|
-
warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new
|
|
3266
|
-
}, this.attachedUser = new
|
|
3292
|
+
date: D((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? j(e == null ? void 0 : e.delivery.date, "dd.MM.yyyy", /* @__PURE__ */ new Date()) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
|
|
3293
|
+
address: (y = e == null ? void 0 : e.delivery) != null && y.address ? new ie(e.delivery.address) : void 0,
|
|
3294
|
+
warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new le(e.delivery.warehouse) : void 0
|
|
3295
|
+
}, this.attachedUser = new q(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new T(e == null ? void 0 : e.salesDirection), this.pendingAt = D(e == null ? void 0 : e.pendingAt) ? j(e == null ? void 0 : e.pendingAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.pendingAt) ?? /* @__PURE__ */ new Date(), this.processedAt = D(e == null ? void 0 : e.processedAt) ? j(e == null ? void 0 : e.processedAt, "dd.MM.yyyy HH:mm", /* @__PURE__ */ new Date()) : (e == null ? void 0 : e.processedAt) ?? /* @__PURE__ */ new Date(), this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
3267
3296
|
}
|
|
3268
3297
|
}
|
|
3269
|
-
class
|
|
3298
|
+
class zr extends K {
|
|
3270
3299
|
/**
|
|
3271
3300
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
3272
3301
|
*
|
|
@@ -3346,10 +3375,10 @@ class Wr extends K {
|
|
|
3346
3375
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
3347
3376
|
*/
|
|
3348
3377
|
s(this, "sawing");
|
|
3349
|
-
this.product = new
|
|
3378
|
+
this.product = new ue(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;
|
|
3350
3379
|
}
|
|
3351
3380
|
}
|
|
3352
|
-
class
|
|
3381
|
+
class jr extends ze {
|
|
3353
3382
|
/**
|
|
3354
3383
|
* Инициализирует экземпляр класса {@link Order}.
|
|
3355
3384
|
*
|
|
@@ -3389,10 +3418,10 @@ class zr extends We {
|
|
|
3389
3418
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
3390
3419
|
*/
|
|
3391
3420
|
s(this, "isAllowProcessingWithoutPayment");
|
|
3392
|
-
this.products = (e.products ?? []).map((t) => new
|
|
3421
|
+
this.products = (e.products ?? []).map((t) => new zr(t)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ne.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new f(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
3393
3422
|
}
|
|
3394
3423
|
}
|
|
3395
|
-
class
|
|
3424
|
+
class Cs extends Ae {
|
|
3396
3425
|
/**
|
|
3397
3426
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
3398
3427
|
*
|
|
@@ -3404,7 +3433,7 @@ class ys extends De {
|
|
|
3404
3433
|
getOrders(r, e, t) {
|
|
3405
3434
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, t, (n) => {
|
|
3406
3435
|
const o = { ...n.data };
|
|
3407
|
-
return o.data = o.data.map((l) => new
|
|
3436
|
+
return o.data = o.data.map((l) => new ze(l)), o;
|
|
3408
3437
|
});
|
|
3409
3438
|
}
|
|
3410
3439
|
/**
|
|
@@ -3422,10 +3451,10 @@ class ys extends De {
|
|
|
3422
3451
|
* @param orderId Идентификатор заказа для которого необходимо вернуть данные.
|
|
3423
3452
|
*/
|
|
3424
3453
|
getOrder(r) {
|
|
3425
|
-
return this.get(`/internal/orders/${r}`, {}, (e) => new
|
|
3454
|
+
return this.get(`/internal/orders/${r}`, {}, (e) => new jr(e.data));
|
|
3426
3455
|
}
|
|
3427
3456
|
}
|
|
3428
|
-
class
|
|
3457
|
+
class Vr extends P {
|
|
3429
3458
|
/**
|
|
3430
3459
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
3431
3460
|
*
|
|
@@ -3450,11 +3479,11 @@ class Fr extends P {
|
|
|
3450
3479
|
* Данные о последнем заказе клиента.
|
|
3451
3480
|
*/
|
|
3452
3481
|
s(this, "lastOrder");
|
|
3453
|
-
(t = e.contacts) != null && t.length && (this.contacts = e.contacts.map((o) => new
|
|
3482
|
+
(t = e.contacts) != null && t.length && (this.contacts = e.contacts.map((o) => new H(o))), e.lastOrder && (this.lastOrder = new We(e.lastOrder)), (n = e.partnerGroups) != null && n.length && (this.partnerGroups = e.partnerGroups.map((o) => new M(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new V(e.preferredDeliveryType));
|
|
3454
3483
|
}
|
|
3455
3484
|
}
|
|
3456
|
-
var
|
|
3457
|
-
class
|
|
3485
|
+
var je = /* @__PURE__ */ ((i) => (i.BeginWith = "bw", i.Contains = "cn", i.Custom = "custom", i.EndsWith = "ew", i.Equals = "eq", i.GreaterOrEqual = "ge", i.GreaterThan = "gt", i.InList = "in", i.LessOrEqual = "le", i.LessThan = "lt", i.NotBeginWith = "bn", i.NotContains = "nc", i.NotEndsWith = "en", i.NotEqual = "ne", i.NotInList = "ni", i.NotNull = "nn", i.Null = "nu", i))(je || {});
|
|
3486
|
+
class Er {
|
|
3458
3487
|
/**
|
|
3459
3488
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
3460
3489
|
*
|
|
@@ -3478,7 +3507,7 @@ class jr {
|
|
|
3478
3507
|
this.page = (r == null ? void 0 : r.page) ?? 1, this.perPage = (r == null ? void 0 : r.perPage) ?? 50, this.pageSize = (r == null ? void 0 : r.pageSize) ?? this.perPage;
|
|
3479
3508
|
}
|
|
3480
3509
|
}
|
|
3481
|
-
class
|
|
3510
|
+
class vs extends Er {
|
|
3482
3511
|
/**
|
|
3483
3512
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
3484
3513
|
*
|
|
@@ -3509,7 +3538,7 @@ class ws extends jr {
|
|
|
3509
3538
|
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;
|
|
3510
3539
|
}
|
|
3511
3540
|
}
|
|
3512
|
-
class
|
|
3541
|
+
class Rs {
|
|
3513
3542
|
/**
|
|
3514
3543
|
* Инициализирует экземпляр класса {@link ISortRequestParams}.
|
|
3515
3544
|
*
|
|
@@ -3527,7 +3556,7 @@ class Cs {
|
|
|
3527
3556
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
3528
3557
|
}
|
|
3529
3558
|
}
|
|
3530
|
-
class
|
|
3559
|
+
class Ds extends Ae {
|
|
3531
3560
|
/**
|
|
3532
3561
|
* Возвращает данные об указанном клиенте.
|
|
3533
3562
|
*
|
|
@@ -3535,7 +3564,7 @@ class vs extends De {
|
|
|
3535
3564
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
3536
3565
|
*/
|
|
3537
3566
|
getClient(r) {
|
|
3538
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
3567
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new _e(e.data));
|
|
3539
3568
|
}
|
|
3540
3569
|
/**
|
|
3541
3570
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -3548,7 +3577,7 @@ class vs extends De {
|
|
|
3548
3577
|
getClientsList(r, e, t) {
|
|
3549
3578
|
return this.getPaginated("/internal/clients", r, e, t, (n) => {
|
|
3550
3579
|
const o = { ...n.data };
|
|
3551
|
-
return o.data = o.data.map((l) => new
|
|
3580
|
+
return o.data = o.data.map((l) => new $e(l)), o;
|
|
3552
3581
|
});
|
|
3553
3582
|
}
|
|
3554
3583
|
/**
|
|
@@ -3561,7 +3590,7 @@ class vs extends De {
|
|
|
3561
3590
|
return this.getClientsList({
|
|
3562
3591
|
groupOp: "and",
|
|
3563
3592
|
groups: [],
|
|
3564
|
-
filters: [{ field: "phone", op:
|
|
3593
|
+
filters: [{ field: "phone", op: je.Contains, value: r }]
|
|
3565
3594
|
});
|
|
3566
3595
|
}
|
|
3567
3596
|
/**
|
|
@@ -3574,7 +3603,7 @@ class vs extends De {
|
|
|
3574
3603
|
getAdditionalClientsData(r, e) {
|
|
3575
3604
|
return this.post("/internal/clients/additional-data", { clients: r, requested_data_types: e }, (t) => {
|
|
3576
3605
|
let n = [];
|
|
3577
|
-
return (t == null ? void 0 : t.data.length) > 0 && (n = t.data.map((o) => new
|
|
3606
|
+
return (t == null ? void 0 : t.data.length) > 0 && (n = t.data.map((o) => new Vr(o))), n;
|
|
3578
3607
|
});
|
|
3579
3608
|
}
|
|
3580
3609
|
/**
|
|
@@ -3586,7 +3615,7 @@ class vs extends De {
|
|
|
3586
3615
|
getAllClientContacts(r) {
|
|
3587
3616
|
return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
|
|
3588
3617
|
let t = [];
|
|
3589
|
-
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((n) => new
|
|
3618
|
+
return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((n) => new Wr(n))), t;
|
|
3590
3619
|
});
|
|
3591
3620
|
}
|
|
3592
3621
|
/**
|
|
@@ -3616,7 +3645,7 @@ class vs extends De {
|
|
|
3616
3645
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
3617
3646
|
preferred_warehouse_id: (t = r.preferredWarehouse) == null ? void 0 : t.id
|
|
3618
3647
|
},
|
|
3619
|
-
(n) => new
|
|
3648
|
+
(n) => new _e(n.data),
|
|
3620
3649
|
e
|
|
3621
3650
|
);
|
|
3622
3651
|
}
|
|
@@ -3726,7 +3755,7 @@ class vs extends De {
|
|
|
3726
3755
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
3727
3756
|
*/
|
|
3728
3757
|
createContragentClientData(r, e, t = {}) {
|
|
3729
|
-
var
|
|
3758
|
+
var g, y, A, S, _, L, a, I;
|
|
3730
3759
|
let n;
|
|
3731
3760
|
const o = e, l = e, u = e;
|
|
3732
3761
|
switch (e.opf.slug) {
|
|
@@ -3735,7 +3764,7 @@ class vs extends De {
|
|
|
3735
3764
|
opf: o.opf.slug,
|
|
3736
3765
|
name: o.name,
|
|
3737
3766
|
alternative_name: o.alternativeName,
|
|
3738
|
-
partner_group_id: (
|
|
3767
|
+
partner_group_id: (g = o.partnerGroup) == null ? void 0 : g.id,
|
|
3739
3768
|
manager_id: (y = o.manager) == null ? void 0 : y.id,
|
|
3740
3769
|
comment: o.comment,
|
|
3741
3770
|
inn: o.inn,
|
|
@@ -3754,7 +3783,7 @@ class vs extends De {
|
|
|
3754
3783
|
name: l.name,
|
|
3755
3784
|
alternative_name: l.alternativeName,
|
|
3756
3785
|
partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
|
|
3757
|
-
manager_id: (
|
|
3786
|
+
manager_id: (S = l.manager) == null ? void 0 : S.id,
|
|
3758
3787
|
comment: l.comment,
|
|
3759
3788
|
inn: l.inn,
|
|
3760
3789
|
kpp: l.kpp,
|
|
@@ -3772,7 +3801,7 @@ class vs extends De {
|
|
|
3772
3801
|
opf: u.opf.slug,
|
|
3773
3802
|
name: u.name,
|
|
3774
3803
|
alternative_name: u.alternativeName,
|
|
3775
|
-
partner_group_id: (
|
|
3804
|
+
partner_group_id: (_ = u.partnerGroup) == null ? void 0 : _.id,
|
|
3776
3805
|
manager_id: (L = u.manager) == null ? void 0 : L.id,
|
|
3777
3806
|
comment: u.comment,
|
|
3778
3807
|
inn: u.inn,
|
|
@@ -3803,7 +3832,7 @@ class vs extends De {
|
|
|
3803
3832
|
return this.post(
|
|
3804
3833
|
`/internal/clients/${r}/contragents`,
|
|
3805
3834
|
n,
|
|
3806
|
-
(
|
|
3835
|
+
(O) => ne.createInstance(O.data),
|
|
3807
3836
|
t
|
|
3808
3837
|
);
|
|
3809
3838
|
}
|
|
@@ -3818,7 +3847,7 @@ class vs extends De {
|
|
|
3818
3847
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
3819
3848
|
*/
|
|
3820
3849
|
updateContragentClientData(r, e, t = {}) {
|
|
3821
|
-
var
|
|
3850
|
+
var g, y, A, S, _, L, a, I;
|
|
3822
3851
|
let n;
|
|
3823
3852
|
const o = e, l = e, u = e;
|
|
3824
3853
|
switch (e.opf.slug) {
|
|
@@ -3827,7 +3856,7 @@ class vs extends De {
|
|
|
3827
3856
|
opf: o.opf.slug,
|
|
3828
3857
|
name: o.name,
|
|
3829
3858
|
alternative_name: o.alternativeName,
|
|
3830
|
-
partner_group_id: (
|
|
3859
|
+
partner_group_id: (g = o.partnerGroup) == null ? void 0 : g.id,
|
|
3831
3860
|
manager_id: (y = o.manager) == null ? void 0 : y.id,
|
|
3832
3861
|
comment: o.comment,
|
|
3833
3862
|
inn: o.inn,
|
|
@@ -3846,7 +3875,7 @@ class vs extends De {
|
|
|
3846
3875
|
name: l.name,
|
|
3847
3876
|
alternative_name: l.alternativeName,
|
|
3848
3877
|
partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
|
|
3849
|
-
manager_id: (
|
|
3878
|
+
manager_id: (S = l.manager) == null ? void 0 : S.id,
|
|
3850
3879
|
comment: l.comment,
|
|
3851
3880
|
inn: l.inn,
|
|
3852
3881
|
kpp: l.kpp,
|
|
@@ -3864,7 +3893,7 @@ class vs extends De {
|
|
|
3864
3893
|
opf: u.opf.slug,
|
|
3865
3894
|
name: u.name,
|
|
3866
3895
|
alternative_name: u.alternativeName,
|
|
3867
|
-
partner_group_id: (
|
|
3896
|
+
partner_group_id: (_ = u.partnerGroup) == null ? void 0 : _.id,
|
|
3868
3897
|
manager_id: (L = u.manager) == null ? void 0 : L.id,
|
|
3869
3898
|
comment: u.comment,
|
|
3870
3899
|
inn: u.inn,
|
|
@@ -3895,7 +3924,7 @@ class vs extends De {
|
|
|
3895
3924
|
return this.patch(
|
|
3896
3925
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
3897
3926
|
n,
|
|
3898
|
-
(
|
|
3927
|
+
(O) => ne.createInstance(O.data),
|
|
3899
3928
|
t
|
|
3900
3929
|
);
|
|
3901
3930
|
}
|
|
@@ -3933,7 +3962,7 @@ class vs extends De {
|
|
|
3933
3962
|
}), e.operatingHours && (n.operating_hours = {
|
|
3934
3963
|
from: e.operatingHours.from,
|
|
3935
3964
|
to: e.operatingHours.to
|
|
3936
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, n, (u) => new
|
|
3965
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, n, (u) => new ie(u.data), t);
|
|
3937
3966
|
}
|
|
3938
3967
|
/**
|
|
3939
3968
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -3962,7 +3991,7 @@ class vs extends De {
|
|
|
3962
3991
|
}), this.patch(
|
|
3963
3992
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
3964
3993
|
n,
|
|
3965
|
-
(u) => new
|
|
3994
|
+
(u) => new ie(u.data),
|
|
3966
3995
|
t
|
|
3967
3996
|
);
|
|
3968
3997
|
}
|
|
@@ -3998,7 +4027,7 @@ class vs extends De {
|
|
|
3998
4027
|
correspondent_account: t.correspondentAccount,
|
|
3999
4028
|
currency_id: t.currency.id
|
|
4000
4029
|
},
|
|
4001
|
-
(o) => new
|
|
4030
|
+
(o) => new Ce(o.data),
|
|
4002
4031
|
n
|
|
4003
4032
|
);
|
|
4004
4033
|
}
|
|
@@ -4024,7 +4053,7 @@ class vs extends De {
|
|
|
4024
4053
|
correspondent_account: t.correspondentAccount,
|
|
4025
4054
|
currency_id: t.currency.id
|
|
4026
4055
|
},
|
|
4027
|
-
(o) => new
|
|
4056
|
+
(o) => new Ce(o.data),
|
|
4028
4057
|
n
|
|
4029
4058
|
);
|
|
4030
4059
|
}
|
|
@@ -4085,7 +4114,7 @@ class vs extends De {
|
|
|
4085
4114
|
comment: e.comment,
|
|
4086
4115
|
not_disturb: e.notDisturb
|
|
4087
4116
|
},
|
|
4088
|
-
(n) => new
|
|
4117
|
+
(n) => new H(n.data),
|
|
4089
4118
|
t
|
|
4090
4119
|
);
|
|
4091
4120
|
}
|
|
@@ -4228,7 +4257,7 @@ class vs extends De {
|
|
|
4228
4257
|
comment: e.comment,
|
|
4229
4258
|
...t
|
|
4230
4259
|
};
|
|
4231
|
-
return (l = e.phone) != null && l.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (
|
|
4260
|
+
return (l = e.phone) != null && l.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), n);
|
|
4232
4261
|
}
|
|
4233
4262
|
/**
|
|
4234
4263
|
* Устанавливает признак основного контактного лица.
|
|
@@ -4257,7 +4286,7 @@ class vs extends De {
|
|
|
4257
4286
|
return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
|
|
4258
4287
|
}
|
|
4259
4288
|
}
|
|
4260
|
-
class
|
|
4289
|
+
class Ps extends p {
|
|
4261
4290
|
/**
|
|
4262
4291
|
* Выполняет проверку занят ли указанный номер телефона.
|
|
4263
4292
|
*
|
|
@@ -4271,7 +4300,7 @@ class Rs extends p {
|
|
|
4271
4300
|
});
|
|
4272
4301
|
}
|
|
4273
4302
|
}
|
|
4274
|
-
class
|
|
4303
|
+
class As extends p {
|
|
4275
4304
|
/**
|
|
4276
4305
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4277
4306
|
*
|
|
@@ -4342,7 +4371,7 @@ class Ds extends p {
|
|
|
4342
4371
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(t = r.properties) == null ? void 0 : t.editor}/template/${e}`);
|
|
4343
4372
|
}
|
|
4344
4373
|
}
|
|
4345
|
-
class
|
|
4374
|
+
class $s {
|
|
4346
4375
|
/**
|
|
4347
4376
|
* Возвращает Unix Timestamp диапазон дат (в секундах) по умолчанию.
|
|
4348
4377
|
*
|
|
@@ -4352,24 +4381,24 @@ class Ps {
|
|
|
4352
4381
|
* Для пересчета в JavaScript Unix Timestamp значение необходимо умножить на 1000.
|
|
4353
4382
|
*/
|
|
4354
4383
|
static defaultDateRanges() {
|
|
4355
|
-
const r = [0, 6].includes(
|
|
4384
|
+
const r = [0, 6].includes(nr(he())) ? ir(me()) : he();
|
|
4356
4385
|
return {
|
|
4357
4386
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
4358
|
-
nextWorkingDay: { label: "Следующий рабочий день", from: k(
|
|
4359
|
-
today: { label: "Сегодня", from: k(
|
|
4360
|
-
yesterday: { label: "Вчера", from: k(
|
|
4361
|
-
tomorrow: { label: "Завтра", from: k(
|
|
4387
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: k(hr(r)), to: k(pr(r)) },
|
|
4388
|
+
today: { label: "Сегодня", from: k(me()), to: k(ur()) },
|
|
4389
|
+
yesterday: { label: "Вчера", from: k(lr()), to: k(cr()) },
|
|
4390
|
+
tomorrow: { label: "Завтра", from: k(he()), to: k(or()) }
|
|
4362
4391
|
};
|
|
4363
4392
|
}
|
|
4364
4393
|
}
|
|
4365
|
-
const
|
|
4394
|
+
const z = class z {
|
|
4366
4395
|
/**
|
|
4367
4396
|
* Устанавливает список единиц измерения линейной величины.
|
|
4368
4397
|
*
|
|
4369
4398
|
* @param linearValues Список единиц измерения линейной величины.
|
|
4370
4399
|
*/
|
|
4371
4400
|
static setLinearValues(r) {
|
|
4372
|
-
|
|
4401
|
+
z.linearValues = r;
|
|
4373
4402
|
}
|
|
4374
4403
|
/**
|
|
4375
4404
|
* Возвращает признак, что указанный товар имеет линейную единицу измерения.
|
|
@@ -4377,7 +4406,7 @@ const F = class F {
|
|
|
4377
4406
|
* @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
|
|
4378
4407
|
*/
|
|
4379
4408
|
static productIsMeasurable(r) {
|
|
4380
|
-
return
|
|
4409
|
+
return z.linearValues.includes(r.unit);
|
|
4381
4410
|
}
|
|
4382
4411
|
/**
|
|
4383
4412
|
* Возвращает кратность количества для указанного товара.
|
|
@@ -4386,7 +4415,7 @@ const F = class F {
|
|
|
4386
4415
|
*/
|
|
4387
4416
|
static getProductMultiplicity(r) {
|
|
4388
4417
|
var e, t;
|
|
4389
|
-
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !
|
|
4418
|
+
return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !z.productIsMeasurable(r) ? r.properties.minCount : 1;
|
|
4390
4419
|
}
|
|
4391
4420
|
/**
|
|
4392
4421
|
* Возвращает кратность длины для указанного товара.
|
|
@@ -4401,14 +4430,14 @@ const F = class F {
|
|
|
4401
4430
|
/**
|
|
4402
4431
|
* Список единиц измерения линейной величины.
|
|
4403
4432
|
*/
|
|
4404
|
-
s(
|
|
4405
|
-
let
|
|
4406
|
-
class
|
|
4433
|
+
s(z, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
4434
|
+
let Le = z;
|
|
4435
|
+
class bs {
|
|
4407
4436
|
/**
|
|
4408
4437
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
4409
4438
|
*/
|
|
4410
4439
|
static generateUndefinedManagerInstance() {
|
|
4411
|
-
return new
|
|
4440
|
+
return new pe({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
4412
4441
|
}
|
|
4413
4442
|
/**
|
|
4414
4443
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -4419,19 +4448,19 @@ class As {
|
|
|
4419
4448
|
return r.id === 0 && r.guid === "-undefined-";
|
|
4420
4449
|
}
|
|
4421
4450
|
}
|
|
4422
|
-
class
|
|
4451
|
+
class Kr extends p {
|
|
4423
4452
|
/**
|
|
4424
4453
|
* Возвращает {@link Promise} для получения справочника списка менеджеров.
|
|
4425
4454
|
*/
|
|
4426
4455
|
getManagers() {
|
|
4427
4456
|
const r = "/internal/managers", e = p.getCachedResponse(r);
|
|
4428
4457
|
return e ? Promise.resolve(e) : this.get(r).then((t) => {
|
|
4429
|
-
const n = t.data.map((o) =>
|
|
4458
|
+
const n = t.data.map((o) => Pe.instanceInitializer(pe, o));
|
|
4430
4459
|
return n && this.cacheResponse(r, n), n;
|
|
4431
4460
|
});
|
|
4432
4461
|
}
|
|
4433
4462
|
}
|
|
4434
|
-
class
|
|
4463
|
+
class Jr {
|
|
4435
4464
|
/**
|
|
4436
4465
|
* Инициализирует экземпляр класса {@link MetaTagItem}.
|
|
4437
4466
|
*
|
|
@@ -4449,7 +4478,7 @@ class Er {
|
|
|
4449
4478
|
this.name = r.name, this.content = r.content;
|
|
4450
4479
|
}
|
|
4451
4480
|
}
|
|
4452
|
-
class
|
|
4481
|
+
class ae {
|
|
4453
4482
|
/**
|
|
4454
4483
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
4455
4484
|
*
|
|
@@ -4485,10 +4514,10 @@ class _e {
|
|
|
4485
4514
|
*/
|
|
4486
4515
|
s(this, "meta");
|
|
4487
4516
|
var e;
|
|
4488
|
-
this.resourceType = new
|
|
4517
|
+
this.resourceType = new qe(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 Jr(t))) ?? [];
|
|
4489
4518
|
}
|
|
4490
4519
|
}
|
|
4491
|
-
class
|
|
4520
|
+
class Ts extends p {
|
|
4492
4521
|
/**
|
|
4493
4522
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
4494
4523
|
*
|
|
@@ -4496,7 +4525,7 @@ class $s extends p {
|
|
|
4496
4525
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
4497
4526
|
*/
|
|
4498
4527
|
getResourceSeoData(r, e) {
|
|
4499
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
4528
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new ae(t.data));
|
|
4500
4529
|
}
|
|
4501
4530
|
/**
|
|
4502
4531
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -4507,7 +4536,7 @@ class $s extends p {
|
|
|
4507
4536
|
* в случае ошибок в запросах.
|
|
4508
4537
|
*/
|
|
4509
4538
|
saveResourceSeoData(r, e = {}) {
|
|
4510
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
4539
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new ae(t.data), e);
|
|
4511
4540
|
}
|
|
4512
4541
|
/**
|
|
4513
4542
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -4519,8 +4548,8 @@ class $s extends p {
|
|
|
4519
4548
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
4520
4549
|
}
|
|
4521
4550
|
}
|
|
4522
|
-
const v =
|
|
4523
|
-
const i = w({}), r = w(void 0), e = w(void 0), t = w(void 0), n = w(void 0), o = w(void 0), l = w(void 0), u = w(void 0),
|
|
4551
|
+
const v = oe("__references_private", () => {
|
|
4552
|
+
const i = w({}), r = w(void 0), e = w(void 0), t = w(void 0), n = w(void 0), o = w(void 0), l = w(void 0), u = w(void 0), g = w(void 0), y = w(void 0), A = w(void 0), S = w(void 0), _ = w(void 0), L = w(void 0), a = w(void 0), I = w(void 0), O = w(void 0), c = w(void 0);
|
|
4524
4553
|
return {
|
|
4525
4554
|
/**
|
|
4526
4555
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -4557,7 +4586,7 @@ const v = ie("__references_private", () => {
|
|
|
4557
4586
|
/**
|
|
4558
4587
|
* Справочник статусов заказов.
|
|
4559
4588
|
*/
|
|
4560
|
-
orderStatusReference:
|
|
4589
|
+
orderStatusReference: g,
|
|
4561
4590
|
/**
|
|
4562
4591
|
* Справочник типов оплаты заказов.
|
|
4563
4592
|
*/
|
|
@@ -4566,6 +4595,10 @@ const v = ie("__references_private", () => {
|
|
|
4566
4595
|
* Справочник групп партнеров.
|
|
4567
4596
|
*/
|
|
4568
4597
|
partnerGroupReference: A,
|
|
4598
|
+
/**
|
|
4599
|
+
* Справочник типов файлов продукктов/категорий.
|
|
4600
|
+
*/
|
|
4601
|
+
productFileTypeReference: S,
|
|
4569
4602
|
/**
|
|
4570
4603
|
* Справочник типов ресурсов.
|
|
4571
4604
|
*/
|
|
@@ -4573,104 +4606,109 @@ const v = ie("__references_private", () => {
|
|
|
4573
4606
|
/**
|
|
4574
4607
|
* Справочник направлений продаж.
|
|
4575
4608
|
*/
|
|
4576
|
-
salesDirectionsReference:
|
|
4609
|
+
salesDirectionsReference: L,
|
|
4577
4610
|
/**
|
|
4578
4611
|
* Справочник источников первичного интереса.
|
|
4579
4612
|
*/
|
|
4580
|
-
sourcePrimaryInterestReference:
|
|
4613
|
+
sourcePrimaryInterestReference: a,
|
|
4581
4614
|
/**
|
|
4582
4615
|
* Справочник складов.
|
|
4583
4616
|
*/
|
|
4584
|
-
warehousesReference:
|
|
4617
|
+
warehousesReference: I,
|
|
4585
4618
|
/**
|
|
4586
4619
|
* Справочник типов свойств.
|
|
4587
4620
|
*/
|
|
4588
|
-
propertyTypesReference:
|
|
4621
|
+
propertyTypesReference: O,
|
|
4589
4622
|
/**
|
|
4590
4623
|
* Справочник коэффициентов цен.
|
|
4591
4624
|
*/
|
|
4592
4625
|
priceCoefficientsReference: c
|
|
4593
4626
|
};
|
|
4594
|
-
}),
|
|
4627
|
+
}), Ss = oe("references", () => {
|
|
4595
4628
|
const i = C(() => {
|
|
4596
4629
|
const c = v();
|
|
4597
|
-
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(R).getChannelPrimaryInterest().then((
|
|
4598
|
-
c.channelPrimaryInterestReference =
|
|
4630
|
+
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(R).getChannelPrimaryInterest().then((h) => {
|
|
4631
|
+
c.channelPrimaryInterestReference = h;
|
|
4599
4632
|
}).catch(m)), c.channelPrimaryInterestReference;
|
|
4600
4633
|
}), r = C(() => {
|
|
4601
4634
|
const c = v();
|
|
4602
|
-
return !c.contactPositionsReference && !c.dataLoaderList.contactPositionsReference && (c.dataLoaderList.contactPositionsReference = !0, p.getInstance(R).getContactPositions().then((
|
|
4603
|
-
c.contactPositionsReference =
|
|
4635
|
+
return !c.contactPositionsReference && !c.dataLoaderList.contactPositionsReference && (c.dataLoaderList.contactPositionsReference = !0, p.getInstance(R).getContactPositions().then((h) => {
|
|
4636
|
+
c.contactPositionsReference = h;
|
|
4604
4637
|
}).catch(m)), c.contactPositionsReference;
|
|
4605
4638
|
}), e = C(() => {
|
|
4606
4639
|
const c = v();
|
|
4607
|
-
return !c.currencyReference && !c.dataLoaderList.currencyReference && (c.dataLoaderList.currencyReference = !0, p.getInstance(R).getCurrency().then((
|
|
4608
|
-
c.currencyReference =
|
|
4640
|
+
return !c.currencyReference && !c.dataLoaderList.currencyReference && (c.dataLoaderList.currencyReference = !0, p.getInstance(R).getCurrency().then((h) => {
|
|
4641
|
+
c.currencyReference = h;
|
|
4609
4642
|
}).catch(m)), c.currencyReference;
|
|
4610
4643
|
}), t = C(() => {
|
|
4611
4644
|
const c = v();
|
|
4612
|
-
return !c.opfReference && !c.dataLoaderList.opfReference && (c.dataLoaderList.opfReference = !0, p.getInstance(R).getOpf().then((
|
|
4613
|
-
c.opfReference =
|
|
4645
|
+
return !c.opfReference && !c.dataLoaderList.opfReference && (c.dataLoaderList.opfReference = !0, p.getInstance(R).getOpf().then((h) => {
|
|
4646
|
+
c.opfReference = h;
|
|
4614
4647
|
}).catch(m)), c.opfReference;
|
|
4615
4648
|
}), n = C(() => {
|
|
4616
4649
|
const c = v();
|
|
4617
|
-
return !c.orderPaymentStatusReference && !c.dataLoaderList.orderPaymentStatusReference && (c.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(R).getOrderPaymentStatuses().then((
|
|
4618
|
-
c.orderPaymentStatusReference =
|
|
4650
|
+
return !c.orderPaymentStatusReference && !c.dataLoaderList.orderPaymentStatusReference && (c.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(R).getOrderPaymentStatuses().then((h) => {
|
|
4651
|
+
c.orderPaymentStatusReference = h;
|
|
4619
4652
|
}).catch(m)), c.orderPaymentStatusReference;
|
|
4620
4653
|
}), o = C(() => {
|
|
4621
4654
|
const c = v();
|
|
4622
|
-
return !c.orderStatusReference && !c.dataLoaderList.orderStatusReference && (c.dataLoaderList.orderStatusReference = !0, p.getInstance(R).getOrderStatuses().then((
|
|
4623
|
-
c.orderStatusReference =
|
|
4655
|
+
return !c.orderStatusReference && !c.dataLoaderList.orderStatusReference && (c.dataLoaderList.orderStatusReference = !0, p.getInstance(R).getOrderStatuses().then((h) => {
|
|
4656
|
+
c.orderStatusReference = h;
|
|
4624
4657
|
}).catch(m)), c.orderStatusReference;
|
|
4625
4658
|
}), l = C(() => {
|
|
4626
4659
|
const c = v();
|
|
4627
|
-
return !c.paymentTypeReference && !c.dataLoaderList.paymentTypeReference && (c.dataLoaderList.paymentTypeReference = !0, p.getInstance(R).getPaymentTypes().then((
|
|
4628
|
-
c.paymentTypeReference =
|
|
4660
|
+
return !c.paymentTypeReference && !c.dataLoaderList.paymentTypeReference && (c.dataLoaderList.paymentTypeReference = !0, p.getInstance(R).getPaymentTypes().then((h) => {
|
|
4661
|
+
c.paymentTypeReference = h;
|
|
4629
4662
|
}).catch(m)), c.paymentTypeReference;
|
|
4630
4663
|
}), u = C(() => {
|
|
4631
4664
|
const c = v();
|
|
4632
|
-
return !c.partnerGroupReference && !c.dataLoaderList.partnerGroupReference && (c.dataLoaderList.partnerGroupReference = !0, p.getInstance(R).getPartnerGroup().then((
|
|
4633
|
-
c.partnerGroupReference =
|
|
4665
|
+
return !c.partnerGroupReference && !c.dataLoaderList.partnerGroupReference && (c.dataLoaderList.partnerGroupReference = !0, p.getInstance(R).getPartnerGroup().then((h) => {
|
|
4666
|
+
c.partnerGroupReference = h;
|
|
4634
4667
|
}).catch(m)), c.partnerGroupReference;
|
|
4635
|
-
}),
|
|
4668
|
+
}), g = C(() => {
|
|
4636
4669
|
const c = v();
|
|
4637
|
-
return !c.
|
|
4638
|
-
c.
|
|
4639
|
-
}).catch(m)), c.
|
|
4670
|
+
return !c.productFileTypeReference && !c.dataLoaderList.productFileTypeReference && (c.dataLoaderList.productFileTypeReference = !0, p.getInstance(R).getProductFileType().then((h) => {
|
|
4671
|
+
c.productFileTypeReference = h;
|
|
4672
|
+
}).catch(m)), c.productFileTypeReference;
|
|
4640
4673
|
}), y = C(() => {
|
|
4641
4674
|
const c = v();
|
|
4642
|
-
return !c.
|
|
4643
|
-
c.
|
|
4644
|
-
}).catch(m)), c.
|
|
4675
|
+
return !c.resourceTypesReference && !c.dataLoaderList.resourceTypesReference && (c.dataLoaderList.resourceTypesReference = !0, p.getInstance(R).getResourceTypes().then((h) => {
|
|
4676
|
+
c.resourceTypesReference = h;
|
|
4677
|
+
}).catch(m)), c.resourceTypesReference;
|
|
4645
4678
|
}), A = C(() => {
|
|
4646
4679
|
const c = v();
|
|
4647
|
-
return !c.
|
|
4648
|
-
c.
|
|
4680
|
+
return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, p.getInstance(R).getSalesDirections().then((h) => {
|
|
4681
|
+
c.salesDirectionsReference = h;
|
|
4682
|
+
}).catch(m)), c.salesDirectionsReference;
|
|
4683
|
+
}), S = C(() => {
|
|
4684
|
+
const c = v();
|
|
4685
|
+
return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(R).getSourcePrimaryInterest().then((h) => {
|
|
4686
|
+
c.sourcePrimaryInterestReference = h;
|
|
4649
4687
|
}).catch(m)), c.sourcePrimaryInterestReference;
|
|
4650
4688
|
}), _ = C(() => {
|
|
4651
4689
|
const c = v();
|
|
4652
|
-
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, p.getInstance(R).getDeliveryTypes().then((
|
|
4653
|
-
c.deliveryTypeReference =
|
|
4690
|
+
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, p.getInstance(R).getDeliveryTypes().then((h) => {
|
|
4691
|
+
c.deliveryTypeReference = h;
|
|
4654
4692
|
}).catch(m)), c.deliveryTypeReference;
|
|
4655
|
-
}),
|
|
4693
|
+
}), L = C(() => {
|
|
4656
4694
|
const c = v();
|
|
4657
|
-
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, p.getInstance(
|
|
4658
|
-
c.managersList =
|
|
4695
|
+
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, p.getInstance(Kr).getManagers().then((h) => {
|
|
4696
|
+
c.managersList = h;
|
|
4659
4697
|
}).catch(m)), c.managersList;
|
|
4660
|
-
}),
|
|
4698
|
+
}), a = C(() => {
|
|
4661
4699
|
const c = v();
|
|
4662
|
-
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, p.getInstance(R).getWarehouses().then((
|
|
4663
|
-
c.warehousesReference =
|
|
4700
|
+
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, p.getInstance(R).getWarehouses().then((h) => {
|
|
4701
|
+
c.warehousesReference = h;
|
|
4664
4702
|
}).catch(m)), c.warehousesReference;
|
|
4665
|
-
}),
|
|
4703
|
+
}), I = C(() => {
|
|
4666
4704
|
const c = v();
|
|
4667
|
-
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, p.getInstance(R).getPropertyTypes().then((
|
|
4668
|
-
c.propertyTypesReference =
|
|
4705
|
+
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, p.getInstance(R).getPropertyTypes().then((h) => {
|
|
4706
|
+
c.propertyTypesReference = h;
|
|
4669
4707
|
}).catch(m)), c.propertyTypesReference;
|
|
4670
|
-
}),
|
|
4708
|
+
}), O = C(() => {
|
|
4671
4709
|
const c = v();
|
|
4672
|
-
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(R).getPriceCoefficients().then((
|
|
4673
|
-
c.priceCoefficientsReference =
|
|
4710
|
+
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(R).getPriceCoefficients().then((h) => {
|
|
4711
|
+
c.priceCoefficientsReference = h;
|
|
4674
4712
|
}).catch(m)), c.priceCoefficientsReference;
|
|
4675
4713
|
});
|
|
4676
4714
|
return {
|
|
@@ -4706,18 +4744,22 @@ const v = ie("__references_private", () => {
|
|
|
4706
4744
|
* Справочник групп партнеров.
|
|
4707
4745
|
*/
|
|
4708
4746
|
partnerGroupsReference: u,
|
|
4747
|
+
/**
|
|
4748
|
+
* Справочник типов файлов продуктов/категорий.
|
|
4749
|
+
*/
|
|
4750
|
+
productFilesTypesReference: g,
|
|
4709
4751
|
/**
|
|
4710
4752
|
* Справочник типов ресурсов.
|
|
4711
4753
|
*/
|
|
4712
|
-
resourceTypesReference:
|
|
4754
|
+
resourceTypesReference: y,
|
|
4713
4755
|
/**
|
|
4714
4756
|
* Справочник направлений продаж.
|
|
4715
4757
|
*/
|
|
4716
|
-
salesDirectionsReference:
|
|
4758
|
+
salesDirectionsReference: A,
|
|
4717
4759
|
/**
|
|
4718
4760
|
* Справочник каналов первичного интереса.
|
|
4719
4761
|
*/
|
|
4720
|
-
sourcePrimaryInterestsReference:
|
|
4762
|
+
sourcePrimaryInterestsReference: S,
|
|
4721
4763
|
/**
|
|
4722
4764
|
* Справочник типов доставки.
|
|
4723
4765
|
*/
|
|
@@ -4725,21 +4767,21 @@ const v = ie("__references_private", () => {
|
|
|
4725
4767
|
/**
|
|
4726
4768
|
* Список менеджеров.
|
|
4727
4769
|
*/
|
|
4728
|
-
managersList:
|
|
4770
|
+
managersList: L,
|
|
4729
4771
|
/**
|
|
4730
4772
|
* Справочник складов.
|
|
4731
4773
|
*/
|
|
4732
|
-
warehousesReference:
|
|
4774
|
+
warehousesReference: a,
|
|
4733
4775
|
/**
|
|
4734
4776
|
* Справочник типов свойств.
|
|
4735
4777
|
*/
|
|
4736
|
-
propertyTypesReference:
|
|
4778
|
+
propertyTypesReference: I,
|
|
4737
4779
|
/**
|
|
4738
4780
|
* Справочник коэффициентов цен.
|
|
4739
4781
|
*/
|
|
4740
|
-
priceCoefficientsReference:
|
|
4782
|
+
priceCoefficientsReference: O
|
|
4741
4783
|
};
|
|
4742
|
-
}),
|
|
4784
|
+
}), Qr = oe("__user_state_private", () => {
|
|
4743
4785
|
const i = w({}), r = w(void 0);
|
|
4744
4786
|
return {
|
|
4745
4787
|
/**
|
|
@@ -4751,18 +4793,18 @@ const v = ie("__references_private", () => {
|
|
|
4751
4793
|
*/
|
|
4752
4794
|
currentUser: r
|
|
4753
4795
|
};
|
|
4754
|
-
}),
|
|
4796
|
+
}), _s = oe("user_state", () => ({
|
|
4755
4797
|
/**
|
|
4756
4798
|
* Данные о текущем пользователе.
|
|
4757
4799
|
*/
|
|
4758
4800
|
currentUser: C(() => {
|
|
4759
|
-
const r =
|
|
4760
|
-
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(
|
|
4801
|
+
const r = Qr();
|
|
4802
|
+
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(Gr).getCurrentUser().then((e) => {
|
|
4761
4803
|
r.currentUser = e;
|
|
4762
4804
|
}).catch(m).finally(m)), r.currentUser;
|
|
4763
4805
|
})
|
|
4764
4806
|
}));
|
|
4765
|
-
class
|
|
4807
|
+
class Ls extends p {
|
|
4766
4808
|
/**
|
|
4767
4809
|
* Возвращает подсказки по адресам.
|
|
4768
4810
|
*
|
|
@@ -4809,7 +4851,7 @@ class _s extends p {
|
|
|
4809
4851
|
});
|
|
4810
4852
|
}
|
|
4811
4853
|
}
|
|
4812
|
-
class
|
|
4854
|
+
class as {
|
|
4813
4855
|
/**
|
|
4814
4856
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
4815
4857
|
*
|
|
@@ -4833,125 +4875,126 @@ class Ts {
|
|
|
4833
4875
|
}
|
|
4834
4876
|
}
|
|
4835
4877
|
export {
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
|
|
4878
|
+
Ir as AnyReference,
|
|
4879
|
+
ns as AppBaseConfig,
|
|
4880
|
+
d as AppConfigProvider,
|
|
4881
|
+
Ce as BankAccount,
|
|
4882
|
+
Ae as BasePaginationProvider,
|
|
4883
|
+
X as Cart,
|
|
4884
|
+
vr as CartItem,
|
|
4885
|
+
Cr as CartItemBase,
|
|
4886
|
+
is as CartProvider,
|
|
4887
|
+
ls as CatalogProvider,
|
|
4888
|
+
xe as CatalogableItem,
|
|
4889
|
+
U as Category,
|
|
4890
|
+
Se as CategoryPricingRule,
|
|
4891
|
+
Ue as ChannelPrimaryInterest,
|
|
4892
|
+
cs as City,
|
|
4893
|
+
se as CityWithRegionAndCountry,
|
|
4894
|
+
_e as Client,
|
|
4895
|
+
Vr as ClientAdditionalData,
|
|
4896
|
+
re as ClientCategory,
|
|
4897
|
+
Ds as ClientDataProvider,
|
|
4898
|
+
ue as ClientProduct,
|
|
4899
|
+
hs as ClientProductCategoryDataProvider,
|
|
4900
|
+
gs as ClientProductDataProvider,
|
|
4901
|
+
$e as ClientShortInfo,
|
|
4902
|
+
Hr as ClientsAdditionalDataRequestTypeEnum,
|
|
4903
|
+
ws as ClientsListFilters,
|
|
4904
|
+
As as ConfiguratorProvider,
|
|
4905
|
+
ve as Contact,
|
|
4906
|
+
Lr as ContactLinks,
|
|
4907
|
+
H as ContactPerson,
|
|
4908
|
+
Wr as ContactPersonRelated,
|
|
4909
|
+
xr as ContactPosition,
|
|
4910
|
+
ge as ContactRelation,
|
|
4911
|
+
He as ContragentBase,
|
|
4912
|
+
ne as ContragentFactory,
|
|
4913
|
+
Fe as ContragentIc,
|
|
4914
|
+
Fr as ContragentPerson,
|
|
4915
|
+
Br as ContragentUlNr,
|
|
4916
|
+
Be as ContragentUlR,
|
|
4917
|
+
Ne as CostSourceEnum,
|
|
4876
4918
|
E as Country,
|
|
4877
|
-
|
|
4878
|
-
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4919
|
+
te as Currency,
|
|
4920
|
+
Ls as DataSuggestionProvider,
|
|
4921
|
+
vs as DataTablePagination,
|
|
4922
|
+
Er as DataTablePaginationRequestParams,
|
|
4923
|
+
Rs as DataTableSortRequestParams,
|
|
4924
|
+
$s as DateTimeProvider,
|
|
4925
|
+
Tr as DeletableNamedIdentity,
|
|
4926
|
+
ie as DeliveryAddress,
|
|
4885
4927
|
V as DeliveryType,
|
|
4886
|
-
|
|
4887
|
-
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4928
|
+
Rr as DeviceTypeResolutionConfig,
|
|
4929
|
+
Sr as DiscountShortInfo,
|
|
4930
|
+
as as FieldValidationResultData,
|
|
4931
|
+
je as FilterOpEnum,
|
|
4932
|
+
ke as GeoCoordinates,
|
|
4933
|
+
yr as HiddenCatalogableItem,
|
|
4934
|
+
we as HttpBaseCachedRequester,
|
|
4935
|
+
ye as HttpBaseRequester,
|
|
4936
|
+
Dr as HttpParamsConfig,
|
|
4895
4937
|
p as HttpRequester,
|
|
4896
4938
|
K as Identity,
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4939
|
+
wr as Image,
|
|
4940
|
+
pe as Manager,
|
|
4941
|
+
ee as ManagerCommon,
|
|
4942
|
+
bs as ManagerDataFactory,
|
|
4943
|
+
Kr as ManagerDataProvider,
|
|
4944
|
+
Jr as MetaTagItem,
|
|
4903
4945
|
P as NamedIdentity,
|
|
4904
|
-
|
|
4946
|
+
G as Opf,
|
|
4905
4947
|
$ as OpfEnum,
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4914
|
-
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4948
|
+
jr as Order,
|
|
4949
|
+
ze as OrderInfo,
|
|
4950
|
+
kr as OrderPaymentStatus,
|
|
4951
|
+
zr as OrderProduct,
|
|
4952
|
+
We as OrderShortInfo,
|
|
4953
|
+
Nr as OrderStatus,
|
|
4954
|
+
Cs as OrdersDataProvider,
|
|
4955
|
+
M as PartnerGroup,
|
|
4956
|
+
dr as PaymentType,
|
|
4957
|
+
os as PreferencesStorageProvider,
|
|
4958
|
+
br as PriceCoefficientEnum,
|
|
4959
|
+
_r as PriceTemplate,
|
|
4960
|
+
Q as PricingRole,
|
|
4961
|
+
ms as PricingRoleProvider,
|
|
4962
|
+
fe as PrimaryCatalogableItem,
|
|
4921
4963
|
x as Product,
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4964
|
+
us as ProductCategoryDataProvider,
|
|
4965
|
+
ps as ProductDataProvider,
|
|
4966
|
+
Or as ProductFileType,
|
|
4967
|
+
De as ProductPriceCoefficient,
|
|
4968
|
+
Mr as ProductPriceHistory,
|
|
4969
|
+
fs as PropertiesProvider,
|
|
4927
4970
|
J as Property,
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4971
|
+
Oe as PropertyType,
|
|
4972
|
+
$r as PropertyTypeEnum,
|
|
4973
|
+
F as PropertyValue,
|
|
4974
|
+
ys as RecommendationsDataProvider,
|
|
4975
|
+
Te as RecommendationsList,
|
|
4933
4976
|
f as Reference,
|
|
4934
4977
|
R as ReferenceDataProvider,
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
|
|
4943
|
-
|
|
4944
|
-
|
|
4945
|
-
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4978
|
+
Y as Region,
|
|
4979
|
+
qe as ResourceType,
|
|
4980
|
+
T as SalesDirection,
|
|
4981
|
+
Pr as SentryConfig,
|
|
4982
|
+
ae as Seo,
|
|
4983
|
+
Ts as SeoDataProvider,
|
|
4984
|
+
Ge as SourcePrimaryInterest,
|
|
4985
|
+
fr as StockCount,
|
|
4986
|
+
Pe as TypedInstanceFactory,
|
|
4987
|
+
Le as UnitsHelper,
|
|
4988
|
+
Ps as UnknownClientDataProvider,
|
|
4989
|
+
de as UpdatableNamedIdentity,
|
|
4990
|
+
qr as User,
|
|
4991
|
+
Me as UserCommonInfo,
|
|
4992
|
+
Gr as UserDataProvider,
|
|
4993
|
+
q as UserShortInfo,
|
|
4994
|
+
Ur as UserTypeEnum,
|
|
4995
|
+
Ar as VersionConfig,
|
|
4996
|
+
le as Warehouse,
|
|
4997
|
+
Ss as useReferencesStore,
|
|
4998
|
+
_s as useUserStateStore
|
|
4956
4999
|
};
|
|
4957
5000
|
//# sourceMappingURL=sc-common-lib.js.map
|