@algolia/client-search 5.7.0 → 5.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (127) hide show
  1. package/README.md +5 -6
  2. package/dist/browser.d.ts +1670 -1650
  3. package/dist/builds/browser.js +93 -155
  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 +93 -155
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +88 -150
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +94 -156
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +1423 -1402
  15. package/dist/node.d.cts +1423 -1402
  16. package/dist/node.d.ts +1423 -1402
  17. package/dist/src/searchClient.cjs +86 -148
  18. package/dist/src/searchClient.cjs.map +1 -1
  19. package/dist/src/searchClient.js +89 -151
  20. package/dist/src/searchClient.js.map +1 -1
  21. package/index.js +1 -1
  22. package/model/acl.ts +1 -1
  23. package/model/action.ts +4 -4
  24. package/model/alternativesAsExact.ts +1 -1
  25. package/model/anchoring.ts +2 -2
  26. package/model/apiKey.ts +4 -4
  27. package/model/aroundPrecision.ts +1 -1
  28. package/model/aroundRadius.ts +1 -1
  29. package/model/attributeToUpdate.ts +1 -1
  30. package/model/automaticFacetFilters.ts +1 -1
  31. package/model/banner.ts +13 -0
  32. package/model/bannerImage.ts +12 -0
  33. package/model/bannerImageUrl.ts +8 -0
  34. package/model/bannerLink.ts +8 -0
  35. package/model/banners.ts +10 -0
  36. package/model/baseIndexSettings.ts +15 -15
  37. package/model/baseSearchParams.ts +1 -1
  38. package/model/baseSearchParamsWithoutQuery.ts +8 -8
  39. package/model/baseSearchResponse.ts +2 -2
  40. package/model/batchAssignUserIdsParams.ts +1 -1
  41. package/model/batchDictionaryEntriesParams.ts +1 -1
  42. package/model/batchParams.ts +1 -1
  43. package/model/batchResponse.ts +1 -1
  44. package/model/batchWriteParams.ts +1 -1
  45. package/model/booleanString.ts +1 -1
  46. package/model/browseParams.ts +2 -1
  47. package/model/browseParamsObject.ts +1 -1
  48. package/model/browseResponse.ts +1 -1
  49. package/model/builtInOperationType.ts +4 -4
  50. package/model/builtInOperationValue.ts +1 -1
  51. package/model/clientMethodProps.ts +50 -34
  52. package/model/consequence.ts +2 -2
  53. package/model/consequenceQueryObject.ts +2 -2
  54. package/model/deleteByParams.ts +3 -3
  55. package/model/dictionaryEntry.ts +2 -2
  56. package/model/dictionaryEntryState.ts +1 -1
  57. package/model/dictionaryType.ts +1 -1
  58. package/model/facetFilters.ts +1 -1
  59. package/model/facetOrdering.ts +1 -1
  60. package/model/facets.ts +1 -1
  61. package/model/fetchedIndex.ts +1 -1
  62. package/model/getApiKeyResponse.ts +1 -1
  63. package/model/getLogsResponse.ts +1 -1
  64. package/model/getObjectsParams.ts +1 -1
  65. package/model/getObjectsRequest.ts +1 -1
  66. package/model/getTopUserIdsResponse.ts +1 -1
  67. package/model/hasPendingMappingsResponse.ts +1 -1
  68. package/model/highlightResult.ts +1 -1
  69. package/model/highlightResultOption.ts +1 -1
  70. package/model/hit.ts +2 -2
  71. package/model/ignorePlurals.ts +1 -1
  72. package/model/index.ts +13 -7
  73. package/model/indexSettingsAsSearchParams.ts +15 -15
  74. package/model/listApiKeysResponse.ts +1 -1
  75. package/model/listClustersResponse.ts +1 -1
  76. package/model/listIndicesResponse.ts +1 -1
  77. package/model/listUserIdsResponse.ts +1 -1
  78. package/model/log.ts +1 -1
  79. package/model/logType.ts +1 -1
  80. package/model/matchLevel.ts +1 -1
  81. package/model/mode.ts +1 -1
  82. package/model/multipleBatchResponse.ts +2 -2
  83. package/model/numericFilters.ts +2 -2
  84. package/model/operationIndexParams.ts +1 -1
  85. package/model/operationType.ts +1 -1
  86. package/model/optionalFilters.ts +1 -1
  87. package/model/promote.ts +1 -1
  88. package/model/promoteObjectIDs.ts +1 -1
  89. package/model/queryType.ts +2 -2
  90. package/model/reRankingApplyFilter.ts +1 -1
  91. package/model/redirect.ts +1 -1
  92. package/model/removeStopWords.ts +1 -1
  93. package/model/removeWordsIfNoResults.ts +1 -1
  94. package/model/renderingContent.ts +4 -1
  95. package/model/replaceAllObjectsResponse.ts +1 -1
  96. package/model/rule.ts +2 -2
  97. package/model/scopeType.ts +1 -1
  98. package/model/searchDictionaryEntriesResponse.ts +1 -1
  99. package/model/searchForFacetValuesResponse.ts +1 -1
  100. package/model/searchForFacets.ts +1 -1
  101. package/model/searchForHits.ts +1 -1
  102. package/model/searchHits.ts +1 -1
  103. package/model/searchMethodParams.ts +1 -1
  104. package/model/searchParams.ts +1 -1
  105. package/model/searchQuery.ts +1 -1
  106. package/model/searchResponse.ts +1 -1
  107. package/model/searchResponses.ts +1 -1
  108. package/model/searchResult.ts +1 -1
  109. package/model/searchRulesResponse.ts +1 -1
  110. package/model/searchSynonymsResponse.ts +1 -1
  111. package/model/searchUserIdsParams.ts +1 -1
  112. package/model/searchUserIdsResponse.ts +2 -2
  113. package/model/securedApiKeyRestrictions.ts +1 -1
  114. package/model/semanticSearch.ts +1 -1
  115. package/model/snippetResult.ts +1 -1
  116. package/model/sortRemainingBy.ts +1 -1
  117. package/model/standardEntries.ts +3 -3
  118. package/model/supportedLanguage.ts +1 -1
  119. package/model/synonymHit.ts +3 -3
  120. package/model/synonymType.ts +1 -1
  121. package/model/tagFilters.ts +1 -1
  122. package/model/taskStatus.ts +1 -1
  123. package/model/typoTolerance.ts +2 -2
  124. package/model/userHit.ts +1 -1
  125. package/model/value.ts +2 -2
  126. package/model/widgets.ts +10 -0
  127. package/package.json +6 -6
@@ -13,7 +13,7 @@ export type Consequence = {
13
13
  /**
14
14
  * Records you want to pin to a specific position in the search results. You can promote up to 300 records, either individually, or as groups of up to 100 records each.
15
15
  */
16
- promote?: Promote[];
16
+ promote?: Array<Promote>;
17
17
 
18
18
  /**
19
19
  * Whether promoted records must match an active filter for the consequence to be applied. This ensures that user actions (filtering the search) are given a higher precendence. For example, if you promote a record with the `color: red` attribute, and the user filters the search for `color: blue`, the \"red\" record won\'t be shown.
@@ -23,7 +23,7 @@ export type Consequence = {
23
23
  /**
24
24
  * Records you want to hide from the search results.
25
25
  */
26
- hide?: ConsequenceHide[];
26
+ hide?: Array<ConsequenceHide>;
27
27
 
28
28
  /**
29
29
  * A JSON object with custom data that will be appended to the `userData` array in the response. This object isn\'t interpreted by the API and is limited to 1&nbsp;kB of minified JSON.
@@ -6,10 +6,10 @@ export type ConsequenceQueryObject = {
6
6
  /**
7
7
  * Words to remove from the search query.
8
8
  */
9
- remove?: string[];
9
+ remove?: Array<string>;
10
10
 
11
11
  /**
12
12
  * Changes to make to the search query.
13
13
  */
14
- edits?: Edit[];
14
+ edits?: Array<Edit>;
15
15
  };
@@ -18,7 +18,7 @@ export type DeleteByParams = {
18
18
  tagFilters?: TagFilters;
19
19
 
20
20
  /**
21
- * 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`.
21
+ * 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`.
22
22
  */
23
23
  aroundLatLng?: string;
24
24
 
@@ -27,10 +27,10 @@ export type DeleteByParams = {
27
27
  /**
28
28
  * 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).
29
29
  */
30
- insideBoundingBox?: number[][];
30
+ insideBoundingBox?: Array<Array<number>>;
31
31
 
32
32
  /**
33
33
  * 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`.
34
34
  */
35
- insidePolygon?: number[][];
35
+ insidePolygon?: Array<Array<number>>;
36
36
  };
@@ -23,12 +23,12 @@ export type DictionaryEntry = Record<string, any> & {
23
23
  /**
24
24
  * Matching words in the `plurals` dictionary including declensions.
25
25
  */
26
- words?: string[];
26
+ words?: Array<string>;
27
27
 
28
28
  /**
29
29
  * Invividual components of a compound word in the `compounds` dictionary.
30
30
  */
31
- decomposition?: string[];
31
+ decomposition?: Array<string>;
32
32
 
33
33
  state?: DictionaryEntryState;
34
34
 
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Whether a dictionary entry is active.
5
5
  */
6
- export type DictionaryEntryState = 'disabled' | 'enabled';
6
+ export type DictionaryEntryState = 'enabled' | 'disabled';
@@ -1,3 +1,3 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type DictionaryType = 'compounds' | 'plurals' | 'stopwords';
3
+ export type DictionaryType = 'plurals' | 'stopwords' | 'compounds';
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * 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`.
5
5
  */
6
- export type FacetFilters = FacetFilters[] | string;
6
+ export type FacetFilters = Array<FacetFilters> | string;
@@ -12,5 +12,5 @@ export type FacetOrdering = {
12
12
  /**
13
13
  * Order of facet values. One object for each facet.
14
14
  */
15
- values?: Record<string, Value>;
15
+ values?: { [key: string]: Value };
16
16
  };
package/model/facets.ts CHANGED
@@ -7,5 +7,5 @@ export type Facets = {
7
7
  /**
8
8
  * Explicit order of facets or facet values. This setting lets you always show specific facets or facet values at the top of the list.
9
9
  */
10
- order?: string[];
10
+ order?: Array<string>;
11
11
  };
@@ -54,7 +54,7 @@ export type FetchedIndex = {
54
54
  /**
55
55
  * Only present if the index is a primary index with replicas. Contains the names of all linked replicas.
56
56
  */
57
- replicas?: string[];
57
+ replicas?: Array<string>;
58
58
 
59
59
  /**
60
60
  * Only present if the index is a [virtual replica](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-an-index-alphabetically/#virtual-replicas).
@@ -3,4 +3,4 @@
3
3
  import type { ApiKey } from './apiKey';
4
4
  import type { BaseGetApiKeyResponse } from './baseGetApiKeyResponse';
5
5
 
6
- export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
6
+ export type GetApiKeyResponse = BaseGetApiKeyResponse & ApiKey;
@@ -3,5 +3,5 @@
3
3
  import type { Log } from './log';
4
4
 
5
5
  export type GetLogsResponse = {
6
- logs: Log[];
6
+ logs: Array<Log>;
7
7
  };
@@ -6,5 +6,5 @@ import type { GetObjectsRequest } from './getObjectsRequest';
6
6
  * Request parameters.
7
7
  */
8
8
  export type GetObjectsParams = {
9
- requests: GetObjectsRequest[];
9
+ requests: Array<GetObjectsRequest>;
10
10
  };
@@ -7,7 +7,7 @@ export type GetObjectsRequest = {
7
7
  /**
8
8
  * Attributes to retrieve. If not specified, all retrievable attributes are returned.
9
9
  */
10
- attributesToRetrieve?: string[];
10
+ attributesToRetrieve?: Array<string>;
11
11
 
12
12
  /**
13
13
  * Object ID for the record to retrieve.
@@ -9,5 +9,5 @@ export type GetTopUserIdsResponse = {
9
9
  /**
10
10
  * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
11
11
  */
12
- topUsers: Array<Record<string, UserId[]>>;
12
+ topUsers: Array<{ [key: string]: Array<UserId> }>;
13
13
  };
@@ -9,5 +9,5 @@ export type HasPendingMappingsResponse = {
9
9
  /**
10
10
  * Cluster pending mapping state: migrating, creating, deleting.
11
11
  */
12
- clusters?: Record<string, string[]>;
12
+ clusters?: { [key: string]: Array<string> };
13
13
  };
@@ -2,4 +2,4 @@
2
2
 
3
3
  import type { HighlightResultOption } from './highlightResultOption';
4
4
 
5
- export type HighlightResult = HighlightResult[] | HighlightResultOption | { [key: string]: HighlightResult };
5
+ export type HighlightResult = HighlightResultOption | { [key: string]: HighlightResult } | Array<HighlightResult>;
@@ -16,7 +16,7 @@ export type HighlightResultOption = {
16
16
  /**
17
17
  * List of matched words from the search query.
18
18
  */
19
- matchedWords: string[];
19
+ matchedWords: Array<string>;
20
20
 
21
21
  /**
22
22
  * Whether the entire attribute value is highlighted.
package/model/hit.ts CHANGED
@@ -16,12 +16,12 @@ export type Hit<T = Record<string, any>> = T & {
16
16
  /**
17
17
  * Surround words that match the query with HTML tags for highlighting.
18
18
  */
19
- _highlightResult?: Record<string, HighlightResult>;
19
+ _highlightResult?: { [key: string]: HighlightResult };
20
20
 
21
21
  /**
22
22
  * Snippets that show the context around a matching search query.
23
23
  */
24
- _snippetResult?: Record<string, SnippetResult>;
24
+ _snippetResult?: { [key: string]: SnippetResult };
25
25
 
26
26
  _rankingInfo?: RankingInfo;
27
27
 
@@ -6,4 +6,4 @@ import type { SupportedLanguage } from './supportedLanguage';
6
6
  /**
7
7
  * Treat singular, plurals, and other forms of declensions as equivalent. You should only use this feature for the languages used in your index.
8
8
  */
9
- export type IgnorePlurals = BooleanString | SupportedLanguage[] | boolean;
9
+ export type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
package/model/index.ts CHANGED
@@ -15,6 +15,11 @@ export * from './assignUserIdParams';
15
15
  export * from './attributeToUpdate';
16
16
  export * from './automaticFacetFilter';
17
17
  export * from './automaticFacetFilters';
18
+ export * from './banner';
19
+ export * from './bannerImage';
20
+ export * from './bannerImageUrl';
21
+ export * from './bannerLink';
22
+ export * from './banners';
18
23
  export * from './baseGetApiKeyResponse';
19
24
  export * from './baseIndexSettings';
20
25
  export * from './baseSearchParams';
@@ -35,6 +40,7 @@ export * from './browseResponse';
35
40
  export * from './builtInOperation';
36
41
  export * from './builtInOperationType';
37
42
  export * from './builtInOperationValue';
43
+ export * from './clientMethodProps';
38
44
  export * from './condition';
39
45
  export * from './consequence';
40
46
  export * from './consequenceHide';
@@ -45,8 +51,8 @@ export * from './createdAtResponse';
45
51
  export * from './cursor';
46
52
  export * from './deleteApiKeyResponse';
47
53
  export * from './deleteByParams';
48
- export * from './deleteSourceResponse';
49
54
  export * from './deletedAtResponse';
55
+ export * from './deleteSourceResponse';
50
56
  export * from './dictionaryAction';
51
57
  export * from './dictionaryEntry';
52
58
  export * from './dictionaryEntryState';
@@ -63,8 +69,8 @@ export * from './exhaustive';
63
69
  export * from './facetFilters';
64
70
  export * from './facetHits';
65
71
  export * from './facetOrdering';
66
- export * from './facetStats';
67
72
  export * from './facets';
73
+ export * from './facetStats';
68
74
  export * from './fetchedIndex';
69
75
  export * from './getApiKeyResponse';
70
76
  export * from './getDictionarySettingsResponse';
@@ -89,8 +95,8 @@ export * from './listUserIdsResponse';
89
95
  export * from './log';
90
96
  export * from './logQuery';
91
97
  export * from './logType';
92
- export * from './matchLevel';
93
98
  export * from './matchedGeoLocation';
99
+ export * from './matchLevel';
94
100
  export * from './mode';
95
101
  export * from './multipleBatchRequest';
96
102
  export * from './multipleBatchResponse';
@@ -106,7 +112,6 @@ export * from './promoteObjectIDs';
106
112
  export * from './queryType';
107
113
  export * from './range';
108
114
  export * from './rankingInfo';
109
- export * from './reRankingApplyFilter';
110
115
  export * from './redirect';
111
116
  export * from './redirectRuleIndexData';
112
117
  export * from './redirectRuleIndexMetadata';
@@ -117,16 +122,17 @@ export * from './removeWordsIfNoResults';
117
122
  export * from './renderingContent';
118
123
  export * from './replaceAllObjectsResponse';
119
124
  export * from './replaceSourceResponse';
125
+ export * from './reRankingApplyFilter';
120
126
  export * from './rule';
121
127
  export * from './saveObjectResponse';
122
128
  export * from './saveSynonymResponse';
123
129
  export * from './scopeType';
124
130
  export * from './searchDictionaryEntriesParams';
125
131
  export * from './searchDictionaryEntriesResponse';
126
- export * from './searchForFacetValuesRequest';
127
- export * from './searchForFacetValuesResponse';
128
132
  export * from './searchForFacets';
129
133
  export * from './searchForFacetsOptions';
134
+ export * from './searchForFacetValuesRequest';
135
+ export * from './searchForFacetValuesResponse';
130
136
  export * from './searchForHits';
131
137
  export * from './searchForHitsOptions';
132
138
  export * from './searchHits';
@@ -173,5 +179,5 @@ export * from './userHighlightResult';
173
179
  export * from './userHit';
174
180
  export * from './userId';
175
181
  export * from './value';
182
+ export * from './widgets';
176
183
  export * from './withPrimary';
177
- export * from './clientMethodProps';
@@ -19,17 +19,17 @@ export type IndexSettingsAsSearchParams = {
19
19
  /**
20
20
  * 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.
21
21
  */
22
- attributesToRetrieve?: string[];
22
+ attributesToRetrieve?: Array<string>;
23
23
 
24
24
  /**
25
25
  * 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/).
26
26
  */
27
- ranking?: string[];
27
+ ranking?: Array<string>;
28
28
 
29
29
  /**
30
30
  * Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). Attribute names are case-sensitive. The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
31
31
  */
32
- customRanking?: string[];
32
+ customRanking?: Array<string>;
33
33
 
34
34
  /**
35
35
  * 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.
@@ -39,12 +39,12 @@ export type IndexSettingsAsSearchParams = {
39
39
  /**
40
40
  * 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/).
41
41
  */
42
- attributesToHighlight?: string[];
42
+ attributesToHighlight?: Array<string>;
43
43
 
44
44
  /**
45
45
  * 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.
46
46
  */
47
- attributesToSnippet?: string[];
47
+ attributesToSnippet?: Array<string>;
48
48
 
49
49
  /**
50
50
  * HTML tag to insert before the highlighted parts in all highlighted results and snippets.
@@ -91,7 +91,7 @@ export type IndexSettingsAsSearchParams = {
91
91
  /**
92
92
  * 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.
93
93
  */
94
- disableTypoToleranceOnAttributes?: string[];
94
+ disableTypoToleranceOnAttributes?: Array<string>;
95
95
 
96
96
  ignorePlurals?: IgnorePlurals;
97
97
 
@@ -105,7 +105,7 @@ export type IndexSettingsAsSearchParams = {
105
105
  /**
106
106
  * 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/).
107
107
  */
108
- queryLanguages?: SupportedLanguage[];
108
+ queryLanguages?: Array<SupportedLanguage>;
109
109
 
110
110
  /**
111
111
  * 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).
@@ -136,31 +136,31 @@ export type IndexSettingsAsSearchParams = {
136
136
  advancedSyntax?: boolean;
137
137
 
138
138
  /**
139
- * 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).
139
+ * 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).
140
140
  */
141
- optionalWords?: string[];
141
+ optionalWords?: Array<string>;
142
142
 
143
143
  /**
144
- * 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.
144
+ * 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.
145
145
  */
146
- disableExactOnAttributes?: string[];
146
+ disableExactOnAttributes?: Array<string>;
147
147
 
148
148
  exactOnSingleWordQuery?: ExactOnSingleWordQuery;
149
149
 
150
150
  /**
151
151
  * 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.
152
152
  */
153
- alternativesAsExact?: AlternativesAsExact[];
153
+ alternativesAsExact?: Array<AlternativesAsExact>;
154
154
 
155
155
  /**
156
156
  * 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.
157
157
  */
158
- advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
158
+ advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;
159
159
 
160
160
  distinct?: Distinct;
161
161
 
162
162
  /**
163
- * 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.
163
+ * 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.
164
164
  */
165
165
  replaceSynonymsInHighlight?: boolean;
166
166
 
@@ -172,7 +172,7 @@ export type IndexSettingsAsSearchParams = {
172
172
  /**
173
173
  * 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.
174
174
  */
175
- responseFields?: string[];
175
+ responseFields?: Array<string>;
176
176
 
177
177
  /**
178
178
  * 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).
@@ -6,5 +6,5 @@ export type ListApiKeysResponse = {
6
6
  /**
7
7
  * API keys.
8
8
  */
9
- keys: GetApiKeyResponse[];
9
+ keys: Array<GetApiKeyResponse>;
10
10
  };
@@ -7,5 +7,5 @@ export type ListClustersResponse = {
7
7
  /**
8
8
  * Key-value pairs with cluster names as keys and lists of users with the highest number of records per cluster as values.
9
9
  */
10
- topUsers: string[];
10
+ topUsers: Array<string>;
11
11
  };
@@ -6,7 +6,7 @@ export type ListIndicesResponse = {
6
6
  /**
7
7
  * All indices in your Algolia application.
8
8
  */
9
- items: FetchedIndex[];
9
+ items: Array<FetchedIndex>;
10
10
 
11
11
  /**
12
12
  * Number of pages.
@@ -9,5 +9,5 @@ export type ListUserIdsResponse = {
9
9
  /**
10
10
  * User IDs.
11
11
  */
12
- userIDs: UserId[];
12
+ userIDs: Array<UserId>;
13
13
  };
package/model/log.ts CHANGED
@@ -76,5 +76,5 @@ export type Log = {
76
76
  /**
77
77
  * Queries performed for the given request.
78
78
  */
79
- inner_queries?: LogQuery[];
79
+ inner_queries?: Array<LogQuery>;
80
80
  };
package/model/logType.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
- export type LogType = 'all' | 'build' | 'error' | 'query';
3
+ export type LogType = 'all' | 'query' | 'build' | 'error';
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Whether the whole query string matches or only a part.
5
5
  */
6
- export type MatchLevel = 'full' | 'none' | 'partial';
6
+ export type MatchLevel = 'none' | 'partial' | 'full';
package/model/mode.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Search mode the index will use to query for results. This setting only applies to indices, for which Algolia enabled NeuralSearch for you.
5
5
  */
6
- export type Mode = 'keywordSearch' | 'neuralSearch';
6
+ export type Mode = 'neuralSearch' | 'keywordSearch';
@@ -4,10 +4,10 @@ export type MultipleBatchResponse = {
4
4
  /**
5
5
  * Task IDs. One for each index.
6
6
  */
7
- taskID: Record<string, number>;
7
+ taskID: { [key: string]: number };
8
8
 
9
9
  /**
10
10
  * Unique record identifiers.
11
11
  */
12
- objectIDs: string[];
12
+ objectIDs: Array<string>;
13
13
  };
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * 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`.
4
+ * 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`.
5
5
  */
6
- export type NumericFilters = NumericFilters[] | string;
6
+ export type NumericFilters = Array<NumericFilters> | string;
@@ -14,5 +14,5 @@ export type OperationIndexParams = {
14
14
  /**
15
15
  * **Only for copying.** If you specify a scope, only the selected scopes are copied. Records and the other scopes are left unchanged. If you omit the `scope` parameter, everything is copied: records, settings, synonyms, and rules.
16
16
  */
17
- scope?: ScopeType[];
17
+ scope?: Array<ScopeType>;
18
18
  };
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Operation to perform on the index.
5
5
  */
6
- export type OperationType = 'copy' | 'move';
6
+ export type OperationType = 'move' | 'copy';
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * 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.
5
5
  */
6
- export type OptionalFilters = OptionalFilters[] | string;
6
+ export type OptionalFilters = Array<OptionalFilters> | string;
package/model/promote.ts CHANGED
@@ -3,4 +3,4 @@
3
3
  import type { PromoteObjectID } from './promoteObjectID';
4
4
  import type { PromoteObjectIDs } from './promoteObjectIDs';
5
5
 
6
- export type Promote = PromoteObjectID | PromoteObjectIDs;
6
+ export type Promote = PromoteObjectIDs | PromoteObjectID;
@@ -7,7 +7,7 @@ export type PromoteObjectIDs = {
7
7
  /**
8
8
  * Object IDs of the records you want to promote. The records are placed as a group at the `position`. For example, if you want to promote four records to position `0`, they will be the first four search results.
9
9
  */
10
- objectIDs: string[];
10
+ objectIDs: Array<string>;
11
11
 
12
12
  /**
13
13
  * Position in the search results where you want to show the promoted records.
@@ -1,6 +1,6 @@
1
1
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
2
2
 
3
3
  /**
4
- * 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/).
4
+ * 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/).
5
5
  */
6
- export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
6
+ export type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * Restrict [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking/) to records that match these filters.
5
5
  */
6
- export type ReRankingApplyFilter = ReRankingApplyFilter[] | string;
6
+ export type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;
package/model/redirect.ts CHANGED
@@ -6,5 +6,5 @@ import type { RedirectRuleIndexMetadata } from './redirectRuleIndexMetadata';
6
6
  * [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.
7
7
  */
8
8
  export type Redirect = {
9
- index?: RedirectRuleIndexMetadata[];
9
+ index?: Array<RedirectRuleIndexMetadata>;
10
10
  };
@@ -5,4 +5,4 @@ import type { SupportedLanguage } from './supportedLanguage';
5
5
  /**
6
6
  * 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.
7
7
  */
8
- export type RemoveStopWords = SupportedLanguage[] | boolean;
8
+ export type RemoveStopWords = Array<SupportedLanguage> | boolean;
@@ -3,4 +3,4 @@
3
3
  /**
4
4
  * 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/).
5
5
  */
6
- export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
6
+ export type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';
@@ -2,12 +2,15 @@
2
2
 
3
3
  import type { FacetOrdering } from './facetOrdering';
4
4
  import type { RedirectURL } from './redirectURL';
5
+ import type { Widgets } from './widgets';
5
6
 
6
7
  /**
7
- * 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.
8
+ * 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.
8
9
  */
9
10
  export type RenderingContent = {
10
11
  facetOrdering?: FacetOrdering;
11
12
 
12
13
  redirect?: RedirectURL;
14
+
15
+ widgets?: Widgets;
13
16
  };
@@ -9,7 +9,7 @@ export type ReplaceAllObjectsResponse = {
9
9
  /**
10
10
  * The response of the `batch` request(s).
11
11
  */
12
- batchResponses: BatchResponse[];
12
+ batchResponses: Array<BatchResponse>;
13
13
 
14
14
  moveOperationResponse: UpdatedAtResponse;
15
15
  };