algoliasearch 4.14.2 → 5.0.0-alpha.3

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 (1030) hide show
  1. package/builds/browser.ts +175 -0
  2. package/builds/models.ts +44 -0
  3. package/builds/node.ts +168 -0
  4. package/dist/algoliasearch/builds/browser.d.ts +83 -0
  5. package/dist/algoliasearch/builds/browser.d.ts.map +1 -0
  6. package/dist/algoliasearch/builds/node.d.ts +83 -0
  7. package/dist/algoliasearch/builds/node.d.ts.map +1 -0
  8. package/dist/algoliasearch/lite/builds/browser.d.ts +6 -0
  9. package/dist/algoliasearch/lite/builds/browser.d.ts.map +1 -0
  10. package/dist/algoliasearch/lite/builds/node.d.ts +6 -0
  11. package/dist/algoliasearch/lite/builds/node.d.ts.map +1 -0
  12. package/dist/algoliasearch/lite/model/acl.d.ts +2 -0
  13. package/dist/algoliasearch/lite/model/acl.d.ts.map +1 -0
  14. package/dist/algoliasearch/lite/model/action.d.ts +5 -0
  15. package/dist/algoliasearch/lite/model/action.d.ts.map +1 -0
  16. package/dist/algoliasearch/lite/model/addApiKeyResponse.d.ts +11 -0
  17. package/dist/algoliasearch/lite/model/addApiKeyResponse.d.ts.map +1 -0
  18. package/dist/algoliasearch/lite/model/advancedSyntaxFeatures.d.ts +2 -0
  19. package/dist/algoliasearch/lite/model/advancedSyntaxFeatures.d.ts.map +1 -0
  20. package/dist/algoliasearch/lite/model/alternativesAsExact.d.ts +2 -0
  21. package/dist/algoliasearch/lite/model/alternativesAsExact.d.ts.map +1 -0
  22. package/dist/algoliasearch/lite/model/anchoring.d.ts +5 -0
  23. package/dist/algoliasearch/lite/model/anchoring.d.ts.map +1 -0
  24. package/dist/algoliasearch/lite/model/apiKey.d.ts +39 -0
  25. package/dist/algoliasearch/lite/model/apiKey.d.ts.map +1 -0
  26. package/dist/algoliasearch/lite/model/aroundRadius.d.ts +6 -0
  27. package/dist/algoliasearch/lite/model/aroundRadius.d.ts.map +1 -0
  28. package/dist/algoliasearch/lite/model/aroundRadiusAll.d.ts +2 -0
  29. package/dist/algoliasearch/lite/model/aroundRadiusAll.d.ts.map +1 -0
  30. package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts +3 -0
  31. package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts.map +1 -0
  32. package/dist/algoliasearch/lite/model/automaticFacetFilter.d.ts +18 -0
  33. package/dist/algoliasearch/lite/model/automaticFacetFilter.d.ts.map +1 -0
  34. package/dist/algoliasearch/lite/model/automaticFacetFilters.d.ts +6 -0
  35. package/dist/algoliasearch/lite/model/automaticFacetFilters.d.ts.map +1 -0
  36. package/dist/algoliasearch/lite/model/baseBrowseResponse.d.ts +7 -0
  37. package/dist/algoliasearch/lite/model/baseBrowseResponse.d.ts.map +1 -0
  38. package/dist/algoliasearch/lite/model/baseIndexSettings.d.ts +59 -0
  39. package/dist/algoliasearch/lite/model/baseIndexSettings.d.ts.map +1 -0
  40. package/dist/algoliasearch/lite/model/baseSearchParams.d.ts +4 -0
  41. package/dist/algoliasearch/lite/model/baseSearchParams.d.ts.map +1 -0
  42. package/dist/algoliasearch/lite/model/baseSearchParamsWithoutQuery.d.ts +123 -0
  43. package/dist/algoliasearch/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
  44. package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts +102 -0
  45. package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts.map +1 -0
  46. package/dist/algoliasearch/lite/model/browseResponse.d.ts +5 -0
  47. package/dist/algoliasearch/lite/model/browseResponse.d.ts.map +1 -0
  48. package/dist/algoliasearch/lite/model/builtInOperation.d.ts +12 -0
  49. package/dist/algoliasearch/lite/model/builtInOperation.d.ts.map +1 -0
  50. package/dist/algoliasearch/lite/model/builtInOperationType.d.ts +5 -0
  51. package/dist/algoliasearch/lite/model/builtInOperationType.d.ts.map +1 -0
  52. package/dist/algoliasearch/lite/model/clientMethodProps.d.ts +49 -0
  53. package/dist/algoliasearch/lite/model/clientMethodProps.d.ts.map +1 -0
  54. package/dist/algoliasearch/lite/model/condition.d.ts +17 -0
  55. package/dist/algoliasearch/lite/model/condition.d.ts.map +1 -0
  56. package/dist/algoliasearch/lite/model/consequence.d.ts +26 -0
  57. package/dist/algoliasearch/lite/model/consequence.d.ts.map +1 -0
  58. package/dist/algoliasearch/lite/model/consequenceHide.d.ts +10 -0
  59. package/dist/algoliasearch/lite/model/consequenceHide.d.ts.map +1 -0
  60. package/dist/algoliasearch/lite/model/consequenceParams.d.ts +5 -0
  61. package/dist/algoliasearch/lite/model/consequenceParams.d.ts.map +1 -0
  62. package/dist/algoliasearch/lite/model/consequenceQuery.d.ts +6 -0
  63. package/dist/algoliasearch/lite/model/consequenceQuery.d.ts.map +1 -0
  64. package/dist/algoliasearch/lite/model/consequenceQueryObject.d.ts +12 -0
  65. package/dist/algoliasearch/lite/model/consequenceQueryObject.d.ts.map +1 -0
  66. package/dist/algoliasearch/lite/model/createdAtObject.d.ts +7 -0
  67. package/dist/algoliasearch/lite/model/createdAtObject.d.ts.map +1 -0
  68. package/dist/algoliasearch/lite/model/dictionaryAction.d.ts +5 -0
  69. package/dist/algoliasearch/lite/model/dictionaryAction.d.ts.map +1 -0
  70. package/dist/algoliasearch/lite/model/dictionaryEntry.d.ts +28 -0
  71. package/dist/algoliasearch/lite/model/dictionaryEntry.d.ts.map +1 -0
  72. package/dist/algoliasearch/lite/model/dictionaryEntryState.d.ts +5 -0
  73. package/dist/algoliasearch/lite/model/dictionaryEntryState.d.ts.map +1 -0
  74. package/dist/algoliasearch/lite/model/dictionaryLanguage.d.ts +10 -0
  75. package/dist/algoliasearch/lite/model/dictionaryLanguage.d.ts.map +1 -0
  76. package/dist/algoliasearch/lite/model/dictionaryType.d.ts +2 -0
  77. package/dist/algoliasearch/lite/model/dictionaryType.d.ts.map +1 -0
  78. package/dist/algoliasearch/lite/model/distinct.d.ts +5 -0
  79. package/dist/algoliasearch/lite/model/distinct.d.ts.map +1 -0
  80. package/dist/algoliasearch/lite/model/edit.d.ts +13 -0
  81. package/dist/algoliasearch/lite/model/edit.d.ts.map +1 -0
  82. package/dist/algoliasearch/lite/model/editType.d.ts +5 -0
  83. package/dist/algoliasearch/lite/model/editType.d.ts.map +1 -0
  84. package/dist/algoliasearch/lite/model/errorBase.d.ts +7 -0
  85. package/dist/algoliasearch/lite/model/errorBase.d.ts.map +1 -0
  86. package/dist/algoliasearch/lite/model/exactOnSingleWordQuery.d.ts +5 -0
  87. package/dist/algoliasearch/lite/model/exactOnSingleWordQuery.d.ts.map +1 -0
  88. package/dist/algoliasearch/lite/model/facetFilters.d.ts +6 -0
  89. package/dist/algoliasearch/lite/model/facetFilters.d.ts.map +1 -0
  90. package/dist/algoliasearch/lite/model/facetOrdering.d.ts +13 -0
  91. package/dist/algoliasearch/lite/model/facetOrdering.d.ts.map +1 -0
  92. package/dist/algoliasearch/lite/model/facets.d.ts +10 -0
  93. package/dist/algoliasearch/lite/model/facets.d.ts.map +1 -0
  94. package/dist/algoliasearch/lite/model/facetsStats.d.ts +19 -0
  95. package/dist/algoliasearch/lite/model/facetsStats.d.ts.map +1 -0
  96. package/dist/algoliasearch/lite/model/fetchedIndex.d.ts +47 -0
  97. package/dist/algoliasearch/lite/model/fetchedIndex.d.ts.map +1 -0
  98. package/dist/algoliasearch/lite/model/highlightResult.d.ts +3 -0
  99. package/dist/algoliasearch/lite/model/highlightResult.d.ts.map +1 -0
  100. package/dist/algoliasearch/lite/model/highlightResultOption.d.ts +20 -0
  101. package/dist/algoliasearch/lite/model/highlightResultOption.d.ts.map +1 -0
  102. package/dist/algoliasearch/lite/model/hit.d.ts +23 -0
  103. package/dist/algoliasearch/lite/model/hit.d.ts.map +1 -0
  104. package/dist/algoliasearch/lite/model/ignorePlurals.d.ts +5 -0
  105. package/dist/algoliasearch/lite/model/ignorePlurals.d.ts.map +1 -0
  106. package/dist/algoliasearch/lite/model/index.d.ts +106 -0
  107. package/dist/algoliasearch/lite/model/index.d.ts.map +1 -0
  108. package/dist/algoliasearch/lite/model/indexSettings.d.ts +7 -0
  109. package/dist/algoliasearch/lite/model/indexSettings.d.ts.map +1 -0
  110. package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts +157 -0
  111. package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -0
  112. package/dist/algoliasearch/lite/model/key.d.ts +4 -0
  113. package/dist/algoliasearch/lite/model/key.d.ts.map +1 -0
  114. package/dist/algoliasearch/lite/model/languages.d.ts +10 -0
  115. package/dist/algoliasearch/lite/model/languages.d.ts.map +1 -0
  116. package/dist/algoliasearch/lite/model/listIndicesResponse.d.ts +12 -0
  117. package/dist/algoliasearch/lite/model/listIndicesResponse.d.ts.map +1 -0
  118. package/dist/algoliasearch/lite/model/logType.d.ts +2 -0
  119. package/dist/algoliasearch/lite/model/logType.d.ts.map +1 -0
  120. package/dist/algoliasearch/lite/model/matchLevel.d.ts +5 -0
  121. package/dist/algoliasearch/lite/model/matchLevel.d.ts.map +1 -0
  122. package/dist/algoliasearch/lite/model/matchedGeoLocation.d.ts +15 -0
  123. package/dist/algoliasearch/lite/model/matchedGeoLocation.d.ts.map +1 -0
  124. package/dist/algoliasearch/lite/model/mixedSearchFilters.d.ts +2 -0
  125. package/dist/algoliasearch/lite/model/mixedSearchFilters.d.ts.map +1 -0
  126. package/dist/algoliasearch/lite/model/numericFilters.d.ts +6 -0
  127. package/dist/algoliasearch/lite/model/numericFilters.d.ts.map +1 -0
  128. package/dist/algoliasearch/lite/model/operationType.d.ts +5 -0
  129. package/dist/algoliasearch/lite/model/operationType.d.ts.map +1 -0
  130. package/dist/algoliasearch/lite/model/optionalFilters.d.ts +6 -0
  131. package/dist/algoliasearch/lite/model/optionalFilters.d.ts.map +1 -0
  132. package/dist/algoliasearch/lite/model/params.d.ts +13 -0
  133. package/dist/algoliasearch/lite/model/params.d.ts.map +1 -0
  134. package/dist/algoliasearch/lite/model/personalization.d.ts +15 -0
  135. package/dist/algoliasearch/lite/model/personalization.d.ts.map +1 -0
  136. package/dist/algoliasearch/lite/model/promote.d.ts +4 -0
  137. package/dist/algoliasearch/lite/model/promote.d.ts.map +1 -0
  138. package/dist/algoliasearch/lite/model/promoteObjectID.d.ts +14 -0
  139. package/dist/algoliasearch/lite/model/promoteObjectID.d.ts.map +1 -0
  140. package/dist/algoliasearch/lite/model/promoteObjectIDs.d.ts +14 -0
  141. package/dist/algoliasearch/lite/model/promoteObjectIDs.d.ts.map +1 -0
  142. package/dist/algoliasearch/lite/model/queryType.d.ts +5 -0
  143. package/dist/algoliasearch/lite/model/queryType.d.ts.map +1 -0
  144. package/dist/algoliasearch/lite/model/rankingInfo.d.ts +51 -0
  145. package/dist/algoliasearch/lite/model/rankingInfo.d.ts.map +1 -0
  146. package/dist/algoliasearch/lite/model/reRankingApplyFilter.d.ts +6 -0
  147. package/dist/algoliasearch/lite/model/reRankingApplyFilter.d.ts.map +1 -0
  148. package/dist/algoliasearch/lite/model/removeStopWords.d.ts +5 -0
  149. package/dist/algoliasearch/lite/model/removeStopWords.d.ts.map +1 -0
  150. package/dist/algoliasearch/lite/model/removeWordsIfNoResults.d.ts +5 -0
  151. package/dist/algoliasearch/lite/model/removeWordsIfNoResults.d.ts.map +1 -0
  152. package/dist/algoliasearch/lite/model/renderingContent.d.ts +8 -0
  153. package/dist/algoliasearch/lite/model/renderingContent.d.ts.map +1 -0
  154. package/dist/algoliasearch/lite/model/rule.d.ts +30 -0
  155. package/dist/algoliasearch/lite/model/rule.d.ts.map +1 -0
  156. package/dist/algoliasearch/lite/model/scopeType.d.ts +2 -0
  157. package/dist/algoliasearch/lite/model/scopeType.d.ts.map +1 -0
  158. package/dist/algoliasearch/lite/model/searchForFacets.d.ts +4 -0
  159. package/dist/algoliasearch/lite/model/searchForFacets.d.ts.map +1 -0
  160. package/dist/algoliasearch/lite/model/searchForFacetsOptions.d.ts +21 -0
  161. package/dist/algoliasearch/lite/model/searchForFacetsOptions.d.ts.map +1 -0
  162. package/dist/algoliasearch/lite/model/searchForHits.d.ts +4 -0
  163. package/dist/algoliasearch/lite/model/searchForHits.d.ts.map +1 -0
  164. package/dist/algoliasearch/lite/model/searchForHitsOptions.d.ts +13 -0
  165. package/dist/algoliasearch/lite/model/searchForHitsOptions.d.ts.map +1 -0
  166. package/dist/algoliasearch/lite/model/searchHits.d.ts +5 -0
  167. package/dist/algoliasearch/lite/model/searchHits.d.ts.map +1 -0
  168. package/dist/algoliasearch/lite/model/searchMethodParams.d.ts +7 -0
  169. package/dist/algoliasearch/lite/model/searchMethodParams.d.ts.map +1 -0
  170. package/dist/algoliasearch/lite/model/searchParams.d.ts +4 -0
  171. package/dist/algoliasearch/lite/model/searchParams.d.ts.map +1 -0
  172. package/dist/algoliasearch/lite/model/searchParamsObject.d.ts +4 -0
  173. package/dist/algoliasearch/lite/model/searchParamsObject.d.ts.map +1 -0
  174. package/dist/algoliasearch/lite/model/searchParamsQuery.d.ts +7 -0
  175. package/dist/algoliasearch/lite/model/searchParamsQuery.d.ts.map +1 -0
  176. package/dist/algoliasearch/lite/model/searchParamsString.d.ts +7 -0
  177. package/dist/algoliasearch/lite/model/searchParamsString.d.ts.map +1 -0
  178. package/dist/algoliasearch/lite/model/searchQuery.d.ts +4 -0
  179. package/dist/algoliasearch/lite/model/searchQuery.d.ts.map +1 -0
  180. package/dist/algoliasearch/lite/model/searchResponse.d.ts +4 -0
  181. package/dist/algoliasearch/lite/model/searchResponse.d.ts.map +1 -0
  182. package/dist/algoliasearch/lite/model/searchResponses.d.ts +5 -0
  183. package/dist/algoliasearch/lite/model/searchResponses.d.ts.map +1 -0
  184. package/dist/algoliasearch/lite/model/searchStrategy.d.ts +2 -0
  185. package/dist/algoliasearch/lite/model/searchStrategy.d.ts.map +1 -0
  186. package/dist/algoliasearch/lite/model/searchSynonymsResponse.d.ts +12 -0
  187. package/dist/algoliasearch/lite/model/searchSynonymsResponse.d.ts.map +1 -0
  188. package/dist/algoliasearch/lite/model/searchTypeDefault.d.ts +5 -0
  189. package/dist/algoliasearch/lite/model/searchTypeDefault.d.ts.map +1 -0
  190. package/dist/algoliasearch/lite/model/searchTypeFacet.d.ts +5 -0
  191. package/dist/algoliasearch/lite/model/searchTypeFacet.d.ts.map +1 -0
  192. package/dist/algoliasearch/lite/model/snippetResult.d.ts +3 -0
  193. package/dist/algoliasearch/lite/model/snippetResult.d.ts.map +1 -0
  194. package/dist/algoliasearch/lite/model/snippetResultOption.d.ts +12 -0
  195. package/dist/algoliasearch/lite/model/snippetResultOption.d.ts.map +1 -0
  196. package/dist/algoliasearch/lite/model/sortRemainingBy.d.ts +5 -0
  197. package/dist/algoliasearch/lite/model/sortRemainingBy.d.ts.map +1 -0
  198. package/dist/algoliasearch/lite/model/source.d.ts +14 -0
  199. package/dist/algoliasearch/lite/model/source.d.ts.map +1 -0
  200. package/dist/algoliasearch/lite/model/standardEntries.d.ts +18 -0
  201. package/dist/algoliasearch/lite/model/standardEntries.d.ts.map +1 -0
  202. package/dist/algoliasearch/lite/model/synonymHit.d.ts +38 -0
  203. package/dist/algoliasearch/lite/model/synonymHit.d.ts.map +1 -0
  204. package/dist/algoliasearch/lite/model/synonymHitHighlightResult.d.ts +12 -0
  205. package/dist/algoliasearch/lite/model/synonymHitHighlightResult.d.ts.map +1 -0
  206. package/dist/algoliasearch/lite/model/synonymType.d.ts +5 -0
  207. package/dist/algoliasearch/lite/model/synonymType.d.ts.map +1 -0
  208. package/dist/algoliasearch/lite/model/tagFilters.d.ts +6 -0
  209. package/dist/algoliasearch/lite/model/tagFilters.d.ts.map +1 -0
  210. package/dist/algoliasearch/lite/model/taskStatus.d.ts +2 -0
  211. package/dist/algoliasearch/lite/model/taskStatus.d.ts.map +1 -0
  212. package/dist/algoliasearch/lite/model/timeRange.d.ts +11 -0
  213. package/dist/algoliasearch/lite/model/timeRange.d.ts.map +1 -0
  214. package/dist/algoliasearch/lite/model/typoTolerance.d.ts +6 -0
  215. package/dist/algoliasearch/lite/model/typoTolerance.d.ts.map +1 -0
  216. package/dist/algoliasearch/lite/model/typoToleranceEnum.d.ts +2 -0
  217. package/dist/algoliasearch/lite/model/typoToleranceEnum.d.ts.map +1 -0
  218. package/dist/algoliasearch/lite/model/updatedRuleResponse.d.ts +15 -0
  219. package/dist/algoliasearch/lite/model/updatedRuleResponse.d.ts.map +1 -0
  220. package/dist/algoliasearch/lite/model/userId.d.ts +22 -0
  221. package/dist/algoliasearch/lite/model/userId.d.ts.map +1 -0
  222. package/dist/algoliasearch/lite/model/value.d.ts +9 -0
  223. package/dist/algoliasearch/lite/model/value.d.ts.map +1 -0
  224. package/dist/algoliasearch/lite/src/liteClient.d.ts +43 -0
  225. package/dist/algoliasearch/lite/src/liteClient.d.ts.map +1 -0
  226. package/dist/algoliasearch.cjs.js +3322 -142
  227. package/dist/algoliasearch.esm.browser.js +3997 -2116
  228. package/dist/algoliasearch.esm.node.js +3331 -0
  229. package/dist/algoliasearch.umd.js +2 -2
  230. package/dist/builds/browser.d.ts +83 -0
  231. package/dist/builds/browser.d.ts.map +1 -0
  232. package/dist/builds/models.d.ts +32 -0
  233. package/dist/builds/models.d.ts.map +1 -0
  234. package/dist/builds/node.d.ts +83 -0
  235. package/dist/builds/node.d.ts.map +1 -0
  236. package/dist/client-abtesting/model/aBTest.d.ts +40 -0
  237. package/dist/client-abtesting/model/aBTest.d.ts.map +1 -0
  238. package/dist/client-abtesting/model/aBTestResponse.d.ts +15 -0
  239. package/dist/client-abtesting/model/aBTestResponse.d.ts.map +1 -0
  240. package/dist/client-abtesting/model/abTestsVariant.d.ts +15 -0
  241. package/dist/client-abtesting/model/abTestsVariant.d.ts.map +1 -0
  242. package/dist/client-abtesting/model/abTestsVariantSearchParams.d.ts +4 -0
  243. package/dist/client-abtesting/model/abTestsVariantSearchParams.d.ts.map +1 -0
  244. package/dist/client-abtesting/model/addABTestsRequest.d.ts +16 -0
  245. package/dist/client-abtesting/model/addABTestsRequest.d.ts.map +1 -0
  246. package/dist/client-abtesting/model/addABTestsVariant.d.ts +4 -0
  247. package/dist/client-abtesting/model/addABTestsVariant.d.ts.map +1 -0
  248. package/dist/client-abtesting/model/clientMethodProps.d.ts +101 -0
  249. package/dist/client-abtesting/model/clientMethodProps.d.ts.map +1 -0
  250. package/dist/client-abtesting/model/customSearchParams.d.ts +4 -0
  251. package/dist/client-abtesting/model/customSearchParams.d.ts.map +1 -0
  252. package/dist/client-abtesting/model/errorBase.d.ts +7 -0
  253. package/dist/client-abtesting/model/errorBase.d.ts.map +1 -0
  254. package/dist/client-abtesting/model/index.d.ts +12 -0
  255. package/dist/client-abtesting/model/index.d.ts.map +1 -0
  256. package/dist/client-abtesting/model/listABTestsResponse.d.ts +16 -0
  257. package/dist/client-abtesting/model/listABTestsResponse.d.ts.map +1 -0
  258. package/dist/client-abtesting/model/variant.d.ts +51 -0
  259. package/dist/client-abtesting/model/variant.d.ts.map +1 -0
  260. package/dist/client-abtesting/src/abtestingClient.d.ts +117 -0
  261. package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -0
  262. package/dist/client-analytics/model/averageClickEvent.d.ts +15 -0
  263. package/dist/client-analytics/model/averageClickEvent.d.ts.map +1 -0
  264. package/dist/client-analytics/model/clickPosition.d.ts +11 -0
  265. package/dist/client-analytics/model/clickPosition.d.ts.map +1 -0
  266. package/dist/client-analytics/model/clickThroughRateEvent.d.ts +19 -0
  267. package/dist/client-analytics/model/clickThroughRateEvent.d.ts.map +1 -0
  268. package/dist/client-analytics/model/clientMethodProps.d.ts +508 -0
  269. package/dist/client-analytics/model/clientMethodProps.d.ts.map +1 -0
  270. package/dist/client-analytics/model/conversionRateEvent.d.ts +19 -0
  271. package/dist/client-analytics/model/conversionRateEvent.d.ts.map +1 -0
  272. package/dist/client-analytics/model/direction.d.ts +2 -0
  273. package/dist/client-analytics/model/direction.d.ts.map +1 -0
  274. package/dist/client-analytics/model/errorBase.d.ts +7 -0
  275. package/dist/client-analytics/model/errorBase.d.ts.map +1 -0
  276. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts +16 -0
  277. package/dist/client-analytics/model/getAverageClickPositionResponse.d.ts.map +1 -0
  278. package/dist/client-analytics/model/getClickPositionsResponse.d.ts +8 -0
  279. package/dist/client-analytics/model/getClickPositionsResponse.d.ts.map +1 -0
  280. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts +20 -0
  281. package/dist/client-analytics/model/getClickThroughRateResponse.d.ts.map +1 -0
  282. package/dist/client-analytics/model/getConversationRateResponse.d.ts +20 -0
  283. package/dist/client-analytics/model/getConversationRateResponse.d.ts.map +1 -0
  284. package/dist/client-analytics/model/getNoClickRateResponse.d.ts +20 -0
  285. package/dist/client-analytics/model/getNoClickRateResponse.d.ts.map +1 -0
  286. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts +20 -0
  287. package/dist/client-analytics/model/getNoResultsRateResponse.d.ts.map +1 -0
  288. package/dist/client-analytics/model/getSearchesCountResponse.d.ts +12 -0
  289. package/dist/client-analytics/model/getSearchesCountResponse.d.ts.map +1 -0
  290. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts +8 -0
  291. package/dist/client-analytics/model/getSearchesNoClicksResponse.d.ts.map +1 -0
  292. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts +8 -0
  293. package/dist/client-analytics/model/getSearchesNoResultsResponse.d.ts.map +1 -0
  294. package/dist/client-analytics/model/getStatusResponse.d.ts +7 -0
  295. package/dist/client-analytics/model/getStatusResponse.d.ts.map +1 -0
  296. package/dist/client-analytics/model/getTopCountriesResponse.d.ts +8 -0
  297. package/dist/client-analytics/model/getTopCountriesResponse.d.ts.map +1 -0
  298. package/dist/client-analytics/model/getTopFilterAttribute.d.ts +11 -0
  299. package/dist/client-analytics/model/getTopFilterAttribute.d.ts.map +1 -0
  300. package/dist/client-analytics/model/getTopFilterAttributesResponse.d.ts +8 -0
  301. package/dist/client-analytics/model/getTopFilterAttributesResponse.d.ts.map +1 -0
  302. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts +19 -0
  303. package/dist/client-analytics/model/getTopFilterForAttribute.d.ts.map +1 -0
  304. package/dist/client-analytics/model/getTopFilterForAttributeResponse.d.ts +8 -0
  305. package/dist/client-analytics/model/getTopFilterForAttributeResponse.d.ts.map +1 -0
  306. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts +8 -0
  307. package/dist/client-analytics/model/getTopFiltersNoResultsResponse.d.ts.map +1 -0
  308. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts +15 -0
  309. package/dist/client-analytics/model/getTopFiltersNoResultsValue.d.ts.map +1 -0
  310. package/dist/client-analytics/model/getTopFiltersNoResultsValues.d.ts +12 -0
  311. package/dist/client-analytics/model/getTopFiltersNoResultsValues.d.ts.map +1 -0
  312. package/dist/client-analytics/model/getTopHitsResponse.d.ts +4 -0
  313. package/dist/client-analytics/model/getTopHitsResponse.d.ts.map +1 -0
  314. package/dist/client-analytics/model/getTopSearchesResponse.d.ts +4 -0
  315. package/dist/client-analytics/model/getTopSearchesResponse.d.ts.map +1 -0
  316. package/dist/client-analytics/model/getUsersCountResponse.d.ts +12 -0
  317. package/dist/client-analytics/model/getUsersCountResponse.d.ts.map +1 -0
  318. package/dist/client-analytics/model/index.d.ts +45 -0
  319. package/dist/client-analytics/model/index.d.ts.map +1 -0
  320. package/dist/client-analytics/model/noClickRateEvent.d.ts +19 -0
  321. package/dist/client-analytics/model/noClickRateEvent.d.ts.map +1 -0
  322. package/dist/client-analytics/model/noResultsRateEvent.d.ts +19 -0
  323. package/dist/client-analytics/model/noResultsRateEvent.d.ts.map +1 -0
  324. package/dist/client-analytics/model/orderBy.d.ts +2 -0
  325. package/dist/client-analytics/model/orderBy.d.ts.map +1 -0
  326. package/dist/client-analytics/model/searchEvent.d.ts +11 -0
  327. package/dist/client-analytics/model/searchEvent.d.ts.map +1 -0
  328. package/dist/client-analytics/model/searchNoClickEvent.d.ts +15 -0
  329. package/dist/client-analytics/model/searchNoClickEvent.d.ts.map +1 -0
  330. package/dist/client-analytics/model/searchNoResultEvent.d.ts +15 -0
  331. package/dist/client-analytics/model/searchNoResultEvent.d.ts.map +1 -0
  332. package/dist/client-analytics/model/topCountry.d.ts +11 -0
  333. package/dist/client-analytics/model/topCountry.d.ts.map +1 -0
  334. package/dist/client-analytics/model/topHit.d.ts +11 -0
  335. package/dist/client-analytics/model/topHit.d.ts.map +1 -0
  336. package/dist/client-analytics/model/topHitWithAnalytics.d.ts +31 -0
  337. package/dist/client-analytics/model/topHitWithAnalytics.d.ts.map +1 -0
  338. package/dist/client-analytics/model/topHitsResponse.d.ts +8 -0
  339. package/dist/client-analytics/model/topHitsResponse.d.ts.map +1 -0
  340. package/dist/client-analytics/model/topHitsResponseWithAnalytics.d.ts +8 -0
  341. package/dist/client-analytics/model/topHitsResponseWithAnalytics.d.ts.map +1 -0
  342. package/dist/client-analytics/model/topSearch.d.ts +15 -0
  343. package/dist/client-analytics/model/topSearch.d.ts.map +1 -0
  344. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts +39 -0
  345. package/dist/client-analytics/model/topSearchWithAnalytics.d.ts.map +1 -0
  346. package/dist/client-analytics/model/topSearchesResponse.d.ts +8 -0
  347. package/dist/client-analytics/model/topSearchesResponse.d.ts.map +1 -0
  348. package/dist/client-analytics/model/topSearchesResponseWithAnalytics.d.ts +8 -0
  349. package/dist/client-analytics/model/topSearchesResponseWithAnalytics.d.ts.map +1 -0
  350. package/dist/client-analytics/model/userWithDate.d.ts +11 -0
  351. package/dist/client-analytics/model/userWithDate.d.ts.map +1 -0
  352. package/dist/client-analytics/src/analyticsClient.d.ts +311 -0
  353. package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -0
  354. package/dist/client-personalization/model/clientMethodProps.d.ts +79 -0
  355. package/dist/client-personalization/model/clientMethodProps.d.ts.map +1 -0
  356. package/dist/client-personalization/model/deleteUserProfileResponse.d.ts +11 -0
  357. package/dist/client-personalization/model/deleteUserProfileResponse.d.ts.map +1 -0
  358. package/dist/client-personalization/model/errorBase.d.ts +7 -0
  359. package/dist/client-personalization/model/errorBase.d.ts.map +1 -0
  360. package/dist/client-personalization/model/eventScoring.d.ts +15 -0
  361. package/dist/client-personalization/model/eventScoring.d.ts.map +1 -0
  362. package/dist/client-personalization/model/facetScoring.d.ts +11 -0
  363. package/dist/client-personalization/model/facetScoring.d.ts.map +1 -0
  364. package/dist/client-personalization/model/getUserTokenResponse.d.ts +15 -0
  365. package/dist/client-personalization/model/getUserTokenResponse.d.ts.map +1 -0
  366. package/dist/client-personalization/model/index.d.ts +9 -0
  367. package/dist/client-personalization/model/index.d.ts.map +1 -0
  368. package/dist/client-personalization/model/personalizationStrategyParams.d.ts +17 -0
  369. package/dist/client-personalization/model/personalizationStrategyParams.d.ts.map +1 -0
  370. package/dist/client-personalization/model/setPersonalizationStrategyResponse.d.ts +7 -0
  371. package/dist/client-personalization/model/setPersonalizationStrategyResponse.d.ts.map +1 -0
  372. package/dist/client-personalization/src/personalizationClient.d.ts +105 -0
  373. package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -0
  374. package/dist/client-search/model/acl.d.ts +2 -0
  375. package/dist/client-search/model/acl.d.ts.map +1 -0
  376. package/dist/client-search/model/action.d.ts +5 -0
  377. package/dist/client-search/model/action.d.ts.map +1 -0
  378. package/dist/client-search/model/addApiKeyResponse.d.ts +11 -0
  379. package/dist/client-search/model/addApiKeyResponse.d.ts.map +1 -0
  380. package/dist/client-search/model/advancedSyntaxFeatures.d.ts +2 -0
  381. package/dist/client-search/model/advancedSyntaxFeatures.d.ts.map +1 -0
  382. package/dist/client-search/model/alternativesAsExact.d.ts +2 -0
  383. package/dist/client-search/model/alternativesAsExact.d.ts.map +1 -0
  384. package/dist/client-search/model/anchoring.d.ts +5 -0
  385. package/dist/client-search/model/anchoring.d.ts.map +1 -0
  386. package/dist/client-search/model/apiKey.d.ts +39 -0
  387. package/dist/client-search/model/apiKey.d.ts.map +1 -0
  388. package/dist/client-search/model/aroundRadius.d.ts +6 -0
  389. package/dist/client-search/model/aroundRadius.d.ts.map +1 -0
  390. package/dist/client-search/model/aroundRadiusAll.d.ts +2 -0
  391. package/dist/client-search/model/aroundRadiusAll.d.ts.map +1 -0
  392. package/dist/client-search/model/assignUserIdParams.d.ts +10 -0
  393. package/dist/client-search/model/assignUserIdParams.d.ts.map +1 -0
  394. package/dist/client-search/model/attributeOrBuiltInOperation.d.ts +3 -0
  395. package/dist/client-search/model/attributeOrBuiltInOperation.d.ts.map +1 -0
  396. package/dist/client-search/model/automaticFacetFilter.d.ts +18 -0
  397. package/dist/client-search/model/automaticFacetFilter.d.ts.map +1 -0
  398. package/dist/client-search/model/automaticFacetFilters.d.ts +6 -0
  399. package/dist/client-search/model/automaticFacetFilters.d.ts.map +1 -0
  400. package/dist/client-search/model/baseBrowseResponse.d.ts +7 -0
  401. package/dist/client-search/model/baseBrowseResponse.d.ts.map +1 -0
  402. package/dist/client-search/model/baseIndexSettings.d.ts +59 -0
  403. package/dist/client-search/model/baseIndexSettings.d.ts.map +1 -0
  404. package/dist/client-search/model/baseSearchParams.d.ts +4 -0
  405. package/dist/client-search/model/baseSearchParams.d.ts.map +1 -0
  406. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts +123 -0
  407. package/dist/client-search/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
  408. package/dist/client-search/model/baseSearchResponse.d.ts +102 -0
  409. package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -0
  410. package/dist/client-search/model/batchAssignUserIdsParams.d.ts +14 -0
  411. package/dist/client-search/model/batchAssignUserIdsParams.d.ts.map +1 -0
  412. package/dist/client-search/model/batchDictionaryEntriesParams.d.ts +15 -0
  413. package/dist/client-search/model/batchDictionaryEntriesParams.d.ts.map +1 -0
  414. package/dist/client-search/model/batchDictionaryEntriesRequest.d.ts +7 -0
  415. package/dist/client-search/model/batchDictionaryEntriesRequest.d.ts.map +1 -0
  416. package/dist/client-search/model/batchParams.d.ts +8 -0
  417. package/dist/client-search/model/batchParams.d.ts.map +1 -0
  418. package/dist/client-search/model/batchRequest.d.ts +9 -0
  419. package/dist/client-search/model/batchRequest.d.ts.map +1 -0
  420. package/dist/client-search/model/batchResponse.d.ts +11 -0
  421. package/dist/client-search/model/batchResponse.d.ts.map +1 -0
  422. package/dist/client-search/model/batchWriteParams.d.ts +8 -0
  423. package/dist/client-search/model/batchWriteParams.d.ts.map +1 -0
  424. package/dist/client-search/model/browseRequest.d.ts +11 -0
  425. package/dist/client-search/model/browseRequest.d.ts.map +1 -0
  426. package/dist/client-search/model/browseResponse.d.ts +5 -0
  427. package/dist/client-search/model/browseResponse.d.ts.map +1 -0
  428. package/dist/client-search/model/builtInOperation.d.ts +12 -0
  429. package/dist/client-search/model/builtInOperation.d.ts.map +1 -0
  430. package/dist/client-search/model/builtInOperationType.d.ts +5 -0
  431. package/dist/client-search/model/builtInOperationType.d.ts.map +1 -0
  432. package/dist/client-search/model/clientMethodProps.d.ts +704 -0
  433. package/dist/client-search/model/clientMethodProps.d.ts.map +1 -0
  434. package/dist/client-search/model/condition.d.ts +17 -0
  435. package/dist/client-search/model/condition.d.ts.map +1 -0
  436. package/dist/client-search/model/consequence.d.ts +26 -0
  437. package/dist/client-search/model/consequence.d.ts.map +1 -0
  438. package/dist/client-search/model/consequenceHide.d.ts +10 -0
  439. package/dist/client-search/model/consequenceHide.d.ts.map +1 -0
  440. package/dist/client-search/model/consequenceParams.d.ts +5 -0
  441. package/dist/client-search/model/consequenceParams.d.ts.map +1 -0
  442. package/dist/client-search/model/consequenceQuery.d.ts +6 -0
  443. package/dist/client-search/model/consequenceQuery.d.ts.map +1 -0
  444. package/dist/client-search/model/consequenceQueryObject.d.ts +12 -0
  445. package/dist/client-search/model/consequenceQueryObject.d.ts.map +1 -0
  446. package/dist/client-search/model/createdAtObject.d.ts +7 -0
  447. package/dist/client-search/model/createdAtObject.d.ts.map +1 -0
  448. package/dist/client-search/model/createdAtResponse.d.ts +10 -0
  449. package/dist/client-search/model/createdAtResponse.d.ts.map +1 -0
  450. package/dist/client-search/model/deleteApiKeyResponse.d.ts +7 -0
  451. package/dist/client-search/model/deleteApiKeyResponse.d.ts.map +1 -0
  452. package/dist/client-search/model/deleteSourceResponse.d.ts +7 -0
  453. package/dist/client-search/model/deleteSourceResponse.d.ts.map +1 -0
  454. package/dist/client-search/model/deletedAtResponse.d.ts +14 -0
  455. package/dist/client-search/model/deletedAtResponse.d.ts.map +1 -0
  456. package/dist/client-search/model/dictionaryAction.d.ts +5 -0
  457. package/dist/client-search/model/dictionaryAction.d.ts.map +1 -0
  458. package/dist/client-search/model/dictionaryEntry.d.ts +28 -0
  459. package/dist/client-search/model/dictionaryEntry.d.ts.map +1 -0
  460. package/dist/client-search/model/dictionaryEntryState.d.ts +5 -0
  461. package/dist/client-search/model/dictionaryEntryState.d.ts.map +1 -0
  462. package/dist/client-search/model/dictionaryLanguage.d.ts +10 -0
  463. package/dist/client-search/model/dictionaryLanguage.d.ts.map +1 -0
  464. package/dist/client-search/model/dictionarySettingsParams.d.ts +8 -0
  465. package/dist/client-search/model/dictionarySettingsParams.d.ts.map +1 -0
  466. package/dist/client-search/model/dictionaryType.d.ts +2 -0
  467. package/dist/client-search/model/dictionaryType.d.ts.map +1 -0
  468. package/dist/client-search/model/distinct.d.ts +5 -0
  469. package/dist/client-search/model/distinct.d.ts.map +1 -0
  470. package/dist/client-search/model/edit.d.ts +13 -0
  471. package/dist/client-search/model/edit.d.ts.map +1 -0
  472. package/dist/client-search/model/editType.d.ts +5 -0
  473. package/dist/client-search/model/editType.d.ts.map +1 -0
  474. package/dist/client-search/model/errorBase.d.ts +7 -0
  475. package/dist/client-search/model/errorBase.d.ts.map +1 -0
  476. package/dist/client-search/model/exactOnSingleWordQuery.d.ts +5 -0
  477. package/dist/client-search/model/exactOnSingleWordQuery.d.ts.map +1 -0
  478. package/dist/client-search/model/facetFilters.d.ts +6 -0
  479. package/dist/client-search/model/facetFilters.d.ts.map +1 -0
  480. package/dist/client-search/model/facetHits.d.ts +15 -0
  481. package/dist/client-search/model/facetHits.d.ts.map +1 -0
  482. package/dist/client-search/model/facetOrdering.d.ts +13 -0
  483. package/dist/client-search/model/facetOrdering.d.ts.map +1 -0
  484. package/dist/client-search/model/facets.d.ts +10 -0
  485. package/dist/client-search/model/facets.d.ts.map +1 -0
  486. package/dist/client-search/model/facetsStats.d.ts +19 -0
  487. package/dist/client-search/model/facetsStats.d.ts.map +1 -0
  488. package/dist/client-search/model/fetchedIndex.d.ts +47 -0
  489. package/dist/client-search/model/fetchedIndex.d.ts.map +1 -0
  490. package/dist/client-search/model/getDictionarySettingsResponse.d.ts +5 -0
  491. package/dist/client-search/model/getDictionarySettingsResponse.d.ts.map +1 -0
  492. package/dist/client-search/model/getLogsResponse.d.ts +5 -0
  493. package/dist/client-search/model/getLogsResponse.d.ts.map +1 -0
  494. package/dist/client-search/model/getObjectsParams.d.ts +8 -0
  495. package/dist/client-search/model/getObjectsParams.d.ts.map +1 -0
  496. package/dist/client-search/model/getObjectsRequest.d.ts +18 -0
  497. package/dist/client-search/model/getObjectsRequest.d.ts.map +1 -0
  498. package/dist/client-search/model/getObjectsResponse.d.ts +7 -0
  499. package/dist/client-search/model/getObjectsResponse.d.ts.map +1 -0
  500. package/dist/client-search/model/getTaskResponse.d.ts +5 -0
  501. package/dist/client-search/model/getTaskResponse.d.ts.map +1 -0
  502. package/dist/client-search/model/getTopUserIdsResponse.d.ts +11 -0
  503. package/dist/client-search/model/getTopUserIdsResponse.d.ts.map +1 -0
  504. package/dist/client-search/model/hasPendingMappingsResponse.d.ts +11 -0
  505. package/dist/client-search/model/hasPendingMappingsResponse.d.ts.map +1 -0
  506. package/dist/client-search/model/highlightResult.d.ts +3 -0
  507. package/dist/client-search/model/highlightResult.d.ts.map +1 -0
  508. package/dist/client-search/model/highlightResultOption.d.ts +20 -0
  509. package/dist/client-search/model/highlightResultOption.d.ts.map +1 -0
  510. package/dist/client-search/model/hit.d.ts +23 -0
  511. package/dist/client-search/model/hit.d.ts.map +1 -0
  512. package/dist/client-search/model/ignorePlurals.d.ts +5 -0
  513. package/dist/client-search/model/ignorePlurals.d.ts.map +1 -0
  514. package/dist/client-search/model/index.d.ts +154 -0
  515. package/dist/client-search/model/index.d.ts.map +1 -0
  516. package/dist/client-search/model/indexSettings.d.ts +7 -0
  517. package/dist/client-search/model/indexSettings.d.ts.map +1 -0
  518. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +157 -0
  519. package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -0
  520. package/dist/client-search/model/key.d.ts +4 -0
  521. package/dist/client-search/model/key.d.ts.map +1 -0
  522. package/dist/client-search/model/languages.d.ts +10 -0
  523. package/dist/client-search/model/languages.d.ts.map +1 -0
  524. package/dist/client-search/model/listApiKeysResponse.d.ts +8 -0
  525. package/dist/client-search/model/listApiKeysResponse.d.ts.map +1 -0
  526. package/dist/client-search/model/listClustersResponse.d.ts +10 -0
  527. package/dist/client-search/model/listClustersResponse.d.ts.map +1 -0
  528. package/dist/client-search/model/listIndicesResponse.d.ts +12 -0
  529. package/dist/client-search/model/listIndicesResponse.d.ts.map +1 -0
  530. package/dist/client-search/model/listUserIdsResponse.d.ts +11 -0
  531. package/dist/client-search/model/listUserIdsResponse.d.ts.map +1 -0
  532. package/dist/client-search/model/log.d.ts +64 -0
  533. package/dist/client-search/model/log.d.ts.map +1 -0
  534. package/dist/client-search/model/logQuery.d.ts +15 -0
  535. package/dist/client-search/model/logQuery.d.ts.map +1 -0
  536. package/dist/client-search/model/logType.d.ts +2 -0
  537. package/dist/client-search/model/logType.d.ts.map +1 -0
  538. package/dist/client-search/model/matchLevel.d.ts +5 -0
  539. package/dist/client-search/model/matchLevel.d.ts.map +1 -0
  540. package/dist/client-search/model/matchedGeoLocation.d.ts +15 -0
  541. package/dist/client-search/model/matchedGeoLocation.d.ts.map +1 -0
  542. package/dist/client-search/model/mixedSearchFilters.d.ts +2 -0
  543. package/dist/client-search/model/mixedSearchFilters.d.ts.map +1 -0
  544. package/dist/client-search/model/multipleBatchRequest.d.ts +13 -0
  545. package/dist/client-search/model/multipleBatchRequest.d.ts.map +1 -0
  546. package/dist/client-search/model/multipleBatchResponse.d.ts +11 -0
  547. package/dist/client-search/model/multipleBatchResponse.d.ts.map +1 -0
  548. package/dist/client-search/model/numericFilters.d.ts +6 -0
  549. package/dist/client-search/model/numericFilters.d.ts.map +1 -0
  550. package/dist/client-search/model/operationIndexParams.d.ts +14 -0
  551. package/dist/client-search/model/operationIndexParams.d.ts.map +1 -0
  552. package/dist/client-search/model/operationType.d.ts +5 -0
  553. package/dist/client-search/model/operationType.d.ts.map +1 -0
  554. package/dist/client-search/model/optionalFilters.d.ts +6 -0
  555. package/dist/client-search/model/optionalFilters.d.ts.map +1 -0
  556. package/dist/client-search/model/params.d.ts +13 -0
  557. package/dist/client-search/model/params.d.ts.map +1 -0
  558. package/dist/client-search/model/personalization.d.ts +15 -0
  559. package/dist/client-search/model/personalization.d.ts.map +1 -0
  560. package/dist/client-search/model/promote.d.ts +4 -0
  561. package/dist/client-search/model/promote.d.ts.map +1 -0
  562. package/dist/client-search/model/promoteObjectID.d.ts +14 -0
  563. package/dist/client-search/model/promoteObjectID.d.ts.map +1 -0
  564. package/dist/client-search/model/promoteObjectIDs.d.ts +14 -0
  565. package/dist/client-search/model/promoteObjectIDs.d.ts.map +1 -0
  566. package/dist/client-search/model/queryType.d.ts +5 -0
  567. package/dist/client-search/model/queryType.d.ts.map +1 -0
  568. package/dist/client-search/model/rankingInfo.d.ts +51 -0
  569. package/dist/client-search/model/rankingInfo.d.ts.map +1 -0
  570. package/dist/client-search/model/reRankingApplyFilter.d.ts +6 -0
  571. package/dist/client-search/model/reRankingApplyFilter.d.ts.map +1 -0
  572. package/dist/client-search/model/removeStopWords.d.ts +5 -0
  573. package/dist/client-search/model/removeStopWords.d.ts.map +1 -0
  574. package/dist/client-search/model/removeUserIdResponse.d.ts +7 -0
  575. package/dist/client-search/model/removeUserIdResponse.d.ts.map +1 -0
  576. package/dist/client-search/model/removeWordsIfNoResults.d.ts +5 -0
  577. package/dist/client-search/model/removeWordsIfNoResults.d.ts.map +1 -0
  578. package/dist/client-search/model/renderingContent.d.ts +8 -0
  579. package/dist/client-search/model/renderingContent.d.ts.map +1 -0
  580. package/dist/client-search/model/replaceSourceResponse.d.ts +7 -0
  581. package/dist/client-search/model/replaceSourceResponse.d.ts.map +1 -0
  582. package/dist/client-search/model/rule.d.ts +30 -0
  583. package/dist/client-search/model/rule.d.ts.map +1 -0
  584. package/dist/client-search/model/saveObjectResponse.d.ts +12 -0
  585. package/dist/client-search/model/saveObjectResponse.d.ts.map +1 -0
  586. package/dist/client-search/model/saveSynonymResponse.d.ts +15 -0
  587. package/dist/client-search/model/saveSynonymResponse.d.ts.map +1 -0
  588. package/dist/client-search/model/scopeType.d.ts +2 -0
  589. package/dist/client-search/model/scopeType.d.ts.map +1 -0
  590. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts +22 -0
  591. package/dist/client-search/model/searchDictionaryEntriesParams.d.ts.map +1 -0
  592. package/dist/client-search/model/searchForFacetValuesRequest.d.ts +15 -0
  593. package/dist/client-search/model/searchForFacetValuesRequest.d.ts.map +1 -0
  594. package/dist/client-search/model/searchForFacetValuesResponse.d.ts +5 -0
  595. package/dist/client-search/model/searchForFacetValuesResponse.d.ts.map +1 -0
  596. package/dist/client-search/model/searchForFacets.d.ts +4 -0
  597. package/dist/client-search/model/searchForFacets.d.ts.map +1 -0
  598. package/dist/client-search/model/searchForFacetsOptions.d.ts +21 -0
  599. package/dist/client-search/model/searchForFacetsOptions.d.ts.map +1 -0
  600. package/dist/client-search/model/searchForHits.d.ts +4 -0
  601. package/dist/client-search/model/searchForHits.d.ts.map +1 -0
  602. package/dist/client-search/model/searchForHitsOptions.d.ts +13 -0
  603. package/dist/client-search/model/searchForHitsOptions.d.ts.map +1 -0
  604. package/dist/client-search/model/searchHits.d.ts +5 -0
  605. package/dist/client-search/model/searchHits.d.ts.map +1 -0
  606. package/dist/client-search/model/searchMethodParams.d.ts +7 -0
  607. package/dist/client-search/model/searchMethodParams.d.ts.map +1 -0
  608. package/dist/client-search/model/searchParams.d.ts +4 -0
  609. package/dist/client-search/model/searchParams.d.ts.map +1 -0
  610. package/dist/client-search/model/searchParamsObject.d.ts +4 -0
  611. package/dist/client-search/model/searchParamsObject.d.ts.map +1 -0
  612. package/dist/client-search/model/searchParamsQuery.d.ts +7 -0
  613. package/dist/client-search/model/searchParamsQuery.d.ts.map +1 -0
  614. package/dist/client-search/model/searchParamsString.d.ts +7 -0
  615. package/dist/client-search/model/searchParamsString.d.ts.map +1 -0
  616. package/dist/client-search/model/searchQuery.d.ts +4 -0
  617. package/dist/client-search/model/searchQuery.d.ts.map +1 -0
  618. package/dist/client-search/model/searchResponse.d.ts +4 -0
  619. package/dist/client-search/model/searchResponse.d.ts.map +1 -0
  620. package/dist/client-search/model/searchResponses.d.ts +5 -0
  621. package/dist/client-search/model/searchResponses.d.ts.map +1 -0
  622. package/dist/client-search/model/searchRulesParams.d.ts +32 -0
  623. package/dist/client-search/model/searchRulesParams.d.ts.map +1 -0
  624. package/dist/client-search/model/searchRulesResponse.d.ts +20 -0
  625. package/dist/client-search/model/searchRulesResponse.d.ts.map +1 -0
  626. package/dist/client-search/model/searchStrategy.d.ts +2 -0
  627. package/dist/client-search/model/searchStrategy.d.ts.map +1 -0
  628. package/dist/client-search/model/searchSynonymsParams.d.ts +7 -0
  629. package/dist/client-search/model/searchSynonymsParams.d.ts.map +1 -0
  630. package/dist/client-search/model/searchSynonymsResponse.d.ts +12 -0
  631. package/dist/client-search/model/searchSynonymsResponse.d.ts.map +1 -0
  632. package/dist/client-search/model/searchTypeDefault.d.ts +5 -0
  633. package/dist/client-search/model/searchTypeDefault.d.ts.map +1 -0
  634. package/dist/client-search/model/searchTypeFacet.d.ts +5 -0
  635. package/dist/client-search/model/searchTypeFacet.d.ts.map +1 -0
  636. package/dist/client-search/model/searchUserIdsParams.d.ts +22 -0
  637. package/dist/client-search/model/searchUserIdsParams.d.ts.map +1 -0
  638. package/dist/client-search/model/searchUserIdsResponse.d.ts +27 -0
  639. package/dist/client-search/model/searchUserIdsResponse.d.ts.map +1 -0
  640. package/dist/client-search/model/snippetResult.d.ts +3 -0
  641. package/dist/client-search/model/snippetResult.d.ts.map +1 -0
  642. package/dist/client-search/model/snippetResultOption.d.ts +12 -0
  643. package/dist/client-search/model/snippetResultOption.d.ts.map +1 -0
  644. package/dist/client-search/model/sortRemainingBy.d.ts +5 -0
  645. package/dist/client-search/model/sortRemainingBy.d.ts.map +1 -0
  646. package/dist/client-search/model/source.d.ts +14 -0
  647. package/dist/client-search/model/source.d.ts.map +1 -0
  648. package/dist/client-search/model/standardEntries.d.ts +18 -0
  649. package/dist/client-search/model/standardEntries.d.ts.map +1 -0
  650. package/dist/client-search/model/synonymHit.d.ts +38 -0
  651. package/dist/client-search/model/synonymHit.d.ts.map +1 -0
  652. package/dist/client-search/model/synonymHitHighlightResult.d.ts +12 -0
  653. package/dist/client-search/model/synonymHitHighlightResult.d.ts.map +1 -0
  654. package/dist/client-search/model/synonymType.d.ts +5 -0
  655. package/dist/client-search/model/synonymType.d.ts.map +1 -0
  656. package/dist/client-search/model/tagFilters.d.ts +6 -0
  657. package/dist/client-search/model/tagFilters.d.ts.map +1 -0
  658. package/dist/client-search/model/taskStatus.d.ts +2 -0
  659. package/dist/client-search/model/taskStatus.d.ts.map +1 -0
  660. package/dist/client-search/model/timeRange.d.ts +11 -0
  661. package/dist/client-search/model/timeRange.d.ts.map +1 -0
  662. package/dist/client-search/model/typoTolerance.d.ts +6 -0
  663. package/dist/client-search/model/typoTolerance.d.ts.map +1 -0
  664. package/dist/client-search/model/typoToleranceEnum.d.ts +2 -0
  665. package/dist/client-search/model/typoToleranceEnum.d.ts.map +1 -0
  666. package/dist/client-search/model/updateApiKeyResponse.d.ts +11 -0
  667. package/dist/client-search/model/updateApiKeyResponse.d.ts.map +1 -0
  668. package/dist/client-search/model/updatedAtResponse.d.ts +14 -0
  669. package/dist/client-search/model/updatedAtResponse.d.ts.map +1 -0
  670. package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts +18 -0
  671. package/dist/client-search/model/updatedAtWithObjectIdResponse.d.ts.map +1 -0
  672. package/dist/client-search/model/updatedRuleResponse.d.ts +15 -0
  673. package/dist/client-search/model/updatedRuleResponse.d.ts.map +1 -0
  674. package/dist/client-search/model/userHighlightResult.d.ts +12 -0
  675. package/dist/client-search/model/userHighlightResult.d.ts.map +1 -0
  676. package/dist/client-search/model/userHit.d.ts +25 -0
  677. package/dist/client-search/model/userHit.d.ts.map +1 -0
  678. package/dist/client-search/model/userId.d.ts +22 -0
  679. package/dist/client-search/model/userId.d.ts.map +1 -0
  680. package/dist/client-search/model/value.d.ts +9 -0
  681. package/dist/client-search/model/value.d.ts.map +1 -0
  682. package/dist/client-search/src/searchClient.d.ts +677 -0
  683. package/dist/client-search/src/searchClient.d.ts.map +1 -0
  684. package/dist/lite/builds/browser.d.ts +83 -0
  685. package/dist/lite/builds/browser.d.ts.map +1 -0
  686. package/dist/lite/builds/models.d.ts +32 -0
  687. package/dist/lite/builds/models.d.ts.map +1 -0
  688. package/dist/lite/builds/node.d.ts +83 -0
  689. package/dist/lite/builds/node.d.ts.map +1 -0
  690. package/dist/lite/lite/builds/browser.d.ts +6 -0
  691. package/dist/lite/lite/builds/browser.d.ts.map +1 -0
  692. package/dist/lite/lite/builds/node.d.ts +6 -0
  693. package/dist/lite/lite/builds/node.d.ts.map +1 -0
  694. package/dist/lite/lite/model/acl.d.ts +2 -0
  695. package/dist/lite/lite/model/acl.d.ts.map +1 -0
  696. package/dist/lite/lite/model/action.d.ts +5 -0
  697. package/dist/lite/lite/model/action.d.ts.map +1 -0
  698. package/dist/lite/lite/model/addApiKeyResponse.d.ts +11 -0
  699. package/dist/lite/lite/model/addApiKeyResponse.d.ts.map +1 -0
  700. package/dist/lite/lite/model/advancedSyntaxFeatures.d.ts +2 -0
  701. package/dist/lite/lite/model/advancedSyntaxFeatures.d.ts.map +1 -0
  702. package/dist/lite/lite/model/alternativesAsExact.d.ts +2 -0
  703. package/dist/lite/lite/model/alternativesAsExact.d.ts.map +1 -0
  704. package/dist/lite/lite/model/anchoring.d.ts +5 -0
  705. package/dist/lite/lite/model/anchoring.d.ts.map +1 -0
  706. package/dist/lite/lite/model/apiKey.d.ts +39 -0
  707. package/dist/lite/lite/model/apiKey.d.ts.map +1 -0
  708. package/dist/lite/lite/model/aroundRadius.d.ts +6 -0
  709. package/dist/lite/lite/model/aroundRadius.d.ts.map +1 -0
  710. package/dist/lite/lite/model/aroundRadiusAll.d.ts +2 -0
  711. package/dist/lite/lite/model/aroundRadiusAll.d.ts.map +1 -0
  712. package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts +3 -0
  713. package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts.map +1 -0
  714. package/dist/lite/lite/model/automaticFacetFilter.d.ts +18 -0
  715. package/dist/lite/lite/model/automaticFacetFilter.d.ts.map +1 -0
  716. package/dist/lite/lite/model/automaticFacetFilters.d.ts +6 -0
  717. package/dist/lite/lite/model/automaticFacetFilters.d.ts.map +1 -0
  718. package/dist/lite/lite/model/baseBrowseResponse.d.ts +7 -0
  719. package/dist/lite/lite/model/baseBrowseResponse.d.ts.map +1 -0
  720. package/dist/lite/lite/model/baseIndexSettings.d.ts +59 -0
  721. package/dist/lite/lite/model/baseIndexSettings.d.ts.map +1 -0
  722. package/dist/lite/lite/model/baseSearchParams.d.ts +4 -0
  723. package/dist/lite/lite/model/baseSearchParams.d.ts.map +1 -0
  724. package/dist/lite/lite/model/baseSearchParamsWithoutQuery.d.ts +123 -0
  725. package/dist/lite/lite/model/baseSearchParamsWithoutQuery.d.ts.map +1 -0
  726. package/dist/lite/lite/model/baseSearchResponse.d.ts +102 -0
  727. package/dist/lite/lite/model/baseSearchResponse.d.ts.map +1 -0
  728. package/dist/lite/lite/model/browseResponse.d.ts +5 -0
  729. package/dist/lite/lite/model/browseResponse.d.ts.map +1 -0
  730. package/dist/lite/lite/model/builtInOperation.d.ts +12 -0
  731. package/dist/lite/lite/model/builtInOperation.d.ts.map +1 -0
  732. package/dist/lite/lite/model/builtInOperationType.d.ts +5 -0
  733. package/dist/lite/lite/model/builtInOperationType.d.ts.map +1 -0
  734. package/dist/lite/lite/model/clientMethodProps.d.ts +49 -0
  735. package/dist/lite/lite/model/clientMethodProps.d.ts.map +1 -0
  736. package/dist/lite/lite/model/condition.d.ts +17 -0
  737. package/dist/lite/lite/model/condition.d.ts.map +1 -0
  738. package/dist/lite/lite/model/consequence.d.ts +26 -0
  739. package/dist/lite/lite/model/consequence.d.ts.map +1 -0
  740. package/dist/lite/lite/model/consequenceHide.d.ts +10 -0
  741. package/dist/lite/lite/model/consequenceHide.d.ts.map +1 -0
  742. package/dist/lite/lite/model/consequenceParams.d.ts +5 -0
  743. package/dist/lite/lite/model/consequenceParams.d.ts.map +1 -0
  744. package/dist/lite/lite/model/consequenceQuery.d.ts +6 -0
  745. package/dist/lite/lite/model/consequenceQuery.d.ts.map +1 -0
  746. package/dist/lite/lite/model/consequenceQueryObject.d.ts +12 -0
  747. package/dist/lite/lite/model/consequenceQueryObject.d.ts.map +1 -0
  748. package/dist/lite/lite/model/createdAtObject.d.ts +7 -0
  749. package/dist/lite/lite/model/createdAtObject.d.ts.map +1 -0
  750. package/dist/lite/lite/model/dictionaryAction.d.ts +5 -0
  751. package/dist/lite/lite/model/dictionaryAction.d.ts.map +1 -0
  752. package/dist/lite/lite/model/dictionaryEntry.d.ts +28 -0
  753. package/dist/lite/lite/model/dictionaryEntry.d.ts.map +1 -0
  754. package/dist/lite/lite/model/dictionaryEntryState.d.ts +5 -0
  755. package/dist/lite/lite/model/dictionaryEntryState.d.ts.map +1 -0
  756. package/dist/lite/lite/model/dictionaryLanguage.d.ts +10 -0
  757. package/dist/lite/lite/model/dictionaryLanguage.d.ts.map +1 -0
  758. package/dist/lite/lite/model/dictionaryType.d.ts +2 -0
  759. package/dist/lite/lite/model/dictionaryType.d.ts.map +1 -0
  760. package/dist/lite/lite/model/distinct.d.ts +5 -0
  761. package/dist/lite/lite/model/distinct.d.ts.map +1 -0
  762. package/dist/lite/lite/model/edit.d.ts +13 -0
  763. package/dist/lite/lite/model/edit.d.ts.map +1 -0
  764. package/dist/lite/lite/model/editType.d.ts +5 -0
  765. package/dist/lite/lite/model/editType.d.ts.map +1 -0
  766. package/dist/lite/lite/model/errorBase.d.ts +7 -0
  767. package/dist/lite/lite/model/errorBase.d.ts.map +1 -0
  768. package/dist/lite/lite/model/exactOnSingleWordQuery.d.ts +5 -0
  769. package/dist/lite/lite/model/exactOnSingleWordQuery.d.ts.map +1 -0
  770. package/dist/lite/lite/model/facetFilters.d.ts +6 -0
  771. package/dist/lite/lite/model/facetFilters.d.ts.map +1 -0
  772. package/dist/lite/lite/model/facetOrdering.d.ts +13 -0
  773. package/dist/lite/lite/model/facetOrdering.d.ts.map +1 -0
  774. package/dist/lite/lite/model/facets.d.ts +10 -0
  775. package/dist/lite/lite/model/facets.d.ts.map +1 -0
  776. package/dist/lite/lite/model/facetsStats.d.ts +19 -0
  777. package/dist/lite/lite/model/facetsStats.d.ts.map +1 -0
  778. package/dist/lite/lite/model/fetchedIndex.d.ts +47 -0
  779. package/dist/lite/lite/model/fetchedIndex.d.ts.map +1 -0
  780. package/dist/lite/lite/model/highlightResult.d.ts +3 -0
  781. package/dist/lite/lite/model/highlightResult.d.ts.map +1 -0
  782. package/dist/lite/lite/model/highlightResultOption.d.ts +20 -0
  783. package/dist/lite/lite/model/highlightResultOption.d.ts.map +1 -0
  784. package/dist/lite/lite/model/hit.d.ts +23 -0
  785. package/dist/lite/lite/model/hit.d.ts.map +1 -0
  786. package/dist/lite/lite/model/ignorePlurals.d.ts +5 -0
  787. package/dist/lite/lite/model/ignorePlurals.d.ts.map +1 -0
  788. package/dist/lite/lite/model/index.d.ts +106 -0
  789. package/dist/lite/lite/model/index.d.ts.map +1 -0
  790. package/dist/lite/lite/model/indexSettings.d.ts +7 -0
  791. package/dist/lite/lite/model/indexSettings.d.ts.map +1 -0
  792. package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts +157 -0
  793. package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -0
  794. package/dist/lite/lite/model/key.d.ts +4 -0
  795. package/dist/lite/lite/model/key.d.ts.map +1 -0
  796. package/dist/lite/lite/model/languages.d.ts +10 -0
  797. package/dist/lite/lite/model/languages.d.ts.map +1 -0
  798. package/dist/lite/lite/model/listIndicesResponse.d.ts +12 -0
  799. package/dist/lite/lite/model/listIndicesResponse.d.ts.map +1 -0
  800. package/dist/lite/lite/model/logType.d.ts +2 -0
  801. package/dist/lite/lite/model/logType.d.ts.map +1 -0
  802. package/dist/lite/lite/model/matchLevel.d.ts +5 -0
  803. package/dist/lite/lite/model/matchLevel.d.ts.map +1 -0
  804. package/dist/lite/lite/model/matchedGeoLocation.d.ts +15 -0
  805. package/dist/lite/lite/model/matchedGeoLocation.d.ts.map +1 -0
  806. package/dist/lite/lite/model/mixedSearchFilters.d.ts +2 -0
  807. package/dist/lite/lite/model/mixedSearchFilters.d.ts.map +1 -0
  808. package/dist/lite/lite/model/numericFilters.d.ts +6 -0
  809. package/dist/lite/lite/model/numericFilters.d.ts.map +1 -0
  810. package/dist/lite/lite/model/operationType.d.ts +5 -0
  811. package/dist/lite/lite/model/operationType.d.ts.map +1 -0
  812. package/dist/lite/lite/model/optionalFilters.d.ts +6 -0
  813. package/dist/lite/lite/model/optionalFilters.d.ts.map +1 -0
  814. package/dist/lite/lite/model/params.d.ts +13 -0
  815. package/dist/lite/lite/model/params.d.ts.map +1 -0
  816. package/dist/lite/lite/model/personalization.d.ts +15 -0
  817. package/dist/lite/lite/model/personalization.d.ts.map +1 -0
  818. package/dist/lite/lite/model/promote.d.ts +4 -0
  819. package/dist/lite/lite/model/promote.d.ts.map +1 -0
  820. package/dist/lite/lite/model/promoteObjectID.d.ts +14 -0
  821. package/dist/lite/lite/model/promoteObjectID.d.ts.map +1 -0
  822. package/dist/lite/lite/model/promoteObjectIDs.d.ts +14 -0
  823. package/dist/lite/lite/model/promoteObjectIDs.d.ts.map +1 -0
  824. package/dist/lite/lite/model/queryType.d.ts +5 -0
  825. package/dist/lite/lite/model/queryType.d.ts.map +1 -0
  826. package/dist/lite/lite/model/rankingInfo.d.ts +51 -0
  827. package/dist/lite/lite/model/rankingInfo.d.ts.map +1 -0
  828. package/dist/lite/lite/model/reRankingApplyFilter.d.ts +6 -0
  829. package/dist/lite/lite/model/reRankingApplyFilter.d.ts.map +1 -0
  830. package/dist/lite/lite/model/removeStopWords.d.ts +5 -0
  831. package/dist/lite/lite/model/removeStopWords.d.ts.map +1 -0
  832. package/dist/lite/lite/model/removeWordsIfNoResults.d.ts +5 -0
  833. package/dist/lite/lite/model/removeWordsIfNoResults.d.ts.map +1 -0
  834. package/dist/lite/lite/model/renderingContent.d.ts +8 -0
  835. package/dist/lite/lite/model/renderingContent.d.ts.map +1 -0
  836. package/dist/lite/lite/model/rule.d.ts +30 -0
  837. package/dist/lite/lite/model/rule.d.ts.map +1 -0
  838. package/dist/lite/lite/model/scopeType.d.ts +2 -0
  839. package/dist/lite/lite/model/scopeType.d.ts.map +1 -0
  840. package/dist/lite/lite/model/searchForFacets.d.ts +4 -0
  841. package/dist/lite/lite/model/searchForFacets.d.ts.map +1 -0
  842. package/dist/lite/lite/model/searchForFacetsOptions.d.ts +21 -0
  843. package/dist/lite/lite/model/searchForFacetsOptions.d.ts.map +1 -0
  844. package/dist/lite/lite/model/searchForHits.d.ts +4 -0
  845. package/dist/lite/lite/model/searchForHits.d.ts.map +1 -0
  846. package/dist/lite/lite/model/searchForHitsOptions.d.ts +13 -0
  847. package/dist/lite/lite/model/searchForHitsOptions.d.ts.map +1 -0
  848. package/dist/lite/lite/model/searchHits.d.ts +5 -0
  849. package/dist/lite/lite/model/searchHits.d.ts.map +1 -0
  850. package/dist/lite/lite/model/searchMethodParams.d.ts +7 -0
  851. package/dist/lite/lite/model/searchMethodParams.d.ts.map +1 -0
  852. package/dist/lite/lite/model/searchParams.d.ts +4 -0
  853. package/dist/lite/lite/model/searchParams.d.ts.map +1 -0
  854. package/dist/lite/lite/model/searchParamsObject.d.ts +4 -0
  855. package/dist/lite/lite/model/searchParamsObject.d.ts.map +1 -0
  856. package/dist/lite/lite/model/searchParamsQuery.d.ts +7 -0
  857. package/dist/lite/lite/model/searchParamsQuery.d.ts.map +1 -0
  858. package/dist/lite/lite/model/searchParamsString.d.ts +7 -0
  859. package/dist/lite/lite/model/searchParamsString.d.ts.map +1 -0
  860. package/dist/lite/lite/model/searchQuery.d.ts +4 -0
  861. package/dist/lite/lite/model/searchQuery.d.ts.map +1 -0
  862. package/dist/lite/lite/model/searchResponse.d.ts +4 -0
  863. package/dist/lite/lite/model/searchResponse.d.ts.map +1 -0
  864. package/dist/lite/lite/model/searchResponses.d.ts +5 -0
  865. package/dist/lite/lite/model/searchResponses.d.ts.map +1 -0
  866. package/dist/lite/lite/model/searchStrategy.d.ts +2 -0
  867. package/dist/lite/lite/model/searchStrategy.d.ts.map +1 -0
  868. package/dist/lite/lite/model/searchSynonymsResponse.d.ts +12 -0
  869. package/dist/lite/lite/model/searchSynonymsResponse.d.ts.map +1 -0
  870. package/dist/lite/lite/model/searchTypeDefault.d.ts +5 -0
  871. package/dist/lite/lite/model/searchTypeDefault.d.ts.map +1 -0
  872. package/dist/lite/lite/model/searchTypeFacet.d.ts +5 -0
  873. package/dist/lite/lite/model/searchTypeFacet.d.ts.map +1 -0
  874. package/dist/lite/lite/model/snippetResult.d.ts +3 -0
  875. package/dist/lite/lite/model/snippetResult.d.ts.map +1 -0
  876. package/dist/lite/lite/model/snippetResultOption.d.ts +12 -0
  877. package/dist/lite/lite/model/snippetResultOption.d.ts.map +1 -0
  878. package/dist/lite/lite/model/sortRemainingBy.d.ts +5 -0
  879. package/dist/lite/lite/model/sortRemainingBy.d.ts.map +1 -0
  880. package/dist/lite/lite/model/source.d.ts +14 -0
  881. package/dist/lite/lite/model/source.d.ts.map +1 -0
  882. package/dist/lite/lite/model/standardEntries.d.ts +18 -0
  883. package/dist/lite/lite/model/standardEntries.d.ts.map +1 -0
  884. package/dist/lite/lite/model/synonymHit.d.ts +38 -0
  885. package/dist/lite/lite/model/synonymHit.d.ts.map +1 -0
  886. package/dist/lite/lite/model/synonymHitHighlightResult.d.ts +12 -0
  887. package/dist/lite/lite/model/synonymHitHighlightResult.d.ts.map +1 -0
  888. package/dist/lite/lite/model/synonymType.d.ts +5 -0
  889. package/dist/lite/lite/model/synonymType.d.ts.map +1 -0
  890. package/dist/lite/lite/model/tagFilters.d.ts +6 -0
  891. package/dist/lite/lite/model/tagFilters.d.ts.map +1 -0
  892. package/dist/lite/lite/model/taskStatus.d.ts +2 -0
  893. package/dist/lite/lite/model/taskStatus.d.ts.map +1 -0
  894. package/dist/lite/lite/model/timeRange.d.ts +11 -0
  895. package/dist/lite/lite/model/timeRange.d.ts.map +1 -0
  896. package/dist/lite/lite/model/typoTolerance.d.ts +6 -0
  897. package/dist/lite/lite/model/typoTolerance.d.ts.map +1 -0
  898. package/dist/lite/lite/model/typoToleranceEnum.d.ts +2 -0
  899. package/dist/lite/lite/model/typoToleranceEnum.d.ts.map +1 -0
  900. package/dist/lite/lite/model/updatedRuleResponse.d.ts +15 -0
  901. package/dist/lite/lite/model/updatedRuleResponse.d.ts.map +1 -0
  902. package/dist/lite/lite/model/userId.d.ts +22 -0
  903. package/dist/lite/lite/model/userId.d.ts.map +1 -0
  904. package/dist/lite/lite/model/value.d.ts +9 -0
  905. package/dist/lite/lite/model/value.d.ts.map +1 -0
  906. package/dist/lite/lite/src/liteClient.d.ts +43 -0
  907. package/dist/lite/lite/src/liteClient.d.ts.map +1 -0
  908. package/dist/lite/lite.cjs.js +183 -0
  909. package/dist/lite/lite.esm.browser.js +905 -0
  910. package/dist/lite/lite.esm.node.js +178 -0
  911. package/dist/lite/lite.umd.js +2 -0
  912. package/index.d.ts +2 -3
  913. package/index.js +2 -15
  914. package/lite/builds/browser.ts +54 -0
  915. package/lite/builds/node.ts +47 -0
  916. package/lite/model/acl.ts +17 -0
  917. package/lite/model/action.ts +13 -0
  918. package/lite/model/addApiKeyResponse.ts +13 -0
  919. package/lite/model/advancedSyntaxFeatures.ts +3 -0
  920. package/lite/model/alternativesAsExact.ts +6 -0
  921. package/lite/model/anchoring.ts +6 -0
  922. package/lite/model/apiKey.ts +48 -0
  923. package/lite/model/aroundRadius.ts +8 -0
  924. package/lite/model/aroundRadiusAll.ts +3 -0
  925. package/lite/model/attributeOrBuiltInOperation.ts +5 -0
  926. package/lite/model/automaticFacetFilter.ts +21 -0
  927. package/lite/model/automaticFacetFilters.ts +8 -0
  928. package/lite/model/baseBrowseResponse.ts +8 -0
  929. package/lite/model/baseIndexSettings.ts +73 -0
  930. package/lite/model/baseSearchParams.ts +6 -0
  931. package/lite/model/baseSearchParamsWithoutQuery.ts +157 -0
  932. package/lite/model/baseSearchResponse.ts +128 -0
  933. package/lite/model/browseResponse.ts +9 -0
  934. package/lite/model/builtInOperation.ts +15 -0
  935. package/lite/model/builtInOperationType.ts +13 -0
  936. package/lite/model/clientMethodProps.ts +55 -0
  937. package/lite/model/condition.ts +22 -0
  938. package/lite/model/consequence.ts +32 -0
  939. package/lite/model/consequenceHide.ts +11 -0
  940. package/lite/model/consequenceParams.ts +9 -0
  941. package/lite/model/consequenceQuery.ts +8 -0
  942. package/lite/model/consequenceQueryObject.ts +15 -0
  943. package/lite/model/createdAtObject.ts +8 -0
  944. package/lite/model/dictionaryAction.ts +6 -0
  945. package/lite/model/dictionaryEntry.ts +35 -0
  946. package/lite/model/dictionaryEntryState.ts +6 -0
  947. package/lite/model/dictionaryLanguage.ts +11 -0
  948. package/lite/model/dictionaryType.ts +3 -0
  949. package/lite/model/distinct.ts +6 -0
  950. package/lite/model/edit.ts +17 -0
  951. package/lite/model/editType.ts +6 -0
  952. package/lite/model/errorBase.ts +8 -0
  953. package/lite/model/exactOnSingleWordQuery.ts +6 -0
  954. package/lite/model/facetFilters.ts +8 -0
  955. package/lite/model/facetOrdering.ts +16 -0
  956. package/lite/model/facets.ts +11 -0
  957. package/lite/model/facetsStats.ts +23 -0
  958. package/lite/model/fetchedIndex.ts +58 -0
  959. package/lite/model/highlightResult.ts +5 -0
  960. package/lite/model/highlightResultOption.ts +25 -0
  961. package/lite/model/hit.ts +29 -0
  962. package/lite/model/ignorePlurals.ts +6 -0
  963. package/lite/model/index.ts +107 -0
  964. package/lite/model/indexSettings.ts +9 -0
  965. package/lite/model/indexSettingsAsSearchParams.ts +200 -0
  966. package/lite/model/key.ts +6 -0
  967. package/lite/model/languages.ts +14 -0
  968. package/lite/model/listIndicesResponse.ts +15 -0
  969. package/lite/model/logType.ts +3 -0
  970. package/lite/model/matchLevel.ts +6 -0
  971. package/lite/model/matchedGeoLocation.ts +18 -0
  972. package/lite/model/mixedSearchFilters.ts +3 -0
  973. package/lite/model/numericFilters.ts +8 -0
  974. package/lite/model/operationType.ts +6 -0
  975. package/lite/model/optionalFilters.ts +8 -0
  976. package/lite/model/params.ts +18 -0
  977. package/lite/model/personalization.ts +18 -0
  978. package/lite/model/promote.ts +6 -0
  979. package/lite/model/promoteObjectID.ts +16 -0
  980. package/lite/model/promoteObjectIDs.ts +16 -0
  981. package/lite/model/queryType.ts +6 -0
  982. package/lite/model/rankingInfo.ts +65 -0
  983. package/lite/model/reRankingApplyFilter.ts +8 -0
  984. package/lite/model/removeStopWords.ts +6 -0
  985. package/lite/model/removeWordsIfNoResults.ts +10 -0
  986. package/lite/model/renderingContent.ts +10 -0
  987. package/lite/model/rule.ts +37 -0
  988. package/lite/model/scopeType.ts +3 -0
  989. package/lite/model/searchForFacets.ts +6 -0
  990. package/lite/model/searchForFacetsOptions.ts +27 -0
  991. package/lite/model/searchForHits.ts +6 -0
  992. package/lite/model/searchForHitsOptions.ts +12 -0
  993. package/lite/model/searchHits.ts +7 -0
  994. package/lite/model/searchMethodParams.ts +10 -0
  995. package/lite/model/searchParams.ts +6 -0
  996. package/lite/model/searchParamsObject.ts +6 -0
  997. package/lite/model/searchParamsQuery.ts +8 -0
  998. package/lite/model/searchParamsString.ts +8 -0
  999. package/lite/model/searchQuery.ts +6 -0
  1000. package/lite/model/searchResponse.ts +7 -0
  1001. package/lite/model/searchResponses.ts +7 -0
  1002. package/lite/model/searchStrategy.ts +3 -0
  1003. package/lite/model/searchSynonymsResponse.ts +15 -0
  1004. package/lite/model/searchTypeDefault.ts +6 -0
  1005. package/lite/model/searchTypeFacet.ts +6 -0
  1006. package/lite/model/snippetResult.ts +5 -0
  1007. package/lite/model/snippetResultOption.ts +15 -0
  1008. package/lite/model/sortRemainingBy.ts +6 -0
  1009. package/lite/model/source.ts +16 -0
  1010. package/lite/model/standardEntries.ts +21 -0
  1011. package/lite/model/synonymHit.ts +48 -0
  1012. package/lite/model/synonymHitHighlightResult.ts +15 -0
  1013. package/lite/model/synonymType.ts +11 -0
  1014. package/lite/model/tagFilters.ts +8 -0
  1015. package/lite/model/taskStatus.ts +3 -0
  1016. package/lite/model/timeRange.ts +13 -0
  1017. package/lite/model/typoTolerance.ts +8 -0
  1018. package/lite/model/typoToleranceEnum.ts +3 -0
  1019. package/lite/model/updatedRuleResponse.ts +18 -0
  1020. package/lite/model/userId.ts +26 -0
  1021. package/lite/model/value.ts +12 -0
  1022. package/lite/src/liteClient.ts +210 -0
  1023. package/lite.d.ts +2 -3
  1024. package/lite.js +2 -2
  1025. package/package.json +59 -23
  1026. package/README.md +0 -82
  1027. package/dist/algoliasearch-lite.d.ts +0 -49
  1028. package/dist/algoliasearch-lite.esm.browser.js +0 -915
  1029. package/dist/algoliasearch-lite.umd.js +0 -2
  1030. package/dist/algoliasearch.d.ts +0 -247
@@ -0,0 +1,3331 @@
1
+ import { createAuth, createTransporter, getAlgoliaAgent, createRetryablePromise, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';
2
+ import { createHttpRequester } from '@algolia/requester-node-http';
3
+
4
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
5
+ const apiClientVersion$4 = '5.0.0-alpha.3';
6
+ const REGIONS$2 = ['de', 'us'];
7
+ function getDefaultHosts$3(region) {
8
+ const url = !region
9
+ ? 'analytics.algolia.com'
10
+ : 'analytics.{region}.algolia.com'.replace('{region}', region);
11
+ return [{ url, accept: 'readWrite', protocol: 'https' }];
12
+ }
13
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
14
+ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
15
+ const auth = createAuth(appIdOption, apiKeyOption, authMode);
16
+ const transporter = createTransporter({
17
+ hosts: getDefaultHosts$3(regionOption),
18
+ ...options,
19
+ algoliaAgent: getAlgoliaAgent({
20
+ algoliaAgents,
21
+ client: 'Abtesting',
22
+ version: apiClientVersion$4,
23
+ }),
24
+ baseHeaders: {
25
+ 'content-type': 'text/plain',
26
+ ...auth.headers(),
27
+ ...options.baseHeaders,
28
+ },
29
+ baseQueryParameters: {
30
+ ...auth.queryParameters(),
31
+ ...options.baseQueryParameters,
32
+ },
33
+ });
34
+ return {
35
+ transporter,
36
+ /**
37
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
38
+ */
39
+ get _ua() {
40
+ return transporter.algoliaAgent.value;
41
+ },
42
+ /**
43
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
44
+ *
45
+ * @param segment - The algolia agent (user-agent) segment to add.
46
+ * @param version - The version of the agent.
47
+ */
48
+ addAlgoliaAgent(segment, version) {
49
+ transporter.algoliaAgent.add({ segment, version });
50
+ },
51
+ /**
52
+ * Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.
53
+ *
54
+ * @summary Create a test.
55
+ * @param addABTestsRequest - The addABTestsRequest object.
56
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
57
+ */
58
+ addABTests(addABTestsRequest, requestOptions) {
59
+ if (!addABTestsRequest) {
60
+ throw new Error('Parameter `addABTestsRequest` is required when calling `addABTests`.');
61
+ }
62
+ if (!addABTestsRequest.name) {
63
+ throw new Error('Parameter `addABTestsRequest.name` is required when calling `addABTests`.');
64
+ }
65
+ if (!addABTestsRequest.variant) {
66
+ throw new Error('Parameter `addABTestsRequest.variant` is required when calling `addABTests`.');
67
+ }
68
+ if (!addABTestsRequest.endAt) {
69
+ throw new Error('Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.');
70
+ }
71
+ const requestPath = '/2/abtests';
72
+ const headers = {};
73
+ const queryParameters = {};
74
+ const request = {
75
+ method: 'POST',
76
+ path: requestPath,
77
+ queryParameters,
78
+ headers,
79
+ data: addABTestsRequest,
80
+ };
81
+ return transporter.request(request, requestOptions);
82
+ },
83
+ /**
84
+ * This method allow you to send requests to the Algolia REST API.
85
+ *
86
+ * @summary Send requests to the Algolia REST API.
87
+ * @param del - The del object.
88
+ * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
89
+ * @param del.parameters - Query parameters to be applied to the current query.
90
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
91
+ */
92
+ del({ path, parameters }, requestOptions) {
93
+ if (!path) {
94
+ throw new Error('Parameter `path` is required when calling `del`.');
95
+ }
96
+ const requestPath = '/1{path}'.replace('{path}', path);
97
+ const headers = {};
98
+ const queryParameters = parameters ? parameters : {};
99
+ const request = {
100
+ method: 'DELETE',
101
+ path: requestPath,
102
+ queryParameters,
103
+ headers,
104
+ };
105
+ return transporter.request(request, requestOptions);
106
+ },
107
+ /**
108
+ * Delete a test.
109
+ *
110
+ * @summary Delete a test.
111
+ * @param deleteABTest - The deleteABTest object.
112
+ * @param deleteABTest.id - The A/B test ID.
113
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
114
+ */
115
+ deleteABTest({ id }, requestOptions) {
116
+ if (!id) {
117
+ throw new Error('Parameter `id` is required when calling `deleteABTest`.');
118
+ }
119
+ const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
120
+ const headers = {};
121
+ const queryParameters = {};
122
+ const request = {
123
+ method: 'DELETE',
124
+ path: requestPath,
125
+ queryParameters,
126
+ headers,
127
+ };
128
+ return transporter.request(request, requestOptions);
129
+ },
130
+ /**
131
+ * This method allow you to send requests to the Algolia REST API.
132
+ *
133
+ * @summary Send requests to the Algolia REST API.
134
+ * @param get - The get object.
135
+ * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
136
+ * @param get.parameters - Query parameters to be applied to the current query.
137
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
138
+ */
139
+ get({ path, parameters }, requestOptions) {
140
+ if (!path) {
141
+ throw new Error('Parameter `path` is required when calling `get`.');
142
+ }
143
+ const requestPath = '/1{path}'.replace('{path}', path);
144
+ const headers = {};
145
+ const queryParameters = parameters ? parameters : {};
146
+ const request = {
147
+ method: 'GET',
148
+ path: requestPath,
149
+ queryParameters,
150
+ headers,
151
+ };
152
+ return transporter.request(request, requestOptions);
153
+ },
154
+ /**
155
+ * Returns metadata and metrics for an A/B test.
156
+ *
157
+ * @summary Get a test.
158
+ * @param getABTest - The getABTest object.
159
+ * @param getABTest.id - The A/B test ID.
160
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
161
+ */
162
+ getABTest({ id }, requestOptions) {
163
+ if (!id) {
164
+ throw new Error('Parameter `id` is required when calling `getABTest`.');
165
+ }
166
+ const requestPath = '/2/abtests/{id}'.replace('{id}', encodeURIComponent(id));
167
+ const headers = {};
168
+ const queryParameters = {};
169
+ const request = {
170
+ method: 'GET',
171
+ path: requestPath,
172
+ queryParameters,
173
+ headers,
174
+ };
175
+ return transporter.request(request, requestOptions);
176
+ },
177
+ /**
178
+ * Fetch all existing A/B tests for App that are available for the current API Key. When no data has been processed, the metrics will be returned as null.
179
+ *
180
+ * @summary List all tests.
181
+ * @param listABTests - The listABTests object.
182
+ * @param listABTests.offset - Position of the starting record. Used for paging. 0 is the first record.
183
+ * @param listABTests.limit - Number of records to return. Limit is the size of the page.
184
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
185
+ */
186
+ listABTests({ offset, limit }, requestOptions) {
187
+ const requestPath = '/2/abtests';
188
+ const headers = {};
189
+ const queryParameters = {};
190
+ if (offset !== undefined) {
191
+ queryParameters.offset = offset.toString();
192
+ }
193
+ if (limit !== undefined) {
194
+ queryParameters.limit = limit.toString();
195
+ }
196
+ const request = {
197
+ method: 'GET',
198
+ path: requestPath,
199
+ queryParameters,
200
+ headers,
201
+ };
202
+ return transporter.request(request, requestOptions);
203
+ },
204
+ /**
205
+ * This method allow you to send requests to the Algolia REST API.
206
+ *
207
+ * @summary Send requests to the Algolia REST API.
208
+ * @param post - The post object.
209
+ * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
210
+ * @param post.parameters - Query parameters to be applied to the current query.
211
+ * @param post.body - The parameters to send with the custom request.
212
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
213
+ */
214
+ post({ path, parameters, body }, requestOptions) {
215
+ if (!path) {
216
+ throw new Error('Parameter `path` is required when calling `post`.');
217
+ }
218
+ const requestPath = '/1{path}'.replace('{path}', path);
219
+ const headers = {};
220
+ const queryParameters = parameters ? parameters : {};
221
+ const request = {
222
+ method: 'POST',
223
+ path: requestPath,
224
+ queryParameters,
225
+ headers,
226
+ data: body ? body : {},
227
+ };
228
+ return transporter.request(request, requestOptions);
229
+ },
230
+ /**
231
+ * This method allow you to send requests to the Algolia REST API.
232
+ *
233
+ * @summary Send requests to the Algolia REST API.
234
+ * @param put - The put object.
235
+ * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
236
+ * @param put.parameters - Query parameters to be applied to the current query.
237
+ * @param put.body - The parameters to send with the custom request.
238
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
239
+ */
240
+ put({ path, parameters, body }, requestOptions) {
241
+ if (!path) {
242
+ throw new Error('Parameter `path` is required when calling `put`.');
243
+ }
244
+ const requestPath = '/1{path}'.replace('{path}', path);
245
+ const headers = {};
246
+ const queryParameters = parameters ? parameters : {};
247
+ const request = {
248
+ method: 'PUT',
249
+ path: requestPath,
250
+ queryParameters,
251
+ headers,
252
+ data: body ? body : {},
253
+ };
254
+ return transporter.request(request, requestOptions);
255
+ },
256
+ /**
257
+ * Marks the A/B test as stopped. At this point, the test is over and cannot be restarted. As a result, your application is back to normal: index A will perform as usual, receiving 100% of all search requests. Associated metadata and metrics are still stored.
258
+ *
259
+ * @summary Stop a test.
260
+ * @param stopABTest - The stopABTest object.
261
+ * @param stopABTest.id - The A/B test ID.
262
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
263
+ */
264
+ stopABTest({ id }, requestOptions) {
265
+ if (!id) {
266
+ throw new Error('Parameter `id` is required when calling `stopABTest`.');
267
+ }
268
+ const requestPath = '/2/abtests/{id}/stop'.replace('{id}', encodeURIComponent(id));
269
+ const headers = {};
270
+ const queryParameters = {};
271
+ const request = {
272
+ method: 'POST',
273
+ path: requestPath,
274
+ queryParameters,
275
+ headers,
276
+ };
277
+ return transporter.request(request, requestOptions);
278
+ },
279
+ };
280
+ }
281
+
282
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
283
+ const apiClientVersion$3 = '5.0.0-alpha.3';
284
+ const REGIONS$1 = ['de', 'us'];
285
+ function getDefaultHosts$2(region) {
286
+ const url = !region
287
+ ? 'analytics.algolia.com'
288
+ : 'analytics.{region}.algolia.com'.replace('{region}', region);
289
+ return [{ url, accept: 'readWrite', protocol: 'https' }];
290
+ }
291
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
292
+ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
293
+ const auth = createAuth(appIdOption, apiKeyOption, authMode);
294
+ const transporter = createTransporter({
295
+ hosts: getDefaultHosts$2(regionOption),
296
+ ...options,
297
+ algoliaAgent: getAlgoliaAgent({
298
+ algoliaAgents,
299
+ client: 'Analytics',
300
+ version: apiClientVersion$3,
301
+ }),
302
+ baseHeaders: {
303
+ 'content-type': 'text/plain',
304
+ ...auth.headers(),
305
+ ...options.baseHeaders,
306
+ },
307
+ baseQueryParameters: {
308
+ ...auth.queryParameters(),
309
+ ...options.baseQueryParameters,
310
+ },
311
+ });
312
+ return {
313
+ transporter,
314
+ /**
315
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
316
+ */
317
+ get _ua() {
318
+ return transporter.algoliaAgent.value;
319
+ },
320
+ /**
321
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
322
+ *
323
+ * @param segment - The algolia agent (user-agent) segment to add.
324
+ * @param version - The version of the agent.
325
+ */
326
+ addAlgoliaAgent(segment, version) {
327
+ transporter.algoliaAgent.add({ segment, version });
328
+ },
329
+ /**
330
+ * This method allow you to send requests to the Algolia REST API.
331
+ *
332
+ * @summary Send requests to the Algolia REST API.
333
+ * @param del - The del object.
334
+ * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
335
+ * @param del.parameters - Query parameters to be applied to the current query.
336
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
337
+ */
338
+ del({ path, parameters }, requestOptions) {
339
+ if (!path) {
340
+ throw new Error('Parameter `path` is required when calling `del`.');
341
+ }
342
+ const requestPath = '/1{path}'.replace('{path}', path);
343
+ const headers = {};
344
+ const queryParameters = parameters ? parameters : {};
345
+ const request = {
346
+ method: 'DELETE',
347
+ path: requestPath,
348
+ queryParameters,
349
+ headers,
350
+ };
351
+ return transporter.request(request, requestOptions);
352
+ },
353
+ /**
354
+ * This method allow you to send requests to the Algolia REST API.
355
+ *
356
+ * @summary Send requests to the Algolia REST API.
357
+ * @param get - The get object.
358
+ * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
359
+ * @param get.parameters - Query parameters to be applied to the current query.
360
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
361
+ */
362
+ get({ path, parameters }, requestOptions) {
363
+ if (!path) {
364
+ throw new Error('Parameter `path` is required when calling `get`.');
365
+ }
366
+ const requestPath = '/1{path}'.replace('{path}', path);
367
+ const headers = {};
368
+ const queryParameters = parameters ? parameters : {};
369
+ const request = {
370
+ method: 'GET',
371
+ path: requestPath,
372
+ queryParameters,
373
+ headers,
374
+ };
375
+ return transporter.request(request, requestOptions);
376
+ },
377
+ /**
378
+ * Returns the average click position. The endpoint returns a value for the complete given time range, as well as a value per day.
379
+ *
380
+ * @summary Get average click position.
381
+ * @param getAverageClickPosition - The getAverageClickPosition object.
382
+ * @param getAverageClickPosition.index - The index name to target.
383
+ * @param getAverageClickPosition.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
384
+ * @param getAverageClickPosition.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
385
+ * @param getAverageClickPosition.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
386
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
387
+ */
388
+ getAverageClickPosition({ index, startDate, endDate, tags }, requestOptions) {
389
+ if (!index) {
390
+ throw new Error('Parameter `index` is required when calling `getAverageClickPosition`.');
391
+ }
392
+ const requestPath = '/2/clicks/averageClickPosition';
393
+ const headers = {};
394
+ const queryParameters = {};
395
+ if (index !== undefined) {
396
+ queryParameters.index = index.toString();
397
+ }
398
+ if (startDate !== undefined) {
399
+ queryParameters.startDate = startDate.toString();
400
+ }
401
+ if (endDate !== undefined) {
402
+ queryParameters.endDate = endDate.toString();
403
+ }
404
+ if (tags !== undefined) {
405
+ queryParameters.tags = tags.toString();
406
+ }
407
+ const request = {
408
+ method: 'GET',
409
+ path: requestPath,
410
+ queryParameters,
411
+ headers,
412
+ };
413
+ return transporter.request(request, requestOptions);
414
+ },
415
+ /**
416
+ * Returns the distribution of clicks per range of positions. If the groups all have a count of 0, it means Algolia didn’t receive any click events for the queries with the clickAnalytics search parameter set to true. The count is 0 until Algolia receives at least one click event.
417
+ *
418
+ * @summary Get clicks per positions.
419
+ * @param getClickPositions - The getClickPositions object.
420
+ * @param getClickPositions.index - The index name to target.
421
+ * @param getClickPositions.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
422
+ * @param getClickPositions.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
423
+ * @param getClickPositions.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
424
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
425
+ */
426
+ getClickPositions({ index, startDate, endDate, tags }, requestOptions) {
427
+ if (!index) {
428
+ throw new Error('Parameter `index` is required when calling `getClickPositions`.');
429
+ }
430
+ const requestPath = '/2/clicks/positions';
431
+ const headers = {};
432
+ const queryParameters = {};
433
+ if (index !== undefined) {
434
+ queryParameters.index = index.toString();
435
+ }
436
+ if (startDate !== undefined) {
437
+ queryParameters.startDate = startDate.toString();
438
+ }
439
+ if (endDate !== undefined) {
440
+ queryParameters.endDate = endDate.toString();
441
+ }
442
+ if (tags !== undefined) {
443
+ queryParameters.tags = tags.toString();
444
+ }
445
+ const request = {
446
+ method: 'GET',
447
+ path: requestPath,
448
+ queryParameters,
449
+ headers,
450
+ };
451
+ return transporter.request(request, requestOptions);
452
+ },
453
+ /**
454
+ * Returns a click-through rate (CTR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of clicks and searches used to compute the rates.
455
+ *
456
+ * @summary Get click-through rate (CTR).
457
+ * @param getClickThroughRate - The getClickThroughRate object.
458
+ * @param getClickThroughRate.index - The index name to target.
459
+ * @param getClickThroughRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
460
+ * @param getClickThroughRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
461
+ * @param getClickThroughRate.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
462
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
463
+ */
464
+ getClickThroughRate({ index, startDate, endDate, tags }, requestOptions) {
465
+ if (!index) {
466
+ throw new Error('Parameter `index` is required when calling `getClickThroughRate`.');
467
+ }
468
+ const requestPath = '/2/clicks/clickThroughRate';
469
+ const headers = {};
470
+ const queryParameters = {};
471
+ if (index !== undefined) {
472
+ queryParameters.index = index.toString();
473
+ }
474
+ if (startDate !== undefined) {
475
+ queryParameters.startDate = startDate.toString();
476
+ }
477
+ if (endDate !== undefined) {
478
+ queryParameters.endDate = endDate.toString();
479
+ }
480
+ if (tags !== undefined) {
481
+ queryParameters.tags = tags.toString();
482
+ }
483
+ const request = {
484
+ method: 'GET',
485
+ path: requestPath,
486
+ queryParameters,
487
+ headers,
488
+ };
489
+ return transporter.request(request, requestOptions);
490
+ },
491
+ /**
492
+ * Returns a conversion rate (CR). The endpoint returns a value for the complete given time range, as well as a value per day. It also returns the count of conversion and searches used to compute the rates.
493
+ *
494
+ * @summary Get conversion rate (CR).
495
+ * @param getConversationRate - The getConversationRate object.
496
+ * @param getConversationRate.index - The index name to target.
497
+ * @param getConversationRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
498
+ * @param getConversationRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
499
+ * @param getConversationRate.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
500
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
501
+ */
502
+ getConversationRate({ index, startDate, endDate, tags }, requestOptions) {
503
+ if (!index) {
504
+ throw new Error('Parameter `index` is required when calling `getConversationRate`.');
505
+ }
506
+ const requestPath = '/2/conversions/conversionRate';
507
+ const headers = {};
508
+ const queryParameters = {};
509
+ if (index !== undefined) {
510
+ queryParameters.index = index.toString();
511
+ }
512
+ if (startDate !== undefined) {
513
+ queryParameters.startDate = startDate.toString();
514
+ }
515
+ if (endDate !== undefined) {
516
+ queryParameters.endDate = endDate.toString();
517
+ }
518
+ if (tags !== undefined) {
519
+ queryParameters.tags = tags.toString();
520
+ }
521
+ const request = {
522
+ method: 'GET',
523
+ path: requestPath,
524
+ queryParameters,
525
+ headers,
526
+ };
527
+ return transporter.request(request, requestOptions);
528
+ },
529
+ /**
530
+ * Returns the rate at which searches didn\'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.
531
+ *
532
+ * @summary Get no click rate.
533
+ * @param getNoClickRate - The getNoClickRate object.
534
+ * @param getNoClickRate.index - The index name to target.
535
+ * @param getNoClickRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
536
+ * @param getNoClickRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
537
+ * @param getNoClickRate.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
538
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
539
+ */
540
+ getNoClickRate({ index, startDate, endDate, tags }, requestOptions) {
541
+ if (!index) {
542
+ throw new Error('Parameter `index` is required when calling `getNoClickRate`.');
543
+ }
544
+ const requestPath = '/2/searches/noClickRate';
545
+ const headers = {};
546
+ const queryParameters = {};
547
+ if (index !== undefined) {
548
+ queryParameters.index = index.toString();
549
+ }
550
+ if (startDate !== undefined) {
551
+ queryParameters.startDate = startDate.toString();
552
+ }
553
+ if (endDate !== undefined) {
554
+ queryParameters.endDate = endDate.toString();
555
+ }
556
+ if (tags !== undefined) {
557
+ queryParameters.tags = tags.toString();
558
+ }
559
+ const request = {
560
+ method: 'GET',
561
+ path: requestPath,
562
+ queryParameters,
563
+ headers,
564
+ };
565
+ return transporter.request(request, requestOptions);
566
+ },
567
+ /**
568
+ * Returns the rate at which searches didn\'t return any results. 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 results used to compute the rates.
569
+ *
570
+ * @summary Get no results rate.
571
+ * @param getNoResultsRate - The getNoResultsRate object.
572
+ * @param getNoResultsRate.index - The index name to target.
573
+ * @param getNoResultsRate.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
574
+ * @param getNoResultsRate.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
575
+ * @param getNoResultsRate.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
576
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
577
+ */
578
+ getNoResultsRate({ index, startDate, endDate, tags }, requestOptions) {
579
+ if (!index) {
580
+ throw new Error('Parameter `index` is required when calling `getNoResultsRate`.');
581
+ }
582
+ const requestPath = '/2/searches/noResultRate';
583
+ const headers = {};
584
+ const queryParameters = {};
585
+ if (index !== undefined) {
586
+ queryParameters.index = index.toString();
587
+ }
588
+ if (startDate !== undefined) {
589
+ queryParameters.startDate = startDate.toString();
590
+ }
591
+ if (endDate !== undefined) {
592
+ queryParameters.endDate = endDate.toString();
593
+ }
594
+ if (tags !== undefined) {
595
+ queryParameters.tags = tags.toString();
596
+ }
597
+ const request = {
598
+ method: 'GET',
599
+ path: requestPath,
600
+ queryParameters,
601
+ headers,
602
+ };
603
+ return transporter.request(request, requestOptions);
604
+ },
605
+ /**
606
+ * Returns the number of searches across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
607
+ *
608
+ * @summary Get searches count.
609
+ * @param getSearchesCount - The getSearchesCount object.
610
+ * @param getSearchesCount.index - The index name to target.
611
+ * @param getSearchesCount.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
612
+ * @param getSearchesCount.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
613
+ * @param getSearchesCount.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
614
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
615
+ */
616
+ getSearchesCount({ index, startDate, endDate, tags }, requestOptions) {
617
+ if (!index) {
618
+ throw new Error('Parameter `index` is required when calling `getSearchesCount`.');
619
+ }
620
+ const requestPath = '/2/searches/count';
621
+ const headers = {};
622
+ const queryParameters = {};
623
+ if (index !== undefined) {
624
+ queryParameters.index = index.toString();
625
+ }
626
+ if (startDate !== undefined) {
627
+ queryParameters.startDate = startDate.toString();
628
+ }
629
+ if (endDate !== undefined) {
630
+ queryParameters.endDate = endDate.toString();
631
+ }
632
+ if (tags !== undefined) {
633
+ queryParameters.tags = tags.toString();
634
+ }
635
+ const request = {
636
+ method: 'GET',
637
+ path: requestPath,
638
+ queryParameters,
639
+ headers,
640
+ };
641
+ return transporter.request(request, requestOptions);
642
+ },
643
+ /**
644
+ * Returns top searches that didn\'t lead to any clicks. Limited to the 1000 most frequent ones. For each search, also returns the average number of found hits.
645
+ *
646
+ * @summary Get top searches with no clicks.
647
+ * @param getSearchesNoClicks - The getSearchesNoClicks object.
648
+ * @param getSearchesNoClicks.index - The index name to target.
649
+ * @param getSearchesNoClicks.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
650
+ * @param getSearchesNoClicks.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
651
+ * @param getSearchesNoClicks.limit - Number of records to return. Limit is the size of the page.
652
+ * @param getSearchesNoClicks.offset - Position of the starting record. Used for paging. 0 is the first record.
653
+ * @param getSearchesNoClicks.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
654
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
655
+ */
656
+ getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
657
+ if (!index) {
658
+ throw new Error('Parameter `index` is required when calling `getSearchesNoClicks`.');
659
+ }
660
+ const requestPath = '/2/searches/noClicks';
661
+ const headers = {};
662
+ const queryParameters = {};
663
+ if (index !== undefined) {
664
+ queryParameters.index = index.toString();
665
+ }
666
+ if (startDate !== undefined) {
667
+ queryParameters.startDate = startDate.toString();
668
+ }
669
+ if (endDate !== undefined) {
670
+ queryParameters.endDate = endDate.toString();
671
+ }
672
+ if (limit !== undefined) {
673
+ queryParameters.limit = limit.toString();
674
+ }
675
+ if (offset !== undefined) {
676
+ queryParameters.offset = offset.toString();
677
+ }
678
+ if (tags !== undefined) {
679
+ queryParameters.tags = tags.toString();
680
+ }
681
+ const request = {
682
+ method: 'GET',
683
+ path: requestPath,
684
+ queryParameters,
685
+ headers,
686
+ };
687
+ return transporter.request(request, requestOptions);
688
+ },
689
+ /**
690
+ * Returns top searches that didn\'t return any results. Limited to the 1000 most frequent ones.
691
+ *
692
+ * @summary Get top searches with no results.
693
+ * @param getSearchesNoResults - The getSearchesNoResults object.
694
+ * @param getSearchesNoResults.index - The index name to target.
695
+ * @param getSearchesNoResults.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
696
+ * @param getSearchesNoResults.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
697
+ * @param getSearchesNoResults.limit - Number of records to return. Limit is the size of the page.
698
+ * @param getSearchesNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
699
+ * @param getSearchesNoResults.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
700
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
701
+ */
702
+ getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) {
703
+ if (!index) {
704
+ throw new Error('Parameter `index` is required when calling `getSearchesNoResults`.');
705
+ }
706
+ const requestPath = '/2/searches/noResults';
707
+ const headers = {};
708
+ const queryParameters = {};
709
+ if (index !== undefined) {
710
+ queryParameters.index = index.toString();
711
+ }
712
+ if (startDate !== undefined) {
713
+ queryParameters.startDate = startDate.toString();
714
+ }
715
+ if (endDate !== undefined) {
716
+ queryParameters.endDate = endDate.toString();
717
+ }
718
+ if (limit !== undefined) {
719
+ queryParameters.limit = limit.toString();
720
+ }
721
+ if (offset !== undefined) {
722
+ queryParameters.offset = offset.toString();
723
+ }
724
+ if (tags !== undefined) {
725
+ queryParameters.tags = tags.toString();
726
+ }
727
+ const request = {
728
+ method: 'GET',
729
+ path: requestPath,
730
+ queryParameters,
731
+ headers,
732
+ };
733
+ return transporter.request(request, requestOptions);
734
+ },
735
+ /**
736
+ * Returns the latest update time of the analytics API for a given index. If the index has been recently created and/or no search has been performed yet the updated time will be null.
737
+ *
738
+ * @summary Get Analytics API status.
739
+ * @param getStatus - The getStatus object.
740
+ * @param getStatus.index - The index name to target.
741
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
742
+ */
743
+ getStatus({ index }, requestOptions) {
744
+ if (!index) {
745
+ throw new Error('Parameter `index` is required when calling `getStatus`.');
746
+ }
747
+ const requestPath = '/2/status';
748
+ const headers = {};
749
+ const queryParameters = {};
750
+ if (index !== undefined) {
751
+ queryParameters.index = index.toString();
752
+ }
753
+ const request = {
754
+ method: 'GET',
755
+ path: requestPath,
756
+ queryParameters,
757
+ headers,
758
+ };
759
+ return transporter.request(request, requestOptions);
760
+ },
761
+ /**
762
+ * Returns top countries. Limited to the 1000 most frequent ones.
763
+ *
764
+ * @summary Get top countries.
765
+ * @param getTopCountries - The getTopCountries object.
766
+ * @param getTopCountries.index - The index name to target.
767
+ * @param getTopCountries.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
768
+ * @param getTopCountries.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
769
+ * @param getTopCountries.limit - Number of records to return. Limit is the size of the page.
770
+ * @param getTopCountries.offset - Position of the starting record. Used for paging. 0 is the first record.
771
+ * @param getTopCountries.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
772
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
773
+ */
774
+ getTopCountries({ index, startDate, endDate, limit, offset, tags }, requestOptions) {
775
+ if (!index) {
776
+ throw new Error('Parameter `index` is required when calling `getTopCountries`.');
777
+ }
778
+ const requestPath = '/2/countries';
779
+ const headers = {};
780
+ const queryParameters = {};
781
+ if (index !== undefined) {
782
+ queryParameters.index = index.toString();
783
+ }
784
+ if (startDate !== undefined) {
785
+ queryParameters.startDate = startDate.toString();
786
+ }
787
+ if (endDate !== undefined) {
788
+ queryParameters.endDate = endDate.toString();
789
+ }
790
+ if (limit !== undefined) {
791
+ queryParameters.limit = limit.toString();
792
+ }
793
+ if (offset !== undefined) {
794
+ queryParameters.offset = offset.toString();
795
+ }
796
+ if (tags !== undefined) {
797
+ queryParameters.tags = tags.toString();
798
+ }
799
+ const request = {
800
+ method: 'GET',
801
+ path: requestPath,
802
+ queryParameters,
803
+ headers,
804
+ };
805
+ return transporter.request(request, requestOptions);
806
+ },
807
+ /**
808
+ * Returns top filter attributes. Limited to the 1000 most used filters.
809
+ *
810
+ * @summary Get top filter attributes.
811
+ * @param getTopFilterAttributes - The getTopFilterAttributes object.
812
+ * @param getTopFilterAttributes.index - The index name to target.
813
+ * @param getTopFilterAttributes.search - The query term to search for. Must match the exact user input.
814
+ * @param getTopFilterAttributes.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
815
+ * @param getTopFilterAttributes.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
816
+ * @param getTopFilterAttributes.limit - Number of records to return. Limit is the size of the page.
817
+ * @param getTopFilterAttributes.offset - Position of the starting record. Used for paging. 0 is the first record.
818
+ * @param getTopFilterAttributes.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
819
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
820
+ */
821
+ getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
822
+ if (!index) {
823
+ throw new Error('Parameter `index` is required when calling `getTopFilterAttributes`.');
824
+ }
825
+ const requestPath = '/2/filters';
826
+ const headers = {};
827
+ const queryParameters = {};
828
+ if (index !== undefined) {
829
+ queryParameters.index = index.toString();
830
+ }
831
+ if (search !== undefined) {
832
+ queryParameters.search = search.toString();
833
+ }
834
+ if (startDate !== undefined) {
835
+ queryParameters.startDate = startDate.toString();
836
+ }
837
+ if (endDate !== undefined) {
838
+ queryParameters.endDate = endDate.toString();
839
+ }
840
+ if (limit !== undefined) {
841
+ queryParameters.limit = limit.toString();
842
+ }
843
+ if (offset !== undefined) {
844
+ queryParameters.offset = offset.toString();
845
+ }
846
+ if (tags !== undefined) {
847
+ queryParameters.tags = tags.toString();
848
+ }
849
+ const request = {
850
+ method: 'GET',
851
+ path: requestPath,
852
+ queryParameters,
853
+ headers,
854
+ };
855
+ return transporter.request(request, requestOptions);
856
+ },
857
+ /**
858
+ * Returns top filters for the given attribute. Limited to the 1000 most used filters.
859
+ *
860
+ * @summary Get top filters for the an attribute.
861
+ * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
862
+ * @param getTopFilterForAttribute.attribute - The exact name of the attribute.
863
+ * @param getTopFilterForAttribute.index - The index name to target.
864
+ * @param getTopFilterForAttribute.search - The query term to search for. Must match the exact user input.
865
+ * @param getTopFilterForAttribute.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
866
+ * @param getTopFilterForAttribute.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
867
+ * @param getTopFilterForAttribute.limit - Number of records to return. Limit is the size of the page.
868
+ * @param getTopFilterForAttribute.offset - Position of the starting record. Used for paging. 0 is the first record.
869
+ * @param getTopFilterForAttribute.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
870
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
871
+ */
872
+ getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
873
+ if (!attribute) {
874
+ throw new Error('Parameter `attribute` is required when calling `getTopFilterForAttribute`.');
875
+ }
876
+ if (!index) {
877
+ throw new Error('Parameter `index` is required when calling `getTopFilterForAttribute`.');
878
+ }
879
+ const requestPath = '/2/filters/{attribute}'.replace('{attribute}', encodeURIComponent(attribute));
880
+ const headers = {};
881
+ const queryParameters = {};
882
+ if (index !== undefined) {
883
+ queryParameters.index = index.toString();
884
+ }
885
+ if (search !== undefined) {
886
+ queryParameters.search = search.toString();
887
+ }
888
+ if (startDate !== undefined) {
889
+ queryParameters.startDate = startDate.toString();
890
+ }
891
+ if (endDate !== undefined) {
892
+ queryParameters.endDate = endDate.toString();
893
+ }
894
+ if (limit !== undefined) {
895
+ queryParameters.limit = limit.toString();
896
+ }
897
+ if (offset !== undefined) {
898
+ queryParameters.offset = offset.toString();
899
+ }
900
+ if (tags !== undefined) {
901
+ queryParameters.tags = tags.toString();
902
+ }
903
+ const request = {
904
+ method: 'GET',
905
+ path: requestPath,
906
+ queryParameters,
907
+ headers,
908
+ };
909
+ return transporter.request(request, requestOptions);
910
+ },
911
+ /**
912
+ * Returns top filters with no results. Limited to the 1000 most used filters.
913
+ *
914
+ * @summary Get top filters for a no result search.
915
+ * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
916
+ * @param getTopFiltersNoResults.index - The index name to target.
917
+ * @param getTopFiltersNoResults.search - The query term to search for. Must match the exact user input.
918
+ * @param getTopFiltersNoResults.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
919
+ * @param getTopFiltersNoResults.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
920
+ * @param getTopFiltersNoResults.limit - Number of records to return. Limit is the size of the page.
921
+ * @param getTopFiltersNoResults.offset - Position of the starting record. Used for paging. 0 is the first record.
922
+ * @param getTopFiltersNoResults.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
923
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
924
+ */
925
+ getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) {
926
+ if (!index) {
927
+ throw new Error('Parameter `index` is required when calling `getTopFiltersNoResults`.');
928
+ }
929
+ const requestPath = '/2/filters/noResults';
930
+ const headers = {};
931
+ const queryParameters = {};
932
+ if (index !== undefined) {
933
+ queryParameters.index = index.toString();
934
+ }
935
+ if (search !== undefined) {
936
+ queryParameters.search = search.toString();
937
+ }
938
+ if (startDate !== undefined) {
939
+ queryParameters.startDate = startDate.toString();
940
+ }
941
+ if (endDate !== undefined) {
942
+ queryParameters.endDate = endDate.toString();
943
+ }
944
+ if (limit !== undefined) {
945
+ queryParameters.limit = limit.toString();
946
+ }
947
+ if (offset !== undefined) {
948
+ queryParameters.offset = offset.toString();
949
+ }
950
+ if (tags !== undefined) {
951
+ queryParameters.tags = tags.toString();
952
+ }
953
+ const request = {
954
+ method: 'GET',
955
+ path: requestPath,
956
+ queryParameters,
957
+ headers,
958
+ };
959
+ return transporter.request(request, requestOptions);
960
+ },
961
+ /**
962
+ * Returns top hits. Limited to the 1000 most frequent ones.
963
+ *
964
+ * @summary Get top hits.
965
+ * @param getTopHits - The getTopHits object.
966
+ * @param getTopHits.index - The index name to target.
967
+ * @param getTopHits.search - The query term to search for. Must match the exact user input.
968
+ * @param getTopHits.clickAnalytics - Whether to include the click-through and conversion rates for a search.
969
+ * @param getTopHits.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
970
+ * @param getTopHits.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
971
+ * @param getTopHits.limit - Number of records to return. Limit is the size of the page.
972
+ * @param getTopHits.offset - Position of the starting record. Used for paging. 0 is the first record.
973
+ * @param getTopHits.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
974
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
975
+ */
976
+ getTopHits({ index, search, clickAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) {
977
+ if (!index) {
978
+ throw new Error('Parameter `index` is required when calling `getTopHits`.');
979
+ }
980
+ const requestPath = '/2/hits';
981
+ const headers = {};
982
+ const queryParameters = {};
983
+ if (index !== undefined) {
984
+ queryParameters.index = index.toString();
985
+ }
986
+ if (search !== undefined) {
987
+ queryParameters.search = search.toString();
988
+ }
989
+ if (clickAnalytics !== undefined) {
990
+ queryParameters.clickAnalytics = clickAnalytics.toString();
991
+ }
992
+ if (startDate !== undefined) {
993
+ queryParameters.startDate = startDate.toString();
994
+ }
995
+ if (endDate !== undefined) {
996
+ queryParameters.endDate = endDate.toString();
997
+ }
998
+ if (limit !== undefined) {
999
+ queryParameters.limit = limit.toString();
1000
+ }
1001
+ if (offset !== undefined) {
1002
+ queryParameters.offset = offset.toString();
1003
+ }
1004
+ if (tags !== undefined) {
1005
+ queryParameters.tags = tags.toString();
1006
+ }
1007
+ const request = {
1008
+ method: 'GET',
1009
+ path: requestPath,
1010
+ queryParameters,
1011
+ headers,
1012
+ };
1013
+ return transporter.request(request, requestOptions);
1014
+ },
1015
+ /**
1016
+ * Returns top searches. Limited to the 1000 most frequent ones. For each search, also returns the average number of hits returned.
1017
+ *
1018
+ * @summary Get top searches.
1019
+ * @param getTopSearches - The getTopSearches object.
1020
+ * @param getTopSearches.index - The index name to target.
1021
+ * @param getTopSearches.clickAnalytics - Whether to include the click-through and conversion rates for a search.
1022
+ * @param getTopSearches.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
1023
+ * @param getTopSearches.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
1024
+ * @param getTopSearches.orderBy - Reorder the results.
1025
+ * @param getTopSearches.direction - The sorting of the result.
1026
+ * @param getTopSearches.limit - Number of records to return. Limit is the size of the page.
1027
+ * @param getTopSearches.offset - Position of the starting record. Used for paging. 0 is the first record.
1028
+ * @param getTopSearches.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
1029
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1030
+ */
1031
+ getTopSearches({ index, clickAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }, requestOptions) {
1032
+ if (!index) {
1033
+ throw new Error('Parameter `index` is required when calling `getTopSearches`.');
1034
+ }
1035
+ const requestPath = '/2/searches';
1036
+ const headers = {};
1037
+ const queryParameters = {};
1038
+ if (index !== undefined) {
1039
+ queryParameters.index = index.toString();
1040
+ }
1041
+ if (clickAnalytics !== undefined) {
1042
+ queryParameters.clickAnalytics = clickAnalytics.toString();
1043
+ }
1044
+ if (startDate !== undefined) {
1045
+ queryParameters.startDate = startDate.toString();
1046
+ }
1047
+ if (endDate !== undefined) {
1048
+ queryParameters.endDate = endDate.toString();
1049
+ }
1050
+ if (orderBy !== undefined) {
1051
+ queryParameters.orderBy = orderBy.toString();
1052
+ }
1053
+ if (direction !== undefined) {
1054
+ queryParameters.direction = direction.toString();
1055
+ }
1056
+ if (limit !== undefined) {
1057
+ queryParameters.limit = limit.toString();
1058
+ }
1059
+ if (offset !== undefined) {
1060
+ queryParameters.offset = offset.toString();
1061
+ }
1062
+ if (tags !== undefined) {
1063
+ queryParameters.tags = tags.toString();
1064
+ }
1065
+ const request = {
1066
+ method: 'GET',
1067
+ path: requestPath,
1068
+ queryParameters,
1069
+ headers,
1070
+ };
1071
+ return transporter.request(request, requestOptions);
1072
+ },
1073
+ /**
1074
+ * Returns the distinct count of users across the given time range. The endpoint returns a value for the complete given time range, as well as a value per day.
1075
+ *
1076
+ * @summary Get users count.
1077
+ * @param getUsersCount - The getUsersCount object.
1078
+ * @param getUsersCount.index - The index name to target.
1079
+ * @param getUsersCount.startDate - The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
1080
+ * @param getUsersCount.endDate - The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
1081
+ * @param getUsersCount.tags - Filter metrics on the provided tags. Each tag must correspond to an 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 should be URL encoded.
1082
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1083
+ */
1084
+ getUsersCount({ index, startDate, endDate, tags }, requestOptions) {
1085
+ if (!index) {
1086
+ throw new Error('Parameter `index` is required when calling `getUsersCount`.');
1087
+ }
1088
+ const requestPath = '/2/users/count';
1089
+ const headers = {};
1090
+ const queryParameters = {};
1091
+ if (index !== undefined) {
1092
+ queryParameters.index = index.toString();
1093
+ }
1094
+ if (startDate !== undefined) {
1095
+ queryParameters.startDate = startDate.toString();
1096
+ }
1097
+ if (endDate !== undefined) {
1098
+ queryParameters.endDate = endDate.toString();
1099
+ }
1100
+ if (tags !== undefined) {
1101
+ queryParameters.tags = tags.toString();
1102
+ }
1103
+ const request = {
1104
+ method: 'GET',
1105
+ path: requestPath,
1106
+ queryParameters,
1107
+ headers,
1108
+ };
1109
+ return transporter.request(request, requestOptions);
1110
+ },
1111
+ /**
1112
+ * This method allow you to send requests to the Algolia REST API.
1113
+ *
1114
+ * @summary Send requests to the Algolia REST API.
1115
+ * @param post - The post object.
1116
+ * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1117
+ * @param post.parameters - Query parameters to be applied to the current query.
1118
+ * @param post.body - The parameters to send with the custom request.
1119
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1120
+ */
1121
+ post({ path, parameters, body }, requestOptions) {
1122
+ if (!path) {
1123
+ throw new Error('Parameter `path` is required when calling `post`.');
1124
+ }
1125
+ const requestPath = '/1{path}'.replace('{path}', path);
1126
+ const headers = {};
1127
+ const queryParameters = parameters ? parameters : {};
1128
+ const request = {
1129
+ method: 'POST',
1130
+ path: requestPath,
1131
+ queryParameters,
1132
+ headers,
1133
+ data: body ? body : {},
1134
+ };
1135
+ return transporter.request(request, requestOptions);
1136
+ },
1137
+ /**
1138
+ * This method allow you to send requests to the Algolia REST API.
1139
+ *
1140
+ * @summary Send requests to the Algolia REST API.
1141
+ * @param put - The put object.
1142
+ * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1143
+ * @param put.parameters - Query parameters to be applied to the current query.
1144
+ * @param put.body - The parameters to send with the custom request.
1145
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1146
+ */
1147
+ put({ path, parameters, body }, requestOptions) {
1148
+ if (!path) {
1149
+ throw new Error('Parameter `path` is required when calling `put`.');
1150
+ }
1151
+ const requestPath = '/1{path}'.replace('{path}', path);
1152
+ const headers = {};
1153
+ const queryParameters = parameters ? parameters : {};
1154
+ const request = {
1155
+ method: 'PUT',
1156
+ path: requestPath,
1157
+ queryParameters,
1158
+ headers,
1159
+ data: body ? body : {},
1160
+ };
1161
+ return transporter.request(request, requestOptions);
1162
+ },
1163
+ };
1164
+ }
1165
+
1166
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
1167
+ const apiClientVersion$2 = '5.0.0-alpha.3';
1168
+ const REGIONS = ['eu', 'us'];
1169
+ function getDefaultHosts$1(region) {
1170
+ const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
1171
+ return [{ url, accept: 'readWrite', protocol: 'https' }];
1172
+ }
1173
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1174
+ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }) {
1175
+ const auth = createAuth(appIdOption, apiKeyOption, authMode);
1176
+ const transporter = createTransporter({
1177
+ hosts: getDefaultHosts$1(regionOption),
1178
+ ...options,
1179
+ algoliaAgent: getAlgoliaAgent({
1180
+ algoliaAgents,
1181
+ client: 'Personalization',
1182
+ version: apiClientVersion$2,
1183
+ }),
1184
+ baseHeaders: {
1185
+ 'content-type': 'text/plain',
1186
+ ...auth.headers(),
1187
+ ...options.baseHeaders,
1188
+ },
1189
+ baseQueryParameters: {
1190
+ ...auth.queryParameters(),
1191
+ ...options.baseQueryParameters,
1192
+ },
1193
+ });
1194
+ return {
1195
+ transporter,
1196
+ /**
1197
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
1198
+ */
1199
+ get _ua() {
1200
+ return transporter.algoliaAgent.value;
1201
+ },
1202
+ /**
1203
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
1204
+ *
1205
+ * @param segment - The algolia agent (user-agent) segment to add.
1206
+ * @param version - The version of the agent.
1207
+ */
1208
+ addAlgoliaAgent(segment, version) {
1209
+ transporter.algoliaAgent.add({ segment, version });
1210
+ },
1211
+ /**
1212
+ * This method allow you to send requests to the Algolia REST API.
1213
+ *
1214
+ * @summary Send requests to the Algolia REST API.
1215
+ * @param del - The del object.
1216
+ * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1217
+ * @param del.parameters - Query parameters to be applied to the current query.
1218
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1219
+ */
1220
+ del({ path, parameters }, requestOptions) {
1221
+ if (!path) {
1222
+ throw new Error('Parameter `path` is required when calling `del`.');
1223
+ }
1224
+ const requestPath = '/1{path}'.replace('{path}', path);
1225
+ const headers = {};
1226
+ const queryParameters = parameters ? parameters : {};
1227
+ const request = {
1228
+ method: 'DELETE',
1229
+ path: requestPath,
1230
+ queryParameters,
1231
+ headers,
1232
+ };
1233
+ return transporter.request(request, requestOptions);
1234
+ },
1235
+ /**
1236
+ * 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.
1237
+ *
1238
+ * @summary Delete a user profile.
1239
+ * @param deleteUserProfile - The deleteUserProfile object.
1240
+ * @param deleteUserProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1241
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1242
+ */
1243
+ deleteUserProfile({ userToken }, requestOptions) {
1244
+ if (!userToken) {
1245
+ throw new Error('Parameter `userToken` is required when calling `deleteUserProfile`.');
1246
+ }
1247
+ const requestPath = '/1/profiles/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1248
+ const headers = {};
1249
+ const queryParameters = {};
1250
+ const request = {
1251
+ method: 'DELETE',
1252
+ path: requestPath,
1253
+ queryParameters,
1254
+ headers,
1255
+ };
1256
+ return transporter.request(request, requestOptions);
1257
+ },
1258
+ /**
1259
+ * This method allow you to send requests to the Algolia REST API.
1260
+ *
1261
+ * @summary Send requests to the Algolia REST API.
1262
+ * @param get - The get object.
1263
+ * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1264
+ * @param get.parameters - Query parameters to be applied to the current query.
1265
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1266
+ */
1267
+ get({ path, parameters }, requestOptions) {
1268
+ if (!path) {
1269
+ throw new Error('Parameter `path` is required when calling `get`.');
1270
+ }
1271
+ const requestPath = '/1{path}'.replace('{path}', path);
1272
+ const headers = {};
1273
+ const queryParameters = parameters ? parameters : {};
1274
+ const request = {
1275
+ method: 'GET',
1276
+ path: requestPath,
1277
+ queryParameters,
1278
+ headers,
1279
+ };
1280
+ return transporter.request(request, requestOptions);
1281
+ },
1282
+ /**
1283
+ * The strategy contains information on the events and facets that impact user profiles and personalized search results.
1284
+ *
1285
+ * @summary Get the current strategy.
1286
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1287
+ */
1288
+ getPersonalizationStrategy(requestOptions) {
1289
+ const requestPath = '/1/strategies/personalization';
1290
+ const headers = {};
1291
+ const queryParameters = {};
1292
+ const request = {
1293
+ method: 'GET',
1294
+ path: requestPath,
1295
+ queryParameters,
1296
+ headers,
1297
+ };
1298
+ return transporter.request(request, requestOptions);
1299
+ },
1300
+ /**
1301
+ * 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.
1302
+ *
1303
+ * @summary Get a user profile.
1304
+ * @param getUserTokenProfile - The getUserTokenProfile object.
1305
+ * @param getUserTokenProfile.userToken - UserToken representing the user for which to fetch the Personalization profile.
1306
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1307
+ */
1308
+ getUserTokenProfile({ userToken }, requestOptions) {
1309
+ if (!userToken) {
1310
+ throw new Error('Parameter `userToken` is required when calling `getUserTokenProfile`.');
1311
+ }
1312
+ const requestPath = '/1/profiles/personalization/{userToken}'.replace('{userToken}', encodeURIComponent(userToken));
1313
+ const headers = {};
1314
+ const queryParameters = {};
1315
+ const request = {
1316
+ method: 'GET',
1317
+ path: requestPath,
1318
+ queryParameters,
1319
+ headers,
1320
+ };
1321
+ return transporter.request(request, requestOptions);
1322
+ },
1323
+ /**
1324
+ * This method allow you to send requests to the Algolia REST API.
1325
+ *
1326
+ * @summary Send requests to the Algolia REST API.
1327
+ * @param post - The post object.
1328
+ * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1329
+ * @param post.parameters - Query parameters to be applied to the current query.
1330
+ * @param post.body - The parameters to send with the custom request.
1331
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1332
+ */
1333
+ post({ path, parameters, body }, requestOptions) {
1334
+ if (!path) {
1335
+ throw new Error('Parameter `path` is required when calling `post`.');
1336
+ }
1337
+ const requestPath = '/1{path}'.replace('{path}', path);
1338
+ const headers = {};
1339
+ const queryParameters = parameters ? parameters : {};
1340
+ const request = {
1341
+ method: 'POST',
1342
+ path: requestPath,
1343
+ queryParameters,
1344
+ headers,
1345
+ data: body ? body : {},
1346
+ };
1347
+ return transporter.request(request, requestOptions);
1348
+ },
1349
+ /**
1350
+ * This method allow you to send requests to the Algolia REST API.
1351
+ *
1352
+ * @summary Send requests to the Algolia REST API.
1353
+ * @param put - The put object.
1354
+ * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1355
+ * @param put.parameters - Query parameters to be applied to the current query.
1356
+ * @param put.body - The parameters to send with the custom request.
1357
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1358
+ */
1359
+ put({ path, parameters, body }, requestOptions) {
1360
+ if (!path) {
1361
+ throw new Error('Parameter `path` is required when calling `put`.');
1362
+ }
1363
+ const requestPath = '/1{path}'.replace('{path}', path);
1364
+ const headers = {};
1365
+ const queryParameters = parameters ? parameters : {};
1366
+ const request = {
1367
+ method: 'PUT',
1368
+ path: requestPath,
1369
+ queryParameters,
1370
+ headers,
1371
+ data: body ? body : {},
1372
+ };
1373
+ return transporter.request(request, requestOptions);
1374
+ },
1375
+ /**
1376
+ * A strategy defines the events and facets that impact user profiles and personalized search results.
1377
+ *
1378
+ * @summary Set a new strategy.
1379
+ * @param personalizationStrategyParams - The personalizationStrategyParams object.
1380
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1381
+ */
1382
+ setPersonalizationStrategy(personalizationStrategyParams, requestOptions) {
1383
+ if (!personalizationStrategyParams) {
1384
+ throw new Error('Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.');
1385
+ }
1386
+ if (!personalizationStrategyParams.eventScoring) {
1387
+ throw new Error('Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.');
1388
+ }
1389
+ if (!personalizationStrategyParams.facetScoring) {
1390
+ throw new Error('Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.');
1391
+ }
1392
+ if (!personalizationStrategyParams.personalizationImpact) {
1393
+ throw new Error('Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.');
1394
+ }
1395
+ const requestPath = '/1/strategies/personalization';
1396
+ const headers = {};
1397
+ const queryParameters = {};
1398
+ const request = {
1399
+ method: 'POST',
1400
+ path: requestPath,
1401
+ queryParameters,
1402
+ headers,
1403
+ data: personalizationStrategyParams,
1404
+ };
1405
+ return transporter.request(request, requestOptions);
1406
+ },
1407
+ };
1408
+ }
1409
+
1410
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
1411
+ const apiClientVersion$1 = '5.0.0-alpha.3';
1412
+ function getDefaultHosts(appId) {
1413
+ return [
1414
+ {
1415
+ url: `${appId}-dsn.algolia.net`,
1416
+ accept: 'read',
1417
+ protocol: 'https',
1418
+ },
1419
+ {
1420
+ url: `${appId}.algolia.net`,
1421
+ accept: 'write',
1422
+ protocol: 'https',
1423
+ },
1424
+ ].concat(shuffle([
1425
+ {
1426
+ url: `${appId}-1.algolianet.com`,
1427
+ accept: 'readWrite',
1428
+ protocol: 'https',
1429
+ },
1430
+ {
1431
+ url: `${appId}-2.algolianet.com`,
1432
+ accept: 'readWrite',
1433
+ protocol: 'https',
1434
+ },
1435
+ {
1436
+ url: `${appId}-3.algolianet.com`,
1437
+ accept: 'readWrite',
1438
+ protocol: 'https',
1439
+ },
1440
+ ]));
1441
+ }
1442
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
1443
+ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }) {
1444
+ const auth = createAuth(appIdOption, apiKeyOption, authMode);
1445
+ const transporter = createTransporter({
1446
+ hosts: getDefaultHosts(appIdOption),
1447
+ ...options,
1448
+ algoliaAgent: getAlgoliaAgent({
1449
+ algoliaAgents,
1450
+ client: 'Search',
1451
+ version: apiClientVersion$1,
1452
+ }),
1453
+ baseHeaders: {
1454
+ 'content-type': 'text/plain',
1455
+ ...auth.headers(),
1456
+ ...options.baseHeaders,
1457
+ },
1458
+ baseQueryParameters: {
1459
+ ...auth.queryParameters(),
1460
+ ...options.baseQueryParameters,
1461
+ },
1462
+ });
1463
+ return {
1464
+ transporter,
1465
+ /**
1466
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
1467
+ */
1468
+ get _ua() {
1469
+ return transporter.algoliaAgent.value;
1470
+ },
1471
+ /**
1472
+ * Adds a `segment` to the `x-algolia-agent` sent with every requests.
1473
+ *
1474
+ * @param segment - The algolia agent (user-agent) segment to add.
1475
+ * @param version - The version of the agent.
1476
+ */
1477
+ addAlgoliaAgent(segment, version) {
1478
+ transporter.algoliaAgent.add({ segment, version });
1479
+ },
1480
+ /**
1481
+ * Helper: Wait for a task to complete with `indexName` and `taskID`.
1482
+ *
1483
+ * @summary Wait for a task to complete.
1484
+ * @param waitForTaskOptions - The waitForTaskOptions object.
1485
+ * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
1486
+ * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
1487
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
1488
+ */
1489
+ waitForTask({ indexName, taskID, ...createRetryablePromiseOptions }, requestOptions) {
1490
+ return createRetryablePromise({
1491
+ ...createRetryablePromiseOptions,
1492
+ func: () => this.getTask({ indexName, taskID }, requestOptions),
1493
+ validate: (response) => response.status === 'published',
1494
+ });
1495
+ },
1496
+ /**
1497
+ * Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.
1498
+ *
1499
+ * @summary Wait for an API key task to be processed.
1500
+ * @param waitForApiKeyOptions - The waitForApiKeyOptions object.
1501
+ * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
1502
+ * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
1503
+ * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
1504
+ * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
1505
+ */
1506
+ waitForApiKey({ operation, key, apiKey, ...createRetryablePromiseOptions }, requestOptions) {
1507
+ if (operation === 'update') {
1508
+ if (!apiKey) {
1509
+ throw new Error('`apiKey` is required when waiting for an `update` operation.');
1510
+ }
1511
+ return createRetryablePromise({
1512
+ ...createRetryablePromiseOptions,
1513
+ func: () => this.getApiKey({ key }, requestOptions),
1514
+ validate: (response) => {
1515
+ for (const field of Object.keys(apiKey)) {
1516
+ if (Array.isArray(apiKey[field])) {
1517
+ if (apiKey[field].length !== response[field].length ||
1518
+ apiKey[field].some((value, index) => value !== response[field][index])) {
1519
+ return false;
1520
+ }
1521
+ }
1522
+ else if (response[field] !== apiKey[field]) {
1523
+ return false;
1524
+ }
1525
+ }
1526
+ return true;
1527
+ },
1528
+ });
1529
+ }
1530
+ return createRetryablePromise({
1531
+ ...createRetryablePromiseOptions,
1532
+ func: () => this.getApiKey({ key }, requestOptions).catch((error) => error),
1533
+ validate: (error) => operation === 'add' ? error.status !== 404 : error.status === 404,
1534
+ });
1535
+ },
1536
+ /**
1537
+ * Add a new API Key with specific permissions/restrictions.
1538
+ *
1539
+ * @summary Create an API key.
1540
+ * @param apiKey - The apiKey object.
1541
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1542
+ */
1543
+ addApiKey(apiKey, requestOptions) {
1544
+ if (!apiKey) {
1545
+ throw new Error('Parameter `apiKey` is required when calling `addApiKey`.');
1546
+ }
1547
+ if (!apiKey.acl) {
1548
+ throw new Error('Parameter `apiKey.acl` is required when calling `addApiKey`.');
1549
+ }
1550
+ const requestPath = '/1/keys';
1551
+ const headers = {};
1552
+ const queryParameters = {};
1553
+ const request = {
1554
+ method: 'POST',
1555
+ path: requestPath,
1556
+ queryParameters,
1557
+ headers,
1558
+ data: apiKey,
1559
+ };
1560
+ return transporter.request(request, requestOptions);
1561
+ },
1562
+ /**
1563
+ * Add or replace an object with a given object ID. If the object does not exist, it will be created. If it already exists, it will be replaced.
1564
+ *
1565
+ * @summary Add or replace an object.
1566
+ * @param addOrUpdateObject - The addOrUpdateObject object.
1567
+ * @param addOrUpdateObject.indexName - The index in which to perform the request.
1568
+ * @param addOrUpdateObject.objectID - Unique identifier of an object.
1569
+ * @param addOrUpdateObject.body - The Algolia object.
1570
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1571
+ */
1572
+ addOrUpdateObject({ indexName, objectID, body }, requestOptions) {
1573
+ if (!indexName) {
1574
+ throw new Error('Parameter `indexName` is required when calling `addOrUpdateObject`.');
1575
+ }
1576
+ if (!objectID) {
1577
+ throw new Error('Parameter `objectID` is required when calling `addOrUpdateObject`.');
1578
+ }
1579
+ if (!body) {
1580
+ throw new Error('Parameter `body` is required when calling `addOrUpdateObject`.');
1581
+ }
1582
+ const requestPath = '/1/indexes/{indexName}/{objectID}'
1583
+ .replace('{indexName}', encodeURIComponent(indexName))
1584
+ .replace('{objectID}', encodeURIComponent(objectID));
1585
+ const headers = {};
1586
+ const queryParameters = {};
1587
+ const request = {
1588
+ method: 'PUT',
1589
+ path: requestPath,
1590
+ queryParameters,
1591
+ headers,
1592
+ data: body,
1593
+ };
1594
+ return transporter.request(request, requestOptions);
1595
+ },
1596
+ /**
1597
+ * Add a single source to the list of allowed sources.
1598
+ *
1599
+ * @summary Add a single source.
1600
+ * @param source - The source to add.
1601
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1602
+ */
1603
+ appendSource(source, requestOptions) {
1604
+ if (!source) {
1605
+ throw new Error('Parameter `source` is required when calling `appendSource`.');
1606
+ }
1607
+ const requestPath = '/1/security/sources/append';
1608
+ const headers = {};
1609
+ const queryParameters = {};
1610
+ const request = {
1611
+ method: 'POST',
1612
+ path: requestPath,
1613
+ queryParameters,
1614
+ headers,
1615
+ data: source,
1616
+ };
1617
+ return transporter.request(request, requestOptions);
1618
+ },
1619
+ /**
1620
+ * Assign or Move a userID to a cluster. The time it takes to migrate (move) a user is proportional to the amount of data linked to the userID. Upon success, the response is 200 OK. A successful response indicates that the operation has been taken into account, and the userID is directly usable.
1621
+ *
1622
+ * @summary Assign or Move userID.
1623
+ * @param assignUserId - The assignUserId object.
1624
+ * @param assignUserId.xAlgoliaUserID - UserID to assign.
1625
+ * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
1626
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1627
+ */
1628
+ assignUserId({ xAlgoliaUserID, assignUserIdParams }, requestOptions) {
1629
+ if (!xAlgoliaUserID) {
1630
+ throw new Error('Parameter `xAlgoliaUserID` is required when calling `assignUserId`.');
1631
+ }
1632
+ if (!assignUserIdParams) {
1633
+ throw new Error('Parameter `assignUserIdParams` is required when calling `assignUserId`.');
1634
+ }
1635
+ if (!assignUserIdParams.cluster) {
1636
+ throw new Error('Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.');
1637
+ }
1638
+ const requestPath = '/1/clusters/mapping';
1639
+ const headers = {};
1640
+ const queryParameters = {};
1641
+ if (xAlgoliaUserID !== undefined) {
1642
+ headers['X-Algolia-User-ID'] = xAlgoliaUserID.toString();
1643
+ }
1644
+ const request = {
1645
+ method: 'POST',
1646
+ path: requestPath,
1647
+ queryParameters,
1648
+ headers,
1649
+ data: assignUserIdParams,
1650
+ };
1651
+ return transporter.request(request, requestOptions);
1652
+ },
1653
+ /**
1654
+ * Perform multiple write operations targeting one index, in a single API call.
1655
+ *
1656
+ * @summary Batch operations to one index.
1657
+ * @param batch - The batch object.
1658
+ * @param batch.indexName - The index in which to perform the request.
1659
+ * @param batch.batchWriteParams - The batchWriteParams object.
1660
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1661
+ */
1662
+ batch({ indexName, batchWriteParams }, requestOptions) {
1663
+ if (!indexName) {
1664
+ throw new Error('Parameter `indexName` is required when calling `batch`.');
1665
+ }
1666
+ if (!batchWriteParams) {
1667
+ throw new Error('Parameter `batchWriteParams` is required when calling `batch`.');
1668
+ }
1669
+ const requestPath = '/1/indexes/{indexName}/batch'.replace('{indexName}', encodeURIComponent(indexName));
1670
+ const headers = {};
1671
+ const queryParameters = {};
1672
+ const request = {
1673
+ method: 'POST',
1674
+ path: requestPath,
1675
+ queryParameters,
1676
+ headers,
1677
+ data: batchWriteParams,
1678
+ };
1679
+ return transporter.request(request, requestOptions);
1680
+ },
1681
+ /**
1682
+ * Assign multiple userIDs to a cluster. Upon success, the response is 200 OK. A successful response indicates that the operation has been taken into account, and the userIDs are directly usable.
1683
+ *
1684
+ * @summary Batch assign userIDs.
1685
+ * @param batchAssignUserIds - The batchAssignUserIds object.
1686
+ * @param batchAssignUserIds.xAlgoliaUserID - UserID to assign.
1687
+ * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
1688
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1689
+ */
1690
+ batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }, requestOptions) {
1691
+ if (!xAlgoliaUserID) {
1692
+ throw new Error('Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.');
1693
+ }
1694
+ if (!batchAssignUserIdsParams) {
1695
+ throw new Error('Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.');
1696
+ }
1697
+ if (!batchAssignUserIdsParams.cluster) {
1698
+ throw new Error('Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.');
1699
+ }
1700
+ if (!batchAssignUserIdsParams.users) {
1701
+ throw new Error('Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.');
1702
+ }
1703
+ const requestPath = '/1/clusters/mapping/batch';
1704
+ const headers = {};
1705
+ const queryParameters = {};
1706
+ if (xAlgoliaUserID !== undefined) {
1707
+ headers['X-Algolia-User-ID'] = xAlgoliaUserID.toString();
1708
+ }
1709
+ const request = {
1710
+ method: 'POST',
1711
+ path: requestPath,
1712
+ queryParameters,
1713
+ headers,
1714
+ data: batchAssignUserIdsParams,
1715
+ };
1716
+ return transporter.request(request, requestOptions);
1717
+ },
1718
+ /**
1719
+ * Send a batch of dictionary entries.
1720
+ *
1721
+ * @summary Batch dictionary entries.
1722
+ * @param batchDictionaryEntries - The batchDictionaryEntries object.
1723
+ * @param batchDictionaryEntries.dictionaryName - The dictionary to search in.
1724
+ * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
1725
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1726
+ */
1727
+ batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }, requestOptions) {
1728
+ if (!dictionaryName) {
1729
+ throw new Error('Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.');
1730
+ }
1731
+ if (!batchDictionaryEntriesParams) {
1732
+ throw new Error('Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.');
1733
+ }
1734
+ if (!batchDictionaryEntriesParams.requests) {
1735
+ throw new Error('Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.');
1736
+ }
1737
+ const requestPath = '/1/dictionaries/{dictionaryName}/batch'.replace('{dictionaryName}', encodeURIComponent(dictionaryName));
1738
+ const headers = {};
1739
+ const queryParameters = {};
1740
+ const request = {
1741
+ method: 'POST',
1742
+ path: requestPath,
1743
+ queryParameters,
1744
+ headers,
1745
+ data: batchDictionaryEntriesParams,
1746
+ };
1747
+ return transporter.request(request, requestOptions);
1748
+ },
1749
+ /**
1750
+ * This method allows you to retrieve all index content. It can retrieve up to 1,000 records per call and supports full text search and filters. For performance reasons, some features are not supported, including `distinct`, sorting by `typos`, `words` or `geo distance`. When there is more content to be browsed, the response contains a cursor field. This cursor has to be passed to the subsequent call to browse in order to get the next page of results. When the end of the index has been reached, the cursor field is absent from the response.
1751
+ *
1752
+ * @summary Retrieve all index content.
1753
+ * @param browse - The browse object.
1754
+ * @param browse.indexName - The index in which to perform the request.
1755
+ * @param browse.browseRequest - The browseRequest object.
1756
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1757
+ */
1758
+ browse({ indexName, browseRequest }, requestOptions) {
1759
+ if (!indexName) {
1760
+ throw new Error('Parameter `indexName` is required when calling `browse`.');
1761
+ }
1762
+ const requestPath = '/1/indexes/{indexName}/browse'.replace('{indexName}', encodeURIComponent(indexName));
1763
+ const headers = {};
1764
+ const queryParameters = {};
1765
+ const request = {
1766
+ method: 'POST',
1767
+ path: requestPath,
1768
+ queryParameters,
1769
+ headers,
1770
+ data: browseRequest ? browseRequest : {},
1771
+ };
1772
+ return transporter.request(request, requestOptions);
1773
+ },
1774
+ /**
1775
+ * Remove all synonyms from an index.
1776
+ *
1777
+ * @summary Clear all synonyms.
1778
+ * @param clearAllSynonyms - The clearAllSynonyms object.
1779
+ * @param clearAllSynonyms.indexName - The index in which to perform the request.
1780
+ * @param clearAllSynonyms.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
1781
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1782
+ */
1783
+ clearAllSynonyms({ indexName, forwardToReplicas }, requestOptions) {
1784
+ if (!indexName) {
1785
+ throw new Error('Parameter `indexName` is required when calling `clearAllSynonyms`.');
1786
+ }
1787
+ const requestPath = '/1/indexes/{indexName}/synonyms/clear'.replace('{indexName}', encodeURIComponent(indexName));
1788
+ const headers = {};
1789
+ const queryParameters = {};
1790
+ if (forwardToReplicas !== undefined) {
1791
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
1792
+ }
1793
+ const request = {
1794
+ method: 'POST',
1795
+ path: requestPath,
1796
+ queryParameters,
1797
+ headers,
1798
+ };
1799
+ return transporter.request(request, requestOptions);
1800
+ },
1801
+ /**
1802
+ * Delete an index\'s content, but leave settings and index-specific API keys untouched.
1803
+ *
1804
+ * @summary Clear all objects from an index.
1805
+ * @param clearObjects - The clearObjects object.
1806
+ * @param clearObjects.indexName - The index in which to perform the request.
1807
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1808
+ */
1809
+ clearObjects({ indexName }, requestOptions) {
1810
+ if (!indexName) {
1811
+ throw new Error('Parameter `indexName` is required when calling `clearObjects`.');
1812
+ }
1813
+ const requestPath = '/1/indexes/{indexName}/clear'.replace('{indexName}', encodeURIComponent(indexName));
1814
+ const headers = {};
1815
+ const queryParameters = {};
1816
+ const request = {
1817
+ method: 'POST',
1818
+ path: requestPath,
1819
+ queryParameters,
1820
+ headers,
1821
+ };
1822
+ return transporter.request(request, requestOptions);
1823
+ },
1824
+ /**
1825
+ * Delete all Rules in the index.
1826
+ *
1827
+ * @summary Clear Rules.
1828
+ * @param clearRules - The clearRules object.
1829
+ * @param clearRules.indexName - The index in which to perform the request.
1830
+ * @param clearRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
1831
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1832
+ */
1833
+ clearRules({ indexName, forwardToReplicas }, requestOptions) {
1834
+ if (!indexName) {
1835
+ throw new Error('Parameter `indexName` is required when calling `clearRules`.');
1836
+ }
1837
+ const requestPath = '/1/indexes/{indexName}/rules/clear'.replace('{indexName}', encodeURIComponent(indexName));
1838
+ const headers = {};
1839
+ const queryParameters = {};
1840
+ if (forwardToReplicas !== undefined) {
1841
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
1842
+ }
1843
+ const request = {
1844
+ method: 'POST',
1845
+ path: requestPath,
1846
+ queryParameters,
1847
+ headers,
1848
+ };
1849
+ return transporter.request(request, requestOptions);
1850
+ },
1851
+ /**
1852
+ * This method allow you to send requests to the Algolia REST API.
1853
+ *
1854
+ * @summary Send requests to the Algolia REST API.
1855
+ * @param del - The del object.
1856
+ * @param del.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
1857
+ * @param del.parameters - Query parameters to be applied to the current query.
1858
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1859
+ */
1860
+ del({ path, parameters }, requestOptions) {
1861
+ if (!path) {
1862
+ throw new Error('Parameter `path` is required when calling `del`.');
1863
+ }
1864
+ const requestPath = '/1{path}'.replace('{path}', path);
1865
+ const headers = {};
1866
+ const queryParameters = parameters ? parameters : {};
1867
+ const request = {
1868
+ method: 'DELETE',
1869
+ path: requestPath,
1870
+ queryParameters,
1871
+ headers,
1872
+ };
1873
+ return transporter.request(request, requestOptions);
1874
+ },
1875
+ /**
1876
+ * Delete an existing API Key.
1877
+ *
1878
+ * @summary Delete an API key.
1879
+ * @param deleteApiKey - The deleteApiKey object.
1880
+ * @param deleteApiKey.key - API Key string.
1881
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1882
+ */
1883
+ deleteApiKey({ key }, requestOptions) {
1884
+ if (!key) {
1885
+ throw new Error('Parameter `key` is required when calling `deleteApiKey`.');
1886
+ }
1887
+ const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key));
1888
+ const headers = {};
1889
+ const queryParameters = {};
1890
+ const request = {
1891
+ method: 'DELETE',
1892
+ path: requestPath,
1893
+ queryParameters,
1894
+ headers,
1895
+ };
1896
+ return transporter.request(request, requestOptions);
1897
+ },
1898
+ /**
1899
+ * Remove all objects matching a filter (including geo filters). This method enables you to delete one or more objects based on filters (numeric, facet, tag or geo queries). It doesn\'t accept empty filters or a query.
1900
+ *
1901
+ * @summary Delete all records matching the query.
1902
+ * @param deleteBy - The deleteBy object.
1903
+ * @param deleteBy.indexName - The index in which to perform the request.
1904
+ * @param deleteBy.searchParams - The searchParams object.
1905
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1906
+ */
1907
+ deleteBy({ indexName, searchParams }, requestOptions) {
1908
+ if (!indexName) {
1909
+ throw new Error('Parameter `indexName` is required when calling `deleteBy`.');
1910
+ }
1911
+ if (!searchParams) {
1912
+ throw new Error('Parameter `searchParams` is required when calling `deleteBy`.');
1913
+ }
1914
+ const requestPath = '/1/indexes/{indexName}/deleteByQuery'.replace('{indexName}', encodeURIComponent(indexName));
1915
+ const headers = {};
1916
+ const queryParameters = {};
1917
+ const request = {
1918
+ method: 'POST',
1919
+ path: requestPath,
1920
+ queryParameters,
1921
+ headers,
1922
+ data: searchParams,
1923
+ };
1924
+ return transporter.request(request, requestOptions);
1925
+ },
1926
+ /**
1927
+ * Delete an existing index.
1928
+ *
1929
+ * @summary Delete index.
1930
+ * @param deleteIndex - The deleteIndex object.
1931
+ * @param deleteIndex.indexName - The index in which to perform the request.
1932
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1933
+ */
1934
+ deleteIndex({ indexName }, requestOptions) {
1935
+ if (!indexName) {
1936
+ throw new Error('Parameter `indexName` is required when calling `deleteIndex`.');
1937
+ }
1938
+ const requestPath = '/1/indexes/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
1939
+ const headers = {};
1940
+ const queryParameters = {};
1941
+ const request = {
1942
+ method: 'DELETE',
1943
+ path: requestPath,
1944
+ queryParameters,
1945
+ headers,
1946
+ };
1947
+ return transporter.request(request, requestOptions);
1948
+ },
1949
+ /**
1950
+ * Delete an existing object.
1951
+ *
1952
+ * @summary Delete an object.
1953
+ * @param deleteObject - The deleteObject object.
1954
+ * @param deleteObject.indexName - The index in which to perform the request.
1955
+ * @param deleteObject.objectID - Unique identifier of an object.
1956
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1957
+ */
1958
+ deleteObject({ indexName, objectID }, requestOptions) {
1959
+ if (!indexName) {
1960
+ throw new Error('Parameter `indexName` is required when calling `deleteObject`.');
1961
+ }
1962
+ if (!objectID) {
1963
+ throw new Error('Parameter `objectID` is required when calling `deleteObject`.');
1964
+ }
1965
+ const requestPath = '/1/indexes/{indexName}/{objectID}'
1966
+ .replace('{indexName}', encodeURIComponent(indexName))
1967
+ .replace('{objectID}', encodeURIComponent(objectID));
1968
+ const headers = {};
1969
+ const queryParameters = {};
1970
+ const request = {
1971
+ method: 'DELETE',
1972
+ path: requestPath,
1973
+ queryParameters,
1974
+ headers,
1975
+ };
1976
+ return transporter.request(request, requestOptions);
1977
+ },
1978
+ /**
1979
+ * Delete the Rule with the specified objectID.
1980
+ *
1981
+ * @summary Delete a rule.
1982
+ * @param deleteRule - The deleteRule object.
1983
+ * @param deleteRule.indexName - The index in which to perform the request.
1984
+ * @param deleteRule.objectID - Unique identifier of an object.
1985
+ * @param deleteRule.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
1986
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1987
+ */
1988
+ deleteRule({ indexName, objectID, forwardToReplicas }, requestOptions) {
1989
+ if (!indexName) {
1990
+ throw new Error('Parameter `indexName` is required when calling `deleteRule`.');
1991
+ }
1992
+ if (!objectID) {
1993
+ throw new Error('Parameter `objectID` is required when calling `deleteRule`.');
1994
+ }
1995
+ const requestPath = '/1/indexes/{indexName}/rules/{objectID}'
1996
+ .replace('{indexName}', encodeURIComponent(indexName))
1997
+ .replace('{objectID}', encodeURIComponent(objectID));
1998
+ const headers = {};
1999
+ const queryParameters = {};
2000
+ if (forwardToReplicas !== undefined) {
2001
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2002
+ }
2003
+ const request = {
2004
+ method: 'DELETE',
2005
+ path: requestPath,
2006
+ queryParameters,
2007
+ headers,
2008
+ };
2009
+ return transporter.request(request, requestOptions);
2010
+ },
2011
+ /**
2012
+ * Remove a single source from the list of allowed sources.
2013
+ *
2014
+ * @summary Remove a single source.
2015
+ * @param deleteSource - The deleteSource object.
2016
+ * @param deleteSource.source - The IP range of the source.
2017
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2018
+ */
2019
+ deleteSource({ source }, requestOptions) {
2020
+ if (!source) {
2021
+ throw new Error('Parameter `source` is required when calling `deleteSource`.');
2022
+ }
2023
+ const requestPath = '/1/security/sources/{source}'.replace('{source}', encodeURIComponent(source));
2024
+ const headers = {};
2025
+ const queryParameters = {};
2026
+ const request = {
2027
+ method: 'DELETE',
2028
+ path: requestPath,
2029
+ queryParameters,
2030
+ headers,
2031
+ };
2032
+ return transporter.request(request, requestOptions);
2033
+ },
2034
+ /**
2035
+ * Delete a single synonyms set, identified by the given objectID.
2036
+ *
2037
+ * @summary Delete synonym.
2038
+ * @param deleteSynonym - The deleteSynonym object.
2039
+ * @param deleteSynonym.indexName - The index in which to perform the request.
2040
+ * @param deleteSynonym.objectID - Unique identifier of an object.
2041
+ * @param deleteSynonym.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2042
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2043
+ */
2044
+ deleteSynonym({ indexName, objectID, forwardToReplicas }, requestOptions) {
2045
+ if (!indexName) {
2046
+ throw new Error('Parameter `indexName` is required when calling `deleteSynonym`.');
2047
+ }
2048
+ if (!objectID) {
2049
+ throw new Error('Parameter `objectID` is required when calling `deleteSynonym`.');
2050
+ }
2051
+ const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}'
2052
+ .replace('{indexName}', encodeURIComponent(indexName))
2053
+ .replace('{objectID}', encodeURIComponent(objectID));
2054
+ const headers = {};
2055
+ const queryParameters = {};
2056
+ if (forwardToReplicas !== undefined) {
2057
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2058
+ }
2059
+ const request = {
2060
+ method: 'DELETE',
2061
+ path: requestPath,
2062
+ queryParameters,
2063
+ headers,
2064
+ };
2065
+ return transporter.request(request, requestOptions);
2066
+ },
2067
+ /**
2068
+ * This method allow you to send requests to the Algolia REST API.
2069
+ *
2070
+ * @summary Send requests to the Algolia REST API.
2071
+ * @param get - The get object.
2072
+ * @param get.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
2073
+ * @param get.parameters - Query parameters to be applied to the current query.
2074
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2075
+ */
2076
+ get({ path, parameters }, requestOptions) {
2077
+ if (!path) {
2078
+ throw new Error('Parameter `path` is required when calling `get`.');
2079
+ }
2080
+ const requestPath = '/1{path}'.replace('{path}', path);
2081
+ const headers = {};
2082
+ const queryParameters = parameters ? parameters : {};
2083
+ const request = {
2084
+ method: 'GET',
2085
+ path: requestPath,
2086
+ queryParameters,
2087
+ headers,
2088
+ };
2089
+ return transporter.request(request, requestOptions);
2090
+ },
2091
+ /**
2092
+ * Get the permissions of an API key.
2093
+ *
2094
+ * @summary Get an API key.
2095
+ * @param getApiKey - The getApiKey object.
2096
+ * @param getApiKey.key - API Key string.
2097
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2098
+ */
2099
+ getApiKey({ key }, requestOptions) {
2100
+ if (!key) {
2101
+ throw new Error('Parameter `key` is required when calling `getApiKey`.');
2102
+ }
2103
+ const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key));
2104
+ const headers = {};
2105
+ const queryParameters = {};
2106
+ const request = {
2107
+ method: 'GET',
2108
+ path: requestPath,
2109
+ queryParameters,
2110
+ headers,
2111
+ };
2112
+ return transporter.request(request, requestOptions);
2113
+ },
2114
+ /**
2115
+ * List dictionaries supported per language.
2116
+ *
2117
+ * @summary List available languages.
2118
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2119
+ */
2120
+ getDictionaryLanguages(requestOptions) {
2121
+ const requestPath = '/1/dictionaries/*/languages';
2122
+ const headers = {};
2123
+ const queryParameters = {};
2124
+ const request = {
2125
+ method: 'GET',
2126
+ path: requestPath,
2127
+ queryParameters,
2128
+ headers,
2129
+ };
2130
+ return transporter.request(request, requestOptions);
2131
+ },
2132
+ /**
2133
+ * Retrieve dictionaries settings. The API stores languages whose standard entries are disabled. Fetch settings does not return false values.
2134
+ *
2135
+ * @summary Retrieve dictionaries settings.
2136
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2137
+ */
2138
+ getDictionarySettings(requestOptions) {
2139
+ const requestPath = '/1/dictionaries/*/settings';
2140
+ const headers = {};
2141
+ const queryParameters = {};
2142
+ const request = {
2143
+ method: 'GET',
2144
+ path: requestPath,
2145
+ queryParameters,
2146
+ headers,
2147
+ };
2148
+ return transporter.request(request, requestOptions);
2149
+ },
2150
+ /**
2151
+ * Return the latest log entries.
2152
+ *
2153
+ * @summary Return the latest log entries.
2154
+ * @param getLogs - The getLogs object.
2155
+ * @param getLogs.offset - First entry to retrieve (zero-based). Log entries are sorted by decreasing date, therefore 0 designates the most recent log entry.
2156
+ * @param getLogs.length - Maximum number of entries to retrieve. The maximum allowed value is 1000.
2157
+ * @param getLogs.indexName - Index for which log entries should be retrieved. When omitted, log entries are retrieved across all indices.
2158
+ * @param getLogs.type - Type of log entries to retrieve. When omitted, all log entries are retrieved.
2159
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2160
+ */
2161
+ getLogs({ offset, length, indexName, type }, requestOptions) {
2162
+ const requestPath = '/1/logs';
2163
+ const headers = {};
2164
+ const queryParameters = {};
2165
+ if (offset !== undefined) {
2166
+ queryParameters.offset = offset.toString();
2167
+ }
2168
+ if (length !== undefined) {
2169
+ queryParameters.length = length.toString();
2170
+ }
2171
+ if (indexName !== undefined) {
2172
+ queryParameters.indexName = indexName.toString();
2173
+ }
2174
+ if (type !== undefined) {
2175
+ queryParameters.type = type.toString();
2176
+ }
2177
+ const request = {
2178
+ method: 'GET',
2179
+ path: requestPath,
2180
+ queryParameters,
2181
+ headers,
2182
+ };
2183
+ return transporter.request(request, requestOptions);
2184
+ },
2185
+ /**
2186
+ * Retrieve one object from the index.
2187
+ *
2188
+ * @summary Retrieve an object.
2189
+ * @param getObject - The getObject object.
2190
+ * @param getObject.indexName - The index in which to perform the request.
2191
+ * @param getObject.objectID - Unique identifier of an object.
2192
+ * @param getObject.attributesToRetrieve - List of attributes to retrieve. If not specified, all retrievable attributes are returned.
2193
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2194
+ */
2195
+ getObject({ indexName, objectID, attributesToRetrieve }, requestOptions) {
2196
+ if (!indexName) {
2197
+ throw new Error('Parameter `indexName` is required when calling `getObject`.');
2198
+ }
2199
+ if (!objectID) {
2200
+ throw new Error('Parameter `objectID` is required when calling `getObject`.');
2201
+ }
2202
+ const requestPath = '/1/indexes/{indexName}/{objectID}'
2203
+ .replace('{indexName}', encodeURIComponent(indexName))
2204
+ .replace('{objectID}', encodeURIComponent(objectID));
2205
+ const headers = {};
2206
+ const queryParameters = {};
2207
+ if (attributesToRetrieve !== undefined) {
2208
+ queryParameters.attributesToRetrieve = attributesToRetrieve.toString();
2209
+ }
2210
+ const request = {
2211
+ method: 'GET',
2212
+ path: requestPath,
2213
+ queryParameters,
2214
+ headers,
2215
+ };
2216
+ return transporter.request(request, requestOptions);
2217
+ },
2218
+ /**
2219
+ * Retrieve one or more objects, potentially from different indices, in a single API call.
2220
+ *
2221
+ * @summary Retrieve one or more objects.
2222
+ * @param getObjectsParams - The Algolia object.
2223
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2224
+ */
2225
+ getObjects(getObjectsParams, requestOptions) {
2226
+ if (!getObjectsParams) {
2227
+ throw new Error('Parameter `getObjectsParams` is required when calling `getObjects`.');
2228
+ }
2229
+ const requestPath = '/1/indexes/*/objects';
2230
+ const headers = {};
2231
+ const queryParameters = {};
2232
+ const request = {
2233
+ method: 'POST',
2234
+ path: requestPath,
2235
+ queryParameters,
2236
+ headers,
2237
+ data: getObjectsParams,
2238
+ useReadTransporter: true,
2239
+ cacheable: true,
2240
+ };
2241
+ return transporter.request(request, requestOptions);
2242
+ },
2243
+ /**
2244
+ * Retrieve the Rule with the specified objectID.
2245
+ *
2246
+ * @summary Get a rule.
2247
+ * @param getRule - The getRule object.
2248
+ * @param getRule.indexName - The index in which to perform the request.
2249
+ * @param getRule.objectID - Unique identifier of an object.
2250
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2251
+ */
2252
+ getRule({ indexName, objectID }, requestOptions) {
2253
+ if (!indexName) {
2254
+ throw new Error('Parameter `indexName` is required when calling `getRule`.');
2255
+ }
2256
+ if (!objectID) {
2257
+ throw new Error('Parameter `objectID` is required when calling `getRule`.');
2258
+ }
2259
+ const requestPath = '/1/indexes/{indexName}/rules/{objectID}'
2260
+ .replace('{indexName}', encodeURIComponent(indexName))
2261
+ .replace('{objectID}', encodeURIComponent(objectID));
2262
+ const headers = {};
2263
+ const queryParameters = {};
2264
+ const request = {
2265
+ method: 'GET',
2266
+ path: requestPath,
2267
+ queryParameters,
2268
+ headers,
2269
+ };
2270
+ return transporter.request(request, requestOptions);
2271
+ },
2272
+ /**
2273
+ * Retrieve settings of an index.
2274
+ *
2275
+ * @summary Retrieve settings of an index.
2276
+ * @param getSettings - The getSettings object.
2277
+ * @param getSettings.indexName - The index in which to perform the request.
2278
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2279
+ */
2280
+ getSettings({ indexName }, requestOptions) {
2281
+ if (!indexName) {
2282
+ throw new Error('Parameter `indexName` is required when calling `getSettings`.');
2283
+ }
2284
+ const requestPath = '/1/indexes/{indexName}/settings'.replace('{indexName}', encodeURIComponent(indexName));
2285
+ const headers = {};
2286
+ const queryParameters = {};
2287
+ const request = {
2288
+ method: 'GET',
2289
+ path: requestPath,
2290
+ queryParameters,
2291
+ headers,
2292
+ };
2293
+ return transporter.request(request, requestOptions);
2294
+ },
2295
+ /**
2296
+ * List all allowed sources.
2297
+ *
2298
+ * @summary List all allowed sources.
2299
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2300
+ */
2301
+ getSources(requestOptions) {
2302
+ const requestPath = '/1/security/sources';
2303
+ const headers = {};
2304
+ const queryParameters = {};
2305
+ const request = {
2306
+ method: 'GET',
2307
+ path: requestPath,
2308
+ queryParameters,
2309
+ headers,
2310
+ };
2311
+ return transporter.request(request, requestOptions);
2312
+ },
2313
+ /**
2314
+ * Fetch a synonym object identified by its objectID.
2315
+ *
2316
+ * @summary Get synonym.
2317
+ * @param getSynonym - The getSynonym object.
2318
+ * @param getSynonym.indexName - The index in which to perform the request.
2319
+ * @param getSynonym.objectID - Unique identifier of an object.
2320
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2321
+ */
2322
+ getSynonym({ indexName, objectID }, requestOptions) {
2323
+ if (!indexName) {
2324
+ throw new Error('Parameter `indexName` is required when calling `getSynonym`.');
2325
+ }
2326
+ if (!objectID) {
2327
+ throw new Error('Parameter `objectID` is required when calling `getSynonym`.');
2328
+ }
2329
+ const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}'
2330
+ .replace('{indexName}', encodeURIComponent(indexName))
2331
+ .replace('{objectID}', encodeURIComponent(objectID));
2332
+ const headers = {};
2333
+ const queryParameters = {};
2334
+ const request = {
2335
+ method: 'GET',
2336
+ path: requestPath,
2337
+ queryParameters,
2338
+ headers,
2339
+ };
2340
+ return transporter.request(request, requestOptions);
2341
+ },
2342
+ /**
2343
+ * Check the current status of a given task.
2344
+ *
2345
+ * @summary Check the status of a task.
2346
+ * @param getTask - The getTask object.
2347
+ * @param getTask.indexName - The index in which to perform the request.
2348
+ * @param getTask.taskID - Unique identifier of an task. Numeric value (up to 64bits).
2349
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2350
+ */
2351
+ getTask({ indexName, taskID }, requestOptions) {
2352
+ if (!indexName) {
2353
+ throw new Error('Parameter `indexName` is required when calling `getTask`.');
2354
+ }
2355
+ if (!taskID) {
2356
+ throw new Error('Parameter `taskID` is required when calling `getTask`.');
2357
+ }
2358
+ const requestPath = '/1/indexes/{indexName}/task/{taskID}'
2359
+ .replace('{indexName}', encodeURIComponent(indexName))
2360
+ .replace('{taskID}', encodeURIComponent(taskID));
2361
+ const headers = {};
2362
+ const queryParameters = {};
2363
+ const request = {
2364
+ method: 'GET',
2365
+ path: requestPath,
2366
+ queryParameters,
2367
+ headers,
2368
+ };
2369
+ return transporter.request(request, requestOptions);
2370
+ },
2371
+ /**
2372
+ * Get the top 10 userIDs with the highest number of records per cluster. The data returned will usually be a few seconds behind real time, because userID usage may take up to a few seconds to propagate to the different clusters. Upon success, the response is 200 OK and contains the following array of userIDs and clusters.
2373
+ *
2374
+ * @summary Get top userID.
2375
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2376
+ */
2377
+ getTopUserIds(requestOptions) {
2378
+ const requestPath = '/1/clusters/mapping/top';
2379
+ const headers = {};
2380
+ const queryParameters = {};
2381
+ const request = {
2382
+ method: 'GET',
2383
+ path: requestPath,
2384
+ queryParameters,
2385
+ headers,
2386
+ };
2387
+ return transporter.request(request, requestOptions);
2388
+ },
2389
+ /**
2390
+ * Returns the userID data stored in the mapping. The data returned will usually be a few seconds behind real time, because userID usage may take up to a few seconds to propagate to the different clusters. Upon success, the response is 200 OK and contains the following userID data.
2391
+ *
2392
+ * @summary Get userID.
2393
+ * @param getUserId - The getUserId object.
2394
+ * @param getUserId.userID - UserID to assign.
2395
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2396
+ */
2397
+ getUserId({ userID }, requestOptions) {
2398
+ if (!userID) {
2399
+ throw new Error('Parameter `userID` is required when calling `getUserId`.');
2400
+ }
2401
+ const requestPath = '/1/clusters/mapping/{userID}'.replace('{userID}', encodeURIComponent(userID));
2402
+ const headers = {};
2403
+ const queryParameters = {};
2404
+ const request = {
2405
+ method: 'GET',
2406
+ path: requestPath,
2407
+ queryParameters,
2408
+ headers,
2409
+ };
2410
+ return transporter.request(request, requestOptions);
2411
+ },
2412
+ /**
2413
+ * Get the status of your clusters\' migrations or user creations. Creating a large batch of users or migrating your multi-cluster may take quite some time. This method lets you retrieve the status of the migration, so you can know when it\'s done. Upon success, the response is 200 OK. A successful response indicates that the operation has been taken into account, and the userIDs are directly usable.
2414
+ *
2415
+ * @summary Get migration status.
2416
+ * @param hasPendingMappings - The hasPendingMappings object.
2417
+ * @param hasPendingMappings.getClusters - If the clusters pending mapping state should be on the response.
2418
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2419
+ */
2420
+ hasPendingMappings({ getClusters }, requestOptions) {
2421
+ const requestPath = '/1/clusters/mapping/pending';
2422
+ const headers = {};
2423
+ const queryParameters = {};
2424
+ if (getClusters !== undefined) {
2425
+ queryParameters.getClusters = getClusters.toString();
2426
+ }
2427
+ const request = {
2428
+ method: 'GET',
2429
+ path: requestPath,
2430
+ queryParameters,
2431
+ headers,
2432
+ };
2433
+ return transporter.request(request, requestOptions);
2434
+ },
2435
+ /**
2436
+ * List API keys, along with their associated rights.
2437
+ *
2438
+ * @summary List API Keys.
2439
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2440
+ */
2441
+ listApiKeys(requestOptions) {
2442
+ const requestPath = '/1/keys';
2443
+ const headers = {};
2444
+ const queryParameters = {};
2445
+ const request = {
2446
+ method: 'GET',
2447
+ path: requestPath,
2448
+ queryParameters,
2449
+ headers,
2450
+ };
2451
+ return transporter.request(request, requestOptions);
2452
+ },
2453
+ /**
2454
+ * List the clusters available in a multi-clusters setup for a single appID. Upon success, the response is 200 OK and contains the following clusters.
2455
+ *
2456
+ * @summary List clusters.
2457
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2458
+ */
2459
+ listClusters(requestOptions) {
2460
+ const requestPath = '/1/clusters';
2461
+ const headers = {};
2462
+ const queryParameters = {};
2463
+ const request = {
2464
+ method: 'GET',
2465
+ path: requestPath,
2466
+ queryParameters,
2467
+ headers,
2468
+ };
2469
+ return transporter.request(request, requestOptions);
2470
+ },
2471
+ /**
2472
+ * List existing indexes from an application.
2473
+ *
2474
+ * @summary List existing indexes.
2475
+ * @param listIndices - The listIndices object.
2476
+ * @param listIndices.page - Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination).
2477
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2478
+ */
2479
+ listIndices({ page }, requestOptions) {
2480
+ const requestPath = '/1/indexes';
2481
+ const headers = {};
2482
+ const queryParameters = {};
2483
+ if (page !== undefined) {
2484
+ queryParameters.page = page.toString();
2485
+ }
2486
+ const request = {
2487
+ method: 'GET',
2488
+ path: requestPath,
2489
+ queryParameters,
2490
+ headers,
2491
+ };
2492
+ return transporter.request(request, requestOptions);
2493
+ },
2494
+ /**
2495
+ * List the userIDs assigned to a multi-clusters appID. The data returned will usually be a few seconds behind real time, because userID usage may take up to a few seconds to propagate to the different clusters. Upon success, the response is 200 OK and contains the following userIDs data.
2496
+ *
2497
+ * @summary List userIDs.
2498
+ * @param listUserIds - The listUserIds object.
2499
+ * @param listUserIds.page - Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination).
2500
+ * @param listUserIds.hitsPerPage - Maximum number of objects to retrieve.
2501
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2502
+ */
2503
+ listUserIds({ page, hitsPerPage }, requestOptions) {
2504
+ const requestPath = '/1/clusters/mapping';
2505
+ const headers = {};
2506
+ const queryParameters = {};
2507
+ if (page !== undefined) {
2508
+ queryParameters.page = page.toString();
2509
+ }
2510
+ if (hitsPerPage !== undefined) {
2511
+ queryParameters.hitsPerPage = hitsPerPage.toString();
2512
+ }
2513
+ const request = {
2514
+ method: 'GET',
2515
+ path: requestPath,
2516
+ queryParameters,
2517
+ headers,
2518
+ };
2519
+ return transporter.request(request, requestOptions);
2520
+ },
2521
+ /**
2522
+ * Perform multiple write operations, potentially targeting multiple indices, in a single API call.
2523
+ *
2524
+ * @summary Batch operations to many indices.
2525
+ * @param batchParams - The batchParams object.
2526
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2527
+ */
2528
+ multipleBatch(batchParams, requestOptions) {
2529
+ if (!batchParams) {
2530
+ throw new Error('Parameter `batchParams` is required when calling `multipleBatch`.');
2531
+ }
2532
+ const requestPath = '/1/indexes/*/batch';
2533
+ const headers = {};
2534
+ const queryParameters = {};
2535
+ const request = {
2536
+ method: 'POST',
2537
+ path: requestPath,
2538
+ queryParameters,
2539
+ headers,
2540
+ data: batchParams,
2541
+ };
2542
+ return transporter.request(request, requestOptions);
2543
+ },
2544
+ /**
2545
+ * Performs a copy or a move operation on a index.
2546
+ *
2547
+ * @summary Copy/move index.
2548
+ * @param operationIndex - The operationIndex object.
2549
+ * @param operationIndex.indexName - The index in which to perform the request.
2550
+ * @param operationIndex.operationIndexParams - The operationIndexParams object.
2551
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2552
+ */
2553
+ operationIndex({ indexName, operationIndexParams }, requestOptions) {
2554
+ if (!indexName) {
2555
+ throw new Error('Parameter `indexName` is required when calling `operationIndex`.');
2556
+ }
2557
+ if (!operationIndexParams) {
2558
+ throw new Error('Parameter `operationIndexParams` is required when calling `operationIndex`.');
2559
+ }
2560
+ if (!operationIndexParams.operation) {
2561
+ throw new Error('Parameter `operationIndexParams.operation` is required when calling `operationIndex`.');
2562
+ }
2563
+ if (!operationIndexParams.destination) {
2564
+ throw new Error('Parameter `operationIndexParams.destination` is required when calling `operationIndex`.');
2565
+ }
2566
+ const requestPath = '/1/indexes/{indexName}/operation'.replace('{indexName}', encodeURIComponent(indexName));
2567
+ const headers = {};
2568
+ const queryParameters = {};
2569
+ const request = {
2570
+ method: 'POST',
2571
+ path: requestPath,
2572
+ queryParameters,
2573
+ headers,
2574
+ data: operationIndexParams,
2575
+ };
2576
+ return transporter.request(request, requestOptions);
2577
+ },
2578
+ /**
2579
+ * Update one or more attributes of an existing object. This method lets you update only a part of an existing object, either by adding new attributes or updating existing ones. You can partially update several objects in a single method call. If the index targeted by this operation doesn\'t exist yet, it\'s automatically created.
2580
+ *
2581
+ * @summary Partially update an object.
2582
+ * @param partialUpdateObject - The partialUpdateObject object.
2583
+ * @param partialUpdateObject.indexName - The index in which to perform the request.
2584
+ * @param partialUpdateObject.objectID - Unique identifier of an object.
2585
+ * @param partialUpdateObject.attributeOrBuiltInOperation - List of attributes to update.
2586
+ * @param partialUpdateObject.createIfNotExists - Creates the record if it does not exist yet.
2587
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2588
+ */
2589
+ partialUpdateObject({ indexName, objectID, attributeOrBuiltInOperation, createIfNotExists, }, requestOptions) {
2590
+ if (!indexName) {
2591
+ throw new Error('Parameter `indexName` is required when calling `partialUpdateObject`.');
2592
+ }
2593
+ if (!objectID) {
2594
+ throw new Error('Parameter `objectID` is required when calling `partialUpdateObject`.');
2595
+ }
2596
+ if (!attributeOrBuiltInOperation) {
2597
+ throw new Error('Parameter `attributeOrBuiltInOperation` is required when calling `partialUpdateObject`.');
2598
+ }
2599
+ const requestPath = '/1/indexes/{indexName}/{objectID}/partial'
2600
+ .replace('{indexName}', encodeURIComponent(indexName))
2601
+ .replace('{objectID}', encodeURIComponent(objectID));
2602
+ const headers = {};
2603
+ const queryParameters = {};
2604
+ if (createIfNotExists !== undefined) {
2605
+ queryParameters.createIfNotExists = createIfNotExists.toString();
2606
+ }
2607
+ const request = {
2608
+ method: 'POST',
2609
+ path: requestPath,
2610
+ queryParameters,
2611
+ headers,
2612
+ data: attributeOrBuiltInOperation,
2613
+ };
2614
+ return transporter.request(request, requestOptions);
2615
+ },
2616
+ /**
2617
+ * This method allow you to send requests to the Algolia REST API.
2618
+ *
2619
+ * @summary Send requests to the Algolia REST API.
2620
+ * @param post - The post object.
2621
+ * @param post.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
2622
+ * @param post.parameters - Query parameters to be applied to the current query.
2623
+ * @param post.body - The parameters to send with the custom request.
2624
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2625
+ */
2626
+ post({ path, parameters, body }, requestOptions) {
2627
+ if (!path) {
2628
+ throw new Error('Parameter `path` is required when calling `post`.');
2629
+ }
2630
+ const requestPath = '/1{path}'.replace('{path}', path);
2631
+ const headers = {};
2632
+ const queryParameters = parameters ? parameters : {};
2633
+ const request = {
2634
+ method: 'POST',
2635
+ path: requestPath,
2636
+ queryParameters,
2637
+ headers,
2638
+ data: body ? body : {},
2639
+ };
2640
+ return transporter.request(request, requestOptions);
2641
+ },
2642
+ /**
2643
+ * This method allow you to send requests to the Algolia REST API.
2644
+ *
2645
+ * @summary Send requests to the Algolia REST API.
2646
+ * @param put - The put object.
2647
+ * @param put.path - The path of the API endpoint to target, anything after the /1 needs to be specified.
2648
+ * @param put.parameters - Query parameters to be applied to the current query.
2649
+ * @param put.body - The parameters to send with the custom request.
2650
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2651
+ */
2652
+ put({ path, parameters, body }, requestOptions) {
2653
+ if (!path) {
2654
+ throw new Error('Parameter `path` is required when calling `put`.');
2655
+ }
2656
+ const requestPath = '/1{path}'.replace('{path}', path);
2657
+ const headers = {};
2658
+ const queryParameters = parameters ? parameters : {};
2659
+ const request = {
2660
+ method: 'PUT',
2661
+ path: requestPath,
2662
+ queryParameters,
2663
+ headers,
2664
+ data: body ? body : {},
2665
+ };
2666
+ return transporter.request(request, requestOptions);
2667
+ },
2668
+ /**
2669
+ * Remove a userID and its associated data from the multi-clusters. Upon success, the response is 200 OK and a task is created to remove the userID data and mapping.
2670
+ *
2671
+ * @summary Remove userID.
2672
+ * @param removeUserId - The removeUserId object.
2673
+ * @param removeUserId.userID - UserID to assign.
2674
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2675
+ */
2676
+ removeUserId({ userID }, requestOptions) {
2677
+ if (!userID) {
2678
+ throw new Error('Parameter `userID` is required when calling `removeUserId`.');
2679
+ }
2680
+ const requestPath = '/1/clusters/mapping/{userID}'.replace('{userID}', encodeURIComponent(userID));
2681
+ const headers = {};
2682
+ const queryParameters = {};
2683
+ const request = {
2684
+ method: 'DELETE',
2685
+ path: requestPath,
2686
+ queryParameters,
2687
+ headers,
2688
+ };
2689
+ return transporter.request(request, requestOptions);
2690
+ },
2691
+ /**
2692
+ * Replace all allowed sources.
2693
+ *
2694
+ * @summary Replace all allowed sources.
2695
+ * @param replaceSources - The replaceSources object.
2696
+ * @param replaceSources.source - The sources to allow.
2697
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2698
+ */
2699
+ replaceSources({ source }, requestOptions) {
2700
+ if (!source) {
2701
+ throw new Error('Parameter `source` is required when calling `replaceSources`.');
2702
+ }
2703
+ const requestPath = '/1/security/sources';
2704
+ const headers = {};
2705
+ const queryParameters = {};
2706
+ const request = {
2707
+ method: 'PUT',
2708
+ path: requestPath,
2709
+ queryParameters,
2710
+ headers,
2711
+ data: source,
2712
+ };
2713
+ return transporter.request(request, requestOptions);
2714
+ },
2715
+ /**
2716
+ * Restore a deleted API key, along with its associated rights.
2717
+ *
2718
+ * @summary Restore an API key.
2719
+ * @param restoreApiKey - The restoreApiKey object.
2720
+ * @param restoreApiKey.key - API Key string.
2721
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2722
+ */
2723
+ restoreApiKey({ key }, requestOptions) {
2724
+ if (!key) {
2725
+ throw new Error('Parameter `key` is required when calling `restoreApiKey`.');
2726
+ }
2727
+ const requestPath = '/1/keys/{key}/restore'.replace('{key}', encodeURIComponent(key));
2728
+ const headers = {};
2729
+ const queryParameters = {};
2730
+ const request = {
2731
+ method: 'POST',
2732
+ path: requestPath,
2733
+ queryParameters,
2734
+ headers,
2735
+ };
2736
+ return transporter.request(request, requestOptions);
2737
+ },
2738
+ /**
2739
+ * Add an object to the index, automatically assigning it an object ID.
2740
+ *
2741
+ * @summary Add an object to the index.
2742
+ * @param saveObject - The saveObject object.
2743
+ * @param saveObject.indexName - The index in which to perform the request.
2744
+ * @param saveObject.body - The Algolia record.
2745
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2746
+ */
2747
+ saveObject({ indexName, body }, requestOptions) {
2748
+ if (!indexName) {
2749
+ throw new Error('Parameter `indexName` is required when calling `saveObject`.');
2750
+ }
2751
+ if (!body) {
2752
+ throw new Error('Parameter `body` is required when calling `saveObject`.');
2753
+ }
2754
+ const requestPath = '/1/indexes/{indexName}'.replace('{indexName}', encodeURIComponent(indexName));
2755
+ const headers = {};
2756
+ const queryParameters = {};
2757
+ const request = {
2758
+ method: 'POST',
2759
+ path: requestPath,
2760
+ queryParameters,
2761
+ headers,
2762
+ data: body,
2763
+ };
2764
+ return transporter.request(request, requestOptions);
2765
+ },
2766
+ /**
2767
+ * Create or update the Rule with the specified objectID.
2768
+ *
2769
+ * @summary Save/Update a rule.
2770
+ * @param saveRule - The saveRule object.
2771
+ * @param saveRule.indexName - The index in which to perform the request.
2772
+ * @param saveRule.objectID - Unique identifier of an object.
2773
+ * @param saveRule.rule - The rule object.
2774
+ * @param saveRule.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2775
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2776
+ */
2777
+ saveRule({ indexName, objectID, rule, forwardToReplicas }, requestOptions) {
2778
+ if (!indexName) {
2779
+ throw new Error('Parameter `indexName` is required when calling `saveRule`.');
2780
+ }
2781
+ if (!objectID) {
2782
+ throw new Error('Parameter `objectID` is required when calling `saveRule`.');
2783
+ }
2784
+ if (!rule) {
2785
+ throw new Error('Parameter `rule` is required when calling `saveRule`.');
2786
+ }
2787
+ if (!rule.objectID) {
2788
+ throw new Error('Parameter `rule.objectID` is required when calling `saveRule`.');
2789
+ }
2790
+ const requestPath = '/1/indexes/{indexName}/rules/{objectID}'
2791
+ .replace('{indexName}', encodeURIComponent(indexName))
2792
+ .replace('{objectID}', encodeURIComponent(objectID));
2793
+ const headers = {};
2794
+ const queryParameters = {};
2795
+ if (forwardToReplicas !== undefined) {
2796
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2797
+ }
2798
+ const request = {
2799
+ method: 'PUT',
2800
+ path: requestPath,
2801
+ queryParameters,
2802
+ headers,
2803
+ data: rule,
2804
+ };
2805
+ return transporter.request(request, requestOptions);
2806
+ },
2807
+ /**
2808
+ * Create/update multiple rules objects at once.
2809
+ *
2810
+ * @summary Save a batch of rules.
2811
+ * @param saveRules - The saveRules object.
2812
+ * @param saveRules.indexName - The index in which to perform the request.
2813
+ * @param saveRules.rule - The rule object.
2814
+ * @param saveRules.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2815
+ * @param saveRules.clearExistingRules - When true, existing Rules are cleared before adding this batch. When false, existing Rules are kept.
2816
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2817
+ */
2818
+ saveRules({ indexName, rule, forwardToReplicas, clearExistingRules, }, requestOptions) {
2819
+ if (!indexName) {
2820
+ throw new Error('Parameter `indexName` is required when calling `saveRules`.');
2821
+ }
2822
+ if (!rule) {
2823
+ throw new Error('Parameter `rule` is required when calling `saveRules`.');
2824
+ }
2825
+ const requestPath = '/1/indexes/{indexName}/rules/batch'.replace('{indexName}', encodeURIComponent(indexName));
2826
+ const headers = {};
2827
+ const queryParameters = {};
2828
+ if (forwardToReplicas !== undefined) {
2829
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2830
+ }
2831
+ if (clearExistingRules !== undefined) {
2832
+ queryParameters.clearExistingRules = clearExistingRules.toString();
2833
+ }
2834
+ const request = {
2835
+ method: 'POST',
2836
+ path: requestPath,
2837
+ queryParameters,
2838
+ headers,
2839
+ data: rule,
2840
+ };
2841
+ return transporter.request(request, requestOptions);
2842
+ },
2843
+ /**
2844
+ * Create a new synonym object or update the existing synonym object with the given object ID.
2845
+ *
2846
+ * @summary Save synonym.
2847
+ * @param saveSynonym - The saveSynonym object.
2848
+ * @param saveSynonym.indexName - The index in which to perform the request.
2849
+ * @param saveSynonym.objectID - Unique identifier of an object.
2850
+ * @param saveSynonym.synonymHit - The synonymHit object.
2851
+ * @param saveSynonym.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2852
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2853
+ */
2854
+ saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }, requestOptions) {
2855
+ if (!indexName) {
2856
+ throw new Error('Parameter `indexName` is required when calling `saveSynonym`.');
2857
+ }
2858
+ if (!objectID) {
2859
+ throw new Error('Parameter `objectID` is required when calling `saveSynonym`.');
2860
+ }
2861
+ if (!synonymHit) {
2862
+ throw new Error('Parameter `synonymHit` is required when calling `saveSynonym`.');
2863
+ }
2864
+ if (!synonymHit.objectID) {
2865
+ throw new Error('Parameter `synonymHit.objectID` is required when calling `saveSynonym`.');
2866
+ }
2867
+ const requestPath = '/1/indexes/{indexName}/synonyms/{objectID}'
2868
+ .replace('{indexName}', encodeURIComponent(indexName))
2869
+ .replace('{objectID}', encodeURIComponent(objectID));
2870
+ const headers = {};
2871
+ const queryParameters = {};
2872
+ if (forwardToReplicas !== undefined) {
2873
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2874
+ }
2875
+ const request = {
2876
+ method: 'PUT',
2877
+ path: requestPath,
2878
+ queryParameters,
2879
+ headers,
2880
+ data: synonymHit,
2881
+ };
2882
+ return transporter.request(request, requestOptions);
2883
+ },
2884
+ /**
2885
+ * Create/update multiple synonym objects at once, potentially replacing the entire list of synonyms if replaceExistingSynonyms is true.
2886
+ *
2887
+ * @summary Save a batch of synonyms.
2888
+ * @param saveSynonyms - The saveSynonyms object.
2889
+ * @param saveSynonyms.indexName - The index in which to perform the request.
2890
+ * @param saveSynonyms.synonymHit - The synonymHit object.
2891
+ * @param saveSynonyms.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
2892
+ * @param saveSynonyms.replaceExistingSynonyms - Replace all synonyms of the index with the ones sent with this request.
2893
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2894
+ */
2895
+ saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }, requestOptions) {
2896
+ if (!indexName) {
2897
+ throw new Error('Parameter `indexName` is required when calling `saveSynonyms`.');
2898
+ }
2899
+ if (!synonymHit) {
2900
+ throw new Error('Parameter `synonymHit` is required when calling `saveSynonyms`.');
2901
+ }
2902
+ const requestPath = '/1/indexes/{indexName}/synonyms/batch'.replace('{indexName}', encodeURIComponent(indexName));
2903
+ const headers = {};
2904
+ const queryParameters = {};
2905
+ if (forwardToReplicas !== undefined) {
2906
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
2907
+ }
2908
+ if (replaceExistingSynonyms !== undefined) {
2909
+ queryParameters.replaceExistingSynonyms =
2910
+ replaceExistingSynonyms.toString();
2911
+ }
2912
+ const request = {
2913
+ method: 'POST',
2914
+ path: requestPath,
2915
+ queryParameters,
2916
+ headers,
2917
+ data: synonymHit,
2918
+ };
2919
+ return transporter.request(request, requestOptions);
2920
+ },
2921
+ /**
2922
+ * Perform a search operation targeting one or many indices.
2923
+ *
2924
+ * @summary Search multiple indices.
2925
+ * @param searchMethodParams - The `search` requests and strategy.
2926
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2927
+ */
2928
+ search(searchMethodParams, requestOptions) {
2929
+ if (searchMethodParams && Array.isArray(searchMethodParams)) {
2930
+ const newSignatureRequest = {
2931
+ requests: searchMethodParams.map(({ params, ...legacyRequest }) => {
2932
+ if (legacyRequest.type === 'facet') {
2933
+ return {
2934
+ ...legacyRequest,
2935
+ ...params,
2936
+ type: 'facet',
2937
+ };
2938
+ }
2939
+ return {
2940
+ ...legacyRequest,
2941
+ ...params,
2942
+ facet: undefined,
2943
+ maxFacetHits: undefined,
2944
+ facetQuery: undefined,
2945
+ };
2946
+ }),
2947
+ };
2948
+ // eslint-disable-next-line no-param-reassign
2949
+ searchMethodParams = newSignatureRequest;
2950
+ }
2951
+ if (!searchMethodParams) {
2952
+ throw new Error('Parameter `searchMethodParams` is required when calling `search`.');
2953
+ }
2954
+ if (!searchMethodParams.requests) {
2955
+ throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.');
2956
+ }
2957
+ const requestPath = '/1/indexes/*/queries';
2958
+ const headers = {};
2959
+ const queryParameters = {};
2960
+ const request = {
2961
+ method: 'POST',
2962
+ path: requestPath,
2963
+ queryParameters,
2964
+ headers,
2965
+ data: searchMethodParams,
2966
+ useReadTransporter: true,
2967
+ cacheable: true,
2968
+ };
2969
+ return transporter.request(request, requestOptions);
2970
+ },
2971
+ /**
2972
+ * Search the dictionary entries.
2973
+ *
2974
+ * @summary Search a dictionary entries.
2975
+ * @param searchDictionaryEntries - The searchDictionaryEntries object.
2976
+ * @param searchDictionaryEntries.dictionaryName - The dictionary to search in.
2977
+ * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
2978
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2979
+ */
2980
+ searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }, requestOptions) {
2981
+ if (!dictionaryName) {
2982
+ throw new Error('Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.');
2983
+ }
2984
+ if (!searchDictionaryEntriesParams) {
2985
+ throw new Error('Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.');
2986
+ }
2987
+ if (!searchDictionaryEntriesParams.query) {
2988
+ throw new Error('Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.');
2989
+ }
2990
+ const requestPath = '/1/dictionaries/{dictionaryName}/search'.replace('{dictionaryName}', encodeURIComponent(dictionaryName));
2991
+ const headers = {};
2992
+ const queryParameters = {};
2993
+ const request = {
2994
+ method: 'POST',
2995
+ path: requestPath,
2996
+ queryParameters,
2997
+ headers,
2998
+ data: searchDictionaryEntriesParams,
2999
+ useReadTransporter: true,
3000
+ cacheable: true,
3001
+ };
3002
+ return transporter.request(request, requestOptions);
3003
+ },
3004
+ /**
3005
+ * Search for values of a given facet, optionally restricting the returned values to those contained in objects matching other search criteria.
3006
+ *
3007
+ * @summary Search for values of a given facet.
3008
+ * @param searchForFacetValues - The searchForFacetValues object.
3009
+ * @param searchForFacetValues.indexName - The index in which to perform the request.
3010
+ * @param searchForFacetValues.facetName - The facet name.
3011
+ * @param searchForFacetValues.searchForFacetValuesRequest - The searchForFacetValuesRequest object.
3012
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3013
+ */
3014
+ searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }, requestOptions) {
3015
+ if (!indexName) {
3016
+ throw new Error('Parameter `indexName` is required when calling `searchForFacetValues`.');
3017
+ }
3018
+ if (!facetName) {
3019
+ throw new Error('Parameter `facetName` is required when calling `searchForFacetValues`.');
3020
+ }
3021
+ const requestPath = '/1/indexes/{indexName}/facets/{facetName}/query'
3022
+ .replace('{indexName}', encodeURIComponent(indexName))
3023
+ .replace('{facetName}', encodeURIComponent(facetName));
3024
+ const headers = {};
3025
+ const queryParameters = {};
3026
+ const request = {
3027
+ method: 'POST',
3028
+ path: requestPath,
3029
+ queryParameters,
3030
+ headers,
3031
+ data: searchForFacetValuesRequest ? searchForFacetValuesRequest : {},
3032
+ useReadTransporter: true,
3033
+ cacheable: true,
3034
+ };
3035
+ return transporter.request(request, requestOptions);
3036
+ },
3037
+ /**
3038
+ * Search for rules matching various criteria.
3039
+ *
3040
+ * @summary Search for rules.
3041
+ * @param searchRules - The searchRules object.
3042
+ * @param searchRules.indexName - The index in which to perform the request.
3043
+ * @param searchRules.searchRulesParams - The searchRulesParams object.
3044
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3045
+ */
3046
+ searchRules({ indexName, searchRulesParams }, requestOptions) {
3047
+ if (!indexName) {
3048
+ throw new Error('Parameter `indexName` is required when calling `searchRules`.');
3049
+ }
3050
+ if (!searchRulesParams) {
3051
+ throw new Error('Parameter `searchRulesParams` is required when calling `searchRules`.');
3052
+ }
3053
+ const requestPath = '/1/indexes/{indexName}/rules/search'.replace('{indexName}', encodeURIComponent(indexName));
3054
+ const headers = {};
3055
+ const queryParameters = {};
3056
+ const request = {
3057
+ method: 'POST',
3058
+ path: requestPath,
3059
+ queryParameters,
3060
+ headers,
3061
+ data: searchRulesParams,
3062
+ useReadTransporter: true,
3063
+ cacheable: true,
3064
+ };
3065
+ return transporter.request(request, requestOptions);
3066
+ },
3067
+ /**
3068
+ * Perform a search operation targeting one specific index.
3069
+ *
3070
+ * @summary Search in a single index.
3071
+ * @param searchSingleIndex - The searchSingleIndex object.
3072
+ * @param searchSingleIndex.indexName - The index in which to perform the request.
3073
+ * @param searchSingleIndex.searchParams - The searchParams object.
3074
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3075
+ */
3076
+ searchSingleIndex({ indexName, searchParams }, requestOptions) {
3077
+ if (!indexName) {
3078
+ throw new Error('Parameter `indexName` is required when calling `searchSingleIndex`.');
3079
+ }
3080
+ const requestPath = '/1/indexes/{indexName}/query'.replace('{indexName}', encodeURIComponent(indexName));
3081
+ const headers = {};
3082
+ const queryParameters = {};
3083
+ const request = {
3084
+ method: 'POST',
3085
+ path: requestPath,
3086
+ queryParameters,
3087
+ headers,
3088
+ data: searchParams ? searchParams : {},
3089
+ useReadTransporter: true,
3090
+ cacheable: true,
3091
+ };
3092
+ return transporter.request(request, requestOptions);
3093
+ },
3094
+ /**
3095
+ * Search or browse all synonyms, optionally filtering them by type.
3096
+ *
3097
+ * @summary Search synonyms.
3098
+ * @param searchSynonyms - The searchSynonyms object.
3099
+ * @param searchSynonyms.indexName - The index in which to perform the request.
3100
+ * @param searchSynonyms.type - Only search for specific types of synonyms.
3101
+ * @param searchSynonyms.page - Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination).
3102
+ * @param searchSynonyms.hitsPerPage - Maximum number of objects to retrieve.
3103
+ * @param searchSynonyms.searchSynonymsParams - The body of the the `searchSynonyms` method.
3104
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3105
+ */
3106
+ searchSynonyms({ indexName, type, page, hitsPerPage, searchSynonymsParams, }, requestOptions) {
3107
+ if (!indexName) {
3108
+ throw new Error('Parameter `indexName` is required when calling `searchSynonyms`.');
3109
+ }
3110
+ const requestPath = '/1/indexes/{indexName}/synonyms/search'.replace('{indexName}', encodeURIComponent(indexName));
3111
+ const headers = {};
3112
+ const queryParameters = {};
3113
+ if (type !== undefined) {
3114
+ queryParameters.type = type.toString();
3115
+ }
3116
+ if (page !== undefined) {
3117
+ queryParameters.page = page.toString();
3118
+ }
3119
+ if (hitsPerPage !== undefined) {
3120
+ queryParameters.hitsPerPage = hitsPerPage.toString();
3121
+ }
3122
+ const request = {
3123
+ method: 'POST',
3124
+ path: requestPath,
3125
+ queryParameters,
3126
+ headers,
3127
+ data: searchSynonymsParams ? searchSynonymsParams : {},
3128
+ useReadTransporter: true,
3129
+ cacheable: true,
3130
+ };
3131
+ return transporter.request(request, requestOptions);
3132
+ },
3133
+ /**
3134
+ * Search for userIDs. The data returned will usually be a few seconds behind real time, because userID usage may take up to a few seconds propagate to the different clusters. To keep updates moving quickly, the index of userIDs isn\'t built synchronously with the mapping. Instead, the index is built once every 12h, at the same time as the update of userID usage. For example, when you perform a modification like adding or moving a userID, the search will report an outdated value until the next rebuild of the mapping, which takes place every 12h. Upon success, the response is 200 OK and contains the following userIDs data.
3135
+ *
3136
+ * @summary Search userID.
3137
+ * @param searchUserIdsParams - The searchUserIdsParams object.
3138
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3139
+ */
3140
+ searchUserIds(searchUserIdsParams, requestOptions) {
3141
+ if (!searchUserIdsParams) {
3142
+ throw new Error('Parameter `searchUserIdsParams` is required when calling `searchUserIds`.');
3143
+ }
3144
+ if (!searchUserIdsParams.query) {
3145
+ throw new Error('Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.');
3146
+ }
3147
+ const requestPath = '/1/clusters/mapping/search';
3148
+ const headers = {};
3149
+ const queryParameters = {};
3150
+ const request = {
3151
+ method: 'POST',
3152
+ path: requestPath,
3153
+ queryParameters,
3154
+ headers,
3155
+ data: searchUserIdsParams,
3156
+ useReadTransporter: true,
3157
+ cacheable: true,
3158
+ };
3159
+ return transporter.request(request, requestOptions);
3160
+ },
3161
+ /**
3162
+ * Set dictionaries settings.
3163
+ *
3164
+ * @summary Set dictionaries settings.
3165
+ * @param dictionarySettingsParams - The dictionarySettingsParams object.
3166
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3167
+ */
3168
+ setDictionarySettings(dictionarySettingsParams, requestOptions) {
3169
+ if (!dictionarySettingsParams) {
3170
+ throw new Error('Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.');
3171
+ }
3172
+ if (!dictionarySettingsParams.disableStandardEntries) {
3173
+ throw new Error('Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.');
3174
+ }
3175
+ const requestPath = '/1/dictionaries/*/settings';
3176
+ const headers = {};
3177
+ const queryParameters = {};
3178
+ const request = {
3179
+ method: 'PUT',
3180
+ path: requestPath,
3181
+ queryParameters,
3182
+ headers,
3183
+ data: dictionarySettingsParams,
3184
+ };
3185
+ return transporter.request(request, requestOptions);
3186
+ },
3187
+ /**
3188
+ * Update settings of an index. Only specified settings are overridden; unspecified settings are left unchanged. Specifying null for a setting resets it to its default value.
3189
+ *
3190
+ * @summary Update settings of an index.
3191
+ * @param setSettings - The setSettings object.
3192
+ * @param setSettings.indexName - The index in which to perform the request.
3193
+ * @param setSettings.indexSettings - The indexSettings object.
3194
+ * @param setSettings.forwardToReplicas - When true, changes are also propagated to replicas of the given indexName.
3195
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3196
+ */
3197
+ setSettings({ indexName, indexSettings, forwardToReplicas }, requestOptions) {
3198
+ if (!indexName) {
3199
+ throw new Error('Parameter `indexName` is required when calling `setSettings`.');
3200
+ }
3201
+ if (!indexSettings) {
3202
+ throw new Error('Parameter `indexSettings` is required when calling `setSettings`.');
3203
+ }
3204
+ const requestPath = '/1/indexes/{indexName}/settings'.replace('{indexName}', encodeURIComponent(indexName));
3205
+ const headers = {};
3206
+ const queryParameters = {};
3207
+ if (forwardToReplicas !== undefined) {
3208
+ queryParameters.forwardToReplicas = forwardToReplicas.toString();
3209
+ }
3210
+ const request = {
3211
+ method: 'PUT',
3212
+ path: requestPath,
3213
+ queryParameters,
3214
+ headers,
3215
+ data: indexSettings,
3216
+ };
3217
+ return transporter.request(request, requestOptions);
3218
+ },
3219
+ /**
3220
+ * Replace every permission of an existing API key.
3221
+ *
3222
+ * @summary Update an API key.
3223
+ * @param updateApiKey - The updateApiKey object.
3224
+ * @param updateApiKey.key - API Key string.
3225
+ * @param updateApiKey.apiKey - The apiKey object.
3226
+ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3227
+ */
3228
+ updateApiKey({ key, apiKey }, requestOptions) {
3229
+ if (!key) {
3230
+ throw new Error('Parameter `key` is required when calling `updateApiKey`.');
3231
+ }
3232
+ if (!apiKey) {
3233
+ throw new Error('Parameter `apiKey` is required when calling `updateApiKey`.');
3234
+ }
3235
+ if (!apiKey.acl) {
3236
+ throw new Error('Parameter `apiKey.acl` is required when calling `updateApiKey`.');
3237
+ }
3238
+ const requestPath = '/1/keys/{key}'.replace('{key}', encodeURIComponent(key));
3239
+ const headers = {};
3240
+ const queryParameters = {};
3241
+ const request = {
3242
+ method: 'PUT',
3243
+ path: requestPath,
3244
+ queryParameters,
3245
+ headers,
3246
+ data: apiKey,
3247
+ };
3248
+ return transporter.request(request, requestOptions);
3249
+ },
3250
+ };
3251
+ }
3252
+
3253
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
3254
+ const apiClientVersion = apiClientVersion$1;
3255
+ // eslint-disable-next-line @typescript-eslint/explicit-function-return-type
3256
+ function algoliasearch(appId, apiKey, options) {
3257
+ if (!appId || typeof appId !== 'string') {
3258
+ throw new Error('`appId` is missing.');
3259
+ }
3260
+ if (!apiKey || typeof apiKey !== 'string') {
3261
+ throw new Error('`apiKey` is missing.');
3262
+ }
3263
+ const commonOptions = {
3264
+ apiKey,
3265
+ appId,
3266
+ timeouts: {
3267
+ connect: DEFAULT_CONNECT_TIMEOUT_NODE,
3268
+ read: DEFAULT_READ_TIMEOUT_NODE,
3269
+ write: DEFAULT_WRITE_TIMEOUT_NODE,
3270
+ },
3271
+ requester: createHttpRequester(),
3272
+ algoliaAgents: [{ segment: 'Node.js', version: process.versions.node }],
3273
+ responsesCache: createNullCache(),
3274
+ requestsCache: createNullCache(),
3275
+ hostsCache: createMemoryCache(),
3276
+ ...options,
3277
+ };
3278
+ function initAnalytics(initOptions = {}) {
3279
+ if (initOptions.region &&
3280
+ (typeof initOptions.region !== 'string' ||
3281
+ !REGIONS$1.includes(initOptions.region))) {
3282
+ throw new Error(`\`region\` must be one of the following: ${REGIONS$1.join(', ')}`);
3283
+ }
3284
+ return createAnalyticsClient({
3285
+ ...commonOptions,
3286
+ ...initOptions.options,
3287
+ ...initOptions,
3288
+ });
3289
+ }
3290
+ function initAbtesting(initOptions = {}) {
3291
+ if (initOptions.region &&
3292
+ (typeof initOptions.region !== 'string' ||
3293
+ !REGIONS$2.includes(initOptions.region))) {
3294
+ throw new Error(`\`region\` must be one of the following: ${REGIONS$2.join(', ')}`);
3295
+ }
3296
+ return createAbtestingClient({
3297
+ ...commonOptions,
3298
+ ...initOptions.options,
3299
+ ...initOptions,
3300
+ });
3301
+ }
3302
+ function initPersonalization(initOptions) {
3303
+ if (!initOptions.region) {
3304
+ throw new Error('`region` is missing.');
3305
+ }
3306
+ if (initOptions.region &&
3307
+ (typeof initOptions.region !== 'string' ||
3308
+ !REGIONS.includes(initOptions.region))) {
3309
+ throw new Error(`\`region\` must be one of the following: ${REGIONS.join(', ')}`);
3310
+ }
3311
+ return createPersonalizationClient({
3312
+ ...commonOptions,
3313
+ ...initOptions.options,
3314
+ ...initOptions,
3315
+ });
3316
+ }
3317
+ return {
3318
+ ...createSearchClient(commonOptions),
3319
+ /**
3320
+ * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
3321
+ */
3322
+ get _ua() {
3323
+ return this.transporter.algoliaAgent.value;
3324
+ },
3325
+ initAnalytics,
3326
+ initPersonalization,
3327
+ initAbtesting,
3328
+ };
3329
+ }
3330
+
3331
+ export { algoliasearch, apiClientVersion };