oneentry 1.0.142 → 1.0.144
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/configure.js +2 -2
- package/dist/admins/adminsApi.d.ts +50 -0
- package/dist/admins/adminsApi.js +65 -0
- package/dist/admins/adminsInterfaces.d.ts +98 -0
- package/dist/admins/adminsInterfaces.js +2 -0
- package/dist/admins/adminsSchemas.d.ts +30 -0
- package/dist/admins/adminsSchemas.js +27 -0
- package/dist/attribute-sets/attributeSetsApi.d.ts +63 -0
- package/dist/attribute-sets/attributeSetsApi.js +98 -0
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +185 -0
- package/dist/attribute-sets/attributeSetsInterfaces.js +2 -0
- package/dist/attribute-sets/attributeSetsSchemas.d.ts +90 -0
- package/dist/attribute-sets/attributeSetsSchemas.js +74 -0
- package/dist/auth-provider/authProviderApi.d.ts +249 -0
- package/dist/auth-provider/authProviderApi.js +354 -0
- package/dist/auth-provider/authProviderSchemas.d.ts +131 -0
- package/dist/auth-provider/authProviderSchemas.js +82 -0
- package/dist/auth-provider/authProvidersInterfaces.d.ts +412 -0
- package/dist/auth-provider/authProvidersInterfaces.js +2 -0
- package/dist/base/asyncModules.d.ts +80 -0
- package/dist/base/asyncModules.js +448 -0
- package/dist/base/result.d.ts +39 -0
- package/dist/base/result.js +154 -0
- package/dist/base/stateModule.d.ts +41 -0
- package/dist/base/stateModule.js +128 -0
- package/dist/base/syncModules.d.ts +286 -0
- package/dist/base/syncModules.js +716 -0
- package/dist/base/utils.d.ts +197 -0
- package/dist/base/utils.js +2 -0
- package/dist/base/validation.d.ts +118 -0
- package/dist/base/validation.js +132 -0
- package/dist/blocks/blocksApi.d.ts +88 -0
- package/dist/blocks/blocksApi.js +207 -0
- package/dist/blocks/blocksInterfaces.d.ts +179 -0
- package/dist/blocks/blocksInterfaces.js +2 -0
- package/dist/blocks/blocksSchemas.d.ts +195 -0
- package/dist/blocks/blocksSchemas.js +43 -0
- package/dist/discounts/discountsApi.d.ts +76 -0
- package/dist/discounts/discountsApi.js +116 -0
- package/dist/discounts/discountsInterfaces.d.ts +217 -0
- package/dist/discounts/discountsInterfaces.js +2 -0
- package/dist/events/eventsApi.d.ts +60 -0
- package/dist/events/eventsApi.js +97 -0
- package/dist/events/eventsInterfaces.d.ts +87 -0
- package/dist/events/eventsInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingApi.d.ts +88 -0
- package/dist/file-uploading/fileUploadingApi.js +129 -0
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +114 -0
- package/dist/file-uploading/fileUploadingInterfaces.js +2 -0
- package/dist/file-uploading/fileUploadingSchemas.d.ts +22 -0
- package/dist/file-uploading/fileUploadingSchemas.js +21 -0
- package/dist/forms/formsApi.d.ts +42 -0
- package/dist/forms/formsApi.js +57 -0
- package/dist/forms/formsInterfaces.d.ts +144 -0
- package/dist/forms/formsInterfaces.js +2 -0
- package/dist/forms/formsSchemas.d.ts +53 -0
- package/dist/forms/formsSchemas.js +34 -0
- package/dist/forms-data/formsDataApi.d.ts +106 -0
- package/dist/forms-data/formsDataApi.js +189 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +522 -0
- package/dist/forms-data/formsDataInterfaces.js +2 -0
- package/dist/forms-data/formsDataSchemas.d.ts +115 -0
- package/dist/forms-data/formsDataSchemas.js +86 -0
- package/dist/general-types/generalTypesApi.d.ts +28 -0
- package/dist/general-types/generalTypesApi.js +38 -0
- package/dist/general-types/generalTypesInterfaces.d.ts +29 -0
- package/dist/general-types/generalTypesInterfaces.js +2 -0
- package/dist/general-types/generalTypesSchemas.d.ts +52 -0
- package/dist/general-types/generalTypesSchemas.js +36 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +103 -0
- package/dist/integration-collections/integrationCollectionsApi.d.ts +163 -0
- package/dist/integration-collections/integrationCollectionsApi.js +220 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +313 -0
- package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
- package/dist/integration-collections/integrationCollectionsSchemas.d.ts +80 -0
- package/dist/integration-collections/integrationCollectionsSchemas.js +61 -0
- package/dist/locales/localesApi.d.ts +27 -0
- package/dist/locales/localesApi.js +37 -0
- package/dist/locales/localesInterfaces.d.ts +40 -0
- package/dist/locales/localesInterfaces.js +2 -0
- package/dist/locales/localesSchemas.d.ts +32 -0
- package/dist/locales/localesSchemas.js +26 -0
- package/dist/menus/menusApi.d.ts +29 -0
- package/dist/menus/menusApi.js +39 -0
- package/dist/menus/menusInterfaces.d.ts +87 -0
- package/dist/menus/menusInterfaces.js +3 -0
- package/dist/menus/menusSchemas.d.ts +16 -0
- package/dist/menus/menusSchemas.js +28 -0
- package/dist/orders/ordersApi.d.ts +175 -0
- package/dist/orders/ordersApi.js +247 -0
- package/dist/orders/ordersInterfaces.d.ts +593 -0
- package/dist/orders/ordersInterfaces.js +2 -0
- package/dist/orders/ordersSchemas.d.ts +120 -0
- package/dist/orders/ordersSchemas.js +101 -0
- package/dist/pages/pagesApi.d.ts +151 -0
- package/dist/pages/pagesApi.js +390 -0
- package/dist/pages/pagesInterfaces.d.ts +286 -0
- package/dist/pages/pagesInterfaces.js +2 -0
- package/dist/pages/pagesSchemas.d.ts +85 -0
- package/dist/pages/pagesSchemas.js +46 -0
- package/dist/payments/paymentsApi.d.ts +82 -0
- package/dist/payments/paymentsApi.js +121 -0
- package/dist/payments/paymentsInterfaces.d.ts +200 -0
- package/dist/payments/paymentsInterfaces.js +2 -0
- package/dist/payments/paymentsSchemas.d.ts +100 -0
- package/dist/payments/paymentsSchemas.js +65 -0
- package/dist/product-statuses/productStatusesApi.d.ts +47 -0
- package/dist/product-statuses/productStatusesApi.js +70 -0
- package/dist/product-statuses/productStatusesInterfaces.d.ts +62 -0
- package/dist/product-statuses/productStatusesInterfaces.js +2 -0
- package/dist/product-statuses/productStatusesSchemas.d.ts +34 -0
- package/dist/product-statuses/productStatusesSchemas.js +30 -0
- package/dist/products/productsApi.d.ts +366 -0
- package/dist/products/productsApi.js +458 -0
- package/dist/products/productsInterfaces.d.ts +593 -0
- package/dist/products/productsInterfaces.js +2 -0
- package/dist/products/productsSchemas.d.ts +200 -0
- package/dist/products/productsSchemas.js +98 -0
- package/dist/sitemap/sitemapApi.d.ts +35 -0
- package/dist/sitemap/sitemapApi.js +45 -0
- package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
- package/dist/sitemap/sitemapInterfaces.js +2 -0
- package/dist/system/systemApi.d.ts +43 -0
- package/dist/system/systemApi.js +56 -0
- package/dist/system/systemInterfaces.d.ts +29 -0
- package/dist/system/systemInterfaces.js +2 -0
- package/dist/templates/templatesApi.d.ts +49 -0
- package/dist/templates/templatesApi.js +75 -0
- package/dist/templates/templatesInterfaces.d.ts +67 -0
- package/dist/templates/templatesInterfaces.js +2 -0
- package/dist/templates/templatesSchemas.d.ts +48 -0
- package/dist/templates/templatesSchemas.js +31 -0
- package/dist/templates-preview/templatesPreviewApi.d.ts +38 -0
- package/dist/templates-preview/templatesPreviewApi.js +53 -0
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +119 -0
- package/dist/templates-preview/templatesPreviewInterfaces.js +2 -0
- package/dist/templates-preview/templatesPreviewSchemas.d.ts +83 -0
- package/dist/templates-preview/templatesPreviewSchemas.js +48 -0
- package/dist/users/usersApi.d.ts +143 -0
- package/dist/users/usersApi.js +171 -0
- package/dist/users/usersInterfaces.d.ts +231 -0
- package/dist/users/usersInterfaces.js +2 -0
- package/dist/users/usersSchemas.d.ts +38 -0
- package/dist/users/usersSchemas.js +28 -0
- package/dist/web-socket/wsApi.d.ts +25 -0
- package/dist/web-socket/wsApi.js +45 -0
- package/dist/web-socket/wsInterfaces.d.ts +16 -0
- package/dist/web-socket/wsInterfaces.js +2 -0
- package/package.json +2 -80
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
import AsyncModules from '../base/asyncModules';
|
|
2
|
+
import type StateModule from '../base/stateModule';
|
|
3
|
+
import type { IError } from '../base/utils';
|
|
4
|
+
import type { IAggregatedProductGroup, IFilterParams, IProductBlock, IProductsApi, IProductsCount, IProductsEntity, IProductsInfo, IProductsQuery, IProductsResponse } from './productsInterfaces';
|
|
5
|
+
/**
|
|
6
|
+
* Controllers for working with product pages
|
|
7
|
+
* @handle /api/content/products
|
|
8
|
+
* @description Controllers for working with product pages
|
|
9
|
+
*/
|
|
10
|
+
export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
11
|
+
protected state: StateModule;
|
|
12
|
+
protected _url: string;
|
|
13
|
+
/**
|
|
14
|
+
* Constructor
|
|
15
|
+
* @param {StateModule} state - StateModule instance
|
|
16
|
+
* @description Constructor initializes the ProductsApi with a given state.
|
|
17
|
+
*/
|
|
18
|
+
constructor(state: StateModule);
|
|
19
|
+
/**
|
|
20
|
+
* Search for all products with pagination and filter.
|
|
21
|
+
* @handleName getProducts
|
|
22
|
+
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
23
|
+
* @example
|
|
24
|
+
[
|
|
25
|
+
{
|
|
26
|
+
"attributeMarker": "price",
|
|
27
|
+
"conditionMarker": "mth",
|
|
28
|
+
"statusMarker": "waiting",
|
|
29
|
+
"conditionValue": 1,
|
|
30
|
+
"pageUrls": [
|
|
31
|
+
"23-laminat-floorwood-maxima"
|
|
32
|
+
],
|
|
33
|
+
"isNested": false,
|
|
34
|
+
"title": ""
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"attributeMarker": "price",
|
|
38
|
+
"conditionMarker": "lth",
|
|
39
|
+
"conditionValue": 3,
|
|
40
|
+
"pageUrls": [
|
|
41
|
+
"23-laminat-floorwood-maxima"
|
|
42
|
+
],
|
|
43
|
+
"isNested": false,
|
|
44
|
+
"title": ""
|
|
45
|
+
}
|
|
46
|
+
]
|
|
47
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
48
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
49
|
+
* @example
|
|
50
|
+
{
|
|
51
|
+
"signPrice": "orders",
|
|
52
|
+
"sortOrder": "DESC",
|
|
53
|
+
"sortKey": "id",
|
|
54
|
+
"limit": 30,
|
|
55
|
+
"offset": 0,
|
|
56
|
+
"statusId": 123,
|
|
57
|
+
"statusMarker": "in_stock",
|
|
58
|
+
"conditionValue": "new",
|
|
59
|
+
"conditionMarker": "equals",
|
|
60
|
+
"attributeMarker": "color"
|
|
61
|
+
}
|
|
62
|
+
* @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
|
|
63
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
64
|
+
* @description Fetch products with optional filters and pagination.
|
|
65
|
+
*/
|
|
66
|
+
getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
67
|
+
/**
|
|
68
|
+
* Search for all product page objects with pagination (and aggregation) that do not have a category.
|
|
69
|
+
* @handleName getProductsEmptyPage
|
|
70
|
+
* @param {object} [body] - Request body. Default: {}.
|
|
71
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
72
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
73
|
+
* @example
|
|
74
|
+
{
|
|
75
|
+
"limit": 30,
|
|
76
|
+
"offset": 0,
|
|
77
|
+
"sortOrder": "DESC",
|
|
78
|
+
"sortKey": "id",
|
|
79
|
+
"statusId": 123,
|
|
80
|
+
"statusMarker": "in_stock",
|
|
81
|
+
"conditionValue": "new",
|
|
82
|
+
"conditionMarker": "equals",
|
|
83
|
+
"attributeMarker": "color"
|
|
84
|
+
}
|
|
85
|
+
* @returns {Promise<IAggregatedProductGroup[] | IError>} Array with AggregatedProductGroup objects.
|
|
86
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
87
|
+
* @description Search for all product page objects with pagination (and aggregation) that do not have a category.
|
|
88
|
+
*/
|
|
89
|
+
getProductsEmptyPage(body?: object, langCode?: string, userQuery?: IProductsQuery): Promise<IAggregatedProductGroup[] | IError>;
|
|
90
|
+
/**
|
|
91
|
+
* Search for all products with pagination for the selected category.
|
|
92
|
+
* @handleName getProductsByPageId
|
|
93
|
+
* @param {number} id - Page id. Example: 2492.
|
|
94
|
+
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
95
|
+
* @example
|
|
96
|
+
[
|
|
97
|
+
{
|
|
98
|
+
"attributeMarker": "price",
|
|
99
|
+
"conditionMarker": "mth",
|
|
100
|
+
"statusMarker": "waiting",
|
|
101
|
+
"conditionValue": 1,
|
|
102
|
+
"pageUrls": [
|
|
103
|
+
"23-laminat-floorwood-maxima"
|
|
104
|
+
],
|
|
105
|
+
"isNested": false,
|
|
106
|
+
"title": ""
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"attributeMarker": "price",
|
|
110
|
+
"conditionMarker": "lth",
|
|
111
|
+
"conditionValue": 3,
|
|
112
|
+
"pageUrls": [
|
|
113
|
+
"23-laminat-floorwood-maxima"
|
|
114
|
+
],
|
|
115
|
+
"isNested": false,
|
|
116
|
+
"title": ""
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
120
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
121
|
+
* @example
|
|
122
|
+
{
|
|
123
|
+
"limit": 30,
|
|
124
|
+
"offset": 0,
|
|
125
|
+
"sortOrder": "DESC",
|
|
126
|
+
"sortKey": "id",
|
|
127
|
+
"statusId": 123,
|
|
128
|
+
"statusMarker": "in_stock",
|
|
129
|
+
"conditionValue": "new",
|
|
130
|
+
"conditionMarker": "equals",
|
|
131
|
+
"attributeMarker": "color"
|
|
132
|
+
}
|
|
133
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
|
|
134
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
135
|
+
* @description Fetch products by page ID with optional filters and pagination.
|
|
136
|
+
*/
|
|
137
|
+
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
138
|
+
/**
|
|
139
|
+
* Search for information about products and prices for the selected category.
|
|
140
|
+
* @handleName getProductsPriceByPageUrl
|
|
141
|
+
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
142
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
143
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
144
|
+
* @example
|
|
145
|
+
{
|
|
146
|
+
"limit": 30,
|
|
147
|
+
"offset": 0,
|
|
148
|
+
"sortOrder": "DESC",
|
|
149
|
+
"sortKey": "id",
|
|
150
|
+
"statusId": 123,
|
|
151
|
+
"statusMarker": "in_stock",
|
|
152
|
+
"conditionValue": "new",
|
|
153
|
+
"conditionMarker": "equals",
|
|
154
|
+
"attributeMarker": "color"
|
|
155
|
+
}
|
|
156
|
+
* @returns {Promise<IProductsInfo | IError>} Array with ProductInformation objects.
|
|
157
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
158
|
+
* @description Search for information about products and prices for the selected category.
|
|
159
|
+
*/
|
|
160
|
+
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
|
|
161
|
+
/**
|
|
162
|
+
* Search for all products with pagination for the selected category.
|
|
163
|
+
* @handleName getProductsByPageUrl
|
|
164
|
+
* @param {string} url - Page url. Example: "catalog".
|
|
165
|
+
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
166
|
+
* @example
|
|
167
|
+
[
|
|
168
|
+
{
|
|
169
|
+
"attributeMarker": "price",
|
|
170
|
+
"conditionMarker": "mth",
|
|
171
|
+
"statusMarker": "waiting",
|
|
172
|
+
"conditionValue": 1,
|
|
173
|
+
"pageUrls": [
|
|
174
|
+
"23-laminat-floorwood-maxima"
|
|
175
|
+
],
|
|
176
|
+
"isNested": false,
|
|
177
|
+
"title": ""
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
"attributeMarker": "price",
|
|
181
|
+
"conditionMarker": "lth",
|
|
182
|
+
"conditionValue": 3,
|
|
183
|
+
"pageUrls": [
|
|
184
|
+
"23-laminat-floorwood-maxima"
|
|
185
|
+
],
|
|
186
|
+
"isNested": false,
|
|
187
|
+
"title": ""
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
191
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
192
|
+
* @example
|
|
193
|
+
{
|
|
194
|
+
"limit": 30,
|
|
195
|
+
"offset": 0,
|
|
196
|
+
"sortOrder": "DESC",
|
|
197
|
+
"sortKey": "id",
|
|
198
|
+
"statusId": 123,
|
|
199
|
+
"statusMarker": "in_stock",
|
|
200
|
+
"conditionValue": "new",
|
|
201
|
+
"conditionMarker": "equals",
|
|
202
|
+
"attributeMarker": "color"
|
|
203
|
+
}
|
|
204
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects.
|
|
205
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
206
|
+
* @description Search for all products with pagination for the selected category.
|
|
207
|
+
*/
|
|
208
|
+
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
209
|
+
/**
|
|
210
|
+
* Find all related product page objects.
|
|
211
|
+
* @handleName getRelatedProductsById
|
|
212
|
+
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
213
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
214
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
215
|
+
* @example
|
|
216
|
+
{
|
|
217
|
+
"limit": 30,
|
|
218
|
+
"offset": 0,
|
|
219
|
+
"sortOrder": "DESC",
|
|
220
|
+
"sortKey": "id",
|
|
221
|
+
"statusId": 123,
|
|
222
|
+
"statusMarker": "in_stock",
|
|
223
|
+
"conditionValue": "new",
|
|
224
|
+
"conditionMarker": "equals",
|
|
225
|
+
"attributeMarker": "color"
|
|
226
|
+
}
|
|
227
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
228
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
229
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
230
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
231
|
+
* @returns {Promise<IProductsResponse | IError>} Array with ProductEntity objects
|
|
232
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
233
|
+
* @description Find all related product page objects.
|
|
234
|
+
*/
|
|
235
|
+
getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
236
|
+
/**
|
|
237
|
+
* Find products by its ids.
|
|
238
|
+
* @handleName getProductsByIds
|
|
239
|
+
* @param {string} ids - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
240
|
+
* @param {string} [langCode] - Language code. Default "en_US".
|
|
241
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
242
|
+
* @example
|
|
243
|
+
{
|
|
244
|
+
"limit": 30,
|
|
245
|
+
"offset": 0,
|
|
246
|
+
"sortOrder": "DESC",
|
|
247
|
+
"sortKey": "id",
|
|
248
|
+
"statusId": 123,
|
|
249
|
+
"statusMarker": "in_stock",
|
|
250
|
+
"conditionValue": "new",
|
|
251
|
+
"conditionMarker": "equals",
|
|
252
|
+
"attributeMarker": "color"
|
|
253
|
+
}
|
|
254
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
255
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
256
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
257
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
258
|
+
* @param {number} [userQuery.statusId] - Optional parameter - search by status id. Example: 123.
|
|
259
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: "in_stock".
|
|
260
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: "new".
|
|
261
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: "equals".
|
|
262
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: "color".
|
|
263
|
+
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
264
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
265
|
+
* @description Find products by its ids.
|
|
266
|
+
*/
|
|
267
|
+
getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
|
|
268
|
+
/**
|
|
269
|
+
* Retrieve one product object.
|
|
270
|
+
* @handleName getProductById
|
|
271
|
+
* @param {number} id - Product id. Example: 12345.
|
|
272
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
273
|
+
* @param {boolean} [isNormalized] - If true, the product object will be normalized.
|
|
274
|
+
* @returns {Promise<IProductsEntity | IError>} ProductEntity object.
|
|
275
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
276
|
+
* @description Retrieve one product object.
|
|
277
|
+
*/
|
|
278
|
+
getProductById(id: number, langCode?: string, isNormalized?: boolean): Promise<IProductsEntity | IError>;
|
|
279
|
+
/**
|
|
280
|
+
* Getting a product block object by product id.
|
|
281
|
+
* @handleName getProductBlockById
|
|
282
|
+
* @param {number} id - Product id. Example: 12345.
|
|
283
|
+
* @returns {Promise<IProductBlock | IError>} - Product block object.
|
|
284
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
285
|
+
* @description Getting a product block object by product id.
|
|
286
|
+
*/
|
|
287
|
+
getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
|
|
288
|
+
/**
|
|
289
|
+
* Quick search for product page objects with limited output.
|
|
290
|
+
* @handleName searchProduct
|
|
291
|
+
* @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".
|
|
292
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
293
|
+
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
294
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
295
|
+
* @description Quick search for product page objects with limited output.
|
|
296
|
+
*/
|
|
297
|
+
searchProduct(name: string, langCode?: string): Promise<IProductsEntity[] | IError>;
|
|
298
|
+
/**
|
|
299
|
+
* Getting the number of products for the entire catalog.
|
|
300
|
+
* @handleName getProductsCount
|
|
301
|
+
* @param {any[]} body - Body parameters for filter. Deault: [].
|
|
302
|
+
* @example
|
|
303
|
+
[
|
|
304
|
+
{
|
|
305
|
+
"attributeMarker": "price",
|
|
306
|
+
"conditionMarker": "in",
|
|
307
|
+
"statusMarker": "status_1",
|
|
308
|
+
"conditionValue": {},
|
|
309
|
+
"pageUrls": [
|
|
310
|
+
"23-laminat-floorwood-maxima"
|
|
311
|
+
],
|
|
312
|
+
"title": "Iphone 17 Pro"
|
|
313
|
+
}
|
|
314
|
+
]
|
|
315
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
316
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
317
|
+
* @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
|
|
318
|
+
*/
|
|
319
|
+
getProductsCount(body?: any[]): Promise<IProductsCount | IError>;
|
|
320
|
+
/**
|
|
321
|
+
* Getting the number of products on a catalog page by page ID.
|
|
322
|
+
* @handleName getProductsCountByPageId
|
|
323
|
+
* @param {string} id - Page ID.
|
|
324
|
+
* @param {any[]} body - Body parameters for filter. Deault: [].
|
|
325
|
+
* @example
|
|
326
|
+
[
|
|
327
|
+
{
|
|
328
|
+
"attributeMarker": "price",
|
|
329
|
+
"conditionMarker": "in",
|
|
330
|
+
"statusMarker": "status_1",
|
|
331
|
+
"conditionValue": {},
|
|
332
|
+
"pageUrls": [
|
|
333
|
+
"23-laminat-floorwood-maxima"
|
|
334
|
+
],
|
|
335
|
+
"title": "Iphone 17 Pro"
|
|
336
|
+
}
|
|
337
|
+
]
|
|
338
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
339
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
340
|
+
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
341
|
+
*/
|
|
342
|
+
getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
|
|
343
|
+
/**
|
|
344
|
+
* Getting the number of products for the catalog page by page url.
|
|
345
|
+
* @handleName getProductsCountByPageUrl
|
|
346
|
+
* @param {string} url - Page url.
|
|
347
|
+
* @param {any[]} body - Body parameters for filter. Deault: [].
|
|
348
|
+
* @example
|
|
349
|
+
[
|
|
350
|
+
{
|
|
351
|
+
"attributeMarker": "price",
|
|
352
|
+
"conditionMarker": "in",
|
|
353
|
+
"statusMarker": "status_1",
|
|
354
|
+
"conditionValue": {},
|
|
355
|
+
"pageUrls": [
|
|
356
|
+
"23-laminat-floorwood-maxima"
|
|
357
|
+
],
|
|
358
|
+
"title": "Iphone 17 Pro"
|
|
359
|
+
}
|
|
360
|
+
]
|
|
361
|
+
* @returns {Promise<IProductsCount | IError>} Object with product items count.
|
|
362
|
+
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
363
|
+
* @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
|
|
364
|
+
*/
|
|
365
|
+
getProductsCountByPageUrl(url: string, body?: any[]): Promise<IProductsCount | IError>;
|
|
366
|
+
}
|