oneentry 1.0.172 → 1.0.174
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 +48 -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 +31 -31
- package/dist/auth-provider/authProviderApi.js +31 -31
- package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -54
- 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 +4 -4
- 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 +16 -16
- package/dist/file-uploading/fileUploadingApi.js +14 -17
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- 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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/dist/integration-collections/integrationCollectionsApi.js +24 -28
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- 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 +101 -101
- 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 +100 -100
- 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/system/systemApi.d.ts +4 -4
- package/dist/system/systemApi.js +2 -2
- package/dist/system/systemInterfaces.d.ts +11 -5
- package/dist/templates/templatesApi.d.ts +5 -5
- package/dist/templates/templatesApi.js +5 -5
- package/dist/templates/templatesInterfaces.d.ts +13 -13
- 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 +7 -7
- package/dist/users/usersApi.js +7 -7
- package/dist/users/usersInterfaces.d.ts +34 -34
- 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 +31 -31
- package/esm/auth-provider/authProviderApi.js +31 -31
- package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -54
- 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 +4 -4
- 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 +16 -16
- package/esm/file-uploading/fileUploadingApi.js +14 -17
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- 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/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/esm/integration-collections/integrationCollectionsApi.js +24 -28
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- 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 +101 -101
- 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 +100 -100
- 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/system/systemApi.d.ts +4 -4
- package/esm/system/systemApi.js +2 -2
- package/esm/system/systemInterfaces.d.ts +11 -5
- package/esm/templates/templatesApi.d.ts +5 -5
- package/esm/templates/templatesApi.js +5 -5
- package/esm/templates/templatesInterfaces.d.ts +13 -13
- 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 +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
package/esm/base/asyncModules.js
CHANGED
|
@@ -133,7 +133,7 @@ export default class AsyncModules extends SyncModules {
|
|
|
133
133
|
*
|
|
134
134
|
* With `isShell` disabled browserResponse throws, and the error is thrown on
|
|
135
135
|
* from here too: returning it would break the `@throws` contract every caller
|
|
136
|
-
* documents, and a `try/catch` around the call would never fire
|
|
136
|
+
* documents, and a `try/catch` around the call would never fire.
|
|
137
137
|
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
138
138
|
* @returns {Promise<boolean | IError>} `true` on success, IError on failure when isShell=true.
|
|
139
139
|
* @throws {IError} When isShell=false and the request fails.
|
|
@@ -296,7 +296,7 @@ export default class AsyncModules extends SyncModules {
|
|
|
296
296
|
* so both the success and the error branches handle empty bodies the same way.
|
|
297
297
|
*
|
|
298
298
|
* A body that is present but is not JSON — a gateway's HTML page in front of a
|
|
299
|
-
* 502, the platform's own admin page
|
|
299
|
+
* 502, the platform's own admin page — used to collapse into `{}`,
|
|
300
300
|
* which carries no `statusCode` and therefore does not read as an error at all:
|
|
301
301
|
* a failed request came back looking like an empty success. It is described
|
|
302
302
|
* instead, keeping the status the server actually sent.
|
|
@@ -420,8 +420,8 @@ export default class AsyncModules extends SyncModules {
|
|
|
420
420
|
* Describes a response whose body is not the JSON the API is supposed to send.
|
|
421
421
|
*
|
|
422
422
|
* The platform has been seen answering `200 OK` with `content-type: text/html`
|
|
423
|
-
* and the admin page as the body — every content endpoint at once, for minutes
|
|
424
|
-
*
|
|
423
|
+
* and the admin page as the body — every content endpoint at once, for minutes.
|
|
424
|
+
* A successful status carrying someone else's body is indistinguishable
|
|
425
425
|
* from a real answer by status alone, and the only symptom used to be
|
|
426
426
|
* `SyntaxError: Unexpected token '<'` from the JSON parser: a message about the
|
|
427
427
|
* SDK's own parsing rather than about what the platform did. Callers read that as
|
|
@@ -456,9 +456,9 @@ export default class AsyncModules extends SyncModules {
|
|
|
456
456
|
* With `isShell` on, a failure is returned rather than thrown — and a dropped
|
|
457
457
|
* connection throws a `TypeError`, whose `message` and `stack` are not
|
|
458
458
|
* enumerable. Returned as it was, it serializes to `{}` and reads exactly
|
|
459
|
-
* like an empty answer:
|
|
459
|
+
* like an empty answer: such a value has entered a site's
|
|
460
460
|
* page cache and was served for minutes after the link came back, and
|
|
461
|
-
* `next build` baked a site of 404s while reporting success
|
|
461
|
+
* `next build` baked a site of 404s while reporting success.
|
|
462
462
|
*
|
|
463
463
|
* An object that already carries a `statusCode` is the platform's own error
|
|
464
464
|
* and is passed through untouched. Everything else becomes
|
|
@@ -88,7 +88,7 @@ export default abstract class SyncModules {
|
|
|
88
88
|
* calls, a shared default. Normalizing in place sends the already-wrapped
|
|
89
89
|
* value the second time, it is wrapped again, and the platform answers
|
|
90
90
|
* `400 "formData.en_US[0].marker" is required` about a field the caller
|
|
91
|
-
* never sent
|
|
91
|
+
* never sent.
|
|
92
92
|
* @param {any} body - The body to normalize. Left unchanged.
|
|
93
93
|
* @param {string} [langCode] - The language code for normalization.
|
|
94
94
|
* @returns {any} A normalized copy of the body.
|
package/esm/base/syncModules.js
CHANGED
|
@@ -225,7 +225,7 @@ export default class SyncModules {
|
|
|
225
225
|
* calls, a shared default. Normalizing in place sends the already-wrapped
|
|
226
226
|
* value the second time, it is wrapped again, and the platform answers
|
|
227
227
|
* `400 "formData.en_US[0].marker" is required` about a field the caller
|
|
228
|
-
* never sent
|
|
228
|
+
* never sent.
|
|
229
229
|
* @param {any} body - The body to normalize. Left unchanged.
|
|
230
230
|
* @param {string} [langCode] - The language code for normalization.
|
|
231
231
|
* @returns {any} A normalized copy of the body.
|
package/esm/base/utils.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* @property {string} [guestId] - Guest identifier sent as the `x-guest-id` header on unauthenticated requests. Lets cart/wishlist/activity endpoints work for a guest. In the browser a stable id is auto-generated (localStorage) when omitted; on the server pass a per-visitor id. Can also be set later via `setGuestId`.
|
|
5
5
|
* @property {string} [deviceMetadata] - Device-metadata string sent as the `x-device-metadata` header on POST requests and token refresh, overriding the environment-derived fingerprint. The API binds refresh tokens to this header, so server-side flows that issue tokens on behalf of a browser (e.g. an OAuth code exchange) must pass the browser's string here — otherwise the token is bound to the server's fingerprint and cannot be refreshed from the browser. Obtain the string in the browser via `getDeviceMetadata()`. Can also be set later via `setDeviceMetadata`.
|
|
6
6
|
* @property {string} [langCode] - specify the default language to avoid specifying it in every request.
|
|
7
|
-
* @property {boolean} [traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set
|
|
7
|
+
* @property {boolean} [traficLimit] - Some methods use multiple queries to make it easier to work with the API. Set it to `true` to save traffic and decide for yourself what data you need: the SDK then skips its follow-up requests (full pages behind quick search results, products of page blocks), and some results change shape — e.g. `searchPage` returns short `{ id, title }` cards. Default: false.
|
|
8
8
|
* @property {boolean} [rawData] - Set to true to keep an attribute's nested `additionalFields` as the
|
|
9
9
|
* array the API sends, instead of the marker-keyed map the SDK builds by default. It turns off only that
|
|
10
10
|
* transformation — locale unwrapping, sorting by `position`, single-file unwrapping and number casting
|
|
@@ -431,7 +431,7 @@ interface IHttpHeaders {
|
|
|
431
431
|
* @interface IHttpOptions
|
|
432
432
|
* @property {string} method - HTTP method
|
|
433
433
|
* @property {IHttpHeaders} headers - HTTP headers
|
|
434
|
-
* @property {string | FormData | Blob} [body] - Request body
|
|
434
|
+
* @property {string | FormData | Blob} [body] - Request body.
|
|
435
435
|
* @description Interface for HTTP request options
|
|
436
436
|
*/
|
|
437
437
|
interface IHttpOptions {
|
|
@@ -443,8 +443,8 @@ interface IHttpOptions {
|
|
|
443
443
|
* Response of a semantic (vector) search: the module's own list container plus `indexReady`.
|
|
444
444
|
* @typedef {object} IVectorSearchResponse
|
|
445
445
|
* @template T
|
|
446
|
-
* @property {boolean} indexReady - `false` when no vectors are built yet for this entity and language: the query was not embedded,
|
|
447
|
-
* @description Every `…/vector/search` endpoint answers with `indexReady` next to its list
|
|
446
|
+
* @property {boolean} indexReady - `false` when no vectors are built yet for this entity and language: the query was not embedded, so empty `items` do not mean that nothing matched. `true` means the result comes from a real search.
|
|
447
|
+
* @description Every `…/vector/search` endpoint answers with `indexReady` next to its list.
|
|
448
448
|
*/
|
|
449
449
|
type IVectorSearchResponse<T> = T & {
|
|
450
450
|
indexReady: boolean;
|
|
@@ -23,8 +23,8 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
23
23
|
* @handleName getBlocks
|
|
24
24
|
* @param {BlockType} [type] - Optional block type to filter by. Available values: "product" | "error_page" | "catalog_page" | "product_preview" | "similar_products_block" | "product_block" | "frequently_ordered_block" | "trending_block" | "recently_viewed_block" | "repeat_purchase_block" | "slider_block" | "personal_recommendations_block" | "cart_complement_block" | "cart_similar_block" | "wishlist_similar_block" | "form" | "common_page" | "common_block" | "order" | "service" | "external_page" | "discount" (see BlockType). When omitted, blocks of all types are returned. Example: 'product'.
|
|
25
25
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
26
|
-
* @param {number} [offset] -
|
|
27
|
-
* @param {number} [limit] -
|
|
26
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
27
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
28
28
|
* @returns {Promise<IBlocksResponse | IError>} Returns BlocksEntity object.
|
|
29
29
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
30
30
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getBlocks getBlocks} documentation.
|
|
@@ -33,10 +33,10 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
33
33
|
/**
|
|
34
34
|
* Get block by marker.
|
|
35
35
|
* @handleName getBlockByMarker
|
|
36
|
-
* @param {string} marker - Marker of
|
|
36
|
+
* @param {string} marker - Marker of the block. Example: "product_block".
|
|
37
37
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
38
|
-
* @param {number} [offset] -
|
|
39
|
-
* @param {number} [limit] -
|
|
38
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
39
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
40
40
|
* @returns {Promise<IBlockEntity | IError>} - Returns a BlockEntity object.
|
|
41
41
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
42
42
|
* @description This method retrieves a block by its marker and includes additional information such as similar products or products associated with the block.
|
|
@@ -64,9 +64,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
64
64
|
* @handleName getSimilarProducts
|
|
65
65
|
* @param {string} marker - Block identifier. Example: "similar_products_block".
|
|
66
66
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
67
|
-
* @param {number} [offset] -
|
|
68
|
-
* @param {number} [limit] -
|
|
69
|
-
* @param {string} [signPrice] -
|
|
67
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
68
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
69
|
+
* @param {string} [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.
|
|
70
70
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
71
71
|
* @param {number} [productId] - Optional product id to find similar products for.
|
|
72
72
|
* @returns {Promise<IProductsResponse | IError>} Returns the total count and an array of product items in object by specified block marker.
|
|
@@ -79,9 +79,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
79
79
|
* @handleName getProductsByBlockMarker
|
|
80
80
|
* @param {string} marker - Block identifier. Example: "product_block".
|
|
81
81
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
82
|
-
* @param {number} [offset] -
|
|
83
|
-
* @param {number} [limit] -
|
|
84
|
-
* @param {string} [signPrice] -
|
|
82
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
83
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
84
|
+
* @param {string} [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.
|
|
85
85
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
86
86
|
* @returns {Promise<IProductsEntity[] | IError>} Return array of BlocksEntity object.
|
|
87
87
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -91,10 +91,10 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
91
91
|
/**
|
|
92
92
|
* Get frequently ordered products by block marker and product id.
|
|
93
93
|
* @handleName getFrequentlyOrderedProducts
|
|
94
|
-
* @param {number} productId - Product
|
|
95
|
-
* @param {string} marker -
|
|
94
|
+
* @param {number} productId - Product ID. Example: 1.
|
|
95
|
+
* @param {string} marker - Marker of the block. Example: "frequently_ordered_block".
|
|
96
96
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
97
|
-
* @param {string} [signPrice] -
|
|
97
|
+
* @param {string} [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.
|
|
98
98
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
99
99
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
100
100
|
* @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
|
|
@@ -115,9 +115,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
115
115
|
/**
|
|
116
116
|
* Get "complete your cart" products by the cart from context (auth user or guest).
|
|
117
117
|
* @handleName getCartComplement
|
|
118
|
-
* @param {string} marker -
|
|
118
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
119
119
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
120
|
-
* @param {string} [signPrice] -
|
|
120
|
+
* @param {string} [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.
|
|
121
121
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
122
122
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
123
123
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -128,8 +128,8 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
128
128
|
/**
|
|
129
129
|
* Get "complete your cart" products by an explicit list of productIds (POST body).
|
|
130
130
|
* @handleName getCartComplementByProductIds
|
|
131
|
-
* @param {string} marker -
|
|
132
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
131
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
132
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
133
133
|
* @example
|
|
134
134
|
{
|
|
135
135
|
"productIds": [1, 2],
|
|
@@ -143,9 +143,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
143
143
|
/**
|
|
144
144
|
* Get "similar to cart" products by the cart from context (auth user or guest).
|
|
145
145
|
* @handleName getCartSimilar
|
|
146
|
-
* @param {string} marker -
|
|
146
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
147
147
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
148
|
-
* @param {string} [signPrice] -
|
|
148
|
+
* @param {string} [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.
|
|
149
149
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
150
150
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
151
151
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -156,8 +156,8 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
156
156
|
/**
|
|
157
157
|
* Get "similar to cart" products by an explicit list of productIds (POST body).
|
|
158
158
|
* @handleName getCartSimilarByProductIds
|
|
159
|
-
* @param {string} marker -
|
|
160
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
159
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
160
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
161
161
|
* @example
|
|
162
162
|
{
|
|
163
163
|
"productIds": [1, 2],
|
|
@@ -171,9 +171,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
171
171
|
/**
|
|
172
172
|
* Get personal recommendations for the user.
|
|
173
173
|
* @handleName getPersonalRecommendations
|
|
174
|
-
* @param {string} marker -
|
|
174
|
+
* @param {string} marker - Marker of the block. Example: "personal_recommendations_block".
|
|
175
175
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
176
|
-
* @param {string} [signPrice] -
|
|
176
|
+
* @param {string} [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.
|
|
177
177
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
178
178
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
179
179
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -184,9 +184,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
184
184
|
/**
|
|
185
185
|
* Get recently viewed products.
|
|
186
186
|
* @handleName getRecentlyViewed
|
|
187
|
-
* @param {string} marker -
|
|
187
|
+
* @param {string} marker - Marker of the block. Example: "recently_viewed_block".
|
|
188
188
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
189
|
-
* @param {string} [signPrice] -
|
|
189
|
+
* @param {string} [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.
|
|
190
190
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
191
191
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
192
192
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -197,9 +197,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
197
197
|
/**
|
|
198
198
|
* Get products for repeat purchase.
|
|
199
199
|
* @handleName getRepeatPurchase
|
|
200
|
-
* @param {string} marker -
|
|
200
|
+
* @param {string} marker - Marker of the block. Example: "repeat_purchase_block".
|
|
201
201
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
202
|
-
* @param {string} [signPrice] -
|
|
202
|
+
* @param {string} [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.
|
|
203
203
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
204
204
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
205
205
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -210,7 +210,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
210
210
|
/**
|
|
211
211
|
* Get the block's slides tree as a flat pre-order array (slider_block only).
|
|
212
212
|
* @handleName getSlides
|
|
213
|
-
* @param {string} marker -
|
|
213
|
+
* @param {string} marker - Marker of the block. Example: "slider_block".
|
|
214
214
|
* @returns {Promise<IBlockSlidesResponse | IError>} Returns the slides response.
|
|
215
215
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
216
216
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getSlides getSlides} documentation.
|
|
@@ -219,9 +219,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
219
219
|
/**
|
|
220
220
|
* Get trending products of the block.
|
|
221
221
|
* @handleName getTrending
|
|
222
|
-
* @param {string} marker -
|
|
222
|
+
* @param {string} marker - Marker of the block. Example: "trending_block".
|
|
223
223
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
224
|
-
* @param {string} [signPrice] -
|
|
224
|
+
* @param {string} [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.
|
|
225
225
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
226
226
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
227
227
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -232,9 +232,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
232
232
|
/**
|
|
233
233
|
* Get "similar to wishlist" products by the wishlist from context (auth user or guest).
|
|
234
234
|
* @handleName getWishlistSimilar
|
|
235
|
-
* @param {string} marker -
|
|
235
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
236
236
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
237
|
-
* @param {string} [signPrice] -
|
|
237
|
+
* @param {string} [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
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
239
239
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
240
240
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -245,8 +245,8 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
245
245
|
/**
|
|
246
246
|
* Get "similar to wishlist" products by an explicit list of productIds (POST body).
|
|
247
247
|
* @handleName getWishlistSimilarByProductIds
|
|
248
|
-
* @param {string} marker -
|
|
249
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
248
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
249
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
250
250
|
* @example
|
|
251
251
|
{
|
|
252
252
|
"productIds": [1, 2],
|
package/esm/blocks/blocksApi.js
CHANGED
|
@@ -24,8 +24,8 @@ export default class BlocksApi extends AsyncModules {
|
|
|
24
24
|
* @handleName getBlocks
|
|
25
25
|
* @param {BlockType} [type] - Optional block type to filter by. Available values: "product" | "error_page" | "catalog_page" | "product_preview" | "similar_products_block" | "product_block" | "frequently_ordered_block" | "trending_block" | "recently_viewed_block" | "repeat_purchase_block" | "slider_block" | "personal_recommendations_block" | "cart_complement_block" | "cart_similar_block" | "wishlist_similar_block" | "form" | "common_page" | "common_block" | "order" | "service" | "external_page" | "discount" (see BlockType). When omitted, blocks of all types are returned. Example: 'product'.
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
-
* @param {number} [offset] -
|
|
28
|
-
* @param {number} [limit] -
|
|
27
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
28
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
29
29
|
* @returns {Promise<IBlocksResponse | IError>} Returns BlocksEntity object.
|
|
30
30
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
31
31
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getBlocks getBlocks} documentation.
|
|
@@ -52,10 +52,10 @@ export default class BlocksApi extends AsyncModules {
|
|
|
52
52
|
/**
|
|
53
53
|
* Get block by marker.
|
|
54
54
|
* @handleName getBlockByMarker
|
|
55
|
-
* @param {string} marker - Marker of
|
|
55
|
+
* @param {string} marker - Marker of the block. Example: "product_block".
|
|
56
56
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
57
|
-
* @param {number} [offset] -
|
|
58
|
-
* @param {number} [limit] -
|
|
57
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
58
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
59
59
|
* @returns {Promise<IBlockEntity | IError>} - Returns a BlockEntity object.
|
|
60
60
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
61
61
|
* @description This method retrieves a block by its marker and includes additional information such as similar products or products associated with the block.
|
|
@@ -129,9 +129,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
129
129
|
* @handleName getSimilarProducts
|
|
130
130
|
* @param {string} marker - Block identifier. Example: "similar_products_block".
|
|
131
131
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
132
|
-
* @param {number} [offset] -
|
|
133
|
-
* @param {number} [limit] -
|
|
134
|
-
* @param {string} [signPrice] -
|
|
132
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
133
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
134
|
+
* @param {string} [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.
|
|
135
135
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
136
136
|
* @param {number} [productId] - Optional product id to find similar products for.
|
|
137
137
|
* @returns {Promise<IProductsResponse | IError>} Returns the total count and an array of product items in object by specified block marker.
|
|
@@ -154,9 +154,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
154
154
|
* @handleName getProductsByBlockMarker
|
|
155
155
|
* @param {string} marker - Block identifier. Example: "product_block".
|
|
156
156
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
157
|
-
* @param {number} [offset] -
|
|
158
|
-
* @param {number} [limit] -
|
|
159
|
-
* @param {string} [signPrice] -
|
|
157
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
158
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
159
|
+
* @param {string} [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.
|
|
160
160
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
161
161
|
* @returns {Promise<IProductsEntity[] | IError>} Return array of BlocksEntity object.
|
|
162
162
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -180,10 +180,10 @@ export default class BlocksApi extends AsyncModules {
|
|
|
180
180
|
/**
|
|
181
181
|
* Get frequently ordered products by block marker and product id.
|
|
182
182
|
* @handleName getFrequentlyOrderedProducts
|
|
183
|
-
* @param {number} productId - Product
|
|
184
|
-
* @param {string} marker -
|
|
183
|
+
* @param {number} productId - Product ID. Example: 1.
|
|
184
|
+
* @param {string} marker - Marker of the block. Example: "frequently_ordered_block".
|
|
185
185
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
186
|
-
* @param {string} [signPrice] -
|
|
186
|
+
* @param {string} [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.
|
|
187
187
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
188
188
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
189
189
|
* @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
|
|
@@ -218,9 +218,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
218
218
|
/**
|
|
219
219
|
* Get "complete your cart" products by the cart from context (auth user or guest).
|
|
220
220
|
* @handleName getCartComplement
|
|
221
|
-
* @param {string} marker -
|
|
221
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
222
222
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
223
|
-
* @param {string} [signPrice] -
|
|
223
|
+
* @param {string} [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.
|
|
224
224
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
225
225
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
226
226
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -235,8 +235,8 @@ export default class BlocksApi extends AsyncModules {
|
|
|
235
235
|
/**
|
|
236
236
|
* Get "complete your cart" products by an explicit list of productIds (POST body).
|
|
237
237
|
* @handleName getCartComplementByProductIds
|
|
238
|
-
* @param {string} marker -
|
|
239
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
238
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
239
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
240
240
|
* @example
|
|
241
241
|
{
|
|
242
242
|
"productIds": [1, 2],
|
|
@@ -253,9 +253,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
253
253
|
/**
|
|
254
254
|
* Get "similar to cart" products by the cart from context (auth user or guest).
|
|
255
255
|
* @handleName getCartSimilar
|
|
256
|
-
* @param {string} marker -
|
|
256
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
257
257
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
258
|
-
* @param {string} [signPrice] -
|
|
258
|
+
* @param {string} [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.
|
|
259
259
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
260
260
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
261
261
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -270,8 +270,8 @@ export default class BlocksApi extends AsyncModules {
|
|
|
270
270
|
/**
|
|
271
271
|
* Get "similar to cart" products by an explicit list of productIds (POST body).
|
|
272
272
|
* @handleName getCartSimilarByProductIds
|
|
273
|
-
* @param {string} marker -
|
|
274
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
273
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
274
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
275
275
|
* @example
|
|
276
276
|
{
|
|
277
277
|
"productIds": [1, 2],
|
|
@@ -288,9 +288,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
288
288
|
/**
|
|
289
289
|
* Get personal recommendations for the user.
|
|
290
290
|
* @handleName getPersonalRecommendations
|
|
291
|
-
* @param {string} marker -
|
|
291
|
+
* @param {string} marker - Marker of the block. Example: "personal_recommendations_block".
|
|
292
292
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
293
|
-
* @param {string} [signPrice] -
|
|
293
|
+
* @param {string} [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.
|
|
294
294
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
295
295
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
296
296
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -305,9 +305,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
305
305
|
/**
|
|
306
306
|
* Get recently viewed products.
|
|
307
307
|
* @handleName getRecentlyViewed
|
|
308
|
-
* @param {string} marker -
|
|
308
|
+
* @param {string} marker - Marker of the block. Example: "recently_viewed_block".
|
|
309
309
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
310
|
-
* @param {string} [signPrice] -
|
|
310
|
+
* @param {string} [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.
|
|
311
311
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
312
312
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
313
313
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -322,9 +322,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
322
322
|
/**
|
|
323
323
|
* Get products for repeat purchase.
|
|
324
324
|
* @handleName getRepeatPurchase
|
|
325
|
-
* @param {string} marker -
|
|
325
|
+
* @param {string} marker - Marker of the block. Example: "repeat_purchase_block".
|
|
326
326
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
327
|
-
* @param {string} [signPrice] -
|
|
327
|
+
* @param {string} [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.
|
|
328
328
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
329
329
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
330
330
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -339,7 +339,7 @@ export default class BlocksApi extends AsyncModules {
|
|
|
339
339
|
/**
|
|
340
340
|
* Get the block's slides tree as a flat pre-order array (slider_block only).
|
|
341
341
|
* @handleName getSlides
|
|
342
|
-
* @param {string} marker -
|
|
342
|
+
* @param {string} marker - Marker of the block. Example: "slider_block".
|
|
343
343
|
* @returns {Promise<IBlockSlidesResponse | IError>} Returns the slides response.
|
|
344
344
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
345
345
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getSlides getSlides} documentation.
|
|
@@ -351,9 +351,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
351
351
|
/**
|
|
352
352
|
* Get trending products of the block.
|
|
353
353
|
* @handleName getTrending
|
|
354
|
-
* @param {string} marker -
|
|
354
|
+
* @param {string} marker - Marker of the block. Example: "trending_block".
|
|
355
355
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
356
|
-
* @param {string} [signPrice] -
|
|
356
|
+
* @param {string} [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.
|
|
357
357
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
358
358
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
359
359
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -368,9 +368,9 @@ export default class BlocksApi extends AsyncModules {
|
|
|
368
368
|
/**
|
|
369
369
|
* Get "similar to wishlist" products by the wishlist from context (auth user or guest).
|
|
370
370
|
* @handleName getWishlistSimilar
|
|
371
|
-
* @param {string} marker -
|
|
371
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
372
372
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
373
|
-
* @param {string} [signPrice] -
|
|
373
|
+
* @param {string} [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.
|
|
374
374
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
375
375
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
376
376
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -385,8 +385,8 @@ export default class BlocksApi extends AsyncModules {
|
|
|
385
385
|
/**
|
|
386
386
|
* Get "similar to wishlist" products by an explicit list of productIds (POST body).
|
|
387
387
|
* @handleName getWishlistSimilarByProductIds
|
|
388
|
-
* @param {string} marker -
|
|
389
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
388
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
389
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
390
390
|
* @example
|
|
391
391
|
{
|
|
392
392
|
"productIds": [1, 2],
|