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

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 (267) hide show
  1. package/dist/builds/browser.d.ts +86 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +104 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-search.cjs +419 -219
  6. package/dist/client-search.esm.browser.js +376 -212
  7. package/dist/client-search.esm.node.js +420 -220
  8. package/dist/client-search.umd.js +2 -2
  9. package/dist/model/acl.d.ts +1 -1
  10. package/dist/model/action.d.ts +1 -1
  11. package/dist/model/addApiKeyResponse.d.ts +1 -1
  12. package/dist/model/anchoring.d.ts +1 -1
  13. package/dist/model/apiKey.d.ts +8 -8
  14. package/dist/model/apiKeyOperation.d.ts +2 -0
  15. package/dist/model/apiKeyOperation.d.ts.map +1 -0
  16. package/dist/model/aroundPrecision.d.ts +1 -1
  17. package/dist/model/aroundPrecisionFromValueInner.d.ts +9 -0
  18. package/dist/model/aroundPrecisionFromValueInner.d.ts.map +1 -1
  19. package/dist/model/aroundRadius.d.ts +1 -1
  20. package/dist/model/aroundRadiusAll.d.ts +3 -0
  21. package/dist/model/aroundRadiusAll.d.ts.map +1 -1
  22. package/dist/model/automaticFacetFilter.d.ts +4 -4
  23. package/dist/model/automaticFacetFilters.d.ts +1 -1
  24. package/dist/model/baseGetApiKeyResponse.d.ts +1 -1
  25. package/dist/model/baseIndexSettings.d.ts +22 -17
  26. package/dist/model/baseIndexSettings.d.ts.map +1 -1
  27. package/dist/model/baseSearchParamsWithoutQuery.d.ts +26 -29
  28. package/dist/model/baseSearchParamsWithoutQuery.d.ts.map +1 -1
  29. package/dist/model/baseSearchResponse.d.ts +10 -6
  30. package/dist/model/baseSearchResponse.d.ts.map +1 -1
  31. package/dist/model/batchDictionaryEntriesParams.d.ts +3 -3
  32. package/dist/model/batchResponse.d.ts +2 -2
  33. package/dist/model/builtInOperation.d.ts +2 -2
  34. package/dist/model/builtInOperationType.d.ts +1 -1
  35. package/dist/model/clientMethodProps.d.ts +124 -65
  36. package/dist/model/clientMethodProps.d.ts.map +1 -1
  37. package/dist/model/condition.d.ts +7 -3
  38. package/dist/model/condition.d.ts.map +1 -1
  39. package/dist/model/consequence.d.ts +5 -5
  40. package/dist/model/consequenceHide.d.ts +2 -2
  41. package/dist/model/consequenceQuery.d.ts +1 -1
  42. package/dist/model/consequenceQueryObject.d.ts +2 -2
  43. package/dist/model/createdAtResponse.d.ts +1 -1
  44. package/dist/model/cursor.d.ts +1 -1
  45. package/dist/model/deleteApiKeyResponse.d.ts +1 -1
  46. package/dist/model/deleteByParams.d.ts +4 -4
  47. package/dist/model/deleteSourceResponse.d.ts +1 -1
  48. package/dist/model/deletedAtResponse.d.ts +2 -2
  49. package/dist/model/dictionaryEntry.d.ts +6 -8
  50. package/dist/model/dictionaryEntry.d.ts.map +1 -1
  51. package/dist/model/dictionaryEntryState.d.ts +1 -1
  52. package/dist/model/dictionaryLanguage.d.ts +2 -2
  53. package/dist/model/dictionarySettingsParams.d.ts +1 -1
  54. package/dist/model/distinct.d.ts +1 -1
  55. package/dist/model/edit.d.ts +1 -1
  56. package/dist/model/exactOnSingleWordQuery.d.ts +1 -1
  57. package/dist/model/facetFilters.d.ts +2 -3
  58. package/dist/model/facetFilters.d.ts.map +1 -1
  59. package/dist/model/facetHits.d.ts +2 -2
  60. package/dist/model/facetOrdering.d.ts +2 -2
  61. package/dist/model/facets.d.ts +2 -2
  62. package/dist/model/fetchedIndex.d.ts +1 -1
  63. package/dist/model/getObjectsRequest.d.ts +3 -3
  64. package/dist/model/getObjectsResponse.d.ts +1 -1
  65. package/dist/model/hasPendingMappingsResponse.d.ts +1 -1
  66. package/dist/model/highlightResult.d.ts +1 -1
  67. package/dist/model/highlightResult.d.ts.map +1 -1
  68. package/dist/model/highlightResultOption.d.ts +3 -3
  69. package/dist/model/hit.d.ts +4 -4
  70. package/dist/model/ignorePlurals.d.ts +3 -2
  71. package/dist/model/ignorePlurals.d.ts.map +1 -1
  72. package/dist/model/index.d.ts +4 -1
  73. package/dist/model/index.d.ts.map +1 -1
  74. package/dist/model/indexSettings.d.ts +1 -1
  75. package/dist/model/indexSettingsAsSearchParams.d.ts +32 -35
  76. package/dist/model/indexSettingsAsSearchParams.d.ts.map +1 -1
  77. package/dist/model/log.d.ts +11 -11
  78. package/dist/model/logQuery.d.ts +1 -1
  79. package/dist/model/matchLevel.d.ts +1 -1
  80. package/dist/model/mode.d.ts +1 -1
  81. package/dist/model/multipleBatchRequest.d.ts +1 -1
  82. package/dist/model/multipleBatchResponse.d.ts +2 -2
  83. package/dist/model/numericFilters.d.ts +2 -3
  84. package/dist/model/numericFilters.d.ts.map +1 -1
  85. package/dist/model/operationIndexParams.d.ts +2 -2
  86. package/dist/model/operationType.d.ts +1 -1
  87. package/dist/model/optionalFilters.d.ts +2 -3
  88. package/dist/model/optionalFilters.d.ts.map +1 -1
  89. package/dist/model/params.d.ts +1 -1
  90. package/dist/model/promoteObjectID.d.ts +2 -2
  91. package/dist/model/promoteObjectIDs.d.ts +2 -2
  92. package/dist/model/queryType.d.ts +1 -1
  93. package/dist/model/rankingInfo.d.ts +10 -7
  94. package/dist/model/rankingInfo.d.ts.map +1 -1
  95. package/dist/model/reRankingApplyFilter.d.ts +2 -3
  96. package/dist/model/reRankingApplyFilter.d.ts.map +1 -1
  97. package/dist/model/removeStopWords.d.ts +3 -2
  98. package/dist/model/removeStopWords.d.ts.map +1 -1
  99. package/dist/model/removeUserIdResponse.d.ts +1 -1
  100. package/dist/model/removeWordsIfNoResults.d.ts +1 -1
  101. package/dist/model/renderingContent.d.ts +1 -1
  102. package/dist/model/replaceSourceResponse.d.ts +1 -1
  103. package/dist/model/rule.d.ts +5 -5
  104. package/dist/model/saveObjectResponse.d.ts +3 -3
  105. package/dist/model/saveSynonymResponse.d.ts +2 -2
  106. package/dist/model/searchDictionaryEntriesParams.d.ts +5 -7
  107. package/dist/model/searchDictionaryEntriesParams.d.ts.map +1 -1
  108. package/dist/model/searchDictionaryEntriesResponse.d.ts +20 -0
  109. package/dist/model/searchDictionaryEntriesResponse.d.ts.map +1 -0
  110. package/dist/model/searchForFacetValuesRequest.d.ts +1 -1
  111. package/dist/model/searchForFacetValuesResponse.d.ts +4 -1
  112. package/dist/model/searchForFacetValuesResponse.d.ts.map +1 -1
  113. package/dist/model/searchForFacetsOptions.d.ts +2 -2
  114. package/dist/model/searchForHitsOptions.d.ts +1 -1
  115. package/dist/model/searchHits.d.ts +6 -3
  116. package/dist/model/searchHits.d.ts.map +1 -1
  117. package/dist/model/searchParamsObject.d.ts +3 -0
  118. package/dist/model/searchParamsObject.d.ts.map +1 -1
  119. package/dist/model/searchParamsQuery.d.ts +1 -1
  120. package/dist/model/searchRulesParams.d.ts +4 -8
  121. package/dist/model/searchRulesParams.d.ts.map +1 -1
  122. package/dist/model/searchRulesResponse.d.ts +2 -2
  123. package/dist/model/searchStrategy.d.ts +1 -1
  124. package/dist/model/searchSynonymsParams.d.ts +2 -2
  125. package/dist/model/searchSynonymsResponse.d.ts +2 -2
  126. package/dist/model/searchUserIdsParams.d.ts +1 -1
  127. package/dist/model/searchUserIdsResponse.d.ts +3 -3
  128. package/dist/model/securedAPIKeyRestrictions.d.ts +25 -0
  129. package/dist/model/securedAPIKeyRestrictions.d.ts.map +1 -0
  130. package/dist/model/semanticSearch.d.ts +2 -2
  131. package/dist/model/snippetResult.d.ts +1 -1
  132. package/dist/model/snippetResult.d.ts.map +1 -1
  133. package/dist/model/snippetResultOption.d.ts +2 -2
  134. package/dist/model/sortRemainingBy.d.ts +1 -1
  135. package/dist/model/supportedLanguage.d.ts +5 -0
  136. package/dist/model/supportedLanguage.d.ts.map +1 -0
  137. package/dist/model/tagFilters.d.ts +2 -3
  138. package/dist/model/tagFilters.d.ts.map +1 -1
  139. package/dist/model/taskStatus.d.ts +1 -1
  140. package/dist/model/timeRange.d.ts +2 -2
  141. package/dist/model/typoTolerance.d.ts +1 -1
  142. package/dist/model/typoToleranceEnum.d.ts +3 -0
  143. package/dist/model/typoToleranceEnum.d.ts.map +1 -1
  144. package/dist/model/updateApiKeyResponse.d.ts +1 -1
  145. package/dist/model/updatedAtResponse.d.ts +2 -2
  146. package/dist/model/updatedAtWithObjectIdResponse.d.ts +3 -3
  147. package/dist/model/updatedRuleResponse.d.ts +3 -3
  148. package/dist/model/userHit.d.ts +1 -1
  149. package/dist/model/userId.d.ts +1 -1
  150. package/dist/model/value.d.ts +1 -1
  151. package/dist/src/searchClient.d.ts +324 -202
  152. package/dist/src/searchClient.d.ts.map +1 -1
  153. package/model/acl.ts +1 -1
  154. package/model/action.ts +1 -1
  155. package/model/addApiKeyResponse.ts +1 -1
  156. package/model/anchoring.ts +1 -1
  157. package/model/apiKey.ts +8 -8
  158. package/model/{mixedSearchFilters.ts → apiKeyOperation.ts} +1 -1
  159. package/model/aroundPrecision.ts +1 -1
  160. package/model/aroundPrecisionFromValueInner.ts +9 -0
  161. package/model/aroundRadius.ts +1 -1
  162. package/model/aroundRadiusAll.ts +3 -0
  163. package/model/automaticFacetFilter.ts +4 -4
  164. package/model/automaticFacetFilters.ts +1 -1
  165. package/model/baseGetApiKeyResponse.ts +1 -1
  166. package/model/baseIndexSettings.ts +24 -17
  167. package/model/baseSearchParamsWithoutQuery.ts +26 -30
  168. package/model/baseSearchResponse.ts +11 -6
  169. package/model/batchDictionaryEntriesParams.ts +3 -3
  170. package/model/batchResponse.ts +2 -2
  171. package/model/builtInOperation.ts +2 -2
  172. package/model/builtInOperationType.ts +1 -1
  173. package/model/clientMethodProps.ts +135 -65
  174. package/model/condition.ts +8 -3
  175. package/model/consequence.ts +5 -5
  176. package/model/consequenceHide.ts +2 -2
  177. package/model/consequenceQuery.ts +1 -1
  178. package/model/consequenceQueryObject.ts +2 -2
  179. package/model/createdAtResponse.ts +1 -1
  180. package/model/cursor.ts +1 -1
  181. package/model/deleteApiKeyResponse.ts +1 -1
  182. package/model/deleteByParams.ts +4 -4
  183. package/model/deleteSourceResponse.ts +1 -1
  184. package/model/deletedAtResponse.ts +2 -2
  185. package/model/dictionaryEntry.ts +6 -8
  186. package/model/dictionaryEntryState.ts +1 -1
  187. package/model/dictionaryLanguage.ts +2 -2
  188. package/model/dictionarySettingsParams.ts +1 -1
  189. package/model/distinct.ts +1 -1
  190. package/model/edit.ts +1 -1
  191. package/model/exactOnSingleWordQuery.ts +1 -1
  192. package/model/facetFilters.ts +2 -4
  193. package/model/facetHits.ts +2 -2
  194. package/model/facetOrdering.ts +2 -2
  195. package/model/facets.ts +2 -2
  196. package/model/fetchedIndex.ts +1 -1
  197. package/model/getObjectsRequest.ts +3 -3
  198. package/model/getObjectsResponse.ts +1 -1
  199. package/model/hasPendingMappingsResponse.ts +1 -1
  200. package/model/highlightResult.ts +1 -0
  201. package/model/highlightResultOption.ts +3 -3
  202. package/model/hit.ts +4 -4
  203. package/model/ignorePlurals.ts +4 -2
  204. package/model/index.ts +4 -1
  205. package/model/indexSettings.ts +1 -1
  206. package/model/indexSettingsAsSearchParams.ts +32 -36
  207. package/model/log.ts +11 -11
  208. package/model/logQuery.ts +1 -1
  209. package/model/matchLevel.ts +1 -1
  210. package/model/mode.ts +1 -1
  211. package/model/multipleBatchRequest.ts +1 -1
  212. package/model/multipleBatchResponse.ts +2 -2
  213. package/model/numericFilters.ts +2 -4
  214. package/model/operationIndexParams.ts +2 -2
  215. package/model/operationType.ts +1 -1
  216. package/model/optionalFilters.ts +2 -4
  217. package/model/params.ts +1 -1
  218. package/model/promoteObjectID.ts +2 -2
  219. package/model/promoteObjectIDs.ts +2 -2
  220. package/model/queryType.ts +1 -1
  221. package/model/rankingInfo.ts +10 -7
  222. package/model/reRankingApplyFilter.ts +2 -4
  223. package/model/removeStopWords.ts +4 -2
  224. package/model/removeUserIdResponse.ts +1 -1
  225. package/model/removeWordsIfNoResults.ts +1 -1
  226. package/model/renderingContent.ts +1 -1
  227. package/model/replaceSourceResponse.ts +1 -1
  228. package/model/rule.ts +5 -5
  229. package/model/saveObjectResponse.ts +3 -3
  230. package/model/saveSynonymResponse.ts +2 -2
  231. package/model/searchDictionaryEntriesParams.ts +6 -7
  232. package/model/searchDictionaryEntriesResponse.ts +25 -0
  233. package/model/searchForFacetValuesRequest.ts +1 -1
  234. package/model/searchForFacetValuesResponse.ts +4 -1
  235. package/model/searchForFacetsOptions.ts +2 -2
  236. package/model/searchForHitsOptions.ts +1 -1
  237. package/model/searchHits.ts +6 -3
  238. package/model/searchParamsObject.ts +3 -0
  239. package/model/searchParamsQuery.ts +1 -1
  240. package/model/searchRulesParams.ts +4 -9
  241. package/model/searchRulesResponse.ts +2 -2
  242. package/model/searchStrategy.ts +1 -1
  243. package/model/searchSynonymsParams.ts +2 -2
  244. package/model/searchSynonymsResponse.ts +2 -2
  245. package/model/searchUserIdsParams.ts +1 -1
  246. package/model/searchUserIdsResponse.ts +3 -3
  247. package/model/securedAPIKeyRestrictions.ts +32 -0
  248. package/model/semanticSearch.ts +2 -2
  249. package/model/snippetResult.ts +2 -1
  250. package/model/snippetResultOption.ts +2 -2
  251. package/model/sortRemainingBy.ts +1 -1
  252. package/model/supportedLanguage.ts +74 -0
  253. package/model/tagFilters.ts +2 -4
  254. package/model/taskStatus.ts +1 -1
  255. package/model/timeRange.ts +2 -2
  256. package/model/typoTolerance.ts +1 -1
  257. package/model/typoToleranceEnum.ts +3 -0
  258. package/model/updateApiKeyResponse.ts +1 -1
  259. package/model/updatedAtResponse.ts +2 -2
  260. package/model/updatedAtWithObjectIdResponse.ts +3 -3
  261. package/model/updatedRuleResponse.ts +3 -3
  262. package/model/userHit.ts +1 -1
  263. package/model/userId.ts +1 -1
  264. package/model/value.ts +1 -1
  265. package/package.json +7 -7
  266. package/dist/model/mixedSearchFilters.d.ts +0 -2
  267. package/dist/model/mixedSearchFilters.d.ts.map +0 -1
@@ -3,16 +3,16 @@
3
3
  import type { BatchDictionaryEntriesRequest } from './batchDictionaryEntriesRequest';
4
4
 
5
5
  /**
6
- * `batchDictionaryEntries` parameters.
6
+ * Request body for updating dictionary entries.
7
7
  */
8
8
  export type BatchDictionaryEntriesParams = {
9
9
  /**
10
- * Incidates whether to replace all custom entries in the dictionary with the ones sent with this request.
10
+ * Whether to replace all custom entries in the dictionary with the ones sent with this request.
11
11
  */
12
12
  clearExistingDictionaryEntries?: boolean;
13
13
 
14
14
  /**
15
- * Operations to batch.
15
+ * List of additions and deletions to your dictionaries.
16
16
  */
17
17
  requests: BatchDictionaryEntriesRequest[];
18
18
  };
@@ -2,12 +2,12 @@
2
2
 
3
3
  export type BatchResponse = {
4
4
  /**
5
- * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the `task` operation and this `taskID`.
5
+ * Unique identifier of a task. A successful API response means that a task was added to a queue. It might not run immediately. You can check the task\'s progress with the [`task` operation](#tag/Indices/operation/getTask) and this `taskID`.
6
6
  */
7
7
  taskID: number;
8
8
 
9
9
  /**
10
- * Unique object (record) identifiers.
10
+ * Unique record identifiers.
11
11
  */
12
12
  objectIDs: string[];
13
13
  };
@@ -3,13 +3,13 @@
3
3
  import type { BuiltInOperationType } from './builtInOperationType';
4
4
 
5
5
  /**
6
- * To update an attribute without pushing the entire record, you can use these built-in operations.
6
+ * Update to perform on the attribute.
7
7
  */
8
8
  export type BuiltInOperation = {
9
9
  _operation: BuiltInOperationType;
10
10
 
11
11
  /**
12
- * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, `Add` or `Remove` value.
12
+ * Value that corresponds to the operation, for example an `Increment` or `Decrement` step, or an `Add` or `Remove` value.
13
13
  */
14
14
  value: string;
15
15
  };
@@ -1,7 +1,7 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * Operation to apply to the attribute.
4
+ * How to change the attribute.
5
5
  */
6
6
  export type BuiltInOperationType =
7
7
  | 'Add'
@@ -2,11 +2,14 @@
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';
9
11
  import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
12
+ import type { BatchResponse } from './batchResponse';
10
13
  import type { BatchWriteParams } from './batchWriteParams';
11
14
  import type { BrowseParams } from './browseParams';
12
15
  import type { DeleteByParams } from './deleteByParams';
@@ -23,23 +26,25 @@ import type { SearchParams } from './searchParams';
23
26
  import type { SearchParamsObject } from './searchParamsObject';
24
27
  import type { SearchRulesParams } from './searchRulesParams';
25
28
  import type { SearchSynonymsParams } from './searchSynonymsParams';
29
+ import type { SecuredAPIKeyRestrictions } from './securedAPIKeyRestrictions';
26
30
  import type { Source } from './source';
27
31
  import type { SynonymHit } from './synonymHit';
32
+ import type { UpdatedAtResponse } from './updatedAtResponse';
28
33
 
29
34
  /**
30
35
  * Properties for the `addOrUpdateObject` method.
31
36
  */
32
37
  export type AddOrUpdateObjectProps = {
33
38
  /**
34
- * Index on which to perform the request.
39
+ * Name of the index on which to perform the operation.
35
40
  */
36
41
  indexName: string;
37
42
  /**
38
- * Unique record (object) identifier.
43
+ * Unique record identifier.
39
44
  */
40
45
  objectID: string;
41
46
  /**
42
- * Algolia record.
47
+ * The record, a schemaless object with attributes that are useful in the context of search and discovery.
43
48
  */
44
49
  body: Record<string, any>;
45
50
  };
@@ -49,7 +54,7 @@ export type AddOrUpdateObjectProps = {
49
54
  */
50
55
  export type AssignUserIdProps = {
51
56
  /**
52
- * UserID to assign.
57
+ * Unique identifier of the user who makes the search request.
53
58
  */
54
59
  xAlgoliaUserID: string;
55
60
  assignUserIdParams: AssignUserIdParams;
@@ -60,7 +65,7 @@ export type AssignUserIdProps = {
60
65
  */
61
66
  export type BatchProps = {
62
67
  /**
63
- * Index on which to perform the request.
68
+ * Name of the index on which to perform the operation.
64
69
  */
65
70
  indexName: string;
66
71
  batchWriteParams: BatchWriteParams;
@@ -71,7 +76,7 @@ export type BatchProps = {
71
76
  */
72
77
  export type BatchAssignUserIdsProps = {
73
78
  /**
74
- * UserID to assign.
79
+ * Unique identifier of the user who makes the search request.
75
80
  */
76
81
  xAlgoliaUserID: string;
77
82
  batchAssignUserIdsParams: BatchAssignUserIdsParams;
@@ -82,7 +87,7 @@ export type BatchAssignUserIdsProps = {
82
87
  */
83
88
  export type BatchDictionaryEntriesProps = {
84
89
  /**
85
- * Dictionary to search in.
90
+ * Dictionary type in which to search.
86
91
  */
87
92
  dictionaryName: DictionaryType;
88
93
  batchDictionaryEntriesParams: BatchDictionaryEntriesParams;
@@ -93,7 +98,7 @@ export type BatchDictionaryEntriesProps = {
93
98
  */
94
99
  export type BrowseProps = {
95
100
  /**
96
- * Index on which to perform the request.
101
+ * Name of the index on which to perform the operation.
97
102
  */
98
103
  indexName: string;
99
104
  browseParams?: BrowseParams;
@@ -104,7 +109,7 @@ export type BrowseProps = {
104
109
  */
105
110
  export type ClearObjectsProps = {
106
111
  /**
107
- * Index on which to perform the request.
112
+ * Name of the index on which to perform the operation.
108
113
  */
109
114
  indexName: string;
110
115
  };
@@ -114,11 +119,11 @@ export type ClearObjectsProps = {
114
119
  */
115
120
  export type ClearRulesProps = {
116
121
  /**
117
- * Index on which to perform the request.
122
+ * Name of the index on which to perform the operation.
118
123
  */
119
124
  indexName: string;
120
125
  /**
121
- * Indicates whether changed index settings are forwarded to the replica indices.
126
+ * Whether changes are applied to replica indices.
122
127
  */
123
128
  forwardToReplicas?: boolean;
124
129
  };
@@ -128,11 +133,11 @@ export type ClearRulesProps = {
128
133
  */
129
134
  export type ClearSynonymsProps = {
130
135
  /**
131
- * Index on which to perform the request.
136
+ * Name of the index on which to perform the operation.
132
137
  */
133
138
  indexName: string;
134
139
  /**
135
- * Indicates whether changed index settings are forwarded to the replica indices.
140
+ * Whether changes are applied to replica indices.
136
141
  */
137
142
  forwardToReplicas?: boolean;
138
143
  };
@@ -216,7 +221,7 @@ export type DeleteApiKeyProps = {
216
221
  */
217
222
  export type DeleteByProps = {
218
223
  /**
219
- * Index on which to perform the request.
224
+ * Name of the index on which to perform the operation.
220
225
  */
221
226
  indexName: string;
222
227
  deleteByParams: DeleteByParams;
@@ -227,7 +232,7 @@ export type DeleteByProps = {
227
232
  */
228
233
  export type DeleteIndexProps = {
229
234
  /**
230
- * Index on which to perform the request.
235
+ * Name of the index on which to perform the operation.
231
236
  */
232
237
  indexName: string;
233
238
  };
@@ -237,11 +242,11 @@ export type DeleteIndexProps = {
237
242
  */
238
243
  export type DeleteObjectProps = {
239
244
  /**
240
- * Index on which to perform the request.
245
+ * Name of the index on which to perform the operation.
241
246
  */
242
247
  indexName: string;
243
248
  /**
244
- * Unique record (object) identifier.
249
+ * Unique record identifier.
245
250
  */
246
251
  objectID: string;
247
252
  };
@@ -251,7 +256,7 @@ export type DeleteObjectProps = {
251
256
  */
252
257
  export type DeleteRuleProps = {
253
258
  /**
254
- * Index on which to perform the request.
259
+ * Name of the index on which to perform the operation.
255
260
  */
256
261
  indexName: string;
257
262
  /**
@@ -259,7 +264,7 @@ export type DeleteRuleProps = {
259
264
  */
260
265
  objectID: string;
261
266
  /**
262
- * Indicates whether changed index settings are forwarded to the replica indices.
267
+ * Whether changes are applied to replica indices.
263
268
  */
264
269
  forwardToReplicas?: boolean;
265
270
  };
@@ -279,7 +284,7 @@ export type DeleteSourceProps = {
279
284
  */
280
285
  export type DeleteSynonymProps = {
281
286
  /**
282
- * Index on which to perform the request.
287
+ * Name of the index on which to perform the operation.
283
288
  */
284
289
  indexName: string;
285
290
  /**
@@ -287,7 +292,7 @@ export type DeleteSynonymProps = {
287
292
  */
288
293
  objectID: string;
289
294
  /**
290
- * Indicates whether changed index settings are forwarded to the replica indices.
295
+ * Whether changes are applied to replica indices.
291
296
  */
292
297
  forwardToReplicas?: boolean;
293
298
  };
@@ -307,7 +312,7 @@ export type GetApiKeyProps = {
307
312
  */
308
313
  export type GetLogsProps = {
309
314
  /**
310
- * First log entry to retrieve. Sorted by decreasing date with 0 being the most recent.
315
+ * First log entry to retrieve. The most recent entries are listed first.
311
316
  */
312
317
  offset?: number;
313
318
  /**
@@ -315,11 +320,11 @@ export type GetLogsProps = {
315
320
  */
316
321
  length?: number;
317
322
  /**
318
- * Index for which log entries should be retrieved. When omitted, log entries are retrieved for all indices.
323
+ * Index for which to retrieve log entries. By default, log entries are retrieved for all indices.
319
324
  */
320
325
  indexName?: string;
321
326
  /**
322
- * Type of log entries to retrieve. When omitted, all log entries are retrieved.
327
+ * Type of log entries to retrieve. By default, all log entries are retrieved.
323
328
  */
324
329
  type?: LogType;
325
330
  };
@@ -329,15 +334,15 @@ export type GetLogsProps = {
329
334
  */
330
335
  export type GetObjectProps = {
331
336
  /**
332
- * Index on which to perform the request.
337
+ * Name of the index on which to perform the operation.
333
338
  */
334
339
  indexName: string;
335
340
  /**
336
- * Unique record (object) identifier.
341
+ * Unique record identifier.
337
342
  */
338
343
  objectID: string;
339
344
  /**
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.
345
+ * 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
346
  */
342
347
  attributesToRetrieve?: string[];
343
348
  };
@@ -347,7 +352,7 @@ export type GetObjectProps = {
347
352
  */
348
353
  export type GetRuleProps = {
349
354
  /**
350
- * Index on which to perform the request.
355
+ * Name of the index on which to perform the operation.
351
356
  */
352
357
  indexName: string;
353
358
  /**
@@ -361,7 +366,7 @@ export type GetRuleProps = {
361
366
  */
362
367
  export type GetSettingsProps = {
363
368
  /**
364
- * Index on which to perform the request.
369
+ * Name of the index on which to perform the operation.
365
370
  */
366
371
  indexName: string;
367
372
  };
@@ -371,7 +376,7 @@ export type GetSettingsProps = {
371
376
  */
372
377
  export type GetSynonymProps = {
373
378
  /**
374
- * Index on which to perform the request.
379
+ * Name of the index on which to perform the operation.
375
380
  */
376
381
  indexName: string;
377
382
  /**
@@ -385,7 +390,7 @@ export type GetSynonymProps = {
385
390
  */
386
391
  export type GetTaskProps = {
387
392
  /**
388
- * Index on which to perform the request.
393
+ * Name of the index on which to perform the operation.
389
394
  */
390
395
  indexName: string;
391
396
  /**
@@ -399,7 +404,7 @@ export type GetTaskProps = {
399
404
  */
400
405
  export type GetUserIdProps = {
401
406
  /**
402
- * UserID to assign.
407
+ * Unique identifier of the user who makes the search request.
403
408
  */
404
409
  userID: string;
405
410
  };
@@ -409,7 +414,7 @@ export type GetUserIdProps = {
409
414
  */
410
415
  export type HasPendingMappingsProps = {
411
416
  /**
412
- * Indicates whether to include the cluster\'s pending mapping state in the response.
417
+ * Whether to include the cluster\'s pending mapping state in the response.
413
418
  */
414
419
  getClusters?: boolean;
415
420
  };
@@ -419,11 +424,11 @@ export type HasPendingMappingsProps = {
419
424
  */
420
425
  export type ListIndicesProps = {
421
426
  /**
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.
427
+ * Requested page of the API response. If `null`, the API response is not paginated.
423
428
  */
424
429
  page?: number;
425
430
  /**
426
- * Maximum number of hits per page.
431
+ * Number of hits per page.
427
432
  */
428
433
  hitsPerPage?: number;
429
434
  };
@@ -433,11 +438,11 @@ export type ListIndicesProps = {
433
438
  */
434
439
  export type ListUserIdsProps = {
435
440
  /**
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.
441
+ * Requested page of the API response. If `null`, the API response is not paginated.
437
442
  */
438
443
  page?: number;
439
444
  /**
440
- * Maximum number of hits per page.
445
+ * Number of hits per page.
441
446
  */
442
447
  hitsPerPage?: number;
443
448
  };
@@ -447,7 +452,7 @@ export type ListUserIdsProps = {
447
452
  */
448
453
  export type OperationIndexProps = {
449
454
  /**
450
- * Index on which to perform the request.
455
+ * Name of the index on which to perform the operation.
451
456
  */
452
457
  indexName: string;
453
458
  operationIndexParams: OperationIndexParams;
@@ -458,19 +463,19 @@ export type OperationIndexProps = {
458
463
  */
459
464
  export type PartialUpdateObjectProps = {
460
465
  /**
461
- * Index on which to perform the request.
466
+ * Name of the index on which to perform the operation.
462
467
  */
463
468
  indexName: string;
464
469
  /**
465
- * Unique record (object) identifier.
470
+ * Unique record identifier.
466
471
  */
467
472
  objectID: string;
468
473
  /**
469
- * Object with attributes to update.
474
+ * Attributes with their values.
470
475
  */
471
476
  attributesToUpdate: Record<string, AttributeToUpdate>;
472
477
  /**
473
- * Indicates whether to create a new record if it doesn\'t exist yet.
478
+ * Whether to create a new record if it doesn\'t exist.
474
479
  */
475
480
  createIfNotExists?: boolean;
476
481
  };
@@ -480,7 +485,7 @@ export type PartialUpdateObjectProps = {
480
485
  */
481
486
  export type RemoveUserIdProps = {
482
487
  /**
483
- * UserID to assign.
488
+ * Unique identifier of the user who makes the search request.
484
489
  */
485
490
  userID: string;
486
491
  };
@@ -510,11 +515,11 @@ export type RestoreApiKeyProps = {
510
515
  */
511
516
  export type SaveObjectProps = {
512
517
  /**
513
- * Index on which to perform the request.
518
+ * Name of the index on which to perform the operation.
514
519
  */
515
520
  indexName: string;
516
521
  /**
517
- * The Algolia record.
522
+ * The record, a schemaless object with attributes that are useful in the context of search and discovery.
518
523
  */
519
524
  body: Record<string, any>;
520
525
  };
@@ -524,7 +529,7 @@ export type SaveObjectProps = {
524
529
  */
525
530
  export type SaveRuleProps = {
526
531
  /**
527
- * Index on which to perform the request.
532
+ * Name of the index on which to perform the operation.
528
533
  */
529
534
  indexName: string;
530
535
  /**
@@ -533,7 +538,7 @@ export type SaveRuleProps = {
533
538
  objectID: string;
534
539
  rule: Rule;
535
540
  /**
536
- * Indicates whether changed index settings are forwarded to the replica indices.
541
+ * Whether changes are applied to replica indices.
537
542
  */
538
543
  forwardToReplicas?: boolean;
539
544
  };
@@ -543,16 +548,16 @@ export type SaveRuleProps = {
543
548
  */
544
549
  export type SaveRulesProps = {
545
550
  /**
546
- * Index on which to perform the request.
551
+ * Name of the index on which to perform the operation.
547
552
  */
548
553
  indexName: string;
549
554
  rules: Rule[];
550
555
  /**
551
- * Indicates whether changed index settings are forwarded to the replica indices.
556
+ * Whether changes are applied to replica indices.
552
557
  */
553
558
  forwardToReplicas?: boolean;
554
559
  /**
555
- * Indicates whether existing rules should be deleted before adding this batch.
560
+ * Whether existing rules should be deleted before adding this batch.
556
561
  */
557
562
  clearExistingRules?: boolean;
558
563
  };
@@ -562,7 +567,7 @@ export type SaveRulesProps = {
562
567
  */
563
568
  export type SaveSynonymProps = {
564
569
  /**
565
- * Index on which to perform the request.
570
+ * Name of the index on which to perform the operation.
566
571
  */
567
572
  indexName: string;
568
573
  /**
@@ -571,7 +576,7 @@ export type SaveSynonymProps = {
571
576
  objectID: string;
572
577
  synonymHit: SynonymHit;
573
578
  /**
574
- * Indicates whether changed index settings are forwarded to the replica indices.
579
+ * Whether changes are applied to replica indices.
575
580
  */
576
581
  forwardToReplicas?: boolean;
577
582
  };
@@ -581,16 +586,16 @@ export type SaveSynonymProps = {
581
586
  */
582
587
  export type SaveSynonymsProps = {
583
588
  /**
584
- * Index on which to perform the request.
589
+ * Name of the index on which to perform the operation.
585
590
  */
586
591
  indexName: string;
587
592
  synonymHit: SynonymHit[];
588
593
  /**
589
- * Indicates whether changed index settings are forwarded to the replica indices.
594
+ * Whether changes are applied to replica indices.
590
595
  */
591
596
  forwardToReplicas?: boolean;
592
597
  /**
593
- * Indicates whether to replace all synonyms in the index with the ones sent with this request.
598
+ * Whether to replace all synonyms in the index with the ones sent with this request.
594
599
  */
595
600
  replaceExistingSynonyms?: boolean;
596
601
  };
@@ -632,7 +637,7 @@ export type LegacySearchMethodProps = LegacySearchQuery[];
632
637
  */
633
638
  export type SearchDictionaryEntriesProps = {
634
639
  /**
635
- * Dictionary to search in.
640
+ * Dictionary type in which to search.
636
641
  */
637
642
  dictionaryName: DictionaryType;
638
643
  searchDictionaryEntriesParams: SearchDictionaryEntriesParams;
@@ -643,11 +648,11 @@ export type SearchDictionaryEntriesProps = {
643
648
  */
644
649
  export type SearchForFacetValuesProps = {
645
650
  /**
646
- * Index on which to perform the request.
651
+ * Name of the index on which to perform the operation.
647
652
  */
648
653
  indexName: string;
649
654
  /**
650
- * Facet name.
655
+ * Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
651
656
  */
652
657
  facetName: string;
653
658
  searchForFacetValuesRequest?: SearchForFacetValuesRequest;
@@ -658,7 +663,7 @@ export type SearchForFacetValuesProps = {
658
663
  */
659
664
  export type SearchRulesProps = {
660
665
  /**
661
- * Index on which to perform the request.
666
+ * Name of the index on which to perform the operation.
662
667
  */
663
668
  indexName: string;
664
669
  searchRulesParams?: SearchRulesParams;
@@ -669,7 +674,7 @@ export type SearchRulesProps = {
669
674
  */
670
675
  export type SearchSingleIndexProps = {
671
676
  /**
672
- * Index on which to perform the request.
677
+ * Name of the index on which to perform the operation.
673
678
  */
674
679
  indexName: string;
675
680
  searchParams?: SearchParams;
@@ -680,7 +685,7 @@ export type SearchSingleIndexProps = {
680
685
  */
681
686
  export type SearchSynonymsProps = {
682
687
  /**
683
- * Index on which to perform the request.
688
+ * Name of the index on which to perform the operation.
684
689
  */
685
690
  indexName: string;
686
691
  /**
@@ -694,12 +699,12 @@ export type SearchSynonymsProps = {
694
699
  */
695
700
  export type SetSettingsProps = {
696
701
  /**
697
- * Index on which to perform the request.
702
+ * Name of the index on which to perform the operation.
698
703
  */
699
704
  indexName: string;
700
705
  indexSettings: IndexSettings;
701
706
  /**
702
- * Indicates whether changed index settings are forwarded to the replica indices.
707
+ * Whether changes are applied to replica indices.
703
708
  */
704
709
  forwardToReplicas?: boolean;
705
710
  };
@@ -756,17 +761,82 @@ export type WaitForApiKeyOptions = WaitForOptions & {
756
761
  /**
757
762
  * The operation that has been performed, used to compute the stop condition.
758
763
  */
759
- operation: 'add' | 'delete';
764
+ operation: Extract<ApiKeyOperation, 'add' | 'delete'>;
760
765
  apiKey?: never;
761
766
  }
762
767
  | {
763
768
  /**
764
769
  * The operation that has been performed, used to compute the stop condition.
765
770
  */
766
- operation: 'update';
771
+ operation: Extract<ApiKeyOperation, 'update'>;
767
772
  /**
768
773
  * The updated fields, used to compute the stop condition.
769
774
  */
770
775
  apiKey: Partial<ApiKey>;
771
776
  }
772
777
  );
778
+
779
+ export type GenerateSecuredApiKeyOptions = {
780
+ /**
781
+ * The base API key from which to generate the new secured one.
782
+ */
783
+ parentApiKey: string;
784
+
785
+ /**
786
+ * A set of properties defining the restrictions of the secured API key.
787
+ */
788
+ restrictions?: SecuredAPIKeyRestrictions;
789
+ };
790
+
791
+ export type GetSecuredApiKeyRemainingValidityOptions = {
792
+ /**
793
+ * The secured API key generated with the `generateSecuredApiKey` method.
794
+ */
795
+ securedApiKey: string;
796
+ };
797
+
798
+ export type ChunkedBatchOptions = ReplaceAllObjectsOptions & {
799
+ /**
800
+ * The `batch` `action` to perform on the given array of `objects`, defaults to `addObject`.
801
+ */
802
+ action?: Action;
803
+
804
+ /**
805
+ * 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.
806
+ */
807
+ waitForTasks?: boolean;
808
+ };
809
+
810
+ export type ReplaceAllObjectsOptions = {
811
+ /**
812
+ * The `indexName` to replace `objects` in.
813
+ */
814
+ indexName: string;
815
+
816
+ /**
817
+ * The array of `objects` to store in the given Algolia `indexName`.
818
+ */
819
+ objects: Array<Record<string, any>>;
820
+
821
+ /**
822
+ * The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
823
+ */
824
+ batchSize?: number;
825
+ };
826
+
827
+ export type ReplaceAllObjectsResponse = {
828
+ /**
829
+ * The response of the `operationIndex` request for the `copy` operation.
830
+ */
831
+ copyOperationResponse: UpdatedAtResponse;
832
+
833
+ /**
834
+ * The response of the `batch` request(s).
835
+ */
836
+ batchResponses: BatchResponse[];
837
+
838
+ /**
839
+ * The response of the `operationIndex` request for the `move` operation.
840
+ */
841
+ moveOperationResponse: UpdatedAtResponse;
842
+ };
@@ -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
  };