oneentry 1.0.173 → 1.0.175
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/changelog.md +35 -0
- package/dist/admins/adminsApi.d.ts +7 -7
- package/dist/admins/adminsApi.js +7 -7
- package/dist/admins/adminsInterfaces.d.ts +22 -22
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.d.ts +30 -30
- package/dist/auth-provider/authProviderApi.js +30 -30
- package/dist/auth-provider/authProviderSchemas.d.ts +1 -1
- package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -53
- package/dist/base/asyncModules.d.ts +6 -6
- package/dist/base/asyncModules.js +6 -6
- package/dist/base/syncModules.d.ts +1 -1
- package/dist/base/syncModules.js +1 -1
- package/dist/base/utils.d.ts +3 -3
- package/dist/base/validation.d.ts +1 -1
- package/dist/base/validation.js +1 -1
- package/dist/blocks/blocksApi.d.ts +35 -35
- package/dist/blocks/blocksApi.js +35 -35
- package/dist/blocks/blocksInterfaces.d.ts +55 -55
- package/dist/discounts/discountsApi.d.ts +14 -14
- package/dist/discounts/discountsApi.js +14 -14
- package/dist/discounts/discountsInterfaces.d.ts +52 -52
- package/dist/events/eventsApi.d.ts +13 -13
- package/dist/events/eventsApi.js +13 -13
- package/dist/events/eventsInterfaces.d.ts +18 -18
- package/dist/file-uploading/fileUploadingApi.d.ts +14 -14
- package/dist/file-uploading/fileUploadingApi.js +14 -14
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/dist/filters/filtersApi.d.ts +1 -1
- package/dist/filters/filtersApi.js +1 -1
- package/dist/filters/filtersInterfaces.d.ts +7 -7
- package/dist/forms/formsApi.d.ts +3 -3
- package/dist/forms/formsApi.js +3 -3
- package/dist/forms/formsInterfaces.d.ts +42 -42
- package/dist/forms-data/formsDataApi.d.ts +14 -14
- package/dist/forms-data/formsDataApi.js +14 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/dist/integration-collections/integrationCollectionsApi.js +20 -20
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/menus/menusInterfaces.d.ts +12 -12
- package/dist/orders/ordersApi.d.ts +26 -26
- package/dist/orders/ordersApi.js +26 -26
- package/dist/orders/ordersInterfaces.d.ts +99 -99
- package/dist/pages/pagesApi.d.ts +6 -6
- package/dist/pages/pagesApi.js +6 -6
- package/dist/pages/pagesInterfaces.d.ts +46 -46
- package/dist/payments/paymentsApi.d.ts +8 -8
- package/dist/payments/paymentsApi.js +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +31 -31
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/dist/products/productsApi.d.ts +37 -37
- package/dist/products/productsApi.js +36 -36
- package/dist/products/productsInterfaces.d.ts +96 -96
- package/dist/search/searchApi.d.ts +3 -3
- package/dist/search/searchApi.js +3 -3
- package/dist/search/searchInterfaces.d.ts +4 -4
- package/dist/sitemap/sitemapApi.d.ts +1 -1
- package/dist/sitemap/sitemapApi.js +1 -1
- package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
- package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/dist/templates/templatesApi.d.ts +2 -2
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesInterfaces.d.ts +10 -10
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/dist/user-activity/userActivityApi.d.ts +1 -1
- package/dist/user-activity/userActivityApi.js +1 -1
- package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
- package/dist/user-groups/userGroupsApi.d.ts +1 -1
- package/dist/user-groups/userGroupsApi.js +1 -1
- package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/dist/users/usersApi.d.ts +9 -9
- package/dist/users/usersApi.js +9 -9
- package/dist/users/usersInterfaces.d.ts +40 -39
- package/dist/users/usersSchemas.d.ts +1 -1
- package/esm/admins/adminsApi.d.ts +7 -7
- package/esm/admins/adminsApi.js +7 -7
- package/esm/admins/adminsInterfaces.d.ts +22 -22
- package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/esm/attribute-sets/attributeSetsApi.js +8 -8
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.d.ts +30 -30
- package/esm/auth-provider/authProviderApi.js +30 -30
- package/esm/auth-provider/authProviderSchemas.d.ts +1 -1
- package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -53
- package/esm/base/asyncModules.d.ts +6 -6
- package/esm/base/asyncModules.js +6 -6
- package/esm/base/syncModules.d.ts +1 -1
- package/esm/base/syncModules.js +1 -1
- package/esm/base/utils.d.ts +3 -3
- package/esm/base/validation.d.ts +1 -1
- package/esm/base/validation.js +1 -1
- package/esm/blocks/blocksApi.d.ts +35 -35
- package/esm/blocks/blocksApi.js +35 -35
- package/esm/blocks/blocksInterfaces.d.ts +55 -55
- package/esm/discounts/discountsApi.d.ts +14 -14
- package/esm/discounts/discountsApi.js +14 -14
- package/esm/discounts/discountsInterfaces.d.ts +52 -52
- package/esm/events/eventsApi.d.ts +13 -13
- package/esm/events/eventsApi.js +13 -13
- package/esm/events/eventsInterfaces.d.ts +18 -18
- package/esm/file-uploading/fileUploadingApi.d.ts +14 -14
- package/esm/file-uploading/fileUploadingApi.js +14 -14
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/esm/filters/filtersApi.d.ts +1 -1
- package/esm/filters/filtersApi.js +1 -1
- package/esm/filters/filtersInterfaces.d.ts +7 -7
- package/esm/forms/formsApi.d.ts +3 -3
- package/esm/forms/formsApi.js +3 -3
- package/esm/forms/formsInterfaces.d.ts +42 -42
- package/esm/forms-data/formsDataApi.d.ts +14 -14
- package/esm/forms-data/formsDataApi.js +14 -14
- package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
- package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
- package/esm/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/esm/integration-collections/integrationCollectionsApi.js +20 -20
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/esm/locales/localesInterfaces.d.ts +8 -8
- package/esm/menus/menusApi.d.ts +1 -1
- package/esm/menus/menusApi.js +1 -1
- package/esm/menus/menusInterfaces.d.ts +12 -12
- package/esm/orders/ordersApi.d.ts +26 -26
- package/esm/orders/ordersApi.js +26 -26
- package/esm/orders/ordersInterfaces.d.ts +99 -99
- package/esm/pages/pagesApi.d.ts +6 -6
- package/esm/pages/pagesApi.js +6 -6
- package/esm/pages/pagesInterfaces.d.ts +46 -46
- package/esm/payments/paymentsApi.d.ts +8 -8
- package/esm/payments/paymentsApi.js +8 -8
- package/esm/payments/paymentsInterfaces.d.ts +31 -31
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/esm/products/productsApi.d.ts +37 -37
- package/esm/products/productsApi.js +36 -36
- package/esm/products/productsInterfaces.d.ts +96 -96
- package/esm/search/searchApi.d.ts +3 -3
- package/esm/search/searchApi.js +3 -3
- package/esm/search/searchInterfaces.d.ts +4 -4
- package/esm/sitemap/sitemapApi.d.ts +1 -1
- package/esm/sitemap/sitemapApi.js +1 -1
- package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
- package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
- package/esm/subscriptions/subscriptionsApi.js +3 -3
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/esm/templates/templatesApi.d.ts +2 -2
- package/esm/templates/templatesApi.js +2 -2
- package/esm/templates/templatesInterfaces.d.ts +10 -10
- package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/esm/user-activity/userActivityApi.d.ts +1 -1
- package/esm/user-activity/userActivityApi.js +1 -1
- package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
- package/esm/user-groups/userGroupsApi.d.ts +1 -1
- package/esm/user-groups/userGroupsApi.js +1 -1
- package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/esm/users/usersApi.d.ts +9 -9
- package/esm/users/usersApi.js +9 -9
- package/esm/users/usersInterfaces.d.ts +40 -39
- package/esm/users/usersSchemas.d.ts +1 -1
- package/package.json +2 -2
|
@@ -19,7 +19,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
19
19
|
/**
|
|
20
20
|
* Search for all products with pagination and filter.
|
|
21
21
|
* @handleName getProducts
|
|
22
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
22
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
23
23
|
* @example
|
|
24
24
|
[
|
|
25
25
|
{
|
|
@@ -45,7 +45,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
45
45
|
}
|
|
46
46
|
]
|
|
47
47
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
48
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
48
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
49
49
|
* @example
|
|
50
50
|
{
|
|
51
51
|
"limit": 30,
|
|
@@ -54,7 +54,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
54
54
|
"sortKey": "id",
|
|
55
55
|
"signPrice": "orders"
|
|
56
56
|
}
|
|
57
|
-
* @param {string} [userQuery.signPrice] -
|
|
57
|
+
* @param {string} [userQuery.signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time. Example: "orders_storage".
|
|
58
58
|
* @see {@link https://js-sdk.oneentry.cloud/docs/products/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
59
59
|
* @param {string} [userQuery.sortOrder] - Sorting order parameter.
|
|
60
60
|
* @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
|
|
@@ -66,9 +66,9 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
66
66
|
/**
|
|
67
67
|
* Search for all product page objects with pagination (and aggregation) that do not have a category.
|
|
68
68
|
* @handleName getProductsEmptyPage
|
|
69
|
-
* @param {object} [body] - Request body. Default: {}
|
|
69
|
+
* @param {object} [body] - Request body. Default: `{}`.
|
|
70
70
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
71
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
71
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
72
72
|
* @example
|
|
73
73
|
{
|
|
74
74
|
"limit": 30,
|
|
@@ -86,8 +86,8 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
86
86
|
/**
|
|
87
87
|
* Search for all products with pagination for the selected category.
|
|
88
88
|
* @handleName getProductsByPageId
|
|
89
|
-
* @param {number} id - Page
|
|
90
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
89
|
+
* @param {number} id - Page ID. Example: 2492.
|
|
90
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
91
91
|
* @example
|
|
92
92
|
[
|
|
93
93
|
{
|
|
@@ -113,7 +113,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
113
113
|
}
|
|
114
114
|
]
|
|
115
115
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
116
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
116
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
117
117
|
* @example
|
|
118
118
|
{
|
|
119
119
|
"limit": 30,
|
|
@@ -131,9 +131,9 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
131
131
|
/**
|
|
132
132
|
* Search for information about products and prices for the selected category.
|
|
133
133
|
* @handleName getProductsPriceByPageUrl
|
|
134
|
-
* @param {string} [url] - Page
|
|
134
|
+
* @param {string} [url] - Page URL. Example: "23-laminat-floorwood-maxima".
|
|
135
135
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
136
|
-
* @param {IProductsPriceQuery} [userQuery] - Optional
|
|
136
|
+
* @param {IProductsPriceQuery} [userQuery] - Optional query parameters.
|
|
137
137
|
* @example
|
|
138
138
|
{
|
|
139
139
|
"limit": 30,
|
|
@@ -151,8 +151,8 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
151
151
|
/**
|
|
152
152
|
* Search for all products with pagination for the selected category.
|
|
153
153
|
* @handleName getProductsByPageUrl
|
|
154
|
-
* @param {string} url - Page
|
|
155
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
154
|
+
* @param {string} url - Page URL. Example: "catalog".
|
|
155
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
156
156
|
* @example
|
|
157
157
|
[
|
|
158
158
|
{
|
|
@@ -178,7 +178,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
178
178
|
}
|
|
179
179
|
]
|
|
180
180
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
181
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
181
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
182
182
|
* @example
|
|
183
183
|
{
|
|
184
184
|
"limit": 30,
|
|
@@ -196,9 +196,9 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
196
196
|
/**
|
|
197
197
|
* Find all related product page objects.
|
|
198
198
|
* @handleName getRelatedProductsById
|
|
199
|
-
* @param {number} [id] -
|
|
199
|
+
* @param {number} [id] - ID of the product page to find related products for. Example: 12345.
|
|
200
200
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
201
|
-
* @param {IProductsRelatedQuery} [userQuery] - Optional
|
|
201
|
+
* @param {IProductsRelatedQuery} [userQuery] - Optional query parameters.
|
|
202
202
|
* @example
|
|
203
203
|
{
|
|
204
204
|
"limit": 30,
|
|
@@ -209,8 +209,8 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
209
209
|
"statusMarker": "in_stock",
|
|
210
210
|
"templateMarker": "template_12345"
|
|
211
211
|
}
|
|
212
|
-
* @param {number} [userQuery.limit] -
|
|
213
|
-
* @param {number} [userQuery.offset] -
|
|
212
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
213
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
214
214
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
215
215
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
216
216
|
* @param {string} [userQuery.relationMode] - How relations are computed: "global" (default) or "local", which also requires the product `id` itself to satisfy the template condition. Example: "local".
|
|
@@ -223,18 +223,18 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
223
223
|
/**
|
|
224
224
|
* Find products by its ids.
|
|
225
225
|
* @handleName getProductsByIds
|
|
226
|
-
* @param {string} ids -
|
|
227
|
-
* @param {string} [langCode] - Language code. Default "en_US".
|
|
228
|
-
* @param {IProductsByIdsQuery} [userQuery] - Optional
|
|
226
|
+
* @param {string} ids - Comma-separated IDs of the product pages to fetch. Example: "12345,67890".
|
|
227
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
228
|
+
* @param {IProductsByIdsQuery} [userQuery] - Optional query parameters.
|
|
229
229
|
* @example
|
|
230
230
|
{
|
|
231
231
|
"limit": 30,
|
|
232
232
|
"offset": 0,
|
|
233
233
|
"signPrice": "orders"
|
|
234
234
|
}
|
|
235
|
-
* @param {number} [userQuery.limit] -
|
|
236
|
-
* @param {number} [userQuery.offset] -
|
|
237
|
-
* @param {string} [userQuery.signPrice] -
|
|
235
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
236
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
237
|
+
* @param {string} [userQuery.signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
238
238
|
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
239
239
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
240
240
|
* @description Find products by its ids.
|
|
@@ -244,9 +244,9 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
244
244
|
/**
|
|
245
245
|
* Retrieve one product object.
|
|
246
246
|
* @handleName getProductById
|
|
247
|
-
* @param {number} id - Product
|
|
247
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
248
248
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
249
|
-
* @param {boolean} [isNormalized] -
|
|
249
|
+
* @param {boolean} [isNormalized] - When `true`, the product is returned in normalized form.
|
|
250
250
|
* @returns {Promise<IProductsEntity | IError>} ProductEntity object.
|
|
251
251
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
252
252
|
* @description Retrieve one product object.
|
|
@@ -256,7 +256,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
256
256
|
/**
|
|
257
257
|
* Getting a product block object by product id.
|
|
258
258
|
* @handleName getProductBlockById
|
|
259
|
-
* @param {number} id - Product
|
|
259
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
260
260
|
* @returns {Promise<IProductBlock | IError>} - Product block object.
|
|
261
261
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
262
262
|
* @description Getting a product block object by product id.
|
|
@@ -266,7 +266,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
266
266
|
/**
|
|
267
267
|
* Quick search for product page objects with limited output.
|
|
268
268
|
* @handleName searchProduct
|
|
269
|
-
* @param {string} name - Text to search product
|
|
269
|
+
* @param {string} name - Text to search for in product titles (`localizeInfos.title`) in the requested language. Example: "laminat".
|
|
270
270
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
271
271
|
* @returns {Promise<IProductsEntity[] | IProductSearchResult[] | IError>} Array with ProductEntity objects, or an array with short ProductSearchResult cards when the traficLimit config option is enabled
|
|
272
272
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -277,7 +277,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
277
277
|
/**
|
|
278
278
|
* Getting the number of products for the entire catalog.
|
|
279
279
|
* @handleName getProductsCount
|
|
280
|
-
* @param {any[]} body -
|
|
280
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
281
281
|
* @example
|
|
282
282
|
[
|
|
283
283
|
{
|
|
@@ -300,8 +300,8 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
300
300
|
/**
|
|
301
301
|
* Getting the number of products on a catalog page by page ID.
|
|
302
302
|
* @handleName getProductsCountByPageId
|
|
303
|
-
* @param {string} id - Page ID.
|
|
304
|
-
* @param {any[]} body -
|
|
303
|
+
* @param {number | string} id - Page ID. Example: 12345.
|
|
304
|
+
* @param {any[]} [body] - Filter objects with search conditions. Default: `[]`.
|
|
305
305
|
* @example
|
|
306
306
|
[
|
|
307
307
|
{
|
|
@@ -320,12 +320,12 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
320
320
|
* @description This method calculates and returns the number of products available on a given catalog page, identified by its page ID, with optional filtering.
|
|
321
321
|
* @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsCountByPageId getProductsCountByPageId} documentation.
|
|
322
322
|
*/
|
|
323
|
-
getProductsCountByPageId(id: string, body?: any[]): Promise<IProductsCount | IError>;
|
|
323
|
+
getProductsCountByPageId(id: number | string, body?: any[]): Promise<IProductsCount | IError>;
|
|
324
324
|
/**
|
|
325
325
|
* Getting the number of products for the catalog page by page url.
|
|
326
326
|
* @handleName getProductsCountByPageUrl
|
|
327
|
-
* @param {string} url - Page
|
|
328
|
-
* @param {any[]} body -
|
|
327
|
+
* @param {string} url - Page URL.
|
|
328
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
329
329
|
* @example
|
|
330
330
|
[
|
|
331
331
|
{
|
|
@@ -347,10 +347,10 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
347
347
|
/**
|
|
348
348
|
* Semantic (vector) search for products.
|
|
349
349
|
* @handleName getProductsByVectorSearch
|
|
350
|
-
* @param {IVectorSearchProducts} body - Vector search
|
|
350
|
+
* @param {IVectorSearchProducts} body - Vector search parameters. Example: `{ queryText: "red running shoes" }`.
|
|
351
351
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
352
|
-
* @param {number} [offset] -
|
|
353
|
-
* @param {number} [limit] -
|
|
352
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
353
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
354
354
|
* @returns {Promise<IVectorSearchResponse<IProductsResponse> | IError>} Returns an object with an array of found products and total count.
|
|
355
355
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
356
356
|
* @description This method performs a semantic (vector) search for products.
|
|
@@ -359,7 +359,7 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
|
|
|
359
359
|
getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IVectorSearchResponse<IProductsResponse> | IError>;
|
|
360
360
|
/**
|
|
361
361
|
* Get products by page url.
|
|
362
|
-
* @param {string} url - Page
|
|
362
|
+
* @param {string} url - Page URL.
|
|
363
363
|
* @param {any[]} body - Request body.
|
|
364
364
|
* @returns {IProductsEntity[] | IError} Returns an array of products or an error object.
|
|
365
365
|
*/
|
|
@@ -58,7 +58,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
58
58
|
/**
|
|
59
59
|
* Search for all products with pagination and filter.
|
|
60
60
|
* @handleName getProducts
|
|
61
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
61
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
62
62
|
* @example
|
|
63
63
|
[
|
|
64
64
|
{
|
|
@@ -84,7 +84,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
84
84
|
}
|
|
85
85
|
]
|
|
86
86
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
87
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
87
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
88
88
|
* @example
|
|
89
89
|
{
|
|
90
90
|
"limit": 30,
|
|
@@ -93,7 +93,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
93
93
|
"sortKey": "id",
|
|
94
94
|
"signPrice": "orders"
|
|
95
95
|
}
|
|
96
|
-
* @param {string} [userQuery.signPrice] -
|
|
96
|
+
* @param {string} [userQuery.signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time. Example: "orders_storage".
|
|
97
97
|
* @see {@link https://js-sdk.oneentry.cloud/docs/products/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
98
98
|
* @param {string} [userQuery.sortOrder] - Sorting order parameter.
|
|
99
99
|
* @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
|
|
@@ -114,9 +114,9 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
114
114
|
/**
|
|
115
115
|
* Search for all product page objects with pagination (and aggregation) that do not have a category.
|
|
116
116
|
* @handleName getProductsEmptyPage
|
|
117
|
-
* @param {object} [body] - Request body. Default: {}
|
|
117
|
+
* @param {object} [body] - Request body. Default: `{}`.
|
|
118
118
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
119
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
119
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
120
120
|
* @example
|
|
121
121
|
{
|
|
122
122
|
"limit": 30,
|
|
@@ -140,8 +140,8 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
140
140
|
/**
|
|
141
141
|
* Search for all products with pagination for the selected category.
|
|
142
142
|
* @handleName getProductsByPageId
|
|
143
|
-
* @param {number} id - Page
|
|
144
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
143
|
+
* @param {number} id - Page ID. Example: 2492.
|
|
144
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
145
145
|
* @example
|
|
146
146
|
[
|
|
147
147
|
{
|
|
@@ -167,7 +167,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
167
167
|
}
|
|
168
168
|
]
|
|
169
169
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
170
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
170
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
171
171
|
* @example
|
|
172
172
|
{
|
|
173
173
|
"limit": 30,
|
|
@@ -191,9 +191,9 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
191
191
|
/**
|
|
192
192
|
* Search for information about products and prices for the selected category.
|
|
193
193
|
* @handleName getProductsPriceByPageUrl
|
|
194
|
-
* @param {string} [url] - Page
|
|
194
|
+
* @param {string} [url] - Page URL. Example: "23-laminat-floorwood-maxima".
|
|
195
195
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
196
|
-
* @param {IProductsPriceQuery} [userQuery] - Optional
|
|
196
|
+
* @param {IProductsPriceQuery} [userQuery] - Optional query parameters.
|
|
197
197
|
* @example
|
|
198
198
|
{
|
|
199
199
|
"limit": 30,
|
|
@@ -218,8 +218,8 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
218
218
|
/**
|
|
219
219
|
* Search for all products with pagination for the selected category.
|
|
220
220
|
* @handleName getProductsByPageUrl
|
|
221
|
-
* @param {string} url - Page
|
|
222
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
221
|
+
* @param {string} url - Page URL. Example: "catalog".
|
|
222
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
223
223
|
* @example
|
|
224
224
|
[
|
|
225
225
|
{
|
|
@@ -245,7 +245,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
245
245
|
}
|
|
246
246
|
]
|
|
247
247
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
248
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
248
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
249
249
|
* @example
|
|
250
250
|
{
|
|
251
251
|
"limit": 30,
|
|
@@ -270,9 +270,9 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
270
270
|
/**
|
|
271
271
|
* Find all related product page objects.
|
|
272
272
|
* @handleName getRelatedProductsById
|
|
273
|
-
* @param {number} [id] -
|
|
273
|
+
* @param {number} [id] - ID of the product page to find related products for. Example: 12345.
|
|
274
274
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
275
|
-
* @param {IProductsRelatedQuery} [userQuery] - Optional
|
|
275
|
+
* @param {IProductsRelatedQuery} [userQuery] - Optional query parameters.
|
|
276
276
|
* @example
|
|
277
277
|
{
|
|
278
278
|
"limit": 30,
|
|
@@ -283,8 +283,8 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
283
283
|
"statusMarker": "in_stock",
|
|
284
284
|
"templateMarker": "template_12345"
|
|
285
285
|
}
|
|
286
|
-
* @param {number} [userQuery.limit] -
|
|
287
|
-
* @param {number} [userQuery.offset] -
|
|
286
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
287
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
288
288
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
289
289
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
290
290
|
* @param {string} [userQuery.relationMode] - How relations are computed: "global" (default) or "local", which also requires the product `id` itself to satisfy the template condition. Example: "local".
|
|
@@ -303,18 +303,18 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
303
303
|
/**
|
|
304
304
|
* Find products by its ids.
|
|
305
305
|
* @handleName getProductsByIds
|
|
306
|
-
* @param {string} ids -
|
|
307
|
-
* @param {string} [langCode] - Language code. Default "en_US".
|
|
308
|
-
* @param {IProductsByIdsQuery} [userQuery] - Optional
|
|
306
|
+
* @param {string} ids - Comma-separated IDs of the product pages to fetch. Example: "12345,67890".
|
|
307
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
308
|
+
* @param {IProductsByIdsQuery} [userQuery] - Optional query parameters.
|
|
309
309
|
* @example
|
|
310
310
|
{
|
|
311
311
|
"limit": 30,
|
|
312
312
|
"offset": 0,
|
|
313
313
|
"signPrice": "orders"
|
|
314
314
|
}
|
|
315
|
-
* @param {number} [userQuery.limit] -
|
|
316
|
-
* @param {number} [userQuery.offset] -
|
|
317
|
-
* @param {string} [userQuery.signPrice] -
|
|
315
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
316
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
317
|
+
* @param {string} [userQuery.signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
318
318
|
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
319
319
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
320
320
|
* @description Find products by its ids.
|
|
@@ -332,9 +332,9 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
332
332
|
/**
|
|
333
333
|
* Retrieve one product object.
|
|
334
334
|
* @handleName getProductById
|
|
335
|
-
* @param {number} id - Product
|
|
335
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
336
336
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
337
|
-
* @param {boolean} [isNormalized] -
|
|
337
|
+
* @param {boolean} [isNormalized] - When `true`, the product is returned in normalized form.
|
|
338
338
|
* @returns {Promise<IProductsEntity | IError>} ProductEntity object.
|
|
339
339
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
340
340
|
* @description Retrieve one product object.
|
|
@@ -352,7 +352,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
352
352
|
/**
|
|
353
353
|
* Getting a product block object by product id.
|
|
354
354
|
* @handleName getProductBlockById
|
|
355
|
-
* @param {number} id - Product
|
|
355
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
356
356
|
* @returns {Promise<IProductBlock | IError>} - Product block object.
|
|
357
357
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
358
358
|
* @description Getting a product block object by product id.
|
|
@@ -365,7 +365,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
365
365
|
/**
|
|
366
366
|
* Quick search for product page objects with limited output.
|
|
367
367
|
* @handleName searchProduct
|
|
368
|
-
* @param {string} name - Text to search product
|
|
368
|
+
* @param {string} name - Text to search for in product titles (`localizeInfos.title`) in the requested language. Example: "laminat".
|
|
369
369
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
370
370
|
* @returns {Promise<IProductsEntity[] | IProductSearchResult[] | IError>} Array with ProductEntity objects, or an array with short ProductSearchResult cards when the traficLimit config option is enabled
|
|
371
371
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -396,7 +396,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
396
396
|
/**
|
|
397
397
|
* Getting the number of products for the entire catalog.
|
|
398
398
|
* @handleName getProductsCount
|
|
399
|
-
* @param {any[]} body -
|
|
399
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
400
400
|
* @example
|
|
401
401
|
[
|
|
402
402
|
{
|
|
@@ -424,8 +424,8 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
424
424
|
/**
|
|
425
425
|
* Getting the number of products on a catalog page by page ID.
|
|
426
426
|
* @handleName getProductsCountByPageId
|
|
427
|
-
* @param {string} id - Page ID.
|
|
428
|
-
* @param {any[]} body -
|
|
427
|
+
* @param {number | string} id - Page ID. Example: 12345.
|
|
428
|
+
* @param {any[]} [body] - Filter objects with search conditions. Default: `[]`.
|
|
429
429
|
* @example
|
|
430
430
|
[
|
|
431
431
|
{
|
|
@@ -453,8 +453,8 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
453
453
|
/**
|
|
454
454
|
* Getting the number of products for the catalog page by page url.
|
|
455
455
|
* @handleName getProductsCountByPageUrl
|
|
456
|
-
* @param {string} url - Page
|
|
457
|
-
* @param {any[]} body -
|
|
456
|
+
* @param {string} url - Page URL.
|
|
457
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
458
458
|
* @example
|
|
459
459
|
[
|
|
460
460
|
{
|
|
@@ -476,10 +476,10 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
476
476
|
/**
|
|
477
477
|
* Semantic (vector) search for products.
|
|
478
478
|
* @handleName getProductsByVectorSearch
|
|
479
|
-
* @param {IVectorSearchProducts} body - Vector search
|
|
479
|
+
* @param {IVectorSearchProducts} body - Vector search parameters. Example: `{ queryText: "red running shoes" }`.
|
|
480
480
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
481
|
-
* @param {number} [offset] -
|
|
482
|
-
* @param {number} [limit] -
|
|
481
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
482
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
483
483
|
* @returns {Promise<IVectorSearchResponse<IProductsResponse> | IError>} Returns an object with an array of found products and total count.
|
|
484
484
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
485
485
|
* @description This method performs a semantic (vector) search for products.
|
|
@@ -496,7 +496,7 @@ class ProductsApi extends asyncModules_1.default {
|
|
|
496
496
|
}
|
|
497
497
|
/**
|
|
498
498
|
* Get products by page url.
|
|
499
|
-
* @param {string} url - Page
|
|
499
|
+
* @param {string} url - Page URL.
|
|
500
500
|
* @param {any[]} body - Request body.
|
|
501
501
|
* @returns {IProductsEntity[] | IError} Returns an array of products or an error object.
|
|
502
502
|
*/
|