Skip to content

Commit 07c302b

Browse files
chore: generated code for commit 9753e2d. [skip ci]
Co-authored-by: Clément Vannicatte <[email protected]>
1 parent 9753e2d commit 07c302b

File tree

2 files changed

+7
-12
lines changed

2 files changed

+7
-12
lines changed

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

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParam
1010
import type { BatchWriteParams } from './batchWriteParams';
1111
import type { BrowseRequest } from './browseRequest';
1212
import type { DictionaryType } from './dictionaryType';
13-
import type { GetApiKeyResponse } from './getApiKeyResponse';
14-
import type { GetTaskResponse } from './getTaskResponse';
1513
import type { IndexSettings } from './indexSettings';
1614
import type { LogType } from './logType';
1715
import type { OperationIndexParams } from './operationIndexParams';
@@ -733,10 +731,7 @@ export type BrowseOptions<T> = Partial<
733731
> &
734732
Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
735733

736-
type WaitForOptions<T> = Omit<
737-
CreateIterablePromise<T>,
738-
'func' | 'timeout' | 'validate'
739-
> & {
734+
type WaitForOptions = Partial<{
740735
/**
741736
* The maximum number of retries. 50 by default.
742737
*/
@@ -746,9 +741,9 @@ type WaitForOptions<T> = Omit<
746741
* The function to decide how long to wait between retries.
747742
*/
748743
timeout: (retryCount: number) => number;
749-
};
744+
}>;
750745

751-
export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
746+
export type WaitForTaskOptions = WaitForOptions & {
752747
/**
753748
* The `indexName` where the operation was performed.
754749
*/
@@ -759,7 +754,7 @@ export type WaitForTaskOptions = WaitForOptions<GetTaskResponse> & {
759754
taskID: number;
760755
};
761756

762-
export type WaitForApiKeyOptions = WaitForOptions<GetApiKeyResponse> & {
757+
export type WaitForApiKeyOptions = WaitForOptions & {
763758
/**
764759
* The API Key.
765760
*/

clients/algoliasearch-client-javascript/packages/client-search/src/searchClient.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ export function createSearchClient({
335335
* @param browseObjects - The browseObjects object.
336336
* @param browseObjects.indexName - The index in which to perform the request.
337337
* @param browseObjects.browseRequest - The `browse` method parameters.
338-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
338+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is no `cursor` in the response.
339339
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
340340
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `browse` method and merged with the transporter requestOptions.
341341
*/
@@ -372,7 +372,7 @@ export function createSearchClient({
372372
* @param browseObjects - The browseObjects object.
373373
* @param browseObjects.indexName - The index in which to perform the request.
374374
* @param browseObjects.searchRulesParams - The `searchRules` method parameters.
375-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
375+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
376376
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
377377
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchRules` method and merged with the transporter requestOptions.
378378
*/
@@ -415,7 +415,7 @@ export function createSearchClient({
415415
* @summary Helper method that iterates on the `searchSynonyms` method.
416416
* @param browseObjects - The browseObjects object.
417417
* @param browseObjects.indexName - The index in which to perform the request.
418-
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call.
418+
* @param browseObjects.validate - The validator function. It receive the resolved return of the API call. By default, stops when there is less hits returned than the number of maximum hits (1000).
419419
* @param browseObjects.aggregator - The function that runs right after the API call has been resolved, allows you to do anything with the response before `validate`.
420420
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
421421
*/

0 commit comments

Comments
 (0)