@algolia/recommend 5.0.0-alpha.11 → 5.0.0-alpha.111

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 (316) hide show
  1. package/dist/builds/browser.d.ts +23 -5
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +23 -5
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/model/advancedSyntaxFeatures.d.ts +1 -1
  6. package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
  7. package/dist/model/alternativesAsExact.d.ts +1 -1
  8. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  9. package/dist/model/aroundPrecision.d.ts +6 -0
  10. package/dist/model/aroundPrecision.d.ts.map +1 -0
  11. package/dist/model/aroundPrecisionFromValueInner.d.ts +14 -0
  12. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
  13. package/dist/model/aroundRadius.d.ts +5 -5
  14. package/dist/model/aroundRadius.d.ts.map +1 -1
  15. package/dist/model/aroundRadiusAll.d.ts +4 -1
  16. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  17. package/dist/model/autoFacetFilter.d.ts +14 -0
  18. package/dist/model/autoFacetFilter.d.ts.map +1 -0
  19. package/dist/model/baseRecommendRequest.d.ts +16 -17
  20. package/dist/model/baseRecommendRequest.d.ts.map +1 -1
  21. package/dist/model/baseSearchParams.d.ts +3 -3
  22. package/dist/model/baseSearchParams.d.ts.map +1 -1
  23. package/dist/model/baseSearchParamsWithoutQuery.d.ts +114 -122
  24. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  25. package/dist/model/baseSearchResponse.d.ts +109 -101
  26. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  27. package/dist/model/boughtTogetherQuery.d.ts +4 -0
  28. package/dist/model/boughtTogetherQuery.d.ts.map +1 -0
  29. package/dist/model/clientMethodProps.d.ts +127 -60
  30. package/dist/model/clientMethodProps.d.ts.map +1 -1
  31. package/dist/model/condition.d.ts +14 -0
  32. package/dist/model/condition.d.ts.map +1 -0
  33. package/dist/model/consequence.d.ts +18 -0
  34. package/dist/model/consequence.d.ts.map +1 -0
  35. package/dist/model/deletedAtResponse.d.ts +14 -0
  36. package/dist/model/deletedAtResponse.d.ts.map +1 -0
  37. package/dist/model/distinct.d.ts +4 -4
  38. package/dist/model/distinct.d.ts.map +1 -1
  39. package/dist/model/errorBase.d.ts +6 -6
  40. package/dist/model/errorBase.d.ts.map +1 -1
  41. package/dist/model/exactOnSingleWordQuery.d.ts +4 -4
  42. package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
  43. package/dist/model/exhaustive.d.ts +26 -0
  44. package/dist/model/exhaustive.d.ts.map +1 -0
  45. package/dist/model/facetFilters.d.ts +5 -5
  46. package/dist/model/facetFilters.d.ts.map +1 -1
  47. package/dist/model/facetOrdering.d.ts +12 -12
  48. package/dist/model/facetOrdering.d.ts.map +1 -1
  49. package/dist/model/facets.d.ts +9 -9
  50. package/dist/model/facets.d.ts.map +1 -1
  51. package/dist/model/facetsStats.d.ts +18 -18
  52. package/dist/model/facetsStats.d.ts.map +1 -1
  53. package/dist/model/fallbackParams.d.ts +3 -0
  54. package/dist/model/fallbackParams.d.ts.map +1 -0
  55. package/dist/model/fbtModel.d.ts +5 -0
  56. package/dist/model/fbtModel.d.ts.map +1 -0
  57. package/dist/model/frequentlyBoughtTogether.d.ts +9 -0
  58. package/dist/model/frequentlyBoughtTogether.d.ts.map +1 -0
  59. package/dist/model/getRecommendTaskResponse.d.ts +5 -0
  60. package/dist/model/getRecommendTaskResponse.d.ts.map +1 -0
  61. package/dist/model/getRecommendationsParams.d.ts +10 -10
  62. package/dist/model/getRecommendationsParams.d.ts.map +1 -1
  63. package/dist/model/getRecommendationsResponse.d.ts +4 -4
  64. package/dist/model/getRecommendationsResponse.d.ts.map +1 -1
  65. package/dist/model/hideConsequenceObject.d.ts +10 -0
  66. package/dist/model/hideConsequenceObject.d.ts.map +1 -0
  67. package/dist/model/highlightResult.d.ts +2 -2
  68. package/dist/model/highlightResult.d.ts.map +1 -1
  69. package/dist/model/highlightResultOption.d.ts +19 -19
  70. package/dist/model/highlightResultOption.d.ts.map +1 -1
  71. package/dist/model/ignorePlurals.d.ts +5 -4
  72. package/dist/model/ignorePlurals.d.ts.map +1 -1
  73. package/dist/model/index.d.ts +92 -53
  74. package/dist/model/index.d.ts.map +1 -1
  75. package/dist/model/indexSettingsAsSearchParams.d.ts +159 -160
  76. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  77. package/dist/model/lookingSimilar.d.ts +11 -0
  78. package/dist/model/lookingSimilar.d.ts.map +1 -0
  79. package/dist/model/lookingSimilarModel.d.ts +5 -0
  80. package/dist/model/lookingSimilarModel.d.ts.map +1 -0
  81. package/dist/model/lookingSimilarQuery.d.ts +4 -0
  82. package/dist/model/lookingSimilarQuery.d.ts.map +1 -0
  83. package/dist/model/matchLevel.d.ts +4 -4
  84. package/dist/model/matchLevel.d.ts.map +1 -1
  85. package/dist/model/matchedGeoLocation.d.ts +14 -14
  86. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  87. package/dist/model/mixedSearchFilters.d.ts +1 -1
  88. package/dist/model/mixedSearchFilters.d.ts.map +1 -1
  89. package/dist/model/mode.d.ts +5 -0
  90. package/dist/model/mode.d.ts.map +1 -0
  91. package/dist/model/numericFilters.d.ts +5 -5
  92. package/dist/model/numericFilters.d.ts.map +1 -1
  93. package/dist/model/optionalFilters.d.ts +5 -5
  94. package/dist/model/optionalFilters.d.ts.map +1 -1
  95. package/dist/model/paramsConsequence.d.ts +19 -0
  96. package/dist/model/paramsConsequence.d.ts.map +1 -0
  97. package/dist/model/personalization.d.ts +14 -14
  98. package/dist/model/personalization.d.ts.map +1 -1
  99. package/dist/model/promoteConsequenceObject.d.ts +14 -0
  100. package/dist/model/promoteConsequenceObject.d.ts.map +1 -0
  101. package/dist/model/queryType.d.ts +4 -4
  102. package/dist/model/queryType.d.ts.map +1 -1
  103. package/dist/model/rankingInfo.d.ts +53 -50
  104. package/dist/model/rankingInfo.d.ts.map +1 -1
  105. package/dist/model/reRankingApplyFilter.d.ts +5 -5
  106. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  107. package/dist/model/recommendHit.d.ts +26 -26
  108. package/dist/model/recommendHit.d.ts.map +1 -1
  109. package/dist/model/recommendModels.d.ts +2 -0
  110. package/dist/model/recommendModels.d.ts.map +1 -0
  111. package/dist/model/recommendRule.d.ts +24 -0
  112. package/dist/model/recommendRule.d.ts.map +1 -0
  113. package/dist/model/recommendRuleMetadata.d.ts +10 -0
  114. package/dist/model/recommendRuleMetadata.d.ts.map +1 -0
  115. package/dist/model/recommendationsHit.d.ts +4 -0
  116. package/dist/model/recommendationsHit.d.ts.map +1 -0
  117. package/dist/model/recommendationsHits.d.ts +5 -0
  118. package/dist/model/recommendationsHits.d.ts.map +1 -0
  119. package/dist/model/recommendationsRequest.d.ts +7 -3
  120. package/dist/model/recommendationsRequest.d.ts.map +1 -1
  121. package/dist/model/recommendationsResults.d.ts +4 -0
  122. package/dist/model/recommendationsResults.d.ts.map +1 -0
  123. package/dist/model/recommendedForYou.d.ts +7 -0
  124. package/dist/model/recommendedForYou.d.ts.map +1 -0
  125. package/dist/model/recommendedForYouModel.d.ts +5 -0
  126. package/dist/model/recommendedForYouModel.d.ts.map +1 -0
  127. package/dist/model/recommendedForYouQuery.d.ts +4 -0
  128. package/dist/model/recommendedForYouQuery.d.ts.map +1 -0
  129. package/dist/model/redirect.d.ts +8 -0
  130. package/dist/model/redirect.d.ts.map +1 -0
  131. package/dist/model/redirectRuleIndexMetadata.d.ts +21 -0
  132. package/dist/model/redirectRuleIndexMetadata.d.ts.map +1 -0
  133. package/dist/model/redirectRuleIndexMetadataData.d.ts +7 -0
  134. package/dist/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
  135. package/dist/model/relatedModel.d.ts +5 -0
  136. package/dist/model/relatedModel.d.ts.map +1 -0
  137. package/dist/model/relatedProducts.d.ts +11 -0
  138. package/dist/model/relatedProducts.d.ts.map +1 -0
  139. package/dist/model/relatedQuery.d.ts +4 -0
  140. package/dist/model/relatedQuery.d.ts.map +1 -0
  141. package/dist/model/removeStopWords.d.ts +5 -4
  142. package/dist/model/removeStopWords.d.ts.map +1 -1
  143. package/dist/model/removeWordsIfNoResults.d.ts +4 -4
  144. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  145. package/dist/model/renderingContent.d.ts +7 -7
  146. package/dist/model/renderingContent.d.ts.map +1 -1
  147. package/dist/model/searchParams.d.ts +3 -0
  148. package/dist/model/searchParams.d.ts.map +1 -0
  149. package/dist/model/searchParamsObject.d.ts +3 -3
  150. package/dist/model/searchParamsObject.d.ts.map +1 -1
  151. package/dist/model/searchParamsQuery.d.ts +6 -6
  152. package/dist/model/searchParamsQuery.d.ts.map +1 -1
  153. package/dist/model/searchRecommendRulesParams.d.ts +38 -0
  154. package/dist/model/searchRecommendRulesParams.d.ts.map +1 -0
  155. package/dist/model/searchRecommendRulesResponse.d.ts +20 -0
  156. package/dist/model/searchRecommendRulesResponse.d.ts.map +1 -0
  157. package/dist/model/semanticSearch.d.ts +10 -0
  158. package/dist/model/semanticSearch.d.ts.map +1 -0
  159. package/dist/model/snippetResult.d.ts +2 -2
  160. package/dist/model/snippetResult.d.ts.map +1 -1
  161. package/dist/model/snippetResultOption.d.ts +11 -11
  162. package/dist/model/snippetResultOption.d.ts.map +1 -1
  163. package/dist/model/sortRemainingBy.d.ts +4 -4
  164. package/dist/model/sortRemainingBy.d.ts.map +1 -1
  165. package/dist/model/supportedLanguage.d.ts +5 -0
  166. package/dist/model/supportedLanguage.d.ts.map +1 -0
  167. package/dist/model/tagFilters.d.ts +5 -5
  168. package/dist/model/tagFilters.d.ts.map +1 -1
  169. package/dist/model/taskStatus.d.ts +5 -0
  170. package/dist/model/taskStatus.d.ts.map +1 -0
  171. package/dist/model/trendingFacetHit.d.ts +18 -0
  172. package/dist/model/trendingFacetHit.d.ts.map +1 -0
  173. package/dist/model/trendingFacets.d.ts +11 -0
  174. package/dist/model/trendingFacets.d.ts.map +1 -0
  175. package/dist/model/trendingFacetsModel.d.ts +5 -0
  176. package/dist/model/trendingFacetsModel.d.ts.map +1 -0
  177. package/dist/model/trendingFacetsQuery.d.ts +4 -0
  178. package/dist/model/trendingFacetsQuery.d.ts.map +1 -0
  179. package/dist/model/trendingItems.d.ts +15 -0
  180. package/dist/model/trendingItems.d.ts.map +1 -0
  181. package/dist/model/trendingItemsModel.d.ts +5 -0
  182. package/dist/model/trendingItemsModel.d.ts.map +1 -0
  183. package/dist/model/trendingItemsQuery.d.ts +4 -0
  184. package/dist/model/trendingItemsQuery.d.ts.map +1 -0
  185. package/dist/model/typoTolerance.d.ts +5 -5
  186. package/dist/model/typoTolerance.d.ts.map +1 -1
  187. package/dist/model/typoToleranceEnum.d.ts +4 -1
  188. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  189. package/dist/model/value.d.ts +8 -8
  190. package/dist/model/value.d.ts.map +1 -1
  191. package/dist/recommend.cjs +390 -0
  192. package/dist/recommend.esm.browser.js +589 -475
  193. package/dist/recommend.esm.node.js +379 -235
  194. package/dist/recommend.umd.js +2 -2
  195. package/dist/src/recommendClient.d.ts +131 -81
  196. package/dist/src/recommendClient.d.ts.map +1 -1
  197. package/index.js +1 -1
  198. package/model/advancedSyntaxFeatures.ts +1 -1
  199. package/model/alternativesAsExact.ts +1 -1
  200. package/model/aroundPrecision.ts +8 -0
  201. package/model/aroundPrecisionFromValueInner.ts +16 -0
  202. package/model/aroundRadius.ts +2 -2
  203. package/model/aroundRadiusAll.ts +4 -1
  204. package/model/autoFacetFilter.ts +16 -0
  205. package/model/baseRecommendRequest.ts +6 -8
  206. package/model/baseSearchParams.ts +1 -1
  207. package/model/baseSearchParamsWithoutQuery.ts +36 -46
  208. package/model/baseSearchResponse.ts +42 -31
  209. package/model/boughtTogetherQuery.ts +7 -0
  210. package/model/clientMethodProps.ts +91 -19
  211. package/model/condition.ts +16 -0
  212. package/model/consequence.ts +22 -0
  213. package/model/deletedAtResponse.ts +16 -0
  214. package/model/distinct.ts +2 -2
  215. package/model/errorBase.ts +1 -1
  216. package/model/exactOnSingleWordQuery.ts +2 -2
  217. package/model/exhaustive.ts +31 -0
  218. package/model/facetFilters.ts +2 -2
  219. package/model/facetOrdering.ts +3 -3
  220. package/model/facets.ts +3 -3
  221. package/model/facetsStats.ts +5 -5
  222. package/model/fallbackParams.ts +5 -0
  223. package/model/fbtModel.ts +6 -0
  224. package/model/frequentlyBoughtTogether.ts +12 -0
  225. package/model/getRecommendTaskResponse.ts +7 -0
  226. package/model/getRecommendationsParams.ts +3 -3
  227. package/model/getRecommendationsResponse.ts +3 -3
  228. package/model/hideConsequenceObject.ts +11 -0
  229. package/model/highlightResult.ts +5 -2
  230. package/model/highlightResultOption.ts +4 -4
  231. package/model/ignorePlurals.ts +5 -3
  232. package/model/index.ts +48 -9
  233. package/model/indexSettingsAsSearchParams.ts +54 -54
  234. package/model/lookingSimilar.ts +15 -0
  235. package/model/lookingSimilarModel.ts +6 -0
  236. package/model/lookingSimilarQuery.ts +6 -0
  237. package/model/matchLevel.ts +2 -2
  238. package/model/matchedGeoLocation.ts +1 -1
  239. package/model/mixedSearchFilters.ts +1 -1
  240. package/model/mode.ts +6 -0
  241. package/model/numericFilters.ts +2 -2
  242. package/model/optionalFilters.ts +2 -2
  243. package/model/paramsConsequence.ts +23 -0
  244. package/model/personalization.ts +1 -1
  245. package/model/promoteConsequenceObject.ts +16 -0
  246. package/model/queryType.ts +2 -2
  247. package/model/rankingInfo.ts +11 -8
  248. package/model/reRankingApplyFilter.ts +2 -2
  249. package/model/recommendHit.ts +6 -6
  250. package/model/recommendModels.ts +7 -0
  251. package/model/recommendRule.ts +31 -0
  252. package/model/recommendRuleMetadata.ts +11 -0
  253. package/model/recommendationsHit.ts +6 -0
  254. package/model/recommendationsHits.ts +7 -0
  255. package/model/recommendationsRequest.ts +14 -4
  256. package/model/recommendationsResults.ts +6 -0
  257. package/model/recommendedForYou.ts +10 -0
  258. package/model/recommendedForYouModel.ts +6 -0
  259. package/model/recommendedForYouQuery.ts +6 -0
  260. package/model/redirect.ts +10 -0
  261. package/model/redirectRuleIndexMetadata.ts +27 -0
  262. package/model/redirectRuleIndexMetadataData.ts +8 -0
  263. package/model/relatedModel.ts +6 -0
  264. package/model/relatedProducts.ts +15 -0
  265. package/model/relatedQuery.ts +6 -0
  266. package/model/removeStopWords.ts +5 -3
  267. package/model/removeWordsIfNoResults.ts +2 -2
  268. package/model/renderingContent.ts +2 -2
  269. package/model/searchParams.ts +5 -0
  270. package/model/searchParamsObject.ts +1 -1
  271. package/model/searchParamsQuery.ts +2 -2
  272. package/model/searchRecommendRulesParams.ts +46 -0
  273. package/model/searchRecommendRulesResponse.ts +25 -0
  274. package/model/semanticSearch.ts +11 -0
  275. package/model/snippetResult.ts +5 -2
  276. package/model/snippetResultOption.ts +3 -3
  277. package/model/sortRemainingBy.ts +2 -2
  278. package/model/supportedLanguage.ts +74 -0
  279. package/model/tagFilters.ts +2 -2
  280. package/model/taskStatus.ts +6 -0
  281. package/model/trendingFacetHit.ts +21 -0
  282. package/model/trendingFacets.ts +15 -0
  283. package/model/trendingFacetsModel.ts +6 -0
  284. package/model/trendingFacetsQuery.ts +6 -0
  285. package/model/trendingItems.ts +20 -0
  286. package/model/trendingItemsModel.ts +6 -0
  287. package/model/trendingItemsQuery.ts +6 -0
  288. package/model/typoTolerance.ts +2 -2
  289. package/model/typoToleranceEnum.ts +4 -1
  290. package/model/value.ts +2 -2
  291. package/package.json +10 -9
  292. package/dist/model/baseRecommendationRequest.d.ts +0 -9
  293. package/dist/model/baseRecommendationRequest.d.ts.map +0 -1
  294. package/dist/model/baseTrendingRequest.d.ts +0 -13
  295. package/dist/model/baseTrendingRequest.d.ts.map +0 -1
  296. package/dist/model/recommendHits.d.ts +0 -5
  297. package/dist/model/recommendHits.d.ts.map +0 -1
  298. package/dist/model/recommendationModels.d.ts +0 -5
  299. package/dist/model/recommendationModels.d.ts.map +0 -1
  300. package/dist/model/recommendationRequest.d.ts +0 -4
  301. package/dist/model/recommendationRequest.d.ts.map +0 -1
  302. package/dist/model/recommendationsResponse.d.ts +0 -4
  303. package/dist/model/recommendationsResponse.d.ts.map +0 -1
  304. package/dist/model/trendingModels.d.ts +0 -5
  305. package/dist/model/trendingModels.d.ts.map +0 -1
  306. package/dist/model/trendingRequest.d.ts +0 -4
  307. package/dist/model/trendingRequest.d.ts.map +0 -1
  308. package/dist/recommend.cjs.js +0 -248
  309. package/model/baseRecommendationRequest.ts +0 -12
  310. package/model/baseTrendingRequest.ts +0 -17
  311. package/model/recommendHits.ts +0 -7
  312. package/model/recommendationModels.ts +0 -6
  313. package/model/recommendationRequest.ts +0 -7
  314. package/model/recommendationsResponse.ts +0 -6
  315. package/model/trendingModels.ts +0 -6
  316. package/model/trendingRequest.ts +0 -6
@@ -1 +1 @@
1
- {"version":3,"file":"snippetResult.d.ts","sourceRoot":"","sources":["../../model/snippetResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,oBAAY,aAAa,GAAG,mBAAmB,GAAG,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"snippetResult.d.ts","sourceRoot":"","sources":["../../model/snippetResult.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,aAAa,GACrB,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,GACnC,mBAAmB,GACnB,mBAAmB,EAAE,CAAC"}
@@ -1,12 +1,12 @@
1
- import type { MatchLevel } from './matchLevel';
2
- /**
3
- * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
4
- */
5
- export declare type SnippetResultOption = {
6
- /**
7
- * Markup text with occurrences highlighted.
8
- */
9
- value: string;
10
- matchLevel: MatchLevel;
11
- };
1
+ import type { MatchLevel } from './matchLevel';
2
+ /**
3
+ * Snippets that show the context around a matching search query.
4
+ */
5
+ export type SnippetResultOption = {
6
+ /**
7
+ * Highlighted attribute value, including HTML tags.
8
+ */
9
+ value: string;
10
+ matchLevel: MatchLevel;
11
+ };
12
12
  //# sourceMappingURL=snippetResultOption.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["../../model/snippetResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
1
+ {"version":3,"file":"snippetResultOption.d.ts","sourceRoot":"","sources":["../../model/snippetResultOption.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC"}
@@ -1,5 +1,5 @@
1
- /**
2
- * How to display the remaining items. - `count`: facet count (descending). - `alpha`: alphabetical (ascending). - `hidden`: show only pinned values.
3
- */
4
- export declare type SortRemainingBy = 'alpha' | 'count' | 'hidden';
1
+ /**
2
+ * 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.
3
+ */
4
+ export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
5
5
  //# sourceMappingURL=sortRemainingBy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["../../model/sortRemainingBy.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"sortRemainingBy.d.ts","sourceRoot":"","sources":["../../model/sortRemainingBy.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * ISO code for a supported language.
3
+ */
4
+ export type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt-br' | 'pt' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh';
5
+ //# sourceMappingURL=supportedLanguage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supportedLanguage.d.ts","sourceRoot":"","sources":["../../model/supportedLanguage.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GACzB,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,OAAO,GACP,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,GACJ,IAAI,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { MixedSearchFilters } from './mixedSearchFilters';
2
- /**
3
- * Filter hits by tags.
4
- */
5
- export declare type TagFilters = MixedSearchFilters[] | string;
1
+ import type { MixedSearchFilters } from './mixedSearchFilters';
2
+ /**
3
+ * 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`.
4
+ */
5
+ export type TagFilters = MixedSearchFilters[] | string;
6
6
  //# sourceMappingURL=tagFilters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["../../model/tagFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,oBAAY,UAAU,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"tagFilters.d.ts","sourceRoot":"","sources":["../../model/tagFilters.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,kBAAkB,EAAE,GAAG,MAAM,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Task status, `published` if the task is completed, `notPublished` otherwise.
3
+ */
4
+ export type TaskStatus = 'notPublished' | 'published';
5
+ //# sourceMappingURL=taskStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taskStatus.d.ts","sourceRoot":"","sources":["../../model/taskStatus.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,WAAW,CAAC"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Trending facet hit.
3
+ */
4
+ export type TrendingFacetHit = {
5
+ /**
6
+ * Recommendation score.
7
+ */
8
+ _score: number;
9
+ /**
10
+ * Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
11
+ */
12
+ facetName: string;
13
+ /**
14
+ * Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
15
+ */
16
+ facetValue: string;
17
+ };
18
+ //# sourceMappingURL=trendingFacetHit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacetHit.d.ts","sourceRoot":"","sources":["../../model/trendingFacetHit.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { FallbackParams } from './fallbackParams';
2
+ import type { TrendingFacetsModel } from './trendingFacetsModel';
3
+ export type TrendingFacets = {
4
+ /**
5
+ * Facet attribute for which to retrieve trending facet values.
6
+ */
7
+ facetName: any | null;
8
+ model: TrendingFacetsModel;
9
+ fallbackParameters?: FallbackParams;
10
+ };
11
+ //# sourceMappingURL=trendingFacets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacets.d.ts","sourceRoot":"","sources":["../../model/trendingFacets.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAEjE,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,SAAS,EAAE,GAAG,GAAG,IAAI,CAAC;IAEtB,KAAK,EAAE,mBAAmB,CAAC;IAE3B,kBAAkB,CAAC,EAAE,cAAc,CAAC;CACrC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Trending facet values model. This model recommends trending facet values for the specified facet attribute.
3
+ */
4
+ export type TrendingFacetsModel = 'trending-facets';
5
+ //# sourceMappingURL=trendingFacetsModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacetsModel.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,iBAAiB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
2
+ import type { TrendingFacets } from './trendingFacets';
3
+ export type TrendingFacetsQuery = BaseRecommendRequest & TrendingFacets;
4
+ //# sourceMappingURL=trendingFacetsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingFacetsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingFacetsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,MAAM,MAAM,mBAAmB,GAAG,oBAAoB,GAAG,cAAc,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { SearchParamsObject } from './searchParamsObject';
2
+ import type { TrendingItemsModel } from './trendingItemsModel';
3
+ export type TrendingItems = {
4
+ /**
5
+ * Facet attribute. To be used in combination with `facetValue`. If specified, only recommendations matching the facet filter will be returned.
6
+ */
7
+ facetName: string;
8
+ /**
9
+ * Facet value. To be used in combination with `facetName`. If specified, only recommendations matching the facet filter will be returned.
10
+ */
11
+ facetValue: string;
12
+ model: TrendingItemsModel;
13
+ fallbackParameters?: SearchParamsObject;
14
+ };
15
+ //# sourceMappingURL=trendingItems.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingItems.d.ts","sourceRoot":"","sources":["../../model/trendingItems.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB,KAAK,EAAE,kBAAkB,CAAC;IAE1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Trending items model. Trending items are determined from the number of conversion events collected on them.
3
+ */
4
+ export type TrendingItemsModel = 'trending-items';
5
+ //# sourceMappingURL=trendingItemsModel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingItemsModel.d.ts","sourceRoot":"","sources":["../../model/trendingItemsModel.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,gBAAgB,CAAC"}
@@ -0,0 +1,4 @@
1
+ import type { BaseRecommendRequest } from './baseRecommendRequest';
2
+ import type { TrendingItems } from './trendingItems';
3
+ export type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
4
+ //# sourceMappingURL=trendingItemsQuery.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trendingItemsQuery.d.ts","sourceRoot":"","sources":["../../model/trendingItemsQuery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG,aAAa,CAAC"}
@@ -1,6 +1,6 @@
1
- import type { TypoToleranceEnum } from './typoToleranceEnum';
2
- /**
3
- * Controls whether typo tolerance is enabled and how it is applied.
4
- */
5
- export declare type TypoTolerance = TypoToleranceEnum | boolean;
1
+ import type { TypoToleranceEnum } from './typoToleranceEnum';
2
+ /**
3
+ * 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.
4
+ */
5
+ export type TypoTolerance = TypoToleranceEnum | boolean;
6
6
  //# sourceMappingURL=typoTolerance.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["../../model/typoTolerance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,oBAAY,aAAa,GAAG,iBAAiB,GAAG,OAAO,CAAC"}
1
+ {"version":3,"file":"typoTolerance.d.ts","sourceRoot":"","sources":["../../model/typoTolerance.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,iBAAiB,GAAG,OAAO,CAAC"}
@@ -1,2 +1,5 @@
1
- export declare type TypoToleranceEnum = 'min' | 'strict';
1
+ /**
2
+ * - `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.
3
+ */
4
+ export type TypoToleranceEnum = 'min' | 'strict';
2
5
  //# sourceMappingURL=typoToleranceEnum.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
1
+ {"version":3,"file":"typoToleranceEnum.d.ts","sourceRoot":"","sources":["../../model/typoToleranceEnum.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,QAAQ,CAAC"}
@@ -1,9 +1,9 @@
1
- import type { SortRemainingBy } from './sortRemainingBy';
2
- export declare type Value = {
3
- /**
4
- * Pinned order of facet lists.
5
- */
6
- order?: string[];
7
- sortRemainingBy?: SortRemainingBy;
8
- };
1
+ import type { SortRemainingBy } from './sortRemainingBy';
2
+ export type Value = {
3
+ /**
4
+ * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
5
+ */
6
+ order?: string[];
7
+ sortRemainingBy?: SortRemainingBy;
8
+ };
9
9
  //# sourceMappingURL=value.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,oBAAY,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC"}
1
+ {"version":3,"file":"value.d.ts","sourceRoot":"","sources":["../../model/value.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjB,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC,CAAC"}
@@ -0,0 +1,390 @@
1
+ 'use strict';
2
+
3
+ var clientCommon = require('@algolia/client-common');
4
+ var requesterNodeHttp = require('@algolia/requester-node-http');
5
+
6
+ // 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.
7
+ const apiClientVersion = '5.0.0-alpha.111';
8
+ function getDefaultHosts(appId) {
9
+ return [
10
+ {
11
+ url: `${appId}-dsn.algolia.net`,
12
+ accept: 'read',
13
+ protocol: 'https',
14
+ },
15
+ {
16
+ url: `${appId}.algolia.net`,
17
+ accept: 'write',
18
+ protocol: 'https',
19
+ },
20
+ ].concat(clientCommon.shuffle([
21
+ {
22
+ url: `${appId}-1.algolianet.com`,
23
+ accept: 'readWrite',
24
+ protocol: 'https',
25
+ },
26
+ {
27
+ url: `${appId}-2.algolianet.com`,
28
+ accept: 'readWrite',
29
+ protocol: 'https',
30
+ },
31
+ {
32
+ url: `${appId}-3.algolianet.com`,
33
+ accept: 'readWrite',
34
+ protocol: 'https',
35
+ },
36
+ ]));
37
+ }
38
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
39
+ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
40
+ const auth = clientCommon.createAuth(appIdOption, apiKeyOption, authMode);
41
+ const transporter = clientCommon.createTransporter({
42
+ hosts: getDefaultHosts(appIdOption),
43
+ ...options,
44
+ algoliaAgent: clientCommon.getAlgoliaAgent({
45
+ algoliaAgents,
46
+ client: 'Recommend',
47
+ version: apiClientVersion,
48
+ }),
49
+ baseHeaders: {
50
+ 'content-type': 'text/plain',
51
+ ...auth.headers(),
52
+ ...options.baseHeaders,
53
+ },
54
+ baseQueryParameters: {
55
+ ...auth.queryParameters(),
56
+ ...options.baseQueryParameters,
57
+ },
58
+ });
59
+ return {
60
+ transporter,
61
+ /**
62
+ * The `appId` currently in use.
63
+ */
64
+ appId: appIdOption,
65
+ /**
66
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
67
+ */
68
+ clearCache() {
69
+ return Promise.all([
70
+ transporter.requestsCache.clear(),
71
+ transporter.responsesCache.clear(),
72
+ ]).then(() => undefined);
73
+ },
74
+ /**
75
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
76
+ */
77
+ get _ua() {
78
+ return transporter.algoliaAgent.value;
79
+ },
80
+ /**
81
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
82
+ *
83
+ * @param segment - The algolia agent (user-agent) segment to add.
84
+ * @param version - The version of the agent.
85
+ */
86
+ addAlgoliaAgent(segment, version) {
87
+ transporter.algoliaAgent.add({ segment, version });
88
+ },
89
+ /**
90
+ * This method allow you to send requests to the Algolia REST API.
91
+ *
92
+ * @param customDelete - The customDelete object.
93
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
94
+ * @param customDelete.parameters - Query parameters to apply to the current query.
95
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
96
+ */
97
+ customDelete({ path, parameters }, requestOptions) {
98
+ if (!path) {
99
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
100
+ }
101
+ const requestPath = '/{path}'.replace('{path}', path);
102
+ const headers = {};
103
+ const queryParameters = parameters ? parameters : {};
104
+ const request = {
105
+ method: 'DELETE',
106
+ path: requestPath,
107
+ queryParameters,
108
+ headers,
109
+ };
110
+ return transporter.request(request, requestOptions);
111
+ },
112
+ /**
113
+ * This method allow you to send requests to the Algolia REST API.
114
+ *
115
+ * @param customGet - The customGet object.
116
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
117
+ * @param customGet.parameters - Query parameters to apply to the current query.
118
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
119
+ */
120
+ customGet({ path, parameters }, requestOptions) {
121
+ if (!path) {
122
+ throw new Error('Parameter `path` is required when calling `customGet`.');
123
+ }
124
+ const requestPath = '/{path}'.replace('{path}', path);
125
+ const headers = {};
126
+ const queryParameters = parameters ? parameters : {};
127
+ const request = {
128
+ method: 'GET',
129
+ path: requestPath,
130
+ queryParameters,
131
+ headers,
132
+ };
133
+ return transporter.request(request, requestOptions);
134
+ },
135
+ /**
136
+ * This method allow you to send requests to the Algolia REST API.
137
+ *
138
+ * @param customPost - The customPost object.
139
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
140
+ * @param customPost.parameters - Query parameters to apply to the current query.
141
+ * @param customPost.body - Parameters to send with the custom request.
142
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
143
+ */
144
+ customPost({ path, parameters, body }, requestOptions) {
145
+ if (!path) {
146
+ throw new Error('Parameter `path` is required when calling `customPost`.');
147
+ }
148
+ const requestPath = '/{path}'.replace('{path}', path);
149
+ const headers = {};
150
+ const queryParameters = parameters ? parameters : {};
151
+ const request = {
152
+ method: 'POST',
153
+ path: requestPath,
154
+ queryParameters,
155
+ headers,
156
+ data: body ? body : {},
157
+ };
158
+ return transporter.request(request, requestOptions);
159
+ },
160
+ /**
161
+ * This method allow you to send requests to the Algolia REST API.
162
+ *
163
+ * @param customPut - The customPut object.
164
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
165
+ * @param customPut.parameters - Query parameters to apply to the current query.
166
+ * @param customPut.body - Parameters to send with the custom request.
167
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
168
+ */
169
+ customPut({ path, parameters, body }, requestOptions) {
170
+ if (!path) {
171
+ throw new Error('Parameter `path` is required when calling `customPut`.');
172
+ }
173
+ const requestPath = '/{path}'.replace('{path}', path);
174
+ const headers = {};
175
+ const queryParameters = parameters ? parameters : {};
176
+ const request = {
177
+ method: 'PUT',
178
+ path: requestPath,
179
+ queryParameters,
180
+ headers,
181
+ data: body ? body : {},
182
+ };
183
+ return transporter.request(request, requestOptions);
184
+ },
185
+ /**
186
+ * Deletes a Recommend rule from a recommendation scenario.
187
+ *
188
+ * Required API Key ACLs:
189
+ * - editSettings.
190
+ *
191
+ * @param deleteRecommendRule - The deleteRecommendRule object.
192
+ * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
193
+ * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
194
+ * @param deleteRecommendRule.objectID - Unique record identifier.
195
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
196
+ */
197
+ deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
198
+ if (!indexName) {
199
+ throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
200
+ }
201
+ if (!model) {
202
+ throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
203
+ }
204
+ if (!objectID) {
205
+ throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
206
+ }
207
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
208
+ .replace('{indexName}', encodeURIComponent(indexName))
209
+ .replace('{model}', encodeURIComponent(model))
210
+ .replace('{objectID}', encodeURIComponent(objectID));
211
+ const headers = {};
212
+ const queryParameters = {};
213
+ const request = {
214
+ method: 'DELETE',
215
+ path: requestPath,
216
+ queryParameters,
217
+ headers,
218
+ };
219
+ return transporter.request(request, requestOptions);
220
+ },
221
+ /**
222
+ * Retrieves a Recommend rule that you previously created in the Algolia dashboard.
223
+ *
224
+ * Required API Key ACLs:
225
+ * - settings.
226
+ *
227
+ * @param getRecommendRule - The getRecommendRule object.
228
+ * @param getRecommendRule.indexName - Name of the index on which to perform the operation.
229
+ * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
230
+ * @param getRecommendRule.objectID - Unique record identifier.
231
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
232
+ */
233
+ getRecommendRule({ indexName, model, objectID }, requestOptions) {
234
+ if (!indexName) {
235
+ throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
236
+ }
237
+ if (!model) {
238
+ throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
239
+ }
240
+ if (!objectID) {
241
+ throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
242
+ }
243
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
244
+ .replace('{indexName}', encodeURIComponent(indexName))
245
+ .replace('{model}', encodeURIComponent(model))
246
+ .replace('{objectID}', encodeURIComponent(objectID));
247
+ const headers = {};
248
+ const queryParameters = {};
249
+ const request = {
250
+ method: 'GET',
251
+ path: requestPath,
252
+ queryParameters,
253
+ headers,
254
+ };
255
+ return transporter.request(request, requestOptions);
256
+ },
257
+ /**
258
+ * 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.
259
+ *
260
+ * Required API Key ACLs:
261
+ * - editSettings.
262
+ *
263
+ * @param getRecommendStatus - The getRecommendStatus object.
264
+ * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
265
+ * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
266
+ * @param getRecommendStatus.taskID - Unique task identifier.
267
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
268
+ */
269
+ getRecommendStatus({ indexName, model, taskID }, requestOptions) {
270
+ if (!indexName) {
271
+ throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
272
+ }
273
+ if (!model) {
274
+ throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
275
+ }
276
+ if (!taskID) {
277
+ throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
278
+ }
279
+ const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
280
+ .replace('{indexName}', encodeURIComponent(indexName))
281
+ .replace('{model}', encodeURIComponent(model))
282
+ .replace('{taskID}', encodeURIComponent(taskID));
283
+ const headers = {};
284
+ const queryParameters = {};
285
+ const request = {
286
+ method: 'GET',
287
+ path: requestPath,
288
+ queryParameters,
289
+ headers,
290
+ };
291
+ return transporter.request(request, requestOptions);
292
+ },
293
+ /**
294
+ * Retrieves recommendations from selected AI models.
295
+ *
296
+ * Required API Key ACLs:
297
+ * - search.
298
+ *
299
+ * @param getRecommendationsParams - The getRecommendationsParams object.
300
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
301
+ */
302
+ getRecommendations(getRecommendationsParams, requestOptions) {
303
+ if (!getRecommendationsParams) {
304
+ throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
305
+ }
306
+ if (!getRecommendationsParams.requests) {
307
+ throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
308
+ }
309
+ const requestPath = '/1/indexes/*/recommendations';
310
+ const headers = {};
311
+ const queryParameters = {};
312
+ const request = {
313
+ method: 'POST',
314
+ path: requestPath,
315
+ queryParameters,
316
+ headers,
317
+ data: getRecommendationsParams,
318
+ useReadTransporter: true,
319
+ cacheable: true,
320
+ };
321
+ return transporter.request(request, requestOptions);
322
+ },
323
+ /**
324
+ * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
325
+ *
326
+ * Required API Key ACLs:
327
+ * - settings.
328
+ *
329
+ * @param searchRecommendRules - The searchRecommendRules object.
330
+ * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
331
+ * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
332
+ * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
333
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
334
+ */
335
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
336
+ if (!indexName) {
337
+ throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
338
+ }
339
+ if (!model) {
340
+ throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
341
+ }
342
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
343
+ .replace('{indexName}', encodeURIComponent(indexName))
344
+ .replace('{model}', encodeURIComponent(model));
345
+ const headers = {};
346
+ const queryParameters = {};
347
+ const request = {
348
+ method: 'POST',
349
+ path: requestPath,
350
+ queryParameters,
351
+ headers,
352
+ data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
353
+ useReadTransporter: true,
354
+ cacheable: true,
355
+ };
356
+ return transporter.request(request, requestOptions);
357
+ },
358
+ };
359
+ }
360
+
361
+ // 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.
362
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
363
+ function recommendClient(appId, apiKey, options) {
364
+ if (!appId || typeof appId !== 'string') {
365
+ throw new Error('`appId` is missing.');
366
+ }
367
+ if (!apiKey || typeof apiKey !== 'string') {
368
+ throw new Error('`apiKey` is missing.');
369
+ }
370
+ return {
371
+ ...createRecommendClient({
372
+ appId,
373
+ apiKey,
374
+ timeouts: {
375
+ connect: clientCommon.DEFAULT_CONNECT_TIMEOUT_NODE,
376
+ read: clientCommon.DEFAULT_READ_TIMEOUT_NODE,
377
+ write: clientCommon.DEFAULT_WRITE_TIMEOUT_NODE,
378
+ },
379
+ requester: requesterNodeHttp.createHttpRequester(),
380
+ algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
381
+ responsesCache: clientCommon.createNullCache(),
382
+ requestsCache: clientCommon.createNullCache(),
383
+ hostsCache: clientCommon.createMemoryCache(),
384
+ ...options,
385
+ }),
386
+ };
387
+ }
388
+
389
+ exports.apiClientVersion = apiClientVersion;
390
+ exports.recommendClient = recommendClient;