Skip to content

Commit f865501

Browse files
algolia-botClaraMullershortcuts
committed
refactor(specs): add interface to manipulate query parameter between composition API & Search API (generated)
algolia/api-clients-automation#5123 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clara Muller <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent cc98c44 commit f865501

File tree

8 files changed

+243
-510
lines changed

8 files changed

+243
-510
lines changed

packages/client-composition/model/baseInjectionQueryParameters.ts

Lines changed: 222 additions & 0 deletions
Large diffs are not rendered by default.

packages/client-composition/model/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export * from './banner';
1111
export * from './bannerImage';
1212
export * from './bannerImageUrl';
1313
export * from './bannerLink';
14+
export * from './baseInjectionQueryParameters';
1415
export * from './baseSearchResponse';
1516
export * from './batchCompositionAction';
1617
export * from './batchParams';
@@ -50,7 +51,6 @@ export * from './ignorePlurals';
5051
export * from './injectedItem';
5152
export * from './injectedItemSource';
5253
export * from './injectedItemSourceSearch';
53-
export * from './injectedItemsQueryParameters';
5454
export * from './injection';
5555
export * from './insideBoundingBox';
5656
export * from './listCompositionsResponse';
@@ -62,7 +62,6 @@ export * from './multipleBatchRequest';
6262
export * from './multipleBatchResponse';
6363
export * from './numericFilters';
6464
export * from './optionalFilters';
65-
export * from './optionalWords';
6665
export * from './params';
6766
export * from './personalization';
6867
export * from './queryType';
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
// 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.
22

3-
import type { InjectedItemsQueryParameters } from './injectedItemsQueryParameters';
3+
import type { BaseInjectionQueryParameters } from './baseInjectionQueryParameters';
44

55
export type InjectedItemSourceSearch = {
66
/**
77
* Composition Main Index name.
88
*/
99
index: string;
1010

11-
params?: InjectedItemsQueryParameters | undefined;
11+
params?: BaseInjectionQueryParameters | undefined;
1212
};

packages/client-composition/model/injectedItemsQueryParameters.ts

Lines changed: 0 additions & 225 deletions
This file was deleted.

packages/client-composition/model/mainInjectionQueryParameters.ts

Lines changed: 2 additions & 259 deletions
Large diffs are not rendered by default.

packages/client-composition/model/optionalWords.ts

Lines changed: 0 additions & 6 deletions
This file was deleted.

packages/client-composition/model/params.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type Params = {
2525
page?: number | undefined;
2626

2727
/**
28-
* Whether the search response should include detailed ranking information.
28+
* Whether the run response should include detailed ranking information.
2929
*/
3030
getRankingInfo?: boolean | undefined;
3131

@@ -69,22 +69,22 @@ export type Params = {
6969
insidePolygon?: Array<Array<number>> | undefined;
7070

7171
/**
72-
* 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/).
72+
* 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/).
7373
*/
7474
queryLanguages?: Array<SupportedLanguage> | undefined;
7575

7676
/**
77-
* 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`.
77+
* 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`.
7878
*/
7979
naturalLanguages?: Array<SupportedLanguage> | undefined;
8080

8181
/**
82-
* Whether to enable rules.
82+
* Whether to enable composition rules.
8383
*/
8484
enableRules?: boolean | undefined;
8585

8686
/**
87-
* 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.
87+
* 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.
8888
*/
8989
ruleContexts?: Array<string> | undefined;
9090

@@ -94,7 +94,7 @@ export type Params = {
9494
userToken?: string | undefined;
9595

9696
/**
97-
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
97+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
9898
*/
9999
clickAnalytics?: boolean | undefined;
100100

@@ -109,12 +109,12 @@ export type Params = {
109109
analyticsTags?: Array<string> | undefined;
110110

111111
/**
112-
* Whether to enable A/B testing for this search.
112+
* Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
113113
*/
114114
enableABTest?: boolean | undefined;
115115

116116
/**
117-
* 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.
117+
* 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.
118118
*/
119119
enableReRanking?: boolean | undefined;
120120
};

packages/composition/model/params.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export type Params = {
2525
page?: number | undefined;
2626

2727
/**
28-
* Whether the search response should include detailed ranking information.
28+
* Whether the run response should include detailed ranking information.
2929
*/
3030
getRankingInfo?: boolean | undefined;
3131

@@ -69,22 +69,22 @@ export type Params = {
6969
insidePolygon?: Array<Array<number>> | undefined;
7070

7171
/**
72-
* 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/).
72+
* 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/).
7373
*/
7474
queryLanguages?: Array<SupportedLanguage> | undefined;
7575

7676
/**
77-
* 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`.
77+
* 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`.
7878
*/
7979
naturalLanguages?: Array<SupportedLanguage> | undefined;
8080

8181
/**
82-
* Whether to enable rules.
82+
* Whether to enable composition rules.
8383
*/
8484
enableRules?: boolean | undefined;
8585

8686
/**
87-
* 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.
87+
* 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.
8888
*/
8989
ruleContexts?: Array<string> | undefined;
9090

@@ -94,7 +94,7 @@ export type Params = {
9494
userToken?: string | undefined;
9595

9696
/**
97-
* Whether to include a `queryID` attribute in the response. The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
97+
* Whether to include a `queryID` attribute in the response The query ID is a unique identifier for a search query and is required for tracking [click and conversion events](https://www.algolia.com/guides/sending-events/getting-started/).
9898
*/
9999
clickAnalytics?: boolean | undefined;
100100

@@ -109,12 +109,12 @@ export type Params = {
109109
analyticsTags?: Array<string> | undefined;
110110

111111
/**
112-
* Whether to enable A/B testing for this search.
112+
* Whether to enable index level A/B testing for this run request. If the composition mixes multiple indices, the A/B test is ignored.
113113
*/
114114
enableABTest?: boolean | undefined;
115115

116116
/**
117-
* 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.
117+
* 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.
118118
*/
119119
enableReRanking?: boolean | undefined;
120120
};

0 commit comments

Comments
 (0)