algoliasearch 5.0.0-alpha.98 → 5.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (508) hide show
  1. package/builds/browser.ts +10 -17
  2. package/builds/node.ts +58 -15
  3. package/dist/algoliasearch/builds/browser.d.ts +10 -5
  4. package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
  5. package/dist/algoliasearch/builds/node.d.ts +28 -6
  6. package/dist/algoliasearch/builds/node.d.ts.map +1 -1
  7. package/dist/algoliasearch.cjs +752 -387
  8. package/dist/algoliasearch.esm.browser.js +724 -393
  9. package/dist/algoliasearch.esm.node.js +753 -388
  10. package/dist/algoliasearch.umd.js +2 -2
  11. package/dist/client-abtesting/model/aBTest.d.ts +14 -29
  12. package/dist/client-abtesting/model/aBTest.d.ts.map +1 -1
  13. package/dist/client-abtesting/model/aBTestConfiguration.d.ts +12 -0
  14. package/dist/client-abtesting/model/aBTestConfiguration.d.ts.map +1 -0
  15. package/dist/client-abtesting/model/aBTestResponse.d.ts +3 -3
  16. package/dist/client-abtesting/model/abTestsVariant.d.ts +3 -3
  17. package/dist/client-abtesting/model/addABTestsRequest.d.ts +1 -1
  18. package/dist/client-abtesting/model/clientMethodProps.d.ts +7 -7
  19. package/dist/client-abtesting/model/{currenciesValue.d.ts → currency.d.ts} +2 -2
  20. package/dist/client-abtesting/model/currency.d.ts.map +1 -0
  21. package/dist/client-abtesting/model/customSearchParams.d.ts +1 -1
  22. package/dist/client-abtesting/model/effect.d.ts +5 -0
  23. package/dist/client-abtesting/model/effect.d.ts.map +1 -0
  24. package/dist/client-abtesting/model/emptySearch.d.ts +10 -0
  25. package/dist/client-abtesting/model/emptySearch.d.ts.map +1 -0
  26. package/dist/client-abtesting/model/index.d.ts +7 -1
  27. package/dist/client-abtesting/model/index.d.ts.map +1 -1
  28. package/dist/client-abtesting/model/listABTestsResponse.d.ts +2 -2
  29. package/dist/client-abtesting/model/listABTestsResponse.d.ts.map +1 -1
  30. package/dist/client-abtesting/model/minimumDetectableEffect.d.ts +12 -0
  31. package/dist/client-abtesting/model/minimumDetectableEffect.d.ts.map +1 -0
  32. package/dist/client-abtesting/model/outliers.d.ts +10 -0
  33. package/dist/client-abtesting/model/outliers.d.ts.map +1 -0
  34. package/dist/client-abtesting/model/status.d.ts +5 -0
  35. package/dist/client-abtesting/model/status.d.ts.map +1 -0
  36. package/dist/client-abtesting/model/variant.d.ts +29 -25
  37. package/dist/client-abtesting/model/variant.d.ts.map +1 -1
  38. package/dist/client-abtesting/src/abtestingClient.d.ts +28 -26
  39. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
  40. package/dist/client-analytics/model/clickPositionsInner.d.ts +14 -0
  41. package/dist/client-analytics/model/clickPositionsInner.d.ts.map +1 -0
  42. package/dist/client-analytics/model/clientMethodProps.d.ts +161 -90
  43. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -1
  44. package/dist/client-analytics/model/currenciesValue.d.ts +14 -0
  45. package/dist/client-analytics/model/currenciesValue.d.ts.map +1 -0
  46. package/dist/client-analytics/model/dailyAddToCartRates.d.ts +19 -0
  47. package/dist/client-analytics/model/dailyAddToCartRates.d.ts.map +1 -0
  48. package/dist/client-analytics/model/dailyAverageClicks.d.ts +15 -0
  49. package/dist/client-analytics/model/dailyAverageClicks.d.ts.map +1 -0
  50. package/dist/client-analytics/model/dailyClickThroughRates.d.ts +19 -0
  51. package/dist/client-analytics/model/dailyClickThroughRates.d.ts.map +1 -0
  52. package/dist/client-analytics/model/dailyConversionRates.d.ts +19 -0
  53. package/dist/client-analytics/model/dailyConversionRates.d.ts.map +1 -0
  54. package/dist/client-analytics/model/dailyNoClickRates.d.ts +19 -0
  55. package/dist/client-analytics/model/dailyNoClickRates.d.ts.map +1 -0
  56. package/dist/client-analytics/model/dailyNoResultsRates.d.ts +19 -0
  57. package/dist/client-analytics/model/dailyNoResultsRates.d.ts.map +1 -0
  58. package/dist/client-analytics/model/dailyPurchaseRates.d.ts +19 -0
  59. package/dist/client-analytics/model/dailyPurchaseRates.d.ts.map +1 -0
  60. package/dist/client-analytics/model/dailyRevenue.d.ts +12 -0
  61. package/dist/client-analytics/model/dailyRevenue.d.ts.map +1 -0
  62. package/dist/client-analytics/model/dailySearches.d.ts +11 -0
  63. package/dist/client-analytics/model/dailySearches.d.ts.map +1 -0
  64. package/dist/client-analytics/model/dailySearchesNoClicks.d.ts +15 -0
  65. package/dist/client-analytics/model/dailySearchesNoClicks.d.ts.map +1 -0
  66. package/dist/client-analytics/model/dailySearchesNoResults.d.ts +15 -0
  67. package/dist/client-analytics/model/dailySearchesNoResults.d.ts.map +1 -0
  68. package/dist/client-analytics/model/dailyUsers.d.ts +11 -0
  69. package/dist/client-analytics/model/dailyUsers.d.ts.map +1 -0
  70. package/dist/client-analytics/model/getAddToCartRateResponse.d.ts +20 -0
  71. package/dist/client-analytics/model/getAddToCartRateResponse.d.ts.map +1 -0
  72. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts +6 -6
  73. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts.map +1 -1
  74. package/dist/client-analytics/model/getClickPositionsResponse.d.ts +3 -3
  75. package/dist/client-analytics/model/getClickPositionsResponse.d.ts.map +1 -1
  76. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts +7 -7
  77. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts.map +1 -1
  78. package/dist/client-analytics/model/getConversionRateResponse.d.ts +20 -0
  79. package/dist/client-analytics/model/getConversionRateResponse.d.ts.map +1 -0
  80. package/dist/client-analytics/model/getNoClickRateResponse.d.ts +6 -6
  81. package/dist/client-analytics/model/getNoClickRateResponse.d.ts.map +1 -1
  82. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts +6 -6
  83. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts.map +1 -1
  84. package/dist/client-analytics/model/getPurchaseRateResponse.d.ts +20 -0
  85. package/dist/client-analytics/model/getPurchaseRateResponse.d.ts.map +1 -0
  86. package/dist/client-analytics/model/getRevenue.d.ts +13 -0
  87. package/dist/client-analytics/model/getRevenue.d.ts.map +1 -0
  88. package/dist/client-analytics/model/getSearchesCountResponse.d.ts +3 -3
  89. package/dist/client-analytics/model/getSearchesCountResponse.d.ts.map +1 -1
  90. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts +3 -3
  91. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts.map +1 -1
  92. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts +3 -3
  93. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts.map +1 -1
  94. package/dist/client-analytics/model/getStatusResponse.d.ts +2 -2
  95. package/dist/client-analytics/model/getStatusResponse.d.ts.map +1 -1
  96. package/dist/client-analytics/model/getTopCountriesResponse.d.ts +1 -1
  97. package/dist/client-analytics/model/getTopFilterAttributesResponse.d.ts +1 -1
  98. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts +2 -4
  99. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts.map +1 -1
  100. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts +2 -2
  101. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
  102. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts +2 -4
  103. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
  104. package/dist/client-analytics/model/getTopHitsResponse.d.ts +2 -1
  105. package/dist/client-analytics/model/getTopHitsResponse.d.ts.map +1 -1
  106. package/dist/client-analytics/model/getTopSearchesResponse.d.ts +2 -1
  107. package/dist/client-analytics/model/getTopSearchesResponse.d.ts.map +1 -1
  108. package/dist/client-analytics/model/getUsersCountResponse.d.ts +4 -4
  109. package/dist/client-analytics/model/getUsersCountResponse.d.ts.map +1 -1
  110. package/dist/client-analytics/model/index.d.ts +23 -11
  111. package/dist/client-analytics/model/index.d.ts.map +1 -1
  112. package/dist/client-analytics/model/operator.d.ts +5 -0
  113. package/dist/client-analytics/model/operator.d.ts.map +1 -0
  114. package/dist/client-analytics/model/orderBy.d.ts +1 -1
  115. package/dist/client-analytics/model/topCountry.d.ts +1 -1
  116. package/dist/client-analytics/model/topHit.d.ts +1 -1
  117. package/dist/client-analytics/model/topHitWithAnalytics.d.ts +9 -9
  118. package/dist/client-analytics/model/topHitWithAnalytics.d.ts.map +1 -1
  119. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts +52 -0
  120. package/dist/client-analytics/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
  121. package/dist/client-analytics/model/topHitsResponse.d.ts +1 -1
  122. package/dist/client-analytics/model/topHitsResponseWithAnalytics.d.ts +1 -1
  123. package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
  124. package/dist/client-analytics/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
  125. package/dist/client-analytics/model/topSearch.d.ts +3 -3
  126. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts +17 -12
  127. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts.map +1 -1
  128. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts +65 -0
  129. package/dist/client-analytics/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
  130. package/dist/client-analytics/model/topSearchesResponse.d.ts +1 -1
  131. package/dist/client-analytics/model/topSearchesResponseWithAnalytics.d.ts +1 -1
  132. package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
  133. package/dist/client-analytics/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
  134. package/dist/client-analytics/src/analyticsClient.d.ts +211 -138
  135. package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
  136. package/dist/client-personalization/model/clientMethodProps.d.ts +2 -2
  137. package/dist/client-personalization/model/deleteUserProfileResponse.d.ts +2 -2
  138. package/dist/client-personalization/model/eventScoring.d.ts +4 -6
  139. package/dist/client-personalization/model/eventScoring.d.ts.map +1 -1
  140. package/dist/client-personalization/model/eventType.d.ts +5 -0
  141. package/dist/client-personalization/model/eventType.d.ts.map +1 -0
  142. package/dist/client-personalization/model/facetScoring.d.ts +2 -2
  143. package/dist/client-personalization/model/getUserTokenResponse.d.ts +3 -3
  144. package/dist/client-personalization/model/index.d.ts +1 -0
  145. package/dist/client-personalization/model/index.d.ts.map +1 -1
  146. package/dist/client-personalization/model/personalizationStrategyParams.d.ts +3 -3
  147. package/dist/client-personalization/src/personalizationClient.d.ts +19 -19
  148. package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
  149. package/dist/client-search/model/acl.d.ts +1 -1
  150. package/dist/client-search/model/action.d.ts +1 -1
  151. package/dist/client-search/model/addApiKeyResponse.d.ts +1 -1
  152. package/dist/client-search/model/anchoring.d.ts +1 -1
  153. package/dist/client-search/model/apiKey.d.ts +8 -8
  154. package/dist/client-search/model/apiKeyOperation.d.ts +2 -0
  155. package/dist/client-search/model/apiKeyOperation.d.ts.map +1 -0
  156. package/dist/client-search/model/aroundPrecision.d.ts +1 -1
  157. package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts +9 -0
  158. package/dist/client-search/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  159. package/dist/client-search/model/aroundRadius.d.ts +1 -1
  160. package/dist/client-search/model/aroundRadiusAll.d.ts +3 -0
  161. package/dist/client-search/model/aroundRadiusAll.d.ts.map +1 -1
  162. package/dist/client-search/model/automaticFacetFilter.d.ts +4 -4
  163. package/dist/client-search/model/automaticFacetFilters.d.ts +1 -1
  164. package/dist/client-search/model/baseGetApiKeyResponse.d.ts +1 -1
  165. package/dist/client-search/model/baseIndexSettings.d.ts +22 -17
  166. package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -1
  167. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  168. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  169. package/dist/client-search/model/baseSearchResponse.d.ts +10 -6
  170. package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
  171. package/dist/client-search/model/batchDictionaryEntriesParams.d.ts +3 -3
  172. package/dist/client-search/model/batchResponse.d.ts +2 -2
  173. package/dist/client-search/model/builtInOperation.d.ts +2 -2
  174. package/dist/client-search/model/builtInOperationType.d.ts +1 -1
  175. package/dist/client-search/model/clientMethodProps.d.ts +124 -65
  176. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
  177. package/dist/client-search/model/condition.d.ts +7 -3
  178. package/dist/client-search/model/condition.d.ts.map +1 -1
  179. package/dist/client-search/model/consequence.d.ts +5 -5
  180. package/dist/client-search/model/consequenceHide.d.ts +2 -2
  181. package/dist/client-search/model/consequenceQuery.d.ts +1 -1
  182. package/dist/client-search/model/consequenceQueryObject.d.ts +2 -2
  183. package/dist/client-search/model/createdAtResponse.d.ts +1 -1
  184. package/dist/client-search/model/cursor.d.ts +1 -1
  185. package/dist/client-search/model/deleteApiKeyResponse.d.ts +1 -1
  186. package/dist/client-search/model/deleteByParams.d.ts +4 -4
  187. package/dist/client-search/model/deleteSourceResponse.d.ts +1 -1
  188. package/dist/client-search/model/deletedAtResponse.d.ts +2 -2
  189. package/dist/client-search/model/dictionaryEntry.d.ts +6 -8
  190. package/dist/client-search/model/dictionaryEntry.d.ts.map +1 -1
  191. package/dist/client-search/model/dictionaryEntryState.d.ts +1 -1
  192. package/dist/client-search/model/dictionaryLanguage.d.ts +2 -2
  193. package/dist/client-search/model/dictionarySettingsParams.d.ts +1 -1
  194. package/dist/client-search/model/distinct.d.ts +1 -1
  195. package/dist/client-search/model/edit.d.ts +1 -1
  196. package/dist/client-search/model/exactOnSingleWordQuery.d.ts +1 -1
  197. package/dist/client-search/model/facetFilters.d.ts +1 -1
  198. package/dist/client-search/model/facetHits.d.ts +2 -2
  199. package/dist/client-search/model/facetOrdering.d.ts +2 -2
  200. package/dist/client-search/model/facets.d.ts +2 -2
  201. package/dist/client-search/model/fetchedIndex.d.ts +1 -1
  202. package/dist/client-search/model/getObjectsRequest.d.ts +3 -3
  203. package/dist/client-search/model/getObjectsResponse.d.ts +1 -1
  204. package/dist/client-search/model/hasPendingMappingsResponse.d.ts +1 -1
  205. package/dist/client-search/model/highlightResult.d.ts +1 -1
  206. package/dist/client-search/model/highlightResult.d.ts.map +1 -1
  207. package/dist/client-search/model/highlightResultOption.d.ts +3 -3
  208. package/dist/client-search/model/hit.d.ts +4 -4
  209. package/dist/client-search/model/ignorePlurals.d.ts +3 -2
  210. package/dist/client-search/model/ignorePlurals.d.ts.map +1 -1
  211. package/dist/client-search/model/index.d.ts +4 -0
  212. package/dist/client-search/model/index.d.ts.map +1 -1
  213. package/dist/client-search/model/indexSettings.d.ts +1 -1
  214. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +32 -35
  215. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  216. package/dist/client-search/model/log.d.ts +11 -11
  217. package/dist/client-search/model/logQuery.d.ts +1 -1
  218. package/dist/client-search/model/matchLevel.d.ts +1 -1
  219. package/dist/client-search/model/mode.d.ts +1 -1
  220. package/dist/client-search/model/multipleBatchRequest.d.ts +1 -1
  221. package/dist/client-search/model/multipleBatchResponse.d.ts +2 -2
  222. package/dist/client-search/model/numericFilters.d.ts +1 -1
  223. package/dist/client-search/model/operationIndexParams.d.ts +2 -2
  224. package/dist/client-search/model/operationType.d.ts +1 -1
  225. package/dist/client-search/model/optionalFilters.d.ts +1 -1
  226. package/dist/client-search/model/params.d.ts +1 -1
  227. package/dist/client-search/model/promoteObjectID.d.ts +2 -2
  228. package/dist/client-search/model/promoteObjectIDs.d.ts +2 -2
  229. package/dist/client-search/model/queryType.d.ts +1 -1
  230. package/dist/client-search/model/rankingInfo.d.ts +10 -7
  231. package/dist/client-search/model/rankingInfo.d.ts.map +1 -1
  232. package/dist/client-search/model/reRankingApplyFilter.d.ts +1 -1
  233. package/dist/client-search/model/removeStopWords.d.ts +3 -2
  234. package/dist/client-search/model/removeStopWords.d.ts.map +1 -1
  235. package/dist/client-search/model/removeUserIdResponse.d.ts +1 -1
  236. package/dist/client-search/model/removeWordsIfNoResults.d.ts +1 -1
  237. package/dist/client-search/model/renderingContent.d.ts +1 -1
  238. package/dist/client-search/model/replaceSourceResponse.d.ts +1 -1
  239. package/dist/client-search/model/rule.d.ts +5 -5
  240. package/dist/client-search/model/saveObjectResponse.d.ts +3 -3
  241. package/dist/client-search/model/saveSynonymResponse.d.ts +2 -2
  242. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts +5 -7
  243. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  244. package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts +20 -0
  245. package/dist/client-search/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
  246. package/dist/client-search/model/searchForFacetValuesRequest.d.ts +1 -1
  247. package/dist/client-search/model/searchForFacetValuesResponse.d.ts +3 -0
  248. package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -1
  249. package/dist/client-search/model/searchForFacetsOptions.d.ts +2 -2
  250. package/dist/client-search/model/searchForHitsOptions.d.ts +1 -1
  251. package/dist/client-search/model/searchHits.d.ts +6 -3
  252. package/dist/client-search/model/searchHits.d.ts.map +1 -1
  253. package/dist/client-search/model/searchParamsObject.d.ts +3 -0
  254. package/dist/client-search/model/searchParamsObject.d.ts.map +1 -1
  255. package/dist/client-search/model/searchParamsQuery.d.ts +1 -1
  256. package/dist/client-search/model/searchRulesParams.d.ts +4 -8
  257. package/dist/client-search/model/searchRulesParams.d.ts.map +1 -1
  258. package/dist/client-search/model/searchRulesResponse.d.ts +2 -2
  259. package/dist/client-search/model/searchStrategy.d.ts +1 -1
  260. package/dist/client-search/model/searchSynonymsParams.d.ts +2 -2
  261. package/dist/client-search/model/searchSynonymsResponse.d.ts +2 -2
  262. package/dist/client-search/model/searchUserIdsParams.d.ts +1 -1
  263. package/dist/client-search/model/searchUserIdsResponse.d.ts +3 -3
  264. package/dist/client-search/model/securedAPIKeyRestrictions.d.ts +25 -0
  265. package/dist/client-search/model/securedAPIKeyRestrictions.d.ts.map +1 -0
  266. package/dist/client-search/model/semanticSearch.d.ts +2 -2
  267. package/dist/client-search/model/snippetResult.d.ts +1 -1
  268. package/dist/client-search/model/snippetResult.d.ts.map +1 -1
  269. package/dist/client-search/model/snippetResultOption.d.ts +2 -2
  270. package/dist/client-search/model/sortRemainingBy.d.ts +1 -1
  271. package/dist/client-search/model/supportedLanguage.d.ts +5 -0
  272. package/dist/client-search/model/supportedLanguage.d.ts.map +1 -0
  273. package/dist/client-search/model/tagFilters.d.ts +1 -1
  274. package/dist/client-search/model/taskStatus.d.ts +1 -1
  275. package/dist/client-search/model/timeRange.d.ts +2 -2
  276. package/dist/client-search/model/typoTolerance.d.ts +1 -1
  277. package/dist/client-search/model/typoToleranceEnum.d.ts +3 -0
  278. package/dist/client-search/model/typoToleranceEnum.d.ts.map +1 -1
  279. package/dist/client-search/model/updateApiKeyResponse.d.ts +1 -1
  280. package/dist/client-search/model/updatedAtResponse.d.ts +2 -2
  281. package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts +3 -3
  282. package/dist/client-search/model/updatedRuleResponse.d.ts +3 -3
  283. package/dist/client-search/model/userHit.d.ts +1 -1
  284. package/dist/client-search/model/userId.d.ts +1 -1
  285. package/dist/client-search/model/value.d.ts +1 -1
  286. package/dist/client-search/src/searchClient.d.ts +324 -202
  287. package/dist/client-search/src/searchClient.d.ts.map +1 -1
  288. package/dist/lite/builds/browser.d.ts +14 -3
  289. package/dist/lite/builds/browser.d.ts.map +1 -1
  290. package/dist/lite/builds/node.d.ts +14 -3
  291. package/dist/lite/builds/node.d.ts.map +1 -1
  292. package/dist/lite/lite.cjs +8 -6
  293. package/dist/lite/lite.esm.browser.js +13 -14
  294. package/dist/lite/lite.esm.node.js +8 -6
  295. package/dist/lite/lite.umd.js +2 -2
  296. package/dist/lite/model/acl.d.ts +1 -1
  297. package/dist/lite/model/action.d.ts +1 -1
  298. package/dist/lite/model/addApiKeyResponse.d.ts +1 -1
  299. package/dist/lite/model/anchoring.d.ts +1 -1
  300. package/dist/lite/model/apiKey.d.ts +8 -8
  301. package/dist/lite/model/apiKeyOperation.d.ts +2 -0
  302. package/dist/lite/model/apiKeyOperation.d.ts.map +1 -0
  303. package/dist/lite/model/aroundPrecision.d.ts +1 -1
  304. package/dist/lite/model/aroundPrecisionFromValueInner.d.ts +9 -0
  305. package/dist/lite/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  306. package/dist/lite/model/aroundRadius.d.ts +1 -1
  307. package/dist/lite/model/aroundRadiusAll.d.ts +3 -0
  308. package/dist/lite/model/aroundRadiusAll.d.ts.map +1 -1
  309. package/dist/lite/model/automaticFacetFilter.d.ts +4 -4
  310. package/dist/lite/model/automaticFacetFilters.d.ts +1 -1
  311. package/dist/lite/model/baseGetApiKeyResponse.d.ts +1 -1
  312. package/dist/lite/model/baseIndexSettings.d.ts +22 -17
  313. package/dist/lite/model/baseIndexSettings.d.ts.map +1 -1
  314. package/dist/lite/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  315. package/dist/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  316. package/dist/lite/model/baseSearchResponse.d.ts +10 -6
  317. package/dist/lite/model/baseSearchResponse.d.ts.map +1 -1
  318. package/dist/lite/model/builtInOperation.d.ts +2 -2
  319. package/dist/lite/model/builtInOperationType.d.ts +1 -1
  320. package/dist/lite/model/condition.d.ts +7 -3
  321. package/dist/lite/model/condition.d.ts.map +1 -1
  322. package/dist/lite/model/consequence.d.ts +5 -5
  323. package/dist/lite/model/consequenceHide.d.ts +2 -2
  324. package/dist/lite/model/consequenceQuery.d.ts +1 -1
  325. package/dist/lite/model/consequenceQueryObject.d.ts +2 -2
  326. package/dist/lite/model/cursor.d.ts +1 -1
  327. package/dist/lite/model/deleteByParams.d.ts +4 -4
  328. package/dist/lite/model/dictionaryEntry.d.ts +6 -8
  329. package/dist/lite/model/dictionaryEntry.d.ts.map +1 -1
  330. package/dist/lite/model/dictionaryEntryState.d.ts +1 -1
  331. package/dist/lite/model/dictionaryLanguage.d.ts +2 -2
  332. package/dist/lite/model/distinct.d.ts +1 -1
  333. package/dist/lite/model/edit.d.ts +1 -1
  334. package/dist/lite/model/exactOnSingleWordQuery.d.ts +1 -1
  335. package/dist/lite/model/facetFilters.d.ts +1 -1
  336. package/dist/lite/model/facetHits.d.ts +2 -2
  337. package/dist/lite/model/facetOrdering.d.ts +2 -2
  338. package/dist/lite/model/facets.d.ts +2 -2
  339. package/dist/lite/model/fetchedIndex.d.ts +1 -1
  340. package/dist/lite/model/highlightResult.d.ts +1 -1
  341. package/dist/lite/model/highlightResult.d.ts.map +1 -1
  342. package/dist/lite/model/highlightResultOption.d.ts +3 -3
  343. package/dist/lite/model/hit.d.ts +4 -4
  344. package/dist/lite/model/ignorePlurals.d.ts +3 -2
  345. package/dist/lite/model/ignorePlurals.d.ts.map +1 -1
  346. package/dist/lite/model/index.d.ts +4 -0
  347. package/dist/lite/model/index.d.ts.map +1 -1
  348. package/dist/lite/model/indexSettings.d.ts +1 -1
  349. package/dist/lite/model/indexSettingsAsSearchParams.d.ts +32 -35
  350. package/dist/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  351. package/dist/lite/model/matchLevel.d.ts +1 -1
  352. package/dist/lite/model/mode.d.ts +1 -1
  353. package/dist/lite/model/numericFilters.d.ts +1 -1
  354. package/dist/lite/model/operationType.d.ts +1 -1
  355. package/dist/lite/model/optionalFilters.d.ts +1 -1
  356. package/dist/lite/model/params.d.ts +1 -1
  357. package/dist/lite/model/promoteObjectID.d.ts +2 -2
  358. package/dist/lite/model/promoteObjectIDs.d.ts +2 -2
  359. package/dist/lite/model/queryType.d.ts +1 -1
  360. package/dist/lite/model/rankingInfo.d.ts +10 -7
  361. package/dist/lite/model/rankingInfo.d.ts.map +1 -1
  362. package/dist/lite/model/reRankingApplyFilter.d.ts +1 -1
  363. package/dist/lite/model/removeStopWords.d.ts +3 -2
  364. package/dist/lite/model/removeStopWords.d.ts.map +1 -1
  365. package/dist/lite/model/removeWordsIfNoResults.d.ts +1 -1
  366. package/dist/lite/model/renderingContent.d.ts +1 -1
  367. package/dist/lite/model/rule.d.ts +5 -5
  368. package/dist/lite/model/searchDictionaryEntriesResponse.d.ts +20 -0
  369. package/dist/lite/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
  370. package/dist/lite/model/searchForFacetValuesResponse.d.ts +3 -0
  371. package/dist/lite/model/searchForFacetValuesResponse.d.ts.map +1 -1
  372. package/dist/lite/model/searchForFacetsOptions.d.ts +2 -2
  373. package/dist/lite/model/searchForHitsOptions.d.ts +1 -1
  374. package/dist/lite/model/searchHits.d.ts +6 -3
  375. package/dist/lite/model/searchHits.d.ts.map +1 -1
  376. package/dist/lite/model/searchParamsObject.d.ts +3 -0
  377. package/dist/lite/model/searchParamsObject.d.ts.map +1 -1
  378. package/dist/lite/model/searchParamsQuery.d.ts +1 -1
  379. package/dist/lite/model/searchStrategy.d.ts +1 -1
  380. package/dist/lite/model/searchSynonymsResponse.d.ts +2 -2
  381. package/dist/lite/model/securedAPIKeyRestrictions.d.ts +25 -0
  382. package/dist/lite/model/securedAPIKeyRestrictions.d.ts.map +1 -0
  383. package/dist/lite/model/semanticSearch.d.ts +2 -2
  384. package/dist/lite/model/snippetResult.d.ts +1 -1
  385. package/dist/lite/model/snippetResult.d.ts.map +1 -1
  386. package/dist/lite/model/snippetResultOption.d.ts +2 -2
  387. package/dist/lite/model/sortRemainingBy.d.ts +1 -1
  388. package/dist/lite/model/supportedLanguage.d.ts +5 -0
  389. package/dist/lite/model/supportedLanguage.d.ts.map +1 -0
  390. package/dist/lite/model/tagFilters.d.ts +1 -1
  391. package/dist/lite/model/taskStatus.d.ts +1 -1
  392. package/dist/lite/model/timeRange.d.ts +2 -2
  393. package/dist/lite/model/typoTolerance.d.ts +1 -1
  394. package/dist/lite/model/typoToleranceEnum.d.ts +3 -0
  395. package/dist/lite/model/typoToleranceEnum.d.ts.map +1 -1
  396. package/dist/lite/model/updatedRuleResponse.d.ts +3 -3
  397. package/dist/lite/model/userId.d.ts +1 -1
  398. package/dist/lite/model/value.d.ts +1 -1
  399. package/dist/lite/src/liteClient.d.ts +6 -9
  400. package/dist/lite/src/liteClient.d.ts.map +1 -1
  401. package/lite/builds/browser.ts +11 -6
  402. package/lite/builds/node.ts +10 -5
  403. package/lite/model/acl.ts +1 -1
  404. package/lite/model/action.ts +1 -1
  405. package/lite/model/addApiKeyResponse.ts +1 -1
  406. package/lite/model/anchoring.ts +1 -1
  407. package/lite/model/apiKey.ts +8 -8
  408. package/lite/model/apiKeyOperation.ts +3 -0
  409. package/lite/model/aroundPrecision.ts +1 -1
  410. package/lite/model/aroundPrecisionFromValueInner.ts +9 -0
  411. package/lite/model/aroundRadius.ts +1 -1
  412. package/lite/model/aroundRadiusAll.ts +3 -0
  413. package/lite/model/automaticFacetFilter.ts +4 -4
  414. package/lite/model/automaticFacetFilters.ts +1 -1
  415. package/lite/model/baseGetApiKeyResponse.ts +1 -1
  416. package/lite/model/baseIndexSettings.ts +24 -17
  417. package/lite/model/baseSearchParamsWithoutQuery.ts +26 -30
  418. package/lite/model/baseSearchResponse.ts +11 -6
  419. package/lite/model/builtInOperation.ts +2 -2
  420. package/lite/model/builtInOperationType.ts +1 -1
  421. package/lite/model/condition.ts +8 -3
  422. package/lite/model/consequence.ts +5 -5
  423. package/lite/model/consequenceHide.ts +2 -2
  424. package/lite/model/consequenceQuery.ts +1 -1
  425. package/lite/model/consequenceQueryObject.ts +2 -2
  426. package/lite/model/cursor.ts +1 -1
  427. package/lite/model/deleteByParams.ts +4 -4
  428. package/lite/model/dictionaryEntry.ts +6 -8
  429. package/lite/model/dictionaryEntryState.ts +1 -1
  430. package/lite/model/dictionaryLanguage.ts +2 -2
  431. package/lite/model/distinct.ts +1 -1
  432. package/lite/model/edit.ts +1 -1
  433. package/lite/model/exactOnSingleWordQuery.ts +1 -1
  434. package/lite/model/facetFilters.ts +1 -1
  435. package/lite/model/facetHits.ts +2 -2
  436. package/lite/model/facetOrdering.ts +2 -2
  437. package/lite/model/facets.ts +2 -2
  438. package/lite/model/fetchedIndex.ts +1 -1
  439. package/lite/model/highlightResult.ts +1 -0
  440. package/lite/model/highlightResultOption.ts +3 -3
  441. package/lite/model/hit.ts +4 -4
  442. package/lite/model/ignorePlurals.ts +4 -2
  443. package/lite/model/index.ts +4 -0
  444. package/lite/model/indexSettings.ts +1 -1
  445. package/lite/model/indexSettingsAsSearchParams.ts +32 -36
  446. package/lite/model/matchLevel.ts +1 -1
  447. package/lite/model/mode.ts +1 -1
  448. package/lite/model/numericFilters.ts +1 -1
  449. package/lite/model/operationType.ts +1 -1
  450. package/lite/model/optionalFilters.ts +1 -1
  451. package/lite/model/params.ts +1 -1
  452. package/lite/model/promoteObjectID.ts +2 -2
  453. package/lite/model/promoteObjectIDs.ts +2 -2
  454. package/lite/model/queryType.ts +1 -1
  455. package/lite/model/rankingInfo.ts +10 -7
  456. package/lite/model/reRankingApplyFilter.ts +1 -1
  457. package/lite/model/removeStopWords.ts +4 -2
  458. package/lite/model/removeWordsIfNoResults.ts +1 -1
  459. package/lite/model/renderingContent.ts +1 -1
  460. package/lite/model/rule.ts +5 -5
  461. package/lite/model/searchDictionaryEntriesResponse.ts +25 -0
  462. package/lite/model/searchForFacetValuesResponse.ts +3 -0
  463. package/lite/model/searchForFacetsOptions.ts +2 -2
  464. package/lite/model/searchForHitsOptions.ts +1 -1
  465. package/lite/model/searchHits.ts +6 -3
  466. package/lite/model/searchParamsObject.ts +3 -0
  467. package/lite/model/searchParamsQuery.ts +1 -1
  468. package/lite/model/searchStrategy.ts +1 -1
  469. package/lite/model/searchSynonymsResponse.ts +2 -2
  470. package/lite/model/securedAPIKeyRestrictions.ts +32 -0
  471. package/lite/model/semanticSearch.ts +2 -2
  472. package/lite/model/snippetResult.ts +2 -1
  473. package/lite/model/snippetResultOption.ts +2 -2
  474. package/lite/model/sortRemainingBy.ts +1 -1
  475. package/lite/model/supportedLanguage.ts +74 -0
  476. package/lite/model/tagFilters.ts +1 -1
  477. package/lite/model/taskStatus.ts +1 -1
  478. package/lite/model/timeRange.ts +2 -2
  479. package/lite/model/typoTolerance.ts +1 -1
  480. package/lite/model/typoToleranceEnum.ts +3 -0
  481. package/lite/model/updatedRuleResponse.ts +3 -3
  482. package/lite/model/userId.ts +1 -1
  483. package/lite/model/value.ts +1 -1
  484. package/lite/src/liteClient.ts +8 -12
  485. package/package.json +14 -14
  486. package/dist/client-abtesting/model/currenciesValue.d.ts.map +0 -1
  487. package/dist/client-analytics/model/averageClickEvent.d.ts +0 -15
  488. package/dist/client-analytics/model/averageClickEvent.d.ts.map +0 -1
  489. package/dist/client-analytics/model/clickPosition.d.ts +0 -11
  490. package/dist/client-analytics/model/clickPosition.d.ts.map +0 -1
  491. package/dist/client-analytics/model/clickThroughRateEvent.d.ts +0 -19
  492. package/dist/client-analytics/model/clickThroughRateEvent.d.ts.map +0 -1
  493. package/dist/client-analytics/model/conversionRateEvent.d.ts +0 -19
  494. package/dist/client-analytics/model/conversionRateEvent.d.ts.map +0 -1
  495. package/dist/client-analytics/model/getConversationRateResponse.d.ts +0 -20
  496. package/dist/client-analytics/model/getConversationRateResponse.d.ts.map +0 -1
  497. package/dist/client-analytics/model/noClickRateEvent.d.ts +0 -19
  498. package/dist/client-analytics/model/noClickRateEvent.d.ts.map +0 -1
  499. package/dist/client-analytics/model/noResultsRateEvent.d.ts +0 -19
  500. package/dist/client-analytics/model/noResultsRateEvent.d.ts.map +0 -1
  501. package/dist/client-analytics/model/searchEvent.d.ts +0 -11
  502. package/dist/client-analytics/model/searchEvent.d.ts.map +0 -1
  503. package/dist/client-analytics/model/searchNoClickEvent.d.ts +0 -15
  504. package/dist/client-analytics/model/searchNoClickEvent.d.ts.map +0 -1
  505. package/dist/client-analytics/model/searchNoResultEvent.d.ts +0 -15
  506. package/dist/client-analytics/model/searchNoResultEvent.d.ts.map +0 -1
  507. package/dist/client-analytics/model/userWithDate.d.ts +0 -11
  508. package/dist/client-analytics/model/userWithDate.d.ts.map +0 -1
@@ -1,10 +1,11 @@
1
1
  'use strict';
2
2
 
3
+ var crypto = require('crypto');
3
4
  var clientCommon = require('@algolia/client-common');
4
5
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
6
 
6
7
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
7
- const apiClientVersion$4 = '5.0.0-alpha.98';
8
+ const apiClientVersion$4 = '5.0.0-beta.1';
8
9
  const REGIONS$2 = ['de', 'us'];
9
10
  function getDefaultHosts$3(region) {
10
11
  const url = !region
@@ -64,9 +65,11 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
64
65
  transporter.algoliaAgent.add({ segment, version });
65
66
  },
66
67
  /**
67
- * Creates an A/B test.
68
+ * Creates a new A/B test.
69
+ *
70
+ * Required API Key ACLs:
71
+ * - editSettings.
68
72
  *
69
- * @summary Create an A/B test.
70
73
  * @param addABTestsRequest - The addABTestsRequest object.
71
74
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
72
75
  */
@@ -98,7 +101,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
98
101
  /**
99
102
  * This method allow you to send requests to the Algolia REST API.
100
103
  *
101
- * @summary Send requests to the Algolia REST API.
102
104
  * @param customDelete - The customDelete object.
103
105
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
104
106
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -108,7 +110,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
108
110
  if (!path) {
109
111
  throw new Error('Parameter `path` is required when calling `customDelete`.');
110
112
  }
111
- const requestPath = '/1{path}'.replace('{path}', path);
113
+ const requestPath = '/{path}'.replace('{path}', path);
112
114
  const headers = {};
113
115
  const queryParameters = parameters ? parameters : {};
114
116
  const request = {
@@ -122,7 +124,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
122
124
  /**
123
125
  * This method allow you to send requests to the Algolia REST API.
124
126
  *
125
- * @summary Send requests to the Algolia REST API.
126
127
  * @param customGet - The customGet object.
127
128
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
128
129
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -132,7 +133,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
132
133
  if (!path) {
133
134
  throw new Error('Parameter `path` is required when calling `customGet`.');
134
135
  }
135
- const requestPath = '/1{path}'.replace('{path}', path);
136
+ const requestPath = '/{path}'.replace('{path}', path);
136
137
  const headers = {};
137
138
  const queryParameters = parameters ? parameters : {};
138
139
  const request = {
@@ -146,7 +147,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
146
147
  /**
147
148
  * This method allow you to send requests to the Algolia REST API.
148
149
  *
149
- * @summary Send requests to the Algolia REST API.
150
150
  * @param customPost - The customPost object.
151
151
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
152
152
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -157,7 +157,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
157
157
  if (!path) {
158
158
  throw new Error('Parameter `path` is required when calling `customPost`.');
159
159
  }
160
- const requestPath = '/1{path}'.replace('{path}', path);
160
+ const requestPath = '/{path}'.replace('{path}', path);
161
161
  const headers = {};
162
162
  const queryParameters = parameters ? parameters : {};
163
163
  const request = {
@@ -172,7 +172,6 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
172
172
  /**
173
173
  * This method allow you to send requests to the Algolia REST API.
174
174
  *
175
- * @summary Send requests to the Algolia REST API.
176
175
  * @param customPut - The customPut object.
177
176
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
178
177
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -183,7 +182,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
183
182
  if (!path) {
184
183
  throw new Error('Parameter `path` is required when calling `customPut`.');
185
184
  }
186
- const requestPath = '/1{path}'.replace('{path}', path);
185
+ const requestPath = '/{path}'.replace('{path}', path);
187
186
  const headers = {};
188
187
  const queryParameters = parameters ? parameters : {};
189
188
  const request = {
@@ -196,11 +195,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
196
195
  return transporter.request(request, requestOptions);
197
196
  },
198
197
  /**
199
- * Delete an A/B test. To determine the `id` for an A/B test, use the [`listABTests` operation](#tag/abtest/operation/listABTests).
198
+ * Deletes an A/B test by its ID.
199
+ *
200
+ * Required API Key ACLs:
201
+ * - editSettings.
200
202
  *
201
- * @summary Delete an A/B test.
202
203
  * @param deleteABTest - The deleteABTest object.
203
- * @param deleteABTest.id - Unique A/B test ID.
204
+ * @param deleteABTest.id - Unique A/B test identifier.
204
205
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
205
206
  */
206
207
  deleteABTest({ id }, requestOptions) {
@@ -219,11 +220,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
219
220
  return transporter.request(request, requestOptions);
220
221
  },
221
222
  /**
222
- * 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).
223
+ * Retrieves the details for an A/B test by its ID.
224
+ *
225
+ * Required API Key ACLs:
226
+ * - analytics.
223
227
  *
224
- * @summary Get A/B test details.
225
228
  * @param getABTest - The getABTest object.
226
- * @param getABTest.id - Unique A/B test ID.
229
+ * @param getABTest.id - Unique A/B test identifier.
227
230
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
228
231
  */
229
232
  getABTest({ id }, requestOptions) {
@@ -242,14 +245,16 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
242
245
  return transporter.request(request, requestOptions);
243
246
  },
244
247
  /**
245
- * List all A/B tests.
248
+ * Lists all A/B tests you configured for this application.
249
+ *
250
+ * Required API Key ACLs:
251
+ * - analytics.
246
252
  *
247
- * @summary List all A/B tests.
248
253
  * @param listABTests - The listABTests object.
249
- * @param listABTests.offset - Position of the starting record. Used for paging. 0 is the first record.
250
- * @param listABTests.limit - Number of records to return (page size).
251
- * @param listABTests.indexPrefix - Only return A/B tests for indices starting with this prefix.
252
- * @param listABTests.indexSuffix - Only return A/B tests for indices ending with this suffix.
254
+ * @param listABTests.offset - Position of the first item to return.
255
+ * @param listABTests.limit - Number of items to return.
256
+ * @param listABTests.indexPrefix - Index name prefix. Only A/B tests for indices starting with this string are included in the response.
257
+ * @param listABTests.indexSuffix - Index name suffix. Only A/B tests for indices ending with this string are included in the response.
253
258
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
254
259
  */
255
260
  listABTests({ offset, limit, indexPrefix, indexSuffix } = {}, requestOptions = undefined) {
@@ -277,11 +282,13 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
277
282
  return transporter.request(request, requestOptions);
278
283
  },
279
284
  /**
280
- * 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).
285
+ * Stops an A/B test by its ID. You can\'t restart stopped A/B tests.
286
+ *
287
+ * Required API Key ACLs:
288
+ * - editSettings.
281
289
  *
282
- * @summary Stop an A/B test.
283
290
  * @param stopABTest - The stopABTest object.
284
- * @param stopABTest.id - Unique A/B test ID.
291
+ * @param stopABTest.id - Unique A/B test identifier.
285
292
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
286
293
  */
287
294
  stopABTest({ id }, requestOptions) {
@@ -303,7 +310,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
303
310
  }
304
311
 
305
312
  // 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.
306
- const apiClientVersion$3 = '5.0.0-alpha.98';
313
+ const apiClientVersion$3 = '5.0.0-beta.1';
307
314
  const REGIONS$1 = ['de', 'us'];
308
315
  function getDefaultHosts$2(region) {
309
316
  const url = !region
@@ -365,7 +372,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
365
372
  /**
366
373
  * This method allow you to send requests to the Algolia REST API.
367
374
  *
368
- * @summary Send requests to the Algolia REST API.
369
375
  * @param customDelete - The customDelete object.
370
376
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
371
377
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -375,7 +381,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
375
381
  if (!path) {
376
382
  throw new Error('Parameter `path` is required when calling `customDelete`.');
377
383
  }
378
- const requestPath = '/1{path}'.replace('{path}', path);
384
+ const requestPath = '/{path}'.replace('{path}', path);
379
385
  const headers = {};
380
386
  const queryParameters = parameters ? parameters : {};
381
387
  const request = {
@@ -389,7 +395,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
389
395
  /**
390
396
  * This method allow you to send requests to the Algolia REST API.
391
397
  *
392
- * @summary Send requests to the Algolia REST API.
393
398
  * @param customGet - The customGet object.
394
399
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
395
400
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -399,7 +404,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
399
404
  if (!path) {
400
405
  throw new Error('Parameter `path` is required when calling `customGet`.');
401
406
  }
402
- const requestPath = '/1{path}'.replace('{path}', path);
407
+ const requestPath = '/{path}'.replace('{path}', path);
403
408
  const headers = {};
404
409
  const queryParameters = parameters ? parameters : {};
405
410
  const request = {
@@ -413,7 +418,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
413
418
  /**
414
419
  * This method allow you to send requests to the Algolia REST API.
415
420
  *
416
- * @summary Send requests to the Algolia REST API.
417
421
  * @param customPost - The customPost object.
418
422
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
419
423
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -424,7 +428,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
424
428
  if (!path) {
425
429
  throw new Error('Parameter `path` is required when calling `customPost`.');
426
430
  }
427
- const requestPath = '/1{path}'.replace('{path}', path);
431
+ const requestPath = '/{path}'.replace('{path}', path);
428
432
  const headers = {};
429
433
  const queryParameters = parameters ? parameters : {};
430
434
  const request = {
@@ -439,7 +443,6 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
439
443
  /**
440
444
  * This method allow you to send requests to the Algolia REST API.
441
445
  *
442
- * @summary Send requests to the Algolia REST API.
443
446
  * @param customPut - The customPut object.
444
447
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
445
448
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -450,7 +453,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
450
453
  if (!path) {
451
454
  throw new Error('Parameter `path` is required when calling `customPut`.');
452
455
  }
453
- const requestPath = '/1{path}'.replace('{path}', path);
456
+ const requestPath = '/{path}'.replace('{path}', path);
454
457
  const headers = {};
455
458
  const queryParameters = parameters ? parameters : {};
456
459
  const request = {
@@ -463,14 +466,56 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
463
466
  return transporter.request(request, requestOptions);
464
467
  },
465
468
  /**
466
- * 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`.
469
+ * 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.
470
+ *
471
+ * Required API Key ACLs:
472
+ * - analytics.
473
+ *
474
+ * @param getAddToCartRate - The getAddToCartRate object.
475
+ * @param getAddToCartRate.index - Index name.
476
+ * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
477
+ * @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
478
+ * @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/).
479
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
480
+ */
481
+ getAddToCartRate({ index, startDate, endDate, tags }, requestOptions) {
482
+ if (!index) {
483
+ throw new Error('Parameter `index` is required when calling `getAddToCartRate`.');
484
+ }
485
+ const requestPath = '/2/conversions/addToCartRate';
486
+ const headers = {};
487
+ const queryParameters = {};
488
+ if (index !== undefined) {
489
+ queryParameters.index = index.toString();
490
+ }
491
+ if (startDate !== undefined) {
492
+ queryParameters.startDate = startDate.toString();
493
+ }
494
+ if (endDate !== undefined) {
495
+ queryParameters.endDate = endDate.toString();
496
+ }
497
+ if (tags !== undefined) {
498
+ queryParameters.tags = tags.toString();
499
+ }
500
+ const request = {
501
+ method: 'GET',
502
+ path: requestPath,
503
+ queryParameters,
504
+ headers,
505
+ };
506
+ return transporter.request(request, requestOptions);
507
+ },
508
+ /**
509
+ * 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.
510
+ *
511
+ * Required API Key ACLs:
512
+ * - analytics.
467
513
  *
468
- * @summary Get average click position.
469
514
  * @param getAverageClickPosition - The getAverageClickPosition object.
470
- * @param getAverageClickPosition.index - Index name to target.
471
- * @param getAverageClickPosition.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
472
- * @param getAverageClickPosition.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
473
- * @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.
515
+ * @param getAverageClickPosition.index - Index name.
516
+ * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
517
+ * @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
518
+ * @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/).
474
519
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
475
520
  */
476
521
  getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
@@ -501,14 +546,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
501
546
  return transporter.request(request, requestOptions);
502
547
  },
503
548
  /**
504
- * 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`.
549
+ * 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.
550
+ *
551
+ * Required API Key ACLs:
552
+ * - analytics.
505
553
  *
506
- * @summary Get click positions.
507
554
  * @param getClickPositions - The getClickPositions object.
508
- * @param getClickPositions.index - Index name to target.
509
- * @param getClickPositions.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
510
- * @param getClickPositions.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
511
- * @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.
555
+ * @param getClickPositions.index - Index name.
556
+ * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
557
+ * @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
558
+ * @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/).
512
559
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
513
560
  */
514
561
  getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
@@ -539,14 +586,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
539
586
  return transporter.request(request, requestOptions);
540
587
  },
541
588
  /**
542
- * Returns a [click-through rate (CTR)](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-through-rate).
589
+ * 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.
590
+ *
591
+ * Required API Key ACLs:
592
+ * - analytics.
543
593
  *
544
- * @summary Get click-through rate (CTR).
545
594
  * @param getClickThroughRate - The getClickThroughRate object.
546
- * @param getClickThroughRate.index - Index name to target.
547
- * @param getClickThroughRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
548
- * @param getClickThroughRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
549
- * @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.
595
+ * @param getClickThroughRate.index - Index name.
596
+ * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
597
+ * @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
598
+ * @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/).
550
599
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
551
600
  */
552
601
  getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -577,19 +626,21 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
577
626
  return transporter.request(request, requestOptions);
578
627
  },
579
628
  /**
580
- * Return a [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
629
+ * 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.
630
+ *
631
+ * Required API Key ACLs:
632
+ * - analytics.
581
633
  *
582
- * @summary Get conversion rate (CR).
583
- * @param getConversationRate - The getConversationRate object.
584
- * @param getConversationRate.index - Index name to target.
585
- * @param getConversationRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
586
- * @param getConversationRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
587
- * @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.
634
+ * @param getConversionRate - The getConversionRate object.
635
+ * @param getConversionRate.index - Index name.
636
+ * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
637
+ * @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
638
+ * @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/).
588
639
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
589
640
  */
590
- getConversationRate({ index, startDate, endDate, tags }, requestOptions) {
641
+ getConversionRate({ index, startDate, endDate, tags }, requestOptions) {
591
642
  if (!index) {
592
- throw new Error('Parameter `index` is required when calling `getConversationRate`.');
643
+ throw new Error('Parameter `index` is required when calling `getConversionRate`.');
593
644
  }
594
645
  const requestPath = '/2/conversions/conversionRate';
595
646
  const headers = {};
@@ -615,14 +666,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
615
666
  return transporter.request(request, requestOptions);
616
667
  },
617
668
  /**
618
- * 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.
669
+ * 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.
670
+ *
671
+ * Required API Key ACLs:
672
+ * - analytics.
619
673
  *
620
- * @summary Get no click rate.
621
674
  * @param getNoClickRate - The getNoClickRate object.
622
- * @param getNoClickRate.index - Index name to target.
623
- * @param getNoClickRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
624
- * @param getNoClickRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
625
- * @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.
675
+ * @param getNoClickRate.index - Index name.
676
+ * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
677
+ * @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
678
+ * @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/).
626
679
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
627
680
  */
628
681
  getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -653,14 +706,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
653
706
  return transporter.request(request, requestOptions);
654
707
  },
655
708
  /**
656
- * Returns the rate at which searches didn\'t return any results.
709
+ * 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.
710
+ *
711
+ * Required API Key ACLs:
712
+ * - analytics.
657
713
  *
658
- * @summary Get no results rate.
659
714
  * @param getNoResultsRate - The getNoResultsRate object.
660
- * @param getNoResultsRate.index - Index name to target.
661
- * @param getNoResultsRate.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
662
- * @param getNoResultsRate.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
663
- * @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.
715
+ * @param getNoResultsRate.index - Index name.
716
+ * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
717
+ * @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
718
+ * @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/).
664
719
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
665
720
  */
666
721
  getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
@@ -691,14 +746,96 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
691
746
  return transporter.request(request, requestOptions);
692
747
  },
693
748
  /**
694
- * Returns the number of searches within a time range.
749
+ * 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.
750
+ *
751
+ * Required API Key ACLs:
752
+ * - analytics.
753
+ *
754
+ * @param getPurchaseRate - The getPurchaseRate object.
755
+ * @param getPurchaseRate.index - Index name.
756
+ * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
757
+ * @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
758
+ * @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/).
759
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
760
+ */
761
+ getPurchaseRate({ index, startDate, endDate, tags }, requestOptions) {
762
+ if (!index) {
763
+ throw new Error('Parameter `index` is required when calling `getPurchaseRate`.');
764
+ }
765
+ const requestPath = '/2/conversions/purchaseRate';
766
+ const headers = {};
767
+ const queryParameters = {};
768
+ if (index !== undefined) {
769
+ queryParameters.index = index.toString();
770
+ }
771
+ if (startDate !== undefined) {
772
+ queryParameters.startDate = startDate.toString();
773
+ }
774
+ if (endDate !== undefined) {
775
+ queryParameters.endDate = endDate.toString();
776
+ }
777
+ if (tags !== undefined) {
778
+ queryParameters.tags = tags.toString();
779
+ }
780
+ const request = {
781
+ method: 'GET',
782
+ path: requestPath,
783
+ queryParameters,
784
+ headers,
785
+ };
786
+ return transporter.request(request, requestOptions);
787
+ },
788
+ /**
789
+ * 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.
790
+ *
791
+ * Required API Key ACLs:
792
+ * - analytics.
793
+ *
794
+ * @param getRevenue - The getRevenue object.
795
+ * @param getRevenue.index - Index name.
796
+ * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
797
+ * @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
798
+ * @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/).
799
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
800
+ */
801
+ getRevenue({ index, startDate, endDate, tags }, requestOptions) {
802
+ if (!index) {
803
+ throw new Error('Parameter `index` is required when calling `getRevenue`.');
804
+ }
805
+ const requestPath = '/2/conversions/revenue';
806
+ const headers = {};
807
+ const queryParameters = {};
808
+ if (index !== undefined) {
809
+ queryParameters.index = index.toString();
810
+ }
811
+ if (startDate !== undefined) {
812
+ queryParameters.startDate = startDate.toString();
813
+ }
814
+ if (endDate !== undefined) {
815
+ queryParameters.endDate = endDate.toString();
816
+ }
817
+ if (tags !== undefined) {
818
+ queryParameters.tags = tags.toString();
819
+ }
820
+ const request = {
821
+ method: 'GET',
822
+ path: requestPath,
823
+ queryParameters,
824
+ headers,
825
+ };
826
+ return transporter.request(request, requestOptions);
827
+ },
828
+ /**
829
+ * 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.
830
+ *
831
+ * Required API Key ACLs:
832
+ * - analytics.
695
833
  *
696
- * @summary Get number of searches.
697
834
  * @param getSearchesCount - The getSearchesCount object.
698
- * @param getSearchesCount.index - Index name to target.
699
- * @param getSearchesCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
700
- * @param getSearchesCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
701
- * @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.
835
+ * @param getSearchesCount.index - Index name.
836
+ * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
837
+ * @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
838
+ * @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/).
702
839
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
703
840
  */
704
841
  getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
@@ -729,16 +866,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
729
866
  return transporter.request(request, requestOptions);
730
867
  },
731
868
  /**
732
- * Return the most popular of the last 1,000 searches that didn\'t lead to any clicks.
869
+ * Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
870
+ *
871
+ * Required API Key ACLs:
872
+ * - analytics.
733
873
  *
734
- * @summary Get top searches with no clicks.
735
874
  * @param getSearchesNoClicks - The getSearchesNoClicks object.
736
- * @param getSearchesNoClicks.index - Index name to target.
737
- * @param getSearchesNoClicks.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
738
- * @param getSearchesNoClicks.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
739
- * @param getSearchesNoClicks.limit - Number of records to return (page size).
740
- * @param getSearchesNoClicks.offset - Position of the starting record. Used for paging. 0 is the first record.
741
- * @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.
875
+ * @param getSearchesNoClicks.index - Index name.
876
+ * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
877
+ * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
878
+ * @param getSearchesNoClicks.limit - Number of items to return.
879
+ * @param getSearchesNoClicks.offset - Position of the first item to return.
880
+ * @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/).
742
881
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
743
882
  */
744
883
  getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -775,16 +914,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
775
914
  return transporter.request(request, requestOptions);
776
915
  },
777
916
  /**
778
- * Returns the most popular of the latest 1,000 searches that didn\'t return any results.
917
+ * Retrieves the most popular searches that didn\'t return any results.
918
+ *
919
+ * Required API Key ACLs:
920
+ * - analytics.
779
921
  *
780
- * @summary Get top searches with no results.
781
922
  * @param getSearchesNoResults - The getSearchesNoResults object.
782
- * @param getSearchesNoResults.index - Index name to target.
783
- * @param getSearchesNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
784
- * @param getSearchesNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
785
- * @param getSearchesNoResults.limit - Number of records to return (page size).
786
- * @param getSearchesNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
787
- * @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.
923
+ * @param getSearchesNoResults.index - Index name.
924
+ * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
925
+ * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
926
+ * @param getSearchesNoResults.limit - Number of items to return.
927
+ * @param getSearchesNoResults.offset - Position of the first item to return.
928
+ * @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/).
788
929
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
789
930
  */
790
931
  getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -821,11 +962,13 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
821
962
  return transporter.request(request, requestOptions);
822
963
  },
823
964
  /**
824
- * 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.
965
+ * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
966
+ *
967
+ * Required API Key ACLs:
968
+ * - analytics.
825
969
  *
826
- * @summary Get Analytics API status.
827
970
  * @param getStatus - The getStatus object.
828
- * @param getStatus.index - Index name to target.
971
+ * @param getStatus.index - Index name.
829
972
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
830
973
  */
831
974
  getStatus({ index }, requestOptions) {
@@ -847,16 +990,18 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
847
990
  return transporter.request(request, requestOptions);
848
991
  },
849
992
  /**
850
- * Returns top countries. Limited to the 1,000 most frequent ones.
993
+ * Retrieves the countries with the most searches to your index.
994
+ *
995
+ * Required API Key ACLs:
996
+ * - analytics.
851
997
  *
852
- * @summary Get top countries.
853
998
  * @param getTopCountries - The getTopCountries object.
854
- * @param getTopCountries.index - Index name to target.
855
- * @param getTopCountries.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
856
- * @param getTopCountries.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
857
- * @param getTopCountries.limit - Number of records to return (page size).
858
- * @param getTopCountries.offset - Position of the starting record. Used for paging. 0 is the first record.
859
- * @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.
999
+ * @param getTopCountries.index - Index name.
1000
+ * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1001
+ * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1002
+ * @param getTopCountries.limit - Number of items to return.
1003
+ * @param getTopCountries.offset - Position of the first item to return.
1004
+ * @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/).
860
1005
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
861
1006
  */
862
1007
  getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
@@ -893,17 +1038,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
893
1038
  return transporter.request(request, requestOptions);
894
1039
  },
895
1040
  /**
896
- * 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.
1041
+ * Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
1042
+ *
1043
+ * Required API Key ACLs:
1044
+ * - analytics.
897
1045
  *
898
- * @summary Get top filterable attributes.
899
1046
  * @param getTopFilterAttributes - The getTopFilterAttributes object.
900
- * @param getTopFilterAttributes.index - Index name to target.
901
- * @param getTopFilterAttributes.search - User query.
902
- * @param getTopFilterAttributes.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
903
- * @param getTopFilterAttributes.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
904
- * @param getTopFilterAttributes.limit - Number of records to return (page size).
905
- * @param getTopFilterAttributes.offset - Position of the starting record. Used for paging. 0 is the first record.
906
- * @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.
1047
+ * @param getTopFilterAttributes.index - Index name.
1048
+ * @param getTopFilterAttributes.search - Search query.
1049
+ * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1050
+ * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1051
+ * @param getTopFilterAttributes.limit - Number of items to return.
1052
+ * @param getTopFilterAttributes.offset - Position of the first item to return.
1053
+ * @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/).
907
1054
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
908
1055
  */
909
1056
  getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -943,18 +1090,20 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
943
1090
  return transporter.request(request, requestOptions);
944
1091
  },
945
1092
  /**
946
- * Returns the most popular filter values for an attribute in the 1,000 most recently used filters.
1093
+ * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
1094
+ *
1095
+ * Required API Key ACLs:
1096
+ * - analytics.
947
1097
  *
948
- * @summary Get top filter values for an attribute.
949
1098
  * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
950
1099
  * @param getTopFilterForAttribute.attribute - Attribute name.
951
- * @param getTopFilterForAttribute.index - Index name to target.
952
- * @param getTopFilterForAttribute.search - User query.
953
- * @param getTopFilterForAttribute.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
954
- * @param getTopFilterForAttribute.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
955
- * @param getTopFilterForAttribute.limit - Number of records to return (page size).
956
- * @param getTopFilterForAttribute.offset - Position of the starting record. Used for paging. 0 is the first record.
957
- * @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.
1100
+ * @param getTopFilterForAttribute.index - Index name.
1101
+ * @param getTopFilterForAttribute.search - Search query.
1102
+ * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1103
+ * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1104
+ * @param getTopFilterForAttribute.limit - Number of items to return.
1105
+ * @param getTopFilterForAttribute.offset - Position of the first item to return.
1106
+ * @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/).
958
1107
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
959
1108
  */
960
1109
  getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -997,17 +1146,19 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
997
1146
  return transporter.request(request, requestOptions);
998
1147
  },
999
1148
  /**
1000
- * Returns top filters for filter-enabled searches that don\'t return results. Limited to the 1,000 most recently used filters.
1149
+ * 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.
1150
+ *
1151
+ * Required API Key ACLs:
1152
+ * - analytics.
1001
1153
  *
1002
- * @summary Get top filters for a no result search.
1003
1154
  * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
1004
- * @param getTopFiltersNoResults.index - Index name to target.
1005
- * @param getTopFiltersNoResults.search - User query.
1006
- * @param getTopFiltersNoResults.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1007
- * @param getTopFiltersNoResults.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1008
- * @param getTopFiltersNoResults.limit - Number of records to return (page size).
1009
- * @param getTopFiltersNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
1010
- * @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.
1155
+ * @param getTopFiltersNoResults.index - Index name.
1156
+ * @param getTopFiltersNoResults.search - Search query.
1157
+ * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1158
+ * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1159
+ * @param getTopFiltersNoResults.limit - Number of items to return.
1160
+ * @param getTopFiltersNoResults.offset - Position of the first item to return.
1161
+ * @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/).
1011
1162
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1012
1163
  */
1013
1164
  getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
@@ -1047,21 +1198,24 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1047
1198
  return transporter.request(request, requestOptions);
1048
1199
  },
1049
1200
  /**
1050
- * Return the most popular clicked results in the last 1,000 searches.
1201
+ * Retrieves the object IDs of the most frequent search results.
1202
+ *
1203
+ * Required API Key ACLs:
1204
+ * - analytics.
1051
1205
  *
1052
- * @summary Get top hits.
1053
1206
  * @param getTopHits - The getTopHits object.
1054
- * @param getTopHits.index - Index name to target.
1055
- * @param getTopHits.search - User query.
1056
- * @param getTopHits.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
1057
- * @param getTopHits.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1058
- * @param getTopHits.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1059
- * @param getTopHits.limit - Number of records to return (page size).
1060
- * @param getTopHits.offset - Position of the starting record. Used for paging. 0 is the first record.
1061
- * @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.
1062
- * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1063
- */
1064
- getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
1207
+ * @param getTopHits.index - Index name.
1208
+ * @param getTopHits.search - Search query.
1209
+ * @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
1210
+ * @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.
1211
+ * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1212
+ * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1213
+ * @param getTopHits.limit - Number of items to return.
1214
+ * @param getTopHits.offset - Position of the first item to return.
1215
+ * @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/).
1216
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1217
+ */
1218
+ getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
1065
1219
  if (!index) {
1066
1220
  throw new Error('Parameter `index` is required when calling `getTopHits`.');
1067
1221
  }
@@ -1077,6 +1231,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1077
1231
  if (clickAnalytics !== undefined) {
1078
1232
  queryParameters.clickAnalytics = clickAnalytics.toString();
1079
1233
  }
1234
+ if (revenueAnalytics !== undefined) {
1235
+ queryParameters.revenueAnalytics = revenueAnalytics.toString();
1236
+ }
1080
1237
  if (startDate !== undefined) {
1081
1238
  queryParameters.startDate = startDate.toString();
1082
1239
  }
@@ -1101,22 +1258,25 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1101
1258
  return transporter.request(request, requestOptions);
1102
1259
  },
1103
1260
  /**
1104
- * Returns the most popular of the latest 1,000 searches. For each search, also returns the number of hits.
1261
+ * Returns the most popular search terms.
1262
+ *
1263
+ * Required API Key ACLs:
1264
+ * - analytics.
1105
1265
  *
1106
- * @summary Get top searches.
1107
1266
  * @param getTopSearches - The getTopSearches object.
1108
- * @param getTopSearches.index - Index name to target.
1109
- * @param getTopSearches.clickAnalytics - Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
1110
- * @param getTopSearches.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1111
- * @param getTopSearches.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1112
- * @param getTopSearches.orderBy - Reorder the results.
1267
+ * @param getTopSearches.index - Index name.
1268
+ * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
1269
+ * @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.
1270
+ * @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1271
+ * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1272
+ * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
1113
1273
  * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
1114
- * @param getTopSearches.limit - Number of records to return (page size).
1115
- * @param getTopSearches.offset - Position of the starting record. Used for paging. 0 is the first record.
1116
- * @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.
1274
+ * @param getTopSearches.limit - Number of items to return.
1275
+ * @param getTopSearches.offset - Position of the first item to return.
1276
+ * @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/).
1117
1277
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1118
1278
  */
1119
- getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
1279
+ getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
1120
1280
  if (!index) {
1121
1281
  throw new Error('Parameter `index` is required when calling `getTopSearches`.');
1122
1282
  }
@@ -1129,6 +1289,9 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1129
1289
  if (clickAnalytics !== undefined) {
1130
1290
  queryParameters.clickAnalytics = clickAnalytics.toString();
1131
1291
  }
1292
+ if (revenueAnalytics !== undefined) {
1293
+ queryParameters.revenueAnalytics = revenueAnalytics.toString();
1294
+ }
1132
1295
  if (startDate !== undefined) {
1133
1296
  queryParameters.startDate = startDate.toString();
1134
1297
  }
@@ -1159,14 +1322,16 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1159
1322
  return transporter.request(request, requestOptions);
1160
1323
  },
1161
1324
  /**
1162
- * Return the count of unique users.
1325
+ * 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.
1326
+ *
1327
+ * Required API Key ACLs:
1328
+ * - analytics.
1163
1329
  *
1164
- * @summary Get user count.
1165
1330
  * @param getUsersCount - The getUsersCount object.
1166
- * @param getUsersCount.index - Index name to target.
1167
- * @param getUsersCount.startDate - Start date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1168
- * @param getUsersCount.endDate - End date (a string in the format `YYYY-MM-DD`) of the period to analyze.
1169
- * @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.
1331
+ * @param getUsersCount.index - Index name.
1332
+ * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1333
+ * @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1334
+ * @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/).
1170
1335
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1171
1336
  */
1172
1337
  getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
@@ -1200,7 +1365,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
1200
1365
  }
1201
1366
 
1202
1367
  // 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.
1203
- const apiClientVersion$2 = '5.0.0-alpha.98';
1368
+ const apiClientVersion$2 = '5.0.0-beta.1';
1204
1369
  const REGIONS = ['eu', 'us'];
1205
1370
  function getDefaultHosts$1(region) {
1206
1371
  const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
@@ -1260,7 +1425,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1260
1425
  /**
1261
1426
  * This method allow you to send requests to the Algolia REST API.
1262
1427
  *
1263
- * @summary Send requests to the Algolia REST API.
1264
1428
  * @param customDelete - The customDelete object.
1265
1429
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1266
1430
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -1270,7 +1434,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1270
1434
  if (!path) {
1271
1435
  throw new Error('Parameter `path` is required when calling `customDelete`.');
1272
1436
  }
1273
- const requestPath = '/1{path}'.replace('{path}', path);
1437
+ const requestPath = '/{path}'.replace('{path}', path);
1274
1438
  const headers = {};
1275
1439
  const queryParameters = parameters ? parameters : {};
1276
1440
  const request = {
@@ -1284,7 +1448,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1284
1448
  /**
1285
1449
  * This method allow you to send requests to the Algolia REST API.
1286
1450
  *
1287
- * @summary Send requests to the Algolia REST API.
1288
1451
  * @param customGet - The customGet object.
1289
1452
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1290
1453
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -1294,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1294
1457
  if (!path) {
1295
1458
  throw new Error('Parameter `path` is required when calling `customGet`.');
1296
1459
  }
1297
- const requestPath = '/1{path}'.replace('{path}', path);
1460
+ const requestPath = '/{path}'.replace('{path}', path);
1298
1461
  const headers = {};
1299
1462
  const queryParameters = parameters ? parameters : {};
1300
1463
  const request = {
@@ -1308,7 +1471,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1308
1471
  /**
1309
1472
  * This method allow you to send requests to the Algolia REST API.
1310
1473
  *
1311
- * @summary Send requests to the Algolia REST API.
1312
1474
  * @param customPost - The customPost object.
1313
1475
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1314
1476
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -1319,7 +1481,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1319
1481
  if (!path) {
1320
1482
  throw new Error('Parameter `path` is required when calling `customPost`.');
1321
1483
  }
1322
- const requestPath = '/1{path}'.replace('{path}', path);
1484
+ const requestPath = '/{path}'.replace('{path}', path);
1323
1485
  const headers = {};
1324
1486
  const queryParameters = parameters ? parameters : {};
1325
1487
  const request = {
@@ -1334,7 +1496,6 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1334
1496
  /**
1335
1497
  * This method allow you to send requests to the Algolia REST API.
1336
1498
  *
1337
- * @summary Send requests to the Algolia REST API.
1338
1499
  * @param customPut - The customPut object.
1339
1500
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
1340
1501
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -1345,7 +1506,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1345
1506
  if (!path) {
1346
1507
  throw new Error('Parameter `path` is required when calling `customPut`.');
1347
1508
  }
1348
- const requestPath = '/1{path}'.replace('{path}', path);
1509
+ const requestPath = '/{path}'.replace('{path}', path);
1349
1510
  const headers = {};
1350
1511
  const queryParameters = parameters ? parameters : {};
1351
1512
  const request = {
@@ -1358,11 +1519,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1358
1519
  return transporter.request(request, requestOptions);
1359
1520
  },
1360
1521
  /**
1361
- * 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.
1522
+ * Deletes a user profile. The response includes a date and time when the user profile can safely be considered deleted.
1523
+ *
1524
+ * Required API Key ACLs:
1525
+ * - recommendation.
1362
1526
  *
1363
- * @summary Delete a user profile.
1364
1527
  * @param deleteUserProfile - The deleteUserProfile object.
1365
- * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1528
+ * @param deleteUserProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
1366
1529
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1367
1530
  */
1368
1531
  deleteUserProfile({ userToken }, requestOptions) {
@@ -1381,9 +1544,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1381
1544
  return transporter.request(request, requestOptions);
1382
1545
  },
1383
1546
  /**
1384
- * The strategy contains information on the events and facets that impact user profiles and personalized search results.
1547
+ * Retrieves the current personalization strategy.
1548
+ *
1549
+ * Required API Key ACLs:
1550
+ * - recommendation.
1385
1551
  *
1386
- * @summary Get the current strategy.
1387
1552
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1388
1553
  */
1389
1554
  getPersonalizationStrategy(requestOptions) {
@@ -1399,11 +1564,13 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1399
1564
  return transporter.request(request, requestOptions);
1400
1565
  },
1401
1566
  /**
1402
- * 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.
1567
+ * Retrieves a user profile and their affinities for different facets.
1568
+ *
1569
+ * Required API Key ACLs:
1570
+ * - recommendation.
1403
1571
  *
1404
- * @summary Get a user profile.
1405
1572
  * @param getUserTokenProfile - The getUserTokenProfile object.
1406
- * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1573
+ * @param getUserTokenProfile.userToken - Unique identifier representing a user for which to fetch the personalization profile.
1407
1574
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1408
1575
  */
1409
1576
  getUserTokenProfile({ userToken }, requestOptions) {
@@ -1422,9 +1589,11 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1422
1589
  return transporter.request(request, requestOptions);
1423
1590
  },
1424
1591
  /**
1425
- * A strategy defines the events and facets that impact user profiles and personalized search results.
1592
+ * Creates a new personalization strategy.
1593
+ *
1594
+ * Required API Key ACLs:
1595
+ * - recommendation.
1426
1596
  *
1427
- * @summary Set a new strategy.
1428
1597
  * @param personalizationStrategyParams - The personalizationStrategyParams object.
1429
1598
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1430
1599
  */
@@ -1457,7 +1626,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
1457
1626
  }
1458
1627
 
1459
1628
  // 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.
1460
- const apiClientVersion$1 = '5.0.0-alpha.98';
1629
+ const apiClientVersion$1 = '5.0.0-beta.1';
1461
1630
  function getDefaultHosts(appId) {
1462
1631
  return [
1463
1632
  {
@@ -1543,7 +1712,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1543
1712
  * Helper: Wait for a task to be published (completed) for a given `indexName` and `taskID`.
1544
1713
  *
1545
1714
  * @summary Helper method that waits for a task to be published (completed).
1546
- * @param waitForTaskOptions - The waitForTaskOptions object.
1715
+ * @param waitForTaskOptions - The `waitForTaskOptions` object.
1547
1716
  * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
1548
1717
  * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
1549
1718
  * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
@@ -1567,7 +1736,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1567
1736
  * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
1568
1737
  *
1569
1738
  * @summary Helper method that waits for an API key task to be processed.
1570
- * @param waitForApiKeyOptions - The waitForApiKeyOptions object.
1739
+ * @param waitForApiKeyOptions - The `waitForApiKeyOptions` object.
1571
1740
  * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
1572
1741
  * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
1573
1742
  * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
@@ -1620,7 +1789,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1620
1789
  * Helper: Iterate on the `browse` method of the client to allow aggregating objects of an index.
1621
1790
  *
1622
1791
  * @summary Helper method that iterates on the `browse` method.
1623
- * @param browseObjects - The browseObjects object.
1792
+ * @param browseObjects - The `browseObjects` object.
1624
1793
  * @param browseObjects.indexName - The index in which to perform the request.
1625
1794
  * @param browseObjects.browseParams - The `browse` parameters.
1626
1795
  * @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.
@@ -1646,11 +1815,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1646
1815
  * Helper: Iterate on the `searchRules` method of the client to allow aggregating rules of an index.
1647
1816
  *
1648
1817
  * @summary Helper method that iterates on the `searchRules` method.
1649
- * @param browseObjects - The browseObjects object.
1650
- * @param browseObjects.indexName - The index in which to perform the request.
1651
- * @param browseObjects.searchRulesParams - The `searchRules` method parameters.
1652
- * @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).
1653
- * @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`.
1818
+ * @param browseRules - The `browseRules` object.
1819
+ * @param browseRules.indexName - The index in which to perform the request.
1820
+ * @param browseRules.searchRulesParams - The `searchRules` method parameters.
1821
+ * @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).
1822
+ * @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`.
1654
1823
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
1655
1824
  */
1656
1825
  browseRules({ indexName, searchRulesParams, ...browseRulesOptions }, requestOptions) {
@@ -1678,11 +1847,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1678
1847
  * Helper: Iterate on the `searchSynonyms` method of the client to allow aggregating rules of an index.
1679
1848
  *
1680
1849
  * @summary Helper method that iterates on the `searchSynonyms` method.
1681
- * @param browseObjects - The browseObjects object.
1682
- * @param browseObjects.indexName - The index in which to perform the request.
1683
- * @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).
1684
- * @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`.
1685
- * @param browseObjects.searchSynonymsParams - The `searchSynonyms` method parameters.
1850
+ * @param browseSynonyms - The `browseSynonyms` object.
1851
+ * @param browseSynonyms.indexName - The index in which to perform the request.
1852
+ * @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).
1853
+ * @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`.
1854
+ * @param browseSynonyms.searchSynonymsParams - The `searchSynonyms` method parameters.
1686
1855
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
1687
1856
  */
1688
1857
  browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }, requestOptions) {
@@ -1692,16 +1861,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1692
1861
  hitsPerPage: 1000,
1693
1862
  };
1694
1863
  return clientCommon.createIterablePromise({
1695
- func: (previousResponse) => {
1696
- return this.searchSynonyms({
1864
+ func: (_) => {
1865
+ const resp = this.searchSynonyms({
1697
1866
  indexName,
1698
1867
  searchSynonymsParams: {
1699
1868
  ...params,
1700
- page: previousResponse
1701
- ? previousResponse.page + 1
1702
- : params.page,
1869
+ page: params.page,
1703
1870
  },
1704
1871
  }, requestOptions);
1872
+ params.page += 1;
1873
+ return resp;
1705
1874
  },
1706
1875
  validate: (response) => response.nbHits < params.hitsPerPage,
1707
1876
  ...browseSynonymsOptions,
@@ -1730,9 +1899,76 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1730
1899
  return this.search(searchMethodParams, requestOptions);
1731
1900
  },
1732
1901
  /**
1733
- * 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.
1902
+ * Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1903
+ *
1904
+ * @summary Helper: Chunks the given `objects` list in subset of 1000 elements max in order to make it fit in `batch` requests.
1905
+ * @param chunkedBatch - The `chunkedBatch` object.
1906
+ * @param chunkedBatch.indexName - The `indexName` to replace `objects` in.
1907
+ * @param chunkedBatch.objects - The array of `objects` to store in the given Algolia `indexName`.
1908
+ * @param chunkedBatch.action - The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
1909
+ * @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.
1910
+ * @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.
1911
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1912
+ */
1913
+ async chunkedBatch({ indexName, objects, action = 'addObject', waitForTasks, batchSize = 1000, }, requestOptions) {
1914
+ let requests = [];
1915
+ const responses = [];
1916
+ for (const [i, obj] of objects.entries()) {
1917
+ requests.push({ action, body: obj });
1918
+ if (i % batchSize === 0) {
1919
+ responses.push(await this.batch({ indexName, batchWriteParams: { requests } }, requestOptions));
1920
+ requests = [];
1921
+ }
1922
+ }
1923
+ if (waitForTasks) {
1924
+ for (const resp of responses) {
1925
+ await this.waitForTask({ indexName, taskID: resp.taskID });
1926
+ }
1927
+ }
1928
+ return responses;
1929
+ },
1930
+ /**
1931
+ * 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.
1932
+ *
1933
+ * @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.
1934
+ * @param replaceAllObjects - The `replaceAllObjects` object.
1935
+ * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.
1936
+ * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
1937
+ * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
1938
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1939
+ */
1940
+ async replaceAllObjects({ indexName, objects, batchSize }, requestOptions) {
1941
+ const randomSuffix = Math.random().toString(36).substring(7);
1942
+ const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;
1943
+ const copyOperationResponse = await this.operationIndex({
1944
+ indexName,
1945
+ operationIndexParams: {
1946
+ operation: 'copy',
1947
+ destination: tmpIndexName,
1948
+ scope: ['settings', 'rules', 'synonyms'],
1949
+ },
1950
+ }, requestOptions);
1951
+ await this.waitForTask({
1952
+ indexName,
1953
+ taskID: copyOperationResponse.taskID,
1954
+ });
1955
+ const batchResponses = await this.chunkedBatch({ indexName: tmpIndexName, objects, waitForTasks: true, batchSize }, requestOptions);
1956
+ const moveOperationResponse = await this.operationIndex({
1957
+ indexName: tmpIndexName,
1958
+ operationIndexParams: { operation: 'move', destination: indexName },
1959
+ }, requestOptions);
1960
+ await this.waitForTask({
1961
+ indexName,
1962
+ taskID: moveOperationResponse.taskID,
1963
+ });
1964
+ return { copyOperationResponse, batchResponses, moveOperationResponse };
1965
+ },
1966
+ /**
1967
+ * Creates a new API key with specific permissions and restrictions.
1968
+ *
1969
+ * Required API Key ACLs:
1970
+ * - admin.
1734
1971
  *
1735
- * @summary Add API key.
1736
1972
  * @param apiKey - The apiKey object.
1737
1973
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1738
1974
  */
@@ -1756,13 +1992,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1756
1992
  return transporter.request(request, requestOptions);
1757
1993
  },
1758
1994
  /**
1759
- * 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).
1995
+ * 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).
1996
+ *
1997
+ * Required API Key ACLs:
1998
+ * - addObject.
1760
1999
  *
1761
- * @summary Add or update a record (using objectID).
1762
2000
  * @param addOrUpdateObject - The addOrUpdateObject object.
1763
- * @param addOrUpdateObject.indexName - Index on which to perform the request.
1764
- * @param addOrUpdateObject.objectID - Unique record (object) identifier.
1765
- * @param addOrUpdateObject.body - Algolia record.
2001
+ * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
2002
+ * @param addOrUpdateObject.objectID - Unique record identifier.
2003
+ * @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
1766
2004
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1767
2005
  */
1768
2006
  addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
@@ -1790,9 +2028,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1790
2028
  return transporter.request(request, requestOptions);
1791
2029
  },
1792
2030
  /**
1793
- * Add a source to the list of allowed sources.
2031
+ * Adds a source to the list of allowed sources.
2032
+ *
2033
+ * Required API Key ACLs:
2034
+ * - admin.
1794
2035
  *
1795
- * @summary Add a source.
1796
2036
  * @param source - Source to add.
1797
2037
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1798
2038
  */
@@ -1816,11 +2056,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1816
2056
  return transporter.request(request, requestOptions);
1817
2057
  },
1818
2058
  /**
1819
- * 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.
2059
+ * 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.
2060
+ *
2061
+ * Required API Key ACLs:
2062
+ * - admin.
1820
2063
  *
1821
- * @summary Assign or move a user ID.
1822
2064
  * @param assignUserId - The assignUserId object.
1823
- * @param assignUserId.xAlgoliaUserID - UserID to assign.
2065
+ * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
1824
2066
  * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
1825
2067
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1826
2068
  */
@@ -1850,11 +2092,10 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1850
2092
  return transporter.request(request, requestOptions);
1851
2093
  },
1852
2094
  /**
1853
- * 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.
2095
+ * 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.
1854
2096
  *
1855
- * @summary Batch write operations on one index.
1856
2097
  * @param batch - The batch object.
1857
- * @param batch.indexName - Index on which to perform the request.
2098
+ * @param batch.indexName - Name of the index on which to perform the operation.
1858
2099
  * @param batch.batchWriteParams - The batchWriteParams object.
1859
2100
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1860
2101
  */
@@ -1881,11 +2122,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1881
2122
  return transporter.request(request, requestOptions);
1882
2123
  },
1883
2124
  /**
1884
- * Assign multiple user IDs to a cluster. **You can\'t _move_ users with this operation.**.
2125
+ * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
2126
+ *
2127
+ * Required API Key ACLs:
2128
+ * - admin.
1885
2129
  *
1886
- * @summary Batch assign userIDs.
1887
2130
  * @param batchAssignUserIds - The batchAssignUserIds object.
1888
- * @param batchAssignUserIds.xAlgoliaUserID - UserID to assign.
2131
+ * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
1889
2132
  * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
1890
2133
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1891
2134
  */
@@ -1918,11 +2161,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1918
2161
  return transporter.request(request, requestOptions);
1919
2162
  },
1920
2163
  /**
1921
- * Add or remove a batch of dictionary entries.
2164
+ * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
2165
+ *
2166
+ * Required API Key ACLs:
2167
+ * - editSettings.
1922
2168
  *
1923
- * @summary Batch dictionary entries.
1924
2169
  * @param batchDictionaryEntries - The batchDictionaryEntries object.
1925
- * @param batchDictionaryEntries.dictionaryName - Dictionary to search in.
2170
+ * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
1926
2171
  * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
1927
2172
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1928
2173
  */
@@ -1949,11 +2194,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1949
2194
  return transporter.request(request, requestOptions);
1950
2195
  },
1951
2196
  /**
1952
- * 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.
2197
+ * 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. - Deduplication (`distinct`) is turned off. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance.
2198
+ *
2199
+ * Required API Key ACLs:
2200
+ * - browse.
1953
2201
  *
1954
- * @summary Get all records from an index.
1955
2202
  * @param browse - The browse object.
1956
- * @param browse.indexName - Index on which to perform the request.
2203
+ * @param browse.indexName - Name of the index on which to perform the operation.
1957
2204
  * @param browse.browseParams - The browseParams object.
1958
2205
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1959
2206
  */
@@ -1974,11 +2221,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1974
2221
  return transporter.request(request, requestOptions);
1975
2222
  },
1976
2223
  /**
1977
- * Delete the records but leave settings and index-specific API keys untouched.
2224
+ * Deletes only the records from an index while keeping settings, synonyms, and rules.
2225
+ *
2226
+ * Required API Key ACLs:
2227
+ * - deleteIndex.
1978
2228
  *
1979
- * @summary Delete all records from an index.
1980
2229
  * @param clearObjects - The clearObjects object.
1981
- * @param clearObjects.indexName - Index on which to perform the request.
2230
+ * @param clearObjects.indexName - Name of the index on which to perform the operation.
1982
2231
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1983
2232
  */
1984
2233
  clearObjects({ indexName }, requestOptions) {
@@ -1997,12 +2246,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
1997
2246
  return transporter.request(request, requestOptions);
1998
2247
  },
1999
2248
  /**
2000
- * Delete all rules in the index.
2249
+ * Deletes all rules from the index.
2250
+ *
2251
+ * Required API Key ACLs:
2252
+ * - editSettings.
2001
2253
  *
2002
- * @summary Delete all rules.
2003
2254
  * @param clearRules - The clearRules object.
2004
- * @param clearRules.indexName - Index on which to perform the request.
2005
- * @param clearRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2255
+ * @param clearRules.indexName - Name of the index on which to perform the operation.
2256
+ * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
2006
2257
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2007
2258
  */
2008
2259
  clearRules({ indexName, forwardToReplicas }, requestOptions) {
@@ -2024,12 +2275,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2024
2275
  return transporter.request(request, requestOptions);
2025
2276
  },
2026
2277
  /**
2027
- * Delete all synonyms in the index.
2278
+ * Deletes all synonyms from the index.
2279
+ *
2280
+ * Required API Key ACLs:
2281
+ * - editSettings.
2028
2282
  *
2029
- * @summary Delete all synonyms.
2030
2283
  * @param clearSynonyms - The clearSynonyms object.
2031
- * @param clearSynonyms.indexName - Index on which to perform the request.
2032
- * @param clearSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2284
+ * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
2285
+ * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
2033
2286
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2034
2287
  */
2035
2288
  clearSynonyms({ indexName, forwardToReplicas }, requestOptions) {
@@ -2053,7 +2306,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2053
2306
  /**
2054
2307
  * This method allow you to send requests to the Algolia REST API.
2055
2308
  *
2056
- * @summary Send requests to the Algolia REST API.
2057
2309
  * @param customDelete - The customDelete object.
2058
2310
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
2059
2311
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -2063,7 +2315,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2063
2315
  if (!path) {
2064
2316
  throw new Error('Parameter `path` is required when calling `customDelete`.');
2065
2317
  }
2066
- const requestPath = '/1{path}'.replace('{path}', path);
2318
+ const requestPath = '/{path}'.replace('{path}', path);
2067
2319
  const headers = {};
2068
2320
  const queryParameters = parameters ? parameters : {};
2069
2321
  const request = {
@@ -2077,7 +2329,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2077
2329
  /**
2078
2330
  * This method allow you to send requests to the Algolia REST API.
2079
2331
  *
2080
- * @summary Send requests to the Algolia REST API.
2081
2332
  * @param customGet - The customGet object.
2082
2333
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
2083
2334
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -2087,7 +2338,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2087
2338
  if (!path) {
2088
2339
  throw new Error('Parameter `path` is required when calling `customGet`.');
2089
2340
  }
2090
- const requestPath = '/1{path}'.replace('{path}', path);
2341
+ const requestPath = '/{path}'.replace('{path}', path);
2091
2342
  const headers = {};
2092
2343
  const queryParameters = parameters ? parameters : {};
2093
2344
  const request = {
@@ -2101,7 +2352,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2101
2352
  /**
2102
2353
  * This method allow you to send requests to the Algolia REST API.
2103
2354
  *
2104
- * @summary Send requests to the Algolia REST API.
2105
2355
  * @param customPost - The customPost object.
2106
2356
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
2107
2357
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -2112,7 +2362,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2112
2362
  if (!path) {
2113
2363
  throw new Error('Parameter `path` is required when calling `customPost`.');
2114
2364
  }
2115
- const requestPath = '/1{path}'.replace('{path}', path);
2365
+ const requestPath = '/{path}'.replace('{path}', path);
2116
2366
  const headers = {};
2117
2367
  const queryParameters = parameters ? parameters : {};
2118
2368
  const request = {
@@ -2127,7 +2377,6 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2127
2377
  /**
2128
2378
  * This method allow you to send requests to the Algolia REST API.
2129
2379
  *
2130
- * @summary Send requests to the Algolia REST API.
2131
2380
  * @param customPut - The customPut object.
2132
2381
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
2133
2382
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -2138,7 +2387,7 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2138
2387
  if (!path) {
2139
2388
  throw new Error('Parameter `path` is required when calling `customPut`.');
2140
2389
  }
2141
- const requestPath = '/1{path}'.replace('{path}', path);
2390
+ const requestPath = '/{path}'.replace('{path}', path);
2142
2391
  const headers = {};
2143
2392
  const queryParameters = parameters ? parameters : {};
2144
2393
  const request = {
@@ -2151,9 +2400,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2151
2400
  return transporter.request(request, requestOptions);
2152
2401
  },
2153
2402
  /**
2154
- * Delete an existing API key. The request must be authenticated with the admin API key.
2403
+ * Deletes the API key.
2404
+ *
2405
+ * Required API Key ACLs:
2406
+ * - admin.
2155
2407
  *
2156
- * @summary Delete API key.
2157
2408
  * @param deleteApiKey - The deleteApiKey object.
2158
2409
  * @param deleteApiKey.key - API key.
2159
2410
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2174,11 +2425,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2174
2425
  return transporter.request(request, requestOptions);
2175
2426
  },
2176
2427
  /**
2177
- * 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.
2428
+ * 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).
2429
+ *
2430
+ * Required API Key ACLs:
2431
+ * - deleteIndex.
2178
2432
  *
2179
- * @summary Delete all records matching a query.
2180
2433
  * @param deleteBy - The deleteBy object.
2181
- * @param deleteBy.indexName - Index on which to perform the request.
2434
+ * @param deleteBy.indexName - Name of the index on which to perform the operation.
2182
2435
  * @param deleteBy.deleteByParams - The deleteByParams object.
2183
2436
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2184
2437
  */
@@ -2202,11 +2455,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2202
2455
  return transporter.request(request, requestOptions);
2203
2456
  },
2204
2457
  /**
2205
- * Delete an existing index.
2458
+ * 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/).
2459
+ *
2460
+ * Required API Key ACLs:
2461
+ * - deleteIndex.
2206
2462
  *
2207
- * @summary Delete index.
2208
2463
  * @param deleteIndex - The deleteIndex object.
2209
- * @param deleteIndex.indexName - Index on which to perform the request.
2464
+ * @param deleteIndex.indexName - Name of the index on which to perform the operation.
2210
2465
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2211
2466
  */
2212
2467
  deleteIndex({ indexName }, requestOptions) {
@@ -2225,12 +2480,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2225
2480
  return transporter.request(request, requestOptions);
2226
2481
  },
2227
2482
  /**
2228
- * To delete a set of records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy) instead.
2483
+ * 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).
2484
+ *
2485
+ * Required API Key ACLs:
2486
+ * - deleteObject.
2229
2487
  *
2230
- * @summary Delete a record.
2231
2488
  * @param deleteObject - The deleteObject object.
2232
- * @param deleteObject.indexName - Index on which to perform the request.
2233
- * @param deleteObject.objectID - Unique record (object) identifier.
2489
+ * @param deleteObject.indexName - Name of the index on which to perform the operation.
2490
+ * @param deleteObject.objectID - Unique record identifier.
2234
2491
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2235
2492
  */
2236
2493
  deleteObject({ indexName, objectID }, requestOptions) {
@@ -2254,13 +2511,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2254
2511
  return transporter.request(request, requestOptions);
2255
2512
  },
2256
2513
  /**
2257
- * Delete a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2514
+ * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2515
+ *
2516
+ * Required API Key ACLs:
2517
+ * - editSettings.
2258
2518
  *
2259
- * @summary Delete a rule.
2260
2519
  * @param deleteRule - The deleteRule object.
2261
- * @param deleteRule.indexName - Index on which to perform the request.
2520
+ * @param deleteRule.indexName - Name of the index on which to perform the operation.
2262
2521
  * @param deleteRule.objectID - Unique identifier of a rule object.
2263
- * @param deleteRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2522
+ * @param deleteRule.forwardToReplicas - Whether changes are applied to replica indices.
2264
2523
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2265
2524
  */
2266
2525
  deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
@@ -2287,9 +2546,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2287
2546
  return transporter.request(request, requestOptions);
2288
2547
  },
2289
2548
  /**
2290
- * Remove a source from the list of allowed sources.
2549
+ * Deletes a source from the list of allowed sources.
2550
+ *
2551
+ * Required API Key ACLs:
2552
+ * - admin.
2291
2553
  *
2292
- * @summary Remove a source.
2293
2554
  * @param deleteSource - The deleteSource object.
2294
2555
  * @param deleteSource.source - IP address range of the source.
2295
2556
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2310,13 +2571,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2310
2571
  return transporter.request(request, requestOptions);
2311
2572
  },
2312
2573
  /**
2313
- * Delete a synonym by its `objectID`. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2574
+ * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2575
+ *
2576
+ * Required API Key ACLs:
2577
+ * - editSettings.
2314
2578
  *
2315
- * @summary Delete a synonym.
2316
2579
  * @param deleteSynonym - The deleteSynonym object.
2317
- * @param deleteSynonym.indexName - Index on which to perform the request.
2580
+ * @param deleteSynonym.indexName - Name of the index on which to perform the operation.
2318
2581
  * @param deleteSynonym.objectID - Unique identifier of a synonym object.
2319
- * @param deleteSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
2582
+ * @param deleteSynonym.forwardToReplicas - Whether changes are applied to replica indices.
2320
2583
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2321
2584
  */
2322
2585
  deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
@@ -2343,9 +2606,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2343
2606
  return transporter.request(request, requestOptions);
2344
2607
  },
2345
2608
  /**
2346
- * 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.
2609
+ * 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.
2347
2610
  *
2348
- * @summary Get API key permissions.
2349
2611
  * @param getApiKey - The getApiKey object.
2350
2612
  * @param getApiKey.key - API key.
2351
2613
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2366,9 +2628,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2366
2628
  return transporter.request(request, requestOptions);
2367
2629
  },
2368
2630
  /**
2369
- * 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.
2631
+ * Lists supported languages with their supported dictionary types and number of custom entries.
2632
+ *
2633
+ * Required API Key ACLs:
2634
+ * - settings.
2370
2635
  *
2371
- * @summary List available languages.
2372
2636
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2373
2637
  */
2374
2638
  getDictionaryLanguages(requestOptions) {
@@ -2384,9 +2648,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2384
2648
  return transporter.request(request, requestOptions);
2385
2649
  },
2386
2650
  /**
2387
- * Get the languages for which [stop words are turned off](#tag/Dictionaries/operation/setDictionarySettings).
2651
+ * Retrieves the languages for which standard dictionary entries are turned off.
2652
+ *
2653
+ * Required API Key ACLs:
2654
+ * - settings.
2388
2655
  *
2389
- * @summary Get stop word settings.
2390
2656
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2391
2657
  */
2392
2658
  getDictionarySettings(requestOptions) {
@@ -2402,14 +2668,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2402
2668
  return transporter.request(request, requestOptions);
2403
2669
  },
2404
2670
  /**
2405
- * 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).
2671
+ * 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.
2672
+ *
2673
+ * Required API Key ACLs:
2674
+ * - logs.
2406
2675
  *
2407
- * @summary Return the latest log entries.
2408
2676
  * @param getLogs - The getLogs object.
2409
- * @param getLogs.offset - First log entry to retrieve. Sorted by decreasing date with 0 being the most recent.
2677
+ * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
2410
2678
  * @param getLogs.length - Maximum number of entries to retrieve.
2411
- * @param getLogs.indexName - Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
2412
- * @param getLogs.type - Type of log entries to retrieve. When omitted, all log entries are retrieved.
2679
+ * @param getLogs.indexName - Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
2680
+ * @param getLogs.type - Type of log entries to retrieve. By default, all log entries are retrieved.
2413
2681
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2414
2682
  */
2415
2683
  getLogs({ offset, length, indexName, type } = {}, requestOptions = undefined) {
@@ -2437,13 +2705,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2437
2705
  return transporter.request(request, requestOptions);
2438
2706
  },
2439
2707
  /**
2440
- * To get more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
2708
+ * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
2709
+ *
2710
+ * Required API Key ACLs:
2711
+ * - search.
2441
2712
  *
2442
- * @summary Get a record.
2443
2713
  * @param getObject - The getObject object.
2444
- * @param getObject.indexName - Index on which to perform the request.
2445
- * @param getObject.objectID - Unique record (object) identifier.
2446
- * @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.
2714
+ * @param getObject.indexName - Name of the index on which to perform the operation.
2715
+ * @param getObject.objectID - Unique record identifier.
2716
+ * @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.
2447
2717
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2448
2718
  */
2449
2719
  getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
@@ -2470,9 +2740,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2470
2740
  return transporter.request(request, requestOptions);
2471
2741
  },
2472
2742
  /**
2473
- * 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.
2743
+ * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
2744
+ *
2745
+ * Required API Key ACLs:
2746
+ * - search.
2474
2747
  *
2475
- * @summary Get multiple records.
2476
2748
  * @param getObjectsParams - Request object.
2477
2749
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2478
2750
  */
@@ -2498,11 +2770,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2498
2770
  return transporter.request(request, requestOptions);
2499
2771
  },
2500
2772
  /**
2501
- * Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2773
+ * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
2774
+ *
2775
+ * Required API Key ACLs:
2776
+ * - settings.
2502
2777
  *
2503
- * @summary Get a rule.
2504
2778
  * @param getRule - The getRule object.
2505
- * @param getRule.indexName - Index on which to perform the request.
2779
+ * @param getRule.indexName - Name of the index on which to perform the operation.
2506
2780
  * @param getRule.objectID - Unique identifier of a rule object.
2507
2781
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2508
2782
  */
@@ -2527,11 +2801,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2527
2801
  return transporter.request(request, requestOptions);
2528
2802
  },
2529
2803
  /**
2530
- * Return an object containing an index\'s [configuration settings](https://www.algolia.com/doc/api-reference/settings-api-parameters/).
2804
+ * Retrieves an object with non-null index settings.
2805
+ *
2806
+ * Required API Key ACLs:
2807
+ * - search.
2531
2808
  *
2532
- * @summary Get index settings.
2533
2809
  * @param getSettings - The getSettings object.
2534
- * @param getSettings.indexName - Index on which to perform the request.
2810
+ * @param getSettings.indexName - Name of the index on which to perform the operation.
2535
2811
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2536
2812
  */
2537
2813
  getSettings({ indexName }, requestOptions) {
@@ -2550,9 +2826,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2550
2826
  return transporter.request(request, requestOptions);
2551
2827
  },
2552
2828
  /**
2553
- * Get all allowed sources (IP addresses).
2829
+ * Retrieves all allowed IP addresses with access to your application.
2830
+ *
2831
+ * Required API Key ACLs:
2832
+ * - admin.
2554
2833
  *
2555
- * @summary Get all allowed IP addresses.
2556
2834
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2557
2835
  */
2558
2836
  getSources(requestOptions) {
@@ -2568,11 +2846,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2568
2846
  return transporter.request(request, requestOptions);
2569
2847
  },
2570
2848
  /**
2571
- * Get a syonym by its `objectID`. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2849
+ * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
2850
+ *
2851
+ * Required API Key ACLs:
2852
+ * - settings.
2572
2853
  *
2573
- * @summary Get a synonym object.
2574
2854
  * @param getSynonym - The getSynonym object.
2575
- * @param getSynonym.indexName - Index on which to perform the request.
2855
+ * @param getSynonym.indexName - Name of the index on which to perform the operation.
2576
2856
  * @param getSynonym.objectID - Unique identifier of a synonym object.
2577
2857
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2578
2858
  */
@@ -2597,11 +2877,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2597
2877
  return transporter.request(request, requestOptions);
2598
2878
  },
2599
2879
  /**
2600
- * Some operations, such as copying an index, will respond with a `taskID` value. Use this value here to check the status of that task.
2880
+ * 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.
2881
+ *
2882
+ * Required API Key ACLs:
2883
+ * - addObject.
2601
2884
  *
2602
- * @summary Check a task\'s status.
2603
2885
  * @param getTask - The getTask object.
2604
- * @param getTask.indexName - Index on which to perform the request.
2886
+ * @param getTask.indexName - Name of the index on which to perform the operation.
2605
2887
  * @param getTask.taskID - Unique task identifier.
2606
2888
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2607
2889
  */
@@ -2626,9 +2908,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2626
2908
  return transporter.request(request, requestOptions);
2627
2909
  },
2628
2910
  /**
2629
- * 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.
2911
+ * 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.
2912
+ *
2913
+ * Required API Key ACLs:
2914
+ * - admin.
2630
2915
  *
2631
- * @summary Get top userID.
2632
2916
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2633
2917
  */
2634
2918
  getTopUserIds(requestOptions) {
@@ -2644,11 +2928,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2644
2928
  return transporter.request(request, requestOptions);
2645
2929
  },
2646
2930
  /**
2647
- * 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.
2931
+ * 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.
2932
+ *
2933
+ * Required API Key ACLs:
2934
+ * - admin.
2648
2935
  *
2649
- * @summary Get userID.
2650
2936
  * @param getUserId - The getUserId object.
2651
- * @param getUserId.userID - UserID to assign.
2937
+ * @param getUserId.userID - Unique identifier of the user who makes the search request.
2652
2938
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2653
2939
  */
2654
2940
  getUserId({ userID }, requestOptions) {
@@ -2669,9 +2955,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2669
2955
  /**
2670
2956
  * 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.
2671
2957
  *
2672
- * @summary Get migration and user mapping status.
2958
+ * Required API Key ACLs:
2959
+ * - admin.
2960
+ *
2673
2961
  * @param hasPendingMappings - The hasPendingMappings object.
2674
- * @param hasPendingMappings.getClusters - Indicates whether to include the cluster\'s pending mapping state in the response.
2962
+ * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
2675
2963
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2676
2964
  */
2677
2965
  hasPendingMappings({ getClusters } = {}, requestOptions = undefined) {
@@ -2690,9 +2978,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2690
2978
  return transporter.request(request, requestOptions);
2691
2979
  },
2692
2980
  /**
2693
- * List all API keys associated with your Algolia application, including their permissions and restrictions.
2981
+ * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
2982
+ *
2983
+ * Required API Key ACLs:
2984
+ * - admin.
2694
2985
  *
2695
- * @summary List API keys.
2696
2986
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2697
2987
  */
2698
2988
  listApiKeys(requestOptions) {
@@ -2708,9 +2998,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2708
2998
  return transporter.request(request, requestOptions);
2709
2999
  },
2710
3000
  /**
2711
- * List the available clusters in a multi-cluster setup.
3001
+ * Lists the available clusters in a multi-cluster setup.
3002
+ *
3003
+ * Required API Key ACLs:
3004
+ * - admin.
2712
3005
  *
2713
- * @summary List clusters.
2714
3006
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2715
3007
  */
2716
3008
  listClusters(requestOptions) {
@@ -2726,12 +3018,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2726
3018
  return transporter.request(request, requestOptions);
2727
3019
  },
2728
3020
  /**
2729
- * List indices in an Algolia application.
3021
+ * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
3022
+ *
3023
+ * Required API Key ACLs:
3024
+ * - listIndexes.
2730
3025
  *
2731
- * @summary List indices.
2732
3026
  * @param listIndices - The listIndices object.
2733
- * @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.
2734
- * @param listIndices.hitsPerPage - Maximum number of hits per page.
3027
+ * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
3028
+ * @param listIndices.hitsPerPage - Number of hits per page.
2735
3029
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2736
3030
  */
2737
3031
  listIndices({ page, hitsPerPage } = {}, requestOptions = undefined) {
@@ -2753,12 +3047,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2753
3047
  return transporter.request(request, requestOptions);
2754
3048
  },
2755
3049
  /**
2756
- * 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.
3050
+ * 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.
3051
+ *
3052
+ * Required API Key ACLs:
3053
+ * - admin.
2757
3054
  *
2758
- * @summary List userIDs.
2759
3055
  * @param listUserIds - The listUserIds object.
2760
- * @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.
2761
- * @param listUserIds.hitsPerPage - Maximum number of hits per page.
3056
+ * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
3057
+ * @param listUserIds.hitsPerPage - Number of hits per page.
2762
3058
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2763
3059
  */
2764
3060
  listUserIds({ page, hitsPerPage } = {}, requestOptions = undefined) {
@@ -2780,9 +3076,8 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2780
3076
  return transporter.request(request, requestOptions);
2781
3077
  },
2782
3078
  /**
2783
- * 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.
3079
+ * 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.
2784
3080
  *
2785
- * @summary Batch write operations on multiple indices.
2786
3081
  * @param batchParams - The batchParams object.
2787
3082
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2788
3083
  */
@@ -2806,11 +3101,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2806
3101
  return transporter.request(request, requestOptions);
2807
3102
  },
2808
3103
  /**
2809
- * 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/).
3104
+ * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and 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/).
3105
+ *
3106
+ * Required API Key ACLs:
3107
+ * - addObject.
2810
3108
  *
2811
- * @summary Copy, move, or rename an index.
2812
3109
  * @param operationIndex - The operationIndex object.
2813
- * @param operationIndex.indexName - Index on which to perform the request.
3110
+ * @param operationIndex.indexName - Name of the index on which to perform the operation.
2814
3111
  * @param operationIndex.operationIndexParams - The operationIndexParams object.
2815
3112
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2816
3113
  */
@@ -2840,14 +3137,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2840
3137
  return transporter.request(request, requestOptions);
2841
3138
  },
2842
3139
  /**
2843
- * 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.
3140
+ * 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.
3141
+ *
3142
+ * Required API Key ACLs:
3143
+ * - addObject.
2844
3144
  *
2845
- * @summary Update record attributes.
2846
3145
  * @param partialUpdateObject - The partialUpdateObject object.
2847
- * @param partialUpdateObject.indexName - Index on which to perform the request.
2848
- * @param partialUpdateObject.objectID - Unique record (object) identifier.
2849
- * @param partialUpdateObject.attributesToUpdate - Object with attributes to update.
2850
- * @param partialUpdateObject.createIfNotExists - Indicates whether to create a new record if it doesn\'t exist yet.
3146
+ * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
3147
+ * @param partialUpdateObject.objectID - Unique record identifier.
3148
+ * @param partialUpdateObject.attributesToUpdate - Attributes with their values.
3149
+ * @param partialUpdateObject.createIfNotExists - Whether to create a new record if it doesn\'t exist.
2851
3150
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2852
3151
  */
2853
3152
  partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }, requestOptions) {
@@ -2878,11 +3177,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2878
3177
  return transporter.request(request, requestOptions);
2879
3178
  },
2880
3179
  /**
2881
- * Remove a userID and its associated data from the multi-clusters.
3180
+ * Deletes a user ID and its associated data from the clusters.
3181
+ *
3182
+ * Required API Key ACLs:
3183
+ * - admin.
2882
3184
  *
2883
- * @summary Remove userID.
2884
3185
  * @param removeUserId - The removeUserId object.
2885
- * @param removeUserId.userID - UserID to assign.
3186
+ * @param removeUserId.userID - Unique identifier of the user who makes the search request.
2886
3187
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2887
3188
  */
2888
3189
  removeUserId({ userID }, requestOptions) {
@@ -2901,9 +3202,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2901
3202
  return transporter.request(request, requestOptions);
2902
3203
  },
2903
3204
  /**
2904
- * Replace all allowed sources.
3205
+ * Replaces the list of allowed sources.
3206
+ *
3207
+ * Required API Key ACLs:
3208
+ * - admin.
2905
3209
  *
2906
- * @summary Replace all sources.
2907
3210
  * @param replaceSources - The replaceSources object.
2908
3211
  * @param replaceSources.source - Allowed sources.
2909
3212
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2925,9 +3228,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2925
3228
  return transporter.request(request, requestOptions);
2926
3229
  },
2927
3230
  /**
2928
- * Restore a deleted API key, along with its associated permissions. The request must be authenticated with the admin API key.
3231
+ * 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.
3232
+ *
3233
+ * Required API Key ACLs:
3234
+ * - admin.
2929
3235
  *
2930
- * @summary Restore API key.
2931
3236
  * @param restoreApiKey - The restoreApiKey object.
2932
3237
  * @param restoreApiKey.key - API key.
2933
3238
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -2948,12 +3253,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2948
3253
  return transporter.request(request, requestOptions);
2949
3254
  },
2950
3255
  /**
2951
- * 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).
3256
+ * 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).
3257
+ *
3258
+ * Required API Key ACLs:
3259
+ * - addObject.
2952
3260
  *
2953
- * @summary Add or update a record.
2954
3261
  * @param saveObject - The saveObject object.
2955
- * @param saveObject.indexName - Index on which to perform the request.
2956
- * @param saveObject.body - The Algolia record.
3262
+ * @param saveObject.indexName - Name of the index on which to perform the operation.
3263
+ * @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
2957
3264
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2958
3265
  */
2959
3266
  saveObject({ indexName, body }, requestOptions) {
@@ -2976,14 +3283,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
2976
3283
  return transporter.request(request, requestOptions);
2977
3284
  },
2978
3285
  /**
2979
- * To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
3286
+ * 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).
3287
+ *
3288
+ * Required API Key ACLs:
3289
+ * - editSettings.
2980
3290
  *
2981
- * @summary Create or update a rule.
2982
3291
  * @param saveRule - The saveRule object.
2983
- * @param saveRule.indexName - Index on which to perform the request.
3292
+ * @param saveRule.indexName - Name of the index on which to perform the operation.
2984
3293
  * @param saveRule.objectID - Unique identifier of a rule object.
2985
3294
  * @param saveRule.rule - The rule object.
2986
- * @param saveRule.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3295
+ * @param saveRule.forwardToReplicas - Whether changes are applied to replica indices.
2987
3296
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2988
3297
  */
2989
3298
  saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
@@ -3017,14 +3326,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3017
3326
  return transporter.request(request, requestOptions);
3018
3327
  },
3019
3328
  /**
3020
- * Create or update multiple rules.
3329
+ * 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.
3330
+ *
3331
+ * Required API Key ACLs:
3332
+ * - editSettings.
3021
3333
  *
3022
- * @summary Save a batch of rules.
3023
3334
  * @param saveRules - The saveRules object.
3024
- * @param saveRules.indexName - Index on which to perform the request.
3335
+ * @param saveRules.indexName - Name of the index on which to perform the operation.
3025
3336
  * @param saveRules.rules - The rules object.
3026
- * @param saveRules.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3027
- * @param saveRules.clearExistingRules - Indicates whether existing rules should be deleted before adding this batch.
3337
+ * @param saveRules.forwardToReplicas - Whether changes are applied to replica indices.
3338
+ * @param saveRules.clearExistingRules - Whether existing rules should be deleted before adding this batch.
3028
3339
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3029
3340
  */
3030
3341
  saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }, requestOptions) {
@@ -3053,14 +3364,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3053
3364
  return transporter.request(request, requestOptions);
3054
3365
  },
3055
3366
  /**
3056
- * 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).
3367
+ * 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).
3368
+ *
3369
+ * Required API Key ACLs:
3370
+ * - editSettings.
3057
3371
  *
3058
- * @summary Save a synonym.
3059
3372
  * @param saveSynonym - The saveSynonym object.
3060
- * @param saveSynonym.indexName - Index on which to perform the request.
3373
+ * @param saveSynonym.indexName - Name of the index on which to perform the operation.
3061
3374
  * @param saveSynonym.objectID - Unique identifier of a synonym object.
3062
3375
  * @param saveSynonym.synonymHit - The synonymHit object.
3063
- * @param saveSynonym.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3376
+ * @param saveSynonym.forwardToReplicas - Whether changes are applied to replica indices.
3064
3377
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3065
3378
  */
3066
3379
  saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
@@ -3097,14 +3410,16 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3097
3410
  return transporter.request(request, requestOptions);
3098
3411
  },
3099
3412
  /**
3100
- * Create or update multiple synonyms.
3413
+ * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
3414
+ *
3415
+ * Required API Key ACLs:
3416
+ * - editSettings.
3101
3417
  *
3102
- * @summary Save a batch of synonyms.
3103
3418
  * @param saveSynonyms - The saveSynonyms object.
3104
- * @param saveSynonyms.indexName - Index on which to perform the request.
3419
+ * @param saveSynonyms.indexName - Name of the index on which to perform the operation.
3105
3420
  * @param saveSynonyms.synonymHit - The synonymHit object.
3106
- * @param saveSynonyms.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3107
- * @param saveSynonyms.replaceExistingSynonyms - Indicates whether to replace all synonyms in the index with the ones sent with this request.
3421
+ * @param saveSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
3422
+ * @param saveSynonyms.replaceExistingSynonyms - Whether to replace all synonyms in the index with the ones sent with this request.
3108
3423
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3109
3424
  */
3110
3425
  saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
@@ -3134,10 +3449,12 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3134
3449
  return transporter.request(request, requestOptions);
3135
3450
  },
3136
3451
  /**
3137
- * Send multiple search queries to one or more indices.
3452
+ * 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.
3138
3453
  *
3139
- * @summary Search multiple indices.
3140
- * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
3454
+ * Required API Key ACLs:
3455
+ * - search.
3456
+ *
3457
+ * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
3141
3458
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3142
3459
  */
3143
3460
  search(searchMethodParams, requestOptions) {
@@ -3184,11 +3501,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3184
3501
  return transporter.request(request, requestOptions);
3185
3502
  },
3186
3503
  /**
3187
- * 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.
3504
+ * Searches for standard and custom dictionary entries.
3505
+ *
3506
+ * Required API Key ACLs:
3507
+ * - settings.
3188
3508
  *
3189
- * @summary Search dictionary entries.
3190
3509
  * @param searchDictionaryEntries - The searchDictionaryEntries object.
3191
- * @param searchDictionaryEntries.dictionaryName - Dictionary to search in.
3510
+ * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3192
3511
  * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
3193
3512
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3194
3513
  */
@@ -3217,12 +3536,14 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3217
3536
  return transporter.request(request, requestOptions);
3218
3537
  },
3219
3538
  /**
3220
- * [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`.
3539
+ * 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**.
3540
+ *
3541
+ * Required API Key ACLs:
3542
+ * - search.
3221
3543
  *
3222
- * @summary Search for facet values.
3223
3544
  * @param searchForFacetValues - The searchForFacetValues object.
3224
- * @param searchForFacetValues.indexName - Index on which to perform the request.
3225
- * @param searchForFacetValues.facetName - Facet name.
3545
+ * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
3546
+ * @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.
3226
3547
  * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
3227
3548
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3228
3549
  */
@@ -3250,11 +3571,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3250
3571
  return transporter.request(request, requestOptions);
3251
3572
  },
3252
3573
  /**
3253
- * Search for rules in your index. You can control the search with parameters. To list all rules, send an empty request body.
3574
+ * Searches for rules in your index.
3575
+ *
3576
+ * Required API Key ACLs:
3577
+ * - settings.
3254
3578
  *
3255
- * @summary Search for rules.
3256
3579
  * @param searchRules - The searchRules object.
3257
- * @param searchRules.indexName - Index on which to perform the request.
3580
+ * @param searchRules.indexName - Name of the index on which to perform the operation.
3258
3581
  * @param searchRules.searchRulesParams - The searchRulesParams object.
3259
3582
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3260
3583
  */
@@ -3277,11 +3600,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3277
3600
  return transporter.request(request, requestOptions);
3278
3601
  },
3279
3602
  /**
3280
- * Return records that match the query.
3603
+ * 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.
3604
+ *
3605
+ * Required API Key ACLs:
3606
+ * - search.
3281
3607
  *
3282
- * @summary Search an index.
3283
3608
  * @param searchSingleIndex - The searchSingleIndex object.
3284
- * @param searchSingleIndex.indexName - Index on which to perform the request.
3609
+ * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
3285
3610
  * @param searchSingleIndex.searchParams - The searchParams object.
3286
3611
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3287
3612
  */
@@ -3304,11 +3629,13 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3304
3629
  return transporter.request(request, requestOptions);
3305
3630
  },
3306
3631
  /**
3307
- * Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
3632
+ * Searches for synonyms in your index.
3633
+ *
3634
+ * Required API Key ACLs:
3635
+ * - settings.
3308
3636
  *
3309
- * @summary Search for synonyms.
3310
3637
  * @param searchSynonyms - The searchSynonyms object.
3311
- * @param searchSynonyms.indexName - Index on which to perform the request.
3638
+ * @param searchSynonyms.indexName - Name of the index on which to perform the operation.
3312
3639
  * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
3313
3640
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3314
3641
  */
@@ -3331,9 +3658,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3331
3658
  return transporter.request(request, requestOptions);
3332
3659
  },
3333
3660
  /**
3334
- * 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).
3661
+ * 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).
3662
+ *
3663
+ * Required API Key ACLs:
3664
+ * - admin.
3335
3665
  *
3336
- * @summary Search for a user ID.
3337
3666
  * @param searchUserIdsParams - The searchUserIdsParams object.
3338
3667
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3339
3668
  */
@@ -3359,9 +3688,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3359
3688
  return transporter.request(request, requestOptions);
3360
3689
  },
3361
3690
  /**
3362
- * Set stop word settings for a specific language.
3691
+ * Turns standard stop word dictionary entries on or off for a given language.
3692
+ *
3693
+ * Required API Key ACLs:
3694
+ * - editSettings.
3363
3695
  *
3364
- * @summary Set stop word settings.
3365
3696
  * @param dictionarySettingsParams - The dictionarySettingsParams object.
3366
3697
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3367
3698
  */
@@ -3385,13 +3716,15 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3385
3716
  return transporter.request(request, requestOptions);
3386
3717
  },
3387
3718
  /**
3388
- * 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.
3719
+ * 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.
3720
+ *
3721
+ * Required API Key ACLs:
3722
+ * - editSettings.
3389
3723
  *
3390
- * @summary Update index settings.
3391
3724
  * @param setSettings - The setSettings object.
3392
- * @param setSettings.indexName - Index on which to perform the request.
3725
+ * @param setSettings.indexName - Name of the index on which to perform the operation.
3393
3726
  * @param setSettings.indexSettings - The indexSettings object.
3394
- * @param setSettings.forwardToReplicas - Indicates whether changed index settings are forwarded to the replica indices.
3727
+ * @param setSettings.forwardToReplicas - Whether changes are applied to replica indices.
3395
3728
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3396
3729
  */
3397
3730
  setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
@@ -3417,9 +3750,11 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
3417
3750
  return transporter.request(request, requestOptions);
3418
3751
  },
3419
3752
  /**
3420
- * 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.
3753
+ * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
3754
+ *
3755
+ * Required API Key ACLs:
3756
+ * - admin.
3421
3757
  *
3422
- * @summary Update an API key.
3423
3758
  * @param updateApiKey - The updateApiKey object.
3424
3759
  * @param updateApiKey.key - API key.
3425
3760
  * @param updateApiKey.apiKey - The apiKey object.
@@ -3523,6 +3858,36 @@ function algoliasearch(appId, apiKey, options) {
3523
3858
  initAnalytics,
3524
3859
  initPersonalization,
3525
3860
  initAbtesting,
3861
+ /**
3862
+ * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
3863
+ *
3864
+ * @summary Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.
3865
+ * @param generateSecuredApiKey - The `generateSecuredApiKey` object.
3866
+ * @param generateSecuredApiKey.parentApiKey - The base API key from which to generate the new secured one.
3867
+ * @param generateSecuredApiKey.restrictions - A set of properties defining the restrictions of the secured API key.
3868
+ */
3869
+ generateSecuredApiKey({ parentApiKey, restrictions = {}, }) {
3870
+ const queryParameters = clientCommon.serializeQueryParameters(restrictions);
3871
+ return Buffer.from(crypto.createHmac('sha256', parentApiKey)
3872
+ .update(queryParameters)
3873
+ .digest('hex') + queryParameters).toString('base64');
3874
+ },
3875
+ /**
3876
+ * Helper: Retrieves the remaining validity of the previous generated `securedApiKey`, the `ValidUntil` parameter must have been provided.
3877
+ *
3878
+ * @summary Helper: Retrieves the remaining validity of the previous generated `secured_api_key`, the `ValidUntil` parameter must have been provided.
3879
+ * @param getSecuredApiKeyRemainingValidity - The `getSecuredApiKeyRemainingValidity` object.
3880
+ * @param getSecuredApiKeyRemainingValidity.securedApiKey - The secured API key generated with the `generateSecuredApiKey` method.
3881
+ */
3882
+ getSecuredApiKeyRemainingValidity({ securedApiKey, }) {
3883
+ const decodedString = Buffer.from(securedApiKey, 'base64').toString('ascii');
3884
+ const regex = /validUntil=(\d+)/;
3885
+ const match = decodedString.match(regex);
3886
+ if (match === null) {
3887
+ throw new Error('validUntil not found in given secured api key.');
3888
+ }
3889
+ return parseInt(match[1], 10) - Math.round(new Date().getTime() / 1000);
3890
+ },
3526
3891
  };
3527
3892
  }
3528
3893