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
|
@@ -2,318 +2,320 @@ import type { IFormConfig } from 'forms/formsInterfaces';
|
|
|
2
2
|
import type { AttributeType, IError, ILocalizeInfo, LangType, Types } from '../base/utils';
|
|
3
3
|
/**
|
|
4
4
|
* @interface IProductApi
|
|
5
|
-
*
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {
|
|
12
|
-
* @property {
|
|
13
|
-
* @property {
|
|
14
|
-
* @property {
|
|
15
|
-
* @property {
|
|
16
|
-
* @property {
|
|
17
|
-
* @property {
|
|
18
|
-
* @property {function} getProductsCountByPageUrl - Retrieves the number of products on a specific catalog page identified by its URL.
|
|
5
|
+
* @property {Function} getProducts - Search for all product page objects with pagination and filtering.
|
|
6
|
+
* @property {Function} getProductsEmptyPage - Search for all product page objects with pagination that do not have a category.
|
|
7
|
+
* @property {Function} getProductsByPageId - Search for all products with pagination for the selected category.
|
|
8
|
+
* @property {Function} getProductsPriceByPageUrl - Search for information about products and prices for the selected category.
|
|
9
|
+
* @property {Function} getProductsByPageUrl - Search for all products with pagination for the selected category.
|
|
10
|
+
* @property {Function} getRelatedProductsById - Find all related product page objects.
|
|
11
|
+
* @property {Function} getProductsByIds - Find products by its ids.
|
|
12
|
+
* @property {Function} getProductById - Retrieve one product object.
|
|
13
|
+
* @property {Function} getProductBlockById - Getting a product block object by product id.
|
|
14
|
+
* @property {Function} searchProduct - Quick search for product page objects with limited output.
|
|
15
|
+
* @property {Function} getProductsCount - Retrieves the total number of products available in the entire catalog.
|
|
16
|
+
* @property {Function} getProductsCountByPageId - Retrieves the number of products on a specific catalog page identified by its page ID.
|
|
17
|
+
* @property {Function} getProductsCountByPageUrl - Retrieves the number of products on a specific catalog page identified by its URL.
|
|
19
18
|
* @description This interface defines methods for retrieving and managing products in the system.
|
|
20
19
|
*/
|
|
21
20
|
interface IProductApi {
|
|
22
21
|
/**
|
|
23
22
|
* Search for all products with pagination and filter.
|
|
24
|
-
*
|
|
25
|
-
* @param
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
* @
|
|
23
|
+
* @handleName getProducts
|
|
24
|
+
* @param {IFilterParams[]} [body] - Request body. Default []. Example:
|
|
25
|
+
[
|
|
26
|
+
{
|
|
27
|
+
"attributeMarker": "price",
|
|
28
|
+
"conditionMarker": "mth",
|
|
29
|
+
"statusMarker": "waiting",
|
|
30
|
+
"conditionValue": 1,
|
|
31
|
+
"pageUrls": [
|
|
32
|
+
"23-laminat-floorwood-maxima"
|
|
33
|
+
],
|
|
34
|
+
"isNested": false,
|
|
35
|
+
"title": ""
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"attributeMarker": "price",
|
|
39
|
+
"conditionMarker": "lth",
|
|
40
|
+
"conditionValue": 3,
|
|
41
|
+
"pageUrls": [
|
|
42
|
+
"23-laminat-floorwood-maxima"
|
|
43
|
+
],
|
|
44
|
+
"isNested": false,
|
|
45
|
+
"title": ""
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
50
|
+
{
|
|
51
|
+
"limit": 30,
|
|
52
|
+
"offset": 0,
|
|
53
|
+
"sortOrder": "DESC",
|
|
54
|
+
"sortKey": "id",
|
|
55
|
+
"statusId": 123,
|
|
56
|
+
"statusMarker": "in_stock",
|
|
57
|
+
"conditionValue": "new",
|
|
58
|
+
"conditionMarker": "equals",
|
|
59
|
+
"attributeMarker": "color"
|
|
60
|
+
}
|
|
61
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
63
62
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
64
63
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
65
64
|
*/
|
|
66
65
|
getProducts(body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
67
66
|
/**
|
|
68
67
|
* Search for all product page objects with pagination that do not have a category.
|
|
69
|
-
*
|
|
70
|
-
* @param
|
|
71
|
-
* @param
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
* @
|
|
68
|
+
* @handleName getProductsEmptyPage
|
|
69
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
70
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
71
|
+
{
|
|
72
|
+
"limit": 30,
|
|
73
|
+
"offset": 0,
|
|
74
|
+
"sortOrder": "DESC",
|
|
75
|
+
"sortKey": "id",
|
|
76
|
+
"statusId": 123,
|
|
77
|
+
"statusMarker": "in_stock",
|
|
78
|
+
"conditionValue": "new",
|
|
79
|
+
"conditionMarker": "equals",
|
|
80
|
+
"attributeMarker": "color"
|
|
81
|
+
}
|
|
82
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
84
83
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
84
|
+
* @description This method searches for all product page objects with pagination that do not have a category.
|
|
85
85
|
*/
|
|
86
86
|
getProductsEmptyPage(langCode?: LangType, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
87
87
|
/**
|
|
88
88
|
* Search for all products with pagination for the selected category.
|
|
89
|
-
*
|
|
90
|
-
* @param
|
|
91
|
-
* @param
|
|
92
|
-
* @param
|
|
93
|
-
* @param
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
* @
|
|
89
|
+
* @handleName getProductsByPageId
|
|
90
|
+
* @param {number} id - Page id. Example: 12345.
|
|
91
|
+
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
92
|
+
* @param {string} [langCode] - Language code. Default "en_US".
|
|
93
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
94
|
+
{
|
|
95
|
+
"limit": 30,
|
|
96
|
+
"offset": 0,
|
|
97
|
+
"sortOrder": "DESC",
|
|
98
|
+
"sortKey": "id",
|
|
99
|
+
"statusId": 123,
|
|
100
|
+
"statusMarker": "in_stock",
|
|
101
|
+
"conditionValue": "new",
|
|
102
|
+
"conditionMarker": "equals",
|
|
103
|
+
"attributeMarker": "color"
|
|
104
|
+
}
|
|
105
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
106
106
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
107
|
+
* @description This method searches for all products with pagination for the selected category.
|
|
107
108
|
*/
|
|
108
109
|
getProductsByPageId(id: number, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
109
110
|
/**
|
|
110
111
|
* Search for information about products and prices for the selected category.
|
|
111
|
-
*
|
|
112
|
-
* @param
|
|
113
|
-
* @param
|
|
114
|
-
* @param
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
* @
|
|
112
|
+
* @handleName getProductsPriceByPageUrl
|
|
113
|
+
* @param {string} [url] - Page url. Example: "23-laminat-floorwood-maxima".
|
|
114
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
115
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
116
|
+
{
|
|
117
|
+
"limit": 30,
|
|
118
|
+
"offset": 0,
|
|
119
|
+
"sortOrder": "DESC",
|
|
120
|
+
"sortKey": "id",
|
|
121
|
+
"statusId": 123,
|
|
122
|
+
"statusMarker": "in_stock",
|
|
123
|
+
"conditionValue": "new",
|
|
124
|
+
"conditionMarker": "equals",
|
|
125
|
+
"attributeMarker": "color"
|
|
126
|
+
}
|
|
127
|
+
* @returns {IProductsInfo} Array with ProductInformation objects.
|
|
127
128
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
129
|
+
* @description This method searches for information about products prices for the selected category.
|
|
128
130
|
*/
|
|
129
131
|
getProductsPriceByPageUrl(url: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsInfo | IError>;
|
|
130
132
|
/**
|
|
131
133
|
* Search for all products with pagination for the selected category.
|
|
132
|
-
*
|
|
133
|
-
* @param
|
|
134
|
-
* @param
|
|
135
|
-
* @param
|
|
136
|
-
* @param
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
* @
|
|
134
|
+
* @handleName getProductsByPageUrl
|
|
135
|
+
* @param {string} url - Page url. Example: "23-laminat-floorwood-maxima".
|
|
136
|
+
* @param {IFilterParams[]} [body] - Request body. Default: [].
|
|
137
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
138
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
139
|
+
{
|
|
140
|
+
"limit": 30,
|
|
141
|
+
"offset": 0,
|
|
142
|
+
"sortOrder": "DESC",
|
|
143
|
+
"sortKey": "id",
|
|
144
|
+
"statusId": 123,
|
|
145
|
+
"statusMarker": "in_stock",
|
|
146
|
+
"conditionValue": "new",
|
|
147
|
+
"conditionMarker": "equals",
|
|
148
|
+
"attributeMarker": "color"
|
|
149
|
+
}
|
|
150
|
+
* @returns {IProductsResponse} Array with ProductEntity objects.
|
|
149
151
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
152
|
+
* @description This method searches for all products with pagination for the selected category.
|
|
150
153
|
*/
|
|
151
154
|
getProductsByPageUrl(url: string, body?: IFilterParams[], langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
152
155
|
/**
|
|
153
156
|
* Find all related product page objects.
|
|
154
|
-
*
|
|
155
|
-
* @param
|
|
156
|
-
* @param
|
|
157
|
-
* @param
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
* @
|
|
157
|
+
* @handleName getRelatedProductsById
|
|
158
|
+
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
159
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
160
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
161
|
+
{
|
|
162
|
+
"limit": 30,
|
|
163
|
+
"offset": 0,
|
|
164
|
+
"sortOrder": "DESC",
|
|
165
|
+
"sortKey": "id",
|
|
166
|
+
"statusId": 123,
|
|
167
|
+
"statusMarker": "in_stock",
|
|
168
|
+
"conditionValue": "new",
|
|
169
|
+
"conditionMarker": "equals",
|
|
170
|
+
"attributeMarker": "color"
|
|
171
|
+
}
|
|
172
|
+
* @returns {IProductsResponse} Array with ProductEntity objects
|
|
170
173
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
174
|
+
* @description This method finds all related product page objects for the selected product page.
|
|
171
175
|
*/
|
|
172
176
|
getRelatedProductsById(id: number, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsResponse | IError>;
|
|
173
177
|
/**
|
|
174
178
|
* Find products by its ids.
|
|
175
|
-
*
|
|
176
|
-
* @param
|
|
177
|
-
* @param
|
|
178
|
-
* @param
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
* @
|
|
179
|
+
* @handleName getProductsByIds
|
|
180
|
+
* @param {string} [ids] - Product page identifiers for which to find relationships. Example: "12345,67890".
|
|
181
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
182
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example:
|
|
183
|
+
{
|
|
184
|
+
"limit": 30,
|
|
185
|
+
"offset": 0,
|
|
186
|
+
"sortOrder": "DESC",
|
|
187
|
+
"sortKey": "id",
|
|
188
|
+
"statusId": 123,
|
|
189
|
+
"statusMarker": "in_stock",
|
|
190
|
+
"conditionValue": "new",
|
|
191
|
+
"conditionMarker": "equals",
|
|
192
|
+
"attributeMarker": "color"
|
|
193
|
+
}
|
|
194
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
191
195
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
196
|
+
* @description This method finds products by its ids.
|
|
192
197
|
*/
|
|
193
198
|
getProductsByIds(ids: string, langCode?: string, userQuery?: IProductsQuery): Promise<IProductsEntity[] | IError>;
|
|
194
199
|
/**
|
|
195
200
|
* Retrieve one product object.
|
|
196
|
-
*
|
|
197
|
-
* @param
|
|
198
|
-
* @param
|
|
199
|
-
* @
|
|
201
|
+
* @handleName getProductById
|
|
202
|
+
* @param {number} id - Product id. Example: 12345.
|
|
203
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
204
|
+
* @returns {IProductsEntity} ProductEntity object.
|
|
200
205
|
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
206
|
+
* @description This method retrieves one product object.
|
|
201
207
|
*/
|
|
202
208
|
getProductById(id: number, langCode?: string): Promise<IProductsEntity | IError>;
|
|
203
209
|
/**
|
|
204
210
|
* Getting a product block object by product id.
|
|
205
|
-
*
|
|
206
|
-
* @param
|
|
207
|
-
* @
|
|
211
|
+
* @handleName getProductBlockById
|
|
212
|
+
* @param {number} id - Product id. Example: 12345.
|
|
213
|
+
* @returns {IProductBlock}
|
|
208
214
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
215
|
+
* @description This method gets a product block object by product id.
|
|
209
216
|
*/
|
|
210
217
|
getProductBlockById(id: number): Promise<IProductBlock[] | IError>;
|
|
211
218
|
/**
|
|
212
219
|
* Quick search for product page objects with limited output.
|
|
213
|
-
*
|
|
214
|
-
* @param
|
|
215
|
-
* @param
|
|
216
|
-
* @
|
|
220
|
+
* @handleName searchProduct
|
|
221
|
+
* @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'.
|
|
222
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
223
|
+
* @returns {IProductsEntity[]} Array with ProductEntity objects
|
|
217
224
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
225
|
+
* @description This method performs a quick search for product page objects with limited output.
|
|
218
226
|
*/
|
|
219
227
|
searchProduct(name: string, langCode: string): Promise<IProductsEntity[] | IError>;
|
|
220
228
|
/**
|
|
221
229
|
* Getting the number of products for the entire catalog.
|
|
222
|
-
*
|
|
223
230
|
* @handleName getProductsCount
|
|
224
|
-
*
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
* @return {IProductsCount} Object with product items count.
|
|
231
|
+
* @param {string} [body] - Body parameters for filter. Deault: []. Example:
|
|
232
|
+
[
|
|
233
|
+
{
|
|
234
|
+
"attributeMarker": "price",
|
|
235
|
+
"conditionMarker": "in",
|
|
236
|
+
"statusMarker": "status_1",
|
|
237
|
+
"conditionValue": {},
|
|
238
|
+
"pageUrls": [
|
|
239
|
+
"23-laminat-floorwood-maxima"
|
|
240
|
+
],
|
|
241
|
+
"title": "Iphone 17 Pro"
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"attributeMarker": "price",
|
|
245
|
+
"conditionMarker": "in",
|
|
246
|
+
"statusMarker": "status_1",
|
|
247
|
+
"conditionValue": {},
|
|
248
|
+
"pageUrls": [
|
|
249
|
+
"23-laminat-floorwood-maxima"
|
|
250
|
+
],
|
|
251
|
+
"title": "Iphone 17 Pro"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
* @returns {IProductsCount} Object with product items count.
|
|
249
255
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
250
256
|
* @description This method calculates and returns the total number of products present across the entire catalog, optionally applying specified filters.
|
|
251
257
|
*/
|
|
252
258
|
getProductsCount(body: any): Promise<IProductsCount | IError>;
|
|
253
259
|
/**
|
|
254
260
|
* Getting the number of products on a catalog page by page ID.
|
|
255
|
-
*
|
|
256
261
|
* @handleName getProductsCountByPageId
|
|
257
|
-
*
|
|
258
|
-
* @param
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
* @return {IProductsCount} Object with product items count.
|
|
262
|
+
* @param {string} id - Page id. Example: 12345.
|
|
263
|
+
* @param {string} body - Body parameters for filter. Deault: []. Example:
|
|
264
|
+
[
|
|
265
|
+
{
|
|
266
|
+
"attributeMarker": "price",
|
|
267
|
+
"conditionMarker": "in",
|
|
268
|
+
"statusMarker": "status_1",
|
|
269
|
+
"conditionValue": {},
|
|
270
|
+
"pageUrls": [
|
|
271
|
+
"23-laminat-floorwood-maxima"
|
|
272
|
+
],
|
|
273
|
+
"title": "Iphone 17 Pro"
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"attributeMarker": "price",
|
|
277
|
+
"conditionMarker": "in",
|
|
278
|
+
"statusMarker": "status_1",
|
|
279
|
+
"conditionValue": {},
|
|
280
|
+
"pageUrls": [
|
|
281
|
+
"23-laminat-floorwood-maxima"
|
|
282
|
+
],
|
|
283
|
+
"title": "Iphone 17 Pro"
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
* @returns {IProductsCount} Object with product items count.
|
|
283
287
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
284
288
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
285
289
|
*/
|
|
286
290
|
getProductsCountByPageId(id: string, body: any): Promise<IProductsCount | IError>;
|
|
287
291
|
/**
|
|
288
292
|
* Getting the number of products on a catalog page by page URL.
|
|
289
|
-
*
|
|
290
293
|
* @handleName getProductsCountByPageUrl
|
|
291
|
-
*
|
|
292
|
-
* @param
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
* @return {IProductsCount} Object with product items count.
|
|
294
|
+
* @param {string} url - Page url. Example: "catalog".
|
|
295
|
+
* @param {string} body - Body parameters for filter. Deault: []. Example:
|
|
296
|
+
[
|
|
297
|
+
{
|
|
298
|
+
"attributeMarker": "price",
|
|
299
|
+
"conditionMarker": "in",
|
|
300
|
+
"statusMarker": "status_1",
|
|
301
|
+
"conditionValue": {},
|
|
302
|
+
"pageUrls": [
|
|
303
|
+
"23-laminat-floorwood-maxima"
|
|
304
|
+
],
|
|
305
|
+
"title": "Iphone 17 Pro"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"attributeMarker": "price",
|
|
309
|
+
"conditionMarker": "in",
|
|
310
|
+
"statusMarker": "status_1",
|
|
311
|
+
"conditionValue": {},
|
|
312
|
+
"pageUrls": [
|
|
313
|
+
"23-laminat-floorwood-maxima"
|
|
314
|
+
],
|
|
315
|
+
"title": "Iphone 17 Pro"
|
|
316
|
+
}
|
|
317
|
+
]
|
|
318
|
+
* @returns {IProductsCount} Object with product items count.
|
|
317
319
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
318
320
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its URL, with optional filtering.
|
|
319
321
|
*/
|
|
@@ -321,14 +323,13 @@ interface IProductApi {
|
|
|
321
323
|
}
|
|
322
324
|
/**
|
|
323
325
|
* @interface IProductsQuery
|
|
324
|
-
*
|
|
325
|
-
* @property {number}
|
|
326
|
-
* @property {
|
|
327
|
-
* @property {string}
|
|
328
|
-
* @property {string}
|
|
329
|
-
* @property {string | null} [
|
|
330
|
-
* @property {string | null} [
|
|
331
|
-
* @property {string | null} [conditionValue] - The value that is being searched for, default null. Example: "new".
|
|
326
|
+
* @property {number} offset - Parameter for pagination. Default: 0.
|
|
327
|
+
* @property {number} limit - Parameter for pagination. Default: 30.
|
|
328
|
+
* @property {string} sortOrder - Sort order "DESC" | "ASC". Default: "DESC".
|
|
329
|
+
* @property {string} sortKey - Field for sorting (default - null). Possible values: "id", "position", "title", "date", "price". Default: null.
|
|
330
|
+
* @property {string | null} [templateMarker] - Product page template marker, default null. Example: "template_12345".
|
|
331
|
+
* @property {string | null} [statusMarker] - Product page status marker, default null. Example: "in_stock".
|
|
332
|
+
* @property {string | null} [conditionValue] - The value that is being searched for, default null. Example: "new".
|
|
332
333
|
* @property {string | null} [attributeMarker] - The text identifier of the indexed attribute by which values are filtered, default null. Example: "color".
|
|
333
334
|
* @property {string | null} [conditionMarker] - Marker of the filter condition by which the values are filtered, default null. Example: "equals".
|
|
334
335
|
* @description This interface defines the structure of a query for retrieving products, including pagination, sorting, and filtering parameters.
|
|
@@ -347,14 +348,13 @@ interface IProductsQuery {
|
|
|
347
348
|
}
|
|
348
349
|
/**
|
|
349
350
|
* @interface IFilterParams
|
|
350
|
-
*
|
|
351
|
-
* @property {string | null} attributeMarker - The text identifier of the indexed attribute by which values are filtered. Default: null. Example: "color".
|
|
351
|
+
* @property {string | null} attributeMarker - The text identifier of the indexed attribute by which values are filtered. Default: null. Example: "color".
|
|
352
352
|
* @property {string | null} [conditionMarker] - Id of the filter condition by which the values are filtered. Default: null. Example: "equals".
|
|
353
|
-
* @property {number | null} conditionValue
|
|
354
|
-
* @property {string | null} [pageUrl]
|
|
355
|
-
* @property {string | null} [statusMarker]
|
|
356
|
-
* @property {string | null} [title]
|
|
357
|
-
* @property {boolean}
|
|
353
|
+
* @property {number | null} conditionValue - The value that is being searched for, default null. Example: "new".
|
|
354
|
+
* @property {string | null} [pageUrl] - Url of the category page object. Example: ["23-laminat-floorwood-maxima"].
|
|
355
|
+
* @property {string | null} [statusMarker] - Text identifier of the product page status (default not set). Example: "in_stock".
|
|
356
|
+
* @property {string | null} [title] - Product name. Example: "Laminatboden Maxima".
|
|
357
|
+
* @property {boolean} [isNested] - Flag for nested attributes, default false. Example: true.
|
|
358
358
|
* @description This interface defines the structure of filter parameters used for querying products, including conditions, attributes, and pagination.
|
|
359
359
|
*/
|
|
360
360
|
interface IFilterParams {
|
|
@@ -368,40 +368,39 @@ interface IFilterParams {
|
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
370
|
* @interface IProductsEntity
|
|
371
|
-
*
|
|
372
|
-
* @property {
|
|
373
|
-
* @property {
|
|
374
|
-
* @property {
|
|
375
|
-
* @property {
|
|
376
|
-
* @property {
|
|
377
|
-
* @property {
|
|
378
|
-
* @property {string | null} [templateIdentifier] - User id of the linked template. Example: "template_12345".
|
|
371
|
+
* @property {number} id - The unique identifier. Example: 12345.
|
|
372
|
+
* @property {ILocalizeInfo} localizeInfos - The name of the products, taking into account localization. Example:
|
|
373
|
+
* @property {string | null} statusIdentifier - Product page status identifiers (may be null). Example: "in_stock".
|
|
374
|
+
* @property {any} statusLocalizeInfos - JSON description of the item status object, taking into account the language. Example:
|
|
375
|
+
* @property {string | null} attributeSetIdentifier - Set of attributes id. Example: "set_12345".
|
|
376
|
+
* @property {number} position - Item number (for sorting). Example: 1.
|
|
377
|
+
* @property {string | null} [templateIdentifier] - User id of the linked template. Example: "template_12345".
|
|
379
378
|
* @property {string | null} [shortDescTemplateIdentifier] - User id of the linked template for a short description. Example: "short_desc_template_12345".
|
|
380
|
-
* @property {number}
|
|
381
|
-
* @property {object}
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
* @property {string | null} sku
|
|
387
|
-
* @property {boolean}
|
|
388
|
-
* @property {AttributeType} attributeValues
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
* @property {string[]}
|
|
396
|
-
* @property {boolean}
|
|
397
|
-
* @property {any[]}
|
|
398
|
-
* @property {string[]}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
* @property {boolean}
|
|
404
|
-
* @property {number[]}
|
|
379
|
+
* @property {number} price - The value of the product page price taken from the index. Example: 150.00.
|
|
380
|
+
* @property {object} additional - Additional value from the index. Example:
|
|
381
|
+
{
|
|
382
|
+
"en": "In Stock",
|
|
383
|
+
"de": "Auf Lager"
|
|
384
|
+
}
|
|
385
|
+
* @property {string | null} sku - Product SKU (Stock Keeping Unit), may be null. Example: "SKU_12345".
|
|
386
|
+
* @property {boolean} isSync - Indication of page indexing. Example: true.
|
|
387
|
+
* @property {AttributeType} attributeValues - Array of attribute values from the index, represented. Example:
|
|
388
|
+
[
|
|
389
|
+
{
|
|
390
|
+
"id": "color",
|
|
391
|
+
"value": "red"
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
* @property {string[]} categories - Product categories. Example: [1, 2, 3]
|
|
395
|
+
* @property {boolean} isVisible - A sign of page visibility. Example: true.
|
|
396
|
+
* @property {any[]} [productPages] - Array of product pages or a single product page object. Example:
|
|
397
|
+
* @property {string[]} [blocks] - Array of block identifiers. Example:
|
|
398
|
+
[
|
|
399
|
+
"block_12345",
|
|
400
|
+
"block_67890"
|
|
401
|
+
]
|
|
402
|
+
* @property {boolean} isPositionLocked - Sorting position lock indicator (optional). Example: false.
|
|
403
|
+
* @property {number[]} relatedIds - Ids of related product pages. Example: [12345, 67890].
|
|
405
404
|
* @description This interface defines the structure of a product entity, including its identifiers, attributes, and related information.
|
|
406
405
|
*/
|
|
407
406
|
interface IProductsEntity {
|
|
@@ -433,19 +432,18 @@ interface IProductsEntity {
|
|
|
433
432
|
}
|
|
434
433
|
/**
|
|
435
434
|
* @interface IProductsResponse
|
|
436
|
-
*
|
|
437
|
-
* @property {number} total - The total number of products found. Example: 100.
|
|
435
|
+
* @property {number} total - The total number of products found. Example: 100.
|
|
438
436
|
* @property {IProductsEntity[]} items - An array of product entities. Example:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
437
|
+
[
|
|
438
|
+
{
|
|
439
|
+
"id": 12345,
|
|
440
|
+
"title": "Product 1"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"id": 67890,
|
|
444
|
+
"title": "Product 2"
|
|
445
|
+
}
|
|
446
|
+
]
|
|
449
447
|
* @description This interface defines the structure of a response containing multiple product entities, including the total count and an array of product items.
|
|
450
448
|
*/
|
|
451
449
|
interface IProductsResponse {
|
|
@@ -454,9 +452,8 @@ interface IProductsResponse {
|
|
|
454
452
|
}
|
|
455
453
|
/**
|
|
456
454
|
* @interface IProductsCount
|
|
457
|
-
*
|
|
458
|
-
* @property {number}
|
|
459
|
-
* @property {number} totalInCategory - The total number of products found in category. Example: 50.
|
|
455
|
+
* @property {number} totalAll - The total number of products found. Example: 100.
|
|
456
|
+
* @property {number} totalInCategory - The total number of products found in category. Example: 50.
|
|
460
457
|
* @property {number} totalInCategoryWithNested - The total number of products found in nested category. Example: 10.
|
|
461
458
|
* @description This interface defines the structure of a response with total count of product items.
|
|
462
459
|
*/
|
|
@@ -467,19 +464,18 @@ interface IProductsCount {
|
|
|
467
464
|
}
|
|
468
465
|
/**
|
|
469
466
|
* @interface IProductsInfo
|
|
470
|
-
*
|
|
471
|
-
* @property {number} total - The total number of products found. Example: 100.
|
|
467
|
+
* @property {number} total - The total number of products found. Example: 100.
|
|
472
468
|
* @property {IProductInfo[]} items - An array of product information objects. Example:
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
469
|
+
[
|
|
470
|
+
{
|
|
471
|
+
"id": 12345,
|
|
472
|
+
"price": 150.00
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
"id": 67890,
|
|
476
|
+
"price": 200.00
|
|
477
|
+
}
|
|
478
|
+
]
|
|
483
479
|
* @description This interface defines the structure of a response containing product information, including the total count and an array of product items.
|
|
484
480
|
*/
|
|
485
481
|
interface IProductsInfo {
|
|
@@ -488,8 +484,7 @@ interface IProductsInfo {
|
|
|
488
484
|
}
|
|
489
485
|
/**
|
|
490
486
|
* @interface IProductInfo
|
|
491
|
-
*
|
|
492
|
-
* @property {number} id - The unique identifier of the product. Example: 12345.
|
|
487
|
+
* @property {number} id - The unique identifier of the product. Example: 12345.
|
|
493
488
|
* @property {number} price - The price of the product. Example: 150.00.
|
|
494
489
|
* @description This interface defines the structure of a product information object, including its identifier and price.
|
|
495
490
|
*/
|
|
@@ -499,28 +494,27 @@ interface IProductInfo {
|
|
|
499
494
|
}
|
|
500
495
|
/**
|
|
501
496
|
* @interface IProductBlock
|
|
502
|
-
*
|
|
503
|
-
* @property {number} id - Unique identifier of the product block. Example: 3289.
|
|
497
|
+
* @property {number} id - Unique identifier of the product block. Example: 3289.
|
|
504
498
|
* @property {number | null} attributeSetIdentifier - Identifier of the attribute set used in the product block, or null if not applicable. Example: 67890.
|
|
505
|
-
* @property {ILocalizeInfo} localizeInfos
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
* @property {number}
|
|
510
|
-
* @property {number}
|
|
511
|
-
* @property {string}
|
|
512
|
-
* @property {Types}
|
|
513
|
-
* @property {object}
|
|
514
|
-
* @property {string | null} templateIdentifier
|
|
515
|
-
* @property {boolean}
|
|
516
|
-
* @property {boolean}
|
|
517
|
-
* @property {AttributeType} attributeValues
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
499
|
+
* @property {ILocalizeInfo} localizeInfos - Localization information for the product block. Example:
|
|
500
|
+
{
|
|
501
|
+
"title": "Box"
|
|
502
|
+
}
|
|
503
|
+
* @property {number} version - Version of the product block entity. Example: 1.
|
|
504
|
+
* @property {number} position - Position of the product block in a list or layout. Example: 1.
|
|
505
|
+
* @property {string} identifier - Unique string identifier for the product block. Example: "product_block_12345".
|
|
506
|
+
* @property {Types} type - Type of the product block, such as "product", "error_page", etc. Example: "product".
|
|
507
|
+
* @property {object} customSettings - Custom settings for the product block, including slider delay, product configuration, similar product rules, and conditions. Example: {}
|
|
508
|
+
* @property {string | null} templateIdentifier - Identifier for the template used by the product block, or null if not applicable. Example: "template_12345".
|
|
509
|
+
* @property {boolean} isVisible - Indicates whether the product block is visible. Example: true.
|
|
510
|
+
* @property {boolean} isSync - Indicates whether the product block is synchronized. Example: false.
|
|
511
|
+
* @property {AttributeType} attributeValues - Array of attribute values from the index, represented as a pair of user attribute id and attribute value. Example:
|
|
512
|
+
[
|
|
513
|
+
{
|
|
514
|
+
"id": "color",
|
|
515
|
+
"value": "red"
|
|
516
|
+
}
|
|
517
|
+
]
|
|
524
518
|
* @description This interface defines the structure of a product block entity, including its identifiers, attributes, and custom settings.
|
|
525
519
|
*/
|
|
526
520
|
interface IProductBlock {
|