@snabcentr/common-lib 1.49.1 → 1.49.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +4 -2
- package/dist/sc-common-lib.js +247 -241
- 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/discount-short-info.d.ts.map +1 -1
- package/dist/src/catalog/providers/client-price-template-provider.d.ts.map +1 -1
- package/dist/src/config/classes/app-base-config.d.ts +2 -2
- package/dist/src/config/classes/app-base-config.d.ts.map +1 -1
- package/dist/src/config/interfaces/i-app-base-config.d.ts +15 -2
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/dist/src/system/classes/deletable-named-identity.d.ts.map +1 -1
- package/dist/src/system/classes/updatable-named-identity.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, isString as m, cloneDeep as ir, noop as y, toLower as nr, isNil as
|
|
5
|
-
import { parseISO as f, format as z, addSeconds as ur, isAfter as hr, startOfToday as
|
|
4
|
+
import { constant as tr, isUndefined as sr, isString as m, cloneDeep as ir, noop as y, toLower as nr, isNil as Ue, isFunction as Ge, 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 Me, 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
|
|
7
|
+
import { objectToSnake as xe, objectToCamel as Dr } from "ts-case-convert";
|
|
8
8
|
import { defineStore as he } from "pinia";
|
|
9
9
|
import { ref as w, computed as P } from "vue";
|
|
10
|
-
class
|
|
10
|
+
class d {
|
|
11
11
|
/**
|
|
12
12
|
* Инициализирует экземпляр класса {@link Identity}.
|
|
13
13
|
*
|
|
@@ -31,7 +31,7 @@ class H {
|
|
|
31
31
|
return this.id === -1;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
-
class A extends
|
|
34
|
+
class A extends d {
|
|
35
35
|
/**
|
|
36
36
|
* Инициализирует экземпляр класса {@link NamedIdentity}.
|
|
37
37
|
*
|
|
@@ -46,7 +46,7 @@ class A extends H {
|
|
|
46
46
|
this.name = (e == null ? void 0 : e.name) ?? "";
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
class
|
|
49
|
+
class Fe extends A {
|
|
50
50
|
/**
|
|
51
51
|
* Инициализирует экземпляр класса {@link CatalogableItem}.
|
|
52
52
|
*
|
|
@@ -69,7 +69,7 @@ class Me 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 Re extends
|
|
72
|
+
class Re extends Fe {
|
|
73
73
|
/**
|
|
74
74
|
* Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
|
|
75
75
|
*
|
|
@@ -107,7 +107,7 @@ class re extends Re {
|
|
|
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
|
|
110
|
+
var de = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(de || {});
|
|
111
111
|
class C extends A {
|
|
112
112
|
/**
|
|
113
113
|
* Инициализирует экземпляр класса {@link Reference}.
|
|
@@ -132,7 +132,7 @@ class ge extends C {
|
|
|
132
132
|
* Возвращает значение справочника коэффициента розничной цены.
|
|
133
133
|
*/
|
|
134
134
|
static getRetailPriceCoefficient() {
|
|
135
|
-
return { id: -2, slug:
|
|
135
|
+
return { id: -2, slug: de.Retail, name: "Розничная цена", guid: "", isNewRec: tr(!0) };
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
class be {
|
|
@@ -165,7 +165,7 @@ class be {
|
|
|
165
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 He {
|
|
169
169
|
/**
|
|
170
170
|
* Инициализирует экземпляр класса {@link GeoCoordinates}.
|
|
171
171
|
*
|
|
@@ -214,7 +214,7 @@ class me extends C {
|
|
|
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 E(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = 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 He(e == null ? void 0 : e.coordinates);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
220
|
class $r {
|
|
@@ -272,7 +272,7 @@ const W = class W {
|
|
|
272
272
|
*/
|
|
273
273
|
t(W, "config");
|
|
274
274
|
let x = W;
|
|
275
|
-
class Ar extends
|
|
275
|
+
class Ar extends Fe {
|
|
276
276
|
/**
|
|
277
277
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
278
278
|
*
|
|
@@ -310,7 +310,7 @@ class Tr {
|
|
|
310
310
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
class
|
|
313
|
+
class k extends Ar {
|
|
314
314
|
/**
|
|
315
315
|
* Инициализирует экземпляр класса {@link Product}.
|
|
316
316
|
*
|
|
@@ -395,7 +395,7 @@ class S extends Ar {
|
|
|
395
395
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
class br extends
|
|
398
|
+
class br extends d {
|
|
399
399
|
/**
|
|
400
400
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
401
401
|
*
|
|
@@ -447,10 +447,10 @@ class br extends H {
|
|
|
447
447
|
* Признак того, что позиция является дополнительной продажей.
|
|
448
448
|
*/
|
|
449
449
|
t(this, "isAdditionalSale");
|
|
450
|
-
this.product = new
|
|
450
|
+
this.product = new k(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 _r extends br {
|
|
454
454
|
/**
|
|
455
455
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
456
456
|
*
|
|
@@ -519,10 +519,10 @@ class se {
|
|
|
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 _r(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
class
|
|
525
|
+
class Sr {
|
|
526
526
|
/**
|
|
527
527
|
* Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
|
|
528
528
|
*
|
|
@@ -544,7 +544,7 @@ class _r {
|
|
|
544
544
|
this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
class
|
|
547
|
+
class Lr {
|
|
548
548
|
/**
|
|
549
549
|
* Инициализирует экземпляр класса {@link HttpParamsConfig}.
|
|
550
550
|
*
|
|
@@ -566,7 +566,7 @@ class Sr {
|
|
|
566
566
|
this.apiUri = (r == null ? void 0 : r.apiUri) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
class
|
|
569
|
+
class xr {
|
|
570
570
|
/**
|
|
571
571
|
* Инициализирует экземпляр класса {@link SentryConfig}.
|
|
572
572
|
*
|
|
@@ -611,7 +611,7 @@ class Lr {
|
|
|
611
611
|
}, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
|
|
612
612
|
}
|
|
613
613
|
}
|
|
614
|
-
class
|
|
614
|
+
class Ir {
|
|
615
615
|
/**
|
|
616
616
|
* Инициализирует экземпляр класса {@link VersionConfig}.
|
|
617
617
|
*
|
|
@@ -677,22 +677,27 @@ class ht {
|
|
|
677
677
|
*/
|
|
678
678
|
t(this, "version");
|
|
679
679
|
/**
|
|
680
|
-
*
|
|
680
|
+
* Форматы дат.
|
|
681
681
|
*/
|
|
682
|
-
t(this, "
|
|
683
|
-
|
|
682
|
+
t(this, "dateFormats");
|
|
683
|
+
var e, s, i;
|
|
684
|
+
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 Lr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Sr(r == null ? void 0 : r.deviceTypeByResolution), this.products = {
|
|
684
685
|
units: {
|
|
685
686
|
linear: ["пог.м.", "м."],
|
|
686
687
|
square: ["м2"]
|
|
687
688
|
},
|
|
688
689
|
...r == null ? void 0 : r.products
|
|
689
|
-
}, this.sentry = new
|
|
690
|
+
}, this.sentry = new xr({
|
|
690
691
|
environment: this.environment,
|
|
691
692
|
...r == null ? void 0 : r.sentry
|
|
692
|
-
}), this.urls = r == null ? void 0 : r.urls, this.version = new
|
|
693
|
+
}), this.urls = r == null ? void 0 : r.urls, this.version = new Ir(r == null ? void 0 : r.version), this.dateFormats = {
|
|
694
|
+
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
695
|
+
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
696
|
+
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
697
|
+
};
|
|
693
698
|
}
|
|
694
699
|
}
|
|
695
|
-
class
|
|
700
|
+
class _e {
|
|
696
701
|
/**
|
|
697
702
|
* Инициализирует экземпляр указанного класса.
|
|
698
703
|
*
|
|
@@ -711,7 +716,7 @@ class ae {
|
|
|
711
716
|
return new r(e);
|
|
712
717
|
}
|
|
713
718
|
}
|
|
714
|
-
const
|
|
719
|
+
const N = class N {
|
|
715
720
|
/**
|
|
716
721
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
717
722
|
*
|
|
@@ -732,22 +737,22 @@ const L = class L {
|
|
|
732
737
|
*/
|
|
733
738
|
t(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
734
739
|
const s = x.getConfig().version;
|
|
735
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
740
|
+
this.defaultInstanceNotificationErrorResponseHandler = N.baseDefaultNotificationErrorResponseHandler, this.httpClient = Rr.create({
|
|
736
741
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
737
742
|
baseURL: r,
|
|
738
743
|
headers: {
|
|
739
|
-
"APP-VERSION": `${s.name} (${s.version}, ${z(s.date,
|
|
744
|
+
"APP-VERSION": `${s.name} (${s.version}, ${z(s.date, x.getConfig().dateFormats.api)})`,
|
|
740
745
|
Accept: "application/json",
|
|
741
746
|
"Content-Type": "application/json",
|
|
742
747
|
...e
|
|
743
748
|
}
|
|
744
749
|
}), this.httpClient.interceptors.request.use(
|
|
745
|
-
(i) => (i.method && (i.method === "get" && i.params && (i.params =
|
|
750
|
+
(i) => (i.method && (i.method === "get" && i.params && (i.params = xe(i.params)), ["put", "patch", "post"].includes(nr(i.method)) && i.data && (i.data = xe(i.data))), i),
|
|
746
751
|
(i) => Promise.reject(i)
|
|
747
752
|
), this.httpClient.interceptors.response.use(
|
|
748
753
|
(i) => (i.data && (i.data = Dr(i.data)), i),
|
|
749
754
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
750
|
-
(i) =>
|
|
755
|
+
(i) => N.convertHttpErrorResponse(i)
|
|
751
756
|
);
|
|
752
757
|
}
|
|
753
758
|
/**
|
|
@@ -756,7 +761,7 @@ const L = class L {
|
|
|
756
761
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
757
762
|
*/
|
|
758
763
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
759
|
-
|
|
764
|
+
N.baseDefaultNotificationErrorResponseHandler = r;
|
|
760
765
|
}
|
|
761
766
|
/**
|
|
762
767
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -764,7 +769,7 @@ const L = class L {
|
|
|
764
769
|
* @param type Тип данных, которыми оперирует метод.
|
|
765
770
|
*/
|
|
766
771
|
static getInstance(r) {
|
|
767
|
-
return Object.prototype.hasOwnProperty.call(
|
|
772
|
+
return Object.prototype.hasOwnProperty.call(N.instances, r.name) || (N.instances[r.name] = _e.simpleInstanceInitializer(r)), N.instances[r.name];
|
|
768
773
|
}
|
|
769
774
|
/**
|
|
770
775
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -859,15 +864,15 @@ const L = class L {
|
|
|
859
864
|
* Экземпляр объекта текущего класса.
|
|
860
865
|
*/
|
|
861
866
|
// eslint-disable-next-line no-use-before-define
|
|
862
|
-
t(
|
|
867
|
+
t(N, "instances", {}), /**
|
|
863
868
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
864
869
|
*
|
|
865
870
|
* Параметры:
|
|
866
871
|
* - error Данные об ошибке.
|
|
867
872
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
868
873
|
*/
|
|
869
|
-
t(
|
|
870
|
-
let De =
|
|
874
|
+
t(N, "baseDefaultNotificationErrorResponseHandler", y);
|
|
875
|
+
let De = N;
|
|
871
876
|
const j = class j extends De {
|
|
872
877
|
/**
|
|
873
878
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
@@ -919,7 +924,7 @@ const j = class j extends De {
|
|
|
919
924
|
getTypedDataArrayRequester(e, s, i = !1) {
|
|
920
925
|
const o = i ? j.getCachedResponse(s) : void 0;
|
|
921
926
|
return o ? Promise.resolve(o) : this.get(s).then((l) => {
|
|
922
|
-
const p = l.map((g) =>
|
|
927
|
+
const p = l.map((g) => _e.instanceInitializer(e, g));
|
|
923
928
|
return i && p && this.cacheResponse(s, p), p;
|
|
924
929
|
});
|
|
925
930
|
}
|
|
@@ -1042,8 +1047,8 @@ class gt extends u {
|
|
|
1042
1047
|
return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new se(e.data));
|
|
1043
1048
|
}
|
|
1044
1049
|
}
|
|
1045
|
-
var
|
|
1046
|
-
class
|
|
1050
|
+
var kr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(kr || {}), Se = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Se || {}), ar = /* @__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))(ar || {});
|
|
1051
|
+
class q extends re {
|
|
1047
1052
|
/**
|
|
1048
1053
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1049
1054
|
*
|
|
@@ -1060,7 +1065,7 @@ class d extends re {
|
|
|
1060
1065
|
* Список продуктов категории.
|
|
1061
1066
|
*/
|
|
1062
1067
|
t(this, "products");
|
|
1063
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1068
|
+
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new k(o));
|
|
1064
1069
|
}
|
|
1065
1070
|
}
|
|
1066
1071
|
class ze extends A {
|
|
@@ -1075,7 +1080,7 @@ class ze extends A {
|
|
|
1075
1080
|
* Дата и время последнего изменения.
|
|
1076
1081
|
*/
|
|
1077
1082
|
t(this, "updatedAt");
|
|
1078
|
-
this.updatedAt = e
|
|
1083
|
+
this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e == null ? void 0 : e.updatedAt;
|
|
1079
1084
|
}
|
|
1080
1085
|
}
|
|
1081
1086
|
class Nr extends ze {
|
|
@@ -1090,7 +1095,7 @@ class Nr extends ze {
|
|
|
1090
1095
|
* Дата и время последнего удаления.
|
|
1091
1096
|
*/
|
|
1092
1097
|
t(this, "deletedAt");
|
|
1093
|
-
this.deletedAt = e
|
|
1098
|
+
this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1094
1099
|
}
|
|
1095
1100
|
}
|
|
1096
1101
|
class mt {
|
|
@@ -1104,7 +1109,7 @@ class mt {
|
|
|
1104
1109
|
if (e)
|
|
1105
1110
|
try {
|
|
1106
1111
|
const s = JSON.parse(e);
|
|
1107
|
-
if (hr(f(s.availableFor) ||
|
|
1112
|
+
if (hr(f(s.availableFor) || Me(), /* @__PURE__ */ new Date()))
|
|
1108
1113
|
return s.data || {};
|
|
1109
1114
|
} catch {
|
|
1110
1115
|
localStorage.removeItem(r);
|
|
@@ -1127,7 +1132,7 @@ class mt {
|
|
|
1127
1132
|
);
|
|
1128
1133
|
}
|
|
1129
1134
|
}
|
|
1130
|
-
class
|
|
1135
|
+
class U extends A {
|
|
1131
1136
|
/**
|
|
1132
1137
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1133
1138
|
*
|
|
@@ -1178,7 +1183,7 @@ class Or extends A {
|
|
|
1178
1183
|
* Дата и время удаления.
|
|
1179
1184
|
*/
|
|
1180
1185
|
t(this, "deletedAt");
|
|
1181
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e
|
|
1186
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new U(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1182
1187
|
}
|
|
1183
1188
|
}
|
|
1184
1189
|
class B extends ze {
|
|
@@ -1200,7 +1205,7 @@ class B extends ze {
|
|
|
1200
1205
|
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();
|
|
1201
1206
|
}
|
|
1202
1207
|
}
|
|
1203
|
-
class K extends
|
|
1208
|
+
class K extends k {
|
|
1204
1209
|
/**
|
|
1205
1210
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1206
1211
|
*
|
|
@@ -1236,10 +1241,10 @@ class K extends S {
|
|
|
1236
1241
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1237
1242
|
*/
|
|
1238
1243
|
t(this, "isFavorite");
|
|
1239
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ??
|
|
1244
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Se.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;
|
|
1240
1245
|
}
|
|
1241
1246
|
}
|
|
1242
|
-
class
|
|
1247
|
+
class qr {
|
|
1243
1248
|
/**
|
|
1244
1249
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1245
1250
|
*
|
|
@@ -1257,7 +1262,7 @@ class dr {
|
|
|
1257
1262
|
this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
|
|
1258
1263
|
}
|
|
1259
1264
|
}
|
|
1260
|
-
class
|
|
1265
|
+
class O extends C {
|
|
1261
1266
|
}
|
|
1262
1267
|
class ne extends A {
|
|
1263
1268
|
/**
|
|
@@ -1270,7 +1275,7 @@ class ne extends A {
|
|
|
1270
1275
|
/**
|
|
1271
1276
|
* Направление продаж.
|
|
1272
1277
|
*/
|
|
1273
|
-
t(this, "salesDirection", new
|
|
1278
|
+
t(this, "salesDirection", new O());
|
|
1274
1279
|
/**
|
|
1275
1280
|
* URI путь к фотографии пользователя.
|
|
1276
1281
|
*/
|
|
@@ -1283,7 +1288,7 @@ class ne extends A {
|
|
|
1283
1288
|
* Признак того, что менеджер является основным для клиента.
|
|
1284
1289
|
*/
|
|
1285
1290
|
t(this, "isDefault");
|
|
1286
|
-
e && (this.salesDirection = new
|
|
1291
|
+
e && (this.salesDirection = new O(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new qr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1287
1292
|
}
|
|
1288
1293
|
}
|
|
1289
1294
|
class fe extends ne {
|
|
@@ -1317,7 +1322,7 @@ class fe extends ne {
|
|
|
1317
1322
|
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;
|
|
1318
1323
|
}
|
|
1319
1324
|
}
|
|
1320
|
-
class
|
|
1325
|
+
class Ur extends re {
|
|
1321
1326
|
/**
|
|
1322
1327
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1323
1328
|
*
|
|
@@ -1348,7 +1353,7 @@ class qr extends re {
|
|
|
1348
1353
|
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;
|
|
1349
1354
|
}
|
|
1350
1355
|
}
|
|
1351
|
-
class oe extends
|
|
1356
|
+
class oe extends Ur {
|
|
1352
1357
|
/**
|
|
1353
1358
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1354
1359
|
*
|
|
@@ -1469,7 +1474,7 @@ class We extends A {
|
|
|
1469
1474
|
* Признак активности учетной записи пользователя.
|
|
1470
1475
|
*/
|
|
1471
1476
|
t(this, "isActive");
|
|
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
|
|
1477
|
+
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 O(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;
|
|
1473
1478
|
}
|
|
1474
1479
|
}
|
|
1475
1480
|
class te extends We {
|
|
@@ -1514,10 +1519,10 @@ class te extends We {
|
|
|
1514
1519
|
* Список менеджеров клиента.
|
|
1515
1520
|
*/
|
|
1516
1521
|
t(this, "managers");
|
|
1517
|
-
this.salesDirection = new
|
|
1522
|
+
this.salesDirection = new O(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))) ?? [];
|
|
1518
1523
|
}
|
|
1519
1524
|
}
|
|
1520
|
-
class Q extends
|
|
1525
|
+
class Q extends d {
|
|
1521
1526
|
/**
|
|
1522
1527
|
* Инициализирует новый экземпляр класса.
|
|
1523
1528
|
*
|
|
@@ -1556,7 +1561,7 @@ class we extends Be {
|
|
|
1556
1561
|
* Базовые данные о продукте.
|
|
1557
1562
|
*/
|
|
1558
1563
|
t(this, "product");
|
|
1559
|
-
this.product = new
|
|
1564
|
+
this.product = new k(e == null ? void 0 : e.product);
|
|
1560
1565
|
}
|
|
1561
1566
|
}
|
|
1562
1567
|
class je extends C {
|
|
@@ -1584,7 +1589,7 @@ class Y extends A {
|
|
|
1584
1589
|
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;
|
|
1585
1590
|
}
|
|
1586
1591
|
}
|
|
1587
|
-
class
|
|
1592
|
+
class H {
|
|
1588
1593
|
/**
|
|
1589
1594
|
* Инициализирует экземпляр класса {@link PropertyValue}.
|
|
1590
1595
|
*
|
|
@@ -1603,13 +1608,13 @@ class F {
|
|
|
1603
1608
|
this.property = new Y(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
|
|
1604
1609
|
}
|
|
1605
1610
|
}
|
|
1606
|
-
class
|
|
1611
|
+
class Gr extends C {
|
|
1607
1612
|
}
|
|
1608
1613
|
class Ve extends C {
|
|
1609
1614
|
}
|
|
1610
1615
|
class ft extends C {
|
|
1611
1616
|
}
|
|
1612
|
-
class
|
|
1617
|
+
class Mr extends C {
|
|
1613
1618
|
}
|
|
1614
1619
|
class le extends A {
|
|
1615
1620
|
/**
|
|
@@ -1630,27 +1635,27 @@ class le extends A {
|
|
|
1630
1635
|
e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
|
|
1631
1636
|
}
|
|
1632
1637
|
}
|
|
1633
|
-
var
|
|
1634
|
-
class
|
|
1638
|
+
var I = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(I || {});
|
|
1639
|
+
class G extends C {
|
|
1635
1640
|
/**
|
|
1636
1641
|
* Возвращает сгенерированную запись-описание физического лица.
|
|
1637
1642
|
*/
|
|
1638
1643
|
static generatePersonItem() {
|
|
1639
|
-
return new
|
|
1644
|
+
return new G({
|
|
1640
1645
|
id: 1,
|
|
1641
1646
|
guid: "",
|
|
1642
|
-
slug:
|
|
1647
|
+
slug: I.Person,
|
|
1643
1648
|
name: ""
|
|
1644
1649
|
});
|
|
1645
1650
|
}
|
|
1646
1651
|
}
|
|
1647
|
-
class
|
|
1652
|
+
class Fr extends C {
|
|
1648
1653
|
}
|
|
1649
|
-
class
|
|
1654
|
+
class dr extends C {
|
|
1650
1655
|
}
|
|
1651
|
-
class
|
|
1656
|
+
class M extends C {
|
|
1652
1657
|
}
|
|
1653
|
-
class
|
|
1658
|
+
class Hr extends C {
|
|
1654
1659
|
}
|
|
1655
1660
|
class zr extends C {
|
|
1656
1661
|
}
|
|
@@ -1667,7 +1672,7 @@ class D extends u {
|
|
|
1667
1672
|
* и использовать в случае аналогичных запросов.
|
|
1668
1673
|
*/
|
|
1669
1674
|
getReference(r, e = !1) {
|
|
1670
|
-
return this.getTypedDataArrayRequester(
|
|
1675
|
+
return this.getTypedDataArrayRequester(Gr, `/internal/references/${r}`, e);
|
|
1671
1676
|
}
|
|
1672
1677
|
/**
|
|
1673
1678
|
* Возвращает {@link Promise} для получения справочника данных о канале
|
|
@@ -1680,7 +1685,7 @@ class D extends u {
|
|
|
1680
1685
|
* Возвращает {@link Promise} для получения справочника должностей контактных лиц.
|
|
1681
1686
|
*/
|
|
1682
1687
|
getContactPositions() {
|
|
1683
|
-
return this.getTypedDataArrayRequester(
|
|
1688
|
+
return this.getTypedDataArrayRequester(Mr, "/internal/references/contact-position", !0);
|
|
1684
1689
|
}
|
|
1685
1690
|
/**
|
|
1686
1691
|
* Возвращает {@link Promise} для получения справочника списка валют.
|
|
@@ -1693,31 +1698,31 @@ class D extends u {
|
|
|
1693
1698
|
* групп партнеров (направлений деятельности).
|
|
1694
1699
|
*/
|
|
1695
1700
|
getPartnerGroup() {
|
|
1696
|
-
return this.getTypedDataArrayRequester(
|
|
1701
|
+
return this.getTypedDataArrayRequester(M, "/internal/references/partner-group", !0);
|
|
1697
1702
|
}
|
|
1698
1703
|
/**
|
|
1699
1704
|
* Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
|
|
1700
1705
|
*/
|
|
1701
1706
|
getOpf() {
|
|
1702
|
-
return this.getTypedDataArrayRequester(
|
|
1707
|
+
return this.getTypedDataArrayRequester(G, "/public/references/opf", !0);
|
|
1703
1708
|
}
|
|
1704
1709
|
/**
|
|
1705
1710
|
* Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
|
|
1706
1711
|
*/
|
|
1707
1712
|
getOrderPaymentStatuses() {
|
|
1708
|
-
return this.getTypedDataArrayRequester(
|
|
1713
|
+
return this.getTypedDataArrayRequester(Fr, "/public/references/order-payment-status", !0);
|
|
1709
1714
|
}
|
|
1710
1715
|
/**
|
|
1711
1716
|
* Возвращает {@link Promise} для получения справочника данных статусов заказов.
|
|
1712
1717
|
*/
|
|
1713
1718
|
getOrderStatuses() {
|
|
1714
|
-
return this.getTypedDataArrayRequester(
|
|
1719
|
+
return this.getTypedDataArrayRequester(dr, "/public/references/order-status", !0);
|
|
1715
1720
|
}
|
|
1716
1721
|
/**
|
|
1717
1722
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
1718
1723
|
*/
|
|
1719
1724
|
getPaymentTypes() {
|
|
1720
|
-
return this.getTypedDataArrayRequester(
|
|
1725
|
+
return this.getTypedDataArrayRequester(Hr, "/public/references/payment-type", !0);
|
|
1721
1726
|
}
|
|
1722
1727
|
/**
|
|
1723
1728
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
@@ -1729,7 +1734,7 @@ class D extends u {
|
|
|
1729
1734
|
* Возвращает {@link Promise} для получения справочника данных направлений продаж.
|
|
1730
1735
|
*/
|
|
1731
1736
|
getSalesDirections() {
|
|
1732
|
-
return this.getTypedDataArrayRequester(
|
|
1737
|
+
return this.getTypedDataArrayRequester(O, "/public/references/sales-direction", !0);
|
|
1733
1738
|
}
|
|
1734
1739
|
/**
|
|
1735
1740
|
* Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
|
|
@@ -1868,10 +1873,10 @@ class Vr {
|
|
|
1868
1873
|
* Данные о валюте.
|
|
1869
1874
|
*/
|
|
1870
1875
|
t(this, "currency");
|
|
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
|
|
1876
|
+
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 U(r.client) : void 0, this.executor = r.executor ? new U(r.executor) : void 0, this.currency = r.currency ? new le(r.currency) : void 0;
|
|
1872
1877
|
}
|
|
1873
1878
|
}
|
|
1874
|
-
class
|
|
1879
|
+
class Ie {
|
|
1875
1880
|
/**
|
|
1876
1881
|
* Инициализирует экземпляр класса {@link RecommendationsList}.
|
|
1877
1882
|
*
|
|
@@ -1886,7 +1891,7 @@ class xe {
|
|
|
1886
1891
|
* Список рекомендованных категорий продуктов.
|
|
1887
1892
|
*/
|
|
1888
1893
|
t(this, "productCategories", []);
|
|
1889
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
1894
|
+
r != null && r.products && (this.products = r.products.map((e) => new k(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
|
|
1890
1895
|
}
|
|
1891
1896
|
}
|
|
1892
1897
|
class X extends A {
|
|
@@ -1924,7 +1929,7 @@ class X extends A {
|
|
|
1924
1929
|
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;
|
|
1925
1930
|
}
|
|
1926
1931
|
}
|
|
1927
|
-
class
|
|
1932
|
+
class ke {
|
|
1928
1933
|
/**
|
|
1929
1934
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1930
1935
|
*
|
|
@@ -1947,7 +1952,7 @@ class Ie {
|
|
|
1947
1952
|
}
|
|
1948
1953
|
}
|
|
1949
1954
|
var Er = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n))(Er || {});
|
|
1950
|
-
class Ae extends
|
|
1955
|
+
class Ae extends d {
|
|
1951
1956
|
/**
|
|
1952
1957
|
* Инициализирует экземпляр класса {@link BankAccount}.
|
|
1953
1958
|
*
|
|
@@ -1997,7 +2002,7 @@ class Te extends A {
|
|
|
1997
2002
|
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;
|
|
1998
2003
|
}
|
|
1999
2004
|
}
|
|
2000
|
-
class
|
|
2005
|
+
class F extends Te {
|
|
2001
2006
|
/**
|
|
2002
2007
|
* Инициализирует экземпляр класса {@link ContactPerson}.
|
|
2003
2008
|
*
|
|
@@ -2048,15 +2053,15 @@ class Je extends A {
|
|
|
2048
2053
|
/**
|
|
2049
2054
|
* Данные об организационно-правовой форме.
|
|
2050
2055
|
*/
|
|
2051
|
-
t(this, "opf",
|
|
2056
|
+
t(this, "opf", G.generatePersonItem());
|
|
2052
2057
|
/**
|
|
2053
2058
|
* Направление продаж.
|
|
2054
2059
|
*/
|
|
2055
|
-
t(this, "salesDirection", new
|
|
2060
|
+
t(this, "salesDirection", new O());
|
|
2056
2061
|
/**
|
|
2057
2062
|
* Группа партнеров (направление деятельности).
|
|
2058
2063
|
*/
|
|
2059
|
-
t(this, "partnerGroup", new
|
|
2064
|
+
t(this, "partnerGroup", new M());
|
|
2060
2065
|
/**
|
|
2061
2066
|
* Список контактных лиц контрагента.
|
|
2062
2067
|
*/
|
|
@@ -2090,10 +2095,10 @@ class Je extends A {
|
|
|
2090
2095
|
*/
|
|
2091
2096
|
t(this, "updater");
|
|
2092
2097
|
if (e) {
|
|
2093
|
-
if (this.opf = new
|
|
2098
|
+
if (this.opf = new G(e.opf), this.salesDirection = new O(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 U(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new M(e.partnerGroup)), e.manager && (this.manager = new ne(e.manager)), e.contacts) {
|
|
2094
2099
|
const s = [];
|
|
2095
2100
|
e.contacts.forEach((i) => {
|
|
2096
|
-
s.push(new
|
|
2101
|
+
s.push(new F(i));
|
|
2097
2102
|
}), this.contacts = s;
|
|
2098
2103
|
}
|
|
2099
2104
|
if (e.bankAccounts) {
|
|
@@ -2204,18 +2209,18 @@ class pe {
|
|
|
2204
2209
|
*/
|
|
2205
2210
|
static createInstance(r) {
|
|
2206
2211
|
switch (r.opf.slug) {
|
|
2207
|
-
case
|
|
2212
|
+
case I.Ic:
|
|
2208
2213
|
return new Qe(r);
|
|
2209
|
-
case
|
|
2214
|
+
case I.UlR:
|
|
2210
2215
|
return new Ye(r);
|
|
2211
|
-
case
|
|
2216
|
+
case I.UlNr:
|
|
2212
2217
|
return new Jr(r);
|
|
2213
2218
|
default:
|
|
2214
2219
|
return new Kr(r);
|
|
2215
2220
|
}
|
|
2216
2221
|
}
|
|
2217
2222
|
}
|
|
2218
|
-
class ve extends
|
|
2223
|
+
class ve extends d {
|
|
2219
2224
|
/**
|
|
2220
2225
|
* Инициализирует экземпляр класса {@link ContactRelation}.
|
|
2221
2226
|
*
|
|
@@ -2230,7 +2235,7 @@ class ve extends H {
|
|
|
2230
2235
|
this.isPrimary = e.isPrimary;
|
|
2231
2236
|
}
|
|
2232
2237
|
}
|
|
2233
|
-
class Qr extends
|
|
2238
|
+
class Qr extends F {
|
|
2234
2239
|
/**
|
|
2235
2240
|
* Инициализирует экземпляр класса {@link ContactPersonRelated}.
|
|
2236
2241
|
*
|
|
@@ -2295,10 +2300,10 @@ class ue extends Nr {
|
|
|
2295
2300
|
* Признак того, что указанный адрес является адресом транспортной компании.
|
|
2296
2301
|
*/
|
|
2297
2302
|
t(this, "isTransportCompanyAddress");
|
|
2298
|
-
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new
|
|
2303
|
+
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new He(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
2299
2304
|
}
|
|
2300
2305
|
}
|
|
2301
|
-
class
|
|
2306
|
+
class ae extends te {
|
|
2302
2307
|
/**
|
|
2303
2308
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2304
2309
|
*
|
|
@@ -2352,7 +2357,7 @@ class ke extends te {
|
|
|
2352
2357
|
* Дополнительные данные о клиенте.
|
|
2353
2358
|
*/
|
|
2354
2359
|
t(this, "extraData");
|
|
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
|
|
2360
|
+
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 M(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(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) ?? {};
|
|
2356
2361
|
}
|
|
2357
2362
|
}
|
|
2358
2363
|
class yt {
|
|
@@ -2452,17 +2457,17 @@ class yt {
|
|
|
2452
2457
|
* Данные о параметрах поиска последнего заказа который сделал пользователь.
|
|
2453
2458
|
*/
|
|
2454
2459
|
t(this, "lastOrder");
|
|
2455
|
-
var e, s, i, o, l, p, g, v, $, T, b;
|
|
2460
|
+
var e, s, i, o, l, p, g, v, $, T, b, _, S, L, a;
|
|
2456
2461
|
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((
|
|
2462
|
+
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) : (i = r == null ? void 0 : r.createdAt) == null ? void 0 : i.from,
|
|
2463
|
+
to: m((o = r == null ? void 0 : r.createdAt) == null ? void 0 : o.to) ? f((l = r == null ? void 0 : r.createdAt) == null ? void 0 : l.to) : (p = r == null ? void 0 : r.createdAt) == null ? void 0 : p.to
|
|
2459
2464
|
}, this.lastLoginDate = {
|
|
2460
|
-
from: m((
|
|
2461
|
-
to: m((
|
|
2462
|
-
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((
|
|
2463
|
-
createdAt: (
|
|
2464
|
-
creator: (
|
|
2465
|
-
isApproved: (
|
|
2465
|
+
from: m((g = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : g.from) ? f((v = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : v.from) : ($ = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : $.from,
|
|
2466
|
+
to: m((T = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : T.to) ? f((b = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : b.to) : (_ = r == null ? void 0 : r.lastLoginDate) == null ? void 0 : _.to
|
|
2467
|
+
}, this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((c) => new fe(c)) : [], this.salesDirection = new O(r == null ? void 0 : r.salesDirection), this.contragentInn = (r == null ? void 0 : r.contragentInn) ?? "", this.contragentType = new G(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new E(r == null ? void 0 : r.preferredDeliveryType), this.hasCostLessThenStop = r != null && r.hasCostLessThenStop ? !0 : void 0, this.partnerGroup = new M(r == null ? void 0 : r.partnerGroup), this.contact = new Te(r == null ? void 0 : r.contact), this.lastOrder = {
|
|
2468
|
+
createdAt: (S = r == null ? void 0 : r.lastOrder) == null ? void 0 : S.createdAt,
|
|
2469
|
+
creator: (L = r == null ? void 0 : r.lastOrder) == null ? void 0 : L.creator,
|
|
2470
|
+
isApproved: (a = r == null ? void 0 : r.lastOrder) == null ? void 0 : a.isApproved
|
|
2466
2471
|
};
|
|
2467
2472
|
}
|
|
2468
2473
|
/**
|
|
@@ -2505,16 +2510,16 @@ class yt {
|
|
|
2505
2510
|
this.managers = [];
|
|
2506
2511
|
break;
|
|
2507
2512
|
case "salesDirection":
|
|
2508
|
-
this.salesDirection = new
|
|
2513
|
+
this.salesDirection = new O();
|
|
2509
2514
|
break;
|
|
2510
2515
|
case "contragentType":
|
|
2511
|
-
this.contragentType = new
|
|
2516
|
+
this.contragentType = new G();
|
|
2512
2517
|
break;
|
|
2513
2518
|
case "preferredDeliveryType":
|
|
2514
2519
|
this.preferredDeliveryType = new E();
|
|
2515
2520
|
break;
|
|
2516
2521
|
case "partnerGroup":
|
|
2517
|
-
this.partnerGroup = new
|
|
2522
|
+
this.partnerGroup = new M();
|
|
2518
2523
|
break;
|
|
2519
2524
|
case "hasCostLessThenStop":
|
|
2520
2525
|
this.hasCostLessThenStop = void 0;
|
|
@@ -2535,11 +2540,11 @@ class yt {
|
|
|
2535
2540
|
return Object.keys(this).forEach((l) => {
|
|
2536
2541
|
const p = this[l];
|
|
2537
2542
|
// eslint-disable-next-line prettier/prettier
|
|
2538
|
-
|
|
2543
|
+
Ue(p) || m(p) && p.trim().length === 0 || Ge(p.isNewRec) && p.isNewRec() || (r[l] = p);
|
|
2539
2544
|
}), !((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;
|
|
2540
2545
|
}
|
|
2541
2546
|
}
|
|
2542
|
-
class Xe extends
|
|
2547
|
+
class Xe extends d {
|
|
2543
2548
|
/**
|
|
2544
2549
|
* Инициализирует экземпляр класса {@link OrderShortInfo}.
|
|
2545
2550
|
*
|
|
@@ -2559,7 +2564,7 @@ class Xe extends H {
|
|
|
2559
2564
|
* Признак того, что заказ подтвержден в 1С.
|
|
2560
2565
|
*/
|
|
2561
2566
|
t(this, "isApproved1c");
|
|
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
|
|
2567
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new U(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
2563
2568
|
}
|
|
2564
2569
|
}
|
|
2565
2570
|
class Ze extends Xe {
|
|
@@ -2620,10 +2625,10 @@ class Ze extends Xe {
|
|
|
2620
2625
|
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
2626
|
address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new ue(e.delivery.address) : void 0,
|
|
2622
2627
|
warehouse: ($ = e == null ? void 0 : e.delivery) != null && $.warehouse ? new me(e.delivery.warehouse) : void 0
|
|
2623
|
-
}, this.attachedUser = new
|
|
2628
|
+
}, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new O(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;
|
|
2624
2629
|
}
|
|
2625
2630
|
}
|
|
2626
|
-
class Yr extends
|
|
2631
|
+
class Yr extends d {
|
|
2627
2632
|
/**
|
|
2628
2633
|
* Инициализирует экземпляр класса {@link OrderProduct}.
|
|
2629
2634
|
*
|
|
@@ -2749,7 +2754,7 @@ class Xr extends Ze {
|
|
|
2749
2754
|
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;
|
|
2750
2755
|
}
|
|
2751
2756
|
}
|
|
2752
|
-
var
|
|
2757
|
+
var Le = /* @__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))(Le || {});
|
|
2753
2758
|
class Ne {
|
|
2754
2759
|
/**
|
|
2755
2760
|
* Инициализирует экземпляр класса {@link FilterItem}.
|
|
@@ -2769,7 +2774,7 @@ class Ne {
|
|
|
2769
2774
|
* Значение с которым сравнивается поле.
|
|
2770
2775
|
*/
|
|
2771
2776
|
t(this, "value");
|
|
2772
|
-
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ??
|
|
2777
|
+
this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Le.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
|
|
2773
2778
|
}
|
|
2774
2779
|
/**
|
|
2775
2780
|
* Преобразует фильтр в примитивное представление для API.
|
|
@@ -2781,7 +2786,7 @@ class Ne {
|
|
|
2781
2786
|
field: this.field,
|
|
2782
2787
|
op: this.op
|
|
2783
2788
|
};
|
|
2784
|
-
return r.value = or(this.value) ? z(this.value, x.getConfig().
|
|
2789
|
+
return r.value = or(this.value) ? z(this.value, x.getConfig().dateFormats.api) : this.value, r;
|
|
2785
2790
|
}
|
|
2786
2791
|
}
|
|
2787
2792
|
class ee {
|
|
@@ -2814,7 +2819,7 @@ class ee {
|
|
|
2814
2819
|
toPrimitive() {
|
|
2815
2820
|
return {
|
|
2816
2821
|
groupOp: this.groupOp,
|
|
2817
|
-
filters: this.filters.map((r) => r instanceof Ne &&
|
|
2822
|
+
filters: this.filters.map((r) => r instanceof Ne && Ge(r.toPrimitive) ? r.toPrimitive() : r),
|
|
2818
2823
|
groups: this.groups.map((r) => r instanceof ee ? r.toPrimitive() : r)
|
|
2819
2824
|
};
|
|
2820
2825
|
}
|
|
@@ -2898,7 +2903,7 @@ class Zr extends A {
|
|
|
2898
2903
|
* Данные о последнем заказе клиента.
|
|
2899
2904
|
*/
|
|
2900
2905
|
t(this, "lastOrder");
|
|
2901
|
-
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new
|
|
2906
|
+
(s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new Xe(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new M(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new E(e.preferredDeliveryType));
|
|
2902
2907
|
}
|
|
2903
2908
|
}
|
|
2904
2909
|
class et {
|
|
@@ -2982,7 +2987,7 @@ class Pt extends ye {
|
|
|
2982
2987
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
2983
2988
|
*/
|
|
2984
2989
|
getClient(r) {
|
|
2985
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
2990
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new ae(e.data));
|
|
2986
2991
|
}
|
|
2987
2992
|
/**
|
|
2988
2993
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -3008,7 +3013,7 @@ class Pt extends ye {
|
|
|
3008
3013
|
return this.getClientsList({
|
|
3009
3014
|
groupOp: "and",
|
|
3010
3015
|
groups: [],
|
|
3011
|
-
filters: [{ field: "phone", op:
|
|
3016
|
+
filters: [{ field: "phone", op: Le.Contains, value: r }]
|
|
3012
3017
|
});
|
|
3013
3018
|
}
|
|
3014
3019
|
/**
|
|
@@ -3063,7 +3068,7 @@ class Pt extends ye {
|
|
|
3063
3068
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
3064
3069
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
3065
3070
|
},
|
|
3066
|
-
(i) => new
|
|
3071
|
+
(i) => new ae(i.data),
|
|
3067
3072
|
e
|
|
3068
3073
|
);
|
|
3069
3074
|
}
|
|
@@ -3173,11 +3178,11 @@ class Pt extends ye {
|
|
|
3173
3178
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
3174
3179
|
*/
|
|
3175
3180
|
createContragentClientData(r, e, s = {}) {
|
|
3176
|
-
var g, v, $, T, b,
|
|
3181
|
+
var g, v, $, T, b, _, S, L;
|
|
3177
3182
|
let i;
|
|
3178
3183
|
const o = e, l = e, p = e;
|
|
3179
3184
|
switch (e.opf.slug) {
|
|
3180
|
-
case
|
|
3185
|
+
case I.Ic:
|
|
3181
3186
|
i = {
|
|
3182
3187
|
opf: o.opf.slug,
|
|
3183
3188
|
name: o.name,
|
|
@@ -3195,7 +3200,7 @@ class Pt extends ye {
|
|
|
3195
3200
|
actual_address: o.actualAddress
|
|
3196
3201
|
};
|
|
3197
3202
|
break;
|
|
3198
|
-
case
|
|
3203
|
+
case I.UlR:
|
|
3199
3204
|
i = {
|
|
3200
3205
|
opf: l.opf.slug,
|
|
3201
3206
|
name: l.name,
|
|
@@ -3214,13 +3219,13 @@ class Pt extends ye {
|
|
|
3214
3219
|
actual_address: l.actualAddress
|
|
3215
3220
|
};
|
|
3216
3221
|
break;
|
|
3217
|
-
case
|
|
3222
|
+
case I.UlNr:
|
|
3218
3223
|
i = {
|
|
3219
3224
|
opf: p.opf.slug,
|
|
3220
3225
|
name: p.name,
|
|
3221
3226
|
alternative_name: p.alternativeName,
|
|
3222
3227
|
partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
|
|
3223
|
-
manager_id: (
|
|
3228
|
+
manager_id: (_ = p.manager) == null ? void 0 : _.id,
|
|
3224
3229
|
comment: p.comment,
|
|
3225
3230
|
inn: p.inn,
|
|
3226
3231
|
kpp: p.kpp,
|
|
@@ -3241,8 +3246,8 @@ class Pt extends ye {
|
|
|
3241
3246
|
opf: e.opf.slug,
|
|
3242
3247
|
name: e.name,
|
|
3243
3248
|
alternative_name: e.alternativeName,
|
|
3244
|
-
partner_group_id: (
|
|
3245
|
-
manager_id: (
|
|
3249
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
3250
|
+
manager_id: (L = e.manager) == null ? void 0 : L.id,
|
|
3246
3251
|
comment: e.comment
|
|
3247
3252
|
};
|
|
3248
3253
|
break;
|
|
@@ -3250,7 +3255,7 @@ class Pt extends ye {
|
|
|
3250
3255
|
return this.post(
|
|
3251
3256
|
`/internal/clients/${r}/contragents`,
|
|
3252
3257
|
i,
|
|
3253
|
-
(
|
|
3258
|
+
(a) => pe.createInstance(a.data),
|
|
3254
3259
|
s
|
|
3255
3260
|
);
|
|
3256
3261
|
}
|
|
@@ -3265,11 +3270,11 @@ class Pt extends ye {
|
|
|
3265
3270
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
3266
3271
|
*/
|
|
3267
3272
|
updateContragentClientData(r, e, s = {}) {
|
|
3268
|
-
var g, v, $, T, b,
|
|
3273
|
+
var g, v, $, T, b, _, S, L;
|
|
3269
3274
|
let i;
|
|
3270
3275
|
const o = e, l = e, p = e;
|
|
3271
3276
|
switch (e.opf.slug) {
|
|
3272
|
-
case
|
|
3277
|
+
case I.Ic:
|
|
3273
3278
|
i = {
|
|
3274
3279
|
opf: o.opf.slug,
|
|
3275
3280
|
name: o.name,
|
|
@@ -3287,7 +3292,7 @@ class Pt extends ye {
|
|
|
3287
3292
|
actual_address: o.actualAddress
|
|
3288
3293
|
};
|
|
3289
3294
|
break;
|
|
3290
|
-
case
|
|
3295
|
+
case I.UlR:
|
|
3291
3296
|
i = {
|
|
3292
3297
|
opf: l.opf.slug,
|
|
3293
3298
|
name: l.name,
|
|
@@ -3306,13 +3311,13 @@ class Pt extends ye {
|
|
|
3306
3311
|
actual_address: l.actualAddress
|
|
3307
3312
|
};
|
|
3308
3313
|
break;
|
|
3309
|
-
case
|
|
3314
|
+
case I.UlNr:
|
|
3310
3315
|
i = {
|
|
3311
3316
|
opf: p.opf.slug,
|
|
3312
3317
|
name: p.name,
|
|
3313
3318
|
alternative_name: p.alternativeName,
|
|
3314
3319
|
partner_group_id: (b = p.partnerGroup) == null ? void 0 : b.id,
|
|
3315
|
-
manager_id: (
|
|
3320
|
+
manager_id: (_ = p.manager) == null ? void 0 : _.id,
|
|
3316
3321
|
comment: p.comment,
|
|
3317
3322
|
inn: p.inn,
|
|
3318
3323
|
kpp: p.kpp,
|
|
@@ -3333,8 +3338,8 @@ class Pt extends ye {
|
|
|
3333
3338
|
opf: e.opf.slug,
|
|
3334
3339
|
name: e.name,
|
|
3335
3340
|
alternative_name: e.alternativeName,
|
|
3336
|
-
partner_group_id: (
|
|
3337
|
-
manager_id: (
|
|
3341
|
+
partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
|
|
3342
|
+
manager_id: (L = e.manager) == null ? void 0 : L.id,
|
|
3338
3343
|
comment: e.comment
|
|
3339
3344
|
};
|
|
3340
3345
|
break;
|
|
@@ -3342,7 +3347,7 @@ class Pt extends ye {
|
|
|
3342
3347
|
return this.patch(
|
|
3343
3348
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
3344
3349
|
i,
|
|
3345
|
-
(
|
|
3350
|
+
(a) => pe.createInstance(a.data),
|
|
3346
3351
|
s
|
|
3347
3352
|
);
|
|
3348
3353
|
}
|
|
@@ -3532,7 +3537,7 @@ class Pt extends ye {
|
|
|
3532
3537
|
comment: e.comment,
|
|
3533
3538
|
not_disturb: e.notDisturb
|
|
3534
3539
|
},
|
|
3535
|
-
(i) => new
|
|
3540
|
+
(i) => new F(i.data),
|
|
3536
3541
|
s
|
|
3537
3542
|
);
|
|
3538
3543
|
}
|
|
@@ -3675,7 +3680,7 @@ class Pt extends ye {
|
|
|
3675
3680
|
comment: e.comment,
|
|
3676
3681
|
...s
|
|
3677
3682
|
};
|
|
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
|
|
3683
|
+
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 F(g.data), i);
|
|
3679
3684
|
}
|
|
3680
3685
|
/**
|
|
3681
3686
|
* Устанавливает признак основного контактного лица.
|
|
@@ -3745,7 +3750,7 @@ class Pe {
|
|
|
3745
3750
|
* Источник клиентской цены.
|
|
3746
3751
|
*/
|
|
3747
3752
|
t(this, "source");
|
|
3748
|
-
this.client = new te(r == null ? void 0 : r.client), this.product = new
|
|
3753
|
+
this.client = new te(r == null ? void 0 : r.client), this.product = new k(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) ?? Se.Product;
|
|
3749
3754
|
}
|
|
3750
3755
|
}
|
|
3751
3756
|
class Dt extends u {
|
|
@@ -4013,7 +4018,7 @@ class At extends u {
|
|
|
4013
4018
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_attach
|
|
4014
4019
|
*/
|
|
4015
4020
|
attachTemplate(r, e, s) {
|
|
4016
|
-
const
|
|
4021
|
+
const i = x.getConfig().dateFormats.api;
|
|
4017
4022
|
return this.post(
|
|
4018
4023
|
`/internal/clients/${r}/price/templates/${e}`,
|
|
4019
4024
|
s && {
|
|
@@ -4045,13 +4050,14 @@ class At extends u {
|
|
|
4045
4050
|
* @see /doc/api/internal#/operations/api_internal_client_price_template_change
|
|
4046
4051
|
*/
|
|
4047
4052
|
changeTemplate(r, e, s, i) {
|
|
4053
|
+
const o = x.getConfig().dateFormats.api;
|
|
4048
4054
|
return this.patch(
|
|
4049
4055
|
`/internal/clients/${r}/price/templates/${e}/${s}`,
|
|
4050
4056
|
i && {
|
|
4051
|
-
startAt: i.startAt
|
|
4052
|
-
endAt: i.endAt
|
|
4057
|
+
startAt: i.startAt && z(i.startAt, o),
|
|
4058
|
+
endAt: i.endAt && z(i.endAt, o)
|
|
4053
4059
|
},
|
|
4054
|
-
(
|
|
4060
|
+
(l) => new Q(l.data)
|
|
4055
4061
|
);
|
|
4056
4062
|
}
|
|
4057
4063
|
/**
|
|
@@ -4081,7 +4087,7 @@ class Tt extends u {
|
|
|
4081
4087
|
{
|
|
4082
4088
|
showHidden: r
|
|
4083
4089
|
},
|
|
4084
|
-
(e) => e.data.map((s) => new
|
|
4090
|
+
(e) => e.data.map((s) => new q(s))
|
|
4085
4091
|
);
|
|
4086
4092
|
}
|
|
4087
4093
|
/**
|
|
@@ -4100,7 +4106,7 @@ class Tt extends u {
|
|
|
4100
4106
|
showHidden: e,
|
|
4101
4107
|
withNestedCategories: s
|
|
4102
4108
|
},
|
|
4103
|
-
(i) => new
|
|
4109
|
+
(i) => new q(i.data)
|
|
4104
4110
|
);
|
|
4105
4111
|
}
|
|
4106
4112
|
/**
|
|
@@ -4109,7 +4115,7 @@ class Tt extends u {
|
|
|
4109
4115
|
* @param categoryID Идентификатор категории продуктов.
|
|
4110
4116
|
*/
|
|
4111
4117
|
getPublicCategoryData(r) {
|
|
4112
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
4118
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
|
|
4113
4119
|
}
|
|
4114
4120
|
/**
|
|
4115
4121
|
* Возвращает список продуктов категории.
|
|
@@ -4127,7 +4133,7 @@ class Tt extends u {
|
|
|
4127
4133
|
showHidden: s,
|
|
4128
4134
|
withPriceCoefficients: e
|
|
4129
4135
|
},
|
|
4130
|
-
(i) => ie(i.data, (o) => new
|
|
4136
|
+
(i) => ie(i.data, (o) => new k(o))
|
|
4131
4137
|
);
|
|
4132
4138
|
}
|
|
4133
4139
|
/**
|
|
@@ -4152,7 +4158,7 @@ class Tt extends u {
|
|
|
4152
4158
|
publicSimpleSearch(r, e = 10) {
|
|
4153
4159
|
return new Promise((s, i) => {
|
|
4154
4160
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
4155
|
-
s(o.categories.map((l) => new
|
|
4161
|
+
s(o.categories.map((l) => new q(l)));
|
|
4156
4162
|
}).catch((o) => {
|
|
4157
4163
|
i(o);
|
|
4158
4164
|
});
|
|
@@ -4169,7 +4175,7 @@ class bt extends u {
|
|
|
4169
4175
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
4170
4176
|
*/
|
|
4171
4177
|
getProductData(r, e = !1) {
|
|
4172
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
4178
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new k(s.data));
|
|
4173
4179
|
}
|
|
4174
4180
|
/**
|
|
4175
4181
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -4177,7 +4183,7 @@ class bt extends u {
|
|
|
4177
4183
|
* @param productId Идентификатор продукта.
|
|
4178
4184
|
*/
|
|
4179
4185
|
getPublicProductData(r) {
|
|
4180
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
4186
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new k(e.data));
|
|
4181
4187
|
}
|
|
4182
4188
|
/**
|
|
4183
4189
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -4203,7 +4209,7 @@ class bt extends u {
|
|
|
4203
4209
|
*/
|
|
4204
4210
|
getProductPriceHistory(r, e) {
|
|
4205
4211
|
const s = {};
|
|
4206
|
-
return
|
|
4212
|
+
return Ue(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ie(i.data, (o) => new Vr(o)));
|
|
4207
4213
|
}
|
|
4208
4214
|
/**
|
|
4209
4215
|
* Выполняет публичный поиск данных о продуктах по терму.
|
|
@@ -4214,14 +4220,14 @@ class bt extends u {
|
|
|
4214
4220
|
publicSimpleSearch(r, e = 10) {
|
|
4215
4221
|
return new Promise((s, i) => {
|
|
4216
4222
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
4217
|
-
s(o.products.map((l) => new
|
|
4223
|
+
s(o.products.map((l) => new k(l)));
|
|
4218
4224
|
}).catch((o) => {
|
|
4219
4225
|
i(o);
|
|
4220
4226
|
});
|
|
4221
4227
|
});
|
|
4222
4228
|
}
|
|
4223
4229
|
}
|
|
4224
|
-
class
|
|
4230
|
+
class _t extends u {
|
|
4225
4231
|
/**
|
|
4226
4232
|
* Возвращает список данных о корневых категориях указанного клиента.
|
|
4227
4233
|
*
|
|
@@ -4283,7 +4289,7 @@ class at extends u {
|
|
|
4283
4289
|
);
|
|
4284
4290
|
}
|
|
4285
4291
|
}
|
|
4286
|
-
class
|
|
4292
|
+
class St extends u {
|
|
4287
4293
|
/**
|
|
4288
4294
|
* Возвращает данные об указанном продукте для указанного клиента.
|
|
4289
4295
|
*
|
|
@@ -4304,7 +4310,7 @@ class _t extends u {
|
|
|
4304
4310
|
);
|
|
4305
4311
|
}
|
|
4306
4312
|
}
|
|
4307
|
-
class
|
|
4313
|
+
class Lt extends ye {
|
|
4308
4314
|
/**
|
|
4309
4315
|
* Возвращает список шаблонов прайс-листа.
|
|
4310
4316
|
*
|
|
@@ -4492,7 +4498,7 @@ class St extends ye {
|
|
|
4492
4498
|
);
|
|
4493
4499
|
}
|
|
4494
4500
|
}
|
|
4495
|
-
class
|
|
4501
|
+
class xt extends u {
|
|
4496
4502
|
/**
|
|
4497
4503
|
* Возвращает список ролей ценообразования.
|
|
4498
4504
|
*
|
|
@@ -4553,7 +4559,7 @@ class Lt extends u {
|
|
|
4553
4559
|
return this.get(
|
|
4554
4560
|
`/internal/price/roles/rules/categories/${r}`,
|
|
4555
4561
|
{},
|
|
4556
|
-
(e) => e.data.map((s) => new
|
|
4562
|
+
(e) => e.data.map((s) => new ke(s))
|
|
4557
4563
|
);
|
|
4558
4564
|
}
|
|
4559
4565
|
/**
|
|
@@ -4568,11 +4574,11 @@ class Lt extends u {
|
|
|
4568
4574
|
return this.patch(
|
|
4569
4575
|
`/internal/price/roles/rules/categories/${r}`,
|
|
4570
4576
|
e,
|
|
4571
|
-
(s) => s.data.map((i) => new
|
|
4577
|
+
(s) => s.data.map((i) => new ke(i))
|
|
4572
4578
|
);
|
|
4573
4579
|
}
|
|
4574
4580
|
}
|
|
4575
|
-
class
|
|
4581
|
+
class It extends ye {
|
|
4576
4582
|
/**
|
|
4577
4583
|
* Возвращает пагинированный список свойств.
|
|
4578
4584
|
*
|
|
@@ -4647,7 +4653,7 @@ class xt extends ye {
|
|
|
4647
4653
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
|
|
4648
4654
|
*/
|
|
4649
4655
|
getProductProperties(r) {
|
|
4650
|
-
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
4656
|
+
return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
|
|
4651
4657
|
}
|
|
4652
4658
|
/**
|
|
4653
4659
|
* Возвращает значение свойства продукта.
|
|
@@ -4657,7 +4663,7 @@ class xt extends ye {
|
|
|
4657
4663
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
|
|
4658
4664
|
*/
|
|
4659
4665
|
getProductProperty(r, e) {
|
|
4660
|
-
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new
|
|
4666
|
+
return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new H(s.data));
|
|
4661
4667
|
}
|
|
4662
4668
|
/**
|
|
4663
4669
|
* Обновляет значение свойства продукта.
|
|
@@ -4668,7 +4674,7 @@ class xt extends ye {
|
|
|
4668
4674
|
* @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
|
|
4669
4675
|
*/
|
|
4670
4676
|
updateProductProperty(r, e, s) {
|
|
4671
|
-
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new
|
|
4677
|
+
return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
|
|
4672
4678
|
}
|
|
4673
4679
|
/**
|
|
4674
4680
|
* Удаляет значение свойства продукта.
|
|
@@ -4793,7 +4799,7 @@ class xt extends ye {
|
|
|
4793
4799
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
|
|
4794
4800
|
*/
|
|
4795
4801
|
getCategoryProperties(r) {
|
|
4796
|
-
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new
|
|
4802
|
+
return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
|
|
4797
4803
|
}
|
|
4798
4804
|
/**
|
|
4799
4805
|
* Возвращает значение свойства категории.
|
|
@@ -4803,7 +4809,7 @@ class xt extends ye {
|
|
|
4803
4809
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
|
|
4804
4810
|
*/
|
|
4805
4811
|
getCategoryProperty(r, e) {
|
|
4806
|
-
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new
|
|
4812
|
+
return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new H(s.data));
|
|
4807
4813
|
}
|
|
4808
4814
|
/**
|
|
4809
4815
|
* Обновляет значение свойства категории.
|
|
@@ -4814,7 +4820,7 @@ class xt extends ye {
|
|
|
4814
4820
|
* @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
|
|
4815
4821
|
*/
|
|
4816
4822
|
updateCategoryProperty(r, e, s) {
|
|
4817
|
-
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new
|
|
4823
|
+
return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
|
|
4818
4824
|
}
|
|
4819
4825
|
/**
|
|
4820
4826
|
* Удаляет значение свойства категории.
|
|
@@ -4943,14 +4949,14 @@ class xt extends ye {
|
|
|
4943
4949
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
4944
4950
|
}
|
|
4945
4951
|
}
|
|
4946
|
-
class
|
|
4952
|
+
class kt extends u {
|
|
4947
4953
|
/**
|
|
4948
4954
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
4949
4955
|
*
|
|
4950
4956
|
* @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
|
|
4951
4957
|
*/
|
|
4952
4958
|
getProductCategoryRecommendations(r) {
|
|
4953
|
-
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new
|
|
4959
|
+
return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ie(e.data));
|
|
4954
4960
|
}
|
|
4955
4961
|
/**
|
|
4956
4962
|
* Возвращает данные о рекомендациях указанного продукта.
|
|
@@ -4958,7 +4964,7 @@ class It extends u {
|
|
|
4958
4964
|
* @param product Данные о продукте, для которого необходимо получить рекомендации.
|
|
4959
4965
|
*/
|
|
4960
4966
|
getProductRecommendations(r) {
|
|
4961
|
-
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new
|
|
4967
|
+
return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ie(e.data));
|
|
4962
4968
|
}
|
|
4963
4969
|
/**
|
|
4964
4970
|
* Выполняет сохранение данных о рекомендуемых категориях продуктов.
|
|
@@ -4985,7 +4991,7 @@ class It extends u {
|
|
|
4985
4991
|
});
|
|
4986
4992
|
}
|
|
4987
4993
|
}
|
|
4988
|
-
class
|
|
4994
|
+
class at extends u {
|
|
4989
4995
|
/**
|
|
4990
4996
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
4991
4997
|
*
|
|
@@ -5058,7 +5064,7 @@ class Nt extends u {
|
|
|
5058
5064
|
const i = this.get(
|
|
5059
5065
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
5060
5066
|
{ params: e },
|
|
5061
|
-
(l) => new
|
|
5067
|
+
(l) => new k(l.data)
|
|
5062
5068
|
);
|
|
5063
5069
|
return i.catch((l) => {
|
|
5064
5070
|
this.defaultInstanceNotificationErrorResponseHandler(l, s);
|
|
@@ -5110,7 +5116,7 @@ class Ot {
|
|
|
5110
5116
|
return {
|
|
5111
5117
|
// 'Следующий рабочий день' - это значение по-умолчанию
|
|
5112
5118
|
nextWorkingDay: { label: "Следующий рабочий день", from: Pr(r), to: vr(r) },
|
|
5113
|
-
today: { label: "Сегодня", from:
|
|
5119
|
+
today: { label: "Сегодня", from: Me(), to: wr() },
|
|
5114
5120
|
yesterday: { label: "Вчера", from: Cr(), to: yr() },
|
|
5115
5121
|
tomorrow: { label: "Завтра", from: fr(), to: mr() }
|
|
5116
5122
|
};
|
|
@@ -5157,7 +5163,7 @@ const V = class V {
|
|
|
5157
5163
|
*/
|
|
5158
5164
|
t(V, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5159
5165
|
let Oe = V;
|
|
5160
|
-
class
|
|
5166
|
+
class qt {
|
|
5161
5167
|
/**
|
|
5162
5168
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5163
5169
|
*/
|
|
@@ -5180,7 +5186,7 @@ class rt extends u {
|
|
|
5180
5186
|
getManagers() {
|
|
5181
5187
|
const r = "/internal/managers", e = u.getCachedResponse(r);
|
|
5182
5188
|
return e ? Promise.resolve(e) : this.get(r).then((s) => {
|
|
5183
|
-
const i = s.data.map((o) =>
|
|
5189
|
+
const i = s.data.map((o) => _e.instanceInitializer(fe, o));
|
|
5184
5190
|
return i && this.cacheResponse(r, i), i;
|
|
5185
5191
|
});
|
|
5186
5192
|
}
|
|
@@ -5203,7 +5209,7 @@ class tt {
|
|
|
5203
5209
|
this.name = r.name, this.content = r.content;
|
|
5204
5210
|
}
|
|
5205
5211
|
}
|
|
5206
|
-
class
|
|
5212
|
+
class qe {
|
|
5207
5213
|
/**
|
|
5208
5214
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
5209
5215
|
*
|
|
@@ -5242,7 +5248,7 @@ class de {
|
|
|
5242
5248
|
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))) ?? [];
|
|
5243
5249
|
}
|
|
5244
5250
|
}
|
|
5245
|
-
class
|
|
5251
|
+
class Ut extends u {
|
|
5246
5252
|
/**
|
|
5247
5253
|
* Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
|
|
5248
5254
|
*
|
|
@@ -5250,7 +5256,7 @@ class qt extends u {
|
|
|
5250
5256
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
5251
5257
|
*/
|
|
5252
5258
|
getResourceSeoData(r, e) {
|
|
5253
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new
|
|
5259
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new qe(s.data));
|
|
5254
5260
|
}
|
|
5255
5261
|
/**
|
|
5256
5262
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -5261,7 +5267,7 @@ class qt extends u {
|
|
|
5261
5267
|
* в случае ошибок в запросах.
|
|
5262
5268
|
*/
|
|
5263
5269
|
saveResourceSeoData(r, e = {}) {
|
|
5264
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new
|
|
5270
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new qe(s.data), e);
|
|
5265
5271
|
}
|
|
5266
5272
|
/**
|
|
5267
5273
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -5274,7 +5280,7 @@ class qt extends u {
|
|
|
5274
5280
|
}
|
|
5275
5281
|
}
|
|
5276
5282
|
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),
|
|
5283
|
+
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), _ = w(void 0), S = w(void 0), L = w(void 0), a = w(void 0), c = w(void 0);
|
|
5278
5284
|
return {
|
|
5279
5285
|
/**
|
|
5280
5286
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -5331,25 +5337,25 @@ const R = he("__references_private", () => {
|
|
|
5331
5337
|
/**
|
|
5332
5338
|
* Справочник направлений продаж.
|
|
5333
5339
|
*/
|
|
5334
|
-
salesDirectionsReference:
|
|
5340
|
+
salesDirectionsReference: _,
|
|
5335
5341
|
/**
|
|
5336
5342
|
* Справочник источников первичного интереса.
|
|
5337
5343
|
*/
|
|
5338
|
-
sourcePrimaryInterestReference:
|
|
5344
|
+
sourcePrimaryInterestReference: S,
|
|
5339
5345
|
/**
|
|
5340
5346
|
* Справочник складов.
|
|
5341
5347
|
*/
|
|
5342
|
-
warehousesReference:
|
|
5348
|
+
warehousesReference: L,
|
|
5343
5349
|
/**
|
|
5344
5350
|
* Справочник типов свойств.
|
|
5345
5351
|
*/
|
|
5346
|
-
propertyTypesReference:
|
|
5352
|
+
propertyTypesReference: a,
|
|
5347
5353
|
/**
|
|
5348
5354
|
* Справочник коэффициентов цен.
|
|
5349
5355
|
*/
|
|
5350
5356
|
priceCoefficientsReference: c
|
|
5351
5357
|
};
|
|
5352
|
-
}),
|
|
5358
|
+
}), Gt = he("references", () => {
|
|
5353
5359
|
const n = P(() => {
|
|
5354
5360
|
const c = R();
|
|
5355
5361
|
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, u.getInstance(D).getChannelPrimaryInterest().then((h) => {
|
|
@@ -5415,22 +5421,22 @@ const R = he("__references_private", () => {
|
|
|
5415
5421
|
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, u.getInstance(D).getDeliveryTypes().then((h) => {
|
|
5416
5422
|
c.deliveryTypeReference = h;
|
|
5417
5423
|
}).catch(y)), c.deliveryTypeReference;
|
|
5418
|
-
}),
|
|
5424
|
+
}), _ = P(() => {
|
|
5419
5425
|
const c = R();
|
|
5420
5426
|
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, u.getInstance(rt).getManagers().then((h) => {
|
|
5421
5427
|
c.managersList = h;
|
|
5422
5428
|
}).catch(y)), c.managersList;
|
|
5423
|
-
}),
|
|
5429
|
+
}), S = P(() => {
|
|
5424
5430
|
const c = R();
|
|
5425
5431
|
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, u.getInstance(D).getWarehouses().then((h) => {
|
|
5426
5432
|
c.warehousesReference = h;
|
|
5427
5433
|
}).catch(y)), c.warehousesReference;
|
|
5428
|
-
}),
|
|
5434
|
+
}), L = P(() => {
|
|
5429
5435
|
const c = R();
|
|
5430
5436
|
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, u.getInstance(D).getPropertyTypes().then((h) => {
|
|
5431
5437
|
c.propertyTypesReference = h;
|
|
5432
5438
|
}).catch(y)), c.propertyTypesReference;
|
|
5433
|
-
}),
|
|
5439
|
+
}), a = P(() => {
|
|
5434
5440
|
const c = R();
|
|
5435
5441
|
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, u.getInstance(D).getPriceCoefficients().then((h) => {
|
|
5436
5442
|
c.priceCoefficientsReference = h;
|
|
@@ -5492,19 +5498,19 @@ const R = he("__references_private", () => {
|
|
|
5492
5498
|
/**
|
|
5493
5499
|
* Список менеджеров.
|
|
5494
5500
|
*/
|
|
5495
|
-
managersList:
|
|
5501
|
+
managersList: _,
|
|
5496
5502
|
/**
|
|
5497
5503
|
* Справочник складов.
|
|
5498
5504
|
*/
|
|
5499
|
-
warehousesReference:
|
|
5505
|
+
warehousesReference: S,
|
|
5500
5506
|
/**
|
|
5501
5507
|
* Справочник типов свойств.
|
|
5502
5508
|
*/
|
|
5503
|
-
propertyTypesReference:
|
|
5509
|
+
propertyTypesReference: L,
|
|
5504
5510
|
/**
|
|
5505
5511
|
* Справочник коэффициентов цен.
|
|
5506
5512
|
*/
|
|
5507
|
-
priceCoefficientsReference:
|
|
5513
|
+
priceCoefficientsReference: a
|
|
5508
5514
|
};
|
|
5509
5515
|
}), st = he("__user_state_private", () => {
|
|
5510
5516
|
const n = w({}), r = w(void 0);
|
|
@@ -5518,7 +5524,7 @@ const R = he("__references_private", () => {
|
|
|
5518
5524
|
*/
|
|
5519
5525
|
currentUser: r
|
|
5520
5526
|
};
|
|
5521
|
-
}),
|
|
5527
|
+
}), Mt = he("user_state", () => ({
|
|
5522
5528
|
/**
|
|
5523
5529
|
* Данные о текущем пользователе.
|
|
5524
5530
|
*/
|
|
@@ -5529,7 +5535,7 @@ const R = he("__references_private", () => {
|
|
|
5529
5535
|
}).catch(y).finally(y)), r.currentUser;
|
|
5530
5536
|
})
|
|
5531
5537
|
}));
|
|
5532
|
-
class
|
|
5538
|
+
class Ft extends u {
|
|
5533
5539
|
/**
|
|
5534
5540
|
* Возвращает подсказки по адресам.
|
|
5535
5541
|
*
|
|
@@ -5576,7 +5582,7 @@ class Mt extends u {
|
|
|
5576
5582
|
});
|
|
5577
5583
|
}
|
|
5578
5584
|
}
|
|
5579
|
-
class
|
|
5585
|
+
class dt {
|
|
5580
5586
|
/**
|
|
5581
5587
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
5582
5588
|
*
|
|
@@ -5600,41 +5606,41 @@ class Ht {
|
|
|
5600
5606
|
}
|
|
5601
5607
|
}
|
|
5602
5608
|
export {
|
|
5603
|
-
|
|
5609
|
+
Gr as AnyReference,
|
|
5604
5610
|
ht as AppBaseConfig,
|
|
5605
5611
|
x as AppConfigProvider,
|
|
5606
5612
|
Ae as BankAccount,
|
|
5607
5613
|
ye as BasePaginationProvider,
|
|
5608
|
-
|
|
5614
|
+
kr as CalculationTypeEnum,
|
|
5609
5615
|
se as Cart,
|
|
5610
|
-
|
|
5616
|
+
_r as CartItem,
|
|
5611
5617
|
br as CartItemBase,
|
|
5612
5618
|
gt as CartProvider,
|
|
5613
5619
|
Dt as CatalogProvider,
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5620
|
+
Fe as CatalogableItem,
|
|
5621
|
+
q as Category,
|
|
5622
|
+
ke as CategoryPricingRule,
|
|
5617
5623
|
Ve as ChannelPrimaryInterest,
|
|
5618
5624
|
ft as City,
|
|
5619
5625
|
ce as CityWithRegionAndCountry,
|
|
5620
|
-
|
|
5626
|
+
ae as Client,
|
|
5621
5627
|
Zr as ClientAdditionalData,
|
|
5622
5628
|
oe as ClientCategory,
|
|
5623
5629
|
Pt as ClientDataProvider,
|
|
5624
5630
|
$t as ClientPriceProvider,
|
|
5625
5631
|
At as ClientPriceTemplateProvider,
|
|
5626
5632
|
K as ClientProduct,
|
|
5627
|
-
|
|
5628
|
-
|
|
5633
|
+
_t as ClientProductCategoryDataProvider,
|
|
5634
|
+
St as ClientProductDataProvider,
|
|
5629
5635
|
te as ClientShortInfo,
|
|
5630
5636
|
Er as ClientsAdditionalDataRequestTypeEnum,
|
|
5631
5637
|
yt as ClientsListFilters,
|
|
5632
5638
|
Nt as ConfiguratorProvider,
|
|
5633
5639
|
Te as Contact,
|
|
5634
|
-
|
|
5635
|
-
|
|
5640
|
+
qr as ContactLinks,
|
|
5641
|
+
F as ContactPerson,
|
|
5636
5642
|
Qr as ContactPersonRelated,
|
|
5637
|
-
|
|
5643
|
+
Mr as ContactPosition,
|
|
5638
5644
|
ve as ContactRelation,
|
|
5639
5645
|
Je as ContragentBase,
|
|
5640
5646
|
pe as ContragentFactory,
|
|
@@ -5642,10 +5648,10 @@ export {
|
|
|
5642
5648
|
Kr as ContragentPerson,
|
|
5643
5649
|
Jr as ContragentUlNr,
|
|
5644
5650
|
Ye as ContragentUlR,
|
|
5645
|
-
|
|
5651
|
+
Se as CostSourceEnum,
|
|
5646
5652
|
J as Country,
|
|
5647
5653
|
le as Currency,
|
|
5648
|
-
|
|
5654
|
+
Ft as DataSuggestionProvider,
|
|
5649
5655
|
wt as DataTablePagination,
|
|
5650
5656
|
et as DataTablePaginationRequestParams,
|
|
5651
5657
|
vt as DataTableSortRequestParams,
|
|
@@ -5653,86 +5659,86 @@ export {
|
|
|
5653
5659
|
Nr as DeletableNamedIdentity,
|
|
5654
5660
|
ue as DeliveryAddress,
|
|
5655
5661
|
E as DeliveryType,
|
|
5656
|
-
|
|
5662
|
+
Sr as DeviceTypeResolutionConfig,
|
|
5657
5663
|
Or as DiscountShortInfo,
|
|
5658
|
-
|
|
5664
|
+
dt as FieldValidationResultData,
|
|
5659
5665
|
ee as FilterGroup,
|
|
5660
5666
|
Ne as FilterItem,
|
|
5661
|
-
|
|
5662
|
-
|
|
5667
|
+
Le as FilterOpEnum,
|
|
5668
|
+
He as GeoCoordinates,
|
|
5663
5669
|
Ar as HiddenCatalogableItem,
|
|
5664
5670
|
$e as HttpBaseCachedRequester,
|
|
5665
5671
|
De as HttpBaseRequester,
|
|
5666
|
-
|
|
5672
|
+
Lr as HttpParamsConfig,
|
|
5667
5673
|
u as HttpRequester,
|
|
5668
|
-
|
|
5674
|
+
d as Identity,
|
|
5669
5675
|
Tr as Image,
|
|
5670
5676
|
fe as Manager,
|
|
5671
5677
|
ne as ManagerCommon,
|
|
5672
|
-
|
|
5678
|
+
qt as ManagerDataFactory,
|
|
5673
5679
|
rt as ManagerDataProvider,
|
|
5674
5680
|
tt as MetaTagItem,
|
|
5675
5681
|
A as NamedIdentity,
|
|
5676
|
-
|
|
5677
|
-
|
|
5682
|
+
G as Opf,
|
|
5683
|
+
I as OpfEnum,
|
|
5678
5684
|
Xr as Order,
|
|
5679
5685
|
Ze as OrderInfo,
|
|
5680
|
-
|
|
5686
|
+
Fr as OrderPaymentStatus,
|
|
5681
5687
|
Yr as OrderProduct,
|
|
5682
5688
|
Xe as OrderShortInfo,
|
|
5683
|
-
|
|
5689
|
+
dr as OrderStatus,
|
|
5684
5690
|
Ct as OrdersDataProvider,
|
|
5685
|
-
|
|
5686
|
-
|
|
5691
|
+
M as PartnerGroup,
|
|
5692
|
+
Hr as PaymentType,
|
|
5687
5693
|
mt as PreferencesStorageProvider,
|
|
5688
5694
|
Pe as PriceAnalyze,
|
|
5689
|
-
|
|
5695
|
+
at as PriceAnalyzeProvider,
|
|
5690
5696
|
ge as PriceCoefficient,
|
|
5691
|
-
|
|
5697
|
+
de as PriceCoefficientEnum,
|
|
5692
5698
|
B as PriceTemplate,
|
|
5693
5699
|
Ce as PriceTemplateCategory,
|
|
5694
5700
|
Q as PriceTemplateClient,
|
|
5695
5701
|
Be as PriceTemplateICatalogableItem,
|
|
5696
5702
|
we as PriceTemplateProduct,
|
|
5697
|
-
|
|
5703
|
+
Lt as PriceTemplateProvider,
|
|
5698
5704
|
X as PricingRole,
|
|
5699
|
-
|
|
5705
|
+
xt as PricingRoleProvider,
|
|
5700
5706
|
Re as PrimaryCatalogableItem,
|
|
5701
|
-
|
|
5707
|
+
k as Product,
|
|
5702
5708
|
Tt as ProductCategoryDataProvider,
|
|
5703
5709
|
bt as ProductDataProvider,
|
|
5704
5710
|
zr as ProductFileType,
|
|
5705
5711
|
be as ProductPriceCoefficient,
|
|
5706
5712
|
Vr as ProductPriceHistory,
|
|
5707
|
-
|
|
5713
|
+
It as PropertiesProvider,
|
|
5708
5714
|
Y as Property,
|
|
5709
5715
|
je as PropertyType,
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5716
|
+
ar as PropertyTypeEnum,
|
|
5717
|
+
H as PropertyValue,
|
|
5718
|
+
kt as RecommendationsDataProvider,
|
|
5719
|
+
Ie as RecommendationsList,
|
|
5714
5720
|
C as Reference,
|
|
5715
5721
|
D as ReferenceDataProvider,
|
|
5716
5722
|
Z as Region,
|
|
5717
5723
|
Ee as ResourceType,
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5724
|
+
O as SalesDirection,
|
|
5725
|
+
xr as SentryConfig,
|
|
5726
|
+
qe as Seo,
|
|
5727
|
+
Ut as SeoDataProvider,
|
|
5722
5728
|
Ke as SourcePrimaryInterest,
|
|
5723
5729
|
$r as StockCount,
|
|
5724
|
-
|
|
5730
|
+
_e as TypedInstanceFactory,
|
|
5725
5731
|
Oe as UnitsHelper,
|
|
5726
5732
|
Rt as UnknownClientDataProvider,
|
|
5727
5733
|
ze as UpdatableNamedIdentity,
|
|
5728
5734
|
Wr as User,
|
|
5729
5735
|
We as UserCommonInfo,
|
|
5730
5736
|
jr as UserDataProvider,
|
|
5731
|
-
|
|
5737
|
+
U as UserShortInfo,
|
|
5732
5738
|
Br as UserTypeEnum,
|
|
5733
|
-
|
|
5739
|
+
Ir as VersionConfig,
|
|
5734
5740
|
me as Warehouse,
|
|
5735
|
-
|
|
5736
|
-
|
|
5741
|
+
Gt as useReferencesStore,
|
|
5742
|
+
Mt as useUserStateStore
|
|
5737
5743
|
};
|
|
5738
5744
|
//# sourceMappingURL=sc-common-lib.js.map
|