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
|
*/
|
|
@@ -20,7 +20,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
20
20
|
/**
|
|
21
21
|
* Search for all products with pagination and filter.
|
|
22
22
|
* @handleName getProducts
|
|
23
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
23
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
24
24
|
* @example
|
|
25
25
|
[
|
|
26
26
|
{
|
|
@@ -46,7 +46,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
46
46
|
}
|
|
47
47
|
]
|
|
48
48
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
49
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
50
50
|
* @example
|
|
51
51
|
{
|
|
52
52
|
"limit": 30,
|
|
@@ -55,7 +55,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
55
55
|
"sortKey": "id",
|
|
56
56
|
"signPrice": "orders"
|
|
57
57
|
}
|
|
58
|
-
* @param {string} [userQuery.signPrice] -
|
|
58
|
+
* @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".
|
|
59
59
|
* @see {@link https://js-sdk.oneentry.cloud/docs/products/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
60
60
|
* @param {string} [userQuery.sortOrder] - Sorting order parameter.
|
|
61
61
|
* @returns {Promise<IProductsResponse | IError>} Products response, or IError when isShell=true
|
|
@@ -76,9 +76,9 @@ export default class ProductsApi extends AsyncModules {
|
|
|
76
76
|
/**
|
|
77
77
|
* Search for all product page objects with pagination (and aggregation) that do not have a category.
|
|
78
78
|
* @handleName getProductsEmptyPage
|
|
79
|
-
* @param {object} [body] - Request body. Default: {}
|
|
79
|
+
* @param {object} [body] - Request body. Default: `{}`.
|
|
80
80
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
81
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
81
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
82
82
|
* @example
|
|
83
83
|
{
|
|
84
84
|
"limit": 30,
|
|
@@ -102,8 +102,8 @@ export default class ProductsApi extends AsyncModules {
|
|
|
102
102
|
/**
|
|
103
103
|
* Search for all products with pagination for the selected category.
|
|
104
104
|
* @handleName getProductsByPageId
|
|
105
|
-
* @param {number} id - Page
|
|
106
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
105
|
+
* @param {number} id - Page ID. Example: 2492.
|
|
106
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
107
107
|
* @example
|
|
108
108
|
[
|
|
109
109
|
{
|
|
@@ -129,7 +129,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
129
129
|
}
|
|
130
130
|
]
|
|
131
131
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
132
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
132
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
133
133
|
* @example
|
|
134
134
|
{
|
|
135
135
|
"limit": 30,
|
|
@@ -153,9 +153,9 @@ export default class ProductsApi extends AsyncModules {
|
|
|
153
153
|
/**
|
|
154
154
|
* Search for information about products and prices for the selected category.
|
|
155
155
|
* @handleName getProductsPriceByPageUrl
|
|
156
|
-
* @param {string} [url] - Page
|
|
156
|
+
* @param {string} [url] - Page URL. Example: "23-laminat-floorwood-maxima".
|
|
157
157
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
158
|
-
* @param {IProductsPriceQuery} [userQuery] - Optional
|
|
158
|
+
* @param {IProductsPriceQuery} [userQuery] - Optional query parameters.
|
|
159
159
|
* @example
|
|
160
160
|
{
|
|
161
161
|
"limit": 30,
|
|
@@ -180,8 +180,8 @@ export default class ProductsApi extends AsyncModules {
|
|
|
180
180
|
/**
|
|
181
181
|
* Search for all products with pagination for the selected category.
|
|
182
182
|
* @handleName getProductsByPageUrl
|
|
183
|
-
* @param {string} url - Page
|
|
184
|
-
* @param {IFilterParams[]} [body] - Request body. Default: []
|
|
183
|
+
* @param {string} url - Page URL. Example: "catalog".
|
|
184
|
+
* @param {IFilterParams[]} [body] - Request body. Default: `[]`.
|
|
185
185
|
* @example
|
|
186
186
|
[
|
|
187
187
|
{
|
|
@@ -207,7 +207,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
207
207
|
}
|
|
208
208
|
]
|
|
209
209
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
210
|
-
* @param {IProductsQueryBase} [userQuery] - Optional
|
|
210
|
+
* @param {IProductsQueryBase} [userQuery] - Optional query parameters.
|
|
211
211
|
* @example
|
|
212
212
|
{
|
|
213
213
|
"limit": 30,
|
|
@@ -232,9 +232,9 @@ export default class ProductsApi extends AsyncModules {
|
|
|
232
232
|
/**
|
|
233
233
|
* Find all related product page objects.
|
|
234
234
|
* @handleName getRelatedProductsById
|
|
235
|
-
* @param {number} [id] -
|
|
235
|
+
* @param {number} [id] - ID of the product page to find related products for. Example: 12345.
|
|
236
236
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
237
|
-
* @param {IProductsRelatedQuery} [userQuery] - Optional
|
|
237
|
+
* @param {IProductsRelatedQuery} [userQuery] - Optional query parameters.
|
|
238
238
|
* @example
|
|
239
239
|
{
|
|
240
240
|
"limit": 30,
|
|
@@ -245,8 +245,8 @@ export default class ProductsApi extends AsyncModules {
|
|
|
245
245
|
"statusMarker": "in_stock",
|
|
246
246
|
"templateMarker": "template_12345"
|
|
247
247
|
}
|
|
248
|
-
* @param {number} [userQuery.limit] -
|
|
249
|
-
* @param {number} [userQuery.offset] -
|
|
248
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
249
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
250
250
|
* @param {string} [userQuery.sortOrder] - Optional sorting order "DESC" | "ASC". Example: "DESC".
|
|
251
251
|
* @param {string} [userQuery.sortKey] - Optional field to sort by ("id", "title", "date", "price", "position", "status"). Example: "id".
|
|
252
252
|
* @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".
|
|
@@ -265,18 +265,18 @@ export default class ProductsApi extends AsyncModules {
|
|
|
265
265
|
/**
|
|
266
266
|
* Find products by its ids.
|
|
267
267
|
* @handleName getProductsByIds
|
|
268
|
-
* @param {string} ids -
|
|
269
|
-
* @param {string} [langCode] - Language code. Default "en_US".
|
|
270
|
-
* @param {IProductsByIdsQuery} [userQuery] - Optional
|
|
268
|
+
* @param {string} ids - Comma-separated IDs of the product pages to fetch. Example: "12345,67890".
|
|
269
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
270
|
+
* @param {IProductsByIdsQuery} [userQuery] - Optional query parameters.
|
|
271
271
|
* @example
|
|
272
272
|
{
|
|
273
273
|
"limit": 30,
|
|
274
274
|
"offset": 0,
|
|
275
275
|
"signPrice": "orders"
|
|
276
276
|
}
|
|
277
|
-
* @param {number} [userQuery.limit] -
|
|
278
|
-
* @param {number} [userQuery.offset] -
|
|
279
|
-
* @param {string} [userQuery.signPrice] -
|
|
277
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
278
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
279
|
+
* @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.
|
|
280
280
|
* @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects
|
|
281
281
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
282
282
|
* @description Find products by its ids.
|
|
@@ -294,9 +294,9 @@ export default class ProductsApi extends AsyncModules {
|
|
|
294
294
|
/**
|
|
295
295
|
* Retrieve one product object.
|
|
296
296
|
* @handleName getProductById
|
|
297
|
-
* @param {number} id - Product
|
|
297
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
298
298
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
299
|
-
* @param {boolean} [isNormalized] -
|
|
299
|
+
* @param {boolean} [isNormalized] - When `true`, the product is returned in normalized form.
|
|
300
300
|
* @returns {Promise<IProductsEntity | IError>} ProductEntity object.
|
|
301
301
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
302
302
|
* @description Retrieve one product object.
|
|
@@ -314,7 +314,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
314
314
|
/**
|
|
315
315
|
* Getting a product block object by product id.
|
|
316
316
|
* @handleName getProductBlockById
|
|
317
|
-
* @param {number} id - Product
|
|
317
|
+
* @param {number} id - Product ID. Example: 12345.
|
|
318
318
|
* @returns {Promise<IProductBlock | IError>} - Product block object.
|
|
319
319
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
320
320
|
* @description Getting a product block object by product id.
|
|
@@ -327,7 +327,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
327
327
|
/**
|
|
328
328
|
* Quick search for product page objects with limited output.
|
|
329
329
|
* @handleName searchProduct
|
|
330
|
-
* @param {string} name - Text to search product
|
|
330
|
+
* @param {string} name - Text to search for in product titles (`localizeInfos.title`) in the requested language. Example: "laminat".
|
|
331
331
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
332
332
|
* @returns {Promise<IProductsEntity[] | IProductSearchResult[] | IError>} Array with ProductEntity objects, or an array with short ProductSearchResult cards when the traficLimit config option is enabled
|
|
333
333
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -358,7 +358,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
358
358
|
/**
|
|
359
359
|
* Getting the number of products for the entire catalog.
|
|
360
360
|
* @handleName getProductsCount
|
|
361
|
-
* @param {any[]} body -
|
|
361
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
362
362
|
* @example
|
|
363
363
|
[
|
|
364
364
|
{
|
|
@@ -386,8 +386,8 @@ export default class ProductsApi extends AsyncModules {
|
|
|
386
386
|
/**
|
|
387
387
|
* Getting the number of products on a catalog page by page ID.
|
|
388
388
|
* @handleName getProductsCountByPageId
|
|
389
|
-
* @param {string} id - Page ID.
|
|
390
|
-
* @param {any[]} body -
|
|
389
|
+
* @param {number | string} id - Page ID. Example: 12345.
|
|
390
|
+
* @param {any[]} [body] - Filter objects with search conditions. Default: `[]`.
|
|
391
391
|
* @example
|
|
392
392
|
[
|
|
393
393
|
{
|
|
@@ -415,8 +415,8 @@ export default class ProductsApi extends AsyncModules {
|
|
|
415
415
|
/**
|
|
416
416
|
* Getting the number of products for the catalog page by page url.
|
|
417
417
|
* @handleName getProductsCountByPageUrl
|
|
418
|
-
* @param {string} url - Page
|
|
419
|
-
* @param {any[]} body -
|
|
418
|
+
* @param {string} url - Page URL.
|
|
419
|
+
* @param {any[]} body - Filter objects with search conditions. Default: `[]`.
|
|
420
420
|
* @example
|
|
421
421
|
[
|
|
422
422
|
{
|
|
@@ -438,10 +438,10 @@ export default class ProductsApi extends AsyncModules {
|
|
|
438
438
|
/**
|
|
439
439
|
* Semantic (vector) search for products.
|
|
440
440
|
* @handleName getProductsByVectorSearch
|
|
441
|
-
* @param {IVectorSearchProducts} body - Vector search
|
|
441
|
+
* @param {IVectorSearchProducts} body - Vector search parameters. Example: `{ queryText: "red running shoes" }`.
|
|
442
442
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
443
|
-
* @param {number} [offset] -
|
|
444
|
-
* @param {number} [limit] -
|
|
443
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
444
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
445
445
|
* @returns {Promise<IVectorSearchResponse<IProductsResponse> | IError>} Returns an object with an array of found products and total count.
|
|
446
446
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
447
447
|
* @description This method performs a semantic (vector) search for products.
|
|
@@ -458,7 +458,7 @@ export default class ProductsApi extends AsyncModules {
|
|
|
458
458
|
}
|
|
459
459
|
/**
|
|
460
460
|
* Get products by page url.
|
|
461
|
-
* @param {string} url - Page
|
|
461
|
+
* @param {string} url - Page URL.
|
|
462
462
|
* @param {any[]} body - Request body.
|
|
463
463
|
* @returns {IProductsEntity[] | IError} Returns an array of products or an error object.
|
|
464
464
|
*/
|