@algolia/client-search 5.0.0-alpha.99 → 5.0.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. package/LICENSE +21 -0
  2. package/dist/builds/browser.d.ts +91 -3
  3. package/dist/builds/browser.d.ts.map +1 -1
  4. package/dist/builds/node.d.ts +109 -3
  5. package/dist/builds/node.d.ts.map +1 -1
  6. package/dist/client-search.cjs +544 -219
  7. package/dist/client-search.esm.browser.js +494 -228
  8. package/dist/client-search.esm.node.js +545 -220
  9. package/dist/client-search.umd.js +2 -2
  10. package/dist/model/acl.d.ts +1 -1
  11. package/dist/model/action.d.ts +1 -1
  12. package/dist/model/addApiKeyResponse.d.ts +1 -1
  13. package/dist/model/anchoring.d.ts +1 -1
  14. package/dist/model/apiKey.d.ts +8 -8
  15. package/dist/model/apiKeyOperation.d.ts +2 -0
  16. package/dist/model/apiKeyOperation.d.ts.map +1 -0
  17. package/dist/model/aroundPrecision.d.ts +1 -1
  18. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  19. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  20. package/dist/model/aroundRadius.d.ts +1 -1
  21. package/dist/model/aroundRadiusAll.d.ts +3 -0
  22. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  23. package/dist/model/automaticFacetFilter.d.ts +4 -4
  24. package/dist/model/automaticFacetFilters.d.ts +1 -1
  25. package/dist/model/baseGetApiKeyResponse.d.ts +1 -1
  26. package/dist/model/baseIndexSettings.d.ts +23 -18
  27. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  28. package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  29. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  30. package/dist/model/baseSearchResponse.d.ts +8 -20
  31. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  32. package/dist/model/batchDictionaryEntriesParams.d.ts +3 -3
  33. package/dist/model/batchResponse.d.ts +2 -2
  34. package/dist/model/browsePagination.d.ts +19 -0
  35. package/dist/model/browsePagination.d.ts.map +1 -0
  36. package/dist/model/browseResponse.d.ts +2 -1
  37. package/dist/model/browseResponse.d.ts.map +1 -1
  38. package/dist/model/builtInOperation.d.ts +2 -2
  39. package/dist/model/builtInOperationType.d.ts +1 -1
  40. package/dist/model/clientMethodProps.d.ts +137 -70
  41. package/dist/model/clientMethodProps.d.ts.map +1 -1
  42. package/dist/model/condition.d.ts +7 -3
  43. package/dist/model/condition.d.ts.map +1 -1
  44. package/dist/model/consequence.d.ts +5 -5
  45. package/dist/model/consequenceHide.d.ts +2 -2
  46. package/dist/model/consequenceQuery.d.ts +1 -1
  47. package/dist/model/consequenceQueryObject.d.ts +2 -2
  48. package/dist/model/createdAtResponse.d.ts +1 -1
  49. package/dist/model/cursor.d.ts +1 -1
  50. package/dist/model/deleteApiKeyResponse.d.ts +1 -1
  51. package/dist/model/deleteByParams.d.ts +4 -4
  52. package/dist/model/deleteSourceResponse.d.ts +1 -1
  53. package/dist/model/deletedAtResponse.d.ts +2 -2
  54. package/dist/model/dictionaryEntry.d.ts +6 -8
  55. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  56. package/dist/model/dictionaryEntryState.d.ts +1 -1
  57. package/dist/model/dictionaryLanguage.d.ts +2 -2
  58. package/dist/model/dictionarySettingsParams.d.ts +1 -1
  59. package/dist/model/distinct.d.ts +1 -1
  60. package/dist/model/edit.d.ts +1 -1
  61. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  62. package/dist/model/facetFilters.d.ts +2 -3
  63. package/dist/model/facetFilters.d.ts.map +1 -1
  64. package/dist/model/facetHits.d.ts +2 -2
  65. package/dist/model/facetOrdering.d.ts +2 -2
  66. package/dist/model/facets.d.ts +2 -2
  67. package/dist/model/fetchedIndex.d.ts +5 -1
  68. package/dist/model/fetchedIndex.d.ts.map +1 -1
  69. package/dist/model/getObjectsRequest.d.ts +3 -3
  70. package/dist/model/getObjectsResponse.d.ts +1 -1
  71. package/dist/model/hasPendingMappingsResponse.d.ts +1 -1
  72. package/dist/model/highlightResult.d.ts +1 -1
  73. package/dist/model/highlightResult.d.ts.map +1 -1
  74. package/dist/model/highlightResultOption.d.ts +3 -3
  75. package/dist/model/hit.d.ts +4 -4
  76. package/dist/model/ignorePlurals.d.ts +3 -2
  77. package/dist/model/ignorePlurals.d.ts.map +1 -1
  78. package/dist/model/index.d.ts +8 -1
  79. package/dist/model/index.d.ts.map +1 -1
  80. package/dist/model/indexSettings.d.ts +1 -1
  81. package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
  82. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  83. package/dist/model/log.d.ts +11 -11
  84. package/dist/model/logQuery.d.ts +1 -1
  85. package/dist/model/matchLevel.d.ts +1 -1
  86. package/dist/model/mode.d.ts +1 -1
  87. package/dist/model/multipleBatchRequest.d.ts +1 -1
  88. package/dist/model/multipleBatchResponse.d.ts +2 -2
  89. package/dist/model/numericFilters.d.ts +2 -3
  90. package/dist/model/numericFilters.d.ts.map +1 -1
  91. package/dist/model/operationIndexParams.d.ts +2 -2
  92. package/dist/model/operationType.d.ts +1 -1
  93. package/dist/model/optionalFilters.d.ts +2 -3
  94. package/dist/model/optionalFilters.d.ts.map +1 -1
  95. package/dist/model/params.d.ts +1 -1
  96. package/dist/model/promoteObjectID.d.ts +2 -2
  97. package/dist/model/promoteObjectIDs.d.ts +2 -2
  98. package/dist/model/queryType.d.ts +1 -1
  99. package/dist/model/rankingInfo.d.ts +13 -10
  100. package/dist/model/rankingInfo.d.ts.map +1 -1
  101. package/dist/model/reRankingApplyFilter.d.ts +2 -3
  102. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  103. package/dist/model/redirect.d.ts +1 -1
  104. package/dist/model/redirectURL.d.ts +7 -0
  105. package/dist/model/redirectURL.d.ts.map +1 -0
  106. package/dist/model/removeStopWords.d.ts +3 -2
  107. package/dist/model/removeStopWords.d.ts.map +1 -1
  108. package/dist/model/removeUserIdResponse.d.ts +1 -1
  109. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  110. package/dist/model/renderingContent.d.ts +3 -1
  111. package/dist/model/renderingContent.d.ts.map +1 -1
  112. package/dist/model/replaceAllObjectsResponse.d.ts +11 -0
  113. package/dist/model/replaceAllObjectsResponse.d.ts.map +1 -0
  114. package/dist/model/replaceSourceResponse.d.ts +1 -1
  115. package/dist/model/rule.d.ts +5 -5
  116. package/dist/model/saveObjectResponse.d.ts +3 -3
  117. package/dist/model/saveSynonymResponse.d.ts +2 -2
  118. package/dist/model/searchDictionaryEntriesParams.d.ts +5 -7
  119. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  120. package/dist/model/searchDictionaryEntriesResponse.d.ts +20 -0
  121. package/dist/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
  122. package/dist/model/searchForFacetValuesRequest.d.ts +1 -1
  123. package/dist/model/searchForFacetValuesResponse.d.ts +4 -1
  124. package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
  125. package/dist/model/searchForFacetsOptions.d.ts +2 -2
  126. package/dist/model/searchForHitsOptions.d.ts +1 -1
  127. package/dist/model/searchHits.d.ts +6 -3
  128. package/dist/model/searchHits.d.ts.map +1 -1
  129. package/dist/model/searchPagination.d.ts +19 -0
  130. package/dist/model/searchPagination.d.ts.map +1 -0
  131. package/dist/model/searchParamsObject.d.ts +3 -0
  132. package/dist/model/searchParamsObject.d.ts.map +1 -1
  133. package/dist/model/searchParamsQuery.d.ts +1 -1
  134. package/dist/model/searchResponse.d.ts +2 -1
  135. package/dist/model/searchResponse.d.ts.map +1 -1
  136. package/dist/model/searchRulesParams.d.ts +4 -8
  137. package/dist/model/searchRulesParams.d.ts.map +1 -1
  138. package/dist/model/searchRulesResponse.d.ts +2 -2
  139. package/dist/model/searchStrategy.d.ts +1 -1
  140. package/dist/model/searchSynonymsParams.d.ts +2 -2
  141. package/dist/model/searchSynonymsResponse.d.ts +2 -2
  142. package/dist/model/searchUserIdsParams.d.ts +1 -1
  143. package/dist/model/searchUserIdsResponse.d.ts +3 -3
  144. package/dist/model/securedApiKeyRestrictions.d.ts +25 -0
  145. package/dist/model/securedApiKeyRestrictions.d.ts.map +1 -0
  146. package/dist/model/semanticSearch.d.ts +2 -2
  147. package/dist/model/snippetResult.d.ts +1 -1
  148. package/dist/model/snippetResult.d.ts.map +1 -1
  149. package/dist/model/snippetResultOption.d.ts +2 -2
  150. package/dist/model/sortRemainingBy.d.ts +1 -1
  151. package/dist/model/supportedLanguage.d.ts +5 -0
  152. package/dist/model/supportedLanguage.d.ts.map +1 -0
  153. package/dist/model/tagFilters.d.ts +2 -3
  154. package/dist/model/tagFilters.d.ts.map +1 -1
  155. package/dist/model/taskStatus.d.ts +1 -1
  156. package/dist/model/timeRange.d.ts +2 -2
  157. package/dist/model/typoTolerance.d.ts +1 -1
  158. package/dist/model/typoToleranceEnum.d.ts +3 -0
  159. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  160. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  161. package/dist/model/updatedAtResponse.d.ts +2 -2
  162. package/dist/model/updatedAtWithObjectIdResponse.d.ts +3 -3
  163. package/dist/model/updatedRuleResponse.d.ts +3 -3
  164. package/dist/model/userHit.d.ts +1 -1
  165. package/dist/model/userId.d.ts +1 -1
  166. package/dist/model/value.d.ts +5 -1
  167. package/dist/model/value.d.ts.map +1 -1
  168. package/dist/src/searchClient.d.ts +385 -208
  169. package/dist/src/searchClient.d.ts.map +1 -1
  170. package/model/acl.ts +1 -1
  171. package/model/action.ts +1 -1
  172. package/model/addApiKeyResponse.ts +1 -1
  173. package/model/anchoring.ts +1 -1
  174. package/model/apiKey.ts +8 -8
  175. package/model/{mixedSearchFilters.ts → apiKeyOperation.ts} +1 -1
  176. package/model/aroundPrecision.ts +1 -1
  177. package/model/aroundPrecisionFromValueInner.ts +9 -0
  178. package/model/aroundRadius.ts +1 -1
  179. package/model/aroundRadiusAll.ts +3 -0
  180. package/model/automaticFacetFilter.ts +4 -4
  181. package/model/automaticFacetFilters.ts +1 -1
  182. package/model/baseGetApiKeyResponse.ts +1 -1
  183. package/model/baseIndexSettings.ts +25 -18
  184. package/model/baseSearchParamsWithoutQuery.ts +26 -30
  185. package/model/baseSearchResponse.ts +9 -24
  186. package/model/batchDictionaryEntriesParams.ts +3 -3
  187. package/model/batchResponse.ts +2 -2
  188. package/model/browsePagination.ts +23 -0
  189. package/model/browseResponse.ts +2 -0
  190. package/model/builtInOperation.ts +2 -2
  191. package/model/builtInOperationType.ts +1 -1
  192. package/model/clientMethodProps.ts +156 -70
  193. package/model/condition.ts +8 -3
  194. package/model/consequence.ts +5 -5
  195. package/model/consequenceHide.ts +2 -2
  196. package/model/consequenceQuery.ts +1 -1
  197. package/model/consequenceQueryObject.ts +2 -2
  198. package/model/createdAtResponse.ts +1 -1
  199. package/model/cursor.ts +1 -1
  200. package/model/deleteApiKeyResponse.ts +1 -1
  201. package/model/deleteByParams.ts +4 -4
  202. package/model/deleteSourceResponse.ts +1 -1
  203. package/model/deletedAtResponse.ts +2 -2
  204. package/model/dictionaryEntry.ts +6 -8
  205. package/model/dictionaryEntryState.ts +1 -1
  206. package/model/dictionaryLanguage.ts +2 -2
  207. package/model/dictionarySettingsParams.ts +1 -1
  208. package/model/distinct.ts +1 -1
  209. package/model/edit.ts +1 -1
  210. package/model/exactOnSingleWordQuery.ts +1 -1
  211. package/model/facetFilters.ts +2 -4
  212. package/model/facetHits.ts +2 -2
  213. package/model/facetOrdering.ts +2 -2
  214. package/model/facets.ts +2 -2
  215. package/model/fetchedIndex.ts +6 -1
  216. package/model/getObjectsRequest.ts +3 -3
  217. package/model/getObjectsResponse.ts +1 -1
  218. package/model/hasPendingMappingsResponse.ts +1 -1
  219. package/model/highlightResult.ts +1 -0
  220. package/model/highlightResultOption.ts +3 -3
  221. package/model/hit.ts +4 -4
  222. package/model/ignorePlurals.ts +4 -2
  223. package/model/index.ts +8 -1
  224. package/model/indexSettings.ts +1 -1
  225. package/model/indexSettingsAsSearchParams.ts +32 -36
  226. package/model/log.ts +11 -11
  227. package/model/logQuery.ts +1 -1
  228. package/model/matchLevel.ts +1 -1
  229. package/model/mode.ts +1 -1
  230. package/model/multipleBatchRequest.ts +1 -1
  231. package/model/multipleBatchResponse.ts +2 -2
  232. package/model/numericFilters.ts +2 -4
  233. package/model/operationIndexParams.ts +2 -2
  234. package/model/operationType.ts +1 -1
  235. package/model/optionalFilters.ts +2 -4
  236. package/model/params.ts +1 -1
  237. package/model/promoteObjectID.ts +2 -2
  238. package/model/promoteObjectIDs.ts +2 -2
  239. package/model/queryType.ts +1 -1
  240. package/model/rankingInfo.ts +13 -10
  241. package/model/reRankingApplyFilter.ts +2 -4
  242. package/model/redirect.ts +1 -1
  243. package/model/redirectURL.ts +8 -0
  244. package/model/removeStopWords.ts +4 -2
  245. package/model/removeUserIdResponse.ts +1 -1
  246. package/model/removeWordsIfNoResults.ts +1 -1
  247. package/model/renderingContent.ts +4 -1
  248. package/model/replaceAllObjectsResponse.ts +15 -0
  249. package/model/replaceSourceResponse.ts +1 -1
  250. package/model/rule.ts +5 -5
  251. package/model/saveObjectResponse.ts +3 -3
  252. package/model/saveSynonymResponse.ts +2 -2
  253. package/model/searchDictionaryEntriesParams.ts +6 -7
  254. package/model/searchDictionaryEntriesResponse.ts +25 -0
  255. package/model/searchForFacetValuesRequest.ts +1 -1
  256. package/model/searchForFacetValuesResponse.ts +4 -1
  257. package/model/searchForFacetsOptions.ts +2 -2
  258. package/model/searchForHitsOptions.ts +1 -1
  259. package/model/searchHits.ts +6 -3
  260. package/model/searchPagination.ts +23 -0
  261. package/model/searchParamsObject.ts +3 -0
  262. package/model/searchParamsQuery.ts +1 -1
  263. package/model/searchResponse.ts +3 -1
  264. package/model/searchRulesParams.ts +4 -9
  265. package/model/searchRulesResponse.ts +2 -2
  266. package/model/searchStrategy.ts +1 -1
  267. package/model/searchSynonymsParams.ts +2 -2
  268. package/model/searchSynonymsResponse.ts +2 -2
  269. package/model/searchUserIdsParams.ts +1 -1
  270. package/model/searchUserIdsResponse.ts +3 -3
  271. package/model/securedApiKeyRestrictions.ts +32 -0
  272. package/model/semanticSearch.ts +2 -2
  273. package/model/snippetResult.ts +2 -1
  274. package/model/snippetResultOption.ts +2 -2
  275. package/model/sortRemainingBy.ts +1 -1
  276. package/model/supportedLanguage.ts +74 -0
  277. package/model/tagFilters.ts +2 -4
  278. package/model/taskStatus.ts +1 -1
  279. package/model/timeRange.ts +2 -2
  280. package/model/typoTolerance.ts +1 -1
  281. package/model/typoToleranceEnum.ts +3 -0
  282. package/model/updateApiKeyResponse.ts +1 -1
  283. package/model/updatedAtResponse.ts +2 -2
  284. package/model/updatedAtWithObjectIdResponse.ts +3 -3
  285. package/model/updatedRuleResponse.ts +3 -3
  286. package/model/userHit.ts +1 -1
  287. package/model/userId.ts +1 -1
  288. package/model/value.ts +6 -1
  289. package/package.json +11 -8
  290. package/dist/model/mixedSearchFilters.d.ts +0 -2
  291. package/dist/model/mixedSearchFilters.d.ts.map +0 -1
@@ -2,7 +2,9 @@
2
2
 
3
3
  import type { CreateIterablePromise } from '@algolia/client-common';
4
4
 
5
+ import type { Action } from './action';
5
6
  import type { ApiKey } from './apiKey';
7
+ import type { ApiKeyOperation } from './apiKeyOperation';
6
8
  import type { AssignUserIdParams } from './assignUserIdParams';
7
9
  import type { AttributeToUpdate } from './attributeToUpdate';
8
10
  import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
@@ -23,6 +25,7 @@ import type { SearchParams } from './searchParams';
23
25
  import type { SearchParamsObject } from './searchParamsObject';
24
26
  import type { SearchRulesParams } from './searchRulesParams';
25
27
  import type { SearchSynonymsParams } from './searchSynonymsParams';
28
+ import type { SecuredApiKeyRestrictions } from './securedApiKeyRestrictions';
26
29
  import type { Source } from './source';
27
30
  import type { SynonymHit } from './synonymHit';
28
31
 
@@ -31,15 +34,15 @@ import type { SynonymHit } from './synonymHit';
31
34
  */
32
35
  export type AddOrUpdateObjectProps = {
33
36
  /**
34
- * Index on which to perform the request.
37
+ * Name of the index on which to perform the operation.
35
38
  */
36
39
  indexName: string;
37
40
  /**
38
- * Unique record (object) identifier.
41
+ * Unique record identifier.
39
42
  */
40
43
  objectID: string;
41
44
  /**
42
- * Algolia record.
45
+ * The record, a schemaless object with attributes that are useful in the context of search and discovery.
43
46
  */
44
47
  body: Record<string, any>;
45
48
  };
@@ -49,7 +52,7 @@ export type AddOrUpdateObjectProps = {
49
52
  */
50
53
  export type AssignUserIdProps = {
51
54
  /**
52
- * UserID to assign.
55
+ * Unique identifier of the user who makes the search request.
53
56
  */
54
57
  xAlgoliaUserID: string;
55
58
  assignUserIdParams: AssignUserIdParams;
@@ -60,7 +63,7 @@ export type AssignUserIdProps = {
60
63
  */
61
64
  export type BatchProps = {
62
65
  /**
63
- * Index on which to perform the request.
66
+ * Name of the index on which to perform the operation.
64
67
  */
65
68
  indexName: string;
66
69
  batchWriteParams: BatchWriteParams;
@@ -71,7 +74,7 @@ export type BatchProps = {
71
74
  */
72
75
  export type BatchAssignUserIdsProps = {
73
76
  /**
74
- * UserID to assign.
77
+ * Unique identifier of the user who makes the search request.
75
78
  */
76
79
  xAlgoliaUserID: string;
77
80
  batchAssignUserIdsParams: BatchAssignUserIdsParams;
@@ -82,7 +85,7 @@ export type BatchAssignUserIdsProps = {
82
85
  */
83
86
  export type BatchDictionaryEntriesProps = {
84
87
  /**
85
- * Dictionary to search in.
88
+ * Dictionary type in which to search.
86
89
  */
87
90
  dictionaryName: DictionaryType;
88
91
  batchDictionaryEntriesParams: BatchDictionaryEntriesParams;
@@ -93,7 +96,7 @@ export type BatchDictionaryEntriesProps = {
93
96
  */
94
97
  export type BrowseProps = {
95
98
  /**
96
- * Index on which to perform the request.
99
+ * Name of the index on which to perform the operation.
97
100
  */
98
101
  indexName: string;
99
102
  browseParams?: BrowseParams;
@@ -104,7 +107,7 @@ export type BrowseProps = {
104
107
  */
105
108
  export type ClearObjectsProps = {
106
109
  /**
107
- * Index on which to perform the request.
110
+ * Name of the index on which to perform the operation.
108
111
  */
109
112
  indexName: string;
110
113
  };
@@ -114,11 +117,11 @@ export type ClearObjectsProps = {
114
117
  */
115
118
  export type ClearRulesProps = {
116
119
  /**
117
- * Index on which to perform the request.
120
+ * Name of the index on which to perform the operation.
118
121
  */
119
122
  indexName: string;
120
123
  /**
121
- * Indicates whether changed index settings are forwarded to the replica indices.
124
+ * Whether changes are applied to replica indices.
122
125
  */
123
126
  forwardToReplicas?: boolean;
124
127
  };
@@ -128,11 +131,11 @@ export type ClearRulesProps = {
128
131
  */
129
132
  export type ClearSynonymsProps = {
130
133
  /**
131
- * Index on which to perform the request.
134
+ * Name of the index on which to perform the operation.
132
135
  */
133
136
  indexName: string;
134
137
  /**
135
- * Indicates whether changed index settings are forwarded to the replica indices.
138
+ * Whether changes are applied to replica indices.
136
139
  */
137
140
  forwardToReplicas?: boolean;
138
141
  };
@@ -216,7 +219,7 @@ export type DeleteApiKeyProps = {
216
219
  */
217
220
  export type DeleteByProps = {
218
221
  /**
219
- * Index on which to perform the request.
222
+ * Name of the index on which to perform the operation.
220
223
  */
221
224
  indexName: string;
222
225
  deleteByParams: DeleteByParams;
@@ -227,7 +230,7 @@ export type DeleteByProps = {
227
230
  */
228
231
  export type DeleteIndexProps = {
229
232
  /**
230
- * Index on which to perform the request.
233
+ * Name of the index on which to perform the operation.
231
234
  */
232
235
  indexName: string;
233
236
  };
@@ -237,11 +240,11 @@ export type DeleteIndexProps = {
237
240
  */
238
241
  export type DeleteObjectProps = {
239
242
  /**
240
- * Index on which to perform the request.
243
+ * Name of the index on which to perform the operation.
241
244
  */
242
245
  indexName: string;
243
246
  /**
244
- * Unique record (object) identifier.
247
+ * Unique record identifier.
245
248
  */
246
249
  objectID: string;
247
250
  };
@@ -251,7 +254,7 @@ export type DeleteObjectProps = {
251
254
  */
252
255
  export type DeleteRuleProps = {
253
256
  /**
254
- * Index on which to perform the request.
257
+ * Name of the index on which to perform the operation.
255
258
  */
256
259
  indexName: string;
257
260
  /**
@@ -259,7 +262,7 @@ export type DeleteRuleProps = {
259
262
  */
260
263
  objectID: string;
261
264
  /**
262
- * Indicates whether changed index settings are forwarded to the replica indices.
265
+ * Whether changes are applied to replica indices.
263
266
  */
264
267
  forwardToReplicas?: boolean;
265
268
  };
@@ -279,7 +282,7 @@ export type DeleteSourceProps = {
279
282
  */
280
283
  export type DeleteSynonymProps = {
281
284
  /**
282
- * Index on which to perform the request.
285
+ * Name of the index on which to perform the operation.
283
286
  */
284
287
  indexName: string;
285
288
  /**
@@ -287,7 +290,7 @@ export type DeleteSynonymProps = {
287
290
  */
288
291
  objectID: string;
289
292
  /**
290
- * Indicates whether changed index settings are forwarded to the replica indices.
293
+ * Whether changes are applied to replica indices.
291
294
  */
292
295
  forwardToReplicas?: boolean;
293
296
  };
@@ -302,12 +305,22 @@ export type GetApiKeyProps = {
302
305
  key: string;
303
306
  };
304
307
 
308
+ /**
309
+ * Properties for the `getAppTask` method.
310
+ */
311
+ export type GetAppTaskProps = {
312
+ /**
313
+ * Unique task identifier.
314
+ */
315
+ taskID: number;
316
+ };
317
+
305
318
  /**
306
319
  * Properties for the `getLogs` method.
307
320
  */
308
321
  export type GetLogsProps = {
309
322
  /**
310
- * First log entry to retrieve. Sorted by decreasing date with 0 being the most recent.
323
+ * First log entry to retrieve. The most recent entries are listed first.
311
324
  */
312
325
  offset?: number;
313
326
  /**
@@ -315,11 +328,11 @@ export type GetLogsProps = {
315
328
  */
316
329
  length?: number;
317
330
  /**
318
- * Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
331
+ * Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
319
332
  */
320
333
  indexName?: string;
321
334
  /**
322
- * Type of log entries to retrieve. When omitted, all log entries are retrieved.
335
+ * Type of log entries to retrieve. By default, all log entries are retrieved.
323
336
  */
324
337
  type?: LogType;
325
338
  };
@@ -329,15 +342,15 @@ export type GetLogsProps = {
329
342
  */
330
343
  export type GetObjectProps = {
331
344
  /**
332
- * Index on which to perform the request.
345
+ * Name of the index on which to perform the operation.
333
346
  */
334
347
  indexName: string;
335
348
  /**
336
- * Unique record (object) identifier.
349
+ * Unique record identifier.
337
350
  */
338
351
  objectID: string;
339
352
  /**
340
- * Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved, even when not specified. [`unretrievableAttributes`](https://www.algolia.com/doc/api-reference/api-parameters/unretrievableAttributes/) won\'t be retrieved unless the request is authenticated with the admin API key.
353
+ * Attributes to include with the records in the response. This is useful to reduce the size of the API response. By default, all retrievable attributes are returned. `objectID` is always retrieved. Attributes included in `unretrievableAttributes` won\'t be retrieved unless the request is authenticated with the admin API key.
341
354
  */
342
355
  attributesToRetrieve?: string[];
343
356
  };
@@ -347,7 +360,7 @@ export type GetObjectProps = {
347
360
  */
348
361
  export type GetRuleProps = {
349
362
  /**
350
- * Index on which to perform the request.
363
+ * Name of the index on which to perform the operation.
351
364
  */
352
365
  indexName: string;
353
366
  /**
@@ -361,7 +374,7 @@ export type GetRuleProps = {
361
374
  */
362
375
  export type GetSettingsProps = {
363
376
  /**
364
- * Index on which to perform the request.
377
+ * Name of the index on which to perform the operation.
365
378
  */
366
379
  indexName: string;
367
380
  };
@@ -371,7 +384,7 @@ export type GetSettingsProps = {
371
384
  */
372
385
  export type GetSynonymProps = {
373
386
  /**
374
- * Index on which to perform the request.
387
+ * Name of the index on which to perform the operation.
375
388
  */
376
389
  indexName: string;
377
390
  /**
@@ -385,7 +398,7 @@ export type GetSynonymProps = {
385
398
  */
386
399
  export type GetTaskProps = {
387
400
  /**
388
- * Index on which to perform the request.
401
+ * Name of the index on which to perform the operation.
389
402
  */
390
403
  indexName: string;
391
404
  /**
@@ -399,7 +412,7 @@ export type GetTaskProps = {
399
412
  */
400
413
  export type GetUserIdProps = {
401
414
  /**
402
- * UserID to assign.
415
+ * Unique identifier of the user who makes the search request.
403
416
  */
404
417
  userID: string;
405
418
  };
@@ -409,7 +422,7 @@ export type GetUserIdProps = {
409
422
  */
410
423
  export type HasPendingMappingsProps = {
411
424
  /**
412
- * Indicates whether to include the cluster\'s pending mapping state in the response.
425
+ * Whether to include the cluster\'s pending mapping state in the response.
413
426
  */
414
427
  getClusters?: boolean;
415
428
  };
@@ -419,11 +432,11 @@ export type HasPendingMappingsProps = {
419
432
  */
420
433
  export type ListIndicesProps = {
421
434
  /**
422
- * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
435
+ * Requested page of the API response. If `null`, the API response is not paginated.
423
436
  */
424
437
  page?: number;
425
438
  /**
426
- * Maximum number of hits per page.
439
+ * Number of hits per page.
427
440
  */
428
441
  hitsPerPage?: number;
429
442
  };
@@ -433,11 +446,11 @@ export type ListIndicesProps = {
433
446
  */
434
447
  export type ListUserIdsProps = {
435
448
  /**
436
- * Returns the requested page number. The page size is determined by the `hitsPerPage` parameter. You can see the number of available pages in the `nbPages` response attribute. When `page` is null, the API response is not paginated.
449
+ * Requested page of the API response. If `null`, the API response is not paginated.
437
450
  */
438
451
  page?: number;
439
452
  /**
440
- * Maximum number of hits per page.
453
+ * Number of hits per page.
441
454
  */
442
455
  hitsPerPage?: number;
443
456
  };
@@ -447,7 +460,7 @@ export type ListUserIdsProps = {
447
460
  */
448
461
  export type OperationIndexProps = {
449
462
  /**
450
- * Index on which to perform the request.
463
+ * Name of the index on which to perform the operation.
451
464
  */
452
465
  indexName: string;
453
466
  operationIndexParams: OperationIndexParams;
@@ -458,19 +471,19 @@ export type OperationIndexProps = {
458
471
  */
459
472
  export type PartialUpdateObjectProps = {
460
473
  /**
461
- * Index on which to perform the request.
474
+ * Name of the index on which to perform the operation.
462
475
  */
463
476
  indexName: string;
464
477
  /**
465
- * Unique record (object) identifier.
478
+ * Unique record identifier.
466
479
  */
467
480
  objectID: string;
468
481
  /**
469
- * Object with attributes to update.
482
+ * Attributes with their values.
470
483
  */
471
484
  attributesToUpdate: Record<string, AttributeToUpdate>;
472
485
  /**
473
- * Indicates whether to create a new record if it doesn\'t exist yet.
486
+ * Whether to create a new record if it doesn\'t exist.
474
487
  */
475
488
  createIfNotExists?: boolean;
476
489
  };
@@ -480,7 +493,7 @@ export type PartialUpdateObjectProps = {
480
493
  */
481
494
  export type RemoveUserIdProps = {
482
495
  /**
483
- * UserID to assign.
496
+ * Unique identifier of the user who makes the search request.
484
497
  */
485
498
  userID: string;
486
499
  };
@@ -510,11 +523,11 @@ export type RestoreApiKeyProps = {
510
523
  */
511
524
  export type SaveObjectProps = {
512
525
  /**
513
- * Index on which to perform the request.
526
+ * Name of the index on which to perform the operation.
514
527
  */
515
528
  indexName: string;
516
529
  /**
517
- * The Algolia record.
530
+ * The record, a schemaless object with attributes that are useful in the context of search and discovery.
518
531
  */
519
532
  body: Record<string, any>;
520
533
  };
@@ -524,7 +537,7 @@ export type SaveObjectProps = {
524
537
  */
525
538
  export type SaveRuleProps = {
526
539
  /**
527
- * Index on which to perform the request.
540
+ * Name of the index on which to perform the operation.
528
541
  */
529
542
  indexName: string;
530
543
  /**
@@ -533,7 +546,7 @@ export type SaveRuleProps = {
533
546
  objectID: string;
534
547
  rule: Rule;
535
548
  /**
536
- * Indicates whether changed index settings are forwarded to the replica indices.
549
+ * Whether changes are applied to replica indices.
537
550
  */
538
551
  forwardToReplicas?: boolean;
539
552
  };
@@ -543,16 +556,16 @@ export type SaveRuleProps = {
543
556
  */
544
557
  export type SaveRulesProps = {
545
558
  /**
546
- * Index on which to perform the request.
559
+ * Name of the index on which to perform the operation.
547
560
  */
548
561
  indexName: string;
549
562
  rules: Rule[];
550
563
  /**
551
- * Indicates whether changed index settings are forwarded to the replica indices.
564
+ * Whether changes are applied to replica indices.
552
565
  */
553
566
  forwardToReplicas?: boolean;
554
567
  /**
555
- * Indicates whether existing rules should be deleted before adding this batch.
568
+ * Whether existing rules should be deleted before adding this batch.
556
569
  */
557
570
  clearExistingRules?: boolean;
558
571
  };
@@ -562,7 +575,7 @@ export type SaveRulesProps = {
562
575
  */
563
576
  export type SaveSynonymProps = {
564
577
  /**
565
- * Index on which to perform the request.
578
+ * Name of the index on which to perform the operation.
566
579
  */
567
580
  indexName: string;
568
581
  /**
@@ -571,7 +584,7 @@ export type SaveSynonymProps = {
571
584
  objectID: string;
572
585
  synonymHit: SynonymHit;
573
586
  /**
574
- * Indicates whether changed index settings are forwarded to the replica indices.
587
+ * Whether changes are applied to replica indices.
575
588
  */
576
589
  forwardToReplicas?: boolean;
577
590
  };
@@ -581,16 +594,16 @@ export type SaveSynonymProps = {
581
594
  */
582
595
  export type SaveSynonymsProps = {
583
596
  /**
584
- * Index on which to perform the request.
597
+ * Name of the index on which to perform the operation.
585
598
  */
586
599
  indexName: string;
587
600
  synonymHit: SynonymHit[];
588
601
  /**
589
- * Indicates whether changed index settings are forwarded to the replica indices.
602
+ * Whether changes are applied to replica indices.
590
603
  */
591
604
  forwardToReplicas?: boolean;
592
605
  /**
593
- * Indicates whether to replace all synonyms in the index with the ones sent with this request.
606
+ * Whether to replace all synonyms in the index with the ones sent with this request.
594
607
  */
595
608
  replaceExistingSynonyms?: boolean;
596
609
  };
@@ -632,7 +645,7 @@ export type LegacySearchMethodProps = LegacySearchQuery[];
632
645
  */
633
646
  export type SearchDictionaryEntriesProps = {
634
647
  /**
635
- * Dictionary to search in.
648
+ * Dictionary type in which to search.
636
649
  */
637
650
  dictionaryName: DictionaryType;
638
651
  searchDictionaryEntriesParams: SearchDictionaryEntriesParams;
@@ -643,11 +656,11 @@ export type SearchDictionaryEntriesProps = {
643
656
  */
644
657
  export type SearchForFacetValuesProps = {
645
658
  /**
646
- * Index on which to perform the request.
659
+ * Name of the index on which to perform the operation.
647
660
  */
648
661
  indexName: string;
649
662
  /**
650
- * Facet name.
663
+ * Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
651
664
  */
652
665
  facetName: string;
653
666
  searchForFacetValuesRequest?: SearchForFacetValuesRequest;
@@ -658,7 +671,7 @@ export type SearchForFacetValuesProps = {
658
671
  */
659
672
  export type SearchRulesProps = {
660
673
  /**
661
- * Index on which to perform the request.
674
+ * Name of the index on which to perform the operation.
662
675
  */
663
676
  indexName: string;
664
677
  searchRulesParams?: SearchRulesParams;
@@ -669,7 +682,7 @@ export type SearchRulesProps = {
669
682
  */
670
683
  export type SearchSingleIndexProps = {
671
684
  /**
672
- * Index on which to perform the request.
685
+ * Name of the index on which to perform the operation.
673
686
  */
674
687
  indexName: string;
675
688
  searchParams?: SearchParams;
@@ -680,7 +693,7 @@ export type SearchSingleIndexProps = {
680
693
  */
681
694
  export type SearchSynonymsProps = {
682
695
  /**
683
- * Index on which to perform the request.
696
+ * Name of the index on which to perform the operation.
684
697
  */
685
698
  indexName: string;
686
699
  /**
@@ -694,12 +707,12 @@ export type SearchSynonymsProps = {
694
707
  */
695
708
  export type SetSettingsProps = {
696
709
  /**
697
- * Index on which to perform the request.
710
+ * Name of the index on which to perform the operation.
698
711
  */
699
712
  indexName: string;
700
713
  indexSettings: IndexSettings;
701
714
  /**
702
- * Indicates whether changed index settings are forwarded to the replica indices.
715
+ * Whether changes are applied to replica indices.
703
716
  */
704
717
  forwardToReplicas?: boolean;
705
718
  };
@@ -735,17 +748,20 @@ type WaitForOptions = Partial<{
735
748
  timeout: (retryCount: number) => number;
736
749
  }>;
737
750
 
738
- export type WaitForTaskOptions = WaitForOptions & {
739
- /**
740
- * The `indexName` where the operation was performed.
741
- */
742
- indexName: string;
751
+ export type WaitForAppTaskOptions = WaitForOptions & {
743
752
  /**
744
753
  * The `taskID` returned by the method response.
745
754
  */
746
755
  taskID: number;
747
756
  };
748
757
 
758
+ export type WaitForTaskOptions = WaitForAppTaskOptions & {
759
+ /**
760
+ * The `indexName` where the operation was performed.
761
+ */
762
+ indexName: string;
763
+ };
764
+
749
765
  export type WaitForApiKeyOptions = WaitForOptions & {
750
766
  /**
751
767
  * The API Key.
@@ -756,17 +772,87 @@ export type WaitForApiKeyOptions = WaitForOptions & {
756
772
  /**
757
773
  * The operation that has been performed, used to compute the stop condition.
758
774
  */
759
- operation: 'add' | 'delete';
775
+ operation: Extract<ApiKeyOperation, 'add' | 'delete'>;
760
776
  apiKey?: never;
761
777
  }
762
778
  | {
763
779
  /**
764
780
  * The operation that has been performed, used to compute the stop condition.
765
781
  */
766
- operation: 'update';
782
+ operation: Extract<ApiKeyOperation, 'update'>;
767
783
  /**
768
784
  * The updated fields, used to compute the stop condition.
769
785
  */
770
786
  apiKey: Partial<ApiKey>;
771
787
  }
772
788
  );
789
+
790
+ export type GenerateSecuredApiKeyOptions = {
791
+ /**
792
+ * The base API key from which to generate the new secured one.
793
+ */
794
+ parentApiKey: string;
795
+
796
+ /**
797
+ * A set of properties defining the restrictions of the secured API key.
798
+ */
799
+ restrictions?: SecuredApiKeyRestrictions;
800
+ };
801
+
802
+ export type GetSecuredApiKeyRemainingValidityOptions = {
803
+ /**
804
+ * The secured API key generated with the `generateSecuredApiKey` method.
805
+ */
806
+ securedApiKey: string;
807
+ };
808
+
809
+ export type DeleteObjectsOptions = Pick<ChunkedBatchOptions, 'indexName'> & {
810
+ /**
811
+ * The objectIDs to delete.
812
+ */
813
+ objectIDs: string[];
814
+ };
815
+
816
+ export type PartialUpdateObjectsOptions = Pick<
817
+ ChunkedBatchOptions,
818
+ 'indexName' | 'objects'
819
+ > & {
820
+ /**
821
+ *To be provided if non-existing objects are passed, otherwise, the call will fail.
822
+ */
823
+ createIfNotExists?: boolean;
824
+ };
825
+
826
+ export type SaveObjectsOptions = Pick<
827
+ ChunkedBatchOptions,
828
+ 'indexName' | 'objects'
829
+ >;
830
+
831
+ export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
832
+ /**
833
+ * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
834
+ */
835
+ action?: Action;
836
+
837
+ /**
838
+ * Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.
839
+ */
840
+ waitForTasks?: boolean;
841
+ };
842
+
843
+ export type ReplaceAllObjectsOptions = {
844
+ /**
845
+ * The `indexName` to replace `objects` in.
846
+ */
847
+ indexName: string;
848
+
849
+ /**
850
+ * The array of `objects` to store in the given Algolia `indexName`.
851
+ */
852
+ objects: Array<Record<string, any>>;
853
+
854
+ /**
855
+ * The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
856
+ */
857
+ batchSize?: number;
858
+ };
@@ -4,19 +4,24 @@ import type { Anchoring } from './anchoring';
4
4
 
5
5
  export type Condition = {
6
6
  /**
7
- * Query pattern syntax.
7
+ * Query pattern that triggers the rule. You can use either a literal string, or a special pattern `{facet:ATTRIBUTE}`, where `ATTRIBUTE` is a facet name. The rule is triggered if the query matches the literal string or a value of the specified facet. For example, with `pattern: {facet:genre}`, the rule is triggered when users search for a genre, such as \"comedy\".
8
8
  */
9
9
  pattern?: string;
10
10
 
11
11
  anchoring?: Anchoring;
12
12
 
13
13
  /**
14
- * Whether the pattern matches on plurals, synonyms, and typos.
14
+ * Whether the pattern should match plurals, synonyms, and typos.
15
15
  */
16
16
  alternatives?: boolean;
17
17
 
18
18
  /**
19
- * Rule context format: [A-Za-z0-9_-]+).
19
+ * An additional restriction that only triggers the rule, when the search has the same value as `ruleContexts` parameter. For example, if `context: mobile`, the rule is only triggered when the search request has a matching `ruleContexts: mobile`. A rule context must only contain alphanumeric characters.
20
20
  */
21
21
  context?: string;
22
+
23
+ /**
24
+ * Filters that trigger the rule. You can add add filters using the syntax `facet:value` so that the rule is triggered, when the specific filter is selected. You can use `filters` on its own or combine it with the `pattern` parameter.
25
+ */
26
+ filters?: string;
22
27
  };
@@ -5,28 +5,28 @@ import type { ConsequenceParams } from './consequenceParams';
5
5
  import type { Promote } from './promote';
6
6
 
7
7
  /**
8
- * [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences) of a rule.
8
+ * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
9
9
  */
10
10
  export type Consequence = {
11
11
  params?: ConsequenceParams;
12
12
 
13
13
  /**
14
- * Records to promote.
14
+ * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
15
15
  */
16
16
  promote?: Promote[];
17
17
 
18
18
  /**
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.
19
+ * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
20
20
  */
21
21
  filterPromotes?: boolean;
22
22
 
23
23
  /**
24
- * Records to hide. By default, you can hide up to 50 records per rule.
24
+ * Records you want to hide from the search results.
25
25
  */
26
26
  hide?: ConsequenceHide[];
27
27
 
28
28
  /**
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.
29
+ * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1&nbsp;kB of minified JSON.
30
30
  */
31
31
  userData?: any | null;
32
32
  };