@algolia/client-search 5.4.0 → 5.4.3

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
@@ -595,6 +595,10 @@ type BaseSearchResponse = Record<string, any> & {
595
595
  * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
596
596
  */
597
597
  queryID?: string;
598
+ /**
599
+ * Whether automatic events collection is enabled for the application.
600
+ */
601
+ _automaticInsights?: boolean;
598
602
  };
599
603
 
600
604
  /**
@@ -992,7 +996,7 @@ type HighlightResultOption = {
992
996
  fullyHighlighted?: boolean;
993
997
  };
994
998
 
995
- type HighlightResult = HighlightResultOption | HighlightResultOption[] | Record<string, HighlightResultOption> | {
999
+ type HighlightResult = HighlightResult[] | HighlightResultOption | {
996
1000
  [key: string]: HighlightResult;
997
1001
  };
998
1002
 
@@ -1089,7 +1093,7 @@ type SnippetResultOption = {
1089
1093
  matchLevel: MatchLevel;
1090
1094
  };
1091
1095
 
1092
- type SnippetResult = Record<string, SnippetResultOption> | SnippetResultOption | SnippetResultOption[] | {
1096
+ type SnippetResult = SnippetResult[] | SnippetResultOption | {
1093
1097
  [key: string]: SnippetResult;
1094
1098
  };
1095
1099
 
@@ -1922,19 +1926,19 @@ type SearchPagination = {
1922
1926
  /**
1923
1927
  * Page of search results to retrieve.
1924
1928
  */
1925
- page: number;
1929
+ page?: number;
1926
1930
  /**
1927
1931
  * Number of results (hits).
1928
1932
  */
1929
- nbHits: number;
1933
+ nbHits?: number;
1930
1934
  /**
1931
1935
  * Number of pages of results.
1932
1936
  */
1933
- nbPages: number;
1937
+ nbPages?: number;
1934
1938
  /**
1935
1939
  * Number of hits per page.
1936
1940
  */
1937
- hitsPerPage: number;
1941
+ hitsPerPage?: number;
1938
1942
  };
1939
1943
 
1940
1944
  type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
@@ -2976,7 +2980,7 @@ type ReplaceAllObjectsOptions = {
2976
2980
  batchSize?: number;
2977
2981
  };
2978
2982
 
2979
- declare const apiClientVersion = "5.4.0";
2983
+ declare const apiClientVersion = "5.4.3";
2980
2984
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2981
2985
  transporter: _algolia_client_common.Transporter;
2982
2986
  /**
package/dist/node.d.cts CHANGED
@@ -595,6 +595,10 @@ type BaseSearchResponse = Record<string, any> & {
595
595
  * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
596
596
  */
597
597
  queryID?: string;
598
+ /**
599
+ * Whether automatic events collection is enabled for the application.
600
+ */
601
+ _automaticInsights?: boolean;
598
602
  };
599
603
 
600
604
  /**
@@ -992,7 +996,7 @@ type HighlightResultOption = {
992
996
  fullyHighlighted?: boolean;
993
997
  };
994
998
 
995
- type HighlightResult = HighlightResultOption | HighlightResultOption[] | Record<string, HighlightResultOption> | {
999
+ type HighlightResult = HighlightResult[] | HighlightResultOption | {
996
1000
  [key: string]: HighlightResult;
997
1001
  };
998
1002
 
@@ -1089,7 +1093,7 @@ type SnippetResultOption = {
1089
1093
  matchLevel: MatchLevel;
1090
1094
  };
1091
1095
 
1092
- type SnippetResult = Record<string, SnippetResultOption> | SnippetResultOption | SnippetResultOption[] | {
1096
+ type SnippetResult = SnippetResult[] | SnippetResultOption | {
1093
1097
  [key: string]: SnippetResult;
1094
1098
  };
1095
1099
 
@@ -1922,19 +1926,19 @@ type SearchPagination = {
1922
1926
  /**
1923
1927
  * Page of search results to retrieve.
1924
1928
  */
1925
- page: number;
1929
+ page?: number;
1926
1930
  /**
1927
1931
  * Number of results (hits).
1928
1932
  */
1929
- nbHits: number;
1933
+ nbHits?: number;
1930
1934
  /**
1931
1935
  * Number of pages of results.
1932
1936
  */
1933
- nbPages: number;
1937
+ nbPages?: number;
1934
1938
  /**
1935
1939
  * Number of hits per page.
1936
1940
  */
1937
- hitsPerPage: number;
1941
+ hitsPerPage?: number;
1938
1942
  };
1939
1943
 
1940
1944
  type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
@@ -2976,7 +2980,7 @@ type ReplaceAllObjectsOptions = {
2976
2980
  batchSize?: number;
2977
2981
  };
2978
2982
 
2979
- declare const apiClientVersion = "5.4.0";
2983
+ declare const apiClientVersion = "5.4.3";
2980
2984
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2981
2985
  transporter: _algolia_client_common.Transporter;
2982
2986
  /**
package/dist/node.d.ts CHANGED
@@ -595,6 +595,10 @@ type BaseSearchResponse = Record<string, any> & {
595
595
  * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).
596
596
  */
597
597
  queryID?: string;
598
+ /**
599
+ * Whether automatic events collection is enabled for the application.
600
+ */
601
+ _automaticInsights?: boolean;
598
602
  };
599
603
 
600
604
  /**
@@ -992,7 +996,7 @@ type HighlightResultOption = {
992
996
  fullyHighlighted?: boolean;
993
997
  };
994
998
 
995
- type HighlightResult = HighlightResultOption | HighlightResultOption[] | Record<string, HighlightResultOption> | {
999
+ type HighlightResult = HighlightResult[] | HighlightResultOption | {
996
1000
  [key: string]: HighlightResult;
997
1001
  };
998
1002
 
@@ -1089,7 +1093,7 @@ type SnippetResultOption = {
1089
1093
  matchLevel: MatchLevel;
1090
1094
  };
1091
1095
 
1092
- type SnippetResult = Record<string, SnippetResultOption> | SnippetResultOption | SnippetResultOption[] | {
1096
+ type SnippetResult = SnippetResult[] | SnippetResultOption | {
1093
1097
  [key: string]: SnippetResult;
1094
1098
  };
1095
1099
 
@@ -1922,19 +1926,19 @@ type SearchPagination = {
1922
1926
  /**
1923
1927
  * Page of search results to retrieve.
1924
1928
  */
1925
- page: number;
1929
+ page?: number;
1926
1930
  /**
1927
1931
  * Number of results (hits).
1928
1932
  */
1929
- nbHits: number;
1933
+ nbHits?: number;
1930
1934
  /**
1931
1935
  * Number of pages of results.
1932
1936
  */
1933
- nbPages: number;
1937
+ nbPages?: number;
1934
1938
  /**
1935
1939
  * Number of hits per page.
1936
1940
  */
1937
- hitsPerPage: number;
1941
+ hitsPerPage?: number;
1938
1942
  };
1939
1943
 
1940
1944
  type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
@@ -2976,7 +2980,7 @@ type ReplaceAllObjectsOptions = {
2976
2980
  batchSize?: number;
2977
2981
  };
2978
2982
 
2979
- declare const apiClientVersion = "5.4.0";
2983
+ declare const apiClientVersion = "5.4.3";
2980
2984
  declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
2981
2985
  transporter: _algolia_client_common.Transporter;
2982
2986
  /**
@@ -25,7 +25,7 @@ __export(searchClient_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(searchClient_exports);
27
27
  var import_client_common = require("@algolia/client-common");
28
- var apiClientVersion = "5.4.0";
28
+ var apiClientVersion = "5.4.3";
29
29
  function getDefaultHosts(appId) {
30
30
  return [
31
31
  {