@snabcentr/common-lib 1.48.1 → 1.49.1
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 +2 -4
- package/dist/sc-common-lib.js +579 -508
- 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/price-template.d.ts.map +1 -1
- package/dist/src/catalog/classes/product.d.ts +1 -1
- package/dist/src/catalog/classes/product.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-predefined-properties.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-predefined-properties.d.ts.map +1 -1
- package/dist/src/catalog/interfaces/i-product.d.ts +1 -1
- package/dist/src/catalog/interfaces/i-product.d.ts.map +1 -1
- package/dist/src/catalog/providers/client-price-template-provider.d.ts.map +1 -1
- package/dist/src/clients/classes/clients-list-filters.d.ts +3 -3
- package/dist/src/clients/classes/clients-list-filters.d.ts.map +1 -1
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts +3 -3
- package/dist/src/clients/interfaces/i-clients-list-filters.d.ts.map +1 -1
- package/dist/src/config/classes/app-base-config.d.ts +4 -0
- package/dist/src/config/classes/app-base-config.d.ts.map +1 -1
- package/dist/src/config/classes/version-config.d.ts +1 -1
- package/dist/src/config/classes/version-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-app-base-config.d.ts +4 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-version-config.d.ts +1 -1
- package/dist/src/config/interfaces/i-version-config.d.ts.map +1 -1
- package/dist/src/contacts/classes/contact-person.d.ts.map +1 -1
- package/dist/src/data-table/classes/filter-group.d.ts +32 -0
- package/dist/src/data-table/classes/filter-group.d.ts.map +1 -0
- package/dist/src/data-table/classes/filter-item.d.ts +32 -0
- package/dist/src/data-table/classes/filter-item.d.ts.map +1 -0
- package/dist/src/data-table/classes/index.d.ts +2 -0
- package/dist/src/data-table/classes/index.d.ts.map +1 -1
- package/dist/src/data-table/interfaces/i-filter-item.d.ts +1 -1
- package/dist/src/data-table/interfaces/i-filter-item.d.ts.map +1 -1
- package/dist/src/date-time/providers/date-time-provider.d.ts +3 -8
- package/dist/src/date-time/providers/date-time-provider.d.ts.map +1 -1
- package/dist/src/http/classes/http-base-requester.d.ts.map +1 -1
- package/dist/src/orders/classes/order-info.d.ts.map +1 -1
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts +1 -2
- package/dist/src/orders/interfaces/i-orders-list-filters.d.ts.map +1 -1
- package/dist/src/pagination/providers/base-pagination-provider.d.ts.map +1 -1
- package/dist/src/references/classes/price-coefficient.d.ts +1 -2
- package/dist/src/references/classes/price-coefficient.d.ts.map +1 -1
- package/dist/src/system/interfaces/i-date-period.d.ts +3 -3
- package/dist/src/system/interfaces/i-date-period.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/sc-common-lib.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
var er = Object.defineProperty;
|
|
2
2
|
var rr = (n, r, e) => r in n ? er(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
|
|
3
3
|
var t = (n, r, e) => rr(n, typeof r != "symbol" ? r + "" : r, e);
|
|
4
|
-
import { constant as tr, isUndefined as sr, cloneDeep as ir, noop as
|
|
5
|
-
import {
|
|
4
|
+
import { constant as tr, isUndefined as sr, isString as m, cloneDeep as ir, noop as y, toLower as nr, isNil as qe, isFunction as Ue, isDate as or, isEmpty as cr, isArray as lr, map as ie, forEach as pr } from "lodash-es";
|
|
5
|
+
import { parseISO as f, format as z, addSeconds as ur, isAfter as hr, startOfToday as Ge, addBusinessDays as gr, endOfTomorrow as mr, startOfTomorrow as fr, endOfYesterday as yr, startOfYesterday as Cr, endOfToday as wr, endOfDay as vr, startOfDay as Pr } from "date-fns";
|
|
6
6
|
import Rr from "axios";
|
|
7
|
-
import { objectToSnake as
|
|
8
|
-
import { defineStore as
|
|
9
|
-
import { ref as
|
|
10
|
-
class
|
|
7
|
+
import { objectToSnake as Le, objectToCamel as Dr } from "ts-case-convert";
|
|
8
|
+
import { defineStore as he } from "pinia";
|
|
9
|
+
import { ref as w, computed as P } from "vue";
|
|
10
|
+
class H {
|
|
11
11
|
/**
|
|
12
12
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
13
13
|
*
|
|
@@ -31,7 +31,7 @@ class F {
|
|
|
31
31
|
return this.id === -1;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class
|
|
34
|
+
class A extends H {
|
|
35
35
|
/**
|
|
36
36
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
37
37
|
*
|
|
@@ -46,7 +46,7 @@ class a extends F {
|
|
|
46
46
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class Me extends A {
|
|
50
50
|
/**
|
|
51
51
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
52
52
|
*
|
|
@@ -69,7 +69,7 @@ class Ue extends a {
|
|
|
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 Re extends Me {
|
|
73
73
|
/**
|
|
74
74
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
75
75
|
*
|
|
@@ -84,7 +84,7 @@ class De extends Ue {
|
|
|
84
84
|
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
|
-
class
|
|
87
|
+
class re extends Re {
|
|
88
88
|
/**
|
|
89
89
|
* Инициализирует экземпляр класса {@link BaseCategory}.
|
|
90
90
|
*
|
|
@@ -107,8 +107,8 @@ class te extends De {
|
|
|
107
107
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category";
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
class
|
|
110
|
+
var He = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(He || {});
|
|
111
|
+
class C extends A {
|
|
112
112
|
/**
|
|
113
113
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
114
114
|
*
|
|
@@ -127,15 +127,15 @@ class f extends a {
|
|
|
127
127
|
this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
130
|
-
class
|
|
130
|
+
class ge extends C {
|
|
131
131
|
/**
|
|
132
132
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
133
133
|
*/
|
|
134
134
|
static getRetailPriceCoefficient() {
|
|
135
|
-
return { id: -2, slug:
|
|
135
|
+
return { id: -2, slug: He.Retail, name: "Розничная цена", guid: "", isNewRec: tr(!0) };
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class
|
|
138
|
+
class be {
|
|
139
139
|
/**
|
|
140
140
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
141
141
|
*
|
|
@@ -162,10 +162,10 @@ class Se {
|
|
|
162
162
|
* Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
|
|
163
163
|
*/
|
|
164
164
|
t(this, "readOnly");
|
|
165
|
-
this.coefficient = new
|
|
165
|
+
this.coefficient = new ge(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;
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
|
-
class
|
|
168
|
+
class Fe {
|
|
169
169
|
/**
|
|
170
170
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
171
171
|
*
|
|
@@ -183,9 +183,9 @@ class He {
|
|
|
183
183
|
this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
class
|
|
186
|
+
class E extends C {
|
|
187
187
|
}
|
|
188
|
-
class
|
|
188
|
+
class me extends C {
|
|
189
189
|
/**
|
|
190
190
|
* Инициализирует экземпляр класса {@link Warehouse}.
|
|
191
191
|
*
|
|
@@ -214,7 +214,7 @@ class fe extends f {
|
|
|
214
214
|
* Координаты склада.
|
|
215
215
|
*/
|
|
216
216
|
t(this, "coordinates");
|
|
217
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new
|
|
217
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new E(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Fe(e == null ? void 0 : e.coordinates);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
class $r {
|
|
@@ -232,7 +232,7 @@ class $r {
|
|
|
232
232
|
* Количество остатков товара на складе.
|
|
233
233
|
*/
|
|
234
234
|
t(this, "count");
|
|
235
|
-
this.warehouse = new
|
|
235
|
+
this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
238
|
const W = class W {
|
|
@@ -271,8 +271,8 @@ const W = class W {
|
|
|
271
271
|
* Конфигурация приложения.
|
|
272
272
|
*/
|
|
273
273
|
t(W, "config");
|
|
274
|
-
let
|
|
275
|
-
class
|
|
274
|
+
let x = W;
|
|
275
|
+
class Ar extends Me {
|
|
276
276
|
/**
|
|
277
277
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
278
278
|
*
|
|
@@ -287,7 +287,7 @@ class Dr extends Ue {
|
|
|
287
287
|
this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
class
|
|
290
|
+
class Tr {
|
|
291
291
|
/**
|
|
292
292
|
* Инициализирует экземпляр класса {@link Image}.
|
|
293
293
|
*
|
|
@@ -310,7 +310,7 @@ class Ar {
|
|
|
310
310
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
class
|
|
313
|
+
class S extends Ar {
|
|
314
314
|
/**
|
|
315
315
|
* Инициализирует экземпляр класса {@link Product}.
|
|
316
316
|
*
|
|
@@ -383,19 +383,19 @@ class T extends Dr {
|
|
|
383
383
|
* Список коэффициентов цен на продукт.
|
|
384
384
|
*/
|
|
385
385
|
t(this, "priceCoefficients");
|
|
386
|
-
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 = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((g) => new $r(g))) ?? [], this.type = "product";
|
|
386
|
+
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = m(e == null ? void 0 : e.costDate) ? f(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((g) => new $r(g))) ?? [], this.type = "product";
|
|
387
387
|
const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
388
|
-
s && (this.category = new
|
|
388
|
+
s && (this.category = new Re({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new Re(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new Tr(g, x.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((g) => new be(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
389
389
|
}
|
|
390
390
|
/**
|
|
391
391
|
* Возвращает признак, что это измеряемый товар.
|
|
392
392
|
*/
|
|
393
393
|
getIsMeasurable() {
|
|
394
|
-
const e =
|
|
394
|
+
const e = x.getConfig().products.units;
|
|
395
395
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
class
|
|
398
|
+
class br extends H {
|
|
399
399
|
/**
|
|
400
400
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
401
401
|
*
|
|
@@ -447,10 +447,10 @@ class Tr extends F {
|
|
|
447
447
|
* Признак того, что позиция является дополнительной продажей.
|
|
448
448
|
*/
|
|
449
449
|
t(this, "isAdditionalSale");
|
|
450
|
-
this.product = new
|
|
450
|
+
this.product = new S(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new re(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class ar extends br {
|
|
454
454
|
/**
|
|
455
455
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
456
456
|
*
|
|
@@ -500,7 +500,7 @@ class br extends Tr {
|
|
|
500
500
|
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;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
class
|
|
503
|
+
class se {
|
|
504
504
|
/**
|
|
505
505
|
* Инициализирует экземпляр класса {@link Cart}.
|
|
506
506
|
*
|
|
@@ -519,7 +519,7 @@ class ie {
|
|
|
519
519
|
* Список итоговых сумм по направлениям продаж.
|
|
520
520
|
*/
|
|
521
521
|
t(this, "directionsSum");
|
|
522
|
-
this.items = r.items.map((e) => new
|
|
522
|
+
this.items = r.items.map((e) => new ar(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
class _r {
|
|
@@ -611,7 +611,7 @@ class Lr {
|
|
|
611
611
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
class
|
|
614
|
+
class xr {
|
|
615
615
|
/**
|
|
616
616
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
617
617
|
*
|
|
@@ -630,7 +630,7 @@ class dr {
|
|
|
630
630
|
* Текущая версия приложения.
|
|
631
631
|
*/
|
|
632
632
|
t(this, "version");
|
|
633
|
-
this.date = (r == null ? void 0 : r.date) ??
|
|
633
|
+
this.date = m(r == null ? void 0 : r.date) ? f(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
|
|
634
634
|
}
|
|
635
635
|
}
|
|
636
636
|
class ht {
|
|
@@ -676,6 +676,10 @@ class ht {
|
|
|
676
676
|
* Данные о текущем выпуске приложения.
|
|
677
677
|
*/
|
|
678
678
|
t(this, "version");
|
|
679
|
+
/**
|
|
680
|
+
* Формат даты в API.
|
|
681
|
+
*/
|
|
682
|
+
t(this, "apiDateFormat");
|
|
679
683
|
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 Sr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new _r(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
|
|
680
684
|
units: {
|
|
681
685
|
linear: ["пог.м.", "м."],
|
|
@@ -685,10 +689,10 @@ class ht {
|
|
|
685
689
|
}, this.sentry = new Lr({
|
|
686
690
|
environment: this.environment,
|
|
687
691
|
...r == null ? void 0 : r.sentry
|
|
688
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
692
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new xr(r == null ? void 0 : r.version), this.apiDateFormat = (r == null ? void 0 : r.apiDateFormat) ?? "yyyy-MM-dd HH:mm:ss";
|
|
689
693
|
}
|
|
690
694
|
}
|
|
691
|
-
class
|
|
695
|
+
class ae {
|
|
692
696
|
/**
|
|
693
697
|
* Инициализирует экземпляр указанного класса.
|
|
694
698
|
*
|
|
@@ -707,7 +711,7 @@ class Le {
|
|
|
707
711
|
return new r(e);
|
|
708
712
|
}
|
|
709
713
|
}
|
|
710
|
-
const
|
|
714
|
+
const L = class L {
|
|
711
715
|
/**
|
|
712
716
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
713
717
|
*
|
|
@@ -726,24 +730,24 @@ const b = class b {
|
|
|
726
730
|
* - error Данные об ошибке.
|
|
727
731
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
728
732
|
*/
|
|
729
|
-
t(this, "defaultInstanceNotificationErrorResponseHandler",
|
|
730
|
-
const s =
|
|
731
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
733
|
+
t(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
734
|
+
const s = x.getConfig().version;
|
|
735
|
+
this.defaultInstanceNotificationErrorResponseHandler = L.baseDefaultNotificationErrorResponseHandler, this.httpClient = Rr.create({
|
|
732
736
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
733
737
|
baseURL: r,
|
|
734
738
|
headers: {
|
|
735
|
-
"APP-VERSION": `${s.name} (${s.version}, ${s.date})`,
|
|
739
|
+
"APP-VERSION": `${s.name} (${s.version}, ${z(s.date, "dd.MM.yyyy")})`,
|
|
736
740
|
Accept: "application/json",
|
|
737
741
|
"Content-Type": "application/json",
|
|
738
742
|
...e
|
|
739
743
|
}
|
|
740
744
|
}), this.httpClient.interceptors.request.use(
|
|
741
|
-
(i) => (i.method && (i.method === "get" && i.params && (i.params =
|
|
745
|
+
(i) => (i.method && (i.method === "get" && i.params && (i.params = Le(i.params)), ["put", "patch", "post"].includes(nr(i.method)) && i.data && (i.data = Le(i.data))), i),
|
|
742
746
|
(i) => Promise.reject(i)
|
|
743
747
|
), this.httpClient.interceptors.response.use(
|
|
744
|
-
(i) => (i.data && (i.data =
|
|
748
|
+
(i) => (i.data && (i.data = Dr(i.data)), i),
|
|
745
749
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
746
|
-
(i) =>
|
|
750
|
+
(i) => L.convertHttpErrorResponse(i)
|
|
747
751
|
);
|
|
748
752
|
}
|
|
749
753
|
/**
|
|
@@ -752,7 +756,7 @@ const b = class b {
|
|
|
752
756
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
753
757
|
*/
|
|
754
758
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
755
|
-
|
|
759
|
+
L.baseDefaultNotificationErrorResponseHandler = r;
|
|
756
760
|
}
|
|
757
761
|
/**
|
|
758
762
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -760,7 +764,7 @@ const b = class b {
|
|
|
760
764
|
* @param type Тип данных, которыми оперирует метод.
|
|
761
765
|
*/
|
|
762
766
|
static getInstance(r) {
|
|
763
|
-
return Object.prototype.hasOwnProperty.call(
|
|
767
|
+
return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = ae.simpleInstanceInitializer(r)), L.instances[r.name];
|
|
764
768
|
}
|
|
765
769
|
/**
|
|
766
770
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -855,16 +859,16 @@ const b = class b {
|
|
|
855
859
|
* Экземпляр объекта текущего класса.
|
|
856
860
|
*/
|
|
857
861
|
// eslint-disable-next-line no-use-before-define
|
|
858
|
-
t(
|
|
862
|
+
t(L, "instances", {}), /**
|
|
859
863
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
860
864
|
*
|
|
861
865
|
* Параметры:
|
|
862
866
|
* - error Данные об ошибке.
|
|
863
867
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
864
868
|
*/
|
|
865
|
-
t(
|
|
866
|
-
let
|
|
867
|
-
const j = class j extends
|
|
869
|
+
t(L, "baseDefaultNotificationErrorResponseHandler", y);
|
|
870
|
+
let De = L;
|
|
871
|
+
const j = class j extends De {
|
|
868
872
|
/**
|
|
869
873
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
870
874
|
*
|
|
@@ -877,7 +881,7 @@ const j = class j extends Ae {
|
|
|
877
881
|
* Время кэширования данных ответов на запросы (секунд).
|
|
878
882
|
*/
|
|
879
883
|
t(this, "responseDataCacheTimeout");
|
|
880
|
-
const i =
|
|
884
|
+
const i = x.getConfig();
|
|
881
885
|
this.responseDataCacheTimeout = i.http.responseDataCacheTimeout;
|
|
882
886
|
}
|
|
883
887
|
/**
|
|
@@ -915,7 +919,7 @@ const j = class j extends Ae {
|
|
|
915
919
|
getTypedDataArrayRequester(e, s, i = !1) {
|
|
916
920
|
const o = i ? j.getCachedResponse(s) : void 0;
|
|
917
921
|
return o ? Promise.resolve(o) : this.get(s).then((l) => {
|
|
918
|
-
const p = l.map((g) =>
|
|
922
|
+
const p = l.map((g) => ae.instanceInitializer(e, g));
|
|
919
923
|
return i && p && this.cacheResponse(s, p), p;
|
|
920
924
|
});
|
|
921
925
|
}
|
|
@@ -924,14 +928,14 @@ const j = class j extends Ae {
|
|
|
924
928
|
* Кэш результатов запросов.
|
|
925
929
|
*/
|
|
926
930
|
t(j, "responseDataCache", /* @__PURE__ */ new Map());
|
|
927
|
-
let
|
|
928
|
-
class u extends
|
|
931
|
+
let $e = j;
|
|
932
|
+
class u extends $e {
|
|
929
933
|
/**
|
|
930
934
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
931
935
|
*/
|
|
932
936
|
constructor() {
|
|
933
937
|
var s, i;
|
|
934
|
-
const r =
|
|
938
|
+
const r = x.getConfig(), e = {};
|
|
935
939
|
(s = r.devMode) != null && s.authBearerToken && (e.Authorization = `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
|
|
936
940
|
}
|
|
937
941
|
}
|
|
@@ -944,7 +948,7 @@ class gt extends u {
|
|
|
944
948
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_get
|
|
945
949
|
*/
|
|
946
950
|
getCart(r) {
|
|
947
|
-
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new
|
|
951
|
+
return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new se(e.data));
|
|
948
952
|
}
|
|
949
953
|
/**
|
|
950
954
|
* Удаляет всё содержимое корзины.
|
|
@@ -982,7 +986,7 @@ class gt extends u {
|
|
|
982
986
|
isAdditionalSale: e.isAdditionalSale,
|
|
983
987
|
...e.configuratorParams
|
|
984
988
|
},
|
|
985
|
-
(i) => new
|
|
989
|
+
(i) => new se(i.data),
|
|
986
990
|
s
|
|
987
991
|
);
|
|
988
992
|
}
|
|
@@ -1012,7 +1016,7 @@ class gt extends u {
|
|
|
1012
1016
|
isAdditionalSale: e.isAdditionalSale,
|
|
1013
1017
|
...e.configuratorParams
|
|
1014
1018
|
},
|
|
1015
|
-
(i) => new
|
|
1019
|
+
(i) => new se(i.data),
|
|
1016
1020
|
s
|
|
1017
1021
|
);
|
|
1018
1022
|
}
|
|
@@ -1035,11 +1039,11 @@ class gt extends u {
|
|
|
1035
1039
|
* @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
|
|
1036
1040
|
*/
|
|
1037
1041
|
addCartItemFromCSV(r) {
|
|
1038
|
-
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new
|
|
1042
|
+
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new se(e.data));
|
|
1039
1043
|
}
|
|
1040
1044
|
}
|
|
1041
|
-
var
|
|
1042
|
-
class
|
|
1045
|
+
var Ir = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Ir || {}), _e = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(_e || {}), kr = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(kr || {});
|
|
1046
|
+
class d extends re {
|
|
1043
1047
|
/**
|
|
1044
1048
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1045
1049
|
*
|
|
@@ -1056,10 +1060,10 @@ class q extends te {
|
|
|
1056
1060
|
* Список продуктов категории.
|
|
1057
1061
|
*/
|
|
1058
1062
|
t(this, "products");
|
|
1059
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1063
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new d(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new S(o));
|
|
1060
1064
|
}
|
|
1061
1065
|
}
|
|
1062
|
-
class
|
|
1066
|
+
class ze extends A {
|
|
1063
1067
|
/**
|
|
1064
1068
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1065
1069
|
*
|
|
@@ -1071,10 +1075,10 @@ class Fe extends a {
|
|
|
1071
1075
|
* Дата и время последнего изменения.
|
|
1072
1076
|
*/
|
|
1073
1077
|
t(this, "updatedAt");
|
|
1074
|
-
this.updatedAt = e != null && e.updatedAt ?
|
|
1078
|
+
this.updatedAt = e != null && e.updatedAt ? m(e.updatedAt) ? f(e.updatedAt) : e.updatedAt : void 0;
|
|
1075
1079
|
}
|
|
1076
1080
|
}
|
|
1077
|
-
class
|
|
1081
|
+
class Nr extends ze {
|
|
1078
1082
|
/**
|
|
1079
1083
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1080
1084
|
*
|
|
@@ -1086,7 +1090,7 @@ class kr extends Fe {
|
|
|
1086
1090
|
* Дата и время последнего удаления.
|
|
1087
1091
|
*/
|
|
1088
1092
|
t(this, "deletedAt");
|
|
1089
|
-
this.deletedAt = e != null && e.deletedAt ?
|
|
1093
|
+
this.deletedAt = e != null && e.deletedAt ? m(e.deletedAt) ? f(e.deletedAt) : e.deletedAt : void 0;
|
|
1090
1094
|
}
|
|
1091
1095
|
}
|
|
1092
1096
|
class mt {
|
|
@@ -1100,7 +1104,7 @@ class mt {
|
|
|
1100
1104
|
if (e)
|
|
1101
1105
|
try {
|
|
1102
1106
|
const s = JSON.parse(e);
|
|
1103
|
-
if (hr(
|
|
1107
|
+
if (hr(f(s.availableFor) || Ge(), /* @__PURE__ */ new Date()))
|
|
1104
1108
|
return s.data || {};
|
|
1105
1109
|
} catch {
|
|
1106
1110
|
localStorage.removeItem(r);
|
|
@@ -1123,7 +1127,7 @@ class mt {
|
|
|
1123
1127
|
);
|
|
1124
1128
|
}
|
|
1125
1129
|
}
|
|
1126
|
-
class
|
|
1130
|
+
class q extends A {
|
|
1127
1131
|
/**
|
|
1128
1132
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1129
1133
|
*
|
|
@@ -1138,7 +1142,7 @@ class M extends a {
|
|
|
1138
1142
|
this.type = e == null ? void 0 : e.type;
|
|
1139
1143
|
}
|
|
1140
1144
|
}
|
|
1141
|
-
class
|
|
1145
|
+
class Or extends A {
|
|
1142
1146
|
/**
|
|
1143
1147
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1144
1148
|
*
|
|
@@ -1174,10 +1178,10 @@ class Nr extends a {
|
|
|
1174
1178
|
* Дата и время удаления.
|
|
1175
1179
|
*/
|
|
1176
1180
|
t(this, "deletedAt");
|
|
1177
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ?
|
|
1181
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ? m(e.publishedAt) ? f(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 ? m(e.deletedAt) ? f(e.deletedAt) : e.deletedAt : void 0;
|
|
1178
1182
|
}
|
|
1179
1183
|
}
|
|
1180
|
-
class B extends
|
|
1184
|
+
class B extends ze {
|
|
1181
1185
|
/**
|
|
1182
1186
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1183
1187
|
*
|
|
@@ -1193,10 +1197,10 @@ class B extends Fe {
|
|
|
1193
1197
|
* Дата и время создания шаблона.
|
|
1194
1198
|
*/
|
|
1195
1199
|
t(this, "createdAt");
|
|
1196
|
-
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = e
|
|
1200
|
+
this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
|
|
1197
1201
|
}
|
|
1198
1202
|
}
|
|
1199
|
-
class
|
|
1203
|
+
class K extends S {
|
|
1200
1204
|
/**
|
|
1201
1205
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1202
1206
|
*
|
|
@@ -1232,10 +1236,10 @@ class J extends T {
|
|
|
1232
1236
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1233
1237
|
*/
|
|
1234
1238
|
t(this, "isFavorite");
|
|
1235
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1239
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? _e.Product, this.discount = e != null && e.discount ? new Or(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new B(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;
|
|
1236
1240
|
}
|
|
1237
1241
|
}
|
|
1238
|
-
class
|
|
1242
|
+
class dr {
|
|
1239
1243
|
/**
|
|
1240
1244
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1241
1245
|
*
|
|
@@ -1253,9 +1257,9 @@ class Or {
|
|
|
1253
1257
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1254
1258
|
}
|
|
1255
1259
|
}
|
|
1256
|
-
class
|
|
1260
|
+
class I extends C {
|
|
1257
1261
|
}
|
|
1258
|
-
class
|
|
1262
|
+
class ne extends A {
|
|
1259
1263
|
/**
|
|
1260
1264
|
* Инициализирует экземпляр класса {@link ManagerCommon}.
|
|
1261
1265
|
*
|
|
@@ -1266,7 +1270,7 @@ class oe extends a {
|
|
|
1266
1270
|
/**
|
|
1267
1271
|
* Направление продаж.
|
|
1268
1272
|
*/
|
|
1269
|
-
t(this, "salesDirection", new
|
|
1273
|
+
t(this, "salesDirection", new I());
|
|
1270
1274
|
/**
|
|
1271
1275
|
* URI путь к фотографии пользователя.
|
|
1272
1276
|
*/
|
|
@@ -1279,10 +1283,10 @@ class oe extends a {
|
|
|
1279
1283
|
* Признак того, что менеджер является основным для клиента.
|
|
1280
1284
|
*/
|
|
1281
1285
|
t(this, "isDefault");
|
|
1282
|
-
e && (this.salesDirection = new
|
|
1286
|
+
e && (this.salesDirection = new I(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new dr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1283
1287
|
}
|
|
1284
1288
|
}
|
|
1285
|
-
class
|
|
1289
|
+
class fe extends ne {
|
|
1286
1290
|
/**
|
|
1287
1291
|
* Инициализирует экземпляр класса {@link Manager}.
|
|
1288
1292
|
*
|
|
@@ -1313,7 +1317,7 @@ class ye extends oe {
|
|
|
1313
1317
|
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;
|
|
1314
1318
|
}
|
|
1315
1319
|
}
|
|
1316
|
-
class qr extends
|
|
1320
|
+
class qr extends re {
|
|
1317
1321
|
/**
|
|
1318
1322
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1319
1323
|
*
|
|
@@ -1341,10 +1345,10 @@ class qr extends te {
|
|
|
1341
1345
|
* Данные о менеджере за которым закреплена категория.
|
|
1342
1346
|
*/
|
|
1343
1347
|
t(this, "manager");
|
|
1344
|
-
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
|
|
1348
|
+
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 fe(e.manager) : void 0;
|
|
1345
1349
|
}
|
|
1346
1350
|
}
|
|
1347
|
-
class
|
|
1351
|
+
class oe extends qr {
|
|
1348
1352
|
/**
|
|
1349
1353
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1350
1354
|
*
|
|
@@ -1361,10 +1365,10 @@ class ce extends qr {
|
|
|
1361
1365
|
* Список продуктов категории.
|
|
1362
1366
|
*/
|
|
1363
1367
|
t(this, "products");
|
|
1364
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1368
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new oe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
|
|
1365
1369
|
}
|
|
1366
1370
|
}
|
|
1367
|
-
class
|
|
1371
|
+
class Be {
|
|
1368
1372
|
/**
|
|
1369
1373
|
* Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
|
|
1370
1374
|
*
|
|
@@ -1379,10 +1383,10 @@ class ze {
|
|
|
1379
1383
|
* Процент, который прибавляется к значению выбранного коэффициента.
|
|
1380
1384
|
*/
|
|
1381
1385
|
t(this, "increasePercent");
|
|
1382
|
-
this.coefficient = (r == null ? void 0 : r.coefficient) && new
|
|
1386
|
+
this.coefficient = (r == null ? void 0 : r.coefficient) && new ge(r.coefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
|
|
1383
1387
|
}
|
|
1384
1388
|
}
|
|
1385
|
-
class
|
|
1389
|
+
class Ce extends Be {
|
|
1386
1390
|
/**
|
|
1387
1391
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1388
1392
|
*
|
|
@@ -1394,12 +1398,12 @@ class ve extends ze {
|
|
|
1394
1398
|
* Базовые данные о продукте.
|
|
1395
1399
|
*/
|
|
1396
1400
|
t(this, "productCategory");
|
|
1397
|
-
this.productCategory = new
|
|
1401
|
+
this.productCategory = new re(e == null ? void 0 : e.productCategory);
|
|
1398
1402
|
}
|
|
1399
1403
|
}
|
|
1400
|
-
class
|
|
1404
|
+
class J extends C {
|
|
1401
1405
|
}
|
|
1402
|
-
class
|
|
1406
|
+
class Z extends C {
|
|
1403
1407
|
/**
|
|
1404
1408
|
* Инициализирует экземпляр класса {@link Region}.
|
|
1405
1409
|
*
|
|
@@ -1410,11 +1414,11 @@ class re extends f {
|
|
|
1410
1414
|
/**
|
|
1411
1415
|
* Данные о стране, в которой расположен регион.
|
|
1412
1416
|
*/
|
|
1413
|
-
t(this, "country", new
|
|
1414
|
-
e && (this.country = new
|
|
1417
|
+
t(this, "country", new J());
|
|
1418
|
+
e && (this.country = new J(e.country));
|
|
1415
1419
|
}
|
|
1416
1420
|
}
|
|
1417
|
-
class
|
|
1421
|
+
class ce extends C {
|
|
1418
1422
|
/**
|
|
1419
1423
|
* Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
|
|
1420
1424
|
*
|
|
@@ -1425,11 +1429,11 @@ class le extends f {
|
|
|
1425
1429
|
/**
|
|
1426
1430
|
* Данные о регионе, в котором расположен город.
|
|
1427
1431
|
*/
|
|
1428
|
-
t(this, "region", new
|
|
1429
|
-
e && (this.region = new
|
|
1432
|
+
t(this, "region", new Z());
|
|
1433
|
+
e && (this.region = new Z(e.region));
|
|
1430
1434
|
}
|
|
1431
1435
|
}
|
|
1432
|
-
class
|
|
1436
|
+
class We extends A {
|
|
1433
1437
|
/**
|
|
1434
1438
|
* Инициализирует экземпляр класса {@link UserCommonInfo}.
|
|
1435
1439
|
*
|
|
@@ -1465,10 +1469,10 @@ class Be extends a {
|
|
|
1465
1469
|
* Признак активности учетной записи пользователя.
|
|
1466
1470
|
*/
|
|
1467
1471
|
t(this, "isActive");
|
|
1468
|
-
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
|
|
1472
|
+
this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new I(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
|
|
1469
1473
|
}
|
|
1470
1474
|
}
|
|
1471
|
-
class
|
|
1475
|
+
class te extends We {
|
|
1472
1476
|
/**
|
|
1473
1477
|
* Инициализирует экземпляр класса {@link Client}.
|
|
1474
1478
|
*
|
|
@@ -1510,10 +1514,10 @@ class se extends Be {
|
|
|
1510
1514
|
* Список менеджеров клиента.
|
|
1511
1515
|
*/
|
|
1512
1516
|
t(this, "managers");
|
|
1513
|
-
this.salesDirection = new
|
|
1517
|
+
this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new ce(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
|
|
1514
1518
|
}
|
|
1515
1519
|
}
|
|
1516
|
-
class
|
|
1520
|
+
class Q extends H {
|
|
1517
1521
|
/**
|
|
1518
1522
|
* Инициализирует новый экземпляр класса.
|
|
1519
1523
|
*
|
|
@@ -1537,10 +1541,10 @@ class X extends F {
|
|
|
1537
1541
|
* Данные шаблона прайс-листа.
|
|
1538
1542
|
*/
|
|
1539
1543
|
t(this, "priceTemplate");
|
|
1540
|
-
this.startAt =
|
|
1544
|
+
this.startAt = m(e == null ? void 0 : e.startAt) ? f(e.startAt) : (e == null ? void 0 : e.startAt) ?? /* @__PURE__ */ new Date(), this.endAt = m(e == null ? void 0 : e.endAt) ? f(e.endAt) : (e == null ? void 0 : e.endAt) ?? /* @__PURE__ */ new Date(), this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new B(e == null ? void 0 : e.priceTemplate);
|
|
1541
1545
|
}
|
|
1542
1546
|
}
|
|
1543
|
-
class
|
|
1547
|
+
class we extends Be {
|
|
1544
1548
|
/**
|
|
1545
1549
|
* Инициализирует экземпляр класса {@link PriceTemplateProduct}.
|
|
1546
1550
|
*
|
|
@@ -1552,12 +1556,12 @@ class Pe extends ze {
|
|
|
1552
1556
|
* Базовые данные о продукте.
|
|
1553
1557
|
*/
|
|
1554
1558
|
t(this, "product");
|
|
1555
|
-
this.product = new
|
|
1559
|
+
this.product = new S(e == null ? void 0 : e.product);
|
|
1556
1560
|
}
|
|
1557
1561
|
}
|
|
1558
|
-
class
|
|
1562
|
+
class je extends C {
|
|
1559
1563
|
}
|
|
1560
|
-
class
|
|
1564
|
+
class Y extends A {
|
|
1561
1565
|
/**
|
|
1562
1566
|
* Инициализирует экземпляр класса {@link Property}.
|
|
1563
1567
|
*
|
|
@@ -1577,10 +1581,10 @@ class Z extends a {
|
|
|
1577
1581
|
* Дополнительные метаданные свойства.
|
|
1578
1582
|
*/
|
|
1579
1583
|
t(this, "metadata");
|
|
1580
|
-
this.type = new
|
|
1584
|
+
this.type = new je(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1581
1585
|
}
|
|
1582
1586
|
}
|
|
1583
|
-
class
|
|
1587
|
+
class F {
|
|
1584
1588
|
/**
|
|
1585
1589
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1586
1590
|
*
|
|
@@ -1596,18 +1600,18 @@ class z {
|
|
|
1596
1600
|
* Может быть строкой, числом, boolean, диапазоном или JSON объектом.
|
|
1597
1601
|
*/
|
|
1598
1602
|
t(this, "value");
|
|
1599
|
-
this.property = new
|
|
1603
|
+
this.property = new Y(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1600
1604
|
}
|
|
1601
1605
|
}
|
|
1602
|
-
class
|
|
1606
|
+
class Ur extends C {
|
|
1603
1607
|
}
|
|
1604
|
-
class
|
|
1608
|
+
class Ve extends C {
|
|
1605
1609
|
}
|
|
1606
|
-
class ft extends
|
|
1610
|
+
class ft extends C {
|
|
1607
1611
|
}
|
|
1608
|
-
class
|
|
1612
|
+
class Gr extends C {
|
|
1609
1613
|
}
|
|
1610
|
-
class
|
|
1614
|
+
class le extends A {
|
|
1611
1615
|
/**
|
|
1612
1616
|
* Инициализирует экземпляр класса {@link Currency}.
|
|
1613
1617
|
*
|
|
@@ -1626,8 +1630,8 @@ class pe extends a {
|
|
|
1626
1630
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
1627
1631
|
}
|
|
1628
1632
|
}
|
|
1629
|
-
var
|
|
1630
|
-
class U extends
|
|
1633
|
+
var _ = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(_ || {});
|
|
1634
|
+
class U extends C {
|
|
1631
1635
|
/**
|
|
1632
1636
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
1633
1637
|
*/
|
|
@@ -1635,26 +1639,26 @@ class U extends f {
|
|
|
1635
1639
|
return new U({
|
|
1636
1640
|
id: 1,
|
|
1637
1641
|
guid: "",
|
|
1638
|
-
slug:
|
|
1642
|
+
slug: _.Person,
|
|
1639
1643
|
name: ""
|
|
1640
1644
|
});
|
|
1641
1645
|
}
|
|
1642
1646
|
}
|
|
1643
|
-
class
|
|
1647
|
+
class Mr extends C {
|
|
1644
1648
|
}
|
|
1645
|
-
class Hr extends
|
|
1649
|
+
class Hr extends C {
|
|
1646
1650
|
}
|
|
1647
|
-
class G extends
|
|
1651
|
+
class G extends C {
|
|
1648
1652
|
}
|
|
1649
|
-
class Fr extends
|
|
1653
|
+
class Fr extends C {
|
|
1650
1654
|
}
|
|
1651
|
-
class zr extends
|
|
1655
|
+
class zr extends C {
|
|
1652
1656
|
}
|
|
1653
|
-
class
|
|
1657
|
+
class Ee extends C {
|
|
1654
1658
|
}
|
|
1655
|
-
class
|
|
1659
|
+
class Ke extends C {
|
|
1656
1660
|
}
|
|
1657
|
-
class
|
|
1661
|
+
class D extends u {
|
|
1658
1662
|
/**
|
|
1659
1663
|
* Возвращает {@link Promise} для получения данных указанного справочника.
|
|
1660
1664
|
*
|
|
@@ -1663,26 +1667,26 @@ class R extends u {
|
|
|
1663
1667
|
* и использовать в случае аналогичных запросов.
|
|
1664
1668
|
*/
|
|
1665
1669
|
getReference(r, e = !1) {
|
|
1666
|
-
return this.getTypedDataArrayRequester(
|
|
1670
|
+
return this.getTypedDataArrayRequester(Ur, `/internal/references/${r}`, e);
|
|
1667
1671
|
}
|
|
1668
1672
|
/**
|
|
1669
1673
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
1670
1674
|
* первичного интереса.
|
|
1671
1675
|
*/
|
|
1672
1676
|
getChannelPrimaryInterest() {
|
|
1673
|
-
return this.getTypedDataArrayRequester(
|
|
1677
|
+
return this.getTypedDataArrayRequester(Ve, "/internal/references/channel-primary-interest", !0);
|
|
1674
1678
|
}
|
|
1675
1679
|
/**
|
|
1676
1680
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1677
1681
|
*/
|
|
1678
1682
|
getContactPositions() {
|
|
1679
|
-
return this.getTypedDataArrayRequester(
|
|
1683
|
+
return this.getTypedDataArrayRequester(Gr, "/internal/references/contact-position", !0);
|
|
1680
1684
|
}
|
|
1681
1685
|
/**
|
|
1682
1686
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
1683
1687
|
*/
|
|
1684
1688
|
getCurrency() {
|
|
1685
|
-
return this.getTypedDataArrayRequester(
|
|
1689
|
+
return this.getTypedDataArrayRequester(le, "/public/references/currency", !0);
|
|
1686
1690
|
}
|
|
1687
1691
|
/**
|
|
1688
1692
|
* Возвращает {@link Promise} для получения справочника данных
|
|
@@ -1701,7 +1705,7 @@ class R extends u {
|
|
|
1701
1705
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1702
1706
|
*/
|
|
1703
1707
|
getOrderPaymentStatuses() {
|
|
1704
|
-
return this.getTypedDataArrayRequester(
|
|
1708
|
+
return this.getTypedDataArrayRequester(Mr, "/public/references/order-payment-status", !0);
|
|
1705
1709
|
}
|
|
1706
1710
|
/**
|
|
1707
1711
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
@@ -1719,19 +1723,19 @@ class R extends u {
|
|
|
1719
1723
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
1720
1724
|
*/
|
|
1721
1725
|
getResourceTypes() {
|
|
1722
|
-
return this.getTypedDataArrayRequester(
|
|
1726
|
+
return this.getTypedDataArrayRequester(Ee, "/internal/references/resource-type", !0);
|
|
1723
1727
|
}
|
|
1724
1728
|
/**
|
|
1725
1729
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
1726
1730
|
*/
|
|
1727
1731
|
getSalesDirections() {
|
|
1728
|
-
return this.getTypedDataArrayRequester(
|
|
1732
|
+
return this.getTypedDataArrayRequester(I, "/public/references/sales-direction", !0);
|
|
1729
1733
|
}
|
|
1730
1734
|
/**
|
|
1731
1735
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
1732
1736
|
*/
|
|
1733
1737
|
getSourcePrimaryInterest() {
|
|
1734
|
-
return this.getTypedDataArrayRequester(
|
|
1738
|
+
return this.getTypedDataArrayRequester(Ke, "/internal/references/source-primary-interest", !0);
|
|
1735
1739
|
}
|
|
1736
1740
|
/**
|
|
1737
1741
|
* Выполняет поиск данных о городах по терму в названии.
|
|
@@ -1739,7 +1743,7 @@ class R extends u {
|
|
|
1739
1743
|
* @param term Терм поиска.
|
|
1740
1744
|
*/
|
|
1741
1745
|
searchCity(r) {
|
|
1742
|
-
return this.getTypedDataArrayRequester(
|
|
1746
|
+
return this.getTypedDataArrayRequester(ce, `/internal/references/city-with-region-and-country/search?term=${r}`);
|
|
1743
1747
|
}
|
|
1744
1748
|
/**
|
|
1745
1749
|
* Выполняет поиск данных о регионах по терму в названии.
|
|
@@ -1747,7 +1751,7 @@ class R extends u {
|
|
|
1747
1751
|
* @param term Терм поиска.
|
|
1748
1752
|
*/
|
|
1749
1753
|
searchRegion(r) {
|
|
1750
|
-
return this.getTypedDataArrayRequester(
|
|
1754
|
+
return this.getTypedDataArrayRequester(Z, `/internal/references/region-with-country/search?term=${r}`);
|
|
1751
1755
|
}
|
|
1752
1756
|
/**
|
|
1753
1757
|
* Выполняет поиск данных о странах по терму в названии.
|
|
@@ -1755,31 +1759,31 @@ class R extends u {
|
|
|
1755
1759
|
* @param term Терм поиска.
|
|
1756
1760
|
*/
|
|
1757
1761
|
searchCountry(r) {
|
|
1758
|
-
return this.getTypedDataArrayRequester(
|
|
1762
|
+
return this.getTypedDataArrayRequester(J, `/internal/references/country/search?term=${r}`);
|
|
1759
1763
|
}
|
|
1760
1764
|
/**
|
|
1761
1765
|
* Возвращает {@link Promise} для получения справочника типов доставки.
|
|
1762
1766
|
*/
|
|
1763
1767
|
getDeliveryTypes() {
|
|
1764
|
-
return this.getTypedDataArrayRequester(
|
|
1768
|
+
return this.getTypedDataArrayRequester(E, "/internal/references/delivery-type", !0);
|
|
1765
1769
|
}
|
|
1766
1770
|
/**
|
|
1767
1771
|
* Возвращает {@link Promise} для получения справочника складов.
|
|
1768
1772
|
*/
|
|
1769
1773
|
getWarehouses() {
|
|
1770
|
-
return this.getTypedDataArrayRequester(
|
|
1774
|
+
return this.getTypedDataArrayRequester(me, "/public/references/warehouse", !0);
|
|
1771
1775
|
}
|
|
1772
1776
|
/**
|
|
1773
1777
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
1774
1778
|
*/
|
|
1775
1779
|
getPropertyTypes() {
|
|
1776
|
-
return this.getTypedDataArrayRequester(
|
|
1780
|
+
return this.getTypedDataArrayRequester(je, "/internal/references/property-type", !0);
|
|
1777
1781
|
}
|
|
1778
1782
|
/**
|
|
1779
1783
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
1780
1784
|
*/
|
|
1781
1785
|
getPriceCoefficients() {
|
|
1782
|
-
return this.getTypedDataArrayRequester(
|
|
1786
|
+
return this.getTypedDataArrayRequester(ge, "/internal/references/price-coefficient", !0);
|
|
1783
1787
|
}
|
|
1784
1788
|
/**
|
|
1785
1789
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
@@ -1789,7 +1793,7 @@ class R extends u {
|
|
|
1789
1793
|
}
|
|
1790
1794
|
}
|
|
1791
1795
|
var Br = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Br || {});
|
|
1792
|
-
class Wr extends
|
|
1796
|
+
class Wr extends We {
|
|
1793
1797
|
/**
|
|
1794
1798
|
* Инициализирует экземпляр класса {@link User}.
|
|
1795
1799
|
*
|
|
@@ -1864,10 +1868,10 @@ class Vr {
|
|
|
1864
1868
|
* Данные о валюте.
|
|
1865
1869
|
*/
|
|
1866
1870
|
t(this, "currency");
|
|
1867
|
-
this.cost = r.cost, this.costDate =
|
|
1871
|
+
this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new q(r.client) : void 0, this.executor = r.executor ? new q(r.executor) : void 0, this.currency = r.currency ? new le(r.currency) : void 0;
|
|
1868
1872
|
}
|
|
1869
1873
|
}
|
|
1870
|
-
class
|
|
1874
|
+
class xe {
|
|
1871
1875
|
/**
|
|
1872
1876
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
1873
1877
|
*
|
|
@@ -1882,10 +1886,10 @@ class Ie {
|
|
|
1882
1886
|
* Список рекомендованных категорий продуктов.
|
|
1883
1887
|
*/
|
|
1884
1888
|
t(this, "productCategories", []);
|
|
1885
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
1889
|
+
r != null && r.products && (this.products = r.products.map((e) => new S(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new d(e)));
|
|
1886
1890
|
}
|
|
1887
1891
|
}
|
|
1888
|
-
class
|
|
1892
|
+
class X extends A {
|
|
1889
1893
|
/**
|
|
1890
1894
|
* Инициализирует экземпляр класса {@link PricingRole}.
|
|
1891
1895
|
*
|
|
@@ -1920,7 +1924,7 @@ class ee extends a {
|
|
|
1920
1924
|
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;
|
|
1921
1925
|
}
|
|
1922
1926
|
}
|
|
1923
|
-
class
|
|
1927
|
+
class Ie {
|
|
1924
1928
|
/**
|
|
1925
1929
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1926
1930
|
*
|
|
@@ -1939,11 +1943,11 @@ class ke {
|
|
|
1939
1943
|
* Минимальный коэффициент цены.
|
|
1940
1944
|
*/
|
|
1941
1945
|
t(this, "minCoefficient");
|
|
1942
|
-
this.role = new
|
|
1946
|
+
this.role = new X(r == null ? void 0 : r.role), this.category = new re(r == null ? void 0 : r.category), this.minCoefficient = new ge(r == null ? void 0 : r.minCoefficient);
|
|
1943
1947
|
}
|
|
1944
1948
|
}
|
|
1945
1949
|
var Er = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n))(Er || {});
|
|
1946
|
-
class
|
|
1950
|
+
class Ae extends H {
|
|
1947
1951
|
/**
|
|
1948
1952
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
1949
1953
|
*
|
|
@@ -1970,11 +1974,11 @@ class be extends F {
|
|
|
1970
1974
|
/**
|
|
1971
1975
|
* Данные о валюте.
|
|
1972
1976
|
*/
|
|
1973
|
-
t(this, "currency", new
|
|
1974
|
-
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new
|
|
1977
|
+
t(this, "currency", new le());
|
|
1978
|
+
e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new le(e.currency));
|
|
1975
1979
|
}
|
|
1976
1980
|
}
|
|
1977
|
-
class
|
|
1981
|
+
class Te extends A {
|
|
1978
1982
|
/**
|
|
1979
1983
|
* Инициализирует экземпляр класса {@link Contact}.
|
|
1980
1984
|
*
|
|
@@ -1993,7 +1997,7 @@ class _e extends a {
|
|
|
1993
1997
|
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;
|
|
1994
1998
|
}
|
|
1995
1999
|
}
|
|
1996
|
-
class
|
|
2000
|
+
class M extends Te {
|
|
1997
2001
|
/**
|
|
1998
2002
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
1999
2003
|
*
|
|
@@ -2025,10 +2029,10 @@ class H extends _e {
|
|
|
2025
2029
|
* Дата и время последнего удаления.
|
|
2026
2030
|
*/
|
|
2027
2031
|
t(this, "deletedAt");
|
|
2028
|
-
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
|
|
2032
|
+
this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
2029
2033
|
}
|
|
2030
2034
|
}
|
|
2031
|
-
class
|
|
2035
|
+
class Je extends A {
|
|
2032
2036
|
/**
|
|
2033
2037
|
* Инициализирует экземпляр класса {@link ContragentBase}.
|
|
2034
2038
|
*
|
|
@@ -2040,7 +2044,7 @@ class Ke extends a {
|
|
|
2040
2044
|
/**
|
|
2041
2045
|
* Данные о менеджере.
|
|
2042
2046
|
*/
|
|
2043
|
-
t(this, "manager", new
|
|
2047
|
+
t(this, "manager", new ne());
|
|
2044
2048
|
/**
|
|
2045
2049
|
* Данные об организационно-правовой форме.
|
|
2046
2050
|
*/
|
|
@@ -2048,7 +2052,7 @@ class Ke extends a {
|
|
|
2048
2052
|
/**
|
|
2049
2053
|
* Направление продаж.
|
|
2050
2054
|
*/
|
|
2051
|
-
t(this, "salesDirection", new
|
|
2055
|
+
t(this, "salesDirection", new I());
|
|
2052
2056
|
/**
|
|
2053
2057
|
* Группа партнеров (направление деятельности).
|
|
2054
2058
|
*/
|
|
@@ -2086,22 +2090,22 @@ class Ke extends a {
|
|
|
2086
2090
|
*/
|
|
2087
2091
|
t(this, "updater");
|
|
2088
2092
|
if (e) {
|
|
2089
|
-
if (this.opf = new U(e.opf), this.salesDirection = new
|
|
2093
|
+
if (this.opf = new U(e.opf), this.salesDirection = new I(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new q(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new q(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new G(e.partnerGroup)), e.manager && (this.manager = new ne(e.manager)), e.contacts) {
|
|
2090
2094
|
const s = [];
|
|
2091
2095
|
e.contacts.forEach((i) => {
|
|
2092
|
-
s.push(new
|
|
2096
|
+
s.push(new M(i));
|
|
2093
2097
|
}), this.contacts = s;
|
|
2094
2098
|
}
|
|
2095
2099
|
if (e.bankAccounts) {
|
|
2096
2100
|
const s = [];
|
|
2097
2101
|
e.bankAccounts.forEach((i) => {
|
|
2098
|
-
s.push(new
|
|
2102
|
+
s.push(new Ae(i));
|
|
2099
2103
|
}), this.bankAccounts = s;
|
|
2100
2104
|
}
|
|
2101
2105
|
}
|
|
2102
2106
|
}
|
|
2103
2107
|
}
|
|
2104
|
-
class Kr extends
|
|
2108
|
+
class Kr extends Je {
|
|
2105
2109
|
/**
|
|
2106
2110
|
* Инициализирует экземпляр класса {@link ContragentPerson}.
|
|
2107
2111
|
*
|
|
@@ -2111,7 +2115,7 @@ class Kr extends Ke {
|
|
|
2111
2115
|
super(r);
|
|
2112
2116
|
}
|
|
2113
2117
|
}
|
|
2114
|
-
class
|
|
2118
|
+
class Qe extends Je {
|
|
2115
2119
|
/**
|
|
2116
2120
|
* Инициализирует экземпляр класса {@link ContragentIc}.
|
|
2117
2121
|
*
|
|
@@ -2154,7 +2158,7 @@ class Je extends Ke {
|
|
|
2154
2158
|
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 ?? "");
|
|
2155
2159
|
}
|
|
2156
2160
|
}
|
|
2157
|
-
class
|
|
2161
|
+
class Ye extends Qe {
|
|
2158
2162
|
/**
|
|
2159
2163
|
* Инициализирует экземпляр класса {@link ContragentUlR}.
|
|
2160
2164
|
*
|
|
@@ -2169,7 +2173,7 @@ class Qe extends Je {
|
|
|
2169
2173
|
e && (this.kpp = e.kpp ?? "");
|
|
2170
2174
|
}
|
|
2171
2175
|
}
|
|
2172
|
-
class Jr extends
|
|
2176
|
+
class Jr extends Ye {
|
|
2173
2177
|
/**
|
|
2174
2178
|
* Инициализирует экземпляр класса {@link ContragentUlNr}.
|
|
2175
2179
|
*
|
|
@@ -2180,7 +2184,7 @@ class Jr extends Qe {
|
|
|
2180
2184
|
/**
|
|
2181
2185
|
* Страна регистрации юридического лица нерезидента.
|
|
2182
2186
|
*/
|
|
2183
|
-
t(this, "registrationCountry", new
|
|
2187
|
+
t(this, "registrationCountry", new J());
|
|
2184
2188
|
/**
|
|
2185
2189
|
* Регистрационный номер юридического лица нерезидента.
|
|
2186
2190
|
*/
|
|
@@ -2189,10 +2193,10 @@ class Jr extends Qe {
|
|
|
2189
2193
|
* Налоговый номер юридического лица нерезидента.
|
|
2190
2194
|
*/
|
|
2191
2195
|
t(this, "taxNumber", "");
|
|
2192
|
-
e && (this.registrationCountry = new
|
|
2196
|
+
e && (this.registrationCountry = new J(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
|
|
2193
2197
|
}
|
|
2194
2198
|
}
|
|
2195
|
-
class
|
|
2199
|
+
class pe {
|
|
2196
2200
|
/**
|
|
2197
2201
|
* Инициализирует и возвращает экземпляр класса с данными о контрагенте.
|
|
2198
2202
|
*
|
|
@@ -2200,18 +2204,18 @@ class ue {
|
|
|
2200
2204
|
*/
|
|
2201
2205
|
static createInstance(r) {
|
|
2202
2206
|
switch (r.opf.slug) {
|
|
2203
|
-
case
|
|
2204
|
-
return new Je(r);
|
|
2205
|
-
case A.UlR:
|
|
2207
|
+
case _.Ic:
|
|
2206
2208
|
return new Qe(r);
|
|
2207
|
-
case
|
|
2209
|
+
case _.UlR:
|
|
2210
|
+
return new Ye(r);
|
|
2211
|
+
case _.UlNr:
|
|
2208
2212
|
return new Jr(r);
|
|
2209
2213
|
default:
|
|
2210
2214
|
return new Kr(r);
|
|
2211
2215
|
}
|
|
2212
2216
|
}
|
|
2213
2217
|
}
|
|
2214
|
-
class
|
|
2218
|
+
class ve extends H {
|
|
2215
2219
|
/**
|
|
2216
2220
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
2217
2221
|
*
|
|
@@ -2226,7 +2230,7 @@ class Re extends F {
|
|
|
2226
2230
|
this.isPrimary = e.isPrimary;
|
|
2227
2231
|
}
|
|
2228
2232
|
}
|
|
2229
|
-
class Qr extends
|
|
2233
|
+
class Qr extends M {
|
|
2230
2234
|
/**
|
|
2231
2235
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
2232
2236
|
*
|
|
@@ -2251,10 +2255,10 @@ class Qr extends H {
|
|
|
2251
2255
|
*/
|
|
2252
2256
|
addresses: []
|
|
2253
2257
|
});
|
|
2254
|
-
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new
|
|
2258
|
+
e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new ve(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new ve(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new ve(s))));
|
|
2255
2259
|
}
|
|
2256
2260
|
}
|
|
2257
|
-
class
|
|
2261
|
+
class ue extends Nr {
|
|
2258
2262
|
/**
|
|
2259
2263
|
* Инициализирует экземпляр класса {@link DeliveryAddress}.
|
|
2260
2264
|
*
|
|
@@ -2291,10 +2295,10 @@ class he extends kr {
|
|
|
2291
2295
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
2292
2296
|
*/
|
|
2293
2297
|
t(this, "isTransportCompanyAddress");
|
|
2294
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
2298
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Fe(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
2295
2299
|
}
|
|
2296
2300
|
}
|
|
2297
|
-
class
|
|
2301
|
+
class ke extends te {
|
|
2298
2302
|
/**
|
|
2299
2303
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2300
2304
|
*
|
|
@@ -2348,7 +2352,7 @@ class Ne extends se {
|
|
|
2348
2352
|
* Дополнительные данные о клиенте.
|
|
2349
2353
|
*/
|
|
2350
2354
|
t(this, "extraData");
|
|
2351
|
-
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) =>
|
|
2355
|
+
this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => pe.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new G(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((l = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : l.map((p) => new ue(p))) ?? [], this.channelPrimaryInterest = new Ve(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ke(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new E(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 me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
|
|
2352
2356
|
}
|
|
2353
2357
|
}
|
|
2354
2358
|
class yt {
|
|
@@ -2448,17 +2452,17 @@ class yt {
|
|
|
2448
2452
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
2449
2453
|
*/
|
|
2450
2454
|
t(this, "lastOrder");
|
|
2451
|
-
var e, s, i, o, l, p, g;
|
|
2452
|
-
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
|
|
2453
|
-
from: ((e = r == null ? void 0 : r.createdAt) == null ? void 0 : e.from)
|
|
2454
|
-
to: ((
|
|
2455
|
+
var e, s, i, o, l, p, g, v, $, T, b;
|
|
2456
|
+
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 ce(r == null ? void 0 : r.city), this.region = new Z(r == null ? void 0 : r.region), this.country = new J(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 = {
|
|
2457
|
+
from: m((e = r == null ? void 0 : r.createdAt) == null ? void 0 : e.from) ? f((s = r == null ? void 0 : r.createdAt) == null ? void 0 : s.from) : null,
|
|
2458
|
+
to: m((i = r == null ? void 0 : r.createdAt) == null ? void 0 : i.to) ? f((o = r == null ? void 0 : r.createdAt) == null ? void 0 : o.to) : null
|
|
2455
2459
|
}, this.lastLoginDate = {
|
|
2456
|
-
from: ((
|
|
2457
|
-
to: ((
|
|
2458
|
-
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((
|
|
2459
|
-
createdAt: (
|
|
2460
|
-
creator: (
|
|
2461
|
-
isApproved: (
|
|
2460
|
+
from: m((l = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : l.from) ? f((p = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : p.from) : null,
|
|
2461
|
+
to: m((g = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : g.to) ? f((v = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : v.to) : null
|
|
2462
|
+
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((a) => new fe(a)) : [], this.salesDirection = new I(r == null ? void 0 : r.salesDirection), this.contragentInn = (r == null ? void 0 : r.contragentInn) ?? "", this.contragentType = new U(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new E(r == null ? void 0 : r.preferredDeliveryType), this.hasCostLessThenStop = r != null && r.hasCostLessThenStop ? !0 : void 0, this.partnerGroup = new G(r == null ? void 0 : r.partnerGroup), this.contact = new Te(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
2463
|
+
createdAt: ($ = r == null ? void 0 : r.lastOrder) == null ? void 0 : $.createdAt,
|
|
2464
|
+
creator: (T = r == null ? void 0 : r.lastOrder) == null ? void 0 : T.creator,
|
|
2465
|
+
isApproved: (b = r == null ? void 0 : r.lastOrder) == null ? void 0 : b.isApproved
|
|
2462
2466
|
};
|
|
2463
2467
|
}
|
|
2464
2468
|
/**
|
|
@@ -2477,10 +2481,10 @@ class yt {
|
|
|
2477
2481
|
this[r] = "";
|
|
2478
2482
|
break;
|
|
2479
2483
|
case "city":
|
|
2480
|
-
this.city = new
|
|
2484
|
+
this.city = new ce();
|
|
2481
2485
|
break;
|
|
2482
2486
|
case "region":
|
|
2483
|
-
this.region = new
|
|
2487
|
+
this.region = new Z();
|
|
2484
2488
|
break;
|
|
2485
2489
|
case "isActive":
|
|
2486
2490
|
this.isActive = !0;
|
|
@@ -2501,13 +2505,13 @@ class yt {
|
|
|
2501
2505
|
this.managers = [];
|
|
2502
2506
|
break;
|
|
2503
2507
|
case "salesDirection":
|
|
2504
|
-
this.salesDirection = new
|
|
2508
|
+
this.salesDirection = new I();
|
|
2505
2509
|
break;
|
|
2506
2510
|
case "contragentType":
|
|
2507
2511
|
this.contragentType = new U();
|
|
2508
2512
|
break;
|
|
2509
2513
|
case "preferredDeliveryType":
|
|
2510
|
-
this.preferredDeliveryType = new
|
|
2514
|
+
this.preferredDeliveryType = new E();
|
|
2511
2515
|
break;
|
|
2512
2516
|
case "partnerGroup":
|
|
2513
2517
|
this.partnerGroup = new G();
|
|
@@ -2516,7 +2520,7 @@ class yt {
|
|
|
2516
2520
|
this.hasCostLessThenStop = void 0;
|
|
2517
2521
|
break;
|
|
2518
2522
|
case "contact":
|
|
2519
|
-
this.contact = new
|
|
2523
|
+
this.contact = new Te();
|
|
2520
2524
|
break;
|
|
2521
2525
|
}
|
|
2522
2526
|
return this;
|
|
@@ -2531,11 +2535,11 @@ class yt {
|
|
|
2531
2535
|
return Object.keys(this).forEach((l) => {
|
|
2532
2536
|
const p = this[l];
|
|
2533
2537
|
// eslint-disable-next-line prettier/prettier
|
|
2534
|
-
|
|
2538
|
+
qe(p) || m(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[l] = p);
|
|
2535
2539
|
}), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.to) && delete r.createdAt, !((i = r == null ? void 0 : r.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
|
|
2536
2540
|
}
|
|
2537
2541
|
}
|
|
2538
|
-
class
|
|
2542
|
+
class Xe extends H {
|
|
2539
2543
|
/**
|
|
2540
2544
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
2541
2545
|
*
|
|
@@ -2555,10 +2559,10 @@ class Ye extends F {
|
|
|
2555
2559
|
* Признак того, что заказ подтвержден в 1С.
|
|
2556
2560
|
*/
|
|
2557
2561
|
t(this, "isApproved1c");
|
|
2558
|
-
this.createdAt =
|
|
2562
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (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;
|
|
2559
2563
|
}
|
|
2560
2564
|
}
|
|
2561
|
-
class
|
|
2565
|
+
class Ze extends Xe {
|
|
2562
2566
|
/**
|
|
2563
2567
|
* Инициализирует экземпляр класса {@link OrderInfo}.
|
|
2564
2568
|
*
|
|
@@ -2607,19 +2611,19 @@ class Xe extends Ye {
|
|
|
2607
2611
|
* Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
|
|
2608
2612
|
*/
|
|
2609
2613
|
t(this, "isNotInStock");
|
|
2610
|
-
this.client = new
|
|
2614
|
+
this.client = new te(e == null ? void 0 : e.client), this.payment = {
|
|
2611
2615
|
type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
|
|
2612
2616
|
status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
|
|
2613
2617
|
onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
|
|
2614
2618
|
}, this.delivery = {
|
|
2615
2619
|
type: ((l = e == null ? void 0 : e.delivery) == null ? void 0 : l.type) ?? -1,
|
|
2616
|
-
date:
|
|
2617
|
-
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new
|
|
2618
|
-
warehouse: ($ = e == null ? void 0 : e.delivery) != null && $.warehouse ? new
|
|
2619
|
-
}, this.attachedUser = new
|
|
2620
|
+
date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? f(e.delivery.date) : ((g = e == null ? void 0 : e.delivery) == null ? void 0 : g.date) ?? /* @__PURE__ */ new Date(),
|
|
2621
|
+
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new ue(e.delivery.address) : void 0,
|
|
2622
|
+
warehouse: ($ = e == null ? void 0 : e.delivery) != null && $.warehouse ? new me(e.delivery.warehouse) : void 0
|
|
2623
|
+
}, this.attachedUser = new q(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
2620
2624
|
}
|
|
2621
2625
|
}
|
|
2622
|
-
class Yr extends
|
|
2626
|
+
class Yr extends H {
|
|
2623
2627
|
/**
|
|
2624
2628
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
2625
2629
|
*
|
|
@@ -2699,10 +2703,10 @@ class Yr extends F {
|
|
|
2699
2703
|
* который соответствует указанной ширине. Количество не ограничено.
|
|
2700
2704
|
*/
|
|
2701
2705
|
t(this, "sawing");
|
|
2702
|
-
this.product = new
|
|
2706
|
+
this.product = new K(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
|
|
2703
2707
|
}
|
|
2704
2708
|
}
|
|
2705
|
-
class Xr extends
|
|
2709
|
+
class Xr extends Ze {
|
|
2706
2710
|
/**
|
|
2707
2711
|
* Инициализирует экземпляр класса {@link Order}.
|
|
2708
2712
|
*
|
|
@@ -2742,10 +2746,80 @@ class Xr extends Xe {
|
|
|
2742
2746
|
* Признак, что разрешена передача заказа в работу без оплаты.
|
|
2743
2747
|
*/
|
|
2744
2748
|
t(this, "isAllowProcessingWithoutPayment");
|
|
2745
|
-
this.products = (e.products ?? []).map((s) => new Yr(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ?
|
|
2749
|
+
this.products = (e.products ?? []).map((s) => new Yr(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? pe.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new C(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
|
|
2746
2750
|
}
|
|
2747
2751
|
}
|
|
2748
|
-
|
|
2752
|
+
var Se = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Se || {});
|
|
2753
|
+
class Ne {
|
|
2754
|
+
/**
|
|
2755
|
+
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
2756
|
+
*
|
|
2757
|
+
* @param data Данные для первоначальной инициализации.
|
|
2758
|
+
*/
|
|
2759
|
+
constructor(r) {
|
|
2760
|
+
/**
|
|
2761
|
+
* Поле, по которому производится поиск.
|
|
2762
|
+
*/
|
|
2763
|
+
t(this, "field");
|
|
2764
|
+
/**
|
|
2765
|
+
* Операция сравнения.
|
|
2766
|
+
*/
|
|
2767
|
+
t(this, "op");
|
|
2768
|
+
/**
|
|
2769
|
+
* Значение с которым сравнивается поле.
|
|
2770
|
+
*/
|
|
2771
|
+
t(this, "value");
|
|
2772
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Se.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2773
|
+
}
|
|
2774
|
+
/**
|
|
2775
|
+
* Преобразует фильтр в примитивное представление для API.
|
|
2776
|
+
*
|
|
2777
|
+
* @returns Примитивное представление фильтра.
|
|
2778
|
+
*/
|
|
2779
|
+
toPrimitive() {
|
|
2780
|
+
const r = {
|
|
2781
|
+
field: this.field,
|
|
2782
|
+
op: this.op
|
|
2783
|
+
};
|
|
2784
|
+
return r.value = or(this.value) ? z(this.value, x.getConfig().apiDateFormat) : this.value, r;
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
class ee {
|
|
2788
|
+
/**
|
|
2789
|
+
* Инициализирует экземпляр класса {@link FilterGroup}.
|
|
2790
|
+
*
|
|
2791
|
+
* @param data Данные для первоначальной инициализации.
|
|
2792
|
+
*/
|
|
2793
|
+
constructor(r) {
|
|
2794
|
+
/**
|
|
2795
|
+
* Условие объединения фильтров.
|
|
2796
|
+
*/
|
|
2797
|
+
t(this, "groupOp");
|
|
2798
|
+
/**
|
|
2799
|
+
* Список фильтров.
|
|
2800
|
+
*/
|
|
2801
|
+
t(this, "filters");
|
|
2802
|
+
/**
|
|
2803
|
+
* Список вложенных групп фильтров.
|
|
2804
|
+
*/
|
|
2805
|
+
t(this, "groups");
|
|
2806
|
+
var e, s;
|
|
2807
|
+
this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Ne(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ee(i))) ?? [];
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* Преобразует группу фильтров в примитивное представление для API.
|
|
2811
|
+
*
|
|
2812
|
+
* @returns Примитивное представление группы фильтров.
|
|
2813
|
+
*/
|
|
2814
|
+
toPrimitive() {
|
|
2815
|
+
return {
|
|
2816
|
+
groupOp: this.groupOp,
|
|
2817
|
+
filters: this.filters.map((r) => r instanceof Ne && Ue(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2818
|
+
groups: this.groups.map((r) => r instanceof ee ? r.toPrimitive() : r)
|
|
2819
|
+
};
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
class ye extends u {
|
|
2749
2823
|
/**
|
|
2750
2824
|
* Получает пагинированный список данных.
|
|
2751
2825
|
*
|
|
@@ -2761,12 +2835,12 @@ class we extends u {
|
|
|
2761
2835
|
page: (i == null ? void 0 : i.page) ?? 1,
|
|
2762
2836
|
per_page: (i == null ? void 0 : i.pageSize) ?? (i == null ? void 0 : i.perPage) ?? 10
|
|
2763
2837
|
};
|
|
2764
|
-
return e && (p.filters = JSON.stringify(e)), cr(s) || (lr(s) ? s : [s]).forEach((g, v) => {
|
|
2838
|
+
return e && (p.filters = JSON.stringify((e instanceof ee ? e : new ee(e)).toPrimitive())), cr(s) || (lr(s) ? s : [s]).forEach((g, v) => {
|
|
2765
2839
|
p[`sort[${v}][field]`] = g.field, p[`sort[${v}][direction]`] = g.direction;
|
|
2766
2840
|
}), this.get(r, p, o, l);
|
|
2767
2841
|
}
|
|
2768
2842
|
}
|
|
2769
|
-
class
|
|
2843
|
+
class Ct extends ye {
|
|
2770
2844
|
/**
|
|
2771
2845
|
* Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
|
|
2772
2846
|
*
|
|
@@ -2778,7 +2852,7 @@ class wt extends we {
|
|
|
2778
2852
|
getOrders(r, e, s) {
|
|
2779
2853
|
return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, (i) => {
|
|
2780
2854
|
const o = { ...i.data };
|
|
2781
|
-
return o.data = o.data.map((l) => new
|
|
2855
|
+
return o.data = o.data.map((l) => new Ze(l)), o;
|
|
2782
2856
|
});
|
|
2783
2857
|
}
|
|
2784
2858
|
/**
|
|
@@ -2799,7 +2873,7 @@ class wt extends we {
|
|
|
2799
2873
|
return this.get(`/internal/orders/${r}`, {}, (e) => new Xr(e.data));
|
|
2800
2874
|
}
|
|
2801
2875
|
}
|
|
2802
|
-
class Zr extends
|
|
2876
|
+
class Zr extends A {
|
|
2803
2877
|
/**
|
|
2804
2878
|
* Инициализирует экземпляр класса {@link ClientAdditionalData}.
|
|
2805
2879
|
*
|
|
@@ -2824,10 +2898,9 @@ class Zr extends a {
|
|
|
2824
2898
|
* Данные о последнем заказе клиента.
|
|
2825
2899
|
*/
|
|
2826
2900
|
t(this, "lastOrder");
|
|
2827
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
2901
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Xe(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new G(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new E(e.preferredDeliveryType));
|
|
2828
2902
|
}
|
|
2829
2903
|
}
|
|
2830
|
-
var Ze = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(Ze || {});
|
|
2831
2904
|
class et {
|
|
2832
2905
|
/**
|
|
2833
2906
|
* Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
|
|
@@ -2852,7 +2925,7 @@ class et {
|
|
|
2852
2925
|
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;
|
|
2853
2926
|
}
|
|
2854
2927
|
}
|
|
2855
|
-
class
|
|
2928
|
+
class wt extends et {
|
|
2856
2929
|
/**
|
|
2857
2930
|
* Инициализирует экземпляр класса {@link DataTablePagination}.
|
|
2858
2931
|
*
|
|
@@ -2901,7 +2974,7 @@ class vt {
|
|
|
2901
2974
|
this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
|
|
2902
2975
|
}
|
|
2903
2976
|
}
|
|
2904
|
-
class Pt extends
|
|
2977
|
+
class Pt extends ye {
|
|
2905
2978
|
/**
|
|
2906
2979
|
* Возвращает данные об указанном клиенте.
|
|
2907
2980
|
*
|
|
@@ -2909,7 +2982,7 @@ class Pt extends we {
|
|
|
2909
2982
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
2910
2983
|
*/
|
|
2911
2984
|
getClient(r) {
|
|
2912
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
2985
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new ke(e.data));
|
|
2913
2986
|
}
|
|
2914
2987
|
/**
|
|
2915
2988
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -2922,7 +2995,7 @@ class Pt extends we {
|
|
|
2922
2995
|
getClientsList(r, e, s) {
|
|
2923
2996
|
return this.getPaginated("/internal/clients", r, e, s, (i) => {
|
|
2924
2997
|
const o = { ...i.data };
|
|
2925
|
-
return o.data = o.data.map((l) => new
|
|
2998
|
+
return o.data = o.data.map((l) => new te(l)), o;
|
|
2926
2999
|
});
|
|
2927
3000
|
}
|
|
2928
3001
|
/**
|
|
@@ -2935,7 +3008,7 @@ class Pt extends we {
|
|
|
2935
3008
|
return this.getClientsList({
|
|
2936
3009
|
groupOp: "and",
|
|
2937
3010
|
groups: [],
|
|
2938
|
-
filters: [{ field: "phone", op:
|
|
3011
|
+
filters: [{ field: "phone", op: Se.Contains, value: r }]
|
|
2939
3012
|
});
|
|
2940
3013
|
}
|
|
2941
3014
|
/**
|
|
@@ -2990,7 +3063,7 @@ class Pt extends we {
|
|
|
2990
3063
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
2991
3064
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
2992
3065
|
},
|
|
2993
|
-
(i) => new
|
|
3066
|
+
(i) => new ke(i.data),
|
|
2994
3067
|
e
|
|
2995
3068
|
);
|
|
2996
3069
|
}
|
|
@@ -3100,11 +3173,11 @@ class Pt extends we {
|
|
|
3100
3173
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
3101
3174
|
*/
|
|
3102
3175
|
createContragentClientData(r, e, s = {}) {
|
|
3103
|
-
var g, v, $,
|
|
3176
|
+
var g, v, $, T, b, a, k, N;
|
|
3104
3177
|
let i;
|
|
3105
3178
|
const o = e, l = e, p = e;
|
|
3106
3179
|
switch (e.opf.slug) {
|
|
3107
|
-
case
|
|
3180
|
+
case _.Ic:
|
|
3108
3181
|
i = {
|
|
3109
3182
|
opf: o.opf.slug,
|
|
3110
3183
|
name: o.name,
|
|
@@ -3122,13 +3195,13 @@ class Pt extends we {
|
|
|
3122
3195
|
actual_address: o.actualAddress
|
|
3123
3196
|
};
|
|
3124
3197
|
break;
|
|
3125
|
-
case
|
|
3198
|
+
case _.UlR:
|
|
3126
3199
|
i = {
|
|
3127
3200
|
opf: l.opf.slug,
|
|
3128
3201
|
name: l.name,
|
|
3129
3202
|
alternative_name: l.alternativeName,
|
|
3130
3203
|
partner_group_id: ($ = l.partnerGroup) == null ? void 0 : $.id,
|
|
3131
|
-
manager_id: (
|
|
3204
|
+
manager_id: (T = l.manager) == null ? void 0 : T.id,
|
|
3132
3205
|
comment: l.comment,
|
|
3133
3206
|
inn: l.inn,
|
|
3134
3207
|
kpp: l.kpp,
|
|
@@ -3141,13 +3214,13 @@ class Pt extends we {
|
|
|
3141
3214
|
actual_address: l.actualAddress
|
|
3142
3215
|
};
|
|
3143
3216
|
break;
|
|
3144
|
-
case
|
|
3217
|
+
case _.UlNr:
|
|
3145
3218
|
i = {
|
|
3146
3219
|
opf: p.opf.slug,
|
|
3147
3220
|
name: p.name,
|
|
3148
3221
|
alternative_name: p.alternativeName,
|
|
3149
|
-
partner_group_id: (
|
|
3150
|
-
manager_id: (
|
|
3222
|
+
partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
|
|
3223
|
+
manager_id: (a = p.manager) == null ? void 0 : a.id,
|
|
3151
3224
|
comment: p.comment,
|
|
3152
3225
|
inn: p.inn,
|
|
3153
3226
|
kpp: p.kpp,
|
|
@@ -3168,8 +3241,8 @@ class Pt extends we {
|
|
|
3168
3241
|
opf: e.opf.slug,
|
|
3169
3242
|
name: e.name,
|
|
3170
3243
|
alternative_name: e.alternativeName,
|
|
3171
|
-
partner_group_id: (
|
|
3172
|
-
manager_id: (
|
|
3244
|
+
partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
|
|
3245
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
3173
3246
|
comment: e.comment
|
|
3174
3247
|
};
|
|
3175
3248
|
break;
|
|
@@ -3177,7 +3250,7 @@ class Pt extends we {
|
|
|
3177
3250
|
return this.post(
|
|
3178
3251
|
`/internal/clients/${r}/contragents`,
|
|
3179
3252
|
i,
|
|
3180
|
-
(O) =>
|
|
3253
|
+
(O) => pe.createInstance(O.data),
|
|
3181
3254
|
s
|
|
3182
3255
|
);
|
|
3183
3256
|
}
|
|
@@ -3192,11 +3265,11 @@ class Pt extends we {
|
|
|
3192
3265
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
3193
3266
|
*/
|
|
3194
3267
|
updateContragentClientData(r, e, s = {}) {
|
|
3195
|
-
var g, v, $,
|
|
3268
|
+
var g, v, $, T, b, a, k, N;
|
|
3196
3269
|
let i;
|
|
3197
3270
|
const o = e, l = e, p = e;
|
|
3198
3271
|
switch (e.opf.slug) {
|
|
3199
|
-
case
|
|
3272
|
+
case _.Ic:
|
|
3200
3273
|
i = {
|
|
3201
3274
|
opf: o.opf.slug,
|
|
3202
3275
|
name: o.name,
|
|
@@ -3214,13 +3287,13 @@ class Pt extends we {
|
|
|
3214
3287
|
actual_address: o.actualAddress
|
|
3215
3288
|
};
|
|
3216
3289
|
break;
|
|
3217
|
-
case
|
|
3290
|
+
case _.UlR:
|
|
3218
3291
|
i = {
|
|
3219
3292
|
opf: l.opf.slug,
|
|
3220
3293
|
name: l.name,
|
|
3221
3294
|
alternative_name: l.alternativeName,
|
|
3222
3295
|
partner_group_id: ($ = l.partnerGroup) == null ? void 0 : $.id,
|
|
3223
|
-
manager_id: (
|
|
3296
|
+
manager_id: (T = l.manager) == null ? void 0 : T.id,
|
|
3224
3297
|
comment: l.comment,
|
|
3225
3298
|
inn: l.inn,
|
|
3226
3299
|
kpp: l.kpp,
|
|
@@ -3233,13 +3306,13 @@ class Pt extends we {
|
|
|
3233
3306
|
actual_address: l.actualAddress
|
|
3234
3307
|
};
|
|
3235
3308
|
break;
|
|
3236
|
-
case
|
|
3309
|
+
case _.UlNr:
|
|
3237
3310
|
i = {
|
|
3238
3311
|
opf: p.opf.slug,
|
|
3239
3312
|
name: p.name,
|
|
3240
3313
|
alternative_name: p.alternativeName,
|
|
3241
|
-
partner_group_id: (
|
|
3242
|
-
manager_id: (
|
|
3314
|
+
partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
|
|
3315
|
+
manager_id: (a = p.manager) == null ? void 0 : a.id,
|
|
3243
3316
|
comment: p.comment,
|
|
3244
3317
|
inn: p.inn,
|
|
3245
3318
|
kpp: p.kpp,
|
|
@@ -3260,8 +3333,8 @@ class Pt extends we {
|
|
|
3260
3333
|
opf: e.opf.slug,
|
|
3261
3334
|
name: e.name,
|
|
3262
3335
|
alternative_name: e.alternativeName,
|
|
3263
|
-
partner_group_id: (
|
|
3264
|
-
manager_id: (
|
|
3336
|
+
partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
|
|
3337
|
+
manager_id: (N = e.manager) == null ? void 0 : N.id,
|
|
3265
3338
|
comment: e.comment
|
|
3266
3339
|
};
|
|
3267
3340
|
break;
|
|
@@ -3269,7 +3342,7 @@ class Pt extends we {
|
|
|
3269
3342
|
return this.patch(
|
|
3270
3343
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
3271
3344
|
i,
|
|
3272
|
-
(O) =>
|
|
3345
|
+
(O) => pe.createInstance(O.data),
|
|
3273
3346
|
s
|
|
3274
3347
|
);
|
|
3275
3348
|
}
|
|
@@ -3307,7 +3380,7 @@ class Pt extends we {
|
|
|
3307
3380
|
}), e.operatingHours && (i.operating_hours = {
|
|
3308
3381
|
from: e.operatingHours.from,
|
|
3309
3382
|
to: e.operatingHours.to
|
|
3310
|
-
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new
|
|
3383
|
+
}), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new ue(p.data), s);
|
|
3311
3384
|
}
|
|
3312
3385
|
/**
|
|
3313
3386
|
* Обновляет данные об адресе доставки клиента.
|
|
@@ -3336,7 +3409,7 @@ class Pt extends we {
|
|
|
3336
3409
|
}), this.patch(
|
|
3337
3410
|
`/internal/clients/${r}/delivery-addresses/${e.id}`,
|
|
3338
3411
|
i,
|
|
3339
|
-
(p) => new
|
|
3412
|
+
(p) => new ue(p.data),
|
|
3340
3413
|
s
|
|
3341
3414
|
);
|
|
3342
3415
|
}
|
|
@@ -3372,7 +3445,7 @@ class Pt extends we {
|
|
|
3372
3445
|
correspondent_account: s.correspondentAccount,
|
|
3373
3446
|
currency_id: s.currency.id
|
|
3374
3447
|
},
|
|
3375
|
-
(o) => new
|
|
3448
|
+
(o) => new Ae(o.data),
|
|
3376
3449
|
i
|
|
3377
3450
|
);
|
|
3378
3451
|
}
|
|
@@ -3398,7 +3471,7 @@ class Pt extends we {
|
|
|
3398
3471
|
correspondent_account: s.correspondentAccount,
|
|
3399
3472
|
currency_id: s.currency.id
|
|
3400
3473
|
},
|
|
3401
|
-
(o) => new
|
|
3474
|
+
(o) => new Ae(o.data),
|
|
3402
3475
|
i
|
|
3403
3476
|
);
|
|
3404
3477
|
}
|
|
@@ -3459,7 +3532,7 @@ class Pt extends we {
|
|
|
3459
3532
|
comment: e.comment,
|
|
3460
3533
|
not_disturb: e.notDisturb
|
|
3461
3534
|
},
|
|
3462
|
-
(i) => new
|
|
3535
|
+
(i) => new M(i.data),
|
|
3463
3536
|
s
|
|
3464
3537
|
);
|
|
3465
3538
|
}
|
|
@@ -3602,7 +3675,7 @@ class Pt extends we {
|
|
|
3602
3675
|
comment: e.comment,
|
|
3603
3676
|
...s
|
|
3604
3677
|
};
|
|
3605
|
-
return (l = e.phone) != null && l.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (g) => new
|
|
3678
|
+
return (l = e.phone) != null && l.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (g) => new M(g.data), i);
|
|
3606
3679
|
}
|
|
3607
3680
|
/**
|
|
3608
3681
|
* Устанавливает признак основного контактного лица.
|
|
@@ -3645,7 +3718,7 @@ class Rt extends u {
|
|
|
3645
3718
|
});
|
|
3646
3719
|
}
|
|
3647
3720
|
}
|
|
3648
|
-
class
|
|
3721
|
+
class Pe {
|
|
3649
3722
|
/**
|
|
3650
3723
|
* Инициализирует экземпляр класса {@link PriceAnalyze}.
|
|
3651
3724
|
*
|
|
@@ -3672,10 +3745,10 @@ class ae {
|
|
|
3672
3745
|
* Источник клиентской цены.
|
|
3673
3746
|
*/
|
|
3674
3747
|
t(this, "source");
|
|
3675
|
-
this.client = new
|
|
3748
|
+
this.client = new te(r == null ? void 0 : r.client), this.product = new S(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? _e.Product;
|
|
3676
3749
|
}
|
|
3677
3750
|
}
|
|
3678
|
-
class
|
|
3751
|
+
class Dt extends u {
|
|
3679
3752
|
/**
|
|
3680
3753
|
* Возвращает данные о результатах поиска категорий и товаров.
|
|
3681
3754
|
*
|
|
@@ -3702,7 +3775,7 @@ class at extends u {
|
|
|
3702
3775
|
*/
|
|
3703
3776
|
// eslint-disable-next-line class-methods-use-this
|
|
3704
3777
|
getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
|
|
3705
|
-
let l = `${
|
|
3778
|
+
let l = `${x.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
3706
3779
|
return s && (l += `&category_id=${s}`), i && (l += `&client_id=${i}`), l;
|
|
3707
3780
|
}
|
|
3708
3781
|
}
|
|
@@ -3830,7 +3903,7 @@ class $t extends u {
|
|
|
3830
3903
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
3831
3904
|
increase_percent: s.value
|
|
3832
3905
|
},
|
|
3833
|
-
(o) => new
|
|
3906
|
+
(o) => new K(o.data)
|
|
3834
3907
|
);
|
|
3835
3908
|
}
|
|
3836
3909
|
/**
|
|
@@ -3842,7 +3915,7 @@ class $t extends u {
|
|
|
3842
3915
|
* @see /doc/api/internal#/operations/api_internal_client_price_products_remove
|
|
3843
3916
|
*/
|
|
3844
3917
|
removeProductPrice(r, e) {
|
|
3845
|
-
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new
|
|
3918
|
+
return this.delete(`/internal/clients/${r}/price/products/${e}`, (s) => new K(s.data));
|
|
3846
3919
|
}
|
|
3847
3920
|
/**
|
|
3848
3921
|
* Добавляет указанный продукт в список товаров для дополнительных продаж.
|
|
@@ -3905,7 +3978,7 @@ class $t extends u {
|
|
|
3905
3978
|
return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
|
|
3906
3979
|
}
|
|
3907
3980
|
}
|
|
3908
|
-
class
|
|
3981
|
+
class At extends u {
|
|
3909
3982
|
/**
|
|
3910
3983
|
* Возвращает список шаблонов прайс-листа привязанных к клиенту.
|
|
3911
3984
|
*
|
|
@@ -3917,7 +3990,7 @@ class Dt extends u {
|
|
|
3917
3990
|
return this.get(
|
|
3918
3991
|
`/internal/clients/${r}/price/templates`,
|
|
3919
3992
|
{},
|
|
3920
|
-
(e) => e.data.map((s) => new
|
|
3993
|
+
(e) => e.data.map((s) => new Q(s))
|
|
3921
3994
|
);
|
|
3922
3995
|
}
|
|
3923
3996
|
/**
|
|
@@ -3928,7 +4001,7 @@ class Dt extends u {
|
|
|
3928
4001
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
|
|
3929
4002
|
*/
|
|
3930
4003
|
getActiveTemplate(r) {
|
|
3931
|
-
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new
|
|
4004
|
+
return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Q(e.data));
|
|
3932
4005
|
}
|
|
3933
4006
|
/**
|
|
3934
4007
|
* Добавляет связь между клиентом и шаблоном прайс-листа.
|
|
@@ -3940,13 +4013,14 @@ class Dt extends u {
|
|
|
3940
4013
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
3941
4014
|
*/
|
|
3942
4015
|
attachTemplate(r, e, s) {
|
|
4016
|
+
const { apiDateFormat: i } = x.getConfig();
|
|
3943
4017
|
return this.post(
|
|
3944
4018
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
3945
4019
|
s && {
|
|
3946
|
-
startAt: s.startAt
|
|
3947
|
-
endAt: s.endAt
|
|
4020
|
+
startAt: s.startAt && z(s.startAt, i),
|
|
4021
|
+
endAt: s.endAt && z(s.endAt, i)
|
|
3948
4022
|
},
|
|
3949
|
-
(
|
|
4023
|
+
(o) => new Q(o.data)
|
|
3950
4024
|
);
|
|
3951
4025
|
}
|
|
3952
4026
|
/**
|
|
@@ -3974,10 +4048,10 @@ class Dt extends u {
|
|
|
3974
4048
|
return this.patch(
|
|
3975
4049
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
3976
4050
|
i && {
|
|
3977
|
-
startAt: i.startAt ?
|
|
3978
|
-
endAt: i.endAt ?
|
|
4051
|
+
startAt: i.startAt ? z(i.startAt, "yyyy-MM-dd HH:mm:ss") : void 0,
|
|
4052
|
+
endAt: i.endAt ? z(i.endAt, "yyyy-MM-dd HH:mm:ss") : void 0
|
|
3979
4053
|
},
|
|
3980
|
-
(o) => new
|
|
4054
|
+
(o) => new Q(o.data)
|
|
3981
4055
|
);
|
|
3982
4056
|
}
|
|
3983
4057
|
/**
|
|
@@ -3993,7 +4067,7 @@ class Dt extends u {
|
|
|
3993
4067
|
return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
|
|
3994
4068
|
}
|
|
3995
4069
|
}
|
|
3996
|
-
class
|
|
4070
|
+
class Tt extends u {
|
|
3997
4071
|
/**
|
|
3998
4072
|
* Возвращает список данных о корневых категориях.
|
|
3999
4073
|
*
|
|
@@ -4007,7 +4081,7 @@ class At extends u {
|
|
|
4007
4081
|
{
|
|
4008
4082
|
showHidden: r
|
|
4009
4083
|
},
|
|
4010
|
-
(e) => e.data.map((s) => new
|
|
4084
|
+
(e) => e.data.map((s) => new d(s))
|
|
4011
4085
|
);
|
|
4012
4086
|
}
|
|
4013
4087
|
/**
|
|
@@ -4026,7 +4100,7 @@ class At extends u {
|
|
|
4026
4100
|
showHidden: e,
|
|
4027
4101
|
withNestedCategories: s
|
|
4028
4102
|
},
|
|
4029
|
-
(i) => new
|
|
4103
|
+
(i) => new d(i.data)
|
|
4030
4104
|
);
|
|
4031
4105
|
}
|
|
4032
4106
|
/**
|
|
@@ -4035,7 +4109,7 @@ class At extends u {
|
|
|
4035
4109
|
* @param categoryID Идентификатор категории продуктов.
|
|
4036
4110
|
*/
|
|
4037
4111
|
getPublicCategoryData(r) {
|
|
4038
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
4112
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new d(e.data));
|
|
4039
4113
|
}
|
|
4040
4114
|
/**
|
|
4041
4115
|
* Возвращает список продуктов категории.
|
|
@@ -4053,7 +4127,7 @@ class At extends u {
|
|
|
4053
4127
|
showHidden: s,
|
|
4054
4128
|
withPriceCoefficients: e
|
|
4055
4129
|
},
|
|
4056
|
-
(i) =>
|
|
4130
|
+
(i) => ie(i.data, (o) => new S(o))
|
|
4057
4131
|
);
|
|
4058
4132
|
}
|
|
4059
4133
|
/**
|
|
@@ -4066,7 +4140,7 @@ class At extends u {
|
|
|
4066
4140
|
getCategoryProductsCoefficients(r) {
|
|
4067
4141
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
4068
4142
|
const { data: s } = e;
|
|
4069
|
-
return pr(s, (i) => i.map((o) => new
|
|
4143
|
+
return pr(s, (i) => i.map((o) => new be(o))), s;
|
|
4070
4144
|
});
|
|
4071
4145
|
}
|
|
4072
4146
|
/**
|
|
@@ -4078,14 +4152,14 @@ class At extends u {
|
|
|
4078
4152
|
publicSimpleSearch(r, e = 10) {
|
|
4079
4153
|
return new Promise((s, i) => {
|
|
4080
4154
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
4081
|
-
s(o.categories.map((l) => new
|
|
4155
|
+
s(o.categories.map((l) => new d(l)));
|
|
4082
4156
|
}).catch((o) => {
|
|
4083
4157
|
i(o);
|
|
4084
4158
|
});
|
|
4085
4159
|
});
|
|
4086
4160
|
}
|
|
4087
4161
|
}
|
|
4088
|
-
class
|
|
4162
|
+
class bt extends u {
|
|
4089
4163
|
/**
|
|
4090
4164
|
* Возвращает данные об указанном продукте.
|
|
4091
4165
|
*
|
|
@@ -4095,7 +4169,7 @@ class Tt extends u {
|
|
|
4095
4169
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
4096
4170
|
*/
|
|
4097
4171
|
getProductData(r, e = !1) {
|
|
4098
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
4172
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new S(s.data));
|
|
4099
4173
|
}
|
|
4100
4174
|
/**
|
|
4101
4175
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -4103,7 +4177,7 @@ class Tt extends u {
|
|
|
4103
4177
|
* @param productId Идентификатор продукта.
|
|
4104
4178
|
*/
|
|
4105
4179
|
getPublicProductData(r) {
|
|
4106
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
4180
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new S(e.data));
|
|
4107
4181
|
}
|
|
4108
4182
|
/**
|
|
4109
4183
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -4116,7 +4190,7 @@ class Tt extends u {
|
|
|
4116
4190
|
return this.get(
|
|
4117
4191
|
`/internal/catalog/products/${r}/coefficients`,
|
|
4118
4192
|
{},
|
|
4119
|
-
(e) =>
|
|
4193
|
+
(e) => ie(e.data, (s) => new be(s))
|
|
4120
4194
|
);
|
|
4121
4195
|
}
|
|
4122
4196
|
/**
|
|
@@ -4129,7 +4203,7 @@ class Tt extends u {
|
|
|
4129
4203
|
*/
|
|
4130
4204
|
getProductPriceHistory(r, e) {
|
|
4131
4205
|
const s = {};
|
|
4132
|
-
return
|
|
4206
|
+
return qe(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ie(i.data, (o) => new Vr(o)));
|
|
4133
4207
|
}
|
|
4134
4208
|
/**
|
|
4135
4209
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -4140,14 +4214,14 @@ class Tt extends u {
|
|
|
4140
4214
|
publicSimpleSearch(r, e = 10) {
|
|
4141
4215
|
return new Promise((s, i) => {
|
|
4142
4216
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
4143
|
-
s(o.products.map((l) => new
|
|
4217
|
+
s(o.products.map((l) => new S(l)));
|
|
4144
4218
|
}).catch((o) => {
|
|
4145
4219
|
i(o);
|
|
4146
4220
|
});
|
|
4147
4221
|
});
|
|
4148
4222
|
}
|
|
4149
4223
|
}
|
|
4150
|
-
class
|
|
4224
|
+
class at extends u {
|
|
4151
4225
|
/**
|
|
4152
4226
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
4153
4227
|
*
|
|
@@ -4163,7 +4237,7 @@ class bt extends u {
|
|
|
4163
4237
|
clientId: r,
|
|
4164
4238
|
showHidden: e
|
|
4165
4239
|
},
|
|
4166
|
-
(s) => s.data.map((i) => new
|
|
4240
|
+
(s) => s.data.map((i) => new oe(i))
|
|
4167
4241
|
);
|
|
4168
4242
|
}
|
|
4169
4243
|
/**
|
|
@@ -4184,7 +4258,7 @@ class bt extends u {
|
|
|
4184
4258
|
showHidden: s,
|
|
4185
4259
|
withNestedCategories: i
|
|
4186
4260
|
},
|
|
4187
|
-
(o) => new
|
|
4261
|
+
(o) => new oe(o.data)
|
|
4188
4262
|
);
|
|
4189
4263
|
}
|
|
4190
4264
|
/**
|
|
@@ -4205,7 +4279,7 @@ class bt extends u {
|
|
|
4205
4279
|
showHidden: i,
|
|
4206
4280
|
withPriceCoefficients: s
|
|
4207
4281
|
},
|
|
4208
|
-
(o) =>
|
|
4282
|
+
(o) => ie(o.data, (l) => new K(l))
|
|
4209
4283
|
);
|
|
4210
4284
|
}
|
|
4211
4285
|
}
|
|
@@ -4226,11 +4300,11 @@ class _t extends u {
|
|
|
4226
4300
|
clientId: e,
|
|
4227
4301
|
withPriceCoefficients: s
|
|
4228
4302
|
},
|
|
4229
|
-
(i) => new
|
|
4303
|
+
(i) => new K(i.data)
|
|
4230
4304
|
);
|
|
4231
4305
|
}
|
|
4232
4306
|
}
|
|
4233
|
-
class St extends
|
|
4307
|
+
class St extends ye {
|
|
4234
4308
|
/**
|
|
4235
4309
|
* Возвращает список шаблонов прайс-листа.
|
|
4236
4310
|
*
|
|
@@ -4298,7 +4372,7 @@ class St extends we {
|
|
|
4298
4372
|
return this.get(
|
|
4299
4373
|
`/internal/price/templates/${r}/products`,
|
|
4300
4374
|
{},
|
|
4301
|
-
(e) => e.data.map((s) => new
|
|
4375
|
+
(e) => e.data.map((s) => new we(s))
|
|
4302
4376
|
);
|
|
4303
4377
|
}
|
|
4304
4378
|
/**
|
|
@@ -4310,7 +4384,7 @@ class St extends we {
|
|
|
4310
4384
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
|
|
4311
4385
|
*/
|
|
4312
4386
|
getProductTemplatePrice(r, e) {
|
|
4313
|
-
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new
|
|
4387
|
+
return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new we(s.data));
|
|
4314
4388
|
}
|
|
4315
4389
|
/**
|
|
4316
4390
|
* Сохраняет цену на продукт в шаблоне прайс-листа.
|
|
@@ -4329,7 +4403,7 @@ class St extends we {
|
|
|
4329
4403
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
4330
4404
|
increase_percent: s.value
|
|
4331
4405
|
},
|
|
4332
|
-
(o) => new
|
|
4406
|
+
(o) => new we(o.data)
|
|
4333
4407
|
);
|
|
4334
4408
|
}
|
|
4335
4409
|
/**
|
|
@@ -4354,7 +4428,7 @@ class St extends we {
|
|
|
4354
4428
|
return this.get(
|
|
4355
4429
|
`/internal/price/templates/${r}/categories`,
|
|
4356
4430
|
{},
|
|
4357
|
-
(e) => e.data.map((s) => new
|
|
4431
|
+
(e) => e.data.map((s) => new Ce(s))
|
|
4358
4432
|
);
|
|
4359
4433
|
}
|
|
4360
4434
|
/**
|
|
@@ -4369,7 +4443,7 @@ class St extends we {
|
|
|
4369
4443
|
return this.get(
|
|
4370
4444
|
`/internal/price/templates/${r}/categories/${e}`,
|
|
4371
4445
|
{},
|
|
4372
|
-
(s) => new
|
|
4446
|
+
(s) => new Ce(s.data)
|
|
4373
4447
|
);
|
|
4374
4448
|
}
|
|
4375
4449
|
/**
|
|
@@ -4389,7 +4463,7 @@ class St extends we {
|
|
|
4389
4463
|
price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
|
|
4390
4464
|
increase_percent: s.value
|
|
4391
4465
|
},
|
|
4392
|
-
(o) => new
|
|
4466
|
+
(o) => new Ce(o.data)
|
|
4393
4467
|
);
|
|
4394
4468
|
}
|
|
4395
4469
|
/**
|
|
@@ -4414,7 +4488,7 @@ class St extends we {
|
|
|
4414
4488
|
return this.get(
|
|
4415
4489
|
`/internal/price/templates/${r}/clients`,
|
|
4416
4490
|
{},
|
|
4417
|
-
(e) => e.data.map((s) => new
|
|
4491
|
+
(e) => e.data.map((s) => new Q(s))
|
|
4418
4492
|
);
|
|
4419
4493
|
}
|
|
4420
4494
|
}
|
|
@@ -4425,7 +4499,7 @@ class Lt extends u {
|
|
|
4425
4499
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
|
|
4426
4500
|
*/
|
|
4427
4501
|
getRoles() {
|
|
4428
|
-
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new
|
|
4502
|
+
return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new X(e)));
|
|
4429
4503
|
}
|
|
4430
4504
|
/**
|
|
4431
4505
|
* Добавляет новую роль ценообразования.
|
|
@@ -4435,7 +4509,7 @@ class Lt extends u {
|
|
|
4435
4509
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
|
|
4436
4510
|
*/
|
|
4437
4511
|
createRole(r) {
|
|
4438
|
-
return this.post("/internal/price/roles", r, (e) => new
|
|
4512
|
+
return this.post("/internal/price/roles", r, (e) => new X(e.data));
|
|
4439
4513
|
}
|
|
4440
4514
|
/**
|
|
4441
4515
|
* Возвращает данные роли ценообразования.
|
|
@@ -4445,7 +4519,7 @@ class Lt extends u {
|
|
|
4445
4519
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
|
|
4446
4520
|
*/
|
|
4447
4521
|
getRole(r) {
|
|
4448
|
-
return this.get(`/internal/price/roles/${r}`, {}, (e) => new
|
|
4522
|
+
return this.get(`/internal/price/roles/${r}`, {}, (e) => new X(e.data));
|
|
4449
4523
|
}
|
|
4450
4524
|
/**
|
|
4451
4525
|
* Обновляет данные роли ценообразования.
|
|
@@ -4456,7 +4530,7 @@ class Lt extends u {
|
|
|
4456
4530
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
|
|
4457
4531
|
*/
|
|
4458
4532
|
updateRole(r, e) {
|
|
4459
|
-
return this.patch(`/internal/price/roles/${r}`, e, (s) => new
|
|
4533
|
+
return this.patch(`/internal/price/roles/${r}`, e, (s) => new X(s.data));
|
|
4460
4534
|
}
|
|
4461
4535
|
/**
|
|
4462
4536
|
* Удаляет роль ценообразования.
|
|
@@ -4479,7 +4553,7 @@ class Lt extends u {
|
|
|
4479
4553
|
return this.get(
|
|
4480
4554
|
`/internal/price/roles/rules/categories/${r}`,
|
|
4481
4555
|
{},
|
|
4482
|
-
(e) => e.data.map((s) => new
|
|
4556
|
+
(e) => e.data.map((s) => new Ie(s))
|
|
4483
4557
|
);
|
|
4484
4558
|
}
|
|
4485
4559
|
/**
|
|
@@ -4494,11 +4568,11 @@ class Lt extends u {
|
|
|
4494
4568
|
return this.patch(
|
|
4495
4569
|
`/internal/price/roles/rules/categories/${r}`,
|
|
4496
4570
|
e,
|
|
4497
|
-
(s) => s.data.map((i) => new
|
|
4571
|
+
(s) => s.data.map((i) => new Ie(i))
|
|
4498
4572
|
);
|
|
4499
4573
|
}
|
|
4500
4574
|
}
|
|
4501
|
-
class
|
|
4575
|
+
class xt extends ye {
|
|
4502
4576
|
/**
|
|
4503
4577
|
* Возвращает пагинированный список свойств.
|
|
4504
4578
|
*
|
|
@@ -4510,7 +4584,7 @@ class dt extends we {
|
|
|
4510
4584
|
getProperties(r, e, s) {
|
|
4511
4585
|
return this.getPaginated("/internal/catalog/properties", r, e, s, (i) => {
|
|
4512
4586
|
const o = { ...i.data };
|
|
4513
|
-
return o.data = o.data.map((l) => new
|
|
4587
|
+
return o.data = o.data.map((l) => new Y(l)), o;
|
|
4514
4588
|
});
|
|
4515
4589
|
}
|
|
4516
4590
|
/**
|
|
@@ -4527,7 +4601,7 @@ class dt extends we {
|
|
|
4527
4601
|
...s,
|
|
4528
4602
|
type: e
|
|
4529
4603
|
},
|
|
4530
|
-
(i) => new
|
|
4604
|
+
(i) => new Y(i.data)
|
|
4531
4605
|
);
|
|
4532
4606
|
}
|
|
4533
4607
|
/**
|
|
@@ -4537,7 +4611,7 @@ class dt extends we {
|
|
|
4537
4611
|
* @see /doc/api/internal#/operations/api_internal_catalog_properties_get
|
|
4538
4612
|
*/
|
|
4539
4613
|
getProperty(r) {
|
|
4540
|
-
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new
|
|
4614
|
+
return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new Y(e.data));
|
|
4541
4615
|
}
|
|
4542
4616
|
/**
|
|
4543
4617
|
* Обновляет существующее свойство.
|
|
@@ -4554,7 +4628,7 @@ class dt extends we {
|
|
|
4554
4628
|
...i,
|
|
4555
4629
|
type: s
|
|
4556
4630
|
},
|
|
4557
|
-
(o) => new
|
|
4631
|
+
(o) => new Y(o.data)
|
|
4558
4632
|
);
|
|
4559
4633
|
}
|
|
4560
4634
|
/**
|
|
@@ -4573,7 +4647,7 @@ class dt extends we {
|
|
|
4573
4647
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
4574
4648
|
*/
|
|
4575
4649
|
getProductProperties(r) {
|
|
4576
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
4650
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new F(s)));
|
|
4577
4651
|
}
|
|
4578
4652
|
/**
|
|
4579
4653
|
* Возвращает значение свойства продукта.
|
|
@@ -4583,7 +4657,7 @@ class dt extends we {
|
|
|
4583
4657
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
4584
4658
|
*/
|
|
4585
4659
|
getProductProperty(r, e) {
|
|
4586
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
4660
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new F(s.data));
|
|
4587
4661
|
}
|
|
4588
4662
|
/**
|
|
4589
4663
|
* Обновляет значение свойства продукта.
|
|
@@ -4594,7 +4668,7 @@ class dt extends we {
|
|
|
4594
4668
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
4595
4669
|
*/
|
|
4596
4670
|
updateProductProperty(r, e, s) {
|
|
4597
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
4671
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new F(i.data));
|
|
4598
4672
|
}
|
|
4599
4673
|
/**
|
|
4600
4674
|
* Удаляет значение свойства продукта.
|
|
@@ -4719,7 +4793,7 @@ class dt extends we {
|
|
|
4719
4793
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
4720
4794
|
*/
|
|
4721
4795
|
getCategoryProperties(r) {
|
|
4722
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
4796
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new F(s)));
|
|
4723
4797
|
}
|
|
4724
4798
|
/**
|
|
4725
4799
|
* Возвращает значение свойства категории.
|
|
@@ -4729,7 +4803,7 @@ class dt extends we {
|
|
|
4729
4803
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
4730
4804
|
*/
|
|
4731
4805
|
getCategoryProperty(r, e) {
|
|
4732
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
4806
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new F(s.data));
|
|
4733
4807
|
}
|
|
4734
4808
|
/**
|
|
4735
4809
|
* Обновляет значение свойства категории.
|
|
@@ -4740,7 +4814,7 @@ class dt extends we {
|
|
|
4740
4814
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
4741
4815
|
*/
|
|
4742
4816
|
updateCategoryProperty(r, e, s) {
|
|
4743
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
4817
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new F(i.data));
|
|
4744
4818
|
}
|
|
4745
4819
|
/**
|
|
4746
4820
|
* Удаляет значение свойства категории.
|
|
@@ -4869,14 +4943,14 @@ class dt extends we {
|
|
|
4869
4943
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
4870
4944
|
}
|
|
4871
4945
|
}
|
|
4872
|
-
class
|
|
4946
|
+
class It extends u {
|
|
4873
4947
|
/**
|
|
4874
4948
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
4875
4949
|
*
|
|
4876
4950
|
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
4877
4951
|
*/
|
|
4878
4952
|
getProductCategoryRecommendations(r) {
|
|
4879
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
4953
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new xe(e.data));
|
|
4880
4954
|
}
|
|
4881
4955
|
/**
|
|
4882
4956
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -4884,7 +4958,7 @@ class xt extends u {
|
|
|
4884
4958
|
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
4885
4959
|
*/
|
|
4886
4960
|
getProductRecommendations(r) {
|
|
4887
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
4961
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new xe(e.data));
|
|
4888
4962
|
}
|
|
4889
4963
|
/**
|
|
4890
4964
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -4911,7 +4985,7 @@ class xt extends u {
|
|
|
4911
4985
|
});
|
|
4912
4986
|
}
|
|
4913
4987
|
}
|
|
4914
|
-
class
|
|
4988
|
+
class kt extends u {
|
|
4915
4989
|
/**
|
|
4916
4990
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
4917
4991
|
*
|
|
@@ -4921,7 +4995,7 @@ class It extends u {
|
|
|
4921
4995
|
* @see /doc/api/internal#/operations/api_internal_catalog_price_products_analyze
|
|
4922
4996
|
*/
|
|
4923
4997
|
analyzeProductPrices(r, e) {
|
|
4924
|
-
return this.get(`/internal/price/products/${r}/analyze`, { ...e }, (s) => s.data.map((i) => new
|
|
4998
|
+
return this.get(`/internal/price/products/${r}/analyze`, { ...e }, (s) => s.data.map((i) => new Pe(i)));
|
|
4925
4999
|
}
|
|
4926
5000
|
/**
|
|
4927
5001
|
* Возвращает список клиентских цен на продукты категории в указанном диапазоне цены.
|
|
@@ -4935,7 +5009,7 @@ class It extends u {
|
|
|
4935
5009
|
return this.get(
|
|
4936
5010
|
`/internal/price/categories/${r}/analyze`,
|
|
4937
5011
|
{ ...e },
|
|
4938
|
-
(s) => s.data.map((i) => new
|
|
5012
|
+
(s) => s.data.map((i) => new Pe(i))
|
|
4939
5013
|
);
|
|
4940
5014
|
}
|
|
4941
5015
|
/**
|
|
@@ -4952,11 +5026,11 @@ class It extends u {
|
|
|
4952
5026
|
return this.get(
|
|
4953
5027
|
`/internal/price/categories/${r}/analyze/square`,
|
|
4954
5028
|
{ ...e },
|
|
4955
|
-
(s) => s.data.map((i) => new
|
|
5029
|
+
(s) => s.data.map((i) => new Pe(i))
|
|
4956
5030
|
);
|
|
4957
5031
|
}
|
|
4958
5032
|
}
|
|
4959
|
-
class
|
|
5033
|
+
class Nt extends u {
|
|
4960
5034
|
/**
|
|
4961
5035
|
* Возвращает настройки указанного конфигуратора для указанной категории.
|
|
4962
5036
|
*
|
|
@@ -4984,7 +5058,7 @@ class kt extends u {
|
|
|
4984
5058
|
const i = this.get(
|
|
4985
5059
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
4986
5060
|
{ params: e },
|
|
4987
|
-
(l) => new
|
|
5061
|
+
(l) => new S(l.data)
|
|
4988
5062
|
);
|
|
4989
5063
|
return i.catch((l) => {
|
|
4990
5064
|
this.defaultInstanceNotificationErrorResponseHandler(l, s);
|
|
@@ -5027,23 +5101,18 @@ class kt extends u {
|
|
|
5027
5101
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
5028
5102
|
}
|
|
5029
5103
|
}
|
|
5030
|
-
class
|
|
5104
|
+
class Ot {
|
|
5031
5105
|
/**
|
|
5032
|
-
* Возвращает
|
|
5033
|
-
*
|
|
5034
|
-
* Особое внимание необходимо обратить на значения дат.
|
|
5035
|
-
* Они возвращаются в формате Unix Timestamp в секундах.
|
|
5036
|
-
* JavaScript Unix Timestamp измеряется в миллисекундах.
|
|
5037
|
-
* Для пересчета в JavaScript Unix Timestamp значение необходимо умножить на 1000.
|
|
5106
|
+
* Возвращает диапазон дат по умолчанию.
|
|
5038
5107
|
*/
|
|
5039
5108
|
static defaultDateRanges() {
|
|
5040
|
-
const r =
|
|
5109
|
+
const r = gr(/* @__PURE__ */ new Date(), 1);
|
|
5041
5110
|
return {
|
|
5042
5111
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5043
|
-
nextWorkingDay: { label: "Следующий рабочий день", from:
|
|
5044
|
-
today: { label: "Сегодня", from:
|
|
5045
|
-
yesterday: { label: "Вчера", from:
|
|
5046
|
-
tomorrow: { label: "Завтра", from:
|
|
5112
|
+
nextWorkingDay: { label: "Следующий рабочий день", from: Pr(r), to: vr(r) },
|
|
5113
|
+
today: { label: "Сегодня", from: Ge(), to: wr() },
|
|
5114
|
+
yesterday: { label: "Вчера", from: Cr(), to: yr() },
|
|
5115
|
+
tomorrow: { label: "Завтра", from: fr(), to: mr() }
|
|
5047
5116
|
};
|
|
5048
5117
|
}
|
|
5049
5118
|
}
|
|
@@ -5088,12 +5157,12 @@ const V = class V {
|
|
|
5088
5157
|
*/
|
|
5089
5158
|
t(V, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5090
5159
|
let Oe = V;
|
|
5091
|
-
class
|
|
5160
|
+
class dt {
|
|
5092
5161
|
/**
|
|
5093
5162
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5094
5163
|
*/
|
|
5095
5164
|
static generateUndefinedManagerInstance() {
|
|
5096
|
-
return new
|
|
5165
|
+
return new fe({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
|
|
5097
5166
|
}
|
|
5098
5167
|
/**
|
|
5099
5168
|
* Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
|
|
@@ -5111,7 +5180,7 @@ class rt extends u {
|
|
|
5111
5180
|
getManagers() {
|
|
5112
5181
|
const r = "/internal/managers", e = u.getCachedResponse(r);
|
|
5113
5182
|
return e ? Promise.resolve(e) : this.get(r).then((s) => {
|
|
5114
|
-
const i = s.data.map((o) =>
|
|
5183
|
+
const i = s.data.map((o) => ae.instanceInitializer(fe, o));
|
|
5115
5184
|
return i && this.cacheResponse(r, i), i;
|
|
5116
5185
|
});
|
|
5117
5186
|
}
|
|
@@ -5134,7 +5203,7 @@ class tt {
|
|
|
5134
5203
|
this.name = r.name, this.content = r.content;
|
|
5135
5204
|
}
|
|
5136
5205
|
}
|
|
5137
|
-
class
|
|
5206
|
+
class de {
|
|
5138
5207
|
/**
|
|
5139
5208
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5140
5209
|
*
|
|
@@ -5170,7 +5239,7 @@ class qe {
|
|
|
5170
5239
|
*/
|
|
5171
5240
|
t(this, "meta");
|
|
5172
5241
|
var e;
|
|
5173
|
-
this.resourceType = new
|
|
5242
|
+
this.resourceType = new Ee(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new tt(s))) ?? [];
|
|
5174
5243
|
}
|
|
5175
5244
|
}
|
|
5176
5245
|
class qt extends u {
|
|
@@ -5181,7 +5250,7 @@ class qt extends u {
|
|
|
5181
5250
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
5182
5251
|
*/
|
|
5183
5252
|
getResourceSeoData(r, e) {
|
|
5184
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
5253
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new de(s.data));
|
|
5185
5254
|
}
|
|
5186
5255
|
/**
|
|
5187
5256
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -5192,7 +5261,7 @@ class qt extends u {
|
|
|
5192
5261
|
* в случае ошибок в запросах.
|
|
5193
5262
|
*/
|
|
5194
5263
|
saveResourceSeoData(r, e = {}) {
|
|
5195
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
5264
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new de(s.data), e);
|
|
5196
5265
|
}
|
|
5197
5266
|
/**
|
|
5198
5267
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -5204,8 +5273,8 @@ class qt extends u {
|
|
|
5204
5273
|
return this.delete(`/internal/seo/${r.slug}/${e}`);
|
|
5205
5274
|
}
|
|
5206
5275
|
}
|
|
5207
|
-
const
|
|
5208
|
-
const n =
|
|
5276
|
+
const R = he("__references_private", () => {
|
|
5277
|
+
const n = w({}), r = w(void 0), e = w(void 0), s = w(void 0), i = w(void 0), o = w(void 0), l = w(void 0), p = w(void 0), g = w(void 0), v = w(void 0), $ = w(void 0), T = w(void 0), b = w(void 0), a = w(void 0), k = w(void 0), N = w(void 0), O = w(void 0), c = w(void 0);
|
|
5209
5278
|
return {
|
|
5210
5279
|
/**
|
|
5211
5280
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5254,23 +5323,23 @@ const P = ge("__references_private", () => {
|
|
|
5254
5323
|
/**
|
|
5255
5324
|
* Справочник типов файлов продукктов/категорий.
|
|
5256
5325
|
*/
|
|
5257
|
-
productFileTypeReference:
|
|
5326
|
+
productFileTypeReference: T,
|
|
5258
5327
|
/**
|
|
5259
5328
|
* Справочник типов ресурсов.
|
|
5260
5329
|
*/
|
|
5261
|
-
resourceTypesReference:
|
|
5330
|
+
resourceTypesReference: b,
|
|
5262
5331
|
/**
|
|
5263
5332
|
* Справочник направлений продаж.
|
|
5264
5333
|
*/
|
|
5265
|
-
salesDirectionsReference:
|
|
5334
|
+
salesDirectionsReference: a,
|
|
5266
5335
|
/**
|
|
5267
5336
|
* Справочник источников первичного интереса.
|
|
5268
5337
|
*/
|
|
5269
|
-
sourcePrimaryInterestReference:
|
|
5338
|
+
sourcePrimaryInterestReference: k,
|
|
5270
5339
|
/**
|
|
5271
5340
|
* Справочник складов.
|
|
5272
5341
|
*/
|
|
5273
|
-
warehousesReference:
|
|
5342
|
+
warehousesReference: N,
|
|
5274
5343
|
/**
|
|
5275
5344
|
* Справочник типов свойств.
|
|
5276
5345
|
*/
|
|
@@ -5280,92 +5349,92 @@ const P = ge("__references_private", () => {
|
|
|
5280
5349
|
*/
|
|
5281
5350
|
priceCoefficientsReference: c
|
|
5282
5351
|
};
|
|
5283
|
-
}),
|
|
5284
|
-
const n =
|
|
5285
|
-
const c =
|
|
5286
|
-
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(
|
|
5352
|
+
}), Ut = he("references", () => {
|
|
5353
|
+
const n = P(() => {
|
|
5354
|
+
const c = R();
|
|
5355
|
+
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(D).getChannelPrimaryInterest().then((h) => {
|
|
5287
5356
|
c.channelPrimaryInterestReference = h;
|
|
5288
|
-
}).catch(
|
|
5289
|
-
}), r =
|
|
5290
|
-
const c =
|
|
5291
|
-
return !c.contactPositionsReference && !c.dataLoaderList.contactPositionsReference && (c.dataLoaderList.contactPositionsReference = !0, u.getInstance(
|
|
5357
|
+
}).catch(y)), c.channelPrimaryInterestReference;
|
|
5358
|
+
}), r = P(() => {
|
|
5359
|
+
const c = R();
|
|
5360
|
+
return !c.contactPositionsReference && !c.dataLoaderList.contactPositionsReference && (c.dataLoaderList.contactPositionsReference = !0, u.getInstance(D).getContactPositions().then((h) => {
|
|
5292
5361
|
c.contactPositionsReference = h;
|
|
5293
|
-
}).catch(
|
|
5294
|
-
}), e =
|
|
5295
|
-
const c =
|
|
5296
|
-
return !c.currencyReference && !c.dataLoaderList.currencyReference && (c.dataLoaderList.currencyReference = !0, u.getInstance(
|
|
5362
|
+
}).catch(y)), c.contactPositionsReference;
|
|
5363
|
+
}), e = P(() => {
|
|
5364
|
+
const c = R();
|
|
5365
|
+
return !c.currencyReference && !c.dataLoaderList.currencyReference && (c.dataLoaderList.currencyReference = !0, u.getInstance(D).getCurrency().then((h) => {
|
|
5297
5366
|
c.currencyReference = h;
|
|
5298
|
-
}).catch(
|
|
5299
|
-
}), s =
|
|
5300
|
-
const c =
|
|
5301
|
-
return !c.opfReference && !c.dataLoaderList.opfReference && (c.dataLoaderList.opfReference = !0, u.getInstance(
|
|
5367
|
+
}).catch(y)), c.currencyReference;
|
|
5368
|
+
}), s = P(() => {
|
|
5369
|
+
const c = R();
|
|
5370
|
+
return !c.opfReference && !c.dataLoaderList.opfReference && (c.dataLoaderList.opfReference = !0, u.getInstance(D).getOpf().then((h) => {
|
|
5302
5371
|
c.opfReference = h;
|
|
5303
|
-
}).catch(
|
|
5304
|
-
}), i =
|
|
5305
|
-
const c =
|
|
5306
|
-
return !c.orderPaymentStatusReference && !c.dataLoaderList.orderPaymentStatusReference && (c.dataLoaderList.orderPaymentStatusReference = !0, u.getInstance(
|
|
5372
|
+
}).catch(y)), c.opfReference;
|
|
5373
|
+
}), i = P(() => {
|
|
5374
|
+
const c = R();
|
|
5375
|
+
return !c.orderPaymentStatusReference && !c.dataLoaderList.orderPaymentStatusReference && (c.dataLoaderList.orderPaymentStatusReference = !0, u.getInstance(D).getOrderPaymentStatuses().then((h) => {
|
|
5307
5376
|
c.orderPaymentStatusReference = h;
|
|
5308
|
-
}).catch(
|
|
5309
|
-
}), o =
|
|
5310
|
-
const c =
|
|
5311
|
-
return !c.orderStatusReference && !c.dataLoaderList.orderStatusReference && (c.dataLoaderList.orderStatusReference = !0, u.getInstance(
|
|
5377
|
+
}).catch(y)), c.orderPaymentStatusReference;
|
|
5378
|
+
}), o = P(() => {
|
|
5379
|
+
const c = R();
|
|
5380
|
+
return !c.orderStatusReference && !c.dataLoaderList.orderStatusReference && (c.dataLoaderList.orderStatusReference = !0, u.getInstance(D).getOrderStatuses().then((h) => {
|
|
5312
5381
|
c.orderStatusReference = h;
|
|
5313
|
-
}).catch(
|
|
5314
|
-
}), l =
|
|
5315
|
-
const c =
|
|
5316
|
-
return !c.paymentTypeReference && !c.dataLoaderList.paymentTypeReference && (c.dataLoaderList.paymentTypeReference = !0, u.getInstance(
|
|
5382
|
+
}).catch(y)), c.orderStatusReference;
|
|
5383
|
+
}), l = P(() => {
|
|
5384
|
+
const c = R();
|
|
5385
|
+
return !c.paymentTypeReference && !c.dataLoaderList.paymentTypeReference && (c.dataLoaderList.paymentTypeReference = !0, u.getInstance(D).getPaymentTypes().then((h) => {
|
|
5317
5386
|
c.paymentTypeReference = h;
|
|
5318
|
-
}).catch(
|
|
5319
|
-
}), p =
|
|
5320
|
-
const c =
|
|
5321
|
-
return !c.partnerGroupReference && !c.dataLoaderList.partnerGroupReference && (c.dataLoaderList.partnerGroupReference = !0, u.getInstance(
|
|
5387
|
+
}).catch(y)), c.paymentTypeReference;
|
|
5388
|
+
}), p = P(() => {
|
|
5389
|
+
const c = R();
|
|
5390
|
+
return !c.partnerGroupReference && !c.dataLoaderList.partnerGroupReference && (c.dataLoaderList.partnerGroupReference = !0, u.getInstance(D).getPartnerGroup().then((h) => {
|
|
5322
5391
|
c.partnerGroupReference = h;
|
|
5323
|
-
}).catch(
|
|
5324
|
-
}), g =
|
|
5325
|
-
const c =
|
|
5326
|
-
return !c.productFileTypeReference && !c.dataLoaderList.productFileTypeReference && (c.dataLoaderList.productFileTypeReference = !0, u.getInstance(
|
|
5392
|
+
}).catch(y)), c.partnerGroupReference;
|
|
5393
|
+
}), g = P(() => {
|
|
5394
|
+
const c = R();
|
|
5395
|
+
return !c.productFileTypeReference && !c.dataLoaderList.productFileTypeReference && (c.dataLoaderList.productFileTypeReference = !0, u.getInstance(D).getProductFileType().then((h) => {
|
|
5327
5396
|
c.productFileTypeReference = h;
|
|
5328
|
-
}).catch(
|
|
5329
|
-
}), v =
|
|
5330
|
-
const c =
|
|
5331
|
-
return !c.resourceTypesReference && !c.dataLoaderList.resourceTypesReference && (c.dataLoaderList.resourceTypesReference = !0, u.getInstance(
|
|
5397
|
+
}).catch(y)), c.productFileTypeReference;
|
|
5398
|
+
}), v = P(() => {
|
|
5399
|
+
const c = R();
|
|
5400
|
+
return !c.resourceTypesReference && !c.dataLoaderList.resourceTypesReference && (c.dataLoaderList.resourceTypesReference = !0, u.getInstance(D).getResourceTypes().then((h) => {
|
|
5332
5401
|
c.resourceTypesReference = h;
|
|
5333
|
-
}).catch(
|
|
5334
|
-
}), $ =
|
|
5335
|
-
const c =
|
|
5336
|
-
return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, u.getInstance(
|
|
5402
|
+
}).catch(y)), c.resourceTypesReference;
|
|
5403
|
+
}), $ = P(() => {
|
|
5404
|
+
const c = R();
|
|
5405
|
+
return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, u.getInstance(D).getSalesDirections().then((h) => {
|
|
5337
5406
|
c.salesDirectionsReference = h;
|
|
5338
|
-
}).catch(
|
|
5339
|
-
}),
|
|
5340
|
-
const c =
|
|
5341
|
-
return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(
|
|
5407
|
+
}).catch(y)), c.salesDirectionsReference;
|
|
5408
|
+
}), T = P(() => {
|
|
5409
|
+
const c = R();
|
|
5410
|
+
return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, u.getInstance(D).getSourcePrimaryInterest().then((h) => {
|
|
5342
5411
|
c.sourcePrimaryInterestReference = h;
|
|
5343
|
-
}).catch(
|
|
5344
|
-
}),
|
|
5345
|
-
const c =
|
|
5346
|
-
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, u.getInstance(
|
|
5412
|
+
}).catch(y)), c.sourcePrimaryInterestReference;
|
|
5413
|
+
}), b = P(() => {
|
|
5414
|
+
const c = R();
|
|
5415
|
+
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, u.getInstance(D).getDeliveryTypes().then((h) => {
|
|
5347
5416
|
c.deliveryTypeReference = h;
|
|
5348
|
-
}).catch(
|
|
5349
|
-
}),
|
|
5350
|
-
const c =
|
|
5417
|
+
}).catch(y)), c.deliveryTypeReference;
|
|
5418
|
+
}), a = P(() => {
|
|
5419
|
+
const c = R();
|
|
5351
5420
|
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(rt).getManagers().then((h) => {
|
|
5352
5421
|
c.managersList = h;
|
|
5353
|
-
}).catch(
|
|
5354
|
-
}),
|
|
5355
|
-
const c =
|
|
5356
|
-
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, u.getInstance(
|
|
5422
|
+
}).catch(y)), c.managersList;
|
|
5423
|
+
}), k = P(() => {
|
|
5424
|
+
const c = R();
|
|
5425
|
+
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, u.getInstance(D).getWarehouses().then((h) => {
|
|
5357
5426
|
c.warehousesReference = h;
|
|
5358
|
-
}).catch(
|
|
5359
|
-
}),
|
|
5360
|
-
const c =
|
|
5361
|
-
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, u.getInstance(
|
|
5427
|
+
}).catch(y)), c.warehousesReference;
|
|
5428
|
+
}), N = P(() => {
|
|
5429
|
+
const c = R();
|
|
5430
|
+
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, u.getInstance(D).getPropertyTypes().then((h) => {
|
|
5362
5431
|
c.propertyTypesReference = h;
|
|
5363
|
-
}).catch(
|
|
5364
|
-
}), O =
|
|
5365
|
-
const c =
|
|
5366
|
-
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(
|
|
5432
|
+
}).catch(y)), c.propertyTypesReference;
|
|
5433
|
+
}), O = P(() => {
|
|
5434
|
+
const c = R();
|
|
5435
|
+
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(D).getPriceCoefficients().then((h) => {
|
|
5367
5436
|
c.priceCoefficientsReference = h;
|
|
5368
|
-
}).catch(
|
|
5437
|
+
}).catch(y)), c.priceCoefficientsReference;
|
|
5369
5438
|
});
|
|
5370
5439
|
return {
|
|
5371
5440
|
/**
|
|
@@ -5415,30 +5484,30 @@ const P = ge("__references_private", () => {
|
|
|
5415
5484
|
/**
|
|
5416
5485
|
* Справочник каналов первичного интереса.
|
|
5417
5486
|
*/
|
|
5418
|
-
sourcePrimaryInterestsReference:
|
|
5487
|
+
sourcePrimaryInterestsReference: T,
|
|
5419
5488
|
/**
|
|
5420
5489
|
* Справочник типов доставки.
|
|
5421
5490
|
*/
|
|
5422
|
-
deliveryTypeReference:
|
|
5491
|
+
deliveryTypeReference: b,
|
|
5423
5492
|
/**
|
|
5424
5493
|
* Список менеджеров.
|
|
5425
5494
|
*/
|
|
5426
|
-
managersList:
|
|
5495
|
+
managersList: a,
|
|
5427
5496
|
/**
|
|
5428
5497
|
* Справочник складов.
|
|
5429
5498
|
*/
|
|
5430
|
-
warehousesReference:
|
|
5499
|
+
warehousesReference: k,
|
|
5431
5500
|
/**
|
|
5432
5501
|
* Справочник типов свойств.
|
|
5433
5502
|
*/
|
|
5434
|
-
propertyTypesReference:
|
|
5503
|
+
propertyTypesReference: N,
|
|
5435
5504
|
/**
|
|
5436
5505
|
* Справочник коэффициентов цен.
|
|
5437
5506
|
*/
|
|
5438
5507
|
priceCoefficientsReference: O
|
|
5439
5508
|
};
|
|
5440
|
-
}), st =
|
|
5441
|
-
const n =
|
|
5509
|
+
}), st = he("__user_state_private", () => {
|
|
5510
|
+
const n = w({}), r = w(void 0);
|
|
5442
5511
|
return {
|
|
5443
5512
|
/**
|
|
5444
5513
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5449,18 +5518,18 @@ const P = ge("__references_private", () => {
|
|
|
5449
5518
|
*/
|
|
5450
5519
|
currentUser: r
|
|
5451
5520
|
};
|
|
5452
|
-
}),
|
|
5521
|
+
}), Gt = he("user_state", () => ({
|
|
5453
5522
|
/**
|
|
5454
5523
|
* Данные о текущем пользователе.
|
|
5455
5524
|
*/
|
|
5456
|
-
currentUser:
|
|
5525
|
+
currentUser: P(() => {
|
|
5457
5526
|
const r = st();
|
|
5458
5527
|
return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, u.getInstance(jr).getCurrentUser().then((e) => {
|
|
5459
5528
|
r.currentUser = e;
|
|
5460
|
-
}).catch(
|
|
5529
|
+
}).catch(y).finally(y)), r.currentUser;
|
|
5461
5530
|
})
|
|
5462
5531
|
}));
|
|
5463
|
-
class
|
|
5532
|
+
class Mt extends u {
|
|
5464
5533
|
/**
|
|
5465
5534
|
* Возвращает подсказки по адресам.
|
|
5466
5535
|
*
|
|
@@ -5531,137 +5600,139 @@ class Ht {
|
|
|
5531
5600
|
}
|
|
5532
5601
|
}
|
|
5533
5602
|
export {
|
|
5534
|
-
|
|
5603
|
+
Ur as AnyReference,
|
|
5535
5604
|
ht as AppBaseConfig,
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5539
|
-
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5605
|
+
x as AppConfigProvider,
|
|
5606
|
+
Ae as BankAccount,
|
|
5607
|
+
ye as BasePaginationProvider,
|
|
5608
|
+
Ir as CalculationTypeEnum,
|
|
5609
|
+
se as Cart,
|
|
5610
|
+
ar as CartItem,
|
|
5611
|
+
br as CartItemBase,
|
|
5543
5612
|
gt as CartProvider,
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5613
|
+
Dt as CatalogProvider,
|
|
5614
|
+
Me as CatalogableItem,
|
|
5615
|
+
d as Category,
|
|
5616
|
+
Ie as CategoryPricingRule,
|
|
5617
|
+
Ve as ChannelPrimaryInterest,
|
|
5549
5618
|
ft as City,
|
|
5550
|
-
|
|
5551
|
-
|
|
5619
|
+
ce as CityWithRegionAndCountry,
|
|
5620
|
+
ke as Client,
|
|
5552
5621
|
Zr as ClientAdditionalData,
|
|
5553
|
-
|
|
5622
|
+
oe as ClientCategory,
|
|
5554
5623
|
Pt as ClientDataProvider,
|
|
5555
5624
|
$t as ClientPriceProvider,
|
|
5556
|
-
|
|
5557
|
-
|
|
5558
|
-
|
|
5625
|
+
At as ClientPriceTemplateProvider,
|
|
5626
|
+
K as ClientProduct,
|
|
5627
|
+
at as ClientProductCategoryDataProvider,
|
|
5559
5628
|
_t as ClientProductDataProvider,
|
|
5560
|
-
|
|
5629
|
+
te as ClientShortInfo,
|
|
5561
5630
|
Er as ClientsAdditionalDataRequestTypeEnum,
|
|
5562
5631
|
yt as ClientsListFilters,
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5566
|
-
|
|
5632
|
+
Nt as ConfiguratorProvider,
|
|
5633
|
+
Te as Contact,
|
|
5634
|
+
dr as ContactLinks,
|
|
5635
|
+
M as ContactPerson,
|
|
5567
5636
|
Qr as ContactPersonRelated,
|
|
5568
|
-
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5637
|
+
Gr as ContactPosition,
|
|
5638
|
+
ve as ContactRelation,
|
|
5639
|
+
Je as ContragentBase,
|
|
5640
|
+
pe as ContragentFactory,
|
|
5641
|
+
Qe as ContragentIc,
|
|
5573
5642
|
Kr as ContragentPerson,
|
|
5574
5643
|
Jr as ContragentUlNr,
|
|
5575
|
-
|
|
5576
|
-
|
|
5577
|
-
|
|
5578
|
-
|
|
5579
|
-
|
|
5580
|
-
|
|
5644
|
+
Ye as ContragentUlR,
|
|
5645
|
+
_e as CostSourceEnum,
|
|
5646
|
+
J as Country,
|
|
5647
|
+
le as Currency,
|
|
5648
|
+
Mt as DataSuggestionProvider,
|
|
5649
|
+
wt as DataTablePagination,
|
|
5581
5650
|
et as DataTablePaginationRequestParams,
|
|
5582
5651
|
vt as DataTableSortRequestParams,
|
|
5583
|
-
|
|
5584
|
-
|
|
5585
|
-
|
|
5586
|
-
|
|
5652
|
+
Ot as DateTimeProvider,
|
|
5653
|
+
Nr as DeletableNamedIdentity,
|
|
5654
|
+
ue as DeliveryAddress,
|
|
5655
|
+
E as DeliveryType,
|
|
5587
5656
|
_r as DeviceTypeResolutionConfig,
|
|
5588
|
-
|
|
5657
|
+
Or as DiscountShortInfo,
|
|
5589
5658
|
Ht as FieldValidationResultData,
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5659
|
+
ee as FilterGroup,
|
|
5660
|
+
Ne as FilterItem,
|
|
5661
|
+
Se as FilterOpEnum,
|
|
5662
|
+
Fe as GeoCoordinates,
|
|
5663
|
+
Ar as HiddenCatalogableItem,
|
|
5664
|
+
$e as HttpBaseCachedRequester,
|
|
5665
|
+
De as HttpBaseRequester,
|
|
5595
5666
|
Sr as HttpParamsConfig,
|
|
5596
5667
|
u as HttpRequester,
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5668
|
+
H as Identity,
|
|
5669
|
+
Tr as Image,
|
|
5670
|
+
fe as Manager,
|
|
5671
|
+
ne as ManagerCommon,
|
|
5672
|
+
dt as ManagerDataFactory,
|
|
5602
5673
|
rt as ManagerDataProvider,
|
|
5603
5674
|
tt as MetaTagItem,
|
|
5604
|
-
|
|
5675
|
+
A as NamedIdentity,
|
|
5605
5676
|
U as Opf,
|
|
5606
|
-
|
|
5677
|
+
_ as OpfEnum,
|
|
5607
5678
|
Xr as Order,
|
|
5608
|
-
|
|
5609
|
-
|
|
5679
|
+
Ze as OrderInfo,
|
|
5680
|
+
Mr as OrderPaymentStatus,
|
|
5610
5681
|
Yr as OrderProduct,
|
|
5611
|
-
|
|
5682
|
+
Xe as OrderShortInfo,
|
|
5612
5683
|
Hr as OrderStatus,
|
|
5613
|
-
|
|
5684
|
+
Ct as OrdersDataProvider,
|
|
5614
5685
|
G as PartnerGroup,
|
|
5615
5686
|
Fr as PaymentType,
|
|
5616
5687
|
mt as PreferencesStorageProvider,
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5688
|
+
Pe as PriceAnalyze,
|
|
5689
|
+
kt as PriceAnalyzeProvider,
|
|
5690
|
+
ge as PriceCoefficient,
|
|
5691
|
+
He as PriceCoefficientEnum,
|
|
5621
5692
|
B as PriceTemplate,
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5693
|
+
Ce as PriceTemplateCategory,
|
|
5694
|
+
Q as PriceTemplateClient,
|
|
5695
|
+
Be as PriceTemplateICatalogableItem,
|
|
5696
|
+
we as PriceTemplateProduct,
|
|
5626
5697
|
St as PriceTemplateProvider,
|
|
5627
|
-
|
|
5698
|
+
X as PricingRole,
|
|
5628
5699
|
Lt as PricingRoleProvider,
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5700
|
+
Re as PrimaryCatalogableItem,
|
|
5701
|
+
S as Product,
|
|
5702
|
+
Tt as ProductCategoryDataProvider,
|
|
5703
|
+
bt as ProductDataProvider,
|
|
5633
5704
|
zr as ProductFileType,
|
|
5634
|
-
|
|
5705
|
+
be as ProductPriceCoefficient,
|
|
5635
5706
|
Vr as ProductPriceHistory,
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5707
|
+
xt as PropertiesProvider,
|
|
5708
|
+
Y as Property,
|
|
5709
|
+
je as PropertyType,
|
|
5710
|
+
kr as PropertyTypeEnum,
|
|
5711
|
+
F as PropertyValue,
|
|
5712
|
+
It as RecommendationsDataProvider,
|
|
5713
|
+
xe as RecommendationsList,
|
|
5714
|
+
C as Reference,
|
|
5715
|
+
D as ReferenceDataProvider,
|
|
5716
|
+
Z as Region,
|
|
5717
|
+
Ee as ResourceType,
|
|
5718
|
+
I as SalesDirection,
|
|
5648
5719
|
Lr as SentryConfig,
|
|
5649
|
-
|
|
5720
|
+
de as Seo,
|
|
5650
5721
|
qt as SeoDataProvider,
|
|
5651
|
-
|
|
5722
|
+
Ke as SourcePrimaryInterest,
|
|
5652
5723
|
$r as StockCount,
|
|
5653
|
-
|
|
5724
|
+
ae as TypedInstanceFactory,
|
|
5654
5725
|
Oe as UnitsHelper,
|
|
5655
5726
|
Rt as UnknownClientDataProvider,
|
|
5656
|
-
|
|
5727
|
+
ze as UpdatableNamedIdentity,
|
|
5657
5728
|
Wr as User,
|
|
5658
|
-
|
|
5729
|
+
We as UserCommonInfo,
|
|
5659
5730
|
jr as UserDataProvider,
|
|
5660
|
-
|
|
5731
|
+
q as UserShortInfo,
|
|
5661
5732
|
Br as UserTypeEnum,
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5733
|
+
xr as VersionConfig,
|
|
5734
|
+
me as Warehouse,
|
|
5735
|
+
Ut as useReferencesStore,
|
|
5736
|
+
Gt as useUserStateStore
|
|
5666
5737
|
};
|
|
5667
5738
|
//# sourceMappingURL=sc-common-lib.js.map
|