Skip to content

Commit cbeeb93

Browse files
algolia-botmillotp
andcommitted
fix(specs): make the searchParams compatible with v4 [skip-bc] (generated)
algolia/api-clients-automation#4108 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent 6fb253c commit cbeeb93

27 files changed

+110
-99
lines changed

packages/algoliasearch/builds/models.ts

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ import type {
4646
CustomGetProps,
4747
CustomPostProps,
4848
CustomPutProps,
49-
DeleteSourceProps,
5049
DeletedAtResponse,
50+
DeleteSourceProps,
5151
Distinct,
5252
Edit,
5353
EditType,
@@ -56,19 +56,21 @@ import type {
5656
Exhaustive,
5757
FacetFilters,
5858
FacetOrdering,
59-
FacetStats,
6059
Facets,
60+
FacetStats,
6161
GetTaskProps,
6262
HighlightResult,
6363
HighlightResultOption,
6464
IgnorePlurals,
6565
IndexSettingsAsSearchParams,
66+
InsideBoundingBox,
6667
Languages,
67-
MatchLevel,
6868
MatchedGeoLocation,
69+
MatchLevel,
6970
Mode,
7071
NumericFilters,
7172
OptionalFilters,
73+
OptionalWords,
7274
Params,
7375
Personalization,
7476
Promote,
@@ -77,14 +79,14 @@ import type {
7779
QueryType,
7880
Range,
7981
RankingInfo,
80-
ReRankingApplyFilter,
8182
Redirect,
8283
RedirectRuleIndexData,
8384
RedirectRuleIndexMetadata,
8485
RedirectURL,
8586
RemoveStopWords,
8687
RemoveWordsIfNoResults,
8788
RenderingContent,
89+
ReRankingApplyFilter,
8890
SearchPagination,
8991
SearchParams,
9092
SearchParamsObject,
@@ -105,39 +107,52 @@ import type {
105107
} from '@algolia/client-search';
106108
import { apiClientVersion } from '@algolia/client-search';
107109

108-
type Region =
110+
export * from '@algolia/client-abtesting';
111+
export * from '@algolia/client-analytics';
112+
export * from '@algolia/client-insights';
113+
export * from '@algolia/client-personalization';
114+
export * from '@algolia/client-query-suggestions';
115+
export * from '@algolia/client-search';
116+
export * from '@algolia/ingestion';
117+
export * from '@algolia/monitoring';
118+
export * from '@algolia/recommend';
119+
120+
export type Region =
109121
| AbtestingRegion
110122
| AnalyticsRegion
111123
| IngestionRegion
112124
| InsightsRegion
113125
| PersonalizationRegion
114126
| QuerySuggestionsRegion;
115-
type RegionOptions =
127+
export type RegionOptions =
116128
| AbtestingRegionOptions
117129
| AnalyticsRegionOptions
118130
| IngestionRegionOptions
119131
| InsightsRegionOptions
120132
| PersonalizationRegionOptions
121133
| QuerySuggestionsRegionOptions;
122134

123-
export * from '@algolia/client-abtesting';
124-
export * from '@algolia/client-analytics';
125-
export * from '@algolia/client-insights';
126-
export * from '@algolia/client-personalization';
127-
export * from '@algolia/client-query-suggestions';
128-
export * from '@algolia/client-search';
129-
export * from '@algolia/ingestion';
130-
export * from '@algolia/monitoring';
131-
export * from '@algolia/recommend';
132-
133135
export type {
134136
AbtestingRegion,
135137
AbtestingRegionOptions,
138+
AnalyticsRegion,
139+
AnalyticsRegionOptions,
140+
EventType,
141+
IngestionRegion,
142+
IngestionRegionOptions,
143+
InsightsRegion,
144+
InsightsRegionOptions,
145+
PersonalizationRegion,
146+
PersonalizationRegionOptions,
147+
QuerySuggestionsRegion,
148+
QuerySuggestionsRegionOptions,
149+
Status,
150+
};
151+
152+
export type {
136153
Action,
137154
AdvancedSyntaxFeatures,
138155
AlternativesAsExact,
139-
AnalyticsRegion,
140-
AnalyticsRegionOptions,
141156
Anchoring,
142157
AroundPrecision,
143158
AroundRadius,
@@ -163,56 +178,47 @@ export type {
163178
CustomGetProps,
164179
CustomPostProps,
165180
CustomPutProps,
166-
DeleteSourceProps,
167181
DeletedAtResponse,
182+
DeleteSourceProps,
168183
Distinct,
169184
Edit,
170185
EditType,
171186
ErrorBase,
172-
EventType,
173187
ExactOnSingleWordQuery,
174188
Exhaustive,
175189
FacetFilters,
176190
FacetOrdering,
177-
FacetStats,
178191
Facets,
192+
FacetStats,
179193
GetTaskProps,
180194
HighlightResult,
181195
HighlightResultOption,
182196
IgnorePlurals,
183197
IndexSettingsAsSearchParams,
184-
IngestionRegion,
185-
IngestionRegionOptions,
186-
InsightsRegion,
187-
InsightsRegionOptions,
198+
InsideBoundingBox,
188199
Languages,
189-
MatchLevel,
190200
MatchedGeoLocation,
201+
MatchLevel,
191202
Mode,
192203
NumericFilters,
193204
OptionalFilters,
205+
OptionalWords,
194206
Params,
195207
Personalization,
196-
PersonalizationRegion,
197-
PersonalizationRegionOptions,
198208
Promote,
199209
PromoteObjectID,
200210
PromoteObjectIDs,
201-
QuerySuggestionsRegion,
202-
QuerySuggestionsRegionOptions,
203211
QueryType,
204212
Range,
205213
RankingInfo,
206-
ReRankingApplyFilter,
207214
Redirect,
208215
RedirectRuleIndexData,
209216
RedirectRuleIndexMetadata,
210217
RedirectURL,
211-
Region,
212-
RegionOptions,
213218
RemoveStopWords,
214219
RemoveWordsIfNoResults,
215220
RenderingContent,
221+
ReRankingApplyFilter,
216222
SearchPagination,
217223
SearchParams,
218224
SearchParamsObject,
@@ -222,7 +228,6 @@ export type {
222228
SnippetResultOption,
223229
SortRemainingBy,
224230
Source,
225-
Status,
226231
SupportedLanguage,
227232
TagFilters,
228233
TaskStatus,
@@ -231,9 +236,10 @@ export type {
231236
TypoToleranceEnum,
232237
Value,
233238
Widgets,
234-
apiClientVersion,
235239
};
236240

241+
export { apiClientVersion };
242+
237243
/**
238244
* Options forwarded to the client initialized via the `init` method.
239245
*/

packages/algoliasearch/lite/model/baseIndexSettings.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,9 @@ export type BaseIndexSettings = {
8787
* 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.
8888
*/
8989
attributeForDistinct?: string;
90+
91+
/**
92+
* 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).
93+
*/
94+
maxFacetHits?: number;
9095
};

packages/algoliasearch/lite/model/baseRecommendIndexSettings.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import type { AlternativesAsExact } from './alternativesAsExact';
55
import type { Distinct } from './distinct';
66
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
77
import type { IgnorePlurals } from './ignorePlurals';
8+
import type { OptionalWords } from './optionalWords';
89
import type { QueryType } from './queryType';
910
import type { ReRankingApplyFilter } from './reRankingApplyFilter';
1011
import type { RemoveStopWords } from './removeStopWords';
@@ -114,10 +115,7 @@ export type BaseRecommendIndexSettings = {
114115
*/
115116
advancedSyntax?: boolean;
116117

117-
/**
118-
* 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).
119-
*/
120-
optionalWords?: Array<string>;
118+
optionalWords?: OptionalWords | null;
121119

122120
/**
123121
* 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.
@@ -153,11 +151,6 @@ export type BaseRecommendIndexSettings = {
153151
*/
154152
responseFields?: Array<string>;
155153

156-
/**
157-
* 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).
158-
*/
159-
maxFacetHits?: number;
160-
161154
/**
162155
* Maximum number of facet values to return for each facet.
163156
*/

packages/algoliasearch/lite/model/baseRecommendSearchParams.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import type { AroundPrecision } from './aroundPrecision';
44
import type { AroundRadius } from './aroundRadius';
55
import type { FacetFilters } from './facetFilters';
6+
import type { InsideBoundingBox } from './insideBoundingBox';
67
import type { NumericFilters } from './numericFilters';
78
import type { OptionalFilters } from './optionalFilters';
89
import type { SupportedLanguage } from './supportedLanguage';
@@ -66,10 +67,7 @@ export type BaseRecommendSearchParams = {
6667
*/
6768
minimumAroundRadius?: number;
6869

69-
/**
70-
* 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).
71-
*/
72-
insideBoundingBox?: Array<Array<number>>;
70+
insideBoundingBox?: InsideBoundingBox | null;
7371

7472
/**
7573
* 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`.

packages/algoliasearch/lite/model/baseSearchParamsWithoutQuery.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import type { AroundPrecision } from './aroundPrecision';
44
import type { AroundRadius } from './aroundRadius';
55
import type { FacetFilters } from './facetFilters';
6+
import type { InsideBoundingBox } from './insideBoundingBox';
67
import type { NumericFilters } from './numericFilters';
78
import type { OptionalFilters } from './optionalFilters';
89
import type { SupportedLanguage } from './supportedLanguage';
@@ -81,10 +82,7 @@ export type BaseSearchParamsWithoutQuery = {
8182
*/
8283
minimumAroundRadius?: number;
8384

84-
/**
85-
* 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).
86-
*/
87-
insideBoundingBox?: Array<Array<number>>;
85+
insideBoundingBox?: InsideBoundingBox | null;
8886

8987
/**
9088
* 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`.

packages/algoliasearch/lite/model/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ export * from './ignorePlurals';
5454
export * from './indexSettings';
5555
export * from './indexSettingsAsSearchParams';
5656
export * from './indexSettingsFacets';
57+
export * from './insideBoundingBox';
5758
export * from './lookingSimilar';
5859
export * from './lookingSimilarModel';
5960
export * from './lookingSimilarQuery';
@@ -62,6 +63,7 @@ export * from './matchLevel';
6263
export * from './mode';
6364
export * from './numericFilters';
6465
export * from './optionalFilters';
66+
export * from './optionalWords';
6567
export * from './params';
6668
export * from './personalization';
6769
export * from './queryType';

packages/algoliasearch/lite/model/indexSettingsAsSearchParams.ts

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { Distinct } from './distinct';
66
import type { ExactOnSingleWordQuery } from './exactOnSingleWordQuery';
77
import type { IgnorePlurals } from './ignorePlurals';
88
import type { Mode } from './mode';
9+
import type { OptionalWords } from './optionalWords';
910
import type { QueryType } from './queryType';
1011
import type { ReRankingApplyFilter } from './reRankingApplyFilter';
1112
import type { RemoveStopWords } from './removeStopWords';
@@ -135,10 +136,7 @@ export type IndexSettingsAsSearchParams = {
135136
*/
136137
advancedSyntax?: boolean;
137138

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 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-
*/
141-
optionalWords?: Array<string>;
139+
optionalWords?: OptionalWords | null;
142140

143141
/**
144142
* 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.
@@ -174,11 +172,6 @@ export type IndexSettingsAsSearchParams = {
174172
*/
175173
responseFields?: Array<string>;
176174

177-
/**
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).
179-
*/
180-
maxFacetHits?: number;
181-
182175
/**
183176
* Maximum number of facet values to return for each facet.
184177
*/
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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+
3+
export type InsideBoundingBox = string | Array<Array<number>>;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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+
3+
export type OptionalWords = string | Array<string>;

packages/client-composition/model/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ export * from './hitRankingInfo';
4848
export * from './ignorePlurals';
4949
export * from './injection';
5050
export * from './insetsQueryParameters';
51+
export * from './insideBoundingBox';
5152
export * from './listCompositionsResponse';
5253
export * from './main';
5354
export * from './mainInjectionQueryParameters';
@@ -57,6 +58,7 @@ export * from './multipleBatchRequest';
5758
export * from './multipleBatchResponse';
5859
export * from './numericFilters';
5960
export * from './optionalFilters';
61+
export * from './optionalWords';
6062
export * from './params';
6163
export * from './personalization';
6264
export * from './queryType';

packages/client-composition/model/insetsQueryParameters.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import type { FacetFilters } from './facetFilters';
88
import type { IgnorePlurals } from './ignorePlurals';
99
import type { NumericFilters } from './numericFilters';
1010
import type { OptionalFilters } from './optionalFilters';
11+
import type { OptionalWords } from './optionalWords';
1112
import type { QueryType } from './queryType';
1213
import type { RemoveStopWords } from './removeStopWords';
1314
import type { RemoveWordsIfNoResults } from './removeWordsIfNoResults';
@@ -136,10 +137,7 @@ export type InsetsQueryParameters = {
136137
*/
137138
advancedSyntax?: boolean;
138139

139-
/**
140-
* 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).
141-
*/
142-
optionalWords?: Array<string>;
140+
optionalWords?: OptionalWords | null;
143141

144142
/**
145143
* 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.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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+
3+
export type InsideBoundingBox = string | Array<Array<number>>;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
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+
3+
export type OptionalWords = string | Array<string>;

0 commit comments

Comments
 (0)