@snabcentr/common-lib 1.45.0 → 1.45.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/manifest.json +1 -1
- package/dist/release_notes.tmp +3 -3
- package/dist/sc-common-lib.js +85 -84
- 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/providers/catalog-provider.d.ts +2 -1
- package/dist/src/catalog/providers/catalog-provider.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 1.45.
|
|
1
|
+
## 1.45.2 (2025-04-28)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (1 change)
|
|
4
4
|
|
|
5
|
-
- [#11455:
|
|
5
|
+
- [#11455: Добавлена возможность скачать прайс-лист для категории](web_soft/libs/ts/snabcentr-common-lib@cc11192ec2da370fe39cf1d27356d8686d4db541) ([merge request](web_soft/libs/ts/snabcentr-common-lib!73))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -264,7 +264,7 @@ const B = class B {
|
|
|
264
264
|
* Конфигурация приложения.
|
|
265
265
|
*/
|
|
266
266
|
s(B, "config");
|
|
267
|
-
let
|
|
267
|
+
let d = B;
|
|
268
268
|
class yr extends xe {
|
|
269
269
|
/**
|
|
270
270
|
* Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
|
|
@@ -378,13 +378,13 @@ class x extends yr {
|
|
|
378
378
|
s(this, "priceCoefficients");
|
|
379
379
|
this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((g) => new fr(g))) ?? [], this.type = "product";
|
|
380
380
|
const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((g) => g.isPrimary));
|
|
381
|
-
t && (this.category = new fe({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new fe(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new wr(g,
|
|
381
|
+
t && (this.category = new fe({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((g) => new fe(g))), this.images = ((l = e == null ? void 0 : e.images) == null ? void 0 : l.map((g) => new wr(g, d.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((g) => new De(g))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
|
|
382
382
|
}
|
|
383
383
|
/**
|
|
384
384
|
* Возвращает признак, что это измеряемый товар.
|
|
385
385
|
*/
|
|
386
386
|
getIsMeasurable() {
|
|
387
|
-
const e =
|
|
387
|
+
const e = d.getConfig().products.units;
|
|
388
388
|
return [...e.linear, ...e.square].includes(this.unit);
|
|
389
389
|
}
|
|
390
390
|
}
|
|
@@ -720,7 +720,7 @@ const b = class b {
|
|
|
720
720
|
* - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
|
|
721
721
|
*/
|
|
722
722
|
s(this, "defaultInstanceNotificationErrorResponseHandler", m);
|
|
723
|
-
const t =
|
|
723
|
+
const t = d.getConfig().version;
|
|
724
724
|
this.defaultInstanceNotificationErrorResponseHandler = b.baseDefaultNotificationErrorResponseHandler, this.httpClient = gr.create({
|
|
725
725
|
// eslint-disable-next-line @typescript-eslint/restrict-template-expressions
|
|
726
726
|
baseURL: r,
|
|
@@ -858,7 +858,7 @@ const W = class W extends ye {
|
|
|
858
858
|
* Время кэширования данных ответов на запросы (секунд).
|
|
859
859
|
*/
|
|
860
860
|
s(this, "responseDataCacheTimeout");
|
|
861
|
-
const n =
|
|
861
|
+
const n = d.getConfig();
|
|
862
862
|
this.responseDataCacheTimeout = n.http.responseDataCacheTimeout;
|
|
863
863
|
}
|
|
864
864
|
/**
|
|
@@ -912,7 +912,7 @@ class p extends we {
|
|
|
912
912
|
*/
|
|
913
913
|
constructor() {
|
|
914
914
|
var t, n;
|
|
915
|
-
const r =
|
|
915
|
+
const r = d.getConfig(), e = {};
|
|
916
916
|
(t = r.devMode) != null && t.authBearerToken && (e.Authorization = `Bearer ${(n = r.devMode) == null ? void 0 : n.authBearerToken}`), super(`${r.http.apiUri}/api`, e);
|
|
917
917
|
}
|
|
918
918
|
}
|
|
@@ -1040,7 +1040,7 @@ class U extends ce {
|
|
|
1040
1040
|
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new U(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new x(o));
|
|
1041
1041
|
}
|
|
1042
1042
|
}
|
|
1043
|
-
class
|
|
1043
|
+
class de extends P {
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1046
1046
|
*
|
|
@@ -1055,7 +1055,7 @@ class Oe extends P {
|
|
|
1055
1055
|
this.updatedAt = e == null ? void 0 : e.updatedAt;
|
|
1056
1056
|
}
|
|
1057
1057
|
}
|
|
1058
|
-
class Tr extends
|
|
1058
|
+
class Tr extends de {
|
|
1059
1059
|
/**
|
|
1060
1060
|
* Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
|
|
1061
1061
|
*
|
|
@@ -1119,7 +1119,7 @@ class q extends P {
|
|
|
1119
1119
|
this.type = e == null ? void 0 : e.type;
|
|
1120
1120
|
}
|
|
1121
1121
|
}
|
|
1122
|
-
class
|
|
1122
|
+
class _r extends P {
|
|
1123
1123
|
/**
|
|
1124
1124
|
* Инициализирует экземпляр класса {@link DiscountShortInfo}.
|
|
1125
1125
|
*
|
|
@@ -1158,7 +1158,7 @@ class Sr extends P {
|
|
|
1158
1158
|
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = e != null && e.publishedAt ? D(e.publishedAt) ? N(e.publishedAt) : e.publishedAt : void 0, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new q(e == null ? void 0 : e.owner), this.deletedAt = e != null && e.deletedAt ? D(e.deletedAt) ? N(e.deletedAt) : e.deletedAt : void 0;
|
|
1159
1159
|
}
|
|
1160
1160
|
}
|
|
1161
|
-
class
|
|
1161
|
+
class Sr extends de {
|
|
1162
1162
|
/**
|
|
1163
1163
|
* Инициализирует экземпляр класса {@link PriceTemplate}.
|
|
1164
1164
|
*
|
|
@@ -1213,10 +1213,10 @@ class ue extends x {
|
|
|
1213
1213
|
* Признак того, что указанный продукт входит в список избранных продуктов клиента.
|
|
1214
1214
|
*/
|
|
1215
1215
|
s(this, "isFavorite");
|
|
1216
|
-
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new
|
|
1216
|
+
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new _r(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new Sr(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;
|
|
1217
1217
|
}
|
|
1218
1218
|
}
|
|
1219
|
-
class
|
|
1219
|
+
class ar {
|
|
1220
1220
|
/**
|
|
1221
1221
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1222
1222
|
*
|
|
@@ -1260,7 +1260,7 @@ class ee extends P {
|
|
|
1260
1260
|
* Признак того, что менеджер является основным для клиента.
|
|
1261
1261
|
*/
|
|
1262
1262
|
s(this, "isDefault");
|
|
1263
|
-
e && (this.salesDirection = new T(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1263
|
+
e && (this.salesDirection = new T(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new ar(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
|
|
1264
1264
|
}
|
|
1265
1265
|
}
|
|
1266
1266
|
class pe extends ee {
|
|
@@ -1294,7 +1294,7 @@ class pe extends ee {
|
|
|
1294
1294
|
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;
|
|
1295
1295
|
}
|
|
1296
1296
|
}
|
|
1297
|
-
class
|
|
1297
|
+
class Lr extends ce {
|
|
1298
1298
|
/**
|
|
1299
1299
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1300
1300
|
*
|
|
@@ -1325,7 +1325,7 @@ class ar extends ce {
|
|
|
1325
1325
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new pe(e.manager) : void 0;
|
|
1326
1326
|
}
|
|
1327
1327
|
}
|
|
1328
|
-
class re extends
|
|
1328
|
+
class re extends Lr {
|
|
1329
1329
|
/**
|
|
1330
1330
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1331
1331
|
*
|
|
@@ -1345,7 +1345,7 @@ class re extends ar {
|
|
|
1345
1345
|
this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new re(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new ue(o));
|
|
1346
1346
|
}
|
|
1347
1347
|
}
|
|
1348
|
-
class
|
|
1348
|
+
class Oe extends f {
|
|
1349
1349
|
}
|
|
1350
1350
|
class J extends P {
|
|
1351
1351
|
/**
|
|
@@ -1367,7 +1367,7 @@ class J extends P {
|
|
|
1367
1367
|
* Дополнительные метаданные свойства.
|
|
1368
1368
|
*/
|
|
1369
1369
|
s(this, "metadata");
|
|
1370
|
-
this.type = new
|
|
1370
|
+
this.type = new Oe(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
|
|
1371
1371
|
}
|
|
1372
1372
|
}
|
|
1373
1373
|
class F {
|
|
@@ -1468,10 +1468,10 @@ class Nr extends f {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
class M extends f {
|
|
1470
1470
|
}
|
|
1471
|
-
class Or extends f {
|
|
1472
|
-
}
|
|
1473
1471
|
class dr extends f {
|
|
1474
1472
|
}
|
|
1473
|
+
class Or extends f {
|
|
1474
|
+
}
|
|
1475
1475
|
class qe extends f {
|
|
1476
1476
|
}
|
|
1477
1477
|
class Ge extends f {
|
|
@@ -1535,7 +1535,7 @@ class R extends p {
|
|
|
1535
1535
|
* Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
|
|
1536
1536
|
*/
|
|
1537
1537
|
getPaymentTypes() {
|
|
1538
|
-
return this.getTypedDataArrayRequester(
|
|
1538
|
+
return this.getTypedDataArrayRequester(dr, "/public/references/payment-type", !0);
|
|
1539
1539
|
}
|
|
1540
1540
|
/**
|
|
1541
1541
|
* Возвращает {@link Promise} для получения справочника типов ресурсов.
|
|
@@ -1595,7 +1595,7 @@ class R extends p {
|
|
|
1595
1595
|
* Возвращает {@link Promise} для получения справочника типов свойств.
|
|
1596
1596
|
*/
|
|
1597
1597
|
getPropertyTypes() {
|
|
1598
|
-
return this.getTypedDataArrayRequester(
|
|
1598
|
+
return this.getTypedDataArrayRequester(Oe, "/internal/references/property-type", !0);
|
|
1599
1599
|
}
|
|
1600
1600
|
/**
|
|
1601
1601
|
* Возвращает {@link Promise} для получения справочника коэффициентов цен.
|
|
@@ -1607,7 +1607,7 @@ class R extends p {
|
|
|
1607
1607
|
* Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
|
|
1608
1608
|
*/
|
|
1609
1609
|
getProductFileType() {
|
|
1610
|
-
return this.getTypedDataArrayRequester(
|
|
1610
|
+
return this.getTypedDataArrayRequester(Or, "/public/references/product-file-type", !0);
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
var Ur = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(Ur || {});
|
|
@@ -1781,7 +1781,7 @@ class Q extends P {
|
|
|
1781
1781
|
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;
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
|
-
class
|
|
1784
|
+
class _e {
|
|
1785
1785
|
/**
|
|
1786
1786
|
* Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
|
|
1787
1787
|
*
|
|
@@ -1823,14 +1823,15 @@ class ls extends p {
|
|
|
1823
1823
|
*
|
|
1824
1824
|
* @param format Формат скачиваемого файла прайс-листа.
|
|
1825
1825
|
* @param showHidden Признак того, что необходимо включить в ответ скрытые продукты.
|
|
1826
|
+
* @param categoryId Идентификатор записи категории товаров.
|
|
1826
1827
|
* @param clientId Идентификатор клиента для которого необходимо получить файл.
|
|
1827
1828
|
*
|
|
1828
1829
|
* @see /doc/api/internal#/operations/api_internal_price_export
|
|
1829
1830
|
*/
|
|
1830
1831
|
// eslint-disable-next-line class-methods-use-this
|
|
1831
|
-
getPriceExportLink(r = "csv", e = !1, t = void 0) {
|
|
1832
|
-
let
|
|
1833
|
-
return t && (
|
|
1832
|
+
getPriceExportLink(r = "csv", e = !1, t = void 0, n = void 0) {
|
|
1833
|
+
let l = `${d.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
|
|
1834
|
+
return t && (l += `&category_id=${t}`), n && (l += `&client_id=${n}`), l;
|
|
1834
1835
|
}
|
|
1835
1836
|
}
|
|
1836
1837
|
class us extends p {
|
|
@@ -2131,7 +2132,7 @@ class ms extends p {
|
|
|
2131
2132
|
return this.get(
|
|
2132
2133
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2133
2134
|
{},
|
|
2134
|
-
(e) => e.data.map((t) => new
|
|
2135
|
+
(e) => e.data.map((t) => new _e(t))
|
|
2135
2136
|
);
|
|
2136
2137
|
}
|
|
2137
2138
|
/**
|
|
@@ -2146,7 +2147,7 @@ class ms extends p {
|
|
|
2146
2147
|
return this.patch(
|
|
2147
2148
|
`/internal/price/roles/rules/categories/${r}`,
|
|
2148
2149
|
e,
|
|
2149
|
-
(t) => t.data.map((n) => new
|
|
2150
|
+
(t) => t.data.map((n) => new _e(n))
|
|
2150
2151
|
);
|
|
2151
2152
|
}
|
|
2152
2153
|
}
|
|
@@ -2539,7 +2540,7 @@ class fs extends Ae {
|
|
|
2539
2540
|
* @see /doc/api/internal#/operations/api_internal_catalog_categories_image_save
|
|
2540
2541
|
*/
|
|
2541
2542
|
updateCategoryImage(r, e) {
|
|
2542
|
-
return this.post(`/internal/catalog/categories/${r}/image`, e);
|
|
2543
|
+
return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
|
|
2543
2544
|
}
|
|
2544
2545
|
}
|
|
2545
2546
|
class ys extends p {
|
|
@@ -2981,7 +2982,7 @@ class ie extends Tr {
|
|
|
2981
2982
|
this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new ke(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((n) => new H(n))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
|
|
2982
2983
|
}
|
|
2983
2984
|
}
|
|
2984
|
-
class
|
|
2985
|
+
class Se extends $e {
|
|
2985
2986
|
/**
|
|
2986
2987
|
* Инициализирует экземпляр класса {@link Client}.
|
|
2987
2988
|
*
|
|
@@ -3575,7 +3576,7 @@ class Ds extends Ae {
|
|
|
3575
3576
|
* @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
|
|
3576
3577
|
*/
|
|
3577
3578
|
getClient(r) {
|
|
3578
|
-
return this.get(`/internal/clients/${r}`, {}, (e) => new
|
|
3579
|
+
return this.get(`/internal/clients/${r}`, {}, (e) => new Se(e.data));
|
|
3579
3580
|
}
|
|
3580
3581
|
/**
|
|
3581
3582
|
* Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
|
|
@@ -3656,7 +3657,7 @@ class Ds extends Ae {
|
|
|
3656
3657
|
is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
|
|
3657
3658
|
preferred_warehouse_id: (t = r.preferredWarehouse) == null ? void 0 : t.id
|
|
3658
3659
|
},
|
|
3659
|
-
(n) => new
|
|
3660
|
+
(n) => new Se(n.data),
|
|
3660
3661
|
e
|
|
3661
3662
|
);
|
|
3662
3663
|
}
|
|
@@ -3766,7 +3767,7 @@ class Ds extends Ae {
|
|
|
3766
3767
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
3767
3768
|
*/
|
|
3768
3769
|
createContragentClientData(r, e, t = {}) {
|
|
3769
|
-
var g, C, A, S,
|
|
3770
|
+
var g, C, A, _, S, a, L, I;
|
|
3770
3771
|
let n;
|
|
3771
3772
|
const o = e, l = e, u = e;
|
|
3772
3773
|
switch (e.opf.slug) {
|
|
@@ -3794,7 +3795,7 @@ class Ds extends Ae {
|
|
|
3794
3795
|
name: l.name,
|
|
3795
3796
|
alternative_name: l.alternativeName,
|
|
3796
3797
|
partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
|
|
3797
|
-
manager_id: (
|
|
3798
|
+
manager_id: (_ = l.manager) == null ? void 0 : _.id,
|
|
3798
3799
|
comment: l.comment,
|
|
3799
3800
|
inn: l.inn,
|
|
3800
3801
|
kpp: l.kpp,
|
|
@@ -3812,8 +3813,8 @@ class Ds extends Ae {
|
|
|
3812
3813
|
opf: u.opf.slug,
|
|
3813
3814
|
name: u.name,
|
|
3814
3815
|
alternative_name: u.alternativeName,
|
|
3815
|
-
partner_group_id: (
|
|
3816
|
-
manager_id: (
|
|
3816
|
+
partner_group_id: (S = u.partnerGroup) == null ? void 0 : S.id,
|
|
3817
|
+
manager_id: (a = u.manager) == null ? void 0 : a.id,
|
|
3817
3818
|
comment: u.comment,
|
|
3818
3819
|
inn: u.inn,
|
|
3819
3820
|
kpp: u.kpp,
|
|
@@ -3834,7 +3835,7 @@ class Ds extends Ae {
|
|
|
3834
3835
|
opf: e.opf.slug,
|
|
3835
3836
|
name: e.name,
|
|
3836
3837
|
alternative_name: e.alternativeName,
|
|
3837
|
-
partner_group_id: (
|
|
3838
|
+
partner_group_id: (L = e.partnerGroup) == null ? void 0 : L.id,
|
|
3838
3839
|
manager_id: (I = e.manager) == null ? void 0 : I.id,
|
|
3839
3840
|
comment: e.comment
|
|
3840
3841
|
};
|
|
@@ -3843,7 +3844,7 @@ class Ds extends Ae {
|
|
|
3843
3844
|
return this.post(
|
|
3844
3845
|
`/internal/clients/${r}/contragents`,
|
|
3845
3846
|
n,
|
|
3846
|
-
(
|
|
3847
|
+
(O) => ne.createInstance(O.data),
|
|
3847
3848
|
t
|
|
3848
3849
|
);
|
|
3849
3850
|
}
|
|
@@ -3858,7 +3859,7 @@ class Ds extends Ae {
|
|
|
3858
3859
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
3859
3860
|
*/
|
|
3860
3861
|
updateContragentClientData(r, e, t = {}) {
|
|
3861
|
-
var g, C, A, S,
|
|
3862
|
+
var g, C, A, _, S, a, L, I;
|
|
3862
3863
|
let n;
|
|
3863
3864
|
const o = e, l = e, u = e;
|
|
3864
3865
|
switch (e.opf.slug) {
|
|
@@ -3886,7 +3887,7 @@ class Ds extends Ae {
|
|
|
3886
3887
|
name: l.name,
|
|
3887
3888
|
alternative_name: l.alternativeName,
|
|
3888
3889
|
partner_group_id: (A = l.partnerGroup) == null ? void 0 : A.id,
|
|
3889
|
-
manager_id: (
|
|
3890
|
+
manager_id: (_ = l.manager) == null ? void 0 : _.id,
|
|
3890
3891
|
comment: l.comment,
|
|
3891
3892
|
inn: l.inn,
|
|
3892
3893
|
kpp: l.kpp,
|
|
@@ -3904,8 +3905,8 @@ class Ds extends Ae {
|
|
|
3904
3905
|
opf: u.opf.slug,
|
|
3905
3906
|
name: u.name,
|
|
3906
3907
|
alternative_name: u.alternativeName,
|
|
3907
|
-
partner_group_id: (
|
|
3908
|
-
manager_id: (
|
|
3908
|
+
partner_group_id: (S = u.partnerGroup) == null ? void 0 : S.id,
|
|
3909
|
+
manager_id: (a = u.manager) == null ? void 0 : a.id,
|
|
3909
3910
|
comment: u.comment,
|
|
3910
3911
|
inn: u.inn,
|
|
3911
3912
|
kpp: u.kpp,
|
|
@@ -3926,7 +3927,7 @@ class Ds extends Ae {
|
|
|
3926
3927
|
opf: e.opf.slug,
|
|
3927
3928
|
name: e.name,
|
|
3928
3929
|
alternative_name: e.alternativeName,
|
|
3929
|
-
partner_group_id: (
|
|
3930
|
+
partner_group_id: (L = e.partnerGroup) == null ? void 0 : L.id,
|
|
3930
3931
|
manager_id: (I = e.manager) == null ? void 0 : I.id,
|
|
3931
3932
|
comment: e.comment
|
|
3932
3933
|
};
|
|
@@ -3935,7 +3936,7 @@ class Ds extends Ae {
|
|
|
3935
3936
|
return this.patch(
|
|
3936
3937
|
`/internal/clients/${r}/contragents/${e.id}`,
|
|
3937
3938
|
n,
|
|
3938
|
-
(
|
|
3939
|
+
(O) => ne.createInstance(O.data),
|
|
3939
3940
|
t
|
|
3940
3941
|
);
|
|
3941
3942
|
}
|
|
@@ -4442,7 +4443,7 @@ const z = class z {
|
|
|
4442
4443
|
* Список единиц измерения линейной величины.
|
|
4443
4444
|
*/
|
|
4444
4445
|
s(z, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
4445
|
-
let
|
|
4446
|
+
let ae = z;
|
|
4446
4447
|
class bs {
|
|
4447
4448
|
/**
|
|
4448
4449
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
@@ -4489,7 +4490,7 @@ class Jr {
|
|
|
4489
4490
|
this.name = r.name, this.content = r.content;
|
|
4490
4491
|
}
|
|
4491
4492
|
}
|
|
4492
|
-
class
|
|
4493
|
+
class Le {
|
|
4493
4494
|
/**
|
|
4494
4495
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
4495
4496
|
*
|
|
@@ -4536,7 +4537,7 @@ class Ts extends p {
|
|
|
4536
4537
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
4537
4538
|
*/
|
|
4538
4539
|
getResourceSeoData(r, e) {
|
|
4539
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
4540
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new Le(t.data));
|
|
4540
4541
|
}
|
|
4541
4542
|
/**
|
|
4542
4543
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -4547,7 +4548,7 @@ class Ts extends p {
|
|
|
4547
4548
|
* в случае ошибок в запросах.
|
|
4548
4549
|
*/
|
|
4549
4550
|
saveResourceSeoData(r, e = {}) {
|
|
4550
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
4551
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new Le(t.data), e);
|
|
4551
4552
|
}
|
|
4552
4553
|
/**
|
|
4553
4554
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -4560,7 +4561,7 @@ class Ts extends p {
|
|
|
4560
4561
|
}
|
|
4561
4562
|
}
|
|
4562
4563
|
const v = oe("__references_private", () => {
|
|
4563
|
-
const i = y({}), r = y(void 0), e = y(void 0), t = y(void 0), n = y(void 0), o = y(void 0), l = y(void 0), u = y(void 0), g = y(void 0), C = y(void 0), A = y(void 0),
|
|
4564
|
+
const i = y({}), r = y(void 0), e = y(void 0), t = y(void 0), n = y(void 0), o = y(void 0), l = y(void 0), u = y(void 0), g = y(void 0), C = y(void 0), A = y(void 0), _ = y(void 0), S = y(void 0), a = y(void 0), L = y(void 0), I = y(void 0), O = y(void 0), c = y(void 0);
|
|
4564
4565
|
return {
|
|
4565
4566
|
/**
|
|
4566
4567
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -4609,19 +4610,19 @@ const v = oe("__references_private", () => {
|
|
|
4609
4610
|
/**
|
|
4610
4611
|
* Справочник типов файлов продукктов/категорий.
|
|
4611
4612
|
*/
|
|
4612
|
-
productFileTypeReference:
|
|
4613
|
+
productFileTypeReference: _,
|
|
4613
4614
|
/**
|
|
4614
4615
|
* Справочник типов ресурсов.
|
|
4615
4616
|
*/
|
|
4616
|
-
resourceTypesReference:
|
|
4617
|
+
resourceTypesReference: S,
|
|
4617
4618
|
/**
|
|
4618
4619
|
* Справочник направлений продаж.
|
|
4619
4620
|
*/
|
|
4620
|
-
salesDirectionsReference:
|
|
4621
|
+
salesDirectionsReference: a,
|
|
4621
4622
|
/**
|
|
4622
4623
|
* Справочник источников первичного интереса.
|
|
4623
4624
|
*/
|
|
4624
|
-
sourcePrimaryInterestReference:
|
|
4625
|
+
sourcePrimaryInterestReference: L,
|
|
4625
4626
|
/**
|
|
4626
4627
|
* Справочник складов.
|
|
4627
4628
|
*/
|
|
@@ -4629,13 +4630,13 @@ const v = oe("__references_private", () => {
|
|
|
4629
4630
|
/**
|
|
4630
4631
|
* Справочник типов свойств.
|
|
4631
4632
|
*/
|
|
4632
|
-
propertyTypesReference:
|
|
4633
|
+
propertyTypesReference: O,
|
|
4633
4634
|
/**
|
|
4634
4635
|
* Справочник коэффициентов цен.
|
|
4635
4636
|
*/
|
|
4636
4637
|
priceCoefficientsReference: c
|
|
4637
4638
|
};
|
|
4638
|
-
}),
|
|
4639
|
+
}), _s = oe("references", () => {
|
|
4639
4640
|
const i = w(() => {
|
|
4640
4641
|
const c = v();
|
|
4641
4642
|
return !c.channelPrimaryInterestReference && !c.dataLoaderList.channelPrimaryInterestReference && (c.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(R).getChannelPrimaryInterest().then((h) => {
|
|
@@ -4691,22 +4692,22 @@ const v = oe("__references_private", () => {
|
|
|
4691
4692
|
return !c.salesDirectionsReference && !c.dataLoaderList.salesDirectionsReference && (c.dataLoaderList.salesDirectionsReference = !0, p.getInstance(R).getSalesDirections().then((h) => {
|
|
4692
4693
|
c.salesDirectionsReference = h;
|
|
4693
4694
|
}).catch(m)), c.salesDirectionsReference;
|
|
4694
|
-
}),
|
|
4695
|
+
}), _ = w(() => {
|
|
4695
4696
|
const c = v();
|
|
4696
4697
|
return !c.sourcePrimaryInterestReference && !c.dataLoaderList.sourcePrimaryInterestReference && (c.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(R).getSourcePrimaryInterest().then((h) => {
|
|
4697
4698
|
c.sourcePrimaryInterestReference = h;
|
|
4698
4699
|
}).catch(m)), c.sourcePrimaryInterestReference;
|
|
4699
|
-
}),
|
|
4700
|
+
}), S = w(() => {
|
|
4700
4701
|
const c = v();
|
|
4701
4702
|
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, p.getInstance(R).getDeliveryTypes().then((h) => {
|
|
4702
4703
|
c.deliveryTypeReference = h;
|
|
4703
4704
|
}).catch(m)), c.deliveryTypeReference;
|
|
4704
|
-
}),
|
|
4705
|
+
}), a = w(() => {
|
|
4705
4706
|
const c = v();
|
|
4706
4707
|
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, p.getInstance(Kr).getManagers().then((h) => {
|
|
4707
4708
|
c.managersList = h;
|
|
4708
4709
|
}).catch(m)), c.managersList;
|
|
4709
|
-
}),
|
|
4710
|
+
}), L = w(() => {
|
|
4710
4711
|
const c = v();
|
|
4711
4712
|
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, p.getInstance(R).getWarehouses().then((h) => {
|
|
4712
4713
|
c.warehousesReference = h;
|
|
@@ -4716,7 +4717,7 @@ const v = oe("__references_private", () => {
|
|
|
4716
4717
|
return !c.propertyTypesReference && !c.dataLoaderList.propertyTypesReference && (c.dataLoaderList.propertyTypesReference = !0, p.getInstance(R).getPropertyTypes().then((h) => {
|
|
4717
4718
|
c.propertyTypesReference = h;
|
|
4718
4719
|
}).catch(m)), c.propertyTypesReference;
|
|
4719
|
-
}),
|
|
4720
|
+
}), O = w(() => {
|
|
4720
4721
|
const c = v();
|
|
4721
4722
|
return !c.priceCoefficientsReference && !c.dataLoaderList.priceCoefficientsReference && (c.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(R).getPriceCoefficients().then((h) => {
|
|
4722
4723
|
c.priceCoefficientsReference = h;
|
|
@@ -4770,19 +4771,19 @@ const v = oe("__references_private", () => {
|
|
|
4770
4771
|
/**
|
|
4771
4772
|
* Справочник каналов первичного интереса.
|
|
4772
4773
|
*/
|
|
4773
|
-
sourcePrimaryInterestsReference:
|
|
4774
|
+
sourcePrimaryInterestsReference: _,
|
|
4774
4775
|
/**
|
|
4775
4776
|
* Справочник типов доставки.
|
|
4776
4777
|
*/
|
|
4777
|
-
deliveryTypeReference:
|
|
4778
|
+
deliveryTypeReference: S,
|
|
4778
4779
|
/**
|
|
4779
4780
|
* Список менеджеров.
|
|
4780
4781
|
*/
|
|
4781
|
-
managersList:
|
|
4782
|
+
managersList: a,
|
|
4782
4783
|
/**
|
|
4783
4784
|
* Справочник складов.
|
|
4784
4785
|
*/
|
|
4785
|
-
warehousesReference:
|
|
4786
|
+
warehousesReference: L,
|
|
4786
4787
|
/**
|
|
4787
4788
|
* Справочник типов свойств.
|
|
4788
4789
|
*/
|
|
@@ -4790,7 +4791,7 @@ const v = oe("__references_private", () => {
|
|
|
4790
4791
|
/**
|
|
4791
4792
|
* Справочник коэффициентов цен.
|
|
4792
4793
|
*/
|
|
4793
|
-
priceCoefficientsReference:
|
|
4794
|
+
priceCoefficientsReference: O
|
|
4794
4795
|
};
|
|
4795
4796
|
}), Qr = oe("__user_state_private", () => {
|
|
4796
4797
|
const i = y({}), r = y(void 0);
|
|
@@ -4804,7 +4805,7 @@ const v = oe("__references_private", () => {
|
|
|
4804
4805
|
*/
|
|
4805
4806
|
currentUser: r
|
|
4806
4807
|
};
|
|
4807
|
-
}),
|
|
4808
|
+
}), Ss = oe("user_state", () => ({
|
|
4808
4809
|
/**
|
|
4809
4810
|
* Данные о текущем пользователе.
|
|
4810
4811
|
*/
|
|
@@ -4815,7 +4816,7 @@ const v = oe("__references_private", () => {
|
|
|
4815
4816
|
}).catch(m).finally(m)), r.currentUser;
|
|
4816
4817
|
})
|
|
4817
4818
|
}));
|
|
4818
|
-
class
|
|
4819
|
+
class as extends p {
|
|
4819
4820
|
/**
|
|
4820
4821
|
* Возвращает подсказки по адресам.
|
|
4821
4822
|
*
|
|
@@ -4862,7 +4863,7 @@ class Ls extends p {
|
|
|
4862
4863
|
});
|
|
4863
4864
|
}
|
|
4864
4865
|
}
|
|
4865
|
-
class
|
|
4866
|
+
class Ls {
|
|
4866
4867
|
/**
|
|
4867
4868
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
4868
4869
|
*
|
|
@@ -4888,7 +4889,7 @@ class as {
|
|
|
4888
4889
|
export {
|
|
4889
4890
|
Ir as AnyReference,
|
|
4890
4891
|
ns as AppBaseConfig,
|
|
4891
|
-
|
|
4892
|
+
d as AppConfigProvider,
|
|
4892
4893
|
Ce as BankAccount,
|
|
4893
4894
|
Ae as BasePaginationProvider,
|
|
4894
4895
|
X as Cart,
|
|
@@ -4898,11 +4899,11 @@ export {
|
|
|
4898
4899
|
ls as CatalogProvider,
|
|
4899
4900
|
xe as CatalogableItem,
|
|
4900
4901
|
U as Category,
|
|
4901
|
-
|
|
4902
|
+
_e as CategoryPricingRule,
|
|
4902
4903
|
Ue as ChannelPrimaryInterest,
|
|
4903
4904
|
cs as City,
|
|
4904
4905
|
se as CityWithRegionAndCountry,
|
|
4905
|
-
|
|
4906
|
+
Se as Client,
|
|
4906
4907
|
Vr as ClientAdditionalData,
|
|
4907
4908
|
re as ClientCategory,
|
|
4908
4909
|
Ds as ClientDataProvider,
|
|
@@ -4914,7 +4915,7 @@ export {
|
|
|
4914
4915
|
ws as ClientsListFilters,
|
|
4915
4916
|
As as ConfiguratorProvider,
|
|
4916
4917
|
ve as Contact,
|
|
4917
|
-
|
|
4918
|
+
ar as ContactLinks,
|
|
4918
4919
|
H as ContactPerson,
|
|
4919
4920
|
Wr as ContactPersonRelated,
|
|
4920
4921
|
xr as ContactPosition,
|
|
@@ -4928,7 +4929,7 @@ export {
|
|
|
4928
4929
|
Ne as CostSourceEnum,
|
|
4929
4930
|
E as Country,
|
|
4930
4931
|
te as Currency,
|
|
4931
|
-
|
|
4932
|
+
as as DataSuggestionProvider,
|
|
4932
4933
|
vs as DataTablePagination,
|
|
4933
4934
|
Er as DataTablePaginationRequestParams,
|
|
4934
4935
|
Rs as DataTableSortRequestParams,
|
|
@@ -4937,8 +4938,8 @@ export {
|
|
|
4937
4938
|
ie as DeliveryAddress,
|
|
4938
4939
|
V as DeliveryType,
|
|
4939
4940
|
Rr as DeviceTypeResolutionConfig,
|
|
4940
|
-
|
|
4941
|
-
|
|
4941
|
+
_r as DiscountShortInfo,
|
|
4942
|
+
Ls as FieldValidationResultData,
|
|
4942
4943
|
je as FilterOpEnum,
|
|
4943
4944
|
ke as GeoCoordinates,
|
|
4944
4945
|
yr as HiddenCatalogableItem,
|
|
@@ -4964,22 +4965,22 @@ export {
|
|
|
4964
4965
|
Nr as OrderStatus,
|
|
4965
4966
|
Cs as OrdersDataProvider,
|
|
4966
4967
|
M as PartnerGroup,
|
|
4967
|
-
|
|
4968
|
+
dr as PaymentType,
|
|
4968
4969
|
os as PreferencesStorageProvider,
|
|
4969
4970
|
br as PriceCoefficientEnum,
|
|
4970
|
-
|
|
4971
|
+
Sr as PriceTemplate,
|
|
4971
4972
|
Q as PricingRole,
|
|
4972
4973
|
ms as PricingRoleProvider,
|
|
4973
4974
|
fe as PrimaryCatalogableItem,
|
|
4974
4975
|
x as Product,
|
|
4975
4976
|
us as ProductCategoryDataProvider,
|
|
4976
4977
|
ps as ProductDataProvider,
|
|
4977
|
-
|
|
4978
|
+
Or as ProductFileType,
|
|
4978
4979
|
De as ProductPriceCoefficient,
|
|
4979
4980
|
Mr as ProductPriceHistory,
|
|
4980
4981
|
fs as PropertiesProvider,
|
|
4981
4982
|
J as Property,
|
|
4982
|
-
|
|
4983
|
+
Oe as PropertyType,
|
|
4983
4984
|
$r as PropertyTypeEnum,
|
|
4984
4985
|
F as PropertyValue,
|
|
4985
4986
|
ys as RecommendationsDataProvider,
|
|
@@ -4990,14 +4991,14 @@ export {
|
|
|
4990
4991
|
qe as ResourceType,
|
|
4991
4992
|
T as SalesDirection,
|
|
4992
4993
|
Pr as SentryConfig,
|
|
4993
|
-
|
|
4994
|
+
Le as Seo,
|
|
4994
4995
|
Ts as SeoDataProvider,
|
|
4995
4996
|
Ge as SourcePrimaryInterest,
|
|
4996
4997
|
fr as StockCount,
|
|
4997
4998
|
Pe as TypedInstanceFactory,
|
|
4998
|
-
|
|
4999
|
+
ae as UnitsHelper,
|
|
4999
5000
|
Ps as UnknownClientDataProvider,
|
|
5000
|
-
|
|
5001
|
+
de as UpdatableNamedIdentity,
|
|
5001
5002
|
qr as User,
|
|
5002
5003
|
Me as UserCommonInfo,
|
|
5003
5004
|
Gr as UserDataProvider,
|
|
@@ -5005,7 +5006,7 @@ export {
|
|
|
5005
5006
|
Ur as UserTypeEnum,
|
|
5006
5007
|
Ar as VersionConfig,
|
|
5007
5008
|
le as Warehouse,
|
|
5008
|
-
|
|
5009
|
-
|
|
5009
|
+
_s as useReferencesStore,
|
|
5010
|
+
Ss as useUserStateStore
|
|
5010
5011
|
};
|
|
5011
5012
|
//# sourceMappingURL=sc-common-lib.js.map
|