oneentry 1.0.161 → 1.0.162

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.
Files changed (50) hide show
  1. package/changelog.md +21 -3
  2. package/dist/admins/adminsInterfaces.d.ts +2 -0
  3. package/dist/admins/adminsSchemas.d.ts +2 -0
  4. package/dist/admins/adminsSchemas.js +1 -0
  5. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +2 -0
  6. package/dist/auth-provider/authProviderSchemas.d.ts +1 -0
  7. package/dist/base/validation.d.ts +1 -0
  8. package/dist/base/validation.js +1 -0
  9. package/dist/blocks/blocksApi.d.ts +16 -8
  10. package/dist/blocks/blocksApi.js +24 -15
  11. package/dist/blocks/blocksInterfaces.d.ts +16 -8
  12. package/dist/discounts/discountsInterfaces.d.ts +2 -0
  13. package/dist/forms-data/formsDataInterfaces.d.ts +9 -5
  14. package/dist/menus/menusInterfaces.d.ts +4 -0
  15. package/dist/menus/menusSchemas.js +2 -0
  16. package/dist/orders/ordersInterfaces.d.ts +2 -0
  17. package/dist/orders/ordersSchemas.d.ts +2 -0
  18. package/dist/orders/ordersSchemas.js +1 -0
  19. package/dist/pages/pagesApi.d.ts +1 -11
  20. package/dist/pages/pagesApi.js +0 -17
  21. package/dist/pages/pagesInterfaces.d.ts +3 -20
  22. package/dist/pages/pagesSchemas.d.ts +3 -7
  23. package/dist/pages/pagesSchemas.js +2 -8
  24. package/dist/users/usersInterfaces.d.ts +2 -0
  25. package/dist/users/usersSchemas.d.ts +1 -0
  26. package/esm/admins/adminsInterfaces.d.ts +2 -0
  27. package/esm/admins/adminsSchemas.d.ts +2 -0
  28. package/esm/admins/adminsSchemas.js +1 -0
  29. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +2 -0
  30. package/esm/auth-provider/authProviderSchemas.d.ts +1 -0
  31. package/esm/base/validation.d.ts +1 -0
  32. package/esm/base/validation.js +1 -0
  33. package/esm/blocks/blocksApi.d.ts +16 -8
  34. package/esm/blocks/blocksApi.js +24 -15
  35. package/esm/blocks/blocksInterfaces.d.ts +16 -8
  36. package/esm/discounts/discountsInterfaces.d.ts +2 -0
  37. package/esm/forms-data/formsDataInterfaces.d.ts +9 -5
  38. package/esm/menus/menusInterfaces.d.ts +4 -0
  39. package/esm/menus/menusSchemas.js +2 -0
  40. package/esm/orders/ordersInterfaces.d.ts +2 -0
  41. package/esm/orders/ordersSchemas.d.ts +2 -0
  42. package/esm/orders/ordersSchemas.js +1 -0
  43. package/esm/pages/pagesApi.d.ts +1 -11
  44. package/esm/pages/pagesApi.js +0 -17
  45. package/esm/pages/pagesInterfaces.d.ts +3 -20
  46. package/esm/pages/pagesSchemas.d.ts +3 -7
  47. package/esm/pages/pagesSchemas.js +1 -7
  48. package/esm/users/usersInterfaces.d.ts +2 -0
  49. package/esm/users/usersSchemas.d.ts +1 -0
  50. package/package.json +2 -2
@@ -1,7 +1,7 @@
1
1
  import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
- import type { IPageConfig, IPagesApi, IPageSearchResult, IPagesEntity, IPagesResponse, IPagesVectorSearch, IPositionBlock } from './pagesInterfaces';
4
+ import type { IPagesApi, IPageSearchResult, IPagesEntity, IPagesResponse, IPagesVectorSearch, IPositionBlock } from './pagesInterfaces';
5
5
  /**
6
6
  * Controllers for working with page objects, including catalog pages
7
7
  * @handle /api/content/pages
@@ -80,16 +80,6 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
80
80
  * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getBlocksByPageUrl getBlocksByPageUrl} documentation.
81
81
  */
82
82
  getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
83
- /**
84
- * Get settings for the page.
85
- * @handleName getConfigPageByUrl
86
- * @param {string} url - Page URL. Example: "about".
87
- * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
88
- * @throws {IError} When isShell=false and an error occurs during the fetch
89
- * @description Get settings for the page.
90
- * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getConfigPageByUrl getConfigPageByUrl} documentation.
91
- */
92
- getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
93
83
  /**
94
84
  * Quick search for page objects with limited output.
95
85
  * @handleName searchPage
@@ -212,23 +212,6 @@ class PagesApi extends asyncModules_1.default {
212
212
  }));
213
213
  return normalizeResponse;
214
214
  }
215
- /**
216
- * Get settings for the page.
217
- * @handleName getConfigPageByUrl
218
- * @param {string} url - Page URL. Example: "about".
219
- * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
220
- * @throws {IError} When isShell=false and an error occurs during the fetch
221
- * @description Get settings for the page.
222
- * @see {@link https://js-sdk.oneentry.cloud/docs/pages/getConfigPageByUrl getConfigPageByUrl} documentation.
223
- */
224
- async getConfigPageByUrl(url) {
225
- // Fetch data from the server using a GET request to retrieve forms for the specified page URL and language code
226
- const result = await this._fetchGet(`/${url}/config`);
227
- // Validate response if validation is enabled
228
- const validated = await this._validateResponse(result, schema('PageConfigSchema'));
229
- // return fetched data
230
- return validated;
231
- }
232
215
  /**
233
216
  * Quick search for page objects with limited output.
234
217
  * @handleName searchPage
@@ -66,15 +66,6 @@ interface IPagesApi {
66
66
  * @description This method gets all blocks by page url.
67
67
  */
68
68
  getBlocksByPageUrl(url: string, langCode?: LangType): Promise<IPositionBlock[] | IError>;
69
- /**
70
- * Get settings for the page.
71
- * @handleName getConfigPageByUrl
72
- * @param {string} url - Page URL. Example: "about".
73
- * @returns {IPageConfig} Returns a ConfigPage object with page display settings
74
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
75
- * @description This method gets settings for the page.
76
- */
77
- getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
78
69
  /**
79
70
  * Quick search for page objects with limited output.
80
71
  * @handleName searchPage
@@ -124,16 +115,6 @@ interface IPagesResponse {
124
115
  items: IPagesEntity[];
125
116
  total: number;
126
117
  }
127
- /**
128
- * @interface IPageConfig
129
- * @property {number | null} rowsPerPage - Number of lines per page. Example: 1.
130
- * @property {number | null} productsPerRow - Number of products per page. Example: 1.
131
- * @description This interface defines the configuration for pagination in pages, including the number of rows and products displayed per page.
132
- */
133
- interface IPageConfig {
134
- rowsPerPage: number | null;
135
- productsPerRow: number | null;
136
- }
137
118
  /**
138
119
  * @interface IPositionForm
139
120
  * @property {number} id - The identifier of the object. Example: 1764.
@@ -306,6 +287,7 @@ type PageType = 'catalog_page' | 'common_page' | 'error_page' | 'external_page';
306
287
  * @property {IRating} [rating] - Rating data.
307
288
  * @property {string} [total] - Total number of products linked to the page. Example: "10".
308
289
  * @property {string | null} [categoryPath] - Category path string; null for nested pages that have no own category path. Example: "catalog".
290
+ * @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
309
291
  * @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
310
292
  */
311
293
  interface IPagesEntity {
@@ -330,6 +312,7 @@ interface IPagesEntity {
330
312
  childrenCount?: number;
331
313
  total?: string;
332
314
  categoryPath?: string | null;
315
+ distance?: number;
333
316
  }
334
317
  /**
335
318
  * @interface IPageSearchResult
@@ -341,4 +324,4 @@ interface IPageSearchResult {
341
324
  id: number;
342
325
  title: string;
343
326
  }
344
- export type { IPageConfig, IPagesApi, IPageSearchResult, IPagesEntity, IPagesResponse, IPagesVectorSearch, IPositionBlock, IPositionForm, PageType, };
327
+ export type { IPagesApi, IPageSearchResult, IPagesEntity, IPagesResponse, IPagesVectorSearch, IPositionBlock, IPositionForm, PageType, };
@@ -34,6 +34,7 @@ export declare const PageEntitySchema: z.ZodObject<{
34
34
  childrenCount: z.ZodOptional<z.ZodNumber>;
35
35
  total: z.ZodOptional<z.ZodString>;
36
36
  categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
37
+ distance: z.ZodOptional<z.ZodNumber>;
37
38
  }, z.core.$strip>;
38
39
  /**
39
40
  * Pages response schema (array of pages)
@@ -65,6 +66,7 @@ export declare const PagesResponseSchema: z.ZodArray<z.ZodObject<{
65
66
  childrenCount: z.ZodOptional<z.ZodNumber>;
66
67
  total: z.ZodOptional<z.ZodString>;
67
68
  categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
69
+ distance: z.ZodOptional<z.ZodNumber>;
68
70
  }, z.core.$strip>>;
69
71
  /**
70
72
  * Page search result schema
@@ -111,11 +113,5 @@ export declare const SinglePageSchema: z.ZodObject<{
111
113
  childrenCount: z.ZodOptional<z.ZodNumber>;
112
114
  total: z.ZodOptional<z.ZodString>;
113
115
  categoryPath: z.ZodOptional<z.ZodNullable<z.ZodString>>;
114
- }, z.core.$strip>;
115
- /**
116
- * Page config schema
117
- */
118
- export declare const PageConfigSchema: z.ZodObject<{
119
- rowsPerPage: z.ZodNullable<z.ZodNumber>;
120
- productsPerRow: z.ZodNullable<z.ZodNumber>;
116
+ distance: z.ZodOptional<z.ZodNumber>;
121
117
  }, z.core.$strip>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PageConfigSchema = exports.SinglePageSchema = exports.PageSearchResponseSchema = exports.PageSearchResultSchema = exports.PagesResponseSchema = exports.PageEntitySchema = void 0;
3
+ exports.SinglePageSchema = exports.PageSearchResponseSchema = exports.PageSearchResultSchema = exports.PagesResponseSchema = exports.PageEntitySchema = void 0;
4
4
  /**
5
5
  * Validation schemas for Pages module
6
6
  * @description Zod schemas for validating pages-related API responses
@@ -33,6 +33,7 @@ exports.PageEntitySchema = zod_1.z.object({
33
33
  childrenCount: zod_1.z.number().optional(),
34
34
  total: zod_1.z.string().optional(),
35
35
  categoryPath: zod_1.z.string().nullable().optional(),
36
+ distance: zod_1.z.number().optional(),
36
37
  });
37
38
  /**
38
39
  * Pages response schema (array of pages)
@@ -54,10 +55,3 @@ exports.PageSearchResponseSchema = zod_1.z.array(exports.PageSearchResultSchema)
54
55
  * Single page response schema
55
56
  */
56
57
  exports.SinglePageSchema = exports.PageEntitySchema;
57
- /**
58
- * Page config schema
59
- */
60
- exports.PageConfigSchema = zod_1.z.object({
61
- rowsPerPage: zod_1.z.number().nullable(),
62
- productsPerRow: zod_1.z.number().nullable(),
63
- });
@@ -278,6 +278,7 @@ interface IUsersResponse {
278
278
  }
279
279
  * @property {Array<IFormConfig>} [moduleFormConfigs] - Optional array of form configuration objects associated with the user.
280
280
  * @property {IRating} [rating] - Rating data.
281
+ * @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
281
282
  * @description Represents a user entity with various properties, including identifiers, form data, and user groups.
282
283
  */
283
284
  interface IUserEntity {
@@ -291,6 +292,7 @@ interface IUserEntity {
291
292
  state: Record<string, unknown>;
292
293
  moduleFormConfigs?: Array<IFormConfig>;
293
294
  rating?: IRating;
295
+ distance?: number;
294
296
  }
295
297
  /**
296
298
  * @interface IUserBody
@@ -18,6 +18,7 @@ export declare const UserResponseSchema: z.ZodObject<{
18
18
  state: z.ZodRecord<z.ZodString, z.ZodAny>;
19
19
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
20
20
  rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
21
+ distance: z.ZodOptional<z.ZodNumber>;
21
22
  }, z.core.$strip>;
22
23
  /**
23
24
  * Update user response schema (returns true on success)
@@ -109,6 +109,7 @@ interface IPosition {
109
109
  }
110
110
  ]
111
111
  * @property {IFormConfig[]} [moduleFormConfigs] - Array of module form configurations associated with the admin.
112
+ * @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
112
113
  * @description This interface captures the essential details and additional attributes of an admin entity.
113
114
  */
114
115
  interface IAdminEntity {
@@ -120,6 +121,7 @@ interface IAdminEntity {
120
121
  isSync: boolean;
121
122
  attributeValues: IAttributeValues;
122
123
  moduleFormConfigs?: IFormConfig[];
124
+ distance?: number;
123
125
  }
124
126
  /**
125
127
  * Interface representing a query for fetching admin data.
@@ -22,6 +22,7 @@ export declare const AdminEntitySchema: z.ZodObject<{
22
22
  additionalFields?: Record<string, unknown> | unknown[];
23
23
  }, unknown>>>>;
24
24
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
25
+ distance: z.ZodOptional<z.ZodNumber>;
25
26
  }, z.core.$strip>;
26
27
  /**
27
28
  * Admins response schema (array of admin entities)
@@ -45,4 +46,5 @@ export declare const AdminsResponseSchema: z.ZodArray<z.ZodObject<{
45
46
  additionalFields?: Record<string, unknown> | unknown[];
46
47
  }, unknown>>>>;
47
48
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
49
+ distance: z.ZodOptional<z.ZodNumber>;
48
50
  }, z.core.$strip>>;
@@ -24,6 +24,7 @@ export const AdminEntitySchema = z.object({
24
24
  isSync: z.boolean(),
25
25
  attributeValues: z.record(z.string(), z.record(z.string(), AttributeValueSchema)),
26
26
  moduleFormConfigs: z.array(z.any()).optional(),
27
+ distance: z.number().optional(),
27
28
  });
28
29
  /**
29
30
  * Admins response schema (array of admin entities)
@@ -146,6 +146,7 @@ interface IAttributesSetsEntity {
146
146
  * @property {number} [position] - Sort position of the field inside the set. Optional. Example: 1.
147
147
  * @property {IListTitle[]} [listTitles] - Options for `list`/`radioButton`/`entity` fields (with extended data or linked-entity values). Optional.
148
148
  * @property {string} [listType] - For `entity` fields — how the option list is organized. Optional. Example: "nested".
149
+ * @property {boolean} [multiselect] - For `list` fields — whether several options from `listTitles` may be selected. Optional. Example: false.
149
150
  * @property {string} [moduleIdentifier] - For `entity` fields — identifier of the module the linked entities are taken from. Optional. Example: "catalog".
150
151
  * @property {number | null} [parentId] - Identifier of the parent field, `null` for top-level. Optional, seen on `groupOfImages` fields.
151
152
  * @property {Record<string, IAttributeSchemaItem>} [additionalFields] - Nested sub-fields keyed by marker. Optional.
@@ -171,6 +172,7 @@ interface IAttributeSchemaItem {
171
172
  type: AttributeType;
172
173
  position?: number;
173
174
  listTitles?: IListTitle[];
175
+ multiselect?: boolean;
174
176
  listType?: string;
175
177
  moduleIdentifier?: string;
176
178
  parentId?: number | null;
@@ -54,6 +54,7 @@ export declare const UserResponseSchema: z.ZodObject<{
54
54
  state: z.ZodRecord<z.ZodString, z.ZodAny>;
55
55
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
56
56
  rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
57
+ distance: z.ZodOptional<z.ZodNumber>;
57
58
  }, z.core.$strip>;
58
59
  /**
59
60
  * Auth provider entity schema
@@ -50,6 +50,7 @@ export declare const UserEntitySchema: z.ZodObject<{
50
50
  state: z.ZodRecord<z.ZodString, z.ZodAny>;
51
51
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
52
52
  rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
53
+ distance: z.ZodOptional<z.ZodNumber>;
53
54
  }, z.core.$strip>;
54
55
  /**
55
56
  * Auth entity schema
@@ -47,6 +47,7 @@ export const UserEntitySchema = z.object({
47
47
  state: z.record(z.string(), z.any()),
48
48
  moduleFormConfigs: z.array(z.any()).optional(),
49
49
  rating: z.record(z.string(), z.unknown()).optional(),
50
+ distance: z.number().optional(),
50
51
  });
51
52
  /**
52
53
  * Auth entity schema
@@ -96,11 +96,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
96
96
  * @param {string} [langCode] - Language code. Default: "en_US".
97
97
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
98
98
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
99
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
99
100
  * @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
100
101
  * @throws {IError} When isShell=false and an error occurs during the fetch
101
102
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getFrequentlyOrderedProducts getFrequentlyOrderedProducts} documentation.
102
103
  */
103
- getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
104
+ getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
104
105
  /**
105
106
  * Quick search for block objects with limited output.
106
107
  * @handleName searchBlock
@@ -118,11 +119,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
118
119
  * @param {string} [langCode] - Language code. Default: "en_US".
119
120
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
120
121
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
122
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
121
123
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
122
124
  * @throws {IError} When isShell=false and an error occurs during the fetch
123
125
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
124
126
  */
125
- getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
127
+ getCartComplement(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
126
128
  /**
127
129
  * Get "complete your cart" products by an explicit list of productIds (POST body).
128
130
  * @handleName getCartComplementByProductIds
@@ -145,11 +147,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
145
147
  * @param {string} [langCode] - Language code. Default: "en_US".
146
148
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
147
149
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
150
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
148
151
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
149
152
  * @throws {IError} When isShell=false and an error occurs during the fetch
150
153
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
151
154
  */
152
- getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
155
+ getCartSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
153
156
  /**
154
157
  * Get "similar to cart" products by an explicit list of productIds (POST body).
155
158
  * @handleName getCartSimilarByProductIds
@@ -172,11 +175,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
172
175
  * @param {string} [langCode] - Language code. Default: "en_US".
173
176
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
174
177
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
178
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
175
179
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
176
180
  * @throws {IError} When isShell=false and an error occurs during the fetch
177
181
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
178
182
  */
179
- getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
183
+ getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
180
184
  /**
181
185
  * Get recently viewed products.
182
186
  * @handleName getRecentlyViewed
@@ -184,11 +188,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
184
188
  * @param {string} [langCode] - Language code. Default: "en_US".
185
189
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
186
190
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
191
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
187
192
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
188
193
  * @throws {IError} When isShell=false and an error occurs during the fetch
189
194
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
190
195
  */
191
- getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
196
+ getRecentlyViewed(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
192
197
  /**
193
198
  * Get products for repeat purchase.
194
199
  * @handleName getRepeatPurchase
@@ -196,11 +201,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
196
201
  * @param {string} [langCode] - Language code. Default: "en_US".
197
202
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
198
203
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
204
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
199
205
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
200
206
  * @throws {IError} When isShell=false and an error occurs during the fetch
201
207
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
202
208
  */
203
- getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
209
+ getRepeatPurchase(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
204
210
  /**
205
211
  * Get the block's slides tree as a flat pre-order array (slider_block only).
206
212
  * @handleName getSlides
@@ -217,11 +223,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
217
223
  * @param {string} [langCode] - Language code. Default: "en_US".
218
224
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
219
225
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
226
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
220
227
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
221
228
  * @throws {IError} When isShell=false and an error occurs during the fetch
222
229
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
223
230
  */
224
- getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
231
+ getTrending(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
225
232
  /**
226
233
  * Get "similar to wishlist" products by the wishlist from context (auth user or guest).
227
234
  * @handleName getWishlistSimilar
@@ -229,11 +236,12 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
229
236
  * @param {string} [langCode] - Language code. Default: "en_US".
230
237
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
231
238
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
239
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
232
240
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
233
241
  * @throws {IError} When isShell=false and an error occurs during the fetch
234
242
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
235
243
  */
236
- getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
244
+ getWishlistSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
237
245
  /**
238
246
  * Get "similar to wishlist" products by an explicit list of productIds (POST body).
239
247
  * @handleName getWishlistSimilarByProductIds
@@ -185,14 +185,16 @@ export default class BlocksApi extends AsyncModules {
185
185
  * @param {string} [langCode] - Language code. Default: "en_US".
186
186
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
187
187
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
188
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
188
189
  * @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
189
190
  * @throws {IError} When isShell=false and an error occurs during the fetch
190
191
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getFrequentlyOrderedProducts getFrequentlyOrderedProducts} documentation.
191
192
  */
192
- async getFrequentlyOrderedProducts(productId, marker, langCode = this.state.lang, signPrice) {
193
+ async getFrequentlyOrderedProducts(productId, marker, langCode = this.state.lang, signPrice, limit) {
193
194
  const query = {
194
195
  langCode,
195
196
  signPrice,
197
+ limit,
196
198
  };
197
199
  const data = await this._fetchGet(`/${marker}/products/${productId}/frequently-ordered?` +
198
200
  this._queryParamsToString(query));
@@ -220,12 +222,13 @@ export default class BlocksApi extends AsyncModules {
220
222
  * @param {string} [langCode] - Language code. Default: "en_US".
221
223
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
222
224
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
225
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
223
226
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
224
227
  * @throws {IError} When isShell=false and an error occurs during the fetch
225
228
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
226
229
  */
227
- async getCartComplement(marker, langCode = this.state.lang, signPrice) {
228
- const query = { langCode, signPrice };
230
+ async getCartComplement(marker, langCode = this.state.lang, signPrice, limit) {
231
+ const query = { langCode, signPrice, limit };
229
232
  const data = await this._fetchGet(`/${marker}/cart-complement?` + this._queryParamsToString(query));
230
233
  return this._normalizeData(data);
231
234
  }
@@ -254,12 +257,13 @@ export default class BlocksApi extends AsyncModules {
254
257
  * @param {string} [langCode] - Language code. Default: "en_US".
255
258
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
256
259
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
260
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
257
261
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
258
262
  * @throws {IError} When isShell=false and an error occurs during the fetch
259
263
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
260
264
  */
261
- async getCartSimilar(marker, langCode = this.state.lang, signPrice) {
262
- const query = { langCode, signPrice };
265
+ async getCartSimilar(marker, langCode = this.state.lang, signPrice, limit) {
266
+ const query = { langCode, signPrice, limit };
263
267
  const data = await this._fetchGet(`/${marker}/cart-similar?` + this._queryParamsToString(query));
264
268
  return this._normalizeData(data);
265
269
  }
@@ -288,12 +292,13 @@ export default class BlocksApi extends AsyncModules {
288
292
  * @param {string} [langCode] - Language code. Default: "en_US".
289
293
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
290
294
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
295
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
291
296
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
292
297
  * @throws {IError} When isShell=false and an error occurs during the fetch
293
298
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
294
299
  */
295
- async getPersonalRecommendations(marker, langCode = this.state.lang, signPrice) {
296
- const query = { langCode, signPrice };
300
+ async getPersonalRecommendations(marker, langCode = this.state.lang, signPrice, limit) {
301
+ const query = { langCode, signPrice, limit };
297
302
  const data = await this._fetchGet(`/${marker}/personal-recommendations?` + this._queryParamsToString(query));
298
303
  return this._normalizeData(data);
299
304
  }
@@ -304,12 +309,13 @@ export default class BlocksApi extends AsyncModules {
304
309
  * @param {string} [langCode] - Language code. Default: "en_US".
305
310
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
306
311
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
312
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
307
313
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
308
314
  * @throws {IError} When isShell=false and an error occurs during the fetch
309
315
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
310
316
  */
311
- async getRecentlyViewed(marker, langCode = this.state.lang, signPrice) {
312
- const query = { langCode, signPrice };
317
+ async getRecentlyViewed(marker, langCode = this.state.lang, signPrice, limit) {
318
+ const query = { langCode, signPrice, limit };
313
319
  const data = await this._fetchGet(`/${marker}/recently-viewed?` + this._queryParamsToString(query));
314
320
  return this._normalizeData(data);
315
321
  }
@@ -320,12 +326,13 @@ export default class BlocksApi extends AsyncModules {
320
326
  * @param {string} [langCode] - Language code. Default: "en_US".
321
327
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
322
328
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
329
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
323
330
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
324
331
  * @throws {IError} When isShell=false and an error occurs during the fetch
325
332
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
326
333
  */
327
- async getRepeatPurchase(marker, langCode = this.state.lang, signPrice) {
328
- const query = { langCode, signPrice };
334
+ async getRepeatPurchase(marker, langCode = this.state.lang, signPrice, limit) {
335
+ const query = { langCode, signPrice, limit };
329
336
  const data = await this._fetchGet(`/${marker}/repeat-purchase?` + this._queryParamsToString(query));
330
337
  return this._normalizeData(data);
331
338
  }
@@ -348,12 +355,13 @@ export default class BlocksApi extends AsyncModules {
348
355
  * @param {string} [langCode] - Language code. Default: "en_US".
349
356
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
350
357
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
358
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
351
359
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
352
360
  * @throws {IError} When isShell=false and an error occurs during the fetch
353
361
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
354
362
  */
355
- async getTrending(marker, langCode = this.state.lang, signPrice) {
356
- const query = { langCode, signPrice };
363
+ async getTrending(marker, langCode = this.state.lang, signPrice, limit) {
364
+ const query = { langCode, signPrice, limit };
357
365
  const data = await this._fetchGet(`/${marker}/trending?` + this._queryParamsToString(query));
358
366
  return this._normalizeData(data);
359
367
  }
@@ -364,12 +372,13 @@ export default class BlocksApi extends AsyncModules {
364
372
  * @param {string} [langCode] - Language code. Default: "en_US".
365
373
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
366
374
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
375
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
367
376
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
368
377
  * @throws {IError} When isShell=false and an error occurs during the fetch
369
378
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
370
379
  */
371
- async getWishlistSimilar(marker, langCode = this.state.lang, signPrice) {
372
- const query = { langCode, signPrice };
380
+ async getWishlistSimilar(marker, langCode = this.state.lang, signPrice, limit) {
381
+ const query = { langCode, signPrice, limit };
373
382
  const data = await this._fetchGet(`/${marker}/wishlist-similar?` + this._queryParamsToString(query));
374
383
  return this._normalizeData(data);
375
384
  }
@@ -48,10 +48,11 @@ interface IBlocks {
48
48
  * @param {string} [langCode] - Language code. Default: "en_US".
49
49
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
50
50
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
51
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
51
52
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total) or an error.
52
53
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
53
54
  */
54
- getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
55
+ getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
55
56
  /**
56
57
  * Get "complete your cart" products by the cart from context (auth user or guest).
57
58
  * @handleName getCartComplement
@@ -59,10 +60,11 @@ interface IBlocks {
59
60
  * @param {string} [langCode] - Language code. Default: "en_US".
60
61
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
61
62
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
63
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
62
64
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
63
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
66
  */
65
- getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
67
+ getCartComplement(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
66
68
  /**
67
69
  * Get "complete your cart" products by an explicit list of productIds (POST body).
68
70
  * @handleName getCartComplementByProductIds
@@ -84,10 +86,11 @@ interface IBlocks {
84
86
  * @param {string} [langCode] - Language code. Default: "en_US".
85
87
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
86
88
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
89
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
87
90
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
88
91
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
92
  */
90
- getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
93
+ getCartSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
91
94
  /**
92
95
  * Get "similar to cart" products by an explicit list of productIds (POST body).
93
96
  * @handleName getCartSimilarByProductIds
@@ -109,10 +112,11 @@ interface IBlocks {
109
112
  * @param {string} [langCode] - Language code. Default: "en_US".
110
113
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
111
114
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
115
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
112
116
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
113
117
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
114
118
  */
115
- getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
119
+ getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
116
120
  /**
117
121
  * Get recently viewed products.
118
122
  * @handleName getRecentlyViewed
@@ -120,10 +124,11 @@ interface IBlocks {
120
124
  * @param {string} [langCode] - Language code. Default: "en_US".
121
125
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
122
126
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
127
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
123
128
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
124
129
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
125
130
  */
126
- getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
131
+ getRecentlyViewed(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
127
132
  /**
128
133
  * Get products for repeat purchase.
129
134
  * @handleName getRepeatPurchase
@@ -131,10 +136,11 @@ interface IBlocks {
131
136
  * @param {string} [langCode] - Language code. Default: "en_US".
132
137
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
133
138
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
139
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
134
140
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
135
141
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
136
142
  */
137
- getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
143
+ getRepeatPurchase(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
138
144
  /**
139
145
  * Get the block's slides tree as a flat pre-order array (slider_block only).
140
146
  * @handleName getSlides
@@ -150,10 +156,11 @@ interface IBlocks {
150
156
  * @param {string} [langCode] - Language code. Default: "en_US".
151
157
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
152
158
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
159
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
153
160
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
154
161
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
155
162
  */
156
- getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
163
+ getTrending(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
157
164
  /**
158
165
  * Get "similar to wishlist" products by the wishlist from context (auth user or guest).
159
166
  * @handleName getWishlistSimilar
@@ -161,10 +168,11 @@ interface IBlocks {
161
168
  * @param {string} [langCode] - Language code. Default: "en_US".
162
169
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
163
170
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
171
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
164
172
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
165
173
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
166
174
  */
167
- getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
175
+ getWishlistSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
168
176
  /**
169
177
  * Get "similar to wishlist" products by an explicit list of productIds (POST body).
170
178
  * @handleName getWishlistSimilarByProductIds