algoliasearch 5.41.0 → 5.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -548,6 +548,8 @@ type BaseRecommendRequest = {
548
548
  queryParameters?: RecommendSearchParams | undefined;
549
549
  };
550
550
 
551
+ type FallbackParams = RecommendSearchParams & Record<string, unknown>;
552
+
551
553
  /**
552
554
  * Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`.
553
555
  */
@@ -559,12 +561,11 @@ type FrequentlyBoughtTogether = {
559
561
  * Unique record identifier.
560
562
  */
561
563
  objectID: string;
564
+ fallbackParameters?: FallbackParams | undefined;
562
565
  };
563
566
 
564
567
  type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether;
565
568
 
566
- type FallbackParams = RecommendSearchParams & Record<string, unknown>;
567
-
568
569
  /**
569
570
  * Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.
570
571
  */
@@ -1489,7 +1490,7 @@ type LegacySearchQuery = LegacySearchForFacets | LegacySearchForHits;
1489
1490
  */
1490
1491
  type LegacySearchMethodProps = LegacySearchQuery[];
1491
1492
 
1492
- declare const apiClientVersion = "5.41.0";
1493
+ declare const apiClientVersion = "5.43.0";
1493
1494
  declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1494
1495
  transporter: _algolia_client_common.Transporter;
1495
1496
  /**
@@ -548,6 +548,8 @@ type BaseRecommendRequest = {
548
548
  queryParameters?: RecommendSearchParams | undefined;
549
549
  };
550
550
 
551
+ type FallbackParams = RecommendSearchParams & Record<string, unknown>;
552
+
551
553
  /**
552
554
  * Frequently bought together model. This model recommends items that have been purchased within 1 day with the item with the ID `objectID`.
553
555
  */
@@ -559,12 +561,11 @@ type FrequentlyBoughtTogether = {
559
561
  * Unique record identifier.
560
562
  */
561
563
  objectID: string;
564
+ fallbackParameters?: FallbackParams | undefined;
562
565
  };
563
566
 
564
567
  type BoughtTogetherQuery = BaseRecommendRequest & FrequentlyBoughtTogether;
565
568
 
566
- type FallbackParams = RecommendSearchParams & Record<string, unknown>;
567
-
568
569
  /**
569
570
  * Looking similar model. This model recommends items that look similar to the item with the ID `objectID` based on image attributes in your index.
570
571
  */
@@ -1489,7 +1490,7 @@ type LegacySearchQuery = LegacySearchForFacets | LegacySearchForHits;
1489
1490
  */
1490
1491
  type LegacySearchMethodProps = LegacySearchQuery[];
1491
1492
 
1492
- declare const apiClientVersion = "5.41.0";
1493
+ declare const apiClientVersion = "5.43.0";
1493
1494
  declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
1494
1495
  transporter: _algolia_client_common.Transporter;
1495
1496
  /**
@@ -25,7 +25,7 @@ __export(liteClient_exports, {
25
25
  });
26
26
  module.exports = __toCommonJS(liteClient_exports);
27
27
  var import_client_common = require("@algolia/client-common");
28
- var apiClientVersion = "5.41.0";
28
+ var apiClientVersion = "5.43.0";
29
29
  function getDefaultHosts(appId) {
30
30
  return [
31
31
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../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 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.41.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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): 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 | undefined,\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 | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAAwE;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,QACA,8BAAQ;AAAA,MACN;AAAA,QACE,KAAK,GAAG,KAAK;AAAA,QACb,QAAQ;AAAA,QACR,UAAU;AAAA,MACZ;AAAA,MACA;AAAA,QACE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sources":["../../../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 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.43.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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): 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 | undefined,\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 | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\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":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAUA,2BAAwE;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,QACA,8BAAQ;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,WAAO,iCAAW,aAAa,cAAc,QAAQ;AAC3D,QAAM,kBAAc,wCAAkB;AAAA,IACpC,OAAO,gBAAgB,WAAW;AAAA,IAClC,GAAG;AAAA,IACH,kBAAc,sCAAgB;AAAA,MAC5B;AAAA,MACA,QAAQ;AAAA,MACR,SAAS;AAAA,IACX,CAAC;AAAA,IACD,aAAa;AAAA,MACX,gBAAgB;AAAA,MAChB,GAAG,KAAK,QAAQ;AAAA,MAChB,GAAG,QAAQ;AAAA,IACb;AAAA,IACA,qBAAqB;AAAA,MACnB,GAAG,KAAK,gBAAgB;AAAA,MACxB,GAAG,QAAQ;AAAA,IACb;AAAA,EACF,CA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AY;AAAA,YACd;AAAA,UACF,CAAC;AAAA,QACH;AAEA,6BAAqB;AAAA,MACvB;AAEA,UAAI,CAAC,oBAAoB;AACvB,cAAM,IAAI,MAAM,mEAAmE;AAAA,MACrF;AAEA,UAAI,CAAC,mBAAmB,UAAU;AAChC,cAAM,IAAI,MAAM,4EAA4E;AAAA,MAC9F;AAEA,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
@@ -1,6 +1,6 @@
1
1
  // lite/src/liteClient.ts
2
2
  import { createAuth, createTransporter, getAlgoliaAgent, shuffle } from "@algolia/client-common";
3
- var apiClientVersion = "5.41.0";
3
+ var apiClientVersion = "5.43.0";
4
4
  function getDefaultHosts(appId) {
5
5
  return [
6
6
  {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../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 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.41.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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): 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 | undefined,\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 | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\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":";AAUA,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,Q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esContent":["// 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.43.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 * The `apiKey` currently in use.\n */\n apiKey: apiKeyOption,\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 | undefined): 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 | undefined,\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 | undefined,\n ): Promise<{ results: Array<SearchForFacetValuesResponse> }> {\n return this.search(searchMethodParams, requestOptions) as Promise<{\n results: Array<SearchForFacetValuesResponse>;\n }>;\n },\n /**\n * This method lets you send requests to the Algolia REST API.\n * @param customPost - The customPost object.\n * @param customPost.path - Path of the endpoint, for example `1/newFeature`.\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. Use the helper `searchForHits` or `searchForFacets` to get the results in a more convenient format, if you already know the return type you want.\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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;AAEA,UAAI,CAAC,oBAAoB;AACvB,cAAM,IAAI,MAAM,mEAAmE;AAAA,MACrF;AAEA,UAAI,CAAC,mBAAmB,UAAU;AAChC,cAAM,IAAI,MAAM,4EAA4E;AAAA,MAC9F;AAEA,YAAM,cAAc;AACpB,YAAM,UAAmB,CAAC;AAC1B,YAAM,kBAAmC,CAAC;AAE1C,YAAM,UAAmB;AAAA,QACvB,QAAQ;AAAA,QACR,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,MAAM;AAAA,QACN,oBAAoB;AAAA,QACpB,WAAW;AAAA,MACb;AAEA,aAAO,YAAY,QAAQ,SAAS,cAAc;AAAA,IACpD;AAAA,EACF;AACF;","names":[]}
package/dist/node.cjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../builds/node.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, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\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 PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\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 // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * Helper: Similar to the `saveObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): 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 let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\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 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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\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 AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\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 { Direction } from '@algolia/client-analytics';\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 FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\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 ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\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';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\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 | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\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 ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\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 CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\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 ScheduleABTestResponse,\n ScheduleABTestsRequest,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\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;AAAA;AAKA,uBAAkC;AAElC,8BAAgC;AAEhC,8BAAgC;AAEhC,6BAA+B;AAE/B,oCAAsC;AAEtC,sCAAuC;AAEvC,IAAAA,wBAA6B;AAE7B,uBAAgC;AAEhC,wBAAiC;AAEjC,uBAAgC;;;ACvBhC;AAAA;AAAA;AAAA;AAmHA,2BAAiC;AA+BjC,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;;;AD9Gd,yBAAc,gBA7Cd;AAwHO,SAAS,cACd,OACA,QACA,SACe;AACf,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,aAAS,oCAAa,OAAO,QAAQ,OAAO;AAElD,MAAI;AAEJ,MAAI,mCAAS,gBAAgB;AAC3B,QAAI,CAAC,QAAQ,eAAe,QAAQ;AAClC,YAAM,IAAI,MAAM,uEAAuE;AAAA,IACzF;AAEA,+BAAuB,kCAAgB,OAAO,QAAQ,QAAQ,eAAe,QAAQ,OAAO;AAAA,EAC9F;AAEA,SAAO;AAAA,IACL,GAAG;AAAA,IAEH,MAAM,8BACJ,EAAE,WAAW,SAAS,aAAa,GACnC,gBAC+B;AAvJrC;AAwJM,UAAI,CAAC,sBAAsB;AACzB,cAAM,IAAI,MAAM,8FAA8F;AAAA,MAChH;AAEA,UAAI,GAAC,wCAAS,mBAAT,mBAAyB,SAAQ;AACpC,cAAM,IAAI,MAAM,uEAAuE;AAAA,MACzF;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AAAA,IACF;AAAA,IAEA,eAAe,CAAC,gBAA6E;AAC3F,iBAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,cAAc,CAAC,gBAA2E;AACxF,iBAAO;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,iBAAO,oCAAiB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACvG;AAAA,IAEA,qBAAqB,CAAC,gBAAyF;AAC7G,iBAAO;AAAA,QACL,YAAY,SAAS;AAAA,QACrB,YAAY,UAAU;AAAA,QACtB,YAAY;AAAA,QACZ,YAAY;AAAA,MACd;AAAA,IACF;AAAA,IAEA,sBAAsB,CAAC,gBAA2F;AAChH,iBAAO;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,iBAAO,kCAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":["import_client_search"]}
1
+ {"version":3,"sources":["../builds/node.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, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\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 PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\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 // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * Helper: Similar to the `saveObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): 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 let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\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 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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\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 AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\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 { Direction } from '@algolia/client-analytics';\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 FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\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 ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\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';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\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 | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\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 ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\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 CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\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 SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\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;AAAA;AAKA,uBAAkC;AAElC,8BAAgC;AAEhC,8BAAgC;AAEhC,6BAA+B;AAE/B,oCAAsC;AAEtC,sCAAuC;AAEvC,IAAAA,wBAA6B;AAE7B,uBAAgC;AAEhC,wBAAiC;AAEjC,uBAAgC;;;ACvBhC;AAAA;AAAA;AAAA;AAmHA,2BAAiC;AA6BjC,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;AACd,2BAAc;;;AD5Gd,yBAAc,gBA7Cd;AAwHO,SAAS,cACd,OACA,QACA,SACe;AACf,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,aAAS,oCAAa,OAAO,QAAQ,OAAO;AAElD,MAAI;AAEJ,MAAI,mCAAS,gBAAgB;AAC3B,QAAI,CAAC,QAAQ,eAAe,QAAQ;AAClC,YAAM,IAAI,MA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AAA,IACtG;AAAA,EACF;AACF;","names":["import_client_search"]}
package/dist/node.d.cts CHANGED
@@ -4,7 +4,7 @@ export * from '@algolia/abtesting';
4
4
  export { Region as AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';
5
5
  import { Region as Region$1, RegionOptions as RegionOptions$1, AbtestingClient } from '@algolia/client-abtesting';
6
6
  export * from '@algolia/client-abtesting';
7
- export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, ScheduleABTestResponse, ScheduleABTestsRequest, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
7
+ export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
8
8
  import { Region as Region$3, RegionOptions as RegionOptions$3, AnalyticsClient } from '@algolia/client-analytics';
9
9
  export * from '@algolia/client-analytics';
10
10
  export { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions, Direction } from '@algolia/client-analytics';
package/dist/node.d.ts CHANGED
@@ -4,7 +4,7 @@ export * from '@algolia/abtesting';
4
4
  export { Region as AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';
5
5
  import { Region as Region$1, RegionOptions as RegionOptions$1, AbtestingClient } from '@algolia/client-abtesting';
6
6
  export * from '@algolia/client-abtesting';
7
- export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, ScheduleABTestResponse, ScheduleABTestsRequest, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
7
+ export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
8
8
  import { Region as Region$3, RegionOptions as RegionOptions$3, AnalyticsClient } from '@algolia/client-analytics';
9
9
  export * from '@algolia/client-analytics';
10
10
  export { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions, Direction } from '@algolia/client-analytics';
package/dist/node.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../builds/node.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, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\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 PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\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 // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * Helper: Similar to the `saveObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): 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 let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\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 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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\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 AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\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 { Direction } from '@algolia/client-analytics';\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 FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\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 ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\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';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n ScheduleABTestResponse,\n ScheduleABTestsRequest,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\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 | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\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 ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\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 CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\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 ScheduleABTestResponse,\n ScheduleABTestsRequest,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\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,yBAAyB;AAElC,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;;;ACvBhC;AAAA;AAAA;AAAA;AAkJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAxCA,SAAS,wBAAwB;AA+BjC,gCAAc;AACd,uCAAc;AACd,uCAAc;AACd,sCAAc;AACd,6CAAc;AACd,+CAAc;AACd,oCAAc;AACd,gCAAc;AACd,iCAAc;AACd,gCAAc;;;AD9Gd,yBAAc;AA2EP,SAAS,cACd,OACA,QACA,SACe;AACf,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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;AAAA,IAEA,eAAe,CAAC,cAAiC,CAAC,MAAuB;AACvE,aAAO,gBAAgB,YAAY,SAAS,OAAO,YAAY,UAAU,QAAQ,YAAY,OAAO;AAAA,IACtG;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../builds/node.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, RequestOptions } from '@algolia/client-common';\n\nimport type { AbtestingV3Client } from '@algolia/abtesting';\nimport { abtestingV3Client } from '@algolia/abtesting';\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 PartialUpdateObjectsOptions,\n ReplaceAllObjectsOptions,\n ReplaceAllObjectsWithTransformationResponse,\n SaveObjectsOptions,\n} from '@algolia/client-search';\nimport type { WatchResponse } from '@algolia/ingestion';\n\nimport type {\n AbtestingRegionOptions,\n AbtestingV3RegionOptions,\n AnalyticsRegionOptions,\n IngestionRegion,\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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions) => AbtestingV3Client;\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 // Bridge helpers to expose along with the search endpoints at the root of the API client\n\n /**\n * Helper: Similar to the `saveObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup using the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param saveObjects - The `saveObjects` object.\n * @param saveObjects.indexName - The `indexName` to save `objects` in.\n * @param saveObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param saveObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param saveObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n saveObjectsWithTransformation: (\n options: SaveObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `partialUpdateObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Save objects to an Algolia index by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n * @param partialUpdateObjects - The `partialUpdateObjects` object.\n * @param partialUpdateObjects.indexName - The `indexName` to update `objects` in.\n * @param partialUpdateObjects.objects - The array of `objects` to update in the given Algolia `indexName`.\n * @param partialUpdateObjects.createIfNotExists - To be provided if non-existing objects are passed, otherwise, the call will fail.\n * @param partialUpdateObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.\n * @param partialUpdateObjects.waitForTasks - Whether or not we should wait until every `batch` tasks has been processed, this operation may slow the total execution time of this method but is more reliable.\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push` method and merged with the transporter requestOptions.\n */\n partialUpdateObjectsWithTransformation: (\n options: PartialUpdateObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<Array<WatchResponse>>;\n\n /**\n * Helper: Similar to the `replaceAllObjects` method but requires a Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) to be created first, in order to transform records before indexing them to Algolia. The `region` must have been passed to the client instantiation method.\n *\n * @summary Helper: Replaces all objects (records) in the given `index_name` by leveraging the Transformation pipeline setup in the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/) with the given `objects`. A temporary index is created during this process in order to backup your data.\n * @param replaceAllObjects - The `replaceAllObjects` object.\n * @param replaceAllObjects.indexName - The `indexName` to replace `objects` in.\n * @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.\n * @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.\n * @param replaceAllObjects.scopes - The `scopes` to keep from the index. Defaults to ['settings', 'rules', 'synonyms'].\n * @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `push`, `operationIndex` and `getEvent` method and merged with the transporter requestOptions.\n */\n replaceAllObjectsWithTransformation: (\n options: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ) => Promise<ReplaceAllObjectsWithTransformationResponse>;\n};\n\nexport type TransformationOptions = {\n // When provided, a second transporter will be created in order to leverage the `*WithTransformation` methods exposed by the Push connector (https://www.algolia.com/doc/guides/sending-and-managing-data/send-and-update-your-data/connectors/push/).\n transformation?:\n | {\n // The region of your Algolia application ID, used to target the correct hosts of the transformation service.\n region: IngestionRegion;\n }\n | undefined;\n};\n\nexport function algoliasearch(\n appId: string,\n apiKey: string,\n options?: (ClientOptions & TransformationOptions) | undefined,\n): 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 let ingestionTransporter: IngestionClient | undefined;\n\n if (options?.transformation) {\n if (!options.transformation.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n ingestionTransporter = ingestionClient(appId, apiKey, options.transformation.region, options);\n }\n\n return {\n ...client,\n\n async saveObjectsWithTransformation(\n { indexName, objects, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n { indexName, objects, action: 'addObject', waitForTasks },\n requestOptions,\n );\n },\n\n async partialUpdateObjectsWithTransformation(\n { indexName, objects, createIfNotExists, waitForTasks },\n requestOptions,\n ): Promise<Array<WatchResponse>> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n return ingestionTransporter.chunkedPush(\n {\n indexName,\n objects,\n action: createIfNotExists ? 'partialUpdateObject' : 'partialUpdateObjectNoCreate',\n waitForTasks,\n },\n requestOptions,\n );\n },\n\n async replaceAllObjectsWithTransformation(\n { indexName, objects, batchSize, scopes }: ReplaceAllObjectsOptions,\n requestOptions?: RequestOptions | undefined,\n ): Promise<ReplaceAllObjectsWithTransformationResponse> {\n if (!ingestionTransporter) {\n throw new Error('`transformation.region` must be provided at client instantiation before calling this method.');\n }\n\n if (!options?.transformation?.region) {\n throw new Error('`region` must be provided when leveraging the transformation pipeline');\n }\n\n const randomSuffix = Math.floor(Math.random() * 1000000) + 100000;\n const tmpIndexName = `${indexName}_tmp_${randomSuffix}`;\n\n if (scopes === undefined) {\n scopes = ['settings', 'rules', 'synonyms'];\n }\n\n try {\n let copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n\n const watchResponses = await ingestionTransporter.chunkedPush(\n { indexName: tmpIndexName, objects, waitForTasks: true, batchSize, referenceIndexName: indexName },\n requestOptions,\n );\n\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n copyOperationResponse = await this.operationIndex(\n {\n indexName,\n operationIndexParams: {\n operation: 'copy',\n destination: tmpIndexName,\n scope: scopes,\n },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: copyOperationResponse.taskID,\n });\n\n const moveOperationResponse = await this.operationIndex(\n {\n indexName: tmpIndexName,\n operationIndexParams: { operation: 'move', destination: indexName },\n },\n requestOptions,\n );\n await this.waitForTask({\n indexName: tmpIndexName,\n taskID: moveOperationResponse.taskID,\n });\n\n return { copyOperationResponse, watchResponses, moveOperationResponse };\n } catch (error) {\n await this.deleteIndex({ indexName: tmpIndexName });\n\n throw error;\n }\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 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 initAbtestingV3: (initOptions: InitClientOptions & AbtestingV3RegionOptions): AbtestingV3Client => {\n return abtestingV3Client(\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 AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';\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 { Direction } from '@algolia/client-analytics';\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 FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n MatchLevel,\n MatchedGeoLocation,\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 ReRankingApplyFilter,\n Redirect,\n RedirectRuleIndexData,\n RedirectRuleIndexMetadata,\n RedirectURL,\n RemoveStopWords,\n RemoveWordsIfNoResults,\n RenderingContent,\n SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\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';\nimport type { Event, EventStatus, WatchResponse } from '@algolia/ingestion';\n\nimport type {\n ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n AddABTestsRequest,\n AddABTestsVariant,\n CustomSearchParams,\n DeleteABTestProps,\n EffectMetric,\n EmptySearchFilter,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n FilterEffects,\n GetABTestProps,\n ListABTestsProps,\n ListABTestsResponse,\n MinimumDetectableEffect,\n OutliersFilter,\n Status,\n StopABTestProps,\n Variant,\n} from '@algolia/client-abtesting';\n\nexport * from '@algolia/abtesting';\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 | AbtestingV3Region\n | AnalyticsRegion\n | IngestionRegion\n | InsightsRegion\n | PersonalizationRegion\n | QuerySuggestionsRegion;\nexport type RegionOptions =\n | AbtestingRegionOptions\n | AbtestingV3RegionOptions\n | AnalyticsRegionOptions\n | IngestionRegionOptions\n | InsightsRegionOptions\n | PersonalizationRegionOptions\n | QuerySuggestionsRegionOptions;\n\nexport type {\n AbtestingRegion,\n AbtestingRegionOptions,\n AbtestingV3Region,\n AbtestingV3RegionOptions,\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 ABTest,\n ABTestConfiguration,\n ABTestResponse,\n AbTestsVariant,\n AbTestsVariantSearchParams,\n Action,\n AddABTestsRequest,\n AddABTestsVariant,\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 CustomSearchParams,\n DeleteABTestProps,\n DeleteSourceProps,\n DeletedAtResponse,\n Direction,\n Distinct,\n Edit,\n EditType,\n EffectMetric,\n EmptySearchFilter,\n ErrorBase,\n EstimateABTestRequest,\n EstimateABTestResponse,\n EstimateConfiguration,\n Event,\n EventStatus,\n ExactOnSingleWordQuery,\n Exhaustive,\n FacetFilters,\n FacetHits,\n FacetOrdering,\n FacetStats,\n Facets,\n FilterEffects,\n GetABTestProps,\n GetTaskProps,\n HighlightResult,\n HighlightResultOption,\n Hit,\n IgnorePlurals,\n IndexSettingsAsSearchParams,\n InsideBoundingBox,\n Languages,\n ListABTestsProps,\n ListABTestsResponse,\n MatchLevel,\n MatchedGeoLocation,\n MinimumDetectableEffect,\n Mode,\n NumericFilters,\n OptionalFilters,\n OptionalWords,\n OutliersFilter,\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 SearchForFacetValuesProps,\n SearchForFacetValuesRequest,\n SearchForFacetValuesResponse,\n SearchHits,\n SearchPagination,\n SearchParams,\n SearchParamsObject,\n SearchParamsQuery,\n SearchResponse,\n SemanticSearch,\n SnippetResult,\n SnippetResultOption,\n SortRemainingBy,\n Source,\n StopABTestProps,\n SupportedLanguage,\n TagFilters,\n TaskStatus,\n TimeRange,\n TypoTolerance,\n TypoToleranceEnum,\n Value,\n Variant,\n WatchResponse,\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,yBAAyB;AAElC,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;;;ACvBhC;AAAA;AAAA;AAA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,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":[]}
package/dist/worker.d.ts CHANGED
@@ -4,7 +4,7 @@ export * from '@algolia/abtesting';
4
4
  export { Region as AbtestingV3Region, RegionOptions as AbtestingV3RegionOptions } from '@algolia/abtesting';
5
5
  import { Region as Region$1, RegionOptions as RegionOptions$1, AbtestingClient } from '@algolia/client-abtesting';
6
6
  export * from '@algolia/client-abtesting';
7
- export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, ScheduleABTestResponse, ScheduleABTestsRequest, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
7
+ export { ABTest, ABTestConfiguration, ABTestResponse, AbTestsVariant, AbTestsVariantSearchParams, Region as AbtestingRegion, RegionOptions as AbtestingRegionOptions, AddABTestsRequest, AddABTestsVariant, CustomSearchParams, DeleteABTestProps, EffectMetric, EmptySearchFilter, EstimateABTestRequest, EstimateABTestResponse, EstimateConfiguration, FilterEffects, GetABTestProps, ListABTestsProps, ListABTestsResponse, MinimumDetectableEffect, OutliersFilter, Status, StopABTestProps, Variant } from '@algolia/client-abtesting';
8
8
  import { Region as Region$3, RegionOptions as RegionOptions$3, AnalyticsClient } from '@algolia/client-analytics';
9
9
  export * from '@algolia/client-analytics';
10
10
  export { Region as AnalyticsRegion, RegionOptions as AnalyticsRegionOptions, Direction } from '@algolia/client-analytics';