nextemos 3.5.2 → 3.6.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.
|
@@ -60,7 +60,7 @@ export interface IBlogTag {
|
|
|
60
60
|
/**
|
|
61
61
|
* Facet (yüzey) verisini temsil eden arayüz
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
interface IFacet {
|
|
64
64
|
name?: string;
|
|
65
65
|
count?: number;
|
|
66
66
|
externalData?: Object;
|
|
@@ -69,7 +69,7 @@ export interface IFacet {
|
|
|
69
69
|
/**
|
|
70
70
|
* Constraint (kısıtlama) verisini temsil eden arayüz
|
|
71
71
|
*/
|
|
72
|
-
|
|
72
|
+
interface IConstraint {
|
|
73
73
|
key?: string;
|
|
74
74
|
count?: number;
|
|
75
75
|
keyAsString?: string;
|
|
@@ -1,7 +1,25 @@
|
|
|
1
|
-
import { IResponse } from "./response";
|
|
1
|
+
import { IResponse, IResponsePaging } from "./response";
|
|
2
2
|
export interface IProductResponse extends IResponse {
|
|
3
3
|
product: Product;
|
|
4
4
|
}
|
|
5
|
+
export interface IProductCategoryResponse extends IResponse {
|
|
6
|
+
category: ICategory;
|
|
7
|
+
}
|
|
8
|
+
export interface IProductCategoryAllResponse extends IResponse {
|
|
9
|
+
categories: ICategory[];
|
|
10
|
+
}
|
|
11
|
+
export interface ICategoryTreeResponse extends IResponse {
|
|
12
|
+
category: ICategoryWithChilds;
|
|
13
|
+
}
|
|
14
|
+
export interface ISearchProductsResponse extends IResponsePaging {
|
|
15
|
+
products: Product[];
|
|
16
|
+
facets: IFacet[];
|
|
17
|
+
pointInTimeId: string;
|
|
18
|
+
}
|
|
19
|
+
export interface IGetAllProductsResponse extends IResponsePaging {
|
|
20
|
+
products: Product[];
|
|
21
|
+
pointInTimeId: string;
|
|
22
|
+
}
|
|
5
23
|
export interface Product {
|
|
6
24
|
id: number;
|
|
7
25
|
productUrl: string;
|
|
@@ -41,7 +59,7 @@ export interface Product {
|
|
|
41
59
|
brand: Brand;
|
|
42
60
|
unitOfMeasure: UnitOfMeasure;
|
|
43
61
|
displayType: DisplayType;
|
|
44
|
-
categories:
|
|
62
|
+
categories: ICategory[];
|
|
45
63
|
variations: number[];
|
|
46
64
|
channelProperties: ChannelProperty[];
|
|
47
65
|
types: Type[];
|
|
@@ -91,19 +109,14 @@ export interface Brand {
|
|
|
91
109
|
export interface UnitOfMeasure {
|
|
92
110
|
id: number;
|
|
93
111
|
name: string;
|
|
94
|
-
extensionData:
|
|
95
|
-
}
|
|
96
|
-
export interface ExtensionData3 {
|
|
97
|
-
additionalProp1: string[];
|
|
98
|
-
additionalProp2: string[];
|
|
99
|
-
additionalProp3: string[];
|
|
112
|
+
extensionData: any;
|
|
100
113
|
}
|
|
101
114
|
export interface DisplayType {
|
|
102
115
|
id: number;
|
|
103
116
|
name: string;
|
|
104
117
|
extensionData: any;
|
|
105
118
|
}
|
|
106
|
-
export interface
|
|
119
|
+
export interface ICategory {
|
|
107
120
|
id: number;
|
|
108
121
|
name: string;
|
|
109
122
|
description: string;
|
|
@@ -120,6 +133,9 @@ export interface Category {
|
|
|
120
133
|
hierarchy: number[];
|
|
121
134
|
extensionData: any;
|
|
122
135
|
}
|
|
136
|
+
export interface ICategoryWithChilds extends ICategory {
|
|
137
|
+
childCategories: ICategory[];
|
|
138
|
+
}
|
|
123
139
|
export interface ChannelProperty {
|
|
124
140
|
channelId: number;
|
|
125
141
|
taxTypeId: number;
|
|
@@ -238,3 +254,26 @@ export interface AttributeValue {
|
|
|
238
254
|
sort: number;
|
|
239
255
|
extensionData: any;
|
|
240
256
|
}
|
|
257
|
+
export interface IFacet {
|
|
258
|
+
name: string;
|
|
259
|
+
displayName: string;
|
|
260
|
+
count: number;
|
|
261
|
+
className: string;
|
|
262
|
+
externalData: any;
|
|
263
|
+
constraints: IConstraint[];
|
|
264
|
+
}
|
|
265
|
+
export interface IConstraint {
|
|
266
|
+
key: string;
|
|
267
|
+
count: number;
|
|
268
|
+
displayName: string;
|
|
269
|
+
shortDisplayName: string;
|
|
270
|
+
parameterName: string;
|
|
271
|
+
routePath: string;
|
|
272
|
+
routeTitle: string;
|
|
273
|
+
routeDescription: string;
|
|
274
|
+
integrationCode: string;
|
|
275
|
+
icon: string;
|
|
276
|
+
className: string;
|
|
277
|
+
order: number;
|
|
278
|
+
keyAsString: string;
|
|
279
|
+
}
|
|
@@ -69,4 +69,90 @@ exports.ProductService = {
|
|
|
69
69
|
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
70
70
|
});
|
|
71
71
|
},
|
|
72
|
+
/**
|
|
73
|
+
* SearchProductsRequest Ürün listeleme sayfalarında kullanılır, tüm ürünleri ve filtreleri hesaplayıp döndürür.
|
|
74
|
+
* @param data İstek verilerini içeren nesne (varsayılan boş nesne)
|
|
75
|
+
* @param options İstek seçeneklerini içeren nesne
|
|
76
|
+
* @returns Product içeren cevap nesnesi
|
|
77
|
+
*/
|
|
78
|
+
SearchProductsRequest: function (data, options) {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
80
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
81
|
+
serviceUrl: this.ServiceUrl,
|
|
82
|
+
prefix: this.Prefix,
|
|
83
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
84
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
85
|
+
methodName: urls_1.default.Product.SearchProductsRequest
|
|
86
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
87
|
+
});
|
|
88
|
+
},
|
|
89
|
+
/**
|
|
90
|
+
* GetAllProductsRequest tüm ürünleri döndürme odaklı yerlerde kullanılmalıdır. Örn; Feed XML dosyalarında.
|
|
91
|
+
* @param data İstek verilerini içeren nesne (varsayılan boş nesne)
|
|
92
|
+
* @param options İstek seçeneklerini içeren nesne
|
|
93
|
+
* @returns Product içeren cevap nesnesi
|
|
94
|
+
*/
|
|
95
|
+
GetAllProductsRequest: function (data, options) {
|
|
96
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
97
|
+
return yield (0, __1.fetchRequest)().post((0, urls_1.getUrl)({
|
|
98
|
+
serviceUrl: this.ServiceUrl,
|
|
99
|
+
prefix: this.Prefix,
|
|
100
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
101
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
102
|
+
methodName: urls_1.default.Product.GetAllProductsRequest
|
|
103
|
+
}), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
104
|
+
});
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* CategoryTree istenen kategoriye ait tüm alt kategori kırılımlarını döndürür
|
|
108
|
+
* @param data İstek verilerini içeren nesne (varsayılan boş nesne)
|
|
109
|
+
* @param options İstek seçeneklerini içeren nesne
|
|
110
|
+
* @returns Product içeren cevap nesnesi
|
|
111
|
+
*/
|
|
112
|
+
CategoryTree: function (data, options) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
114
|
+
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
115
|
+
serviceUrl: this.ServiceUrl,
|
|
116
|
+
prefix: this.Prefix,
|
|
117
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
118
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
119
|
+
methodName: urls_1.default.ProductCategory.CategoryTree
|
|
120
|
+
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
121
|
+
});
|
|
122
|
+
},
|
|
123
|
+
/**
|
|
124
|
+
* İstenilen kategori listesini döndürür.
|
|
125
|
+
* @param data İstek verilerini içeren nesne (varsayılan boş nesne)
|
|
126
|
+
* @param options İstek seçeneklerini içeren nesne
|
|
127
|
+
* @returns Product içeren cevap nesnesi
|
|
128
|
+
*/
|
|
129
|
+
AllCategories: function (data, options) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
131
|
+
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
132
|
+
serviceUrl: this.ServiceUrl,
|
|
133
|
+
prefix: this.Prefix,
|
|
134
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
135
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
136
|
+
methodName: urls_1.default.ProductCategory.All
|
|
137
|
+
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
138
|
+
});
|
|
139
|
+
},
|
|
140
|
+
/**
|
|
141
|
+
* ID'ye göre kategori al.
|
|
142
|
+
* @param data İstek verilerini içeren nesne (varsayılan boş nesne)
|
|
143
|
+
* @param options İstek seçeneklerini içeren nesne
|
|
144
|
+
* @returns Product Category içeren cevap nesnesi
|
|
145
|
+
*/
|
|
146
|
+
ProductCategory: function (data, options) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return yield (0, __1.fetchRequest)().get((0, urls_1.getUrl)({
|
|
149
|
+
serviceUrl: this.ServiceUrl,
|
|
150
|
+
prefix: this.Prefix,
|
|
151
|
+
isClient: options === null || options === void 0 ? void 0 : options.useClient,
|
|
152
|
+
language: data === null || data === void 0 ? void 0 : data.language,
|
|
153
|
+
methodName: urls_1.default.ProductCategory.ProductCategory,
|
|
154
|
+
id: data === null || data === void 0 ? void 0 : data.id, // replace request id with product id
|
|
155
|
+
}), Object.assign(Object.assign({}, options), { params: data }));
|
|
156
|
+
});
|
|
157
|
+
},
|
|
72
158
|
};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { IProductResponse } from '
|
|
2
|
-
import { IApiResponse, IRequestInit } from '../..';
|
|
1
|
+
import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse } from '../..';
|
|
3
2
|
/**
|
|
4
3
|
* Product ID'sine göre Product alma isteği arayüzü.
|
|
5
4
|
*/
|
|
@@ -10,6 +9,92 @@ interface IProductRequest {
|
|
|
10
9
|
tags?: string[];
|
|
11
10
|
language?: string;
|
|
12
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* ID'sine göre Kategori alma isteği arayüzü.
|
|
14
|
+
*/
|
|
15
|
+
interface IProductCategoryRequest {
|
|
16
|
+
id: number;
|
|
17
|
+
includes?: string[];
|
|
18
|
+
tags?: string[];
|
|
19
|
+
language?: string;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Ürün listeleme sayfalarında kullanılır, tüm ürünleri ve filtreleri hesaplayıp döndürür.
|
|
23
|
+
*/
|
|
24
|
+
interface ISearchProductsRequest {
|
|
25
|
+
searchTerm?: string;
|
|
26
|
+
includes?: string[];
|
|
27
|
+
scopeTypes?: number[];
|
|
28
|
+
catalogId?: number;
|
|
29
|
+
channelId?: number;
|
|
30
|
+
brandIds?: number[];
|
|
31
|
+
categoryIds?: number[];
|
|
32
|
+
productIds?: number[];
|
|
33
|
+
productCodes?: string[];
|
|
34
|
+
typeIds?: number[];
|
|
35
|
+
startPrice?: number;
|
|
36
|
+
endPrice?: number;
|
|
37
|
+
luceneQuery?: string;
|
|
38
|
+
sort?: Sort;
|
|
39
|
+
typeKeys?: string[];
|
|
40
|
+
aggregateBy?: string[];
|
|
41
|
+
aggregationFilters?: AggregationFilter[];
|
|
42
|
+
flags?: string;
|
|
43
|
+
pageSize?: number;
|
|
44
|
+
currentPage?: number;
|
|
45
|
+
tags?: string[];
|
|
46
|
+
language?: string;
|
|
47
|
+
}
|
|
48
|
+
export interface Sort {
|
|
49
|
+
option: string;
|
|
50
|
+
order: string;
|
|
51
|
+
contentSortOptions: ContentSortOption[];
|
|
52
|
+
}
|
|
53
|
+
export interface ContentSortOption {
|
|
54
|
+
contentTypeName: string;
|
|
55
|
+
id: number;
|
|
56
|
+
}
|
|
57
|
+
export interface AggregationFilter {
|
|
58
|
+
field: string;
|
|
59
|
+
keys: string[];
|
|
60
|
+
}
|
|
61
|
+
export interface IGetAllProductsRequest {
|
|
62
|
+
includes?: string[];
|
|
63
|
+
scopeTypes?: number[];
|
|
64
|
+
catalogId?: number;
|
|
65
|
+
channelId?: number;
|
|
66
|
+
brandIds?: number[];
|
|
67
|
+
categoryIds?: number[];
|
|
68
|
+
typeIds?: number[];
|
|
69
|
+
startPrice?: number;
|
|
70
|
+
endPrice?: number;
|
|
71
|
+
sort?: Sort;
|
|
72
|
+
typeKeys?: string[];
|
|
73
|
+
flags?: string;
|
|
74
|
+
pointInTimeId?: string;
|
|
75
|
+
searchAfter?: string[];
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
currentPage?: number;
|
|
78
|
+
language?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ICategoryTreeRequest {
|
|
81
|
+
categoryId?: number;
|
|
82
|
+
includes?: string[];
|
|
83
|
+
levelCount?: number;
|
|
84
|
+
tags?: string[];
|
|
85
|
+
language?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface IAllCategoriesRequest {
|
|
88
|
+
categoryId?: number;
|
|
89
|
+
channelId?: number;
|
|
90
|
+
categoryIds?: number[];
|
|
91
|
+
parentIds?: number[];
|
|
92
|
+
searchTerm?: string;
|
|
93
|
+
hierarchyIds?: number[];
|
|
94
|
+
includes?: string[];
|
|
95
|
+
tags?: string[];
|
|
96
|
+
language?: string;
|
|
97
|
+
}
|
|
13
98
|
/**
|
|
14
99
|
* Product hizmetleri arayüzü.
|
|
15
100
|
*/
|
|
@@ -26,5 +111,25 @@ export interface IProductService {
|
|
|
26
111
|
* Product ID'sine göre Product al.
|
|
27
112
|
*/
|
|
28
113
|
Product: (data: IProductRequest, options?: IRequestInit) => Promise<IApiResponse<IProductResponse>>;
|
|
114
|
+
/**
|
|
115
|
+
* Product list with filter aggregations
|
|
116
|
+
*/
|
|
117
|
+
SearchProductsRequest: (data: ISearchProductsRequest, options?: IRequestInit) => Promise<IApiResponse<ISearchProductsResponse>>;
|
|
118
|
+
/**
|
|
119
|
+
* Get All Products
|
|
120
|
+
*/
|
|
121
|
+
GetAllProductsRequest: (data: ISearchProductsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetAllProductsResponse>>;
|
|
122
|
+
/**
|
|
123
|
+
* ID'sine göre Product Category al.
|
|
124
|
+
*/
|
|
125
|
+
ProductCategory: (data: IProductCategoryRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryResponse>>;
|
|
126
|
+
/**
|
|
127
|
+
* Kategori ağacını döndürür
|
|
128
|
+
*/
|
|
129
|
+
CategoryTree: (data: ICategoryTreeRequest, options?: IRequestInit) => Promise<IApiResponse<ICategoryTreeResponse>>;
|
|
130
|
+
/**
|
|
131
|
+
* Kategori listesi döndürür
|
|
132
|
+
*/
|
|
133
|
+
AllCategories: (data: IAllCategoriesRequest, options?: IRequestInit) => Promise<IApiResponse<IProductCategoryAllResponse>>;
|
|
29
134
|
}
|
|
30
135
|
export {};
|
package/dist/services/urls.js
CHANGED
|
@@ -26,15 +26,15 @@ exports.default = {
|
|
|
26
26
|
GetRouteInfo: '/{language}/Route/v1/GetRouteInfo',
|
|
27
27
|
},
|
|
28
28
|
Product: {
|
|
29
|
-
Product: '/{language}/Product/v1/Product/{id}',
|
|
30
|
-
SearchProductsRequest: '/{language}/Product/v1/SearchProductsRequest',
|
|
31
|
-
GetAllProductsRequest: '/{language}/Product/v1/GetAllProductsRequest',
|
|
32
|
-
SearchProductsRequestWithWorkflow: '/{language}/Product/v1/SearchProductsRequestWithWorkflow',
|
|
29
|
+
Product: '/live/{language}/Product/v1/Product/v1/{id}',
|
|
30
|
+
SearchProductsRequest: '/live/{language}/Product/v1/SearchProductsRequest',
|
|
31
|
+
GetAllProductsRequest: '/live/{language}/Product/v1/GetAllProductsRequest',
|
|
32
|
+
SearchProductsRequestWithWorkflow: '/live/{language}/Product/v1/SearchProductsRequestWithWorkflow',
|
|
33
33
|
},
|
|
34
34
|
ProductCategory: {
|
|
35
|
-
All: '/{language}/ProductCategory/v1/All',
|
|
36
|
-
ProductCategory: '/{language}/ProductCategory/v1/
|
|
37
|
-
CategoryTree: '/{language}/ProductCategory/v1/CategoryTree',
|
|
35
|
+
All: '/live/{language}/ProductCategory/v1/All',
|
|
36
|
+
ProductCategory: '/live/{language}/ProductCategory/v1/{id}',
|
|
37
|
+
CategoryTree: '/live/{language}/ProductCategory/v1/CategoryTree',
|
|
38
38
|
}
|
|
39
39
|
};
|
|
40
40
|
const getUrl = ({ isClient = false, language = process.env.DEFAULT_LANGUAGE || "tr", methodName, serviceUrl, prefix, id = '' }) => {
|