algoliasearch 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 (888) hide show
  1. package/LICENSE +21 -0
  2. package/builds/browser.ts +22 -18
  3. package/builds/models.ts +140 -6
  4. package/builds/node.ts +92 -16
  5. package/dist/algoliasearch/builds/browser.d.ts +83 -71
  6. package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
  7. package/dist/algoliasearch/builds/models.d.ts +4 -2
  8. package/dist/algoliasearch/builds/models.d.ts.map +1 -1
  9. package/dist/algoliasearch/builds/node.d.ts +101 -72
  10. package/dist/algoliasearch/builds/node.d.ts.map +1 -1
  11. package/dist/algoliasearch.cjs +1259 -399
  12. package/dist/algoliasearch.esm.browser.js +1226 -423
  13. package/dist/algoliasearch.esm.node.js +1260 -400
  14. package/dist/algoliasearch.umd.js +2 -2
  15. package/dist/client-abtesting/model/aBTest.d.ts +14 -29
  16. package/dist/client-abtesting/model/aBTest.d.ts.map +1 -1
  17. package/dist/client-abtesting/model/aBTestConfiguration.d.ts +12 -0
  18. package/dist/client-abtesting/model/aBTestConfiguration.d.ts.map +1 -0
  19. package/dist/client-abtesting/model/aBTestResponse.d.ts +3 -3
  20. package/dist/client-abtesting/model/abTestsVariant.d.ts +3 -3
  21. package/dist/client-abtesting/model/addABTestsRequest.d.ts +1 -1
  22. package/dist/client-abtesting/model/clientMethodProps.d.ts +7 -7
  23. package/dist/client-abtesting/model/{currenciesValue.d.ts → currency.d.ts} +2 -2
  24. package/dist/client-abtesting/model/currency.d.ts.map +1 -0
  25. package/dist/client-abtesting/model/customSearchParams.d.ts +1 -1
  26. package/dist/client-abtesting/model/effect.d.ts +5 -0
  27. package/dist/client-abtesting/model/effect.d.ts.map +1 -0
  28. package/dist/client-abtesting/model/emptySearch.d.ts +10 -0
  29. package/dist/client-abtesting/model/emptySearch.d.ts.map +1 -0
  30. package/dist/client-abtesting/model/index.d.ts +7 -1
  31. package/dist/client-abtesting/model/index.d.ts.map +1 -1
  32. package/dist/client-abtesting/model/listABTestsResponse.d.ts +2 -2
  33. package/dist/client-abtesting/model/listABTestsResponse.d.ts.map +1 -1
  34. package/dist/client-abtesting/model/minimumDetectableEffect.d.ts +12 -0
  35. package/dist/client-abtesting/model/minimumDetectableEffect.d.ts.map +1 -0
  36. package/dist/client-abtesting/model/outliers.d.ts +10 -0
  37. package/dist/client-abtesting/model/outliers.d.ts.map +1 -0
  38. package/dist/client-abtesting/model/status.d.ts +5 -0
  39. package/dist/client-abtesting/model/status.d.ts.map +1 -0
  40. package/dist/client-abtesting/model/variant.d.ts +29 -25
  41. package/dist/client-abtesting/model/variant.d.ts.map +1 -1
  42. package/dist/client-abtesting/src/abtestingClient.d.ts +28 -26
  43. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  44. package/dist/client-analytics/model/clickPositionsInner.d.ts +14 -0
  45. package/dist/client-analytics/model/clickPositionsInner.d.ts.map +1 -0
  46. package/dist/client-analytics/model/clientMethodProps.d.ts +161 -90
  47. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
  48. package/dist/client-analytics/model/currenciesValue.d.ts +14 -0
  49. package/dist/client-analytics/model/currenciesValue.d.ts.map +1 -0
  50. package/dist/client-analytics/model/dailyAddToCartRates.d.ts +19 -0
  51. package/dist/client-analytics/model/dailyAddToCartRates.d.ts.map +1 -0
  52. package/dist/client-analytics/model/dailyAverageClicks.d.ts +15 -0
  53. package/dist/client-analytics/model/dailyAverageClicks.d.ts.map +1 -0
  54. package/dist/client-analytics/model/dailyClickThroughRates.d.ts +19 -0
  55. package/dist/client-analytics/model/dailyClickThroughRates.d.ts.map +1 -0
  56. package/dist/client-analytics/model/dailyConversionRates.d.ts +19 -0
  57. package/dist/client-analytics/model/dailyConversionRates.d.ts.map +1 -0
  58. package/dist/client-analytics/model/dailyNoClickRates.d.ts +19 -0
  59. package/dist/client-analytics/model/dailyNoClickRates.d.ts.map +1 -0
  60. package/dist/client-analytics/model/dailyNoResultsRates.d.ts +19 -0
  61. package/dist/client-analytics/model/dailyNoResultsRates.d.ts.map +1 -0
  62. package/dist/client-analytics/model/dailyPurchaseRates.d.ts +19 -0
  63. package/dist/client-analytics/model/dailyPurchaseRates.d.ts.map +1 -0
  64. package/dist/client-analytics/model/dailyRevenue.d.ts +12 -0
  65. package/dist/client-analytics/model/dailyRevenue.d.ts.map +1 -0
  66. package/dist/client-analytics/model/dailySearches.d.ts +11 -0
  67. package/dist/client-analytics/model/dailySearches.d.ts.map +1 -0
  68. package/dist/client-analytics/model/dailySearchesNoClicks.d.ts +15 -0
  69. package/dist/client-analytics/model/dailySearchesNoClicks.d.ts.map +1 -0
  70. package/dist/client-analytics/model/dailySearchesNoResults.d.ts +15 -0
  71. package/dist/client-analytics/model/dailySearchesNoResults.d.ts.map +1 -0
  72. package/dist/client-analytics/model/dailyUsers.d.ts +11 -0
  73. package/dist/client-analytics/model/dailyUsers.d.ts.map +1 -0
  74. package/dist/client-analytics/model/getAddToCartRateResponse.d.ts +20 -0
  75. package/dist/client-analytics/model/getAddToCartRateResponse.d.ts.map +1 -0
  76. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts +6 -6
  77. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts.map +1 -1
  78. package/dist/client-analytics/model/getClickPositionsResponse.d.ts +3 -3
  79. package/dist/client-analytics/model/getClickPositionsResponse.d.ts.map +1 -1
  80. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts +7 -7
  81. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts.map +1 -1
  82. package/dist/client-analytics/model/getConversionRateResponse.d.ts +20 -0
  83. package/dist/client-analytics/model/getConversionRateResponse.d.ts.map +1 -0
  84. package/dist/client-analytics/model/getNoClickRateResponse.d.ts +6 -6
  85. package/dist/client-analytics/model/getNoClickRateResponse.d.ts.map +1 -1
  86. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts +6 -6
  87. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts.map +1 -1
  88. package/dist/client-analytics/model/getPurchaseRateResponse.d.ts +20 -0
  89. package/dist/client-analytics/model/getPurchaseRateResponse.d.ts.map +1 -0
  90. package/dist/client-analytics/model/getRevenue.d.ts +13 -0
  91. package/dist/client-analytics/model/getRevenue.d.ts.map +1 -0
  92. package/dist/client-analytics/model/getSearchesCountResponse.d.ts +3 -3
  93. package/dist/client-analytics/model/getSearchesCountResponse.d.ts.map +1 -1
  94. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts +3 -3
  95. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts.map +1 -1
  96. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts +3 -3
  97. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts.map +1 -1
  98. package/dist/client-analytics/model/getStatusResponse.d.ts +2 -2
  99. package/dist/client-analytics/model/getStatusResponse.d.ts.map +1 -1
  100. package/dist/client-analytics/model/getTopCountriesResponse.d.ts +1 -1
  101. package/dist/client-analytics/model/getTopFilterAttributesResponse.d.ts +1 -1
  102. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts +2 -4
  103. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts.map +1 -1
  104. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts +2 -2
  105. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
  106. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts +2 -4
  107. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
  108. package/dist/client-analytics/model/getTopHitsResponse.d.ts +2 -1
  109. package/dist/client-analytics/model/getTopHitsResponse.d.ts.map +1 -1
  110. package/dist/client-analytics/model/getTopSearchesResponse.d.ts +2 -1
  111. package/dist/client-analytics/model/getTopSearchesResponse.d.ts.map +1 -1
  112. package/dist/client-analytics/model/getUsersCountResponse.d.ts +4 -4
  113. package/dist/client-analytics/model/getUsersCountResponse.d.ts.map +1 -1
  114. package/dist/client-analytics/model/index.d.ts +23 -11
  115. package/dist/client-analytics/model/index.d.ts.map +1 -1
  116. package/dist/client-analytics/model/operator.d.ts +5 -0
  117. package/dist/client-analytics/model/operator.d.ts.map +1 -0
  118. package/dist/client-analytics/model/orderBy.d.ts +1 -1
  119. package/dist/client-analytics/model/topCountry.d.ts +1 -1
  120. package/dist/client-analytics/model/topHit.d.ts +1 -1
  121. package/dist/client-analytics/model/topHitWithAnalytics.d.ts +9 -9
  122. package/dist/client-analytics/model/topHitWithAnalytics.d.ts.map +1 -1
  123. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts +52 -0
  124. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
  125. package/dist/client-analytics/model/topHitsResponse.d.ts +1 -1
  126. package/dist/client-analytics/model/topHitsResponseWithAnalytics.d.ts +1 -1
  127. package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
  128. package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
  129. package/dist/client-analytics/model/topSearch.d.ts +3 -3
  130. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts +17 -12
  131. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts.map +1 -1
  132. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts +65 -0
  133. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
  134. package/dist/client-analytics/model/topSearchesResponse.d.ts +1 -1
  135. package/dist/client-analytics/model/topSearchesResponseWithAnalytics.d.ts +1 -1
  136. package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
  137. package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
  138. package/dist/client-analytics/src/analyticsClient.d.ts +211 -138
  139. package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
  140. package/dist/client-personalization/model/clientMethodProps.d.ts +2 -2
  141. package/dist/client-personalization/model/deleteUserProfileResponse.d.ts +2 -2
  142. package/dist/client-personalization/model/eventScoring.d.ts +4 -6
  143. package/dist/client-personalization/model/eventScoring.d.ts.map +1 -1
  144. package/dist/client-personalization/model/eventType.d.ts +5 -0
  145. package/dist/client-personalization/model/eventType.d.ts.map +1 -0
  146. package/dist/client-personalization/model/facetScoring.d.ts +2 -2
  147. package/dist/client-personalization/model/getUserTokenResponse.d.ts +3 -3
  148. package/dist/client-personalization/model/index.d.ts +1 -0
  149. package/dist/client-personalization/model/index.d.ts.map +1 -1
  150. package/dist/client-personalization/model/personalizationStrategyParams.d.ts +3 -3
  151. package/dist/client-personalization/src/personalizationClient.d.ts +19 -19
  152. package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
  153. package/dist/client-search/model/acl.d.ts +1 -1
  154. package/dist/client-search/model/action.d.ts +1 -1
  155. package/dist/client-search/model/addApiKeyResponse.d.ts +1 -1
  156. package/dist/client-search/model/anchoring.d.ts +1 -1
  157. package/dist/client-search/model/apiKey.d.ts +8 -8
  158. package/dist/client-search/model/apiKeyOperation.d.ts +2 -0
  159. package/dist/client-search/model/apiKeyOperation.d.ts.map +1 -0
  160. package/dist/client-search/model/aroundPrecision.d.ts +1 -1
  161. package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts +9 -0
  162. package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  163. package/dist/client-search/model/aroundRadius.d.ts +1 -1
  164. package/dist/client-search/model/aroundRadiusAll.d.ts +3 -0
  165. package/dist/client-search/model/aroundRadiusAll.d.ts.map +1 -1
  166. package/dist/client-search/model/automaticFacetFilter.d.ts +4 -4
  167. package/dist/client-search/model/automaticFacetFilters.d.ts +1 -1
  168. package/dist/client-search/model/baseGetApiKeyResponse.d.ts +1 -1
  169. package/dist/client-search/model/baseIndexSettings.d.ts +23 -18
  170. package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
  171. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  172. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  173. package/dist/client-search/model/baseSearchResponse.d.ts +8 -20
  174. package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
  175. package/dist/client-search/model/batchDictionaryEntriesParams.d.ts +3 -3
  176. package/dist/client-search/model/batchResponse.d.ts +2 -2
  177. package/dist/client-search/model/browsePagination.d.ts +19 -0
  178. package/dist/client-search/model/browsePagination.d.ts.map +1 -0
  179. package/dist/client-search/model/browseResponse.d.ts +2 -1
  180. package/dist/client-search/model/browseResponse.d.ts.map +1 -1
  181. package/dist/client-search/model/builtInOperation.d.ts +2 -2
  182. package/dist/client-search/model/builtInOperationType.d.ts +1 -1
  183. package/dist/client-search/model/clientMethodProps.d.ts +137 -70
  184. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
  185. package/dist/client-search/model/condition.d.ts +7 -3
  186. package/dist/client-search/model/condition.d.ts.map +1 -1
  187. package/dist/client-search/model/consequence.d.ts +5 -5
  188. package/dist/client-search/model/consequenceHide.d.ts +2 -2
  189. package/dist/client-search/model/consequenceQuery.d.ts +1 -1
  190. package/dist/client-search/model/consequenceQueryObject.d.ts +2 -2
  191. package/dist/client-search/model/createdAtResponse.d.ts +1 -1
  192. package/dist/client-search/model/cursor.d.ts +1 -1
  193. package/dist/client-search/model/deleteApiKeyResponse.d.ts +1 -1
  194. package/dist/client-search/model/deleteByParams.d.ts +4 -4
  195. package/dist/client-search/model/deleteSourceResponse.d.ts +1 -1
  196. package/dist/client-search/model/deletedAtResponse.d.ts +2 -2
  197. package/dist/client-search/model/dictionaryEntry.d.ts +6 -8
  198. package/dist/client-search/model/dictionaryEntry.d.ts.map +1 -1
  199. package/dist/client-search/model/dictionaryEntryState.d.ts +1 -1
  200. package/dist/client-search/model/dictionaryLanguage.d.ts +2 -2
  201. package/dist/client-search/model/dictionarySettingsParams.d.ts +1 -1
  202. package/dist/client-search/model/distinct.d.ts +1 -1
  203. package/dist/client-search/model/edit.d.ts +1 -1
  204. package/dist/client-search/model/exactOnSingleWordQuery.d.ts +1 -1
  205. package/dist/client-search/model/facetFilters.d.ts +2 -3
  206. package/dist/client-search/model/facetFilters.d.ts.map +1 -1
  207. package/dist/client-search/model/facetHits.d.ts +2 -2
  208. package/dist/client-search/model/facetOrdering.d.ts +2 -2
  209. package/dist/client-search/model/facets.d.ts +2 -2
  210. package/dist/client-search/model/fetchedIndex.d.ts +5 -1
  211. package/dist/client-search/model/fetchedIndex.d.ts.map +1 -1
  212. package/dist/client-search/model/getObjectsRequest.d.ts +3 -3
  213. package/dist/client-search/model/getObjectsResponse.d.ts +1 -1
  214. package/dist/client-search/model/hasPendingMappingsResponse.d.ts +1 -1
  215. package/dist/client-search/model/highlightResult.d.ts +1 -1
  216. package/dist/client-search/model/highlightResult.d.ts.map +1 -1
  217. package/dist/client-search/model/highlightResultOption.d.ts +3 -3
  218. package/dist/client-search/model/hit.d.ts +4 -4
  219. package/dist/client-search/model/ignorePlurals.d.ts +3 -2
  220. package/dist/client-search/model/ignorePlurals.d.ts.map +1 -1
  221. package/dist/client-search/model/index.d.ts +8 -1
  222. package/dist/client-search/model/index.d.ts.map +1 -1
  223. package/dist/client-search/model/indexSettings.d.ts +1 -1
  224. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +32 -35
  225. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  226. package/dist/client-search/model/log.d.ts +11 -11
  227. package/dist/client-search/model/logQuery.d.ts +1 -1
  228. package/dist/client-search/model/matchLevel.d.ts +1 -1
  229. package/dist/client-search/model/mode.d.ts +1 -1
  230. package/dist/client-search/model/multipleBatchRequest.d.ts +1 -1
  231. package/dist/client-search/model/multipleBatchResponse.d.ts +2 -2
  232. package/dist/client-search/model/numericFilters.d.ts +2 -3
  233. package/dist/client-search/model/numericFilters.d.ts.map +1 -1
  234. package/dist/client-search/model/operationIndexParams.d.ts +2 -2
  235. package/dist/client-search/model/operationType.d.ts +1 -1
  236. package/dist/client-search/model/optionalFilters.d.ts +2 -3
  237. package/dist/client-search/model/optionalFilters.d.ts.map +1 -1
  238. package/dist/client-search/model/params.d.ts +1 -1
  239. package/dist/client-search/model/promoteObjectID.d.ts +2 -2
  240. package/dist/client-search/model/promoteObjectIDs.d.ts +2 -2
  241. package/dist/client-search/model/queryType.d.ts +1 -1
  242. package/dist/client-search/model/rankingInfo.d.ts +13 -10
  243. package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
  244. package/dist/client-search/model/reRankingApplyFilter.d.ts +2 -3
  245. package/dist/client-search/model/reRankingApplyFilter.d.ts.map +1 -1
  246. package/dist/client-search/model/redirect.d.ts +1 -1
  247. package/dist/client-search/model/redirectURL.d.ts +7 -0
  248. package/dist/client-search/model/redirectURL.d.ts.map +1 -0
  249. package/dist/client-search/model/removeStopWords.d.ts +3 -2
  250. package/dist/client-search/model/removeStopWords.d.ts.map +1 -1
  251. package/dist/client-search/model/removeUserIdResponse.d.ts +1 -1
  252. package/dist/client-search/model/removeWordsIfNoResults.d.ts +1 -1
  253. package/dist/client-search/model/renderingContent.d.ts +3 -1
  254. package/dist/client-search/model/renderingContent.d.ts.map +1 -1
  255. package/dist/client-search/model/replaceAllObjectsResponse.d.ts +11 -0
  256. package/dist/client-search/model/replaceAllObjectsResponse.d.ts.map +1 -0
  257. package/dist/client-search/model/replaceSourceResponse.d.ts +1 -1
  258. package/dist/client-search/model/rule.d.ts +5 -5
  259. package/dist/client-search/model/saveObjectResponse.d.ts +3 -3
  260. package/dist/client-search/model/saveSynonymResponse.d.ts +2 -2
  261. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts +5 -7
  262. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  263. package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts +20 -0
  264. package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
  265. package/dist/client-search/model/searchForFacetValuesRequest.d.ts +1 -1
  266. package/dist/client-search/model/searchForFacetValuesResponse.d.ts +4 -1
  267. package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
  268. package/dist/client-search/model/searchForFacetsOptions.d.ts +2 -2
  269. package/dist/client-search/model/searchForHitsOptions.d.ts +1 -1
  270. package/dist/client-search/model/searchHits.d.ts +6 -3
  271. package/dist/client-search/model/searchHits.d.ts.map +1 -1
  272. package/dist/client-search/model/searchPagination.d.ts +19 -0
  273. package/dist/client-search/model/searchPagination.d.ts.map +1 -0
  274. package/dist/client-search/model/searchParamsObject.d.ts +3 -0
  275. package/dist/client-search/model/searchParamsObject.d.ts.map +1 -1
  276. package/dist/client-search/model/searchParamsQuery.d.ts +1 -1
  277. package/dist/client-search/model/searchResponse.d.ts +2 -1
  278. package/dist/client-search/model/searchResponse.d.ts.map +1 -1
  279. package/dist/client-search/model/searchRulesParams.d.ts +4 -8
  280. package/dist/client-search/model/searchRulesParams.d.ts.map +1 -1
  281. package/dist/client-search/model/searchRulesResponse.d.ts +2 -2
  282. package/dist/client-search/model/searchStrategy.d.ts +1 -1
  283. package/dist/client-search/model/searchSynonymsParams.d.ts +2 -2
  284. package/dist/client-search/model/searchSynonymsResponse.d.ts +2 -2
  285. package/dist/client-search/model/searchUserIdsParams.d.ts +1 -1
  286. package/dist/client-search/model/searchUserIdsResponse.d.ts +3 -3
  287. package/dist/client-search/model/securedApiKeyRestrictions.d.ts +25 -0
  288. package/dist/client-search/model/securedApiKeyRestrictions.d.ts.map +1 -0
  289. package/dist/client-search/model/semanticSearch.d.ts +2 -2
  290. package/dist/client-search/model/snippetResult.d.ts +1 -1
  291. package/dist/client-search/model/snippetResult.d.ts.map +1 -1
  292. package/dist/client-search/model/snippetResultOption.d.ts +2 -2
  293. package/dist/client-search/model/sortRemainingBy.d.ts +1 -1
  294. package/dist/client-search/model/supportedLanguage.d.ts +5 -0
  295. package/dist/client-search/model/supportedLanguage.d.ts.map +1 -0
  296. package/dist/client-search/model/tagFilters.d.ts +2 -3
  297. package/dist/client-search/model/tagFilters.d.ts.map +1 -1
  298. package/dist/client-search/model/taskStatus.d.ts +1 -1
  299. package/dist/client-search/model/timeRange.d.ts +2 -2
  300. package/dist/client-search/model/typoTolerance.d.ts +1 -1
  301. package/dist/client-search/model/typoToleranceEnum.d.ts +3 -0
  302. package/dist/client-search/model/typoToleranceEnum.d.ts.map +1 -1
  303. package/dist/client-search/model/updateApiKeyResponse.d.ts +1 -1
  304. package/dist/client-search/model/updatedAtResponse.d.ts +2 -2
  305. package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts +3 -3
  306. package/dist/client-search/model/updatedRuleResponse.d.ts +3 -3
  307. package/dist/client-search/model/userHit.d.ts +1 -1
  308. package/dist/client-search/model/userId.d.ts +1 -1
  309. package/dist/client-search/model/value.d.ts +5 -1
  310. package/dist/client-search/model/value.d.ts.map +1 -1
  311. package/dist/client-search/src/searchClient.d.ts +385 -208
  312. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  313. package/dist/lite/builds/browser.d.ts +15 -3
  314. package/dist/lite/builds/browser.d.ts.map +1 -1
  315. package/dist/lite/builds/node.d.ts +15 -3
  316. package/dist/lite/builds/node.d.ts.map +1 -1
  317. package/dist/lite/lite.cjs +45 -6
  318. package/dist/lite/lite.esm.browser.js +59 -30
  319. package/dist/lite/lite.esm.node.js +45 -6
  320. package/dist/lite/lite.umd.js +2 -2
  321. package/dist/lite/model/acl.d.ts +1 -1
  322. package/dist/lite/model/apiKey.d.ts +8 -8
  323. package/dist/lite/model/aroundPrecision.d.ts +1 -1
  324. package/dist/lite/model/aroundPrecisionFromValueInner.d.ts +9 -0
  325. package/dist/lite/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  326. package/dist/lite/model/aroundRadius.d.ts +1 -1
  327. package/dist/lite/model/aroundRadiusAll.d.ts +3 -0
  328. package/dist/lite/model/aroundRadiusAll.d.ts.map +1 -1
  329. package/dist/lite/model/automaticFacetFilter.d.ts +4 -4
  330. package/dist/lite/model/automaticFacetFilters.d.ts +1 -1
  331. package/dist/lite/model/baseGetApiKeyResponse.d.ts +1 -1
  332. package/dist/lite/model/baseIndexSettings.d.ts +23 -18
  333. package/dist/lite/model/baseIndexSettings.d.ts.map +1 -1
  334. package/dist/lite/model/baseRecommendRequest.d.ts +17 -0
  335. package/dist/lite/model/baseRecommendRequest.d.ts.map +1 -0
  336. package/dist/lite/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  337. package/dist/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  338. package/dist/lite/model/baseSearchResponse.d.ts +8 -20
  339. package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
  340. package/dist/lite/model/boughtTogetherQuery.d.ts +4 -0
  341. package/dist/lite/model/boughtTogetherQuery.d.ts.map +1 -0
  342. package/dist/lite/model/browsePagination.d.ts +19 -0
  343. package/dist/lite/model/browsePagination.d.ts.map +1 -0
  344. package/dist/lite/model/browseResponse.d.ts +2 -1
  345. package/dist/lite/model/browseResponse.d.ts.map +1 -1
  346. package/dist/lite/model/clientMethodProps.d.ts +7 -0
  347. package/dist/lite/model/clientMethodProps.d.ts.map +1 -1
  348. package/dist/lite/model/consequenceQuery.d.ts +1 -1
  349. package/dist/lite/model/consequenceQueryObject.d.ts +2 -2
  350. package/dist/lite/model/cursor.d.ts +1 -1
  351. package/dist/lite/model/distinct.d.ts +1 -1
  352. package/dist/lite/model/edit.d.ts +1 -1
  353. package/dist/lite/model/exactOnSingleWordQuery.d.ts +1 -1
  354. package/dist/lite/model/facetFilters.d.ts +2 -3
  355. package/dist/lite/model/facetFilters.d.ts.map +1 -1
  356. package/dist/lite/model/facetHits.d.ts +2 -2
  357. package/dist/lite/model/facetOrdering.d.ts +2 -2
  358. package/dist/lite/model/facets.d.ts +2 -2
  359. package/dist/lite/model/fallbackParams.d.ts +3 -0
  360. package/dist/lite/model/fallbackParams.d.ts.map +1 -0
  361. package/dist/lite/model/fbtModel.d.ts +5 -0
  362. package/dist/lite/model/fbtModel.d.ts.map +1 -0
  363. package/dist/lite/model/frequentlyBoughtTogether.d.ts +9 -0
  364. package/dist/lite/model/frequentlyBoughtTogether.d.ts.map +1 -0
  365. package/dist/lite/model/getRecommendationsParams.d.ts +11 -0
  366. package/dist/lite/model/getRecommendationsParams.d.ts.map +1 -0
  367. package/dist/lite/model/getRecommendationsResponse.d.ts +5 -0
  368. package/dist/lite/model/getRecommendationsResponse.d.ts.map +1 -0
  369. package/dist/lite/model/highlightResult.d.ts +1 -1
  370. package/dist/lite/model/highlightResult.d.ts.map +1 -1
  371. package/dist/lite/model/highlightResultOption.d.ts +3 -3
  372. package/dist/lite/model/hit.d.ts +4 -4
  373. package/dist/lite/model/ignorePlurals.d.ts +3 -2
  374. package/dist/lite/model/ignorePlurals.d.ts.map +1 -1
  375. package/dist/lite/model/index.d.ts +32 -37
  376. package/dist/lite/model/index.d.ts.map +1 -1
  377. package/dist/lite/model/indexSettings.d.ts +1 -1
  378. package/dist/lite/model/indexSettingsAsSearchParams.d.ts +32 -35
  379. package/dist/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  380. package/dist/lite/model/lookingSimilar.d.ts +11 -0
  381. package/dist/lite/model/lookingSimilar.d.ts.map +1 -0
  382. package/dist/lite/model/lookingSimilarModel.d.ts +5 -0
  383. package/dist/lite/model/lookingSimilarModel.d.ts.map +1 -0
  384. package/dist/lite/model/lookingSimilarQuery.d.ts +4 -0
  385. package/dist/lite/model/lookingSimilarQuery.d.ts.map +1 -0
  386. package/dist/lite/model/matchLevel.d.ts +1 -1
  387. package/dist/lite/model/mode.d.ts +1 -1
  388. package/dist/lite/model/numericFilters.d.ts +2 -3
  389. package/dist/lite/model/numericFilters.d.ts.map +1 -1
  390. package/dist/lite/model/optionalFilters.d.ts +2 -3
  391. package/dist/lite/model/optionalFilters.d.ts.map +1 -1
  392. package/dist/lite/model/params.d.ts +1 -1
  393. package/dist/lite/model/queryType.d.ts +1 -1
  394. package/dist/lite/model/rankingInfo.d.ts +13 -10
  395. package/dist/lite/model/rankingInfo.d.ts.map +1 -1
  396. package/dist/lite/model/reRankingApplyFilter.d.ts +2 -3
  397. package/dist/lite/model/reRankingApplyFilter.d.ts.map +1 -1
  398. package/dist/lite/model/recommendHit.d.ts +27 -0
  399. package/dist/lite/model/recommendHit.d.ts.map +1 -0
  400. package/dist/lite/model/recommendationsHit.d.ts +4 -0
  401. package/dist/lite/model/recommendationsHit.d.ts.map +1 -0
  402. package/dist/lite/model/recommendationsHits.d.ts +5 -0
  403. package/dist/lite/model/recommendationsHits.d.ts.map +1 -0
  404. package/dist/lite/model/recommendationsRequest.d.ts +8 -0
  405. package/dist/lite/model/recommendationsRequest.d.ts.map +1 -0
  406. package/dist/lite/model/recommendationsResults.d.ts +5 -0
  407. package/dist/lite/model/recommendationsResults.d.ts.map +1 -0
  408. package/dist/lite/model/recommendedForYou.d.ts +7 -0
  409. package/dist/lite/model/recommendedForYou.d.ts.map +1 -0
  410. package/dist/lite/model/recommendedForYouModel.d.ts +5 -0
  411. package/dist/lite/model/recommendedForYouModel.d.ts.map +1 -0
  412. package/dist/lite/model/recommendedForYouQuery.d.ts +4 -0
  413. package/dist/lite/model/recommendedForYouQuery.d.ts.map +1 -0
  414. package/dist/lite/model/redirect.d.ts +1 -1
  415. package/dist/lite/model/redirectURL.d.ts +7 -0
  416. package/dist/lite/model/redirectURL.d.ts.map +1 -0
  417. package/dist/lite/model/relatedModel.d.ts +5 -0
  418. package/dist/lite/model/relatedModel.d.ts.map +1 -0
  419. package/dist/lite/model/relatedProducts.d.ts +11 -0
  420. package/dist/lite/model/relatedProducts.d.ts.map +1 -0
  421. package/dist/lite/model/relatedQuery.d.ts +4 -0
  422. package/dist/lite/model/relatedQuery.d.ts.map +1 -0
  423. package/dist/lite/model/removeStopWords.d.ts +3 -2
  424. package/dist/lite/model/removeStopWords.d.ts.map +1 -1
  425. package/dist/lite/model/removeWordsIfNoResults.d.ts +1 -1
  426. package/dist/lite/model/renderingContent.d.ts +3 -1
  427. package/dist/lite/model/renderingContent.d.ts.map +1 -1
  428. package/dist/lite/model/searchForFacetValuesResponse.d.ts +4 -1
  429. package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
  430. package/dist/lite/model/searchForFacetsOptions.d.ts +2 -2
  431. package/dist/lite/model/searchForHitsOptions.d.ts +1 -1
  432. package/dist/lite/model/searchHits.d.ts +6 -3
  433. package/dist/lite/model/searchHits.d.ts.map +1 -1
  434. package/dist/lite/model/searchPagination.d.ts +19 -0
  435. package/dist/lite/model/searchPagination.d.ts.map +1 -0
  436. package/dist/lite/model/searchParams.d.ts +1 -2
  437. package/dist/lite/model/searchParams.d.ts.map +1 -1
  438. package/dist/lite/model/searchParamsObject.d.ts +3 -0
  439. package/dist/lite/model/searchParamsObject.d.ts.map +1 -1
  440. package/dist/lite/model/searchParamsQuery.d.ts +1 -1
  441. package/dist/lite/model/searchResponse.d.ts +2 -1
  442. package/dist/lite/model/searchResponse.d.ts.map +1 -1
  443. package/dist/lite/model/searchStrategy.d.ts +1 -1
  444. package/dist/lite/model/semanticSearch.d.ts +2 -2
  445. package/dist/lite/model/snippetResult.d.ts +1 -1
  446. package/dist/lite/model/snippetResult.d.ts.map +1 -1
  447. package/dist/lite/model/snippetResultOption.d.ts +2 -2
  448. package/dist/lite/model/sortRemainingBy.d.ts +1 -1
  449. package/dist/lite/model/supportedLanguage.d.ts +5 -0
  450. package/dist/lite/model/supportedLanguage.d.ts.map +1 -0
  451. package/dist/lite/model/tagFilters.d.ts +2 -3
  452. package/dist/lite/model/tagFilters.d.ts.map +1 -1
  453. package/dist/lite/model/trendingFacetHit.d.ts +18 -0
  454. package/dist/lite/model/trendingFacetHit.d.ts.map +1 -0
  455. package/dist/lite/model/trendingFacets.d.ts +11 -0
  456. package/dist/lite/model/trendingFacets.d.ts.map +1 -0
  457. package/dist/lite/model/trendingFacetsModel.d.ts +5 -0
  458. package/dist/lite/model/trendingFacetsModel.d.ts.map +1 -0
  459. package/dist/lite/model/trendingFacetsQuery.d.ts +4 -0
  460. package/dist/lite/model/trendingFacetsQuery.d.ts.map +1 -0
  461. package/dist/lite/model/trendingItems.d.ts +15 -0
  462. package/dist/lite/model/trendingItems.d.ts.map +1 -0
  463. package/dist/lite/model/trendingItemsModel.d.ts +5 -0
  464. package/dist/lite/model/trendingItemsModel.d.ts.map +1 -0
  465. package/dist/lite/model/trendingItemsQuery.d.ts +4 -0
  466. package/dist/lite/model/trendingItemsQuery.d.ts.map +1 -0
  467. package/dist/lite/model/typoTolerance.d.ts +1 -1
  468. package/dist/lite/model/typoToleranceEnum.d.ts +3 -0
  469. package/dist/lite/model/typoToleranceEnum.d.ts.map +1 -1
  470. package/dist/lite/model/value.d.ts +5 -1
  471. package/dist/lite/model/value.d.ts.map +1 -1
  472. package/dist/lite/src/liteClient.d.ts +19 -10
  473. package/dist/lite/src/liteClient.d.ts.map +1 -1
  474. package/dist/recommend/model/advancedSyntaxFeatures.d.ts +2 -0
  475. package/dist/recommend/model/advancedSyntaxFeatures.d.ts.map +1 -0
  476. package/dist/recommend/model/alternativesAsExact.d.ts +2 -0
  477. package/dist/recommend/model/alternativesAsExact.d.ts.map +1 -0
  478. package/dist/recommend/model/aroundPrecision.d.ts +6 -0
  479. package/dist/recommend/model/aroundPrecision.d.ts.map +1 -0
  480. package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts +14 -0
  481. package/dist/recommend/model/aroundPrecisionFromValueInner.d.ts.map +1 -0
  482. package/dist/recommend/model/aroundRadius.d.ts +6 -0
  483. package/dist/recommend/model/aroundRadius.d.ts.map +1 -0
  484. package/dist/recommend/model/aroundRadiusAll.d.ts +5 -0
  485. package/dist/recommend/model/aroundRadiusAll.d.ts.map +1 -0
  486. package/dist/recommend/model/autoFacetFilter.d.ts +14 -0
  487. package/dist/recommend/model/autoFacetFilter.d.ts.map +1 -0
  488. package/dist/recommend/model/baseRecommendRequest.d.ts +17 -0
  489. package/dist/recommend/model/baseRecommendRequest.d.ts.map +1 -0
  490. package/dist/recommend/model/baseSearchParams.d.ts +4 -0
  491. package/dist/recommend/model/baseSearchParams.d.ts.map +1 -0
  492. package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts +116 -0
  493. package/dist/recommend/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
  494. package/dist/recommend/model/baseSearchResponse.d.ts +94 -0
  495. package/dist/recommend/model/baseSearchResponse.d.ts.map +1 -0
  496. package/dist/recommend/model/boughtTogetherQuery.d.ts +4 -0
  497. package/dist/recommend/model/boughtTogetherQuery.d.ts.map +1 -0
  498. package/dist/recommend/model/clientMethodProps.d.ts +135 -0
  499. package/dist/recommend/model/clientMethodProps.d.ts.map +1 -0
  500. package/dist/recommend/model/condition.d.ts +14 -0
  501. package/dist/recommend/model/condition.d.ts.map +1 -0
  502. package/dist/recommend/model/consequence.d.ts +18 -0
  503. package/dist/recommend/model/consequence.d.ts.map +1 -0
  504. package/dist/recommend/model/deletedAtResponse.d.ts +14 -0
  505. package/dist/recommend/model/deletedAtResponse.d.ts.map +1 -0
  506. package/dist/recommend/model/distinct.d.ts +5 -0
  507. package/dist/recommend/model/distinct.d.ts.map +1 -0
  508. package/dist/recommend/model/errorBase.d.ts +7 -0
  509. package/dist/recommend/model/errorBase.d.ts.map +1 -0
  510. package/dist/recommend/model/exactOnSingleWordQuery.d.ts +5 -0
  511. package/dist/recommend/model/exactOnSingleWordQuery.d.ts.map +1 -0
  512. package/dist/recommend/model/exhaustive.d.ts +26 -0
  513. package/dist/recommend/model/exhaustive.d.ts.map +1 -0
  514. package/dist/recommend/model/facetFilters.d.ts +5 -0
  515. package/dist/recommend/model/facetFilters.d.ts.map +1 -0
  516. package/dist/recommend/model/facetOrdering.d.ts +13 -0
  517. package/dist/recommend/model/facetOrdering.d.ts.map +1 -0
  518. package/dist/recommend/model/facets.d.ts +10 -0
  519. package/dist/recommend/model/facets.d.ts.map +1 -0
  520. package/dist/recommend/model/facetsStats.d.ts +19 -0
  521. package/dist/recommend/model/facetsStats.d.ts.map +1 -0
  522. package/dist/recommend/model/fallbackParams.d.ts +3 -0
  523. package/dist/recommend/model/fallbackParams.d.ts.map +1 -0
  524. package/dist/recommend/model/fbtModel.d.ts +5 -0
  525. package/dist/recommend/model/fbtModel.d.ts.map +1 -0
  526. package/dist/recommend/model/frequentlyBoughtTogether.d.ts +9 -0
  527. package/dist/recommend/model/frequentlyBoughtTogether.d.ts.map +1 -0
  528. package/dist/recommend/model/getRecommendTaskResponse.d.ts +5 -0
  529. package/dist/recommend/model/getRecommendTaskResponse.d.ts.map +1 -0
  530. package/dist/recommend/model/getRecommendationsParams.d.ts +11 -0
  531. package/dist/recommend/model/getRecommendationsParams.d.ts.map +1 -0
  532. package/dist/recommend/model/getRecommendationsResponse.d.ts +5 -0
  533. package/dist/recommend/model/getRecommendationsResponse.d.ts.map +1 -0
  534. package/dist/recommend/model/hideConsequenceObject.d.ts +10 -0
  535. package/dist/recommend/model/hideConsequenceObject.d.ts.map +1 -0
  536. package/dist/recommend/model/highlightResult.d.ts +3 -0
  537. package/dist/recommend/model/highlightResult.d.ts.map +1 -0
  538. package/dist/recommend/model/highlightResultOption.d.ts +20 -0
  539. package/dist/recommend/model/highlightResultOption.d.ts.map +1 -0
  540. package/dist/recommend/model/ignorePlurals.d.ts +6 -0
  541. package/dist/recommend/model/ignorePlurals.d.ts.map +1 -0
  542. package/dist/recommend/model/index.d.ts +94 -0
  543. package/dist/recommend/model/index.d.ts.map +1 -0
  544. package/dist/recommend/model/indexSettingsAsSearchParams.d.ts +160 -0
  545. package/dist/recommend/model/indexSettingsAsSearchParams.d.ts.map +1 -0
  546. package/dist/recommend/model/lookingSimilar.d.ts +11 -0
  547. package/dist/recommend/model/lookingSimilar.d.ts.map +1 -0
  548. package/dist/recommend/model/lookingSimilarModel.d.ts +5 -0
  549. package/dist/recommend/model/lookingSimilarModel.d.ts.map +1 -0
  550. package/dist/recommend/model/lookingSimilarQuery.d.ts +4 -0
  551. package/dist/recommend/model/lookingSimilarQuery.d.ts.map +1 -0
  552. package/dist/recommend/model/matchLevel.d.ts +5 -0
  553. package/dist/recommend/model/matchLevel.d.ts.map +1 -0
  554. package/dist/recommend/model/matchedGeoLocation.d.ts +15 -0
  555. package/dist/recommend/model/matchedGeoLocation.d.ts.map +1 -0
  556. package/dist/recommend/model/mode.d.ts +5 -0
  557. package/dist/recommend/model/mode.d.ts.map +1 -0
  558. package/dist/recommend/model/numericFilters.d.ts +5 -0
  559. package/dist/recommend/model/numericFilters.d.ts.map +1 -0
  560. package/dist/recommend/model/optionalFilters.d.ts +5 -0
  561. package/dist/recommend/model/optionalFilters.d.ts.map +1 -0
  562. package/dist/recommend/model/paramsConsequence.d.ts +19 -0
  563. package/dist/recommend/model/paramsConsequence.d.ts.map +1 -0
  564. package/dist/recommend/model/personalization.d.ts +15 -0
  565. package/dist/recommend/model/personalization.d.ts.map +1 -0
  566. package/dist/recommend/model/promoteConsequenceObject.d.ts +14 -0
  567. package/dist/recommend/model/promoteConsequenceObject.d.ts.map +1 -0
  568. package/dist/recommend/model/queryType.d.ts +5 -0
  569. package/dist/recommend/model/queryType.d.ts.map +1 -0
  570. package/dist/recommend/model/rankingInfo.d.ts +54 -0
  571. package/dist/recommend/model/rankingInfo.d.ts.map +1 -0
  572. package/dist/recommend/model/reRankingApplyFilter.d.ts +5 -0
  573. package/dist/recommend/model/reRankingApplyFilter.d.ts.map +1 -0
  574. package/dist/recommend/model/recommendHit.d.ts +27 -0
  575. package/dist/recommend/model/recommendHit.d.ts.map +1 -0
  576. package/dist/recommend/model/recommendModels.d.ts +2 -0
  577. package/dist/recommend/model/recommendModels.d.ts.map +1 -0
  578. package/dist/recommend/model/recommendRule.d.ts +24 -0
  579. package/dist/recommend/model/recommendRule.d.ts.map +1 -0
  580. package/dist/recommend/model/recommendRuleMetadata.d.ts +10 -0
  581. package/dist/recommend/model/recommendRuleMetadata.d.ts.map +1 -0
  582. package/dist/recommend/model/recommendationsHit.d.ts +4 -0
  583. package/dist/recommend/model/recommendationsHit.d.ts.map +1 -0
  584. package/dist/recommend/model/recommendationsHits.d.ts +5 -0
  585. package/dist/recommend/model/recommendationsHits.d.ts.map +1 -0
  586. package/dist/recommend/model/recommendationsRequest.d.ts +8 -0
  587. package/dist/recommend/model/recommendationsRequest.d.ts.map +1 -0
  588. package/dist/recommend/model/recommendationsResults.d.ts +5 -0
  589. package/dist/recommend/model/recommendationsResults.d.ts.map +1 -0
  590. package/dist/recommend/model/recommendedForYou.d.ts +7 -0
  591. package/dist/recommend/model/recommendedForYou.d.ts.map +1 -0
  592. package/dist/recommend/model/recommendedForYouModel.d.ts +5 -0
  593. package/dist/recommend/model/recommendedForYouModel.d.ts.map +1 -0
  594. package/dist/recommend/model/recommendedForYouQuery.d.ts +4 -0
  595. package/dist/recommend/model/recommendedForYouQuery.d.ts.map +1 -0
  596. package/dist/recommend/model/redirect.d.ts +8 -0
  597. package/dist/recommend/model/redirect.d.ts.map +1 -0
  598. package/dist/recommend/model/redirectRuleIndexMetadata.d.ts +21 -0
  599. package/dist/recommend/model/redirectRuleIndexMetadata.d.ts.map +1 -0
  600. package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts +7 -0
  601. package/dist/recommend/model/redirectRuleIndexMetadataData.d.ts.map +1 -0
  602. package/dist/recommend/model/redirectURL.d.ts +7 -0
  603. package/dist/recommend/model/redirectURL.d.ts.map +1 -0
  604. package/dist/recommend/model/relatedModel.d.ts +5 -0
  605. package/dist/recommend/model/relatedModel.d.ts.map +1 -0
  606. package/dist/recommend/model/relatedProducts.d.ts +11 -0
  607. package/dist/recommend/model/relatedProducts.d.ts.map +1 -0
  608. package/dist/recommend/model/relatedQuery.d.ts +4 -0
  609. package/dist/recommend/model/relatedQuery.d.ts.map +1 -0
  610. package/dist/recommend/model/removeStopWords.d.ts +6 -0
  611. package/dist/recommend/model/removeStopWords.d.ts.map +1 -0
  612. package/dist/recommend/model/removeWordsIfNoResults.d.ts +5 -0
  613. package/dist/recommend/model/removeWordsIfNoResults.d.ts.map +1 -0
  614. package/dist/recommend/model/renderingContent.d.ts +10 -0
  615. package/dist/recommend/model/renderingContent.d.ts.map +1 -0
  616. package/dist/recommend/model/searchPagination.d.ts +19 -0
  617. package/dist/recommend/model/searchPagination.d.ts.map +1 -0
  618. package/dist/recommend/model/searchParams.d.ts +3 -0
  619. package/dist/recommend/model/searchParams.d.ts.map +1 -0
  620. package/dist/recommend/model/searchParamsObject.d.ts +7 -0
  621. package/dist/recommend/model/searchParamsObject.d.ts.map +1 -0
  622. package/dist/recommend/model/searchParamsQuery.d.ts +7 -0
  623. package/dist/recommend/model/searchParamsQuery.d.ts.map +1 -0
  624. package/dist/recommend/model/searchRecommendRulesParams.d.ts +38 -0
  625. package/dist/recommend/model/searchRecommendRulesParams.d.ts.map +1 -0
  626. package/dist/recommend/model/searchRecommendRulesResponse.d.ts +20 -0
  627. package/dist/recommend/model/searchRecommendRulesResponse.d.ts.map +1 -0
  628. package/dist/recommend/model/semanticSearch.d.ts +10 -0
  629. package/dist/recommend/model/semanticSearch.d.ts.map +1 -0
  630. package/dist/recommend/model/snippetResult.d.ts +3 -0
  631. package/dist/recommend/model/snippetResult.d.ts.map +1 -0
  632. package/dist/recommend/model/snippetResultOption.d.ts +12 -0
  633. package/dist/recommend/model/snippetResultOption.d.ts.map +1 -0
  634. package/dist/recommend/model/sortRemainingBy.d.ts +5 -0
  635. package/dist/recommend/model/sortRemainingBy.d.ts.map +1 -0
  636. package/dist/recommend/model/supportedLanguage.d.ts +5 -0
  637. package/dist/recommend/model/supportedLanguage.d.ts.map +1 -0
  638. package/dist/recommend/model/tagFilters.d.ts +5 -0
  639. package/dist/recommend/model/tagFilters.d.ts.map +1 -0
  640. package/dist/recommend/model/taskStatus.d.ts +5 -0
  641. package/dist/recommend/model/taskStatus.d.ts.map +1 -0
  642. package/dist/recommend/model/trendingFacetHit.d.ts +18 -0
  643. package/dist/recommend/model/trendingFacetHit.d.ts.map +1 -0
  644. package/dist/recommend/model/trendingFacets.d.ts +11 -0
  645. package/dist/recommend/model/trendingFacets.d.ts.map +1 -0
  646. package/dist/recommend/model/trendingFacetsModel.d.ts +5 -0
  647. package/dist/recommend/model/trendingFacetsModel.d.ts.map +1 -0
  648. package/dist/recommend/model/trendingFacetsQuery.d.ts +4 -0
  649. package/dist/recommend/model/trendingFacetsQuery.d.ts.map +1 -0
  650. package/dist/recommend/model/trendingItems.d.ts +15 -0
  651. package/dist/recommend/model/trendingItems.d.ts.map +1 -0
  652. package/dist/recommend/model/trendingItemsModel.d.ts +5 -0
  653. package/dist/recommend/model/trendingItemsModel.d.ts.map +1 -0
  654. package/dist/recommend/model/trendingItemsQuery.d.ts +4 -0
  655. package/dist/recommend/model/trendingItemsQuery.d.ts.map +1 -0
  656. package/dist/recommend/model/typoTolerance.d.ts +6 -0
  657. package/dist/recommend/model/typoTolerance.d.ts.map +1 -0
  658. package/dist/recommend/model/typoToleranceEnum.d.ts +5 -0
  659. package/dist/recommend/model/typoToleranceEnum.d.ts.map +1 -0
  660. package/dist/recommend/model/value.d.ts +13 -0
  661. package/dist/recommend/model/value.d.ts.map +1 -0
  662. package/dist/recommend/src/recommendClient.d.ts +132 -0
  663. package/dist/recommend/src/recommendClient.d.ts.map +1 -0
  664. package/lite/builds/browser.ts +11 -6
  665. package/lite/builds/node.ts +10 -5
  666. package/lite/model/acl.ts +1 -1
  667. package/lite/model/apiKey.ts +8 -8
  668. package/lite/model/aroundPrecision.ts +1 -1
  669. package/lite/model/aroundPrecisionFromValueInner.ts +9 -0
  670. package/lite/model/aroundRadius.ts +1 -1
  671. package/lite/model/aroundRadiusAll.ts +3 -0
  672. package/lite/model/automaticFacetFilter.ts +4 -4
  673. package/lite/model/automaticFacetFilters.ts +1 -1
  674. package/lite/model/baseGetApiKeyResponse.ts +1 -1
  675. package/lite/model/baseIndexSettings.ts +25 -18
  676. package/lite/model/baseRecommendRequest.ts +22 -0
  677. package/lite/model/baseSearchParamsWithoutQuery.ts +26 -30
  678. package/lite/model/baseSearchResponse.ts +9 -24
  679. package/lite/model/boughtTogetherQuery.ts +7 -0
  680. package/lite/model/browsePagination.ts +23 -0
  681. package/lite/model/browseResponse.ts +2 -0
  682. package/lite/model/clientMethodProps.ts +8 -0
  683. package/lite/model/consequenceQuery.ts +1 -1
  684. package/lite/model/consequenceQueryObject.ts +2 -2
  685. package/lite/model/cursor.ts +1 -1
  686. package/lite/model/distinct.ts +1 -1
  687. package/lite/model/edit.ts +1 -1
  688. package/lite/model/exactOnSingleWordQuery.ts +1 -1
  689. package/lite/model/facetFilters.ts +2 -4
  690. package/lite/model/facetHits.ts +2 -2
  691. package/lite/model/facetOrdering.ts +2 -2
  692. package/lite/model/facets.ts +2 -2
  693. package/lite/model/{attributeToUpdate.ts → fallbackParams.ts} +2 -2
  694. package/lite/model/fbtModel.ts +6 -0
  695. package/lite/model/{consequenceHide.ts → frequentlyBoughtTogether.ts} +6 -5
  696. package/lite/model/getRecommendationsParams.ts +13 -0
  697. package/lite/model/getRecommendationsResponse.ts +7 -0
  698. package/lite/model/highlightResult.ts +1 -0
  699. package/lite/model/highlightResultOption.ts +3 -3
  700. package/lite/model/hit.ts +4 -4
  701. package/lite/model/ignorePlurals.ts +4 -2
  702. package/lite/model/index.ts +32 -37
  703. package/lite/model/indexSettings.ts +1 -1
  704. package/lite/model/indexSettingsAsSearchParams.ts +32 -36
  705. package/lite/model/lookingSimilar.ts +15 -0
  706. package/lite/model/lookingSimilarModel.ts +6 -0
  707. package/lite/model/lookingSimilarQuery.ts +6 -0
  708. package/lite/model/matchLevel.ts +1 -1
  709. package/lite/model/mode.ts +1 -1
  710. package/lite/model/numericFilters.ts +2 -4
  711. package/lite/model/optionalFilters.ts +2 -4
  712. package/lite/model/params.ts +1 -1
  713. package/lite/model/queryType.ts +1 -1
  714. package/lite/model/rankingInfo.ts +13 -10
  715. package/lite/model/reRankingApplyFilter.ts +2 -4
  716. package/lite/model/recommendHit.ts +34 -0
  717. package/lite/model/{promote.ts → recommendationsHit.ts} +3 -3
  718. package/lite/model/{searchParamsString.ts → recommendationsHits.ts} +4 -5
  719. package/lite/model/recommendationsRequest.ts +16 -0
  720. package/lite/model/recommendationsResults.ts +9 -0
  721. package/lite/model/recommendedForYou.ts +10 -0
  722. package/lite/model/{operationType.ts → recommendedForYouModel.ts} +2 -2
  723. package/lite/model/recommendedForYouQuery.ts +6 -0
  724. package/lite/model/redirect.ts +1 -1
  725. package/lite/model/{dictionaryAction.ts → redirectURL.ts} +4 -2
  726. package/lite/model/relatedModel.ts +6 -0
  727. package/lite/model/relatedProducts.ts +15 -0
  728. package/lite/model/relatedQuery.ts +6 -0
  729. package/lite/model/removeStopWords.ts +4 -2
  730. package/lite/model/removeWordsIfNoResults.ts +1 -1
  731. package/lite/model/renderingContent.ts +4 -1
  732. package/lite/model/searchForFacetValuesResponse.ts +4 -1
  733. package/lite/model/searchForFacetsOptions.ts +2 -2
  734. package/lite/model/searchForHitsOptions.ts +1 -1
  735. package/lite/model/searchHits.ts +6 -3
  736. package/lite/model/searchPagination.ts +23 -0
  737. package/lite/model/searchParams.ts +1 -2
  738. package/lite/model/searchParamsObject.ts +3 -0
  739. package/lite/model/searchParamsQuery.ts +1 -1
  740. package/lite/model/searchResponse.ts +3 -1
  741. package/lite/model/searchStrategy.ts +1 -1
  742. package/lite/model/semanticSearch.ts +2 -2
  743. package/lite/model/snippetResult.ts +2 -1
  744. package/lite/model/snippetResultOption.ts +2 -2
  745. package/lite/model/sortRemainingBy.ts +1 -1
  746. package/lite/model/supportedLanguage.ts +74 -0
  747. package/lite/model/tagFilters.ts +2 -4
  748. package/lite/model/trendingFacetHit.ts +21 -0
  749. package/lite/model/trendingFacets.ts +15 -0
  750. package/lite/model/trendingFacetsModel.ts +6 -0
  751. package/lite/model/trendingFacetsQuery.ts +6 -0
  752. package/lite/model/trendingItems.ts +20 -0
  753. package/lite/model/{dictionaryEntryState.ts → trendingItemsModel.ts} +2 -2
  754. package/lite/model/trendingItemsQuery.ts +6 -0
  755. package/lite/model/typoTolerance.ts +1 -1
  756. package/lite/model/typoToleranceEnum.ts +3 -0
  757. package/lite/model/value.ts +6 -1
  758. package/lite/src/liteClient.ts +64 -12
  759. package/package.json +19 -15
  760. package/dist/client-abtesting/model/currenciesValue.d.ts.map +0 -1
  761. package/dist/client-analytics/model/averageClickEvent.d.ts +0 -15
  762. package/dist/client-analytics/model/averageClickEvent.d.ts.map +0 -1
  763. package/dist/client-analytics/model/clickPosition.d.ts +0 -11
  764. package/dist/client-analytics/model/clickPosition.d.ts.map +0 -1
  765. package/dist/client-analytics/model/clickThroughRateEvent.d.ts +0 -19
  766. package/dist/client-analytics/model/clickThroughRateEvent.d.ts.map +0 -1
  767. package/dist/client-analytics/model/conversionRateEvent.d.ts +0 -19
  768. package/dist/client-analytics/model/conversionRateEvent.d.ts.map +0 -1
  769. package/dist/client-analytics/model/getConversationRateResponse.d.ts +0 -20
  770. package/dist/client-analytics/model/getConversationRateResponse.d.ts.map +0 -1
  771. package/dist/client-analytics/model/noClickRateEvent.d.ts +0 -19
  772. package/dist/client-analytics/model/noClickRateEvent.d.ts.map +0 -1
  773. package/dist/client-analytics/model/noResultsRateEvent.d.ts +0 -19
  774. package/dist/client-analytics/model/noResultsRateEvent.d.ts.map +0 -1
  775. package/dist/client-analytics/model/searchEvent.d.ts +0 -11
  776. package/dist/client-analytics/model/searchEvent.d.ts.map +0 -1
  777. package/dist/client-analytics/model/searchNoClickEvent.d.ts +0 -15
  778. package/dist/client-analytics/model/searchNoClickEvent.d.ts.map +0 -1
  779. package/dist/client-analytics/model/searchNoResultEvent.d.ts +0 -15
  780. package/dist/client-analytics/model/searchNoResultEvent.d.ts.map +0 -1
  781. package/dist/client-analytics/model/userWithDate.d.ts +0 -11
  782. package/dist/client-analytics/model/userWithDate.d.ts.map +0 -1
  783. package/dist/client-search/model/mixedSearchFilters.d.ts +0 -2
  784. package/dist/client-search/model/mixedSearchFilters.d.ts.map +0 -1
  785. package/dist/lite/model/action.d.ts +0 -5
  786. package/dist/lite/model/action.d.ts.map +0 -1
  787. package/dist/lite/model/addApiKeyResponse.d.ts +0 -11
  788. package/dist/lite/model/addApiKeyResponse.d.ts.map +0 -1
  789. package/dist/lite/model/anchoring.d.ts +0 -5
  790. package/dist/lite/model/anchoring.d.ts.map +0 -1
  791. package/dist/lite/model/attributeToUpdate.d.ts +0 -3
  792. package/dist/lite/model/attributeToUpdate.d.ts.map +0 -1
  793. package/dist/lite/model/browseParams.d.ts +0 -4
  794. package/dist/lite/model/browseParams.d.ts.map +0 -1
  795. package/dist/lite/model/builtInOperation.d.ts +0 -12
  796. package/dist/lite/model/builtInOperation.d.ts.map +0 -1
  797. package/dist/lite/model/builtInOperationType.d.ts +0 -5
  798. package/dist/lite/model/builtInOperationType.d.ts.map +0 -1
  799. package/dist/lite/model/condition.d.ts +0 -17
  800. package/dist/lite/model/condition.d.ts.map +0 -1
  801. package/dist/lite/model/consequence.d.ts +0 -26
  802. package/dist/lite/model/consequence.d.ts.map +0 -1
  803. package/dist/lite/model/consequenceHide.d.ts +0 -10
  804. package/dist/lite/model/consequenceHide.d.ts.map +0 -1
  805. package/dist/lite/model/deleteByParams.d.ts +0 -27
  806. package/dist/lite/model/deleteByParams.d.ts.map +0 -1
  807. package/dist/lite/model/dictionaryAction.d.ts +0 -5
  808. package/dist/lite/model/dictionaryAction.d.ts.map +0 -1
  809. package/dist/lite/model/dictionaryEntry.d.ts +0 -28
  810. package/dist/lite/model/dictionaryEntry.d.ts.map +0 -1
  811. package/dist/lite/model/dictionaryEntryState.d.ts +0 -5
  812. package/dist/lite/model/dictionaryEntryState.d.ts.map +0 -1
  813. package/dist/lite/model/dictionaryLanguage.d.ts +0 -10
  814. package/dist/lite/model/dictionaryLanguage.d.ts.map +0 -1
  815. package/dist/lite/model/dictionaryType.d.ts +0 -2
  816. package/dist/lite/model/dictionaryType.d.ts.map +0 -1
  817. package/dist/lite/model/fetchedIndex.d.ts +0 -47
  818. package/dist/lite/model/fetchedIndex.d.ts.map +0 -1
  819. package/dist/lite/model/languages.d.ts +0 -10
  820. package/dist/lite/model/languages.d.ts.map +0 -1
  821. package/dist/lite/model/listIndicesResponse.d.ts +0 -12
  822. package/dist/lite/model/listIndicesResponse.d.ts.map +0 -1
  823. package/dist/lite/model/logType.d.ts +0 -2
  824. package/dist/lite/model/logType.d.ts.map +0 -1
  825. package/dist/lite/model/mixedSearchFilters.d.ts +0 -2
  826. package/dist/lite/model/mixedSearchFilters.d.ts.map +0 -1
  827. package/dist/lite/model/operationType.d.ts +0 -5
  828. package/dist/lite/model/operationType.d.ts.map +0 -1
  829. package/dist/lite/model/promote.d.ts +0 -4
  830. package/dist/lite/model/promote.d.ts.map +0 -1
  831. package/dist/lite/model/promoteObjectID.d.ts +0 -14
  832. package/dist/lite/model/promoteObjectID.d.ts.map +0 -1
  833. package/dist/lite/model/promoteObjectIDs.d.ts +0 -14
  834. package/dist/lite/model/promoteObjectIDs.d.ts.map +0 -1
  835. package/dist/lite/model/rule.d.ts +0 -30
  836. package/dist/lite/model/rule.d.ts.map +0 -1
  837. package/dist/lite/model/scopeType.d.ts +0 -2
  838. package/dist/lite/model/scopeType.d.ts.map +0 -1
  839. package/dist/lite/model/searchParamsString.d.ts +0 -7
  840. package/dist/lite/model/searchParamsString.d.ts.map +0 -1
  841. package/dist/lite/model/searchSynonymsResponse.d.ts +0 -12
  842. package/dist/lite/model/searchSynonymsResponse.d.ts.map +0 -1
  843. package/dist/lite/model/source.d.ts +0 -14
  844. package/dist/lite/model/source.d.ts.map +0 -1
  845. package/dist/lite/model/standardEntries.d.ts +0 -18
  846. package/dist/lite/model/standardEntries.d.ts.map +0 -1
  847. package/dist/lite/model/synonymHit.d.ts +0 -36
  848. package/dist/lite/model/synonymHit.d.ts.map +0 -1
  849. package/dist/lite/model/synonymType.d.ts +0 -5
  850. package/dist/lite/model/synonymType.d.ts.map +0 -1
  851. package/dist/lite/model/taskStatus.d.ts +0 -5
  852. package/dist/lite/model/taskStatus.d.ts.map +0 -1
  853. package/dist/lite/model/timeRange.d.ts +0 -11
  854. package/dist/lite/model/timeRange.d.ts.map +0 -1
  855. package/dist/lite/model/updatedRuleResponse.d.ts +0 -15
  856. package/dist/lite/model/updatedRuleResponse.d.ts.map +0 -1
  857. package/dist/lite/model/userId.d.ts +0 -22
  858. package/dist/lite/model/userId.d.ts.map +0 -1
  859. package/lite/model/action.ts +0 -13
  860. package/lite/model/addApiKeyResponse.ts +0 -13
  861. package/lite/model/anchoring.ts +0 -6
  862. package/lite/model/browseParams.ts +0 -6
  863. package/lite/model/builtInOperation.ts +0 -15
  864. package/lite/model/builtInOperationType.ts +0 -13
  865. package/lite/model/condition.ts +0 -22
  866. package/lite/model/consequence.ts +0 -32
  867. package/lite/model/deleteByParams.ts +0 -36
  868. package/lite/model/dictionaryEntry.ts +0 -35
  869. package/lite/model/dictionaryLanguage.ts +0 -11
  870. package/lite/model/dictionaryType.ts +0 -3
  871. package/lite/model/fetchedIndex.ts +0 -58
  872. package/lite/model/languages.ts +0 -14
  873. package/lite/model/listIndicesResponse.ts +0 -15
  874. package/lite/model/logType.ts +0 -3
  875. package/lite/model/mixedSearchFilters.ts +0 -3
  876. package/lite/model/promoteObjectID.ts +0 -16
  877. package/lite/model/promoteObjectIDs.ts +0 -16
  878. package/lite/model/rule.ts +0 -37
  879. package/lite/model/scopeType.ts +0 -3
  880. package/lite/model/searchSynonymsResponse.ts +0 -15
  881. package/lite/model/source.ts +0 -16
  882. package/lite/model/standardEntries.ts +0 -21
  883. package/lite/model/synonymHit.ts +0 -45
  884. package/lite/model/synonymType.ts +0 -11
  885. package/lite/model/taskStatus.ts +0 -6
  886. package/lite/model/timeRange.ts +0 -13
  887. package/lite/model/updatedRuleResponse.ts +0 -18
  888. package/lite/model/userId.ts +0 -26
@@ -1,10 +1,11 @@
1
- import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
1
+ import { createHmac } from 'crypto';
2
+ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache, serializeQueryParameters } from '@algolia/client-common';
2
3
  import { createHttpRequester } from '@algolia/requester-node-http';
3
4
 
4
5
  // 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.
5
- const apiClientVersion$4 = '5.0.0-alpha.99';
6
+ const apiClientVersion$5 = '5.0.0-beta.10';
6
7
  const REGIONS$2 = ['de', 'us'];
7
- function getDefaultHosts$3(region) {
8
+ function getDefaultHosts$4(region) {
8
9
  const url = !region
9
10
  ? 'analytics.algolia.com'
10
11
  : 'analytics.{region}.algolia.com'.replace('{region}', region);
@@ -14,12 +15,12 @@ function getDefaultHosts$3(region) {
14
15
  function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
15
16
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
16
17
  const transporter = createTransporter({
17
- hosts: getDefaultHosts$3(regionOption),
18
+ hosts: getDefaultHosts$4(regionOption),
18
19
  ...options,
19
20
  algoliaAgent: getAlgoliaAgent({
20
21
  algoliaAgents,
21
22
  client: 'Abtesting',
22
- version: apiClientVersion$4,
23
+ version: apiClientVersion$5,
23
24
  }),
24
25
  baseHeaders: {
25
26
  'content-type': 'text/plain',
@@ -62,9 +63,11 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
62
63
  transporter.algoliaAgent.add({ segment, version });
63
64
  },
64
65
  /**
65
- * Creates an A/B test.
66
+ * Creates a new A/B test.
67
+ *
68
+ * Required API Key ACLs:
69
+ * - editSettings.
66
70
  *
67
- * @summary Create an A/B test.
68
71
  * @param addABTestsRequest - The addABTestsRequest object.
69
72
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
70
73
  */
@@ -96,7 +99,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
96
99
  /**
97
100
  * This method allow you to send requests to the Algolia REST API.
98
101
  *
99
- * @summary Send requests to the Algolia REST API.
100
102
  * @param customDelete - The customDelete object.
101
103
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
102
104
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -106,7 +108,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
106
108
  if (!path) {
107
109
  throw new Error('Parameter `path` is required when calling `customDelete`.');
108
110
  }
109
- const requestPath = '/1{path}'.replace('{path}', path);
111
+ const requestPath = '/{path}'.replace('{path}', path);
110
112
  const headers = {};
111
113
  const queryParameters = parameters ? parameters : {};
112
114
  const request = {
@@ -120,7 +122,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
120
122
  /**
121
123
  * This method allow you to send requests to the Algolia REST API.
122
124
  *
123
- * @summary Send requests to the Algolia REST API.
124
125
  * @param customGet - The customGet object.
125
126
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
126
127
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -130,7 +131,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
130
131
  if (!path) {
131
132
  throw new Error('Parameter `path` is required when calling `customGet`.');
132
133
  }
133
- const requestPath = '/1{path}'.replace('{path}', path);
134
+ const requestPath = '/{path}'.replace('{path}', path);
134
135
  const headers = {};
135
136
  const queryParameters = parameters ? parameters : {};
136
137
  const request = {
@@ -144,7 +145,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
144
145
  /**
145
146
  * This method allow you to send requests to the Algolia REST API.
146
147
  *
147
- * @summary Send requests to the Algolia REST API.
148
148
  * @param customPost - The customPost object.
149
149
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
150
150
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -155,7 +155,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
155
155
  if (!path) {
156
156
  throw new Error('Parameter `path` is required when calling `customPost`.');
157
157
  }
158
- const requestPath = '/1{path}'.replace('{path}', path);
158
+ const requestPath = '/{path}'.replace('{path}', path);
159
159
  const headers = {};
160
160
  const queryParameters = parameters ? parameters : {};
161
161
  const request = {
@@ -170,7 +170,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
170
170
  /**
171
171
  * This method allow you to send requests to the Algolia REST API.
172
172
  *
173
- * @summary Send requests to the Algolia REST API.
174
173
  * @param customPut - The customPut object.
175
174
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
176
175
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -181,7 +180,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
181
180
  if (!path) {
182
181
  throw new Error('Parameter `path` is required when calling `customPut`.');
183
182
  }
184
- const requestPath = '/1{path}'.replace('{path}', path);
183
+ const requestPath = '/{path}'.replace('{path}', path);
185
184
  const headers = {};
186
185
  const queryParameters = parameters ? parameters : {};
187
186
  const request = {
@@ -194,11 +193,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
194
193
  return transporter.request(request, requestOptions);
195
194
  },
196
195
  /**
197
- * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
196
+ * Deletes an A/B test by its ID.
197
+ *
198
+ * Required API Key ACLs:
199
+ * - editSettings.
198
200
  *
199
- * @summary Delete an A/B test.
200
201
  * @param deleteABTest - The deleteABTest object.
201
- * @param deleteABTest.id - Unique A/B test ID.
202
+ * @param deleteABTest.id - Unique A/B test identifier.
202
203
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
203
204
  */
204
205
  deleteABTest({ id }, requestOptions) {
@@ -217,11 +218,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
217
218
  return transporter.request(request, requestOptions);
218
219
  },
219
220
  /**
220
- * Get specific details for an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
221
+ * Retrieves the details for an A/B test by its ID.
222
+ *
223
+ * Required API Key ACLs:
224
+ * - analytics.
221
225
  *
222
- * @summary Get A/B test details.
223
226
  * @param getABTest - The getABTest object.
224
- * @param getABTest.id - Unique A/B test ID.
227
+ * @param getABTest.id - Unique A/B test identifier.
225
228
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
226
229
  */
227
230
  getABTest({ id }, requestOptions) {
@@ -240,14 +243,16 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
240
243
  return transporter.request(request, requestOptions);
241
244
  },
242
245
  /**
243
- * List all A/B tests.
246
+ * Lists all A/B tests you configured for this application.
247
+ *
248
+ * Required API Key ACLs:
249
+ * - analytics.
244
250
  *
245
- * @summary List all A/B tests.
246
251
  * @param listABTests - The listABTests object.
247
- * @param listABTests.offset - Position of the starting record. Used for paging. 0 is the first record.
248
- * @param listABTests.limit - Number of records to return (page size).
249
- * @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix.
250
- * @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix.
252
+ * @param listABTests.offset - Position of the first item to return.
253
+ * @param listABTests.limit - Number of items to return.
254
+ * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
255
+ * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
251
256
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
252
257
  */
253
258
  listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = undefined) {
@@ -275,11 +280,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
275
280
  return transporter.request(request, requestOptions);
276
281
  },
277
282
  /**
278
- * If stopped, the test is over and can\'t be restarted. There is now only one index, receiving 100% of all search requests. The data gathered for stopped A/B tests is retained. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
283
+ * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
284
+ *
285
+ * Required API Key ACLs:
286
+ * - editSettings.
279
287
  *
280
- * @summary Stop an A/B test.
281
288
  * @param stopABTest - The stopABTest object.
282
- * @param stopABTest.id - Unique A/B test ID.
289
+ * @param stopABTest.id - Unique A/B test identifier.
283
290
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
284
291
  */
285
292
  stopABTest({ id }, requestOptions) {
@@ -301,9 +308,9 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
301
308
  }
302
309
 
303
310
  // 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.
304
- const apiClientVersion$3 = '5.0.0-alpha.99';
311
+ const apiClientVersion$4 = '5.0.0-beta.10';
305
312
  const REGIONS$1 = ['de', 'us'];
306
- function getDefaultHosts$2(region) {
313
+ function getDefaultHosts$3(region) {
307
314
  const url = !region
308
315
  ? 'analytics.algolia.com'
309
316
  : 'analytics.{region}.algolia.com'.replace('{region}', region);
@@ -313,12 +320,12 @@ function getDefaultHosts$2(region) {
313
320
  function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
314
321
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
315
322
  const transporter = createTransporter({
316
- hosts: getDefaultHosts$2(regionOption),
323
+ hosts: getDefaultHosts$3(regionOption),
317
324
  ...options,
318
325
  algoliaAgent: getAlgoliaAgent({
319
326
  algoliaAgents,
320
327
  client: 'Analytics',
321
- version: apiClientVersion$3,
328
+ version: apiClientVersion$4,
322
329
  }),
323
330
  baseHeaders: {
324
331
  'content-type': 'text/plain',
@@ -363,7 +370,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
363
370
  /**
364
371
  * This method allow you to send requests to the Algolia REST API.
365
372
  *
366
- * @summary Send requests to the Algolia REST API.
367
373
  * @param customDelete - The customDelete object.
368
374
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
369
375
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -373,7 +379,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
373
379
  if (!path) {
374
380
  throw new Error('Parameter `path` is required when calling `customDelete`.');
375
381
  }
376
- const requestPath = '/1{path}'.replace('{path}', path);
382
+ const requestPath = '/{path}'.replace('{path}', path);
377
383
  const headers = {};
378
384
  const queryParameters = parameters ? parameters : {};
379
385
  const request = {
@@ -387,7 +393,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
387
393
  /**
388
394
  * This method allow you to send requests to the Algolia REST API.
389
395
  *
390
- * @summary Send requests to the Algolia REST API.
391
396
  * @param customGet - The customGet object.
392
397
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
393
398
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -397,7 +402,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
397
402
  if (!path) {
398
403
  throw new Error('Parameter `path` is required when calling `customGet`.');
399
404
  }
400
- const requestPath = '/1{path}'.replace('{path}', path);
405
+ const requestPath = '/{path}'.replace('{path}', path);
401
406
  const headers = {};
402
407
  const queryParameters = parameters ? parameters : {};
403
408
  const request = {
@@ -411,7 +416,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
411
416
  /**
412
417
  * This method allow you to send requests to the Algolia REST API.
413
418
  *
414
- * @summary Send requests to the Algolia REST API.
415
419
  * @param customPost - The customPost object.
416
420
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
417
421
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -422,7 +426,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
422
426
  if (!path) {
423
427
  throw new Error('Parameter `path` is required when calling `customPost`.');
424
428
  }
425
- const requestPath = '/1{path}'.replace('{path}', path);
429
+ const requestPath = '/{path}'.replace('{path}', path);
426
430
  const headers = {};
427
431
  const queryParameters = parameters ? parameters : {};
428
432
  const request = {
@@ -437,7 +441,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
437
441
  /**
438
442
  * This method allow you to send requests to the Algolia REST API.
439
443
  *
440
- * @summary Send requests to the Algolia REST API.
441
444
  * @param customPut - The customPut object.
442
445
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
443
446
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -448,7 +451,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
448
451
  if (!path) {
449
452
  throw new Error('Parameter `path` is required when calling `customPut`.');
450
453
  }
451
- const requestPath = '/1{path}'.replace('{path}', path);
454
+ const requestPath = '/{path}'.replace('{path}', path);
452
455
  const headers = {};
453
456
  const queryParameters = parameters ? parameters : {};
454
457
  const request = {
@@ -461,14 +464,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
461
464
  return transporter.request(request, requestOptions);
462
465
  },
463
466
  /**
464
- * Return the average click position for the complete time range and for individual days. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
467
+ * Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
468
+ *
469
+ * Required API Key ACLs:
470
+ * - analytics.
471
+ *
472
+ * @param getAddToCartRate - The getAddToCartRate object.
473
+ * @param getAddToCartRate.index - Index name.
474
+ * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
475
+ * @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
476
+ * @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
477
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
478
+ */
479
+ getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
480
+ if (!index) {
481
+ throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
482
+ }
483
+ const requestPath = '/2/conversions/addToCartRate';
484
+ const headers = {};
485
+ const queryParameters = {};
486
+ if (index !== undefined) {
487
+ queryParameters.index = index.toString();
488
+ }
489
+ if (startDate !== undefined) {
490
+ queryParameters.startDate = startDate.toString();
491
+ }
492
+ if (endDate !== undefined) {
493
+ queryParameters.endDate = endDate.toString();
494
+ }
495
+ if (tags !== undefined) {
496
+ queryParameters.tags = tags.toString();
497
+ }
498
+ const request = {
499
+ method: 'GET',
500
+ path: requestPath,
501
+ queryParameters,
502
+ headers,
503
+ };
504
+ return transporter.request(request, requestOptions);
505
+ },
506
+ /**
507
+ * Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
508
+ *
509
+ * Required API Key ACLs:
510
+ * - analytics.
465
511
  *
466
- * @summary Get average click position.
467
512
  * @param getAverageClickPosition - The getAverageClickPosition object.
468
- * @param getAverageClickPosition.index - Index name to target.
469
- * @param getAverageClickPosition.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
470
- * @param getAverageClickPosition.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
471
- * @param getAverageClickPosition.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
513
+ * @param getAverageClickPosition.index - Index name.
514
+ * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
515
+ * @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
516
+ * @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
472
517
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
473
518
  */
474
519
  getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
@@ -499,14 +544,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
499
544
  return transporter.request(request, requestOptions);
500
545
  },
501
546
  /**
502
- * Show the number of clicks events and their associated position in the search results. > **Note**: If all `positions` have a `clickCount` of `0` or `null`, it means Algolia didn\'t receive any click events for tracked searches. A _tracked_ search is a search request where the `clickAnalytics` parameter is `true`.
547
+ * Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
548
+ *
549
+ * Required API Key ACLs:
550
+ * - analytics.
503
551
  *
504
- * @summary Get click positions.
505
552
  * @param getClickPositions - The getClickPositions object.
506
- * @param getClickPositions.index - Index name to target.
507
- * @param getClickPositions.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
508
- * @param getClickPositions.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
509
- * @param getClickPositions.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
553
+ * @param getClickPositions.index - Index name.
554
+ * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
555
+ * @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
556
+ * @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
510
557
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
511
558
  */
512
559
  getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
@@ -537,14 +584,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
537
584
  return transporter.request(request, requestOptions);
538
585
  },
539
586
  /**
540
- * Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
587
+ * Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
588
+ *
589
+ * Required API Key ACLs:
590
+ * - analytics.
541
591
  *
542
- * @summary Get click-through rate (CTR).
543
592
  * @param getClickThroughRate - The getClickThroughRate object.
544
- * @param getClickThroughRate.index - Index name to target.
545
- * @param getClickThroughRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
546
- * @param getClickThroughRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
547
- * @param getClickThroughRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
593
+ * @param getClickThroughRate.index - Index name.
594
+ * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
595
+ * @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
596
+ * @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
548
597
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
549
598
  */
550
599
  getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -575,19 +624,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
575
624
  return transporter.request(request, requestOptions);
576
625
  },
577
626
  /**
578
- * Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
627
+ * Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
579
628
  *
580
- * @summary Get conversion rate (CR).
581
- * @param getConversationRate - The getConversationRate object.
582
- * @param getConversationRate.index - Index name to target.
583
- * @param getConversationRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
584
- * @param getConversationRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
585
- * @param getConversationRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
629
+ * Required API Key ACLs:
630
+ * - analytics.
631
+ *
632
+ * @param getConversionRate - The getConversionRate object.
633
+ * @param getConversionRate.index - Index name.
634
+ * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
635
+ * @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
636
+ * @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
586
637
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
587
638
  */
588
- getConversationRate({ index, startDate, endDate, tags }, requestOptions) {
639
+ getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
589
640
  if (!index) {
590
- throw new Error('Parameter `index` is required when calling `getConversationRate`.');
641
+ throw new Error('Parameter `index` is required when calling `getConversionRate`.');
591
642
  }
592
643
  const requestPath = '/2/conversions/conversionRate';
593
644
  const headers = {};
@@ -613,14 +664,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
613
664
  return transporter.request(request, requestOptions);
614
665
  },
615
666
  /**
616
- * Returns the rate at which searches don\'t lead to any clicks. The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of searches and searches without clicks.
667
+ * Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
668
+ *
669
+ * Required API Key ACLs:
670
+ * - analytics.
617
671
  *
618
- * @summary Get no click rate.
619
672
  * @param getNoClickRate - The getNoClickRate object.
620
- * @param getNoClickRate.index - Index name to target.
621
- * @param getNoClickRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
622
- * @param getNoClickRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
623
- * @param getNoClickRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
673
+ * @param getNoClickRate.index - Index name.
674
+ * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
675
+ * @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
676
+ * @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
624
677
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
625
678
  */
626
679
  getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -651,14 +704,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
651
704
  return transporter.request(request, requestOptions);
652
705
  },
653
706
  /**
654
- * Returns the rate at which searches didn\'t return any results.
707
+ * Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
708
+ *
709
+ * Required API Key ACLs:
710
+ * - analytics.
655
711
  *
656
- * @summary Get no results rate.
657
712
  * @param getNoResultsRate - The getNoResultsRate object.
658
- * @param getNoResultsRate.index - Index name to target.
659
- * @param getNoResultsRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
660
- * @param getNoResultsRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
661
- * @param getNoResultsRate.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
713
+ * @param getNoResultsRate.index - Index name.
714
+ * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
715
+ * @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
716
+ * @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
662
717
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
663
718
  */
664
719
  getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -689,14 +744,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
689
744
  return transporter.request(request, requestOptions);
690
745
  },
691
746
  /**
692
- * Returns the number of searches within a time range.
747
+ * Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
748
+ *
749
+ * Required API Key ACLs:
750
+ * - analytics.
751
+ *
752
+ * @param getPurchaseRate - The getPurchaseRate object.
753
+ * @param getPurchaseRate.index - Index name.
754
+ * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
755
+ * @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
756
+ * @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
757
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
758
+ */
759
+ getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
760
+ if (!index) {
761
+ throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
762
+ }
763
+ const requestPath = '/2/conversions/purchaseRate';
764
+ const headers = {};
765
+ const queryParameters = {};
766
+ if (index !== undefined) {
767
+ queryParameters.index = index.toString();
768
+ }
769
+ if (startDate !== undefined) {
770
+ queryParameters.startDate = startDate.toString();
771
+ }
772
+ if (endDate !== undefined) {
773
+ queryParameters.endDate = endDate.toString();
774
+ }
775
+ if (tags !== undefined) {
776
+ queryParameters.tags = tags.toString();
777
+ }
778
+ const request = {
779
+ method: 'GET',
780
+ path: requestPath,
781
+ queryParameters,
782
+ headers,
783
+ };
784
+ return transporter.request(request, requestOptions);
785
+ },
786
+ /**
787
+ * Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
788
+ *
789
+ * Required API Key ACLs:
790
+ * - analytics.
791
+ *
792
+ * @param getRevenue - The getRevenue object.
793
+ * @param getRevenue.index - Index name.
794
+ * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
795
+ * @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
796
+ * @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
797
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
798
+ */
799
+ getRevenue({ index, startDate, endDate, tags }, requestOptions) {
800
+ if (!index) {
801
+ throw new Error('Parameter `index` is required when calling `getRevenue`.');
802
+ }
803
+ const requestPath = '/2/conversions/revenue';
804
+ const headers = {};
805
+ const queryParameters = {};
806
+ if (index !== undefined) {
807
+ queryParameters.index = index.toString();
808
+ }
809
+ if (startDate !== undefined) {
810
+ queryParameters.startDate = startDate.toString();
811
+ }
812
+ if (endDate !== undefined) {
813
+ queryParameters.endDate = endDate.toString();
814
+ }
815
+ if (tags !== undefined) {
816
+ queryParameters.tags = tags.toString();
817
+ }
818
+ const request = {
819
+ method: 'GET',
820
+ path: requestPath,
821
+ queryParameters,
822
+ headers,
823
+ };
824
+ return transporter.request(request, requestOptions);
825
+ },
826
+ /**
827
+ * Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
828
+ *
829
+ * Required API Key ACLs:
830
+ * - analytics.
693
831
  *
694
- * @summary Get number of searches.
695
832
  * @param getSearchesCount - The getSearchesCount object.
696
- * @param getSearchesCount.index - Index name to target.
697
- * @param getSearchesCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
698
- * @param getSearchesCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
699
- * @param getSearchesCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
833
+ * @param getSearchesCount.index - Index name.
834
+ * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
835
+ * @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
836
+ * @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
700
837
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
701
838
  */
702
839
  getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
@@ -727,16 +864,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
727
864
  return transporter.request(request, requestOptions);
728
865
  },
729
866
  /**
730
- * Return the most popular of the last 1,000 searches that didn\'t lead to any clicks.
867
+ * Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
868
+ *
869
+ * Required API Key ACLs:
870
+ * - analytics.
731
871
  *
732
- * @summary Get top searches with no clicks.
733
872
  * @param getSearchesNoClicks - The getSearchesNoClicks object.
734
- * @param getSearchesNoClicks.index - Index name to target.
735
- * @param getSearchesNoClicks.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
736
- * @param getSearchesNoClicks.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
737
- * @param getSearchesNoClicks.limit - Number of records to return (page size).
738
- * @param getSearchesNoClicks.offset - Position of the starting record. Used for paging. 0 is the first record.
739
- * @param getSearchesNoClicks.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
873
+ * @param getSearchesNoClicks.index - Index name.
874
+ * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
875
+ * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
876
+ * @param getSearchesNoClicks.limit - Number of items to return.
877
+ * @param getSearchesNoClicks.offset - Position of the first item to return.
878
+ * @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
740
879
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
741
880
  */
742
881
  getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -773,16 +912,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
773
912
  return transporter.request(request, requestOptions);
774
913
  },
775
914
  /**
776
- * Returns the most popular of the latest 1,000 searches that didn\'t return any results.
915
+ * Retrieves the most popular searches that didn\'t return any results.
916
+ *
917
+ * Required API Key ACLs:
918
+ * - analytics.
777
919
  *
778
- * @summary Get top searches with no results.
779
920
  * @param getSearchesNoResults - The getSearchesNoResults object.
780
- * @param getSearchesNoResults.index - Index name to target.
781
- * @param getSearchesNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
782
- * @param getSearchesNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
783
- * @param getSearchesNoResults.limit - Number of records to return (page size).
784
- * @param getSearchesNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
785
- * @param getSearchesNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
921
+ * @param getSearchesNoResults.index - Index name.
922
+ * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
923
+ * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
924
+ * @param getSearchesNoResults.limit - Number of items to return.
925
+ * @param getSearchesNoResults.offset - Position of the first item to return.
926
+ * @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
786
927
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
787
928
  */
788
929
  getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -819,11 +960,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
819
960
  return transporter.request(request, requestOptions);
820
961
  },
821
962
  /**
822
- * Return the latest update time of the Analytics API for an index. If the index has been recently created or no search has been performed yet, `updatedAt` will be `null`. > **Note**: The Analytics API is updated every 5 minutes.
963
+ * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
964
+ *
965
+ * Required API Key ACLs:
966
+ * - analytics.
823
967
  *
824
- * @summary Get Analytics API status.
825
968
  * @param getStatus - The getStatus object.
826
- * @param getStatus.index - Index name to target.
969
+ * @param getStatus.index - Index name.
827
970
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
828
971
  */
829
972
  getStatus({ index }, requestOptions) {
@@ -845,16 +988,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
845
988
  return transporter.request(request, requestOptions);
846
989
  },
847
990
  /**
848
- * Returns top countries. Limited to the 1,000 most frequent ones.
991
+ * Retrieves the countries with the most searches to your index.
992
+ *
993
+ * Required API Key ACLs:
994
+ * - analytics.
849
995
  *
850
- * @summary Get top countries.
851
996
  * @param getTopCountries - The getTopCountries object.
852
- * @param getTopCountries.index - Index name to target.
853
- * @param getTopCountries.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
854
- * @param getTopCountries.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
855
- * @param getTopCountries.limit - Number of records to return (page size).
856
- * @param getTopCountries.offset - Position of the starting record. Used for paging. 0 is the first record.
857
- * @param getTopCountries.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
997
+ * @param getTopCountries.index - Index name.
998
+ * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
999
+ * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1000
+ * @param getTopCountries.limit - Number of items to return.
1001
+ * @param getTopCountries.offset - Position of the first item to return.
1002
+ * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
858
1003
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
859
1004
  */
860
1005
  getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
@@ -891,17 +1036,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
891
1036
  return transporter.request(request, requestOptions);
892
1037
  },
893
1038
  /**
894
- * Return the most popular [filterable attributes](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/) in the 1,000 most recently used filters.
1039
+ * Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
1040
+ *
1041
+ * Required API Key ACLs:
1042
+ * - analytics.
895
1043
  *
896
- * @summary Get top filterable attributes.
897
1044
  * @param getTopFilterAttributes - The getTopFilterAttributes object.
898
- * @param getTopFilterAttributes.index - Index name to target.
899
- * @param getTopFilterAttributes.search - User query.
900
- * @param getTopFilterAttributes.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
901
- * @param getTopFilterAttributes.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
902
- * @param getTopFilterAttributes.limit - Number of records to return (page size).
903
- * @param getTopFilterAttributes.offset - Position of the starting record. Used for paging. 0 is the first record.
904
- * @param getTopFilterAttributes.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1045
+ * @param getTopFilterAttributes.index - Index name.
1046
+ * @param getTopFilterAttributes.search - Search query.
1047
+ * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1048
+ * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1049
+ * @param getTopFilterAttributes.limit - Number of items to return.
1050
+ * @param getTopFilterAttributes.offset - Position of the first item to return.
1051
+ * @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
905
1052
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
906
1053
  */
907
1054
  getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -941,18 +1088,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
941
1088
  return transporter.request(request, requestOptions);
942
1089
  },
943
1090
  /**
944
- * Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
1091
+ * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
1092
+ *
1093
+ * Required API Key ACLs:
1094
+ * - analytics.
945
1095
  *
946
- * @summary Get top filter values for an attribute.
947
1096
  * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
948
1097
  * @param getTopFilterForAttribute.attribute - Attribute name.
949
- * @param getTopFilterForAttribute.index - Index name to target.
950
- * @param getTopFilterForAttribute.search - User query.
951
- * @param getTopFilterForAttribute.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
952
- * @param getTopFilterForAttribute.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
953
- * @param getTopFilterForAttribute.limit - Number of records to return (page size).
954
- * @param getTopFilterForAttribute.offset - Position of the starting record. Used for paging. 0 is the first record.
955
- * @param getTopFilterForAttribute.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1098
+ * @param getTopFilterForAttribute.index - Index name.
1099
+ * @param getTopFilterForAttribute.search - Search query.
1100
+ * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1101
+ * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1102
+ * @param getTopFilterForAttribute.limit - Number of items to return.
1103
+ * @param getTopFilterForAttribute.offset - Position of the first item to return.
1104
+ * @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
956
1105
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
957
1106
  */
958
1107
  getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -995,17 +1144,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
995
1144
  return transporter.request(request, requestOptions);
996
1145
  },
997
1146
  /**
998
- * Returns top filters for filter-enabled searches that don\'t return results. Limited to the 1,000 most recently used filters.
1147
+ * Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
1148
+ *
1149
+ * Required API Key ACLs:
1150
+ * - analytics.
999
1151
  *
1000
- * @summary Get top filters for a no result search.
1001
1152
  * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
1002
- * @param getTopFiltersNoResults.index - Index name to target.
1003
- * @param getTopFiltersNoResults.search - User query.
1004
- * @param getTopFiltersNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1005
- * @param getTopFiltersNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1006
- * @param getTopFiltersNoResults.limit - Number of records to return (page size).
1007
- * @param getTopFiltersNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
1008
- * @param getTopFiltersNoResults.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1153
+ * @param getTopFiltersNoResults.index - Index name.
1154
+ * @param getTopFiltersNoResults.search - Search query.
1155
+ * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1156
+ * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1157
+ * @param getTopFiltersNoResults.limit - Number of items to return.
1158
+ * @param getTopFiltersNoResults.offset - Position of the first item to return.
1159
+ * @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
1009
1160
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1010
1161
  */
1011
1162
  getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -1045,21 +1196,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1045
1196
  return transporter.request(request, requestOptions);
1046
1197
  },
1047
1198
  /**
1048
- * Return the most popular clicked results in the last 1,000 searches.
1199
+ * Retrieves the object IDs of the most frequent search results.
1200
+ *
1201
+ * Required API Key ACLs:
1202
+ * - analytics.
1049
1203
  *
1050
- * @summary Get top hits.
1051
1204
  * @param getTopHits - The getTopHits object.
1052
- * @param getTopHits.index - Index name to target.
1053
- * @param getTopHits.search - User query.
1054
- * @param getTopHits.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
1055
- * @param getTopHits.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1056
- * @param getTopHits.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1057
- * @param getTopHits.limit - Number of records to return (page size).
1058
- * @param getTopHits.offset - Position of the starting record. Used for paging. 0 is the first record.
1059
- * @param getTopHits.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1205
+ * @param getTopHits.index - Index name.
1206
+ * @param getTopHits.search - Search query.
1207
+ * @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
1208
+ * @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
1209
+ * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1210
+ * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1211
+ * @param getTopHits.limit - Number of items to return.
1212
+ * @param getTopHits.offset - Position of the first item to return.
1213
+ * @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
1060
1214
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1061
1215
  */
1062
- getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
1216
+ getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
1063
1217
  if (!index) {
1064
1218
  throw new Error('Parameter `index` is required when calling `getTopHits`.');
1065
1219
  }
@@ -1075,6 +1229,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1075
1229
  if (clickAnalytics !== undefined) {
1076
1230
  queryParameters.clickAnalytics = clickAnalytics.toString();
1077
1231
  }
1232
+ if (revenueAnalytics !== undefined) {
1233
+ queryParameters.revenueAnalytics = revenueAnalytics.toString();
1234
+ }
1078
1235
  if (startDate !== undefined) {
1079
1236
  queryParameters.startDate = startDate.toString();
1080
1237
  }
@@ -1099,22 +1256,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1099
1256
  return transporter.request(request, requestOptions);
1100
1257
  },
1101
1258
  /**
1102
- * Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
1259
+ * Returns the most popular search terms.
1260
+ *
1261
+ * Required API Key ACLs:
1262
+ * - analytics.
1103
1263
  *
1104
- * @summary Get top searches.
1105
1264
  * @param getTopSearches - The getTopSearches object.
1106
- * @param getTopSearches.index - Index name to target.
1107
- * @param getTopSearches.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
1108
- * @param getTopSearches.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1109
- * @param getTopSearches.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1110
- * @param getTopSearches.orderBy - Reorder the results.
1265
+ * @param getTopSearches.index - Index name.
1266
+ * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
1267
+ * @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
1268
+ * @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1269
+ * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1270
+ * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
1111
1271
  * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
1112
- * @param getTopSearches.limit - Number of records to return (page size).
1113
- * @param getTopSearches.offset - Position of the starting record. Used for paging. 0 is the first record.
1114
- * @param getTopSearches.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1272
+ * @param getTopSearches.limit - Number of items to return.
1273
+ * @param getTopSearches.offset - Position of the first item to return.
1274
+ * @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
1115
1275
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1116
1276
  */
1117
- getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
1277
+ getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
1118
1278
  if (!index) {
1119
1279
  throw new Error('Parameter `index` is required when calling `getTopSearches`.');
1120
1280
  }
@@ -1127,6 +1287,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1127
1287
  if (clickAnalytics !== undefined) {
1128
1288
  queryParameters.clickAnalytics = clickAnalytics.toString();
1129
1289
  }
1290
+ if (revenueAnalytics !== undefined) {
1291
+ queryParameters.revenueAnalytics = revenueAnalytics.toString();
1292
+ }
1130
1293
  if (startDate !== undefined) {
1131
1294
  queryParameters.startDate = startDate.toString();
1132
1295
  }
@@ -1157,14 +1320,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1157
1320
  return transporter.request(request, requestOptions);
1158
1321
  },
1159
1322
  /**
1160
- * Return the count of unique users.
1323
+ * Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
1324
+ *
1325
+ * Required API Key ACLs:
1326
+ * - analytics.
1161
1327
  *
1162
- * @summary Get user count.
1163
1328
  * @param getUsersCount - The getUsersCount object.
1164
- * @param getUsersCount.index - Index name to target.
1165
- * @param getUsersCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1166
- * @param getUsersCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1167
- * @param getUsersCount.tags - Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/analyticsTags/) set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it must be URL-encoded.
1329
+ * @param getUsersCount.index - Index name.
1330
+ * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1331
+ * @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1332
+ * @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
1168
1333
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1169
1334
  */
1170
1335
  getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
@@ -1198,9 +1363,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1198
1363
  }
1199
1364
 
1200
1365
  // 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.
1201
- const apiClientVersion$2 = '5.0.0-alpha.99';
1366
+ const apiClientVersion$3 = '5.0.0-beta.10';
1202
1367
  const REGIONS = ['eu', 'us'];
1203
- function getDefaultHosts$1(region) {
1368
+ function getDefaultHosts$2(region) {
1204
1369
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
1205
1370
  return [{ url, accept: 'readWrite', protocol: 'https' }];
1206
1371
  }
@@ -1208,12 +1373,12 @@ function getDefaultHosts$1(region) {
1208
1373
  function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
1209
1374
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
1210
1375
  const transporter = createTransporter({
1211
- hosts: getDefaultHosts$1(regionOption),
1376
+ hosts: getDefaultHosts$2(regionOption),
1212
1377
  ...options,
1213
1378
  algoliaAgent: getAlgoliaAgent({
1214
1379
  algoliaAgents,
1215
1380
  client: 'Personalization',
1216
- version: apiClientVersion$2,
1381
+ version: apiClientVersion$3,
1217
1382
  }),
1218
1383
  baseHeaders: {
1219
1384
  'content-type': 'text/plain',
@@ -1258,7 +1423,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1258
1423
  /**
1259
1424
  * This method allow you to send requests to the Algolia REST API.
1260
1425
  *
1261
- * @summary Send requests to the Algolia REST API.
1262
1426
  * @param customDelete - The customDelete object.
1263
1427
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1264
1428
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -1268,7 +1432,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1268
1432
  if (!path) {
1269
1433
  throw new Error('Parameter `path` is required when calling `customDelete`.');
1270
1434
  }
1271
- const requestPath = '/1{path}'.replace('{path}', path);
1435
+ const requestPath = '/{path}'.replace('{path}', path);
1272
1436
  const headers = {};
1273
1437
  const queryParameters = parameters ? parameters : {};
1274
1438
  const request = {
@@ -1282,7 +1446,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1282
1446
  /**
1283
1447
  * This method allow you to send requests to the Algolia REST API.
1284
1448
  *
1285
- * @summary Send requests to the Algolia REST API.
1286
1449
  * @param customGet - The customGet object.
1287
1450
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1288
1451
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -1292,7 +1455,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1292
1455
  if (!path) {
1293
1456
  throw new Error('Parameter `path` is required when calling `customGet`.');
1294
1457
  }
1295
- const requestPath = '/1{path}'.replace('{path}', path);
1458
+ const requestPath = '/{path}'.replace('{path}', path);
1296
1459
  const headers = {};
1297
1460
  const queryParameters = parameters ? parameters : {};
1298
1461
  const request = {
@@ -1306,7 +1469,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1306
1469
  /**
1307
1470
  * This method allow you to send requests to the Algolia REST API.
1308
1471
  *
1309
- * @summary Send requests to the Algolia REST API.
1310
1472
  * @param customPost - The customPost object.
1311
1473
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1312
1474
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -1317,7 +1479,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1317
1479
  if (!path) {
1318
1480
  throw new Error('Parameter `path` is required when calling `customPost`.');
1319
1481
  }
1320
- const requestPath = '/1{path}'.replace('{path}', path);
1482
+ const requestPath = '/{path}'.replace('{path}', path);
1321
1483
  const headers = {};
1322
1484
  const queryParameters = parameters ? parameters : {};
1323
1485
  const request = {
@@ -1332,7 +1494,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1332
1494
  /**
1333
1495
  * This method allow you to send requests to the Algolia REST API.
1334
1496
  *
1335
- * @summary Send requests to the Algolia REST API.
1336
1497
  * @param customPut - The customPut object.
1337
1498
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
1338
1499
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -1343,7 +1504,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1343
1504
  if (!path) {
1344
1505
  throw new Error('Parameter `path` is required when calling `customPut`.');
1345
1506
  }
1346
- const requestPath = '/1{path}'.replace('{path}', path);
1507
+ const requestPath = '/{path}'.replace('{path}', path);
1347
1508
  const headers = {};
1348
1509
  const queryParameters = parameters ? parameters : {};
1349
1510
  const request = {
@@ -1356,11 +1517,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1356
1517
  return transporter.request(request, requestOptions);
1357
1518
  },
1358
1519
  /**
1359
- * Delete the user profile and all its associated data. Returns, as part of the response, a date until which the data can safely be considered as deleted for the given user. This means if you send events for the given user before this date, they will be ignored. Any data received after the deletedUntil date will start building a new user profile. It might take a couple hours for the deletion request to be fully processed.
1520
+ * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
1521
+ *
1522
+ * Required API Key ACLs:
1523
+ * - recommendation.
1360
1524
  *
1361
- * @summary Delete a user profile.
1362
1525
  * @param deleteUserProfile - The deleteUserProfile object.
1363
- * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1526
+ * @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
1364
1527
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1365
1528
  */
1366
1529
  deleteUserProfile({ userToken }, requestOptions) {
@@ -1379,9 +1542,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1379
1542
  return transporter.request(request, requestOptions);
1380
1543
  },
1381
1544
  /**
1382
- * The strategy contains information on the events and facets that impact user profiles and personalized search results.
1545
+ * Retrieves the current personalization strategy.
1546
+ *
1547
+ * Required API Key ACLs:
1548
+ * - recommendation.
1383
1549
  *
1384
- * @summary Get the current strategy.
1385
1550
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1386
1551
  */
1387
1552
  getPersonalizationStrategy(requestOptions) {
@@ -1397,11 +1562,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1397
1562
  return transporter.request(request, requestOptions);
1398
1563
  },
1399
1564
  /**
1400
- * Get the user profile built from Personalization strategy. The profile is structured by facet name used in the strategy. Each facet value is mapped to its score. Each score represents the user affinity for a specific facet value given the userToken past events and the Personalization strategy defined. Scores are bounded to 20. The last processed event timestamp is provided using the ISO 8601 format for debugging purposes.
1565
+ * Retrieves a user profile and their affinities for different facets.
1566
+ *
1567
+ * Required API Key ACLs:
1568
+ * - recommendation.
1401
1569
  *
1402
- * @summary Get a user profile.
1403
1570
  * @param getUserTokenProfile - The getUserTokenProfile object.
1404
- * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1571
+ * @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
1405
1572
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1406
1573
  */
1407
1574
  getUserTokenProfile({ userToken }, requestOptions) {
@@ -1420,9 +1587,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1420
1587
  return transporter.request(request, requestOptions);
1421
1588
  },
1422
1589
  /**
1423
- * A strategy defines the events and facets that impact user profiles and personalized search results.
1590
+ * Creates a new personalization strategy.
1591
+ *
1592
+ * Required API Key ACLs:
1593
+ * - recommendation.
1424
1594
  *
1425
- * @summary Set a new strategy.
1426
1595
  * @param personalizationStrategyParams - The personalizationStrategyParams object.
1427
1596
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1428
1597
  */
@@ -1455,8 +1624,8 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1455
1624
  }
1456
1625
 
1457
1626
  // 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.
1458
- const apiClientVersion$1 = '5.0.0-alpha.99';
1459
- function getDefaultHosts(appId) {
1627
+ const apiClientVersion$2 = '5.0.0-beta.10';
1628
+ function getDefaultHosts$1(appId) {
1460
1629
  return [
1461
1630
  {
1462
1631
  url: `${appId}-dsn.algolia.net`,
@@ -1490,12 +1659,12 @@ function getDefaultHosts(appId) {
1490
1659
  function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
1491
1660
  const auth = createAuth(appIdOption, apiKeyOption, authMode);
1492
1661
  const transporter = createTransporter({
1493
- hosts: getDefaultHosts(appIdOption),
1662
+ hosts: getDefaultHosts$1(appIdOption),
1494
1663
  ...options,
1495
1664
  algoliaAgent: getAlgoliaAgent({
1496
1665
  algoliaAgents,
1497
1666
  client: 'Search',
1498
- version: apiClientVersion$1,
1667
+ version: apiClientVersion$2,
1499
1668
  }),
1500
1669
  baseHeaders: {
1501
1670
  'content-type': 'text/plain',
@@ -1541,7 +1710,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1541
1710
  * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
1542
1711
  *
1543
1712
  * @summary Helper method that waits for a task to be published (completed).
1544
- * @param waitForTaskOptions - The waitForTaskOptions object.
1713
+ * @param waitForTaskOptions - The `waitForTaskOptions` object.
1545
1714
  * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
1546
1715
  * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
1547
1716
  * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
@@ -1561,11 +1730,34 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1561
1730
  timeout: () => timeout(retryCount),
1562
1731
  });
1563
1732
  },
1733
+ /**
1734
+ * Helper: Wait for an application-level task to complete for a given `taskID`.
1735
+ *
1736
+ * @summary Helper method that waits for a task to be published (completed).
1737
+ * @param waitForAppTaskOptions - The `waitForTaskOptions` object.
1738
+ * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
1739
+ * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
1740
+ * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
1741
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1742
+ */
1743
+ waitForAppTask({ taskID, maxRetries = 50, timeout = (retryCount) => Math.min(retryCount * 200, 5000), }, requestOptions) {
1744
+ let retryCount = 0;
1745
+ return createIterablePromise({
1746
+ func: () => this.getAppTask({ taskID }, requestOptions),
1747
+ validate: (response) => response.status === 'published',
1748
+ aggregator: () => (retryCount += 1),
1749
+ error: {
1750
+ validate: () => retryCount >= maxRetries,
1751
+ message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`,
1752
+ },
1753
+ timeout: () => timeout(retryCount),
1754
+ });
1755
+ },
1564
1756
  /**
1565
1757
  * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
1566
1758
  *
1567
1759
  * @summary Helper method that waits for an API key task to be processed.
1568
- * @param waitForApiKeyOptions - The waitForApiKeyOptions object.
1760
+ * @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
1569
1761
  * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
1570
1762
  * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
1571
1763
  * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
@@ -1618,7 +1810,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1618
1810
  * Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
1619
1811
  *
1620
1812
  * @summary Helper method that iterates on the `browse` method.
1621
- * @param browseObjects - The browseObjects object.
1813
+ * @param browseObjects - The `browseObjects` object.
1622
1814
  * @param browseObjects.indexName - The index in which to perform the request.
1623
1815
  * @param browseObjects.browseParams - The `browse` parameters.
1624
1816
  * @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
@@ -1644,11 +1836,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1644
1836
  * Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
1645
1837
  *
1646
1838
  * @summary Helper method that iterates on the `searchRules` method.
1647
- * @param browseObjects - The browseObjects object.
1648
- * @param browseObjects.indexName - The index in which to perform the request.
1649
- * @param browseObjects.searchRulesParams - The `searchRules` method parameters.
1650
- * @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
1651
- * @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
1839
+ * @param browseRules - The `browseRules` object.
1840
+ * @param browseRules.indexName - The index in which to perform the request.
1841
+ * @param browseRules.searchRulesParams - The `searchRules` method parameters.
1842
+ * @param browseRules.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
1843
+ * @param browseRules.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
1652
1844
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
1653
1845
  */
1654
1846
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
@@ -1676,11 +1868,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1676
1868
  * Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
1677
1869
  *
1678
1870
  * @summary Helper method that iterates on the `searchSynonyms` method.
1679
- * @param browseObjects - The browseObjects object.
1680
- * @param browseObjects.indexName - The index in which to perform the request.
1681
- * @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
1682
- * @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
1683
- * @param browseObjects.searchSynonymsParams - The `searchSynonyms` method parameters.
1871
+ * @param browseSynonyms - The `browseSynonyms` object.
1872
+ * @param browseSynonyms.indexName - The index in which to perform the request.
1873
+ * @param browseSynonyms.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
1874
+ * @param browseSynonyms.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
1875
+ * @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
1684
1876
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
1685
1877
  */
1686
1878
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
@@ -1690,16 +1882,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1690
1882
  hitsPerPage: 1000,
1691
1883
  };
1692
1884
  return createIterablePromise({
1693
- func: (previousResponse) => {
1694
- return this.searchSynonyms({
1885
+ func: (_) => {
1886
+ const resp = this.searchSynonyms({
1695
1887
  indexName,
1696
1888
  searchSynonymsParams: {
1697
1889
  ...params,
1698
- page: previousResponse
1699
- ? previousResponse.page + 1
1700
- : params.page,
1890
+ page: params.page,
1701
1891
  },
1702
1892
  }, requestOptions);
1893
+ params.page += 1;
1894
+ return resp;
1703
1895
  },
1704
1896
  validate: (response) => response.nbHits < params.hitsPerPage,
1705
1897
  ...browseSynonymsOptions,
@@ -1728,9 +1920,137 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1728
1920
  return this.search(searchMethodParams, requestOptions);
1729
1921
  },
1730
1922
  /**
1731
- * Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
1923
+ * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1924
+ *
1925
+ * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1926
+ * @param chunkedBatch - The `chunkedBatch` object.
1927
+ * @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
1928
+ * @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
1929
+ * @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
1930
+ * @param chunkedBatch.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
1931
+ * @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
1932
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1933
+ */
1934
+ async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
1935
+ let requests = [];
1936
+ const responses = [];
1937
+ const objectEntries = objects.entries();
1938
+ for (const [i, obj] of objectEntries) {
1939
+ requests.push({ action, body: obj });
1940
+ if (requests.length === batchSize || i === objects.length - 1) {
1941
+ responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
1942
+ requests = [];
1943
+ }
1944
+ }
1945
+ if (waitForTasks) {
1946
+ for (const resp of responses) {
1947
+ await this.waitForTask({ indexName, taskID: resp.taskID });
1948
+ }
1949
+ }
1950
+ return responses;
1951
+ },
1952
+ /**
1953
+ * Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
1954
+ *
1955
+ * @summary Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
1956
+ * @param saveObjects - The `saveObjects` object.
1957
+ * @param saveObjects.indexName - The `indexName` to save `objects` in.
1958
+ * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
1959
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
1960
+ */
1961
+ async saveObjects({ indexName, objects }, requestOptions) {
1962
+ return await this.chunkedBatch({ indexName, objects, action: 'addObject' }, requestOptions);
1963
+ },
1964
+ /**
1965
+ * Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
1966
+ *
1967
+ * @summary Helper: Deletes every records for the given objectIDs. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objectIDs in it.
1968
+ * @param deleteObjects - The `deleteObjects` object.
1969
+ * @param deleteObjects.indexName - The `indexName` to delete `objectIDs` from.
1970
+ * @param deleteObjects.objectIDs - The objectIDs to delete.
1971
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch` method and merged with the transporter requestOptions.
1972
+ */
1973
+ async deleteObjects({ indexName, objectIDs }, requestOptions) {
1974
+ return await this.chunkedBatch({
1975
+ indexName,
1976
+ objects: objectIDs.map((objectID) => ({ objectID })),
1977
+ action: 'deleteObject',
1978
+ }, requestOptions);
1979
+ },
1980
+ /**
1981
+ * Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
1982
+ *
1983
+ * @summary Helper: Replaces object content of all the given objects according to their respective `objectID` field. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
1984
+ * @param partialUpdateObjects - The `partialUpdateObjects` object.
1985
+ * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.
1986
+ * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.
1987
+ * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail..
1988
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1989
+ */
1990
+ async partialUpdateObjects({ indexName, objects, createIfNotExists }, requestOptions) {
1991
+ return await this.chunkedBatch({
1992
+ indexName,
1993
+ objects,
1994
+ action: createIfNotExists
1995
+ ? 'partialUpdateObject'
1996
+ : 'partialUpdateObjectNoCreate',
1997
+ }, requestOptions);
1998
+ },
1999
+ /**
2000
+ * Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2001
+ * See https://api-clients-automation.netlify.app/docs/contributing/add-new-api-client#5-helpers for implementation details.
2002
+ *
2003
+ * @summary Helper: Replaces all objects (records) in the given `index_name` with the given `objects`. A temporary index is created during this process in order to backup your data.
2004
+ * @param replaceAllObjects - The `replaceAllObjects` object.
2005
+ * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
2006
+ * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
2007
+ * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
2008
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `batch`, `operationIndex` and `getTask` method and merged with the transporter requestOptions.
2009
+ */
2010
+ async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
2011
+ const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;
2012
+ const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
2013
+ let copyOperationResponse = await this.operationIndex({
2014
+ indexName,
2015
+ operationIndexParams: {
2016
+ operation: 'copy',
2017
+ destination: tmpIndexName,
2018
+ scope: ['settings', 'rules', 'synonyms'],
2019
+ },
2020
+ }, requestOptions);
2021
+ const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
2022
+ await this.waitForTask({
2023
+ indexName: tmpIndexName,
2024
+ taskID: copyOperationResponse.taskID,
2025
+ });
2026
+ copyOperationResponse = await this.operationIndex({
2027
+ indexName,
2028
+ operationIndexParams: {
2029
+ operation: 'copy',
2030
+ destination: tmpIndexName,
2031
+ scope: ['settings', 'rules', 'synonyms'],
2032
+ },
2033
+ }, requestOptions);
2034
+ await this.waitForTask({
2035
+ indexName: tmpIndexName,
2036
+ taskID: copyOperationResponse.taskID,
2037
+ });
2038
+ const moveOperationResponse = await this.operationIndex({
2039
+ indexName: tmpIndexName,
2040
+ operationIndexParams: { operation: 'move', destination: indexName },
2041
+ }, requestOptions);
2042
+ await this.waitForTask({
2043
+ indexName: tmpIndexName,
2044
+ taskID: moveOperationResponse.taskID,
2045
+ });
2046
+ return { copyOperationResponse, batchResponses, moveOperationResponse };
2047
+ },
2048
+ /**
2049
+ * Creates a new API key with specific permissions and restrictions.
2050
+ *
2051
+ * Required API Key ACLs:
2052
+ * - admin.
1732
2053
  *
1733
- * @summary Add API key.
1734
2054
  * @param apiKey - The apiKey object.
1735
2055
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1736
2056
  */
@@ -1754,13 +2074,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1754
2074
  return transporter.request(request, requestOptions);
1755
2075
  },
1756
2076
  /**
1757
- * If you use an existing `objectID`, the existing record will be replaced with the new one. To update only some attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
2077
+ * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
2078
+ *
2079
+ * Required API Key ACLs:
2080
+ * - addObject.
1758
2081
  *
1759
- * @summary Add or update a record (using objectID).
1760
2082
  * @param addOrUpdateObject - The addOrUpdateObject object.
1761
- * @param addOrUpdateObject.indexName - Index on which to perform the request.
1762
- * @param addOrUpdateObject.objectID - Unique record (object) identifier.
1763
- * @param addOrUpdateObject.body - Algolia record.
2083
+ * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
2084
+ * @param addOrUpdateObject.objectID - Unique record identifier.
2085
+ * @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
1764
2086
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1765
2087
  */
1766
2088
  addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
@@ -1788,9 +2110,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1788
2110
  return transporter.request(request, requestOptions);
1789
2111
  },
1790
2112
  /**
1791
- * Add a source to the list of allowed sources.
2113
+ * Adds a source to the list of allowed sources.
2114
+ *
2115
+ * Required API Key ACLs:
2116
+ * - admin.
1792
2117
  *
1793
- * @summary Add a source.
1794
2118
  * @param source - Source to add.
1795
2119
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1796
2120
  */
@@ -1814,11 +2138,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1814
2138
  return transporter.request(request, requestOptions);
1815
2139
  },
1816
2140
  /**
1817
- * Assign or move a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
2141
+ * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
2142
+ *
2143
+ * Required API Key ACLs:
2144
+ * - admin.
1818
2145
  *
1819
- * @summary Assign or move a user ID.
1820
2146
  * @param assignUserId - The assignUserId object.
1821
- * @param assignUserId.xAlgoliaUserID - UserID to assign.
2147
+ * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
1822
2148
  * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
1823
2149
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1824
2150
  */
@@ -1848,11 +2174,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1848
2174
  return transporter.request(request, requestOptions);
1849
2175
  },
1850
2176
  /**
1851
- * To reduce the time spent on network round trips, you can perform several write actions in a single API call. Actions are applied in the order they are specified. The supported `action`s are equivalent to the individual operations of the same name.
2177
+ * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
1852
2178
  *
1853
- * @summary Batch write operations on one index.
1854
2179
  * @param batch - The batch object.
1855
- * @param batch.indexName - Index on which to perform the request.
2180
+ * @param batch.indexName - Name of the index on which to perform the operation.
1856
2181
  * @param batch.batchWriteParams - The batchWriteParams object.
1857
2182
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1858
2183
  */
@@ -1879,11 +2204,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1879
2204
  return transporter.request(request, requestOptions);
1880
2205
  },
1881
2206
  /**
1882
- * Assign multiple user IDs to a cluster. **You can\'t _move_ users with this operation.**.
2207
+ * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
2208
+ *
2209
+ * Required API Key ACLs:
2210
+ * - admin.
1883
2211
  *
1884
- * @summary Batch assign userIDs.
1885
2212
  * @param batchAssignUserIds - The batchAssignUserIds object.
1886
- * @param batchAssignUserIds.xAlgoliaUserID - UserID to assign.
2213
+ * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
1887
2214
  * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
1888
2215
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1889
2216
  */
@@ -1916,11 +2243,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1916
2243
  return transporter.request(request, requestOptions);
1917
2244
  },
1918
2245
  /**
1919
- * Add or remove a batch of dictionary entries.
2246
+ * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
2247
+ *
2248
+ * Required API Key ACLs:
2249
+ * - editSettings.
1920
2250
  *
1921
- * @summary Batch dictionary entries.
1922
2251
  * @param batchDictionaryEntries - The batchDictionaryEntries object.
1923
- * @param batchDictionaryEntries.dictionaryName - Dictionary to search in.
2252
+ * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
1924
2253
  * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
1925
2254
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1926
2255
  */
@@ -1947,11 +2276,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1947
2276
  return transporter.request(request, requestOptions);
1948
2277
  },
1949
2278
  /**
1950
- * Retrieve up to 1,000 records per call. Supports full-text search and filters. For better performance, it doesn\'t support: - The `distinct` query parameter - Sorting by typos, proximity, words, or geographical distance.
2279
+ * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
2280
+ *
2281
+ * Required API Key ACLs:
2282
+ * - browse.
1951
2283
  *
1952
- * @summary Get all records from an index.
1953
2284
  * @param browse - The browse object.
1954
- * @param browse.indexName - Index on which to perform the request.
2285
+ * @param browse.indexName - Name of the index on which to perform the operation.
1955
2286
  * @param browse.browseParams - The browseParams object.
1956
2287
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1957
2288
  */
@@ -1972,11 +2303,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1972
2303
  return transporter.request(request, requestOptions);
1973
2304
  },
1974
2305
  /**
1975
- * Delete the records but leave settings and index-specific API keys untouched.
2306
+ * Deletes only the records from an index while keeping settings, synonyms, and rules.
2307
+ *
2308
+ * Required API Key ACLs:
2309
+ * - deleteIndex.
1976
2310
  *
1977
- * @summary Delete all records from an index.
1978
2311
  * @param clearObjects - The clearObjects object.
1979
- * @param clearObjects.indexName - Index on which to perform the request.
2312
+ * @param clearObjects.indexName - Name of the index on which to perform the operation.
1980
2313
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1981
2314
  */
1982
2315
  clearObjects({ indexName }, requestOptions) {
@@ -1995,12 +2328,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1995
2328
  return transporter.request(request, requestOptions);
1996
2329
  },
1997
2330
  /**
1998
- * Delete all rules in the index.
2331
+ * Deletes all rules from the index.
2332
+ *
2333
+ * Required API Key ACLs:
2334
+ * - editSettings.
1999
2335
  *
2000
- * @summary Delete all rules.
2001
2336
  * @param clearRules - The clearRules object.
2002
- * @param clearRules.indexName - Index on which to perform the request.
2003
- * @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2337
+ * @param clearRules.indexName - Name of the index on which to perform the operation.
2338
+ * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
2004
2339
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2005
2340
  */
2006
2341
  clearRules({ indexName, forwardToReplicas }, requestOptions) {
@@ -2022,12 +2357,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2022
2357
  return transporter.request(request, requestOptions);
2023
2358
  },
2024
2359
  /**
2025
- * Delete all synonyms in the index.
2360
+ * Deletes all synonyms from the index.
2361
+ *
2362
+ * Required API Key ACLs:
2363
+ * - editSettings.
2026
2364
  *
2027
- * @summary Delete all synonyms.
2028
2365
  * @param clearSynonyms - The clearSynonyms object.
2029
- * @param clearSynonyms.indexName - Index on which to perform the request.
2030
- * @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2366
+ * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
2367
+ * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
2031
2368
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2032
2369
  */
2033
2370
  clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
@@ -2051,7 +2388,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2051
2388
  /**
2052
2389
  * This method allow you to send requests to the Algolia REST API.
2053
2390
  *
2054
- * @summary Send requests to the Algolia REST API.
2055
2391
  * @param customDelete - The customDelete object.
2056
2392
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
2057
2393
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -2061,7 +2397,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2061
2397
  if (!path) {
2062
2398
  throw new Error('Parameter `path` is required when calling `customDelete`.');
2063
2399
  }
2064
- const requestPath = '/1{path}'.replace('{path}', path);
2400
+ const requestPath = '/{path}'.replace('{path}', path);
2065
2401
  const headers = {};
2066
2402
  const queryParameters = parameters ? parameters : {};
2067
2403
  const request = {
@@ -2075,7 +2411,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2075
2411
  /**
2076
2412
  * This method allow you to send requests to the Algolia REST API.
2077
2413
  *
2078
- * @summary Send requests to the Algolia REST API.
2079
2414
  * @param customGet - The customGet object.
2080
2415
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
2081
2416
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -2085,7 +2420,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2085
2420
  if (!path) {
2086
2421
  throw new Error('Parameter `path` is required when calling `customGet`.');
2087
2422
  }
2088
- const requestPath = '/1{path}'.replace('{path}', path);
2423
+ const requestPath = '/{path}'.replace('{path}', path);
2089
2424
  const headers = {};
2090
2425
  const queryParameters = parameters ? parameters : {};
2091
2426
  const request = {
@@ -2099,7 +2434,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2099
2434
  /**
2100
2435
  * This method allow you to send requests to the Algolia REST API.
2101
2436
  *
2102
- * @summary Send requests to the Algolia REST API.
2103
2437
  * @param customPost - The customPost object.
2104
2438
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
2105
2439
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -2110,7 +2444,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2110
2444
  if (!path) {
2111
2445
  throw new Error('Parameter `path` is required when calling `customPost`.');
2112
2446
  }
2113
- const requestPath = '/1{path}'.replace('{path}', path);
2447
+ const requestPath = '/{path}'.replace('{path}', path);
2114
2448
  const headers = {};
2115
2449
  const queryParameters = parameters ? parameters : {};
2116
2450
  const request = {
@@ -2125,7 +2459,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2125
2459
  /**
2126
2460
  * This method allow you to send requests to the Algolia REST API.
2127
2461
  *
2128
- * @summary Send requests to the Algolia REST API.
2129
2462
  * @param customPut - The customPut object.
2130
2463
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
2131
2464
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -2136,7 +2469,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2136
2469
  if (!path) {
2137
2470
  throw new Error('Parameter `path` is required when calling `customPut`.');
2138
2471
  }
2139
- const requestPath = '/1{path}'.replace('{path}', path);
2472
+ const requestPath = '/{path}'.replace('{path}', path);
2140
2473
  const headers = {};
2141
2474
  const queryParameters = parameters ? parameters : {};
2142
2475
  const request = {
@@ -2149,9 +2482,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2149
2482
  return transporter.request(request, requestOptions);
2150
2483
  },
2151
2484
  /**
2152
- * Delete an existing API key. The request must be authenticated with the admin API key.
2485
+ * Deletes the API key.
2486
+ *
2487
+ * Required API Key ACLs:
2488
+ * - admin.
2153
2489
  *
2154
- * @summary Delete API key.
2155
2490
  * @param deleteApiKey - The deleteApiKey object.
2156
2491
  * @param deleteApiKey.key - API key.
2157
2492
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2172,11 +2507,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2172
2507
  return transporter.request(request, requestOptions);
2173
2508
  },
2174
2509
  /**
2175
- * This operation doesn\'t support all the query options, only its filters (numeric, facet, or tag) and geo queries. It doesn\'t accept empty filters or queries.
2510
+ * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](tag/Records/operation/batch).
2511
+ *
2512
+ * Required API Key ACLs:
2513
+ * - deleteIndex.
2176
2514
  *
2177
- * @summary Delete all records matching a query.
2178
2515
  * @param deleteBy - The deleteBy object.
2179
- * @param deleteBy.indexName - Index on which to perform the request.
2516
+ * @param deleteBy.indexName - Name of the index on which to perform the operation.
2180
2517
  * @param deleteBy.deleteByParams - The deleteByParams object.
2181
2518
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2182
2519
  */
@@ -2200,11 +2537,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2200
2537
  return transporter.request(request, requestOptions);
2201
2538
  },
2202
2539
  /**
2203
- * Delete an existing index.
2540
+ * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
2541
+ *
2542
+ * Required API Key ACLs:
2543
+ * - deleteIndex.
2204
2544
  *
2205
- * @summary Delete index.
2206
2545
  * @param deleteIndex - The deleteIndex object.
2207
- * @param deleteIndex.indexName - Index on which to perform the request.
2546
+ * @param deleteIndex.indexName - Name of the index on which to perform the operation.
2208
2547
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2209
2548
  */
2210
2549
  deleteIndex({ indexName }, requestOptions) {
@@ -2223,12 +2562,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2223
2562
  return transporter.request(request, requestOptions);
2224
2563
  },
2225
2564
  /**
2226
- * To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead.
2565
+ * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
2566
+ *
2567
+ * Required API Key ACLs:
2568
+ * - deleteObject.
2227
2569
  *
2228
- * @summary Delete a record.
2229
2570
  * @param deleteObject - The deleteObject object.
2230
- * @param deleteObject.indexName - Index on which to perform the request.
2231
- * @param deleteObject.objectID - Unique record (object) identifier.
2571
+ * @param deleteObject.indexName - Name of the index on which to perform the operation.
2572
+ * @param deleteObject.objectID - Unique record identifier.
2232
2573
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2233
2574
  */
2234
2575
  deleteObject({ indexName, objectID }, requestOptions) {
@@ -2252,13 +2593,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2252
2593
  return transporter.request(request, requestOptions);
2253
2594
  },
2254
2595
  /**
2255
- * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2596
+ * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2597
+ *
2598
+ * Required API Key ACLs:
2599
+ * - editSettings.
2256
2600
  *
2257
- * @summary Delete a rule.
2258
2601
  * @param deleteRule - The deleteRule object.
2259
- * @param deleteRule.indexName - Index on which to perform the request.
2602
+ * @param deleteRule.indexName - Name of the index on which to perform the operation.
2260
2603
  * @param deleteRule.objectID - Unique identifier of a rule object.
2261
- * @param deleteRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2604
+ * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
2262
2605
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2263
2606
  */
2264
2607
  deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
@@ -2285,9 +2628,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2285
2628
  return transporter.request(request, requestOptions);
2286
2629
  },
2287
2630
  /**
2288
- * Remove a source from the list of allowed sources.
2631
+ * Deletes a source from the list of allowed sources.
2632
+ *
2633
+ * Required API Key ACLs:
2634
+ * - admin.
2289
2635
  *
2290
- * @summary Remove a source.
2291
2636
  * @param deleteSource - The deleteSource object.
2292
2637
  * @param deleteSource.source - IP address range of the source.
2293
2638
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2308,13 +2653,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2308
2653
  return transporter.request(request, requestOptions);
2309
2654
  },
2310
2655
  /**
2311
- * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2656
+ * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2657
+ *
2658
+ * Required API Key ACLs:
2659
+ * - editSettings.
2312
2660
  *
2313
- * @summary Delete a synonym.
2314
2661
  * @param deleteSynonym - The deleteSynonym object.
2315
- * @param deleteSynonym.indexName - Index on which to perform the request.
2662
+ * @param deleteSynonym.indexName - Name of the index on which to perform the operation.
2316
2663
  * @param deleteSynonym.objectID - Unique identifier of a synonym object.
2317
- * @param deleteSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2664
+ * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
2318
2665
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2319
2666
  */
2320
2667
  deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
@@ -2341,9 +2688,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2341
2688
  return transporter.request(request, requestOptions);
2342
2689
  },
2343
2690
  /**
2344
- * Get the permissions and restrictions of a specific API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
2691
+ * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key.
2345
2692
  *
2346
- * @summary Get API key permissions.
2347
2693
  * @param getApiKey - The getApiKey object.
2348
2694
  * @param getApiKey.key - API key.
2349
2695
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2364,9 +2710,36 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2364
2710
  return transporter.request(request, requestOptions);
2365
2711
  },
2366
2712
  /**
2367
- * Lists Algolia\'s [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and any customizations applied to each language\'s [stop word](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plural](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), and [segmentation (compound)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) features.
2713
+ * Checks the status of a given application task.
2714
+ *
2715
+ * Required API Key ACLs:
2716
+ * - editSettings.
2717
+ *
2718
+ * @param getAppTask - The getAppTask object.
2719
+ * @param getAppTask.taskID - Unique task identifier.
2720
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2721
+ */
2722
+ getAppTask({ taskID }, requestOptions) {
2723
+ if (!taskID) {
2724
+ throw new Error('Parameter `taskID` is required when calling `getAppTask`.');
2725
+ }
2726
+ const requestPath = '/1/task/{taskID}'.replace('{taskID}', encodeURIComponent(taskID));
2727
+ const headers = {};
2728
+ const queryParameters = {};
2729
+ const request = {
2730
+ method: 'GET',
2731
+ path: requestPath,
2732
+ queryParameters,
2733
+ headers,
2734
+ };
2735
+ return transporter.request(request, requestOptions);
2736
+ },
2737
+ /**
2738
+ * Lists supported languages with their supported dictionary types and number of custom entries.
2739
+ *
2740
+ * Required API Key ACLs:
2741
+ * - settings.
2368
2742
  *
2369
- * @summary List available languages.
2370
2743
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2371
2744
  */
2372
2745
  getDictionaryLanguages(requestOptions) {
@@ -2382,9 +2755,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2382
2755
  return transporter.request(request, requestOptions);
2383
2756
  },
2384
2757
  /**
2385
- * Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings).
2758
+ * Retrieves the languages for which standard dictionary entries are turned off.
2759
+ *
2760
+ * Required API Key ACLs:
2761
+ * - settings.
2386
2762
  *
2387
- * @summary Get stop word settings.
2388
2763
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2389
2764
  */
2390
2765
  getDictionarySettings(requestOptions) {
@@ -2400,14 +2775,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2400
2775
  return transporter.request(request, requestOptions);
2401
2776
  },
2402
2777
  /**
2403
- * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). Logs are held for the last seven days. There\'s also a logging limit of 1,000 API calls per server. This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself. > **Note**: To fetch the logs for a Distributed Search Network (DSN) cluster, target the [DSN\'s endpoint](https://www.algolia.com/doc/guides/scaling/distributed-search-network-dsn/#accessing-dsn-servers).
2778
+ * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
2779
+ *
2780
+ * Required API Key ACLs:
2781
+ * - logs.
2404
2782
  *
2405
- * @summary Return the latest log entries.
2406
2783
  * @param getLogs - The getLogs object.
2407
- * @param getLogs.offset - First log entry to retrieve. Sorted by decreasing date with 0 being the most recent.
2784
+ * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
2408
2785
  * @param getLogs.length - Maximum number of entries to retrieve.
2409
- * @param getLogs.indexName - Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
2410
- * @param getLogs.type - Type of log entries to retrieve. When omitted, all log entries are retrieved.
2786
+ * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
2787
+ * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
2411
2788
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2412
2789
  */
2413
2790
  getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
@@ -2435,13 +2812,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2435
2812
  return transporter.request(request, requestOptions);
2436
2813
  },
2437
2814
  /**
2438
- * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
2815
+ * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
2816
+ *
2817
+ * Required API Key ACLs:
2818
+ * - search.
2439
2819
  *
2440
- * @summary Get a record.
2441
2820
  * @param getObject - The getObject object.
2442
- * @param getObject.indexName - Index on which to perform the request.
2443
- * @param getObject.objectID - Unique record (object) identifier.
2444
- * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won\'t be retrieved unless the request is authenticated with the admin API key.
2821
+ * @param getObject.indexName - Name of the index on which to perform the operation.
2822
+ * @param getObject.objectID - Unique record identifier.
2823
+ * @param getObject.attributesToRetrieve - Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
2445
2824
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2446
2825
  */
2447
2826
  getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
@@ -2468,9 +2847,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2468
2847
  return transporter.request(request, requestOptions);
2469
2848
  },
2470
2849
  /**
2471
- * Retrieve one or more records, potentially from different indices, in a single API operation. Results will be received in the same order as the requests.
2850
+ * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
2851
+ *
2852
+ * Required API Key ACLs:
2853
+ * - search.
2472
2854
  *
2473
- * @summary Get multiple records.
2474
2855
  * @param getObjectsParams - Request object.
2475
2856
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2476
2857
  */
@@ -2496,11 +2877,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2496
2877
  return transporter.request(request, requestOptions);
2497
2878
  },
2498
2879
  /**
2499
- * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2880
+ * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2881
+ *
2882
+ * Required API Key ACLs:
2883
+ * - settings.
2500
2884
  *
2501
- * @summary Get a rule.
2502
2885
  * @param getRule - The getRule object.
2503
- * @param getRule.indexName - Index on which to perform the request.
2886
+ * @param getRule.indexName - Name of the index on which to perform the operation.
2504
2887
  * @param getRule.objectID - Unique identifier of a rule object.
2505
2888
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2506
2889
  */
@@ -2525,11 +2908,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2525
2908
  return transporter.request(request, requestOptions);
2526
2909
  },
2527
2910
  /**
2528
- * Return an object containing an index\'s [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/).
2911
+ * Retrieves an object with non-null index settings.
2912
+ *
2913
+ * Required API Key ACLs:
2914
+ * - search.
2529
2915
  *
2530
- * @summary Get index settings.
2531
2916
  * @param getSettings - The getSettings object.
2532
- * @param getSettings.indexName - Index on which to perform the request.
2917
+ * @param getSettings.indexName - Name of the index on which to perform the operation.
2533
2918
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2534
2919
  */
2535
2920
  getSettings({ indexName }, requestOptions) {
@@ -2548,9 +2933,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2548
2933
  return transporter.request(request, requestOptions);
2549
2934
  },
2550
2935
  /**
2551
- * Get all allowed sources (IP addresses).
2936
+ * Retrieves all allowed IP addresses with access to your application.
2937
+ *
2938
+ * Required API Key ACLs:
2939
+ * - admin.
2552
2940
  *
2553
- * @summary Get all allowed IP addresses.
2554
2941
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2555
2942
  */
2556
2943
  getSources(requestOptions) {
@@ -2566,11 +2953,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2566
2953
  return transporter.request(request, requestOptions);
2567
2954
  },
2568
2955
  /**
2569
- * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2956
+ * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2957
+ *
2958
+ * Required API Key ACLs:
2959
+ * - settings.
2570
2960
  *
2571
- * @summary Get a synonym object.
2572
2961
  * @param getSynonym - The getSynonym object.
2573
- * @param getSynonym.indexName - Index on which to perform the request.
2962
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2574
2963
  * @param getSynonym.objectID - Unique identifier of a synonym object.
2575
2964
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2576
2965
  */
@@ -2595,11 +2984,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2595
2984
  return transporter.request(request, requestOptions);
2596
2985
  },
2597
2986
  /**
2598
- * Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task.
2987
+ * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
2988
+ *
2989
+ * Required API Key ACLs:
2990
+ * - addObject.
2599
2991
  *
2600
- * @summary Check a task\'s status.
2601
2992
  * @param getTask - The getTask object.
2602
- * @param getTask.indexName - Index on which to perform the request.
2993
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2603
2994
  * @param getTask.taskID - Unique task identifier.
2604
2995
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2605
2996
  */
@@ -2624,9 +3015,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2624
3015
  return transporter.request(request, requestOptions);
2625
3016
  },
2626
3017
  /**
2627
- * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time.
3018
+ * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3019
+ *
3020
+ * Required API Key ACLs:
3021
+ * - admin.
2628
3022
  *
2629
- * @summary Get top userID.
2630
3023
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2631
3024
  */
2632
3025
  getTopUserIds(requestOptions) {
@@ -2642,11 +3035,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2642
3035
  return transporter.request(request, requestOptions);
2643
3036
  },
2644
3037
  /**
2645
- * Returns the userID data stored in the mapping. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time.
3038
+ * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3039
+ *
3040
+ * Required API Key ACLs:
3041
+ * - admin.
2646
3042
  *
2647
- * @summary Get userID.
2648
3043
  * @param getUserId - The getUserId object.
2649
- * @param getUserId.userID - UserID to assign.
3044
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
2650
3045
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2651
3046
  */
2652
3047
  getUserId({ userID }, requestOptions) {
@@ -2667,9 +3062,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2667
3062
  /**
2668
3063
  * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
2669
3064
  *
2670
- * @summary Get migration and user mapping status.
3065
+ * Required API Key ACLs:
3066
+ * - admin.
3067
+ *
2671
3068
  * @param hasPendingMappings - The hasPendingMappings object.
2672
- * @param hasPendingMappings.getClusters - Indicates whether to include the cluster\'s pending mapping state in the response.
3069
+ * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
2673
3070
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2674
3071
  */
2675
3072
  hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
@@ -2688,9 +3085,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2688
3085
  return transporter.request(request, requestOptions);
2689
3086
  },
2690
3087
  /**
2691
- * List all API keys associated with your Algolia application, including their permissions and restrictions.
3088
+ * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
3089
+ *
3090
+ * Required API Key ACLs:
3091
+ * - admin.
2692
3092
  *
2693
- * @summary List API keys.
2694
3093
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2695
3094
  */
2696
3095
  listApiKeys(requestOptions) {
@@ -2706,9 +3105,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2706
3105
  return transporter.request(request, requestOptions);
2707
3106
  },
2708
3107
  /**
2709
- * List the available clusters in a multi-cluster setup.
3108
+ * Lists the available clusters in a multi-cluster setup.
3109
+ *
3110
+ * Required API Key ACLs:
3111
+ * - admin.
2710
3112
  *
2711
- * @summary List clusters.
2712
3113
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2713
3114
  */
2714
3115
  listClusters(requestOptions) {
@@ -2724,12 +3125,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2724
3125
  return transporter.request(request, requestOptions);
2725
3126
  },
2726
3127
  /**
2727
- * List indices in an Algolia application.
3128
+ * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
3129
+ *
3130
+ * Required API Key ACLs:
3131
+ * - listIndexes.
2728
3132
  *
2729
- * @summary List indices.
2730
3133
  * @param listIndices - The listIndices object.
2731
- * @param listIndices.page - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
2732
- * @param listIndices.hitsPerPage - Maximum number of hits per page.
3134
+ * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
3135
+ * @param listIndices.hitsPerPage - Number of hits per page.
2733
3136
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2734
3137
  */
2735
3138
  listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
@@ -2751,12 +3154,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2751
3154
  return transporter.request(request, requestOptions);
2752
3155
  },
2753
3156
  /**
2754
- * List the userIDs assigned to a multi-cluster application. Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time.
3157
+ * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3158
+ *
3159
+ * Required API Key ACLs:
3160
+ * - admin.
2755
3161
  *
2756
- * @summary List userIDs.
2757
3162
  * @param listUserIds - The listUserIds object.
2758
- * @param listUserIds.page - Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
2759
- * @param listUserIds.hitsPerPage - Maximum number of hits per page.
3163
+ * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
3164
+ * @param listUserIds.hitsPerPage - Number of hits per page.
2760
3165
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2761
3166
  */
2762
3167
  listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
@@ -2778,9 +3183,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2778
3183
  return transporter.request(request, requestOptions);
2779
3184
  },
2780
3185
  /**
2781
- * To reduce the time spent on network round trips, you can perform several write actions in a single request. It\'s a multi-index version of the [`batch` operation](#tag/Records/operation/batch). Actions are applied in the order they are specified. The supported actions are equivalent to the individual operations of the same name.
3186
+ * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
2782
3187
  *
2783
- * @summary Batch write operations on multiple indices.
2784
3188
  * @param batchParams - The batchParams object.
2785
3189
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2786
3190
  */
@@ -2804,11 +3208,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2804
3208
  return transporter.request(request, requestOptions);
2805
3209
  },
2806
3210
  /**
2807
- * This `operation`, _copy_ or _move_, will copy or move a source index\'s (`IndexName`) records, settings, synonyms, and rules to a `destination` index. If the destination index exists, it will be replaced, except for index-specific API keys and analytics data. If the destination index doesn\'t exist, it will be created. The choice between moving or copying an index depends on your needs. Choose: - **Move** to rename an index. - **Copy** to create a new index with the same records and configuration as an existing one. > **Note**: When considering copying or moving, be aware of the [rate limitations](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits) on these processes and the [impact on your analytics data](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/concepts/indices-analytics/).
3211
+ * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
3212
+ *
3213
+ * Required API Key ACLs:
3214
+ * - addObject.
2808
3215
  *
2809
- * @summary Copy, move, or rename an index.
2810
3216
  * @param operationIndex - The operationIndex object.
2811
- * @param operationIndex.indexName - Index on which to perform the request.
3217
+ * @param operationIndex.indexName - Name of the index on which to perform the operation.
2812
3218
  * @param operationIndex.operationIndexParams - The operationIndexParams object.
2813
3219
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2814
3220
  */
@@ -2838,14 +3244,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2838
3244
  return transporter.request(request, requestOptions);
2839
3245
  },
2840
3246
  /**
2841
- * Add new attributes or update current ones in an existing record. You can use any first-level attribute but not nested attributes. If you specify a [nested attribute](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/creating-and-using-nested-attributes/), the engine treats it as a replacement for its first-level ancestor.
3247
+ * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor.
3248
+ *
3249
+ * Required API Key ACLs:
3250
+ * - addObject.
2842
3251
  *
2843
- * @summary Update record attributes.
2844
3252
  * @param partialUpdateObject - The partialUpdateObject object.
2845
- * @param partialUpdateObject.indexName - Index on which to perform the request.
2846
- * @param partialUpdateObject.objectID - Unique record (object) identifier.
2847
- * @param partialUpdateObject.attributesToUpdate - Object with attributes to update.
2848
- * @param partialUpdateObject.createIfNotExists - Indicates whether to create a new record if it doesn\'t exist yet.
3253
+ * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
3254
+ * @param partialUpdateObject.objectID - Unique record identifier.
3255
+ * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
3256
+ * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
2849
3257
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2850
3258
  */
2851
3259
  partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
@@ -2876,11 +3284,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2876
3284
  return transporter.request(request, requestOptions);
2877
3285
  },
2878
3286
  /**
2879
- * Remove a userID and its associated data from the multi-clusters.
3287
+ * Deletes a user ID and its associated data from the clusters.
3288
+ *
3289
+ * Required API Key ACLs:
3290
+ * - admin.
2880
3291
  *
2881
- * @summary Remove userID.
2882
3292
  * @param removeUserId - The removeUserId object.
2883
- * @param removeUserId.userID - UserID to assign.
3293
+ * @param removeUserId.userID - Unique identifier of the user who makes the search request.
2884
3294
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2885
3295
  */
2886
3296
  removeUserId({ userID }, requestOptions) {
@@ -2899,9 +3309,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2899
3309
  return transporter.request(request, requestOptions);
2900
3310
  },
2901
3311
  /**
2902
- * Replace all allowed sources.
3312
+ * Replaces the list of allowed sources.
3313
+ *
3314
+ * Required API Key ACLs:
3315
+ * - admin.
2903
3316
  *
2904
- * @summary Replace all sources.
2905
3317
  * @param replaceSources - The replaceSources object.
2906
3318
  * @param replaceSources.source - Allowed sources.
2907
3319
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2923,9 +3335,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2923
3335
  return transporter.request(request, requestOptions);
2924
3336
  },
2925
3337
  /**
2926
- * Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key.
3338
+ * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
3339
+ *
3340
+ * Required API Key ACLs:
3341
+ * - admin.
2927
3342
  *
2928
- * @summary Restore API key.
2929
3343
  * @param restoreApiKey - The restoreApiKey object.
2930
3344
  * @param restoreApiKey.key - API key.
2931
3345
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2946,12 +3360,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2946
3360
  return transporter.request(request, requestOptions);
2947
3361
  },
2948
3362
  /**
2949
- * Add a record (object) to an index or replace it. If the record doesn\'t contain an `objectID`, Algolia automatically adds it. If you use an existing `objectID`, the existing record is replaced with the new one. To add multiple records to your index in a single API request, use the [`batch` operation](#tag/Records/operation/batch).
3363
+ * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partial). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
3364
+ *
3365
+ * Required API Key ACLs:
3366
+ * - addObject.
2950
3367
  *
2951
- * @summary Add or update a record.
2952
3368
  * @param saveObject - The saveObject object.
2953
- * @param saveObject.indexName - Index on which to perform the request.
2954
- * @param saveObject.body - The Algolia record.
3369
+ * @param saveObject.indexName - Name of the index on which to perform the operation.
3370
+ * @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
2955
3371
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2956
3372
  */
2957
3373
  saveObject({ indexName, body }, requestOptions) {
@@ -2974,14 +3390,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2974
3390
  return transporter.request(request, requestOptions);
2975
3391
  },
2976
3392
  /**
2977
- * To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
3393
+ * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
3394
+ *
3395
+ * Required API Key ACLs:
3396
+ * - editSettings.
2978
3397
  *
2979
- * @summary Create or update a rule.
2980
3398
  * @param saveRule - The saveRule object.
2981
- * @param saveRule.indexName - Index on which to perform the request.
3399
+ * @param saveRule.indexName - Name of the index on which to perform the operation.
2982
3400
  * @param saveRule.objectID - Unique identifier of a rule object.
2983
3401
  * @param saveRule.rule - The rule object.
2984
- * @param saveRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3402
+ * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
2985
3403
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2986
3404
  */
2987
3405
  saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
@@ -3015,14 +3433,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3015
3433
  return transporter.request(request, requestOptions);
3016
3434
  },
3017
3435
  /**
3018
- * Create or update multiple rules.
3436
+ * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
3437
+ *
3438
+ * Required API Key ACLs:
3439
+ * - editSettings.
3019
3440
  *
3020
- * @summary Save a batch of rules.
3021
3441
  * @param saveRules - The saveRules object.
3022
- * @param saveRules.indexName - Index on which to perform the request.
3442
+ * @param saveRules.indexName - Name of the index on which to perform the operation.
3023
3443
  * @param saveRules.rules - The rules object.
3024
- * @param saveRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3025
- * @param saveRules.clearExistingRules - Indicates whether existing rules should be deleted before adding this batch.
3444
+ * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
3445
+ * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
3026
3446
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3027
3447
  */
3028
3448
  saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
@@ -3051,14 +3471,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3051
3471
  return transporter.request(request, requestOptions);
3052
3472
  },
3053
3473
  /**
3054
- * Add a [synonym](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/#the-different-types-of-synonyms) to an index or replace it. If the synonym `objectID` doesn\'t exist, Algolia adds a new one. If you use an existing synonym `objectID`, the existing synonym is replaced with the new one. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
3474
+ * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
3475
+ *
3476
+ * Required API Key ACLs:
3477
+ * - editSettings.
3055
3478
  *
3056
- * @summary Save a synonym.
3057
3479
  * @param saveSynonym - The saveSynonym object.
3058
- * @param saveSynonym.indexName - Index on which to perform the request.
3480
+ * @param saveSynonym.indexName - Name of the index on which to perform the operation.
3059
3481
  * @param saveSynonym.objectID - Unique identifier of a synonym object.
3060
3482
  * @param saveSynonym.synonymHit - The synonymHit object.
3061
- * @param saveSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3483
+ * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
3062
3484
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3063
3485
  */
3064
3486
  saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
@@ -3095,14 +3517,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3095
3517
  return transporter.request(request, requestOptions);
3096
3518
  },
3097
3519
  /**
3098
- * Create or update multiple synonyms.
3520
+ * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
3521
+ *
3522
+ * Required API Key ACLs:
3523
+ * - editSettings.
3099
3524
  *
3100
- * @summary Save a batch of synonyms.
3101
3525
  * @param saveSynonyms - The saveSynonyms object.
3102
- * @param saveSynonyms.indexName - Index on which to perform the request.
3526
+ * @param saveSynonyms.indexName - Name of the index on which to perform the operation.
3103
3527
  * @param saveSynonyms.synonymHit - The synonymHit object.
3104
- * @param saveSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3105
- * @param saveSynonyms.replaceExistingSynonyms - Indicates whether to replace all synonyms in the index with the ones sent with this request.
3528
+ * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
3529
+ * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
3106
3530
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3107
3531
  */
3108
3532
  saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
@@ -3132,10 +3556,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3132
3556
  return transporter.request(request, requestOptions);
3133
3557
  },
3134
3558
  /**
3135
- * Send multiple search queries to one or more indices.
3559
+ * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
3136
3560
  *
3137
- * @summary Search multiple indices.
3138
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
3561
+ * Required API Key ACLs:
3562
+ * - search.
3563
+ *
3564
+ * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
3139
3565
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3140
3566
  */
3141
3567
  search(searchMethodParams, requestOptions) {
@@ -3182,11 +3608,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3182
3608
  return transporter.request(request, requestOptions);
3183
3609
  },
3184
3610
  /**
3185
- * Search for standard and [custom](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/) entries in the [stop words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-stop-words/), [plurals](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-plurals-and-other-declensions/), or [segmentation (compounds)](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) dictionaries.
3611
+ * Searches for standard and custom dictionary entries.
3612
+ *
3613
+ * Required API Key ACLs:
3614
+ * - settings.
3186
3615
  *
3187
- * @summary Search dictionary entries.
3188
3616
  * @param searchDictionaryEntries - The searchDictionaryEntries object.
3189
- * @param searchDictionaryEntries.dictionaryName - Dictionary to search in.
3617
+ * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3190
3618
  * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
3191
3619
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3192
3620
  */
@@ -3215,12 +3643,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3215
3643
  return transporter.request(request, requestOptions);
3216
3644
  },
3217
3645
  /**
3218
- * [Search for a facet\'s values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values), optionally restricting the returned values to those contained in records matching other search criteria. > **Note**: Pagination isn\'t supported (`page` and `hitsPerPage` are ignored). By default, the engine returns a maximum of 10 values but you can adjust this with `maxFacetHits`.
3646
+ * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
3647
+ *
3648
+ * Required API Key ACLs:
3649
+ * - search.
3219
3650
  *
3220
- * @summary Search for facet values.
3221
3651
  * @param searchForFacetValues - The searchForFacetValues object.
3222
- * @param searchForFacetValues.indexName - Index on which to perform the request.
3223
- * @param searchForFacetValues.facetName - Facet name.
3652
+ * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
3653
+ * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
3224
3654
  * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
3225
3655
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3226
3656
  */
@@ -3248,11 +3678,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3248
3678
  return transporter.request(request, requestOptions);
3249
3679
  },
3250
3680
  /**
3251
- * Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body.
3681
+ * Searches for rules in your index.
3682
+ *
3683
+ * Required API Key ACLs:
3684
+ * - settings.
3252
3685
  *
3253
- * @summary Search for rules.
3254
3686
  * @param searchRules - The searchRules object.
3255
- * @param searchRules.indexName - Index on which to perform the request.
3687
+ * @param searchRules.indexName - Name of the index on which to perform the operation.
3256
3688
  * @param searchRules.searchRulesParams - The searchRulesParams object.
3257
3689
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3258
3690
  */
@@ -3275,11 +3707,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3275
3707
  return transporter.request(request, requestOptions);
3276
3708
  },
3277
3709
  /**
3278
- * Return records that match the query.
3710
+ * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
3711
+ *
3712
+ * Required API Key ACLs:
3713
+ * - search.
3279
3714
  *
3280
- * @summary Search an index.
3281
3715
  * @param searchSingleIndex - The searchSingleIndex object.
3282
- * @param searchSingleIndex.indexName - Index on which to perform the request.
3716
+ * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
3283
3717
  * @param searchSingleIndex.searchParams - The searchParams object.
3284
3718
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3285
3719
  */
@@ -3302,11 +3736,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3302
3736
  return transporter.request(request, requestOptions);
3303
3737
  },
3304
3738
  /**
3305
- * Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
3739
+ * Searches for synonyms in your index.
3740
+ *
3741
+ * Required API Key ACLs:
3742
+ * - settings.
3306
3743
  *
3307
- * @summary Search for synonyms.
3308
3744
  * @param searchSynonyms - The searchSynonyms object.
3309
- * @param searchSynonyms.indexName - Index on which to perform the request.
3745
+ * @param searchSynonyms.indexName - Name of the index on which to perform the operation.
3310
3746
  * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
3311
3747
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3312
3748
  */
@@ -3329,9 +3765,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3329
3765
  return transporter.request(request, requestOptions);
3330
3766
  },
3331
3767
  /**
3332
- * Since it can take up to a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
3768
+ * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
3769
+ *
3770
+ * Required API Key ACLs:
3771
+ * - admin.
3333
3772
  *
3334
- * @summary Search for a user ID.
3335
3773
  * @param searchUserIdsParams - The searchUserIdsParams object.
3336
3774
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3337
3775
  */
@@ -3357,9 +3795,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3357
3795
  return transporter.request(request, requestOptions);
3358
3796
  },
3359
3797
  /**
3360
- * Set stop word settings for a specific language.
3798
+ * Turns standard stop word dictionary entries on or off for a given language.
3799
+ *
3800
+ * Required API Key ACLs:
3801
+ * - editSettings.
3361
3802
  *
3362
- * @summary Set stop word settings.
3363
3803
  * @param dictionarySettingsParams - The dictionarySettingsParams object.
3364
3804
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3365
3805
  */
@@ -3383,13 +3823,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3383
3823
  return transporter.request(request, requestOptions);
3384
3824
  },
3385
3825
  /**
3386
- * Update the specified [index settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/). Specifying null for a setting resets it to its default value.
3826
+ * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
3827
+ *
3828
+ * Required API Key ACLs:
3829
+ * - editSettings.
3387
3830
  *
3388
- * @summary Update index settings.
3389
3831
  * @param setSettings - The setSettings object.
3390
- * @param setSettings.indexName - Index on which to perform the request.
3832
+ * @param setSettings.indexName - Name of the index on which to perform the operation.
3391
3833
  * @param setSettings.indexSettings - The indexSettings object.
3392
- * @param setSettings.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3834
+ * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
3393
3835
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3394
3836
  */
3395
3837
  setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
@@ -3415,9 +3857,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3415
3857
  return transporter.request(request, requestOptions);
3416
3858
  },
3417
3859
  /**
3418
- * Replace the permissions of an existing API key. Any unspecified parameter resets that permission to its default value. The request must be authenticated with the admin API key.
3860
+ * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
3861
+ *
3862
+ * Required API Key ACLs:
3863
+ * - admin.
3419
3864
  *
3420
- * @summary Update an API key.
3421
3865
  * @param updateApiKey - The updateApiKey object.
3422
3866
  * @param updateApiKey.key - API key.
3423
3867
  * @param updateApiKey.apiKey - The apiKey object.
@@ -3449,7 +3893,369 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3449
3893
  }
3450
3894
 
3451
3895
  // 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.
3452
- const apiClientVersion = apiClientVersion$1;
3896
+ const apiClientVersion$1 = '5.0.0-beta.10';
3897
+ function getDefaultHosts(appId) {
3898
+ return [
3899
+ {
3900
+ url: `${appId}-dsn.algolia.net`,
3901
+ accept: 'read',
3902
+ protocol: 'https',
3903
+ },
3904
+ {
3905
+ url: `${appId}.algolia.net`,
3906
+ accept: 'write',
3907
+ protocol: 'https',
3908
+ },
3909
+ ].concat(shuffle([
3910
+ {
3911
+ url: `${appId}-1.algolianet.com`,
3912
+ accept: 'readWrite',
3913
+ protocol: 'https',
3914
+ },
3915
+ {
3916
+ url: `${appId}-2.algolianet.com`,
3917
+ accept: 'readWrite',
3918
+ protocol: 'https',
3919
+ },
3920
+ {
3921
+ url: `${appId}-3.algolianet.com`,
3922
+ accept: 'readWrite',
3923
+ protocol: 'https',
3924
+ },
3925
+ ]));
3926
+ }
3927
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
3928
+ function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
3929
+ const auth = createAuth(appIdOption, apiKeyOption, authMode);
3930
+ const transporter = createTransporter({
3931
+ hosts: getDefaultHosts(appIdOption),
3932
+ ...options,
3933
+ algoliaAgent: getAlgoliaAgent({
3934
+ algoliaAgents,
3935
+ client: 'Recommend',
3936
+ version: apiClientVersion$1,
3937
+ }),
3938
+ baseHeaders: {
3939
+ 'content-type': 'text/plain',
3940
+ ...auth.headers(),
3941
+ ...options.baseHeaders,
3942
+ },
3943
+ baseQueryParameters: {
3944
+ ...auth.queryParameters(),
3945
+ ...options.baseQueryParameters,
3946
+ },
3947
+ });
3948
+ return {
3949
+ transporter,
3950
+ /**
3951
+ * The `appId` currently in use.
3952
+ */
3953
+ appId: appIdOption,
3954
+ /**
3955
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
3956
+ */
3957
+ clearCache() {
3958
+ return Promise.all([
3959
+ transporter.requestsCache.clear(),
3960
+ transporter.responsesCache.clear(),
3961
+ ]).then(() => undefined);
3962
+ },
3963
+ /**
3964
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
3965
+ */
3966
+ get _ua() {
3967
+ return transporter.algoliaAgent.value;
3968
+ },
3969
+ /**
3970
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
3971
+ *
3972
+ * @param segment - The algolia agent (user-agent) segment to add.
3973
+ * @param version - The version of the agent.
3974
+ */
3975
+ addAlgoliaAgent(segment, version) {
3976
+ transporter.algoliaAgent.add({ segment, version });
3977
+ },
3978
+ /**
3979
+ * This method allow you to send requests to the Algolia REST API.
3980
+ *
3981
+ * @param customDelete - The customDelete object.
3982
+ * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
3983
+ * @param customDelete.parameters - Query parameters to apply to the current query.
3984
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3985
+ */
3986
+ customDelete({ path, parameters }, requestOptions) {
3987
+ if (!path) {
3988
+ throw new Error('Parameter `path` is required when calling `customDelete`.');
3989
+ }
3990
+ const requestPath = '/{path}'.replace('{path}', path);
3991
+ const headers = {};
3992
+ const queryParameters = parameters ? parameters : {};
3993
+ const request = {
3994
+ method: 'DELETE',
3995
+ path: requestPath,
3996
+ queryParameters,
3997
+ headers,
3998
+ };
3999
+ return transporter.request(request, requestOptions);
4000
+ },
4001
+ /**
4002
+ * This method allow you to send requests to the Algolia REST API.
4003
+ *
4004
+ * @param customGet - The customGet object.
4005
+ * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
4006
+ * @param customGet.parameters - Query parameters to apply to the current query.
4007
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4008
+ */
4009
+ customGet({ path, parameters }, requestOptions) {
4010
+ if (!path) {
4011
+ throw new Error('Parameter `path` is required when calling `customGet`.');
4012
+ }
4013
+ const requestPath = '/{path}'.replace('{path}', path);
4014
+ const headers = {};
4015
+ const queryParameters = parameters ? parameters : {};
4016
+ const request = {
4017
+ method: 'GET',
4018
+ path: requestPath,
4019
+ queryParameters,
4020
+ headers,
4021
+ };
4022
+ return transporter.request(request, requestOptions);
4023
+ },
4024
+ /**
4025
+ * This method allow you to send requests to the Algolia REST API.
4026
+ *
4027
+ * @param customPost - The customPost object.
4028
+ * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
4029
+ * @param customPost.parameters - Query parameters to apply to the current query.
4030
+ * @param customPost.body - Parameters to send with the custom request.
4031
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4032
+ */
4033
+ customPost({ path, parameters, body }, requestOptions) {
4034
+ if (!path) {
4035
+ throw new Error('Parameter `path` is required when calling `customPost`.');
4036
+ }
4037
+ const requestPath = '/{path}'.replace('{path}', path);
4038
+ const headers = {};
4039
+ const queryParameters = parameters ? parameters : {};
4040
+ const request = {
4041
+ method: 'POST',
4042
+ path: requestPath,
4043
+ queryParameters,
4044
+ headers,
4045
+ data: body ? body : {},
4046
+ };
4047
+ return transporter.request(request, requestOptions);
4048
+ },
4049
+ /**
4050
+ * This method allow you to send requests to the Algolia REST API.
4051
+ *
4052
+ * @param customPut - The customPut object.
4053
+ * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
4054
+ * @param customPut.parameters - Query parameters to apply to the current query.
4055
+ * @param customPut.body - Parameters to send with the custom request.
4056
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4057
+ */
4058
+ customPut({ path, parameters, body }, requestOptions) {
4059
+ if (!path) {
4060
+ throw new Error('Parameter `path` is required when calling `customPut`.');
4061
+ }
4062
+ const requestPath = '/{path}'.replace('{path}', path);
4063
+ const headers = {};
4064
+ const queryParameters = parameters ? parameters : {};
4065
+ const request = {
4066
+ method: 'PUT',
4067
+ path: requestPath,
4068
+ queryParameters,
4069
+ headers,
4070
+ data: body ? body : {},
4071
+ };
4072
+ return transporter.request(request, requestOptions);
4073
+ },
4074
+ /**
4075
+ * Deletes a Recommend rule from a recommendation scenario.
4076
+ *
4077
+ * Required API Key ACLs:
4078
+ * - editSettings.
4079
+ *
4080
+ * @param deleteRecommendRule - The deleteRecommendRule object.
4081
+ * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
4082
+ * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
4083
+ * @param deleteRecommendRule.objectID - Unique record identifier.
4084
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4085
+ */
4086
+ deleteRecommendRule({ indexName, model, objectID }, requestOptions) {
4087
+ if (!indexName) {
4088
+ throw new Error('Parameter `indexName` is required when calling `deleteRecommendRule`.');
4089
+ }
4090
+ if (!model) {
4091
+ throw new Error('Parameter `model` is required when calling `deleteRecommendRule`.');
4092
+ }
4093
+ if (!objectID) {
4094
+ throw new Error('Parameter `objectID` is required when calling `deleteRecommendRule`.');
4095
+ }
4096
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
4097
+ .replace('{indexName}', encodeURIComponent(indexName))
4098
+ .replace('{model}', encodeURIComponent(model))
4099
+ .replace('{objectID}', encodeURIComponent(objectID));
4100
+ const headers = {};
4101
+ const queryParameters = {};
4102
+ const request = {
4103
+ method: 'DELETE',
4104
+ path: requestPath,
4105
+ queryParameters,
4106
+ headers,
4107
+ };
4108
+ return transporter.request(request, requestOptions);
4109
+ },
4110
+ /**
4111
+ * Retrieves a Recommend rule that you previously created in the Algolia dashboard.
4112
+ *
4113
+ * Required API Key ACLs:
4114
+ * - settings.
4115
+ *
4116
+ * @param getRecommendRule - The getRecommendRule object.
4117
+ * @param getRecommendRule.indexName - Name of the index on which to perform the operation.
4118
+ * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
4119
+ * @param getRecommendRule.objectID - Unique record identifier.
4120
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4121
+ */
4122
+ getRecommendRule({ indexName, model, objectID }, requestOptions) {
4123
+ if (!indexName) {
4124
+ throw new Error('Parameter `indexName` is required when calling `getRecommendRule`.');
4125
+ }
4126
+ if (!model) {
4127
+ throw new Error('Parameter `model` is required when calling `getRecommendRule`.');
4128
+ }
4129
+ if (!objectID) {
4130
+ throw new Error('Parameter `objectID` is required when calling `getRecommendRule`.');
4131
+ }
4132
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/{objectID}'
4133
+ .replace('{indexName}', encodeURIComponent(indexName))
4134
+ .replace('{model}', encodeURIComponent(model))
4135
+ .replace('{objectID}', encodeURIComponent(objectID));
4136
+ const headers = {};
4137
+ const queryParameters = {};
4138
+ const request = {
4139
+ method: 'GET',
4140
+ path: requestPath,
4141
+ queryParameters,
4142
+ headers,
4143
+ };
4144
+ return transporter.request(request, requestOptions);
4145
+ },
4146
+ /**
4147
+ * 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.
4148
+ *
4149
+ * Required API Key ACLs:
4150
+ * - editSettings.
4151
+ *
4152
+ * @param getRecommendStatus - The getRecommendStatus object.
4153
+ * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
4154
+ * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
4155
+ * @param getRecommendStatus.taskID - Unique task identifier.
4156
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4157
+ */
4158
+ getRecommendStatus({ indexName, model, taskID }, requestOptions) {
4159
+ if (!indexName) {
4160
+ throw new Error('Parameter `indexName` is required when calling `getRecommendStatus`.');
4161
+ }
4162
+ if (!model) {
4163
+ throw new Error('Parameter `model` is required when calling `getRecommendStatus`.');
4164
+ }
4165
+ if (!taskID) {
4166
+ throw new Error('Parameter `taskID` is required when calling `getRecommendStatus`.');
4167
+ }
4168
+ const requestPath = '/1/indexes/{indexName}/{model}/task/{taskID}'
4169
+ .replace('{indexName}', encodeURIComponent(indexName))
4170
+ .replace('{model}', encodeURIComponent(model))
4171
+ .replace('{taskID}', encodeURIComponent(taskID));
4172
+ const headers = {};
4173
+ const queryParameters = {};
4174
+ const request = {
4175
+ method: 'GET',
4176
+ path: requestPath,
4177
+ queryParameters,
4178
+ headers,
4179
+ };
4180
+ return transporter.request(request, requestOptions);
4181
+ },
4182
+ /**
4183
+ * Retrieves recommendations from selected AI models.
4184
+ *
4185
+ * Required API Key ACLs:
4186
+ * - search.
4187
+ *
4188
+ * @param getRecommendationsParams - The getRecommendationsParams object.
4189
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4190
+ */
4191
+ getRecommendations(getRecommendationsParams, requestOptions) {
4192
+ if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
4193
+ const newSignatureRequest = {
4194
+ requests: getRecommendationsParams,
4195
+ };
4196
+ // eslint-disable-next-line no-param-reassign
4197
+ getRecommendationsParams = newSignatureRequest;
4198
+ }
4199
+ if (!getRecommendationsParams) {
4200
+ throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
4201
+ }
4202
+ if (!getRecommendationsParams.requests) {
4203
+ throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
4204
+ }
4205
+ const requestPath = '/1/indexes/*/recommendations';
4206
+ const headers = {};
4207
+ const queryParameters = {};
4208
+ const request = {
4209
+ method: 'POST',
4210
+ path: requestPath,
4211
+ queryParameters,
4212
+ headers,
4213
+ data: getRecommendationsParams,
4214
+ useReadTransporter: true,
4215
+ cacheable: true,
4216
+ };
4217
+ return transporter.request(request, requestOptions);
4218
+ },
4219
+ /**
4220
+ * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
4221
+ *
4222
+ * Required API Key ACLs:
4223
+ * - settings.
4224
+ *
4225
+ * @param searchRecommendRules - The searchRecommendRules object.
4226
+ * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
4227
+ * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
4228
+ * @param searchRecommendRules.searchRecommendRulesParams - The searchRecommendRulesParams object.
4229
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
4230
+ */
4231
+ searchRecommendRules({ indexName, model, searchRecommendRulesParams, }, requestOptions) {
4232
+ if (!indexName) {
4233
+ throw new Error('Parameter `indexName` is required when calling `searchRecommendRules`.');
4234
+ }
4235
+ if (!model) {
4236
+ throw new Error('Parameter `model` is required when calling `searchRecommendRules`.');
4237
+ }
4238
+ const requestPath = '/1/indexes/{indexName}/{model}/recommend/rules/search'
4239
+ .replace('{indexName}', encodeURIComponent(indexName))
4240
+ .replace('{model}', encodeURIComponent(model));
4241
+ const headers = {};
4242
+ const queryParameters = {};
4243
+ const request = {
4244
+ method: 'POST',
4245
+ path: requestPath,
4246
+ queryParameters,
4247
+ headers,
4248
+ data: searchRecommendRulesParams ? searchRecommendRulesParams : {},
4249
+ useReadTransporter: true,
4250
+ cacheable: true,
4251
+ };
4252
+ return transporter.request(request, requestOptions);
4253
+ },
4254
+ };
4255
+ }
4256
+
4257
+ // 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.
4258
+ const apiClientVersion = apiClientVersion$2;
3453
4259
  // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
3454
4260
  function algoliasearch(appId, apiKey, options) {
3455
4261
  if (!appId || typeof appId !== 'string') {
@@ -3473,6 +4279,13 @@ function algoliasearch(appId, apiKey, options) {
3473
4279
  hostsCache: createMemoryCache(),
3474
4280
  ...options,
3475
4281
  };
4282
+ function initRecommend(initOptions = {}) {
4283
+ return createRecommendClient({
4284
+ ...commonOptions,
4285
+ ...initOptions.options,
4286
+ ...initOptions,
4287
+ });
4288
+ }
3476
4289
  function initAnalytics(initOptions = {}) {
3477
4290
  if (initOptions.region &&
3478
4291
  (typeof initOptions.region !== 'string' ||
@@ -3518,9 +4331,56 @@ function algoliasearch(appId, apiKey, options) {
3518
4331
  get _ua() {
3519
4332
  return this.transporter.algoliaAgent.value;
3520
4333
  },
4334
+ initAbtesting,
3521
4335
  initAnalytics,
3522
4336
  initPersonalization,
3523
- initAbtesting,
4337
+ initRecommend,
4338
+ /**
4339
+ * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
4340
+ *
4341
+ * @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
4342
+ * @param generateSecuredApiKey - The `generateSecuredApiKey` object.
4343
+ * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
4344
+ * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
4345
+ */
4346
+ generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
4347
+ let mergedRestrictions = restrictions;
4348
+ if (restrictions.searchParams) {
4349
+ // merge searchParams with the root restrictions
4350
+ mergedRestrictions = {
4351
+ ...restrictions,
4352
+ ...restrictions.searchParams,
4353
+ };
4354
+ delete mergedRestrictions.searchParams;
4355
+ }
4356
+ mergedRestrictions = Object.keys(mergedRestrictions)
4357
+ .sort()
4358
+ .reduce((acc, key) => {
4359
+ // eslint-disable-next-line no-param-reassign
4360
+ acc[key] = mergedRestrictions[key];
4361
+ return acc;
4362
+ }, {});
4363
+ const queryParameters = serializeQueryParameters(mergedRestrictions);
4364
+ return Buffer.from(createHmac('sha256', parentApiKey)
4365
+ .update(queryParameters)
4366
+ .digest('hex') + queryParameters).toString('base64');
4367
+ },
4368
+ /**
4369
+ * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
4370
+ *
4371
+ * @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
4372
+ * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
4373
+ * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
4374
+ */
4375
+ getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
4376
+ const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
4377
+ const regex = /validUntil=(\d+)/;
4378
+ const match = decodedString.match(regex);
4379
+ if (match === null) {
4380
+ throw new Error('validUntil not found in given secured api key.');
4381
+ }
4382
+ return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
4383
+ },
3524
4384
  };
3525
4385
  }
3526
4386