@algolia/client-search 5.50.2 → 5.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/node.d.ts CHANGED
@@ -544,6 +544,90 @@ type Hit<T = Record<string, unknown>> = T & {
544
544
  _distinctSeqID?: number | undefined;
545
545
  };
546
546
 
547
+ type AutoFilteringFilterEntry = string | Array<string>;
548
+
549
+ /**
550
+ * Result of automatic filtering applied by Query Categorization.
551
+ */
552
+ type AutoFilteringResult = {
553
+ /**
554
+ * Whether automatic filtering was applied to this query.
555
+ */
556
+ enabled?: boolean | undefined;
557
+ /**
558
+ * Maximum category hierarchy depth used for filtering.
559
+ */
560
+ maxDepth?: number | undefined;
561
+ /**
562
+ * Facet filters automatically applied to the query.
563
+ */
564
+ facetFilters?: Array<AutoFilteringFilterEntry> | undefined;
565
+ /**
566
+ * Optional filters automatically applied to boost relevant categories.
567
+ */
568
+ optionalFilters?: Array<AutoFilteringFilterEntry> | undefined;
569
+ };
570
+
571
+ /**
572
+ * Confidence level of the category prediction.
573
+ */
574
+ type CategoryPredictionBin = 'certain' | 'very high' | 'high' | 'low' | 'very low';
575
+
576
+ type HierarchyPathEntry = {
577
+ /**
578
+ * Facet attribute name at this hierarchy level, for example, `categories.lvl0`.
579
+ */
580
+ facetName?: string | undefined;
581
+ /**
582
+ * Facet value at this level of the category hierarchy.
583
+ */
584
+ facetValue?: string | undefined;
585
+ /**
586
+ * Depth level in the category hierarchy, starting at 0.
587
+ */
588
+ depth?: number | undefined;
589
+ };
590
+
591
+ type CategoryPrediction = {
592
+ bin?: CategoryPredictionBin | undefined;
593
+ /**
594
+ * Ordered list of category levels from root to the predicted category.
595
+ */
596
+ hierarchyPath?: Array<HierarchyPathEntry> | undefined;
597
+ };
598
+
599
+ /**
600
+ * Classification of the query scope.
601
+ */
602
+ type QueryCategorizationType = 'narrow' | 'broad' | 'ambiguous' | 'none';
603
+
604
+ /**
605
+ * Query Categorization prediction returned by the AI model. This field is empty when the model cannot categorize the query. See [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/).
606
+ */
607
+ type QueryCategorization = {
608
+ /**
609
+ * Processed and normalized version of the original search query.
610
+ */
611
+ normalizedQuery?: string | undefined;
612
+ /**
613
+ * Number of times this normalized query was observed during the training window.
614
+ */
615
+ count?: number | undefined;
616
+ type?: QueryCategorizationType | undefined;
617
+ /**
618
+ * List of category predictions with confidence levels.
619
+ */
620
+ categories?: Array<CategoryPrediction> | undefined;
621
+ autofiltering?: AutoFilteringResult | undefined;
622
+ };
623
+
624
+ /**
625
+ * AI-generated metadata returned alongside search results. Present when Algolia AI features such as [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/) are enabled.
626
+ */
627
+ type ResponseExtensions = {
628
+ queryCategorization?: QueryCategorization | undefined;
629
+ };
630
+
547
631
  type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
548
632
  /**
549
633
  * Search results (hits). Hits are records from your index that match the search criteria, augmented with additional attributes, such as, for highlighting.
@@ -557,6 +641,7 @@ type SearchHits<T = Record<string, unknown>> = Record<string, any> & {
557
641
  * URL-encoded string of all search parameters.
558
642
  */
559
643
  params?: string | undefined;
644
+ extensions?: ResponseExtensions | undefined;
560
645
  };
561
646
 
562
647
  type BrowseResponse<T = Record<string, unknown>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;
@@ -1718,6 +1803,27 @@ type SearchParams = SearchParamsString | SearchParamsObject;
1718
1803
 
1719
1804
  type SearchForFacets = SearchParams & SearchForFacetsOptions;
1720
1805
 
1806
+ /**
1807
+ * Parameters for the [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/) AI feature.
1808
+ */
1809
+ type SearchExtensionsQueryCategorization = {
1810
+ /**
1811
+ * Whether to retrieve category predictions in the response `extensions.queryCategorization` field.
1812
+ */
1813
+ enableCategoriesRetrieval?: boolean | undefined;
1814
+ /**
1815
+ * Whether to automatically apply category-based filters and boosts to search results.
1816
+ */
1817
+ enableAutoFiltering?: boolean | undefined;
1818
+ };
1819
+
1820
+ /**
1821
+ * Additional parameters for Algolia AI features. Used to enable [Query Categorization](https://www.algolia.com/doc/guides/algolia-ai/query-categorization/) and other AI-powered capabilities.
1822
+ */
1823
+ type SearchExtensions = {
1824
+ queryCategorization?: SearchExtensionsQueryCategorization | undefined;
1825
+ };
1826
+
1721
1827
  /**
1722
1828
  * - `default`: perform a search query - `facet` [searches for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1723
1829
  */
@@ -1729,6 +1835,7 @@ type SearchForHitsOptions = {
1729
1835
  */
1730
1836
  indexName: string;
1731
1837
  type?: SearchTypeDefault | undefined;
1838
+ extensions?: SearchExtensions | undefined;
1732
1839
  } & {
1733
1840
  facet?: never | undefined;
1734
1841
  maxFacetHits?: never | undefined;
@@ -2940,7 +3047,7 @@ type UpdateApiKeyProps = {
2940
3047
  type BrowseOptions<T> = Partial<Pick<CreateIterablePromise<T>, 'validate'>> & Required<Pick<CreateIterablePromise<T>, 'aggregator'>>;
2941
3048
  type WaitForOptions = Partial<{
2942
3049
  /**
2943
- * The maximum number of retries. 50 by default.
3050
+ * The maximum number of retries. 100 by default.
2944
3051
  */
2945
3052
  maxRetries: number;
2946
3053
  /**
@@ -3066,7 +3173,7 @@ type AccountCopyIndexOptions = {
3066
3173
  batchSize?: number | undefined;
3067
3174
  };
3068
3175
 
3069
- declare const apiClientVersion = "5.50.2";
3176
+ declare const apiClientVersion = "5.52.0";
3070
3177
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
3071
3178
  transporter: _algolia_client_common.Transporter;
3072
3179
  /**
@@ -3108,7 +3215,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3108
3215
  * @param waitForTaskOptions - The `waitForTaskOptions` object.
3109
3216
  * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
3110
3217
  * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
3111
- * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
3218
+ * @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
3112
3219
  * @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
3113
3220
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3114
3221
  */
@@ -3119,7 +3226,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3119
3226
  * @summary Helper method that waits for a task to be published (completed).
3120
3227
  * @param waitForAppTaskOptions - The `waitForTaskOptions` object.
3121
3228
  * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
3122
- * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
3229
+ * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
3123
3230
  * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
3124
3231
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
3125
3232
  */
@@ -3132,7 +3239,7 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3132
3239
  * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
3133
3240
  * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
3134
3241
  * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
3135
- * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.
3242
+ * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
3136
3243
  * @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
3137
3244
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
3138
3245
  */
@@ -3819,11 +3926,11 @@ declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption,
3819
3926
  */
3820
3927
  saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms }: SaveSynonymsProps, requestOptions?: RequestOptions): Promise<UpdatedAtResponse>;
3821
3928
  /**
3822
- * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.
3929
+ * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
3823
3930
  *
3824
3931
  * Required API Key ACLs:
3825
3932
  * - search
3826
- * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
3933
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
3827
3934
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
3828
3935
  */
3829
3936
  search<T>(searchMethodParams: SearchMethodParams | LegacySearchMethodProps, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
@@ -4023,4 +4130,4 @@ type SearchClient = ReturnType<typeof createSearchClient> & SearchClientNodeHelp
4023
4130
 
4024
4131
  declare function searchClient(appId: string, apiKey: string, options?: ClientOptions | undefined): SearchClient;
4025
4132
 
4026
- export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
4133
+ export { type AccountCopyIndexOptions, type Acl, type Action, type AddApiKeyResponse, type AddOrUpdateObjectProps, type AdvancedSyntaxFeatures, type AlternativesAsExact, type Anchoring, type ApiKey, type ApiKeyOperation, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AssignUserIdParams, type AssignUserIdProps, type AttributeToUpdate, type AutoFilteringFilterEntry, type AutoFilteringResult, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BatchAssignUserIdsParams, type BatchAssignUserIdsProps, type BatchDictionaryEntriesParams, type BatchDictionaryEntriesProps, type BatchDictionaryEntriesRequest, type BatchParams, type BatchProps, type BatchRequest, type BatchResponse, type BatchWriteParams, type BooleanString, type BrowseOptions, type BrowsePagination, type BrowseParams, type BrowseParamsObject, type BrowseProps, type BrowseResponse, type BuiltInOperation, type BuiltInOperationType, type BuiltInOperationValue, type CategoryPrediction, type CategoryPredictionBin, type ChunkedBatchOptions, type ClearObjectsProps, type ClearRulesProps, type ClearSynonymsProps, type Condition, type Consequence, type ConsequenceHide, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type ConsequenceRedirect, type CreatedAtResponse, type Cursor, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DeleteApiKeyProps, type DeleteApiKeyResponse, type DeleteByParams, type DeleteByProps, type DeleteIndexProps, type DeleteObjectProps, type DeleteObjectsOptions, type DeleteRuleProps, type DeleteSourceProps, type DeleteSourceResponse, type DeleteSynonymProps, type DeletedAtResponse, type DictionaryAction, type DictionaryEntry, type DictionaryEntryState, type DictionaryEntryType, type DictionaryLanguage, type DictionarySettingsParams, type DictionaryType, type Distinct, type Edit, type EditType, type ErrorBase, type Event, type EventStatus, type EventType, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type Facets, type FetchedIndex, type GenerateSecuredApiKeyOptions, type GetApiKeyProps, type GetApiKeyResponse, type GetAppTaskProps, type GetDictionarySettingsResponse, type GetLogsProps, type GetLogsResponse, type GetObjectProps, type GetObjectsParams, type GetObjectsRequest, type GetObjectsResponse, type GetRuleProps, type GetSecuredApiKeyRemainingValidityOptions, type GetSettingsProps, type GetSynonymProps, type GetTaskProps, type GetTaskResponse, type GetTopUserIdsResponse, type GetUserIdProps, type HasPendingMappingsProps, type HasPendingMappingsResponse, type HierarchyPathEntry, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type InsideBoundingBox, type Languages, type LegacySearchMethodProps, type ListApiKeysResponse, type ListClustersResponse, type ListIndicesProps, type ListIndicesResponse, type ListUserIdsProps, type ListUserIdsResponse, type Log, type LogQuery, type LogType, type MatchLevel, type MatchedGeoLocation, type Mode, type MultipleBatchRequest, type MultipleBatchResponse, type NumericFilters, type OperationIndexParams, type OperationIndexProps, type OperationType, type OptionalFilters, type OptionalWords, type Params, type PartialUpdateObjectProps, type PartialUpdateObjectsOptions, type Personalization, type Promote, type PromoteObjectID, type PromoteObjectIDs, type QueryCategorization, type QueryCategorizationType, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RemoveStopWords, type RemoveUserIdProps, type RemoveUserIdResponse, type RemoveWordsIfNoResults, type RenderingContent, type ReplaceAllObjectsOptions, type ReplaceAllObjectsResponse, type ReplaceAllObjectsWithTransformationResponse, type ReplaceSourceResponse, type ReplaceSourcesProps, type ResponseExtensions, type RestoreApiKeyProps, type Rule, type SaveObjectProps, type SaveObjectResponse, type SaveObjectsOptions, type SaveRuleProps, type SaveRulesProps, type SaveSynonymProps, type SaveSynonymResponse, type SaveSynonymsProps, type ScopeType, type SearchClient, type SearchClientNodeHelpers, type SearchDictionaryEntriesParams, type SearchDictionaryEntriesProps, type SearchDictionaryEntriesResponse, type SearchExtensions, type SearchExtensionsQueryCategorization, type SearchForFacetValuesProps, type SearchForFacetValuesRequest, type SearchForFacetValuesResponse, type SearchForFacets, type SearchForFacetsOptions, type SearchForHits, type SearchForHitsOptions, type SearchHits, type SearchMethodParams, type SearchPagination, type SearchParams, type SearchParamsObject, type SearchParamsQuery, type SearchParamsString, type SearchQuery, type SearchResponse, type SearchResponses, type SearchResult, type SearchRulesParams, type SearchRulesProps, type SearchRulesResponse, type SearchSingleIndexProps, type SearchStrategy, type SearchSynonymsParams, type SearchSynonymsProps, type SearchSynonymsResponse, type SearchTypeDefault, type SearchTypeFacet, type SearchUserIdsParams, type SearchUserIdsResponse, type SecuredApiKeyRestrictions, type SemanticSearch, type SetSettingsProps, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type Source, type StandardEntries, type SupportedLanguage, type SynonymHit, type SynonymType, type TagFilters, type TaskStatus, type TimeRange, type TypoTolerance, type TypoToleranceEnum, type UpdateApiKeyProps, type UpdateApiKeyResponse, type UpdatedAtResponse, type UpdatedAtWithObjectIdResponse, type UserHighlightResult, type UserHit, type UserId, type Value, type WaitForApiKeyOptions, type WaitForAppTaskOptions, type WaitForTaskOptions, type WatchResponse, type Widgets, type WithPrimary, apiClientVersion, searchClient };
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(searchClient_exports);
27
27
  var import_client_common = require("@algolia/client-common");
28
- var apiClientVersion = "5.50.2";
28
+ var apiClientVersion = "5.52.0";
29
29
  function getDefaultHosts(appId) {
30
30
  return [
31
31
  {
@@ -135,14 +135,14 @@ function createSearchClient({
135
135
  * @param waitForTaskOptions - The `waitForTaskOptions` object.
136
136
  * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
137
137
  * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
138
- * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
138
+ * @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
139
139
  * @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
140
140
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
141
141
  */
142
142
  waitForTask({
143
143
  indexName,
144
144
  taskID,
145
- maxRetries = 50,
145
+ maxRetries = 100,
146
146
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
147
147
  }, requestOptions) {
148
148
  let retryCount = 0;
@@ -152,7 +152,7 @@ function createSearchClient({
152
152
  aggregator: () => retryCount += 1,
153
153
  error: {
154
154
  validate: () => retryCount >= maxRetries,
155
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
155
+ message: () => `Stopped waiting for the task after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
156
156
  },
157
157
  timeout: () => timeout(retryCount)
158
158
  });
@@ -163,13 +163,13 @@ function createSearchClient({
163
163
  * @summary Helper method that waits for a task to be published (completed).
164
164
  * @param waitForAppTaskOptions - The `waitForTaskOptions` object.
165
165
  * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
166
- * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
166
+ * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
167
167
  * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
168
168
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
169
169
  */
170
170
  waitForAppTask({
171
171
  taskID,
172
- maxRetries = 50,
172
+ maxRetries = 100,
173
173
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
174
174
  }, requestOptions) {
175
175
  let retryCount = 0;
@@ -179,7 +179,7 @@ function createSearchClient({
179
179
  aggregator: () => retryCount += 1,
180
180
  error: {
181
181
  validate: () => retryCount >= maxRetries,
182
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
182
+ message: () => `Stopped waiting for the task after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
183
183
  },
184
184
  timeout: () => timeout(retryCount)
185
185
  });
@@ -192,7 +192,7 @@ function createSearchClient({
192
192
  * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
193
193
  * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
194
194
  * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
195
- * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.
195
+ * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
196
196
  * @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
197
197
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
198
198
  */
@@ -200,7 +200,7 @@ function createSearchClient({
200
200
  operation,
201
201
  key,
202
202
  apiKey,
203
- maxRetries = 50,
203
+ maxRetries = 100,
204
204
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
205
205
  }, requestOptions) {
206
206
  let retryCount = 0;
@@ -208,7 +208,7 @@ function createSearchClient({
208
208
  aggregator: () => retryCount += 1,
209
209
  error: {
210
210
  validate: () => retryCount >= maxRetries,
211
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
211
+ message: () => `Stopped waiting for the API key operation after ${maxRetries} retries. This does not mean the operation failed; it may still complete. If you need to keep polling, retry with a higher maxRetries.`
212
212
  },
213
213
  timeout: () => timeout(retryCount)
214
214
  };
@@ -2020,11 +2020,11 @@ function createSearchClient({
2020
2020
  return transporter.request(request, requestOptions);
2021
2021
  },
2022
2022
  /**
2023
- * Sends multiple search requests to one or more indices. This can be useful in these cases: - Different indices for different purposes, such as, one index for products, another one for marketing content. - Multiple searches to the same index—for example, with different filters. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.
2023
+ * Runs multiple search queries against one or more indices in a single API request. Use cases include: - Searching different indices, such as products and marketing content. - Run multiple queries on the same index with different parameters or filters. If you know the expected result type, use the `searchForHits` or `searchForFacets` helper to simplify the response format.
2024
2024
  *
2025
2025
  * Required API Key ACLs:
2026
2026
  * - search
2027
- * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
2027
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
2028
2028
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2029
2029
  */
2030
2030
  search(searchMethodParams, requestOptions) {