Skip to content

Commit 6e7ecae

Browse files
feat(specs): allow enablePersonalization query parameter at run time for Composition API (generated)
algolia/api-clients-automation#5651 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]>
1 parent 35eac29 commit 6e7ecae

File tree

1 file changed

+58
-53
lines changed

1 file changed

+58
-53
lines changed

packages/composition/model/params.ts

Lines changed: 58 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -11,64 +11,80 @@ import type { SupportedLanguage } from './supportedLanguage';
1111

1212
export type Params = {
1313
/**
14-
* Search query.
14+
* Whether this search will be included in Analytics.
1515
*/
16-
query?: string | undefined;
16+
analytics?: boolean | undefined;
1717

1818
/**
19-
* 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).
19+
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
2020
*/
21-
filters?: string | undefined;
21+
analyticsTags?: Array<string> | undefined;
2222

2323
/**
24-
* Page of search results to retrieve.
24+
* 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`.
2525
*/
26-
page?: number | undefined;
26+
aroundLatLng?: string | undefined;
2727

2828
/**
29-
* Whether the run response should include detailed ranking information.
29+
* Whether to obtain the coordinates from the request\'s IP address.
3030
*/
31-
getRankingInfo?: boolean | undefined;
31+
aroundLatLngViaIP?: boolean | undefined;
32+
33+
aroundRadius?: AroundRadius | undefined;
34+
35+
aroundPrecision?: AroundPrecision | undefined;
3236

3337
/**
34-
* 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.
38+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
3539
*/
36-
relevancyStrictness?: number | undefined;
37-
38-
facetFilters?: FacetFilters | undefined;
40+
clickAnalytics?: boolean | undefined;
3941

4042
/**
41-
* 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 `*`. To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](https://www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting).
43+
* Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
4244
*/
43-
facets?: Array<string> | undefined;
45+
enableABTest?: boolean | undefined;
4446

45-
optionalFilters?: OptionalFilters | undefined;
47+
/**
48+
* Whether to enable Personalization.
49+
*/
50+
enablePersonalization?: boolean | undefined;
4651

47-
numericFilters?: NumericFilters | undefined;
52+
/**
53+
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
54+
*/
55+
enableReRanking?: boolean | undefined;
4856

4957
/**
50-
* Number of hits per page.
58+
* Whether to enable composition rules.
5159
*/
52-
hitsPerPage?: number | undefined;
60+
enableRules?: boolean | undefined;
61+
62+
facetFilters?: FacetFilters | undefined;
5363

5464
/**
55-
* 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`.
65+
* 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 `*`. To retrieve disjunctive facets lists, annotate any facets with the `disjunctive` modifier. For more information, see [facets](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#contextual-facet-values-and-counts) and [disjunctive faceting for Smart Groups](https://www.algolia.com/doc/guides/managing-results/compositions/search-based-groups#facets-including-disjunctive-faceting).
5666
*/
57-
aroundLatLng?: string | undefined;
67+
facets?: Array<string> | undefined;
5868

5969
/**
60-
* Whether to obtain the coordinates from the request\'s IP address.
70+
* 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).
6171
*/
62-
aroundLatLngViaIP?: boolean | undefined;
72+
filters?: string | undefined;
6373

64-
aroundRadius?: AroundRadius | undefined;
74+
/**
75+
* Whether the run response should include detailed ranking information.
76+
*/
77+
getRankingInfo?: boolean | undefined;
6578

66-
aroundPrecision?: AroundPrecision | undefined;
79+
/**
80+
* Number of hits per page.
81+
*/
82+
hitsPerPage?: number | undefined;
6783

6884
/**
69-
* Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
85+
* A list of extenrally injected objectID groups into from an external source.
7086
*/
71-
minimumAroundRadius?: number | undefined;
87+
injectedItems?: { [key: string]: ExternalInjectedItem } | undefined;
7288

7389
insideBoundingBox?: InsideBoundingBox | null | undefined;
7490

@@ -78,57 +94,46 @@ export type Params = {
7894
insidePolygon?: Array<Array<number>> | undefined;
7995

8096
/**
81-
* 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).
97+
* Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
8298
*/
83-
queryLanguages?: Array<SupportedLanguage> | undefined;
99+
minimumAroundRadius?: number | undefined;
84100

85101
/**
86102
* 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`.
87103
*/
88104
naturalLanguages?: Array<SupportedLanguage> | undefined;
89105

90-
/**
91-
* Whether to enable composition rules.
92-
*/
93-
enableRules?: boolean | undefined;
94-
95-
/**
96-
* Assigns a rule context to the run 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.
97-
*/
98-
ruleContexts?: Array<string> | undefined;
106+
numericFilters?: NumericFilters | undefined;
99107

100-
/**
101-
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
102-
*/
103-
userToken?: string | undefined;
108+
optionalFilters?: OptionalFilters | undefined;
104109

105110
/**
106-
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/doc/guides/sending-events/getting-started).
111+
* Page of search results to retrieve.
107112
*/
108-
clickAnalytics?: boolean | undefined;
113+
page?: number | undefined;
109114

110115
/**
111-
* Whether this search will be included in Analytics.
116+
* Search query.
112117
*/
113-
analytics?: boolean | undefined;
118+
query?: string | undefined;
114119

115120
/**
116-
* Tags to apply to the query for [segmenting analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments).
121+
* 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.
117122
*/
118-
analyticsTags?: Array<string> | undefined;
123+
relevancyStrictness?: number | undefined;
119124

120125
/**
121-
* Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
126+
* 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).
122127
*/
123-
enableABTest?: boolean | undefined;
128+
queryLanguages?: Array<SupportedLanguage> | undefined;
124129

125130
/**
126-
* Whether this search will use [Dynamic Re-Ranking](https://www.algolia.com/doc/guides/algolia-ai/re-ranking) This setting only has an effect if you activated Dynamic Re-Ranking for this index in the Algolia dashboard.
131+
* Assigns a rule context to the run 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.
127132
*/
128-
enableReRanking?: boolean | undefined;
133+
ruleContexts?: Array<string> | undefined;
129134

130135
/**
131-
* A list of extenrally injected objectID groups into from an external source.
136+
* Unique pseudonymous or anonymous user identifier. This helps with analytics and click and conversion events. For more information, see [user token](https://www.algolia.com/doc/guides/sending-events/concepts/usertoken).
132137
*/
133-
injectedItems?: { [key: string]: ExternalInjectedItem } | undefined;
138+
userToken?: string | undefined;
134139
};

0 commit comments

Comments
 (0)