oneentry 1.0.126 → 1.0.127
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/README.md +0 -2
- package/configure.js +25 -18
- package/dist/admins/adminsApi.d.ts +30 -25
- package/dist/admins/adminsApi.js +30 -25
- package/dist/admins/adminsInterfaces.d.ts +45 -54
- package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
- package/dist/attribute-sets/attributeSetsApi.js +26 -27
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
- package/dist/auth-provider/authProviderApi.d.ts +132 -158
- package/dist/auth-provider/authProviderApi.js +131 -157
- package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
- package/dist/base/asyncModules.d.ts +23 -21
- package/dist/base/asyncModules.js +30 -25
- package/dist/base/result.d.ts +31 -0
- package/dist/base/result.js +32 -1
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +50 -2
- package/dist/base/syncModules.d.ts +41 -49
- package/dist/base/syncModules.js +49 -48
- package/dist/base/utils.d.ts +38 -7
- package/dist/blocks/blocksApi.d.ts +27 -36
- package/dist/blocks/blocksApi.js +27 -36
- package/dist/blocks/blocksInterfaces.d.ts +92 -97
- package/dist/config.d.ts +13 -0
- package/dist/config.js +30 -0
- package/dist/events/eventsApi.d.ts +16 -33
- package/dist/events/eventsApi.js +32 -46
- package/dist/events/eventsInterfaces.d.ts +42 -37
- package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
- package/dist/file-uploading/fileUploadingApi.js +44 -47
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
- package/dist/forms/formsApi.d.ts +15 -14
- package/dist/forms/formsApi.js +15 -14
- package/dist/forms/formsInterfaces.d.ts +36 -40
- package/dist/forms-data/formsDataApi.d.ts +40 -44
- package/dist/forms-data/formsDataApi.js +42 -44
- package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
- package/dist/general-types/generalTypesApi.d.ts +5 -5
- package/dist/general-types/generalTypesApi.js +5 -5
- package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
- package/dist/index.d.ts +12 -13
- package/dist/index.js +12 -13
- package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
- package/dist/integration-collections/integrationCollectionsApi.js +86 -102
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
- package/dist/locales/localesApi.d.ts +7 -3
- package/dist/locales/localesApi.js +7 -3
- package/dist/locales/localesInterfaces.d.ts +14 -13
- package/dist/menus/menusApi.d.ts +9 -5
- package/dist/menus/menusApi.js +9 -5
- package/dist/menus/menusInterfaces.d.ts +43 -48
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +62 -70
- package/dist/orders/ordersApi.js +62 -71
- package/dist/orders/ordersInterfaces.d.ts +238 -203
- package/dist/pages/pagesApi.d.ts +67 -80
- package/dist/pages/pagesApi.js +71 -81
- package/dist/pages/pagesInterfaces.d.ts +164 -160
- package/dist/payments/paymentsApi.d.ts +24 -34
- package/dist/payments/paymentsApi.js +24 -38
- package/dist/payments/paymentsInterfaces.d.ts +82 -76
- package/dist/product-statuses/productStatusesApi.d.ts +13 -13
- package/dist/product-statuses/productStatusesApi.js +13 -13
- package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
- package/dist/products/productsApi.d.ts +246 -267
- package/dist/products/productsApi.js +247 -267
- package/dist/products/productsInterfaces.d.ts +333 -339
- package/dist/system/systemApi.d.ts +19 -21
- package/dist/system/systemApi.js +20 -21
- package/dist/system/systemInterfaces.d.ts +14 -3
- package/dist/templates/templatesApi.d.ts +13 -16
- package/dist/templates/templatesApi.js +13 -16
- package/dist/templates/templatesInterfaces.d.ts +30 -29
- package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
- package/dist/templates-preview/templatesPreviewApi.js +10 -11
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
- package/dist/users/usersApi.d.ts +36 -43
- package/dist/users/usersApi.js +36 -43
- package/dist/users/usersInterfaces.d.ts +92 -96
- package/dist/web-socket/wsApi.d.ts +5 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +7 -2
- package/package.json +16 -12
|
@@ -3,12 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/* eslint-disable jsdoc/reject-any-type */
|
|
6
7
|
const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
7
8
|
/**
|
|
8
9
|
* Controllers for working with product pages
|
|
9
10
|
* @handle /api/content/products
|
|
11
|
+
* @description Controllers for working with product pages
|
|
10
12
|
*/
|
|
11
13
|
class ProductApi extends asyncModules_1.default {
|
|
14
|
+
/**
|
|
15
|
+
* Constructor
|
|
16
|
+
* @param {StateModule} state - StateModule instance
|
|
17
|
+
* @description Constructor initializes the ProductApi with a given state.
|
|
18
|
+
*/
|
|
12
19
|
constructor(state) {
|
|
13
20
|
super(state);
|
|
14
21
|
this._defaultQuery = {
|
|
@@ -21,47 +28,45 @@ class ProductApi extends asyncModules_1.default {
|
|
|
21
28
|
}
|
|
22
29
|
/**
|
|
23
30
|
* Search for all products with pagination and filter.
|
|
24
|
-
*
|
|
25
31
|
* @handleName getProducts
|
|
26
|
-
*
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
* @param
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
* @return {IProductsResponse} Array with ProductEntity objects
|
|
32
|
+
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
33
|
+
[
|
|
34
|
+
{
|
|
35
|
+
"attributeMarker": "price",
|
|
36
|
+
"conditionMarker": "mth",
|
|
37
|
+
"statusMarker": "waiting",
|
|
38
|
+
"conditionValue": 1,
|
|
39
|
+
"pageUrls": [
|
|
40
|
+
"23-laminat-floorwood-maxima"
|
|
41
|
+
],
|
|
42
|
+
"isNested": false,
|
|
43
|
+
"title": ""
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"attributeMarker": "price",
|
|
47
|
+
"conditionMarker": "lth",
|
|
48
|
+
"conditionValue": 3,
|
|
49
|
+
"pageUrls": [
|
|
50
|
+
"23-laminat-floorwood-maxima"
|
|
51
|
+
],
|
|
52
|
+
"isNested": false,
|
|
53
|
+
"title": ""
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
57
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
58
|
+
{
|
|
59
|
+
"limit": 30,
|
|
60
|
+
"offset": 0,
|
|
61
|
+
"sortOrder": "DESC",
|
|
62
|
+
"sortKey": "id",
|
|
63
|
+
"statusId": 123,
|
|
64
|
+
"statusMarker": "in_stock",
|
|
65
|
+
"conditionValue": "new",
|
|
66
|
+
"conditionMarker": "equals",
|
|
67
|
+
"attributeMarker": "color"
|
|
68
|
+
}
|
|
69
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
65
70
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
66
71
|
* @description Fetch products with optional filters and pagination.
|
|
67
72
|
*/
|
|
@@ -76,23 +81,21 @@ class ProductApi extends asyncModules_1.default {
|
|
|
76
81
|
}
|
|
77
82
|
/**
|
|
78
83
|
* Search for all product page objects with pagination that do not have a category.
|
|
79
|
-
*
|
|
80
84
|
* @handleName getProductsEmptyPage
|
|
81
|
-
*
|
|
82
|
-
* @param
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
* @return {IProductsResponse} Array with ProductEntity objects.
|
|
85
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
86
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
87
|
+
{
|
|
88
|
+
"limit": 30,
|
|
89
|
+
"offset": 0,
|
|
90
|
+
"sortOrder": "DESC",
|
|
91
|
+
"sortKey": "id",
|
|
92
|
+
"statusId": 123,
|
|
93
|
+
"statusMarker": "in_stock",
|
|
94
|
+
"conditionValue": "new",
|
|
95
|
+
"conditionMarker": "equals",
|
|
96
|
+
"attributeMarker": "color"
|
|
97
|
+
}
|
|
98
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
96
99
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
97
100
|
* @description Search for all product page objects with pagination that do not have a category.
|
|
98
101
|
*/
|
|
@@ -103,48 +106,46 @@ class ProductApi extends asyncModules_1.default {
|
|
|
103
106
|
}
|
|
104
107
|
/**
|
|
105
108
|
* Search for all products with pagination for the selected category.
|
|
106
|
-
*
|
|
107
109
|
* @handleName getProductsByPageId
|
|
108
|
-
*
|
|
109
|
-
* @param
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
* @param
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
* @return {IProductsResponse} Array with ProductEntity objects
|
|
110
|
+
* @param {number} id - Page id. Example: 2492.
|
|
111
|
+
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
112
|
+
[
|
|
113
|
+
{
|
|
114
|
+
"attributeMarker": "price",
|
|
115
|
+
"conditionMarker": "mth",
|
|
116
|
+
"statusMarker": "waiting",
|
|
117
|
+
"conditionValue": 1,
|
|
118
|
+
"pageUrls": [
|
|
119
|
+
"23-laminat-floorwood-maxima"
|
|
120
|
+
],
|
|
121
|
+
"isNested": false,
|
|
122
|
+
"title": ""
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"attributeMarker": "price",
|
|
126
|
+
"conditionMarker": "lth",
|
|
127
|
+
"conditionValue": 3,
|
|
128
|
+
"pageUrls": [
|
|
129
|
+
"23-laminat-floorwood-maxima"
|
|
130
|
+
],
|
|
131
|
+
"isNested": false,
|
|
132
|
+
"title": ""
|
|
133
|
+
}
|
|
134
|
+
]
|
|
135
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
136
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
137
|
+
{
|
|
138
|
+
"limit": 30,
|
|
139
|
+
"offset": 0,
|
|
140
|
+
"sortOrder": "DESC",
|
|
141
|
+
"sortKey": "id",
|
|
142
|
+
"statusId": 123,
|
|
143
|
+
"statusMarker": "in_stock",
|
|
144
|
+
"conditionValue": "new",
|
|
145
|
+
"conditionMarker": "equals",
|
|
146
|
+
"attributeMarker": "color"
|
|
147
|
+
}
|
|
148
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
148
149
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
149
150
|
* @description Fetch products by page ID with optional filters and pagination.
|
|
150
151
|
*/
|
|
@@ -155,24 +156,22 @@ class ProductApi extends asyncModules_1.default {
|
|
|
155
156
|
}
|
|
156
157
|
/**
|
|
157
158
|
* Search for information about products and prices for the selected category.
|
|
158
|
-
*
|
|
159
159
|
* @handleName getProductsPriceByPageUrl
|
|
160
|
-
*
|
|
161
|
-
* @param
|
|
162
|
-
* @param
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
* @return {IProductsInfo} Array with ProductInformation objects.
|
|
160
|
+
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
161
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
162
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
163
|
+
{
|
|
164
|
+
"limit": 30,
|
|
165
|
+
"offset": 0,
|
|
166
|
+
"sortOrder": "DESC",
|
|
167
|
+
"sortKey": "id",
|
|
168
|
+
"statusId": 123,
|
|
169
|
+
"statusMarker": "in_stock",
|
|
170
|
+
"conditionValue": "new",
|
|
171
|
+
"conditionMarker": "equals",
|
|
172
|
+
"attributeMarker": "color"
|
|
173
|
+
}
|
|
174
|
+
* @returns {IProductsInfo} Array with ProductInformation objects.
|
|
176
175
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
177
176
|
* @description Search for information about products and prices for the selected category.
|
|
178
177
|
*/
|
|
@@ -187,48 +186,46 @@ class ProductApi extends asyncModules_1.default {
|
|
|
187
186
|
}
|
|
188
187
|
/**
|
|
189
188
|
* Search for all products with pagination for the selected category.
|
|
190
|
-
*
|
|
191
189
|
* @handleName getProductsByPageUrl
|
|
192
|
-
*
|
|
193
|
-
* @param
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
* @param
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
* @return {IProductsResponse} Array with ProductEntity objects.
|
|
190
|
+
* @param {string} url - Page url. Example: "catalog".
|
|
191
|
+
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
192
|
+
[
|
|
193
|
+
{
|
|
194
|
+
"attributeMarker": "price",
|
|
195
|
+
"conditionMarker": "mth",
|
|
196
|
+
"statusMarker": "waiting",
|
|
197
|
+
"conditionValue": 1,
|
|
198
|
+
"pageUrls": [
|
|
199
|
+
"23-laminat-floorwood-maxima"
|
|
200
|
+
],
|
|
201
|
+
"isNested": false,
|
|
202
|
+
"title": ""
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
"attributeMarker": "price",
|
|
206
|
+
"conditionMarker": "lth",
|
|
207
|
+
"conditionValue": 3,
|
|
208
|
+
"pageUrls": [
|
|
209
|
+
"23-laminat-floorwood-maxima"
|
|
210
|
+
],
|
|
211
|
+
"isNested": false,
|
|
212
|
+
"title": ""
|
|
213
|
+
}
|
|
214
|
+
]
|
|
215
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
216
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
217
|
+
{
|
|
218
|
+
"limit": 30,
|
|
219
|
+
"offset": 0,
|
|
220
|
+
"sortOrder": "DESC",
|
|
221
|
+
"sortKey": "id",
|
|
222
|
+
"statusId": 123,
|
|
223
|
+
"statusMarker": "in_stock",
|
|
224
|
+
"conditionValue": "new",
|
|
225
|
+
"conditionMarker": "equals",
|
|
226
|
+
"attributeMarker": "color"
|
|
227
|
+
}
|
|
228
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
232
229
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
233
230
|
* @description Search for all products with pagination for the selected category.
|
|
234
231
|
*/
|
|
@@ -240,29 +237,26 @@ class ProductApi extends asyncModules_1.default {
|
|
|
240
237
|
}
|
|
241
238
|
/**
|
|
242
239
|
* Find all related product page objects.
|
|
243
|
-
*
|
|
244
240
|
* @handleName getRelatedProductsById
|
|
245
|
-
*
|
|
246
|
-
* @param
|
|
247
|
-
* @param
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
* @param
|
|
261
|
-
* @param
|
|
262
|
-
* @param
|
|
263
|
-
* @
|
|
264
|
-
*
|
|
265
|
-
* @return {IProductsResponse} Array with ProductEntity objects
|
|
241
|
+
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
242
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
243
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
244
|
+
{
|
|
245
|
+
"limit": 30,
|
|
246
|
+
"offset": 0,
|
|
247
|
+
"sortOrder": "DESC",
|
|
248
|
+
"sortKey": "id",
|
|
249
|
+
"statusId": 123,
|
|
250
|
+
"statusMarker": "in_stock",
|
|
251
|
+
"conditionValue": "new",
|
|
252
|
+
"conditionMarker": "equals",
|
|
253
|
+
"attributeMarker": "color"
|
|
254
|
+
}
|
|
255
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
256
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
257
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
258
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
259
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
266
260
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
267
261
|
* @description Find all related product page objects.
|
|
268
262
|
*/
|
|
@@ -273,33 +267,31 @@ class ProductApi extends asyncModules_1.default {
|
|
|
273
267
|
}
|
|
274
268
|
/**
|
|
275
269
|
* Find products by its ids.
|
|
276
|
-
*
|
|
277
270
|
* @handleName getProductsByIds
|
|
278
|
-
*
|
|
279
|
-
* @param
|
|
280
|
-
* @param
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
* @param
|
|
294
|
-
* @param
|
|
295
|
-
* @param
|
|
296
|
-
* @param
|
|
297
|
-
* @param
|
|
298
|
-
* @param
|
|
299
|
-
* @param
|
|
300
|
-
* @param
|
|
301
|
-
* @
|
|
302
|
-
* @return {IProductsEntity[]} Array with ProductEntity objects
|
|
271
|
+
* @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
272
|
+
* @param {string} [langCode] - Language code. Default "en_US".
|
|
273
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
274
|
+
{
|
|
275
|
+
"limit": 30,
|
|
276
|
+
"offset": 0,
|
|
277
|
+
"sortOrder": "DESC",
|
|
278
|
+
"sortKey": "id",
|
|
279
|
+
"statusId": 123,
|
|
280
|
+
"statusMarker": "in_stock",
|
|
281
|
+
"conditionValue": "new",
|
|
282
|
+
"conditionMarker": "equals",
|
|
283
|
+
"attributeMarker": "color"
|
|
284
|
+
}
|
|
285
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
286
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
287
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
288
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
289
|
+
* @param {number} [userQuery.statusId] - Optional parameter - search by status id. Example: 123.
|
|
290
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: "in_stock".
|
|
291
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
|
|
292
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
|
|
293
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
|
|
294
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
303
295
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
304
296
|
* @description Find products by its ids.
|
|
305
297
|
*/
|
|
@@ -315,12 +307,10 @@ class ProductApi extends asyncModules_1.default {
|
|
|
315
307
|
}
|
|
316
308
|
/**
|
|
317
309
|
* Retrieve one product object.
|
|
318
|
-
*
|
|
319
310
|
* @handleName getProductById
|
|
320
|
-
*
|
|
321
|
-
* @param
|
|
322
|
-
* @
|
|
323
|
-
* @return {IProductsEntity} ProductEntity object.
|
|
311
|
+
* @param {number} [id] - Product id. Example: 12345.
|
|
312
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
313
|
+
* @returns {IProductsEntity} ProductEntity object.
|
|
324
314
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
325
315
|
* @description Retrieve one product object.
|
|
326
316
|
*/
|
|
@@ -330,11 +320,9 @@ class ProductApi extends asyncModules_1.default {
|
|
|
330
320
|
}
|
|
331
321
|
/**
|
|
332
322
|
* Getting a product block object by product id.
|
|
333
|
-
*
|
|
334
323
|
* @handleName getProductBlockById
|
|
335
|
-
*
|
|
336
|
-
* @
|
|
337
|
-
* @return {IProductBlock} - Product block object.
|
|
324
|
+
* @param {number} id - Product id. Example: 12345.
|
|
325
|
+
* @returns {IProductBlock} - Product block object.
|
|
338
326
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
339
327
|
* @description Getting a product block object by product id.
|
|
340
328
|
*/
|
|
@@ -344,12 +332,10 @@ class ProductApi extends asyncModules_1.default {
|
|
|
344
332
|
}
|
|
345
333
|
/**
|
|
346
334
|
* Quick search for product page objects with limited output.
|
|
347
|
-
*
|
|
348
335
|
* @handleName searchProduct
|
|
349
|
-
*
|
|
350
|
-
* @param
|
|
351
|
-
* @
|
|
352
|
-
* @return {IProductsEntity[]} Array with ProductEntity objects
|
|
336
|
+
* @param {string} name - Text to search product page objects (search is based on the title field of the localizeInfos object with language consideration). Example: "laminat".
|
|
337
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
338
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
353
339
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
354
340
|
* @description Quick search for product page objects with limited output.
|
|
355
341
|
*/
|
|
@@ -369,23 +355,21 @@ class ProductApi extends asyncModules_1.default {
|
|
|
369
355
|
}
|
|
370
356
|
/**
|
|
371
357
|
* Getting the number of products for the entire catalog.
|
|
372
|
-
*
|
|
373
358
|
* @handleName getProductsCount
|
|
374
|
-
*
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
* @return {IProductsCount} Object with product items count.
|
|
359
|
+
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
360
|
+
[
|
|
361
|
+
{
|
|
362
|
+
"attributeMarker": "price",
|
|
363
|
+
"conditionMarker": "in",
|
|
364
|
+
"statusMarker": "status_1",
|
|
365
|
+
"conditionValue": {},
|
|
366
|
+
"pageUrls": [
|
|
367
|
+
"23-laminat-floorwood-maxima"
|
|
368
|
+
],
|
|
369
|
+
"title": "Iphone 17 Pro"
|
|
370
|
+
}
|
|
371
|
+
]
|
|
372
|
+
* @returns {IProductsCount} Object with product items count.
|
|
389
373
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
390
374
|
* @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
|
|
391
375
|
*/
|
|
@@ -397,24 +381,22 @@ class ProductApi extends asyncModules_1.default {
|
|
|
397
381
|
}
|
|
398
382
|
/**
|
|
399
383
|
* Getting the number of products on a catalog page by page ID.
|
|
400
|
-
*
|
|
401
384
|
* @handleName getProductsCountByPageId
|
|
402
|
-
*
|
|
403
|
-
* @param
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
* @return {IProductsCount} Object with product items count.
|
|
385
|
+
* @param {string} id - Page ID.
|
|
386
|
+
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
387
|
+
[
|
|
388
|
+
{
|
|
389
|
+
"attributeMarker": "price",
|
|
390
|
+
"conditionMarker": "in",
|
|
391
|
+
"statusMarker": "status_1",
|
|
392
|
+
"conditionValue": {},
|
|
393
|
+
"pageUrls": [
|
|
394
|
+
"23-laminat-floorwood-maxima"
|
|
395
|
+
],
|
|
396
|
+
"title": "Iphone 17 Pro"
|
|
397
|
+
}
|
|
398
|
+
]
|
|
399
|
+
* @returns {IProductsCount} Object with product items count.
|
|
418
400
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
419
401
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
420
402
|
*/
|
|
@@ -426,24 +408,22 @@ class ProductApi extends asyncModules_1.default {
|
|
|
426
408
|
}
|
|
427
409
|
/**
|
|
428
410
|
* Getting the number of products for the catalog page by page url.
|
|
429
|
-
*
|
|
430
411
|
* @handleName getProductsCountByPageUrl
|
|
431
|
-
*
|
|
432
|
-
* @param
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
* @return {IProductsCount} Object with product items count.
|
|
412
|
+
* @param {string} url -
|
|
413
|
+
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
414
|
+
[
|
|
415
|
+
{
|
|
416
|
+
"attributeMarker": "price",
|
|
417
|
+
"conditionMarker": "in",
|
|
418
|
+
"statusMarker": "status_1",
|
|
419
|
+
"conditionValue": {},
|
|
420
|
+
"pageUrls": [
|
|
421
|
+
"23-laminat-floorwood-maxima"
|
|
422
|
+
],
|
|
423
|
+
"title": "Iphone 17 Pro"
|
|
424
|
+
}
|
|
425
|
+
]
|
|
426
|
+
* @returns {IProductsCount} Object with product items count.
|
|
447
427
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
448
428
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
|
|
449
429
|
*/
|