@algolia/recommend 5.0.0-alpha.99 → 5.0.0-beta.1

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 (268) hide show
  1. package/dist/builds/browser.d.ts +21 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +21 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/model/aroundPrecision.d.ts +1 -1
  6. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  7. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  8. package/dist/model/aroundRadius.d.ts +1 -1
  9. package/dist/model/aroundRadiusAll.d.ts +3 -0
  10. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  11. package/dist/model/autoFacetFilter.d.ts +14 -0
  12. package/dist/model/autoFacetFilter.d.ts.map +1 -0
  13. package/dist/model/baseRecommendRequest.d.ts +6 -4
  14. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  15. package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  16. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  17. package/dist/model/baseSearchResponse.d.ts +10 -6
  18. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  19. package/dist/model/boughtTogetherQuery.d.ts +4 -0
  20. package/dist/model/boughtTogetherQuery.d.ts.map +1 -0
  21. package/dist/model/clientMethodProps.d.ts +11 -11
  22. package/dist/model/condition.d.ts +6 -9
  23. package/dist/model/condition.d.ts.map +1 -1
  24. package/dist/model/consequence.d.ts +9 -17
  25. package/dist/model/consequence.d.ts.map +1 -1
  26. package/dist/model/deletedAtResponse.d.ts +2 -2
  27. package/dist/model/distinct.d.ts +1 -1
  28. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  29. package/dist/model/facetFilters.d.ts +1 -1
  30. package/dist/model/facetOrdering.d.ts +2 -2
  31. package/dist/model/facets.d.ts +2 -2
  32. package/dist/model/fallbackParams.d.ts +3 -0
  33. package/dist/model/fallbackParams.d.ts.map +1 -0
  34. package/dist/model/fbtModel.d.ts +5 -0
  35. package/dist/model/fbtModel.d.ts.map +1 -0
  36. package/dist/model/frequentlyBoughtTogether.d.ts +9 -0
  37. package/dist/model/frequentlyBoughtTogether.d.ts.map +1 -0
  38. package/dist/model/getRecommendationsParams.d.ts +2 -2
  39. package/dist/model/hideConsequenceObject.d.ts +10 -0
  40. package/dist/model/hideConsequenceObject.d.ts.map +1 -0
  41. package/dist/model/highlightResult.d.ts +1 -1
  42. package/dist/model/highlightResult.d.ts.map +1 -1
  43. package/dist/model/highlightResultOption.d.ts +3 -3
  44. package/dist/model/ignorePlurals.d.ts +3 -2
  45. package/dist/model/ignorePlurals.d.ts.map +1 -1
  46. package/dist/model/index.d.ts +21 -23
  47. package/dist/model/index.d.ts.map +1 -1
  48. package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
  49. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  50. package/dist/model/lookingSimilar.d.ts +11 -0
  51. package/dist/model/lookingSimilar.d.ts.map +1 -0
  52. package/dist/model/lookingSimilarModel.d.ts +5 -0
  53. package/dist/model/lookingSimilarModel.d.ts.map +1 -0
  54. package/dist/model/lookingSimilarQuery.d.ts +4 -0
  55. package/dist/model/lookingSimilarQuery.d.ts.map +1 -0
  56. package/dist/model/matchLevel.d.ts +1 -1
  57. package/dist/model/mode.d.ts +1 -1
  58. package/dist/model/numericFilters.d.ts +1 -1
  59. package/dist/model/optionalFilters.d.ts +1 -1
  60. package/dist/model/paramsConsequence.d.ts +19 -0
  61. package/dist/model/paramsConsequence.d.ts.map +1 -0
  62. package/dist/model/promoteConsequenceObject.d.ts +14 -0
  63. package/dist/model/promoteConsequenceObject.d.ts.map +1 -0
  64. package/dist/model/queryType.d.ts +1 -1
  65. package/dist/model/rankingInfo.d.ts +10 -7
  66. package/dist/model/rankingInfo.d.ts.map +1 -1
  67. package/dist/model/reRankingApplyFilter.d.ts +1 -1
  68. package/dist/model/recommendHit.d.ts +3 -3
  69. package/dist/model/recommendRule.d.ts +24 -0
  70. package/dist/model/recommendRule.d.ts.map +1 -0
  71. package/dist/model/recommendRuleMetadata.d.ts +10 -0
  72. package/dist/model/recommendRuleMetadata.d.ts.map +1 -0
  73. package/dist/model/recommendationsHits.d.ts +0 -8
  74. package/dist/model/recommendationsHits.d.ts.map +1 -1
  75. package/dist/model/recommendationsRequest.d.ts +4 -2
  76. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  77. package/dist/model/recommendedForYou.d.ts +7 -0
  78. package/dist/model/recommendedForYou.d.ts.map +1 -0
  79. package/dist/model/recommendedForYouModel.d.ts +1 -1
  80. package/dist/model/recommendedForYouQuery.d.ts +2 -2
  81. package/dist/model/recommendedForYouQuery.d.ts.map +1 -1
  82. package/dist/model/relatedModel.d.ts +5 -0
  83. package/dist/model/relatedModel.d.ts.map +1 -0
  84. package/dist/model/relatedProducts.d.ts +11 -0
  85. package/dist/model/relatedProducts.d.ts.map +1 -0
  86. package/dist/model/relatedQuery.d.ts +4 -0
  87. package/dist/model/relatedQuery.d.ts.map +1 -0
  88. package/dist/model/removeStopWords.d.ts +3 -2
  89. package/dist/model/removeStopWords.d.ts.map +1 -1
  90. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  91. package/dist/model/renderingContent.d.ts +1 -1
  92. package/dist/model/searchParams.d.ts +3 -0
  93. package/dist/model/searchParams.d.ts.map +1 -0
  94. package/dist/model/searchParamsObject.d.ts +3 -0
  95. package/dist/model/searchParamsObject.d.ts.map +1 -1
  96. package/dist/model/searchParamsQuery.d.ts +1 -1
  97. package/dist/model/searchRecommendRulesParams.d.ts +18 -6
  98. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -1
  99. package/dist/model/searchRecommendRulesResponse.d.ts +6 -6
  100. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -1
  101. package/dist/model/semanticSearch.d.ts +2 -2
  102. package/dist/model/snippetResult.d.ts +1 -1
  103. package/dist/model/snippetResult.d.ts.map +1 -1
  104. package/dist/model/snippetResultOption.d.ts +2 -2
  105. package/dist/model/sortRemainingBy.d.ts +1 -1
  106. package/dist/model/supportedLanguage.d.ts +5 -0
  107. package/dist/model/supportedLanguage.d.ts.map +1 -0
  108. package/dist/model/tagFilters.d.ts +1 -1
  109. package/dist/model/taskStatus.d.ts +1 -1
  110. package/dist/model/trendingFacetHit.d.ts +2 -2
  111. package/dist/model/trendingFacets.d.ts +11 -0
  112. package/dist/model/trendingFacets.d.ts.map +1 -0
  113. package/dist/model/trendingFacetsModel.d.ts +1 -1
  114. package/dist/model/trendingFacetsQuery.d.ts +2 -2
  115. package/dist/model/trendingFacetsQuery.d.ts.map +1 -1
  116. package/dist/model/trendingItems.d.ts +15 -0
  117. package/dist/model/trendingItems.d.ts.map +1 -0
  118. package/dist/model/trendingItemsModel.d.ts +1 -1
  119. package/dist/model/trendingItemsQuery.d.ts +2 -2
  120. package/dist/model/trendingItemsQuery.d.ts.map +1 -1
  121. package/dist/model/typoTolerance.d.ts +1 -1
  122. package/dist/model/typoToleranceEnum.d.ts +3 -0
  123. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  124. package/dist/model/value.d.ts +1 -1
  125. package/dist/recommend.cjs +54 -45
  126. package/dist/recommend.esm.browser.js +42 -38
  127. package/dist/recommend.esm.node.js +54 -45
  128. package/dist/recommend.umd.js +2 -2
  129. package/dist/src/recommendClient.d.ts +34 -32
  130. package/dist/src/recommendClient.d.ts.map +1 -1
  131. package/model/aroundPrecision.ts +1 -1
  132. package/model/aroundPrecisionFromValueInner.ts +9 -0
  133. package/model/aroundRadius.ts +1 -1
  134. package/model/aroundRadiusAll.ts +3 -0
  135. package/model/autoFacetFilter.ts +16 -0
  136. package/model/baseRecommendRequest.ts +8 -4
  137. package/model/baseSearchParamsWithoutQuery.ts +26 -30
  138. package/model/baseSearchResponse.ts +11 -6
  139. package/model/{recommendationsQuery.ts → boughtTogetherQuery.ts} +3 -3
  140. package/model/clientMethodProps.ts +11 -11
  141. package/model/condition.ts +6 -12
  142. package/model/consequence.ts +9 -19
  143. package/model/deletedAtResponse.ts +2 -2
  144. package/model/distinct.ts +1 -1
  145. package/model/exactOnSingleWordQuery.ts +1 -1
  146. package/model/facetFilters.ts +1 -1
  147. package/model/facetOrdering.ts +2 -2
  148. package/model/facets.ts +2 -2
  149. package/model/{editType.ts → fallbackParams.ts} +3 -4
  150. package/model/fbtModel.ts +6 -0
  151. package/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
  152. package/model/getRecommendationsParams.ts +2 -2
  153. package/model/hideConsequenceObject.ts +11 -0
  154. package/model/highlightResult.ts +1 -0
  155. package/model/highlightResultOption.ts +3 -3
  156. package/model/ignorePlurals.ts +4 -2
  157. package/model/index.ts +21 -23
  158. package/model/indexSettingsAsSearchParams.ts +32 -36
  159. package/model/lookingSimilar.ts +15 -0
  160. package/model/lookingSimilarModel.ts +6 -0
  161. package/model/lookingSimilarQuery.ts +6 -0
  162. package/model/matchLevel.ts +1 -1
  163. package/model/mode.ts +1 -1
  164. package/model/numericFilters.ts +1 -1
  165. package/model/optionalFilters.ts +1 -1
  166. package/model/paramsConsequence.ts +23 -0
  167. package/model/promoteConsequenceObject.ts +16 -0
  168. package/model/queryType.ts +1 -1
  169. package/model/rankingInfo.ts +10 -7
  170. package/model/reRankingApplyFilter.ts +1 -1
  171. package/model/recommendHit.ts +3 -3
  172. package/model/{ruleResponse.ts → recommendRule.ts} +7 -10
  173. package/model/{ruleResponseMetadata.ts → recommendRuleMetadata.ts} +5 -2
  174. package/model/recommendationsHits.ts +0 -10
  175. package/model/recommendationsRequest.ts +6 -2
  176. package/model/{baseRecommendedForYouQuery.ts → recommendedForYou.ts} +3 -5
  177. package/model/recommendedForYouModel.ts +1 -1
  178. package/model/recommendedForYouQuery.ts +2 -3
  179. package/model/relatedModel.ts +6 -0
  180. package/model/relatedProducts.ts +15 -0
  181. package/model/relatedQuery.ts +6 -0
  182. package/model/removeStopWords.ts +4 -2
  183. package/model/removeWordsIfNoResults.ts +1 -1
  184. package/model/renderingContent.ts +1 -1
  185. package/model/{recommendationModels.ts → searchParams.ts} +3 -4
  186. package/model/searchParamsObject.ts +3 -0
  187. package/model/searchParamsQuery.ts +1 -1
  188. package/model/searchRecommendRulesParams.ts +21 -6
  189. package/model/searchRecommendRulesResponse.ts +6 -6
  190. package/model/semanticSearch.ts +2 -2
  191. package/model/snippetResult.ts +2 -1
  192. package/model/snippetResultOption.ts +2 -2
  193. package/model/sortRemainingBy.ts +1 -1
  194. package/model/supportedLanguage.ts +74 -0
  195. package/model/tagFilters.ts +1 -1
  196. package/model/taskStatus.ts +1 -1
  197. package/model/trendingFacetHit.ts +2 -2
  198. package/model/{baseTrendingFacetsQuery.ts → trendingFacets.ts} +7 -4
  199. package/model/trendingFacetsModel.ts +1 -1
  200. package/model/trendingFacetsQuery.ts +2 -3
  201. package/model/trendingItems.ts +20 -0
  202. package/model/trendingItemsModel.ts +1 -1
  203. package/model/trendingItemsQuery.ts +2 -2
  204. package/model/typoTolerance.ts +1 -1
  205. package/model/typoToleranceEnum.ts +3 -0
  206. package/model/value.ts +1 -1
  207. package/package.json +7 -7
  208. package/dist/model/anchoring.d.ts +0 -5
  209. package/dist/model/anchoring.d.ts.map +0 -1
  210. package/dist/model/automaticFacetFilter.d.ts +0 -18
  211. package/dist/model/automaticFacetFilter.d.ts.map +0 -1
  212. package/dist/model/automaticFacetFilters.d.ts +0 -6
  213. package/dist/model/automaticFacetFilters.d.ts.map +0 -1
  214. package/dist/model/baseRecommendationsQuery.d.ts +0 -12
  215. package/dist/model/baseRecommendationsQuery.d.ts.map +0 -1
  216. package/dist/model/baseRecommendedForYouQuery.d.ts +0 -8
  217. package/dist/model/baseRecommendedForYouQuery.d.ts.map +0 -1
  218. package/dist/model/baseRecommendedForYouQueryParameters.d.ts +0 -7
  219. package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +0 -1
  220. package/dist/model/baseTrendingFacetsQuery.d.ts +0 -9
  221. package/dist/model/baseTrendingFacetsQuery.d.ts.map +0 -1
  222. package/dist/model/baseTrendingItemsQuery.d.ts +0 -16
  223. package/dist/model/baseTrendingItemsQuery.d.ts.map +0 -1
  224. package/dist/model/consequenceHide.d.ts +0 -10
  225. package/dist/model/consequenceHide.d.ts.map +0 -1
  226. package/dist/model/consequenceParams.d.ts +0 -5
  227. package/dist/model/consequenceParams.d.ts.map +0 -1
  228. package/dist/model/consequenceQuery.d.ts +0 -6
  229. package/dist/model/consequenceQuery.d.ts.map +0 -1
  230. package/dist/model/consequenceQueryObject.d.ts +0 -12
  231. package/dist/model/consequenceQueryObject.d.ts.map +0 -1
  232. package/dist/model/edit.d.ts +0 -13
  233. package/dist/model/edit.d.ts.map +0 -1
  234. package/dist/model/editType.d.ts +0 -5
  235. package/dist/model/editType.d.ts.map +0 -1
  236. package/dist/model/params.d.ts +0 -13
  237. package/dist/model/params.d.ts.map +0 -1
  238. package/dist/model/promote.d.ts +0 -4
  239. package/dist/model/promote.d.ts.map +0 -1
  240. package/dist/model/promoteObjectID.d.ts +0 -14
  241. package/dist/model/promoteObjectID.d.ts.map +0 -1
  242. package/dist/model/promoteObjectIDs.d.ts +0 -14
  243. package/dist/model/promoteObjectIDs.d.ts.map +0 -1
  244. package/dist/model/recommendationModels.d.ts +0 -5
  245. package/dist/model/recommendationModels.d.ts.map +0 -1
  246. package/dist/model/recommendationsQuery.d.ts +0 -4
  247. package/dist/model/recommendationsQuery.d.ts.map +0 -1
  248. package/dist/model/recommendedForYouQueryParameters.d.ts +0 -4
  249. package/dist/model/recommendedForYouQueryParameters.d.ts.map +0 -1
  250. package/dist/model/ruleResponse.d.ts +0 -27
  251. package/dist/model/ruleResponse.d.ts.map +0 -1
  252. package/dist/model/ruleResponseMetadata.d.ts +0 -7
  253. package/dist/model/ruleResponseMetadata.d.ts.map +0 -1
  254. package/model/anchoring.ts +0 -6
  255. package/model/automaticFacetFilter.ts +0 -21
  256. package/model/automaticFacetFilters.ts +0 -8
  257. package/model/baseRecommendationsQuery.ts +0 -17
  258. package/model/baseRecommendedForYouQueryParameters.ts +0 -8
  259. package/model/baseTrendingItemsQuery.ts +0 -22
  260. package/model/consequenceParams.ts +0 -9
  261. package/model/consequenceQuery.ts +0 -8
  262. package/model/consequenceQueryObject.ts +0 -15
  263. package/model/edit.ts +0 -17
  264. package/model/params.ts +0 -18
  265. package/model/promote.ts +0 -6
  266. package/model/promoteObjectID.ts +0 -16
  267. package/model/promoteObjectIDs.ts +0 -16
  268. package/model/recommendedForYouQueryParameters.ts +0 -7
@@ -1,12 +1,16 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- import type { RecommendationsQuery } from './recommendationsQuery';
3
+ import type { BoughtTogetherQuery } from './boughtTogetherQuery';
4
+ import type { LookingSimilarQuery } from './lookingSimilarQuery';
4
5
  import type { RecommendedForYouQuery } from './recommendedForYouQuery';
6
+ import type { RelatedQuery } from './relatedQuery';
5
7
  import type { TrendingFacetsQuery } from './trendingFacetsQuery';
6
8
  import type { TrendingItemsQuery } from './trendingItemsQuery';
7
9
 
8
10
  export type RecommendationsRequest =
9
- | RecommendationsQuery
11
+ | BoughtTogetherQuery
12
+ | LookingSimilarQuery
10
13
  | RecommendedForYouQuery
14
+ | RelatedQuery
11
15
  | TrendingFacetsQuery
12
16
  | TrendingItemsQuery;
@@ -1,12 +1,10 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
+ import type { FallbackParams } from './fallbackParams';
3
4
  import type { RecommendedForYouModel } from './recommendedForYouModel';
4
- import type { RecommendedForYouQueryParameters } from './recommendedForYouQueryParameters';
5
5
 
6
- export type BaseRecommendedForYouQuery = {
6
+ export type RecommendedForYou = {
7
7
  model: RecommendedForYouModel;
8
8
 
9
- queryParameters?: RecommendedForYouQueryParameters;
10
-
11
- fallbackParameters?: RecommendedForYouQueryParameters;
9
+ fallbackParameters?: FallbackParams;
12
10
  };
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Recommended for you model.
4
+ * \"Recommened for you\" model.
5
5
  */
6
6
  export type RecommendedForYouModel = 'recommended-for-you';
@@ -1,7 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseRecommendedForYouQuery } from './baseRecommendedForYouQuery';
4
+ import type { RecommendedForYou } from './recommendedForYou';
5
5
 
6
- export type RecommendedForYouQuery = BaseRecommendedForYouQuery &
7
- BaseRecommendRequest;
6
+ export type RecommendedForYouQuery = BaseRecommendRequest & RecommendedForYou;
@@ -0,0 +1,6 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes.
5
+ */
6
+ export type RelatedModel = 'related-products';
@@ -0,0 +1,15 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { FallbackParams } from './fallbackParams';
4
+ import type { RelatedModel } from './relatedModel';
5
+
6
+ export type RelatedProducts = {
7
+ model: RelatedModel;
8
+
9
+ /**
10
+ * Unique record identifier.
11
+ */
12
+ objectID: string;
13
+
14
+ fallbackParameters?: FallbackParams;
15
+ };
@@ -0,0 +1,6 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
4
+ import type { RelatedProducts } from './relatedProducts';
5
+
6
+ export type RelatedQuery = BaseRecommendRequest & RelatedProducts;
@@ -1,6 +1,8 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
+ import type { SupportedLanguage } from './supportedLanguage';
4
+
3
5
  /**
4
- * Removes stop (common) words from the query before executing it. `removeStopWords` is used in conjunction with the `queryLanguages` setting. _list_: language ISO codes for which stop words should be enabled. This list will override any values that you may have set in `queryLanguages`. _true_: enables the stop words feature, ensuring that stop words are removed from consideration in a search. The languages supported here are either [every language](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) (this is the default) or those set by `queryLanguages`. _false_: turns off the stop words feature, allowing stop words to be taken into account in a search.
6
+ * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index.
5
7
  */
6
- export type RemoveStopWords = string[] | boolean;
8
+ export type RemoveStopWords = SupportedLanguage[] | boolean;
@@ -1,7 +1,7 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Strategy to [remove words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/) from the query when it doesn\'t match any hits.
4
+ * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
5
5
  */
6
6
  export type RemoveWordsIfNoResults =
7
7
  | 'allOptional'
@@ -3,7 +3,7 @@
3
3
  import type { FacetOrdering } from './facetOrdering';
4
4
 
5
5
  /**
6
- * Extra content for the search UI, for example, to control the [ordering and display of facets](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/merchandising-facets/#merchandise-facets-and-their-values-in-the-manual-editor). You can set a default value and dynamically override it with [Rules](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/).
6
+ * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code.
7
7
  */
8
8
  export type RenderingContent = {
9
9
  facetOrdering?: FacetOrdering;
@@ -1,6 +1,5 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- /**
4
- * Recommendation model.
5
- */
6
- export type RecommendationModels = 'bought-together' | 'related-products';
3
+ import type { SearchParamsObject } from './searchParamsObject';
4
+
5
+ export type SearchParams = Record<string, any> & SearchParamsObject;
@@ -3,4 +3,7 @@
3
3
  import type { BaseSearchParams } from './baseSearchParams';
4
4
  import type { IndexSettingsAsSearchParams } from './indexSettingsAsSearchParams';
5
5
 
6
+ /**
7
+ * Each parameter value, including the `query` must not be larger than 512 bytes.
8
+ */
6
9
  export type SearchParamsObject = BaseSearchParams & IndexSettingsAsSearchParams;
@@ -2,7 +2,7 @@
2
2
 
3
3
  export type SearchParamsQuery = {
4
4
  /**
5
- * Text to search for in an index.
5
+ * Search query.
6
6
  */
7
7
  query?: string;
8
8
  };
@@ -1,21 +1,21 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Recommend rules search parameters.
4
+ * Recommend rules parameters.
5
5
  */
6
6
  export type SearchRecommendRulesParams = {
7
7
  /**
8
- * Full-text query.
8
+ * Search query.
9
9
  */
10
10
  query?: string;
11
11
 
12
12
  /**
13
- * Restricts responses to the specified [contextual rule](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#creating-contextual-rules).
13
+ * Only search for rules with matching context.
14
14
  */
15
15
  context?: string;
16
16
 
17
17
  /**
18
- * Requested page (the first page is page 0).
18
+ * Requested page of the API response.
19
19
  */
20
20
  page?: number;
21
21
 
@@ -25,7 +25,22 @@ export type SearchRecommendRulesParams = {
25
25
  hitsPerPage?: number;
26
26
 
27
27
  /**
28
- * Restricts responses to enabled rules. When absent (default), _all_ rules are retrieved.
28
+ * Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
29
29
  */
30
- enabled?: boolean | null;
30
+ enabled?: boolean;
31
+
32
+ /**
33
+ * Filter expression. This only searches for rules matching the filter expression.
34
+ */
35
+ filters?: string;
36
+
37
+ /**
38
+ * Include facets and facet values in the response. Use `[\'*\']` to include all facets.
39
+ */
40
+ facets?: string[];
41
+
42
+ /**
43
+ * Maximum number of values to return for each facet.
44
+ */
45
+ maxValuesPerFacet?: number;
31
46
  };
@@ -1,25 +1,25 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- import type { RuleResponse } from './ruleResponse';
3
+ import type { RecommendRule } from './recommendRule';
4
4
 
5
5
  export type SearchRecommendRulesResponse = {
6
6
  /**
7
- * Fetched rules.
7
+ * Recommend rules that match the search criteria.
8
8
  */
9
- hits: RuleResponse[];
9
+ hits: RecommendRule[];
10
10
 
11
11
  /**
12
- * Number of hits the search query matched.
12
+ * Number of results (hits).
13
13
  */
14
14
  nbHits: number;
15
15
 
16
16
  /**
17
- * Page to retrieve (the first page is `0`, not `1`).
17
+ * Page of search results to retrieve.
18
18
  */
19
19
  page: number;
20
20
 
21
21
  /**
22
- * Number of pages of results for the current query.
22
+ * Number of pages of results.
23
23
  */
24
24
  nbPages: number;
25
25
  };
@@ -1,11 +1,11 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Settings for the semantic search part of NeuralSearch. Only used when `mode` is _neuralSearch_.
4
+ * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`.
5
5
  */
6
6
  export type SemanticSearch = {
7
7
  /**
8
- * Indices from which to collect click and conversion events. If null, the current index and replica group will be used as the event source.
8
+ * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used.
9
9
  */
10
10
  eventSources?: string[] | null;
11
11
  };
@@ -4,4 +4,5 @@ import type { SnippetResultOption } from './snippetResultOption';
4
4
 
5
5
  export type SnippetResult =
6
6
  | Record<string, SnippetResultOption>
7
- | SnippetResultOption;
7
+ | SnippetResultOption
8
+ | SnippetResultOption[];
@@ -3,11 +3,11 @@
3
3
  import type { MatchLevel } from './matchLevel';
4
4
 
5
5
  /**
6
- * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
6
+ * Snippets that show the context around a matching search query.
7
7
  */
8
8
  export type SnippetResultOption = {
9
9
  /**
10
- * Markup text with `facetQuery` matches highlighted.
10
+ * Highlighted attribute value, including HTML tags.
11
11
  */
12
12
  value: string;
13
13
 
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * How to display the remaining items: - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values.
4
+ * Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
5
5
  */
6
6
  export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
@@ -0,0 +1,74 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ /**
4
+ * ISO code for a supported language.
5
+ */
6
+ export type SupportedLanguage =
7
+ | 'af'
8
+ | 'ar'
9
+ | 'az'
10
+ | 'bg'
11
+ | 'bn'
12
+ | 'ca'
13
+ | 'cs'
14
+ | 'cy'
15
+ | 'da'
16
+ | 'de'
17
+ | 'el'
18
+ | 'en'
19
+ | 'eo'
20
+ | 'es'
21
+ | 'et'
22
+ | 'eu'
23
+ | 'fa'
24
+ | 'fi'
25
+ | 'fo'
26
+ | 'fr'
27
+ | 'ga'
28
+ | 'gl'
29
+ | 'he'
30
+ | 'hi'
31
+ | 'hu'
32
+ | 'hy'
33
+ | 'id'
34
+ | 'is'
35
+ | 'it'
36
+ | 'ja'
37
+ | 'ka'
38
+ | 'kk'
39
+ | 'ko'
40
+ | 'ku'
41
+ | 'ky'
42
+ | 'lt'
43
+ | 'lv'
44
+ | 'mi'
45
+ | 'mn'
46
+ | 'mr'
47
+ | 'ms'
48
+ | 'mt'
49
+ | 'nb'
50
+ | 'nl'
51
+ | 'no'
52
+ | 'ns'
53
+ | 'pl'
54
+ | 'ps'
55
+ | 'pt-br'
56
+ | 'pt'
57
+ | 'qu'
58
+ | 'ro'
59
+ | 'ru'
60
+ | 'sk'
61
+ | 'sq'
62
+ | 'sv'
63
+ | 'sw'
64
+ | 'ta'
65
+ | 'te'
66
+ | 'th'
67
+ | 'tl'
68
+ | 'tn'
69
+ | 'tr'
70
+ | 'tt'
71
+ | 'uk'
72
+ | 'ur'
73
+ | 'uz'
74
+ | 'zh';
@@ -3,6 +3,6 @@
3
3
  import type { MixedSearchFilters } from './mixedSearchFilters';
4
4
 
5
5
  /**
6
- * [Filter hits by tags](https://www.algolia.com/doc/api-reference/api-parameters/tagFilters/).
6
+ * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
7
7
  */
8
8
  export type TagFilters = MixedSearchFilters[] | string;
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * _published_ if the task has been processed, _notPublished_ otherwise.
4
+ * Task status, `published` if the task is completed, `notPublished` otherwise.
5
5
  */
6
6
  export type TaskStatus = 'notPublished' | 'published';
@@ -10,12 +10,12 @@ export type TrendingFacetHit = {
10
10
  _score: number;
11
11
 
12
12
  /**
13
- * Facet name for trending models.
13
+ * Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
14
14
  */
15
15
  facetName: string;
16
16
 
17
17
  /**
18
- * Facet value for trending models.
18
+ * Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
19
19
  */
20
20
  facetValue: string;
21
21
  };
@@ -1,12 +1,15 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
+ import type { FallbackParams } from './fallbackParams';
3
4
  import type { TrendingFacetsModel } from './trendingFacetsModel';
4
5
 
5
- export type BaseTrendingFacetsQuery = {
6
+ export type TrendingFacets = {
6
7
  /**
7
- * Facet name for trending models.
8
+ * Facet attribute for which to retrieve trending facet values.
8
9
  */
9
- facetName: string;
10
+ facetName: any | null;
10
11
 
11
- model?: TrendingFacetsModel;
12
+ model: TrendingFacetsModel;
13
+
14
+ fallbackParameters?: FallbackParams;
12
15
  };
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Trending facets model.
4
+ * Trending facet values model. This model recommends trending facet values for the specified facet attribute.
5
5
  */
6
6
  export type TrendingFacetsModel = 'trending-facets';
@@ -1,7 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseTrendingFacetsQuery } from './baseTrendingFacetsQuery';
4
+ import type { TrendingFacets } from './trendingFacets';
5
5
 
6
- export type TrendingFacetsQuery = BaseRecommendRequest &
7
- BaseTrendingFacetsQuery;
6
+ export type TrendingFacetsQuery = BaseRecommendRequest & TrendingFacets;
@@ -0,0 +1,20 @@
1
+ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
+
3
+ import type { SearchParamsObject } from './searchParamsObject';
4
+ import type { TrendingItemsModel } from './trendingItemsModel';
5
+
6
+ export type TrendingItems = {
7
+ /**
8
+ * Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
9
+ */
10
+ facetName: string;
11
+
12
+ /**
13
+ * Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
14
+ */
15
+ facetValue: string;
16
+
17
+ model: TrendingItemsModel;
18
+
19
+ fallbackParameters?: SearchParamsObject;
20
+ };
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Trending items model.
4
+ * Trending items model. Trending items are determined from the number of conversion events collected on them.
5
5
  */
6
6
  export type TrendingItemsModel = 'trending-items';
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseTrendingItemsQuery } from './baseTrendingItemsQuery';
4
+ import type { TrendingItems } from './trendingItems';
5
5
 
6
- export type TrendingItemsQuery = BaseRecommendRequest & BaseTrendingItemsQuery;
6
+ export type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
@@ -3,6 +3,6 @@
3
3
  import type { TypoToleranceEnum } from './typoToleranceEnum';
4
4
 
5
5
  /**
6
- * Controls whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied.
6
+ * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
7
7
  */
8
8
  export type TypoTolerance = TypoToleranceEnum | boolean;
@@ -1,3 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
+ /**
4
+ * - `min`. Return matches with the lowest number of typos. For example, if you have matches without typos, only include those. But if there are no matches without typos (with 1 typo), include matches with 1 typo (2 typos). - `strict`. Return matches with the two lowest numbers of typos. With `strict`, the Typo ranking criterion is applied first in the `ranking` setting.
5
+ */
3
6
  export type TypoToleranceEnum = 'min' | 'strict';
package/model/value.ts CHANGED
@@ -4,7 +4,7 @@ import type { SortRemainingBy } from './sortRemainingBy';
4
4
 
5
5
  export type Value = {
6
6
  /**
7
- * Pinned order of facet lists.
7
+ * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
8
8
  */
9
9
  order?: string[];
10
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/recommend",
3
- "version": "5.0.0-alpha.99",
3
+ "version": "5.0.0-beta.1",
4
4
  "description": "JavaScript client for recommend",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.100",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.100",
44
- "@algolia/requester-node-http": "5.0.0-alpha.100"
42
+ "@algolia/client-common": "5.0.0-beta.1",
43
+ "@algolia/requester-browser-xhr": "5.0.0-beta.1",
44
+ "@algolia/requester-node-http": "5.0.0-beta.1"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.11.0",
48
- "rollup": "4.9.6",
49
- "typescript": "5.3.3"
47
+ "@types/node": "20.12.7",
48
+ "rollup": "4.14.2",
49
+ "typescript": "5.4.5"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"
@@ -1,5 +0,0 @@
1
- /**
2
- * Whether the pattern parameter matches the beginning (`startsWith`) or end (`endsWith`) of the query string, is an exact match (`is`), or a partial match (`contains`).
3
- */
4
- export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
5
- //# sourceMappingURL=anchoring.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"anchoring.d.ts","sourceRoot":"","sources":["../../model/anchoring.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,UAAU,GAAG,UAAU,GAAG,IAAI,GAAG,YAAY,CAAC"}
@@ -1,18 +0,0 @@
1
- /**
2
- * Automatic facet Filter.
3
- */
4
- export type AutomaticFacetFilter = {
5
- /**
6
- * Attribute to filter on. This must match a facet placeholder in the Rule\'s pattern.
7
- */
8
- facet: string;
9
- /**
10
- * Score for the filter. Typically used for optional or disjunctive filters.
11
- */
12
- score?: number;
13
- /**
14
- * Whether the filter is disjunctive (true) or conjunctive (false).
15
- */
16
- disjunctive?: boolean;
17
- };
18
- //# sourceMappingURL=automaticFacetFilter.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automaticFacetFilter.d.ts","sourceRoot":"","sources":["../../model/automaticFacetFilter.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC"}
@@ -1,6 +0,0 @@
1
- import type { AutomaticFacetFilter } from './automaticFacetFilter';
2
- /**
3
- * Names of facets to which automatic filtering must be applied; they must match the facet name of a facet value placeholder in the query pattern.
4
- */
5
- export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[];
6
- //# sourceMappingURL=automaticFacetFilters.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"automaticFacetFilters.d.ts","sourceRoot":"","sources":["../../model/automaticFacetFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE,CAAC"}
@@ -1,12 +0,0 @@
1
- import type { RecommendationModels } from './recommendationModels';
2
- import type { SearchParamsObject } from './searchParamsObject';
3
- export type BaseRecommendationsQuery = {
4
- model: RecommendationModels;
5
- /**
6
- * Unique object identifier.
7
- */
8
- objectID: string;
9
- queryParameters?: SearchParamsObject;
10
- fallbackParameters?: SearchParamsObject;
11
- };
12
- //# sourceMappingURL=baseRecommendationsQuery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseRecommendationsQuery.d.ts","sourceRoot":"","sources":["../../model/baseRecommendationsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,wBAAwB,GAAG;IACrC,KAAK,EAAE,oBAAoB,CAAC;IAE5B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB,eAAe,CAAC,EAAE,kBAAkB,CAAC;IAErC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
@@ -1,8 +0,0 @@
1
- import type { RecommendedForYouModel } from './recommendedForYouModel';
2
- import type { RecommendedForYouQueryParameters } from './recommendedForYouQueryParameters';
3
- export type BaseRecommendedForYouQuery = {
4
- model: RecommendedForYouModel;
5
- queryParameters?: RecommendedForYouQueryParameters;
6
- fallbackParameters?: RecommendedForYouQueryParameters;
7
- };
8
- //# sourceMappingURL=baseRecommendedForYouQuery.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"baseRecommendedForYouQuery.d.ts","sourceRoot":"","sources":["../../model/baseRecommendedForYouQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AACvE,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAC;AAE3F,MAAM,MAAM,0BAA0B,GAAG;IACvC,KAAK,EAAE,sBAAsB,CAAC;IAE9B,eAAe,CAAC,EAAE,gCAAgC,CAAC;IAEnD,kBAAkB,CAAC,EAAE,gCAAgC,CAAC;CACvD,CAAC"}
@@ -1,7 +0,0 @@
1
- export type BaseRecommendedForYouQueryParameters = {
2
- /**
3
- * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
4
- */
5
- userToken: string;
6
- };
7
- //# sourceMappingURL=baseRecommendedForYouQueryParameters.d.ts.map