@snabcentr/common-lib 1.42.0 → 1.43.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 +3 -3
- package/dist/sc-common-lib.js +38 -28
- 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/interfaces/i-file-upload-data.d.ts +2 -10
- package/dist/src/catalog/interfaces/i-file-upload-data.d.ts.map +1 -1
- package/dist/src/catalog/providers/properties-provider.d.ts +16 -7
- package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
- package/dist/src/system/interfaces/i-file.d.ts +14 -0
- package/dist/src/system/interfaces/i-file.d.ts.map +1 -0
- package/dist/src/system/interfaces/index.d.ts +1 -0
- package/dist/src/system/interfaces/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/src/catalog/interfaces/i-file.d.ts +0 -22
- package/dist/src/catalog/interfaces/i-file.d.ts.map +0 -1
package/dist/manifest.json
CHANGED
package/dist/release_notes.tmp
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
## 1.
|
|
1
|
+
## 1.43.0 (2025-04-25)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### added (1 change)
|
|
4
4
|
|
|
5
|
-
- [#
|
|
5
|
+
- [#11455: Добавлена возможность загрузки изображений категорий](web_soft/libs/ts/snabcentr-common-lib@2f246ba9a06accf5d72bb2cc33402d848b91fab6) ([merge request](web_soft/libs/ts/snabcentr-common-lib!69))
|
|
6
6
|
|
package/dist/sc-common-lib.js
CHANGED
|
@@ -1215,7 +1215,7 @@ class ue extends x {
|
|
|
1215
1215
|
this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new Sr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new _r(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
|
-
class
|
|
1218
|
+
class ar {
|
|
1219
1219
|
/**
|
|
1220
1220
|
* Инициализирует экземпляр класса {@link ContactLinks}.
|
|
1221
1221
|
*
|
|
@@ -1259,7 +1259,7 @@ class ee extends P {
|
|
|
1259
1259
|
* Признак того, что менеджер является основным для клиента.
|
|
1260
1260
|
*/
|
|
1261
1261
|
s(this, "isDefault");
|
|
1262
|
-
e && (this.salesDirection = new T(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new
|
|
1262
|
+
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));
|
|
1263
1263
|
}
|
|
1264
1264
|
}
|
|
1265
1265
|
class pe extends ee {
|
|
@@ -1293,7 +1293,7 @@ class pe extends ee {
|
|
|
1293
1293
|
this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId;
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
|
-
class
|
|
1296
|
+
class Lr extends ce {
|
|
1297
1297
|
/**
|
|
1298
1298
|
* Инициализирует экземпляр класса {@link BaseClientCategory}.
|
|
1299
1299
|
*
|
|
@@ -1324,7 +1324,7 @@ class ar extends ce {
|
|
|
1324
1324
|
this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new pe(e.manager) : void 0;
|
|
1325
1325
|
}
|
|
1326
1326
|
}
|
|
1327
|
-
class re extends
|
|
1327
|
+
class re extends Lr {
|
|
1328
1328
|
/**
|
|
1329
1329
|
* Инициализирует экземпляр класса {@link ClientCategory}.
|
|
1330
1330
|
*
|
|
@@ -2530,6 +2530,16 @@ class fs extends Ae {
|
|
|
2530
2530
|
updateCategorySlug(r, e) {
|
|
2531
2531
|
return this.patch(`/internal/catalog/categories/${r}/properties/slug`, { slug: e });
|
|
2532
2532
|
}
|
|
2533
|
+
/**
|
|
2534
|
+
* Обновляет изображение категории.
|
|
2535
|
+
*
|
|
2536
|
+
* @param categoryId Идентификатор категории.
|
|
2537
|
+
* @param fileData Данные загружаемого файла.
|
|
2538
|
+
* @see /doc/api/internal#/operations/api_internal_catalog_categories_image_save
|
|
2539
|
+
*/
|
|
2540
|
+
updateCategoryImage(r, e) {
|
|
2541
|
+
return this.post(`/internal/catalog/categories/${r}/image`, e);
|
|
2542
|
+
}
|
|
2533
2543
|
}
|
|
2534
2544
|
class ys extends p {
|
|
2535
2545
|
/**
|
|
@@ -3755,7 +3765,7 @@ class Ds extends Ae {
|
|
|
3755
3765
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
|
|
3756
3766
|
*/
|
|
3757
3767
|
createContragentClientData(r, e, t = {}) {
|
|
3758
|
-
var g, y, A, S, _,
|
|
3768
|
+
var g, y, A, S, _, a, L, I;
|
|
3759
3769
|
let n;
|
|
3760
3770
|
const o = e, l = e, u = e;
|
|
3761
3771
|
switch (e.opf.slug) {
|
|
@@ -3802,7 +3812,7 @@ class Ds extends Ae {
|
|
|
3802
3812
|
name: u.name,
|
|
3803
3813
|
alternative_name: u.alternativeName,
|
|
3804
3814
|
partner_group_id: (_ = u.partnerGroup) == null ? void 0 : _.id,
|
|
3805
|
-
manager_id: (
|
|
3815
|
+
manager_id: (a = u.manager) == null ? void 0 : a.id,
|
|
3806
3816
|
comment: u.comment,
|
|
3807
3817
|
inn: u.inn,
|
|
3808
3818
|
kpp: u.kpp,
|
|
@@ -3823,7 +3833,7 @@ class Ds extends Ae {
|
|
|
3823
3833
|
opf: e.opf.slug,
|
|
3824
3834
|
name: e.name,
|
|
3825
3835
|
alternative_name: e.alternativeName,
|
|
3826
|
-
partner_group_id: (
|
|
3836
|
+
partner_group_id: (L = e.partnerGroup) == null ? void 0 : L.id,
|
|
3827
3837
|
manager_id: (I = e.manager) == null ? void 0 : I.id,
|
|
3828
3838
|
comment: e.comment
|
|
3829
3839
|
};
|
|
@@ -3847,7 +3857,7 @@ class Ds extends Ae {
|
|
|
3847
3857
|
* @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
|
|
3848
3858
|
*/
|
|
3849
3859
|
updateContragentClientData(r, e, t = {}) {
|
|
3850
|
-
var g, y, A, S, _,
|
|
3860
|
+
var g, y, A, S, _, a, L, I;
|
|
3851
3861
|
let n;
|
|
3852
3862
|
const o = e, l = e, u = e;
|
|
3853
3863
|
switch (e.opf.slug) {
|
|
@@ -3894,7 +3904,7 @@ class Ds extends Ae {
|
|
|
3894
3904
|
name: u.name,
|
|
3895
3905
|
alternative_name: u.alternativeName,
|
|
3896
3906
|
partner_group_id: (_ = u.partnerGroup) == null ? void 0 : _.id,
|
|
3897
|
-
manager_id: (
|
|
3907
|
+
manager_id: (a = u.manager) == null ? void 0 : a.id,
|
|
3898
3908
|
comment: u.comment,
|
|
3899
3909
|
inn: u.inn,
|
|
3900
3910
|
kpp: u.kpp,
|
|
@@ -3915,7 +3925,7 @@ class Ds extends Ae {
|
|
|
3915
3925
|
opf: e.opf.slug,
|
|
3916
3926
|
name: e.name,
|
|
3917
3927
|
alternative_name: e.alternativeName,
|
|
3918
|
-
partner_group_id: (
|
|
3928
|
+
partner_group_id: (L = e.partnerGroup) == null ? void 0 : L.id,
|
|
3919
3929
|
manager_id: (I = e.manager) == null ? void 0 : I.id,
|
|
3920
3930
|
comment: e.comment
|
|
3921
3931
|
};
|
|
@@ -4431,7 +4441,7 @@ const z = class z {
|
|
|
4431
4441
|
* Список единиц измерения линейной величины.
|
|
4432
4442
|
*/
|
|
4433
4443
|
s(z, "linearValues", ["пог.м.", "м.", "м2"]);
|
|
4434
|
-
let
|
|
4444
|
+
let ae = z;
|
|
4435
4445
|
class bs {
|
|
4436
4446
|
/**
|
|
4437
4447
|
* Генерирует и возвращает данные-заглушку неопределённого менеджера.
|
|
@@ -4478,7 +4488,7 @@ class Jr {
|
|
|
4478
4488
|
this.name = r.name, this.content = r.content;
|
|
4479
4489
|
}
|
|
4480
4490
|
}
|
|
4481
|
-
class
|
|
4491
|
+
class Le {
|
|
4482
4492
|
/**
|
|
4483
4493
|
* Инициализирует экземпляр класса {@link Seo}.
|
|
4484
4494
|
*
|
|
@@ -4525,7 +4535,7 @@ class Ts extends p {
|
|
|
4525
4535
|
* @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
|
|
4526
4536
|
*/
|
|
4527
4537
|
getResourceSeoData(r, e) {
|
|
4528
|
-
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new
|
|
4538
|
+
return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new Le(t.data));
|
|
4529
4539
|
}
|
|
4530
4540
|
/**
|
|
4531
4541
|
* Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
|
|
@@ -4536,7 +4546,7 @@ class Ts extends p {
|
|
|
4536
4546
|
* в случае ошибок в запросах.
|
|
4537
4547
|
*/
|
|
4538
4548
|
saveResourceSeoData(r, e = {}) {
|
|
4539
|
-
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new
|
|
4549
|
+
return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new Le(t.data), e);
|
|
4540
4550
|
}
|
|
4541
4551
|
/**
|
|
4542
4552
|
* Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
|
|
@@ -4549,7 +4559,7 @@ class Ts extends p {
|
|
|
4549
4559
|
}
|
|
4550
4560
|
}
|
|
4551
4561
|
const v = oe("__references_private", () => {
|
|
4552
|
-
const i = w({}), r = w(void 0), e = w(void 0), t = w(void 0), n = w(void 0), o = w(void 0), l = w(void 0), u = w(void 0), g = w(void 0), y = w(void 0), A = w(void 0), S = w(void 0), _ = w(void 0),
|
|
4562
|
+
const i = w({}), r = w(void 0), e = w(void 0), t = w(void 0), n = w(void 0), o = w(void 0), l = w(void 0), u = w(void 0), g = w(void 0), y = w(void 0), A = w(void 0), S = w(void 0), _ = w(void 0), a = w(void 0), L = w(void 0), I = w(void 0), O = w(void 0), c = w(void 0);
|
|
4553
4563
|
return {
|
|
4554
4564
|
/**
|
|
4555
4565
|
* Список загружаемых/загруженных на данный момент значений.
|
|
@@ -4606,11 +4616,11 @@ const v = oe("__references_private", () => {
|
|
|
4606
4616
|
/**
|
|
4607
4617
|
* Справочник направлений продаж.
|
|
4608
4618
|
*/
|
|
4609
|
-
salesDirectionsReference:
|
|
4619
|
+
salesDirectionsReference: a,
|
|
4610
4620
|
/**
|
|
4611
4621
|
* Справочник источников первичного интереса.
|
|
4612
4622
|
*/
|
|
4613
|
-
sourcePrimaryInterestReference:
|
|
4623
|
+
sourcePrimaryInterestReference: L,
|
|
4614
4624
|
/**
|
|
4615
4625
|
* Справочник складов.
|
|
4616
4626
|
*/
|
|
@@ -4690,12 +4700,12 @@ const v = oe("__references_private", () => {
|
|
|
4690
4700
|
return !c.deliveryTypeReference && !c.dataLoaderList.deliveryTypeReference && (c.dataLoaderList.deliveryTypeReference = !0, p.getInstance(R).getDeliveryTypes().then((h) => {
|
|
4691
4701
|
c.deliveryTypeReference = h;
|
|
4692
4702
|
}).catch(m)), c.deliveryTypeReference;
|
|
4693
|
-
}),
|
|
4703
|
+
}), a = C(() => {
|
|
4694
4704
|
const c = v();
|
|
4695
4705
|
return !c.managersList && !c.dataLoaderList.managersList && (c.dataLoaderList.managersList = !0, p.getInstance(Kr).getManagers().then((h) => {
|
|
4696
4706
|
c.managersList = h;
|
|
4697
4707
|
}).catch(m)), c.managersList;
|
|
4698
|
-
}),
|
|
4708
|
+
}), L = C(() => {
|
|
4699
4709
|
const c = v();
|
|
4700
4710
|
return !c.warehousesReference && !c.dataLoaderList.warehousesReference && (c.dataLoaderList.warehousesReference = !0, p.getInstance(R).getWarehouses().then((h) => {
|
|
4701
4711
|
c.warehousesReference = h;
|
|
@@ -4767,11 +4777,11 @@ const v = oe("__references_private", () => {
|
|
|
4767
4777
|
/**
|
|
4768
4778
|
* Список менеджеров.
|
|
4769
4779
|
*/
|
|
4770
|
-
managersList:
|
|
4780
|
+
managersList: a,
|
|
4771
4781
|
/**
|
|
4772
4782
|
* Справочник складов.
|
|
4773
4783
|
*/
|
|
4774
|
-
warehousesReference:
|
|
4784
|
+
warehousesReference: L,
|
|
4775
4785
|
/**
|
|
4776
4786
|
* Справочник типов свойств.
|
|
4777
4787
|
*/
|
|
@@ -4804,7 +4814,7 @@ const v = oe("__references_private", () => {
|
|
|
4804
4814
|
}).catch(m).finally(m)), r.currentUser;
|
|
4805
4815
|
})
|
|
4806
4816
|
}));
|
|
4807
|
-
class
|
|
4817
|
+
class as extends p {
|
|
4808
4818
|
/**
|
|
4809
4819
|
* Возвращает подсказки по адресам.
|
|
4810
4820
|
*
|
|
@@ -4851,7 +4861,7 @@ class Ls extends p {
|
|
|
4851
4861
|
});
|
|
4852
4862
|
}
|
|
4853
4863
|
}
|
|
4854
|
-
class
|
|
4864
|
+
class Ls {
|
|
4855
4865
|
/**
|
|
4856
4866
|
* Инициализирует экземпляр класса {@link FieldValidationResultData}.
|
|
4857
4867
|
*
|
|
@@ -4903,7 +4913,7 @@ export {
|
|
|
4903
4913
|
ws as ClientsListFilters,
|
|
4904
4914
|
As as ConfiguratorProvider,
|
|
4905
4915
|
ve as Contact,
|
|
4906
|
-
|
|
4916
|
+
ar as ContactLinks,
|
|
4907
4917
|
H as ContactPerson,
|
|
4908
4918
|
Wr as ContactPersonRelated,
|
|
4909
4919
|
xr as ContactPosition,
|
|
@@ -4917,7 +4927,7 @@ export {
|
|
|
4917
4927
|
Ne as CostSourceEnum,
|
|
4918
4928
|
E as Country,
|
|
4919
4929
|
te as Currency,
|
|
4920
|
-
|
|
4930
|
+
as as DataSuggestionProvider,
|
|
4921
4931
|
vs as DataTablePagination,
|
|
4922
4932
|
Er as DataTablePaginationRequestParams,
|
|
4923
4933
|
Rs as DataTableSortRequestParams,
|
|
@@ -4927,7 +4937,7 @@ export {
|
|
|
4927
4937
|
V as DeliveryType,
|
|
4928
4938
|
Rr as DeviceTypeResolutionConfig,
|
|
4929
4939
|
Sr as DiscountShortInfo,
|
|
4930
|
-
|
|
4940
|
+
Ls as FieldValidationResultData,
|
|
4931
4941
|
je as FilterOpEnum,
|
|
4932
4942
|
ke as GeoCoordinates,
|
|
4933
4943
|
yr as HiddenCatalogableItem,
|
|
@@ -4979,12 +4989,12 @@ export {
|
|
|
4979
4989
|
qe as ResourceType,
|
|
4980
4990
|
T as SalesDirection,
|
|
4981
4991
|
Pr as SentryConfig,
|
|
4982
|
-
|
|
4992
|
+
Le as Seo,
|
|
4983
4993
|
Ts as SeoDataProvider,
|
|
4984
4994
|
Ge as SourcePrimaryInterest,
|
|
4985
4995
|
fr as StockCount,
|
|
4986
4996
|
Pe as TypedInstanceFactory,
|
|
4987
|
-
|
|
4997
|
+
ae as UnitsHelper,
|
|
4988
4998
|
Ps as UnknownClientDataProvider,
|
|
4989
4999
|
de as UpdatableNamedIdentity,
|
|
4990
5000
|
qr as User,
|