@snabcentr/common-lib 1.52.0 → 1.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +4 -3
- package/dist/sc-common-lib.js +75 -69
- 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/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/interfaces/i-app-base-config.d.ts +9 -0
- package/dist/src/config/interfaces/i-app-base-config.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
## 1.
|
|
1
|
+
## 1.53.0 (2025-05-28)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (2 changes)
|
|
4
4
|
|
|
5
|
-
- [#11663:
|
|
5
|
+
- [#11663: Добавлен фильтр клиентов hasCostLessThenStop](web_soft/libs/ts/snabcentr-common-lib@73023a106a8f928be7f2f179d084cb29b35a62e3) ([merge request](web_soft/libs/ts/snabcentr-common-lib!87))
|
|
6
|
+
- [#11607: В конфигурацию приложения добавлены параметры темы](web_soft/libs/ts/snabcentr-common-lib@743d0c28279d793c4a387597211decd4b032758b) ([merge request](web_soft/libs/ts/snabcentr-common-lib!88))
|
|
6
7
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -135,7 +135,7 @@ class me extends w {
|
|
|
135
135
|
return { id: -2, slug: ze.Retail, name: "Розн. цена", guid: "", isNewRec: ir(!0) };
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
|
-
class
|
|
138
|
+
class _e {
|
|
139
139
|
/**
|
|
140
140
|
* Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
|
|
141
141
|
*
|
|
@@ -310,7 +310,7 @@ class br {
|
|
|
310
310
|
this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
|
-
class
|
|
313
|
+
class _ extends Tr {
|
|
314
314
|
/**
|
|
315
315
|
* Инициализирует экземпляр класса {@link Product}.
|
|
316
316
|
*
|
|
@@ -385,7 +385,7 @@ class a extends Tr {
|
|
|
385
385
|
t(this, "priceCoefficients");
|
|
386
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 Ar(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 De({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new De(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new br(g, T.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
|
|
388
|
+
s && (this.category = new De({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new De(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new br(g, T.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 _e(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
389
389
|
}
|
|
390
390
|
/**
|
|
391
391
|
* Возвращает признак, что это измеряемый товар.
|
|
@@ -395,7 +395,7 @@ class a extends Tr {
|
|
|
395
395
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
396
396
|
}
|
|
397
397
|
}
|
|
398
|
-
class
|
|
398
|
+
class _r extends F {
|
|
399
399
|
/**
|
|
400
400
|
* Инициализирует экземпляр класса {@link CartItemBase}.
|
|
401
401
|
*
|
|
@@ -447,10 +447,10 @@ class ar extends F {
|
|
|
447
447
|
* Признак того, что позиция является дополнительной продажей.
|
|
448
448
|
*/
|
|
449
449
|
t(this, "isAdditionalSale");
|
|
450
|
-
this.product = new
|
|
450
|
+
this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new te(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && or(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
|
|
451
451
|
}
|
|
452
452
|
}
|
|
453
|
-
class
|
|
453
|
+
class ar extends _r {
|
|
454
454
|
/**
|
|
455
455
|
* Инициализирует экземпляр класса {@link CartItem}.
|
|
456
456
|
*
|
|
@@ -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 Sr {
|
|
@@ -680,7 +680,11 @@ class gt {
|
|
|
680
680
|
* Форматы дат.
|
|
681
681
|
*/
|
|
682
682
|
t(this, "dateFormats");
|
|
683
|
-
|
|
683
|
+
/**
|
|
684
|
+
* Параметры темы.
|
|
685
|
+
*/
|
|
686
|
+
t(this, "theme");
|
|
687
|
+
var e, s, i, o;
|
|
684
688
|
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 = {
|
|
685
689
|
units: {
|
|
686
690
|
linear: ["пог.м.", "м."],
|
|
@@ -694,10 +698,12 @@ class gt {
|
|
|
694
698
|
api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
|
|
695
699
|
uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
|
|
696
700
|
uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
|
|
701
|
+
}, this.theme = {
|
|
702
|
+
fontParams: (o = r == null ? void 0 : r.theme) == null ? void 0 : o.fontParams
|
|
697
703
|
};
|
|
698
704
|
}
|
|
699
705
|
}
|
|
700
|
-
class
|
|
706
|
+
class ae {
|
|
701
707
|
/**
|
|
702
708
|
* Инициализирует экземпляр указанного класса.
|
|
703
709
|
*
|
|
@@ -716,7 +722,7 @@ class _e {
|
|
|
716
722
|
return new r(e);
|
|
717
723
|
}
|
|
718
724
|
}
|
|
719
|
-
const
|
|
725
|
+
const a = class a {
|
|
720
726
|
/**
|
|
721
727
|
* Инициализирует экземпляр класса {@link HttpRequester}.
|
|
722
728
|
*
|
|
@@ -737,7 +743,7 @@ const _ = class _ {
|
|
|
737
743
|
*/
|
|
738
744
|
t(this, "defaultInstanceNotificationErrorResponseHandler", y);
|
|
739
745
|
const s = T.getConfig().version;
|
|
740
|
-
this.defaultInstanceNotificationErrorResponseHandler =
|
|
746
|
+
this.defaultInstanceNotificationErrorResponseHandler = a.baseDefaultNotificationErrorResponseHandler, this.httpClient = Dr.create({
|
|
741
747
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
742
748
|
baseURL: r,
|
|
743
749
|
headers: {
|
|
@@ -752,7 +758,7 @@ const _ = class _ {
|
|
|
752
758
|
), this.httpClient.interceptors.response.use(
|
|
753
759
|
(i) => (i.data && (i.data = $r(i.data)), i),
|
|
754
760
|
// Возвращаем изменённую структуру сообщения об ошибке.
|
|
755
|
-
(i) =>
|
|
761
|
+
(i) => a.convertHttpErrorResponse(i)
|
|
756
762
|
);
|
|
757
763
|
}
|
|
758
764
|
/**
|
|
@@ -761,7 +767,7 @@ const _ = class _ {
|
|
|
761
767
|
* @param handler Ссылка на функцию-обработчик уведомлений об ошибках.
|
|
762
768
|
*/
|
|
763
769
|
static setBaseDefaultNotificationErrorResponseHandler(r) {
|
|
764
|
-
|
|
770
|
+
a.baseDefaultNotificationErrorResponseHandler = r;
|
|
765
771
|
}
|
|
766
772
|
/**
|
|
767
773
|
* Возвращает экземпляр объекта текущего класса.
|
|
@@ -769,7 +775,7 @@ const _ = class _ {
|
|
|
769
775
|
* @param type Тип данных, которыми оперирует метод.
|
|
770
776
|
*/
|
|
771
777
|
static getInstance(r) {
|
|
772
|
-
return Object.prototype.hasOwnProperty.call(
|
|
778
|
+
return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = ae.simpleInstanceInitializer(r)), a.instances[r.name];
|
|
773
779
|
}
|
|
774
780
|
/**
|
|
775
781
|
* Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
|
|
@@ -864,15 +870,15 @@ const _ = class _ {
|
|
|
864
870
|
* Экземпляр объекта текущего класса.
|
|
865
871
|
*/
|
|
866
872
|
// eslint-disable-next-line no-use-before-define
|
|
867
|
-
t(
|
|
873
|
+
t(a, "instances", {}), /**
|
|
868
874
|
* Базовый обработчик по умолчанию используемый для отображения уведомлений и ошибок валидации всех ошибочных HTTP ответов на запросы.
|
|
869
875
|
*
|
|
870
876
|
* Параметры:
|
|
871
877
|
* - error Данные об ошибке.
|
|
872
878
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
873
879
|
*/
|
|
874
|
-
t(
|
|
875
|
-
let $e =
|
|
880
|
+
t(a, "baseDefaultNotificationErrorResponseHandler", y);
|
|
881
|
+
let $e = a;
|
|
876
882
|
const j = class j extends $e {
|
|
877
883
|
/**
|
|
878
884
|
* Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
|
|
@@ -924,7 +930,7 @@ const j = class j extends $e {
|
|
|
924
930
|
getTypedDataArrayRequester(e, s, i = !1) {
|
|
925
931
|
const o = i ? j.getCachedResponse(s) : void 0;
|
|
926
932
|
return o ? Promise.resolve(o) : this.get(s).then((l) => {
|
|
927
|
-
const p = l.map((g) =>
|
|
933
|
+
const p = l.map((g) => ae.instanceInitializer(e, g));
|
|
928
934
|
return i && p && this.cacheResponse(s, p), p;
|
|
929
935
|
});
|
|
930
936
|
}
|
|
@@ -1048,7 +1054,7 @@ class mt extends u {
|
|
|
1048
1054
|
}
|
|
1049
1055
|
}
|
|
1050
1056
|
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 || {}), Nr = /* @__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))(Nr || {});
|
|
1051
|
-
class
|
|
1057
|
+
class q extends te {
|
|
1052
1058
|
/**
|
|
1053
1059
|
* Инициализирует экземпляр класса {@link Category}.
|
|
1054
1060
|
*
|
|
@@ -1065,7 +1071,7 @@ class d extends te {
|
|
|
1065
1071
|
* Список продуктов категории.
|
|
1066
1072
|
*/
|
|
1067
1073
|
t(this, "products");
|
|
1068
|
-
this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new
|
|
1074
|
+
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 _(o));
|
|
1069
1075
|
}
|
|
1070
1076
|
}
|
|
1071
1077
|
class We extends D {
|
|
@@ -1132,7 +1138,7 @@ class ft {
|
|
|
1132
1138
|
);
|
|
1133
1139
|
}
|
|
1134
1140
|
}
|
|
1135
|
-
class
|
|
1141
|
+
class d extends D {
|
|
1136
1142
|
/**
|
|
1137
1143
|
* Инициализирует экземпляр класса {@link UserShortInfo}.
|
|
1138
1144
|
*
|
|
@@ -1147,7 +1153,7 @@ class q extends D {
|
|
|
1147
1153
|
this.type = e == null ? void 0 : e.type;
|
|
1148
1154
|
}
|
|
1149
1155
|
}
|
|
1150
|
-
class
|
|
1156
|
+
class qr extends D {
|
|
1151
1157
|
/**
|
|
1152
1158
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1153
1159
|
*
|
|
@@ -1183,7 +1189,7 @@ class dr extends D {
|
|
|
1183
1189
|
* Дата и время удаления.
|
|
1184
1190
|
*/
|
|
1185
1191
|
t(this, "deletedAt");
|
|
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
|
|
1192
|
+
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 d(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
|
|
1187
1193
|
}
|
|
1188
1194
|
}
|
|
1189
1195
|
class B extends We {
|
|
@@ -1205,7 +1211,7 @@ class B extends We {
|
|
|
1205
1211
|
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();
|
|
1206
1212
|
}
|
|
1207
1213
|
}
|
|
1208
|
-
class K extends
|
|
1214
|
+
class K extends _ {
|
|
1209
1215
|
/**
|
|
1210
1216
|
* Инициализирует экземпляр класса {@link ClientProduct}.
|
|
1211
1217
|
*
|
|
@@ -1241,10 +1247,10 @@ class K extends a {
|
|
|
1241
1247
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1242
1248
|
*/
|
|
1243
1249
|
t(this, "isFavorite");
|
|
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
|
|
1250
|
+
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 qr(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;
|
|
1245
1251
|
}
|
|
1246
1252
|
}
|
|
1247
|
-
class
|
|
1253
|
+
class dr {
|
|
1248
1254
|
/**
|
|
1249
1255
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1250
1256
|
*
|
|
@@ -1288,7 +1294,7 @@ class oe extends D {
|
|
|
1288
1294
|
* Признак того, что менеджер является основным для клиента.
|
|
1289
1295
|
*/
|
|
1290
1296
|
t(this, "isDefault");
|
|
1291
|
-
e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1297
|
+
e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new dr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1292
1298
|
}
|
|
1293
1299
|
}
|
|
1294
1300
|
class ye extends oe {
|
|
@@ -1561,7 +1567,7 @@ class ve extends je {
|
|
|
1561
1567
|
* Базовые данные о продукте.
|
|
1562
1568
|
*/
|
|
1563
1569
|
t(this, "product");
|
|
1564
|
-
this.product = new
|
|
1570
|
+
this.product = new _(e == null ? void 0 : e.product);
|
|
1565
1571
|
}
|
|
1566
1572
|
}
|
|
1567
1573
|
class Ee extends w {
|
|
@@ -1873,7 +1879,7 @@ class Er {
|
|
|
1873
1879
|
* Данные о валюте.
|
|
1874
1880
|
*/
|
|
1875
1881
|
t(this, "currency");
|
|
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
|
|
1882
|
+
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 d(r.client) : void 0, this.executor = r.executor ? new d(r.executor) : void 0, this.currency = r.currency ? new pe(r.currency) : void 0;
|
|
1877
1883
|
}
|
|
1878
1884
|
}
|
|
1879
1885
|
class xe {
|
|
@@ -1891,7 +1897,7 @@ class xe {
|
|
|
1891
1897
|
* Список рекомендованных категорий продуктов.
|
|
1892
1898
|
*/
|
|
1893
1899
|
t(this, "productCategories", []);
|
|
1894
|
-
r != null && r.products && (this.products = r.products.map((e) => new
|
|
1900
|
+
r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
|
|
1895
1901
|
}
|
|
1896
1902
|
}
|
|
1897
1903
|
class Z extends D {
|
|
@@ -1978,7 +1984,7 @@ class Pe {
|
|
|
1978
1984
|
* Источник клиентской цены.
|
|
1979
1985
|
*/
|
|
1980
1986
|
t(this, "source");
|
|
1981
|
-
this.client = new se(r == null ? void 0 : r.client), this.product = new
|
|
1987
|
+
this.client = new se(r == null ? void 0 : r.client), this.product = new _(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Se.Product;
|
|
1982
1988
|
}
|
|
1983
1989
|
}
|
|
1984
1990
|
class wt extends u {
|
|
@@ -2315,7 +2321,7 @@ class Pt extends u {
|
|
|
2315
2321
|
{
|
|
2316
2322
|
showHidden: r
|
|
2317
2323
|
},
|
|
2318
|
-
(e) => e.data.map((s) => new
|
|
2324
|
+
(e) => e.data.map((s) => new q(s))
|
|
2319
2325
|
);
|
|
2320
2326
|
}
|
|
2321
2327
|
/**
|
|
@@ -2334,7 +2340,7 @@ class Pt extends u {
|
|
|
2334
2340
|
showHidden: e,
|
|
2335
2341
|
withNestedCategories: s
|
|
2336
2342
|
},
|
|
2337
|
-
(i) => new
|
|
2343
|
+
(i) => new q(i.data)
|
|
2338
2344
|
);
|
|
2339
2345
|
}
|
|
2340
2346
|
/**
|
|
@@ -2343,7 +2349,7 @@ class Pt extends u {
|
|
|
2343
2349
|
* @param categoryID Идентификатор категории продуктов.
|
|
2344
2350
|
*/
|
|
2345
2351
|
getPublicCategoryData(r) {
|
|
2346
|
-
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new
|
|
2352
|
+
return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
|
|
2347
2353
|
}
|
|
2348
2354
|
/**
|
|
2349
2355
|
* Возвращает список продуктов категории.
|
|
@@ -2361,7 +2367,7 @@ class Pt extends u {
|
|
|
2361
2367
|
showHidden: s,
|
|
2362
2368
|
withPriceCoefficients: e
|
|
2363
2369
|
},
|
|
2364
|
-
(i) => ne(i.data, (o) => new
|
|
2370
|
+
(i) => ne(i.data, (o) => new _(o))
|
|
2365
2371
|
);
|
|
2366
2372
|
}
|
|
2367
2373
|
/**
|
|
@@ -2374,7 +2380,7 @@ class Pt extends u {
|
|
|
2374
2380
|
getCategoryProductsCoefficients(r) {
|
|
2375
2381
|
return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
|
|
2376
2382
|
const { data: s } = e;
|
|
2377
|
-
return lr(s, (i) => i.map((o) => new
|
|
2383
|
+
return lr(s, (i) => i.map((o) => new _e(o))), s;
|
|
2378
2384
|
});
|
|
2379
2385
|
}
|
|
2380
2386
|
/**
|
|
@@ -2386,7 +2392,7 @@ class Pt extends u {
|
|
|
2386
2392
|
publicSimpleSearch(r, e = 10) {
|
|
2387
2393
|
return new Promise((s, i) => {
|
|
2388
2394
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2389
|
-
s(o.categories.map((l) => new
|
|
2395
|
+
s(o.categories.map((l) => new q(l)));
|
|
2390
2396
|
}).catch((o) => {
|
|
2391
2397
|
i(o);
|
|
2392
2398
|
});
|
|
@@ -2403,7 +2409,7 @@ class Rt extends u {
|
|
|
2403
2409
|
* @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
|
|
2404
2410
|
*/
|
|
2405
2411
|
getProductData(r, e = !1) {
|
|
2406
|
-
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new
|
|
2412
|
+
return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new _(s.data));
|
|
2407
2413
|
}
|
|
2408
2414
|
/**
|
|
2409
2415
|
* Возвращает публичные данные об указанном продукте.
|
|
@@ -2411,7 +2417,7 @@ class Rt extends u {
|
|
|
2411
2417
|
* @param productId Идентификатор продукта.
|
|
2412
2418
|
*/
|
|
2413
2419
|
getPublicProductData(r) {
|
|
2414
|
-
return this.get(`/public/catalog/products/${r}`, {}, (e) => new
|
|
2420
|
+
return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
|
|
2415
2421
|
}
|
|
2416
2422
|
/**
|
|
2417
2423
|
* Возвращает данные о коэффициентах цен для указанного продукта.
|
|
@@ -2424,7 +2430,7 @@ class Rt extends u {
|
|
|
2424
2430
|
return this.get(
|
|
2425
2431
|
`/internal/catalog/products/${r}/coefficients`,
|
|
2426
2432
|
{},
|
|
2427
|
-
(e) => ne(e.data, (s) => new
|
|
2433
|
+
(e) => ne(e.data, (s) => new _e(s))
|
|
2428
2434
|
);
|
|
2429
2435
|
}
|
|
2430
2436
|
/**
|
|
@@ -2448,7 +2454,7 @@ class Rt extends u {
|
|
|
2448
2454
|
publicSimpleSearch(r, e = 10) {
|
|
2449
2455
|
return new Promise((s, i) => {
|
|
2450
2456
|
this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
|
|
2451
|
-
s(o.products.map((l) => new
|
|
2457
|
+
s(o.products.map((l) => new _(l)));
|
|
2452
2458
|
}).catch((o) => {
|
|
2453
2459
|
i(o);
|
|
2454
2460
|
});
|
|
@@ -3268,7 +3274,7 @@ class bt extends we {
|
|
|
3268
3274
|
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
3269
3275
|
}
|
|
3270
3276
|
}
|
|
3271
|
-
class
|
|
3277
|
+
class _t extends u {
|
|
3272
3278
|
/**
|
|
3273
3279
|
* Возвращает данные о рекомендациях указанной категории продуктов.
|
|
3274
3280
|
*
|
|
@@ -3314,7 +3320,7 @@ const Oe = (n) => {
|
|
|
3314
3320
|
const r = {};
|
|
3315
3321
|
return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
|
|
3316
3322
|
};
|
|
3317
|
-
class
|
|
3323
|
+
class at extends u {
|
|
3318
3324
|
/**
|
|
3319
3325
|
* Возвращает список клиентских цен на продукты в указанном диапазоне цены.
|
|
3320
3326
|
*
|
|
@@ -3507,7 +3513,7 @@ class Ye extends D {
|
|
|
3507
3513
|
*/
|
|
3508
3514
|
t(this, "updater");
|
|
3509
3515
|
if (e) {
|
|
3510
|
-
if (this.opf = new U(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new
|
|
3516
|
+
if (this.opf = new U(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new d(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new d(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new G(e.partnerGroup)), e.manager && (this.manager = new oe(e.manager)), e.contacts) {
|
|
3511
3517
|
const s = [];
|
|
3512
3518
|
e.contacts.forEach((i) => {
|
|
3513
3519
|
s.push(new M(i));
|
|
@@ -3715,7 +3721,7 @@ class he extends Or {
|
|
|
3715
3721
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Be(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;
|
|
3716
3722
|
}
|
|
3717
3723
|
}
|
|
3718
|
-
class
|
|
3724
|
+
class qe extends se {
|
|
3719
3725
|
/**
|
|
3720
3726
|
* Инициализирует экземпляр класса {@link Client}.
|
|
3721
3727
|
*
|
|
@@ -3980,7 +3986,7 @@ class er extends F {
|
|
|
3980
3986
|
* Признак того, что заказ подтвержден в 1С.
|
|
3981
3987
|
*/
|
|
3982
3988
|
t(this, "isApproved1c");
|
|
3983
|
-
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new
|
|
3989
|
+
this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new d(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
|
|
3984
3990
|
}
|
|
3985
3991
|
}
|
|
3986
3992
|
class rr extends er {
|
|
@@ -4041,7 +4047,7 @@ class rr extends er {
|
|
|
4041
4047
|
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(),
|
|
4042
4048
|
address: ($ = e == null ? void 0 : e.delivery) != null && $.address ? new he(e.delivery.address) : void 0,
|
|
4043
4049
|
warehouse: (A = e == null ? void 0 : e.delivery) != null && A.warehouse ? new fe(e.delivery.warehouse) : void 0
|
|
4044
|
-
}, this.attachedUser = new
|
|
4050
|
+
}, this.attachedUser = new d(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
|
|
4045
4051
|
}
|
|
4046
4052
|
}
|
|
4047
4053
|
class Xr extends F {
|
|
@@ -4307,7 +4313,7 @@ class kt extends we {
|
|
|
4307
4313
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
4308
4314
|
*/
|
|
4309
4315
|
getClient(r) {
|
|
4310
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
4316
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new qe(e.data));
|
|
4311
4317
|
}
|
|
4312
4318
|
/**
|
|
4313
4319
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -4390,7 +4396,7 @@ class kt extends we {
|
|
|
4390
4396
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
4391
4397
|
preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
|
|
4392
4398
|
},
|
|
4393
|
-
(i) => new
|
|
4399
|
+
(i) => new qe(i.data),
|
|
4394
4400
|
e
|
|
4395
4401
|
);
|
|
4396
4402
|
}
|
|
@@ -5067,7 +5073,7 @@ class Ot extends u {
|
|
|
5067
5073
|
const i = this.get(
|
|
5068
5074
|
`internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
|
|
5069
5075
|
{ params: e },
|
|
5070
|
-
(l) => new
|
|
5076
|
+
(l) => new _(l.data)
|
|
5071
5077
|
);
|
|
5072
5078
|
return i.catch((l) => {
|
|
5073
5079
|
this.defaultInstanceNotificationErrorResponseHandler(l, s);
|
|
@@ -5110,7 +5116,7 @@ class Ot extends u {
|
|
|
5110
5116
|
return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
|
|
5111
5117
|
}
|
|
5112
5118
|
}
|
|
5113
|
-
class
|
|
5119
|
+
class qt {
|
|
5114
5120
|
/**
|
|
5115
5121
|
* Возвращает диапазон дат по умолчанию.
|
|
5116
5122
|
*/
|
|
@@ -5165,8 +5171,8 @@ const V = class V {
|
|
|
5165
5171
|
* Список единиц измерения линейной величины.
|
|
5166
5172
|
*/
|
|
5167
5173
|
t(V, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
5168
|
-
let
|
|
5169
|
-
class
|
|
5174
|
+
let de = V;
|
|
5175
|
+
class dt {
|
|
5170
5176
|
/**
|
|
5171
5177
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
5172
5178
|
*/
|
|
@@ -5189,7 +5195,7 @@ class tt extends u {
|
|
|
5189
5195
|
getManagers() {
|
|
5190
5196
|
const r = "/internal/managers", e = u.getCachedResponse(r);
|
|
5191
5197
|
return e ? Promise.resolve(e) : this.get(r).then((s) => {
|
|
5192
|
-
const i = s.data.map((o) =>
|
|
5198
|
+
const i = s.data.map((o) => ae.instanceInitializer(ye, o));
|
|
5193
5199
|
return i && this.cacheResponse(r, i), i;
|
|
5194
5200
|
});
|
|
5195
5201
|
}
|
|
@@ -5616,17 +5622,17 @@ export {
|
|
|
5616
5622
|
we as BasePaginationProvider,
|
|
5617
5623
|
kr as CalculationTypeEnum,
|
|
5618
5624
|
ie as Cart,
|
|
5619
|
-
|
|
5620
|
-
|
|
5625
|
+
ar as CartItem,
|
|
5626
|
+
_r as CartItemBase,
|
|
5621
5627
|
mt as CartProvider,
|
|
5622
5628
|
wt as CatalogProvider,
|
|
5623
5629
|
He as CatalogableItem,
|
|
5624
|
-
|
|
5630
|
+
q as Category,
|
|
5625
5631
|
ke as CategoryPricingRule,
|
|
5626
5632
|
Ke as ChannelPrimaryInterest,
|
|
5627
5633
|
yt as City,
|
|
5628
5634
|
le as CityWithRegionAndCountry,
|
|
5629
|
-
|
|
5635
|
+
qe as Client,
|
|
5630
5636
|
et as ClientAdditionalData,
|
|
5631
5637
|
ce as ClientCategory,
|
|
5632
5638
|
kt as ClientDataProvider,
|
|
@@ -5640,7 +5646,7 @@ export {
|
|
|
5640
5646
|
St as ClientsListFilters,
|
|
5641
5647
|
Ot as ConfiguratorProvider,
|
|
5642
5648
|
be as Contact,
|
|
5643
|
-
|
|
5649
|
+
dr as ContactLinks,
|
|
5644
5650
|
M as ContactPerson,
|
|
5645
5651
|
Yr as ContactPersonRelated,
|
|
5646
5652
|
Mr as ContactPosition,
|
|
@@ -5658,12 +5664,12 @@ export {
|
|
|
5658
5664
|
It as DataTablePagination,
|
|
5659
5665
|
rt as DataTablePaginationRequestParams,
|
|
5660
5666
|
xt as DataTableSortRequestParams,
|
|
5661
|
-
|
|
5667
|
+
qt as DateTimeProvider,
|
|
5662
5668
|
Or as DeletableNamedIdentity,
|
|
5663
5669
|
he as DeliveryAddress,
|
|
5664
5670
|
E as DeliveryType,
|
|
5665
5671
|
Sr as DeviceTypeResolutionConfig,
|
|
5666
|
-
|
|
5672
|
+
qr as DiscountShortInfo,
|
|
5667
5673
|
Ht as FieldValidationResultData,
|
|
5668
5674
|
re as FilterGroup,
|
|
5669
5675
|
Ne as FilterItem,
|
|
@@ -5678,7 +5684,7 @@ export {
|
|
|
5678
5684
|
br as Image,
|
|
5679
5685
|
ye as Manager,
|
|
5680
5686
|
oe as ManagerCommon,
|
|
5681
|
-
|
|
5687
|
+
dt as ManagerDataFactory,
|
|
5682
5688
|
tt as ManagerDataProvider,
|
|
5683
5689
|
st as MetaTagItem,
|
|
5684
5690
|
D as NamedIdentity,
|
|
@@ -5695,7 +5701,7 @@ export {
|
|
|
5695
5701
|
zr as PaymentType,
|
|
5696
5702
|
ft as PreferencesStorageProvider,
|
|
5697
5703
|
Pe as PriceAnalyze,
|
|
5698
|
-
|
|
5704
|
+
at as PriceAnalyzeProvider,
|
|
5699
5705
|
me as PriceCoefficient,
|
|
5700
5706
|
ze as PriceCoefficientEnum,
|
|
5701
5707
|
B as PriceTemplate,
|
|
@@ -5707,18 +5713,18 @@ export {
|
|
|
5707
5713
|
Z as PricingRole,
|
|
5708
5714
|
Tt as PricingRoleProvider,
|
|
5709
5715
|
De as PrimaryCatalogableItem,
|
|
5710
|
-
|
|
5716
|
+
_ as Product,
|
|
5711
5717
|
Pt as ProductCategoryDataProvider,
|
|
5712
5718
|
Rt as ProductDataProvider,
|
|
5713
5719
|
Br as ProductFileType,
|
|
5714
|
-
|
|
5720
|
+
_e as ProductPriceCoefficient,
|
|
5715
5721
|
Er as ProductPriceHistory,
|
|
5716
5722
|
bt as PropertiesProvider,
|
|
5717
5723
|
X as Property,
|
|
5718
5724
|
Ee as PropertyType,
|
|
5719
5725
|
Nr as PropertyTypeEnum,
|
|
5720
5726
|
H as PropertyValue,
|
|
5721
|
-
|
|
5727
|
+
_t as RecommendationsDataProvider,
|
|
5722
5728
|
xe as RecommendationsList,
|
|
5723
5729
|
w as Reference,
|
|
5724
5730
|
R as ReferenceDataProvider,
|
|
@@ -5730,14 +5736,14 @@ export {
|
|
|
5730
5736
|
Ut as SeoDataProvider,
|
|
5731
5737
|
Qe as SourcePrimaryInterest,
|
|
5732
5738
|
Ar as StockCount,
|
|
5733
|
-
|
|
5734
|
-
|
|
5739
|
+
ae as TypedInstanceFactory,
|
|
5740
|
+
de as UnitsHelper,
|
|
5735
5741
|
Nt as UnknownClientDataProvider,
|
|
5736
5742
|
We as UpdatableNamedIdentity,
|
|
5737
5743
|
jr as User,
|
|
5738
5744
|
Ve as UserCommonInfo,
|
|
5739
5745
|
Vr as UserDataProvider,
|
|
5740
|
-
|
|
5746
|
+
d as UserShortInfo,
|
|
5741
5747
|
Wr as UserTypeEnum,
|
|
5742
5748
|
xr as VersionConfig,
|
|
5743
5749
|
fe as Warehouse,
|