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

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 (290) hide show
  1. package/LICENSE +21 -0
  2. package/dist/builds/browser.d.ts +21 -3
  3. package/dist/builds/browser.d.ts.map +1 -1
  4. package/dist/builds/node.d.ts +21 -3
  5. package/dist/builds/node.d.ts.map +1 -1
  6. package/dist/model/aroundPrecision.d.ts +1 -1
  7. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  8. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  9. package/dist/model/aroundRadius.d.ts +1 -1
  10. package/dist/model/aroundRadiusAll.d.ts +3 -0
  11. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  12. package/dist/model/autoFacetFilter.d.ts +14 -0
  13. package/dist/model/autoFacetFilter.d.ts.map +1 -0
  14. package/dist/model/baseRecommendRequest.d.ts +6 -4
  15. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  16. package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  17. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  18. package/dist/model/baseSearchResponse.d.ts +8 -20
  19. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  20. package/dist/model/boughtTogetherQuery.d.ts +4 -0
  21. package/dist/model/boughtTogetherQuery.d.ts.map +1 -0
  22. package/dist/model/clientMethodProps.d.ts +18 -11
  23. package/dist/model/clientMethodProps.d.ts.map +1 -1
  24. package/dist/model/condition.d.ts +6 -9
  25. package/dist/model/condition.d.ts.map +1 -1
  26. package/dist/model/consequence.d.ts +9 -17
  27. package/dist/model/consequence.d.ts.map +1 -1
  28. package/dist/model/deletedAtResponse.d.ts +2 -2
  29. package/dist/model/distinct.d.ts +1 -1
  30. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  31. package/dist/model/facetFilters.d.ts +2 -3
  32. package/dist/model/facetFilters.d.ts.map +1 -1
  33. package/dist/model/facetOrdering.d.ts +2 -2
  34. package/dist/model/facets.d.ts +2 -2
  35. package/dist/model/fallbackParams.d.ts +3 -0
  36. package/dist/model/fallbackParams.d.ts.map +1 -0
  37. package/dist/model/fbtModel.d.ts +5 -0
  38. package/dist/model/fbtModel.d.ts.map +1 -0
  39. package/dist/model/frequentlyBoughtTogether.d.ts +9 -0
  40. package/dist/model/frequentlyBoughtTogether.d.ts.map +1 -0
  41. package/dist/model/getRecommendationsParams.d.ts +2 -2
  42. package/dist/model/hideConsequenceObject.d.ts +10 -0
  43. package/dist/model/hideConsequenceObject.d.ts.map +1 -0
  44. package/dist/model/highlightResult.d.ts +1 -1
  45. package/dist/model/highlightResult.d.ts.map +1 -1
  46. package/dist/model/highlightResultOption.d.ts +3 -3
  47. package/dist/model/ignorePlurals.d.ts +3 -2
  48. package/dist/model/ignorePlurals.d.ts.map +1 -1
  49. package/dist/model/index.d.ts +23 -24
  50. package/dist/model/index.d.ts.map +1 -1
  51. package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
  52. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  53. package/dist/model/lookingSimilar.d.ts +11 -0
  54. package/dist/model/lookingSimilar.d.ts.map +1 -0
  55. package/dist/model/lookingSimilarModel.d.ts +5 -0
  56. package/dist/model/lookingSimilarModel.d.ts.map +1 -0
  57. package/dist/model/lookingSimilarQuery.d.ts +4 -0
  58. package/dist/model/lookingSimilarQuery.d.ts.map +1 -0
  59. package/dist/model/matchLevel.d.ts +1 -1
  60. package/dist/model/mode.d.ts +1 -1
  61. package/dist/model/numericFilters.d.ts +2 -3
  62. package/dist/model/numericFilters.d.ts.map +1 -1
  63. package/dist/model/optionalFilters.d.ts +2 -3
  64. package/dist/model/optionalFilters.d.ts.map +1 -1
  65. package/dist/model/paramsConsequence.d.ts +19 -0
  66. package/dist/model/paramsConsequence.d.ts.map +1 -0
  67. package/dist/model/promoteConsequenceObject.d.ts +14 -0
  68. package/dist/model/promoteConsequenceObject.d.ts.map +1 -0
  69. package/dist/model/queryType.d.ts +1 -1
  70. package/dist/model/rankingInfo.d.ts +13 -10
  71. package/dist/model/rankingInfo.d.ts.map +1 -1
  72. package/dist/model/reRankingApplyFilter.d.ts +2 -3
  73. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  74. package/dist/model/recommendHit.d.ts +3 -3
  75. package/dist/model/recommendRule.d.ts +24 -0
  76. package/dist/model/recommendRule.d.ts.map +1 -0
  77. package/dist/model/recommendRuleMetadata.d.ts +10 -0
  78. package/dist/model/recommendRuleMetadata.d.ts.map +1 -0
  79. package/dist/model/recommendationsHits.d.ts +0 -8
  80. package/dist/model/recommendationsHits.d.ts.map +1 -1
  81. package/dist/model/recommendationsRequest.d.ts +4 -2
  82. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  83. package/dist/model/recommendationsResults.d.ts +2 -1
  84. package/dist/model/recommendationsResults.d.ts.map +1 -1
  85. package/dist/model/recommendedForYou.d.ts +7 -0
  86. package/dist/model/recommendedForYou.d.ts.map +1 -0
  87. package/dist/model/recommendedForYouModel.d.ts +1 -1
  88. package/dist/model/recommendedForYouQuery.d.ts +2 -2
  89. package/dist/model/recommendedForYouQuery.d.ts.map +1 -1
  90. package/dist/model/redirect.d.ts +1 -1
  91. package/dist/model/redirectURL.d.ts +7 -0
  92. package/dist/model/redirectURL.d.ts.map +1 -0
  93. package/dist/model/relatedModel.d.ts +5 -0
  94. package/dist/model/relatedModel.d.ts.map +1 -0
  95. package/dist/model/relatedProducts.d.ts +11 -0
  96. package/dist/model/relatedProducts.d.ts.map +1 -0
  97. package/dist/model/relatedQuery.d.ts +4 -0
  98. package/dist/model/relatedQuery.d.ts.map +1 -0
  99. package/dist/model/removeStopWords.d.ts +3 -2
  100. package/dist/model/removeStopWords.d.ts.map +1 -1
  101. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  102. package/dist/model/renderingContent.d.ts +3 -1
  103. package/dist/model/renderingContent.d.ts.map +1 -1
  104. package/dist/model/searchPagination.d.ts +19 -0
  105. package/dist/model/searchPagination.d.ts.map +1 -0
  106. package/dist/model/searchParams.d.ts +3 -0
  107. package/dist/model/searchParams.d.ts.map +1 -0
  108. package/dist/model/searchParamsObject.d.ts +3 -0
  109. package/dist/model/searchParamsObject.d.ts.map +1 -1
  110. package/dist/model/searchParamsQuery.d.ts +1 -1
  111. package/dist/model/searchRecommendRulesParams.d.ts +18 -6
  112. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -1
  113. package/dist/model/searchRecommendRulesResponse.d.ts +6 -6
  114. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -1
  115. package/dist/model/semanticSearch.d.ts +2 -2
  116. package/dist/model/snippetResult.d.ts +1 -1
  117. package/dist/model/snippetResult.d.ts.map +1 -1
  118. package/dist/model/snippetResultOption.d.ts +2 -2
  119. package/dist/model/sortRemainingBy.d.ts +1 -1
  120. package/dist/model/supportedLanguage.d.ts +5 -0
  121. package/dist/model/supportedLanguage.d.ts.map +1 -0
  122. package/dist/model/tagFilters.d.ts +2 -3
  123. package/dist/model/tagFilters.d.ts.map +1 -1
  124. package/dist/model/taskStatus.d.ts +1 -1
  125. package/dist/model/trendingFacetHit.d.ts +2 -2
  126. package/dist/model/trendingFacets.d.ts +11 -0
  127. package/dist/model/trendingFacets.d.ts.map +1 -0
  128. package/dist/model/trendingFacetsModel.d.ts +1 -1
  129. package/dist/model/trendingFacetsQuery.d.ts +2 -2
  130. package/dist/model/trendingFacetsQuery.d.ts.map +1 -1
  131. package/dist/model/trendingItems.d.ts +15 -0
  132. package/dist/model/trendingItems.d.ts.map +1 -0
  133. package/dist/model/trendingItemsModel.d.ts +1 -1
  134. package/dist/model/trendingItemsQuery.d.ts +2 -2
  135. package/dist/model/trendingItemsQuery.d.ts.map +1 -1
  136. package/dist/model/typoTolerance.d.ts +1 -1
  137. package/dist/model/typoToleranceEnum.d.ts +3 -0
  138. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  139. package/dist/model/value.d.ts +5 -1
  140. package/dist/model/value.d.ts.map +1 -1
  141. package/dist/recommend.cjs +61 -45
  142. package/dist/recommend.esm.browser.js +58 -54
  143. package/dist/recommend.esm.node.js +61 -45
  144. package/dist/recommend.umd.js +2 -2
  145. package/dist/src/recommendClient.d.ts +36 -34
  146. package/dist/src/recommendClient.d.ts.map +1 -1
  147. package/model/aroundPrecision.ts +1 -1
  148. package/model/aroundPrecisionFromValueInner.ts +9 -0
  149. package/model/aroundRadius.ts +1 -1
  150. package/model/aroundRadiusAll.ts +3 -0
  151. package/model/autoFacetFilter.ts +16 -0
  152. package/model/baseRecommendRequest.ts +8 -4
  153. package/model/baseSearchParamsWithoutQuery.ts +26 -30
  154. package/model/baseSearchResponse.ts +9 -24
  155. package/model/{recommendationsQuery.ts → boughtTogetherQuery.ts} +3 -3
  156. package/model/clientMethodProps.ts +19 -11
  157. package/model/condition.ts +6 -12
  158. package/model/consequence.ts +9 -19
  159. package/model/deletedAtResponse.ts +2 -2
  160. package/model/distinct.ts +1 -1
  161. package/model/exactOnSingleWordQuery.ts +1 -1
  162. package/model/facetFilters.ts +2 -4
  163. package/model/facetOrdering.ts +2 -2
  164. package/model/facets.ts +2 -2
  165. package/model/{recommendationModels.ts → fallbackParams.ts} +3 -4
  166. package/model/fbtModel.ts +6 -0
  167. package/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
  168. package/model/getRecommendationsParams.ts +2 -2
  169. package/model/hideConsequenceObject.ts +11 -0
  170. package/model/highlightResult.ts +1 -0
  171. package/model/highlightResultOption.ts +3 -3
  172. package/model/ignorePlurals.ts +4 -2
  173. package/model/index.ts +23 -24
  174. package/model/indexSettingsAsSearchParams.ts +32 -36
  175. package/model/lookingSimilar.ts +15 -0
  176. package/model/lookingSimilarModel.ts +6 -0
  177. package/model/lookingSimilarQuery.ts +6 -0
  178. package/model/matchLevel.ts +1 -1
  179. package/model/mode.ts +1 -1
  180. package/model/numericFilters.ts +2 -4
  181. package/model/optionalFilters.ts +2 -4
  182. package/model/paramsConsequence.ts +23 -0
  183. package/model/promoteConsequenceObject.ts +16 -0
  184. package/model/queryType.ts +1 -1
  185. package/model/rankingInfo.ts +13 -10
  186. package/model/reRankingApplyFilter.ts +2 -4
  187. package/model/recommendHit.ts +3 -3
  188. package/model/{ruleResponse.ts → recommendRule.ts} +7 -10
  189. package/model/{ruleResponseMetadata.ts → recommendRuleMetadata.ts} +5 -2
  190. package/model/recommendationsHits.ts +0 -10
  191. package/model/recommendationsRequest.ts +6 -2
  192. package/model/recommendationsResults.ts +4 -1
  193. package/model/{baseRecommendedForYouQuery.ts → recommendedForYou.ts} +3 -5
  194. package/model/recommendedForYouModel.ts +1 -1
  195. package/model/recommendedForYouQuery.ts +2 -3
  196. package/model/redirect.ts +1 -1
  197. package/model/{editType.ts → redirectURL.ts} +4 -2
  198. package/model/relatedModel.ts +6 -0
  199. package/model/relatedProducts.ts +15 -0
  200. package/model/relatedQuery.ts +6 -0
  201. package/model/removeStopWords.ts +4 -2
  202. package/model/removeWordsIfNoResults.ts +1 -1
  203. package/model/renderingContent.ts +4 -1
  204. package/model/searchPagination.ts +23 -0
  205. package/model/{mixedSearchFilters.ts → searchParams.ts} +3 -1
  206. package/model/searchParamsObject.ts +3 -0
  207. package/model/searchParamsQuery.ts +1 -1
  208. package/model/searchRecommendRulesParams.ts +21 -6
  209. package/model/searchRecommendRulesResponse.ts +6 -6
  210. package/model/semanticSearch.ts +2 -2
  211. package/model/snippetResult.ts +2 -1
  212. package/model/snippetResultOption.ts +2 -2
  213. package/model/sortRemainingBy.ts +1 -1
  214. package/model/supportedLanguage.ts +74 -0
  215. package/model/tagFilters.ts +2 -4
  216. package/model/taskStatus.ts +1 -1
  217. package/model/trendingFacetHit.ts +2 -2
  218. package/model/{baseTrendingFacetsQuery.ts → trendingFacets.ts} +7 -4
  219. package/model/trendingFacetsModel.ts +1 -1
  220. package/model/trendingFacetsQuery.ts +2 -3
  221. package/model/trendingItems.ts +20 -0
  222. package/model/trendingItemsModel.ts +1 -1
  223. package/model/trendingItemsQuery.ts +2 -2
  224. package/model/typoTolerance.ts +1 -1
  225. package/model/typoToleranceEnum.ts +3 -0
  226. package/model/value.ts +6 -1
  227. package/package.json +11 -8
  228. package/dist/model/anchoring.d.ts +0 -5
  229. package/dist/model/anchoring.d.ts.map +0 -1
  230. package/dist/model/automaticFacetFilter.d.ts +0 -18
  231. package/dist/model/automaticFacetFilter.d.ts.map +0 -1
  232. package/dist/model/automaticFacetFilters.d.ts +0 -6
  233. package/dist/model/automaticFacetFilters.d.ts.map +0 -1
  234. package/dist/model/baseRecommendationsQuery.d.ts +0 -12
  235. package/dist/model/baseRecommendationsQuery.d.ts.map +0 -1
  236. package/dist/model/baseRecommendedForYouQuery.d.ts +0 -8
  237. package/dist/model/baseRecommendedForYouQuery.d.ts.map +0 -1
  238. package/dist/model/baseRecommendedForYouQueryParameters.d.ts +0 -7
  239. package/dist/model/baseRecommendedForYouQueryParameters.d.ts.map +0 -1
  240. package/dist/model/baseTrendingFacetsQuery.d.ts +0 -9
  241. package/dist/model/baseTrendingFacetsQuery.d.ts.map +0 -1
  242. package/dist/model/baseTrendingItemsQuery.d.ts +0 -16
  243. package/dist/model/baseTrendingItemsQuery.d.ts.map +0 -1
  244. package/dist/model/consequenceHide.d.ts +0 -10
  245. package/dist/model/consequenceHide.d.ts.map +0 -1
  246. package/dist/model/consequenceParams.d.ts +0 -5
  247. package/dist/model/consequenceParams.d.ts.map +0 -1
  248. package/dist/model/consequenceQuery.d.ts +0 -6
  249. package/dist/model/consequenceQuery.d.ts.map +0 -1
  250. package/dist/model/consequenceQueryObject.d.ts +0 -12
  251. package/dist/model/consequenceQueryObject.d.ts.map +0 -1
  252. package/dist/model/edit.d.ts +0 -13
  253. package/dist/model/edit.d.ts.map +0 -1
  254. package/dist/model/editType.d.ts +0 -5
  255. package/dist/model/editType.d.ts.map +0 -1
  256. package/dist/model/mixedSearchFilters.d.ts +0 -2
  257. package/dist/model/mixedSearchFilters.d.ts.map +0 -1
  258. package/dist/model/params.d.ts +0 -13
  259. package/dist/model/params.d.ts.map +0 -1
  260. package/dist/model/promote.d.ts +0 -4
  261. package/dist/model/promote.d.ts.map +0 -1
  262. package/dist/model/promoteObjectID.d.ts +0 -14
  263. package/dist/model/promoteObjectID.d.ts.map +0 -1
  264. package/dist/model/promoteObjectIDs.d.ts +0 -14
  265. package/dist/model/promoteObjectIDs.d.ts.map +0 -1
  266. package/dist/model/recommendationModels.d.ts +0 -5
  267. package/dist/model/recommendationModels.d.ts.map +0 -1
  268. package/dist/model/recommendationsQuery.d.ts +0 -4
  269. package/dist/model/recommendationsQuery.d.ts.map +0 -1
  270. package/dist/model/recommendedForYouQueryParameters.d.ts +0 -4
  271. package/dist/model/recommendedForYouQueryParameters.d.ts.map +0 -1
  272. package/dist/model/ruleResponse.d.ts +0 -27
  273. package/dist/model/ruleResponse.d.ts.map +0 -1
  274. package/dist/model/ruleResponseMetadata.d.ts +0 -7
  275. package/dist/model/ruleResponseMetadata.d.ts.map +0 -1
  276. package/model/anchoring.ts +0 -6
  277. package/model/automaticFacetFilter.ts +0 -21
  278. package/model/automaticFacetFilters.ts +0 -8
  279. package/model/baseRecommendationsQuery.ts +0 -17
  280. package/model/baseRecommendedForYouQueryParameters.ts +0 -8
  281. package/model/baseTrendingItemsQuery.ts +0 -22
  282. package/model/consequenceParams.ts +0 -9
  283. package/model/consequenceQuery.ts +0 -8
  284. package/model/consequenceQueryObject.ts +0 -15
  285. package/model/edit.ts +0 -17
  286. package/model/params.ts +0 -18
  287. package/model/promote.ts +0 -6
  288. package/model/promoteObjectID.ts +0 -16
  289. package/model/promoteObjectIDs.ts +0 -16
  290. package/model/recommendedForYouQueryParameters.ts +0 -7
@@ -1,12 +1,12 @@
1
1
  import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
2
- import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteRecommendRuleProps, GetRecommendRuleProps, GetRecommendStatusProps, SearchRecommendRulesProps } from '../model/clientMethodProps';
2
+ import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteRecommendRuleProps, GetRecommendRuleProps, GetRecommendStatusProps, LegacyGetRecommendationsParams, SearchRecommendRulesProps } from '../model/clientMethodProps';
3
3
  import type { DeletedAtResponse } from '../model/deletedAtResponse';
4
4
  import type { GetRecommendTaskResponse } from '../model/getRecommendTaskResponse';
5
5
  import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
6
6
  import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
7
- import type { RuleResponse } from '../model/ruleResponse';
7
+ import type { RecommendRule } from '../model/recommendRule';
8
8
  import type { SearchRecommendRulesResponse } from '../model/searchRecommendRulesResponse';
9
- export declare const apiClientVersion = "5.0.0-alpha.99";
9
+ export declare const apiClientVersion = "5.0.0-beta.10";
10
10
  export declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
11
11
  transporter: import("@algolia/client-common").Transporter;
12
12
  /**
@@ -31,7 +31,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
31
31
  /**
32
32
  * This method allow you to send requests to the Algolia REST API.
33
33
  *
34
- * @summary Send requests to the Algolia REST API.
35
34
  * @param customDelete - The customDelete object.
36
35
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
37
36
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -41,7 +40,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
41
40
  /**
42
41
  * This method allow you to send requests to the Algolia REST API.
43
42
  *
44
- * @summary Send requests to the Algolia REST API.
45
43
  * @param customGet - The customGet object.
46
44
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
47
45
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -51,7 +49,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
51
49
  /**
52
50
  * This method allow you to send requests to the Algolia REST API.
53
51
  *
54
- * @summary Send requests to the Algolia REST API.
55
52
  * @param customPost - The customPost object.
56
53
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
57
54
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -62,7 +59,6 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
62
59
  /**
63
60
  * This method allow you to send requests to the Algolia REST API.
64
61
  *
65
- * @summary Send requests to the Algolia REST API.
66
62
  * @param customPut - The customPut object.
67
63
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
68
64
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -71,60 +67,66 @@ export declare function createRecommendClient({ appId: appIdOption, apiKey: apiK
71
67
  */
72
68
  customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>;
73
69
  /**
74
- * Delete a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
70
+ * Deletes a Recommend rule from a recommendation scenario.
71
+ *
72
+ * Required API Key ACLs:
73
+ * - editSettings.
75
74
  *
76
- * @summary Delete a Recommend rule.
77
75
  * @param deleteRecommendRule - The deleteRecommendRule object.
78
- * @param deleteRecommendRule.indexName - Index on which to perform the request.
79
- * @param deleteRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
80
- * @param deleteRecommendRule.objectID - Unique record (object) identifier.
76
+ * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
77
+ * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
78
+ * @param deleteRecommendRule.objectID - Unique record identifier.
81
79
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
82
80
  */
83
81
  deleteRecommendRule({ indexName, model, objectID }: DeleteRecommendRuleProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
84
82
  /**
85
- * Return a [Recommend rule](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
83
+ * Retrieves a Recommend rule that you previously created in the Algolia dashboard.
84
+ *
85
+ * Required API Key ACLs:
86
+ * - settings.
86
87
  *
87
- * @summary Get a Recommend rule.
88
88
  * @param getRecommendRule - The getRecommendRule object.
89
- * @param getRecommendRule.indexName - Index on which to perform the request.
90
- * @param getRecommendRule.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
91
- * @param getRecommendRule.objectID - Unique record (object) identifier.
89
+ * @param getRecommendRule.indexName - Name of the index on which to perform the operation.
90
+ * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
91
+ * @param getRecommendRule.objectID - Unique record identifier.
92
92
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
93
93
  */
94
- getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<RuleResponse>;
94
+ getRecommendRule({ indexName, model, objectID }: GetRecommendRuleProps, requestOptions?: RequestOptions): Promise<RecommendRule>;
95
95
  /**
96
- * Some operations, such as deleting a Recommend rule, will respond with a `taskID` value. Use this value here to check the status of that task.
96
+ * Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.
97
+ *
98
+ * Required API Key ACLs:
99
+ * - editSettings.
97
100
  *
98
- * @summary Get a Recommend task\'s status.
99
101
  * @param getRecommendStatus - The getRecommendStatus object.
100
- * @param getRecommendStatus.indexName - Index on which to perform the request.
101
- * @param getRecommendStatus.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
102
- * @param getRecommendStatus.taskID - Unique identifier of a task. Numeric value (up to 64bits).
102
+ * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
103
+ * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
104
+ * @param getRecommendStatus.taskID - Unique task identifier.
103
105
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
104
106
  */
105
107
  getRecommendStatus({ indexName, model, taskID }: GetRecommendStatusProps, requestOptions?: RequestOptions): Promise<GetRecommendTaskResponse>;
106
108
  /**
107
- * Returns results from either recommendation or trending models: - **Recommendations** are provided by the [Related Products](https://www.algolia.com/doc/guides/algolia-recommend/overview/#related-products-and-related-content) and [Frequently Bought Together](https://www.algolia.com/doc/guides/algolia-recommend/overview/#frequently-bought-together) models - **Trending** models are [Trending Items and Trending Facet Values](https://www.algolia.com/doc/guides/algolia-recommend/overview/#trending-items-and-trending-facet-values).
109
+ * Retrieves recommendations from selected AI models.
110
+ *
111
+ * Required API Key ACLs:
112
+ * - search.
108
113
  *
109
- * @summary Get recommendations and trending items.
110
114
  * @param getRecommendationsParams - The getRecommendationsParams object.
111
115
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
112
116
  */
113
- getRecommendations(getRecommendationsParams: GetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
117
+ getRecommendations(getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
114
118
  /**
115
- * List [Recommend rules](https://www.algolia.com/doc/guides/algolia-recommend/how-to/rules/).
119
+ * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
120
+ *
121
+ * Required API Key ACLs:
122
+ * - settings.
116
123
  *
117
- * @summary List Recommend rules.
118
124
  * @param searchRecommendRules - The searchRecommendRules object.
119
- * @param searchRecommendRules.indexName - Index on which to perform the request.
120
- * @param searchRecommendRules.model - [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
125
+ * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
126
+ * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
121
127
  * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
122
128
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
123
129
  */
124
130
  searchRecommendRules({ indexName, model, searchRecommendRulesParams, }: SearchRecommendRulesProps, requestOptions?: RequestOptions): Promise<SearchRecommendRulesResponse>;
125
131
  };
126
- /**
127
- * The client type.
128
- */
129
- export type RecommendClient = ReturnType<typeof createRecommendClient>;
130
132
  //# sourceMappingURL=recommendClient.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAE1F,eAAO,MAAM,gBAAgB,mBAAmB,CAAC;AAsCjD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;;OAQG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;;OASG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;OASG;wDAE+B,wBAAwB,mBACvC,cAAc,GAC9B,QAAQ,iBAAiB,CAAC;IAqC7B;;;;;;;;;OASG;qDAE+B,qBAAqB,mBACpC,cAAc,GAC9B,QAAQ,YAAY,CAAC;IAqCxB;;;;;;;;;OASG;qDAE6B,uBAAuB,mBACpC,cAAc,GAC9B,QAAQ,wBAAwB,CAAC;IAoCpC;;;;;;OAMG;iDAEyB,wBAAwB,mBACjC,cAAc,GAC9B,QAAQ,0BAA0B,CAAC;IA8BtC;;;;;;;;;OASG;4EAME,yBAAyB,mBACX,cAAc,GAC9B,QAAQ,4BAA4B,CAAC;EAiC3C;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
1
+ {"version":3,"file":"recommendClient.d.ts","sourceRoot":"","sources":["../../src/recommendClient.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EACV,mBAAmB,EAKnB,cAAc,EACf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,cAAc,EACd,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,8BAA8B,EAC9B,yBAAyB,EAC1B,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAE1F,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAsChD,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,GAAG,OAAO,EACX,EAAE,mBAAmB;;IAwBlB;;OAEG;;IAGH;;OAEG;kBACW,OAAO,CAAC,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;;OAOG;uCAEqB,iBAAiB,mBACtB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;OAOG;oCAEqB,cAAc,mBACnB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAqB/B;;;;;;;;OAQG;2CAE2B,eAAe,mBAC1B,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;OAQG;0CAE2B,cAAc,mBACzB,cAAc,GAC9B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAsB/B;;;;;;;;;;;OAWG;wDAE+B,wBAAwB,mBACvC,cAAc,GAC9B,OAAO,CAAC,iBAAiB,CAAC;IAqC7B;;;;;;;;;;;OAWG;qDAE+B,qBAAqB,mBACpC,cAAc,GAC9B,OAAO,CAAC,aAAa,CAAC;IAqCzB;;;;;;;;;;;OAWG;qDAE6B,uBAAuB,mBACpC,cAAc,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IAoCpC;;;;;;;;OAQG;iDAGG,wBAAwB,GACxB,8BAA8B,mBACjB,cAAc,GAC9B,OAAO,CAAC,0BAA0B,CAAC;IAuCtC;;;;;;;;;;;OAWG;4EAME,yBAAyB,mBACX,cAAc,GAC9B,OAAO,CAAC,4BAA4B,CAAC;EAiC3C"}
@@ -3,6 +3,6 @@
3
3
  import type { AroundPrecisionFromValueInner } from './aroundPrecisionFromValueInner';
4
4
 
5
5
  /**
6
- * Precision of a geographical search (in meters), to [group results that are more or less the same distance from a central point](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/in-depth/geo-ranking-precision/).
6
+ * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
7
7
  */
8
8
  export type AroundPrecision = AroundPrecisionFromValueInner[] | number;
@@ -1,7 +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
+ /**
4
+ * Range object with lower and upper values in meters to define custom ranges.
5
+ */
3
6
  export type AroundPrecisionFromValueInner = {
7
+ /**
8
+ * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
9
+ */
4
10
  from?: number;
5
11
 
12
+ /**
13
+ * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
14
+ */
6
15
  value?: number;
7
16
  };
@@ -3,6 +3,6 @@
3
3
  import type { AroundRadiusAll } from './aroundRadiusAll';
4
4
 
5
5
  /**
6
- * [Maximum radius](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#increase-the-search-radius) for a geographical search (in meters).
6
+ * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
7
7
  */
8
8
  export type AroundRadius = AroundRadiusAll | number;
@@ -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
+ * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
5
+ */
3
6
  export type AroundRadiusAll = 'all';
@@ -0,0 +1,16 @@
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
+ * Facet attribute. Only recommendations with the same value (or only recommendations with a different value) as the original viewed item are included.
5
+ */
6
+ export type AutoFacetFilter = {
7
+ /**
8
+ * Facet attribute.
9
+ */
10
+ facet?: string;
11
+
12
+ /**
13
+ * Whether the filter is negative. If true, recommendations must not have the same value for the `facet` attribute. If false, recommendations must have the same value for the `facet` attribute.
14
+ */
15
+ negative?: boolean;
16
+ };
@@ -1,18 +1,22 @@
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 { SearchParams } from './searchParams';
4
+
3
5
  export type BaseRecommendRequest = {
4
6
  /**
5
- * Algolia index name.
7
+ * Index name (case-sensitive).
6
8
  */
7
9
  indexName: string;
8
10
 
9
11
  /**
10
- * Recommendations with a confidence score lower than `threshold` won\'t appear in results. > **Note**: Each recommendation has a confidence score of 0 to 100. The closer the score is to 100, the more relevant the recommendations are.
12
+ * Minimum score a recommendation must have to be included in the response.
11
13
  */
12
- threshold?: number;
14
+ threshold: number;
13
15
 
14
16
  /**
15
- * Maximum number of recommendations to retrieve. If 0, all recommendations will be returned.
17
+ * Maximum number of recommendations to retrieve. By default, all recommendations are returned and no fallback request is made. Depending on the available recommendations and the other request parameters, the actual number of recommendations may be lower than this value.
16
18
  */
17
19
  maxRecommendations?: number;
20
+
21
+ queryParameters?: SearchParams;
18
22
  };
@@ -5,16 +5,17 @@ import type { AroundRadius } from './aroundRadius';
5
5
  import type { FacetFilters } from './facetFilters';
6
6
  import type { NumericFilters } from './numericFilters';
7
7
  import type { OptionalFilters } from './optionalFilters';
8
+ import type { SupportedLanguage } from './supportedLanguage';
8
9
  import type { TagFilters } from './tagFilters';
9
10
 
10
11
  export type BaseSearchParamsWithoutQuery = {
11
12
  /**
12
- * Overrides the query parameter and performs a more generic search.
13
+ * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
13
14
  */
14
15
  similarQuery?: string;
15
16
 
16
17
  /**
17
- * [Filter](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) the query with numeric, facet, or tag filters.
18
+ * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
18
19
  */
19
20
  filters?: string;
20
21
 
@@ -27,47 +28,47 @@ export type BaseSearchParamsWithoutQuery = {
27
28
  tagFilters?: TagFilters;
28
29
 
29
30
  /**
30
- * Determines how to calculate [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores). If `false`, maximum score is kept. If `true`, score is summed.
31
+ * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
31
32
  */
32
33
  sumOrFiltersScores?: boolean;
33
34
 
34
35
  /**
35
- * Restricts a query to only look at a subset of your [searchable attributes](https://www.algolia.com/doc/guides/managing-results/must-do/searchable-attributes/).
36
+ * Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
36
37
  */
37
38
  restrictSearchableAttributes?: string[];
38
39
 
39
40
  /**
40
- * Returns [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts), their facet values, and the number of matching facet values.
41
+ * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
41
42
  */
42
43
  facets?: string[];
43
44
 
44
45
  /**
45
- * Forces faceting to be applied after [de-duplication](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/) (with the distinct feature). Alternatively, the `afterDistinct` [modifier](https://www.algolia.com/doc/api-reference/api-parameters/attributesForFaceting/#modifiers) of `attributesForFaceting` allows for more granular control.
46
+ * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
46
47
  */
47
48
  facetingAfterDistinct?: boolean;
48
49
 
49
50
  /**
50
- * Page to retrieve (the first page is `0`, not `1`).
51
+ * Page of search results to retrieve.
51
52
  */
52
53
  page?: number;
53
54
 
54
55
  /**
55
- * Specifies the offset of the first hit to return. > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
56
+ * Position of the first hit to retrieve.
56
57
  */
57
58
  offset?: number;
58
59
 
59
60
  /**
60
- * Sets the number of hits to retrieve (for use with `offset`). > **Note**: Using `page` and `hitsPerPage` is the recommended method for [paging results](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/). However, you can use `offset` and `length` to implement [an alternative approach to paging](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/pagination/js/#retrieving-a-subset-of-records-with-offset-and-length).
61
+ * Number of hits to retrieve (used in combination with `offset`).
61
62
  */
62
63
  length?: number;
63
64
 
64
65
  /**
65
- * Search for entries [around a central location](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filter-around-a-central-point), enabling a geographical search within a circular area.
66
+ * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
66
67
  */
67
68
  aroundLatLng?: string;
68
69
 
69
70
  /**
70
- * Search for entries around a location. The location is automatically computed from the requester\'s IP address.
71
+ * Whether to obtain the coordinates from the request\'s IP address.
71
72
  */
72
73
  aroundLatLngViaIP?: boolean;
73
74
 
@@ -76,62 +77,57 @@ export type BaseSearchParamsWithoutQuery = {
76
77
  aroundPrecision?: AroundPrecision;
77
78
 
78
79
  /**
79
- * Minimum radius (in meters) used for a geographical search when `aroundRadius` isn\'t set.
80
+ * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
80
81
  */
81
82
  minimumAroundRadius?: number;
82
83
 
83
84
  /**
84
- * Search inside a [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
85
+ * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
85
86
  */
86
87
  insideBoundingBox?: number[][];
87
88
 
88
89
  /**
89
- * Search inside a [polygon](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas) (in geographical coordinates).
90
+ * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
90
91
  */
91
92
  insidePolygon?: number[][];
92
93
 
93
94
  /**
94
- * Changes the default values of parameters that work best for a natural language query, such as `ignorePlurals`, `removeStopWords`, `removeWordsIfNoResults`, `analyticsTags`, and `ruleContexts`. These parameters work well together when the query consists of fuller natural language strings instead of keywords, for example when processing voice search queries.
95
+ * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
95
96
  */
96
- naturalLanguages?: string[];
97
+ naturalLanguages?: SupportedLanguage[];
97
98
 
98
99
  /**
99
- * Assigns [rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) to search queries.
100
+ * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
100
101
  */
101
102
  ruleContexts?: string[];
102
103
 
103
104
  /**
104
- * Defines how much [Personalization affects results](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
105
+ * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
105
106
  */
106
107
  personalizationImpact?: number;
107
108
 
108
109
  /**
109
- * Associates a [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/) with the current search.
110
+ * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
110
111
  */
111
112
  userToken?: string;
112
113
 
113
114
  /**
114
- * Incidates whether the search response includes [detailed ranking information](https://www.algolia.com/doc/guides/building-search-ui/going-further/backend-search/in-depth/understanding-the-api-response/#ranking-information).
115
+ * Whether the search response should include detailed ranking information.
115
116
  */
116
117
  getRankingInfo?: boolean;
117
118
 
118
119
  /**
119
- * Enriches the API\'s response with information about how the query was processed.
120
- */
121
- explain?: string[];
122
-
123
- /**
124
- * Whether to take into account an index\'s synonyms for a particular search.
120
+ * Whether to take into account an index\'s synonyms for this search.
125
121
  */
126
122
  synonyms?: boolean;
127
123
 
128
124
  /**
129
- * Indicates whether a query ID parameter is included in the search response. This is required for [tracking click and conversion events](https://www.algolia.com/doc/guides/sending-events/concepts/event-types/#events-related-to-algolia-requests).
125
+ * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
130
126
  */
131
127
  clickAnalytics?: boolean;
132
128
 
133
129
  /**
134
- * Indicates whether this query will be included in [analytics](https://www.algolia.com/doc/guides/search-analytics/guides/exclude-queries/).
130
+ * Whether this search will be included in Analytics.
135
131
  */
136
132
  analytics?: boolean;
137
133
 
@@ -141,12 +137,12 @@ export type BaseSearchParamsWithoutQuery = {
141
137
  analyticsTags?: string[];
142
138
 
143
139
  /**
144
- * Whether to include or exclude a query from the processing-time percentile computation.
140
+ * Whether to include this search when calculating processing-time percentiles.
145
141
  */
146
142
  percentileComputation?: boolean;
147
143
 
148
144
  /**
149
- * Incidates whether this search will be considered in A/B testing.
145
+ * Whether to enable A/B testing for this search.
150
146
  */
151
147
  enableABTest?: boolean;
152
148
  };
@@ -22,7 +22,7 @@ export type BaseSearchResponse = Record<string, any> & {
22
22
  aroundLatLng?: string;
23
23
 
24
24
  /**
25
- * Automatically-computed radius.
25
+ * Distance from a central coordinate provided by `aroundLatLng`.
26
26
  */
27
27
  automaticRadius?: string;
28
28
 
@@ -44,7 +44,7 @@ export type BaseSearchResponse = Record<string, any> & {
44
44
  exhaustiveTypo?: boolean;
45
45
 
46
46
  /**
47
- * Mapping of each facet name to the corresponding facet counts.
47
+ * Facet counts.
48
48
  */
49
49
  facets?: Record<string, Record<string, number>>;
50
50
 
@@ -53,11 +53,6 @@ export type BaseSearchResponse = Record<string, any> & {
53
53
  */
54
54
  facets_stats?: Record<string, FacetsStats>;
55
55
 
56
- /**
57
- * Number of hits per page.
58
- */
59
- hitsPerPage: number;
60
-
61
56
  /**
62
57
  * Index name used for the query.
63
58
  */
@@ -73,26 +68,11 @@ export type BaseSearchResponse = Record<string, any> & {
73
68
  */
74
69
  message?: string;
75
70
 
76
- /**
77
- * Number of hits the search query matched.
78
- */
79
- nbHits: number;
80
-
81
- /**
82
- * Number of pages of results for the current query.
83
- */
84
- nbPages: number;
85
-
86
71
  /**
87
72
  * Number of hits selected and sorted by the relevant sort algorithm.
88
73
  */
89
74
  nbSortedHits?: number;
90
75
 
91
- /**
92
- * Page to retrieve (the first page is `0`, not `1`).
93
- */
94
- page: number;
95
-
96
76
  /**
97
77
  * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
98
78
  */
@@ -128,7 +108,12 @@ export type BaseSearchResponse = Record<string, any> & {
128
108
  serverUsed?: string;
129
109
 
130
110
  /**
131
- * Lets you store custom data in your indices.
111
+ * An object with custom data. You can store up to 32kB as custom data.
112
+ */
113
+ userData?: Record<string, any>;
114
+
115
+ /**
116
+ * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
132
117
  */
133
- userData?: any | null;
118
+ queryID?: string;
134
119
  };
@@ -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
  import type { BaseRecommendRequest } from './baseRecommendRequest';
4
- import type { BaseRecommendationsQuery } from './baseRecommendationsQuery';
4
+ import type { FrequentlyBoughtTogether } from './frequentlyBoughtTogether';
5
5
 
6
- export type RecommendationsQuery = BaseRecommendationsQuery &
7
- BaseRecommendRequest;
6
+ export type BoughtTogetherQuery = BaseRecommendRequest &
7
+ FrequentlyBoughtTogether;
@@ -1,6 +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
  import type { RecommendModels } from './recommendModels';
4
+ import type { RecommendationsRequest } from './recommendationsRequest';
4
5
  import type { SearchRecommendRulesParams } from './searchRecommendRulesParams';
5
6
 
6
7
  /**
@@ -72,15 +73,15 @@ export type CustomPutProps = {
72
73
  */
73
74
  export type DeleteRecommendRuleProps = {
74
75
  /**
75
- * Index on which to perform the request.
76
+ * Name of the index on which to perform the operation.
76
77
  */
77
78
  indexName: string;
78
79
  /**
79
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
80
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
80
81
  */
81
82
  model: RecommendModels;
82
83
  /**
83
- * Unique record (object) identifier.
84
+ * Unique record identifier.
84
85
  */
85
86
  objectID: string;
86
87
  };
@@ -90,15 +91,15 @@ export type DeleteRecommendRuleProps = {
90
91
  */
91
92
  export type GetRecommendRuleProps = {
92
93
  /**
93
- * Index on which to perform the request.
94
+ * Name of the index on which to perform the operation.
94
95
  */
95
96
  indexName: string;
96
97
  /**
97
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
98
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
98
99
  */
99
100
  model: RecommendModels;
100
101
  /**
101
- * Unique record (object) identifier.
102
+ * Unique record identifier.
102
103
  */
103
104
  objectID: string;
104
105
  };
@@ -108,29 +109,36 @@ export type GetRecommendRuleProps = {
108
109
  */
109
110
  export type GetRecommendStatusProps = {
110
111
  /**
111
- * Index on which to perform the request.
112
+ * Name of the index on which to perform the operation.
112
113
  */
113
114
  indexName: string;
114
115
  /**
115
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
116
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
116
117
  */
117
118
  model: RecommendModels;
118
119
  /**
119
- * Unique identifier of a task. Numeric value (up to 64bits).
120
+ * Unique task identifier.
120
121
  */
121
122
  taskID: number;
122
123
  };
123
124
 
125
+ /**
126
+ * Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
127
+ *
128
+ * @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
129
+ */
130
+ export type LegacyGetRecommendationsParams = RecommendationsRequest[];
131
+
124
132
  /**
125
133
  * Properties for the `searchRecommendRules` method.
126
134
  */
127
135
  export type SearchRecommendRulesProps = {
128
136
  /**
129
- * Index on which to perform the request.
137
+ * Name of the index on which to perform the operation.
130
138
  */
131
139
  indexName: string;
132
140
  /**
133
- * [Recommend models](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
141
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
134
142
  */
135
143
  model: RecommendModels;
136
144
  searchRecommendRulesParams?: SearchRecommendRulesParams;
@@ -1,22 +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 { Anchoring } from './anchoring';
4
-
3
+ /**
4
+ * Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
5
+ */
5
6
  export type Condition = {
6
7
  /**
7
- * Query pattern syntax.
8
- */
9
- pattern?: string;
10
-
11
- anchoring?: Anchoring;
12
-
13
- /**
14
- * Whether the pattern matches on plurals, synonyms, and typos.
8
+ * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
15
9
  */
16
- alternatives?: boolean;
10
+ filters?: string;
17
11
 
18
12
  /**
19
- * Rule context format: [A-Za-z0-9_-]+).
13
+ * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
20
14
  */
21
15
  context?: string;
22
16
  };