@algolia/client-search 5.50.1 → 5.51.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/fetch.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.1";
3176
+ declare const apiClientVersion = "5.51.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
  */
@@ -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 };
package/dist/node.d.cts 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.1";
3176
+ declare const apiClientVersion = "5.51.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
  */
@@ -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 };
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.1";
3176
+ declare const apiClientVersion = "5.51.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
  */
@@ -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 };