@algolia/client-search 5.0.0-alpha.2 → 5.0.0-alpha.20

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 (302) hide show
  1. package/dist/builds/browser.d.ts +2 -2
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +2 -2
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-search.cjs.js +163 -38
  6. package/dist/client-search.esm.browser.js +192 -67
  7. package/dist/client-search.esm.node.js +164 -39
  8. package/dist/client-search.umd.js +2 -2
  9. package/dist/model/acl.d.ts +3 -0
  10. package/dist/model/acl.d.ts.map +1 -1
  11. package/dist/model/action.d.ts.map +1 -1
  12. package/dist/model/addApiKeyResponse.d.ts +1 -1
  13. package/dist/model/addApiKeyResponse.d.ts.map +1 -1
  14. package/dist/model/advancedSyntaxFeatures.d.ts.map +1 -1
  15. package/dist/model/alternativesAsExact.d.ts.map +1 -1
  16. package/dist/model/anchoring.d.ts.map +1 -1
  17. package/dist/model/apiKey.d.ts.map +1 -1
  18. package/dist/model/aroundRadius.d.ts.map +1 -1
  19. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  20. package/dist/model/assignUserIdParams.d.ts.map +1 -1
  21. package/dist/model/attributeToUpdate.d.ts +3 -0
  22. package/dist/model/attributeToUpdate.d.ts.map +1 -0
  23. package/dist/model/automaticFacetFilter.d.ts.map +1 -1
  24. package/dist/model/automaticFacetFilters.d.ts.map +1 -1
  25. package/dist/model/baseGetApiKeyResponse.d.ts +11 -0
  26. package/dist/model/baseGetApiKeyResponse.d.ts.map +1 -0
  27. package/dist/model/baseIndexSettings.d.ts +4 -0
  28. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  29. package/dist/model/baseSearchParams.d.ts.map +1 -1
  30. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  31. package/dist/model/baseSearchResponse.d.ts +1 -1
  32. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  33. package/dist/model/batchAssignUserIdsParams.d.ts.map +1 -1
  34. package/dist/model/batchDictionaryEntriesParams.d.ts.map +1 -1
  35. package/dist/model/batchDictionaryEntriesRequest.d.ts.map +1 -1
  36. package/dist/model/batchParams.d.ts +2 -2
  37. package/dist/model/batchParams.d.ts.map +1 -1
  38. package/dist/model/batchRequest.d.ts +9 -0
  39. package/dist/model/batchRequest.d.ts.map +1 -0
  40. package/dist/model/batchResponse.d.ts.map +1 -1
  41. package/dist/model/batchWriteParams.d.ts +2 -2
  42. package/dist/model/batchWriteParams.d.ts.map +1 -1
  43. package/dist/model/browseParams.d.ts +4 -0
  44. package/dist/model/browseParams.d.ts.map +1 -0
  45. package/dist/model/browseParamsObject.d.ts +4 -0
  46. package/dist/model/browseParamsObject.d.ts.map +1 -0
  47. package/dist/model/browseResponse.d.ts +2 -2
  48. package/dist/model/browseResponse.d.ts.map +1 -1
  49. package/dist/model/builtInOperation.d.ts.map +1 -1
  50. package/dist/model/builtInOperationType.d.ts.map +1 -1
  51. package/dist/model/clientMethodProps.d.ts +26 -14
  52. package/dist/model/clientMethodProps.d.ts.map +1 -1
  53. package/dist/model/condition.d.ts.map +1 -1
  54. package/dist/model/consequence.d.ts.map +1 -1
  55. package/dist/model/consequenceHide.d.ts.map +1 -1
  56. package/dist/model/consequenceParams.d.ts.map +1 -1
  57. package/dist/model/consequenceQuery.d.ts.map +1 -1
  58. package/dist/model/consequenceQueryObject.d.ts.map +1 -1
  59. package/dist/model/createdAtResponse.d.ts.map +1 -1
  60. package/dist/model/{baseBrowseResponse.d.ts → cursor.d.ts} +3 -3
  61. package/dist/model/cursor.d.ts.map +1 -0
  62. package/dist/model/deleteApiKeyResponse.d.ts.map +1 -1
  63. package/dist/model/deleteByParams.d.ts +27 -0
  64. package/dist/model/deleteByParams.d.ts.map +1 -0
  65. package/dist/model/deleteSourceResponse.d.ts.map +1 -1
  66. package/dist/model/deletedAtResponse.d.ts.map +1 -1
  67. package/dist/model/dictionaryAction.d.ts.map +1 -1
  68. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  69. package/dist/model/dictionaryEntryState.d.ts.map +1 -1
  70. package/dist/model/dictionaryLanguage.d.ts.map +1 -1
  71. package/dist/model/dictionarySettingsParams.d.ts.map +1 -1
  72. package/dist/model/dictionaryType.d.ts.map +1 -1
  73. package/dist/model/distinct.d.ts +5 -0
  74. package/dist/model/distinct.d.ts.map +1 -0
  75. package/dist/model/edit.d.ts.map +1 -1
  76. package/dist/model/editType.d.ts.map +1 -1
  77. package/dist/model/errorBase.d.ts.map +1 -1
  78. package/dist/model/exactOnSingleWordQuery.d.ts.map +1 -1
  79. package/dist/model/facetFilters.d.ts.map +1 -1
  80. package/dist/model/facetHits.d.ts.map +1 -1
  81. package/dist/model/facetOrdering.d.ts.map +1 -1
  82. package/dist/model/facets.d.ts.map +1 -1
  83. package/dist/model/facetsStats.d.ts.map +1 -1
  84. package/dist/model/fetchedIndex.d.ts.map +1 -1
  85. package/dist/model/getApiKeyResponse.d.ts +4 -0
  86. package/dist/model/getApiKeyResponse.d.ts.map +1 -0
  87. package/dist/model/getDictionarySettingsResponse.d.ts.map +1 -1
  88. package/dist/model/getLogsResponse.d.ts.map +1 -1
  89. package/dist/model/getObjectsParams.d.ts +2 -2
  90. package/dist/model/getObjectsParams.d.ts.map +1 -1
  91. package/dist/model/{multipleGetObjectsParams.d.ts → getObjectsRequest.d.ts} +2 -2
  92. package/dist/model/getObjectsRequest.d.ts.map +1 -0
  93. package/dist/model/getObjectsResponse.d.ts +2 -2
  94. package/dist/model/getObjectsResponse.d.ts.map +1 -1
  95. package/dist/model/getTaskResponse.d.ts.map +1 -1
  96. package/dist/model/getTopUserIdsResponse.d.ts.map +1 -1
  97. package/dist/model/hasPendingMappingsResponse.d.ts.map +1 -1
  98. package/dist/model/highlightResult.d.ts.map +1 -1
  99. package/dist/model/highlightResultOption.d.ts.map +1 -1
  100. package/dist/model/hit.d.ts +1 -1
  101. package/dist/model/hit.d.ts.map +1 -1
  102. package/dist/model/ignorePlurals.d.ts.map +1 -1
  103. package/dist/model/index.d.ts +11 -9
  104. package/dist/model/index.d.ts.map +1 -1
  105. package/dist/model/indexSettings.d.ts.map +1 -1
  106. package/dist/model/indexSettingsAsSearchParams.d.ts +4 -6
  107. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  108. package/dist/model/languages.d.ts.map +1 -1
  109. package/dist/model/listApiKeysResponse.d.ts +2 -2
  110. package/dist/model/listApiKeysResponse.d.ts.map +1 -1
  111. package/dist/model/listClustersResponse.d.ts.map +1 -1
  112. package/dist/model/listIndicesResponse.d.ts +1 -1
  113. package/dist/model/listIndicesResponse.d.ts.map +1 -1
  114. package/dist/model/listUserIdsResponse.d.ts.map +1 -1
  115. package/dist/model/log.d.ts.map +1 -1
  116. package/dist/model/logQuery.d.ts.map +1 -1
  117. package/dist/model/logType.d.ts.map +1 -1
  118. package/dist/model/matchLevel.d.ts.map +1 -1
  119. package/dist/model/matchedGeoLocation.d.ts.map +1 -1
  120. package/dist/model/mixedSearchFilters.d.ts.map +1 -1
  121. package/dist/model/{multipleBatchOperation.d.ts → multipleBatchRequest.d.ts} +5 -5
  122. package/dist/model/multipleBatchRequest.d.ts.map +1 -0
  123. package/dist/model/multipleBatchResponse.d.ts +2 -2
  124. package/dist/model/multipleBatchResponse.d.ts.map +1 -1
  125. package/dist/model/numericFilters.d.ts.map +1 -1
  126. package/dist/model/operationIndexParams.d.ts.map +1 -1
  127. package/dist/model/operationType.d.ts.map +1 -1
  128. package/dist/model/optionalFilters.d.ts.map +1 -1
  129. package/dist/model/params.d.ts.map +1 -1
  130. package/dist/model/personalization.d.ts.map +1 -1
  131. package/dist/model/promote.d.ts.map +1 -1
  132. package/dist/model/promoteObjectID.d.ts.map +1 -1
  133. package/dist/model/promoteObjectIDs.d.ts.map +1 -1
  134. package/dist/model/queryType.d.ts.map +1 -1
  135. package/dist/model/rankingInfo.d.ts.map +1 -1
  136. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  137. package/dist/model/removeStopWords.d.ts.map +1 -1
  138. package/dist/model/removeUserIdResponse.d.ts.map +1 -1
  139. package/dist/model/removeWordsIfNoResults.d.ts.map +1 -1
  140. package/dist/model/renderingContent.d.ts.map +1 -1
  141. package/dist/model/replaceSourceResponse.d.ts.map +1 -1
  142. package/dist/model/rule.d.ts.map +1 -1
  143. package/dist/model/saveObjectResponse.d.ts +2 -2
  144. package/dist/model/saveObjectResponse.d.ts.map +1 -1
  145. package/dist/model/saveSynonymResponse.d.ts.map +1 -1
  146. package/dist/model/scopeType.d.ts.map +1 -1
  147. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  148. package/dist/model/searchForFacetValuesRequest.d.ts.map +1 -1
  149. package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
  150. package/dist/model/searchForFacets.d.ts.map +1 -1
  151. package/dist/model/searchForFacetsOptions.d.ts.map +1 -1
  152. package/dist/model/searchForHits.d.ts.map +1 -1
  153. package/dist/model/searchForHitsOptions.d.ts.map +1 -1
  154. package/dist/model/searchHits.d.ts +1 -1
  155. package/dist/model/searchHits.d.ts.map +1 -1
  156. package/dist/model/searchMethodParams.d.ts.map +1 -1
  157. package/dist/model/searchParams.d.ts.map +1 -1
  158. package/dist/model/searchParamsObject.d.ts.map +1 -1
  159. package/dist/model/searchParamsQuery.d.ts.map +1 -1
  160. package/dist/model/searchParamsString.d.ts.map +1 -1
  161. package/dist/model/searchQuery.d.ts.map +1 -1
  162. package/dist/model/searchResponse.d.ts +1 -1
  163. package/dist/model/searchResponse.d.ts.map +1 -1
  164. package/dist/model/searchResponses.d.ts +1 -1
  165. package/dist/model/searchResponses.d.ts.map +1 -1
  166. package/dist/model/searchRulesParams.d.ts.map +1 -1
  167. package/dist/model/searchRulesResponse.d.ts.map +1 -1
  168. package/dist/model/searchStrategy.d.ts.map +1 -1
  169. package/dist/model/searchSynonymsParams.d.ts.map +1 -1
  170. package/dist/model/searchSynonymsResponse.d.ts.map +1 -1
  171. package/dist/model/searchTypeDefault.d.ts.map +1 -1
  172. package/dist/model/searchTypeFacet.d.ts.map +1 -1
  173. package/dist/model/searchUserIdsParams.d.ts.map +1 -1
  174. package/dist/model/searchUserIdsResponse.d.ts.map +1 -1
  175. package/dist/model/snippetResult.d.ts.map +1 -1
  176. package/dist/model/snippetResultOption.d.ts.map +1 -1
  177. package/dist/model/sortRemainingBy.d.ts.map +1 -1
  178. package/dist/model/source.d.ts.map +1 -1
  179. package/dist/model/standardEntries.d.ts.map +1 -1
  180. package/dist/model/synonymHit.d.ts +0 -2
  181. package/dist/model/synonymHit.d.ts.map +1 -1
  182. package/dist/model/synonymType.d.ts.map +1 -1
  183. package/dist/model/tagFilters.d.ts.map +1 -1
  184. package/dist/model/taskStatus.d.ts.map +1 -1
  185. package/dist/model/timeRange.d.ts.map +1 -1
  186. package/dist/model/typoTolerance.d.ts.map +1 -1
  187. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  188. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  189. package/dist/model/updateApiKeyResponse.d.ts.map +1 -1
  190. package/dist/model/updatedAtResponse.d.ts.map +1 -1
  191. package/dist/model/updatedAtWithObjectIdResponse.d.ts.map +1 -1
  192. package/dist/model/updatedRuleResponse.d.ts.map +1 -1
  193. package/dist/model/userHighlightResult.d.ts.map +1 -1
  194. package/dist/model/userHit.d.ts.map +1 -1
  195. package/dist/model/userId.d.ts.map +1 -1
  196. package/dist/model/value.d.ts.map +1 -1
  197. package/dist/src/searchClient.d.ts +71 -24
  198. package/dist/src/searchClient.d.ts.map +1 -1
  199. package/model/acl.ts +3 -0
  200. package/model/addApiKeyResponse.ts +2 -1
  201. package/model/apiKey.ts +7 -0
  202. package/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
  203. package/model/automaticFacetFilter.ts +2 -0
  204. package/model/baseGetApiKeyResponse.ts +13 -0
  205. package/model/baseIndexSettings.ts +18 -0
  206. package/model/baseSearchParamsWithoutQuery.ts +32 -0
  207. package/model/baseSearchResponse.ts +25 -1
  208. package/model/batchAssignUserIdsParams.ts +1 -0
  209. package/model/batchDictionaryEntriesParams.ts +1 -0
  210. package/model/batchDictionaryEntriesRequest.ts +1 -0
  211. package/model/batchParams.ts +2 -2
  212. package/model/{batchOperation.ts → batchRequest.ts} +4 -3
  213. package/model/batchResponse.ts +1 -0
  214. package/model/batchWriteParams.ts +2 -2
  215. package/model/browseParams.ts +6 -0
  216. package/model/browseParamsObject.ts +6 -0
  217. package/model/browseResponse.ts +3 -3
  218. package/model/builtInOperation.ts +1 -0
  219. package/model/clientMethodProps.ts +31 -19
  220. package/model/condition.ts +3 -0
  221. package/model/consequence.ts +4 -0
  222. package/model/consequenceQueryObject.ts +1 -0
  223. package/model/{baseBrowseResponse.ts → cursor.ts} +2 -2
  224. package/model/deleteByParams.ts +36 -0
  225. package/model/deletedAtResponse.ts +1 -0
  226. package/model/dictionaryEntry.ts +5 -0
  227. package/model/{createdAtObject.ts → distinct.ts} +4 -6
  228. package/model/edit.ts +2 -0
  229. package/model/facetHits.ts +2 -0
  230. package/model/facetOrdering.ts +1 -0
  231. package/model/facetsStats.ts +3 -0
  232. package/model/fetchedIndex.ts +10 -0
  233. package/model/{key.ts → getApiKeyResponse.ts} +2 -2
  234. package/model/getObjectsParams.ts +2 -2
  235. package/model/{multipleGetObjectsParams.ts → getObjectsRequest.ts} +3 -1
  236. package/model/getObjectsResponse.ts +2 -2
  237. package/model/hasPendingMappingsResponse.ts +1 -0
  238. package/model/highlightResultOption.ts +3 -0
  239. package/model/hit.ts +5 -1
  240. package/model/index.ts +11 -9
  241. package/model/indexSettingsAsSearchParams.ts +45 -6
  242. package/model/languages.ts +2 -0
  243. package/model/listApiKeysResponse.ts +2 -2
  244. package/model/listIndicesResponse.ts +2 -1
  245. package/model/log.ts +14 -0
  246. package/model/logQuery.ts +2 -0
  247. package/model/matchedGeoLocation.ts +2 -0
  248. package/model/{multipleBatchOperation.ts → multipleBatchRequest.ts} +6 -4
  249. package/model/multipleBatchResponse.ts +3 -2
  250. package/model/operationIndexParams.ts +2 -0
  251. package/model/params.ts +3 -0
  252. package/model/personalization.ts +2 -0
  253. package/model/promoteObjectID.ts +1 -0
  254. package/model/promoteObjectIDs.ts +1 -0
  255. package/model/rankingInfo.ts +12 -0
  256. package/model/rule.ts +5 -0
  257. package/model/saveObjectResponse.ts +4 -2
  258. package/model/saveSynonymResponse.ts +2 -0
  259. package/model/searchDictionaryEntriesParams.ts +3 -0
  260. package/model/searchForFacetValuesRequest.ts +2 -0
  261. package/model/searchForFacetsOptions.ts +4 -0
  262. package/model/searchForHitsOptions.ts +1 -0
  263. package/model/searchHits.ts +1 -1
  264. package/model/searchMethodParams.ts +1 -0
  265. package/model/searchResponse.ts +2 -1
  266. package/model/searchResponses.ts +1 -1
  267. package/model/searchRulesParams.ts +6 -0
  268. package/model/searchRulesResponse.ts +3 -0
  269. package/model/searchSynonymsResponse.ts +1 -0
  270. package/model/searchUserIdsParams.ts +3 -0
  271. package/model/searchUserIdsResponse.ts +4 -0
  272. package/model/snippetResultOption.ts +1 -0
  273. package/model/source.ts +1 -0
  274. package/model/standardEntries.ts +2 -0
  275. package/model/synonymHit.ts +7 -2
  276. package/model/timeRange.ts +1 -0
  277. package/model/updateApiKeyResponse.ts +2 -1
  278. package/model/updatedAtResponse.ts +1 -0
  279. package/model/updatedAtWithObjectIdResponse.ts +2 -0
  280. package/model/updatedRuleResponse.ts +2 -0
  281. package/model/userHighlightResult.ts +1 -0
  282. package/model/userHit.ts +5 -0
  283. package/model/userId.ts +3 -0
  284. package/model/value.ts +1 -0
  285. package/package.json +31 -13
  286. package/dist/model/attributeOrBuiltInOperation.d.ts +0 -3
  287. package/dist/model/attributeOrBuiltInOperation.d.ts.map +0 -1
  288. package/dist/model/baseBrowseResponse.d.ts.map +0 -1
  289. package/dist/model/batchOperation.d.ts +0 -9
  290. package/dist/model/batchOperation.d.ts.map +0 -1
  291. package/dist/model/browseRequest.d.ts +0 -11
  292. package/dist/model/browseRequest.d.ts.map +0 -1
  293. package/dist/model/createdAtObject.d.ts +0 -7
  294. package/dist/model/createdAtObject.d.ts.map +0 -1
  295. package/dist/model/key.d.ts +0 -4
  296. package/dist/model/key.d.ts.map +0 -1
  297. package/dist/model/multipleBatchOperation.d.ts.map +0 -1
  298. package/dist/model/multipleGetObjectsParams.d.ts.map +0 -1
  299. package/dist/model/synonymHitHighlightResult.d.ts +0 -12
  300. package/dist/model/synonymHitHighlightResult.d.ts.map +0 -1
  301. package/model/browseRequest.ts +0 -12
  302. package/model/synonymHitHighlightResult.ts +0 -14
@@ -9,18 +9,22 @@ import type { Promote } from './promote';
9
9
  */
10
10
  export type Consequence = {
11
11
  params?: ConsequenceParams;
12
+
12
13
  /**
13
14
  * Objects to promote as hits.
14
15
  */
15
16
  promote?: Promote[];
17
+
16
18
  /**
17
19
  * Only use in combination with the promote consequence. When true, promoted results will be restricted to match the filters of the current search. When false, the promoted results will show up regardless of the filters.
18
20
  */
19
21
  filterPromotes?: boolean;
22
+
20
23
  /**
21
24
  * Objects to hide from hits. Each object must contain an objectID field. By default, you can hide up to 50 items per rule.
22
25
  */
23
26
  hide?: ConsequenceHide[];
27
+
24
28
  /**
25
29
  * Custom JSON object that will be appended to the userData array in the response. This object isn\'t interpreted by the API. It\'s limited to 1kB of minified JSON.
26
30
  */
@@ -7,6 +7,7 @@ export type ConsequenceQueryObject = {
7
7
  * Words to remove.
8
8
  */
9
9
  remove?: string[];
10
+
10
11
  /**
11
12
  * Edits to apply.
12
13
  */
@@ -1,8 +1,8 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- export type BaseBrowseResponse = {
3
+ export type Cursor = {
4
4
  /**
5
5
  * Cursor indicating the location to resume browsing from. Must match the value returned by the previous call.
6
6
  */
7
- cursor: string;
7
+ cursor?: string;
8
8
  };
@@ -0,0 +1,36 @@
1
+ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
+
3
+ import type { AroundRadius } from './aroundRadius';
4
+ import type { FacetFilters } from './facetFilters';
5
+ import type { NumericFilters } from './numericFilters';
6
+ import type { TagFilters } from './tagFilters';
7
+
8
+ export type DeleteByParams = {
9
+ facetFilters?: FacetFilters;
10
+
11
+ /**
12
+ * Filter the query with numeric, facet and/or tag filters.
13
+ */
14
+ filters?: string;
15
+
16
+ numericFilters?: NumericFilters;
17
+
18
+ tagFilters?: TagFilters;
19
+
20
+ /**
21
+ * Search for entries around a central geolocation, enabling a geo search within a circular area.
22
+ */
23
+ aroundLatLng?: string;
24
+
25
+ aroundRadius?: AroundRadius;
26
+
27
+ /**
28
+ * Search inside a rectangular area (in geo coordinates).
29
+ */
30
+ insideBoundingBox?: number[];
31
+
32
+ /**
33
+ * Search inside a polygon (in geo coordinates).
34
+ */
35
+ insidePolygon?: number[];
36
+ };
@@ -8,6 +8,7 @@ export type DeletedAtResponse = {
8
8
  * TaskID of the task to wait for.
9
9
  */
10
10
  taskID: number;
11
+
11
12
  /**
12
13
  * Date of deletion (ISO-8601 format).
13
14
  */
@@ -10,21 +10,26 @@ export type DictionaryEntry = Record<string, any> & {
10
10
  * Unique identifier of the object.
11
11
  */
12
12
  objectID: string;
13
+
13
14
  /**
14
15
  * Language ISO code supported by the dictionary (e.g., \"en\" for English).
15
16
  */
16
17
  language: string;
18
+
17
19
  /**
18
20
  * The word of the dictionary entry.
19
21
  */
20
22
  word?: string;
23
+
21
24
  /**
22
25
  * The words of the dictionary entry.
23
26
  */
24
27
  words?: string[];
28
+
25
29
  /**
26
30
  * A decomposition of the word of the dictionary entry.
27
31
  */
28
32
  decomposition?: string[];
33
+
29
34
  state?: DictionaryEntryState;
30
35
  };
@@ -1,8 +1,6 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- export type CreatedAtObject = {
4
- /**
5
- * Date of creation (ISO-8601 format).
6
- */
7
- createdAt: string;
8
- };
3
+ /**
4
+ * Enables de-duplication or grouping of results.
5
+ */
6
+ export type Distinct = boolean | number;
package/model/edit.ts CHANGED
@@ -4,10 +4,12 @@ import type { EditType } from './editType';
4
4
 
5
5
  export type Edit = {
6
6
  type?: EditType;
7
+
7
8
  /**
8
9
  * Text or patterns to remove from the query string.
9
10
  */
10
11
  delete?: string;
12
+
11
13
  /**
12
14
  * Text that should be inserted in place of the removed text inside the query string.
13
15
  */
@@ -5,10 +5,12 @@ export type FacetHits = {
5
5
  * Raw value of the facet.
6
6
  */
7
7
  value: string;
8
+
8
9
  /**
9
10
  * Markup text with occurrences highlighted.
10
11
  */
11
12
  highlighted: string;
13
+
12
14
  /**
13
15
  * How many objects contain this facet value. This takes into account the extra search parameters specified in the query. Like for a regular search query, the counts may not be exhaustive.
14
16
  */
@@ -8,6 +8,7 @@ import type { Value } from './value';
8
8
  */
9
9
  export type FacetOrdering = {
10
10
  facets?: Facets;
11
+
11
12
  /**
12
13
  * The ordering of facet values, within an individual list.
13
14
  */
@@ -5,14 +5,17 @@ export type FacetsStats = {
5
5
  * The minimum value in the result set.
6
6
  */
7
7
  min?: number;
8
+
8
9
  /**
9
10
  * The maximum value in the result set.
10
11
  */
11
12
  max?: number;
13
+
12
14
  /**
13
15
  * The average facet value in the result set.
14
16
  */
15
17
  avg?: number;
18
+
16
19
  /**
17
20
  * The sum of all values in the result set.
18
21
  */
@@ -5,42 +5,52 @@ export type FetchedIndex = {
5
5
  * Index name.
6
6
  */
7
7
  name: string;
8
+
8
9
  /**
9
10
  * Index creation date. An empty string means that the index has no records.
10
11
  */
11
12
  createdAt: string;
13
+
12
14
  /**
13
15
  * Date of last update (ISO-8601 format).
14
16
  */
15
17
  updatedAt: string;
18
+
16
19
  /**
17
20
  * Number of records contained in the index.
18
21
  */
19
22
  entries: number;
23
+
20
24
  /**
21
25
  * Number of bytes of the index in minified format.
22
26
  */
23
27
  dataSize: number;
28
+
24
29
  /**
25
30
  * Number of bytes of the index binary file.
26
31
  */
27
32
  fileSize: number;
33
+
28
34
  /**
29
35
  * Last build time.
30
36
  */
31
37
  lastBuildTimeS: number;
38
+
32
39
  /**
33
40
  * Number of pending indexing operations. This value is deprecated and should not be used.
34
41
  */
35
42
  numberOfPendingTask?: number;
43
+
36
44
  /**
37
45
  * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
38
46
  */
39
47
  pendingTask: boolean;
48
+
40
49
  /**
41
50
  * Only present if the index is a replica. Contains the name of the related primary index.
42
51
  */
43
52
  primary?: string;
53
+
44
54
  /**
45
55
  * Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
46
56
  */
@@ -1,6 +1,6 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
3
  import type { ApiKey } from './apiKey';
4
- import type { CreatedAtObject } from './createdAtObject';
4
+ import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
5
5
 
6
- export type Key = ApiKey & CreatedAtObject;
6
+ export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
@@ -1,10 +1,10 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { MultipleGetObjectsParams } from './multipleGetObjectsParams';
3
+ import type { GetObjectsRequest } from './getObjectsRequest';
4
4
 
5
5
  /**
6
6
  * The `getObjects` parameters.
7
7
  */
8
8
  export type GetObjectsParams = {
9
- requests?: MultipleGetObjectsParams[];
9
+ requests: GetObjectsRequest[];
10
10
  };
@@ -3,15 +3,17 @@
3
3
  /**
4
4
  * GetObjects operation on an index.
5
5
  */
6
- export type MultipleGetObjectsParams = {
6
+ export type GetObjectsRequest = {
7
7
  /**
8
8
  * List of attributes to retrieve. By default, all retrievable attributes are returned.
9
9
  */
10
10
  attributesToRetrieve?: string[];
11
+
11
12
  /**
12
13
  * ID of the object within that index.
13
14
  */
14
15
  objectID: string;
16
+
15
17
  /**
16
18
  * Name of the index containing the object.
17
19
  */
@@ -1,8 +1,8 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- export type GetObjectsResponse = {
3
+ export type GetObjectsResponse<T = Record<string, any>> = {
4
4
  /**
5
5
  * List of results fetched.
6
6
  */
7
- results?: Array<Record<string, any>>;
7
+ results: T[];
8
8
  };
@@ -5,6 +5,7 @@ export type HasPendingMappingsResponse = {
5
5
  * If there is any clusters with pending mapping state.
6
6
  */
7
7
  pending: boolean;
8
+
8
9
  /**
9
10
  * Describe cluster pending (migrating, creating, deleting) mapping state.
10
11
  */
@@ -10,11 +10,14 @@ export type HighlightResultOption = {
10
10
  * Markup text with occurrences highlighted.
11
11
  */
12
12
  value: string;
13
+
13
14
  matchLevel: MatchLevel;
15
+
14
16
  /**
15
17
  * List of words from the query that matched the object.
16
18
  */
17
19
  matchedWords: string[];
20
+
18
21
  /**
19
22
  * Whether the entire attribute value is highlighted.
20
23
  */
package/model/hit.ts CHANGED
@@ -7,19 +7,23 @@ import type { SnippetResult } from './snippetResult';
7
7
  /**
8
8
  * A single hit.
9
9
  */
10
- export type Hit<T> = T & {
10
+ export type Hit<T = Record<string, any>> = T & {
11
11
  /**
12
12
  * Unique identifier of the object.
13
13
  */
14
14
  objectID: string;
15
+
15
16
  /**
16
17
  * Show highlighted section and words matched on a query.
17
18
  */
18
19
  _highlightResult?: Record<string, HighlightResult>;
20
+
19
21
  /**
20
22
  * Snippeted attributes show parts of the matched attributes. Only returned when attributesToSnippet is non-empty.
21
23
  */
22
24
  _snippetResult?: Record<string, SnippetResult>;
25
+
23
26
  _rankingInfo?: RankingInfo;
27
+
24
28
  _distinctSeqID?: number;
25
29
  };
package/model/index.ts CHANGED
@@ -10,10 +10,10 @@ export * from './apiKey';
10
10
  export * from './aroundRadius';
11
11
  export * from './aroundRadiusAll';
12
12
  export * from './assignUserIdParams';
13
- export * from './attributeOrBuiltInOperation';
13
+ export * from './attributeToUpdate';
14
14
  export * from './automaticFacetFilter';
15
15
  export * from './automaticFacetFilters';
16
- export * from './baseBrowseResponse';
16
+ export * from './baseGetApiKeyResponse';
17
17
  export * from './baseIndexSettings';
18
18
  export * from './baseSearchParams';
19
19
  export * from './baseSearchParamsWithoutQuery';
@@ -21,11 +21,12 @@ export * from './baseSearchResponse';
21
21
  export * from './batchAssignUserIdsParams';
22
22
  export * from './batchDictionaryEntriesParams';
23
23
  export * from './batchDictionaryEntriesRequest';
24
- export * from './batchOperation';
25
24
  export * from './batchParams';
25
+ export * from './batchRequest';
26
26
  export * from './batchResponse';
27
27
  export * from './batchWriteParams';
28
- export * from './browseRequest';
28
+ export * from './browseParams';
29
+ export * from './browseParamsObject';
29
30
  export * from './browseResponse';
30
31
  export * from './builtInOperation';
31
32
  export * from './builtInOperationType';
@@ -35,9 +36,10 @@ export * from './consequenceHide';
35
36
  export * from './consequenceParams';
36
37
  export * from './consequenceQuery';
37
38
  export * from './consequenceQueryObject';
38
- export * from './createdAtObject';
39
39
  export * from './createdAtResponse';
40
+ export * from './cursor';
40
41
  export * from './deleteApiKeyResponse';
42
+ export * from './deleteByParams';
41
43
  export * from './deleteSourceResponse';
42
44
  export * from './deletedAtResponse';
43
45
  export * from './dictionaryAction';
@@ -46,6 +48,7 @@ export * from './dictionaryEntryState';
46
48
  export * from './dictionaryLanguage';
47
49
  export * from './dictionarySettingsParams';
48
50
  export * from './dictionaryType';
51
+ export * from './distinct';
49
52
  export * from './edit';
50
53
  export * from './editType';
51
54
  export * from './errorBase';
@@ -56,9 +59,11 @@ export * from './facetOrdering';
56
59
  export * from './facets';
57
60
  export * from './facetsStats';
58
61
  export * from './fetchedIndex';
62
+ export * from './getApiKeyResponse';
59
63
  export * from './getDictionarySettingsResponse';
60
64
  export * from './getLogsResponse';
61
65
  export * from './getObjectsParams';
66
+ export * from './getObjectsRequest';
62
67
  export * from './getObjectsResponse';
63
68
  export * from './getTaskResponse';
64
69
  export * from './getTopUserIdsResponse';
@@ -69,7 +74,6 @@ export * from './hit';
69
74
  export * from './ignorePlurals';
70
75
  export * from './indexSettings';
71
76
  export * from './indexSettingsAsSearchParams';
72
- export * from './key';
73
77
  export * from './languages';
74
78
  export * from './listApiKeysResponse';
75
79
  export * from './listClustersResponse';
@@ -81,9 +85,8 @@ export * from './logType';
81
85
  export * from './matchLevel';
82
86
  export * from './matchedGeoLocation';
83
87
  export * from './mixedSearchFilters';
84
- export * from './multipleBatchOperation';
88
+ export * from './multipleBatchRequest';
85
89
  export * from './multipleBatchResponse';
86
- export * from './multipleGetObjectsParams';
87
90
  export * from './numericFilters';
88
91
  export * from './operationIndexParams';
89
92
  export * from './operationType';
@@ -136,7 +139,6 @@ export * from './sortRemainingBy';
136
139
  export * from './source';
137
140
  export * from './standardEntries';
138
141
  export * from './synonymHit';
139
- export * from './synonymHitHighlightResult';
140
142
  export * from './synonymType';
141
143
  export * from './tagFilters';
142
144
  export * from './taskStatus';
@@ -2,6 +2,7 @@
2
2
 
3
3
  import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';
4
4
  import type { AlternativesAsExact } from './alternativesAsExact';
5
+ import type { Distinct } from './distinct';
5
6
  import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
6
7
  import type { IgnorePlurals } from './ignorePlurals';
7
8
  import type { QueryType } from './queryType';
@@ -15,147 +16,185 @@ export type IndexSettingsAsSearchParams = {
15
16
  * The complete list of attributes that will be used for faceting.
16
17
  */
17
18
  attributesForFaceting?: string[];
18
- /**
19
- * List of attributes that can\'t be retrieved at query time.
20
- */
21
- unretrievableAttributes?: string[];
19
+
22
20
  /**
23
21
  * This parameter controls which attributes to retrieve and which not to retrieve.
24
22
  */
25
23
  attributesToRetrieve?: string[];
24
+
26
25
  /**
27
26
  * Restricts a given query to look in only a subset of your searchable attributes.
28
27
  */
29
28
  restrictSearchableAttributes?: string[];
29
+
30
30
  /**
31
31
  * Controls how Algolia should sort your results.
32
32
  */
33
33
  ranking?: string[];
34
+
34
35
  /**
35
36
  * Specifies the custom ranking criterion.
36
37
  */
37
38
  customRanking?: string[];
39
+
38
40
  /**
39
41
  * Controls the relevancy threshold below which less relevant results aren\'t included in the results.
40
42
  */
41
43
  relevancyStrictness?: number;
44
+
42
45
  /**
43
46
  * List of attributes to highlight.
44
47
  */
45
48
  attributesToHighlight?: string[];
49
+
46
50
  /**
47
51
  * List of attributes to snippet, with an optional maximum number of words to snippet.
48
52
  */
49
53
  attributesToSnippet?: string[];
54
+
50
55
  /**
51
56
  * The HTML string to insert before the highlighted parts in all highlight and snippet results.
52
57
  */
53
58
  highlightPreTag?: string;
59
+
54
60
  /**
55
61
  * The HTML string to insert after the highlighted parts in all highlight and snippet results.
56
62
  */
57
63
  highlightPostTag?: string;
64
+
58
65
  /**
59
66
  * String used as an ellipsis indicator when a snippet is truncated.
60
67
  */
61
68
  snippetEllipsisText?: string;
69
+
62
70
  /**
63
71
  * Restrict highlighting and snippeting to items that matched the query.
64
72
  */
65
73
  restrictHighlightAndSnippetArrays?: boolean;
74
+
66
75
  /**
67
76
  * Set the number of hits per page.
68
77
  */
69
78
  hitsPerPage?: number;
79
+
70
80
  /**
71
81
  * Minimum number of characters a word in the query string must contain to accept matches with 1 typo.
72
82
  */
73
83
  minWordSizefor1Typo?: number;
84
+
74
85
  /**
75
86
  * Minimum number of characters a word in the query string must contain to accept matches with 2 typos.
76
87
  */
77
88
  minWordSizefor2Typos?: number;
89
+
78
90
  typoTolerance?: TypoTolerance;
91
+
79
92
  /**
80
93
  * Whether to allow typos on numbers (\"numeric tokens\") in the query string.
81
94
  */
82
95
  allowTyposOnNumericTokens?: boolean;
96
+
83
97
  /**
84
98
  * List of attributes on which you want to disable typo tolerance.
85
99
  */
86
100
  disableTypoToleranceOnAttributes?: string[];
101
+
87
102
  ignorePlurals?: IgnorePlurals;
103
+
88
104
  removeStopWords?: RemoveStopWords;
105
+
89
106
  /**
90
107
  * List of characters that the engine shouldn\'t automatically normalize.
91
108
  */
92
109
  keepDiacriticsOnCharacters?: string;
110
+
93
111
  /**
94
112
  * Sets the languages to be used by language-specific settings and functionalities such as ignorePlurals, removeStopWords, and CJK word-detection.
95
113
  */
96
114
  queryLanguages?: string[];
115
+
97
116
  /**
98
117
  * Splits compound words into their composing atoms in the query.
99
118
  */
100
119
  decompoundQuery?: boolean;
120
+
101
121
  /**
102
122
  * Whether Rules should be globally enabled.
103
123
  */
104
124
  enableRules?: boolean;
125
+
105
126
  /**
106
127
  * Enable the Personalization feature.
107
128
  */
108
129
  enablePersonalization?: boolean;
130
+
109
131
  queryType?: QueryType;
132
+
110
133
  removeWordsIfNoResults?: RemoveWordsIfNoResults;
134
+
111
135
  /**
112
136
  * Enables the advanced query syntax.
113
137
  */
114
138
  advancedSyntax?: boolean;
139
+
115
140
  /**
116
141
  * A list of words that should be considered as optional when found in the query.
117
142
  */
118
143
  optionalWords?: string[];
144
+
119
145
  /**
120
146
  * List of attributes on which you want to disable the exact ranking criterion.
121
147
  */
122
148
  disableExactOnAttributes?: string[];
149
+
123
150
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
151
+
124
152
  /**
125
153
  * List of alternatives that should be considered an exact match by the exact ranking criterion.
126
154
  */
127
155
  alternativesAsExact?: AlternativesAsExact[];
156
+
128
157
  /**
129
158
  * Allows you to specify which advanced syntax features are active when ‘advancedSyntax\' is enabled.
130
159
  */
131
160
  advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
161
+
162
+ distinct?: Distinct;
163
+
132
164
  /**
133
- * Enables de-duplication or grouping of results.
165
+ * Name of the de-duplication attribute to be used with the distinct feature.
134
166
  */
135
- distinct?: number;
167
+ attributeForDistinct?: string;
168
+
136
169
  /**
137
170
  * Whether to take into account an index\'s synonyms for a particular search.
138
171
  */
139
172
  synonyms?: boolean;
173
+
140
174
  /**
141
175
  * Whether to highlight and snippet the original word that matches the synonym or the synonym itself.
142
176
  */
143
177
  replaceSynonymsInHighlight?: boolean;
178
+
144
179
  /**
145
180
  * Precision of the proximity ranking criterion.
146
181
  */
147
182
  minProximity?: number;
183
+
148
184
  /**
149
185
  * Choose which fields to return in the API response. This parameters applies to search and browse queries.
150
186
  */
151
187
  responseFields?: string[];
188
+
152
189
  /**
153
190
  * Maximum number of facet hits to return during a search for facet values. For performance reasons, the maximum allowed number of returned values is 100.
154
191
  */
155
192
  maxFacetHits?: number;
193
+
156
194
  /**
157
195
  * When attribute is ranked above proximity in your ranking formula, proximity is used to select which searchable attribute is matched in the attribute ranking stage.
158
196
  */
159
197
  attributeCriteriaComputedByMinProximity?: boolean;
198
+
160
199
  renderingContent?: RenderingContent;
161
200
  };
@@ -7,6 +7,8 @@ import type { DictionaryLanguage } from './dictionaryLanguage';
7
7
  */
8
8
  export type Languages = {
9
9
  plurals: DictionaryLanguage | null;
10
+
10
11
  stopwords: DictionaryLanguage | null;
12
+
11
13
  compounds: DictionaryLanguage | null;
12
14
  };
@@ -1,10 +1,10 @@
1
1
  // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2
2
 
3
- import type { Key } from './key';
3
+ import type { GetApiKeyResponse } from './getApiKeyResponse';
4
4
 
5
5
  export type ListApiKeysResponse = {
6
6
  /**
7
7
  * List of api keys.
8
8
  */
9
- keys: Key[];
9
+ keys: GetApiKeyResponse[];
10
10
  };
@@ -6,7 +6,8 @@ export type ListIndicesResponse = {
6
6
  /**
7
7
  * List of the fetched indices.
8
8
  */
9
- items?: FetchedIndex[];
9
+ items: FetchedIndex[];
10
+
10
11
  /**
11
12
  * Number of pages.
12
13
  */