@algolia/recommend 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 (74) hide show
  1. package/README.md +5 -6
  2. package/dist/browser.d.ts +558 -504
  3. package/dist/builds/browser.js +11 -21
  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 +8 -18
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +8 -18
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +9 -19
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +557 -502
  15. package/dist/node.d.cts +557 -502
  16. package/dist/node.d.ts +557 -502
  17. package/dist/src/recommendClient.cjs +7 -17
  18. package/dist/src/recommendClient.cjs.map +1 -1
  19. package/dist/src/recommendClient.js +7 -17
  20. package/dist/src/recommendClient.js.map +1 -1
  21. package/index.d.ts +0 -1
  22. package/index.js +1 -2
  23. package/model/alternativesAsExact.ts +1 -1
  24. package/model/aroundPrecision.ts +1 -1
  25. package/model/aroundRadius.ts +1 -1
  26. package/model/banner.ts +13 -0
  27. package/model/bannerImage.ts +12 -0
  28. package/model/bannerImageUrl.ts +8 -0
  29. package/model/bannerLink.ts +8 -0
  30. package/model/baseIndexSettings.ts +15 -15
  31. package/model/baseRecommendIndexSettings.ts +14 -14
  32. package/model/baseRecommendSearchParams.ts +8 -8
  33. package/model/baseSearchResponse.ts +2 -2
  34. package/model/booleanString.ts +1 -1
  35. package/model/clientMethodProps.ts +10 -8
  36. package/model/consequence.ts +2 -2
  37. package/model/facetFilters.ts +1 -1
  38. package/model/facetOrdering.ts +1 -1
  39. package/model/getRecommendationsParams.ts +1 -1
  40. package/model/getRecommendationsResponse.ts +1 -1
  41. package/model/highlightResult.ts +1 -1
  42. package/model/highlightResultOption.ts +1 -1
  43. package/model/ignorePlurals.ts +1 -1
  44. package/model/index.ts +15 -10
  45. package/model/indexSettingsFacets.ts +1 -1
  46. package/model/matchLevel.ts +1 -1
  47. package/model/numericFilters.ts +2 -2
  48. package/model/optionalFilters.ts +1 -1
  49. package/model/paramsConsequence.ts +2 -2
  50. package/model/queryType.ts +2 -2
  51. package/model/reRankingApplyFilter.ts +1 -1
  52. package/model/recommendHit.ts +2 -2
  53. package/model/recommendModels.ts +1 -1
  54. package/model/recommendRule.ts +1 -1
  55. package/model/recommendSearchParams.ts +1 -1
  56. package/model/recommendationsHit.ts +1 -0
  57. package/model/recommendationsHits.ts +1 -1
  58. package/model/recommendationsRequest.ts +5 -3
  59. package/model/recommendationsResults.ts +1 -1
  60. package/model/redirect.ts +1 -1
  61. package/model/removeStopWords.ts +1 -1
  62. package/model/removeWordsIfNoResults.ts +1 -1
  63. package/model/renderingContent.ts +4 -1
  64. package/model/searchRecommendRulesParams.ts +1 -1
  65. package/model/searchRecommendRulesResponse.ts +1 -1
  66. package/model/snippetResult.ts +1 -1
  67. package/model/sortRemainingBy.ts +1 -1
  68. package/model/supportedLanguage.ts +1 -1
  69. package/model/tagFilters.ts +1 -1
  70. package/model/taskStatus.ts +1 -1
  71. package/model/typoTolerance.ts +2 -2
  72. package/model/value.ts +2 -2
  73. package/model/widgets.ts +13 -0
  74. package/package.json +6 -6
package/dist/node.d.ts CHANGED
@@ -1,137 +1,27 @@
1
1
  import * as _algolia_client_common from '@algolia/client-common';
2
2
  import { CreateClientOptions, RequestOptions, ClientOptions } from '@algolia/client-common';
3
3
 
4
- type RecommendModels = 'bought-together' | 'related-products' | 'trending-facets' | 'trending-items';
5
-
6
- /**
7
- * Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
8
- */
9
- type Condition = {
10
- /**
11
- * 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/).
12
- */
13
- filters?: string;
14
- /**
15
- * 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.
16
- */
17
- context?: string;
18
- };
19
-
20
- /**
21
- * Object ID of the recommendation you want to exclude.
22
- */
23
- type HideConsequenceObject = {
24
- /**
25
- * Unique record identifier.
26
- */
27
- objectID?: string;
28
- };
29
-
30
- /**
31
- * Facet attribute. Only recommendations with the same value (or only recommendations with a different value) as the original viewed item are included.
32
- */
33
- type AutoFacetFilter = {
34
- /**
35
- * Facet attribute.
36
- */
37
- facet?: string;
38
- /**
39
- * Whether the filter is negative. If true, recommendations must not have the same value for the `facet` attribute. If false, recommendations must have the same value for the `facet` attribute.
40
- */
41
- negative?: boolean;
42
- };
43
-
44
- /**
45
- * Filter or boost recommendations matching a facet filter.
46
- */
47
- type ParamsConsequence = {
48
- /**
49
- * Filter recommendations that match or don\'t match the same `facet:facet_value` combination as the viewed item.
50
- */
51
- automaticFacetFilters?: AutoFacetFilter[];
52
- /**
53
- * 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/).
54
- */
55
- filters?: string;
56
- /**
57
- * 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. Matches with higher weights (`<score=N>`) rank before matches with lower weights. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match.
58
- */
59
- optionalFilters?: string[];
60
- };
61
-
62
- /**
63
- * Object ID and position of the recommendation you want to pin.
64
- */
65
- type PromoteConsequenceObject = {
66
- /**
67
- * Unique record identifier.
68
- */
69
- objectID?: string;
70
- /**
71
- * Index in the list of recommendations where to place this item.
72
- */
73
- position?: number;
74
- };
75
-
76
4
  /**
77
- * Effect of the rule.
5
+ * Response, taskID, and deletion timestamp.
78
6
  */
79
- type Consequence = {
7
+ type DeletedAtResponse = {
80
8
  /**
81
- * Exclude items from recommendations.
9
+ * 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`.
82
10
  */
83
- hide?: HideConsequenceObject[];
11
+ taskID: number;
84
12
  /**
85
- * Place items at specific positions in the list of recommendations.
13
+ * Date and time when the object was deleted, in RFC 3339 format.
86
14
  */
87
- promote?: PromoteConsequenceObject[];
88
- params?: ParamsConsequence;
15
+ deletedAt: string;
89
16
  };
90
17
 
91
18
  /**
92
- * Rule metadata.
19
+ * Task status, `published` if the task is completed, `notPublished` otherwise.
93
20
  */
94
- type RuleMetadata = {
95
- /**
96
- * Date and time when the object was updated, in RFC 3339 format.
97
- */
98
- lastUpdate?: string;
99
- };
100
-
101
- type TimeRange = {
102
- /**
103
- * When the rule should start to be active, in Unix epoch time.
104
- */
105
- from: number;
106
- /**
107
- * When the rule should stop to be active, in Unix epoch time.
108
- */
109
- until: number;
110
- };
21
+ type TaskStatus = 'published' | 'notPublished';
111
22
 
112
- /**
113
- * Recommend rule.
114
- */
115
- type RecommendRule = {
116
- _metadata?: RuleMetadata;
117
- /**
118
- * Unique identifier of a rule object.
119
- */
120
- objectID?: string;
121
- condition?: Condition;
122
- consequence?: Consequence;
123
- /**
124
- * Description of the rule\'s purpose. This can be helpful for display in the Algolia dashboard.
125
- */
126
- description?: string;
127
- /**
128
- * Indicates whether to enable the rule. If it isn\'t enabled, it isn\'t applied at query time.
129
- */
130
- enabled?: boolean;
131
- /**
132
- * Time periods when the rule is active.
133
- */
134
- validity?: TimeRange[];
23
+ type GetRecommendTaskResponse = {
24
+ status: TaskStatus;
135
25
  };
136
26
 
137
27
  /**
@@ -151,7 +41,7 @@ type Range = {
151
41
  /**
152
42
  * 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.
153
43
  */
154
- type AroundPrecision = Range[] | number;
44
+ type AroundPrecision = number | Array<Range>;
155
45
 
156
46
  /**
157
47
  * Return all records with a valid `_geoloc` attribute. Don\'t filter by distance.
@@ -161,32 +51,32 @@ type AroundRadiusAll = 'all';
161
51
  /**
162
52
  * 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.
163
53
  */
164
- type AroundRadius = AroundRadiusAll | number;
54
+ type AroundRadius = number | AroundRadiusAll;
165
55
 
166
56
  /**
167
57
  * 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`.
168
58
  */
169
- type FacetFilters = FacetFilters[] | string;
59
+ type FacetFilters = Array<FacetFilters> | string;
170
60
 
171
61
  /**
172
- * 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`.
62
+ * 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`.
173
63
  */
174
- type NumericFilters = NumericFilters[] | string;
64
+ type NumericFilters = Array<NumericFilters> | string;
175
65
 
176
66
  /**
177
67
  * 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.
178
68
  */
179
- type OptionalFilters = OptionalFilters[] | string;
69
+ type OptionalFilters = Array<OptionalFilters> | string;
180
70
 
181
71
  /**
182
72
  * ISO code for a supported language.
183
73
  */
184
- 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';
74
+ 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';
185
75
 
186
76
  /**
187
77
  * 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`.
188
78
  */
189
- type TagFilters = TagFilters[] | string;
79
+ type TagFilters = Array<TagFilters> | string;
190
80
 
191
81
  type BaseRecommendSearchParams = {
192
82
  /**
@@ -208,17 +98,17 @@ type BaseRecommendSearchParams = {
208
98
  /**
209
99
  * Restricts a search to a subset of your searchable attributes. Attribute names are case-sensitive.
210
100
  */
211
- restrictSearchableAttributes?: string[];
101
+ restrictSearchableAttributes?: Array<string>;
212
102
  /**
213
103
  * 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).
214
104
  */
215
- facets?: string[];
105
+ facets?: Array<string>;
216
106
  /**
217
107
  * 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`.
218
108
  */
219
109
  facetingAfterDistinct?: boolean;
220
110
  /**
221
- * 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`.
111
+ * 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`.
222
112
  */
223
113
  aroundLatLng?: string;
224
114
  /**
@@ -234,19 +124,19 @@ type BaseRecommendSearchParams = {
234
124
  /**
235
125
  * 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).
236
126
  */
237
- insideBoundingBox?: number[][];
127
+ insideBoundingBox?: Array<Array<number>>;
238
128
  /**
239
129
  * 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`.
240
130
  */
241
- insidePolygon?: number[][];
131
+ insidePolygon?: Array<Array<number>>;
242
132
  /**
243
133
  * 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`.
244
134
  */
245
- naturalLanguages?: SupportedLanguage[];
135
+ naturalLanguages?: Array<SupportedLanguage>;
246
136
  /**
247
137
  * 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.
248
138
  */
249
- ruleContexts?: string[];
139
+ ruleContexts?: Array<string>;
250
140
  /**
251
141
  * 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).
252
142
  */
@@ -274,7 +164,7 @@ type BaseRecommendSearchParams = {
274
164
  /**
275
165
  * Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
276
166
  */
277
- analyticsTags?: string[];
167
+ analyticsTags?: Array<string>;
278
168
  /**
279
169
  * Whether to include this search when calculating processing-time percentiles.
280
170
  */
@@ -287,13 +177,13 @@ type BaseRecommendSearchParams = {
287
177
 
288
178
  type BaseIndexSettings = {
289
179
  /**
290
- * 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))`.
180
+ * 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))`.
291
181
  */
292
- attributesForFaceting?: string[];
182
+ attributesForFaceting?: Array<string>;
293
183
  /**
294
- * 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/).
184
+ * 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/).
295
185
  */
296
- replicas?: string[];
186
+ replicas?: Array<string>;
297
187
  /**
298
188
  * 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.
299
189
  */
@@ -301,19 +191,19 @@ type BaseIndexSettings = {
301
191
  /**
302
192
  * 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.
303
193
  */
304
- unretrievableAttributes?: string[];
194
+ unretrievableAttributes?: Array<string>;
305
195
  /**
306
196
  * 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.
307
197
  */
308
- disableTypoToleranceOnWords?: string[];
198
+ disableTypoToleranceOnWords?: Array<string>;
309
199
  /**
310
200
  * 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.
311
201
  */
312
- attributesToTransliterate?: string[];
202
+ attributesToTransliterate?: Array<string>;
313
203
  /**
314
204
  * Attributes for which to split [camel case](https://wikipedia.org/wiki/Camel_case) words. Attribute names are case-sensitive.
315
205
  */
316
- camelCaseAttributes?: string[];
206
+ camelCaseAttributes?: Array<string>;
317
207
  /**
318
208
  * 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).
319
209
  */
@@ -321,27 +211,27 @@ type BaseIndexSettings = {
321
211
  /**
322
212
  * 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/).
323
213
  */
324
- indexLanguages?: SupportedLanguage[];
214
+ indexLanguages?: Array<SupportedLanguage>;
325
215
  /**
326
216
  * 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.
327
217
  */
328
- disablePrefixOnAttributes?: string[];
218
+ disablePrefixOnAttributes?: Array<string>;
329
219
  /**
330
220
  * Whether arrays with exclusively non-negative integers should be compressed for better performance. If true, the compressed arrays may be reordered.
331
221
  */
332
222
  allowCompressionOfIntegerArray?: boolean;
333
223
  /**
334
- * 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 `!=`.
224
+ * 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 `!=`.
335
225
  */
336
- numericAttributesForFiltering?: string[];
226
+ numericAttributesForFiltering?: Array<string>;
337
227
  /**
338
228
  * 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.
339
229
  */
340
230
  separatorsToIndex?: string;
341
231
  /**
342
- * 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.
232
+ * 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.
343
233
  */
344
- searchableAttributes?: string[];
234
+ searchableAttributes?: Array<string>;
345
235
  /**
346
236
  * An object with custom data. You can store up to 32kB as custom data.
347
237
  */
@@ -349,7 +239,11 @@ type BaseIndexSettings = {
349
239
  /**
350
240
  * 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/).
351
241
  */
352
- customNormalization?: Record<string, Record<string, string>>;
242
+ customNormalization?: {
243
+ [key: string]: {
244
+ [key: string]: string;
245
+ };
246
+ };
353
247
  /**
354
248
  * 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.
355
249
  */
@@ -358,7 +252,7 @@ type BaseIndexSettings = {
358
252
 
359
253
  type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
360
254
 
361
- type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
255
+ type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym';
362
256
 
363
257
  /**
364
258
  * 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.
@@ -370,32 +264,32 @@ type Distinct = boolean | number;
370
264
  */
371
265
  type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
372
266
 
373
- type BooleanString = 'false' | 'true';
267
+ type BooleanString = 'true' | 'false';
374
268
 
375
269
  /**
376
270
  * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
377
271
  */
378
- type IgnorePlurals = BooleanString | SupportedLanguage[] | boolean;
272
+ type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
379
273
 
380
274
  /**
381
- * 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/).
275
+ * 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/).
382
276
  */
383
- type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
277
+ type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
384
278
 
385
279
  /**
386
280
  * Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
387
281
  */
388
- type ReRankingApplyFilter = ReRankingApplyFilter[] | string;
282
+ type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
389
283
 
390
284
  /**
391
285
  * 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.
392
286
  */
393
- type RemoveStopWords = SupportedLanguage[] | boolean;
287
+ type RemoveStopWords = Array<SupportedLanguage> | boolean;
394
288
 
395
289
  /**
396
290
  * 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/).
397
291
  */
398
- type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
292
+ type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
399
293
 
400
294
  /**
401
295
  * Order of facet names.
@@ -404,24 +298,24 @@ type IndexSettingsFacets = {
404
298
  /**
405
299
  * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
406
300
  */
407
- order?: string[];
301
+ order?: Array<string>;
408
302
  };
409
303
 
410
304
  /**
411
305
  * 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.
412
306
  */
413
- type SortRemainingBy = 'alpha' | 'count' | 'hidden';
307
+ type SortRemainingBy = 'count' | 'alpha' | 'hidden';
414
308
 
415
309
  type Value = {
416
310
  /**
417
311
  * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
418
312
  */
419
- order?: string[];
313
+ order?: Array<string>;
420
314
  sortRemainingBy?: SortRemainingBy;
421
315
  /**
422
316
  * Hide facet values.
423
317
  */
424
- hide?: string[];
318
+ hide?: Array<string>;
425
319
  };
426
320
 
427
321
  /**
@@ -432,7 +326,9 @@ type FacetOrdering = {
432
326
  /**
433
327
  * Order of facet values. One object for each facet.
434
328
  */
435
- values?: Record<string, Value>;
329
+ values?: {
330
+ [key: string]: Value;
331
+ };
436
332
  };
437
333
 
438
334
  /**
@@ -443,11 +339,52 @@ type RedirectURL = {
443
339
  };
444
340
 
445
341
  /**
446
- * 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.
342
+ * url for a search banner image.
343
+ */
344
+ type BannerImageUrl = {
345
+ url?: string;
346
+ };
347
+
348
+ /**
349
+ * image of a search banner.
350
+ */
351
+ type BannerImage = {
352
+ urls?: Array<BannerImageUrl>;
353
+ title?: string;
354
+ };
355
+
356
+ /**
357
+ * link for a banner defined in merchandising studio.
358
+ */
359
+ type BannerLink = {
360
+ url?: string;
361
+ };
362
+
363
+ /**
364
+ * a search banner with image and url.
365
+ */
366
+ type Banner = {
367
+ image?: BannerImage;
368
+ link?: BannerLink;
369
+ };
370
+
371
+ /**
372
+ * widgets returned from any rules that are applied to the current search.
373
+ */
374
+ type Widgets = {
375
+ /**
376
+ * banners defined in the merchandising studio for the given search.
377
+ */
378
+ banners?: Array<Banner>;
379
+ };
380
+
381
+ /**
382
+ * 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.
447
383
  */
448
384
  type RenderingContent = {
449
385
  facetOrdering?: FacetOrdering;
450
386
  redirect?: RedirectURL;
387
+ widgets?: Widgets;
451
388
  };
452
389
 
453
390
  /**
@@ -456,19 +393,19 @@ type RenderingContent = {
456
393
  type TypoToleranceEnum = 'min' | 'strict';
457
394
 
458
395
  /**
459
- * 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.
396
+ * 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.
460
397
  */
461
- type TypoTolerance = TypoToleranceEnum | boolean;
398
+ type TypoTolerance = boolean | TypoToleranceEnum;
462
399
 
463
400
  type BaseRecommendIndexSettings = {
464
401
  /**
465
402
  * 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.
466
403
  */
467
- attributesToRetrieve?: string[];
404
+ attributesToRetrieve?: Array<string>;
468
405
  /**
469
406
  * 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/).
470
407
  */
471
- ranking?: string[];
408
+ ranking?: Array<string>;
472
409
  /**
473
410
  * 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.
474
411
  */
@@ -476,11 +413,11 @@ type BaseRecommendIndexSettings = {
476
413
  /**
477
414
  * 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/).
478
415
  */
479
- attributesToHighlight?: string[];
416
+ attributesToHighlight?: Array<string>;
480
417
  /**
481
418
  * 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.
482
419
  */
483
- attributesToSnippet?: string[];
420
+ attributesToSnippet?: Array<string>;
484
421
  /**
485
422
  * HTML tag to insert before the highlighted parts in all highlighted results and snippets.
486
423
  */
@@ -513,13 +450,13 @@ type BaseRecommendIndexSettings = {
513
450
  /**
514
451
  * 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.
515
452
  */
516
- disableTypoToleranceOnAttributes?: string[];
453
+ disableTypoToleranceOnAttributes?: Array<string>;
517
454
  ignorePlurals?: IgnorePlurals;
518
455
  removeStopWords?: RemoveStopWords;
519
456
  /**
520
457
  * 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/).
521
458
  */
522
- queryLanguages?: SupportedLanguage[];
459
+ queryLanguages?: Array<SupportedLanguage>;
523
460
  /**
524
461
  * 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).
525
462
  */
@@ -539,25 +476,25 @@ type BaseRecommendIndexSettings = {
539
476
  */
540
477
  advancedSyntax?: boolean;
541
478
  /**
542
- * 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).
479
+ * 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).
543
480
  */
544
- optionalWords?: string[];
481
+ optionalWords?: Array<string>;
545
482
  /**
546
- * 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.
483
+ * 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.
547
484
  */
548
- disableExactOnAttributes?: string[];
485
+ disableExactOnAttributes?: Array<string>;
549
486
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
550
487
  /**
551
488
  * 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.
552
489
  */
553
- alternativesAsExact?: AlternativesAsExact[];
490
+ alternativesAsExact?: Array<AlternativesAsExact>;
554
491
  /**
555
492
  * 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.
556
493
  */
557
- advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
494
+ advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;
558
495
  distinct?: Distinct;
559
496
  /**
560
- * 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.
497
+ * 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.
561
498
  */
562
499
  replaceSynonymsInHighlight?: boolean;
563
500
  /**
@@ -567,7 +504,7 @@ type BaseRecommendIndexSettings = {
567
504
  /**
568
505
  * 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.
569
506
  */
570
- responseFields?: string[];
507
+ responseFields?: Array<string>;
571
508
  /**
572
509
  * 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).
573
510
  */
@@ -607,7 +544,7 @@ type SearchParamsQuery = {
607
544
  /**
608
545
  * Search parameters for filtering the recommendations.
609
546
  */
610
- type RecommendSearchParams = BaseRecommendSearchParams & RecommendIndexSettings & SearchParamsQuery;
547
+ type RecommendSearchParams = BaseRecommendSearchParams & SearchParamsQuery & RecommendIndexSettings;
611
548
 
612
549
  type BaseRecommendRequest = {
613
550
  /**
@@ -722,315 +659,108 @@ type TrendingItems = {
722
659
 
723
660
  type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
724
661
 
725
- type RecommendationsRequest = BoughtTogetherQuery | LookingSimilarQuery | RecommendedForYouQuery | RelatedQuery | TrendingFacetsQuery | TrendingItemsQuery;
662
+ type RecommendationsRequest = BoughtTogetherQuery | RelatedQuery | TrendingItemsQuery | TrendingFacetsQuery | LookingSimilarQuery | RecommendedForYouQuery;
726
663
 
727
664
  /**
728
- * Recommend rules parameters.
665
+ * Recommend request body.
729
666
  */
730
- type SearchRecommendRulesParams = {
667
+ type GetRecommendationsParams = {
731
668
  /**
732
- * Search query.
669
+ * Recommendation request with parameters depending on the requested model.
733
670
  */
734
- query?: string;
671
+ requests: Array<RecommendationsRequest>;
672
+ };
673
+
674
+ /**
675
+ * Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
676
+ */
677
+ type Exhaustive = {
735
678
  /**
736
- * Only search for rules with matching context.
679
+ * 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-).
737
680
  */
738
- context?: string;
681
+ facetsCount?: boolean;
739
682
  /**
740
- * Requested page of the API response.
683
+ * The value is `false` if not all facet values are retrieved.
741
684
  */
742
- page?: number;
685
+ facetValues?: boolean;
743
686
  /**
744
- * Maximum number of hits per page.
687
+ * 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.
745
688
  */
746
- hitsPerPage?: number;
689
+ nbHits?: boolean;
747
690
  /**
748
- * Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
691
+ * 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.
749
692
  */
750
- enabled?: boolean;
693
+ rulesMatch?: boolean;
751
694
  /**
752
- * Filter expression. This only searches for rules matching the filter expression.
695
+ * 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.
753
696
  */
754
- filters?: string;
697
+ typo?: boolean;
698
+ };
699
+
700
+ type FacetStats = {
755
701
  /**
756
- * Include facets and facet values in the response. Use `[\'*\']` to include all facets.
702
+ * Minimum value in the results.
757
703
  */
758
- facets?: string[];
704
+ min?: number;
759
705
  /**
760
- * Maximum number of values to return for each facet.
706
+ * Maximum value in the results.
761
707
  */
762
- maxValuesPerFacet?: number;
763
- };
764
-
765
- /**
766
- * Properties for the `batchRecommendRules` method.
767
- */
768
- type BatchRecommendRulesProps = {
708
+ max?: number;
769
709
  /**
770
- * Name of the index on which to perform the operation.
710
+ * Average facet value in the results.
771
711
  */
772
- indexName: string;
712
+ avg?: number;
773
713
  /**
774
- * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
714
+ * Sum of all values in the results.
775
715
  */
776
- model: RecommendModels;
777
- recommendRule?: RecommendRule[];
716
+ sum?: number;
778
717
  };
718
+
779
719
  /**
780
- * Properties for the `customDelete` method.
720
+ * Redirect rule data.
781
721
  */
782
- type CustomDeleteProps = {
722
+ type RedirectRuleIndexData = {
723
+ ruleObjectID: string;
724
+ };
725
+
726
+ type RedirectRuleIndexMetadata = {
783
727
  /**
784
- * Path of the endpoint, anything after \"/1\" must be specified.
728
+ * Source index for the redirect rule.
785
729
  */
786
- path: string;
730
+ source: string;
787
731
  /**
788
- * Query parameters to apply to the current query.
732
+ * Destination index for the redirect rule.
789
733
  */
790
- parameters?: Record<string, any>;
791
- };
792
- /**
793
- * Properties for the `customGet` method.
794
- */
795
- type CustomGetProps = {
734
+ dest: string;
796
735
  /**
797
- * Path of the endpoint, anything after \"/1\" must be specified.
736
+ * Reason for the redirect rule.
798
737
  */
799
- path: string;
738
+ reason: string;
800
739
  /**
801
- * Query parameters to apply to the current query.
740
+ * Redirect rule status.
802
741
  */
803
- parameters?: Record<string, any>;
742
+ succeed: boolean;
743
+ data: RedirectRuleIndexData;
804
744
  };
745
+
805
746
  /**
806
- * Properties for the `customPost` method.
747
+ * [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.
807
748
  */
808
- type CustomPostProps = {
749
+ type Redirect = {
750
+ index?: Array<RedirectRuleIndexMetadata>;
751
+ };
752
+
753
+ type BaseSearchResponse = Record<string, any> & {
809
754
  /**
810
- * Path of the endpoint, anything after \"/1\" must be specified.
755
+ * A/B test ID. This is only included in the response for indices that are part of an A/B test.
811
756
  */
812
- path: string;
757
+ abTestID?: number;
813
758
  /**
814
- * Query parameters to apply to the current query.
759
+ * Variant ID. This is only included in the response for indices that are part of an A/B test.
815
760
  */
816
- parameters?: Record<string, any>;
761
+ abTestVariantID?: number;
817
762
  /**
818
- * Parameters to send with the custom request.
819
- */
820
- body?: Record<string, unknown>;
821
- };
822
- /**
823
- * Properties for the `customPut` method.
824
- */
825
- type CustomPutProps = {
826
- /**
827
- * Path of the endpoint, anything after \"/1\" must be specified.
828
- */
829
- path: string;
830
- /**
831
- * Query parameters to apply to the current query.
832
- */
833
- parameters?: Record<string, any>;
834
- /**
835
- * Parameters to send with the custom request.
836
- */
837
- body?: Record<string, unknown>;
838
- };
839
- /**
840
- * Properties for the `deleteRecommendRule` method.
841
- */
842
- type DeleteRecommendRuleProps = {
843
- /**
844
- * Name of the index on which to perform the operation.
845
- */
846
- indexName: string;
847
- /**
848
- * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
849
- */
850
- model: RecommendModels;
851
- /**
852
- * Unique record identifier.
853
- */
854
- objectID: string;
855
- };
856
- /**
857
- * Properties for the `getRecommendRule` method.
858
- */
859
- type GetRecommendRuleProps = {
860
- /**
861
- * Name of the index on which to perform the operation.
862
- */
863
- indexName: string;
864
- /**
865
- * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
866
- */
867
- model: RecommendModels;
868
- /**
869
- * Unique record identifier.
870
- */
871
- objectID: string;
872
- };
873
- /**
874
- * Properties for the `getRecommendStatus` method.
875
- */
876
- type GetRecommendStatusProps = {
877
- /**
878
- * Name of the index on which to perform the operation.
879
- */
880
- indexName: string;
881
- /**
882
- * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
883
- */
884
- model: RecommendModels;
885
- /**
886
- * Unique task identifier.
887
- */
888
- taskID: number;
889
- };
890
- /**
891
- * Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
892
- *
893
- * @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
894
- */
895
- type LegacyGetRecommendationsParams = RecommendationsRequest[];
896
- /**
897
- * Properties for the `searchRecommendRules` method.
898
- */
899
- type SearchRecommendRulesProps = {
900
- /**
901
- * Name of the index on which to perform the operation.
902
- */
903
- indexName: string;
904
- /**
905
- * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
906
- */
907
- model: RecommendModels;
908
- searchRecommendRulesParams?: SearchRecommendRulesParams;
909
- };
910
-
911
- /**
912
- * Response, taskID, and deletion timestamp.
913
- */
914
- type DeletedAtResponse = {
915
- /**
916
- * 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`.
917
- */
918
- taskID: number;
919
- /**
920
- * Date and time when the object was deleted, in RFC 3339 format.
921
- */
922
- deletedAt: string;
923
- };
924
-
925
- /**
926
- * Task status, `published` if the task is completed, `notPublished` otherwise.
927
- */
928
- type TaskStatus = 'notPublished' | 'published';
929
-
930
- type GetRecommendTaskResponse = {
931
- status: TaskStatus;
932
- };
933
-
934
- /**
935
- * Recommend request body.
936
- */
937
- type GetRecommendationsParams = {
938
- /**
939
- * Recommendation request with parameters depending on the requested model.
940
- */
941
- requests: RecommendationsRequest[];
942
- };
943
-
944
- /**
945
- * Whether certain properties of the search response are calculated exhaustive (exact) or approximated.
946
- */
947
- type Exhaustive = {
948
- /**
949
- * 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-).
950
- */
951
- facetsCount?: boolean;
952
- /**
953
- * The value is `false` if not all facet values are retrieved.
954
- */
955
- facetValues?: boolean;
956
- /**
957
- * 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.
958
- */
959
- nbHits?: boolean;
960
- /**
961
- * 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.
962
- */
963
- rulesMatch?: boolean;
964
- /**
965
- * 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.
966
- */
967
- typo?: boolean;
968
- };
969
-
970
- type FacetStats = {
971
- /**
972
- * Minimum value in the results.
973
- */
974
- min?: number;
975
- /**
976
- * Maximum value in the results.
977
- */
978
- max?: number;
979
- /**
980
- * Average facet value in the results.
981
- */
982
- avg?: number;
983
- /**
984
- * Sum of all values in the results.
985
- */
986
- sum?: number;
987
- };
988
-
989
- /**
990
- * Redirect rule data.
991
- */
992
- type RedirectRuleIndexData = {
993
- ruleObjectID: string;
994
- };
995
-
996
- type RedirectRuleIndexMetadata = {
997
- /**
998
- * Source index for the redirect rule.
999
- */
1000
- source: string;
1001
- /**
1002
- * Destination index for the redirect rule.
1003
- */
1004
- dest: string;
1005
- /**
1006
- * Reason for the redirect rule.
1007
- */
1008
- reason: string;
1009
- /**
1010
- * Redirect rule status.
1011
- */
1012
- succeed: boolean;
1013
- data: RedirectRuleIndexData;
1014
- };
1015
-
1016
- /**
1017
- * [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.
1018
- */
1019
- type Redirect = {
1020
- index?: RedirectRuleIndexMetadata[];
1021
- };
1022
-
1023
- type BaseSearchResponse = Record<string, any> & {
1024
- /**
1025
- * A/B test ID. This is only included in the response for indices that are part of an A/B test.
1026
- */
1027
- abTestID?: number;
1028
- /**
1029
- * Variant ID. This is only included in the response for indices that are part of an A/B test.
1030
- */
1031
- abTestVariantID?: number;
1032
- /**
1033
- * Computed geographical location.
763
+ * Computed geographical location.
1034
764
  */
1035
765
  aroundLatLng?: string;
1036
766
  /**
@@ -1053,11 +783,17 @@ type BaseSearchResponse = Record<string, any> & {
1053
783
  /**
1054
784
  * Facet counts.
1055
785
  */
1056
- facets?: Record<string, Record<string, number>>;
786
+ facets?: {
787
+ [key: string]: {
788
+ [key: string]: number;
789
+ };
790
+ };
1057
791
  /**
1058
792
  * Statistics for numerical facets.
1059
793
  */
1060
- facets_stats?: Record<string, FacetStats>;
794
+ facets_stats?: {
795
+ [key: string]: FacetStats;
796
+ };
1061
797
  /**
1062
798
  * Index name used for the query.
1063
799
  */
@@ -1117,7 +853,7 @@ type BaseSearchResponse = Record<string, any> & {
1117
853
  /**
1118
854
  * Whether the whole query string matches or only a part.
1119
855
  */
1120
- type MatchLevel = 'full' | 'none' | 'partial';
856
+ type MatchLevel = 'none' | 'partial' | 'full';
1121
857
 
1122
858
  /**
1123
859
  * Surround words that match the query with HTML tags for highlighting.
@@ -1131,16 +867,16 @@ type HighlightResultOption = {
1131
867
  /**
1132
868
  * List of matched words from the search query.
1133
869
  */
1134
- matchedWords: string[];
870
+ matchedWords: Array<string>;
1135
871
  /**
1136
872
  * Whether the entire attribute value is highlighted.
1137
873
  */
1138
874
  fullyHighlighted?: boolean;
1139
875
  };
1140
876
 
1141
- type HighlightResult = HighlightResult[] | HighlightResultOption | {
877
+ type HighlightResult = HighlightResultOption | {
1142
878
  [key: string]: HighlightResult;
1143
- };
879
+ } | Array<HighlightResult>;
1144
880
 
1145
881
  type MatchedGeoLocation = {
1146
882
  /**
@@ -1235,9 +971,9 @@ type SnippetResultOption = {
1235
971
  matchLevel: MatchLevel;
1236
972
  };
1237
973
 
1238
- type SnippetResult = SnippetResult[] | SnippetResultOption | {
974
+ type SnippetResult = SnippetResultOption | {
1239
975
  [key: string]: SnippetResult;
1240
- };
976
+ } | Array<SnippetResult>;
1241
977
 
1242
978
  /**
1243
979
  * Recommend hit.
@@ -1250,11 +986,15 @@ type RecommendHit = Record<string, any> & {
1250
986
  /**
1251
987
  * Surround words that match the query with HTML tags for highlighting.
1252
988
  */
1253
- _highlightResult?: Record<string, HighlightResult>;
989
+ _highlightResult?: {
990
+ [key: string]: HighlightResult;
991
+ };
1254
992
  /**
1255
993
  * Snippets that show the context around a matching search query.
1256
994
  */
1257
- _snippetResult?: Record<string, SnippetResult>;
995
+ _snippetResult?: {
996
+ [key: string]: SnippetResult;
997
+ };
1258
998
  _rankingInfo?: RankingInfo;
1259
999
  _distinctSeqID?: number;
1260
1000
  /**
@@ -1284,7 +1024,7 @@ type TrendingFacetHit = {
1284
1024
  type RecommendationsHit = RecommendHit | TrendingFacetHit;
1285
1025
 
1286
1026
  type RecommendationsHits = {
1287
- hits: RecommendationsHit[];
1027
+ hits: Array<RecommendationsHit>;
1288
1028
  };
1289
1029
 
1290
1030
  type SearchPagination = {
@@ -1306,54 +1046,379 @@ type SearchPagination = {
1306
1046
  hitsPerPage?: number;
1307
1047
  };
1308
1048
 
1309
- type RecommendationsResults = BaseSearchResponse & RecommendationsHits & SearchPagination;
1049
+ type RecommendationsResults = BaseSearchResponse & SearchPagination & RecommendationsHits;
1310
1050
 
1311
1051
  type GetRecommendationsResponse = {
1312
- results: RecommendationsResults[];
1052
+ results: Array<RecommendationsResults>;
1313
1053
  };
1314
1054
 
1315
1055
  /**
1316
- * Response, taskID, and update timestamp.
1056
+ * Condition that triggers the rule. If not specified, the rule is triggered for all recommendations.
1317
1057
  */
1318
- type RecommendUpdatedAtResponse = {
1058
+ type Condition = {
1319
1059
  /**
1320
- * 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`.
1060
+ * 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/).
1321
1061
  */
1322
- taskID: number;
1062
+ filters?: string;
1323
1063
  /**
1324
- * Date and time when the object was updated, in RFC 3339 format.
1064
+ * 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.
1325
1065
  */
1326
- updatedAt: string;
1066
+ context?: string;
1327
1067
  };
1328
1068
 
1329
- type SearchRecommendRulesResponse = {
1330
- /**
1331
- * Recommend rules that match the search criteria.
1332
- */
1333
- hits: RecommendRule[];
1069
+ /**
1070
+ * Object ID of the recommendation you want to exclude.
1071
+ */
1072
+ type HideConsequenceObject = {
1334
1073
  /**
1335
- * Number of results (hits).
1074
+ * Unique record identifier.
1336
1075
  */
1337
- nbHits: number;
1076
+ objectID?: string;
1077
+ };
1078
+
1079
+ /**
1080
+ * Facet attribute. Only recommendations with the same value (or only recommendations with a different value) as the original viewed item are included.
1081
+ */
1082
+ type AutoFacetFilter = {
1338
1083
  /**
1339
- * Page of search results to retrieve.
1084
+ * Facet attribute.
1340
1085
  */
1341
- page: number;
1086
+ facet?: string;
1342
1087
  /**
1343
- * Number of pages of results.
1088
+ * Whether the filter is negative. If true, recommendations must not have the same value for the `facet` attribute. If false, recommendations must have the same value for the `facet` attribute.
1344
1089
  */
1345
- nbPages: number;
1090
+ negative?: boolean;
1346
1091
  };
1347
1092
 
1348
- declare const apiClientVersion = "5.7.0";
1349
- declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1350
- transporter: _algolia_client_common.Transporter;
1093
+ /**
1094
+ * Filter or boost recommendations matching a facet filter.
1095
+ */
1096
+ type ParamsConsequence = {
1351
1097
  /**
1352
- * The `appId` currently in use.
1098
+ * Filter recommendations that match or don\'t match the same `facet:facet_value` combination as the viewed item.
1353
1099
  */
1354
- appId: string;
1100
+ automaticFacetFilters?: Array<AutoFacetFilter>;
1355
1101
  /**
1356
- * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
1102
+ * 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/).
1103
+ */
1104
+ filters?: string;
1105
+ /**
1106
+ * 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. Matches with higher weights (`<score=N>`) rank before matches with lower weights. If you\'re using a negative filter `facet:-value`, matching records rank after records that don\'t match.
1107
+ */
1108
+ optionalFilters?: Array<string>;
1109
+ };
1110
+
1111
+ /**
1112
+ * Object ID and position of the recommendation you want to pin.
1113
+ */
1114
+ type PromoteConsequenceObject = {
1115
+ /**
1116
+ * Unique record identifier.
1117
+ */
1118
+ objectID?: string;
1119
+ /**
1120
+ * Index in the list of recommendations where to place this item.
1121
+ */
1122
+ position?: number;
1123
+ };
1124
+
1125
+ /**
1126
+ * Effect of the rule.
1127
+ */
1128
+ type Consequence = {
1129
+ /**
1130
+ * Exclude items from recommendations.
1131
+ */
1132
+ hide?: Array<HideConsequenceObject>;
1133
+ /**
1134
+ * Place items at specific positions in the list of recommendations.
1135
+ */
1136
+ promote?: Array<PromoteConsequenceObject>;
1137
+ params?: ParamsConsequence;
1138
+ };
1139
+
1140
+ /**
1141
+ * Rule metadata.
1142
+ */
1143
+ type RuleMetadata = {
1144
+ /**
1145
+ * Date and time when the object was updated, in RFC 3339 format.
1146
+ */
1147
+ lastUpdate?: string;
1148
+ };
1149
+
1150
+ type TimeRange = {
1151
+ /**
1152
+ * When the rule should start to be active, in Unix epoch time.
1153
+ */
1154
+ from: number;
1155
+ /**
1156
+ * When the rule should stop to be active, in Unix epoch time.
1157
+ */
1158
+ until: number;
1159
+ };
1160
+
1161
+ /**
1162
+ * Recommend rule.
1163
+ */
1164
+ type RecommendRule = {
1165
+ _metadata?: RuleMetadata;
1166
+ /**
1167
+ * Unique identifier of a rule object.
1168
+ */
1169
+ objectID?: string;
1170
+ condition?: Condition;
1171
+ consequence?: Consequence;
1172
+ /**
1173
+ * Description of the rule\'s purpose. This can be helpful for display in the Algolia dashboard.
1174
+ */
1175
+ description?: string;
1176
+ /**
1177
+ * Indicates whether to enable the rule. If it isn\'t enabled, it isn\'t applied at query time.
1178
+ */
1179
+ enabled?: boolean;
1180
+ /**
1181
+ * Time periods when the rule is active.
1182
+ */
1183
+ validity?: Array<TimeRange>;
1184
+ };
1185
+
1186
+ /**
1187
+ * Response, taskID, and update timestamp.
1188
+ */
1189
+ type RecommendUpdatedAtResponse = {
1190
+ /**
1191
+ * 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`.
1192
+ */
1193
+ taskID: number;
1194
+ /**
1195
+ * Date and time when the object was updated, in RFC 3339 format.
1196
+ */
1197
+ updatedAt: string;
1198
+ };
1199
+
1200
+ type SearchRecommendRulesResponse = {
1201
+ /**
1202
+ * Recommend rules that match the search criteria.
1203
+ */
1204
+ hits: Array<RecommendRule>;
1205
+ /**
1206
+ * Number of results (hits).
1207
+ */
1208
+ nbHits: number;
1209
+ /**
1210
+ * Page of search results to retrieve.
1211
+ */
1212
+ page: number;
1213
+ /**
1214
+ * Number of pages of results.
1215
+ */
1216
+ nbPages: number;
1217
+ };
1218
+
1219
+ type RecommendModels = 'related-products' | 'bought-together' | 'trending-facets' | 'trending-items';
1220
+
1221
+ /**
1222
+ * Recommend rules parameters.
1223
+ */
1224
+ type SearchRecommendRulesParams = {
1225
+ /**
1226
+ * Search query.
1227
+ */
1228
+ query?: string;
1229
+ /**
1230
+ * Only search for rules with matching context.
1231
+ */
1232
+ context?: string;
1233
+ /**
1234
+ * Requested page of the API response.
1235
+ */
1236
+ page?: number;
1237
+ /**
1238
+ * Maximum number of hits per page.
1239
+ */
1240
+ hitsPerPage?: number;
1241
+ /**
1242
+ * Whether to only show rules where the value of their `enabled` property matches this parameter. If absent, show all rules, regardless of their `enabled` property.
1243
+ */
1244
+ enabled?: boolean;
1245
+ /**
1246
+ * Filter expression. This only searches for rules matching the filter expression.
1247
+ */
1248
+ filters?: string;
1249
+ /**
1250
+ * Include facets and facet values in the response. Use `[\'*\']` to include all facets.
1251
+ */
1252
+ facets?: Array<string>;
1253
+ /**
1254
+ * Maximum number of values to return for each facet.
1255
+ */
1256
+ maxValuesPerFacet?: number;
1257
+ };
1258
+
1259
+ /**
1260
+ * Properties for the `batchRecommendRules` method.
1261
+ */
1262
+ type BatchRecommendRulesProps = {
1263
+ /**
1264
+ * Name of the index on which to perform the operation.
1265
+ */
1266
+ indexName: string;
1267
+ /**
1268
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
1269
+ */
1270
+ model: RecommendModels;
1271
+ recommendRule?: Array<RecommendRule>;
1272
+ };
1273
+ /**
1274
+ * Properties for the `customDelete` method.
1275
+ */
1276
+ type CustomDeleteProps = {
1277
+ /**
1278
+ * Path of the endpoint, anything after \"/1\" must be specified.
1279
+ */
1280
+ path: string;
1281
+ /**
1282
+ * Query parameters to apply to the current query.
1283
+ */
1284
+ parameters?: {
1285
+ [key: string]: any;
1286
+ };
1287
+ };
1288
+ /**
1289
+ * Properties for the `customGet` method.
1290
+ */
1291
+ type CustomGetProps = {
1292
+ /**
1293
+ * Path of the endpoint, anything after \"/1\" must be specified.
1294
+ */
1295
+ path: string;
1296
+ /**
1297
+ * Query parameters to apply to the current query.
1298
+ */
1299
+ parameters?: {
1300
+ [key: string]: any;
1301
+ };
1302
+ };
1303
+ /**
1304
+ * Properties for the `customPost` method.
1305
+ */
1306
+ type CustomPostProps = {
1307
+ /**
1308
+ * Path of the endpoint, anything after \"/1\" must be specified.
1309
+ */
1310
+ path: string;
1311
+ /**
1312
+ * Query parameters to apply to the current query.
1313
+ */
1314
+ parameters?: {
1315
+ [key: string]: any;
1316
+ };
1317
+ /**
1318
+ * Parameters to send with the custom request.
1319
+ */
1320
+ body?: Record<string, unknown>;
1321
+ };
1322
+ /**
1323
+ * Properties for the `customPut` method.
1324
+ */
1325
+ type CustomPutProps = {
1326
+ /**
1327
+ * Path of the endpoint, anything after \"/1\" must be specified.
1328
+ */
1329
+ path: string;
1330
+ /**
1331
+ * Query parameters to apply to the current query.
1332
+ */
1333
+ parameters?: {
1334
+ [key: string]: any;
1335
+ };
1336
+ /**
1337
+ * Parameters to send with the custom request.
1338
+ */
1339
+ body?: Record<string, unknown>;
1340
+ };
1341
+ /**
1342
+ * Properties for the `deleteRecommendRule` method.
1343
+ */
1344
+ type DeleteRecommendRuleProps = {
1345
+ /**
1346
+ * Name of the index on which to perform the operation.
1347
+ */
1348
+ indexName: string;
1349
+ /**
1350
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
1351
+ */
1352
+ model: RecommendModels;
1353
+ /**
1354
+ * Unique record identifier.
1355
+ */
1356
+ objectID: string;
1357
+ };
1358
+ /**
1359
+ * Properties for the `getRecommendRule` method.
1360
+ */
1361
+ type GetRecommendRuleProps = {
1362
+ /**
1363
+ * Name of the index on which to perform the operation.
1364
+ */
1365
+ indexName: string;
1366
+ /**
1367
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
1368
+ */
1369
+ model: RecommendModels;
1370
+ /**
1371
+ * Unique record identifier.
1372
+ */
1373
+ objectID: string;
1374
+ };
1375
+ /**
1376
+ * Properties for the `getRecommendStatus` method.
1377
+ */
1378
+ type GetRecommendStatusProps = {
1379
+ /**
1380
+ * Name of the index on which to perform the operation.
1381
+ */
1382
+ indexName: string;
1383
+ /**
1384
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
1385
+ */
1386
+ model: RecommendModels;
1387
+ /**
1388
+ * Unique task identifier.
1389
+ */
1390
+ taskID: number;
1391
+ };
1392
+ /**
1393
+ * Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
1394
+ *
1395
+ * @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
1396
+ */
1397
+ type LegacyGetRecommendationsParams = RecommendationsRequest[];
1398
+ /**
1399
+ * Properties for the `searchRecommendRules` method.
1400
+ */
1401
+ type SearchRecommendRulesProps = {
1402
+ /**
1403
+ * Name of the index on which to perform the operation.
1404
+ */
1405
+ indexName: string;
1406
+ /**
1407
+ * [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
1408
+ */
1409
+ model: RecommendModels;
1410
+ searchRecommendRulesParams?: SearchRecommendRulesParams;
1411
+ };
1412
+
1413
+ declare const apiClientVersion = "5.8.1";
1414
+ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1415
+ transporter: _algolia_client_common.Transporter;
1416
+ /**
1417
+ * The `appId` currently in use.
1418
+ */
1419
+ appId: string;
1420
+ /**
1421
+ * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
1357
1422
  */
1358
1423
  clearCache(): Promise<void>;
1359
1424
  /**
@@ -1380,8 +1445,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1380
1445
  * Create or update a batch of Recommend Rules Each Recommend Rule is created or updated, depending on whether a Recommend Rule with the same `objectID` already exists. You may also specify `true` for `clearExistingRules`, in which case the batch will atomically replace all the existing Recommend Rules. Recommend Rules are similar to Search Rules, except that the conditions and consequences apply to a [source item](/doc/guides/algolia-recommend/overview/#recommend-models) instead of a query. The main differences are the following: - Conditions `pattern` and `anchoring` are unavailable. - Condition `filters` triggers if the source item matches the specified filters. - Condition `filters` accepts numeric filters. - Consequence `params` only covers filtering parameters. - Consequence `automaticFacetFilters` doesn\'t require a facet value placeholder (it tries to match the data source item\'s attributes instead).
1381
1446
  *
1382
1447
  * Required API Key ACLs:
1383
- * - editSettings.
1384
- *
1448
+ * - editSettings
1385
1449
  * @param batchRecommendRules - The batchRecommendRules object.
1386
1450
  * @param batchRecommendRules.indexName - Name of the index on which to perform the operation.
1387
1451
  * @param batchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
@@ -1391,7 +1455,6 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1391
1455
  batchRecommendRules({ indexName, model, recommendRule }: BatchRecommendRulesProps, requestOptions?: RequestOptions): Promise<RecommendUpdatedAtResponse>;
1392
1456
  /**
1393
1457
  * This method allow you to send requests to the Algolia REST API.
1394
- *
1395
1458
  * @param customDelete - The customDelete object.
1396
1459
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
1397
1460
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -1400,7 +1463,6 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1400
1463
  customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
1401
1464
  /**
1402
1465
  * This method allow you to send requests to the Algolia REST API.
1403
- *
1404
1466
  * @param customGet - The customGet object.
1405
1467
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
1406
1468
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -1409,7 +1471,6 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1409
1471
  customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
1410
1472
  /**
1411
1473
  * This method allow you to send requests to the Algolia REST API.
1412
- *
1413
1474
  * @param customPost - The customPost object.
1414
1475
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
1415
1476
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -1419,7 +1480,6 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1419
1480
  customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>;
1420
1481
  /**
1421
1482
  * This method allow you to send requests to the Algolia REST API.
1422
- *
1423
1483
  * @param customPut - The customPut object.
1424
1484
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
1425
1485
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -1431,8 +1491,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1431
1491
  * Deletes a Recommend rule from a recommendation scenario.
1432
1492
  *
1433
1493
  * Required API Key ACLs:
1434
- * - editSettings.
1435
- *
1494
+ * - editSettings
1436
1495
  * @param deleteRecommendRule - The deleteRecommendRule object.
1437
1496
  * @param deleteRecommendRule.indexName - Name of the index on which to perform the operation.
1438
1497
  * @param deleteRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
@@ -1444,8 +1503,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1444
1503
  * Retrieves a Recommend rule that you previously created in the Algolia dashboard.
1445
1504
  *
1446
1505
  * Required API Key ACLs:
1447
- * - settings.
1448
- *
1506
+ * - settings
1449
1507
  * @param getRecommendRule - The getRecommendRule object.
1450
1508
  * @param getRecommendRule.indexName - Name of the index on which to perform the operation.
1451
1509
  * @param getRecommendRule.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
@@ -1457,8 +1515,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1457
1515
  * Checks the status of a given task. Deleting a Recommend rule is asynchronous. When you delete a rule, a task is created on a queue and completed depending on the load on the server. The API response includes a task ID that you can use to check the status.
1458
1516
  *
1459
1517
  * Required API Key ACLs:
1460
- * - editSettings.
1461
- *
1518
+ * - editSettings
1462
1519
  * @param getRecommendStatus - The getRecommendStatus object.
1463
1520
  * @param getRecommendStatus.indexName - Name of the index on which to perform the operation.
1464
1521
  * @param getRecommendStatus.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
@@ -1470,8 +1527,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1470
1527
  * Retrieves recommendations from selected AI models.
1471
1528
  *
1472
1529
  * Required API Key ACLs:
1473
- * - search.
1474
- *
1530
+ * - search
1475
1531
  * @param getRecommendationsParams - The getRecommendationsParams object.
1476
1532
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1477
1533
  */
@@ -1480,8 +1536,7 @@ declare function createRecommendClient({ appId: appIdOption, apiKey: apiKeyOptio
1480
1536
  * Searches for Recommend rules. Use an empty query to list all rules for this recommendation scenario.
1481
1537
  *
1482
1538
  * Required API Key ACLs:
1483
- * - settings.
1484
- *
1539
+ * - settings
1485
1540
  * @param searchRecommendRules - The searchRecommendRules object.
1486
1541
  * @param searchRecommendRules.indexName - Name of the index on which to perform the operation.
1487
1542
  * @param searchRecommendRules.model - [Recommend model](https://www.algolia.com/doc/guides/algolia-recommend/overview/#recommend-models).
@@ -1502,4 +1557,4 @@ type RecommendClient = ReturnType<typeof createRecommendClient>;
1502
1557
 
1503
1558
  declare function recommendClient(appId: string, apiKey: string, options?: ClientOptions): RecommendClient;
1504
1559
 
1505
- export { type AdvancedSyntaxFeatures, type AlternativesAsExact, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AutoFacetFilter, type BaseIndexSettings, type BaseRecommendIndexSettings, type BaseRecommendRequest, type BaseRecommendSearchParams, type BaseSearchResponse, type BatchRecommendRulesProps, type BooleanString, type BoughtTogetherQuery, type Condition, type Consequence, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteRecommendRuleProps, type DeletedAtResponse, type Distinct, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetOrdering, type FacetStats, type FallbackParams, type FbtModel, type FrequentlyBoughtTogether, type GetRecommendRuleProps, type GetRecommendStatusProps, type GetRecommendTaskResponse, type GetRecommendationsParams, type GetRecommendationsResponse, type HideConsequenceObject, type HighlightResult, type HighlightResultOption, type IgnorePlurals, type IndexSettingsFacets, type LegacyGetRecommendationsParams, type LookingSimilar, type LookingSimilarModel, type LookingSimilarQuery, type MatchLevel, type MatchedGeoLocation, type NumericFilters, type OptionalFilters, type ParamsConsequence, type Personalization, type PromoteConsequenceObject, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type RecommendClient, type RecommendHit, type RecommendIndexSettings, type RecommendModels, type RecommendRule, type RecommendSearchParams, type RecommendUpdatedAtResponse, type RecommendationsHit, type RecommendationsHits, type RecommendationsRequest, type RecommendationsResults, type RecommendedForYou, type RecommendedForYouModel, type RecommendedForYouQuery, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RelatedModel, type RelatedProducts, type RelatedQuery, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, type RuleMetadata, type SearchPagination, type SearchParamsQuery, type SearchRecommendRulesParams, type SearchRecommendRulesProps, type SearchRecommendRulesResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TagFilters, type TaskStatus, type TimeRange, type TrendingFacetHit, type TrendingFacets, type TrendingFacetsModel, type TrendingFacetsQuery, type TrendingItems, type TrendingItemsModel, type TrendingItemsQuery, type TypoTolerance, type TypoToleranceEnum, type Value, apiClientVersion, recommendClient };
1560
+ export { type AdvancedSyntaxFeatures, type AlternativesAsExact, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AutoFacetFilter, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseIndexSettings, type BaseRecommendIndexSettings, type BaseRecommendRequest, type BaseRecommendSearchParams, type BaseSearchResponse, type BatchRecommendRulesProps, type BooleanString, type BoughtTogetherQuery, type Condition, type Consequence, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteRecommendRuleProps, type DeletedAtResponse, type Distinct, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetOrdering, type FacetStats, type FallbackParams, type FbtModel, type FrequentlyBoughtTogether, type GetRecommendRuleProps, type GetRecommendStatusProps, type GetRecommendTaskResponse, type GetRecommendationsParams, type GetRecommendationsResponse, type HideConsequenceObject, type HighlightResult, type HighlightResultOption, type IgnorePlurals, type IndexSettingsFacets, type LegacyGetRecommendationsParams, type LookingSimilar, type LookingSimilarModel, type LookingSimilarQuery, type MatchLevel, type MatchedGeoLocation, type NumericFilters, type OptionalFilters, type ParamsConsequence, type Personalization, type PromoteConsequenceObject, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type RecommendClient, type RecommendHit, type RecommendIndexSettings, type RecommendModels, type RecommendRule, type RecommendSearchParams, type RecommendUpdatedAtResponse, type RecommendationsHit, type RecommendationsHits, type RecommendationsRequest, type RecommendationsResults, type RecommendedForYou, type RecommendedForYouModel, type RecommendedForYouQuery, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RelatedModel, type RelatedProducts, type RelatedQuery, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, type RuleMetadata, type SearchPagination, type SearchParamsQuery, type SearchRecommendRulesParams, type SearchRecommendRulesProps, type SearchRecommendRulesResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TagFilters, type TaskStatus, type TimeRange, type TrendingFacetHit, type TrendingFacets, type TrendingFacetsModel, type TrendingFacetsQuery, type TrendingItems, type TrendingItemsModel, type TrendingItemsQuery, type TypoTolerance, type TypoToleranceEnum, type Value, type Widgets, apiClientVersion, recommendClient };