Skip to content

Commit a652168

Browse files
chore: generated code for commit 22bf1c39. [skip ci]
algolia/api-clients-automation@22bf1c3 Co-authored-by: algolia-bot <[email protected]> Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 5f86924 commit a652168

File tree

4 files changed

+23
-10
lines changed

4 files changed

+23
-10
lines changed

packages/client-search/model/clientMethodProps.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import type { SearchForHitsOptions } from './searchForHitsOptions';
2323
import type { SearchParams } from './searchParams';
2424
import type { SearchParamsObject } from './searchParamsObject';
2525
import type { SearchRulesParams } from './searchRulesParams';
26+
import type { SearchSynonymsParams } from './searchSynonymsParams';
2627
import type { Source } from './source';
2728
import type { SynonymHit } from './synonymHit';
2829
import type { SynonymType } from './synonymType';
@@ -682,10 +683,6 @@ export type SearchSynonymsProps = {
682683
* The index in which to perform the request.
683684
*/
684685
indexName: string;
685-
/**
686-
* Search for specific synonyms matching this string.
687-
*/
688-
query?: string;
689686
/**
690687
* Only search for specific types of synonyms.
691688
*/
@@ -698,6 +695,10 @@ export type SearchSynonymsProps = {
698695
* Maximum number of objects to retrieve.
699696
*/
700697
hitsPerPage?: number;
698+
/**
699+
* The body of the the `searchSynonyms` method.
700+
*/
701+
searchSynonymsParams?: SearchSynonymsParams;
701702
};
702703

703704
/**

packages/client-search/model/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ export * from './searchResponses';
124124
export * from './searchRulesParams';
125125
export * from './searchRulesResponse';
126126
export * from './searchStrategy';
127+
export * from './searchSynonymsParams';
127128
export * from './searchSynonymsResponse';
128129
export * from './searchTypeDefault';
129130
export * from './searchTypeFacet';
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
2+
3+
export type SearchSynonymsParams = {
4+
/**
5+
* The text to search in the index.
6+
*/
7+
query?: string;
8+
};

packages/client-search/src/searchClient.ts

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2534,14 +2534,20 @@ export function createSearchClient({
25342534
* @summary Search synonyms.
25352535
* @param searchSynonyms - The searchSynonyms object.
25362536
* @param searchSynonyms.indexName - The index in which to perform the request.
2537-
* @param searchSynonyms.query - Search for specific synonyms matching this string.
25382537
* @param searchSynonyms.type - Only search for specific types of synonyms.
25392538
* @param searchSynonyms.page - Requested page (zero-based). When specified, will retrieve a specific page; the page size is implicitly set to 100. When null, will retrieve all indices (no pagination).
25402539
* @param searchSynonyms.hitsPerPage - Maximum number of objects to retrieve.
2540+
* @param searchSynonyms.searchSynonymsParams - The body of the the `searchSynonyms` method.
25412541
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
25422542
*/
25432543
searchSynonyms(
2544-
{ indexName, query, type, page, hitsPerPage }: SearchSynonymsProps,
2544+
{
2545+
indexName,
2546+
type,
2547+
page,
2548+
hitsPerPage,
2549+
searchSynonymsParams,
2550+
}: SearchSynonymsProps,
25452551
requestOptions?: RequestOptions
25462552
): Promise<SearchSynonymsResponse> {
25472553
if (!indexName) {
@@ -2557,10 +2563,6 @@ export function createSearchClient({
25572563
const headers: Headers = {};
25582564
const queryParameters: QueryParameters = {};
25592565

2560-
if (query !== undefined) {
2561-
queryParameters.query = query.toString();
2562-
}
2563-
25642566
if (type !== undefined) {
25652567
queryParameters.type = type.toString();
25662568
}
@@ -2578,6 +2580,7 @@ export function createSearchClient({
25782580
path: requestPath,
25792581
queryParameters,
25802582
headers,
2583+
data: searchSynonymsParams,
25812584
useReadTransporter: true,
25822585
cacheable: true,
25832586
};

0 commit comments

Comments
 (0)