Skip to content

Commit 694141f

Browse files
algolia-botmillotp
andcommitted
fix(specs): add getVersion parameter to getSettings (generated)
algolia/api-clients-automation#5254 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Pierre Millot <[email protected]>
1 parent e5be827 commit 694141f

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

packages/client-search/model/clientMethodProps.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,10 @@ export type GetSettingsProps = {
393393
* Name of the index on which to perform the operation.
394394
*/
395395
indexName: string;
396+
/**
397+
* When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
398+
*/
399+
getVersion?: number | undefined;
396400
};
397401

398402
/**

packages/client-search/src/searchClient.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1792,9 +1792,13 @@ export function createSearchClient({
17921792
* - settings
17931793
* @param getSettings - The getSettings object.
17941794
* @param getSettings.indexName - Name of the index on which to perform the operation.
1795+
* @param getSettings.getVersion - When set to 2, the endpoint will not include `synonyms` in the response. This parameter is here for backward compatibility.
17951796
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
17961797
*/
1797-
getSettings({ indexName }: GetSettingsProps, requestOptions?: RequestOptions): Promise<SettingsResponse> {
1798+
getSettings(
1799+
{ indexName, getVersion }: GetSettingsProps,
1800+
requestOptions?: RequestOptions,
1801+
): Promise<SettingsResponse> {
17981802
if (!indexName) {
17991803
throw new Error('Parameter `indexName` is required when calling `getSettings`.');
18001804
}
@@ -1803,6 +1807,10 @@ export function createSearchClient({
18031807
const headers: Headers = {};
18041808
const queryParameters: QueryParameters = {};
18051809

1810+
if (getVersion !== undefined) {
1811+
queryParameters['getVersion'] = getVersion.toString();
1812+
}
1813+
18061814
const request: Request = {
18071815
method: 'GET',
18081816
path: requestPath,

0 commit comments

Comments
 (0)