Skip to content

Commit 02ba561

Browse files
chore: generated code for commit 46c1526. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 46c1526 commit 02ba561

File tree

14 files changed

+275
-43
lines changed

14 files changed

+275
-43
lines changed

clients/algoliasearch-client-java-2/algoliasearch-core/src/main/java/com/algolia/api/SearchClient.java

Lines changed: 54 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5377,7 +5377,7 @@ public CompletableFuture<SearchForFacetValuesResponse> searchForFacetValuesAsync
53775377
* Search for rules matching various criteria.
53785378
*
53795379
* @param indexName The index in which to perform the request. (required)
5380-
* @param searchRulesParams (required)
5380+
* @param searchRulesParams (optional)
53815381
* @param requestOptions The requestOptions to send along with the query, they will be merged with
53825382
* the transporter requestOptions.
53835383
* @return SearchRulesResponse
@@ -5392,19 +5392,43 @@ public SearchRulesResponse searchRules(String indexName, SearchRulesParams searc
53925392
* Search for rules matching various criteria.
53935393
*
53945394
* @param indexName The index in which to perform the request. (required)
5395-
* @param searchRulesParams (required)
5395+
* @param searchRulesParams (optional)
53965396
* @return SearchRulesResponse
53975397
* @throws AlgoliaRuntimeException If it fails to process the API call
53985398
*/
53995399
public SearchRulesResponse searchRules(String indexName, SearchRulesParams searchRulesParams) throws AlgoliaRuntimeException {
54005400
return this.searchRules(indexName, searchRulesParams, null);
54015401
}
54025402

5403+
/**
5404+
* Search for rules matching various criteria.
5405+
*
5406+
* @param indexName The index in which to perform the request. (required)
5407+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
5408+
* the transporter requestOptions.
5409+
* @return SearchRulesResponse
5410+
* @throws AlgoliaRuntimeException If it fails to process the API call
5411+
*/
5412+
public SearchRulesResponse searchRules(String indexName, RequestOptions requestOptions) throws AlgoliaRuntimeException {
5413+
return this.searchRules(indexName, null, requestOptions);
5414+
}
5415+
5416+
/**
5417+
* Search for rules matching various criteria.
5418+
*
5419+
* @param indexName The index in which to perform the request. (required)
5420+
* @return SearchRulesResponse
5421+
* @throws AlgoliaRuntimeException If it fails to process the API call
5422+
*/
5423+
public SearchRulesResponse searchRules(String indexName) throws AlgoliaRuntimeException {
5424+
return this.searchRules(indexName, null, null);
5425+
}
5426+
54035427
/**
54045428
* (asynchronously) Search for rules matching various criteria.
54055429
*
54065430
* @param indexName The index in which to perform the request. (required)
5407-
* @param searchRulesParams (required)
5431+
* @param searchRulesParams (optional)
54085432
* @param requestOptions The requestOptions to send along with the query, they will be merged with
54095433
* the transporter requestOptions.
54105434
* @return CompletableFuture<SearchRulesResponse> The awaitable future
@@ -5419,11 +5443,7 @@ public CompletableFuture<SearchRulesResponse> searchRulesAsync(
54195443
throw new AlgoliaRuntimeException("Parameter `indexName` is required when calling `searchRules`.");
54205444
}
54215445

5422-
if (searchRulesParams == null) {
5423-
throw new AlgoliaRuntimeException("Parameter `searchRulesParams` is required when calling `searchRules`.");
5424-
}
5425-
5426-
Object bodyObj = searchRulesParams;
5446+
Object bodyObj = searchRulesParams != null ? searchRulesParams : new Object();
54275447

54285448
// create path and map variables
54295449
String requestPath = "/1/indexes/{indexName}/rules/search".replaceAll("\\{indexName\\}", this.escapeString(indexName.toString()));
@@ -5439,7 +5459,7 @@ public CompletableFuture<SearchRulesResponse> searchRulesAsync(
54395459
* (asynchronously) Search for rules matching various criteria.
54405460
*
54415461
* @param indexName The index in which to perform the request. (required)
5442-
* @param searchRulesParams (required)
5462+
* @param searchRulesParams (optional)
54435463
* @return CompletableFuture<SearchRulesResponse> The awaitable future
54445464
* @throws AlgoliaRuntimeException If it fails to process the API call
54455465
*/
@@ -5448,6 +5468,31 @@ public CompletableFuture<SearchRulesResponse> searchRulesAsync(String indexName,
54485468
return this.searchRulesAsync(indexName, searchRulesParams, null);
54495469
}
54505470

5471+
/**
5472+
* (asynchronously) Search for rules matching various criteria.
5473+
*
5474+
* @param indexName The index in which to perform the request. (required)
5475+
* @param requestOptions The requestOptions to send along with the query, they will be merged with
5476+
* the transporter requestOptions.
5477+
* @return CompletableFuture<SearchRulesResponse> The awaitable future
5478+
* @throws AlgoliaRuntimeException If it fails to process the API call
5479+
*/
5480+
public CompletableFuture<SearchRulesResponse> searchRulesAsync(String indexName, RequestOptions requestOptions)
5481+
throws AlgoliaRuntimeException {
5482+
return this.searchRulesAsync(indexName, null, requestOptions);
5483+
}
5484+
5485+
/**
5486+
* (asynchronously) Search for rules matching various criteria.
5487+
*
5488+
* @param indexName The index in which to perform the request. (required)
5489+
* @return CompletableFuture<SearchRulesResponse> The awaitable future
5490+
* @throws AlgoliaRuntimeException If it fails to process the API call
5491+
*/
5492+
public CompletableFuture<SearchRulesResponse> searchRulesAsync(String indexName) throws AlgoliaRuntimeException {
5493+
return this.searchRulesAsync(indexName, null, null);
5494+
}
5495+
54515496
/**
54525497
* Perform a search operation targeting one specific index.
54535498
*

clients/algoliasearch-client-javascript/packages/algoliasearch/lite/src/liteClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@ export function createLiteClient({
8989

9090
return {
9191
transporter,
92+
9293
/**
9394
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
9495
*/
9596
get _ua(): string {
9697
return transporter.algoliaAgent.value;
9798
},
99+
98100
/**
99101
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
100102
*
@@ -104,6 +106,7 @@ export function createLiteClient({
104106
addAlgoliaAgent(segment: string, version?: string): void {
105107
transporter.algoliaAgent.add({ segment, version });
106108
},
109+
107110
/**
108111
* This method allow you to send requests to the Algolia REST API.
109112
*

clients/algoliasearch-client-javascript/packages/client-abtesting/src/abtestingClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,14 @@ export function createAbtestingClient({
7373

7474
return {
7575
transporter,
76+
7677
/**
7778
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7879
*/
7980
get _ua(): string {
8081
return transporter.algoliaAgent.value;
8182
},
83+
8284
/**
8385
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
8486
*
@@ -88,6 +90,7 @@ export function createAbtestingClient({
8890
addAlgoliaAgent(segment: string, version?: string): void {
8991
transporter.algoliaAgent.add({ segment, version });
9092
},
93+
9194
/**
9295
* Creates a new A/B test with provided configuration. You can set an A/B test on two different indices with different settings, or on the same index with different search parameters by providing a customSearchParameters setting on one of the variants.
9396
*

clients/algoliasearch-client-javascript/packages/client-analytics/src/analyticsClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,14 @@ export function createAnalyticsClient({
9999

100100
return {
101101
transporter,
102+
102103
/**
103104
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
104105
*/
105106
get _ua(): string {
106107
return transporter.algoliaAgent.value;
107108
},
109+
108110
/**
109111
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
110112
*
@@ -114,6 +116,7 @@ export function createAnalyticsClient({
114116
addAlgoliaAgent(segment: string, version?: string): void {
115117
transporter.algoliaAgent.add({ segment, version });
116118
},
119+
117120
/**
118121
* This method allow you to send requests to the Algolia REST API.
119122
*

clients/algoliasearch-client-javascript/packages/client-insights/src/insightsClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,14 @@ export function createInsightsClient({
6767

6868
return {
6969
transporter,
70+
7071
/**
7172
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7273
*/
7374
get _ua(): string {
7475
return transporter.algoliaAgent.value;
7576
},
77+
7678
/**
7779
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
7880
*
@@ -82,6 +84,7 @@ export function createInsightsClient({
8284
addAlgoliaAgent(segment: string, version?: string): void {
8385
transporter.algoliaAgent.add({ segment, version });
8486
},
87+
8588
/**
8689
* This method allow you to send requests to the Algolia REST API.
8790
*

clients/algoliasearch-client-javascript/packages/client-personalization/src/personalizationClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ export function createPersonalizationClient({
7272

7373
return {
7474
transporter,
75+
7576
/**
7677
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
7778
*/
7879
get _ua(): string {
7980
return transporter.algoliaAgent.value;
8081
},
82+
8183
/**
8284
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
8385
*
@@ -87,6 +89,7 @@ export function createPersonalizationClient({
8789
addAlgoliaAgent(segment: string, version?: string): void {
8890
transporter.algoliaAgent.add({ segment, version });
8991
},
92+
9093
/**
9194
* This method allow you to send requests to the Algolia REST API.
9295
*

clients/algoliasearch-client-javascript/packages/client-query-suggestions/src/querySuggestionsClient.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ export function createQuerySuggestionsClient({
7676

7777
return {
7878
transporter,
79+
7980
/**
8081
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
8182
*/
8283
get _ua(): string {
8384
return transporter.algoliaAgent.value;
8485
},
86+
8587
/**
8688
* Adds a `segment` to the `x-algolia-agent` sent with every requests.
8789
*
@@ -91,6 +93,7 @@ export function createQuerySuggestionsClient({
9193
addAlgoliaAgent(segment: string, version?: string): void {
9294
transporter.algoliaAgent.add({ segment, version });
9395
},
96+
9497
/**
9598
* Create a configuration of a Query Suggestions index. There\'s a limit of 100 configurations per application.
9699
*

clients/algoliasearch-client-javascript/packages/client-search/model/clientMethodProps.ts

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
22

3-
import type { CreateRetryablePromiseOptions } from '@algolia/client-common';
3+
import type { CreateIterablePromise } from '@algolia/client-common';
44

55
import type { ApiKey } from './apiKey';
66
import type { AssignUserIdParams } from './assignUserIdParams';
@@ -661,7 +661,7 @@ export type SearchRulesProps = {
661661
* The index in which to perform the request.
662662
*/
663663
indexName: string;
664-
searchRulesParams: SearchRulesParams;
664+
searchRulesParams?: SearchRulesParams;
665665
};
666666

667667
/**
@@ -727,10 +727,28 @@ export type UpdateApiKeyProps = {
727727
apiKey: ApiKey;
728728
};
729729

730+
/**
731+
* The `browseObjects`, `browseRules`, `browseSynonyms` options.
732+
*/
733+
export type BrowseOptions<T> = Partial<
734+
Pick<CreateIterablePromise<T>, 'validate'>
735+
> &
736+
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
737+
730738
type WaitForOptions<T> = Omit<
731-
CreateRetryablePromiseOptions<T>,
732-
'func' | 'validate'
733-
>;
739+
CreateIterablePromise<T>,
740+
'func' | 'timeout' | 'validate'
741+
> & {
742+
/**
743+
* The maximum number of retries. 50 by default.
744+
*/
745+
maxRetries: number;
746+
747+
/**
748+
* The function to decide how long to wait between retries.
749+
*/
750+
timeout: (retryCount: number) => number;
751+
};
734752

735753
export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
736754
/**

0 commit comments

Comments
 (0)