@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/README.md CHANGED
@@ -40,11 +40,11 @@ All of our clients comes with type definition, and are available for both browse
40
40
  ### With a package manager
41
41
 
42
42
  ```bash
43
- yarn add @algolia/client-search@5.50.2
43
+ yarn add @algolia/client-search@5.52.0
44
44
  # or
45
- npm install @algolia/client-search@5.50.2
45
+ npm install @algolia/client-search@5.52.0
46
46
  # or
47
- pnpm add @algolia/client-search@5.50.2
47
+ pnpm add @algolia/client-search@5.52.0
48
48
  ```
49
49
 
50
50
  ### Without a package manager
@@ -52,7 +52,7 @@ pnpm add @algolia/client-search@5.50.2
52
52
  Add the following JavaScript snippet to the <head> of your website:
53
53
 
54
54
  ```html
55
- <script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.50.2/dist/builds/browser.umd.js"></script>
55
+ <script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.52.0/dist/builds/browser.umd.js"></script>
56
56
  ```
57
57
 
58
58
  ### Usage
package/dist/browser.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>>;
@@ -4022,4 +4129,4 @@ type ReplaceAllObjectsWithTransformationResponse = {
4022
4129
  declare function searchClient(appId: string, apiKey: string, options?: ClientOptions | undefined): SearchClient;
4023
4130
  type SearchClient = ReturnType<typeof createSearchClient>;
4024
4131
 
4025
- 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 };
4132
+ 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 };
@@ -16,7 +16,7 @@ import {
16
16
  getAlgoliaAgent,
17
17
  shuffle
18
18
  } from "@algolia/client-common";
19
- var apiClientVersion = "5.50.2";
19
+ var apiClientVersion = "5.52.0";
20
20
  function getDefaultHosts(appId) {
21
21
  return [
22
22
  {
@@ -126,14 +126,14 @@ function createSearchClient({
126
126
  * @param waitForTaskOptions - The `waitForTaskOptions` object.
127
127
  * @param waitForTaskOptions.indexName - The `indexName` where the operation was performed.
128
128
  * @param waitForTaskOptions.taskID - The `taskID` returned in the method response.
129
- * @param waitForTaskOptions.maxRetries - The maximum number of retries. 50 by default.
129
+ * @param waitForTaskOptions.maxRetries - The maximum number of retries. 100 by default.
130
130
  * @param waitForTaskOptions.timeout - The function to decide how long to wait between retries.
131
131
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
132
132
  */
133
133
  waitForTask({
134
134
  indexName,
135
135
  taskID,
136
- maxRetries = 50,
136
+ maxRetries = 100,
137
137
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
138
138
  }, requestOptions) {
139
139
  let retryCount = 0;
@@ -143,7 +143,7 @@ function createSearchClient({
143
143
  aggregator: () => retryCount += 1,
144
144
  error: {
145
145
  validate: () => retryCount >= maxRetries,
146
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
146
+ 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.`
147
147
  },
148
148
  timeout: () => timeout(retryCount)
149
149
  });
@@ -154,13 +154,13 @@ function createSearchClient({
154
154
  * @summary Helper method that waits for a task to be published (completed).
155
155
  * @param waitForAppTaskOptions - The `waitForTaskOptions` object.
156
156
  * @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
157
- * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
157
+ * @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 100 by default.
158
158
  * @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
159
159
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
160
160
  */
161
161
  waitForAppTask({
162
162
  taskID,
163
- maxRetries = 50,
163
+ maxRetries = 100,
164
164
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
165
165
  }, requestOptions) {
166
166
  let retryCount = 0;
@@ -170,7 +170,7 @@ function createSearchClient({
170
170
  aggregator: () => retryCount += 1,
171
171
  error: {
172
172
  validate: () => retryCount >= maxRetries,
173
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
173
+ 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.`
174
174
  },
175
175
  timeout: () => timeout(retryCount)
176
176
  });
@@ -183,7 +183,7 @@ function createSearchClient({
183
183
  * @param waitForApiKeyOptions.operation - The `operation` that was done on a `key`.
184
184
  * @param waitForApiKeyOptions.key - The `key` that has been added, deleted or updated.
185
185
  * @param waitForApiKeyOptions.apiKey - Necessary to know if an `update` operation has been processed, compare fields of the response with it.
186
- * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 50 by default.
186
+ * @param waitForApiKeyOptions.maxRetries - The maximum number of retries. 100 by default.
187
187
  * @param waitForApiKeyOptions.timeout - The function to decide how long to wait between retries.
188
188
  * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getApikey` method and merged with the transporter requestOptions.
189
189
  */
@@ -191,7 +191,7 @@ function createSearchClient({
191
191
  operation,
192
192
  key,
193
193
  apiKey,
194
- maxRetries = 50,
194
+ maxRetries = 100,
195
195
  timeout = (retryCount) => Math.min(retryCount * 200, 5e3)
196
196
  }, requestOptions) {
197
197
  let retryCount = 0;
@@ -199,7 +199,7 @@ function createSearchClient({
199
199
  aggregator: () => retryCount += 1,
200
200
  error: {
201
201
  validate: () => retryCount >= maxRetries,
202
- message: () => `The maximum number of retries exceeded. (${retryCount}/${maxRetries})`
202
+ 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.`
203
203
  },
204
204
  timeout: () => timeout(retryCount)
205
205
  };
@@ -2011,11 +2011,11 @@ function createSearchClient({
2011
2011
  return transporter.request(request, requestOptions);
2012
2012
  },
2013
2013
  /**
2014
- * 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.
2014
+ * 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.
2015
2015
  *
2016
2016
  * Required API Key ACLs:
2017
2017
  * - search
2018
- * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.
2018
+ * @param searchMethodParams - Multi-query search request body. Results are returned in the same order as the requests.
2019
2019
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
2020
2020
  */
2021
2021
  search(searchMethodParams, requestOptions) {