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
@@ -48,10 +48,11 @@ interface IBlocks {
48
48
  * @param {string} [langCode] - Language code. Default: "en_US".
49
49
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
50
50
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
51
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
51
52
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total) or an error.
52
53
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
53
54
  */
54
- getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
55
+ getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
55
56
  /**
56
57
  * Get "complete your cart" products by the cart from context (auth user or guest).
57
58
  * @handleName getCartComplement
@@ -59,10 +60,11 @@ interface IBlocks {
59
60
  * @param {string} [langCode] - Language code. Default: "en_US".
60
61
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
61
62
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
63
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
62
64
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
63
65
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
64
66
  */
65
- getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
67
+ getCartComplement(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
66
68
  /**
67
69
  * Get "complete your cart" products by an explicit list of productIds (POST body).
68
70
  * @handleName getCartComplementByProductIds
@@ -84,10 +86,11 @@ interface IBlocks {
84
86
  * @param {string} [langCode] - Language code. Default: "en_US".
85
87
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
86
88
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
89
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
87
90
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
88
91
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
89
92
  */
90
- getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
93
+ getCartSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
91
94
  /**
92
95
  * Get "similar to cart" products by an explicit list of productIds (POST body).
93
96
  * @handleName getCartSimilarByProductIds
@@ -109,10 +112,11 @@ interface IBlocks {
109
112
  * @param {string} [langCode] - Language code. Default: "en_US".
110
113
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
111
114
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
115
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
112
116
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
113
117
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
114
118
  */
115
- getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
119
+ getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
116
120
  /**
117
121
  * Get recently viewed products.
118
122
  * @handleName getRecentlyViewed
@@ -120,10 +124,11 @@ interface IBlocks {
120
124
  * @param {string} [langCode] - Language code. Default: "en_US".
121
125
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
122
126
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
127
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
123
128
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
124
129
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
125
130
  */
126
- getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
131
+ getRecentlyViewed(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
127
132
  /**
128
133
  * Get products for repeat purchase.
129
134
  * @handleName getRepeatPurchase
@@ -131,10 +136,11 @@ interface IBlocks {
131
136
  * @param {string} [langCode] - Language code. Default: "en_US".
132
137
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
133
138
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
139
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
134
140
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
135
141
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
136
142
  */
137
- getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
143
+ getRepeatPurchase(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
138
144
  /**
139
145
  * Get the block's slides tree as a flat pre-order array (slider_block only).
140
146
  * @handleName getSlides
@@ -150,10 +156,11 @@ interface IBlocks {
150
156
  * @param {string} [langCode] - Language code. Default: "en_US".
151
157
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
152
158
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
159
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
153
160
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
154
161
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
155
162
  */
156
- getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
163
+ getTrending(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
157
164
  /**
158
165
  * Get "similar to wishlist" products by the wishlist from context (auth user or guest).
159
166
  * @handleName getWishlistSimilar
@@ -161,10 +168,11 @@ interface IBlocks {
161
168
  * @param {string} [langCode] - Language code. Default: "en_US".
162
169
  * @param {string} [signPrice] - Order storage marker for price fixing. If the parameter is set, the price is fixed for a certain time.
163
170
  * @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
171
+ * @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
164
172
  * @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
165
173
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
166
174
  */
167
- getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
175
+ getWishlistSimilar(marker: string, langCode?: string, signPrice?: string, limit?: number): Promise<IProductsResponse | IError>;
168
176
  /**
169
177
  * Get "similar to wishlist" products by an explicit list of productIds (POST body).
170
178
  * @handleName getWishlistSimilarByProductIds
@@ -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 { IBonusBalanceEntity, IBonusTransactionEntity, IBonusTransactionType, ICouponValidationResult, IDiscountsApi, IDiscountsEntity, IDiscountsResponse, IDiscountType } from './discountsInterfaces';
4
+ import type { IBonusBalanceEntity, IBonusTransactionEntity, IBonusTransactionType, ICouponValidationResult, IDiscountsApi, IDiscountsEntity, IDiscountsResponse, IDiscountsVectorSearch, IDiscountType } from './discountsInterfaces';
5
5
  /**
6
6
  * Controllers for working with events
7
7
  * @handle /api/content/events
@@ -78,4 +78,17 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
78
78
  * @see {@link https://js-sdk.oneentry.cloud/docs/discounts/validateDiscountsCoupon validateDiscountsCoupon} documentation.
79
79
  */
80
80
  validateDiscountsCoupon(code: string): Promise<ICouponValidationResult | IError>;
81
+ /**
82
+ * Semantic (vector) search for discounts.
83
+ * @handleName getDiscountsByVectorSearch
84
+ * @param {IDiscountsVectorSearch} body - Vector search body. Example: `{ queryText: "winter sale" }`.
85
+ * @param {string} [langCode] - Language code. Default: "en_US".
86
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
87
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
88
+ * @returns {Promise<IDiscountsResponse | IError>} Returns an object with an array of found discounts and total count.
89
+ * @throws {IError} When isShell=false and an error occurs during the fetch
90
+ * @description This method performs a semantic (vector) search for discounts.
91
+ * @see {@link https://js-sdk.oneentry.cloud/docs/discounts/getDiscountsByVectorSearch getDiscountsByVectorSearch} documentation.
92
+ */
93
+ getDiscountsByVectorSearch(body: IDiscountsVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IDiscountsResponse | IError>;
81
94
  }
@@ -117,5 +117,26 @@ class DiscountsApi extends asyncModules_1.default {
117
117
  const data = await this._fetchGet(`/coupons/validate?` + this._queryParamsToString(query));
118
118
  return this._normalizeData(data);
119
119
  }
120
+ /**
121
+ * Semantic (vector) search for discounts.
122
+ * @handleName getDiscountsByVectorSearch
123
+ * @param {IDiscountsVectorSearch} body - Vector search body. Example: `{ queryText: "winter sale" }`.
124
+ * @param {string} [langCode] - Language code. Default: "en_US".
125
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
126
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
127
+ * @returns {Promise<IDiscountsResponse | IError>} Returns an object with an array of found discounts and total count.
128
+ * @throws {IError} When isShell=false and an error occurs during the fetch
129
+ * @description This method performs a semantic (vector) search for discounts.
130
+ * @see {@link https://js-sdk.oneentry.cloud/docs/discounts/getDiscountsByVectorSearch getDiscountsByVectorSearch} documentation.
131
+ */
132
+ async getDiscountsByVectorSearch(body, langCode = this.state.lang, offset = 0, limit = 30) {
133
+ const query = {
134
+ langCode,
135
+ offset,
136
+ limit,
137
+ };
138
+ const data = await this._fetchPost(`/vector/search?` + this._queryParamsToString(query), body);
139
+ return this._normalizeData(data, langCode);
140
+ }
120
141
  }
121
142
  exports.default = DiscountsApi;
@@ -59,6 +59,32 @@ interface IDiscountsApi {
59
59
  * @throws {IError} When isShell=false and an error occurs during the fetch
60
60
  */
61
61
  getBonusHistory(type?: IBonusTransactionType, dateFrom?: string, dateTo?: string, discountId?: number, moduleId?: number, isAdmin?: boolean): Promise<IBonusTransactionEntity[] | IError>;
62
+ /**
63
+ * Semantic (vector) search for discounts.
64
+ * @handleName getDiscountsByVectorSearch
65
+ * @param {IDiscountsVectorSearch} body - Vector search body. Example: `{ queryText: "winter sale" }`.
66
+ * @param {string} [langCode] - Language code. Default: "en_US".
67
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
68
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
69
+ * @returns {Promise<IDiscountsResponse | IError>} Returns an object with an array of found discounts and total count.
70
+ * @throws {IError} When isShell=false and an error occurs during the fetch
71
+ */
72
+ getDiscountsByVectorSearch(body: IDiscountsVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IDiscountsResponse | IError>;
73
+ }
74
+ /**
75
+ * Body for semantic (vector) discount search.
76
+ * @interface IDiscountsVectorSearch
77
+ * @property {string} queryText - Natural-language search query. Example: "winter sale".
78
+ * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
79
+ * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
80
+ * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
81
+ * @description Body for the discounts vector/search endpoint.
82
+ */
83
+ interface IDiscountsVectorSearch {
84
+ queryText: string;
85
+ vectorDistanceThreshold?: number;
86
+ maxHits?: number;
87
+ debug?: boolean;
62
88
  }
63
89
  /**
64
90
  * Query parameters for fetching discounts.
@@ -108,6 +134,7 @@ interface IDiscountCondition {
108
134
  * @property {Record<string, unknown>} [bonusEvent] - Bonus event configuration.
109
135
  * @property {number} [position] - Position number for sorting. Example: 1.
110
136
  * @property {number | string} [total] - Total count of related entries. Example: "1".
137
+ * @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.
111
138
  */
112
139
  interface IDiscountsEntity {
113
140
  id: number;
@@ -131,6 +158,7 @@ interface IDiscountsEntity {
131
158
  bonusEvent?: Record<string, unknown> | null;
132
159
  position?: number;
133
160
  total?: number | string;
161
+ distance?: number;
134
162
  }
135
163
  /**
136
164
  * @interface IDiscountValue
@@ -264,4 +292,4 @@ interface IBonusTransactionEntity {
264
292
  interface IBonusBalanceEntity {
265
293
  balance: number;
266
294
  }
267
- export type { IBonusBalanceEntity, IBonusHistoryQuery, IBonusTransactionEntity, IBonusTransactionType, ICouponEntity, ICouponValidationResult, IDiscountByMarkerQuery, IDiscountCondition, IDiscountsApi, IDiscountsEntity, IDiscountsQuery, IDiscountsResponse, IDiscountsValidateCoupon, IDiscountType, IDiscountValue, };
295
+ export type { IBonusBalanceEntity, IBonusHistoryQuery, IBonusTransactionEntity, IBonusTransactionType, ICouponEntity, ICouponValidationResult, IDiscountByMarkerQuery, IDiscountCondition, IDiscountsApi, IDiscountsEntity, IDiscountsQuery, IDiscountsResponse, IDiscountsValidateCoupon, IDiscountsVectorSearch, IDiscountType, IDiscountValue, };
@@ -28,7 +28,7 @@ type TContentFilterItemType = 'page' | 'product' | 'admin' | 'attribute' | 'disc
28
28
  * @property {string | null} [marker] - Marker of the linked entity, or null for type=page. Example: "about".
29
29
  * @property {string | null} [url] - Page URL (only for type=page; null otherwise). Example: "about".
30
30
  * @property {ILocalizeInfo} [localizeInfos] - Localized info of the linked entity in the requested locale.
31
- * @property {string | null} [value] - Unified node value (e.g. discount value, attribute title); null otherwise. Example: "10".
31
+ * @property {string | string[] | null} [value] - Unified node value: an array of values in range for a range attribute, a resolved title for a legacy checkbox attribute, the discount value for discount/personal-discount/bonus, the object id for product/admin/payment-method, and null for a page. Example: ["25", "50", "75"].
32
32
  * @property {number} [position] - Numeric position (per-level). Example: 1.
33
33
  * @property {IContentFilterItem[]} [children] - Nested tree nodes (regular and custom items in a single array).
34
34
  * @description A single node of a content filter items tree.
@@ -38,7 +38,7 @@ interface IContentFilterItem {
38
38
  marker?: string | null;
39
39
  url?: string | null;
40
40
  localizeInfos?: ILocalizeInfo;
41
- value?: string | null;
41
+ value?: string | string[] | null;
42
42
  position?: number;
43
43
  children?: IContentFilterItem[];
44
44
  }
@@ -12,7 +12,7 @@ type IContentFilterItemRaw = {
12
12
  marker?: string | null;
13
13
  url?: string | null;
14
14
  localizeInfos?: Record<string, unknown>;
15
- value?: string | null;
15
+ value?: string | string[] | null;
16
16
  position?: number;
17
17
  children?: IContentFilterItemRaw[];
18
18
  };
@@ -15,7 +15,10 @@ exports.ContentFilterItemSchema = zod_1.z.lazy(() => zod_1.z.object({
15
15
  marker: zod_1.z.string().nullable().optional(),
16
16
  url: zod_1.z.string().nullable().optional(),
17
17
  localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
18
- value: zod_1.z.string().nullable().optional(),
18
+ value: zod_1.z
19
+ .union([zod_1.z.string(), zod_1.z.array(zod_1.z.string())])
20
+ .nullable()
21
+ .optional(),
19
22
  position: zod_1.z.number().optional(),
20
23
  children: zod_1.z.array(exports.ContentFilterItemSchema).optional(),
21
24
  }));
@@ -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 { IBodyPostFormData, IFormsByMarkerDataEntity, IFormsData, IPostFormResponse, IUpdateFormsData } from './formsDataInterfaces';
4
+ import type { IBodyPostFormData, IFormsByMarkerDataEntity, IFormsData, IFormsDataSearchResponse, IFormsDataVectorSearch, IPostFormResponse, IUpdateFormsData } from './formsDataInterfaces';
5
5
  /**
6
6
  * Controllers for working with form data
7
7
  * @handle /api/content/form-data
@@ -108,4 +108,17 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
108
108
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/deleteFormsDataByid deleteFormsDataByid} documentation.
109
109
  */
110
110
  deleteFormsDataByid(id: number): Promise<boolean | IError>;
111
+ /**
112
+ * Semantic (vector) search for form data.
113
+ * @handleName getFormsDataByVectorSearch
114
+ * @param {IFormsDataVectorSearch} body - Vector search body. Example: `{ queryText: "order confirmation" }`.
115
+ * @param {string} [langCode] - Language code. Default: "en_US".
116
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
117
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
118
+ * @returns {Promise<IFormsDataSearchResponse | IError>} Returns an object with an array of found form data records and total count.
119
+ * @throws {IError} When isShell=false and an error occurs during the fetch
120
+ * @description This method performs a semantic (vector) search for form data.
121
+ * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/getFormsDataByVectorSearch getFormsDataByVectorSearch} documentation.
122
+ */
123
+ getFormsDataByVectorSearch(body: IFormsDataVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataSearchResponse | IError>;
111
124
  }
@@ -224,5 +224,26 @@ class FormsDataApi extends asyncModules_1.default {
224
224
  const result = await this._fetchDelete(`/${id}`);
225
225
  return result;
226
226
  }
227
+ /**
228
+ * Semantic (vector) search for form data.
229
+ * @handleName getFormsDataByVectorSearch
230
+ * @param {IFormsDataVectorSearch} body - Vector search body. Example: `{ queryText: "order confirmation" }`.
231
+ * @param {string} [langCode] - Language code. Default: "en_US".
232
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
233
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
234
+ * @returns {Promise<IFormsDataSearchResponse | IError>} Returns an object with an array of found form data records and total count.
235
+ * @throws {IError} When isShell=false and an error occurs during the fetch
236
+ * @description This method performs a semantic (vector) search for form data.
237
+ * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/getFormsDataByVectorSearch getFormsDataByVectorSearch} documentation.
238
+ */
239
+ async getFormsDataByVectorSearch(body, langCode = this.state.lang, offset = 0, limit = 30) {
240
+ const query = {
241
+ langCode,
242
+ offset,
243
+ limit,
244
+ };
245
+ const result = await this._fetchPost(`/vector/search?` + this._queryParamsToString(query), body);
246
+ return this._normalizeData(result, langCode);
247
+ }
227
248
  }
228
249
  exports.default = FormsDataApi;
@@ -70,6 +70,83 @@ interface IFormsData {
70
70
  * @description This method retrieves form data by its marker.
71
71
  */
72
72
  getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsByMarkerDataEntity | IError>;
73
+ /**
74
+ * Semantic (vector) search for form data.
75
+ * @handleName getFormsDataByVectorSearch
76
+ * @param {IFormsDataVectorSearch} body - Vector search body. Example: `{ queryText: "order confirmation" }`.
77
+ * @param {string} [langCode] - Language code. Default: "en_US".
78
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
79
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
80
+ * @returns {Promise<IFormsDataSearchResponse | IError>} Returns an object with an array of found form data records and total count.
81
+ * @throws {IError} When isShell=false and an error occurs during the fetch
82
+ */
83
+ getFormsDataByVectorSearch(body: IFormsDataVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataSearchResponse | IError>;
84
+ }
85
+ /**
86
+ * Body for semantic (vector) form data search.
87
+ * @interface IFormsDataVectorSearch
88
+ * @property {string} queryText - Natural-language search query. Example: "order confirmation".
89
+ * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
90
+ * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
91
+ * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
92
+ * @description Body for the form-data vector/search endpoint.
93
+ */
94
+ interface IFormsDataVectorSearch {
95
+ queryText: string;
96
+ vectorDistanceThreshold?: number;
97
+ maxHits?: number;
98
+ debug?: boolean;
99
+ }
100
+ /**
101
+ * Represents a form data record returned by the vector search endpoint.
102
+ * @interface IFormDataSearchEntity
103
+ * @property {number} [id] - The unique identifier of the form data record. Example: 12345.
104
+ * @property {string} [formIdentifier] - Text identifier of the form. Example: "contact_form".
105
+ * @property {Date | string} [time] - Date and time the form data was last changed. Example: "2023-02-12 10:56".
106
+ * @property {FormDataType[]} [formData] - Data submitted by the form.
107
+ * @example
108
+ [
109
+ {
110
+ "marker": "name",
111
+ "type": "string",
112
+ "value": "Test"
113
+ }
114
+ ]
115
+ * @property {string | null} [userIdentifier] - Text identifier of the user who submitted the form, or `null` for an anonymous submission. Example: null.
116
+ * @property {string} [entityIdentifier] - Text identifier of the entity the record belongs to. Example: "blog".
117
+ * @property {number | null} [parentId] - Identifier of the parent form data record, or `null` for a top-level record. Example: null.
118
+ * @property {string} [ip] - IP address the form was submitted from. Example: "127.0.0.1".
119
+ * @property {string} [fingerprint] - Device fingerprint of the sender. Example: "UQ_123456_abcdef".
120
+ * @property {boolean} [isUserAdmin] - Whether the record was submitted by an admin. Example: false.
121
+ * @property {'sent' | 'banned' | 'deleted' | 'moderation' | 'approved'} [status] - Moderation status of the record. Example: "sent".
122
+ * @property {number} [formModuleId] - Identifier of the form module the record belongs to. Example: 2.
123
+ * @property {number} [distance] - Cosine distance to the query. Returned only when `debug: true` is passed in the search body. Example: 0.12.
124
+ * @description This interface defines a form data record as returned by the semantic (vector) search endpoint. Unlike IFormDataEntity it carries the moderation and sender fields of the raw record.
125
+ */
126
+ interface IFormDataSearchEntity {
127
+ id?: number;
128
+ formIdentifier?: string;
129
+ time?: Date | string;
130
+ formData?: FormDataType[];
131
+ userIdentifier?: string | null;
132
+ entityIdentifier?: string;
133
+ parentId?: number | null;
134
+ ip?: string;
135
+ fingerprint?: string;
136
+ isUserAdmin?: boolean;
137
+ status?: 'sent' | 'banned' | 'deleted' | 'moderation' | 'approved';
138
+ formModuleId?: number;
139
+ distance?: number;
140
+ }
141
+ /**
142
+ * @interface IFormsDataSearchResponse
143
+ * @property {IFormDataSearchEntity[]} items - Array of found form data records.
144
+ * @property {number} total - Total number of found records. Example: 100.
145
+ * @description This interface defines the structure of the response returned by the form data vector search endpoint.
146
+ */
147
+ interface IFormsDataSearchResponse {
148
+ items: IFormDataSearchEntity[];
149
+ total: number;
73
150
  }
74
151
  /**
75
152
  * Represents the structure of a form data entity.
@@ -594,4 +671,4 @@ interface IListOptionValue {
594
671
  value: string;
595
672
  extended: IListOptionExtended;
596
673
  }
597
- export type { FormDataType, IBodyPostFormData, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
674
+ export type { FormDataType, IBodyPostFormData, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
package/dist/index.d.ts CHANGED
@@ -21,6 +21,7 @@ import PagesApi from './pages/pagesApi';
21
21
  import PaymentsApi from './payments/paymentsApi';
22
22
  import ProductStatusesApi from './product-statuses/productStatusesApi';
23
23
  import ProductsApi from './products/productsApi';
24
+ import SearchApi from './search/searchApi';
24
25
  import SitemapApi from './sitemap/sitemapApi';
25
26
  import SubscriptionsApi from './subscriptions/subscriptionsApi';
26
27
  import SystemApi from './system/systemApi';
@@ -53,6 +54,7 @@ export type * from './types';
53
54
  * @property {PaymentsApi} Payments - Payments API module.
54
55
  * @property {ProductsApi} Products - Products API module.
55
56
  * @property {ProductStatusesApi} ProductStatuses - Product statuses API module.
57
+ * @property {SearchApi} Search - Search API module.
56
58
  * @property {SitemapApi} Sitemap - Sitemap API module.
57
59
  * @property {SubscriptionsApi} Subscriptions - Subscriptions API module.
58
60
  * @property {SystemApi} System - System API module.
@@ -101,6 +103,8 @@ interface IDefineApi {
101
103
  Products: ProductsApi;
102
104
  /** Product statuses: getProductStatuses */
103
105
  ProductStatuses: ProductStatusesApi;
106
+ /** Public cross-entity search: globalSearch */
107
+ Search: SearchApi;
104
108
  /** Sitemap generation */
105
109
  Sitemap: SitemapApi;
106
110
  /** Paid subscriptions: subscribe, cancelSubscription, recoverSubscriptions, getAllSubscriptions, getActiveSubscriptions */
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ const pagesApi_1 = __importDefault(require("./pages/pagesApi"));
28
28
  const paymentsApi_1 = __importDefault(require("./payments/paymentsApi"));
29
29
  const productStatusesApi_1 = __importDefault(require("./product-statuses/productStatusesApi"));
30
30
  const productsApi_1 = __importDefault(require("./products/productsApi"));
31
+ const searchApi_1 = __importDefault(require("./search/searchApi"));
31
32
  const sitemapApi_1 = __importDefault(require("./sitemap/sitemapApi"));
32
33
  const subscriptionsApi_1 = __importDefault(require("./subscriptions/subscriptionsApi"));
33
34
  const systemApi_1 = __importDefault(require("./system/systemApi"));
@@ -91,6 +92,7 @@ function defineOneEntry(url, config) {
91
92
  const Payments = new paymentsApi_1.default(stateModule);
92
93
  const Products = new productsApi_1.default(stateModule);
93
94
  const ProductStatuses = new productStatusesApi_1.default(stateModule);
95
+ const Search = new searchApi_1.default(stateModule);
94
96
  const Sitemap = new sitemapApi_1.default(stateModule);
95
97
  const Subscriptions = new subscriptionsApi_1.default(stateModule);
96
98
  const System = new systemApi_1.default(stateModule);
@@ -119,6 +121,7 @@ function defineOneEntry(url, config) {
119
121
  Payments,
120
122
  Products,
121
123
  ProductStatuses,
124
+ Search,
122
125
  Sitemap,
123
126
  Subscriptions,
124
127
  System,
@@ -44,6 +44,8 @@ interface IMenus {
44
44
  }
45
45
  * @property {number} position - The menu position. Example: 1.
46
46
  * @property {number | null} parentId - The menu parent id. Example: null.
47
+ * @property {'page' | 'custom' | null} [parentType] - Kind of the parent item: `page` for a menu page, `custom` for a custom item; `null` together with `parentId` means top level. Page ids and custom item ids overlap, so the parent is ambiguous without it. Example: null.
48
+ * @property {'page' | 'custom'} [itemType] - Kind of this item itself: `page` or `custom`. This is the value the item's children must pass in `parentType`. Example: "page".
47
49
  * @description This interface defines the structure of a menu page entity, including its identifiers, localization information, attributes, and hierarchical relationships.
48
50
  */
49
51
  interface IMenusPages {
@@ -54,6 +56,8 @@ interface IMenusPages {
54
56
  attributeValues: IAttributeValues;
55
57
  position: number;
56
58
  parentId: number | null;
59
+ parentType?: 'page' | 'custom' | null;
60
+ itemType?: 'page' | 'custom';
57
61
  }
58
62
  /**
59
63
  * @interface IMenusEntity
@@ -15,6 +15,8 @@ exports.MenusPagesSchema = zod_1.z.lazy(() => zod_1.z.object({
15
15
  attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
16
16
  position: zod_1.z.number(),
17
17
  parentId: zod_1.z.number().nullable(),
18
+ parentType: zod_1.z.enum(['page', 'custom']).nullable().optional(),
19
+ itemType: zod_1.z.enum(['page', 'custom']).optional(),
18
20
  }));
19
21
  /**
20
22
  * Menu entity schema
@@ -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 { IBaseOrdersEntity, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderPreviewResponse, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrderStatus, IRefundRequest } from './ordersInterfaces';
4
+ import type { IBaseOrdersEntity, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderPreviewResponse, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrderStatus, IOrdersVectorSearch, IRefundRequest } from './ordersInterfaces';
5
5
  /**
6
6
  * Controllers for working with orders.
7
7
  * @handle /api/content/orders-storage
@@ -183,6 +183,20 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
183
183
  * @see {@link https://js-sdk.oneentry.cloud/docs/orders/cancelRefundRequest cancelRefundRequest} documentation.
184
184
  */
185
185
  cancelRefundRequest(id: number): Promise<boolean | IError>;
186
+ /**
187
+ * Semantic (vector) search for the current user's orders.
188
+ * @handleName getOrdersByVectorSearch
189
+ * @param {IOrdersVectorSearch} body - Vector search body. Example: `{ queryText: "winter jacket" }`.
190
+ * @param {string} [langCode] - Language code. Default: "en_US".
191
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
192
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
193
+ * @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with an array of found orders and total count.
194
+ * @throws {IError} When isShell=false and an error occurs during the fetch
195
+ * @description This method performs a semantic (vector) search over the orders of the authorized user. It requires user authorization.
196
+ * @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}.
197
+ * @see {@link https://js-sdk.oneentry.cloud/docs/orders/getOrdersByVectorSearch getOrdersByVectorSearch} documentation.
198
+ */
199
+ getOrdersByVectorSearch(body: IOrdersVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
186
200
  /**
187
201
  * Runs a fetch against the `/orders` base URL instead of the default
188
202
  * `/orders-storage`, then restores the original URL.
@@ -279,6 +279,28 @@ class OrdersApi extends asyncModules_1.default {
279
279
  const data = await this._withOrdersUrl(() => this._fetchDelete(`/${id}/refund`));
280
280
  return this._normalizeData(data);
281
281
  }
282
+ /**
283
+ * Semantic (vector) search for the current user's orders.
284
+ * @handleName getOrdersByVectorSearch
285
+ * @param {IOrdersVectorSearch} body - Vector search body. Example: `{ queryText: "winter jacket" }`.
286
+ * @param {string} [langCode] - Language code. Default: "en_US".
287
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
288
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
289
+ * @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with an array of found orders and total count.
290
+ * @throws {IError} When isShell=false and an error occurs during the fetch
291
+ * @description This method performs a semantic (vector) search over the orders of the authorized user. It requires user authorization.
292
+ * @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}.
293
+ * @see {@link https://js-sdk.oneentry.cloud/docs/orders/getOrdersByVectorSearch getOrdersByVectorSearch} documentation.
294
+ */
295
+ async getOrdersByVectorSearch(body, langCode = this.state.lang, offset = 0, limit = 30) {
296
+ const query = {
297
+ langCode,
298
+ offset,
299
+ limit,
300
+ };
301
+ const data = await this._withOrdersUrl(() => this._fetchPost(`/vector/search?` + this._queryParamsToString(query), body));
302
+ return this._normalizeData(data, langCode);
303
+ }
282
304
  /**
283
305
  * Runs a fetch against the `/orders` base URL instead of the default
284
306
  * `/orders-storage`, then restores the original URL.
@@ -158,6 +158,32 @@ interface IOrdersApi {
158
158
  * @throws {IError} When isShell=false and an error occurs during the fetch
159
159
  */
160
160
  cancelRefundRequest(id: number): Promise<boolean | IError>;
161
+ /**
162
+ * Semantic (vector) search for the current user's orders.
163
+ * @handleName getOrdersByVectorSearch
164
+ * @param {IOrdersVectorSearch} body - Vector search body. Example: `{ queryText: "winter jacket" }`.
165
+ * @param {string} [langCode] - Language code. Default: "en_US".
166
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
167
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
168
+ * @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with an array of found orders and total count.
169
+ * @throws {IError} When isShell=false and an error occurs during the fetch
170
+ */
171
+ getOrdersByVectorSearch(body: IOrdersVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
172
+ }
173
+ /**
174
+ * Body for semantic (vector) order search.
175
+ * @interface IOrdersVectorSearch
176
+ * @property {string} queryText - Natural-language search query. Example: "winter jacket".
177
+ * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
178
+ * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
179
+ * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
180
+ * @description Body for the orders vector/search endpoint.
181
+ */
182
+ interface IOrdersVectorSearch {
183
+ queryText: string;
184
+ vectorDistanceThreshold?: number;
185
+ maxHits?: number;
186
+ debug?: boolean;
161
187
  }
162
188
  /**
163
189
  * Interface for the orders storage object.
@@ -575,6 +601,7 @@ interface IOrderSplit {
575
601
  * @property {ILocalizeInfo | null} [paymentStatusLocalizeInfos] - Localized payment status name; null while no payment status is assigned.
576
602
  * @property {IOrderDiscountConfig | null} [discountConfig] - Resolved discount configuration applied to the order (orderDiscounts, productDiscounts, coupon, settings, bonus, totals); null on older orders without a resolved discount config.
577
603
  * @property {IOrderSplit} [split] - Split (staged) payment configuration; present on the by-id order endpoint.
604
+ * @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.
578
605
  * @description Represents an order storage object created by the user.
579
606
  */
580
607
  interface IOrderByMarkerEntity {
@@ -602,6 +629,7 @@ interface IOrderByMarkerEntity {
602
629
  paymentStatusLocalizeInfos?: ILocalizeInfo | null;
603
630
  discountConfig?: IOrderDiscountConfig | null;
604
631
  split?: IOrderSplit;
632
+ distance?: number;
605
633
  }
606
634
  /**
607
635
  * Interface representing an order status object.
@@ -734,4 +762,4 @@ interface ICreateRefundRequest {
734
762
  products: Record<string, IRefundProduct>;
735
763
  note?: string;
736
764
  }
737
- export type { IBaseOrdersEntity, IBaseOrdersEntityResponse, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderDiscountBonus, IOrderDiscountConfig, IOrderDiscountSettings, IOrderPreviewItem, IOrderPreviewResponse, IOrderProductData, IOrderProducts, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrdersFormData, IOrderSplit, IOrderSplitStage, IOrderStatus, IPaymentAccountIdentifiers, IPicture, IPreviewOrderProduct, IRefundProduct, IRefundRequest, };
765
+ export type { IBaseOrdersEntity, IBaseOrdersEntityResponse, ICreateOrderPreview, ICreateRefundRequest, IOrderByMarkerEntity, IOrderData, IOrderDiscountBonus, IOrderDiscountConfig, IOrderDiscountSettings, IOrderPreviewItem, IOrderPreviewResponse, IOrderProductData, IOrderProducts, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity, IOrdersFormData, IOrderSplit, IOrderSplitStage, IOrderStatus, IOrdersVectorSearch, IPaymentAccountIdentifiers, IPicture, IPreviewOrderProduct, IRefundProduct, IRefundRequest, };
@@ -112,6 +112,7 @@ export declare const OrderEntitySchema: z.ZodObject<{
112
112
  status: z.ZodString;
113
113
  }, z.core.$strip>>;
114
114
  }, z.core.$strip>>;
115
+ distance: z.ZodOptional<z.ZodNumber>;
115
116
  }, z.core.$strip>;
116
117
  /**
117
118
  * Orders list response schema
@@ -180,6 +181,7 @@ export declare const OrdersResponseSchema: z.ZodObject<{
180
181
  status: z.ZodString;
181
182
  }, z.core.$strip>>;
182
183
  }, z.core.$strip>>;
184
+ distance: z.ZodOptional<z.ZodNumber>;
183
185
  }, z.core.$strip>>;
184
186
  total: z.ZodNumber;
185
187
  }, z.core.$strip>;
@@ -100,6 +100,7 @@ exports.OrderEntitySchema = zod_1.z.object({
100
100
  })),
101
101
  })
102
102
  .optional(),
103
+ distance: zod_1.z.number().optional(),
103
104
  });
104
105
  /**
105
106
  * Orders list response schema