oneentry 1.0.160 → 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 (238) hide show
  1. package/README.md +2 -0
  2. package/changelog.md +61 -0
  3. package/dist/admins/adminsApi.d.ts +15 -1
  4. package/dist/admins/adminsApi.js +29 -0
  5. package/dist/admins/adminsInterfaces.d.ts +39 -1
  6. package/dist/admins/adminsSchemas.d.ts +2 -0
  7. package/dist/admins/adminsSchemas.js +1 -0
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +2 -0
  9. package/dist/auth-provider/authProviderSchemas.d.ts +1 -0
  10. package/dist/base/lazySchema.d.ts +15 -0
  11. package/dist/base/lazySchema.js +20 -0
  12. package/dist/base/validation.d.ts +1 -0
  13. package/dist/base/validation.js +1 -0
  14. package/dist/blocks/blocksApi.d.ts +16 -8
  15. package/dist/blocks/blocksApi.js +24 -15
  16. package/dist/blocks/blocksInterfaces.d.ts +16 -8
  17. package/dist/discounts/discountsApi.d.ts +14 -1
  18. package/dist/discounts/discountsApi.js +21 -0
  19. package/dist/discounts/discountsInterfaces.d.ts +29 -1
  20. package/dist/filters/filtersInterfaces.d.ts +2 -2
  21. package/dist/filters/filtersSchemas.d.ts +1 -1
  22. package/dist/filters/filtersSchemas.js +4 -1
  23. package/dist/forms-data/formsDataApi.d.ts +14 -1
  24. package/dist/forms-data/formsDataApi.js +21 -0
  25. package/dist/forms-data/formsDataInterfaces.d.ts +78 -1
  26. package/dist/index.d.ts +4 -0
  27. package/dist/index.js +3 -0
  28. package/dist/menus/menusInterfaces.d.ts +4 -0
  29. package/dist/menus/menusSchemas.js +2 -0
  30. package/dist/orders/ordersApi.d.ts +15 -1
  31. package/dist/orders/ordersApi.js +22 -0
  32. package/dist/orders/ordersInterfaces.d.ts +29 -1
  33. package/dist/orders/ordersSchemas.d.ts +2 -0
  34. package/dist/orders/ordersSchemas.js +1 -0
  35. package/dist/pages/pagesApi.d.ts +14 -11
  36. package/dist/pages/pagesApi.js +21 -17
  37. package/dist/pages/pagesInterfaces.d.ts +37 -17
  38. package/dist/pages/pagesSchemas.d.ts +3 -7
  39. package/dist/pages/pagesSchemas.js +2 -8
  40. package/dist/payments/paymentsInterfaces.d.ts +2 -2
  41. package/dist/products/productsInterfaces.d.ts +1 -1
  42. package/dist/search/searchApi.d.ts +35 -0
  43. package/dist/search/searchApi.js +86 -0
  44. package/dist/search/searchInterfaces.d.ts +94 -0
  45. package/dist/search/searchInterfaces.js +2 -0
  46. package/dist/search/searchSchemas.d.ts +73 -0
  47. package/dist/search/searchSchemas.js +44 -0
  48. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -2
  49. package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -2
  50. package/dist/templates-preview/templatesPreviewSchemas.js +0 -1
  51. package/dist/types.d.ts +35 -0
  52. package/dist/types.js +2 -0
  53. package/dist/users/usersApi.d.ts +15 -1
  54. package/dist/users/usersApi.js +22 -0
  55. package/dist/users/usersInterfaces.d.ts +41 -1
  56. package/dist/users/usersSchemas.d.ts +1 -0
  57. package/dist/web-socket/lazySocket.d.ts +18 -0
  58. package/dist/web-socket/lazySocket.js +70 -0
  59. package/esm/admins/adminsApi.d.ts +66 -0
  60. package/esm/admins/adminsApi.js +90 -0
  61. package/esm/admins/adminsInterfaces.d.ts +139 -0
  62. package/esm/admins/adminsInterfaces.js +1 -0
  63. package/esm/admins/adminsSchemas.d.ts +50 -0
  64. package/esm/admins/adminsSchemas.js +32 -0
  65. package/esm/attribute-sets/attributeSetsApi.d.ts +67 -0
  66. package/esm/attribute-sets/attributeSetsApi.js +97 -0
  67. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +287 -0
  68. package/esm/attribute-sets/attributeSetsInterfaces.js +1 -0
  69. package/esm/attribute-sets/attributeSetsSchemas.d.ts +84 -0
  70. package/esm/attribute-sets/attributeSetsSchemas.js +66 -0
  71. package/esm/auth-provider/authProviderApi.d.ts +262 -0
  72. package/esm/auth-provider/authProviderApi.js +362 -0
  73. package/esm/auth-provider/authProviderSchemas.d.ts +125 -0
  74. package/esm/auth-provider/authProviderSchemas.js +92 -0
  75. package/esm/auth-provider/authProvidersInterfaces.d.ts +430 -0
  76. package/esm/auth-provider/authProvidersInterfaces.js +1 -0
  77. package/esm/base/asyncModules.d.ts +123 -0
  78. package/esm/base/asyncModules.js +382 -0
  79. package/esm/base/lazySchema.d.ts +15 -0
  80. package/esm/base/lazySchema.js +17 -0
  81. package/esm/base/stateModule.d.ts +35 -0
  82. package/esm/base/stateModule.js +51 -0
  83. package/esm/base/syncModules.d.ts +245 -0
  84. package/esm/base/syncModules.js +555 -0
  85. package/esm/base/timeIntervals.d.ts +95 -0
  86. package/esm/base/timeIntervals.js +317 -0
  87. package/esm/base/utils.d.ts +354 -0
  88. package/esm/base/utils.js +1 -0
  89. package/esm/base/validation.d.ts +99 -0
  90. package/esm/base/validation.js +119 -0
  91. package/esm/blocks/blocksApi.d.ts +260 -0
  92. package/esm/blocks/blocksApi.js +403 -0
  93. package/esm/blocks/blocksInterfaces.d.ts +369 -0
  94. package/esm/blocks/blocksInterfaces.js +1 -0
  95. package/esm/blocks/blocksSchemas.d.ts +213 -0
  96. package/esm/blocks/blocksSchemas.js +40 -0
  97. package/esm/discounts/discountsApi.d.ts +94 -0
  98. package/esm/discounts/discountsApi.js +136 -0
  99. package/esm/discounts/discountsInterfaces.d.ts +295 -0
  100. package/esm/discounts/discountsInterfaces.js +1 -0
  101. package/esm/events/eventsApi.d.ts +108 -0
  102. package/esm/events/eventsApi.js +141 -0
  103. package/esm/events/eventsInterfaces.d.ts +176 -0
  104. package/esm/events/eventsInterfaces.js +1 -0
  105. package/esm/file-uploading/fileUploadingApi.d.ts +91 -0
  106. package/esm/file-uploading/fileUploadingApi.js +127 -0
  107. package/esm/file-uploading/fileUploadingInterfaces.d.ts +116 -0
  108. package/esm/file-uploading/fileUploadingInterfaces.js +1 -0
  109. package/esm/file-uploading/fileUploadingSchemas.d.ts +24 -0
  110. package/esm/file-uploading/fileUploadingSchemas.js +19 -0
  111. package/esm/filters/filtersApi.d.ts +32 -0
  112. package/esm/filters/filtersApi.js +36 -0
  113. package/esm/filters/filtersInterfaces.d.ts +56 -0
  114. package/esm/filters/filtersInterfaces.js +1 -0
  115. package/esm/filters/filtersSchemas.d.ts +32 -0
  116. package/esm/filters/filtersSchemas.js +29 -0
  117. package/esm/forms/formsApi.d.ts +44 -0
  118. package/esm/forms/formsApi.js +54 -0
  119. package/esm/forms/formsInterfaces.d.ts +237 -0
  120. package/esm/forms/formsInterfaces.js +1 -0
  121. package/esm/forms/formsSchemas.d.ts +56 -0
  122. package/esm/forms/formsSchemas.js +32 -0
  123. package/esm/forms-data/formsDataApi.d.ts +124 -0
  124. package/esm/forms-data/formsDataApi.js +210 -0
  125. package/esm/forms-data/formsDataInterfaces.d.ts +674 -0
  126. package/esm/forms-data/formsDataInterfaces.js +1 -0
  127. package/esm/forms-data/formsDataSchemas.d.ts +107 -0
  128. package/esm/forms-data/formsDataSchemas.js +83 -0
  129. package/esm/general-types/generalTypesApi.d.ts +29 -0
  130. package/esm/general-types/generalTypesApi.js +34 -0
  131. package/esm/general-types/generalTypesInterfaces.d.ts +29 -0
  132. package/esm/general-types/generalTypesInterfaces.js +1 -0
  133. package/esm/general-types/generalTypesSchemas.d.ts +68 -0
  134. package/esm/general-types/generalTypesSchemas.js +42 -0
  135. package/esm/index.d.ts +143 -0
  136. package/esm/index.js +124 -0
  137. package/esm/integration-collections/integrationCollectionsApi.d.ts +172 -0
  138. package/esm/integration-collections/integrationCollectionsApi.js +224 -0
  139. package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +317 -0
  140. package/esm/integration-collections/integrationCollectionsInterfaces.js +1 -0
  141. package/esm/integration-collections/integrationCollectionsSchemas.d.ts +84 -0
  142. package/esm/integration-collections/integrationCollectionsSchemas.js +60 -0
  143. package/esm/locales/localesApi.d.ts +28 -0
  144. package/esm/locales/localesApi.js +33 -0
  145. package/esm/locales/localesInterfaces.d.ts +40 -0
  146. package/esm/locales/localesInterfaces.js +1 -0
  147. package/esm/locales/localesSchemas.d.ts +32 -0
  148. package/esm/locales/localesSchemas.js +23 -0
  149. package/esm/menus/menusApi.d.ts +30 -0
  150. package/esm/menus/menusApi.js +35 -0
  151. package/esm/menus/menusInterfaces.d.ts +91 -0
  152. package/esm/menus/menusInterfaces.js +2 -0
  153. package/esm/menus/menusSchemas.d.ts +16 -0
  154. package/esm/menus/menusSchemas.js +27 -0
  155. package/esm/orders/ordersApi.d.ts +213 -0
  156. package/esm/orders/ordersApi.js +288 -0
  157. package/esm/orders/ordersInterfaces.d.ts +765 -0
  158. package/esm/orders/ordersInterfaces.js +1 -0
  159. package/esm/orders/ordersSchemas.d.ts +314 -0
  160. package/esm/orders/ordersSchemas.js +172 -0
  161. package/esm/package.json +4 -0
  162. package/esm/pages/pagesApi.d.ts +163 -0
  163. package/esm/pages/pagesApi.js +397 -0
  164. package/esm/pages/pagesInterfaces.d.ts +327 -0
  165. package/esm/pages/pagesInterfaces.js +1 -0
  166. package/esm/pages/pagesSchemas.d.ts +117 -0
  167. package/esm/pages/pagesSchemas.js +54 -0
  168. package/esm/payments/paymentsApi.d.ts +88 -0
  169. package/esm/payments/paymentsApi.js +122 -0
  170. package/esm/payments/paymentsInterfaces.d.ts +189 -0
  171. package/esm/payments/paymentsInterfaces.js +1 -0
  172. package/esm/payments/paymentsSchemas.d.ts +94 -0
  173. package/esm/payments/paymentsSchemas.js +53 -0
  174. package/esm/product-statuses/productStatusesApi.d.ts +50 -0
  175. package/esm/product-statuses/productStatusesApi.js +68 -0
  176. package/esm/product-statuses/productStatusesInterfaces.d.ts +62 -0
  177. package/esm/product-statuses/productStatusesInterfaces.js +1 -0
  178. package/esm/product-statuses/productStatusesSchemas.d.ts +34 -0
  179. package/esm/product-statuses/productStatusesSchemas.js +27 -0
  180. package/esm/products/productsApi.d.ts +366 -0
  181. package/esm/products/productsApi.js +468 -0
  182. package/esm/products/productsInterfaces.d.ts +723 -0
  183. package/esm/products/productsInterfaces.js +1 -0
  184. package/esm/products/productsSchemas.d.ts +234 -0
  185. package/esm/products/productsSchemas.js +121 -0
  186. package/esm/search/searchApi.d.ts +35 -0
  187. package/esm/search/searchApi.js +47 -0
  188. package/esm/search/searchInterfaces.d.ts +94 -0
  189. package/esm/search/searchInterfaces.js +1 -0
  190. package/esm/search/searchSchemas.d.ts +73 -0
  191. package/esm/search/searchSchemas.js +41 -0
  192. package/esm/sitemap/sitemapApi.d.ts +37 -0
  193. package/esm/sitemap/sitemapApi.js +41 -0
  194. package/esm/sitemap/sitemapInterfaces.d.ts +51 -0
  195. package/esm/sitemap/sitemapInterfaces.js +1 -0
  196. package/esm/subscriptions/subscriptionsApi.d.ts +74 -0
  197. package/esm/subscriptions/subscriptionsApi.js +90 -0
  198. package/esm/subscriptions/subscriptionsInterfaces.d.ts +111 -0
  199. package/esm/subscriptions/subscriptionsInterfaces.js +1 -0
  200. package/esm/subscriptions/subscriptionsSchemas.d.ts +46 -0
  201. package/esm/subscriptions/subscriptionsSchemas.js +38 -0
  202. package/esm/system/systemApi.d.ts +46 -0
  203. package/esm/system/systemApi.js +53 -0
  204. package/esm/system/systemInterfaces.d.ts +29 -0
  205. package/esm/system/systemInterfaces.js +1 -0
  206. package/esm/templates/templatesApi.d.ts +53 -0
  207. package/esm/templates/templatesApi.js +78 -0
  208. package/esm/templates/templatesInterfaces.d.ts +68 -0
  209. package/esm/templates/templatesInterfaces.js +1 -0
  210. package/esm/templates/templatesSchemas.d.ts +48 -0
  211. package/esm/templates/templatesSchemas.js +28 -0
  212. package/esm/templates-preview/templatesPreviewApi.d.ts +40 -0
  213. package/esm/templates-preview/templatesPreviewApi.js +50 -0
  214. package/esm/templates-preview/templatesPreviewInterfaces.d.ts +129 -0
  215. package/esm/templates-preview/templatesPreviewInterfaces.js +1 -0
  216. package/esm/templates-preview/templatesPreviewSchemas.d.ts +79 -0
  217. package/esm/templates-preview/templatesPreviewSchemas.js +43 -0
  218. package/esm/types.d.ts +35 -0
  219. package/esm/types.js +1 -0
  220. package/esm/user-activity/userActivityApi.d.ts +31 -0
  221. package/esm/user-activity/userActivityApi.js +37 -0
  222. package/esm/user-activity/userActivityInterfaces.d.ts +42 -0
  223. package/esm/user-activity/userActivityInterfaces.js +1 -0
  224. package/esm/users/usersApi.d.ts +249 -0
  225. package/esm/users/usersApi.js +312 -0
  226. package/esm/users/usersInterfaces.d.ts +421 -0
  227. package/esm/users/usersInterfaces.js +1 -0
  228. package/esm/users/usersSchemas.d.ts +73 -0
  229. package/esm/users/usersSchemas.js +55 -0
  230. package/esm/web-socket/lazySocket.d.ts +18 -0
  231. package/esm/web-socket/lazySocket.js +67 -0
  232. package/esm/web-socket/wsApi.d.ts +27 -0
  233. package/esm/web-socket/wsApi.js +43 -0
  234. package/esm/web-socket/wsInterfaces.d.ts +16 -0
  235. package/esm/web-socket/wsInterfaces.js +1 -0
  236. package/package.json +5 -1
  237. package/types.d.ts +1 -0
  238. package/types.js +1 -0
package/README.md CHANGED
@@ -58,6 +58,7 @@ const {
58
58
  Payments,
59
59
  Products,
60
60
  ProductStatuses,
61
+ Search,
61
62
  Sitemap,
62
63
  Subscriptions,
63
64
  System,
@@ -276,6 +277,7 @@ Now you can use the following links to jump to specific entries documentation:
276
277
  - [Payments](https://js-sdk.oneentry.cloud/docs/category/payments)
277
278
  - [ProductStatuses](https://js-sdk.oneentry.cloud/docs/category/productstatuses)
278
279
  - [Products](https://js-sdk.oneentry.cloud/docs/category/products-1)
280
+ - [Search](https://js-sdk.oneentry.cloud/docs/category/search)
279
281
  - [Sitemap](https://js-sdk.oneentry.cloud/docs/category/sitemap)
280
282
  - [Subscriptions](https://js-sdk.oneentry.cloud/docs/category/subscriptions)
281
283
  - [System](https://js-sdk.oneentry.cloud/docs/category/system)
package/changelog.md CHANGED
@@ -1,5 +1,66 @@
1
1
  # SDK Change Log
2
2
 
3
+ ## v.1.0.162
4
+
5
+ ### What's New
6
+
7
+ - `distance?: number` is now declared on the entities the vector search endpoints return — `IAdminEntity`, `IDiscountsEntity`, `IOrderByMarkerEntity`, `IPagesEntity`, `IUserEntity`, `IFormDataSearchEntity` — and validated by the matching Zod schemas, mirroring `IProductsEntity.distance`. The field is the cosine distance to the query and is returned **only** when the search body carries `debug: true`.
8
+
9
+ - AttributeSets > `IAttributeSchemaItem.multiselect?: boolean` — for `list` fields, whether several options from `listTitles` may be selected. The panel has always stored the flag; the API only now declares it. Note it is still absent from every attribute the test project returns, so the field is declared but not yet observed in real data.
10
+
11
+ - Menus > `IMenusPages` — `parentType?: 'page' | 'custom' | null` and `itemType?: 'page' | 'custom'` are now declared (and validated by `MenusPagesSchema`). Page ids and custom item ids overlap, so `parentId` alone addresses a parent ambiguously; `itemType` is the value an item's children must pass in `parentType`. Both are already returned by the API.
12
+
13
+ ### What's Changed
14
+
15
+ - Blocks > the eight recommendation methods (`getCartComplement`, `getCartSimilar`, `getPersonalRecommendations`, `getRecentlyViewed`, `getRepeatPurchase`, `getTrending`, `getWishlistSimilar`, `getFrequentlyOrderedProducts`) accept a trailing optional `limit` — the query parameter the endpoints now support. It is not defaulted: when omitted, the block's own quantity setting keeps applying, so existing calls are unchanged.
16
+
17
+ - FormData > `IFormDataSearchEntity` — `formModuleId?: number` is added, and `userIdentifier` / `parentId` are widened to `string | null` / `number | null`. `formModuleId` is absent from the swagger schema but present in every record the endpoint returns; the two nullable fields are declared non-nullable there while the real data returns `null`.
18
+
19
+ ### What's Deleted
20
+
21
+ - **Breaking** — Pages > `getConfigPageByUrl` is removed, along with the `IPageConfig` type and `PageConfigSchema`. The API dropped `GET /api/content/pages/{url}/config` (and its `ConfigPageDto`); the route now answers `404`. Page display settings are available through the `config` field of a page entity.
22
+
23
+ ## v.1.0.161
24
+
25
+ ### What's New
26
+
27
+ - **Search — a new module** wrapping `GET /api/content/search`, the public cross-entity search over names and attribute values of visible records:
28
+
29
+ ```ts
30
+ const { Search } = defineOneEntry('your-url', config)
31
+
32
+ const all = await Search.globalSearch('winter')
33
+ // drilldown: offset/limit require exactly one accessible type, else the API answers 400
34
+ const products = await Search.globalSearch('winter', ['products'], 'visible', 0, 20)
35
+ ```
36
+
37
+ Results come back grouped by entity type (`IGlobalSearchResponse` → `IGlobalSearchGroup[]`), each item carrying the context of how it matched — `matchKind`, `matchedField`, `fragment`, `langCode` and, where relevant, `parent` or `matchedAttribute`. `types` accepts any of the 18 searchable entity types and is sent comma-separated.
38
+
39
+ `offset` and `limit` switch the endpoint into drilldown mode and are accepted only alongside exactly one accessible type in `types` — otherwise the API answers `400`. Omit them (the SDK does not default them) to get every group in full.
40
+
41
+ - **Semantic (vector) search in six more modules**, alongside the existing `Products.getProductsByVectorSearch`. Each takes the same body — `{ queryText, vectorDistanceThreshold?, maxHits?, debug? }` — plus `langCode`, `offset` and `limit`, and returns an `{ items, total }` container:
42
+
43
+ - Admins > `getAdminsByVectorSearch` → `IAdminsResponse`;
44
+ - Discounts > `getDiscountsByVectorSearch` → `IDiscountsResponse`;
45
+ - FormData > `getFormsDataByVectorSearch` → `IFormsDataSearchResponse`;
46
+ - Orders > `getOrdersByVectorSearch` → `IOrdersByMarkerEntity` (searches the authorized user's orders);
47
+ - Pages > `getPagesByVectorSearch` → `IPagesResponse`;
48
+ - Users > `getUsersByVectorSearch` → `IUsersResponse` (requires user authorization).
49
+
50
+ - FormData > `IFormDataSearchEntity` — new exported type for the records returned by the form data vector search. It carries the moderation and sender fields of the raw record (`status`, `ip`, `fingerprint`, `isUserAdmin`, `userIdentifier`, `entityIdentifier`, `parentId`), which `IFormDataEntity` does not declare.
51
+
52
+ ### What's Changed
53
+
54
+ - Payments > `IAccountsEntity.type` — the union is widened from `'stripe' | 'custom'` to `'stripe' | 'yookassa' | 'midtrans' | 'xendit' | 'custom'`, matching the payment providers the API actually reports. Accounts of these types were already returned; the declared type simply did not list them.
55
+
56
+ - Products > `IFilterParams.conditionMarker` — three operators the API accepts are now declared: `'pat'` (matches pattern), `'same'` (matches the value exactly) and `'same_part'` (matches a part of the value exactly). Filter bodies using them were valid before but did not type-check.
57
+
58
+ - Filters > `IContentFilterItem.value` — widened from `string | null` to `string | string[] | null` (and `ContentFilterItemSchema` accepts both). A range attribute node returns the array of values within the range; the other node types keep returning a single string or `null`.
59
+
60
+ ### What's Deleted
61
+
62
+ - **Breaking** — TemplatePreviews > `ITemplatesPreviewEntity.attributeSetIdentifier` is removed, along with its Zod schema field. The API no longer returns it — it is absent from every template preview in the test project and has been dropped from the endpoint's response schema.
63
+
3
64
  ## v.1.0.160
4
65
 
5
66
  > Re-release of v.1.0.159. The 1.0.159 tarball was published from a stale build directory: the files changed by that release were updated, but the files it added (`dist/base/lazySchema.js`, `dist/web-socket/lazySocket.js`, `dist/types.js`, the root `types.js` / `types.d.ts` stubs and the whole `esm/` build) never made it into the package, so `require('oneentry')` threw `Cannot find module '../base/lazySchema'`. Use 1.0.160 instead — same feature set, complete build.
@@ -2,7 +2,7 @@ import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
4
  import type { IFilterParams } from '../products/productsInterfaces';
5
- import type { IAdminEntity, IAdmins } from './adminsInterfaces';
5
+ import type { IAdminEntity, IAdmins, IAdminsResponse, IAdminsVectorSearch } from './adminsInterfaces';
6
6
  /**
7
7
  * Controllers for working with users - admins.
8
8
  * @class AdminsApi
@@ -13,6 +13,7 @@ import type { IAdminEntity, IAdmins } from './adminsInterfaces';
13
13
  export default class AdminsApi extends AsyncModules implements IAdmins {
14
14
  protected state: StateModule;
15
15
  protected _url: string;
16
+ private _adminsUrl;
16
17
  /**
17
18
  * Initializes the AdminsApi with the provided state module.
18
19
  * @class
@@ -49,4 +50,17 @@ export default class AdminsApi extends AsyncModules implements IAdmins {
49
50
  * @see {@link https://js-sdk.oneentry.cloud/docs/admins/getAdminsInfo getAdminsInfo} documentation.
50
51
  */
51
52
  getAdminsInfo(body?: IFilterParams[], langCode?: string, offset?: number, limit?: number): Promise<IAdminEntity[] | IError>;
53
+ /**
54
+ * Semantic (vector) search for admins.
55
+ * @handleName getAdminsByVectorSearch
56
+ * @param {IAdminsVectorSearch} body - Vector search body. Example: `{ queryText: "content manager" }`.
57
+ * @param {string} [langCode] - Language code. Default: "en_US".
58
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
59
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
60
+ * @returns {Promise<IAdminsResponse | IError>} Returns an object with an array of found admins and total count.
61
+ * @throws {IError} When isShell=false and an error occurs during the fetch
62
+ * @description This method performs a semantic (vector) search for admins.
63
+ * @see {@link https://js-sdk.oneentry.cloud/docs/admins/getAdminsByVectorSearch getAdminsByVectorSearch} documentation.
64
+ */
65
+ getAdminsByVectorSearch(body: IAdminsVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IAdminsResponse | IError>;
52
66
  }
@@ -57,6 +57,7 @@ class AdminsApi extends asyncModules_1.default {
57
57
  constructor(state) {
58
58
  super(state);
59
59
  this._url = state.url + '/api/content/admins/all';
60
+ this._adminsUrl = state.url + '/api/content/admins';
60
61
  }
61
62
  /**
62
63
  * Get all admins objects with filters.
@@ -96,5 +97,33 @@ class AdminsApi extends asyncModules_1.default {
96
97
  const validated = await this._validateResponse(response, schema('AdminsResponseSchema'));
97
98
  return this._normalizeData(validated, langCode);
98
99
  }
100
+ /**
101
+ * Semantic (vector) search for admins.
102
+ * @handleName getAdminsByVectorSearch
103
+ * @param {IAdminsVectorSearch} body - Vector search body. Example: `{ queryText: "content manager" }`.
104
+ * @param {string} [langCode] - Language code. Default: "en_US".
105
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
106
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
107
+ * @returns {Promise<IAdminsResponse | IError>} Returns an object with an array of found admins and total count.
108
+ * @throws {IError} When isShell=false and an error occurs during the fetch
109
+ * @description This method performs a semantic (vector) search for admins.
110
+ * @see {@link https://js-sdk.oneentry.cloud/docs/admins/getAdminsByVectorSearch getAdminsByVectorSearch} documentation.
111
+ */
112
+ async getAdminsByVectorSearch(body, langCode = this.state.lang, offset = 0, limit = 30) {
113
+ const query = {
114
+ langCode,
115
+ offset,
116
+ limit,
117
+ };
118
+ const savedUrl = this._url;
119
+ this._url = this._adminsUrl;
120
+ try {
121
+ const response = await this._fetchPost(`/vector/search?` + this._queryParamsToString(query), body);
122
+ return this._normalizeData(response, langCode);
123
+ }
124
+ finally {
125
+ this._url = savedUrl;
126
+ }
127
+ }
99
128
  }
100
129
  exports.default = AdminsApi;
@@ -33,6 +33,42 @@ interface IAdmins {
33
33
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
34
  */
35
35
  getAdminsInfo(body?: IFilterParams[], langCode?: string, offset?: number, limit?: number): Promise<IAdminEntity[] | IError>;
36
+ /**
37
+ * Semantic (vector) search for admins.
38
+ * @handleName getAdminsByVectorSearch
39
+ * @param {IAdminsVectorSearch} body - Vector search body. Example: `{ queryText: "content manager" }`.
40
+ * @param {string} [langCode] - Language code. Default: "en_US".
41
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
42
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
43
+ * @returns {IAdminsResponse} Returns an object with an array of found admins and total count.
44
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
45
+ */
46
+ getAdminsByVectorSearch(body: IAdminsVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IAdminsResponse | IError>;
47
+ }
48
+ /**
49
+ * Body for semantic (vector) admin search.
50
+ * @interface IAdminsVectorSearch
51
+ * @property {string} queryText - Natural-language search query. Example: "content manager".
52
+ * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
53
+ * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
54
+ * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
55
+ * @description Body for the admins vector/search endpoint.
56
+ */
57
+ interface IAdminsVectorSearch {
58
+ queryText: string;
59
+ vectorDistanceThreshold?: number;
60
+ maxHits?: number;
61
+ debug?: boolean;
62
+ }
63
+ /**
64
+ * @interface IAdminsResponse
65
+ * @property {IAdminEntity[]} items - Array of found admin objects.
66
+ * @property {number} total - Total number of found records. Example: 100.
67
+ * @description This interface defines the structure of a response containing multiple admin entities, including the total count and an array of admin items.
68
+ */
69
+ interface IAdminsResponse {
70
+ items: IAdminEntity[];
71
+ total: number;
36
72
  }
37
73
  /**
38
74
  * Interface representing a Position entity.
@@ -73,6 +109,7 @@ interface IPosition {
73
109
  }
74
110
  ]
75
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.
76
113
  * @description This interface captures the essential details and additional attributes of an admin entity.
77
114
  */
78
115
  interface IAdminEntity {
@@ -84,6 +121,7 @@ interface IAdminEntity {
84
121
  isSync: boolean;
85
122
  attributeValues: IAttributeValues;
86
123
  moduleFormConfigs?: IFormConfig[];
124
+ distance?: number;
87
125
  }
88
126
  /**
89
127
  * Interface representing a query for fetching admin data.
@@ -98,4 +136,4 @@ interface IAdminQuery {
98
136
  limit: number;
99
137
  offset: number;
100
138
  }
101
- export type { IAdminEntity, IAdminQuery, IAdmins, IPosition };
139
+ export type { IAdminEntity, IAdminQuery, IAdmins, IAdminsResponse, IAdminsVectorSearch, IPosition, };
@@ -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>>;
@@ -27,6 +27,7 @@ exports.AdminEntitySchema = zod_1.z.object({
27
27
  isSync: zod_1.z.boolean(),
28
28
  attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.record(zod_1.z.string(), AttributeValueSchema)),
29
29
  moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
30
+ distance: zod_1.z.number().optional(),
30
31
  });
31
32
  /**
32
33
  * 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
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Creates a lazy schema loader bound to a module of Zod schemas.
3
+ *
4
+ * Validation is opt-in (`config.validation.enabled`, `false` by default), yet a static
5
+ * `import { PageEntitySchema } from './pagesSchemas'` would put Zod into the import graph
6
+ * of every consumer regardless. Binding the module behind a dynamic `import()` keeps it —
7
+ * and Zod — out of the bundle until a request actually needs to be validated.
8
+ * @param {() => Promise<TSchemas>} importSchemas - Dynamic import of the module holding the schemas.
9
+ * @returns {(name: keyof TSchemas) => () => Promise<TSchemas[keyof TSchemas]>} Function that takes
10
+ * a schema name and returns a loader for that schema.
11
+ * @description Usage: `const schema = createSchemaLoader(() => import('./pagesSchemas'))`,
12
+ * then `this._validateResponse(data, schema('PageEntitySchema'))`. The schema name is
13
+ * checked against the module's exports, so a typo is a compile-time error.
14
+ */
15
+ export default function createSchemaLoader<TSchemas>(importSchemas: () => Promise<TSchemas>): <TName extends keyof TSchemas>(name: TName) => () => Promise<TSchemas[TName]>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = createSchemaLoader;
4
+ /**
5
+ * Creates a lazy schema loader bound to a module of Zod schemas.
6
+ *
7
+ * Validation is opt-in (`config.validation.enabled`, `false` by default), yet a static
8
+ * `import { PageEntitySchema } from './pagesSchemas'` would put Zod into the import graph
9
+ * of every consumer regardless. Binding the module behind a dynamic `import()` keeps it —
10
+ * and Zod — out of the bundle until a request actually needs to be validated.
11
+ * @param {() => Promise<TSchemas>} importSchemas - Dynamic import of the module holding the schemas.
12
+ * @returns {(name: keyof TSchemas) => () => Promise<TSchemas[keyof TSchemas]>} Function that takes
13
+ * a schema name and returns a loader for that schema.
14
+ * @description Usage: `const schema = createSchemaLoader(() => import('./pagesSchemas'))`,
15
+ * then `this._validateResponse(data, schema('PageEntitySchema'))`. The schema name is
16
+ * checked against the module's exports, so a typo is a compile-time error.
17
+ */
18
+ function createSchemaLoader(importSchemas) {
19
+ return (name) => () => importSchemas().then((schemas) => schemas[name]);
20
+ }
@@ -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
@@ -53,6 +53,7 @@ exports.UserEntitySchema = zod_1.z.object({
53
53
  state: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
54
54
  moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
55
55
  rating: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
56
+ distance: zod_1.z.number().optional(),
56
57
  });
57
58
  /**
58
59
  * 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
@@ -223,14 +223,16 @@ class BlocksApi extends asyncModules_1.default {
223
223
  * @param {string} [langCode] - Language code. Default: "en_US".
224
224
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
225
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.
226
227
  * @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
227
228
  * @throws {IError} When isShell=false and an error occurs during the fetch
228
229
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getFrequentlyOrderedProducts getFrequentlyOrderedProducts} documentation.
229
230
  */
230
- async getFrequentlyOrderedProducts(productId, marker, langCode = this.state.lang, signPrice) {
231
+ async getFrequentlyOrderedProducts(productId, marker, langCode = this.state.lang, signPrice, limit) {
231
232
  const query = {
232
233
  langCode,
233
234
  signPrice,
235
+ limit,
234
236
  };
235
237
  const data = await this._fetchGet(`/${marker}/products/${productId}/frequently-ordered?` +
236
238
  this._queryParamsToString(query));
@@ -258,12 +260,13 @@ class BlocksApi extends asyncModules_1.default {
258
260
  * @param {string} [langCode] - Language code. Default: "en_US".
259
261
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
260
262
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
263
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
261
264
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
262
265
  * @throws {IError} When isShell=false and an error occurs during the fetch
263
266
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
264
267
  */
265
- async getCartComplement(marker, langCode = this.state.lang, signPrice) {
266
- const query = { langCode, signPrice };
268
+ async getCartComplement(marker, langCode = this.state.lang, signPrice, limit) {
269
+ const query = { langCode, signPrice, limit };
267
270
  const data = await this._fetchGet(`/${marker}/cart-complement?` + this._queryParamsToString(query));
268
271
  return this._normalizeData(data);
269
272
  }
@@ -292,12 +295,13 @@ class BlocksApi extends asyncModules_1.default {
292
295
  * @param {string} [langCode] - Language code. Default: "en_US".
293
296
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
294
297
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
298
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
295
299
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
296
300
  * @throws {IError} When isShell=false and an error occurs during the fetch
297
301
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
298
302
  */
299
- async getCartSimilar(marker, langCode = this.state.lang, signPrice) {
300
- const query = { langCode, signPrice };
303
+ async getCartSimilar(marker, langCode = this.state.lang, signPrice, limit) {
304
+ const query = { langCode, signPrice, limit };
301
305
  const data = await this._fetchGet(`/${marker}/cart-similar?` + this._queryParamsToString(query));
302
306
  return this._normalizeData(data);
303
307
  }
@@ -326,12 +330,13 @@ class BlocksApi extends asyncModules_1.default {
326
330
  * @param {string} [langCode] - Language code. Default: "en_US".
327
331
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
328
332
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
333
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
329
334
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
330
335
  * @throws {IError} When isShell=false and an error occurs during the fetch
331
336
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
332
337
  */
333
- async getPersonalRecommendations(marker, langCode = this.state.lang, signPrice) {
334
- const query = { langCode, signPrice };
338
+ async getPersonalRecommendations(marker, langCode = this.state.lang, signPrice, limit) {
339
+ const query = { langCode, signPrice, limit };
335
340
  const data = await this._fetchGet(`/${marker}/personal-recommendations?` + this._queryParamsToString(query));
336
341
  return this._normalizeData(data);
337
342
  }
@@ -342,12 +347,13 @@ class BlocksApi extends asyncModules_1.default {
342
347
  * @param {string} [langCode] - Language code. Default: "en_US".
343
348
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
344
349
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
350
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
345
351
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
346
352
  * @throws {IError} When isShell=false and an error occurs during the fetch
347
353
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
348
354
  */
349
- async getRecentlyViewed(marker, langCode = this.state.lang, signPrice) {
350
- const query = { langCode, signPrice };
355
+ async getRecentlyViewed(marker, langCode = this.state.lang, signPrice, limit) {
356
+ const query = { langCode, signPrice, limit };
351
357
  const data = await this._fetchGet(`/${marker}/recently-viewed?` + this._queryParamsToString(query));
352
358
  return this._normalizeData(data);
353
359
  }
@@ -358,12 +364,13 @@ class BlocksApi extends asyncModules_1.default {
358
364
  * @param {string} [langCode] - Language code. Default: "en_US".
359
365
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
360
366
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
367
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
361
368
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
362
369
  * @throws {IError} When isShell=false and an error occurs during the fetch
363
370
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
364
371
  */
365
- async getRepeatPurchase(marker, langCode = this.state.lang, signPrice) {
366
- const query = { langCode, signPrice };
372
+ async getRepeatPurchase(marker, langCode = this.state.lang, signPrice, limit) {
373
+ const query = { langCode, signPrice, limit };
367
374
  const data = await this._fetchGet(`/${marker}/repeat-purchase?` + this._queryParamsToString(query));
368
375
  return this._normalizeData(data);
369
376
  }
@@ -386,12 +393,13 @@ class BlocksApi extends asyncModules_1.default {
386
393
  * @param {string} [langCode] - Language code. Default: "en_US".
387
394
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
388
395
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
396
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
389
397
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
390
398
  * @throws {IError} When isShell=false and an error occurs during the fetch
391
399
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
392
400
  */
393
- async getTrending(marker, langCode = this.state.lang, signPrice) {
394
- const query = { langCode, signPrice };
401
+ async getTrending(marker, langCode = this.state.lang, signPrice, limit) {
402
+ const query = { langCode, signPrice, limit };
395
403
  const data = await this._fetchGet(`/${marker}/trending?` + this._queryParamsToString(query));
396
404
  return this._normalizeData(data);
397
405
  }
@@ -402,12 +410,13 @@ class BlocksApi extends asyncModules_1.default {
402
410
  * @param {string} [langCode] - Language code. Default: "en_US".
403
411
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
404
412
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
413
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
405
414
  * @returns {Promise<IProductsResponse | IError>} Returns an object with an array of products, total count and totalFound.
406
415
  * @throws {IError} When isShell=false and an error occurs during the fetch
407
416
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
408
417
  */
409
- async getWishlistSimilar(marker, langCode = this.state.lang, signPrice) {
410
- const query = { langCode, signPrice };
418
+ async getWishlistSimilar(marker, langCode = this.state.lang, signPrice, limit) {
419
+ const query = { langCode, signPrice, limit };
411
420
  const data = await this._fetchGet(`/${marker}/wishlist-similar?` + this._queryParamsToString(query));
412
421
  return this._normalizeData(data);
413
422
  }