nextemos 4.2.4 → 4.2.5
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.
|
@@ -8,6 +8,9 @@ export interface IProductCategoryResponse extends IResponse {
|
|
|
8
8
|
export interface IProductCategoryAllResponse extends IResponse {
|
|
9
9
|
categories: ICategory[];
|
|
10
10
|
}
|
|
11
|
+
export interface IProductCategoryHierarchyResponse extends IResponse {
|
|
12
|
+
categories: ICategory[];
|
|
13
|
+
}
|
|
11
14
|
export interface ICategoryTreeResponse extends IResponse {
|
|
12
15
|
category: ICategoryWithChilds;
|
|
13
16
|
}
|
|
@@ -95,6 +95,17 @@ exports.ProductService = {
|
|
|
95
95
|
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
96
96
|
});
|
|
97
97
|
},
|
|
98
|
+
Hierarchy: function (data, options) {
|
|
99
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
100
|
+
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
101
|
+
serviceUrl: this.ServiceUrl,
|
|
102
|
+
prefix: this.Prefix,
|
|
103
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
104
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
105
|
+
methodName: urls_1.default.ProductCategory.Hierarchy
|
|
106
|
+
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
107
|
+
});
|
|
108
|
+
},
|
|
98
109
|
ProductCategory: function (data, options) {
|
|
99
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
100
111
|
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse } from '../..';
|
|
1
|
+
import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse, IProductCategoryHierarchyResponse } from '../..';
|
|
2
2
|
export interface IProductRequest {
|
|
3
3
|
id: number;
|
|
4
4
|
flags?: number;
|
|
@@ -86,6 +86,13 @@ export interface IAllCategoriesRequest {
|
|
|
86
86
|
tags?: string[];
|
|
87
87
|
language?: string;
|
|
88
88
|
}
|
|
89
|
+
export interface IHierarchyCategoriesRequest {
|
|
90
|
+
id?: number;
|
|
91
|
+
isPreview?: boolean;
|
|
92
|
+
includes?: string[];
|
|
93
|
+
tags?: string[];
|
|
94
|
+
language?: string;
|
|
95
|
+
}
|
|
89
96
|
export interface IProductService {
|
|
90
97
|
ServiceUrl: string;
|
|
91
98
|
Prefix: string;
|
|
@@ -95,5 +102,6 @@ export interface IProductService {
|
|
|
95
102
|
ProductCategory: (data: IProductCategoryRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryResponse>>;
|
|
96
103
|
CategoryTree: (data: ICategoryTreeRequest, options?: IRequestInit) => Promise<IApiResponse<ICategoryTreeResponse>>;
|
|
97
104
|
AllCategories: (data: IAllCategoriesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryAllResponse>>;
|
|
105
|
+
Hierarchy: (data: IHierarchyCategoriesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryHierarchyResponse>>;
|
|
98
106
|
}
|
|
99
107
|
export {};
|
package/dist/services/urls.d.ts
CHANGED
package/dist/services/urls.js
CHANGED
|
@@ -38,6 +38,7 @@ exports.default = {
|
|
|
38
38
|
},
|
|
39
39
|
ProductCategory: {
|
|
40
40
|
All: '/live/{language}/ProductCategory/v1/All',
|
|
41
|
+
Hierarchy: '/live/{language}/ProductCategory/v1/Hierarchy',
|
|
41
42
|
ProductCategory: '/live/{language}/ProductCategory/v1/{id}',
|
|
42
43
|
CategoryTree: '/live/{language}/ProductCategory/v1/CategoryTree',
|
|
43
44
|
},
|