oneentry 1.0.123 → 1.0.124
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/dist/admins/adminsApi.d.ts +16 -8
- package/dist/admins/adminsApi.js +17 -9
- package/dist/admins/adminsInterfaces.d.ts +49 -25
- package/dist/attribute-sets/attributeSetsApi.d.ts +43 -21
- package/dist/attribute-sets/attributeSetsApi.js +49 -25
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +70 -24
- package/dist/auth-provider/authProviderApi.d.ts +94 -83
- package/dist/auth-provider/authProviderApi.js +96 -83
- package/dist/auth-provider/authProvidersInterfaces.d.ts +188 -10
- package/dist/base/asyncModules.d.ts +32 -28
- package/dist/base/asyncModules.js +61 -36
- package/dist/base/syncModules.d.ts +44 -44
- package/dist/base/syncModules.js +65 -63
- package/dist/blocks/blocksApi.d.ts +56 -25
- package/dist/blocks/blocksApi.js +56 -25
- package/dist/blocks/blocksInterfaces.d.ts +71 -22
- package/dist/events/eventsApi.d.ts +45 -11
- package/dist/events/eventsApi.js +47 -17
- package/dist/events/eventsInterfaces.d.ts +44 -2
- package/dist/file-uploading/fileUploadingApi.d.ts +44 -24
- package/dist/file-uploading/fileUploadingApi.js +46 -27
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +63 -14
- package/dist/forms/formsApi.d.ts +23 -8
- package/dist/forms/formsApi.js +23 -8
- package/dist/forms/formsInterfaces.d.ts +62 -15
- package/dist/formsData/formsDataApi.d.ts +33 -33
- package/dist/formsData/formsDataApi.js +33 -33
- package/dist/formsData/formsDataInterfaces.d.ts +123 -35
- package/dist/general-types/generalTypesApi.d.ts +12 -1
- package/dist/general-types/generalTypesApi.js +12 -1
- package/dist/general-types/generalTypesInterfaces.d.ts +18 -5
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +96 -70
- package/dist/integration-collections/integrationCollectionsApi.js +114 -81
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +152 -30
- package/dist/locales/localesApi.d.ts +6 -1
- package/dist/locales/localesApi.js +6 -1
- package/dist/locales/localesInterfaces.d.ts +20 -11
- package/dist/menus/menusApi.d.ts +8 -3
- package/dist/menus/menusApi.js +8 -3
- package/dist/menus/menusInterfaces.d.ts +30 -17
- package/dist/orders/ordersApi.d.ts +64 -64
- package/dist/orders/ordersApi.js +67 -65
- package/dist/orders/ordersInterfaces.d.ts +174 -60
- package/dist/pages/pagesApi.d.ts +87 -28
- package/dist/pages/pagesApi.js +87 -28
- package/dist/pages/pagesInterfaces.d.ts +117 -23
- package/dist/payments/paymentsApi.d.ts +56 -22
- package/dist/payments/paymentsApi.js +56 -22
- package/dist/payments/paymentsInterfaces.d.ts +119 -36
- package/dist/product-statuses/productStatusesApi.d.ts +21 -15
- package/dist/product-statuses/productStatusesApi.js +21 -18
- package/dist/product-statuses/productStatusesInterfaces.d.ts +37 -9
- package/dist/products/productsApi.d.ts +137 -157
- package/dist/products/productsApi.js +137 -157
- package/dist/products/productsInterfaces.d.ts +240 -57
- package/dist/system/systemApi.d.ts +29 -10
- package/dist/system/systemApi.js +29 -10
- package/dist/system/systemInterfaces.d.ts +8 -0
- package/dist/templates/templatesApi.d.ts +26 -16
- package/dist/templates/templatesApi.js +26 -19
- package/dist/templates/templatesInterfaces.d.ts +40 -14
- package/dist/templates-preview/templatesPreviewApi.d.ts +18 -14
- package/dist/templates-preview/templatesPreviewApi.js +18 -17
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -26
- package/dist/users/usersApi.d.ts +37 -33
- package/dist/users/usersApi.js +37 -33
- package/dist/users/usersInterfaces.d.ts +80 -9
- package/dist/web-socket/wsApi.d.ts +6 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +3 -1
- package/package.json +11 -11
|
@@ -23,46 +23,27 @@ class ProductApi extends asyncModules_1.default {
|
|
|
23
23
|
/**
|
|
24
24
|
* Search for all products with pagination and filter.
|
|
25
25
|
*
|
|
26
|
-
* @
|
|
27
|
-
*
|
|
26
|
+
* @handleName getProducts
|
|
27
|
+
*
|
|
28
|
+
* @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
|
|
29
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
28
30
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
29
31
|
*
|
|
30
|
-
* @param {number} [userQuery.offset] - Optional parameter for pagination
|
|
31
|
-
* @param {number} [userQuery.limit] - Optional parameter for pagination
|
|
32
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
33
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
34
|
-
* @param {number} [userQuery.statusId] - Optional parameter - search by status id
|
|
35
|
-
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
|
|
36
|
-
* @param {string} [userQuery.conditionValue] - Optional value that is being searched
|
|
37
|
-
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
|
|
38
|
-
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
|
|
39
|
-
*
|
|
40
|
-
* @
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* "statusMarker": "waiting",
|
|
46
|
-
* "conditionValue": 1,
|
|
47
|
-
* "pageUrls": [
|
|
48
|
-
* "23-laminat-floorwood-maxima"
|
|
49
|
-
* ],
|
|
50
|
-
* "isNested": false,
|
|
51
|
-
* "title": ""
|
|
52
|
-
* },
|
|
53
|
-
* {
|
|
54
|
-
* "attributeMarker": "price",
|
|
55
|
-
* "conditionMarker": "lth",
|
|
56
|
-
* "conditionValue": 3,
|
|
57
|
-
* "pageUrls": [
|
|
58
|
-
* "23-laminat-floorwood-maxima"
|
|
59
|
-
* ],
|
|
60
|
-
* "isNested": false,
|
|
61
|
-
* "title": ""
|
|
62
|
-
* }
|
|
63
|
-
* ]
|
|
64
|
-
*
|
|
65
|
-
* @returns Array with ProductEntity objects
|
|
32
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
33
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
34
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
35
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
36
|
+
* @param {number} [userQuery.statusId] - Optional parameter - search by status id. Example: 123.
|
|
37
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
|
|
38
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
|
|
39
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
|
|
40
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
|
|
41
|
+
*
|
|
42
|
+
* @return {IProductsResponse} Array with ProductEntity objects
|
|
43
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
|
+
*
|
|
45
|
+
* @description Fetch products with optional filters and pagination.
|
|
46
|
+
*
|
|
66
47
|
*/
|
|
67
48
|
async getProducts(body = [], langCode = this.state.lang, userQuery) {
|
|
68
49
|
const query = {
|
|
@@ -76,19 +57,24 @@ class ProductApi extends asyncModules_1.default {
|
|
|
76
57
|
/**
|
|
77
58
|
* Search for all product page objects with pagination that do not have a category.
|
|
78
59
|
*
|
|
79
|
-
* @
|
|
60
|
+
* @handleName getProductsEmptyPage
|
|
61
|
+
*
|
|
62
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
80
63
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
81
64
|
*
|
|
82
|
-
* @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0
|
|
83
|
-
* @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30
|
|
84
|
-
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
|
|
85
|
-
* @param {string} [userQuery.conditionValue] - Optional value that is being searched
|
|
86
|
-
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
|
|
87
|
-
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
|
|
88
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
89
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
65
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination, default is 0.
|
|
66
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination, default is 30.
|
|
67
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
|
|
68
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
|
|
69
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
|
|
70
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
|
|
71
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
72
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
73
|
+
*
|
|
74
|
+
* @return {IProductsResponse} Array with ProductEntity objects.
|
|
75
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
90
76
|
*
|
|
91
|
-
* @
|
|
77
|
+
* @description Fetch products with optional filters and pagination.
|
|
92
78
|
*/
|
|
93
79
|
async getProductsEmptyPage(langCode = this.state.lang, userQuery) {
|
|
94
80
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
@@ -98,46 +84,27 @@ class ProductApi extends asyncModules_1.default {
|
|
|
98
84
|
/**
|
|
99
85
|
* Search for all products with pagination for the selected category.
|
|
100
86
|
*
|
|
87
|
+
* @handleName getProductsByPageId
|
|
88
|
+
*
|
|
101
89
|
* @param {number} id - Page id.
|
|
102
|
-
* @param {Array<IFilterParams>} body - Request body.
|
|
103
|
-
* @param {string} [langCode] - Language code
|
|
90
|
+
* @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
|
|
91
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
104
92
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
105
93
|
*
|
|
106
|
-
* @param {number} [userQuery.offset] - Optional parameter for pagination
|
|
107
|
-
* @param {number} [userQuery.limit] - Optional parameter for pagination
|
|
108
|
-
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
|
|
109
|
-
* @param {string} [userQuery.conditionValue] - Optional value that is being searched
|
|
110
|
-
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
|
|
111
|
-
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
|
|
112
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
113
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
114
|
-
*
|
|
115
|
-
* @
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
* "statusMarker": "waiting",
|
|
121
|
-
* "conditionValue": 1,
|
|
122
|
-
* "pageUrls": [
|
|
123
|
-
* "23-laminat-floorwood-maxima"
|
|
124
|
-
* ],
|
|
125
|
-
* "isNested": false,
|
|
126
|
-
* "title": ""
|
|
127
|
-
* },
|
|
128
|
-
* {
|
|
129
|
-
* "attributeMarker": "price",
|
|
130
|
-
* "conditionMarker": "lth",
|
|
131
|
-
* "conditionValue": 3,
|
|
132
|
-
* "pageUrls": [
|
|
133
|
-
* "23-laminat-floorwood-maxima"
|
|
134
|
-
* ],
|
|
135
|
-
* "isNested": false,
|
|
136
|
-
* "title": ""
|
|
137
|
-
* }
|
|
138
|
-
* ]
|
|
139
|
-
*
|
|
140
|
-
* @returns Array with ProductEntity objects
|
|
94
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default is 0.
|
|
95
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default is 30.
|
|
96
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
|
|
97
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
|
|
98
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
|
|
99
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
|
|
100
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
101
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
102
|
+
*
|
|
103
|
+
* @return {IProductsResponse} Array with ProductEntity objects
|
|
104
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
105
|
+
*
|
|
106
|
+
* @description Fetch products by page ID with optional filters and pagination.
|
|
107
|
+
*
|
|
141
108
|
*/
|
|
142
109
|
async getProductsByPageId(id, body = [], langCode = this.state.lang, userQuery) {
|
|
143
110
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
@@ -147,20 +114,25 @@ class ProductApi extends asyncModules_1.default {
|
|
|
147
114
|
/**
|
|
148
115
|
* Search for information about products and prices for the selected category.
|
|
149
116
|
*
|
|
150
|
-
* @
|
|
151
|
-
*
|
|
117
|
+
* @handleName getProductsPriceByPageUrl
|
|
118
|
+
*
|
|
119
|
+
* @param {string} [url] - Page url. Example: '23-laminat-floorwood-maxima'.
|
|
120
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
152
121
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
153
122
|
*
|
|
154
|
-
* @param {number} [userQuery.offset] - Optional parameter for pagination
|
|
155
|
-
* @param {number} [userQuery.limit] - Optional parameter for pagination
|
|
156
|
-
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
|
|
157
|
-
* @param {string} [userQuery.conditionValue] - Optional value that is being searched
|
|
158
|
-
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
|
|
159
|
-
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
|
|
160
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
161
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
123
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
124
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
125
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
|
|
126
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
|
|
127
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
|
|
128
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
|
|
129
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
130
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
131
|
+
*
|
|
132
|
+
* @return {IProductsInfo} Array with ProductInformation objects.
|
|
133
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
162
134
|
*
|
|
163
|
-
* @
|
|
135
|
+
* @description
|
|
164
136
|
*/
|
|
165
137
|
async getProductsPriceByPageUrl(url, langCode = this.state.lang, userQuery) {
|
|
166
138
|
const query = {
|
|
@@ -174,46 +146,27 @@ class ProductApi extends asyncModules_1.default {
|
|
|
174
146
|
/**
|
|
175
147
|
* Search for all products with pagination for the selected category.
|
|
176
148
|
*
|
|
177
|
-
* @
|
|
178
|
-
*
|
|
179
|
-
* @param {string}
|
|
149
|
+
* @handleName getProductsByPageUrl
|
|
150
|
+
*
|
|
151
|
+
* @param {string} url - Page url.
|
|
152
|
+
* @param {Array<IFilterParams>} [body] - Request body. Default: []. Example: [ { "attributeMarker": "price", "conditionMarker": "mth", "statusMarker": "waiting", "conditionValue": 1, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" }, { "attributeMarker": "price", "conditionMarker": "lth", "conditionValue": 3, "pageUrls": [ "23-laminat-floorwood-maxima" ], "isNested": false, "title": "" } ].
|
|
153
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
180
154
|
* @param {IProductsQuery} [userQuery] - Optional set query parameters.
|
|
181
155
|
*
|
|
182
|
-
* @param {number} [userQuery.offset] - Optional parameter for pagination
|
|
183
|
-
* @param {number} [userQuery.limit] - Optional parameter for pagination
|
|
184
|
-
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status
|
|
185
|
-
* @param {string} [userQuery.conditionValue] - Optional value that is being searched
|
|
186
|
-
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered
|
|
187
|
-
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered
|
|
188
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
189
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
190
|
-
*
|
|
191
|
-
* @
|
|
192
|
-
*
|
|
193
|
-
*
|
|
194
|
-
*
|
|
195
|
-
*
|
|
196
|
-
* "statusMarker": "waiting",
|
|
197
|
-
* "conditionValue": 1,
|
|
198
|
-
* "pageUrls": [
|
|
199
|
-
* "23-laminat-floorwood-maxima"
|
|
200
|
-
* ],
|
|
201
|
-
* "isNested": false,
|
|
202
|
-
* "title": ""
|
|
203
|
-
* },
|
|
204
|
-
* {
|
|
205
|
-
* "attributeMarker": "price",
|
|
206
|
-
* "conditionMarker": "lth",
|
|
207
|
-
* "conditionValue": 3,
|
|
208
|
-
* "pageUrls": [
|
|
209
|
-
* "23-laminat-floorwood-maxima"
|
|
210
|
-
* ],
|
|
211
|
-
* "isNested": false,
|
|
212
|
-
* "title": ""
|
|
213
|
-
* }
|
|
214
|
-
* ]
|
|
215
|
-
*
|
|
216
|
-
* @returns Array with ProductEntity objects
|
|
156
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
157
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
158
|
+
* @param {string} [userQuery.statusMarker] - Optional identifier of the product page status. Example: 'in_stock'.
|
|
159
|
+
* @param {string} [userQuery.conditionValue] - Optional value that is being searched. Example: 'new'.
|
|
160
|
+
* @param {string} [userQuery.conditionMarker] - Optional identifier of the filter condition by which values are filtered. Example: 'equals'.
|
|
161
|
+
* @param {string} [userQuery.attributeMarker] - Optional text identifier of the indexed attribute by which values are filtered. Example: 'color'.
|
|
162
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
163
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
164
|
+
*
|
|
165
|
+
* @return {IProductsResponse} Array with ProductEntity objects.
|
|
166
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
167
|
+
*
|
|
168
|
+
* @description Search for all products with pagination for the selected category.
|
|
169
|
+
*
|
|
217
170
|
*/
|
|
218
171
|
async getProductsByPageUrl(url, body = [], langCode = this.state.lang, userQuery) {
|
|
219
172
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
@@ -224,16 +177,21 @@ class ProductApi extends asyncModules_1.default {
|
|
|
224
177
|
/**
|
|
225
178
|
* Find all related product page objects.
|
|
226
179
|
*
|
|
227
|
-
* @
|
|
228
|
-
*
|
|
229
|
-
* @param {
|
|
180
|
+
* @handleName getRelatedProductsById
|
|
181
|
+
*
|
|
182
|
+
* @param {number} [id] - Product page identifier for which to find relationship. Example: 12345.
|
|
183
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
184
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example: { offset: 0, limit: 30, sortOrder: 'DESC', sortKey: 'id' }.
|
|
185
|
+
*
|
|
186
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
187
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
188
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
189
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
230
190
|
*
|
|
231
|
-
* @
|
|
232
|
-
* @
|
|
233
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
234
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
191
|
+
* @return {IProductsResponse} Array with ProductEntity objects
|
|
192
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
235
193
|
*
|
|
236
|
-
* @
|
|
194
|
+
* @description Find all related product page objects.
|
|
237
195
|
*/
|
|
238
196
|
async getRelatedProductsById(id, langCode = this.state.lang, userQuery) {
|
|
239
197
|
const query = { ...this._defaultQuery, ...userQuery };
|
|
@@ -243,16 +201,21 @@ class ProductApi extends asyncModules_1.default {
|
|
|
243
201
|
/**
|
|
244
202
|
* Find products by its ids.
|
|
245
203
|
*
|
|
246
|
-
* @
|
|
247
|
-
*
|
|
248
|
-
* @param {
|
|
204
|
+
* @handleName getProductsByIds
|
|
205
|
+
*
|
|
206
|
+
* @param {string} [ids] - Product page identifiers for which to find relationships. Example: '12345,67890'.
|
|
207
|
+
* @param {string} [langCode] - Language code. Default "en_US".
|
|
208
|
+
* @param {IProductsQuery} [userQuery] - Optional set query parameters. Example: { offset: 0, limit: 30, sortOrder: 'DESC', sortKey: 'id' }.
|
|
209
|
+
*
|
|
210
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
|
|
211
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
|
|
212
|
+
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC. Example: 'DESC'.
|
|
213
|
+
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status). Example: 'id'.
|
|
249
214
|
*
|
|
250
|
-
* @
|
|
251
|
-
* @
|
|
252
|
-
* @param {string} [userQuery.sortOrder] - Optional sorting order DESC | ASC
|
|
253
|
-
* @param {string} [userQuery.sortKey] - Optional field to sort by (id, title, date, price, position, status)
|
|
215
|
+
* @return {IProductEntity[]} Array with ProductEntity objects
|
|
216
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
254
217
|
*
|
|
255
|
-
* @
|
|
218
|
+
* @description Find products by its ids.
|
|
256
219
|
*/
|
|
257
220
|
async getProductsByIds(ids, langCode = this.state.lang, userQuery) {
|
|
258
221
|
const query = {
|
|
@@ -267,10 +230,15 @@ class ProductApi extends asyncModules_1.default {
|
|
|
267
230
|
/**
|
|
268
231
|
* Retrieve one product object.
|
|
269
232
|
*
|
|
270
|
-
* @
|
|
271
|
-
* @param {string} [langCode] - Language code parameter. Default "en_US".
|
|
233
|
+
* @handleName getProductById
|
|
272
234
|
*
|
|
273
|
-
* @
|
|
235
|
+
* @param {number} [id] - Product id. Example: 12345.
|
|
236
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
237
|
+
*
|
|
238
|
+
* @return {IProductEntity} ProductEntity object.
|
|
239
|
+
* @throws {IError} If there is an error during the fetch operation, it will return an error object.
|
|
240
|
+
*
|
|
241
|
+
* @description Retrieve one product object.
|
|
274
242
|
*/
|
|
275
243
|
async getProductById(id, langCode = this.state.lang) {
|
|
276
244
|
const result = await this._fetchGet(`/${id}?langCode=${langCode}`);
|
|
@@ -279,7 +247,14 @@ class ProductApi extends asyncModules_1.default {
|
|
|
279
247
|
/**
|
|
280
248
|
* Getting a product block object by product id.
|
|
281
249
|
*
|
|
282
|
-
* @
|
|
250
|
+
* @handleName getProductBlockById
|
|
251
|
+
*
|
|
252
|
+
* @param {number} id - Product id. Example: 12345.
|
|
253
|
+
*
|
|
254
|
+
* @return {IProductBlock}
|
|
255
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
256
|
+
*
|
|
257
|
+
* @description Getting a product block object by product id.
|
|
283
258
|
*/
|
|
284
259
|
async getProductBlockById(id) {
|
|
285
260
|
const response = await this._fetchGet(`/${id}/blocks`);
|
|
@@ -288,10 +263,15 @@ class ProductApi extends asyncModules_1.default {
|
|
|
288
263
|
/**
|
|
289
264
|
* Quick search for product page objects with limited output.
|
|
290
265
|
*
|
|
291
|
-
* @
|
|
292
|
-
*
|
|
266
|
+
* @handleName searchProduct
|
|
267
|
+
*
|
|
268
|
+
* @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'.
|
|
269
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
270
|
+
*
|
|
271
|
+
* @return {IProductsEntity[]} Array with ProductEntity objects
|
|
272
|
+
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
293
273
|
*
|
|
294
|
-
* @
|
|
274
|
+
* @description Quick search for product page objects with limited output.
|
|
295
275
|
*/
|
|
296
276
|
async searchProduct(name, langCode = this.state.lang) {
|
|
297
277
|
const searchProducts = await this._fetchGet(`/quick/search?langCode=${langCode}&name=${name}`);
|