oneentry 1.0.126 → 1.0.128
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 +18 -13
- package/dist/admins/adminsApi.js +18 -13
- package/dist/admins/adminsInterfaces.d.ts +16 -25
- package/dist/attribute-sets/attributeSetsApi.d.ts +14 -15
- package/dist/attribute-sets/attributeSetsApi.js +14 -15
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +78 -84
- package/dist/auth-provider/authProviderApi.d.ts +53 -79
- package/dist/auth-provider/authProviderApi.js +52 -78
- package/dist/auth-provider/authProvidersInterfaces.d.ts +98 -94
- package/dist/base/asyncModules.d.ts +23 -21
- package/dist/base/asyncModules.js +39 -29
- package/dist/base/result.d.ts +31 -0
- package/dist/base/result.js +32 -5
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +50 -2
- package/dist/base/syncModules.d.ts +42 -50
- package/dist/base/syncModules.js +106 -58
- package/dist/base/utils.d.ts +33 -2
- package/dist/blocks/blocksApi.d.ts +9 -18
- package/dist/blocks/blocksApi.js +9 -18
- package/dist/blocks/blocksInterfaces.d.ts +41 -46
- package/dist/config.d.ts +13 -0
- package/dist/config.js +30 -0
- package/dist/events/eventsApi.d.ts +10 -27
- package/dist/events/eventsApi.js +26 -40
- package/dist/events/eventsInterfaces.d.ts +33 -28
- package/dist/file-uploading/fileUploadingApi.d.ts +12 -17
- package/dist/file-uploading/fileUploadingApi.js +14 -17
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +8 -19
- package/dist/forms/formsApi.d.ts +10 -9
- package/dist/forms/formsApi.js +10 -9
- package/dist/forms/formsInterfaces.d.ts +20 -12
- package/dist/forms-data/formsDataApi.d.ts +24 -28
- package/dist/forms-data/formsDataApi.js +25 -28
- package/dist/forms-data/formsDataInterfaces.d.ts +71 -71
- package/dist/general-types/generalTypesApi.d.ts +5 -5
- package/dist/general-types/generalTypesApi.js +5 -5
- package/dist/general-types/generalTypesInterfaces.d.ts +5 -8
- package/dist/index.d.ts +3 -4
- package/dist/index.js +3 -4
- package/dist/integration-collections/integrationCollectionsApi.d.ts +29 -47
- package/dist/integration-collections/integrationCollectionsApi.js +31 -51
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +62 -58
- package/dist/locales/localesApi.d.ts +7 -3
- package/dist/locales/localesApi.js +7 -3
- package/dist/locales/localesInterfaces.d.ts +6 -5
- package/dist/menus/menusApi.d.ts +7 -3
- package/dist/menus/menusApi.js +7 -3
- package/dist/menus/menusInterfaces.d.ts +5 -10
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +17 -25
- package/dist/orders/ordersApi.js +17 -26
- package/dist/orders/ordersInterfaces.d.ts +94 -53
- package/dist/pages/pagesApi.d.ts +47 -60
- package/dist/pages/pagesApi.js +51 -61
- package/dist/pages/pagesInterfaces.d.ts +44 -48
- package/dist/payments/paymentsApi.d.ts +17 -27
- package/dist/payments/paymentsApi.js +17 -31
- package/dist/payments/paymentsInterfaces.d.ts +35 -29
- package/dist/product-statuses/productStatusesApi.d.ts +9 -9
- package/dist/product-statuses/productStatusesApi.js +9 -9
- package/dist/product-statuses/productStatusesInterfaces.d.ts +14 -12
- package/dist/products/productsApi.d.ts +23 -44
- package/dist/products/productsApi.js +24 -44
- package/dist/products/productsInterfaces.d.ts +51 -57
- package/dist/system/systemApi.d.ts +11 -13
- package/dist/system/systemApi.js +12 -13
- package/dist/system/systemInterfaces.d.ts +14 -3
- package/dist/templates/templatesApi.d.ts +8 -11
- package/dist/templates/templatesApi.js +8 -11
- package/dist/templates/templatesInterfaces.d.ts +13 -12
- package/dist/templates-preview/templatesPreviewApi.d.ts +7 -8
- package/dist/templates-preview/templatesPreviewApi.js +7 -8
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +15 -18
- package/dist/users/usersApi.d.ts +13 -20
- package/dist/users/usersApi.js +13 -20
- package/dist/users/usersInterfaces.d.ts +26 -30
- 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
|
@@ -5,17 +5,21 @@ import type { IFilterParams, IProductApi, IProductBlock, IProductsCount, IProduc
|
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with product pages
|
|
7
7
|
* @handle /api/content/products
|
|
8
|
+
* @description Controllers for working with product pages
|
|
8
9
|
*/
|
|
9
10
|
export default class ProductApi extends AsyncModules implements IProductApi {
|
|
10
11
|
protected state: StateModule;
|
|
11
12
|
protected _url: string;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - StateModule instance
|
|
16
|
+
* @description Constructor initializes the ProductApi with a given state.
|
|
17
|
+
*/
|
|
12
18
|
constructor(state: StateModule);
|
|
13
19
|
private _defaultQuery;
|
|
14
20
|
/**
|
|
15
21
|
* Search for all products with pagination and filter.
|
|
16
|
-
*
|
|
17
22
|
* @handleName getProducts
|
|
18
|
-
*
|
|
19
23
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
20
24
|
[
|
|
21
25
|
{
|
|
@@ -53,16 +57,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
53
57
|
"conditionMarker": "equals",
|
|
54
58
|
"attributeMarker": "color"
|
|
55
59
|
}
|
|
56
|
-
* @
|
|
60
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
57
61
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
58
62
|
* @description Fetch products with optional filters and pagination.
|
|
59
63
|
*/
|
|
60
64
|
getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
61
65
|
/**
|
|
62
66
|
* Search for all product page objects with pagination that do not have a category.
|
|
63
|
-
*
|
|
64
67
|
* @handleName getProductsEmptyPage
|
|
65
|
-
*
|
|
66
68
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
67
69
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
68
70
|
{
|
|
@@ -76,16 +78,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
76
78
|
"conditionMarker": "equals",
|
|
77
79
|
"attributeMarker": "color"
|
|
78
80
|
}
|
|
79
|
-
* @
|
|
81
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
80
82
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
81
83
|
* @description Search for all product page objects with pagination that do not have a category.
|
|
82
84
|
*/
|
|
83
85
|
getProductsEmptyPage(langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
84
86
|
/**
|
|
85
87
|
* Search for all products with pagination for the selected category.
|
|
86
|
-
*
|
|
87
88
|
* @handleName getProductsByPageId
|
|
88
|
-
*
|
|
89
89
|
* @param {number} id - Page id. Example: 2492.
|
|
90
90
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
91
91
|
[
|
|
@@ -124,16 +124,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
124
124
|
"conditionMarker": "equals",
|
|
125
125
|
"attributeMarker": "color"
|
|
126
126
|
}
|
|
127
|
-
* @
|
|
127
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
128
128
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
129
129
|
* @description Fetch products by page ID with optional filters and pagination.
|
|
130
130
|
*/
|
|
131
131
|
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
132
132
|
/**
|
|
133
133
|
* Search for information about products and prices for the selected category.
|
|
134
|
-
*
|
|
135
134
|
* @handleName getProductsPriceByPageUrl
|
|
136
|
-
*
|
|
137
135
|
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
138
136
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
139
137
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -148,16 +146,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
148
146
|
"conditionMarker": "equals",
|
|
149
147
|
"attributeMarker": "color"
|
|
150
148
|
}
|
|
151
|
-
* @
|
|
149
|
+
* @returns {IProductsInfo} Array with ProductInformation objects.
|
|
152
150
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
153
151
|
* @description Search for information about products and prices for the selected category.
|
|
154
152
|
*/
|
|
155
153
|
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
|
|
156
154
|
/**
|
|
157
155
|
* Search for all products with pagination for the selected category.
|
|
158
|
-
*
|
|
159
156
|
* @handleName getProductsByPageUrl
|
|
160
|
-
*
|
|
161
157
|
* @param {string} url - Page url. Example: "catalog".
|
|
162
158
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
163
159
|
[
|
|
@@ -167,7 +163,7 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
167
163
|
"statusMarker": "waiting",
|
|
168
164
|
"conditionValue": 1,
|
|
169
165
|
"pageUrls": [
|
|
170
|
-
|
|
166
|
+
"23-laminat-floorwood-maxima"
|
|
171
167
|
],
|
|
172
168
|
"isNested": false,
|
|
173
169
|
"title": ""
|
|
@@ -177,7 +173,7 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
177
173
|
"conditionMarker": "lth",
|
|
178
174
|
"conditionValue": 3,
|
|
179
175
|
"pageUrls": [
|
|
180
|
-
|
|
176
|
+
"23-laminat-floorwood-maxima"
|
|
181
177
|
],
|
|
182
178
|
"isNested": false,
|
|
183
179
|
"title": ""
|
|
@@ -196,16 +192,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
196
192
|
"conditionMarker": "equals",
|
|
197
193
|
"attributeMarker": "color"
|
|
198
194
|
}
|
|
199
|
-
* @
|
|
195
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
200
196
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
201
197
|
* @description Search for all products with pagination for the selected category.
|
|
202
198
|
*/
|
|
203
199
|
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
204
200
|
/**
|
|
205
201
|
* Find all related product page objects.
|
|
206
|
-
*
|
|
207
202
|
* @handleName getRelatedProductsById
|
|
208
|
-
*
|
|
209
203
|
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
210
204
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
211
205
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -224,17 +218,14 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
224
218
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
225
219
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
226
220
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
227
|
-
*
|
|
228
|
-
* @return {IProductsResponse} Array with ProductEntity objects
|
|
221
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
229
222
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
230
223
|
* @description Find all related product page objects.
|
|
231
224
|
*/
|
|
232
225
|
getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
233
226
|
/**
|
|
234
227
|
* Find products by its ids.
|
|
235
|
-
*
|
|
236
228
|
* @handleName getProductsByIds
|
|
237
|
-
*
|
|
238
229
|
* @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
239
230
|
* @param {string} [langCode] - Language code. Default "en_US".
|
|
240
231
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -258,51 +249,43 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
258
249
|
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
|
|
259
250
|
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
|
|
260
251
|
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
|
|
261
|
-
* @
|
|
252
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
262
253
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
263
254
|
* @description Find products by its ids.
|
|
264
255
|
*/
|
|
265
256
|
getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
|
|
266
257
|
/**
|
|
267
258
|
* Retrieve one product object.
|
|
268
|
-
*
|
|
269
259
|
* @handleName getProductById
|
|
270
|
-
*
|
|
271
260
|
* @param {number} [id] - Product id. Example: 12345.
|
|
272
261
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
273
|
-
* @
|
|
262
|
+
* @returns {IProductsEntity} ProductEntity object.
|
|
274
263
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
275
264
|
* @description Retrieve one product object.
|
|
276
265
|
*/
|
|
277
266
|
getProductById(id: number, langCode?: string): Promise<IProductsEntity | IError>;
|
|
278
267
|
/**
|
|
279
268
|
* Getting a product block object by product id.
|
|
280
|
-
*
|
|
281
269
|
* @handleName getProductBlockById
|
|
282
|
-
*
|
|
283
270
|
* @param {number} id - Product id. Example: 12345.
|
|
284
|
-
* @
|
|
271
|
+
* @returns {IProductBlock} - Product block object.
|
|
285
272
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
286
273
|
* @description Getting a product block object by product id.
|
|
287
274
|
*/
|
|
288
275
|
getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
|
|
289
276
|
/**
|
|
290
277
|
* Quick search for product page objects with limited output.
|
|
291
|
-
*
|
|
292
278
|
* @handleName searchProduct
|
|
293
|
-
*
|
|
294
279
|
* @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".
|
|
295
280
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
296
|
-
* @
|
|
281
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
297
282
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
298
283
|
* @description Quick search for product page objects with limited output.
|
|
299
284
|
*/
|
|
300
285
|
searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IError>;
|
|
301
286
|
/**
|
|
302
287
|
* Getting the number of products for the entire catalog.
|
|
303
|
-
*
|
|
304
288
|
* @handleName getProductsCount
|
|
305
|
-
*
|
|
306
289
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
307
290
|
[
|
|
308
291
|
{
|
|
@@ -316,17 +299,15 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
316
299
|
"title": "Iphone 17 Pro"
|
|
317
300
|
}
|
|
318
301
|
]
|
|
319
|
-
* @
|
|
302
|
+
* @returns {IProductsCount} Object with product items count.
|
|
320
303
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
321
304
|
* @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
|
|
322
305
|
*/
|
|
323
306
|
getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
|
|
324
307
|
/**
|
|
325
308
|
* Getting the number of products on a catalog page by page ID.
|
|
326
|
-
*
|
|
327
309
|
* @handleName getProductsCountByPageId
|
|
328
|
-
*
|
|
329
|
-
* @param {string} id
|
|
310
|
+
* @param {string} id - Page ID.
|
|
330
311
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
331
312
|
[
|
|
332
313
|
{
|
|
@@ -340,17 +321,15 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
340
321
|
"title": "Iphone 17 Pro"
|
|
341
322
|
}
|
|
342
323
|
]
|
|
343
|
-
* @
|
|
324
|
+
* @returns {IProductsCount} Object with product items count.
|
|
344
325
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
345
326
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
346
327
|
*/
|
|
347
328
|
getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
|
|
348
329
|
/**
|
|
349
330
|
* Getting the number of products for the catalog page by page url.
|
|
350
|
-
*
|
|
351
331
|
* @handleName getProductsCountByPageUrl
|
|
352
|
-
*
|
|
353
|
-
* @param {string} url -
|
|
332
|
+
* @param {string} url - Page url.
|
|
354
333
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
355
334
|
[
|
|
356
335
|
{
|
|
@@ -364,7 +343,7 @@ export default class ProductApi extends AsyncModules implements IProductApi {
|
|
|
364
343
|
"title": "Iphone 17 Pro"
|
|
365
344
|
}
|
|
366
345
|
]
|
|
367
|
-
* @
|
|
346
|
+
* @returns {IProductsCount} Object with product items count.
|
|
368
347
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
369
348
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
|
|
370
349
|
*/
|
|
@@ -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,9 +28,7 @@ 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
32
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
28
33
|
[
|
|
29
34
|
{
|
|
@@ -61,7 +66,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
61
66
|
"conditionMarker": "equals",
|
|
62
67
|
"attributeMarker": "color"
|
|
63
68
|
}
|
|
64
|
-
* @
|
|
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,9 +81,7 @@ 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
85
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
83
86
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
84
87
|
{
|
|
@@ -92,7 +95,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
92
95
|
"conditionMarker": "equals",
|
|
93
96
|
"attributeMarker": "color"
|
|
94
97
|
}
|
|
95
|
-
* @
|
|
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,9 +106,7 @@ 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
110
|
* @param {number} id - Page id. Example: 2492.
|
|
110
111
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
111
112
|
[
|
|
@@ -144,7 +145,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
144
145
|
"conditionMarker": "equals",
|
|
145
146
|
"attributeMarker": "color"
|
|
146
147
|
}
|
|
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,9 +156,7 @@ 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
160
|
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
162
161
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
163
162
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -172,7 +171,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
172
171
|
"conditionMarker": "equals",
|
|
173
172
|
"attributeMarker": "color"
|
|
174
173
|
}
|
|
175
|
-
* @
|
|
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,9 +186,7 @@ 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
190
|
* @param {string} url - Page url. Example: "catalog".
|
|
194
191
|
* @param {IFilterParams[]} [body] - Request body. Default: []. Example:
|
|
195
192
|
[
|
|
@@ -199,7 +196,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
199
196
|
"statusMarker": "waiting",
|
|
200
197
|
"conditionValue": 1,
|
|
201
198
|
"pageUrls": [
|
|
202
|
-
|
|
199
|
+
"23-laminat-floorwood-maxima"
|
|
203
200
|
],
|
|
204
201
|
"isNested": false,
|
|
205
202
|
"title": ""
|
|
@@ -209,7 +206,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
209
206
|
"conditionMarker": "lth",
|
|
210
207
|
"conditionValue": 3,
|
|
211
208
|
"pageUrls": [
|
|
212
|
-
|
|
209
|
+
"23-laminat-floorwood-maxima"
|
|
213
210
|
],
|
|
214
211
|
"isNested": false,
|
|
215
212
|
"title": ""
|
|
@@ -228,7 +225,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
228
225
|
"conditionMarker": "equals",
|
|
229
226
|
"attributeMarker": "color"
|
|
230
227
|
}
|
|
231
|
-
* @
|
|
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,9 +237,7 @@ 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
241
|
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
247
242
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
248
243
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -261,8 +256,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
261
256
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
262
257
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
263
258
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
264
|
-
*
|
|
265
|
-
* @return {IProductsResponse} Array with ProductEntity objects
|
|
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,9 +267,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
273
267
|
}
|
|
274
268
|
/**
|
|
275
269
|
* Find products by its ids.
|
|
276
|
-
*
|
|
277
270
|
* @handleName getProductsByIds
|
|
278
|
-
*
|
|
279
271
|
* @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
280
272
|
* @param {string} [langCode] - Language code. Default "en_US".
|
|
281
273
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
@@ -299,7 +291,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
299
291
|
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
|
|
300
292
|
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
|
|
301
293
|
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
|
|
302
|
-
* @
|
|
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
311
|
* @param {number} [id] - Product id. Example: 12345.
|
|
322
312
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
323
|
-
* @
|
|
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
324
|
* @param {number} id - Product id. Example: 12345.
|
|
337
|
-
* @
|
|
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
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".
|
|
351
337
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
352
|
-
* @
|
|
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,9 +355,7 @@ 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
359
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
376
360
|
[
|
|
377
361
|
{
|
|
@@ -385,7 +369,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
385
369
|
"title": "Iphone 17 Pro"
|
|
386
370
|
}
|
|
387
371
|
]
|
|
388
|
-
* @
|
|
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,10 +381,8 @@ 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 {string} id
|
|
385
|
+
* @param {string} id - Page ID.
|
|
404
386
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
405
387
|
[
|
|
406
388
|
{
|
|
@@ -414,7 +396,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
414
396
|
"title": "Iphone 17 Pro"
|
|
415
397
|
}
|
|
416
398
|
]
|
|
417
|
-
* @
|
|
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,10 +408,8 @@ 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 {string} url -
|
|
412
|
+
* @param {string} url - Page url.
|
|
433
413
|
* @param {any[]} body - Body parameters for filter. Deault: []. Example:
|
|
434
414
|
[
|
|
435
415
|
{
|
|
@@ -443,7 +423,7 @@ class ProductApi extends asyncModules_1.default {
|
|
|
443
423
|
"title": "Iphone 17 Pro"
|
|
444
424
|
}
|
|
445
425
|
]
|
|
446
|
-
* @
|
|
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
|
*/
|