oneentry 1.0.157 → 1.0.158

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 CHANGED
@@ -1,5 +1,59 @@
1
1
  # SDK Change Log
2
2
 
3
+ ## v.1.0.158
4
+
5
+ ### What's New
6
+
7
+ - Orders > `IOrderStatus` — four fields the API already returns on every status are now declared (all optional, like the rest of the interface): `axis` (status pipeline, e.g. `"payment"`), `isCancelFinal`, `isFinalSuccess`, `isMapped`.
8
+
9
+ - Base > `ILocalizeInfo` — `plainContent?: string | null` is now declared: pages and menus return it as the plain-text counterpart of `htmlContent`.
10
+
11
+ - Events > `IFormSubscriptionsResponse` — new exported type describing the container returned by `getFormSubscriptions`: `{ items: IListFormSubscription[]; total: number }`.
12
+
13
+ - Products > `IProductsResponse` — `totalFound?: number` is now declared (and validated by `ProductsResponseSchema`): block product endpoints (`similarProducts` inside blocks, cart/wishlist recommendations, frequently ordered) return it alongside `items`/`total`; the `Products.getProducts*` endpoints do not, hence optional.
14
+
15
+ - Products > `IProductBlockSimilarRule` — rewritten to match the real shape of `customSettings.similarProductRules[]` returned by `getProductBlockById`: `{ id, title, attributeMarker, conditionMarker, conditionValue, statusMarker, pageUrls }`. The previously declared fields (`property`, `includes`, `keywords`, `strict`) never occurred in real data.
16
+
17
+ - AttributeSets > `IAttributeSchemaItem` — six fields the API already returns on schema items are now declared (all optional):
18
+ - `position` — sort position of the field inside the set;
19
+ - `listTitles` (`IListTitle[]`) — options for `list`/`radioButton`/`entity` fields, with extended data or linked-entity values;
20
+ - `listType` — for `entity` fields, how the option list is organized (e.g. `"nested"`);
21
+ - `moduleIdentifier` — for `entity` fields, the module the linked entities are taken from (e.g. `"catalog"`);
22
+ - `parentId` — parent field id, `null` for top-level;
23
+ - `splitParts` (`number[] | boolean`) — for split-price fields, ids of the schema fields the price is split into, `false` when the field does not split.
24
+
25
+ ### What's Changed
26
+
27
+ - **Breaking** — Blocks > the ten recommendation methods (`getCartComplement`, `getCartComplementByProductIds`, `getCartSimilar`, `getCartSimilarByProductIds`, `getWishlistSimilar`, `getWishlistSimilarByProductIds`, `getTrending`, `getPersonalRecommendations`, `getRecentlyViewed`, `getRepeatPurchase`) — the declared return type is corrected from `IProductsEntity[]` to `IProductsResponse`: the endpoints actually return a container `{ items, total, totalFound? }`, and the SDK does not unwrap it. Type-level fix only; the response itself is unchanged — code that (incorrectly) called `res.map(...)` never worked on real data.
28
+
29
+ - **Breaking** — Products > `getProductsByVectorSearch` — the declared return type is corrected from `IProductsEntity[]` to `IProductsResponse`: the endpoint returns `{ items, total }`. Type-level fix only.
30
+
31
+ - **Breaking** — Events > `getFormSubscriptions` — the declared return type is corrected from `IListFormSubscription[]` to the new `IFormSubscriptionsResponse`: the endpoint returns `{ items, total }`. Type-level fix only.
32
+
33
+ - Orders > `IBaseOrdersEntity.totalSum` — type corrected from `string` to `number`: `createOrder` and `updateOrderByMarkerAndId` return a number (e.g. `285`), which the Zod schemas (`CreateOrderResponseSchema` / `UpdateOrderResponseSchema`) already declared. `IOrderByMarkerEntity.totalSum` stays `string` — the by-marker endpoints really return `"300.00"`.
34
+
35
+ - Forms > `IFormAttribute` — the seven auth/notification flags (`isLogin`, `isSignUp`, `isPassword`, `isSignUpRequired`, `isNotificationEmail`, `isNotificationPhonePush`, `isNotificationPhoneSMS`) are now optional: the API returns them only on attributes of sign-in/sign-up forms.
36
+
37
+ - Forms > `IFormLocalizeInfo` — `title` is now optional: the API returns an empty `localizeInfos` object when the form has no localization for the requested language (all list responses on the test project). Same for attribute localization: Base > `IAttributeLocalizeInfo.title` is now optional too.
38
+
39
+ - Forms > `IFormAttributeAdditionalField.marker` — now optional: entries of `additionalFields` arrive as `{ type, value }`, the marker is the map key.
40
+
41
+ - Forms > a form with no attributes now returns `attributes: []`: the API sends an empty **object** (`{}`) in that case, and the SDK normalizes it to an empty array in `_normalizeAttr`, so `attributes` is always `IFormAttribute[]` and `form.attributes.map(...)` is safe on every form.
42
+
43
+ - Events > `IContentApiEvent.module` — now optional: system events not bound to a module (e.g. `send_code`, `registration_event`) come without it.
44
+
45
+ - Discounts > `IDiscountsEntity.attributeSetId` and `IDiscountValue.maxAmount` — type widened to `number | null`: both arrive as `null` when not configured.
46
+
47
+ - Products > `IProductBlockProductConfig` — `quantity` and `countElementsPerRow` are now optional: `customSettings.productConfig` arrives as an empty object when the block is not configured.
48
+
49
+ - Base > `ITimeIntervalRange.period` — type corrected to `number | null`: ranges that are not sliced into slots carry `period: null`. The runtime (`expandTimeIntervals`) already guarded against it; only the type (and the internal narrowing in `_addSlotsFromRanges`) changed.
50
+
51
+ - AttributeSets > `getAttributesByMarker` — the declared return type is corrected from `IAttributeSetsEntity[]` (the attribute **set** entity: `id`, `schema`, `createdDate`, …) to `IAttributesSetsEntity[]` — the attribute entities the endpoint actually returns (`marker`, `type`, `value`, `listTitles`, `validators`, `localizeInfos`, `additionalFields`, …). Type-level fix only; runtime behavior and the response itself are unchanged.
52
+
53
+ - AttributeSets > `IAttributeSchemaItem` — `initialValue` and `isPrice` are now optional: the API omits them on some fields (`isPrice` is returned only on product attribute sets).
54
+
55
+ - Base > `ITimeIntervalSchedule` — `fullMonth` and `selectedYear` are now optional: the API returns them only when the schedule is pinned to a month/year rather than an explicit date `range`.
56
+
3
57
  ## v.1.0.157
4
58
 
5
59
  ### What's New
@@ -38,11 +38,11 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
38
38
  * @handleName getAttributesByMarker
39
39
  * @param {string} marker - Attribute marker. Example: "productAttributes".
40
40
  * @param {string} [langCode] - Language code. Default: "en_US".
41
- * @returns {Promise<IAttributeSetsEntity[] | IError>} Returns an array of Attributes objects.
41
+ * @returns {Promise<IAttributesSetsEntity[] | IError>} Returns an array of Attributes objects.
42
42
  * @throws {IError} When isShell=false and an error occurs during the fetch
43
43
  * @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributesByMarker getAttributesByMarker} documentation.
44
44
  */
45
- getAttributesByMarker(marker: string, langCode?: string): Promise<IAttributeSetsEntity[] | IError>;
45
+ getAttributesByMarker(marker: string, langCode?: string): Promise<IAttributesSetsEntity[] | IError>;
46
46
  /**
47
47
  * Get a single attribute with data from the attribute sets.
48
48
  * @handleName getSingleAttributeByMarkerSet
@@ -57,7 +57,7 @@ class AttributesSetsApi extends asyncModules_1.default {
57
57
  * @handleName getAttributesByMarker
58
58
  * @param {string} marker - Attribute marker. Example: "productAttributes".
59
59
  * @param {string} [langCode] - Language code. Default: "en_US".
60
- * @returns {Promise<IAttributeSetsEntity[] | IError>} Returns an array of Attributes objects.
60
+ * @returns {Promise<IAttributesSetsEntity[] | IError>} Returns an array of Attributes objects.
61
61
  * @throws {IError} When isShell=false and an error occurs during the fetch
62
62
  * @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributesByMarker getAttributesByMarker} documentation.
63
63
  */
@@ -10,11 +10,11 @@ interface IAttributesSets {
10
10
  * @handleName getAttributesByMarker
11
11
  * @param {string} marker - The marker used to identify the attribute set. Example: "productAttributes".
12
12
  * @param {string} [langCode] - The language code for localization purposes. Default: 'en_US'.
13
- * @returns {IAttributeSetsEntity[]} A promise that resolves to an array of attribute set entities or an error.
13
+ * @returns {IAttributesSetsEntity[]} A promise that resolves to an array of attribute entities or an error.
14
14
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
15
15
  * @description This method fetches attributes by a specific marker.
16
16
  */
17
- getAttributesByMarker(marker: string, langCode: string): Promise<IAttributeSetsEntity[] | IError>;
17
+ getAttributesByMarker(marker: string, langCode: string): Promise<IAttributesSetsEntity[] | IError>;
18
18
  /**
19
19
  * Fetches a single attribute by its marker and the set marker.
20
20
  * @handleName getSingleAttributeByMarkerSet
@@ -137,35 +137,47 @@ interface IAttributesSetsEntity {
137
137
  * @interface IAttributeSchemaItem
138
138
  * @property {number} id - Unique identifier of the schema item. Example: 1.
139
139
  * @property {string} identifier - Field marker (machine name) within the schema. Example: "name".
140
- * @property {unknown} initialValue - Default value applied when the field is not filled.
141
- * @property {boolean} isPrice - Whether the field's numeric value is treated as the price for product entities. Example: false.
140
+ * @property {unknown} [initialValue] - Default value applied when the field is not filled. Optional — absent on some fields.
141
+ * @property {boolean} [isPrice] - Whether the field's numeric value is treated as the price for product entities. Optional — present on product (`forProducts`) attribute sets. Example: false.
142
142
  * @property {boolean} isVisible - Whether the field is exposed in the public API/UI. Example: true.
143
143
  * @property {IAttributeLocalizeInfo} localizeInfos - Localized labels for the field.
144
144
  * @property {boolean} original - Whether the field is part of the original (system) schema, not a user extension. Example: true.
145
145
  * @property {AttributeType} type - Attribute data type (e.g. "string", "file").
146
+ * @property {number} [position] - Sort position of the field inside the set. Optional. Example: 1.
147
+ * @property {IListTitle[]} [listTitles] - Options for `list`/`radioButton`/`entity` fields (with extended data or linked-entity values). Optional.
148
+ * @property {string} [listType] - For `entity` fields — how the option list is organized. Optional. Example: "nested".
149
+ * @property {string} [moduleIdentifier] - For `entity` fields — identifier of the module the linked entities are taken from. Optional. Example: "catalog".
150
+ * @property {number | null} [parentId] - Identifier of the parent field, `null` for top-level. Optional, seen on `groupOfImages` fields.
146
151
  * @property {Record<string, IAttributeSchemaItem>} [additionalFields] - Nested sub-fields keyed by marker. Optional.
147
152
  * @property {IAttributeValidators} [validators] - Validation rules for the field. Optional.
148
153
  * @property {boolean | string} [splitUnit] - Splitting unit configuration; `false` when disabled, otherwise the unit name (e.g. "percent"). Optional, used by numeric fields.
154
+ * @property {number[] | boolean} [splitParts] - For split-price fields — ids of the schema fields the price is split into (e.g. [2, 3]); `false` when the field does not split. Optional.
149
155
  * @property {boolean} [isCurrency] - Whether the field stores currency values. Optional.
150
156
  * @property {boolean} [splitPrice] - Whether the price is split between several fields. Optional.
151
157
  * @property {boolean} [isCompress] - Whether uploaded images are compressed. Optional, used by `image`/`groupOfImages` fields.
152
158
  * @property {boolean} [receiveValues] - For `timeInterval` fields — whether the field receives precomputed values. Optional.
153
159
  * @property {ITimeIntervalSchedule[]} [intervals] - For `timeInterval` fields — top-level schedule definition (separate from `localizeInfos.intervals`). Optional.
154
- * @property {unknown} [value] - For `timeInterval` fields current value/state of the schedule. Optional.
160
+ * @property {unknown} [value] - Current value of the field: `null` on numeric fields without a value, an array of schedule groups on `timeInterval` fields. Optional.
155
161
  * @description Definition of a single field inside an attribute set's schema.
156
162
  */
157
163
  interface IAttributeSchemaItem {
158
164
  id: number;
159
165
  identifier: string;
160
- initialValue: unknown;
161
- isPrice: boolean;
166
+ initialValue?: unknown;
167
+ isPrice?: boolean;
162
168
  isVisible: boolean;
163
169
  localizeInfos: IAttributeLocalizeInfo;
164
170
  original: boolean;
165
171
  type: AttributeType;
172
+ position?: number;
173
+ listTitles?: IListTitle[];
174
+ listType?: string;
175
+ moduleIdentifier?: string;
176
+ parentId?: number | null;
166
177
  additionalFields?: Record<string, IAttributeSchemaItem>;
167
178
  validators?: IAttributeValidators;
168
179
  splitUnit?: boolean | string;
180
+ splitParts?: number[] | boolean;
169
181
  isCurrency?: boolean;
170
182
  splitPrice?: boolean;
171
183
  isCompress?: boolean;
@@ -145,7 +145,8 @@ export default abstract class SyncModules {
145
145
  *
146
146
  * **2. `attributes`** — form attributes, an array (or a marker map on some
147
147
  * endpoints); form-only boolean flags (`isLogin`, `isSignUp`, notifications)
148
- * are additionally coerced from `null` to `false`.
148
+ * are additionally coerced from `null` to `false`. A form with no attributes
149
+ * arrives as an empty object `{}` — it is normalized to an empty array.
149
150
  *
150
151
  * **3. `type`** — a standalone attribute: an attribute-set entry, a form-data
151
152
  * field or a nested `additionalFields` entry. Same transformations, but there
@@ -313,7 +313,8 @@ class SyncModules {
313
313
  *
314
314
  * **2. `attributes`** — form attributes, an array (or a marker map on some
315
315
  * endpoints); form-only boolean flags (`isLogin`, `isSignUp`, notifications)
316
- * are additionally coerced from `null` to `false`.
316
+ * are additionally coerced from `null` to `false`. A form with no attributes
317
+ * arrives as an empty object `{}` — it is normalized to an empty array.
317
318
  *
318
319
  * **3. `type`** — a standalone attribute: an attribute-set entry, a form-data
319
320
  * field or a nested `additionalFields` entry. Same transformations, but there
@@ -351,6 +352,14 @@ class SyncModules {
351
352
  // for forms attributes - forms attributes collections
352
353
  if ('attributes' in data) {
353
354
  const d = data.attributes;
355
+ // A form with no attributes arrives as an empty object `{}` — normalize
356
+ // it to an empty array, the container every non-empty form uses.
357
+ if (d &&
358
+ typeof d === 'object' &&
359
+ !Array.isArray(d) &&
360
+ Object.keys(d).length === 0) {
361
+ return { ...data, attributes: [] };
362
+ }
354
363
  Object.keys(d).forEach((attr) => {
355
364
  this._normalizeAdditionalFields(d[attr]);
356
365
  this._normalizeAttrValue(d[attr]);
@@ -136,13 +136,14 @@ function _addSlotsFromRanges(day, ranges, out) {
136
136
  const endMinutes = _toMinutes(range === null || range === void 0 ? void 0 : range.end);
137
137
  if (startMinutes === null || endMinutes === null)
138
138
  return;
139
- // A non-positive period would never advance the cursor; a non-numeric one
140
- // would concatenate into it.
141
- if (!Number.isFinite(range.period) || range.period <= 0)
139
+ // A non-positive period would never advance the cursor; a null or
140
+ // non-numeric one would concatenate into it.
141
+ const period = range === null || range === void 0 ? void 0 : range.period;
142
+ if (typeof period !== 'number' || !Number.isFinite(period) || period <= 0)
142
143
  return;
143
- for (let minutes = startMinutes; minutes + range.period <= endMinutes; minutes += range.period) {
144
+ for (let minutes = startMinutes; minutes + period <= endMinutes; minutes += period) {
144
145
  const from = day + minutes * _MS_PER_MINUTE;
145
- const to = day + (minutes + range.period) * _MS_PER_MINUTE;
146
+ const to = day + (minutes + period) * _MS_PER_MINUTE;
146
147
  out.push([new Date(from).toISOString(), new Date(to).toISOString()]);
147
148
  }
148
149
  });
@@ -136,6 +136,7 @@ interface IAttributes {
136
136
  * @property {string | null} [plainValue] - Localized plain-text content (without HTML markup). Example: "Plain description".
137
137
  * @property {string | null} [htmlValue] - Localized HTML-rendered content. Example: "<p>Description</p>".
138
138
  * @property {string | null} [htmlContent] - Localized HTML body content for richer pages. Example: "<div>...</div>".
139
+ * @property {string | null} [plainContent] - Localized plain-text version of `htmlContent`; returned by pages and menus. Example: "Description".
139
140
  * @property {string | null} [menuTitle] - Localized title used in menus and navigation. Example: "Home".
140
141
  * @description Normalized localization payload for a single locale, returned by the SDK after unwrapping the API's per-language map.
141
142
  */
@@ -144,23 +145,26 @@ interface ILocalizeInfo {
144
145
  plainValue?: string | null;
145
146
  htmlValue?: string | null;
146
147
  htmlContent?: string | null;
148
+ plainContent?: string | null;
147
149
  menuTitle?: string | null;
148
150
  }
149
151
  /**
150
152
  * @interface IAttributeLocalizeInfo
153
+ * @property {string} [title] - Localized title of the attribute. Optional — the payload is an empty object when the attribute has no localization for the requested language (e.g. form attributes in list responses). Example: "Color".
151
154
  * @property {ITimeIntervalSchedule[]} [intervals] - For attributes of type `timeInterval`, the schedule data attached to the localization payload. Each entry is a compact recurrence rule — pass it to `expandTimeIntervals` to resolve concrete slots.
152
- * @description Extension of {@link ILocalizeInfo} used by attribute entities — adds attribute-type-specific fields the API exposes via `localizeInfos`.
155
+ * @description Extension of {@link ILocalizeInfo} used by attribute entities — adds attribute-type-specific fields the API exposes via `localizeInfos`. Unlike the base type, `title` is optional here.
153
156
  */
154
- interface IAttributeLocalizeInfo extends ILocalizeInfo {
157
+ interface IAttributeLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
158
+ title?: string;
155
159
  intervals?: ITimeIntervalSchedule[];
156
160
  [key: string]: unknown;
157
161
  }
158
162
  /**
159
163
  * @interface ITimeIntervalSchedule
160
164
  * @property {string} id - Schedule entry identifier (UUID). Example: "c6466cd8-c55d-4583-97c5-42b684210f12".
161
- * @property {number} fullMonth - Month index this schedule covers (0-11). Example: 2.
165
+ * @property {number} [fullMonth] - Month index this schedule covers (0-11). Optional — present when the schedule is pinned to a month/year rather than an explicit date `range`. Example: 2.
162
166
  * @property {boolean} inEveryMonth - Whether the schedule repeats every month. Example: true.
163
- * @property {number} selectedYear - Year the schedule applies to. Example: 2025.
167
+ * @property {number} [selectedYear] - Year the schedule applies to. Optional — present when the schedule is pinned to a month/year rather than an explicit date `range`. Example: 2025.
164
168
  * @property {ITimeIntervalRange[]} intervals - Daily time ranges configured for the schedule.
165
169
  * @property {unknown[]} external - External overrides; empty array when none.
166
170
  * @property {string[]} range - Validity range as a pair of ISO dates `[from, to]`; empty array when none. When both entries are equal the schedule is anchored to that single day and its recurrence is open-ended. Example: ["2025-05-07T21:00:00.000Z", "2025-05-07T21:00:00.000Z"].
@@ -169,9 +173,9 @@ interface IAttributeLocalizeInfo extends ILocalizeInfo {
169
173
  */
170
174
  interface ITimeIntervalSchedule {
171
175
  id: string;
172
- fullMonth: number;
176
+ fullMonth?: number;
173
177
  inEveryMonth: boolean;
174
- selectedYear: number;
178
+ selectedYear?: number;
175
179
  intervals: ITimeIntervalRange[];
176
180
  external: unknown[];
177
181
  range: string[];
@@ -248,14 +252,14 @@ interface ITimeIntervalPoint {
248
252
  * @property {string} id - Range identifier (UUID).
249
253
  * @property {ITimeIntervalPoint} start - Start time of the range.
250
254
  * @property {ITimeIntervalPoint} end - End time of the range.
251
- * @property {number} period - Slot duration in minutes. Example: 60.
255
+ * @property {number | null} period - Slot duration in minutes; `null` when the range is not sliced into slots. Example: 60.
252
256
  * @description A single daily time range inside a {@link ITimeIntervalSchedule}.
253
257
  */
254
258
  interface ITimeIntervalRange {
255
259
  id: string;
256
260
  start: ITimeIntervalPoint;
257
261
  end: ITimeIntervalPoint;
258
- period: number;
262
+ period: number | null;
259
263
  }
260
264
  /**
261
265
  * @interface IAttributeValue
@@ -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 { IProductsEntity, IProductsResponse } from '../products/productsInterfaces';
4
+ import type { IProductsResponse } from '../products/productsInterfaces';
5
5
  import type { BlockType, IBlockEntity, IBlockProductsLookup, IBlocks, IBlockSlidesResponse, IBlocksResponse, ISearchBlock } from './blocksInterfaces';
6
6
  /**
7
7
  * Controllers for working with blocks.
@@ -118,11 +118,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
118
118
  * @param {string} [langCode] - Language code. Default: "en_US".
119
119
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
120
120
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
121
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
121
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
122
122
  * @throws {IError} When isShell=false and an error occurs during the fetch
123
123
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
124
124
  */
125
- getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
125
+ getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
126
126
  /**
127
127
  * Get "complete your cart" products by an explicit list of productIds (POST body).
128
128
  * @handleName getCartComplementByProductIds
@@ -133,11 +133,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
133
133
  "productIds": [1, 2],
134
134
  "langCode": "en_US"
135
135
  }
136
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
136
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
137
137
  * @throws {IError} When isShell=false and an error occurs during the fetch
138
138
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplementByProductIds getCartComplementByProductIds} documentation.
139
139
  */
140
- getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
140
+ getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
141
141
  /**
142
142
  * Get "similar to cart" products by the cart from context (auth user or guest).
143
143
  * @handleName getCartSimilar
@@ -145,11 +145,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
145
145
  * @param {string} [langCode] - Language code. Default: "en_US".
146
146
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
147
147
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
148
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
148
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
149
149
  * @throws {IError} When isShell=false and an error occurs during the fetch
150
150
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
151
151
  */
152
- getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
152
+ getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
153
153
  /**
154
154
  * Get "similar to cart" products by an explicit list of productIds (POST body).
155
155
  * @handleName getCartSimilarByProductIds
@@ -160,11 +160,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
160
160
  "productIds": [1, 2],
161
161
  "langCode": "en_US"
162
162
  }
163
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
163
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
164
164
  * @throws {IError} When isShell=false and an error occurs during the fetch
165
165
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilarByProductIds getCartSimilarByProductIds} documentation.
166
166
  */
167
- getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
167
+ getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
168
168
  /**
169
169
  * Get personal recommendations for the user.
170
170
  * @handleName getPersonalRecommendations
@@ -172,11 +172,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
172
172
  * @param {string} [langCode] - Language code. Default: "en_US".
173
173
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
174
174
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
175
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
175
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
176
176
  * @throws {IError} When isShell=false and an error occurs during the fetch
177
177
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
178
178
  */
179
- getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
179
+ getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
180
180
  /**
181
181
  * Get recently viewed products.
182
182
  * @handleName getRecentlyViewed
@@ -184,11 +184,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
184
184
  * @param {string} [langCode] - Language code. Default: "en_US".
185
185
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
186
186
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
187
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
187
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
188
188
  * @throws {IError} When isShell=false and an error occurs during the fetch
189
189
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
190
190
  */
191
- getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
191
+ getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
192
192
  /**
193
193
  * Get products for repeat purchase.
194
194
  * @handleName getRepeatPurchase
@@ -196,11 +196,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
196
196
  * @param {string} [langCode] - Language code. Default: "en_US".
197
197
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
198
198
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
199
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
199
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
200
200
  * @throws {IError} When isShell=false and an error occurs during the fetch
201
201
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
202
202
  */
203
- getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
203
+ getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
204
204
  /**
205
205
  * Get the block's slides tree as a flat pre-order array (slider_block only).
206
206
  * @handleName getSlides
@@ -217,11 +217,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
217
217
  * @param {string} [langCode] - Language code. Default: "en_US".
218
218
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
219
219
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
220
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
220
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
221
221
  * @throws {IError} When isShell=false and an error occurs during the fetch
222
222
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
223
223
  */
224
- getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
224
+ getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
225
225
  /**
226
226
  * Get "similar to wishlist" products by the wishlist from context (auth user or guest).
227
227
  * @handleName getWishlistSimilar
@@ -229,11 +229,11 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
229
229
  * @param {string} [langCode] - Language code. Default: "en_US".
230
230
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
231
231
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
232
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
232
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
233
233
  * @throws {IError} When isShell=false and an error occurs during the fetch
234
234
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
235
235
  */
236
- getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
236
+ getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
237
237
  /**
238
238
  * Get "similar to wishlist" products by an explicit list of productIds (POST body).
239
239
  * @handleName getWishlistSimilarByProductIds
@@ -244,9 +244,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
244
244
  "productIds": [1, 2],
245
245
  "langCode": "en_US"
246
246
  }
247
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
247
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
248
248
  * @throws {IError} When isShell=false and an error occurs during the fetch
249
249
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilarByProductIds getWishlistSimilarByProductIds} documentation.
250
250
  */
251
- getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
251
+ getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
252
252
  }
@@ -224,7 +224,7 @@ class BlocksApi extends asyncModules_1.default {
224
224
  * @param {string} [langCode] - Language code. Default: "en_US".
225
225
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
226
226
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
227
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
227
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
228
228
  * @throws {IError} When isShell=false and an error occurs during the fetch
229
229
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
230
230
  */
@@ -243,7 +243,7 @@ class BlocksApi extends asyncModules_1.default {
243
243
  "productIds": [1, 2],
244
244
  "langCode": "en_US"
245
245
  }
246
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
246
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
247
247
  * @throws {IError} When isShell=false and an error occurs during the fetch
248
248
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplementByProductIds getCartComplementByProductIds} documentation.
249
249
  */
@@ -258,7 +258,7 @@ class BlocksApi extends asyncModules_1.default {
258
258
  * @param {string} [langCode] - Language code. Default: "en_US".
259
259
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
260
260
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
261
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
261
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
262
262
  * @throws {IError} When isShell=false and an error occurs during the fetch
263
263
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
264
264
  */
@@ -277,7 +277,7 @@ class BlocksApi extends asyncModules_1.default {
277
277
  "productIds": [1, 2],
278
278
  "langCode": "en_US"
279
279
  }
280
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
280
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
281
281
  * @throws {IError} When isShell=false and an error occurs during the fetch
282
282
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilarByProductIds getCartSimilarByProductIds} documentation.
283
283
  */
@@ -292,7 +292,7 @@ class BlocksApi extends asyncModules_1.default {
292
292
  * @param {string} [langCode] - Language code. Default: "en_US".
293
293
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
294
294
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
295
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
295
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
296
296
  * @throws {IError} When isShell=false and an error occurs during the fetch
297
297
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
298
298
  */
@@ -308,7 +308,7 @@ class BlocksApi extends asyncModules_1.default {
308
308
  * @param {string} [langCode] - Language code. Default: "en_US".
309
309
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
310
310
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
311
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
311
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
312
312
  * @throws {IError} When isShell=false and an error occurs during the fetch
313
313
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
314
314
  */
@@ -324,7 +324,7 @@ class BlocksApi extends asyncModules_1.default {
324
324
  * @param {string} [langCode] - Language code. Default: "en_US".
325
325
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
326
326
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
327
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
327
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
328
328
  * @throws {IError} When isShell=false and an error occurs during the fetch
329
329
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
330
330
  */
@@ -352,7 +352,7 @@ class BlocksApi extends asyncModules_1.default {
352
352
  * @param {string} [langCode] - Language code. Default: "en_US".
353
353
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
354
354
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
355
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
355
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
356
356
  * @throws {IError} When isShell=false and an error occurs during the fetch
357
357
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
358
358
  */
@@ -368,7 +368,7 @@ class BlocksApi extends asyncModules_1.default {
368
368
  * @param {string} [langCode] - Language code. Default: "en_US".
369
369
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
370
370
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
371
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
371
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
372
372
  * @throws {IError} When isShell=false and an error occurs during the fetch
373
373
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
374
374
  */
@@ -387,7 +387,7 @@ class BlocksApi extends asyncModules_1.default {
387
387
  "productIds": [1, 2],
388
388
  "langCode": "en_US"
389
389
  }
390
- * @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
390
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
391
391
  * @throws {IError} When isShell=false and an error occurs during the fetch
392
392
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilarByProductIds getWishlistSimilarByProductIds} documentation.
393
393
  */
@@ -59,10 +59,10 @@ interface IBlocks {
59
59
  * @param {string} [langCode] - Language code. Default: "en_US".
60
60
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
61
61
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
62
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
62
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
63
63
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
64
  */
65
- getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
65
+ getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
66
66
  /**
67
67
  * Get "complete your cart" products by an explicit list of productIds (POST body).
68
68
  * @handleName getCartComplementByProductIds
@@ -73,10 +73,10 @@ interface IBlocks {
73
73
  "productIds": [1, 2],
74
74
  "langCode": "en_US"
75
75
  }
76
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
76
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
77
77
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
78
78
  */
79
- getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
79
+ getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
80
80
  /**
81
81
  * Get "similar to cart" products by the cart from context (auth user or guest).
82
82
  * @handleName getCartSimilar
@@ -84,10 +84,10 @@ interface IBlocks {
84
84
  * @param {string} [langCode] - Language code. Default: "en_US".
85
85
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
86
86
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
87
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
87
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
88
88
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
89
  */
90
- getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
90
+ getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
91
91
  /**
92
92
  * Get "similar to cart" products by an explicit list of productIds (POST body).
93
93
  * @handleName getCartSimilarByProductIds
@@ -98,10 +98,10 @@ interface IBlocks {
98
98
  "productIds": [1, 2],
99
99
  "langCode": "en_US"
100
100
  }
101
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
101
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
102
102
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
103
103
  */
104
- getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
104
+ getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
105
105
  /**
106
106
  * Get personal recommendations for the user.
107
107
  * @handleName getPersonalRecommendations
@@ -109,10 +109,10 @@ interface IBlocks {
109
109
  * @param {string} [langCode] - Language code. Default: "en_US".
110
110
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
111
111
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
112
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
112
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
113
113
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
114
114
  */
115
- getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
115
+ getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
116
116
  /**
117
117
  * Get recently viewed products.
118
118
  * @handleName getRecentlyViewed
@@ -120,10 +120,10 @@ interface IBlocks {
120
120
  * @param {string} [langCode] - Language code. Default: "en_US".
121
121
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
122
122
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
123
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
123
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
124
124
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
125
125
  */
126
- getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
126
+ getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
127
127
  /**
128
128
  * Get products for repeat purchase.
129
129
  * @handleName getRepeatPurchase
@@ -131,10 +131,10 @@ interface IBlocks {
131
131
  * @param {string} [langCode] - Language code. Default: "en_US".
132
132
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
133
133
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
134
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
134
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
135
135
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
136
136
  */
137
- getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
137
+ getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
138
138
  /**
139
139
  * Get the block's slides tree as a flat pre-order array (slider_block only).
140
140
  * @handleName getSlides
@@ -150,10 +150,10 @@ interface IBlocks {
150
150
  * @param {string} [langCode] - Language code. Default: "en_US".
151
151
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
152
152
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
153
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
153
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
154
154
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
155
155
  */
156
- getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
156
+ getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
157
157
  /**
158
158
  * Get "similar to wishlist" products by the wishlist from context (auth user or guest).
159
159
  * @handleName getWishlistSimilar
@@ -161,10 +161,10 @@ interface IBlocks {
161
161
  * @param {string} [langCode] - Language code. Default: "en_US".
162
162
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
163
163
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
164
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
164
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
165
165
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
166
166
  */
167
- getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
167
+ getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
168
168
  /**
169
169
  * Get "similar to wishlist" products by an explicit list of productIds (POST body).
170
170
  * @handleName getWishlistSimilarByProductIds
@@ -175,10 +175,10 @@ interface IBlocks {
175
175
  "productIds": [1, 2],
176
176
  "langCode": "en_US"
177
177
  }
178
- * @returns {IProductsEntity[]} A promise that resolves to an array of products or an error.
178
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
179
179
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
180
180
  */
181
- getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
181
+ getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsResponse | IError>;
182
182
  }
183
183
  /**
184
184
  * Represents a response from the blocks API.
@@ -53,6 +53,7 @@ export declare const BlockEntitySchema: z.ZodObject<{
53
53
  discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
54
54
  }, z.core.$strip>>;
55
55
  total: z.ZodNumber;
56
+ totalFound: z.ZodOptional<z.ZodNumber>;
56
57
  }, z.core.$strip>>;
57
58
  countElementsPerRow: z.ZodOptional<z.ZodNumber>;
58
59
  quantity: z.ZodOptional<z.ZodNumber>;
@@ -149,6 +150,7 @@ export declare const BlocksResponseSchema: z.ZodObject<{
149
150
  discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
150
151
  }, z.core.$strip>>;
151
152
  total: z.ZodNumber;
153
+ totalFound: z.ZodOptional<z.ZodNumber>;
152
154
  }, z.core.$strip>>;
153
155
  countElementsPerRow: z.ZodOptional<z.ZodNumber>;
154
156
  quantity: z.ZodOptional<z.ZodNumber>;
@@ -88,7 +88,7 @@ interface IDiscountCondition {
88
88
  * Represents a discount entity.
89
89
  * @interface IDiscountsEntity
90
90
  * @property {number} id - The unique identifier of the discount.
91
- * @property {number} [attributeSetId] - The identifier of the discount.
91
+ * @property {number | null} [attributeSetId] - The identifier of the attribute set linked to the discount, or `null` when no set is linked.
92
92
  * @property {ILocalizeInfo} [localizeInfos] - The name of the discount.
93
93
  * @property {number} [version] - The version of the discount.
94
94
  * @property {string} [identifier] - The identifier of the discount.
@@ -111,7 +111,7 @@ interface IDiscountCondition {
111
111
  */
112
112
  interface IDiscountsEntity {
113
113
  id: number;
114
- attributeSetId?: number;
114
+ attributeSetId?: number | null;
115
115
  localizeInfos?: ILocalizeInfo;
116
116
  version?: number;
117
117
  identifier?: string;
@@ -137,14 +137,14 @@ interface IDiscountsEntity {
137
137
  * @property {'TO_PRODUCT' | 'TO_ORDER'} applicability - What the discount applies to. Example: "TO_PRODUCT".
138
138
  * @property {'FIXED_AMOUNT' | 'PERCENT'} discountType - How the discount value is interpreted. Example: "FIXED_AMOUNT".
139
139
  * @property {number} value - Discount amount (currency units for FIXED_AMOUNT, percentage points for PERCENT). Example: 10.
140
- * @property {number} [maxAmount] - Optional cap on the absolute discount applied. Example: 5.
140
+ * @property {number | null} [maxAmount] - Cap on the absolute discount applied, or `null` when uncapped. Example: 5.
141
141
  * @description Configuration of the discount calculation.
142
142
  */
143
143
  interface IDiscountValue {
144
144
  applicability: 'TO_PRODUCT' | 'TO_ORDER';
145
145
  discountType: 'FIXED_AMOUNT' | 'PERCENT';
146
146
  value: number;
147
- maxAmount?: number;
147
+ maxAmount?: number | null;
148
148
  }
149
149
  /**
150
150
  * @interface ICouponEntity
@@ -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 { IContentApiEvent, IEvents, IListFormSubscription, ISubscribeFormEvent, ISubscriptions } from './eventsInterfaces';
4
+ import type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, ISubscribeFormEvent, ISubscriptions } from './eventsInterfaces';
5
5
  /**
6
6
  * Controllers for working with events
7
7
  * @handle /api/content/events
@@ -86,13 +86,13 @@ export default class EventsApi extends AsyncModules implements IEvents {
86
86
  * @handleName getFormSubscriptions
87
87
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
88
88
  * @param {number} [limit] - Optional limit for pagination. Default: 30.
89
- * @returns {Promise<IListFormSubscription[] | IError>} Returns an array of form subscriptions.
89
+ * @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
90
90
  * @throws {IError} When isShell=false and an error occurs during the fetch
91
91
  * @description This method requires user authorization.
92
92
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
93
93
  * @see {@link https://js-sdk.oneentry.cloud/docs/events/getFormSubscriptions getFormSubscriptions} documentation.
94
94
  */
95
- getFormSubscriptions(offset?: number, limit?: number): Promise<IListFormSubscription[] | IError>;
95
+ getFormSubscriptions(offset?: number, limit?: number): Promise<IFormSubscriptionsResponse | IError>;
96
96
  /**
97
97
  * Unsubscribe from form notifications by marker.
98
98
  * @handleName unsubscribeFromForm
@@ -115,7 +115,7 @@ class EventsApi extends asyncModules_1.default {
115
115
  * @handleName getFormSubscriptions
116
116
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
117
117
  * @param {number} [limit] - Optional limit for pagination. Default: 30.
118
- * @returns {Promise<IListFormSubscription[] | IError>} Returns an array of form subscriptions.
118
+ * @returns {Promise<IFormSubscriptionsResponse | IError>} Returns an object with an array of form subscriptions and total count.
119
119
  * @throws {IError} When isShell=false and an error occurs during the fetch
120
120
  * @description This method requires user authorization.
121
121
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
@@ -61,12 +61,12 @@ interface IEvents {
61
61
  * @handleName getFormSubscriptions
62
62
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
63
63
  * @param {number} [limit] - Optional limit for pagination. Default: 30.
64
- * @returns {Promise<IListFormSubscription[] | IError>} A promise that resolves to an array of form subscriptions or an error.
64
+ * @returns {Promise<IFormSubscriptionsResponse | IError>} A promise that resolves to an object with an array of form subscriptions and total count, or an error.
65
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
66
66
  * @description This method returns all form subscriptions. This method requires user authorization.
67
67
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
68
68
  */
69
- getFormSubscriptions(offset?: number, limit?: number): Promise<IListFormSubscription[] | IError>;
69
+ getFormSubscriptions(offset?: number, limit?: number): Promise<IFormSubscriptionsResponse | IError>;
70
70
  /**
71
71
  * Unsubscribe from form notifications by marker.
72
72
  * @handleName unsubscribeFromForm
@@ -131,14 +131,14 @@ interface ISubscribeBody {
131
131
  * @property {number} id - Event identifier. Example: 1.
132
132
  * @property {string} identifier - Event text identifier. Example: "price_change".
133
133
  * @property {Record<string, unknown>} localizeInfos - Localized info of the event.
134
- * @property {string} module - Module the event belongs to. Example: "catalog".
134
+ * @property {string} [module] - Module the event belongs to; absent on system events not bound to a module (e.g. "send_code"). Example: "catalog".
135
135
  * @description Represents a single available event.
136
136
  */
137
137
  interface IContentApiEvent {
138
138
  id: number;
139
139
  identifier: string;
140
140
  localizeInfos: Record<string, unknown>;
141
- module: string;
141
+ module?: string;
142
142
  }
143
143
  /**
144
144
  * Represents a form subscription item.
@@ -151,6 +151,17 @@ interface IListFormSubscription {
151
151
  eventMarker: string;
152
152
  formDataId: number;
153
153
  }
154
+ /**
155
+ * Represents the response of the form subscriptions list endpoint.
156
+ * @interface IFormSubscriptionsResponse
157
+ * @property {IListFormSubscription[]} items - Array of form subscriptions.
158
+ * @property {number} total - Total number of subscriptions. Example: 0.
159
+ * @description Container returned by `getFormSubscriptions`.
160
+ */
161
+ interface IFormSubscriptionsResponse {
162
+ items: IListFormSubscription[];
163
+ total: number;
164
+ }
154
165
  /**
155
166
  * Body for subscribing to / unsubscribing from a form event.
156
167
  * @interface ISubscribeFormEvent
@@ -162,4 +173,4 @@ interface ISubscribeFormEvent {
162
173
  formDataId: number;
163
174
  status?: string;
164
175
  }
165
- export type { IContentApiEvent, IEvents, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptions, };
176
+ export type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptions, };
@@ -71,7 +71,7 @@ interface IFromPages {
71
71
  * @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
72
72
  * @property {string} processingType - Type of form processing. Example: "async".
73
73
  * @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
74
- * @property {IFormAttribute[]} attributes - Form fields with their localization, validators and form-specific flags, sorted by `position`.
74
+ * @property {IFormAttribute[]} attributes - Form fields with their localization, validators and form-specific flags, sorted by `position`. The API returns an empty object for forms with no attributes — the SDK normalizes it to an empty array.
75
75
  * @property {number | string} [total] - Total count of related entries. Example: "1".
76
76
  * @property {IFormConfig[]} [moduleFormConfigs] - Array of module form configurations associated with the form.
77
77
  * @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
@@ -92,15 +92,17 @@ interface IFormsEntity {
92
92
  }
93
93
  /**
94
94
  * @interface IFormLocalizeInfo
95
+ * @property {string} [title] - Localized name of the form. Optional — the payload is an empty object when the form has no localization for the requested language (e.g. in list responses). Example: "Contact form".
95
96
  * @property {string} [titleForSite] - Public-facing title shown on the website. Example: "Form title (for application)".
96
97
  * @property {string} [successMessage] - Message shown to the user after successful submission.
97
98
  * @property {string} [unsuccessMessage] - Message shown to the user after a failed submission.
98
99
  * @property {string} [urlAddress] - URL where the form data is sent for processing (used by `processingType: "url"`).
99
100
  * @property {string} [database] - Database flag/id used by the form processor (stringly-typed in the API: "0" / "1" / id).
100
101
  * @property {string} [script] - Script flag/id used by the form processor (stringly-typed in the API: "0" / "1" / id).
101
- * @description Localization payload of a form — extends {@link ILocalizeInfo} with form-side fields (messages, processing config).
102
+ * @description Localization payload of a form — extends {@link ILocalizeInfo} with form-side fields (messages, processing config). Unlike the base type, `title` is optional here.
102
103
  */
103
- interface IFormLocalizeInfo extends ILocalizeInfo {
104
+ interface IFormLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
105
+ title?: string;
104
106
  titleForSite?: string;
105
107
  successMessage?: string;
106
108
  unsuccessMessage?: string;
@@ -120,14 +122,14 @@ interface IFormLocalizeInfo extends ILocalizeInfo {
120
122
  * @property {IAttributeValidators} validators - Validation rules; empty object when no validators are configured.
121
123
  * @property {Record<string, unknown>} settings - Field-specific configuration; empty object by default.
122
124
  * @property {Record<string, IFormAttributeAdditionalField>} additionalFields - Nested sub-fields keyed by marker; empty object when none.
123
- * @property {boolean} isLogin - Whether this field carries the login value used for authentication. Example: false.
124
- * @property {boolean} isSignUp - Whether this field is required during sign-up. Example: false.
125
- * @property {boolean} isPassword - Whether this field carries the password value used for authentication. Example: false.
126
- * @property {boolean} isSignUpRequired - Whether this field is required during sign-up. Example: false.
127
- * @property {boolean} isNotificationEmail - Whether this field stores the email used for notifications. Example: false.
128
- * @property {boolean} isNotificationPhonePush - Whether this field stores the phone number used for push notifications. Example: false.
129
- * @property {boolean} isNotificationPhoneSMS - Whether this field stores the phone number used for SMS notifications. Example: false.
130
- * @description Definition of a single field inside a form — extends a generic attribute with form-specific authentication / notification flags.
125
+ * @property {boolean} [isLogin] - Whether this field carries the login value used for authentication. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
126
+ * @property {boolean} [isSignUp] - Whether this field is required during sign-up. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
127
+ * @property {boolean} [isPassword] - Whether this field carries the password value used for authentication. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
128
+ * @property {boolean} [isSignUpRequired] - Whether this field is required during sign-up. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
129
+ * @property {boolean} [isNotificationEmail] - Whether this field stores the email used for notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
130
+ * @property {boolean} [isNotificationPhonePush] - Whether this field stores the phone number used for push notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
131
+ * @property {boolean} [isNotificationPhoneSMS] - Whether this field stores the phone number used for SMS notifications. Optional — present only on attributes of sign-in/sign-up forms. Example: false.
132
+ * @description Definition of a single field inside a form — extends a generic attribute with form-specific authentication / notification flags (returned only for sign-in/sign-up forms).
131
133
  */
132
134
  interface IFormAttribute {
133
135
  marker: string;
@@ -140,24 +142,24 @@ interface IFormAttribute {
140
142
  validators: IAttributeValidators;
141
143
  settings: Record<string, unknown>;
142
144
  additionalFields: Record<string, IFormAttributeAdditionalField>;
143
- isLogin: boolean;
144
- isSignUp: boolean;
145
- isPassword: boolean;
146
- isSignUpRequired: boolean;
147
- isNotificationEmail: boolean;
148
- isNotificationPhonePush: boolean;
149
- isNotificationPhoneSMS: boolean;
145
+ isLogin?: boolean;
146
+ isSignUp?: boolean;
147
+ isPassword?: boolean;
148
+ isSignUpRequired?: boolean;
149
+ isNotificationEmail?: boolean;
150
+ isNotificationPhonePush?: boolean;
151
+ isNotificationPhoneSMS?: boolean;
150
152
  [key: string]: unknown;
151
153
  }
152
154
  /**
153
155
  * @interface IFormAttributeAdditionalField
154
- * @property {string} marker - Marker of the additional field. Example: "additional_field".
156
+ * @property {string} [marker] - Marker of the additional field. Optional — the API returns entries as `{ type, value }`, the marker itself is the key of the `additionalFields` map. Example: "additional_field".
155
157
  * @property {string} type - Type of the additional field. Example: "string".
156
158
  * @property {unknown} value - Value of the additional field, normalized like any other attribute value: `number | null` for numeric types, the file object itself for a single-file `image`/`file`, `null` when empty. Example: "Additional field data".
157
159
  * @description A single nested entry inside {@link IFormAttribute}'s `additionalFields` map.
158
160
  */
159
161
  interface IFormAttributeAdditionalField {
160
- marker: string;
162
+ marker?: string;
161
163
  type: string;
162
164
  value: unknown;
163
165
  }
@@ -314,7 +314,7 @@ interface IOrderProductsData {
314
314
  }
315
315
  ]
316
316
  * @property {string} currency - Currency used to pay for the order. Example: "USD".
317
- * @property {string} totalSum - Total order amount. Example: "150".
317
+ * @property {number} totalSum - Total order amount. Example: 150.
318
318
  * @property {string} [createdDate] - Order creation date. Example: "2023-10-01T12:00:00Z".
319
319
  * @property {string} [statusIdentifier] - Text identifier of order status object (if not set, default status will be assigned). Example: "status-1".
320
320
  * @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name assigned to the created/updated order.
@@ -332,7 +332,7 @@ interface IBaseOrdersEntity {
332
332
  formData: IOrdersFormData[];
333
333
  products: IOrderProductsData[];
334
334
  currency: string;
335
- totalSum: string;
335
+ totalSum: number;
336
336
  createdDate?: string;
337
337
  statusIdentifier?: string;
338
338
  statusLocalizeInfos?: ILocalizeInfo;
@@ -608,10 +608,14 @@ interface IOrderByMarkerEntity {
608
608
  * @interface IOrderStatus
609
609
  * @property {number} [id] - Status identifier. Example: 1.
610
610
  * @property {ILocalizeInfo} [localizeInfos] - Localized information for the status.
611
- * @property {string} [identifier] - Text identifier of the status. Example: "inProgress".
611
+ * @property {string} [identifier] - Text identifier of the status. Example: "inProgress-payment".
612
612
  * @property {number} [position] - Position of the status. Example: 1.
613
613
  * @property {boolean} [isUsed] - Whether the status is in use. Example: true.
614
614
  * @property {boolean} [isDefault] - Whether the status is the default status. Example: true.
615
+ * @property {string} [axis] - Status axis (pipeline) the status belongs to. Example: "payment".
616
+ * @property {boolean} [isCancelFinal] - Whether the status is a final cancellation status. Example: false.
617
+ * @property {boolean} [isFinalSuccess] - Whether the status is a final successful status. Example: true.
618
+ * @property {boolean} [isMapped] - Whether the status is mapped to its axis. Example: true.
615
619
  */
616
620
  interface IOrderStatus {
617
621
  id?: number;
@@ -620,6 +624,10 @@ interface IOrderStatus {
620
624
  position?: number;
621
625
  isUsed?: boolean;
622
626
  isDefault?: boolean;
627
+ axis?: string;
628
+ isCancelFinal?: boolean;
629
+ isFinalSuccess?: boolean;
630
+ isMapped?: boolean;
623
631
  }
624
632
  /**
625
633
  * Interface representing a product in an order preview.
@@ -350,12 +350,12 @@ export default class ProductsApi extends AsyncModules implements IProductsApi {
350
350
  * @param {string} [langCode] - Language code. Default: "en_US".
351
351
  * @param {number} [offset] - Parameter for pagination. Default: 0.
352
352
  * @param {number} [limit] - Parameter for pagination. Default: 30.
353
- * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects.
353
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of found products and total count.
354
354
  * @throws {IError} When isShell=false and an error occurs during the fetch
355
355
  * @description This method performs a semantic (vector) search for products.
356
356
  * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByVectorSearch getProductsByVectorSearch} documentation.
357
357
  */
358
- getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsEntity[] | IError>;
358
+ getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsResponse | IError>;
359
359
  /**
360
360
  * Get products by page url.
361
361
  * @param {string} url - Page url.
@@ -443,7 +443,7 @@ class ProductsApi extends asyncModules_1.default {
443
443
  * @param {string} [langCode] - Language code. Default: "en_US".
444
444
  * @param {number} [offset] - Parameter for pagination. Default: 0.
445
445
  * @param {number} [limit] - Parameter for pagination. Default: 30.
446
- * @returns {Promise<IProductsEntity[] | IError>} Array with ProductEntity objects.
446
+ * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of found products and total count.
447
447
  * @throws {IError} When isShell=false and an error occurs during the fetch
448
448
  * @description This method performs a semantic (vector) search for products.
449
449
  * @see {@link https://js-sdk.oneentry.cloud/docs/products/getProductsByVectorSearch getProductsByVectorSearch} documentation.
@@ -299,11 +299,11 @@ interface IProductsApi {
299
299
  * @param {string} [langCode] - Language code. Default: "en_US".
300
300
  * @param {number} [offset] - Parameter for pagination. Default: 0.
301
301
  * @param {number} [limit] - Parameter for pagination. Default: 30.
302
- * @returns {IProductsEntity[]} Array with ProductEntity objects.
302
+ * @returns {IProductsResponse} A promise that resolves to a products response (items + total) or an error.
303
303
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
304
304
  * @description This method performs a semantic (vector) search for products.
305
305
  */
306
- getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsEntity[] | IError>;
306
+ getProductsByVectorSearch(body: IVectorSearchProducts, langCode?: string, offset?: number, limit?: number): Promise<IProductsResponse | IError>;
307
307
  }
308
308
  /**
309
309
  * @interface IProductsQueryBase
@@ -533,11 +533,13 @@ interface IProductsEntity {
533
533
  "title": "Product 2"
534
534
  }
535
535
  ]
536
+ * @property {number} [totalFound] - Number of products matched before limits are applied; returned by block product endpoints (`similarProducts`, cart/wishlist recommendations, frequently ordered). Optional. Example: 2.
536
537
  * @description This interface defines the structure of a response containing multiple product entities, including the total count and an array of product items.
537
538
  */
538
539
  interface IProductsResponse {
539
540
  items: IProductsEntity[];
540
541
  total: number;
542
+ totalFound?: number;
541
543
  }
542
544
  /**
543
545
  * @interface IProductSearchResult
@@ -644,31 +646,37 @@ interface IProductBlockSettings {
644
646
  }
645
647
  /**
646
648
  * @interface IProductBlockProductConfig
647
- * @property {string | number} quantity - Number of products to render. Example: 9.
648
- * @property {string | number} countElementsPerRow - Products per row. Example: 3.
649
+ * @property {string | number} [quantity] - Number of products to render; absent when the block config is empty. Example: 9.
650
+ * @property {string | number} [countElementsPerRow] - Products per row; absent when the block config is empty. Example: 3.
649
651
  * @property {string | number} [sortType] - Sort field. Example: "price".
650
652
  * @property {string | number} [sortOrder] - Sort direction. Example: "ASC".
651
- * @description Layout config for products inside a {@link IProductBlock}.
653
+ * @description Layout config for products inside a {@link IProductBlock}; an empty object when the block is not configured.
652
654
  */
653
655
  interface IProductBlockProductConfig {
654
- quantity: string | number;
655
- countElementsPerRow: string | number;
656
+ quantity?: string | number;
657
+ countElementsPerRow?: string | number;
656
658
  sortType?: string | number;
657
659
  sortOrder?: string | number;
658
660
  }
659
661
  /**
660
662
  * @interface IProductBlockSimilarRule
661
- * @property {string} property - Product property to match on. Example: "categories".
662
- * @property {string} includes - Match strategy (e.g. "any", "all"). Example: "any".
663
- * @property {string} keywords - Keywords used for the match. Example: "foo,bar".
664
- * @property {string} strict - Strictness flag ("true"/"false") of the match. Example: "false".
663
+ * @property {string} id - Rule identifier (UUID). Example: "812ee2bb-a90f-4743-9643-663f87acedf5".
664
+ * @property {string} title - Rule title; empty string when not set. Example: "".
665
+ * @property {string} attributeMarker - Marker of the product attribute the rule matches on. Example: "nameofproduct_3".
666
+ * @property {string} conditionMarker - Condition operator applied to the attribute. Example: "in".
667
+ * @property {string} conditionValue - Value the condition compares against. Example: "Blue".
668
+ * @property {string} statusMarker - Product status marker the rule is limited to; empty string when not limited. Example: "".
669
+ * @property {string[]} pageUrls - Page URLs the rule is scoped to; empty array when not restricted.
665
670
  * @description Single rule used to compute similar products for a {@link IProductBlock}.
666
671
  */
667
672
  interface IProductBlockSimilarRule {
668
- property: string;
669
- includes: string;
670
- keywords: string;
671
- strict: string;
673
+ id: string;
674
+ title: string;
675
+ attributeMarker: string;
676
+ conditionMarker: string;
677
+ conditionValue: string;
678
+ statusMarker: string;
679
+ pageUrls: string[];
672
680
  }
673
681
  interface IProductBlock {
674
682
  id: number;
@@ -106,6 +106,7 @@ export declare const ProductsResponseSchema: z.ZodObject<{
106
106
  discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
107
107
  }, z.core.$strip>>;
108
108
  total: z.ZodNumber;
109
+ totalFound: z.ZodOptional<z.ZodNumber>;
109
110
  }, z.core.$strip>;
110
111
  /**
111
112
  * Single product response schema
@@ -74,6 +74,7 @@ exports.ProductEntitySchema = zod_1.z.object({
74
74
  exports.ProductsResponseSchema = zod_1.z.object({
75
75
  items: zod_1.z.array(exports.ProductEntitySchema),
76
76
  total: zod_1.z.number(),
77
+ totalFound: zod_1.z.number().optional(),
77
78
  });
78
79
  /**
79
80
  * Single product response schema
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oneentry",
3
- "version": "1.0.157",
3
+ "version": "1.0.158",
4
4
  "description": "OneEntry NPM package",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",