algoliasearch 5.14.0 → 5.14.2

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
@@ -16,7 +16,7 @@ export * from '@algolia/client-query-suggestions';
16
16
  export { Region as QuerySuggestionsRegion, RegionOptions as QuerySuggestionsRegionOptions } from '@algolia/client-query-suggestions';
17
17
  import { SearchClient } from '@algolia/client-search';
18
18
  export * from '@algolia/client-search';
19
- export { Action, AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, Banner, BannerImage, BannerImageUrl, BannerLink, BaseIndexSettings, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteSourceProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, GetTaskProps, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, Languages, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchPagination, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, Source, SupportedLanguage, TagFilters, TaskStatus, TimeRange, TypoTolerance, TypoToleranceEnum, Value, Widgets, apiClientVersion } from '@algolia/client-search';
19
+ export { Action, AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, Banner, BannerImage, BannerImageUrl, BannerLink, BaseIndexSettings, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, BooleanString, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteSourceProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, FacetStats, Facets, GetTaskProps, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, InsideBoundingBox, Languages, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, OptionalWords, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, Range, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexData, RedirectRuleIndexMetadata, RedirectURL, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchPagination, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, Source, SupportedLanguage, TagFilters, TaskStatus, TimeRange, TypoTolerance, TypoToleranceEnum, Value, Widgets, apiClientVersion } from '@algolia/client-search';
20
20
  import { Region as Region$3, RegionOptions as RegionOptions$3, IngestionClient } from '@algolia/ingestion';
21
21
  export * from '@algolia/ingestion';
22
22
  export { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';
package/dist/fetch.js CHANGED
@@ -19,7 +19,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau
19
19
  // builds/fetch.ts
20
20
  var fetch_exports = {};
21
21
  __export(fetch_exports, {
22
- algoliasearch: () => algoliasearch
22
+ algoliasearch: () => algoliasearch,
23
+ apiClientVersion: () => apiClientVersion
23
24
  });
24
25
  import { abtestingClient } from "@algolia/client-abtesting";
25
26
  import { analyticsClient } from "@algolia/client-analytics";
@@ -33,6 +34,9 @@ import { recommendClient } from "@algolia/recommend";
33
34
 
34
35
  // builds/models.ts
35
36
  var models_exports = {};
37
+ __export(models_exports, {
38
+ apiClientVersion: () => apiClientVersion
39
+ });
36
40
  __reExport(models_exports, client_abtesting_star);
37
41
  __reExport(models_exports, client_analytics_star);
38
42
  __reExport(models_exports, client_insights_star);
@@ -42,7 +46,7 @@ __reExport(models_exports, client_search_star);
42
46
  __reExport(models_exports, ingestion_star);
43
47
  __reExport(models_exports, monitoring_star);
44
48
  __reExport(models_exports, recommend_star);
45
- import "@algolia/client-search";
49
+ import { apiClientVersion } from "@algolia/client-search";
46
50
  import * as client_abtesting_star from "@algolia/client-abtesting";
47
51
  import * as client_analytics_star from "@algolia/client-analytics";
48
52
  import * as client_insights_star from "@algolia/client-insights";
@@ -128,6 +132,7 @@ function algoliasearch(appId, apiKey, options) {
128
132
  };
129
133
  }
130
134
  export {
131
- algoliasearch
135
+ algoliasearch,
136
+ apiClientVersion
132
137
  };
133
138
  //# sourceMappingURL=fetch.js.map
package/dist/fetch.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../builds/fetch.ts","../builds/models.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport type { AbtestingClient } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport type { InsightsClient } from '@algolia/client-insights';\nimport { insightsClient } from '@algolia/client-insights';\nimport type { PersonalizationClient } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';\nimport { querySuggestionsClient } from '@algolia/client-query-suggestions';\nimport type { SearchClient } from '@algolia/client-search';\nimport { searchClient } from '@algolia/client-search';\nimport type { IngestionClient } from '@algolia/ingestion';\nimport { ingestionClient } from '@algolia/ingestion';\nimport type { MonitoringClient } from '@algolia/monitoring';\nimport { monitoringClient } from '@algolia/monitoring';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\n\nimport type {\n AbtestingRegionOptions,\n AnalyticsRegionOptions,\n IngestionRegionOptions,\n InitClientOptions,\n InsightsRegionOptions,\n PersonalizationRegionOptions,\n QuerySuggestionsRegionOptions,\n} from './models';\n\nexport * from './models';\n\nexport type Algoliasearch = SearchClient & {\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;\n initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;\n initRecommend: (initOptions?: InitClientOptions) => RecommendClient;\n};\n\nexport function algoliasearch(appId: string, apiKey: string, options?: ClientOptions): Algoliasearch {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const client = searchClient(appId, apiKey, options);\n\n return {\n ...client,\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return client.transporter.algoliaAgent.value;\n },\n\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initMonitoring: (initOptions: InitClientOptions = {}): MonitoringClient => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initRecommend: (initOptions: InitClientOptions = {}): RecommendClient => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';\nimport type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';\nimport type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';\nimport type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';\n\nimport type {\n Region as PersonalizationRegion,\n RegionOptions as PersonalizationRegionOptions,\n} from '@algolia/client-personalization';\nimport type {\n Region as QuerySuggestionsRegion,\n RegionOptions as QuerySuggestionsRegionOptions,\n} from '@algolia/client-query-suggestions';\n\nimport type { Status } from '@algolia/client-abtesting';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type { EventType } from '@algolia/client-personalization';\nimport type {\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n} from '@algolia/client-search';\nimport { apiClientVersion } from '@algolia/client-search';\n\ntype Region =\n | AbtestingRegion\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\ntype RegionOptions =\n | AbtestingRegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport * from '@algolia/client-abtesting';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-insights';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-query-suggestions';\nexport * from '@algolia/client-search';\nexport * from '@algolia/ingestion';\nexport * from '@algolia/monitoring';\nexport * from '@algolia/recommend';\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n AnalyticsRegion,\n AnalyticsRegionOptions,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n EventType,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n IngestionRegion,\n IngestionRegionOptions,\n InsightsRegion,\n InsightsRegionOptions,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\n Mode,\n NumericFilters,\n OptionalFilters,\n Params,\n Personalization,\n PersonalizationRegion,\n PersonalizationRegionOptions,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QuerySuggestionsRegion,\n QuerySuggestionsRegionOptions,\n QueryType,\n Range,\n RankingInfo,\n ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n Region,\n RegionOptions,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n Status,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n apiClientVersion,\n};\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAKA,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAE/B,SAAS,6BAA6B;AAEtC,SAAS,8BAA8B;AAEvC,SAAS,oBAAoB;AAE7B,SAAS,uBAAuB;AAEhC,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;;;ACrBhC;AA0HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAzBA,OAAiC;AAiBjC,uCAAc;AACd,uCAAc;AACd,sCAAc;AACd,6CAAc;AACd,+CAAc;AACd,oCAAc;AACd,gCAAc;AACd,iCAAc;AACd,gCAAc;;;ADjGd,0BAAc;AAaP,SAAS,cAAc,OAAe,QAAgB,SAAwC;AACnG,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC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uB;AACvE,aAAO,gBAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../builds/fetch.ts","../builds/models.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport type { AbtestingClient } from '@algolia/client-abtesting';\nimport { abtestingClient } from '@algolia/client-abtesting';\nimport type { AnalyticsClient } from '@algolia/client-analytics';\nimport { analyticsClient } from '@algolia/client-analytics';\nimport type { InsightsClient } from '@algolia/client-insights';\nimport { insightsClient } from '@algolia/client-insights';\nimport type { PersonalizationClient } from '@algolia/client-personalization';\nimport { personalizationClient } from '@algolia/client-personalization';\nimport type { QuerySuggestionsClient } from '@algolia/client-query-suggestions';\nimport { querySuggestionsClient } from '@algolia/client-query-suggestions';\nimport type { SearchClient } from '@algolia/client-search';\nimport { searchClient } from '@algolia/client-search';\nimport type { IngestionClient } from '@algolia/ingestion';\nimport { ingestionClient } from '@algolia/ingestion';\nimport type { MonitoringClient } from '@algolia/monitoring';\nimport { monitoringClient } from '@algolia/monitoring';\nimport type { RecommendClient } from '@algolia/recommend';\nimport { recommendClient } from '@algolia/recommend';\n\nimport type {\n AbtestingRegionOptions,\n AnalyticsRegionOptions,\n IngestionRegionOptions,\n InitClientOptions,\n InsightsRegionOptions,\n PersonalizationRegionOptions,\n QuerySuggestionsRegionOptions,\n} from './models';\n\nexport * from './models';\n\nexport type Algoliasearch = SearchClient & {\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions) => AbtestingClient;\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions) => AnalyticsClient;\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions) => IngestionClient;\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions) => InsightsClient;\n initMonitoring: (initOptions?: InitClientOptions) => MonitoringClient;\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions) => PersonalizationClient;\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions) => QuerySuggestionsClient;\n initRecommend: (initOptions?: InitClientOptions) => RecommendClient;\n};\n\nexport function algoliasearch(appId: string, apiKey: string, options?: ClientOptions): Algoliasearch {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n const client = searchClient(appId, apiKey, options);\n\n return {\n ...client,\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return client.transporter.algoliaAgent.value;\n },\n\n initAbtesting: (initOptions: InitClientOptions & AbtestingRegionOptions): AbtestingClient => {\n return abtestingClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initAnalytics: (initOptions: InitClientOptions & AnalyticsRegionOptions): AnalyticsClient => {\n return analyticsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initIngestion: (initOptions: InitClientOptions & IngestionRegionOptions): IngestionClient => {\n return ingestionClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initInsights: (initOptions: InitClientOptions & InsightsRegionOptions): InsightsClient => {\n return insightsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initMonitoring: (initOptions: InitClientOptions = {}): MonitoringClient => {\n return monitoringClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n\n initPersonalization: (initOptions: InitClientOptions & PersonalizationRegionOptions): PersonalizationClient => {\n return personalizationClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initQuerySuggestions: (initOptions: InitClientOptions & QuerySuggestionsRegionOptions): QuerySuggestionsClient => {\n return querySuggestionsClient(\n initOptions.appId || appId,\n initOptions.apiKey || apiKey,\n initOptions.region,\n initOptions.options,\n );\n },\n\n initRecommend: (initOptions: InitClientOptions = {}): RecommendClient => {\n return recommendClient(initOptions.appId || appId, initOptions.apiKey || apiKey, initOptions.options);\n },\n };\n}\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type { Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions } from '@algolia/client-abtesting';\nimport type { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions } from '@algolia/client-analytics';\nimport type { Region as InsightsRegion, RegionOptions as InsightsRegionOptions } from '@algolia/client-insights';\nimport type { Region as IngestionRegion, RegionOptions as IngestionRegionOptions } from '@algolia/ingestion';\n\nimport type {\n Region as PersonalizationRegion,\n RegionOptions as PersonalizationRegionOptions,\n} from '@algolia/client-personalization';\nimport type {\n Region as QuerySuggestionsRegion,\n RegionOptions as QuerySuggestionsRegionOptions,\n} from '@algolia/client-query-suggestions';\n\nimport type { Status } from '@algolia/client-abtesting';\nimport type { ClientOptions } from '@algolia/client-common';\nimport type { EventType } from '@algolia/client-personalization';\nimport type {\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n DeleteSourceProps,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchedGeoLocation,\n MatchLevel,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n ReRankingApplyFilter,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n} from '@algolia/client-search';\nimport { apiClientVersion } from '@algolia/client-search';\n\nexport * from '@algolia/client-abtesting';\nexport * from '@algolia/client-analytics';\nexport * from '@algolia/client-insights';\nexport * from '@algolia/client-personalization';\nexport * from '@algolia/client-query-suggestions';\nexport * from '@algolia/client-search';\nexport * from '@algolia/ingestion';\nexport * from '@algolia/monitoring';\nexport * from '@algolia/recommend';\n\nexport type Region =\n | AbtestingRegion\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AnalyticsRegion,\n AnalyticsRegionOptions,\n EventType,\n IngestionRegion,\n IngestionRegionOptions,\n InsightsRegion,\n InsightsRegionOptions,\n PersonalizationRegion,\n PersonalizationRegionOptions,\n QuerySuggestionsRegion,\n QuerySuggestionsRegionOptions,\n Status,\n};\n\nexport type {\n Action,\n AdvancedSyntaxFeatures,\n AlternativesAsExact,\n Anchoring,\n AroundPrecision,\n AroundRadius,\n AroundRadiusAll,\n AutomaticFacetFilter,\n AutomaticFacetFilters,\n Banner,\n BannerImage,\n BannerImageUrl,\n BannerLink,\n BaseIndexSettings,\n BaseSearchParams,\n BaseSearchParamsWithoutQuery,\n BaseSearchResponse,\n BooleanString,\n Condition,\n Consequence,\n ConsequenceHide,\n ConsequenceParams,\n ConsequenceQuery,\n ConsequenceQueryObject,\n CustomDeleteProps,\n CustomGetProps,\n CustomPostProps,\n CustomPutProps,\n DeletedAtResponse,\n DeleteSourceProps,\n Distinct,\n Edit,\n EditType,\n ErrorBase,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetOrdering,\n Facets,\n FacetStats,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchedGeoLocation,\n MatchLevel,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n Params,\n Personalization,\n Promote,\n PromoteObjectID,\n PromoteObjectIDs,\n QueryType,\n Range,\n RankingInfo,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n ReRankingApplyFilter,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Widgets,\n};\n\nexport { apiClientVersion };\n\n/**\n * Options forwarded to the client initialized via the `init` method.\n */\nexport type InitClientOptions = Partial<{\n /**\n * App to target with the initialized client, defaults to the `algoliasearch` appId.\n */\n appId: string;\n /**\n * API key of the targeted app ID, defaults to the `algoliasearch` apiKey.\n */\n apiKey: string;\n options: ClientOptions;\n}>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,SAAS,uBAAuB;AAEhC,SAAS,uBAAuB;AAEhC,SAAS,sBAAsB;AAE/B,SAAS,6BAA6B;AAEtC,SAAS,8BAA8B;AAEvC,SAAS,oBAAoB;AAE7B,SAAS,uBAAuB;AAEhC,SAAS,wBAAwB;AAEjC,SAAS,uBAAuB;;;ACrBhC;AAAA;AAAA;AAAA;AA6GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAVA,SAAS,wBAAwB;AAEjC,uCAAc;AACd,uCAAc;AACd,sCAAc;AACd,6CAAc;AACd,+CAAc;AACd,oCAAc;AACd,gCAAc;AACd,iCAAc;AACd,gCAAc;;;ADpFd,0BAAc;AAaP,SAAS,cAAc,OAAe,QAAgB,SAAwC;AACnG,MAAI,CAAC,SAAS,OAAO,UAAU,UAAU;AACvC,UAAM,IAAI,MAAM,qBAAqB;AAAA,EACvC;AAEA,MAAI,CAAC,UAAU,OAAO,WAAW,UAAU;AACzC,UAAM,IAAI,MAAM,sBAAsB;AAAA,EACxC;AAEA,QAAM,SAAS,aAAa,OAAO,QAAQ,OAAO;AAElD,SAAO;AAAA,IACL,GAAG;AAAA;AAAA;AAAA;AAAA,IAKH,IAAI,MAAc;AAChB,aAAO,OAAO,YAAY,aAAa;AAAA,IACzC;AAAA,IAEA,eAAe,CAAC,gBAA6E;AAC3F,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,eAAe,CAAC,gBAA6E;AAC3F,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,eAAe,CAAC,gBAA6E;AAC3F,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,cAAc,CAAC,gBAA2E;AACxF,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,gBAAgB,CAAC,cAAiC,CAAC,MAAwB;AACzE,aAAO,iBAAiB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACvG;AAAA,IAEA,qBAAqB,CAAC,gBAAyF;AAC7G,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,sBAAsB,CAAC,gBAA2F;AAChH,aAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,eAAe,CAAC,cAAiC,CAAC,MAAuB;AACvE,aAAO,gBAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
@@ -35,6 +35,8 @@ type AroundRadius = number | AroundRadiusAll;
35
35
  */
36
36
  type FacetFilters = Array<FacetFilters> | string;
37
37
 
38
+ type InsideBoundingBox = string | Array<Array<number>>;
39
+
38
40
  /**
39
41
  * Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
40
42
  */
@@ -98,10 +100,7 @@ type BaseRecommendSearchParams = {
98
100
  * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
99
101
  */
100
102
  minimumAroundRadius?: number;
101
- /**
102
- * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
103
- */
104
- insideBoundingBox?: Array<Array<number>>;
103
+ insideBoundingBox?: InsideBoundingBox | null;
105
104
  /**
106
105
  * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
107
106
  */
@@ -225,6 +224,10 @@ type BaseIndexSettings = {
225
224
  * Attribute that should be used to establish groups of results. Attribute names are case-sensitive. All records with the same value for this attribute are considered a group. You can combine `attributeForDistinct` with the `distinct` search parameter to control how many items per group are included in the search results. If you want to use the same attribute also for faceting, use the `afterDistinct` modifier of the `attributesForFaceting` setting. This applies faceting _after_ deduplication, which will result in accurate facet counts.
226
225
  */
227
226
  attributeForDistinct?: string;
227
+ /**
228
+ * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
229
+ */
230
+ maxFacetHits?: number;
228
231
  };
229
232
 
230
233
  type AdvancedSyntaxFeatures = 'exactPhrase' | 'excludeWords';
@@ -248,6 +251,8 @@ type BooleanString = 'true' | 'false';
248
251
  */
249
252
  type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;
250
253
 
254
+ type OptionalWords = string | Array<string>;
255
+
251
256
  /**
252
257
  * Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
253
258
  */
@@ -452,10 +457,7 @@ type BaseRecommendIndexSettings = {
452
457
  * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
453
458
  */
454
459
  advancedSyntax?: boolean;
455
- /**
456
- * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
457
- */
458
- optionalWords?: Array<string>;
460
+ optionalWords?: OptionalWords | null;
459
461
  /**
460
462
  * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
461
463
  */
@@ -482,10 +484,6 @@ type BaseRecommendIndexSettings = {
482
484
  * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI.
483
485
  */
484
486
  responseFields?: Array<string>;
485
- /**
486
- * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
487
- */
488
- maxFacetHits?: number;
489
487
  /**
490
488
  * Maximum number of facet values to return for each facet.
491
489
  */
@@ -572,18 +570,6 @@ type LookingSimilar = {
572
570
 
573
571
  type LookingSimilarQuery = BaseRecommendRequest & LookingSimilar;
574
572
 
575
- /**
576
- * \"Recommened for you\" model.
577
- */
578
- type RecommendedForYouModel = 'recommended-for-you';
579
-
580
- type RecommendedForYou = {
581
- model: RecommendedForYouModel;
582
- fallbackParameters?: FallbackParams;
583
- };
584
-
585
- type RecommendedForYouQuery = BaseRecommendRequest & RecommendedForYou;
586
-
587
573
  /**
588
574
  * Related products or similar content model. This model recommends items that are similar to the item with the ID `objectID`. Similarity is determined from the user interactions and attributes.
589
575
  */
@@ -636,7 +622,7 @@ type TrendingItems = {
636
622
 
637
623
  type TrendingItemsQuery = BaseRecommendRequest & TrendingItems;
638
624
 
639
- type RecommendationsRequest = BoughtTogetherQuery | RelatedQuery | TrendingItemsQuery | TrendingFacetsQuery | LookingSimilarQuery | RecommendedForYouQuery;
625
+ type RecommendationsRequest = BoughtTogetherQuery | RelatedQuery | TrendingItemsQuery | TrendingFacetsQuery | LookingSimilarQuery;
640
626
 
641
627
  /**
642
628
  * Recommend request body.
@@ -1113,10 +1099,7 @@ type BaseSearchParamsWithoutQuery = {
1113
1099
  * Minimum radius (in meters) for a search around a location when `aroundRadius` isn\'t set.
1114
1100
  */
1115
1101
  minimumAroundRadius?: number;
1116
- /**
1117
- * Coordinates for a rectangular area in which to search. Each bounding box is defined by the two opposite points of its diagonal, and expressed as latitude and longitude pair: `[p1 lat, p1 long, p2 lat, p2 long]`. Provide multiple bounding boxes as nested arrays. For more information, see [rectangular area](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas).
1118
- */
1119
- insideBoundingBox?: Array<Array<number>>;
1102
+ insideBoundingBox?: InsideBoundingBox | null;
1120
1103
  /**
1121
1104
  * Coordinates of a polygon in which to search. Polygons are defined by 3 to 10,000 points. Each point is represented by its latitude and longitude. Provide multiple polygons as nested arrays. For more information, see [filtering inside polygons](https://www.algolia.com/doc/guides/managing-results/refine-results/geolocation/#filtering-inside-rectangular-or-polygonal-areas). This parameter is ignored if you also specify `insideBoundingBox`.
1122
1105
  */
@@ -1276,10 +1259,7 @@ type IndexSettingsAsSearchParams = {
1276
1259
  * Whether to support phrase matching and excluding words from search queries. Use the `advancedSyntaxFeatures` parameter to control which feature is supported.
1277
1260
  */
1278
1261
  advancedSyntax?: boolean;
1279
- /**
1280
- * Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
1281
- */
1282
- optionalWords?: Array<string>;
1262
+ optionalWords?: OptionalWords | null;
1283
1263
  /**
1284
1264
  * Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
1285
1265
  */
@@ -1306,10 +1286,6 @@ type IndexSettingsAsSearchParams = {
1306
1286
  * Properties to include in the API response of `search` and `browse` requests. By default, all response properties are included. To reduce the response size, you can select, which attributes should be included. You can\'t exclude these properties: `message`, `warning`, `cursor`, `serverUsed`, `indexUsed`, `abTestVariantID`, `parsedQuery`, or any property triggered by the `getRankingInfo` parameter. Don\'t exclude properties that you might need in your search UI.
1307
1287
  */
1308
1288
  responseFields?: Array<string>;
1309
- /**
1310
- * Maximum number of facet values to return when [searching for facet values](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/#search-for-facet-values).
1311
- */
1312
- maxFacetHits?: number;
1313
1289
  /**
1314
1290
  * Maximum number of facet values to return for each facet.
1315
1291
  */
@@ -1510,7 +1486,7 @@ type LegacySearchQuery = LegacySearchForFacets | LegacySearchForHits;
1510
1486
  */
1511
1487
  type LegacySearchMethodProps = LegacySearchQuery[];
1512
1488
 
1513
- declare const apiClientVersion = "5.14.0";
1489
+ declare const apiClientVersion = "5.14.2";
1514
1490
  declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1515
1491
  transporter: _algolia_client_common.Transporter;
1516
1492
  /**
@@ -1770,4 +1746,4 @@ type SettingsResponse = IndexSettings & WithPrimary;
1770
1746
  declare function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient;
1771
1747
  type LiteClient = ReturnType<typeof createLiteClient>;
1772
1748
 
1773
- export { type Acl, type AdvancedSyntaxFeatures, type AlternativesAsExact, type ApiKey, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseRecommendIndexSettings, type BaseRecommendRequest, type BaseRecommendSearchParams, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BooleanString, type BoughtTogetherQuery, type BrowsePagination, type BrowseParamsObject, type BrowseResponse, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type Cursor, type CustomPostProps, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type FallbackParams, type FbtModel, type FrequentlyBoughtTogether, type GetApiKeyResponse, type GetRecommendationsParams, type GetRecommendationsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type IndexSettingsFacets, type LegacyGetRecommendationsParams, type LegacySearchMethodProps, type LiteClient, type LookingSimilar, type LookingSimilarModel, type LookingSimilarQuery, type MatchLevel, type MatchedGeoLocation, type Mode, type NumericFilters, type OptionalFilters, type Params, type Personalization, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type RecommendHit, type RecommendIndexSettings, type RecommendSearchParams, type RecommendationsHit, type RecommendationsHits, type RecommendationsRequest, type RecommendationsResults, type RecommendedForYou, type RecommendedForYouModel, type RecommendedForYouQuery, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RelatedModel, type RelatedProducts, type RelatedQuery, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, 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 SearchStrategy, type SearchTypeDefault, type SearchTypeFacet, type SemanticSearch, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TagFilters, type TrendingFacetHit, type TrendingFacets, type TrendingFacetsModel, type TrendingFacetsQuery, type TrendingItems, type TrendingItemsModel, type TrendingItemsQuery, type TypoTolerance, type TypoToleranceEnum, type Value, type Widgets, type WithPrimary, apiClientVersion, liteClient };
1749
+ export { type Acl, type AdvancedSyntaxFeatures, type AlternativesAsExact, type ApiKey, type AroundPrecision, type AroundRadius, type AroundRadiusAll, type AutomaticFacetFilter, type AutomaticFacetFilters, type Banner, type BannerImage, type BannerImageUrl, type BannerLink, type BaseGetApiKeyResponse, type BaseIndexSettings, type BaseRecommendIndexSettings, type BaseRecommendRequest, type BaseRecommendSearchParams, type BaseSearchParams, type BaseSearchParamsWithoutQuery, type BaseSearchResponse, type BooleanString, type BoughtTogetherQuery, type BrowsePagination, type BrowseParamsObject, type BrowseResponse, type ConsequenceParams, type ConsequenceQuery, type ConsequenceQueryObject, type Cursor, type CustomPostProps, type Distinct, type Edit, type EditType, type ErrorBase, type ExactOnSingleWordQuery, type Exhaustive, type FacetFilters, type FacetHits, type FacetOrdering, type FacetStats, type FallbackParams, type FbtModel, type FrequentlyBoughtTogether, type GetApiKeyResponse, type GetRecommendationsParams, type GetRecommendationsResponse, type HighlightResult, type HighlightResultOption, type Hit, type IgnorePlurals, type IndexSettings, type IndexSettingsAsSearchParams, type IndexSettingsFacets, type InsideBoundingBox, type LegacyGetRecommendationsParams, type LegacySearchMethodProps, type LiteClient, type LookingSimilar, type LookingSimilarModel, type LookingSimilarQuery, type MatchLevel, type MatchedGeoLocation, type Mode, type NumericFilters, type OptionalFilters, type OptionalWords, type Params, type Personalization, type QueryType, type Range, type RankingInfo, type ReRankingApplyFilter, type RecommendHit, type RecommendIndexSettings, type RecommendSearchParams, type RecommendationsHit, type RecommendationsHits, type RecommendationsRequest, type RecommendationsResults, type Redirect, type RedirectRuleIndexData, type RedirectRuleIndexMetadata, type RedirectURL, type RelatedModel, type RelatedProducts, type RelatedQuery, type RemoveStopWords, type RemoveWordsIfNoResults, type RenderingContent, 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 SearchStrategy, type SearchTypeDefault, type SearchTypeFacet, type SemanticSearch, type SettingsResponse, type SnippetResult, type SnippetResultOption, type SortRemainingBy, type SupportedLanguage, type TagFilters, type TrendingFacetHit, type TrendingFacets, type TrendingFacetsModel, type TrendingFacetsQuery, type TrendingItems, type TrendingItemsModel, type TrendingItemsQuery, type TypoTolerance, type TypoToleranceEnum, type Value, type Widgets, type WithPrimary, apiClientVersion, liteClient };
@@ -12,7 +12,7 @@ import {
12
12
 
13
13
  // lite/src/liteClient.ts
14
14
  import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from "@algolia/client-common";
15
- var apiClientVersion = "5.14.0";
15
+ var apiClientVersion = "5.14.2";
16
16
  function getDefaultHosts(appId) {
17
17
  return [
18
18
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../lite/builds/browser.ts","../../../lite/src/liteClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n} from '@algolia/client-common';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { apiClientVersion, createLiteClient } from '../src/liteClient';\n\nexport { apiClientVersion } from '../src/liteClient';\n\nexport * from '../model';\n\nexport function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n return createLiteClient({\n appId,\n apiKey,\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_BROWSER,\n read: DEFAULT_READ_TIMEOUT_BROWSER,\n write: DEFAULT_WRITE_TIMEOUT_BROWSER,\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: 'Browser' }],\n authMode: 'WithinQueryParameters',\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],\n }),\n ...options,\n });\n}\n\nexport type LiteClient = ReturnType<typeof createLiteClient>;\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { GetRecommendationsParams } from '../model/getRecommendationsParams';\nimport type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';\nimport type { SearchMethodParams } from '../model/searchMethodParams';\nimport type { SearchResponses } from '../model/searchResponses';\n\nimport type {\n CustomPostProps,\n LegacyGetRecommendationsParams,\n LegacySearchMethodProps,\n} from '../model/clientMethodProps';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nexport const apiClientVersion = '5.14.0';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createLiteClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Lite',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `hits`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForHits<T>(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions,\n ): Promise<{ results: Array<SearchResponse<T>> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array<SearchResponse<T>> }>;\n },\n\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `facets`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacets(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Required API Key ACLs:\n * - search\n * @param getRecommendationsParams - The getRecommendationsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendations(\n getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,\n requestOptions?: RequestOptions,\n ): Promise<GetRecommendationsResponse> {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest: GetRecommendationsParams = {\n requests: getRecommendationsParams,\n };\n\n getRecommendationsParams = newSignatureRequest;\n }\n\n if (!getRecommendationsParams) {\n throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');\n }\n\n if (!getRecommendationsParams.requests) {\n throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');\n }\n\n const requestPath = '/1/indexes/*/recommendations';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * 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.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n searchMethodParams: SearchMethodParams | LegacySearchMethodProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponses<T>> {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest: SearchMethodParams = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === 'facet') {\n return {\n ...legacyRequest,\n ...params,\n type: 'facet',\n };\n }\n\n return {\n ...legacyRequest,\n ...params,\n facet: undefined,\n maxFacetHits: undefined,\n facetQuery: undefined,\n };\n }),\n };\n\n searchMethodParams = newSignatureRequest;\n }\n\n if (!searchMethodParams) {\n throw new Error('Parameter `searchMethodParams` is required when calling `search`.');\n }\n\n if (!searchMethodParams.requests) {\n throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.');\n }\n\n const requestPath = '/1/indexes/*/queries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAEA,SAAS,0BAA0B;AAEnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACFP,SAAS,YAAY,mBAAmB,iBAAiB,eAAe;AAgBjE,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,iBAAiB;AAAA,EAC/B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA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;AAAA,IACA,QAAQ,iBAAiB;AAAA,IACzB,WAAW,mBAAmB;AAAA,IAC9B,eAAe,CAAC,EAAE,SAAS,UAAU,CAAC;AAAA,IACtC,UAAU;AAAA,IACV,gBAAgB,kBAAkB;AAAA,IAClC,eAAe,kBAAkB,EAAE,cAAc,MAAM,CAAC;AAAA,IACxD,YAAY,wBAAwB;AAAA,MAClC,QAAQ,CAAC,+BAA+B,EAAE,KAAK,GAAG,gBAAgB,IAAI,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC;AAAA,IACvG,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
1
+ {"version":3,"sources":["../../../lite/builds/browser.ts","../../../lite/src/liteClient.ts"],"sourcesContent":["// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport { createXhrRequester } from '@algolia/requester-browser-xhr';\n\nimport {\n createBrowserLocalStorageCache,\n createFallbackableCache,\n createMemoryCache,\n createNullLogger,\n DEFAULT_CONNECT_TIMEOUT_BROWSER,\n DEFAULT_READ_TIMEOUT_BROWSER,\n DEFAULT_WRITE_TIMEOUT_BROWSER,\n} from '@algolia/client-common';\n\nimport type { ClientOptions } from '@algolia/client-common';\n\nimport { apiClientVersion, createLiteClient } from '../src/liteClient';\n\nexport { apiClientVersion } from '../src/liteClient';\n\nexport * from '../model';\n\nexport function liteClient(appId: string, apiKey: string, options?: ClientOptions): LiteClient {\n if (!appId || typeof appId !== 'string') {\n throw new Error('`appId` is missing.');\n }\n\n if (!apiKey || typeof apiKey !== 'string') {\n throw new Error('`apiKey` is missing.');\n }\n\n return createLiteClient({\n appId,\n apiKey,\n timeouts: {\n connect: DEFAULT_CONNECT_TIMEOUT_BROWSER,\n read: DEFAULT_READ_TIMEOUT_BROWSER,\n write: DEFAULT_WRITE_TIMEOUT_BROWSER,\n },\n logger: createNullLogger(),\n requester: createXhrRequester(),\n algoliaAgents: [{ segment: 'Browser' }],\n authMode: 'WithinQueryParameters',\n responsesCache: createMemoryCache(),\n requestsCache: createMemoryCache({ serializable: false }),\n hostsCache: createFallbackableCache({\n caches: [createBrowserLocalStorageCache({ key: `${apiClientVersion}-${appId}` }), createMemoryCache()],\n }),\n ...options,\n });\n}\n\nexport type LiteClient = ReturnType<typeof createLiteClient>;\n","// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.\n\nimport type {\n CreateClientOptions,\n Headers,\n Host,\n QueryParameters,\n Request,\n RequestOptions,\n} from '@algolia/client-common';\nimport { createAuth, createTransporter, getAlgoliaAgent, shuffle } from '@algolia/client-common';\n\nimport type { GetRecommendationsParams } from '../model/getRecommendationsParams';\nimport type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';\nimport type { SearchMethodParams } from '../model/searchMethodParams';\nimport type { SearchResponses } from '../model/searchResponses';\n\nimport type {\n CustomPostProps,\n LegacyGetRecommendationsParams,\n LegacySearchMethodProps,\n} from '../model/clientMethodProps';\n\nimport type { SearchForFacetValuesResponse } from '../model/searchForFacetValuesResponse';\nimport type { SearchResponse } from '../model/searchResponse';\n\nexport const apiClientVersion = '5.14.2';\n\nfunction getDefaultHosts(appId: string): Host[] {\n return (\n [\n {\n url: `${appId}-dsn.algolia.net`,\n accept: 'read',\n protocol: 'https',\n },\n {\n url: `${appId}.algolia.net`,\n accept: 'write',\n protocol: 'https',\n },\n ] as Host[]\n ).concat(\n shuffle([\n {\n url: `${appId}-1.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-2.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n {\n url: `${appId}-3.algolianet.com`,\n accept: 'readWrite',\n protocol: 'https',\n },\n ]),\n );\n}\n\nexport function createLiteClient({\n appId: appIdOption,\n apiKey: apiKeyOption,\n authMode,\n algoliaAgents,\n ...options\n}: CreateClientOptions) {\n const auth = createAuth(appIdOption, apiKeyOption, authMode);\n const transporter = createTransporter({\n hosts: getDefaultHosts(appIdOption),\n ...options,\n algoliaAgent: getAlgoliaAgent({\n algoliaAgents,\n client: 'Lite',\n version: apiClientVersion,\n }),\n baseHeaders: {\n 'content-type': 'text/plain',\n ...auth.headers(),\n ...options.baseHeaders,\n },\n baseQueryParameters: {\n ...auth.queryParameters(),\n ...options.baseQueryParameters,\n },\n });\n\n return {\n transporter,\n\n /**\n * The `appId` currently in use.\n */\n appId: appIdOption,\n\n /**\n * Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.\n */\n clearCache(): Promise<void> {\n return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined);\n },\n\n /**\n * Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.\n */\n get _ua(): string {\n return transporter.algoliaAgent.value;\n },\n\n /**\n * Adds a `segment` to the `x-algolia-agent` sent with every requests.\n *\n * @param segment - The algolia agent (user-agent) segment to add.\n * @param version - The version of the agent.\n */\n addAlgoliaAgent(segment: string, version?: string): void {\n transporter.algoliaAgent.add({ segment, version });\n },\n\n /**\n * Helper method to switch the API key used to authenticate the requests.\n *\n * @param params - Method params.\n * @param params.apiKey - The new API Key to use.\n */\n setClientApiKey({ apiKey }: { apiKey: string }): void {\n if (!authMode || authMode === 'WithinHeaders') {\n transporter.baseHeaders['x-algolia-api-key'] = apiKey;\n } else {\n transporter.baseQueryParameters['x-algolia-api-key'] = apiKey;\n }\n },\n\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `hits`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForHits<T>(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions,\n ): Promise<{ results: Array<SearchResponse<T>> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{ results: Array<SearchResponse<T>> }>;\n },\n\n /**\n * Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).\n * Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.\n *\n * @summary Search multiple indices for `facets`.\n * @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n searchForFacets(\n searchMethodParams: LegacySearchMethodProps | SearchMethodParams,\n requestOptions?: RequestOptions,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method allow you to send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, anything after \\\"/1\\\" must be specified.\n * @param customPost.parameters - Query parameters to apply to the current query.\n * @param customPost.body - Parameters to send with the custom request.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n customPost(\n { path, parameters, body }: CustomPostProps,\n requestOptions?: RequestOptions,\n ): Promise<Record<string, unknown>> {\n if (!path) {\n throw new Error('Parameter `path` is required when calling `customPost`.');\n }\n\n const requestPath = '/{path}'.replace('{path}', path);\n const headers: Headers = {};\n const queryParameters: QueryParameters = parameters ? parameters : {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: body ? body : {},\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * Retrieves recommendations from selected AI models.\n *\n * Required API Key ACLs:\n * - search\n * @param getRecommendationsParams - The getRecommendationsParams object.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n getRecommendations(\n getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams,\n requestOptions?: RequestOptions,\n ): Promise<GetRecommendationsResponse> {\n if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {\n const newSignatureRequest: GetRecommendationsParams = {\n requests: getRecommendationsParams,\n };\n\n getRecommendationsParams = newSignatureRequest;\n }\n\n if (!getRecommendationsParams) {\n throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');\n }\n\n if (!getRecommendationsParams.requests) {\n throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');\n }\n\n const requestPath = '/1/indexes/*/recommendations';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: getRecommendationsParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n\n /**\n * 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.\n *\n * Required API Key ACLs:\n * - search\n * @param searchMethodParams - Muli-search request body. Results are returned in the same order as the requests.\n * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.\n */\n search<T>(\n searchMethodParams: SearchMethodParams | LegacySearchMethodProps,\n requestOptions?: RequestOptions,\n ): Promise<SearchResponses<T>> {\n if (searchMethodParams && Array.isArray(searchMethodParams)) {\n const newSignatureRequest: SearchMethodParams = {\n requests: searchMethodParams.map(({ params, ...legacyRequest }) => {\n if (legacyRequest.type === 'facet') {\n return {\n ...legacyRequest,\n ...params,\n type: 'facet',\n };\n }\n\n return {\n ...legacyRequest,\n ...params,\n facet: undefined,\n maxFacetHits: undefined,\n facetQuery: undefined,\n };\n }),\n };\n\n searchMethodParams = newSignatureRequest;\n }\n\n if (!searchMethodParams) {\n throw new Error('Parameter `searchMethodParams` is required when calling `search`.');\n }\n\n if (!searchMethodParams.requests) {\n throw new Error('Parameter `searchMethodParams.requests` is required when calling `search`.');\n }\n\n const requestPath = '/1/indexes/*/queries';\n const headers: Headers = {};\n const queryParameters: QueryParameters = {};\n\n const request: Request = {\n method: 'POST',\n path: requestPath,\n queryParameters,\n headers,\n data: searchMethodParams,\n useReadTransporter: true,\n cacheable: true,\n };\n\n return transporter.request(request, requestOptions);\n },\n };\n}\n"],"mappings":";AAEA,SAAS,0BAA0B;AAEnC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;;;ACFP,SAAS,YAAY,mBAAmB,iBAAiB,eAAe;AAgBjE,IAAM,mBAAmB;AAEhC,SAAS,gBAAgB,OAAuB;AAC9C,SACE;AAAA,IACE;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,IACA;AAAA,MACE,KAAK,GAAG,KAAK;AAAA,MACb,QAAQ;AAAA,MACR,UAAU;AAAA,IACZ;AAAA,EACF,EACA;AAAA,IACA,QAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,IACF,CAAC;AAAA,EACH;AACF;AAEO,SAAS,iBAAiB;AAAA,EAC/B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAAwB;AACtB,QAAM,OAAO,WAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,cAAc,kBAAkB;AAAA,IACpC,OAAO,gBAAgB,WAAW;AAAA,IAClC,GAAG;AAAA,IACH,cAAc,gBAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,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AAG,gBAAgB,IAAI,KAAK,GAAG,CAAC,GAAG,kBAAkB,CAAC;AAAA,IACvG,CAAC;AAAA,IACD,GAAG;AAAA,EACL,CAAC;AACH;","names":[]}
@@ -1,2 +1,2 @@
1
- function W(){function r(e){return new Promise(o=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let s=(a,n)=>setTimeout(()=>{t.abort(),o({status:0,content:n,isTimedOut:!0})},a),m=s(e.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(m),i=s(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(i),o({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(m),clearTimeout(i),o({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}return{send:r}}function M(r){let e,o=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function s(){return JSON.parse(t().getItem(o)||"{}")}function m(a){t().setItem(o,JSON.stringify(a))}function i(){let a=r.timeToLive?r.timeToLive*1e3:null,n=s(),p=Object.fromEntries(Object.entries(n).filter(([,h])=>h.timestamp!==void 0));if(m(p),!a)return;let f=Object.fromEntries(Object.entries(p).filter(([,h])=>{let P=new Date().getTime();return!(h.timestamp+a<P)}));m(f)}return{get(a,n,p={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(i(),s()[JSON.stringify(a)])).then(f=>Promise.all([f?f.value:n(),f!==void 0])).then(([f,h])=>Promise.all([f,h||p.miss(f)])).then(([f])=>f)},set(a,n){return Promise.resolve().then(()=>{let p=s();return p[JSON.stringify(a)]={timestamp:new Date().getTime(),value:n},t().setItem(o,JSON.stringify(p)),n})},delete(a){return Promise.resolve().then(()=>{let n=s();delete n[JSON.stringify(a)],t().setItem(o,JSON.stringify(n))})},clear(){return Promise.resolve().then(()=>{t().removeItem(o)})}}}function ee(){return{get(r,e,o={miss:()=>Promise.resolve()}){return e().then(s=>Promise.all([s,o.miss(s)])).then(([s])=>s)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function R(r){let e=[...r.caches],o=e.shift();return o===void 0?ee():{get(t,s,m={miss:()=>Promise.resolve()}){return o.get(t,s,m).catch(()=>R({caches:e}).get(t,s,m))},set(t,s){return o.set(t,s).catch(()=>R({caches:e}).set(t,s))},delete(t){return o.delete(t).catch(()=>R({caches:e}).delete(t))},clear(){return o.clear().catch(()=>R({caches:e}).clear())}}}function w(r={serializable:!0}){let e={};return{get(o,t,s={miss:()=>Promise.resolve()}){let m=JSON.stringify(o);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let i=t();return i.then(a=>s.miss(a)).then(()=>i)},set(o,t){return e[JSON.stringify(o)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(o){return delete e[JSON.stringify(o)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var H=1e3,I=2e3,j=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(o){let t=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function J(r,e,o="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return{headers(){return o==="WithinHeaders"?t:{}},queryParameters(){return o==="WithinQueryParameters"?t:{}}}}function z({algoliaAgents:r,client:e,version:o}){let t=re(o).add({segment:e,version:o});return r.forEach(s=>t.add(s)),t}function G(){return{debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var $=2*60*1e3;function k(r,e="up"){let o=Date.now();function t(){return e==="up"||Date.now()-o>$}function s(){return e==="timed out"&&Date.now()-o<=$}return{...r,status:e,lastUpdate:o,isUp:t,isTimedOut:s}}var Q=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e)}},B=class extends Q{stackTrace;constructor(r,e,o){super(r,o),this.stackTrace=e}},te=class extends B{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError")}},C=class extends B{status;constructor(r,e,o,t="ApiError"){super(r,o,t),this.status=e}},oe=class extends Q{response;constructor(r,e){super(r,"DeserializationError"),this.response=e}},ae=class extends C{error;constructor(r,e,o,t){super(r,e,t,"DetailedApiError"),this.error=o}};function V(r){let e=r;for(let o=r.length-1;o>0;o--){let t=Math.floor(Math.random()*(o+1)),s=r[o];e[o]=r[t],e[t]=s}return e}function se(r,e,o){let t=ne(o),s=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(s+=`?${t}`),s}function ne(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let o=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(o)}function ce(r,e,o){let t={Accept:"application/json",...r,...e,...o},s={};return Object.keys(t).forEach(m=>{let i=t[m];s[m.toLowerCase()]=i}),s}function me(r){try{return JSON.parse(r.content)}catch(e){throw new oe(e.message,r)}}function ue({content:r,status:e},o){try{let t=JSON.parse(r);return"error"in t?new ae(t.message,e,t.error,o):new C(t.message,e,o)}catch{}return new C(r,e,o)}function le({isTimedOut:r,status:e}){return!r&&~~e===0}function pe({isTimedOut:r,status:e}){return r||le({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function fe({status:r}){return~~(r/100)===2}function de(r){return r.map(e=>X(e))}function X(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function K({hosts:r,hostsCache:e,baseHeaders:o,logger:t,baseQueryParameters:s,algoliaAgent:m,timeouts:i,requester:a,requestsCache:n,responsesCache:p}){async function f(u){let c=await Promise.all(u.map(l=>e.get(l,()=>Promise.resolve(k(l))))),x=c.filter(l=>l.isUp()),g=c.filter(l=>l.isTimedOut()),S=[...x,...g];return{hosts:S.length>0?S:u,getTimeout(l,T){return(g.length===0&&l===0?1:g.length+3+l)*T}}}async function h(u,c,x=!0){let g=[],S=ie(u,c),y=ce(o,u.headers,c.headers),l=u.method==="GET"?{...u.data,...c.data}:{},T={...s,...u.queryParameters,...l};if(m.value&&(T["x-algolia-agent"]=m.value),c&&c.queryParameters)for(let d of Object.keys(c.queryParameters))!c.queryParameters[d]||Object.prototype.toString.call(c.queryParameters[d])==="[object Object]"?T[d]=c.queryParameters[d]:T[d]=c.queryParameters[d].toString();let A=0,N=async(d,b)=>{let v=d.pop();if(v===void 0)throw new te(de(g));let _={...i,...c.timeouts},D={data:S,headers:y,method:u.method,url:se(v,u.path,T),connectTimeout:b(A,_.connect),responseTimeout:b(A,x?_.read:_.write)},U=q=>{let F={request:D,response:q,host:v,triesLeft:d.length};return g.push(F),F},E=await a.send(D);if(pe(E)){let q=U(E);return E.isTimedOut&&A++,t.info("Retryable failure",X(q)),await e.set(v,k(v,E.isTimedOut?"timed out":"down")),N(d,b)}if(fe(E))return me(E);throw U(E),ue(E,g)},Z=r.filter(d=>d.accept==="readWrite"||(x?d.accept==="read":d.accept==="write")),L=await f(Z);return N([...L.hosts].reverse(),L.getTimeout)}function P(u,c={}){let x=u.useReadTransporter||u.method==="GET";if(!x)return h(u,c,x);let g=()=>h(u,c);if((c.cacheable||u.cacheable)!==!0)return g();let y={request:u,requestOptions:c,transporter:{queryParameters:s,headers:o}};return p.get(y,()=>n.get(y,()=>n.set(y,g()).then(l=>Promise.all([n.delete(y),l]),l=>Promise.all([n.delete(y),Promise.reject(l)])).then(([l,T])=>T)),{miss:l=>p.set(y,l)})}return{hostsCache:e,requester:a,timeouts:i,logger:t,algoliaAgent:m,baseHeaders:o,baseQueryParameters:s,hosts:r,request:P,requestsCache:n,responsesCache:p}}var O="5.14.0";function he(r){return[{url:`${r}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${r}.algolia.net`,accept:"write",protocol:"https"}].concat(V([{url:`${r}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Y({appId:r,apiKey:e,authMode:o,algoliaAgents:t,...s}){let m=J(r,e,o),i=K({hosts:he(r),...s,algoliaAgent:z({algoliaAgents:t,client:"Lite",version:O}),baseHeaders:{"content-type":"text/plain",...m.headers(),...s.baseHeaders},baseQueryParameters:{...m.queryParameters(),...s.baseQueryParameters}});return{transporter:i,appId:r,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(a,n){i.algoliaAgent.add({segment:a,version:n})},setClientApiKey({apiKey:a}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=a:i.baseQueryParameters["x-algolia-api-key"]=a},searchForHits(a,n){return this.search(a,n)},searchForFacets(a,n){return this.search(a,n)},customPost({path:a,parameters:n,body:p},f){if(!a)throw new Error("Parameter `path` is required when calling `customPost`.");let c={method:"POST",path:"/{path}".replace("{path}",a),queryParameters:n||{},headers:{},data:p||{}};return i.request(c,f)},getRecommendations(a,n){if(a&&Array.isArray(a)&&(a={requests:a}),!a)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!a.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");let P={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(P,n)},search(a,n){if(a&&Array.isArray(a)&&(a={requests:a.map(({params:c,...x})=>x.type==="facet"?{...x,...c,type:"facet"}:{...x,...c,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!a)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!a.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");let P={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(P,n)}}}function Qt(r,e,o){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return Y({appId:r,apiKey:e,timeouts:{connect:H,read:I,write:j},logger:G(),requester:W(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:w(),requestsCache:w({serializable:!1}),hostsCache:R({caches:[M({key:`${O}-${r}`}),w()]}),...o})}export{O as apiClientVersion,Qt as liteClient};
1
+ function W(){function r(e){return new Promise(o=>{let t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach(a=>t.setRequestHeader(a,e.headers[a]));let s=(a,n)=>setTimeout(()=>{t.abort(),o({status:0,content:n,isTimedOut:!0})},a),m=s(e.connectTimeout,"Connection timeout"),i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&i===void 0&&(clearTimeout(m),i=s(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{t.status===0&&(clearTimeout(m),clearTimeout(i),o({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(m),clearTimeout(i),o({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)})}return{send:r}}function M(r){let e,o=`algolia-client-js-${r.key}`;function t(){return e===void 0&&(e=r.localStorage||window.localStorage),e}function s(){return JSON.parse(t().getItem(o)||"{}")}function m(a){t().setItem(o,JSON.stringify(a))}function i(){let a=r.timeToLive?r.timeToLive*1e3:null,n=s(),p=Object.fromEntries(Object.entries(n).filter(([,h])=>h.timestamp!==void 0));if(m(p),!a)return;let f=Object.fromEntries(Object.entries(p).filter(([,h])=>{let P=new Date().getTime();return!(h.timestamp+a<P)}));m(f)}return{get(a,n,p={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(i(),s()[JSON.stringify(a)])).then(f=>Promise.all([f?f.value:n(),f!==void 0])).then(([f,h])=>Promise.all([f,h||p.miss(f)])).then(([f])=>f)},set(a,n){return Promise.resolve().then(()=>{let p=s();return p[JSON.stringify(a)]={timestamp:new Date().getTime(),value:n},t().setItem(o,JSON.stringify(p)),n})},delete(a){return Promise.resolve().then(()=>{let n=s();delete n[JSON.stringify(a)],t().setItem(o,JSON.stringify(n))})},clear(){return Promise.resolve().then(()=>{t().removeItem(o)})}}}function ee(){return{get(r,e,o={miss:()=>Promise.resolve()}){return e().then(s=>Promise.all([s,o.miss(s)])).then(([s])=>s)},set(r,e){return Promise.resolve(e)},delete(r){return Promise.resolve()},clear(){return Promise.resolve()}}}function R(r){let e=[...r.caches],o=e.shift();return o===void 0?ee():{get(t,s,m={miss:()=>Promise.resolve()}){return o.get(t,s,m).catch(()=>R({caches:e}).get(t,s,m))},set(t,s){return o.set(t,s).catch(()=>R({caches:e}).set(t,s))},delete(t){return o.delete(t).catch(()=>R({caches:e}).delete(t))},clear(){return o.clear().catch(()=>R({caches:e}).clear())}}}function w(r={serializable:!0}){let e={};return{get(o,t,s={miss:()=>Promise.resolve()}){let m=JSON.stringify(o);if(m in e)return Promise.resolve(r.serializable?JSON.parse(e[m]):e[m]);let i=t();return i.then(a=>s.miss(a)).then(()=>i)},set(o,t){return e[JSON.stringify(o)]=r.serializable?JSON.stringify(t):t,Promise.resolve(t)},delete(o){return delete e[JSON.stringify(o)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}var H=1e3,I=2e3,j=3e4;function re(r){let e={value:`Algolia for JavaScript (${r})`,add(o){let t=`; ${o.segment}${o.version!==void 0?` (${o.version})`:""}`;return e.value.indexOf(t)===-1&&(e.value=`${e.value}${t}`),e}};return e}function J(r,e,o="WithinHeaders"){let t={"x-algolia-api-key":e,"x-algolia-application-id":r};return{headers(){return o==="WithinHeaders"?t:{}},queryParameters(){return o==="WithinQueryParameters"?t:{}}}}function z({algoliaAgents:r,client:e,version:o}){let t=re(o).add({segment:e,version:o});return r.forEach(s=>t.add(s)),t}function G(){return{debug(r,e){return Promise.resolve()},info(r,e){return Promise.resolve()},error(r,e){return Promise.resolve()}}}var $=2*60*1e3;function k(r,e="up"){let o=Date.now();function t(){return e==="up"||Date.now()-o>$}function s(){return e==="timed out"&&Date.now()-o<=$}return{...r,status:e,lastUpdate:o,isUp:t,isTimedOut:s}}var Q=class extends Error{name="AlgoliaError";constructor(r,e){super(r),e&&(this.name=e)}},B=class extends Q{stackTrace;constructor(r,e,o){super(r,o),this.stackTrace=e}},te=class extends B{constructor(r){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",r,"RetryError")}},C=class extends B{status;constructor(r,e,o,t="ApiError"){super(r,o,t),this.status=e}},oe=class extends Q{response;constructor(r,e){super(r,"DeserializationError"),this.response=e}},ae=class extends C{error;constructor(r,e,o,t){super(r,e,t,"DetailedApiError"),this.error=o}};function V(r){let e=r;for(let o=r.length-1;o>0;o--){let t=Math.floor(Math.random()*(o+1)),s=r[o];e[o]=r[t],e[t]=s}return e}function se(r,e,o){let t=ne(o),s=`${r.protocol}://${r.url}${r.port?`:${r.port}`:""}/${e.charAt(0)==="/"?e.substring(1):e}`;return t.length&&(s+=`?${t}`),s}function ne(r){return Object.keys(r).filter(e=>r[e]!==void 0).sort().map(e=>`${e}=${encodeURIComponent(Object.prototype.toString.call(r[e])==="[object Array]"?r[e].join(","):r[e]).replace(/\+/g,"%20")}`).join("&")}function ie(r,e){if(r.method==="GET"||r.data===void 0&&e.data===void 0)return;let o=Array.isArray(r.data)?r.data:{...r.data,...e.data};return JSON.stringify(o)}function ce(r,e,o){let t={Accept:"application/json",...r,...e,...o},s={};return Object.keys(t).forEach(m=>{let i=t[m];s[m.toLowerCase()]=i}),s}function me(r){try{return JSON.parse(r.content)}catch(e){throw new oe(e.message,r)}}function ue({content:r,status:e},o){try{let t=JSON.parse(r);return"error"in t?new ae(t.message,e,t.error,o):new C(t.message,e,o)}catch{}return new C(r,e,o)}function le({isTimedOut:r,status:e}){return!r&&~~e===0}function pe({isTimedOut:r,status:e}){return r||le({isTimedOut:r,status:e})||~~(e/100)!==2&&~~(e/100)!==4}function fe({status:r}){return~~(r/100)===2}function de(r){return r.map(e=>X(e))}function X(r){let e=r.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...r,request:{...r.request,headers:{...r.request.headers,...e}}}}function K({hosts:r,hostsCache:e,baseHeaders:o,logger:t,baseQueryParameters:s,algoliaAgent:m,timeouts:i,requester:a,requestsCache:n,responsesCache:p}){async function f(u){let c=await Promise.all(u.map(l=>e.get(l,()=>Promise.resolve(k(l))))),x=c.filter(l=>l.isUp()),g=c.filter(l=>l.isTimedOut()),S=[...x,...g];return{hosts:S.length>0?S:u,getTimeout(l,T){return(g.length===0&&l===0?1:g.length+3+l)*T}}}async function h(u,c,x=!0){let g=[],S=ie(u,c),y=ce(o,u.headers,c.headers),l=u.method==="GET"?{...u.data,...c.data}:{},T={...s,...u.queryParameters,...l};if(m.value&&(T["x-algolia-agent"]=m.value),c&&c.queryParameters)for(let d of Object.keys(c.queryParameters))!c.queryParameters[d]||Object.prototype.toString.call(c.queryParameters[d])==="[object Object]"?T[d]=c.queryParameters[d]:T[d]=c.queryParameters[d].toString();let A=0,N=async(d,b)=>{let v=d.pop();if(v===void 0)throw new te(de(g));let _={...i,...c.timeouts},D={data:S,headers:y,method:u.method,url:se(v,u.path,T),connectTimeout:b(A,_.connect),responseTimeout:b(A,x?_.read:_.write)},U=q=>{let F={request:D,response:q,host:v,triesLeft:d.length};return g.push(F),F},E=await a.send(D);if(pe(E)){let q=U(E);return E.isTimedOut&&A++,t.info("Retryable failure",X(q)),await e.set(v,k(v,E.isTimedOut?"timed out":"down")),N(d,b)}if(fe(E))return me(E);throw U(E),ue(E,g)},Z=r.filter(d=>d.accept==="readWrite"||(x?d.accept==="read":d.accept==="write")),L=await f(Z);return N([...L.hosts].reverse(),L.getTimeout)}function P(u,c={}){let x=u.useReadTransporter||u.method==="GET";if(!x)return h(u,c,x);let g=()=>h(u,c);if((c.cacheable||u.cacheable)!==!0)return g();let y={request:u,requestOptions:c,transporter:{queryParameters:s,headers:o}};return p.get(y,()=>n.get(y,()=>n.set(y,g()).then(l=>Promise.all([n.delete(y),l]),l=>Promise.all([n.delete(y),Promise.reject(l)])).then(([l,T])=>T)),{miss:l=>p.set(y,l)})}return{hostsCache:e,requester:a,timeouts:i,logger:t,algoliaAgent:m,baseHeaders:o,baseQueryParameters:s,hosts:r,request:P,requestsCache:n,responsesCache:p}}var O="5.14.2";function he(r){return[{url:`${r}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${r}.algolia.net`,accept:"write",protocol:"https"}].concat(V([{url:`${r}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${r}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Y({appId:r,apiKey:e,authMode:o,algoliaAgents:t,...s}){let m=J(r,e,o),i=K({hosts:he(r),...s,algoliaAgent:z({algoliaAgents:t,client:"Lite",version:O}),baseHeaders:{"content-type":"text/plain",...m.headers(),...s.baseHeaders},baseQueryParameters:{...m.queryParameters(),...s.baseQueryParameters}});return{transporter:i,appId:r,clearCache(){return Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then(()=>{})},get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(a,n){i.algoliaAgent.add({segment:a,version:n})},setClientApiKey({apiKey:a}){!o||o==="WithinHeaders"?i.baseHeaders["x-algolia-api-key"]=a:i.baseQueryParameters["x-algolia-api-key"]=a},searchForHits(a,n){return this.search(a,n)},searchForFacets(a,n){return this.search(a,n)},customPost({path:a,parameters:n,body:p},f){if(!a)throw new Error("Parameter `path` is required when calling `customPost`.");let c={method:"POST",path:"/{path}".replace("{path}",a),queryParameters:n||{},headers:{},data:p||{}};return i.request(c,f)},getRecommendations(a,n){if(a&&Array.isArray(a)&&(a={requests:a}),!a)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!a.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");let P={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(P,n)},search(a,n){if(a&&Array.isArray(a)&&(a={requests:a.map(({params:c,...x})=>x.type==="facet"?{...x,...c,type:"facet"}:{...x,...c,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!a)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!a.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");let P={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return i.request(P,n)}}}function Gt(r,e,o){if(!r||typeof r!="string")throw new Error("`appId` is missing.");if(!e||typeof e!="string")throw new Error("`apiKey` is missing.");return Y({appId:r,apiKey:e,timeouts:{connect:H,read:I,write:j},logger:G(),requester:W(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:w(),requestsCache:w({serializable:!1}),hostsCache:R({caches:[M({key:`${O}-${r}`}),w()]}),...o})}export{O as apiClientVersion,Gt as liteClient};
2
2
  //# sourceMappingURL=browser.min.js.map