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
|
@@ -82,7 +82,7 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
82
82
|
*
|
|
83
83
|
* With `isShell` disabled browserResponse throws, and the error is thrown on
|
|
84
84
|
* from here too: returning it would break the `@throws` contract every caller
|
|
85
|
-
* documents, and a `try/catch` around the call would never fire
|
|
85
|
+
* documents, and a `try/catch` around the call would never fire.
|
|
86
86
|
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
87
87
|
* @returns {Promise<boolean | IError>} `true` on success, IError on failure when isShell=true.
|
|
88
88
|
* @throws {IError} When isShell=false and the request fails.
|
|
@@ -115,7 +115,7 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
115
115
|
* so both the success and the error branches handle empty bodies the same way.
|
|
116
116
|
*
|
|
117
117
|
* A body that is present but is not JSON — a gateway's HTML page in front of a
|
|
118
|
-
* 502, the platform's own admin page
|
|
118
|
+
* 502, the platform's own admin page — used to collapse into `{}`,
|
|
119
119
|
* which carries no `statusCode` and therefore does not read as an error at all:
|
|
120
120
|
* a failed request came back looking like an empty success. It is described
|
|
121
121
|
* instead, keeping the status the server actually sent.
|
|
@@ -135,8 +135,8 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
135
135
|
* Describes a response whose body is not the JSON the API is supposed to send.
|
|
136
136
|
*
|
|
137
137
|
* The platform has been seen answering `200 OK` with `content-type: text/html`
|
|
138
|
-
* and the admin page as the body — every content endpoint at once, for minutes
|
|
139
|
-
*
|
|
138
|
+
* and the admin page as the body — every content endpoint at once, for minutes.
|
|
139
|
+
* A successful status carrying someone else's body is indistinguishable
|
|
140
140
|
* from a real answer by status alone, and the only symptom used to be
|
|
141
141
|
* `SyntaxError: Unexpected token '<'` from the JSON parser: a message about the
|
|
142
142
|
* SDK's own parsing rather than about what the platform did. Callers read that as
|
|
@@ -157,9 +157,9 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
157
157
|
* With `isShell` on, a failure is returned rather than thrown — and a dropped
|
|
158
158
|
* connection throws a `TypeError`, whose `message` and `stack` are not
|
|
159
159
|
* enumerable. Returned as it was, it serializes to `{}` and reads exactly
|
|
160
|
-
* like an empty answer:
|
|
160
|
+
* like an empty answer: such a value has entered a site's
|
|
161
161
|
* page cache and was served for minutes after the link came back, and
|
|
162
|
-
* `next build` baked a site of 404s while reporting success
|
|
162
|
+
* `next build` baked a site of 404s while reporting success.
|
|
163
163
|
*
|
|
164
164
|
* An object that already carries a `statusCode` is the platform's own error
|
|
165
165
|
* and is passed through untouched. Everything else becomes
|
|
@@ -171,7 +171,7 @@ class AsyncModules extends syncModules_1.default {
|
|
|
171
171
|
*
|
|
172
172
|
* With `isShell` disabled browserResponse throws, and the error is thrown on
|
|
173
173
|
* from here too: returning it would break the `@throws` contract every caller
|
|
174
|
-
* documents, and a `try/catch` around the call would never fire
|
|
174
|
+
* documents, and a `try/catch` around the call would never fire.
|
|
175
175
|
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
176
176
|
* @returns {Promise<boolean | IError>} `true` on success, IError on failure when isShell=true.
|
|
177
177
|
* @throws {IError} When isShell=false and the request fails.
|
|
@@ -334,7 +334,7 @@ class AsyncModules extends syncModules_1.default {
|
|
|
334
334
|
* so both the success and the error branches handle empty bodies the same way.
|
|
335
335
|
*
|
|
336
336
|
* A body that is present but is not JSON — a gateway's HTML page in front of a
|
|
337
|
-
* 502, the platform's own admin page
|
|
337
|
+
* 502, the platform's own admin page — used to collapse into `{}`,
|
|
338
338
|
* which carries no `statusCode` and therefore does not read as an error at all:
|
|
339
339
|
* a failed request came back looking like an empty success. It is described
|
|
340
340
|
* instead, keeping the status the server actually sent.
|
|
@@ -458,8 +458,8 @@ class AsyncModules extends syncModules_1.default {
|
|
|
458
458
|
* Describes a response whose body is not the JSON the API is supposed to send.
|
|
459
459
|
*
|
|
460
460
|
* The platform has been seen answering `200 OK` with `content-type: text/html`
|
|
461
|
-
* and the admin page as the body — every content endpoint at once, for minutes
|
|
462
|
-
*
|
|
461
|
+
* and the admin page as the body — every content endpoint at once, for minutes.
|
|
462
|
+
* A successful status carrying someone else's body is indistinguishable
|
|
463
463
|
* from a real answer by status alone, and the only symptom used to be
|
|
464
464
|
* `SyntaxError: Unexpected token '<'` from the JSON parser: a message about the
|
|
465
465
|
* SDK's own parsing rather than about what the platform did. Callers read that as
|
|
@@ -494,9 +494,9 @@ class AsyncModules extends syncModules_1.default {
|
|
|
494
494
|
* With `isShell` on, a failure is returned rather than thrown — and a dropped
|
|
495
495
|
* connection throws a `TypeError`, whose `message` and `stack` are not
|
|
496
496
|
* enumerable. Returned as it was, it serializes to `{}` and reads exactly
|
|
497
|
-
* like an empty answer:
|
|
497
|
+
* like an empty answer: such a value has entered a site's
|
|
498
498
|
* page cache and was served for minutes after the link came back, and
|
|
499
|
-
* `next build` baked a site of 404s while reporting success
|
|
499
|
+
* `next build` baked a site of 404s while reporting success.
|
|
500
500
|
*
|
|
501
501
|
* An object that already carries a `statusCode` is the platform's own error
|
|
502
502
|
* 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/dist/base/syncModules.js
CHANGED
|
@@ -227,7 +227,7 @@ class SyncModules {
|
|
|
227
227
|
* calls, a shared default. Normalizing in place sends the already-wrapped
|
|
228
228
|
* value the second time, it is wrapped again, and the platform answers
|
|
229
229
|
* `400 "formData.en_US[0].marker" is required` about a field the caller
|
|
230
|
-
* never sent
|
|
230
|
+
* never sent.
|
|
231
231
|
* @param {any} body - The body to normalize. Left unchanged.
|
|
232
232
|
* @param {string} [langCode] - The language code for normalization.
|
|
233
233
|
* @returns {any} A normalized copy of the body.
|
package/dist/base/utils.d.ts
CHANGED
|
@@ -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;
|
|
@@ -74,7 +74,7 @@ export declare const UserEntitySchema: z.ZodObject<{
|
|
|
74
74
|
authProviderIdentifier: z.ZodString;
|
|
75
75
|
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
76
76
|
formIdentifier: z.ZodString;
|
|
77
|
-
total: z.ZodString
|
|
77
|
+
total: z.ZodOptional<z.ZodString>;
|
|
78
78
|
groups: z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
79
79
|
state: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
80
80
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
package/dist/base/validation.js
CHANGED
|
@@ -143,7 +143,7 @@ exports.UserEntitySchema = zod_1.z.object({
|
|
|
143
143
|
authProviderIdentifier: zod_1.z.string(),
|
|
144
144
|
formData: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())]),
|
|
145
145
|
formIdentifier: zod_1.z.string(),
|
|
146
|
-
total: zod_1.z.string(),
|
|
146
|
+
total: zod_1.z.string().optional(),
|
|
147
147
|
groups: zod_1.z.array(zod_1.z.union([zod_1.z.string(), zod_1.z.number()])),
|
|
148
148
|
state: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
149
149
|
moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
|
|
@@ -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/dist/blocks/blocksApi.js
CHANGED
|
@@ -62,8 +62,8 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
62
62
|
* @handleName getBlocks
|
|
63
63
|
* @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'.
|
|
64
64
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
65
|
-
* @param {number} [offset] -
|
|
66
|
-
* @param {number} [limit] -
|
|
65
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
66
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
67
67
|
* @returns {Promise<IBlocksResponse | IError>} Returns BlocksEntity object.
|
|
68
68
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
69
69
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getBlocks getBlocks} documentation.
|
|
@@ -90,10 +90,10 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
90
90
|
/**
|
|
91
91
|
* Get block by marker.
|
|
92
92
|
* @handleName getBlockByMarker
|
|
93
|
-
* @param {string} marker - Marker of
|
|
93
|
+
* @param {string} marker - Marker of the block. Example: "product_block".
|
|
94
94
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
95
|
-
* @param {number} [offset] -
|
|
96
|
-
* @param {number} [limit] -
|
|
95
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
96
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
97
97
|
* @returns {Promise<IBlockEntity | IError>} - Returns a BlockEntity object.
|
|
98
98
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
99
99
|
* @description This method retrieves a block by its marker and includes additional information such as similar products or products associated with the block.
|
|
@@ -167,9 +167,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
167
167
|
* @handleName getSimilarProducts
|
|
168
168
|
* @param {string} marker - Block identifier. Example: "similar_products_block".
|
|
169
169
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
170
|
-
* @param {number} [offset] -
|
|
171
|
-
* @param {number} [limit] -
|
|
172
|
-
* @param {string} [signPrice] -
|
|
170
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
171
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
172
|
+
* @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.
|
|
173
173
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
174
174
|
* @param {number} [productId] - Optional product id to find similar products for.
|
|
175
175
|
* @returns {Promise<IProductsResponse | IError>} Returns the total count and an array of product items in object by specified block marker.
|
|
@@ -192,9 +192,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
192
192
|
* @handleName getProductsByBlockMarker
|
|
193
193
|
* @param {string} marker - Block identifier. Example: "product_block".
|
|
194
194
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
195
|
-
* @param {number} [offset] -
|
|
196
|
-
* @param {number} [limit] -
|
|
197
|
-
* @param {string} [signPrice] -
|
|
195
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
196
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
197
|
+
* @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.
|
|
198
198
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
199
199
|
* @returns {Promise<IProductsEntity[] | IError>} Return array of BlocksEntity object.
|
|
200
200
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -218,10 +218,10 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
218
218
|
/**
|
|
219
219
|
* Get frequently ordered products by block marker and product id.
|
|
220
220
|
* @handleName getFrequentlyOrderedProducts
|
|
221
|
-
* @param {number} productId - Product
|
|
222
|
-
* @param {string} marker -
|
|
221
|
+
* @param {number} productId - Product ID. Example: 1.
|
|
222
|
+
* @param {string} marker - Marker of the block. Example: "frequently_ordered_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 a products response with items and total.
|
|
@@ -256,9 +256,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
256
256
|
/**
|
|
257
257
|
* Get "complete your cart" products by the cart from context (auth user or guest).
|
|
258
258
|
* @handleName getCartComplement
|
|
259
|
-
* @param {string} marker -
|
|
259
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
260
260
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
261
|
-
* @param {string} [signPrice] -
|
|
261
|
+
* @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.
|
|
262
262
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
263
263
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
264
264
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -273,8 +273,8 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
273
273
|
/**
|
|
274
274
|
* Get "complete your cart" products by an explicit list of productIds (POST body).
|
|
275
275
|
* @handleName getCartComplementByProductIds
|
|
276
|
-
* @param {string} marker -
|
|
277
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
276
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
277
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
278
278
|
* @example
|
|
279
279
|
{
|
|
280
280
|
"productIds": [1, 2],
|
|
@@ -291,9 +291,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
291
291
|
/**
|
|
292
292
|
* Get "similar to cart" products by the cart from context (auth user or guest).
|
|
293
293
|
* @handleName getCartSimilar
|
|
294
|
-
* @param {string} marker -
|
|
294
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
295
295
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
296
|
-
* @param {string} [signPrice] -
|
|
296
|
+
* @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.
|
|
297
297
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
298
298
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
299
299
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -308,8 +308,8 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
308
308
|
/**
|
|
309
309
|
* Get "similar to cart" products by an explicit list of productIds (POST body).
|
|
310
310
|
* @handleName getCartSimilarByProductIds
|
|
311
|
-
* @param {string} marker -
|
|
312
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
311
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
312
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
313
313
|
* @example
|
|
314
314
|
{
|
|
315
315
|
"productIds": [1, 2],
|
|
@@ -326,9 +326,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
326
326
|
/**
|
|
327
327
|
* Get personal recommendations for the user.
|
|
328
328
|
* @handleName getPersonalRecommendations
|
|
329
|
-
* @param {string} marker -
|
|
329
|
+
* @param {string} marker - Marker of the block. Example: "personal_recommendations_block".
|
|
330
330
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
331
|
-
* @param {string} [signPrice] -
|
|
331
|
+
* @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.
|
|
332
332
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
333
333
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
334
334
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -343,9 +343,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
343
343
|
/**
|
|
344
344
|
* Get recently viewed products.
|
|
345
345
|
* @handleName getRecentlyViewed
|
|
346
|
-
* @param {string} marker -
|
|
346
|
+
* @param {string} marker - Marker of the block. Example: "recently_viewed_block".
|
|
347
347
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
348
|
-
* @param {string} [signPrice] -
|
|
348
|
+
* @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.
|
|
349
349
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
350
350
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
351
351
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -360,9 +360,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
360
360
|
/**
|
|
361
361
|
* Get products for repeat purchase.
|
|
362
362
|
* @handleName getRepeatPurchase
|
|
363
|
-
* @param {string} marker -
|
|
363
|
+
* @param {string} marker - Marker of the block. Example: "repeat_purchase_block".
|
|
364
364
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
365
|
-
* @param {string} [signPrice] -
|
|
365
|
+
* @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.
|
|
366
366
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
367
367
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
368
368
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -377,7 +377,7 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
377
377
|
/**
|
|
378
378
|
* Get the block's slides tree as a flat pre-order array (slider_block only).
|
|
379
379
|
* @handleName getSlides
|
|
380
|
-
* @param {string} marker -
|
|
380
|
+
* @param {string} marker - Marker of the block. Example: "slider_block".
|
|
381
381
|
* @returns {Promise<IBlockSlidesResponse | IError>} Returns the slides response.
|
|
382
382
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
383
383
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getSlides getSlides} documentation.
|
|
@@ -389,9 +389,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
389
389
|
/**
|
|
390
390
|
* Get trending products of the block.
|
|
391
391
|
* @handleName getTrending
|
|
392
|
-
* @param {string} marker -
|
|
392
|
+
* @param {string} marker - Marker of the block. Example: "trending_block".
|
|
393
393
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
394
|
-
* @param {string} [signPrice] -
|
|
394
|
+
* @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.
|
|
395
395
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
396
396
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
397
397
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -406,9 +406,9 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
406
406
|
/**
|
|
407
407
|
* Get "similar to wishlist" products by the wishlist from context (auth user or guest).
|
|
408
408
|
* @handleName getWishlistSimilar
|
|
409
|
-
* @param {string} marker -
|
|
409
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
410
410
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
411
|
-
* @param {string} [signPrice] -
|
|
411
|
+
* @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.
|
|
412
412
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
413
413
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
414
414
|
* @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
|
|
@@ -423,8 +423,8 @@ class BlocksApi extends asyncModules_1.default {
|
|
|
423
423
|
/**
|
|
424
424
|
* Get "similar to wishlist" products by an explicit list of productIds (POST body).
|
|
425
425
|
* @handleName getWishlistSimilarByProductIds
|
|
426
|
-
* @param {string} marker -
|
|
427
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
426
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
427
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
428
428
|
* @example
|
|
429
429
|
{
|
|
430
430
|
"productIds": [1, 2],
|