@algolia/client-search 5.7.0 → 5.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +5 -6
  2. package/dist/browser.d.ts +1668 -1652
  3. package/dist/builds/browser.js +95 -156
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +2 -2
  8. package/dist/builds/fetch.js +95 -156
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +90 -151
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +96 -157
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +1420 -1403
  15. package/dist/node.d.cts +1420 -1403
  16. package/dist/node.d.ts +1420 -1403
  17. package/dist/src/searchClient.cjs +88 -149
  18. package/dist/src/searchClient.cjs.map +1 -1
  19. package/dist/src/searchClient.js +91 -152
  20. package/dist/src/searchClient.js.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -2
  23. package/model/acl.ts +1 -1
  24. package/model/action.ts +4 -4
  25. package/model/alternativesAsExact.ts +1 -1
  26. package/model/anchoring.ts +2 -2
  27. package/model/apiKey.ts +4 -4
  28. package/model/aroundPrecision.ts +1 -1
  29. package/model/aroundRadius.ts +1 -1
  30. package/model/attributeToUpdate.ts +1 -1
  31. package/model/automaticFacetFilters.ts +1 -1
  32. package/model/banner.ts +13 -0
  33. package/model/bannerImage.ts +12 -0
  34. package/model/bannerImageUrl.ts +8 -0
  35. package/model/bannerLink.ts +8 -0
  36. package/model/baseIndexSettings.ts +15 -15
  37. package/model/baseSearchParams.ts +1 -1
  38. package/model/baseSearchParamsWithoutQuery.ts +8 -8
  39. package/model/baseSearchResponse.ts +2 -2
  40. package/model/batchAssignUserIdsParams.ts +1 -1
  41. package/model/batchDictionaryEntriesParams.ts +1 -1
  42. package/model/batchParams.ts +1 -1
  43. package/model/batchResponse.ts +1 -1
  44. package/model/batchWriteParams.ts +1 -1
  45. package/model/booleanString.ts +1 -1
  46. package/model/browseParams.ts +2 -1
  47. package/model/browseParamsObject.ts +1 -1
  48. package/model/browseResponse.ts +1 -1
  49. package/model/builtInOperationType.ts +4 -4
  50. package/model/builtInOperationValue.ts +1 -1
  51. package/model/clientMethodProps.ts +50 -34
  52. package/model/consequence.ts +2 -2
  53. package/model/consequenceQueryObject.ts +2 -2
  54. package/model/deleteByParams.ts +3 -3
  55. package/model/dictionaryEntry.ts +2 -2
  56. package/model/dictionaryEntryState.ts +1 -1
  57. package/model/dictionaryType.ts +1 -1
  58. package/model/facetFilters.ts +1 -1
  59. package/model/facetOrdering.ts +1 -1
  60. package/model/facets.ts +1 -1
  61. package/model/fetchedIndex.ts +1 -1
  62. package/model/getApiKeyResponse.ts +1 -1
  63. package/model/getLogsResponse.ts +1 -1
  64. package/model/getObjectsParams.ts +1 -1
  65. package/model/getObjectsRequest.ts +1 -1
  66. package/model/getTopUserIdsResponse.ts +1 -1
  67. package/model/hasPendingMappingsResponse.ts +1 -1
  68. package/model/highlightResult.ts +1 -1
  69. package/model/highlightResultOption.ts +1 -1
  70. package/model/hit.ts +2 -2
  71. package/model/ignorePlurals.ts +1 -1
  72. package/model/index.ts +12 -7
  73. package/model/indexSettingsAsSearchParams.ts +15 -15
  74. package/model/listApiKeysResponse.ts +1 -1
  75. package/model/listClustersResponse.ts +1 -1
  76. package/model/listIndicesResponse.ts +1 -1
  77. package/model/listUserIdsResponse.ts +1 -1
  78. package/model/log.ts +1 -1
  79. package/model/logType.ts +1 -1
  80. package/model/matchLevel.ts +1 -1
  81. package/model/mode.ts +1 -1
  82. package/model/multipleBatchResponse.ts +2 -2
  83. package/model/numericFilters.ts +2 -2
  84. package/model/operationIndexParams.ts +1 -1
  85. package/model/operationType.ts +1 -1
  86. package/model/optionalFilters.ts +1 -1
  87. package/model/promote.ts +1 -1
  88. package/model/promoteObjectIDs.ts +1 -1
  89. package/model/queryType.ts +2 -2
  90. package/model/reRankingApplyFilter.ts +1 -1
  91. package/model/redirect.ts +1 -1
  92. package/model/removeStopWords.ts +1 -1
  93. package/model/removeWordsIfNoResults.ts +1 -1
  94. package/model/renderingContent.ts +4 -1
  95. package/model/replaceAllObjectsResponse.ts +1 -1
  96. package/model/rule.ts +2 -2
  97. package/model/scopeType.ts +1 -1
  98. package/model/searchDictionaryEntriesResponse.ts +1 -1
  99. package/model/searchForFacetValuesResponse.ts +1 -1
  100. package/model/searchForFacets.ts +1 -1
  101. package/model/searchForHits.ts +1 -1
  102. package/model/searchHits.ts +1 -1
  103. package/model/searchMethodParams.ts +1 -1
  104. package/model/searchParams.ts +1 -1
  105. package/model/searchQuery.ts +1 -1
  106. package/model/searchResponse.ts +1 -1
  107. package/model/searchResponses.ts +1 -1
  108. package/model/searchResult.ts +1 -1
  109. package/model/searchRulesResponse.ts +1 -1
  110. package/model/searchSynonymsResponse.ts +1 -1
  111. package/model/searchUserIdsParams.ts +1 -1
  112. package/model/searchUserIdsResponse.ts +2 -2
  113. package/model/securedApiKeyRestrictions.ts +1 -1
  114. package/model/semanticSearch.ts +1 -1
  115. package/model/snippetResult.ts +1 -1
  116. package/model/sortRemainingBy.ts +1 -1
  117. package/model/standardEntries.ts +3 -3
  118. package/model/supportedLanguage.ts +1 -1
  119. package/model/synonymHit.ts +3 -3
  120. package/model/synonymType.ts +1 -1
  121. package/model/tagFilters.ts +1 -1
  122. package/model/taskStatus.ts +1 -1
  123. package/model/typoTolerance.ts +2 -2
  124. package/model/userHit.ts +1 -1
  125. package/model/value.ts +2 -2
  126. package/model/widgets.ts +13 -0
  127. package/package.json +6 -6
package/dist/node.d.cts CHANGED
@@ -1,16 +1,6 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
2
  import { CreateIterablePromise, CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
3
3
 
4
- /**
5
- * Access control list permissions.
6
- */
7
- type Acl = 'addObject' | 'analytics' | 'browse' | 'deleteIndex' | 'deleteObject' | 'editSettings' | 'inference' | 'listIndexes' | 'logs' | 'personalization' | 'recommendation' | 'search' | 'seeUnretrievableAttributes' | 'settings' | 'usage';
8
-
9
- /**
10
- * Type of indexing operation.
11
- */
12
- type Action = 'addObject' | 'clear' | 'delete' | 'deleteObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'updateObject';
13
-
14
4
  type AddApiKeyResponse = {
15
5
  /**
16
6
  * API key.
@@ -22,14 +12,10 @@ type AddApiKeyResponse = {
22
12
  createdAt: string;
23
13
  };
24
14
 
25
- type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
26
-
27
- type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
28
-
29
15
  /**
30
- * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`.
16
+ * Access control list permissions.
31
17
  */
32
- type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
18
+ type Acl = 'addObject' | 'analytics' | 'browse' | 'deleteObject' | 'deleteIndex' | 'editSettings' | 'inference' | 'listIndexes' | 'logs' | 'personalization' | 'recommendation' | 'search' | 'seeUnretrievableAttributes' | 'settings' | 'usage';
33
19
 
34
20
  /**
35
21
  * API key object.
@@ -38,7 +24,7 @@ type ApiKey = {
38
24
  /**
39
25
  * Permissions that determine the type of API requests this key can make. The required ACL is listed in each endpoint\'s reference. For more information, see [access control list](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl).
40
26
  */
41
- acl: Acl[];
27
+ acl: Array<Acl>;
42
28
  /**
43
29
  * Description of an API key to help you identify this API key.
44
30
  */
@@ -46,7 +32,7 @@ type ApiKey = {
46
32
  /**
47
33
  * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
48
34
  */
49
- indexes?: string[];
35
+ indexes?: Array<string>;
50
36
  /**
51
37
  * Maximum number of results this API key can retrieve in one query. By default, there\'s no limit.
52
38
  */
@@ -56,697 +42,1137 @@ type ApiKey = {
56
42
  */
57
43
  maxQueriesPerIPPerHour?: number;
58
44
  /**
59
- * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that\'s outside the restricted range.
45
+ * Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
60
46
  */
61
47
  queryParameters?: string;
62
48
  /**
63
49
  * Allowed HTTP referrers for this API key. By default, all referrers are allowed. You can use leading and trailing wildcard characters (`*`): - `https://algolia.com/_*` allows all referrers starting with \"https://algolia.com/\" - `*.algolia.com` allows all referrers ending with \".algolia.com\" - `*algolia.com*` allows all referrers in the domain \"algolia.com\". Like all HTTP headers, referrers can be spoofed. Don\'t rely on them to secure your data. For more information, see [HTTP referrer restrictions](https://www.algolia.com/doc/guides/security/security-best-practices/#http-referrers-restrictions).
64
50
  */
65
- referers?: string[];
51
+ referers?: Array<string>;
66
52
  /**
67
53
  * Duration (in seconds) after which the API key expires. By default, API keys don\'t expire.
68
54
  */
69
55
  validity?: number;
70
56
  };
71
57
 
72
- type ApiKeyOperation = 'add' | 'delete' | 'update';
73
-
74
- /**
75
- * Range object with lower and upper values in meters to define custom ranges.
76
- */
77
- type Range = {
78
- /**
79
- * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
80
- */
81
- from?: number;
82
- /**
83
- * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
84
- */
85
- value?: number;
86
- };
87
-
88
- /**
89
- * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
90
- */
91
- type AroundPrecision = Range[] | number;
92
-
93
- /**
94
- * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
95
- */
96
- type AroundRadiusAll = 'all';
97
-
98
- /**
99
- * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
100
- */
101
- type AroundRadius = AroundRadiusAll | number;
102
-
103
- /**
104
- * Assign userID parameters.
105
- */
106
- type AssignUserIdParams = {
107
- /**
108
- * Cluster name.
109
- */
110
- cluster: string;
111
- };
112
-
113
- /**
114
- * How to change the attribute.
115
- */
116
- type BuiltInOperationType = 'Add' | 'AddUnique' | 'Decrement' | 'Increment' | 'IncrementFrom' | 'IncrementSet' | 'Remove';
117
-
118
- type BuiltInOperationValue = number | string;
119
-
120
58
  /**
121
- * Update to perform on the attribute.
59
+ * Type of indexing operation.
122
60
  */
123
- type BuiltInOperation = {
124
- _operation: BuiltInOperationType;
125
- value: BuiltInOperationValue;
126
- };
61
+ type Action = 'addObject' | 'updateObject' | 'partialUpdateObject' | 'partialUpdateObjectNoCreate' | 'deleteObject' | 'delete' | 'clear';
127
62
 
128
- type AttributeToUpdate = BuiltInOperation | string;
129
-
130
- /**
131
- * Filter or optional filter to be applied to the search.
132
- */
133
- type AutomaticFacetFilter = {
134
- /**
135
- * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
136
- */
137
- facet: string;
63
+ type MultipleBatchRequest = {
64
+ action: Action;
138
65
  /**
139
- * Filter scores to give different weights to individual filters.
66
+ * Operation arguments (varies with specified `action`).
140
67
  */
141
- score?: number;
68
+ body?: Record<string, unknown>;
142
69
  /**
143
- * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
70
+ * Index name (case-sensitive).
144
71
  */
145
- disjunctive?: boolean;
72
+ indexName: string;
146
73
  };
147
74
 
148
75
  /**
149
- * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies.
76
+ * Batch parameters.
150
77
  */
151
- type AutomaticFacetFilters = AutomaticFacetFilter[] | string[];
78
+ type BatchParams = {
79
+ requests: Array<MultipleBatchRequest>;
80
+ };
152
81
 
153
- type BaseGetApiKeyResponse = {
82
+ type BatchResponse = {
154
83
  /**
155
- * API key.
84
+ * 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`.
156
85
  */
157
- value?: string;
86
+ taskID: number;
158
87
  /**
159
- * Timestamp when the object was created, in milliseconds since the Unix epoch.
88
+ * Unique record identifiers.
160
89
  */
161
- createdAt: number;
90
+ objectIDs: Array<string>;
162
91
  };
163
92
 
164
93
  /**
165
- * ISO code for a supported language.
94
+ * Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
166
95
  */
167
- type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt-br' | 'pt' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh';
168
-
169
- type BaseIndexSettings = {
96
+ type Exhaustive = {
170
97
  /**
171
- * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn\'t evalue the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
98
+ * Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
172
99
  */
173
- attributesForFaceting?: string[];
100
+ facetsCount?: boolean;
174
101
  /**
175
- * Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
102
+ * The value is `false` if not all facet values are retrieved.
176
103
  */
177
- replicas?: string[];
104
+ facetValues?: boolean;
178
105
  /**
179
- * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed.
106
+ * Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
180
107
  */
181
- paginationLimitedTo?: number;
108
+ nbHits?: boolean;
182
109
  /**
183
- * Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don\'t want to include it in the search results. Attribute names are case-sensitive.
110
+ * Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
184
111
  */
185
- unretrievableAttributes?: string[];
112
+ rulesMatch?: boolean;
186
113
  /**
187
- * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
114
+ * Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
188
115
  */
189
- disableTypoToleranceOnWords?: string[];
116
+ typo?: boolean;
117
+ };
118
+
119
+ type FacetStats = {
190
120
  /**
191
- * Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
121
+ * Minimum value in the results.
192
122
  */
193
- attributesToTransliterate?: string[];
123
+ min?: number;
194
124
  /**
195
- * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
125
+ * Maximum value in the results.
196
126
  */
197
- camelCaseAttributes?: string[];
127
+ max?: number;
198
128
  /**
199
- * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
129
+ * Average facet value in the results.
200
130
  */
201
- decompoundedAttributes?: Record<string, unknown>;
131
+ avg?: number;
202
132
  /**
203
- * Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
133
+ * Sum of all values in the results.
204
134
  */
205
- indexLanguages?: SupportedLanguage[];
135
+ sum?: number;
136
+ };
137
+
138
+ /**
139
+ * Redirect rule data.
140
+ */
141
+ type RedirectRuleIndexData = {
142
+ ruleObjectID: string;
143
+ };
144
+
145
+ type RedirectRuleIndexMetadata = {
206
146
  /**
207
- * Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
147
+ * Source index for the redirect rule.
208
148
  */
209
- disablePrefixOnAttributes?: string[];
149
+ source: string;
210
150
  /**
211
- * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
151
+ * Destination index for the redirect rule.
212
152
  */
213
- allowCompressionOfIntegerArray?: boolean;
153
+ dest: string;
214
154
  /**
215
- * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
155
+ * Reason for the redirect rule.
216
156
  */
217
- numericAttributesForFiltering?: string[];
157
+ reason: string;
218
158
  /**
219
- * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
159
+ * Redirect rule status.
220
160
  */
221
- separatorsToIndex?: string;
161
+ succeed: boolean;
162
+ data: RedirectRuleIndexData;
163
+ };
164
+
165
+ /**
166
+ * [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
167
+ */
168
+ type Redirect = {
169
+ index?: Array<RedirectRuleIndexMetadata>;
170
+ };
171
+
172
+ /**
173
+ * Order of facet names.
174
+ */
175
+ type Facets = {
222
176
  /**
223
- * Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
177
+ * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
224
178
  */
225
- searchableAttributes?: string[];
179
+ order?: Array<string>;
180
+ };
181
+
182
+ /**
183
+ * Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
184
+ */
185
+ type SortRemainingBy = 'count' | 'alpha' | 'hidden';
186
+
187
+ type Value = {
226
188
  /**
227
- * An object with custom data. You can store up to 32kB as custom data.
189
+ * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
228
190
  */
229
- userData?: Record<string, unknown>;
191
+ order?: Array<string>;
192
+ sortRemainingBy?: SortRemainingBy;
230
193
  /**
231
- * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
194
+ * Hide facet values.
232
195
  */
233
- customNormalization?: Record<string, Record<string, string>>;
196
+ hide?: Array<string>;
197
+ };
198
+
199
+ /**
200
+ * Order of facet names and facet values in your UI.
201
+ */
202
+ type FacetOrdering = {
203
+ facets?: Facets;
234
204
  /**
235
- * Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
205
+ * Order of facet values. One object for each facet.
236
206
  */
237
- attributeForDistinct?: string;
207
+ values?: {
208
+ [key: string]: Value;
209
+ };
238
210
  };
239
211
 
240
212
  /**
241
- * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`.
213
+ * The redirect rule container.
214
+ */
215
+ type RedirectURL = {
216
+ url?: string;
217
+ };
218
+
219
+ /**
220
+ * url for a search banner image.
242
221
  */
243
- type FacetFilters = FacetFilters[] | string;
222
+ type BannerImageUrl = {
223
+ url?: string;
224
+ };
244
225
 
245
226
  /**
246
- * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
227
+ * image of a search banner.
247
228
  */
248
- type NumericFilters = NumericFilters[] | string;
229
+ type BannerImage = {
230
+ urls?: Array<BannerImageUrl>;
231
+ title?: string;
232
+ };
249
233
 
250
234
  /**
251
- * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes.
235
+ * link for a banner defined in merchandising studio.
252
236
  */
253
- type OptionalFilters = OptionalFilters[] | string;
237
+ type BannerLink = {
238
+ url?: string;
239
+ };
254
240
 
255
241
  /**
256
- * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
242
+ * a search banner with image and url.
257
243
  */
258
- type TagFilters = TagFilters[] | string;
244
+ type Banner = {
245
+ image?: BannerImage;
246
+ link?: BannerLink;
247
+ };
259
248
 
260
- type BaseSearchParamsWithoutQuery = {
249
+ /**
250
+ * widgets returned from any rules that are applied to the current search.
251
+ */
252
+ type Widgets = {
261
253
  /**
262
- * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
254
+ * banners defined in the merchandising studio for the given search.
263
255
  */
264
- similarQuery?: string;
256
+ banners?: Array<Banner>;
257
+ };
258
+
259
+ /**
260
+ * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
261
+ */
262
+ type RenderingContent = {
263
+ facetOrdering?: FacetOrdering;
264
+ redirect?: RedirectURL;
265
+ widgets?: Widgets;
266
+ };
267
+
268
+ type BaseSearchResponse = Record<string, any> & {
265
269
  /**
266
- * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
270
+ * A/B test ID. This is only included in the response for indices that are part of an A/B test.
267
271
  */
268
- filters?: string;
269
- facetFilters?: FacetFilters;
270
- optionalFilters?: OptionalFilters;
271
- numericFilters?: NumericFilters;
272
- tagFilters?: TagFilters;
272
+ abTestID?: number;
273
273
  /**
274
- * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
274
+ * Variant ID. This is only included in the response for indices that are part of an A/B test.
275
275
  */
276
- sumOrFiltersScores?: boolean;
276
+ abTestVariantID?: number;
277
277
  /**
278
- * Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
278
+ * Computed geographical location.
279
279
  */
280
- restrictSearchableAttributes?: string[];
280
+ aroundLatLng?: string;
281
281
  /**
282
- * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
282
+ * Distance from a central coordinate provided by `aroundLatLng`.
283
283
  */
284
- facets?: string[];
284
+ automaticRadius?: string;
285
+ exhaustive?: Exhaustive;
285
286
  /**
286
- * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
287
+ * See the `facetsCount` field of the `exhaustive` object in the response.
287
288
  */
288
- facetingAfterDistinct?: boolean;
289
+ exhaustiveFacetsCount?: boolean;
289
290
  /**
290
- * Page of search results to retrieve.
291
+ * See the `nbHits` field of the `exhaustive` object in the response.
291
292
  */
292
- page?: number;
293
+ exhaustiveNbHits?: boolean;
293
294
  /**
294
- * Position of the first hit to retrieve.
295
+ * See the `typo` field of the `exhaustive` object in the response.
295
296
  */
296
- offset?: number;
297
+ exhaustiveTypo?: boolean;
297
298
  /**
298
- * Number of hits to retrieve (used in combination with `offset`).
299
+ * Facet counts.
299
300
  */
300
- length?: number;
301
+ facets?: {
302
+ [key: string]: {
303
+ [key: string]: number;
304
+ };
305
+ };
301
306
  /**
302
- * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
307
+ * Statistics for numerical facets.
303
308
  */
304
- aroundLatLng?: string;
309
+ facets_stats?: {
310
+ [key: string]: FacetStats;
311
+ };
305
312
  /**
306
- * Whether to obtain the coordinates from the request\'s IP address.
313
+ * Index name used for the query.
307
314
  */
308
- aroundLatLngViaIP?: boolean;
309
- aroundRadius?: AroundRadius;
310
- aroundPrecision?: AroundPrecision;
315
+ index?: string;
311
316
  /**
312
- * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
317
+ * Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
313
318
  */
314
- minimumAroundRadius?: number;
319
+ indexUsed?: string;
315
320
  /**
316
- * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
321
+ * Warnings about the query.
317
322
  */
318
- insideBoundingBox?: number[][];
323
+ message?: string;
319
324
  /**
320
- * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
325
+ * Number of hits selected and sorted by the relevant sort algorithm.
321
326
  */
322
- insidePolygon?: number[][];
327
+ nbSortedHits?: number;
323
328
  /**
324
- * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
329
+ * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
325
330
  */
326
- naturalLanguages?: SupportedLanguage[];
331
+ parsedQuery?: string;
327
332
  /**
328
- * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
333
+ * Time the server took to process the request, in milliseconds.
329
334
  */
330
- ruleContexts?: string[];
335
+ processingTimeMS: number;
331
336
  /**
332
- * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
337
+ * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
333
338
  */
334
- personalizationImpact?: number;
339
+ processingTimingsMS?: Record<string, unknown>;
335
340
  /**
336
- * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
341
+ * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
337
342
  */
338
- userToken?: string;
343
+ queryAfterRemoval?: string;
344
+ redirect?: Redirect;
345
+ renderingContent?: RenderingContent;
339
346
  /**
340
- * Whether the search response should include detailed ranking information.
347
+ * Time the server took to process the request, in milliseconds.
341
348
  */
342
- getRankingInfo?: boolean;
349
+ serverTimeMS?: number;
343
350
  /**
344
- * Whether to take into account an index\'s synonyms for this search.
351
+ * Host name of the server that processed the request.
345
352
  */
346
- synonyms?: boolean;
353
+ serverUsed?: string;
347
354
  /**
348
- * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
355
+ * An object with custom data. You can store up to 32kB as custom data.
349
356
  */
350
- clickAnalytics?: boolean;
357
+ userData?: Record<string, unknown>;
351
358
  /**
352
- * Whether this search will be included in Analytics.
359
+ * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
353
360
  */
354
- analytics?: boolean;
361
+ queryID?: string;
355
362
  /**
356
- * Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
363
+ * Whether automatic events collection is enabled for the application.
357
364
  */
358
- analyticsTags?: string[];
365
+ _automaticInsights?: boolean;
366
+ };
367
+
368
+ type BrowsePagination = {
359
369
  /**
360
- * Whether to include this search when calculating processing-time percentiles.
370
+ * Page of search results to retrieve.
361
371
  */
362
- percentileComputation?: boolean;
372
+ page?: number;
363
373
  /**
364
- * Whether to enable A/B testing for this search.
374
+ * Number of results (hits).
365
375
  */
366
- enableABTest?: boolean;
376
+ nbHits?: number;
377
+ /**
378
+ * Number of pages of results.
379
+ */
380
+ nbPages?: number;
381
+ /**
382
+ * Number of hits per page.
383
+ */
384
+ hitsPerPage?: number;
367
385
  };
368
386
 
369
- type SearchParamsQuery = {
387
+ type Cursor = {
370
388
  /**
371
- * Search query.
389
+ * Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
372
390
  */
373
- query?: string;
391
+ cursor?: string;
374
392
  };
375
393
 
376
- type BaseSearchParams = BaseSearchParamsWithoutQuery & SearchParamsQuery;
394
+ /**
395
+ * Whether the whole query string matches or only a part.
396
+ */
397
+ type MatchLevel = 'none' | 'partial' | 'full';
377
398
 
378
399
  /**
379
- * Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
400
+ * Surround words that match the query with HTML tags for highlighting.
380
401
  */
381
- type Exhaustive = {
402
+ type HighlightResultOption = {
382
403
  /**
383
- * Whether the facet count is exhaustive (`true`) or approximate (`false`). See the [related discussion](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
404
+ * Highlighted attribute value, including HTML tags.
384
405
  */
385
- facetsCount?: boolean;
406
+ value: string;
407
+ matchLevel: MatchLevel;
386
408
  /**
387
- * The value is `false` if not all facet values are retrieved.
409
+ * List of matched words from the search query.
388
410
  */
389
- facetValues?: boolean;
411
+ matchedWords: Array<string>;
390
412
  /**
391
- * Whether the `nbHits` is exhaustive (`true`) or approximate (`false`). When the query takes more than 50ms to be processed, the engine makes an approximation. This can happen when using complex filters on millions of records, when typo-tolerance was not exhaustive, or when enough hits have been retrieved (for example, after the engine finds 10,000 exact matches). `nbHits` is reported as non-exhaustive whenever an approximation is made, even if the approximation didn’t, in the end, impact the exhaustivity of the query.
413
+ * Whether the entire attribute value is highlighted.
392
414
  */
393
- nbHits?: boolean;
415
+ fullyHighlighted?: boolean;
416
+ };
417
+
418
+ type HighlightResult = HighlightResultOption | {
419
+ [key: string]: HighlightResult;
420
+ } | Array<HighlightResult>;
421
+
422
+ type MatchedGeoLocation = {
394
423
  /**
395
- * Rules matching exhaustivity. The value is `false` if rules were enable for this query, and could not be fully processed due a timeout. This is generally caused by the number of alternatives (such as typos) which is too large.
424
+ * Latitude of the matched location.
396
425
  */
397
- rulesMatch?: boolean;
426
+ lat?: number;
398
427
  /**
399
- * Whether the typo search was exhaustive (`true`) or approximate (`false`). An approximation is done when the typo search query part takes more than 10% of the query budget (ie. 5ms by default) to be processed (this can happen when a lot of typo alternatives exist for the query). This field will not be included when typo-tolerance is entirely disabled.
428
+ * Longitude of the matched location.
400
429
  */
401
- typo?: boolean;
402
- };
403
-
404
- type FacetStats = {
430
+ lng?: number;
405
431
  /**
406
- * Minimum value in the results.
432
+ * Distance between the matched location and the search location (in meters).
407
433
  */
408
- min?: number;
434
+ distance?: number;
435
+ };
436
+
437
+ type Personalization = {
409
438
  /**
410
- * Maximum value in the results.
439
+ * The score of the filters.
411
440
  */
412
- max?: number;
441
+ filtersScore?: number;
413
442
  /**
414
- * Average facet value in the results.
443
+ * The score of the ranking.
415
444
  */
416
- avg?: number;
445
+ rankingScore?: number;
417
446
  /**
418
- * Sum of all values in the results.
447
+ * The score of the event.
419
448
  */
420
- sum?: number;
449
+ score?: number;
421
450
  };
422
451
 
423
452
  /**
424
- * Redirect rule data.
453
+ * Object with detailed information about the record\'s ranking.
425
454
  */
426
- type RedirectRuleIndexData = {
427
- ruleObjectID: string;
428
- };
429
-
430
- type RedirectRuleIndexMetadata = {
455
+ type RankingInfo = {
431
456
  /**
432
- * Source index for the redirect rule.
457
+ * Whether a filter matched the query.
433
458
  */
434
- source: string;
459
+ filters?: number;
435
460
  /**
436
- * Destination index for the redirect rule.
461
+ * Position of the first matched word in the best matching attribute of the record.
437
462
  */
438
- dest: string;
463
+ firstMatchedWord: number;
439
464
  /**
440
- * Reason for the redirect rule.
465
+ * Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
441
466
  */
442
- reason: string;
467
+ geoDistance: number;
443
468
  /**
444
- * Redirect rule status.
469
+ * Precision used when computing the geo distance, in meters.
445
470
  */
446
- succeed: boolean;
447
- data: RedirectRuleIndexData;
448
- };
449
-
450
- /**
451
- * [Redirect results to a URL](https://www.algolia.com/doc/guides/managing-results/rules/merchandising-and-promoting/how-to/redirects/), this this parameter is for internal use only.
452
- */
453
- type Redirect = {
454
- index?: RedirectRuleIndexMetadata[];
455
- };
456
-
457
- /**
458
- * Order of facet names.
459
- */
460
- type Facets = {
471
+ geoPrecision?: number;
472
+ matchedGeoLocation?: MatchedGeoLocation;
473
+ personalization?: Personalization;
461
474
  /**
462
- * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
475
+ * Number of exactly matched words.
463
476
  */
464
- order?: string[];
465
- };
466
-
467
- /**
468
- * Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
469
- */
470
- type SortRemainingBy = 'alpha' | 'count' | 'hidden';
471
-
472
- type Value = {
477
+ nbExactWords: number;
473
478
  /**
474
- * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
479
+ * Number of typos encountered when matching the record.
475
480
  */
476
- order?: string[];
477
- sortRemainingBy?: SortRemainingBy;
481
+ nbTypos: number;
478
482
  /**
479
- * Hide facet values.
483
+ * Whether the record was promoted by a rule.
484
+ */
485
+ promoted?: boolean;
486
+ /**
487
+ * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
488
+ */
489
+ proximityDistance?: number;
490
+ /**
491
+ * Overall ranking of the record, expressed as a single integer. This attribute is internal.
492
+ */
493
+ userScore: number;
494
+ /**
495
+ * Number of matched words.
496
+ */
497
+ words?: number;
498
+ /**
499
+ * Whether the record is re-ranked.
480
500
  */
481
- hide?: string[];
501
+ promotedByReRanking?: boolean;
482
502
  };
483
503
 
484
504
  /**
485
- * Order of facet names and facet values in your UI.
505
+ * Snippets that show the context around a matching search query.
486
506
  */
487
- type FacetOrdering = {
488
- facets?: Facets;
507
+ type SnippetResultOption = {
489
508
  /**
490
- * Order of facet values. One object for each facet.
509
+ * Highlighted attribute value, including HTML tags.
491
510
  */
492
- values?: Record<string, Value>;
511
+ value: string;
512
+ matchLevel: MatchLevel;
493
513
  };
494
514
 
495
- /**
496
- * The redirect rule container.
497
- */
498
- type RedirectURL = {
499
- url?: string;
500
- };
515
+ type SnippetResult = SnippetResultOption | {
516
+ [key: string]: SnippetResult;
517
+ } | Array<SnippetResult>;
501
518
 
502
519
  /**
503
- * Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code.
520
+ * Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
504
521
  */
505
- type RenderingContent = {
506
- facetOrdering?: FacetOrdering;
507
- redirect?: RedirectURL;
508
- };
509
-
510
- type BaseSearchResponse = Record<string, any> & {
511
- /**
512
- * A/B test ID. This is only included in the response for indices that are part of an A/B test.
513
- */
514
- abTestID?: number;
522
+ type Hit<T = Record<string, any>> = T & {
515
523
  /**
516
- * Variant ID. This is only included in the response for indices that are part of an A/B test.
524
+ * Unique record identifier.
517
525
  */
518
- abTestVariantID?: number;
526
+ objectID: string;
519
527
  /**
520
- * Computed geographical location.
528
+ * Surround words that match the query with HTML tags for highlighting.
521
529
  */
522
- aroundLatLng?: string;
530
+ _highlightResult?: {
531
+ [key: string]: HighlightResult;
532
+ };
523
533
  /**
524
- * Distance from a central coordinate provided by `aroundLatLng`.
534
+ * Snippets that show the context around a matching search query.
525
535
  */
526
- automaticRadius?: string;
527
- exhaustive?: Exhaustive;
536
+ _snippetResult?: {
537
+ [key: string]: SnippetResult;
538
+ };
539
+ _rankingInfo?: RankingInfo;
540
+ _distinctSeqID?: number;
541
+ };
542
+
543
+ type SearchHits<T = Record<string, any>> = Record<string, any> & {
528
544
  /**
529
- * See the `facetsCount` field of the `exhaustive` object in the response.
545
+ * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
530
546
  */
531
- exhaustiveFacetsCount?: boolean;
547
+ hits: Hit<T>[];
532
548
  /**
533
- * See the `nbHits` field of the `exhaustive` object in the response.
549
+ * Search query.
534
550
  */
535
- exhaustiveNbHits?: boolean;
551
+ query: string;
536
552
  /**
537
- * See the `typo` field of the `exhaustive` object in the response.
553
+ * URL-encoded string of all search parameters.
538
554
  */
539
- exhaustiveTypo?: boolean;
555
+ params: string;
556
+ };
557
+
558
+ type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
559
+
560
+ /**
561
+ * Response and creation timestamp.
562
+ */
563
+ type CreatedAtResponse = {
540
564
  /**
541
- * Facet counts.
565
+ * Date and time when the object was created, in RFC 3339 format.
542
566
  */
543
- facets?: Record<string, Record<string, number>>;
567
+ createdAt: string;
568
+ };
569
+
570
+ type DeleteApiKeyResponse = {
544
571
  /**
545
- * Statistics for numerical facets.
572
+ * Date and time when the object was deleted, in RFC 3339 format.
546
573
  */
547
- facets_stats?: Record<string, FacetStats>;
574
+ deletedAt: string;
575
+ };
576
+
577
+ type DeleteSourceResponse = {
548
578
  /**
549
- * Index name used for the query.
579
+ * Date and time when the object was deleted, in RFC 3339 format.
580
+ */
581
+ deletedAt: string;
582
+ };
583
+
584
+ /**
585
+ * Response, taskID, and deletion timestamp.
586
+ */
587
+ type DeletedAtResponse = {
588
+ /**
589
+ * 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`.
590
+ */
591
+ taskID: number;
592
+ /**
593
+ * Date and time when the object was deleted, in RFC 3339 format.
594
+ */
595
+ deletedAt: string;
596
+ };
597
+
598
+ /**
599
+ * Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and boolean values.
600
+ */
601
+ type StandardEntries = {
602
+ /**
603
+ * Key-value pair of a language ISO code and a boolean value.
604
+ */
605
+ plurals?: {
606
+ [key: string]: boolean;
607
+ } | null;
608
+ /**
609
+ * Key-value pair of a language ISO code and a boolean value.
610
+ */
611
+ stopwords?: {
612
+ [key: string]: boolean;
613
+ } | null;
614
+ /**
615
+ * Key-value pair of a language ISO code and a boolean value.
616
+ */
617
+ compounds?: {
618
+ [key: string]: boolean;
619
+ } | null;
620
+ };
621
+
622
+ /**
623
+ * Turn on or off the built-in Algolia stop words for a specific language.
624
+ */
625
+ type DictionarySettingsParams = {
626
+ disableStandardEntries: StandardEntries;
627
+ };
628
+
629
+ type BaseGetApiKeyResponse = {
630
+ /**
631
+ * API key.
632
+ */
633
+ value?: string;
634
+ /**
635
+ * Timestamp when the object was created, in milliseconds since the Unix epoch.
636
+ */
637
+ createdAt: number;
638
+ };
639
+
640
+ type GetApiKeyResponse = BaseGetApiKeyResponse & ApiKey;
641
+
642
+ type GetDictionarySettingsResponse = {
643
+ disableStandardEntries: StandardEntries;
644
+ };
645
+
646
+ type LogQuery = {
647
+ /**
648
+ * Index targeted by the query.
649
+ */
650
+ index_name?: string;
651
+ /**
652
+ * A user identifier.
653
+ */
654
+ user_token?: string;
655
+ /**
656
+ * Unique query identifier.
657
+ */
658
+ query_id?: string;
659
+ };
660
+
661
+ type Log = {
662
+ /**
663
+ * Date and time of the API request, in RFC 3339 format.
664
+ */
665
+ timestamp: string;
666
+ /**
667
+ * HTTP method of the request.
668
+ */
669
+ method: string;
670
+ /**
671
+ * HTTP status code of the response.
672
+ */
673
+ answer_code: string;
674
+ /**
675
+ * Request body.
676
+ */
677
+ query_body: string;
678
+ /**
679
+ * Response body.
680
+ */
681
+ answer: string;
682
+ /**
683
+ * URL of the API endpoint.
684
+ */
685
+ url: string;
686
+ /**
687
+ * IP address of the client that performed the request.
688
+ */
689
+ ip: string;
690
+ /**
691
+ * Request headers (API keys are obfuscated).
692
+ */
693
+ query_headers: string;
694
+ /**
695
+ * SHA1 signature of the log entry.
696
+ */
697
+ sha1: string;
698
+ /**
699
+ * Number of API requests.
700
+ */
701
+ nb_api_calls: string;
702
+ /**
703
+ * Processing time for the query in milliseconds. This doesn\'t include latency due to the network.
704
+ */
705
+ processing_time_ms: string;
706
+ /**
707
+ * Index targeted by the query.
550
708
  */
551
709
  index?: string;
552
710
  /**
553
- * Index name used for the query. During A/B testing, the targeted index isn\'t always the index used by the query.
711
+ * Query parameters sent with the request.
554
712
  */
555
- indexUsed?: string;
713
+ query_params?: string;
556
714
  /**
557
- * Warnings about the query.
715
+ * Number of search results (hits) returned for the query.
558
716
  */
559
- message?: string;
717
+ query_nb_hits?: string;
560
718
  /**
561
- * Number of hits selected and sorted by the relevant sort algorithm.
719
+ * Queries performed for the given request.
562
720
  */
563
- nbSortedHits?: number;
721
+ inner_queries?: Array<LogQuery>;
722
+ };
723
+
724
+ type GetLogsResponse = {
725
+ logs: Array<Log>;
726
+ };
727
+
728
+ /**
729
+ * Request body for retrieving records.
730
+ */
731
+ type GetObjectsRequest = {
564
732
  /**
565
- * Post-[normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/#what-does-normalization-mean) query string that will be searched.
733
+ * Attributes to retrieve. If not specified, all retrievable attributes are returned.
566
734
  */
567
- parsedQuery?: string;
735
+ attributesToRetrieve?: Array<string>;
568
736
  /**
569
- * Time the server took to process the request, in milliseconds.
737
+ * Object ID for the record to retrieve.
570
738
  */
571
- processingTimeMS: number;
739
+ objectID: string;
572
740
  /**
573
- * Experimental. List of processing steps and their times, in milliseconds. You can use this list to investigate performance issues.
741
+ * Index from which to retrieve the records.
574
742
  */
575
- processingTimingsMS?: Record<string, unknown>;
743
+ indexName: string;
744
+ };
745
+
746
+ /**
747
+ * Request parameters.
748
+ */
749
+ type GetObjectsParams = {
750
+ requests: Array<GetObjectsRequest>;
751
+ };
752
+
753
+ type GetObjectsResponse<T = Record<string, any>> = {
576
754
  /**
577
- * Markup text indicating which parts of the original query have been removed to retrieve a non-empty result set.
755
+ * Retrieved records.
578
756
  */
579
- queryAfterRemoval?: string;
580
- redirect?: Redirect;
581
- renderingContent?: RenderingContent;
757
+ results: T[];
758
+ };
759
+
760
+ /**
761
+ * Task status, `published` if the task is completed, `notPublished` otherwise.
762
+ */
763
+ type TaskStatus = 'published' | 'notPublished';
764
+
765
+ type GetTaskResponse = {
766
+ status: TaskStatus;
767
+ };
768
+
769
+ /**
770
+ * Unique user ID.
771
+ */
772
+ type UserId = {
582
773
  /**
583
- * Time the server took to process the request, in milliseconds.
774
+ * Unique identifier of the user who makes the search request.
584
775
  */
585
- serverTimeMS?: number;
776
+ userID: string;
586
777
  /**
587
- * Host name of the server that processed the request.
778
+ * Cluster to which the user is assigned.
588
779
  */
589
- serverUsed?: string;
780
+ clusterName: string;
590
781
  /**
591
- * An object with custom data. You can store up to 32kB as custom data.
782
+ * Number of records belonging to the user.
592
783
  */
593
- userData?: Record<string, unknown>;
784
+ nbRecords: number;
594
785
  /**
595
- * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
786
+ * Data size used by the user.
596
787
  */
597
- queryID?: string;
788
+ dataSize: number;
789
+ };
790
+
791
+ /**
792
+ * User IDs and clusters.
793
+ */
794
+ type GetTopUserIdsResponse = {
598
795
  /**
599
- * Whether automatic events collection is enabled for the application.
796
+ * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
600
797
  */
601
- _automaticInsights?: boolean;
798
+ topUsers: Array<{
799
+ [key: string]: Array<UserId>;
800
+ }>;
801
+ };
802
+
803
+ type HasPendingMappingsResponse = {
804
+ /**
805
+ * Whether there are clusters undergoing migration, creation, or deletion.
806
+ */
807
+ pending: boolean;
808
+ /**
809
+ * Cluster pending mapping state: migrating, creating, deleting.
810
+ */
811
+ clusters?: {
812
+ [key: string]: Array<string>;
813
+ };
602
814
  };
603
815
 
604
816
  /**
605
- * Assign userID parameters.
817
+ * Dictionary type. If `null`, this dictionary type isn\'t supported for the language.
606
818
  */
607
- type BatchAssignUserIdsParams = {
819
+ type DictionaryLanguage = {
608
820
  /**
609
- * Cluster name.
821
+ * Number of custom dictionary entries.
610
822
  */
611
- cluster: string;
823
+ nbCustomEntries?: number;
824
+ };
825
+
826
+ /**
827
+ * Dictionary language.
828
+ */
829
+ type Languages = {
830
+ plurals: DictionaryLanguage | null;
831
+ stopwords: DictionaryLanguage | null;
832
+ compounds: DictionaryLanguage | null;
833
+ };
834
+
835
+ type ListApiKeysResponse = {
612
836
  /**
613
- * User IDs to assign.
837
+ * API keys.
614
838
  */
615
- users: string[];
839
+ keys: Array<GetApiKeyResponse>;
616
840
  };
617
841
 
618
842
  /**
619
- * Actions to perform.
843
+ * Clusters.
620
844
  */
621
- type DictionaryAction = 'addEntry' | 'deleteEntry';
845
+ type ListClustersResponse = {
846
+ /**
847
+ * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
848
+ */
849
+ topUsers: Array<string>;
850
+ };
851
+
852
+ type FetchedIndex = {
853
+ /**
854
+ * Index name.
855
+ */
856
+ name: string;
857
+ /**
858
+ * Index creation date. An empty string means that the index has no records.
859
+ */
860
+ createdAt: string;
861
+ /**
862
+ * Date and time when the object was updated, in RFC 3339 format.
863
+ */
864
+ updatedAt: string;
865
+ /**
866
+ * Number of records contained in the index.
867
+ */
868
+ entries: number;
869
+ /**
870
+ * Number of bytes of the index in minified format.
871
+ */
872
+ dataSize: number;
873
+ /**
874
+ * Number of bytes of the index binary file.
875
+ */
876
+ fileSize: number;
877
+ /**
878
+ * Last build time.
879
+ */
880
+ lastBuildTimeS: number;
881
+ /**
882
+ * Number of pending indexing operations. This value is deprecated and should not be used.
883
+ */
884
+ numberOfPendingTasks: number;
885
+ /**
886
+ * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
887
+ */
888
+ pendingTask: boolean;
889
+ /**
890
+ * Only present if the index is a replica. Contains the name of the related primary index.
891
+ */
892
+ primary?: string;
893
+ /**
894
+ * Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
895
+ */
896
+ replicas?: Array<string>;
897
+ /**
898
+ * Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
899
+ */
900
+ virtual?: boolean;
901
+ };
902
+
903
+ type ListIndicesResponse = {
904
+ /**
905
+ * All indices in your Algolia application.
906
+ */
907
+ items: Array<FetchedIndex>;
908
+ /**
909
+ * Number of pages.
910
+ */
911
+ nbPages?: number;
912
+ };
622
913
 
623
914
  /**
624
- * Whether a dictionary entry is active.
915
+ * User ID data.
625
916
  */
626
- type DictionaryEntryState = 'disabled' | 'enabled';
917
+ type ListUserIdsResponse = {
918
+ /**
919
+ * User IDs.
920
+ */
921
+ userIDs: Array<UserId>;
922
+ };
923
+
924
+ type MultipleBatchResponse = {
925
+ /**
926
+ * Task IDs. One for each index.
927
+ */
928
+ taskID: {
929
+ [key: string]: number;
930
+ };
931
+ /**
932
+ * Unique record identifiers.
933
+ */
934
+ objectIDs: Array<string>;
935
+ };
936
+
937
+ type RemoveUserIdResponse = {
938
+ /**
939
+ * Date and time when the object was deleted, in RFC 3339 format.
940
+ */
941
+ deletedAt: string;
942
+ };
627
943
 
628
944
  /**
629
- * Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
945
+ * Response, taskID, and update timestamp.
630
946
  */
631
- type DictionaryEntryType = 'custom' | 'standard';
947
+ type UpdatedAtResponse = {
948
+ /**
949
+ * 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`.
950
+ */
951
+ taskID: number;
952
+ /**
953
+ * Date and time when the object was updated, in RFC 3339 format.
954
+ */
955
+ updatedAt: string;
956
+ };
957
+
958
+ type ReplaceAllObjectsResponse = {
959
+ copyOperationResponse: UpdatedAtResponse;
960
+ /**
961
+ * The response of the `batch` request(s).
962
+ */
963
+ batchResponses: Array<BatchResponse>;
964
+ moveOperationResponse: UpdatedAtResponse;
965
+ };
966
+
967
+ type ReplaceSourceResponse = {
968
+ /**
969
+ * Date and time when the object was updated, in RFC 3339 format.
970
+ */
971
+ updatedAt: string;
972
+ };
632
973
 
633
974
  /**
634
- * Dictionary entry.
975
+ * Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`.
635
976
  */
636
- type DictionaryEntry = Record<string, any> & {
977
+ type Anchoring = 'is' | 'startsWith' | 'endsWith' | 'contains';
978
+
979
+ type Condition = {
637
980
  /**
638
- * Unique identifier for the dictionary entry.
981
+ * 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\".
639
982
  */
640
- objectID: string;
641
- language?: SupportedLanguage;
983
+ pattern?: string;
984
+ anchoring?: Anchoring;
642
985
  /**
643
- * Matching dictionary word for `stopwords` and `compounds` dictionaries.
986
+ * Whether the pattern should match plurals, synonyms, and typos.
644
987
  */
645
- word?: string;
988
+ alternatives?: boolean;
646
989
  /**
647
- * Matching words in the `plurals` dictionary including declensions.
990
+ * 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.
648
991
  */
649
- words?: string[];
992
+ context?: string;
650
993
  /**
651
- * Invividual components of a compound word in the `compounds` dictionary.
994
+ * 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.
652
995
  */
653
- decomposition?: string[];
654
- state?: DictionaryEntryState;
655
- type?: DictionaryEntryType;
996
+ filters?: string;
656
997
  };
657
998
 
658
- type BatchDictionaryEntriesRequest = {
659
- action: DictionaryAction;
660
- body: DictionaryEntry;
999
+ /**
1000
+ * Object ID of the record to hide.
1001
+ */
1002
+ type ConsequenceHide = {
1003
+ /**
1004
+ * Unique record identifier.
1005
+ */
1006
+ objectID: string;
661
1007
  };
662
1008
 
663
1009
  /**
664
- * Request body for updating dictionary entries.
1010
+ * Range object with lower and upper values in meters to define custom ranges.
665
1011
  */
666
- type BatchDictionaryEntriesParams = {
1012
+ type Range = {
1013
+ /**
1014
+ * Lower boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
1015
+ */
1016
+ from?: number;
1017
+ /**
1018
+ * Upper boundary of a range in meters. The Geo ranking criterion considers all records within the range to be equal.
1019
+ */
1020
+ value?: number;
1021
+ };
1022
+
1023
+ /**
1024
+ * Precision of a coordinate-based search in meters to group results with similar distances. The Geo ranking criterion considers all matches within the same range of distances to be equal.
1025
+ */
1026
+ type AroundPrecision = number | Array<Range>;
1027
+
1028
+ /**
1029
+ * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
1030
+ */
1031
+ type AroundRadiusAll = 'all';
1032
+
1033
+ /**
1034
+ * Maximum radius for a search around a central location. This parameter works in combination with the `aroundLatLng` and `aroundLatLngViaIP` parameters. By default, the search radius is determined automatically from the density of hits around the central location. The search radius is small if there are many hits close to the central coordinates.
1035
+ */
1036
+ type AroundRadius = number | AroundRadiusAll;
1037
+
1038
+ /**
1039
+ * Filter the search by facet values, so that only records with the same facet values are retrieved. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** - `[filter1, filter2]` is interpreted as `filter1 AND filter2`. - `[[filter1, filter2], filter3]` is interpreted as `filter1 OR filter2 AND filter3`. - `facet:-value` is interpreted as `NOT facet:value`. While it\'s best to avoid attributes that start with a `-`, you can still filter them by escaping with a backslash: `facet:\\-value`.
1040
+ */
1041
+ type FacetFilters = Array<FacetFilters> | string;
1042
+
1043
+ /**
1044
+ * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
1045
+ */
1046
+ type NumericFilters = Array<NumericFilters> | string;
1047
+
1048
+ /**
1049
+ * Filters to promote or demote records in the search results. Optional filters work like facet filters, but they don\'t exclude records from the search results. Records that match the optional filter rank before records that don\'t match. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match. - Optional filters don\'t work on virtual replicas. - Optional filters are applied _after_ sort-by attributes. - Optional filters don\'t work with numeric attributes.
1050
+ */
1051
+ type OptionalFilters = Array<OptionalFilters> | string;
1052
+
1053
+ /**
1054
+ * ISO code for a supported language.
1055
+ */
1056
+ type SupportedLanguage = 'af' | 'ar' | 'az' | 'bg' | 'bn' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'eo' | 'es' | 'et' | 'eu' | 'fa' | 'fi' | 'fo' | 'fr' | 'ga' | 'gl' | 'he' | 'hi' | 'hu' | 'hy' | 'id' | 'is' | 'it' | 'ja' | 'ka' | 'kk' | 'ko' | 'ku' | 'ky' | 'lt' | 'lv' | 'mi' | 'mn' | 'mr' | 'ms' | 'mt' | 'nb' | 'nl' | 'no' | 'ns' | 'pl' | 'ps' | 'pt' | 'pt-br' | 'qu' | 'ro' | 'ru' | 'sk' | 'sq' | 'sv' | 'sw' | 'ta' | 'te' | 'th' | 'tl' | 'tn' | 'tr' | 'tt' | 'uk' | 'ur' | 'uz' | 'zh';
1057
+
1058
+ /**
1059
+ * Filter the search by values of the special `_tags` attribute. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** Different from regular facets, `_tags` can only be used for filtering (including or excluding records). You won\'t get a facet count. The same combination and escaping rules apply as for `facetFilters`.
1060
+ */
1061
+ type TagFilters = Array<TagFilters> | string;
1062
+
1063
+ type BaseSearchParamsWithoutQuery = {
1064
+ /**
1065
+ * Keywords to be used instead of the search query to conduct a more broader search. Using the `similarQuery` parameter changes other settings: - `queryType` is set to `prefixNone`. - `removeStopWords` is set to true. - `words` is set as the first ranking criterion. - All remaining words are treated as `optionalWords`. Since the `similarQuery` is supposed to do a broad search, they usually return many results. Combine it with `filters` to narrow down the list of results.
1066
+ */
1067
+ similarQuery?: string;
1068
+ /**
1069
+ * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
1070
+ */
1071
+ filters?: string;
1072
+ facetFilters?: FacetFilters;
1073
+ optionalFilters?: OptionalFilters;
1074
+ numericFilters?: NumericFilters;
1075
+ tagFilters?: TagFilters;
1076
+ /**
1077
+ * Whether to sum all filter scores. If true, all filter scores are summed. Otherwise, the maximum filter score is kept. For more information, see [filter scores](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/in-depth/filter-scoring/#accumulating-scores-with-sumorfiltersscores).
1078
+ */
1079
+ sumOrFiltersScores?: boolean;
1080
+ /**
1081
+ * Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
1082
+ */
1083
+ restrictSearchableAttributes?: Array<string>;
1084
+ /**
1085
+ * Facets for which to retrieve facet values that match the search criteria and the number of matching facet values. To retrieve all facets, use the wildcard character `*`. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts).
1086
+ */
1087
+ facets?: Array<string>;
1088
+ /**
1089
+ * Whether faceting should be applied after deduplication with `distinct`. This leads to accurate facet counts when using faceting in combination with `distinct`. It\'s usually better to use `afterDistinct` modifiers in the `attributesForFaceting` setting, as `facetingAfterDistinct` only computes correct facet counts if all records have the same facet values for the `attributeForDistinct`.
1090
+ */
1091
+ facetingAfterDistinct?: boolean;
1092
+ /**
1093
+ * Page of search results to retrieve.
1094
+ */
1095
+ page?: number;
1096
+ /**
1097
+ * Position of the first hit to retrieve.
1098
+ */
1099
+ offset?: number;
1100
+ /**
1101
+ * Number of hits to retrieve (used in combination with `offset`).
1102
+ */
1103
+ length?: number;
1104
+ /**
1105
+ * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
1106
+ */
1107
+ aroundLatLng?: string;
1108
+ /**
1109
+ * Whether to obtain the coordinates from the request\'s IP address.
1110
+ */
1111
+ aroundLatLngViaIP?: boolean;
1112
+ aroundRadius?: AroundRadius;
1113
+ aroundPrecision?: AroundPrecision;
1114
+ /**
1115
+ * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
1116
+ */
1117
+ minimumAroundRadius?: number;
1118
+ /**
1119
+ * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
1120
+ */
1121
+ insideBoundingBox?: Array<Array<number>>;
667
1122
  /**
668
- * Whether to replace all custom entries in the dictionary with the ones sent with this request.
1123
+ * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
669
1124
  */
670
- clearExistingDictionaryEntries?: boolean;
1125
+ insidePolygon?: Array<Array<number>>;
671
1126
  /**
672
- * List of additions and deletions to your dictionaries.
1127
+ * ISO language codes that adjust settings that are useful for processing natural language queries (as opposed to keyword searches): - Sets `removeStopWords` and `ignorePlurals` to the list of provided languages. - Sets `removeWordsIfNoResults` to `allOptional`. - Adds a `natural_language` attribute to `ruleContexts` and `analyticsTags`.
673
1128
  */
674
- requests: BatchDictionaryEntriesRequest[];
675
- };
676
-
677
- type MultipleBatchRequest = {
678
- action: Action;
1129
+ naturalLanguages?: Array<SupportedLanguage>;
679
1130
  /**
680
- * Operation arguments (varies with specified `action`).
1131
+ * Assigns a rule context to the search query. [Rule contexts](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/how-to/customize-search-results-by-platform/#whats-a-context) are strings that you can use to trigger matching rules.
681
1132
  */
682
- body?: Record<string, unknown>;
1133
+ ruleContexts?: Array<string>;
683
1134
  /**
684
- * Index name (case-sensitive).
1135
+ * Impact that Personalization should have on this search. The higher this value is, the more Personalization determines the ranking compared to other factors. For more information, see [Understanding Personalization impact](https://www.algolia.com/doc/guides/personalization/personalizing-results/in-depth/configuring-personalization/#understanding-personalization-impact).
685
1136
  */
686
- indexName: string;
687
- };
688
-
689
- /**
690
- * Batch parameters.
691
- */
692
- type BatchParams = {
693
- requests: MultipleBatchRequest[];
694
- };
695
-
696
- type BatchRequest = {
697
- action: Action;
1137
+ personalizationImpact?: number;
698
1138
  /**
699
- * Operation arguments (varies with specified `action`).
1139
+ * Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken/).
700
1140
  */
701
- body: Record<string, unknown>;
702
- };
703
-
704
- type BatchResponse = {
1141
+ userToken?: string;
705
1142
  /**
706
- * 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`.
1143
+ * Whether the search response should include detailed ranking information.
707
1144
  */
708
- taskID: number;
1145
+ getRankingInfo?: boolean;
709
1146
  /**
710
- * Unique record identifiers.
1147
+ * Whether to take into account an index\'s synonyms for this search.
711
1148
  */
712
- objectIDs: string[];
713
- };
714
-
715
- /**
716
- * Batch parameters.
717
- */
718
- type BatchWriteParams = {
719
- requests: BatchRequest[];
720
- };
721
-
722
- type BooleanString = 'false' | 'true';
723
-
724
- type BrowsePagination = {
1149
+ synonyms?: boolean;
725
1150
  /**
726
- * Page of search results to retrieve.
1151
+ * Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
727
1152
  */
728
- page?: number;
1153
+ clickAnalytics?: boolean;
729
1154
  /**
730
- * Number of results (hits).
1155
+ * Whether this search will be included in Analytics.
731
1156
  */
732
- nbHits?: number;
1157
+ analytics?: boolean;
733
1158
  /**
734
- * Number of pages of results.
1159
+ * Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
735
1160
  */
736
- nbPages?: number;
1161
+ analyticsTags?: Array<string>;
737
1162
  /**
738
- * Number of hits per page.
1163
+ * Whether to include this search when calculating processing-time percentiles.
739
1164
  */
740
- hitsPerPage?: number;
741
- };
742
-
743
- type Cursor = {
1165
+ percentileComputation?: boolean;
744
1166
  /**
745
- * Cursor to get the next page of the response. The parameter must match the value returned in the response of a previous request. The last page of the response does not return a `cursor` attribute.
1167
+ * Whether to enable A/B testing for this search.
746
1168
  */
747
- cursor?: string;
1169
+ enableABTest?: boolean;
748
1170
  };
749
1171
 
1172
+ type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
1173
+
1174
+ type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym';
1175
+
750
1176
  /**
751
1177
  * Determines how many records of a group are included in the search results. Records with the same value for the `attributeForDistinct` attribute are considered a group. The `distinct` setting controls how many members of the group are returned. This is useful for [deduplication and grouping](https://www.algolia.com/doc/guides/managing-results/refine-results/grouping/#introducing-algolias-distinct-feature). The `distinct` setting is ignored if `attributeForDistinct` is not set.
752
1178
  */
@@ -757,35 +1183,37 @@ type Distinct = boolean | number;
757
1183
  */
758
1184
  type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
759
1185
 
1186
+ type BooleanString = 'true' | 'false';
1187
+
760
1188
  /**
761
1189
  * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
762
1190
  */
763
- type IgnorePlurals = BooleanString | SupportedLanguage[] | boolean;
1191
+ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
764
1192
 
765
1193
  /**
766
1194
  * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
767
1195
  */
768
- type Mode = 'keywordSearch' | 'neuralSearch';
1196
+ type Mode = 'neuralSearch' | 'keywordSearch';
769
1197
 
770
1198
  /**
771
- * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
1199
+ * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
772
1200
  */
773
- type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
1201
+ type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
774
1202
 
775
1203
  /**
776
1204
  * Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
777
1205
  */
778
- type ReRankingApplyFilter = ReRankingApplyFilter[] | string;
1206
+ type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
779
1207
 
780
1208
  /**
781
1209
  * Removes stop words from the search query. Stop words are common words like articles, conjunctions, prepositions, or pronouns that have little or no meaning on their own. In English, \"the\", \"a\", or \"and\" are stop words. You should only use this feature for the languages used in your index.
782
1210
  */
783
- type RemoveStopWords = SupportedLanguage[] | boolean;
1211
+ type RemoveStopWords = Array<SupportedLanguage> | boolean;
784
1212
 
785
1213
  /**
786
1214
  * Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
787
1215
  */
788
- type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
1216
+ type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
789
1217
 
790
1218
  /**
791
1219
  * Settings for the semantic search part of NeuralSearch. Only used when `mode` is `neuralSearch`.
@@ -794,7 +1222,7 @@ type SemanticSearch = {
794
1222
  /**
795
1223
  * Indices from which to collect click and conversion events. If null, the current index and all its replicas are used.
796
1224
  */
797
- eventSources?: string[] | null;
1225
+ eventSources?: Array<string> | null;
798
1226
  };
799
1227
 
800
1228
  /**
@@ -803,23 +1231,23 @@ type SemanticSearch = {
803
1231
  type TypoToleranceEnum = 'min' | 'strict';
804
1232
 
805
1233
  /**
806
- * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
1234
+ * Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.
807
1235
  */
808
- type TypoTolerance = TypoToleranceEnum | boolean;
1236
+ type TypoTolerance = boolean | TypoToleranceEnum;
809
1237
 
810
1238
  type IndexSettingsAsSearchParams = {
811
1239
  /**
812
1240
  * Attributes to include in the API response. To reduce the size of your response, you can retrieve only some of the attributes. Attribute names are case-sensitive. - `*` retrieves all attributes, except attributes included in the `customRanking` and `unretrievableAttributes` settings. - To retrieve all attributes except a specific one, prefix the attribute with a dash and combine it with the `*`: `[\"*\", \"-ATTRIBUTE\"]`. - The `objectID` attribute is always included.
813
1241
  */
814
- attributesToRetrieve?: string[];
1242
+ attributesToRetrieve?: Array<string>;
815
1243
  /**
816
1244
  * Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
817
1245
  */
818
- ranking?: string[];
1246
+ ranking?: Array<string>;
819
1247
  /**
820
1248
  * Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
821
1249
  */
822
- customRanking?: string[];
1250
+ customRanking?: Array<string>;
823
1251
  /**
824
1252
  * Relevancy threshold below which less relevant results aren\'t included in the results. You can only set `relevancyStrictness` on [virtual replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/#what-are-virtual-replicas). Use this setting to strike a balance between the relevance and number of returned results.
825
1253
  */
@@ -827,11 +1255,11 @@ type IndexSettingsAsSearchParams = {
827
1255
  /**
828
1256
  * Attributes to highlight. By default, all searchable attributes are highlighted. Use `*` to highlight all attributes or use an empty array `[]` to turn off highlighting. Attribute names are case-sensitive. With highlighting, strings that match the search query are surrounded by HTML tags defined by `highlightPreTag` and `highlightPostTag`. You can use this to visually highlight matching parts of a search query in your UI. For more information, see [Highlighting and snippeting](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/highlighting-snippeting/js/).
829
1257
  */
830
- attributesToHighlight?: string[];
1258
+ attributesToHighlight?: Array<string>;
831
1259
  /**
832
1260
  * Attributes for which to enable snippets. Attribute names are case-sensitive. Snippets provide additional context to matched words. If you enable snippets, they include 10 words, including the matched word. The matched word will also be wrapped by HTML tags for highlighting. You can adjust the number of words with the following notation: `ATTRIBUTE:NUMBER`, where `NUMBER` is the number of words to be extracted.
833
1261
  */
834
- attributesToSnippet?: string[];
1262
+ attributesToSnippet?: Array<string>;
835
1263
  /**
836
1264
  * HTML tag to insert before the highlighted parts in all highlighted results and snippets.
837
1265
  */
@@ -868,7 +1296,7 @@ type IndexSettingsAsSearchParams = {
868
1296
  /**
869
1297
  * Attributes for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). Attribute names are case-sensitive. Returning only exact matches can help when: - [Searching in hyphenated attributes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/how-to/how-to-search-in-hyphenated-attributes/). - Reducing the number of matches when you have too many. This can happen with attributes that are long blocks of text, such as product descriptions. Consider alternatives such as `disableTypoToleranceOnWords` or adding synonyms if your attributes have intentional unusual spellings that might look like typos.
870
1298
  */
871
- disableTypoToleranceOnAttributes?: string[];
1299
+ disableTypoToleranceOnAttributes?: Array<string>;
872
1300
  ignorePlurals?: IgnorePlurals;
873
1301
  removeStopWords?: RemoveStopWords;
874
1302
  /**
@@ -878,7 +1306,7 @@ type IndexSettingsAsSearchParams = {
878
1306
  /**
879
1307
  * Languages for language-specific query processing steps such as plurals, stop-word removal, and word-detection dictionaries. This setting sets a default list of languages used by the `removeStopWords` and `ignorePlurals` settings. This setting also sets a dictionary for word detection in the logogram-based [CJK](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/#normalization-for-logogram-based-languages-cjk) languages. To support this, you must place the CJK language **first**. **You should always specify a query language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
880
1308
  */
881
- queryLanguages?: SupportedLanguage[];
1309
+ queryLanguages?: Array<SupportedLanguage>;
882
1310
  /**
883
1311
  * Whether to split compound words in the query into their building blocks. For more information, see [Word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#splitting-compound-words). Word segmentation is supported for these languages: German, Dutch, Finnish, Swedish, and Norwegian. Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
884
1312
  */
@@ -900,25 +1328,25 @@ type IndexSettingsAsSearchParams = {
900
1328
  */
901
1329
  advancedSyntax?: boolean;
902
1330
  /**
903
- * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
1331
+ * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
904
1332
  */
905
- optionalWords?: string[];
1333
+ optionalWords?: Array<string>;
906
1334
  /**
907
- * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
1335
+ * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
908
1336
  */
909
- disableExactOnAttributes?: string[];
1337
+ disableExactOnAttributes?: Array<string>;
910
1338
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
911
1339
  /**
912
1340
  * Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
913
1341
  */
914
- alternativesAsExact?: AlternativesAsExact[];
1342
+ alternativesAsExact?: Array<AlternativesAsExact>;
915
1343
  /**
916
1344
  * Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
917
1345
  */
918
- advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
1346
+ advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;
919
1347
  distinct?: Distinct;
920
1348
  /**
921
- * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
1349
+ * Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response.
922
1350
  */
923
1351
  replaceSynonymsInHighlight?: boolean;
924
1352
  /**
@@ -928,7 +1356,7 @@ type IndexSettingsAsSearchParams = {
928
1356
  /**
929
1357
  * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI.
930
1358
  */
931
- responseFields?: string[];
1359
+ responseFields?: Array<string>;
932
1360
  /**
933
1361
  * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
934
1362
  */
@@ -954,215 +1382,27 @@ type IndexSettingsAsSearchParams = {
954
1382
  };
955
1383
 
956
1384
  /**
957
- * Each parameter value, including the `query` must not be larger than 512 bytes.
958
- */
959
- type SearchParamsObject = BaseSearchParams & IndexSettingsAsSearchParams;
960
-
961
- type BrowseParamsObject = Cursor & SearchParamsObject;
962
-
963
- /**
964
- * Search parameters as query string.
965
- */
966
- type SearchParamsString = {
967
- /**
968
- * Search parameters as a URL-encoded query string.
969
- */
970
- params?: string;
971
- };
972
-
973
- type BrowseParams = BrowseParamsObject | SearchParamsString;
974
-
975
- /**
976
- * Whether the whole query string matches or only a part.
977
- */
978
- type MatchLevel = 'full' | 'none' | 'partial';
979
-
980
- /**
981
- * Surround words that match the query with HTML tags for highlighting.
982
- */
983
- type HighlightResultOption = {
984
- /**
985
- * Highlighted attribute value, including HTML tags.
986
- */
987
- value: string;
988
- matchLevel: MatchLevel;
989
- /**
990
- * List of matched words from the search query.
991
- */
992
- matchedWords: string[];
993
- /**
994
- * Whether the entire attribute value is highlighted.
995
- */
996
- fullyHighlighted?: boolean;
997
- };
998
-
999
- type HighlightResult = HighlightResult[] | HighlightResultOption | {
1000
- [key: string]: HighlightResult;
1001
- };
1002
-
1003
- type MatchedGeoLocation = {
1004
- /**
1005
- * Latitude of the matched location.
1006
- */
1007
- lat?: number;
1008
- /**
1009
- * Longitude of the matched location.
1010
- */
1011
- lng?: number;
1012
- /**
1013
- * Distance between the matched location and the search location (in meters).
1014
- */
1015
- distance?: number;
1016
- };
1017
-
1018
- type Personalization = {
1019
- /**
1020
- * The score of the filters.
1021
- */
1022
- filtersScore?: number;
1023
- /**
1024
- * The score of the ranking.
1025
- */
1026
- rankingScore?: number;
1027
- /**
1028
- * The score of the event.
1029
- */
1030
- score?: number;
1031
- };
1032
-
1033
- /**
1034
- * Object with detailed information about the record\'s ranking.
1035
- */
1036
- type RankingInfo = {
1037
- /**
1038
- * Whether a filter matched the query.
1039
- */
1040
- filters?: number;
1041
- /**
1042
- * Position of the first matched word in the best matching attribute of the record.
1043
- */
1044
- firstMatchedWord: number;
1045
- /**
1046
- * Distance between the geo location in the search query and the best matching geo location in the record, divided by the geo precision (in meters).
1047
- */
1048
- geoDistance: number;
1049
- /**
1050
- * Precision used when computing the geo distance, in meters.
1051
- */
1052
- geoPrecision?: number;
1053
- matchedGeoLocation?: MatchedGeoLocation;
1054
- personalization?: Personalization;
1055
- /**
1056
- * Number of exactly matched words.
1057
- */
1058
- nbExactWords: number;
1059
- /**
1060
- * Number of typos encountered when matching the record.
1061
- */
1062
- nbTypos: number;
1063
- /**
1064
- * Whether the record was promoted by a rule.
1065
- */
1066
- promoted?: boolean;
1067
- /**
1068
- * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.
1069
- */
1070
- proximityDistance?: number;
1071
- /**
1072
- * Overall ranking of the record, expressed as a single integer. This attribute is internal.
1073
- */
1074
- userScore: number;
1075
- /**
1076
- * Number of matched words.
1077
- */
1078
- words?: number;
1079
- /**
1080
- * Whether the record is re-ranked.
1081
- */
1082
- promotedByReRanking?: boolean;
1083
- };
1084
-
1085
- /**
1086
- * Snippets that show the context around a matching search query.
1087
- */
1088
- type SnippetResultOption = {
1089
- /**
1090
- * Highlighted attribute value, including HTML tags.
1091
- */
1092
- value: string;
1093
- matchLevel: MatchLevel;
1094
- };
1095
-
1096
- type SnippetResult = SnippetResult[] | SnippetResultOption | {
1097
- [key: string]: SnippetResult;
1098
- };
1099
-
1100
- /**
1101
- * Search result. A hit is a record from your index, augmented with special attributes for highlighting, snippeting, and ranking.
1385
+ * Filter or optional filter to be applied to the search.
1102
1386
  */
1103
- type Hit<T = Record<string, any>> = T & {
1104
- /**
1105
- * Unique record identifier.
1106
- */
1107
- objectID: string;
1108
- /**
1109
- * Surround words that match the query with HTML tags for highlighting.
1110
- */
1111
- _highlightResult?: Record<string, HighlightResult>;
1112
- /**
1113
- * Snippets that show the context around a matching search query.
1114
- */
1115
- _snippetResult?: Record<string, SnippetResult>;
1116
- _rankingInfo?: RankingInfo;
1117
- _distinctSeqID?: number;
1118
- };
1119
-
1120
- type SearchHits<T = Record<string, any>> = Record<string, any> & {
1121
- /**
1122
- * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
1123
- */
1124
- hits: Array<Hit<T>>;
1125
- /**
1126
- * Search query.
1127
- */
1128
- query: string;
1129
- /**
1130
- * URL-encoded string of all search parameters.
1131
- */
1132
- params: string;
1133
- };
1134
-
1135
- type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & Cursor & SearchHits<T>;
1136
-
1137
- type Condition = {
1138
- /**
1139
- * 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\".
1140
- */
1141
- pattern?: string;
1142
- anchoring?: Anchoring;
1387
+ type AutomaticFacetFilter = {
1143
1388
  /**
1144
- * Whether the pattern should match plurals, synonyms, and typos.
1389
+ * Facet name to be applied as filter. The name must match placeholders in the `pattern` parameter. For example, with `pattern: {facet:genre}`, `automaticFacetFilters` must be `genre`.
1145
1390
  */
1146
- alternatives?: boolean;
1391
+ facet: string;
1147
1392
  /**
1148
- * 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.
1393
+ * Filter scores to give different weights to individual filters.
1149
1394
  */
1150
- context?: string;
1395
+ score?: number;
1151
1396
  /**
1152
- * 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.
1397
+ * Whether the filter is disjunctive or conjunctive. If true the filter has multiple matches, multiple occurences are combined with the logical `OR` operation. If false, multiple occurences are combined with the logical `AND` operation.
1153
1398
  */
1154
- filters?: string;
1399
+ disjunctive?: boolean;
1155
1400
  };
1156
1401
 
1157
1402
  /**
1158
- * Object ID of the record to hide.
1403
+ * Filter to be applied to the search. You can use this to respond to search queries that match a facet value. For example, if users search for \"comedy\", which matches a facet value of the \"genre\" facet, you can filter the results to show the top-ranked comedy movies.
1159
1404
  */
1160
- type ConsequenceHide = {
1161
- /**
1162
- * Unique record identifier.
1163
- */
1164
- objectID: string;
1165
- };
1405
+ type AutomaticFacetFilters = Array<AutomaticFacetFilter> | Array<string>;
1166
1406
 
1167
1407
  /**
1168
1408
  * Type of edit.
@@ -1185,11 +1425,11 @@ type ConsequenceQueryObject = {
1185
1425
  /**
1186
1426
  * Words to remove from the search query.
1187
1427
  */
1188
- remove?: string[];
1428
+ remove?: Array<string>;
1189
1429
  /**
1190
1430
  * Changes to make to the search query.
1191
1431
  */
1192
- edits?: Edit[];
1432
+ edits?: Array<Edit>;
1193
1433
  };
1194
1434
 
1195
1435
  /**
@@ -1230,14 +1470,14 @@ type PromoteObjectIDs = {
1230
1470
  /**
1231
1471
  * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results.
1232
1472
  */
1233
- objectIDs: string[];
1473
+ objectIDs: Array<string>;
1234
1474
  /**
1235
1475
  * Position in the search results where you want to show the promoted records.
1236
1476
  */
1237
1477
  position: number;
1238
1478
  };
1239
1479
 
1240
- type Promote = PromoteObjectID | PromoteObjectIDs;
1480
+ type Promote = PromoteObjectIDs | PromoteObjectID;
1241
1481
 
1242
1482
  /**
1243
1483
  * Effect of the rule. For more information, see [Consequences](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#consequences).
@@ -1247,7 +1487,7 @@ type Consequence = {
1247
1487
  /**
1248
1488
  * 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.
1249
1489
  */
1250
- promote?: Promote[];
1490
+ promote?: Array<Promote>;
1251
1491
  /**
1252
1492
  * 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.
1253
1493
  */
@@ -1255,825 +1495,693 @@ type Consequence = {
1255
1495
  /**
1256
1496
  * Records you want to hide from the search results.
1257
1497
  */
1258
- hide?: ConsequenceHide[];
1498
+ hide?: Array<ConsequenceHide>;
1259
1499
  /**
1260
1500
  * 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.
1261
1501
  */
1262
1502
  userData?: any | null;
1263
1503
  };
1264
1504
 
1265
- /**
1266
- * Response and creation timestamp.
1267
- */
1268
- type CreatedAtResponse = {
1505
+ type TimeRange = {
1269
1506
  /**
1270
- * Date and time when the object was created, in RFC 3339 format.
1507
+ * When the rule should start to be active, in Unix epoch time.
1271
1508
  */
1272
- createdAt: string;
1273
- };
1274
-
1275
- type DeleteApiKeyResponse = {
1509
+ from: number;
1276
1510
  /**
1277
- * Date and time when the object was deleted, in RFC 3339 format.
1511
+ * When the rule should stop to be active, in Unix epoch time.
1278
1512
  */
1279
- deletedAt: string;
1513
+ until: number;
1280
1514
  };
1281
1515
 
1282
- type DeleteByParams = {
1283
- facetFilters?: FacetFilters;
1516
+ /**
1517
+ * Rule object.
1518
+ */
1519
+ type Rule = {
1284
1520
  /**
1285
- * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
1521
+ * Unique identifier of a rule object.
1286
1522
  */
1287
- filters?: string;
1288
- numericFilters?: NumericFilters;
1289
- tagFilters?: TagFilters;
1523
+ objectID: string;
1290
1524
  /**
1291
- * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
1525
+ * Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
1292
1526
  */
1293
- aroundLatLng?: string;
1294
- aroundRadius?: AroundRadius;
1527
+ conditions?: Array<Condition>;
1528
+ consequence?: Consequence;
1295
1529
  /**
1296
- * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
1530
+ * Description of the rule\'s purpose to help you distinguish between different rules.
1297
1531
  */
1298
- insideBoundingBox?: number[][];
1532
+ description?: string;
1299
1533
  /**
1300
- * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
1534
+ * Whether the rule is active.
1301
1535
  */
1302
- insidePolygon?: number[][];
1303
- };
1304
-
1305
- type DeleteSourceResponse = {
1536
+ enabled?: boolean;
1306
1537
  /**
1307
- * Date and time when the object was deleted, in RFC 3339 format.
1538
+ * Time periods when the rule is active.
1308
1539
  */
1309
- deletedAt: string;
1540
+ validity?: Array<TimeRange>;
1310
1541
  };
1311
1542
 
1312
- /**
1313
- * Response, taskID, and deletion timestamp.
1314
- */
1315
- type DeletedAtResponse = {
1543
+ type SaveObjectResponse = {
1316
1544
  /**
1317
- * 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`.
1545
+ * Date and time when the object was created, in RFC 3339 format.
1318
1546
  */
1319
- taskID: number;
1547
+ createdAt: string;
1320
1548
  /**
1321
- * Date and time when the object was deleted, in RFC 3339 format.
1549
+ * 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`.
1322
1550
  */
1323
- deletedAt: string;
1324
- };
1325
-
1326
- /**
1327
- * Dictionary type. If `null`, this dictionary type isn\'t supported for the language.
1328
- */
1329
- type DictionaryLanguage = {
1551
+ taskID: number;
1330
1552
  /**
1331
- * Number of custom dictionary entries.
1553
+ * Unique record identifier.
1332
1554
  */
1333
- nbCustomEntries?: number;
1555
+ objectID?: string;
1334
1556
  };
1335
1557
 
1336
- /**
1337
- * Key-value pairs of [supported language ISO codes](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/) and boolean values.
1338
- */
1339
- type StandardEntries = {
1558
+ type SaveSynonymResponse = {
1340
1559
  /**
1341
- * Key-value pair of a language ISO code and a boolean value.
1560
+ * 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`.
1342
1561
  */
1343
- plurals?: Record<string, boolean> | null;
1562
+ taskID: number;
1344
1563
  /**
1345
- * Key-value pair of a language ISO code and a boolean value.
1564
+ * Date and time when the object was updated, in RFC 3339 format.
1346
1565
  */
1347
- stopwords?: Record<string, boolean> | null;
1566
+ updatedAt: string;
1348
1567
  /**
1349
- * Key-value pair of a language ISO code and a boolean value.
1568
+ * Unique identifier of a synonym object.
1350
1569
  */
1351
- compounds?: Record<string, boolean> | null;
1570
+ id: string;
1352
1571
  };
1353
1572
 
1354
1573
  /**
1355
- * Turn on or off the built-in Algolia stop words for a specific language.
1574
+ * Whether a dictionary entry is active.
1356
1575
  */
1357
- type DictionarySettingsParams = {
1358
- disableStandardEntries: StandardEntries;
1359
- };
1360
-
1361
- type DictionaryType = 'compounds' | 'plurals' | 'stopwords';
1576
+ type DictionaryEntryState = 'enabled' | 'disabled';
1362
1577
 
1363
1578
  /**
1364
- * Error.
1579
+ * Whether a dictionary entry is provided by Algolia (standard), or has been added by you (custom).
1365
1580
  */
1366
- type ErrorBase = Record<string, any> & {
1367
- message?: string;
1368
- };
1369
-
1370
- type FacetHits = {
1371
- /**
1372
- * Facet value.
1373
- */
1374
- value: string;
1375
- /**
1376
- * Highlighted attribute value, including HTML tags.
1377
- */
1378
- highlighted: string;
1379
- /**
1380
- * Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
1381
- */
1382
- count: number;
1383
- };
1581
+ type DictionaryEntryType = 'custom' | 'standard';
1384
1582
 
1385
- type FetchedIndex = {
1386
- /**
1387
- * Index name.
1388
- */
1389
- name: string;
1390
- /**
1391
- * Index creation date. An empty string means that the index has no records.
1392
- */
1393
- createdAt: string;
1394
- /**
1395
- * Date and time when the object was updated, in RFC 3339 format.
1396
- */
1397
- updatedAt: string;
1398
- /**
1399
- * Number of records contained in the index.
1400
- */
1401
- entries: number;
1583
+ /**
1584
+ * Dictionary entry.
1585
+ */
1586
+ type DictionaryEntry = Record<string, any> & {
1402
1587
  /**
1403
- * Number of bytes of the index in minified format.
1588
+ * Unique identifier for the dictionary entry.
1404
1589
  */
1405
- dataSize: number;
1590
+ objectID: string;
1591
+ language?: SupportedLanguage;
1406
1592
  /**
1407
- * Number of bytes of the index binary file.
1593
+ * Matching dictionary word for `stopwords` and `compounds` dictionaries.
1408
1594
  */
1409
- fileSize: number;
1595
+ word?: string;
1410
1596
  /**
1411
- * Last build time.
1597
+ * Matching words in the `plurals` dictionary including declensions.
1412
1598
  */
1413
- lastBuildTimeS: number;
1599
+ words?: Array<string>;
1414
1600
  /**
1415
- * Number of pending indexing operations. This value is deprecated and should not be used.
1601
+ * Invividual components of a compound word in the `compounds` dictionary.
1416
1602
  */
1417
- numberOfPendingTasks: number;
1603
+ decomposition?: Array<string>;
1604
+ state?: DictionaryEntryState;
1605
+ type?: DictionaryEntryType;
1606
+ };
1607
+
1608
+ type SearchDictionaryEntriesResponse = {
1418
1609
  /**
1419
- * A boolean which says whether the index has pending tasks. This value is deprecated and should not be used.
1610
+ * Dictionary entries matching the search criteria.
1420
1611
  */
1421
- pendingTask: boolean;
1612
+ hits: Array<DictionaryEntry>;
1422
1613
  /**
1423
- * Only present if the index is a replica. Contains the name of the related primary index.
1614
+ * Requested page of the API response.
1424
1615
  */
1425
- primary?: string;
1616
+ page: number;
1426
1617
  /**
1427
- * Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
1618
+ * Number of results (hits).
1428
1619
  */
1429
- replicas?: string[];
1620
+ nbHits: number;
1430
1621
  /**
1431
- * Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
1622
+ * Number of pages of results.
1432
1623
  */
1433
- virtual?: boolean;
1434
- };
1435
-
1436
- type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
1437
-
1438
- type GetDictionarySettingsResponse = {
1439
- disableStandardEntries: StandardEntries;
1624
+ nbPages: number;
1440
1625
  };
1441
1626
 
1442
- type LogQuery = {
1627
+ type FacetHits = {
1443
1628
  /**
1444
- * Index targeted by the query.
1629
+ * Facet value.
1445
1630
  */
1446
- index_name?: string;
1631
+ value: string;
1447
1632
  /**
1448
- * A user identifier.
1633
+ * Highlighted attribute value, including HTML tags.
1449
1634
  */
1450
- user_token?: string;
1635
+ highlighted: string;
1451
1636
  /**
1452
- * Unique query identifier.
1637
+ * Number of records with this facet value. [The count may be approximated](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
1453
1638
  */
1454
- query_id?: string;
1639
+ count: number;
1455
1640
  };
1456
1641
 
1457
- type Log = {
1458
- /**
1459
- * Date and time of the API request, in RFC 3339 format.
1460
- */
1461
- timestamp: string;
1462
- /**
1463
- * HTTP method of the request.
1464
- */
1465
- method: string;
1466
- /**
1467
- * HTTP status code of the response.
1468
- */
1469
- answer_code: string;
1470
- /**
1471
- * Request body.
1472
- */
1473
- query_body: string;
1474
- /**
1475
- * Response body.
1476
- */
1477
- answer: string;
1478
- /**
1479
- * URL of the API endpoint.
1480
- */
1481
- url: string;
1482
- /**
1483
- * IP address of the client that performed the request.
1484
- */
1485
- ip: string;
1486
- /**
1487
- * Request headers (API keys are obfuscated).
1488
- */
1489
- query_headers: string;
1642
+ type SearchForFacetValuesResponse = {
1490
1643
  /**
1491
- * SHA1 signature of the log entry.
1644
+ * Matching facet values.
1492
1645
  */
1493
- sha1: string;
1646
+ facetHits: Array<FacetHits>;
1494
1647
  /**
1495
- * Number of API requests.
1648
+ * Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
1496
1649
  */
1497
- nb_api_calls: string;
1650
+ exhaustiveFacetsCount: boolean;
1498
1651
  /**
1499
- * Processing time for the query in milliseconds. This doesn\'t include latency due to the network.
1652
+ * Time the server took to process the request, in milliseconds.
1500
1653
  */
1501
- processing_time_ms: string;
1654
+ processingTimeMS?: number;
1655
+ };
1656
+
1657
+ /**
1658
+ * - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1659
+ */
1660
+ type SearchTypeFacet = 'facet';
1661
+
1662
+ type SearchForFacetsOptions = {
1502
1663
  /**
1503
- * Index targeted by the query.
1664
+ * Facet name.
1504
1665
  */
1505
- index?: string;
1666
+ facet: string;
1506
1667
  /**
1507
- * Query parameters sent with the request.
1668
+ * Index name (case-sensitive).
1508
1669
  */
1509
- query_params?: string;
1670
+ indexName: string;
1510
1671
  /**
1511
- * Number of search results (hits) returned for the query.
1672
+ * Text to search inside the facet\'s values.
1512
1673
  */
1513
- query_nb_hits?: string;
1674
+ facetQuery?: string;
1514
1675
  /**
1515
- * Queries performed for the given request.
1676
+ * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1516
1677
  */
1517
- inner_queries?: LogQuery[];
1678
+ maxFacetHits?: number;
1679
+ type: SearchTypeFacet;
1518
1680
  };
1519
1681
 
1520
- type GetLogsResponse = {
1521
- logs: Log[];
1682
+ type SearchParamsQuery = {
1683
+ /**
1684
+ * Search query.
1685
+ */
1686
+ query?: string;
1522
1687
  };
1523
1688
 
1689
+ type BaseSearchParams = SearchParamsQuery & BaseSearchParamsWithoutQuery;
1690
+
1524
1691
  /**
1525
- * Request body for retrieving records.
1692
+ * Each parameter value, including the `query` must not be larger than 512 bytes.
1526
1693
  */
1527
- type GetObjectsRequest = {
1528
- /**
1529
- * Attributes to retrieve. If not specified, all retrievable attributes are returned.
1530
- */
1531
- attributesToRetrieve?: string[];
1532
- /**
1533
- * Object ID for the record to retrieve.
1534
- */
1535
- objectID: string;
1694
+ type SearchParamsObject = BaseSearchParams & IndexSettingsAsSearchParams;
1695
+
1696
+ /**
1697
+ * Search parameters as query string.
1698
+ */
1699
+ type SearchParamsString = {
1536
1700
  /**
1537
- * Index from which to retrieve the records.
1701
+ * Search parameters as a URL-encoded query string.
1538
1702
  */
1539
- indexName: string;
1703
+ params?: string;
1540
1704
  };
1541
1705
 
1706
+ type SearchParams = SearchParamsString | SearchParamsObject;
1707
+
1708
+ type SearchForFacets = SearchParams & SearchForFacetsOptions;
1709
+
1542
1710
  /**
1543
- * Request parameters.
1711
+ * - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1544
1712
  */
1545
- type GetObjectsParams = {
1546
- requests: GetObjectsRequest[];
1547
- };
1713
+ type SearchTypeDefault = 'default';
1548
1714
 
1549
- type GetObjectsResponse<T = Record<string, any>> = {
1715
+ type SearchForHitsOptions = {
1550
1716
  /**
1551
- * Retrieved records.
1717
+ * Index name (case-sensitive).
1552
1718
  */
1553
- results: T[];
1719
+ indexName: string;
1720
+ type?: SearchTypeDefault;
1721
+ } & {
1722
+ facet?: never;
1723
+ maxFacetHits?: never;
1724
+ facetQuery?: never;
1554
1725
  };
1555
1726
 
1727
+ type SearchForHits = SearchParams & SearchForHitsOptions;
1728
+
1729
+ type SearchQuery = SearchForHits | SearchForFacets;
1730
+
1556
1731
  /**
1557
- * Task status, `published` if the task is completed, `notPublished` otherwise.
1732
+ * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results.
1558
1733
  */
1559
- type TaskStatus = 'notPublished' | 'published';
1734
+ type SearchStrategy = 'none' | 'stopIfEnoughMatches';
1560
1735
 
1561
- type GetTaskResponse = {
1562
- status: TaskStatus;
1736
+ type SearchMethodParams = {
1737
+ requests: Array<SearchQuery>;
1738
+ strategy?: SearchStrategy;
1563
1739
  };
1564
1740
 
1565
- /**
1566
- * Unique user ID.
1567
- */
1568
- type UserId = {
1741
+ type SearchPagination = {
1569
1742
  /**
1570
- * Unique identifier of the user who makes the search request.
1743
+ * Page of search results to retrieve.
1571
1744
  */
1572
- userID: string;
1745
+ page?: number;
1573
1746
  /**
1574
- * Cluster to which the user is assigned.
1747
+ * Number of results (hits).
1575
1748
  */
1576
- clusterName: string;
1749
+ nbHits?: number;
1577
1750
  /**
1578
- * Number of records belonging to the user.
1751
+ * Number of pages of results.
1579
1752
  */
1580
- nbRecords: number;
1753
+ nbPages?: number;
1581
1754
  /**
1582
- * Data size used by the user.
1755
+ * Number of hits per page.
1583
1756
  */
1584
- dataSize: number;
1757
+ hitsPerPage?: number;
1585
1758
  };
1586
1759
 
1587
- /**
1588
- * User IDs and clusters.
1589
- */
1590
- type GetTopUserIdsResponse = {
1591
- /**
1592
- * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
1593
- */
1594
- topUsers: Array<Record<string, UserId[]>>;
1760
+ type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;
1761
+
1762
+ type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;
1763
+
1764
+ type SearchResponses<T = Record<string, any>> = {
1765
+ results: SearchResult<T>[];
1595
1766
  };
1596
1767
 
1597
- type HasPendingMappingsResponse = {
1768
+ type SearchRulesResponse = {
1598
1769
  /**
1599
- * Whether there are clusters undergoing migration, creation, or deletion.
1770
+ * Rules that matched the search criteria.
1600
1771
  */
1601
- pending: boolean;
1772
+ hits: Array<Rule>;
1602
1773
  /**
1603
- * Cluster pending mapping state: migrating, creating, deleting.
1774
+ * Number of rules that matched the search criteria.
1775
+ */
1776
+ nbHits: number;
1777
+ /**
1778
+ * Current page.
1779
+ */
1780
+ page: number;
1781
+ /**
1782
+ * Number of pages.
1604
1783
  */
1605
- clusters?: Record<string, string[]>;
1784
+ nbPages: number;
1606
1785
  };
1607
1786
 
1608
1787
  /**
1609
- * Index settings.
1788
+ * Synonym type.
1610
1789
  */
1611
- type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;
1790
+ type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';
1612
1791
 
1613
1792
  /**
1614
- * Dictionary language.
1793
+ * Synonym object.
1615
1794
  */
1616
- type Languages = {
1617
- plurals: DictionaryLanguage | null;
1618
- stopwords: DictionaryLanguage | null;
1619
- compounds: DictionaryLanguage | null;
1620
- };
1621
-
1622
- type ListApiKeysResponse = {
1795
+ type SynonymHit = {
1623
1796
  /**
1624
- * API keys.
1797
+ * Unique identifier of a synonym object.
1625
1798
  */
1626
- keys: GetApiKeyResponse[];
1627
- };
1628
-
1629
- /**
1630
- * Clusters.
1631
- */
1632
- type ListClustersResponse = {
1799
+ objectID: string;
1800
+ type: SynonymType;
1633
1801
  /**
1634
- * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
1802
+ * Words or phrases considered equivalent.
1635
1803
  */
1636
- topUsers: string[];
1637
- };
1638
-
1639
- type ListIndicesResponse = {
1804
+ synonyms?: Array<string>;
1640
1805
  /**
1641
- * All indices in your Algolia application.
1806
+ * Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
1642
1807
  */
1643
- items: FetchedIndex[];
1808
+ input?: string;
1644
1809
  /**
1645
- * Number of pages.
1810
+ * Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
1646
1811
  */
1647
- nbPages?: number;
1648
- };
1649
-
1650
- /**
1651
- * User ID data.
1652
- */
1653
- type ListUserIdsResponse = {
1812
+ word?: string;
1654
1813
  /**
1655
- * User IDs.
1814
+ * Words to be matched in records.
1656
1815
  */
1657
- userIDs: UserId[];
1658
- };
1659
-
1660
- type LogType = 'all' | 'build' | 'error' | 'query';
1661
-
1662
- type MultipleBatchResponse = {
1816
+ corrections?: Array<string>;
1663
1817
  /**
1664
- * Task IDs. One for each index.
1818
+ * [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
1665
1819
  */
1666
- taskID: Record<string, number>;
1820
+ placeholder?: string;
1667
1821
  /**
1668
- * Unique record identifiers.
1822
+ * Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
1669
1823
  */
1670
- objectIDs: string[];
1824
+ replacements?: Array<string>;
1671
1825
  };
1672
1826
 
1673
- /**
1674
- * Operation to perform on the index.
1675
- */
1676
- type OperationType = 'copy' | 'move';
1677
-
1678
- type ScopeType = 'rules' | 'settings' | 'synonyms';
1679
-
1680
- type OperationIndexParams = {
1681
- operation: OperationType;
1682
- /**
1683
- * Index name (case-sensitive).
1684
- */
1685
- destination: string;
1827
+ type SearchSynonymsResponse = Record<string, any> & {
1686
1828
  /**
1687
- * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
1829
+ * Matching synonyms.
1688
1830
  */
1689
- scope?: ScopeType[];
1690
- };
1691
-
1692
- type RemoveUserIdResponse = {
1831
+ hits: Array<SynonymHit>;
1693
1832
  /**
1694
- * Date and time when the object was deleted, in RFC 3339 format.
1833
+ * Number of results (hits).
1695
1834
  */
1696
- deletedAt: string;
1835
+ nbHits: number;
1697
1836
  };
1698
1837
 
1699
1838
  /**
1700
- * Response, taskID, and update timestamp.
1839
+ * OK
1701
1840
  */
1702
- type UpdatedAtResponse = {
1841
+ type SearchUserIdsParams = {
1703
1842
  /**
1704
- * 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`.
1843
+ * Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users.
1705
1844
  */
1706
- taskID: number;
1845
+ query: string;
1707
1846
  /**
1708
- * Date and time when the object was updated, in RFC 3339 format.
1847
+ * Cluster name.
1709
1848
  */
1710
- updatedAt: string;
1711
- };
1712
-
1713
- type ReplaceAllObjectsResponse = {
1714
- copyOperationResponse: UpdatedAtResponse;
1849
+ clusterName?: string;
1715
1850
  /**
1716
- * The response of the `batch` request(s).
1851
+ * Page of search results to retrieve.
1717
1852
  */
1718
- batchResponses: BatchResponse[];
1719
- moveOperationResponse: UpdatedAtResponse;
1720
- };
1721
-
1722
- type ReplaceSourceResponse = {
1853
+ page?: number;
1723
1854
  /**
1724
- * Date and time when the object was updated, in RFC 3339 format.
1855
+ * Number of hits per page.
1725
1856
  */
1726
- updatedAt: string;
1857
+ hitsPerPage?: number;
1727
1858
  };
1728
1859
 
1729
- type TimeRange = {
1730
- /**
1731
- * When the rule should start to be active, in Unix epoch time.
1732
- */
1733
- from: number;
1734
- /**
1735
- * When the rule should stop to be active, in Unix epoch time.
1736
- */
1737
- until: number;
1860
+ type UserHighlightResult = {
1861
+ userID: HighlightResult;
1862
+ clusterName: HighlightResult;
1738
1863
  };
1739
1864
 
1740
- /**
1741
- * Rule object.
1742
- */
1743
- type Rule = {
1865
+ type UserHit = {
1744
1866
  /**
1745
- * Unique identifier of a rule object.
1867
+ * Unique identifier of the user who makes the search request.
1746
1868
  */
1747
- objectID: string;
1869
+ userID: string;
1748
1870
  /**
1749
- * Conditions that trigger a rule. Some consequences require specific conditions or don\'t require any condition. For more information, see [Conditions](https://www.algolia.com/doc/guides/managing-results/rules/rules-overview/#conditions).
1871
+ * Cluster name.
1750
1872
  */
1751
- conditions?: Condition[];
1752
- consequence?: Consequence;
1873
+ clusterName: string;
1753
1874
  /**
1754
- * Description of the rule\'s purpose to help you distinguish between different rules.
1875
+ * Number of records in the cluster.
1755
1876
  */
1756
- description?: string;
1877
+ nbRecords: number;
1757
1878
  /**
1758
- * Whether the rule is active.
1879
+ * Data size taken by all the users assigned to the cluster.
1759
1880
  */
1760
- enabled?: boolean;
1881
+ dataSize: number;
1761
1882
  /**
1762
- * Time periods when the rule is active.
1883
+ * userID of the requested user. Same as userID.
1763
1884
  */
1764
- validity?: TimeRange[];
1885
+ objectID: string;
1886
+ _highlightResult: UserHighlightResult;
1765
1887
  };
1766
1888
 
1767
- type SaveObjectResponse = {
1889
+ /**
1890
+ * userIDs data.
1891
+ */
1892
+ type SearchUserIdsResponse = {
1768
1893
  /**
1769
- * Date and time when the object was created, in RFC 3339 format.
1894
+ * User objects that match the query.
1770
1895
  */
1771
- createdAt: string;
1896
+ hits: Array<UserHit>;
1772
1897
  /**
1773
- * 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`.
1898
+ * Number of results (hits).
1774
1899
  */
1775
- taskID: number;
1900
+ nbHits: number;
1776
1901
  /**
1777
- * Unique record identifier.
1902
+ * Page of search results to retrieve.
1778
1903
  */
1779
- objectID?: string;
1780
- };
1781
-
1782
- type SaveSynonymResponse = {
1904
+ page: number;
1783
1905
  /**
1784
- * 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`.
1906
+ * Maximum number of hits per page.
1785
1907
  */
1786
- taskID: number;
1908
+ hitsPerPage: number;
1787
1909
  /**
1788
1910
  * Date and time when the object was updated, in RFC 3339 format.
1789
1911
  */
1790
1912
  updatedAt: string;
1791
- /**
1792
- * Unique identifier of a synonym object.
1793
- */
1794
- id: string;
1795
1913
  };
1796
1914
 
1797
- /**
1798
- * Search parameter.
1799
- */
1800
- type SearchDictionaryEntriesParams = {
1915
+ type BaseIndexSettings = {
1801
1916
  /**
1802
- * Search query.
1917
+ * Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn\'t evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
1803
1918
  */
1804
- query: string;
1919
+ attributesForFaceting?: Array<string>;
1805
1920
  /**
1806
- * Page of search results to retrieve.
1921
+ * Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
1807
1922
  */
1808
- page?: number;
1923
+ replicas?: Array<string>;
1809
1924
  /**
1810
- * Number of hits per page.
1925
+ * Maximum number of search results that can be obtained through pagination. Higher pagination limits might slow down your search. For pagination limits above 1,000, the sorting of results beyond the 1,000th hit can\'t be guaranteed.
1811
1926
  */
1812
- hitsPerPage?: number;
1813
- language?: SupportedLanguage;
1814
- };
1815
-
1816
- type SearchDictionaryEntriesResponse = {
1927
+ paginationLimitedTo?: number;
1817
1928
  /**
1818
- * Dictionary entries matching the search criteria.
1929
+ * Attributes that can\'t be retrieved at query time. This can be useful if you want to use an attribute for ranking or to [restrict access](https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data/), but don\'t want to include it in the search results. Attribute names are case-sensitive.
1819
1930
  */
1820
- hits: DictionaryEntry[];
1931
+ unretrievableAttributes?: Array<string>;
1821
1932
  /**
1822
- * Requested page of the API response.
1933
+ * Words for which you want to turn off [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/). This also turns off [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) for the specified words.
1823
1934
  */
1824
- page: number;
1935
+ disableTypoToleranceOnWords?: Array<string>;
1825
1936
  /**
1826
- * Number of results (hits).
1937
+ * Attributes, for which you want to support [Japanese transliteration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/#japanese-transliteration-and-type-ahead). Transliteration supports searching in any of the Japanese writing systems. To support transliteration, you must set the indexing language to Japanese. Attribute names are case-sensitive.
1827
1938
  */
1828
- nbHits: number;
1939
+ attributesToTransliterate?: Array<string>;
1829
1940
  /**
1830
- * Number of pages of results.
1941
+ * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
1831
1942
  */
1832
- nbPages: number;
1833
- };
1834
-
1835
- type SearchForFacetValuesRequest = {
1943
+ camelCaseAttributes?: Array<string>;
1836
1944
  /**
1837
- * Search parameters as a URL-encoded query string.
1945
+ * Searchable attributes to which Algolia should apply [word segmentation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/how-to/customize-segmentation/) (decompounding). Attribute names are case-sensitive. Compound words are formed by combining two or more individual words, and are particularly prevalent in Germanic languages—for example, \"firefighter\". With decompounding, the individual components are indexed separately. You can specify different lists for different languages. Decompounding is supported for these languages: Dutch (`nl`), German (`de`), Finnish (`fi`), Danish (`da`), Swedish (`sv`), and Norwegian (`no`). Decompounding doesn\'t work for words with [non-spacing mark Unicode characters](https://www.charactercodes.net/category/non-spacing_mark). For example, `Gartenstühle` won\'t be decompounded if the `ü` consists of `u` (U+0075) and `◌̈` (U+0308).
1838
1946
  */
1839
- params?: string;
1947
+ decompoundedAttributes?: Record<string, unknown>;
1840
1948
  /**
1841
- * Text to search inside the facet\'s values.
1949
+ * Languages for language-specific processing steps, such as word detection and dictionary settings. **You should always specify an indexing language.** If you don\'t specify an indexing language, the search engine uses all [supported languages](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/supported-languages/), or the languages you specified with the `ignorePlurals` or `removeStopWords` parameters. This can lead to unexpected search results. For more information, see [Language-specific configuration](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/language-specific-configurations/).
1842
1950
  */
1843
- facetQuery?: string;
1951
+ indexLanguages?: Array<SupportedLanguage>;
1844
1952
  /**
1845
- * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1953
+ * Searchable attributes for which you want to turn off [prefix matching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/#adjusting-prefix-search). Attribute names are case-sensitive.
1846
1954
  */
1847
- maxFacetHits?: number;
1848
- };
1849
-
1850
- type SearchForFacetValuesResponse = {
1955
+ disablePrefixOnAttributes?: Array<string>;
1851
1956
  /**
1852
- * Matching facet values.
1957
+ * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
1853
1958
  */
1854
- facetHits: FacetHits[];
1959
+ allowCompressionOfIntegerArray?: boolean;
1855
1960
  /**
1856
- * Whether the facet count is exhaustive (true) or approximate (false). For more information, see [Why are my facet and hit counts not accurate](https://support.algolia.com/hc/en-us/articles/4406975248145-Why-are-my-facet-and-hit-counts-not-accurate-).
1961
+ * Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
1857
1962
  */
1858
- exhaustiveFacetsCount: boolean;
1963
+ numericAttributesForFiltering?: Array<string>;
1859
1964
  /**
1860
- * Time the server took to process the request, in milliseconds.
1965
+ * Controls which separators are indexed. Separators are all non-letter characters except spaces and currency characters, such as $€£¥. By default, separator characters aren\'t indexed. With `separatorsToIndex`, Algolia treats separator characters as separate words. For example, a search for `C#` would report two matches.
1861
1966
  */
1862
- processingTimeMS?: number;
1863
- };
1864
-
1865
- /**
1866
- * - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1867
- */
1868
- type SearchTypeFacet = 'facet';
1869
-
1870
- type SearchForFacetsOptions = {
1967
+ separatorsToIndex?: string;
1871
1968
  /**
1872
- * Facet name.
1969
+ * Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
1873
1970
  */
1874
- facet: string;
1971
+ searchableAttributes?: Array<string>;
1875
1972
  /**
1876
- * Index name (case-sensitive).
1973
+ * An object with custom data. You can store up to 32kB as custom data.
1877
1974
  */
1878
- indexName: string;
1975
+ userData?: Record<string, unknown>;
1879
1976
  /**
1880
- * Text to search inside the facet\'s values.
1977
+ * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).
1881
1978
  */
1882
- facetQuery?: string;
1979
+ customNormalization?: {
1980
+ [key: string]: {
1981
+ [key: string]: string;
1982
+ };
1983
+ };
1883
1984
  /**
1884
- * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1985
+ * Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
1885
1986
  */
1886
- maxFacetHits?: number;
1887
- type: SearchTypeFacet;
1987
+ attributeForDistinct?: string;
1888
1988
  };
1889
1989
 
1890
- type SearchParams = SearchParamsObject | SearchParamsString;
1891
-
1892
- type SearchForFacets = SearchForFacetsOptions & SearchParams;
1893
-
1894
1990
  /**
1895
- * - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1991
+ * Index settings.
1896
1992
  */
1897
- type SearchTypeDefault = 'default';
1993
+ type IndexSettings = BaseIndexSettings & IndexSettingsAsSearchParams;
1898
1994
 
1899
- type SearchForHitsOptions = {
1995
+ type WithPrimary = {
1900
1996
  /**
1901
- * Index name (case-sensitive).
1997
+ * Replica indices only: the name of the primary index for this replica.
1902
1998
  */
1903
- indexName: string;
1904
- type?: SearchTypeDefault;
1905
- } & {
1906
- facet?: never;
1907
- maxFacetHits?: never;
1908
- facetQuery?: never;
1999
+ primary?: string;
1909
2000
  };
1910
2001
 
1911
- type SearchForHits = SearchForHitsOptions & SearchParams;
1912
-
1913
- type SearchQuery = SearchForFacets | SearchForHits;
2002
+ type SettingsResponse = IndexSettings & WithPrimary;
1914
2003
 
1915
2004
  /**
1916
- * Strategy for multiple search queries: - `none`. Run all queries. - `stopIfEnoughMatches`. Run the queries one by one, stopping as soon as a query matches at least the `hitsPerPage` number of results.
2005
+ * Source.
1917
2006
  */
1918
- type SearchStrategy = 'none' | 'stopIfEnoughMatches';
1919
-
1920
- type SearchMethodParams = {
1921
- requests: SearchQuery[];
1922
- strategy?: SearchStrategy;
1923
- };
1924
-
1925
- type SearchPagination = {
2007
+ type Source = {
1926
2008
  /**
1927
- * Page of search results to retrieve.
2009
+ * IP address range of the source.
1928
2010
  */
1929
- page?: number;
2011
+ source: string;
1930
2012
  /**
1931
- * Number of results (hits).
2013
+ * Source description.
1932
2014
  */
1933
- nbHits?: number;
2015
+ description?: string;
2016
+ };
2017
+
2018
+ type UpdateApiKeyResponse = {
1934
2019
  /**
1935
- * Number of pages of results.
2020
+ * API key.
1936
2021
  */
1937
- nbPages?: number;
2022
+ key: string;
1938
2023
  /**
1939
- * Number of hits per page.
2024
+ * Date and time when the object was updated, in RFC 3339 format.
1940
2025
  */
1941
- hitsPerPage?: number;
1942
- };
1943
-
1944
- type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
1945
-
1946
- type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
1947
-
1948
- type SearchResponses<T = Record<string, any>> = {
1949
- results: Array<SearchResult<T>>;
2026
+ updatedAt: string;
1950
2027
  };
1951
2028
 
1952
2029
  /**
1953
- * Rules search parameters.
2030
+ * Response, taskID, unique object identifier, and an update timestamp.
1954
2031
  */
1955
- type SearchRulesParams = {
1956
- /**
1957
- * Search query for rules.
1958
- */
1959
- query?: string;
1960
- anchoring?: Anchoring;
1961
- /**
1962
- * Only return rules that match the context (exact match).
1963
- */
1964
- context?: string;
2032
+ type UpdatedAtWithObjectIdResponse = {
1965
2033
  /**
1966
- * Requested page of the API response.
2034
+ * 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`.
1967
2035
  */
1968
- page?: number;
2036
+ taskID?: number;
1969
2037
  /**
1970
- * Maximum number of hits per page.
2038
+ * Date and time when the object was updated, in RFC 3339 format.
1971
2039
  */
1972
- hitsPerPage?: number;
2040
+ updatedAt?: string;
1973
2041
  /**
1974
- * If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
2042
+ * Unique record identifier.
1975
2043
  */
1976
- enabled?: boolean | null;
2044
+ objectID?: string;
1977
2045
  };
1978
2046
 
1979
- type SearchRulesResponse = {
1980
- /**
1981
- * Rules that matched the search criteria.
1982
- */
1983
- hits: Rule[];
2047
+ type UpdatedRuleResponse = {
1984
2048
  /**
1985
- * Number of rules that matched the search criteria.
2049
+ * Unique identifier of a rule object.
1986
2050
  */
1987
- nbHits: number;
2051
+ objectID: string;
1988
2052
  /**
1989
- * Current page.
2053
+ * Date and time when the object was updated, in RFC 3339 format.
1990
2054
  */
1991
- page: number;
2055
+ updatedAt: string;
1992
2056
  /**
1993
- * Number of pages.
2057
+ * 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`.
1994
2058
  */
1995
- nbPages: number;
2059
+ taskID: number;
1996
2060
  };
1997
2061
 
2062
+ type ApiKeyOperation = 'add' | 'delete' | 'update';
2063
+
1998
2064
  /**
1999
- * Synonym type.
2065
+ * Assign userID parameters.
2000
2066
  */
2001
- type SynonymType = 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym';
2002
-
2003
- type SearchSynonymsParams = {
2067
+ type AssignUserIdParams = {
2004
2068
  /**
2005
- * Search query.
2069
+ * Cluster name.
2006
2070
  */
2007
- query?: string;
2008
- type?: SynonymType;
2071
+ cluster: string;
2072
+ };
2073
+
2074
+ /**
2075
+ * Assign userID parameters.
2076
+ */
2077
+ type BatchAssignUserIdsParams = {
2009
2078
  /**
2010
- * Page of search results to retrieve.
2079
+ * Cluster name.
2011
2080
  */
2012
- page?: number;
2081
+ cluster: string;
2013
2082
  /**
2014
- * Number of hits per page.
2083
+ * User IDs to assign.
2015
2084
  */
2016
- hitsPerPage?: number;
2085
+ users: Array<string>;
2017
2086
  };
2018
2087
 
2019
2088
  /**
2020
- * Synonym object.
2089
+ * Actions to perform.
2021
2090
  */
2022
- type SynonymHit = {
2091
+ type DictionaryAction = 'addEntry' | 'deleteEntry';
2092
+
2093
+ type BatchDictionaryEntriesRequest = {
2094
+ action: DictionaryAction;
2095
+ body: DictionaryEntry;
2096
+ };
2097
+
2098
+ /**
2099
+ * Request body for updating dictionary entries.
2100
+ */
2101
+ type BatchDictionaryEntriesParams = {
2023
2102
  /**
2024
- * Unique identifier of a synonym object.
2103
+ * Whether to replace all custom entries in the dictionary with the ones sent with this request.
2025
2104
  */
2026
- objectID: string;
2027
- type: SynonymType;
2105
+ clearExistingDictionaryEntries?: boolean;
2028
2106
  /**
2029
- * Words or phrases considered equivalent.
2107
+ * List of additions and deletions to your dictionaries.
2030
2108
  */
2031
- synonyms?: string[];
2109
+ requests: Array<BatchDictionaryEntriesRequest>;
2110
+ };
2111
+
2112
+ type BatchRequest = {
2113
+ action: Action;
2032
2114
  /**
2033
- * Word or phrase to appear in query strings (for [`onewaysynonym`s](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/one-way-synonyms/)).
2115
+ * Operation arguments (varies with specified `action`).
2034
2116
  */
2035
- input?: string;
2117
+ body: Record<string, unknown>;
2118
+ };
2119
+
2120
+ /**
2121
+ * Batch parameters.
2122
+ */
2123
+ type BatchWriteParams = {
2124
+ requests: Array<BatchRequest>;
2125
+ };
2126
+
2127
+ type BrowseParamsObject = SearchParamsObject & Cursor;
2128
+
2129
+ type BrowseParams = SearchParamsString | BrowseParamsObject;
2130
+
2131
+ type DeleteByParams = {
2132
+ facetFilters?: FacetFilters;
2036
2133
  /**
2037
- * Word or phrase to appear in query strings (for [`altcorrection1` and `altcorrection2`](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-alternative-corrections/)).
2134
+ * Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
2038
2135
  */
2039
- word?: string;
2136
+ filters?: string;
2137
+ numericFilters?: NumericFilters;
2138
+ tagFilters?: TagFilters;
2040
2139
  /**
2041
- * Words to be matched in records.
2140
+ * Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
2042
2141
  */
2043
- corrections?: string[];
2142
+ aroundLatLng?: string;
2143
+ aroundRadius?: AroundRadius;
2044
2144
  /**
2045
- * [Placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/) to be put inside records.
2145
+ * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
2046
2146
  */
2047
- placeholder?: string;
2147
+ insideBoundingBox?: Array<Array<number>>;
2048
2148
  /**
2049
- * Query words that will match the [placeholder token](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/adding-synonyms/in-depth/synonyms-placeholders/).
2149
+ * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
2050
2150
  */
2051
- replacements?: string[];
2151
+ insidePolygon?: Array<Array<number>>;
2052
2152
  };
2053
2153
 
2054
- type SearchSynonymsResponse = Record<string, any> & {
2154
+ type DictionaryType = 'plurals' | 'stopwords' | 'compounds';
2155
+
2156
+ type LogType = 'all' | 'query' | 'build' | 'error';
2157
+
2158
+ /**
2159
+ * Operation to perform on the index.
2160
+ */
2161
+ type OperationType = 'move' | 'copy';
2162
+
2163
+ type ScopeType = 'settings' | 'synonyms' | 'rules';
2164
+
2165
+ type OperationIndexParams = {
2166
+ operation: OperationType;
2055
2167
  /**
2056
- * Matching synonyms.
2168
+ * Index name (case-sensitive).
2057
2169
  */
2058
- hits: SynonymHit[];
2170
+ destination: string;
2059
2171
  /**
2060
- * Number of results (hits).
2172
+ * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
2061
2173
  */
2062
- nbHits: number;
2174
+ scope?: Array<ScopeType>;
2063
2175
  };
2064
2176
 
2065
2177
  /**
2066
- * OK.
2178
+ * Search parameter.
2067
2179
  */
2068
- type SearchUserIdsParams = {
2180
+ type SearchDictionaryEntriesParams = {
2069
2181
  /**
2070
- * Query to search. The search is a prefix search with [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) enabled. An empty query will retrieve all users.
2182
+ * Search query.
2071
2183
  */
2072
2184
  query: string;
2073
- /**
2074
- * Cluster name.
2075
- */
2076
- clusterName?: string;
2077
2185
  /**
2078
2186
  * Page of search results to retrieve.
2079
2187
  */
@@ -2082,61 +2190,65 @@ type SearchUserIdsParams = {
2082
2190
  * Number of hits per page.
2083
2191
  */
2084
2192
  hitsPerPage?: number;
2193
+ language?: SupportedLanguage;
2085
2194
  };
2086
2195
 
2087
- type UserHighlightResult = {
2088
- userID: HighlightResult;
2089
- clusterName: HighlightResult;
2090
- };
2091
-
2092
- type UserHit = {
2093
- /**
2094
- * Unique identifier of the user who makes the search request.
2095
- */
2096
- userID: string;
2097
- /**
2098
- * Cluster name.
2099
- */
2100
- clusterName: string;
2196
+ type SearchForFacetValuesRequest = {
2101
2197
  /**
2102
- * Number of records in the cluster.
2198
+ * Search parameters as a URL-encoded query string.
2103
2199
  */
2104
- nbRecords: number;
2200
+ params?: string;
2105
2201
  /**
2106
- * Data size taken by all the users assigned to the cluster.
2202
+ * Text to search inside the facet\'s values.
2107
2203
  */
2108
- dataSize: number;
2204
+ facetQuery?: string;
2109
2205
  /**
2110
- * UserID of the requested user. Same as userID.
2206
+ * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
2111
2207
  */
2112
- objectID: string;
2113
- _highlightResult: UserHighlightResult;
2208
+ maxFacetHits?: number;
2114
2209
  };
2115
2210
 
2116
2211
  /**
2117
- * UserIDs data.
2212
+ * Rules search parameters.
2118
2213
  */
2119
- type SearchUserIdsResponse = {
2214
+ type SearchRulesParams = {
2120
2215
  /**
2121
- * User objects that match the query.
2216
+ * Search query for rules.
2122
2217
  */
2123
- hits: UserHit[];
2218
+ query?: string;
2219
+ anchoring?: Anchoring;
2124
2220
  /**
2125
- * Number of results (hits).
2221
+ * Only return rules that match the context (exact match).
2126
2222
  */
2127
- nbHits: number;
2223
+ context?: string;
2128
2224
  /**
2129
- * Page of search results to retrieve.
2225
+ * Requested page of the API response.
2130
2226
  */
2131
- page: number;
2227
+ page?: number;
2132
2228
  /**
2133
2229
  * Maximum number of hits per page.
2134
2230
  */
2135
- hitsPerPage: number;
2231
+ hitsPerPage?: number;
2136
2232
  /**
2137
- * Date and time when the object was updated, in RFC 3339 format.
2233
+ * If `true`, return only enabled rules. If `false`, return only inactive rules. By default, _all_ rules are returned.
2138
2234
  */
2139
- updatedAt: string;
2235
+ enabled?: boolean | null;
2236
+ };
2237
+
2238
+ type SearchSynonymsParams = {
2239
+ /**
2240
+ * Search query.
2241
+ */
2242
+ query?: string;
2243
+ type?: SynonymType;
2244
+ /**
2245
+ * Page of search results to retrieve.
2246
+ */
2247
+ page?: number;
2248
+ /**
2249
+ * Number of hits per page.
2250
+ */
2251
+ hitsPerPage?: number;
2140
2252
  };
2141
2253
 
2142
2254
  type SecuredApiKeyRestrictions = {
@@ -2152,7 +2264,7 @@ type SecuredApiKeyRestrictions = {
2152
2264
  /**
2153
2265
  * Index names or patterns that this API key can access. By default, an API key can access all indices in the same application. You can use leading and trailing wildcard characters (`*`): - `dev_*` matches all indices starting with \"dev_\". - `*_dev` matches all indices ending with \"_dev\". - `*_products_*` matches all indices containing \"_products_\".
2154
2266
  */
2155
- restrictIndices?: string[];
2267
+ restrictIndices?: Array<string>;
2156
2268
  /**
2157
2269
  * IP network that are allowed to use this key. You can only add a single source, but you can provide a range of IP addresses. Use this to protect against API key leaking and reuse.
2158
2270
  */
@@ -2163,73 +2275,6 @@ type SecuredApiKeyRestrictions = {
2163
2275
  userToken?: string;
2164
2276
  };
2165
2277
 
2166
- type WithPrimary = {
2167
- /**
2168
- * Replica indices only: the name of the primary index for this replica.
2169
- */
2170
- primary?: string;
2171
- };
2172
-
2173
- type SettingsResponse = IndexSettings & WithPrimary;
2174
-
2175
- /**
2176
- * Source.
2177
- */
2178
- type Source = {
2179
- /**
2180
- * IP address range of the source.
2181
- */
2182
- source: string;
2183
- /**
2184
- * Source description.
2185
- */
2186
- description?: string;
2187
- };
2188
-
2189
- type UpdateApiKeyResponse = {
2190
- /**
2191
- * API key.
2192
- */
2193
- key: string;
2194
- /**
2195
- * Date and time when the object was updated, in RFC 3339 format.
2196
- */
2197
- updatedAt: string;
2198
- };
2199
-
2200
- /**
2201
- * Response, taskID, unique object identifier, and an update timestamp.
2202
- */
2203
- type UpdatedAtWithObjectIdResponse = {
2204
- /**
2205
- * 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`.
2206
- */
2207
- taskID?: number;
2208
- /**
2209
- * Date and time when the object was updated, in RFC 3339 format.
2210
- */
2211
- updatedAt?: string;
2212
- /**
2213
- * Unique record identifier.
2214
- */
2215
- objectID?: string;
2216
- };
2217
-
2218
- type UpdatedRuleResponse = {
2219
- /**
2220
- * Unique identifier of a rule object.
2221
- */
2222
- objectID: string;
2223
- /**
2224
- * Date and time when the object was updated, in RFC 3339 format.
2225
- */
2226
- updatedAt: string;
2227
- /**
2228
- * 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`.
2229
- */
2230
- taskID: number;
2231
- };
2232
-
2233
2278
  /**
2234
2279
  * Properties for the `addOrUpdateObject` method.
2235
2280
  */
@@ -2243,7 +2288,7 @@ type AddOrUpdateObjectProps = {
2243
2288
  */
2244
2289
  objectID: string;
2245
2290
  /**
2246
- * The record, a schemaless object with attributes that are useful in the context of search and discovery.
2291
+ * The record. A schemaless object with attributes that are useful in the context of search and discovery.
2247
2292
  */
2248
2293
  body: Record<string, unknown>;
2249
2294
  };
@@ -2343,7 +2388,9 @@ type CustomDeleteProps = {
2343
2388
  /**
2344
2389
  * Query parameters to apply to the current query.
2345
2390
  */
2346
- parameters?: Record<string, any>;
2391
+ parameters?: {
2392
+ [key: string]: any;
2393
+ };
2347
2394
  };
2348
2395
  /**
2349
2396
  * Properties for the `customGet` method.
@@ -2356,7 +2403,9 @@ type CustomGetProps = {
2356
2403
  /**
2357
2404
  * Query parameters to apply to the current query.
2358
2405
  */
2359
- parameters?: Record<string, any>;
2406
+ parameters?: {
2407
+ [key: string]: any;
2408
+ };
2360
2409
  };
2361
2410
  /**
2362
2411
  * Properties for the `customPost` method.
@@ -2369,7 +2418,9 @@ type CustomPostProps = {
2369
2418
  /**
2370
2419
  * Query parameters to apply to the current query.
2371
2420
  */
2372
- parameters?: Record<string, any>;
2421
+ parameters?: {
2422
+ [key: string]: any;
2423
+ };
2373
2424
  /**
2374
2425
  * Parameters to send with the custom request.
2375
2426
  */
@@ -2386,7 +2437,9 @@ type CustomPutProps = {
2386
2437
  /**
2387
2438
  * Query parameters to apply to the current query.
2388
2439
  */
2389
- parameters?: Record<string, any>;
2440
+ parameters?: {
2441
+ [key: string]: any;
2442
+ };
2390
2443
  /**
2391
2444
  * Parameters to send with the custom request.
2392
2445
  */
@@ -2530,7 +2583,7 @@ type GetObjectProps = {
2530
2583
  /**
2531
2584
  * 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.
2532
2585
  */
2533
- attributesToRetrieve?: string[];
2586
+ attributesToRetrieve?: Array<string>;
2534
2587
  };
2535
2588
  /**
2536
2589
  * Properties for the `getRule` method.
@@ -2671,7 +2724,7 @@ type ReplaceSourcesProps = {
2671
2724
  /**
2672
2725
  * Allowed sources.
2673
2726
  */
2674
- source: Source[];
2727
+ source: Array<Source>;
2675
2728
  };
2676
2729
  /**
2677
2730
  * Properties for the `restoreApiKey` method.
@@ -2691,7 +2744,7 @@ type SaveObjectProps = {
2691
2744
  */
2692
2745
  indexName: string;
2693
2746
  /**
2694
- * The record, a schemaless object with attributes that are useful in the context of search and discovery.
2747
+ * The record. A schemaless object with attributes that are useful in the context of search and discovery.
2695
2748
  */
2696
2749
  body: Record<string, unknown>;
2697
2750
  };
@@ -2721,7 +2774,7 @@ type SaveRulesProps = {
2721
2774
  * Name of the index on which to perform the operation.
2722
2775
  */
2723
2776
  indexName: string;
2724
- rules: Rule[];
2777
+ rules: Array<Rule>;
2725
2778
  /**
2726
2779
  * Whether changes are applied to replica indices.
2727
2780
  */
@@ -2757,7 +2810,7 @@ type SaveSynonymsProps = {
2757
2810
  * Name of the index on which to perform the operation.
2758
2811
  */
2759
2812
  indexName: string;
2760
- synonymHit: SynonymHit[];
2813
+ synonymHit: Array<SynonymHit>;
2761
2814
  /**
2762
2815
  * Whether changes are applied to replica indices.
2763
2816
  */
@@ -2980,7 +3033,7 @@ type ReplaceAllObjectsOptions = {
2980
3033
  batchSize?: number;
2981
3034
  };
2982
3035
 
2983
- declare const apiClientVersion = "5.7.0";
3036
+ declare const apiClientVersion = "5.8.1";
2984
3037
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2985
3038
  transporter: _algolia_client_common.Transporter;
2986
3039
  /**
@@ -3095,7 +3148,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3095
3148
  * @param chunkedBatch.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
3096
3149
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3097
3150
  */
3098
- chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<BatchResponse[]>;
3151
+ chunkedBatch({ indexName, objects, action, waitForTasks, batchSize }: ChunkedBatchOptions, requestOptions?: RequestOptions): Promise<Array<BatchResponse>>;
3099
3152
  /**
3100
3153
  * Helper: Saves the given array of objects in the given index. The `chunkedBatch` helper is used under the hood, which creates a `batch` requests with at most 1000 objects in it.
3101
3154
  *
@@ -3160,14 +3213,13 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3160
3213
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3161
3214
  */
3162
3215
  searchForFacets(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
3163
- results: SearchForFacetValuesResponse[];
3216
+ results: Array<SearchForFacetValuesResponse>;
3164
3217
  }>;
3165
3218
  /**
3166
3219
  * Creates a new API key with specific permissions and restrictions.
3167
3220
  *
3168
3221
  * Required API Key ACLs:
3169
- * - admin.
3170
- *
3222
+ * - admin
3171
3223
  * @param apiKey - The apiKey object.
3172
3224
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3173
3225
  */
@@ -3176,12 +3228,11 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3176
3228
  * If a record with the specified object ID exists, the existing record is replaced. Otherwise, a new record is added to the index. To update _some_ attributes of an existing record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject) instead. To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
3177
3229
  *
3178
3230
  * Required API Key ACLs:
3179
- * - addObject.
3180
- *
3231
+ * - addObject
3181
3232
  * @param addOrUpdateObject - The addOrUpdateObject object.
3182
3233
  * @param addOrUpdateObject.indexName - Name of the index on which to perform the operation.
3183
3234
  * @param addOrUpdateObject.objectID - Unique record identifier.
3184
- * @param addOrUpdateObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
3235
+ * @param addOrUpdateObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
3185
3236
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3186
3237
  */
3187
3238
  addOrUpdateObject({ indexName, objectID, body }: AddOrUpdateObjectProps, requestOptions?: RequestOptions): Promise<UpdatedAtWithObjectIdResponse>;
@@ -3189,8 +3240,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3189
3240
  * Adds a source to the list of allowed sources.
3190
3241
  *
3191
3242
  * Required API Key ACLs:
3192
- * - admin.
3193
- *
3243
+ * - admin
3194
3244
  * @param source - Source to add.
3195
3245
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3196
3246
  */
@@ -3199,8 +3249,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3199
3249
  * Assigns or moves a user ID to a cluster. The time it takes to move a user is proportional to the amount of data linked to the user ID.
3200
3250
  *
3201
3251
  * Required API Key ACLs:
3202
- * - admin.
3203
- *
3252
+ * - admin
3204
3253
  * @param assignUserId - The assignUserId object.
3205
3254
  * @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
3206
3255
  * @param assignUserId.assignUserIdParams - The assignUserIdParams object.
@@ -3209,7 +3258,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3209
3258
  assignUserId({ xAlgoliaUserID, assignUserIdParams }: AssignUserIdProps, requestOptions?: RequestOptions): Promise<CreatedAtResponse>;
3210
3259
  /**
3211
3260
  * Adds, updates, or deletes records in one index with a single API request. Batching index updates reduces latency and increases data integrity. - Actions are applied in the order they\'re specified. - Actions are equivalent to the individual API requests of the same name.
3212
- *
3213
3261
  * @param batch - The batch object.
3214
3262
  * @param batch.indexName - Name of the index on which to perform the operation.
3215
3263
  * @param batch.batchWriteParams - The batchWriteParams object.
@@ -3220,8 +3268,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3220
3268
  * Assigns multiple user IDs to a cluster. **You can\'t move users with this operation**.
3221
3269
  *
3222
3270
  * Required API Key ACLs:
3223
- * - admin.
3224
- *
3271
+ * - admin
3225
3272
  * @param batchAssignUserIds - The batchAssignUserIds object.
3226
3273
  * @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
3227
3274
  * @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.
@@ -3232,8 +3279,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3232
3279
  * Adds or deletes multiple entries from your plurals, segmentation, or stop word dictionaries.
3233
3280
  *
3234
3281
  * Required API Key ACLs:
3235
- * - editSettings.
3236
- *
3282
+ * - editSettings
3237
3283
  * @param batchDictionaryEntries - The batchDictionaryEntries object.
3238
3284
  * @param batchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3239
3285
  * @param batchDictionaryEntries.batchDictionaryEntriesParams - The batchDictionaryEntriesParams object.
@@ -3241,11 +3287,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3241
3287
  */
3242
3288
  batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams }: BatchDictionaryEntriesProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
3243
3289
  /**
3244
- * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` is evaluated to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
3290
+ * Retrieves records from an index, up to 1,000 per request. While searching retrieves _hits_ (records augmented with attributes for highlighting and ranking details), browsing _just_ returns matching records. This can be useful if you want to export your indices. - The Analytics API doesn\'t collect data when using `browse`. - Records are ranked by attributes and custom ranking. - There\'s no ranking for: typo-tolerance, number of matched words, proximity, geo distance. Browse requests automatically apply these settings: - `advancedSyntax`: `false` - `attributesToHighlight`: `[]` - `attributesToSnippet`: `[]` - `distinct`: `false` - `enablePersonalization`: `false` - `enableRules`: `false` - `facets`: `[]` - `getRankingInfo`: `false` - `ignorePlurals`: `false` - `optionalFilters`: `[]` - `typoTolerance`: `true` or `false` (`min` and `strict` evaluate to `true`) If you send these parameters with your browse requests, they\'ll be ignored.
3245
3291
  *
3246
3292
  * Required API Key ACLs:
3247
- * - browse.
3248
- *
3293
+ * - browse
3249
3294
  * @param browse - The browse object.
3250
3295
  * @param browse.indexName - Name of the index on which to perform the operation.
3251
3296
  * @param browse.browseParams - The browseParams object.
@@ -3256,8 +3301,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3256
3301
  * Deletes only the records from an index while keeping settings, synonyms, and rules.
3257
3302
  *
3258
3303
  * Required API Key ACLs:
3259
- * - deleteIndex.
3260
- *
3304
+ * - deleteIndex
3261
3305
  * @param clearObjects - The clearObjects object.
3262
3306
  * @param clearObjects.indexName - Name of the index on which to perform the operation.
3263
3307
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3267,8 +3311,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3267
3311
  * Deletes all rules from the index.
3268
3312
  *
3269
3313
  * Required API Key ACLs:
3270
- * - editSettings.
3271
- *
3314
+ * - editSettings
3272
3315
  * @param clearRules - The clearRules object.
3273
3316
  * @param clearRules.indexName - Name of the index on which to perform the operation.
3274
3317
  * @param clearRules.forwardToReplicas - Whether changes are applied to replica indices.
@@ -3279,8 +3322,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3279
3322
  * Deletes all synonyms from the index.
3280
3323
  *
3281
3324
  * Required API Key ACLs:
3282
- * - editSettings.
3283
- *
3325
+ * - editSettings
3284
3326
  * @param clearSynonyms - The clearSynonyms object.
3285
3327
  * @param clearSynonyms.indexName - Name of the index on which to perform the operation.
3286
3328
  * @param clearSynonyms.forwardToReplicas - Whether changes are applied to replica indices.
@@ -3289,7 +3331,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3289
3331
  clearSynonyms({ indexName, forwardToReplicas }: ClearSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
3290
3332
  /**
3291
3333
  * This method allow you to send requests to the Algolia REST API.
3292
- *
3293
3334
  * @param customDelete - The customDelete object.
3294
3335
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
3295
3336
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -3298,7 +3339,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3298
3339
  customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
3299
3340
  /**
3300
3341
  * This method allow you to send requests to the Algolia REST API.
3301
- *
3302
3342
  * @param customGet - The customGet object.
3303
3343
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
3304
3344
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -3307,7 +3347,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3307
3347
  customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
3308
3348
  /**
3309
3349
  * This method allow you to send requests to the Algolia REST API.
3310
- *
3311
3350
  * @param customPost - The customPost object.
3312
3351
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
3313
3352
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -3317,7 +3356,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3317
3356
  customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
3318
3357
  /**
3319
3358
  * This method allow you to send requests to the Algolia REST API.
3320
- *
3321
3359
  * @param customPut - The customPut object.
3322
3360
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
3323
3361
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -3329,8 +3367,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3329
3367
  * Deletes the API key.
3330
3368
  *
3331
3369
  * Required API Key ACLs:
3332
- * - admin.
3333
- *
3370
+ * - admin
3334
3371
  * @param deleteApiKey - The deleteApiKey object.
3335
3372
  * @param deleteApiKey.key - API key.
3336
3373
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3340,8 +3377,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3340
3377
  * This operation doesn\'t accept empty queries or filters. It\'s more efficient to get a list of object IDs with the [`browse` operation](#tag/Search/operation/browse), and then delete the records using the [`batch` operation](#tag/Records/operation/batch).
3341
3378
  *
3342
3379
  * Required API Key ACLs:
3343
- * - deleteIndex.
3344
- *
3380
+ * - deleteIndex
3345
3381
  * @param deleteBy - The deleteBy object.
3346
3382
  * @param deleteBy.indexName - Name of the index on which to perform the operation.
3347
3383
  * @param deleteBy.deleteByParams - The deleteByParams object.
@@ -3352,8 +3388,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3352
3388
  * Deletes an index and all its settings. - Deleting an index doesn\'t delete its analytics data. - If you try to delete a non-existing index, the operation is ignored without warning. - If the index you want to delete has replica indices, the replicas become independent indices. - If the index you want to delete is a replica index, you must first unlink it from its primary index before you can delete it. For more information, see [Delete replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/deleting-replicas/).
3353
3389
  *
3354
3390
  * Required API Key ACLs:
3355
- * - deleteIndex.
3356
- *
3391
+ * - deleteIndex
3357
3392
  * @param deleteIndex - The deleteIndex object.
3358
3393
  * @param deleteIndex.indexName - Name of the index on which to perform the operation.
3359
3394
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3363,8 +3398,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3363
3398
  * Deletes a record by its object ID. To delete more than one record, use the [`batch` operation](#tag/Records/operation/batch). To delete records matching a query, use the [`deleteByQuery` operation](#tag/Records/operation/deleteBy).
3364
3399
  *
3365
3400
  * Required API Key ACLs:
3366
- * - deleteObject.
3367
- *
3401
+ * - deleteObject
3368
3402
  * @param deleteObject - The deleteObject object.
3369
3403
  * @param deleteObject.indexName - Name of the index on which to perform the operation.
3370
3404
  * @param deleteObject.objectID - Unique record identifier.
@@ -3375,8 +3409,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3375
3409
  * Deletes a rule by its ID. To find the object ID for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
3376
3410
  *
3377
3411
  * Required API Key ACLs:
3378
- * - editSettings.
3379
- *
3412
+ * - editSettings
3380
3413
  * @param deleteRule - The deleteRule object.
3381
3414
  * @param deleteRule.indexName - Name of the index on which to perform the operation.
3382
3415
  * @param deleteRule.objectID - Unique identifier of a rule object.
@@ -3388,8 +3421,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3388
3421
  * Deletes a source from the list of allowed sources.
3389
3422
  *
3390
3423
  * Required API Key ACLs:
3391
- * - admin.
3392
- *
3424
+ * - admin
3393
3425
  * @param deleteSource - The deleteSource object.
3394
3426
  * @param deleteSource.source - IP address range of the source.
3395
3427
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3399,8 +3431,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3399
3431
  * Deletes a synonym by its ID. To find the object IDs of your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
3400
3432
  *
3401
3433
  * Required API Key ACLs:
3402
- * - editSettings.
3403
- *
3434
+ * - editSettings
3404
3435
  * @param deleteSynonym - The deleteSynonym object.
3405
3436
  * @param deleteSynonym.indexName - Name of the index on which to perform the operation.
3406
3437
  * @param deleteSynonym.objectID - Unique identifier of a synonym object.
@@ -3410,7 +3441,6 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3410
3441
  deleteSynonym({ indexName, objectID, forwardToReplicas }: DeleteSynonymProps, requestOptions?: RequestOptions): Promise<DeletedAtResponse>;
3411
3442
  /**
3412
3443
  * Gets the permissions and restrictions of an API key. When authenticating with the admin API key, you can request information for any of your application\'s keys. When authenticating with other API keys, you can only retrieve information for that key, with the description replaced by `<redacted>`.
3413
- *
3414
3444
  * @param getApiKey - The getApiKey object.
3415
3445
  * @param getApiKey.key - API key.
3416
3446
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3420,8 +3450,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3420
3450
  * Checks the status of a given application task.
3421
3451
  *
3422
3452
  * Required API Key ACLs:
3423
- * - editSettings.
3424
- *
3453
+ * - editSettings
3425
3454
  * @param getAppTask - The getAppTask object.
3426
3455
  * @param getAppTask.taskID - Unique task identifier.
3427
3456
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3431,17 +3460,17 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3431
3460
  * Lists supported languages with their supported dictionary types and number of custom entries.
3432
3461
  *
3433
3462
  * Required API Key ACLs:
3434
- * - settings.
3435
- *
3463
+ * - settings
3436
3464
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3437
3465
  */
3438
- getDictionaryLanguages(requestOptions?: RequestOptions): Promise<Record<string, Languages>>;
3466
+ getDictionaryLanguages(requestOptions?: RequestOptions): Promise<{
3467
+ [key: string]: Languages;
3468
+ }>;
3439
3469
  /**
3440
3470
  * Retrieves the languages for which standard dictionary entries are turned off.
3441
3471
  *
3442
3472
  * Required API Key ACLs:
3443
- * - settings.
3444
- *
3473
+ * - settings
3445
3474
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3446
3475
  */
3447
3476
  getDictionarySettings(requestOptions?: RequestOptions): Promise<GetDictionarySettingsResponse>;
@@ -3449,8 +3478,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3449
3478
  * The request must be authenticated by an API key with the [`logs` ACL](https://www.algolia.com/doc/guides/security/api-keys/#access-control-list-acl). - Logs are held for the last seven days. - Up to 1,000 API requests per server are logged. - This request counts towards your [operations quota](https://support.algolia.com/hc/en-us/articles/4406981829777-How-does-Algolia-count-records-and-operations-) but doesn\'t appear in the logs itself.
3450
3479
  *
3451
3480
  * Required API Key ACLs:
3452
- * - logs.
3453
- *
3481
+ * - logs
3454
3482
  * @param getLogs - The getLogs object.
3455
3483
  * @param getLogs.offset - First log entry to retrieve. The most recent entries are listed first.
3456
3484
  * @param getLogs.length - Maximum number of entries to retrieve.
@@ -3463,8 +3491,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3463
3491
  * Retrieves one record by its object ID. To retrieve more than one record, use the [`objects` operation](#tag/Records/operation/getObjects).
3464
3492
  *
3465
3493
  * Required API Key ACLs:
3466
- * - search.
3467
- *
3494
+ * - search
3468
3495
  * @param getObject - The getObject object.
3469
3496
  * @param getObject.indexName - Name of the index on which to perform the operation.
3470
3497
  * @param getObject.objectID - Unique record identifier.
@@ -3476,8 +3503,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3476
3503
  * Retrieves one or more records, potentially from different indices. Records are returned in the same order as the requests.
3477
3504
  *
3478
3505
  * Required API Key ACLs:
3479
- * - search.
3480
- *
3506
+ * - search
3481
3507
  * @param getObjectsParams - Request object.
3482
3508
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3483
3509
  */
@@ -3486,8 +3512,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3486
3512
  * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).
3487
3513
  *
3488
3514
  * Required API Key ACLs:
3489
- * - settings.
3490
- *
3515
+ * - settings
3491
3516
  * @param getRule - The getRule object.
3492
3517
  * @param getRule.indexName - Name of the index on which to perform the operation.
3493
3518
  * @param getRule.objectID - Unique identifier of a rule object.
@@ -3498,8 +3523,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3498
3523
  * Retrieves an object with non-null index settings.
3499
3524
  *
3500
3525
  * Required API Key ACLs:
3501
- * - search.
3502
- *
3526
+ * - search
3503
3527
  * @param getSettings - The getSettings object.
3504
3528
  * @param getSettings.indexName - Name of the index on which to perform the operation.
3505
3529
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3509,17 +3533,15 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3509
3533
  * Retrieves all allowed IP addresses with access to your application.
3510
3534
  *
3511
3535
  * Required API Key ACLs:
3512
- * - admin.
3513
- *
3536
+ * - admin
3514
3537
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3515
3538
  */
3516
- getSources(requestOptions?: RequestOptions): Promise<Source[]>;
3539
+ getSources(requestOptions?: RequestOptions): Promise<Array<Source>>;
3517
3540
  /**
3518
- * Retrieves a syonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
3541
+ * Retrieves a synonym by its ID. To find the object IDs for your synonyms, use the [`search` operation](#tag/Synonyms/operation/searchSynonyms).
3519
3542
  *
3520
3543
  * Required API Key ACLs:
3521
- * - settings.
3522
- *
3544
+ * - settings
3523
3545
  * @param getSynonym - The getSynonym object.
3524
3546
  * @param getSynonym.indexName - Name of the index on which to perform the operation.
3525
3547
  * @param getSynonym.objectID - Unique identifier of a synonym object.
@@ -3530,8 +3552,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3530
3552
  * Checks the status of a given task. Indexing tasks are asynchronous. When you add, update, or delete records or indices, a task is created on a queue and completed depending on the load on the server. The indexing tasks\' responses include a task ID that you can use to check the status.
3531
3553
  *
3532
3554
  * Required API Key ACLs:
3533
- * - addObject.
3534
- *
3555
+ * - addObject
3535
3556
  * @param getTask - The getTask object.
3536
3557
  * @param getTask.indexName - Name of the index on which to perform the operation.
3537
3558
  * @param getTask.taskID - Unique task identifier.
@@ -3542,8 +3563,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3542
3563
  * Get the IDs of the 10 users with the highest number of records per cluster. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3543
3564
  *
3544
3565
  * Required API Key ACLs:
3545
- * - admin.
3546
- *
3566
+ * - admin
3547
3567
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3548
3568
  */
3549
3569
  getTopUserIds(requestOptions?: RequestOptions): Promise<GetTopUserIdsResponse>;
@@ -3551,8 +3571,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3551
3571
  * Returns the user ID data stored in the mapping. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3552
3572
  *
3553
3573
  * Required API Key ACLs:
3554
- * - admin.
3555
- *
3574
+ * - admin
3556
3575
  * @param getUserId - The getUserId object.
3557
3576
  * @param getUserId.userID - Unique identifier of the user who makes the search request.
3558
3577
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3562,8 +3581,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3562
3581
  * To determine when the time-consuming process of creating a large batch of users or migrating users from one cluster to another is complete, this operation retrieves the status of the process.
3563
3582
  *
3564
3583
  * Required API Key ACLs:
3565
- * - admin.
3566
- *
3584
+ * - admin
3567
3585
  * @param hasPendingMappings - The hasPendingMappings object.
3568
3586
  * @param hasPendingMappings.getClusters - Whether to include the cluster\'s pending mapping state in the response.
3569
3587
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3573,8 +3591,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3573
3591
  * Lists all API keys associated with your Algolia application, including their permissions and restrictions.
3574
3592
  *
3575
3593
  * Required API Key ACLs:
3576
- * - admin.
3577
- *
3594
+ * - admin
3578
3595
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3579
3596
  */
3580
3597
  listApiKeys(requestOptions?: RequestOptions): Promise<ListApiKeysResponse>;
@@ -3582,8 +3599,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3582
3599
  * Lists the available clusters in a multi-cluster setup.
3583
3600
  *
3584
3601
  * Required API Key ACLs:
3585
- * - admin.
3586
- *
3602
+ * - admin
3587
3603
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3588
3604
  */
3589
3605
  listClusters(requestOptions?: RequestOptions): Promise<ListClustersResponse>;
@@ -3591,8 +3607,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3591
3607
  * Lists all indices in the current Algolia application. The request follows any index restrictions of the API key you use to make the request.
3592
3608
  *
3593
3609
  * Required API Key ACLs:
3594
- * - listIndexes.
3595
- *
3610
+ * - listIndexes
3596
3611
  * @param listIndices - The listIndices object.
3597
3612
  * @param listIndices.page - Requested page of the API response. If `null`, the API response is not paginated.
3598
3613
  * @param listIndices.hitsPerPage - Number of hits per page.
@@ -3603,8 +3618,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3603
3618
  * Lists the userIDs assigned to a multi-cluster application. Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time.
3604
3619
  *
3605
3620
  * Required API Key ACLs:
3606
- * - admin.
3607
- *
3621
+ * - admin
3608
3622
  * @param listUserIds - The listUserIds object.
3609
3623
  * @param listUserIds.page - Requested page of the API response. If `null`, the API response is not paginated.
3610
3624
  * @param listUserIds.hitsPerPage - Number of hits per page.
@@ -3613,17 +3627,15 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3613
3627
  listUserIds({ page, hitsPerPage }?: ListUserIdsProps, requestOptions?: RequestOptions | undefined): Promise<ListUserIdsResponse>;
3614
3628
  /**
3615
3629
  * Adds, updates, or deletes records in multiple indices with a single API request. - Actions are applied in the order they are specified. - Actions are equivalent to the individual API requests of the same name.
3616
- *
3617
3630
  * @param batchParams - The batchParams object.
3618
3631
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3619
3632
  */
3620
3633
  multipleBatch(batchParams: BatchParams, requestOptions?: RequestOptions): Promise<MultipleBatchResponse>;
3621
3634
  /**
3622
- * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
3635
+ * Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keeps its original name, and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
3623
3636
  *
3624
3637
  * Required API Key ACLs:
3625
- * - addObject.
3626
- *
3638
+ * - addObject
3627
3639
  * @param operationIndex - The operationIndex object.
3628
3640
  * @param operationIndex.indexName - Name of the index on which to perform the operation.
3629
3641
  * @param operationIndex.operationIndexParams - The operationIndexParams object.
@@ -3631,11 +3643,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3631
3643
  */
3632
3644
  operationIndex({ indexName, operationIndexParams }: OperationIndexProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
3633
3645
  /**
3634
- * Adds new attributes to a record, or update existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value that\'s greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
3646
+ * Adds new attributes to a record, or updates existing ones. - If a record with the specified object ID doesn\'t exist, a new record is added to the index **if** `createIfNotExists` is true. - If the index doesn\'t exist yet, this method creates a new index. - You can use any first-level attribute but not nested attributes. If you specify a nested attribute, the engine treats it as a replacement for its first-level ancestor. To update an attribute without pushing the entire record, you can use these built-in operations. These operations can be helpful if you don\'t have access to your initial data. - Increment: increment a numeric attribute - Decrement: decrement a numeric attribute - Add: append a number or string element to an array attribute - Remove: remove all matching number or string elements from an array attribute made of numbers or strings - AddUnique: add a number or string element to an array attribute made of numbers or strings only if it\'s not already present - IncrementFrom: increment a numeric integer attribute only if the provided value matches the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementFrom value of 2 for the version attribute, but the current value of the attribute is 1, the engine ignores the update. If the object doesn\'t exist, the engine only creates it if you pass an IncrementFrom value of 0. - IncrementSet: increment a numeric integer attribute only if the provided value is greater than the current value, and otherwise ignore the whole object update. For example, if you pass an IncrementSet value of 2 for the version attribute, and the current value of the attribute is 1, the engine updates the object. If the object doesn\'t exist yet, the engine only creates it if you pass an IncrementSet value greater than 0. You can specify an operation by providing an object with the attribute to update as the key and its value being an object with the following properties: - _operation: the operation to apply on the attribute - value: the right-hand side argument to the operation, for example, increment or decrement step, value to add or remove.
3635
3647
  *
3636
3648
  * Required API Key ACLs:
3637
- * - addObject.
3638
- *
3649
+ * - addObject
3639
3650
  * @param partialUpdateObject - The partialUpdateObject object.
3640
3651
  * @param partialUpdateObject.indexName - Name of the index on which to perform the operation.
3641
3652
  * @param partialUpdateObject.objectID - Unique record identifier.
@@ -3648,8 +3659,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3648
3659
  * Deletes a user ID and its associated data from the clusters.
3649
3660
  *
3650
3661
  * Required API Key ACLs:
3651
- * - admin.
3652
- *
3662
+ * - admin
3653
3663
  * @param removeUserId - The removeUserId object.
3654
3664
  * @param removeUserId.userID - Unique identifier of the user who makes the search request.
3655
3665
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3659,8 +3669,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3659
3669
  * Replaces the list of allowed sources.
3660
3670
  *
3661
3671
  * Required API Key ACLs:
3662
- * - admin.
3663
- *
3672
+ * - admin
3664
3673
  * @param replaceSources - The replaceSources object.
3665
3674
  * @param replaceSources.source - Allowed sources.
3666
3675
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3670,8 +3679,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3670
3679
  * Restores a deleted API key. Restoring resets the `validity` attribute to `0`. Algolia stores up to 1,000 API keys per application. If you create more, the oldest API keys are deleted and can\'t be restored.
3671
3680
  *
3672
3681
  * Required API Key ACLs:
3673
- * - admin.
3674
- *
3682
+ * - admin
3675
3683
  * @param restoreApiKey - The restoreApiKey object.
3676
3684
  * @param restoreApiKey.key - API key.
3677
3685
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -3681,11 +3689,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3681
3689
  * Adds a record to an index or replace it. - If the record doesn\'t have an object ID, a new record with an auto-generated object ID is added to your index. - If a record with the specified object ID exists, the existing record is replaced. - If a record with the specified object ID doesn\'t exist, a new record is added to your index. - If you add a record to an index that doesn\'t exist yet, a new index is created. To update _some_ attributes of a record, use the [`partial` operation](#tag/Records/operation/partialUpdateObject). To add, update, or replace multiple records, use the [`batch` operation](#tag/Records/operation/batch).
3682
3690
  *
3683
3691
  * Required API Key ACLs:
3684
- * - addObject.
3685
- *
3692
+ * - addObject
3686
3693
  * @param saveObject - The saveObject object.
3687
3694
  * @param saveObject.indexName - Name of the index on which to perform the operation.
3688
- * @param saveObject.body - The record, a schemaless object with attributes that are useful in the context of search and discovery.
3695
+ * @param saveObject.body - The record. A schemaless object with attributes that are useful in the context of search and discovery.
3689
3696
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3690
3697
  */
3691
3698
  saveObject({ indexName, body }: SaveObjectProps, requestOptions?: RequestOptions): Promise<SaveObjectResponse>;
@@ -3693,8 +3700,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3693
3700
  * If a rule with the specified object ID doesn\'t exist, it\'s created. Otherwise, the existing rule is replaced. To create or update more than one rule, use the [`batch` operation](#tag/Rules/operation/saveRules).
3694
3701
  *
3695
3702
  * Required API Key ACLs:
3696
- * - editSettings.
3697
- *
3703
+ * - editSettings
3698
3704
  * @param saveRule - The saveRule object.
3699
3705
  * @param saveRule.indexName - Name of the index on which to perform the operation.
3700
3706
  * @param saveRule.objectID - Unique identifier of a rule object.
@@ -3707,8 +3713,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3707
3713
  * Create or update multiple rules. If a rule with the specified object ID doesn\'t exist, Algolia creates a new one. Otherwise, existing rules are replaced.
3708
3714
  *
3709
3715
  * Required API Key ACLs:
3710
- * - editSettings.
3711
- *
3716
+ * - editSettings
3712
3717
  * @param saveRules - The saveRules object.
3713
3718
  * @param saveRules.indexName - Name of the index on which to perform the operation.
3714
3719
  * @param saveRules.rules - The rules object.
@@ -3721,8 +3726,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3721
3726
  * If a synonym with the specified object ID doesn\'t exist, Algolia adds a new one. Otherwise, the existing synonym is replaced. To add multiple synonyms in a single API request, use the [`batch` operation](#tag/Synonyms/operation/saveSynonyms).
3722
3727
  *
3723
3728
  * Required API Key ACLs:
3724
- * - editSettings.
3725
- *
3729
+ * - editSettings
3726
3730
  * @param saveSynonym - The saveSynonym object.
3727
3731
  * @param saveSynonym.indexName - Name of the index on which to perform the operation.
3728
3732
  * @param saveSynonym.objectID - Unique identifier of a synonym object.
@@ -3735,8 +3739,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3735
3739
  * If a synonym with the `objectID` doesn\'t exist, Algolia adds a new one. Otherwise, existing synonyms are replaced.
3736
3740
  *
3737
3741
  * Required API Key ACLs:
3738
- * - editSettings.
3739
- *
3742
+ * - editSettings
3740
3743
  * @param saveSynonyms - The saveSynonyms object.
3741
3744
  * @param saveSynonyms.indexName - Name of the index on which to perform the operation.
3742
3745
  * @param saveSynonyms.synonymHit - The synonymHit object.
@@ -3746,21 +3749,19 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3746
3749
  */
3747
3750
  saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: SaveSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
3748
3751
  /**
3749
- * Sends multiple search request to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
3752
+ * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters.
3750
3753
  *
3751
3754
  * Required API Key ACLs:
3752
- * - search.
3753
- *
3755
+ * - search
3754
3756
  * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
3755
3757
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3756
3758
  */
3757
- search<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
3759
+ search<T>(searchMethodParams: SearchMethodParams | LegacySearchMethodProps, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
3758
3760
  /**
3759
3761
  * Searches for standard and custom dictionary entries.
3760
3762
  *
3761
3763
  * Required API Key ACLs:
3762
- * - settings.
3763
- *
3764
+ * - settings
3764
3765
  * @param searchDictionaryEntries - The searchDictionaryEntries object.
3765
3766
  * @param searchDictionaryEntries.dictionaryName - Dictionary type in which to search.
3766
3767
  * @param searchDictionaryEntries.searchDictionaryEntriesParams - The searchDictionaryEntriesParams object.
@@ -3771,8 +3772,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3771
3772
  * Searches for values of a specified facet attribute. - By default, facet values are sorted by decreasing count. You can adjust this with the `sortFacetValueBy` parameter. - Searching for facet values doesn\'t work if you have **more than 65 searchable facets and searchable attributes combined**.
3772
3773
  *
3773
3774
  * Required API Key ACLs:
3774
- * - search.
3775
- *
3775
+ * - search
3776
3776
  * @param searchForFacetValues - The searchForFacetValues object.
3777
3777
  * @param searchForFacetValues.indexName - Name of the index on which to perform the operation.
3778
3778
  * @param searchForFacetValues.facetName - Facet attribute in which to search for values. This attribute must be included in the `attributesForFaceting` index setting with the `searchable()` modifier.
@@ -3784,8 +3784,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3784
3784
  * Searches for rules in your index.
3785
3785
  *
3786
3786
  * Required API Key ACLs:
3787
- * - settings.
3788
- *
3787
+ * - settings
3789
3788
  * @param searchRules - The searchRules object.
3790
3789
  * @param searchRules.indexName - Name of the index on which to perform the operation.
3791
3790
  * @param searchRules.searchRulesParams - The searchRulesParams object.
@@ -3793,11 +3792,10 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3793
3792
  */
3794
3793
  searchRules({ indexName, searchRulesParams }: SearchRulesProps, requestOptions?: RequestOptions): Promise<SearchRulesResponse>;
3795
3794
  /**
3796
- * Searches a single index and return matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
3795
+ * Searches a single index and returns matching search results (_hits_). This method lets you retrieve up to 1,000 hits. If you need more, use the [`browse` operation](#tag/Search/operation/browse) or increase the `paginatedLimitedTo` index setting.
3797
3796
  *
3798
3797
  * Required API Key ACLs:
3799
- * - search.
3800
- *
3798
+ * - search
3801
3799
  * @param searchSingleIndex - The searchSingleIndex object.
3802
3800
  * @param searchSingleIndex.indexName - Name of the index on which to perform the operation.
3803
3801
  * @param searchSingleIndex.searchParams - The searchParams object.
@@ -3808,8 +3806,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3808
3806
  * Searches for synonyms in your index.
3809
3807
  *
3810
3808
  * Required API Key ACLs:
3811
- * - settings.
3812
- *
3809
+ * - settings
3813
3810
  * @param searchSynonyms - The searchSynonyms object.
3814
3811
  * @param searchSynonyms.indexName - Name of the index on which to perform the operation.
3815
3812
  * @param searchSynonyms.searchSynonymsParams - Body of the `searchSynonyms` operation.
@@ -3820,8 +3817,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3820
3817
  * Since it can take a few seconds to get the data from the different clusters, the response isn\'t real-time. To ensure rapid updates, the user IDs index isn\'t built at the same time as the mapping. Instead, it\'s built every 12 hours, at the same time as the update of user ID usage. For example, if you add or move a user ID, the search will show an old value until the next time the mapping is rebuilt (every 12 hours).
3821
3818
  *
3822
3819
  * Required API Key ACLs:
3823
- * - admin.
3824
- *
3820
+ * - admin
3825
3821
  * @param searchUserIdsParams - The searchUserIdsParams object.
3826
3822
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3827
3823
  */
@@ -3830,8 +3826,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3830
3826
  * Turns standard stop word dictionary entries on or off for a given language.
3831
3827
  *
3832
3828
  * Required API Key ACLs:
3833
- * - editSettings.
3834
- *
3829
+ * - editSettings
3835
3830
  * @param dictionarySettingsParams - The dictionarySettingsParams object.
3836
3831
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3837
3832
  */
@@ -3840,8 +3835,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3840
3835
  * Update the specified index settings. Index settings that you don\'t specify are left unchanged. Specify `null` to reset a setting to its default value. For best performance, update the index settings before you add new records to your index.
3841
3836
  *
3842
3837
  * Required API Key ACLs:
3843
- * - editSettings.
3844
- *
3838
+ * - editSettings
3845
3839
  * @param setSettings - The setSettings object.
3846
3840
  * @param setSettings.indexName - Name of the index on which to perform the operation.
3847
3841
  * @param setSettings.indexSettings - The indexSettings object.
@@ -3853,8 +3847,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3853
3847
  * Replaces the permissions of an existing API key. Any unspecified attribute resets that attribute to its default value.
3854
3848
  *
3855
3849
  * Required API Key ACLs:
3856
- * - admin.
3857
- *
3850
+ * - admin
3858
3851
  * @param updateApiKey - The updateApiKey object.
3859
3852
  * @param updateApiKey.key - API key.
3860
3853
  * @param updateApiKey.apiKey - The apiKey object.
@@ -3863,8 +3856,32 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3863
3856
  updateApiKey({ key, apiKey }: UpdateApiKeyProps, requestOptions?: RequestOptions): Promise<UpdateApiKeyResponse>;
3864
3857
  };
3865
3858
 
3859
+ /**
3860
+ * How to change the attribute.
3861
+ */
3862
+ type BuiltInOperationType = 'Increment' | 'Decrement' | 'Add' | 'Remove' | 'AddUnique' | 'IncrementFrom' | 'IncrementSet';
3863
+
3864
+ type BuiltInOperationValue = string | number;
3865
+
3866
+ /**
3867
+ * Update to perform on the attribute.
3868
+ */
3869
+ type BuiltInOperation = {
3870
+ _operation: BuiltInOperationType;
3871
+ value: BuiltInOperationValue;
3872
+ };
3873
+
3874
+ type AttributeToUpdate = string | BuiltInOperation;
3875
+
3876
+ /**
3877
+ * Error.
3878
+ */
3879
+ type ErrorBase = Record<string, any> & {
3880
+ message?: string;
3881
+ };
3882
+
3866
3883
  type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelpers;
3867
3884
 
3868
3885
  declare function searchClient(appId: string, apiKey: string, options?: ClientOptions): SearchClient;
3869
3886
 
3870
- export { type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UpdatedRuleResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WithPrimary, apiClientVersion, searchClient };
3887
+ export { type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UpdatedRuleResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type Widgets, type WithPrimary, apiClientVersion, searchClient };