Socket
Socket
Sign inDemoInstall

algoliasearch

Package Overview
Dependencies
Maintainers
0
Versions
373
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

algoliasearch - npm Package Compare versions

Comparing version 5.0.0-beta.4 to 5.0.0-beta.5

dist/client-search/model/securedApiKeyRestrictions.d.ts

15

builds/browser.ts

@@ -10,3 +10,2 @@ // 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.

import type { AnalyticsClient } from '@algolia/client-analytics';
import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient';
import {

@@ -16,2 +15,3 @@ createAnalyticsClient,

} from '@algolia/client-analytics/src/analyticsClient';
import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient';
import {

@@ -39,2 +39,4 @@ DEFAULT_CONNECT_TIMEOUT_BROWSER,

} from '@algolia/client-search/src/searchClient';
import type { RecommendClient } from '@algolia/recommend';
import { createRecommendClient } from '@algolia/recommend/src/recommendClient';
import { createXhrRequester } from '@algolia/requester-browser-xhr';

@@ -88,2 +90,10 @@

function initRecommend(initOptions: InitClientOptions = {}): RecommendClient {
return createRecommendClient({
...commonOptions,
...initOptions.options,
...initOptions,
});
}
function initAnalytics(

@@ -159,6 +169,7 @@ initOptions: InitClientOptions & InitClientRegion<AnalyticsRegion> = {}

},
initAbtesting,
initAnalytics,
initPersonalization,
initAbtesting,
initRecommend,
};
}

@@ -5,10 +5,75 @@ // 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.

import {
ErrorBase,
CustomPutProps,
CustomPostProps,
AdvancedSyntaxFeatures,
AlternativesAsExact,
Anchoring,
AroundPrecision,
AroundPrecisionFromValueInner,
AroundRadius,
AroundRadiusAll,
AutomaticFacetFilter,
AutomaticFacetFilters,
BaseSearchParams,
BaseSearchParamsWithoutQuery,
BaseSearchResponse,
Condition,
Consequence,
ConsequenceHide,
ConsequenceParams,
ConsequenceQuery,
ConsequenceQueryObject,
CustomDeleteProps,
CustomGetProps,
CustomPostProps,
CustomPutProps,
DeletedAtResponse,
Distinct,
Edit,
EditType,
ErrorBase,
ExactOnSingleWordQuery,
Exhaustive,
FacetFilters,
FacetOrdering,
Facets,
FacetsStats,
HighlightResult,
HighlightResultOption,
IgnorePlurals,
IndexSettingsAsSearchParams,
MatchLevel,
MatchedGeoLocation,
Mode,
NumericFilters,
OptionalFilters,
Params,
Personalization,
Promote,
PromoteObjectID,
PromoteObjectIDs,
QueryType,
RankingInfo,
ReRankingApplyFilter,
Redirect,
RedirectRuleIndexMetadata,
RedirectRuleIndexMetadataData,
RemoveStopWords,
RemoveWordsIfNoResults,
RenderingContent,
SearchParams,
SearchParamsObject,
SearchParamsQuery,
SemanticSearch,
SnippetResult,
SnippetResultOption,
SortRemainingBy,
SupportedLanguage,
TagFilters,
TaskStatus,
TypoTolerance,
TypoToleranceEnum,
Value,
} from '@algolia/client-search/model';
export * from '@algolia/client-search/model';
export * from '@algolia/recommend/model';
export * from '@algolia/client-personalization/model';

@@ -19,2 +84,3 @@ export * from '@algolia/client-analytics/model';

export { SearchClient } from '@algolia/client-search';
export { RecommendClient } from '@algolia/recommend';
export { PersonalizationClient } from '@algolia/client-personalization';

@@ -25,7 +91,71 @@ export { AnalyticsClient } from '@algolia/client-analytics';

export {
ErrorBase,
CustomPutProps,
CustomPostProps,
AdvancedSyntaxFeatures,
AlternativesAsExact,
Anchoring,
AroundPrecision,
AroundPrecisionFromValueInner,
AroundRadius,
AroundRadiusAll,
AutomaticFacetFilter,
AutomaticFacetFilters,
BaseSearchParams,
BaseSearchParamsWithoutQuery,
BaseSearchResponse,
Condition,
Consequence,
ConsequenceHide,
ConsequenceParams,
ConsequenceQuery,
ConsequenceQueryObject,
CustomDeleteProps,
CustomGetProps,
CustomPostProps,
CustomPutProps,
DeletedAtResponse,
Distinct,
Edit,
EditType,
ErrorBase,
ExactOnSingleWordQuery,
Exhaustive,
FacetFilters,
FacetOrdering,
Facets,
FacetsStats,
HighlightResult,
HighlightResultOption,
IgnorePlurals,
IndexSettingsAsSearchParams,
MatchLevel,
MatchedGeoLocation,
Mode,
NumericFilters,
OptionalFilters,
Params,
Personalization,
Promote,
PromoteObjectID,
PromoteObjectIDs,
QueryType,
RankingInfo,
ReRankingApplyFilter,
Redirect,
RedirectRuleIndexMetadata,
RedirectRuleIndexMetadataData,
RemoveStopWords,
RemoveWordsIfNoResults,
RenderingContent,
SearchParams,
SearchParamsObject,
SearchParamsQuery,
SemanticSearch,
SnippetResult,
SnippetResultOption,
SortRemainingBy,
SupportedLanguage,
TagFilters,
TaskStatus,
TypoTolerance,
TypoToleranceEnum,
Value,
};

@@ -32,0 +162,0 @@

@@ -12,3 +12,2 @@ // 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.

import type { AnalyticsClient } from '@algolia/client-analytics';
import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient';
import {

@@ -18,4 +17,4 @@ createAnalyticsClient,

} from '@algolia/client-analytics/src/analyticsClient';
import type { Region as AnalyticsRegion } from '@algolia/client-analytics/src/analyticsClient';
import {
serializeQueryParameters,
DEFAULT_CONNECT_TIMEOUT_NODE,

@@ -26,2 +25,3 @@ DEFAULT_READ_TIMEOUT_NODE,

createNullCache,
serializeQueryParameters,
} from '@algolia/client-common';

@@ -42,2 +42,4 @@ import type {

} from '@algolia/client-search/src/searchClient';
import type { RecommendClient } from '@algolia/recommend';
import { createRecommendClient } from '@algolia/recommend/src/recommendClient';
import { createHttpRequester } from '@algolia/requester-node-http';

@@ -90,2 +92,10 @@

function initRecommend(initOptions: InitClientOptions = {}): RecommendClient {
return createRecommendClient({
...commonOptions,
...initOptions.options,
...initOptions,
});
}
function initAnalytics(

@@ -161,5 +171,6 @@ initOptions: InitClientOptions & InitClientRegion<AnalyticsRegion> = {}

},
initAbtesting,
initAnalytics,
initPersonalization,
initAbtesting,
initRecommend,
/**

@@ -177,3 +188,25 @@ * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.

}: GenerateSecuredApiKeyOptions): string {
const queryParameters = serializeQueryParameters(restrictions);
let mergedRestrictions = restrictions;
if (restrictions.searchParams) {
// merge searchParams with the root restrictions
mergedRestrictions = {
...restrictions,
...restrictions.searchParams,
};
delete mergedRestrictions.searchParams;
}
mergedRestrictions = Object.keys(mergedRestrictions)
.sort()
.reduce(
(acc, key) => {
// eslint-disable-next-line no-param-reassign
acc[key] = (mergedRestrictions as any)[key];
return acc;
},
{} as Record<string, unknown>
);
const queryParameters = serializeQueryParameters(mergedRestrictions);
return Buffer.from(

@@ -180,0 +213,0 @@ createHmac('sha256', parentApiKey)

4

dist/algoliasearch.umd.js

@@ -1,2 +0,2 @@

/*! algoliasearch.umd.js | 5.0.0-beta.4 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).algoliasearch={})}(this,(function(e){"use strict";function r(e,r,t="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=i=>new Promise(((o,d)=>{e(i).then((e=>(t&&t(e),r(e)?o(e):a&&a.validate(e)?d(new Error(a.message(e))):setTimeout((()=>{s(e).then(o).catch(d)}),n())))).catch((e=>{d(e)}))}));return s()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}function s(e){a().setItem(t,JSON.stringify(e))}return{get:(r,t,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const r=e.timeToLive?1e3*e.timeToLive:null,t=n(),a=Object.fromEntries(Object.entries(t).filter((([,e])=>void 0!==e.timestamp)));if(s(a),!r)return;s(Object.fromEntries(Object.entries(a).filter((([,e])=>{const t=(new Date).getTime();return!(e.timestamp+r<t)}))))}(),n()[JSON.stringify(r)]))).then((e=>Promise.all([e?e.value:t(),void 0!==e]))).then((([e,r])=>Promise.all([e,r||a.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},a().setItem(t,JSON.stringify(s)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,s={miss:()=>Promise.resolve()})=>t.get(e,a,s).catch((()=>n({caches:r}).get(e,a,s))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function s(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(t);if(s in r)return Promise.resolve(e.serializable?JSON.parse(r[s]):r[s]);const i=a();return i.then((e=>n.miss(e))).then((()=>i))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const i=12e4;function o(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>i},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=i}}}function d(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class c extends Error{constructor(e,r){super(e),d(this,"name","AlgoliaError"),r&&(this.name=r)}}class u extends c{constructor(e,r,t){super(e,t),d(this,"stackTrace",void 0),this.stackTrace=r}}class h extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends u{constructor(e,r,t,a="ApiError"){super(e,t,a),d(this,"status",void 0),this.status=r}}class m extends c{constructor(e,r){super(e,"DeserializationError"),d(this,"response",void 0),this.response=r}}class g extends l{constructor(e,r,t,a){super(e,r,a,"DetailedApiError"),d(this,"error",void 0),this.error=t}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${encodeURIComponent(r(e[t])?JSON.stringify(e[t]):e[t]).replaceAll("+","%20")}`)).join("&")}(t);let n=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===r.charAt(0)?r.substring(1):r}`;return a.length&&(n+=`?${a}`),n}function w(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function P({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:i,requestsCache:d,responsesCache:c}){async function u(d,c,u=!0){const P=[],y=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(d,c),q=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,d.headers,c.headers),f="GET"===d.method?{...d.data,...c.data}:{},x={...a,...d.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?x[e]=c.queryParameters[e].toString():x[e]=c.queryParameters[e];let E=0;const S=async(e,t)=>{const a=e.pop();if(void 0===a)throw new h(function(e){return e.map((e=>w(e)))}(P));let n=u?c.timeouts?.read||s.read:c.timeouts?.write||s.write;const f={data:y,headers:q,method:d.method,url:p(a,d.path,x),connectTimeout:t(E,c.timeouts?.connect||s.connect),responseTimeout:t(E,n)},v=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return P.push(t),t},b=await i.send(f);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&!~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(b)){const n=v(b);return b.isTimedOut&&E++,console.log("Retryable failure",w(n)),await r.set(a,o(a,b.isTimedOut?"timed out":"down")),S(e,t)}if(function({status:e}){return 2==~~(e/100)}(b))return function(e){try{return JSON.parse(e.content)}catch(r){throw new m(r.message,e)}}(b);throw v(b),function({content:e,status:r},t){try{const a=JSON.parse(e);return"error"in a?new g(a.message,r,a.error,t):new l(a.message,r,t)}catch(e){}return new l(e,r,t)}(b,P)},v=e.filter((e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept))),b=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(o(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(v);return S([...b.hosts].reverse(),b.getTimeout)}return{hostsCache:r,requester:i,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return u(e,r,n);const s=()=>u(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const i={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return c.get(i,(()=>d.get(i,(()=>d.set(i,s()).then((e=>Promise.all([d.delete(i),e])),(e=>Promise.all([d.delete(i),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>c.set(i,e)})},requestsCache:d,responsesCache:c}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const q="5.0.0-beta.4",f=["de","us"];const x="5.0.0-beta.4",E=["de","us"];const S="5.0.0-beta.4",v=["eu","us"];const b="5.0.0-beta.4";function T(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function D({appId:e,apiKey:a,authMode:n,algoliaAgents:s,...i}){const o=r(e,a,n),d=P({hosts:T(e),...i,algoliaAgent:y({algoliaAgents:s,client:"Search",version:b}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:r,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let i=0;return t({func:()=>this.getTask({indexName:e,taskID:r},s),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=a,message:()=>`The maximum number of retries exceeded. (${i}/${a})`},timeout:()=>n(i)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:a=(e=>Math.min(200*e,5e3))},n){let s=0;return t({func:()=>this.getAppTask({taskID:e},n),validate:e=>"published"===e.status,aggregator:()=>s+=1,error:{validate:()=>s>=r,message:()=>`The maximum number of retries exceeded. (${s}/${r})`},timeout:()=>a(s)})},waitForApiKey({operation:e,key:r,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},i){let o=0;const d={aggregator:()=>o+=1,error:{validate:()=>o>=n,message:()=>`The maximum number of retries exceeded. (${o}/${n})`},timeout:()=>s(o)};if("update"===e){if(!a)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t({...d,func:()=>this.getApiKey({key:r},i),validate:e=>{for(const r of Object.keys(a)){const t=a[r],n=e[r];if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length||t.some(((e,r)=>e!==n[r])))return!1}else if(t!==n)return!1}return!0}})}return t({...d,func:()=>this.getApiKey({key:r},i).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:r,...a},n){return t({func:t=>this.browse({indexName:e,browseParams:{cursor:t?t.cursor:void 0,...r}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:r,...a},n){const s={hitsPerPage:1e3,...r};return t({func:r=>this.searchRules({indexName:e,searchRulesParams:{...s,page:r?r.page+1:s.page||0}},n),validate:e=>e.nbHits<s.hitsPerPage,...a})},browseSynonyms({indexName:e,searchSynonymsParams:r,...a},n){const s={page:0,...r,hitsPerPage:1e3};return t({func:r=>{const t=this.searchSynonyms({indexName:e,searchSynonymsParams:{...s,page:s.page}},n);return s.page+=1,t},validate:e=>e.nbHits<s.hitsPerPage,...a})},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:a,batchSize:n=1e3},s){let i=[];const o=[],d=r.entries();for(const[a,c]of d)i.push({action:t,body:c}),i.length!==n&&a!==r.length-1||(o.push(await this.batch({indexName:e,batchWriteParams:{requests:i}},s)),i=[]);if(a)for(const r of o)await this.waitForTask({indexName:e,taskID:r.taskID});return o},async replaceAllObjects({indexName:e,objects:r,batchSize:t},a){const n=`${e}_tmp_${Math.random().toString(36).substring(7)}`;let s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:n,scope:["settings","rules","synonyms"]}},a);const i=await this.chunkedBatch({indexName:n,objects:r,waitForTasks:!0,batchSize:t},a);await this.waitForTask({indexName:n,taskID:s.taskID}),s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:n,scope:["settings","rules","synonyms"]}},a),await this.waitForTask({indexName:n,taskID:s.taskID});const o=await this.operationIndex({indexName:n,operationIndexParams:{operation:"move",destination:e}},a);return await this.waitForTask({indexName:n,taskID:o.taskID}),{copyOperationResponse:s,batchResponses:i,moveOperationResponse:o}},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return d.request(t,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const n={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return d.request(n,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return d.request(t,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return d.request(n,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const a={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return d.request(n,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");const a={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return d.request(a,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const t={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");const a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const t={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const a={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const t={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const a={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const n="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");const t={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const n="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");const t={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");const t={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return d.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return d.request(r,e)},getLogs({offset:e,length:r,indexName:t,type:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.length=r.toString()),void 0!==t&&(s.indexName=t.toString()),void 0!==a&&(s.type=a.toString());const i={method:"GET",path:"/1/logs",queryParameters:s,headers:{}};return d.request(i,n)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");const n="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.attributesToRetrieve=t.toString());const i={method:"GET",path:n,queryParameters:s,headers:{}};return d.request(i,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");const a={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const t={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return d.request(r,e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const a={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const a={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return d.request(r,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");const t={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},hasPendingMappings({getClusters:e}={},r=void 0){const t={};void 0!==e&&(t.getClusters=e.toString());const a={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return d.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return d.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return d.request(r,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return d.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return d.request(n,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return d.request(t,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.createIfNotExists=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const t={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");const t={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return d.request(t,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const t={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");const a={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");const s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");const s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.clearExistingRules=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.replaceExistingSynonyms=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},search(e,r){if(e&&Array.isArray(e)){const r={requests:e.map((({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const t={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const n={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return d.request(n,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const a={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const a={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return d.request(t,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const n="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"PUT",path:n,queryParameters:s,headers:{},data:r};return d.request(i,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const a={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)}}}const I=b;e.algoliasearch=function(e,t,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const o={apiKey:t,appId:e,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(s),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(s),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:n({caches:[a({key:`${I}-${e}`}),s()]}),...i};return{...D(o),get _ua(){return this.transporter.algoliaAgent.value},initAnalytics:function(e={}){if(e.region&&("string"!=typeof e.region||!E.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${E.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},getAddToCartRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return d.request(i,n)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return d.request(i,n)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return d.request(i,n)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return d.request(i,n)},getConversionRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return d.request(i,n)},getPurchaseRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return d.request(i,n)},getRevenue({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:o,headers:{}};return d.request(c,i)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:o,headers:{}};return d.request(c,i)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const t={};void 0!==e&&(t.index=e.toString());const a={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return d.request(a,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:o,headers:{}};return d.request(c,i)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return d.request(u,o)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:n,limit:s,offset:i,tags:o},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),h={};void 0!==r&&(h.index=r.toString()),void 0!==t&&(h.search=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==n&&(h.endDate=n.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==i&&(h.offset=i.toString()),void 0!==o&&(h.tags=o.toString());const l={method:"GET",path:u,queryParameters:h,headers:{}};return d.request(l,c)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return d.request(u,o)},getTopHits({index:e,search:r,clickAnalytics:t,revenueAnalytics:a,startDate:n,endDate:s,limit:i,offset:o,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.search=r.toString()),void 0!==t&&(h.clickAnalytics=t.toString()),void 0!==a&&(h.revenueAnalytics=a.toString()),void 0!==n&&(h.startDate=n.toString()),void 0!==s&&(h.endDate=s.toString()),void 0!==i&&(h.limit=i.toString()),void 0!==o&&(h.offset=o.toString()),void 0!==c&&(h.tags=c.toString());const l={method:"GET",path:"/2/hits",queryParameters:h,headers:{}};return d.request(l,u)},getTopSearches({index:e,clickAnalytics:r,revenueAnalytics:t,startDate:a,endDate:n,orderBy:s,direction:i,limit:o,offset:c,tags:u},h){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==t&&(l.revenueAnalytics=t.toString()),void 0!==a&&(l.startDate=a.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.orderBy=s.toString()),void 0!==i&&(l.direction=i.toString()),void 0!==o&&(l.limit=o.toString()),void 0!==c&&(l.offset=c.toString()),void 0!==u&&(l.tags=u.toString());const m={method:"GET",path:"/2/searches",queryParameters:l,headers:{}};return d.request(m,h)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return d.request(i,n)}}}({...o,...e.options,...e})},initPersonalization:function(e){if(!e.region||e.region&&("string"!=typeof e.region||!v.includes(e.region)))throw new Error(`\`region\` is required and must be one of the following: ${v.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:"personalization.{region}.algolia.com".replace("{region}",c),accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Personalization",version:S}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const t={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getPersonalizationStrategy(e){const r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return d.request(r,e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const t={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return d.request(t,r)}}}({...o,...e.options,...e})},initAbtesting:function(e={}){if(e.region&&("string"!=typeof e.region||!f.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${f.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Abtesting",version:q}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return d.request(t,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const t={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const t={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.limit=r.toString()),void 0!==t&&(s.indexPrefix=t.toString()),void 0!==a&&(s.indexSuffix=a.toString());const i={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return d.request(i,n)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const t={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)}}}({...o,...e.options,...e})}}},e.apiClientVersion=I}));
/*! algoliasearch.umd.js | 5.0.0-beta.5 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e="undefined"!=typeof globalThis?globalThis:e||self).algoliasearch={})}(this,(function(e){"use strict";function r(e,r,t="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=o=>new Promise(((i,d)=>{e(o).then((e=>(t&&t(e),r(e)?i(e):a&&a.validate(e)?d(new Error(a.message(e))):setTimeout((()=>{s(e).then(i).catch(d)}),n())))).catch((e=>{d(e)}))}));return s()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}function s(e){a().setItem(t,JSON.stringify(e))}return{get:(r,t,a={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const r=e.timeToLive?1e3*e.timeToLive:null,t=n(),a=Object.fromEntries(Object.entries(t).filter((([,e])=>void 0!==e.timestamp)));if(s(a),!r)return;s(Object.fromEntries(Object.entries(a).filter((([,e])=>{const t=(new Date).getTime();return!(e.timestamp+r<t)}))))}(),n()[JSON.stringify(r)]))).then((e=>Promise.all([e?e.value:t(),void 0!==e]))).then((([e,r])=>Promise.all([e,r||a.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const s=n();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:r},a().setItem(t,JSON.stringify(s)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,s={miss:()=>Promise.resolve()})=>t.get(e,a,s).catch((()=>n({caches:r}).get(e,a,s))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function s(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(t);if(s in r)return Promise.resolve(e.serializable?JSON.parse(r[s]):r[s]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const o=12e4;function i(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>o},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=o}}}function d(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class c extends Error{constructor(e,r){super(e),d(this,"name","AlgoliaError"),r&&(this.name=r)}}class u extends c{constructor(e,r,t){super(e,t),d(this,"stackTrace",void 0),this.stackTrace=r}}class h extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends u{constructor(e,r,t,a="ApiError"){super(e,t,a),d(this,"status",void 0),this.status=r}}class m extends c{constructor(e,r){super(e,"DeserializationError"),d(this,"response",void 0),this.response=r}}class p extends l{constructor(e,r,t,a){super(e,r,a,"DetailedApiError"),d(this,"error",void 0),this.error=t}}function g(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}function w(e,r,t){const a=(n=t,Object.keys(n).filter((e=>void 0!==n[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(n[e])?n[e].join(","):n[e]).replaceAll("+","%20")}`)).join("&"));var n;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===r.charAt(0)?r.substring(1):r}`;return a.length&&(s+=`?${a}`),s}function P(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function q({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:o,requestsCache:d,responsesCache:c}){async function u(d,c,u=!0){const g=[],q=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(d,c),y=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,d.headers,c.headers),f="GET"===d.method?{...d.data,...c.data}:{},x={...a,...d.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?x[e]=c.queryParameters[e].toString():x[e]=c.queryParameters[e];let E=0;const S=async(e,t)=>{const a=e.pop();if(void 0===a)throw new h(function(e){return e.map((e=>P(e)))}(g));let n=u?c.timeouts?.read||s.read:c.timeouts?.write||s.write;const f={data:q,headers:y,method:d.method,url:w(a,d.path,x),connectTimeout:t(E,c.timeouts?.connect||s.connect),responseTimeout:t(E,n)},v=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return g.push(t),t},b=await o.send(f);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&!~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(b)){const n=v(b);return b.isTimedOut&&E++,console.log("Retryable failure",P(n)),await r.set(a,i(a,b.isTimedOut?"timed out":"down")),S(e,t)}if(function({status:e}){return 2==~~(e/100)}(b))return function(e){try{return JSON.parse(e.content)}catch(r){throw new m(r.message,e)}}(b);throw v(b),function({content:e,status:r},t){try{const a=JSON.parse(e);return"error"in a?new p(a.message,r,a.error,t):new l(a.message,r,t)}catch(e){}return new l(e,r,t)}(b,g)},v=e.filter((e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept))),b=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(i(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(v);return S([...b.hosts].reverse(),b.getTimeout)}return{hostsCache:r,requester:o,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return u(e,r,n);const s=()=>u(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const o={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return c.get(o,(()=>d.get(o,(()=>d.set(o,s()).then((e=>Promise.all([d.delete(o),e])),(e=>Promise.all([d.delete(o),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>c.set(o,e)})},requestsCache:d,responsesCache:c}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const f="5.0.0-beta.5",x=["de","us"];const E="5.0.0-beta.5",S=["de","us"];const v="5.0.0-beta.5",b=["eu","us"];const T="5.0.0-beta.5";function I({appId:e,apiKey:a,authMode:n,algoliaAgents:s,...o}){const i=r(e,a,n),d=q({hosts:(c=e,[{url:`${c}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${c}.algolia.net`,accept:"write",protocol:"https"}].concat(g([{url:`${c}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${c}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${c}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))),...o,algoliaAgent:y({algoliaAgents:s,client:"Search",version:T}),baseHeaders:{"content-type":"text/plain",...i.headers(),...o.baseHeaders},baseQueryParameters:{...i.queryParameters(),...o.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:r,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let o=0;return t({func:()=>this.getTask({indexName:e,taskID:r},s),validate:e=>"published"===e.status,aggregator:()=>o+=1,error:{validate:()=>o>=a,message:()=>`The maximum number of retries exceeded. (${o}/${a})`},timeout:()=>n(o)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:a=(e=>Math.min(200*e,5e3))},n){let s=0;return t({func:()=>this.getAppTask({taskID:e},n),validate:e=>"published"===e.status,aggregator:()=>s+=1,error:{validate:()=>s>=r,message:()=>`The maximum number of retries exceeded. (${s}/${r})`},timeout:()=>a(s)})},waitForApiKey({operation:e,key:r,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},o){let i=0;const d={aggregator:()=>i+=1,error:{validate:()=>i>=n,message:()=>`The maximum number of retries exceeded. (${i}/${n})`},timeout:()=>s(i)};if("update"===e){if(!a)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t({...d,func:()=>this.getApiKey({key:r},o),validate:e=>{for(const r of Object.keys(a)){const t=a[r],n=e[r];if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length||t.some(((e,r)=>e!==n[r])))return!1}else if(t!==n)return!1}return!0}})}return t({...d,func:()=>this.getApiKey({key:r},o).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:r,...a},n){return t({func:t=>this.browse({indexName:e,browseParams:{cursor:t?t.cursor:void 0,...r}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:r,...a},n){const s={hitsPerPage:1e3,...r};return t({func:r=>this.searchRules({indexName:e,searchRulesParams:{...s,page:r?r.page+1:s.page||0}},n),validate:e=>e.nbHits<s.hitsPerPage,...a})},browseSynonyms({indexName:e,searchSynonymsParams:r,...a},n){const s={page:0,...r,hitsPerPage:1e3};return t({func:r=>{const t=this.searchSynonyms({indexName:e,searchSynonymsParams:{...s,page:s.page}},n);return s.page+=1,t},validate:e=>e.nbHits<s.hitsPerPage,...a})},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:a,batchSize:n=1e3},s){let o=[];const i=[],d=r.entries();for(const[a,c]of d)o.push({action:t,body:c}),o.length!==n&&a!==r.length-1||(i.push(await this.batch({indexName:e,batchWriteParams:{requests:o}},s)),o=[]);if(a)for(const r of i)await this.waitForTask({indexName:e,taskID:r.taskID});return i},async replaceAllObjects({indexName:e,objects:r,batchSize:t},a){const n=`${e}_tmp_${Math.random().toString(36).substring(7)}`;let s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:n,scope:["settings","rules","synonyms"]}},a);const o=await this.chunkedBatch({indexName:n,objects:r,waitForTasks:!0,batchSize:t},a);await this.waitForTask({indexName:n,taskID:s.taskID}),s=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:n,scope:["settings","rules","synonyms"]}},a),await this.waitForTask({indexName:n,taskID:s.taskID});const i=await this.operationIndex({indexName:n,operationIndexParams:{operation:"move",destination:e}},a);return await this.waitForTask({indexName:n,taskID:i.taskID}),{copyOperationResponse:s,batchResponses:o,moveOperationResponse:i}},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return d.request(t,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const n={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return d.request(n,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return d.request(t,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return d.request(n,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const a={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return d.request(n,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");const a={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return d.request(a,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const t={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");const a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const t={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const a={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const t={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const a={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const n="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const o={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(o,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");const t={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const n="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const o={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(o,a)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");const t={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");const t={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return d.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return d.request(r,e)},getLogs({offset:e,length:r,indexName:t,type:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.length=r.toString()),void 0!==t&&(s.indexName=t.toString()),void 0!==a&&(s.type=a.toString());const o={method:"GET",path:"/1/logs",queryParameters:s,headers:{}};return d.request(o,n)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");const n="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.attributesToRetrieve=t.toString());const o={method:"GET",path:n,queryParameters:s,headers:{}};return d.request(o,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");const a={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const t={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return d.request(r,e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const a={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const a={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return d.request(r,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");const t={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},hasPendingMappings({getClusters:e}={},r=void 0){const t={};void 0!==e&&(t.getClusters=e.toString());const a={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return d.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return d.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return d.request(r,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return d.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return d.request(n,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return d.request(t,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),o={};void 0!==a&&(o.createIfNotExists=a.toString());const i={method:"POST",path:s,queryParameters:o,headers:{},data:t};return d.request(i,n)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const t={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");const t={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return d.request(t,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const t={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");const a={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");const s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),o={};void 0!==a&&(o.forwardToReplicas=a.toString());const i={method:"PUT",path:s,queryParameters:o,headers:{},data:t};return d.request(i,n)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");const s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),o={};void 0!==t&&(o.forwardToReplicas=t.toString()),void 0!==a&&(o.clearExistingRules=a.toString());const i={method:"POST",path:s,queryParameters:o,headers:{},data:r};return d.request(i,n)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),o={};void 0!==a&&(o.forwardToReplicas=a.toString());const i={method:"PUT",path:s,queryParameters:o,headers:{},data:t};return d.request(i,n)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),o={};void 0!==t&&(o.forwardToReplicas=t.toString()),void 0!==a&&(o.replaceExistingSynonyms=a.toString());const i={method:"POST",path:s,queryParameters:o,headers:{},data:r};return d.request(i,n)},search(e,r){if(e&&Array.isArray(e)){const r={requests:e.map((({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const t={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const n={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return d.request(n,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const a={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const a={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return d.request(t,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const n="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const o={method:"PUT",path:n,queryParameters:s,headers:{},data:r};return d.request(o,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const a={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)}}}const D="5.0.0-beta.5";const R=T;e.algoliasearch=function(e,t,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const i={apiKey:t,appId:e,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(s),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(s),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:n({caches:[a({key:`${R}-${e}`}),s()]}),...o};return{...I(i),get _ua(){return this.transporter.algoliaAgent.value},initAbtesting:function(e={}){if(e.region&&("string"!=typeof e.region||!x.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${x.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...o}){const i=r(e,t,a),d=q({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:y({algoliaAgents:n,client:"Abtesting",version:f}),baseHeaders:{"content-type":"text/plain",...i.headers(),...o.baseHeaders},baseQueryParameters:{...i.queryParameters(),...o.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return d.request(t,r)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const t={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const t={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.limit=r.toString()),void 0!==t&&(s.indexPrefix=t.toString()),void 0!==a&&(s.indexSuffix=a.toString());const o={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return d.request(o,n)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const t={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)}}}({...i,...e.options,...e})},initAnalytics:function(e={}){if(e.region&&("string"!=typeof e.region||!S.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${S.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...o}){const i=r(e,t,a),d=q({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:y({algoliaAgents:n,client:"Analytics",version:E}),baseHeaders:{"content-type":"text/plain",...i.headers(),...o.baseHeaders},baseQueryParameters:{...i.queryParameters(),...o.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},getAddToCartRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return d.request(o,n)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return d.request(o,n)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return d.request(o,n)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return d.request(o,n)},getConversionRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return d.request(o,n)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return d.request(o,n)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return d.request(o,n)},getPurchaseRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return d.request(o,n)},getRevenue({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return d.request(o,n)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return d.request(o,n)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const i={};void 0!==e&&(i.index=e.toString()),void 0!==r&&(i.startDate=r.toString()),void 0!==t&&(i.endDate=t.toString()),void 0!==a&&(i.limit=a.toString()),void 0!==n&&(i.offset=n.toString()),void 0!==s&&(i.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:i,headers:{}};return d.request(c,o)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const i={};void 0!==e&&(i.index=e.toString()),void 0!==r&&(i.startDate=r.toString()),void 0!==t&&(i.endDate=t.toString()),void 0!==a&&(i.limit=a.toString()),void 0!==n&&(i.offset=n.toString()),void 0!==s&&(i.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:i,headers:{}};return d.request(c,o)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const t={};void 0!==e&&(t.index=e.toString());const a={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return d.request(a,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const i={};void 0!==e&&(i.index=e.toString()),void 0!==r&&(i.startDate=r.toString()),void 0!==t&&(i.endDate=t.toString()),void 0!==a&&(i.limit=a.toString()),void 0!==n&&(i.offset=n.toString()),void 0!==s&&(i.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:i,headers:{}};return d.request(c,o)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:o},i){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==o&&(c.tags=o.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return d.request(u,i)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:n,limit:s,offset:o,tags:i},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),h={};void 0!==r&&(h.index=r.toString()),void 0!==t&&(h.search=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==n&&(h.endDate=n.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==o&&(h.offset=o.toString()),void 0!==i&&(h.tags=i.toString());const l={method:"GET",path:u,queryParameters:h,headers:{}};return d.request(l,c)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:o},i){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==o&&(c.tags=o.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return d.request(u,i)},getTopHits({index:e,search:r,clickAnalytics:t,revenueAnalytics:a,startDate:n,endDate:s,limit:o,offset:i,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.search=r.toString()),void 0!==t&&(h.clickAnalytics=t.toString()),void 0!==a&&(h.revenueAnalytics=a.toString()),void 0!==n&&(h.startDate=n.toString()),void 0!==s&&(h.endDate=s.toString()),void 0!==o&&(h.limit=o.toString()),void 0!==i&&(h.offset=i.toString()),void 0!==c&&(h.tags=c.toString());const l={method:"GET",path:"/2/hits",queryParameters:h,headers:{}};return d.request(l,u)},getTopSearches({index:e,clickAnalytics:r,revenueAnalytics:t,startDate:a,endDate:n,orderBy:s,direction:o,limit:i,offset:c,tags:u},h){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==t&&(l.revenueAnalytics=t.toString()),void 0!==a&&(l.startDate=a.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.orderBy=s.toString()),void 0!==o&&(l.direction=o.toString()),void 0!==i&&(l.limit=i.toString()),void 0!==c&&(l.offset=c.toString()),void 0!==u&&(l.tags=u.toString());const m={method:"GET",path:"/2/searches",queryParameters:l,headers:{}};return d.request(m,h)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const o={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return d.request(o,n)}}}({...i,...e.options,...e})},initPersonalization:function(e){if(!e.region||e.region&&("string"!=typeof e.region||!b.includes(e.region)))throw new Error(`\`region\` is required and must be one of the following: ${b.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...o}){const i=r(e,t,a),d=q({hosts:(c=s,[{url:"personalization.{region}.algolia.com".replace("{region}",c),accept:"readWrite",protocol:"https"}]),...o,algoliaAgent:y({algoliaAgents:n,client:"Personalization",version:v}),baseHeaders:{"content-type":"text/plain",...i.headers(),...o.baseHeaders},baseQueryParameters:{...i.queryParameters(),...o.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const t={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getPersonalizationStrategy(e){const r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return d.request(r,e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const t={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return d.request(t,r)}}}({...i,...e.options,...e})},initRecommend:function(e={}){return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,...s}){const o=r(e,t,a),i=q({hosts:(d=e,[{url:`${d}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${d}.algolia.net`,accept:"write",protocol:"https"}].concat(g([{url:`${d}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${d}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${d}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))),...s,algoliaAgent:y({algoliaAgents:n,client:"Recommend",version:D}),baseHeaders:{"content-type":"text/plain",...o.headers(),...s.baseHeaders},baseQueryParameters:{...o.queryParameters(),...s.baseQueryParameters}});var d;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,r){i.algoliaAgent.add({segment:e,version:r})},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const a={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(a,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const a={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return i.request(a,t)},customPost({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const n={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(n,a)},customPut({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const n={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return i.request(n,a)},deleteRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `deleteRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `deleteRecommendRule`.");const n={method:"DELETE",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(n,a)},getRecommendRule({indexName:e,model:r,objectID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendRule`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendRule`.");if(!t)throw new Error("Parameter `objectID` is required when calling `getRecommendRule`.");const n={method:"GET",path:"/1/indexes/{indexName}/{model}/recommend/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{objectID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(n,a)},getRecommendStatus({indexName:e,model:r,taskID:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getRecommendStatus`.");if(!r)throw new Error("Parameter `model` is required when calling `getRecommendStatus`.");if(!t)throw new Error("Parameter `taskID` is required when calling `getRecommendStatus`.");const n={method:"GET",path:"/1/indexes/{indexName}/{model}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)).replace("{taskID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return i.request(n,a)},getRecommendations(e,r){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const t={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return i.request(t,r)},searchRecommendRules({indexName:e,model:r,searchRecommendRulesParams:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRecommendRules`.");if(!r)throw new Error("Parameter `model` is required when calling `searchRecommendRules`.");const n={method:"POST",path:"/1/indexes/{indexName}/{model}/recommend/rules/search".replace("{indexName}",encodeURIComponent(e)).replace("{model}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return i.request(n,a)}}}({...i,...e.options,...e})}}},e.apiClientVersion=R}));

@@ -8,5 +8,6 @@ import type { AbtestingClient } from '@algolia/client-abtesting';

import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient';
import type { RecommendClient } from '@algolia/recommend';
import type { InitClientOptions, InitClientRegion } from './models';
export * from './models';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
/**

@@ -18,86 +19,87 @@ * The client type.

_ua: string;
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
initAnalytics: (initOptions?: InitClientOptions & InitClientRegion<AnalyticsRegion>) => AnalyticsClient;
initPersonalization: (initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>) => PersonalizationClient;
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
initRecommend: (initOptions?: InitClientOptions) => RecommendClient;
transporter: import("@algolia/client-common").Transporter;
appId: string;
clearCache(): Promise<void>;
addAlgoliaAgent(segment: string, version?: string | undefined): void;
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
addAlgoliaAgent(segment: string, version?: string): void;
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchForHits<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
results: Array<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
}>;
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
}>;
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("@algolia/client-search/model/clientMethodProps").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customPut({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
deleteApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteApiKeyResponse").DeleteApiKeyResponse>;
deleteBy({ indexName, deleteByParams }: import("@algolia/client-search/model/clientMethodProps").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteIndex({ indexName }: import("@algolia/client-search/model/clientMethodProps").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteObject({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteRule({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("@algolia/client-search/model/clientMethodProps").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
browse<T>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customPut({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
deleteApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deleteApiKeyResponse").DeleteApiKeyResponse>;
deleteBy({ indexName, deleteByParams }: import("@algolia/client-search/model/clientMethodProps").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteIndex({ indexName }: import("@algolia/client-search/model/clientMethodProps").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteObject({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteRule({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
getLogs({ offset, length, indexName, type }?: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
getObjects<T_3>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_3>>;
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/rule").Rule>;
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
getSynonym({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/synonymHit").SynonymHit>;
getTask({ indexName, taskID }: import("@algolia/client-search/model/clientMethodProps").GetTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getTopUserIds(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTopUserIdsResponse").GetTopUserIdsResponse>;
getUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").GetUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/userId").UserId>;
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, string>>;
getObjects<T>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T>>;
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/rule").Rule>;
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
getSources(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/source").Source[]>;
getSynonym({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/synonymHit").SynonymHit>;
getTask({ indexName, taskID }: import("@algolia/client-search/model/clientMethodProps").GetTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getTopUserIds(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTopUserIdsResponse").GetTopUserIdsResponse>;
getUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").GetUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/userId").UserId>;
hasPendingMappings({ getClusters }?: import("@algolia/client-search/model/clientMethodProps").HasPendingMappingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/hasPendingMappingsResponse").HasPendingMappingsResponse>;
listApiKeys(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listApiKeysResponse").ListApiKeysResponse>;
listClusters(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listClustersResponse").ListClustersResponse>;
listApiKeys(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/listApiKeysResponse").ListApiKeysResponse>;
listClusters(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/listClustersResponse").ListClustersResponse>;
listIndices({ page, hitsPerPage }?: import("@algolia/client-search/model/clientMethodProps").ListIndicesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listIndicesResponse").ListIndicesResponse>;
listUserIds({ page, hitsPerPage }?: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
replaceSources({ source }: import("@algolia/client-search/model/clientMethodProps").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceSourceResponse").ReplaceSourceResponse>;
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
search<T_4>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_4>>;
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchDictionaryEntriesResponse").SearchDictionaryEntriesResponse>;
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
searchSingleIndex<T_5>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_5>>;
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
updateApiKey({ key, apiKey }: import("@algolia/client-search/model/clientMethodProps").UpdateApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updateApiKeyResponse").UpdateApiKeyResponse>;
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
replaceSources({ source }: import("@algolia/client-search/model/clientMethodProps").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceSourceResponse").ReplaceSourceResponse>;
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
search<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T>>;
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchDictionaryEntriesResponse").SearchDictionaryEntriesResponse>;
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
searchSingleIndex<T>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
updateApiKey({ key, apiKey }: import("@algolia/client-search/model/clientMethodProps").UpdateApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updateApiKeyResponse").UpdateApiKeyResponse>;
};
//# sourceMappingURL=browser.d.ts.map
import type { ClientOptions } from '@algolia/client-common';
import { ErrorBase, CustomPutProps, CustomPostProps, CustomDeleteProps, CustomGetProps } from '@algolia/client-search/model';
import { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundPrecisionFromValueInner, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, Facets, FacetsStats, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexMetadata, RedirectRuleIndexMetadataData, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, SupportedLanguage, TagFilters, TaskStatus, TypoTolerance, TypoToleranceEnum, Value } from '@algolia/client-search/model';
export * from '@algolia/client-search/model';
export * from '@algolia/recommend/model';
export * from '@algolia/client-personalization/model';

@@ -8,6 +9,7 @@ export * from '@algolia/client-analytics/model';

export { SearchClient } from '@algolia/client-search';
export { RecommendClient } from '@algolia/recommend';
export { PersonalizationClient } from '@algolia/client-personalization';
export { AnalyticsClient } from '@algolia/client-analytics';
export { AbtestingClient } from '@algolia/client-abtesting';
export { ErrorBase, CustomPutProps, CustomPostProps, CustomDeleteProps, CustomGetProps, };
export { AdvancedSyntaxFeatures, AlternativesAsExact, Anchoring, AroundPrecision, AroundPrecisionFromValueInner, AroundRadius, AroundRadiusAll, AutomaticFacetFilter, AutomaticFacetFilters, BaseSearchParams, BaseSearchParamsWithoutQuery, BaseSearchResponse, Condition, Consequence, ConsequenceHide, ConsequenceParams, ConsequenceQuery, ConsequenceQueryObject, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeletedAtResponse, Distinct, Edit, EditType, ErrorBase, ExactOnSingleWordQuery, Exhaustive, FacetFilters, FacetOrdering, Facets, FacetsStats, HighlightResult, HighlightResultOption, IgnorePlurals, IndexSettingsAsSearchParams, MatchLevel, MatchedGeoLocation, Mode, NumericFilters, OptionalFilters, Params, Personalization, Promote, PromoteObjectID, PromoteObjectIDs, QueryType, RankingInfo, ReRankingApplyFilter, Redirect, RedirectRuleIndexMetadata, RedirectRuleIndexMetadataData, RemoveStopWords, RemoveWordsIfNoResults, RenderingContent, SearchParams, SearchParamsObject, SearchParamsQuery, SemanticSearch, SnippetResult, SnippetResultOption, SortRemainingBy, SupportedLanguage, TagFilters, TaskStatus, TypoTolerance, TypoToleranceEnum, Value, };
/**

@@ -14,0 +16,0 @@ * Options forwarded to the client initialized via the `init` method.

@@ -8,5 +8,6 @@ import type { AbtestingClient } from '@algolia/client-abtesting';

import type { Region as PersonalizationRegion } from '@algolia/client-personalization/src/personalizationClient';
import type { RecommendClient } from '@algolia/recommend';
import type { InitClientOptions, InitClientRegion, GenerateSecuredApiKeyOptions, GetSecuredApiKeyRemainingValidityOptions } from './models';
export * from './models';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
/**

@@ -18,5 +19,6 @@ * The client type.

_ua: string;
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
initAnalytics: (initOptions?: InitClientOptions & InitClientRegion<AnalyticsRegion>) => AnalyticsClient;
initPersonalization: (initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>) => PersonalizationClient;
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
initRecommend: (initOptions?: InitClientOptions) => RecommendClient;
/**

@@ -42,80 +44,80 @@ * Helper: Generates a secured API key based on the given `parentApiKey` and given `restrictions`.

clearCache(): Promise<void>;
addAlgoliaAgent(segment: string, version?: string | undefined): void;
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
addAlgoliaAgent(segment: string, version?: string): void;
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
browseSynonyms({ indexName, searchSynonymsParams, ...browseSynonymsOptions }: import("@algolia/client-search/model/clientMethodProps").BrowseOptions<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchForHits<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
results: Array<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
}>;
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<{
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
}>;
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("@algolia/client-search/model/clientMethodProps").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
customPut({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
deleteApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteApiKeyResponse").DeleteApiKeyResponse>;
deleteBy({ indexName, deleteByParams }: import("@algolia/client-search/model/clientMethodProps").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteIndex({ indexName }: import("@algolia/client-search/model/clientMethodProps").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteObject({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteRule({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
chunkedBatch({ indexName, objects, action, waitForTasks, batchSize, }: import("@algolia/client-search/model/clientMethodProps").ChunkedBatchOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse[]>;
replaceAllObjects({ indexName, objects, batchSize }: import("@algolia/client-search/model/clientMethodProps").ReplaceAllObjectsOptions, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceAllObjectsResponse").ReplaceAllObjectsResponse>;
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
assignUserId({ xAlgoliaUserID, assignUserIdParams }: import("@algolia/client-search/model/clientMethodProps").AssignUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
browse<T>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
clearSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
customDelete({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customGet({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customPost({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
customPut({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
deleteApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").DeleteApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deleteApiKeyResponse").DeleteApiKeyResponse>;
deleteBy({ indexName, deleteByParams }: import("@algolia/client-search/model/clientMethodProps").DeleteByProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteIndex({ indexName }: import("@algolia/client-search/model/clientMethodProps").DeleteIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteObject({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").DeleteObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
deleteRule({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
getAppTask({ taskID }: import("@algolia/client-search/model/clientMethodProps").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
getLogs({ offset, length, indexName, type }?: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
getObjects<T_3>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_3>>;
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/rule").Rule>;
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
getSynonym({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/synonymHit").SynonymHit>;
getTask({ indexName, taskID }: import("@algolia/client-search/model/clientMethodProps").GetTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getTopUserIds(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTopUserIdsResponse").GetTopUserIdsResponse>;
getUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").GetUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/userId").UserId>;
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, string>>;
getObjects<T>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T>>;
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/rule").Rule>;
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
getSources(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/source").Source[]>;
getSynonym({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/synonymHit").SynonymHit>;
getTask({ indexName, taskID }: import("@algolia/client-search/model/clientMethodProps").GetTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
getTopUserIds(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/getTopUserIdsResponse").GetTopUserIdsResponse>;
getUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").GetUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/userId").UserId>;
hasPendingMappings({ getClusters }?: import("@algolia/client-search/model/clientMethodProps").HasPendingMappingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/hasPendingMappingsResponse").HasPendingMappingsResponse>;
listApiKeys(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listApiKeysResponse").ListApiKeysResponse>;
listClusters(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listClustersResponse").ListClustersResponse>;
listApiKeys(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/listApiKeysResponse").ListApiKeysResponse>;
listClusters(requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/listClustersResponse").ListClustersResponse>;
listIndices({ page, hitsPerPage }?: import("@algolia/client-search/model/clientMethodProps").ListIndicesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listIndicesResponse").ListIndicesResponse>;
listUserIds({ page, hitsPerPage }?: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
replaceSources({ source }: import("@algolia/client-search/model/clientMethodProps").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/replaceSourceResponse").ReplaceSourceResponse>;
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
search<T_4>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_4>>;
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchDictionaryEntriesResponse").SearchDictionaryEntriesResponse>;
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
searchSingleIndex<T_5>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_5>>;
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
updateApiKey({ key, apiKey }: import("@algolia/client-search/model/clientMethodProps").UpdateApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updateApiKeyResponse").UpdateApiKeyResponse>;
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
replaceSources({ source }: import("@algolia/client-search/model/clientMethodProps").ReplaceSourcesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/replaceSourceResponse").ReplaceSourceResponse>;
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
search<T>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T>>;
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchDictionaryEntriesResponse").SearchDictionaryEntriesResponse>;
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
searchSingleIndex<T>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T>>;
searchSynonyms({ indexName, searchSynonymsParams }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
setSettings({ indexName, indexSettings, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
updateApiKey({ key, apiKey }: import("@algolia/client-search/model/clientMethodProps").UpdateApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("@algolia/client-search/model/updateApiKeyResponse").UpdateApiKeyResponse>;
};
//# sourceMappingURL=node.d.ts.map

@@ -7,3 +7,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';

import type { ListABTestsResponse } from '../model/listABTestsResponse';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
export declare const REGIONS: readonly ["de", "us"];

@@ -10,0 +10,0 @@ export type Region = (typeof REGIONS)[number];

@@ -23,3 +23,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';

import type { GetUsersCountResponse } from '../model/getUsersCountResponse';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
export declare const REGIONS: readonly ["de", "us"];

@@ -26,0 +26,0 @@ export type Region = (typeof REGIONS)[number];

@@ -7,3 +7,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';

import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
export declare const REGIONS: readonly ["eu", "us"];

@@ -10,0 +10,0 @@ export type Region = (typeof REGIONS)[number];

@@ -60,5 +60,5 @@ import type { SupportedLanguage } from './supportedLanguage';

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;
/**

@@ -65,0 +65,0 @@ * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).

@@ -102,5 +102,5 @@ import type { Exhaustive } from './exhaustive';

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;
/**

@@ -107,0 +107,0 @@ * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).

@@ -25,3 +25,3 @@ import type { CreateIterablePromise } from '@algolia/client-common';

import type { SearchSynonymsParams } from './searchSynonymsParams';
import type { SecuredAPIKeyRestrictions } from './securedAPIKeyRestrictions';
import type { SecuredApiKeyRestrictions } from './securedApiKeyRestrictions';
import type { Source } from './source';

@@ -729,3 +729,3 @@ import type { SynonymHit } from './synonymHit';

*/
restrictions?: SecuredAPIKeyRestrictions;
restrictions?: SecuredApiKeyRestrictions;
};

@@ -732,0 +732,0 @@ export type GetSecuredApiKeyRemainingValidityOptions = {

@@ -144,3 +144,3 @@ export * from './acl';

export * from './searchUserIdsResponse';
export * from './securedAPIKeyRestrictions';
export * from './securedApiKeyRestrictions';
export * from './semanticSearch';

@@ -147,0 +147,0 @@ export * from './snippetResult';

@@ -50,3 +50,3 @@ import type { CreateClientOptions, RequestOptions, ApiError } from '@algolia/client-common';

import type { UserId } from '../model/userId';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {

@@ -153,4 +153,4 @@ transporter: import("@algolia/client-common").Transporter;

*/
searchForHits<T_1>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
results: SearchResponse<T_1>[];
searchForHits<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
results: Array<SearchResponse<T>>;
}>;

@@ -282,3 +282,3 @@ /**

*/
browse<T_2>({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T_2>>;
browse<T>({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T>>;
/**

@@ -513,3 +513,3 @@ * Deletes only the records from an index while keeping settings, synonyms, and rules.

*/
getObjects<T_3>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T_3>>;
getObjects<T>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T>>;
/**

@@ -787,3 +787,3 @@ * Retrieves a rule by its ID. To find the object ID of rules, use the [`search` operation](#tag/Rules/operation/searchRules).

*/
search<T_4>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<SearchResponses<T_4>>;
search<T>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<SearchResponses<T>>;
/**

@@ -837,3 +837,3 @@ * Searches for standard and custom dictionary entries.

*/
searchSingleIndex<T_5>({ indexName, searchParams }: SearchSingleIndexProps, requestOptions?: RequestOptions): Promise<SearchResponse<T_5>>;
searchSingleIndex<T>({ indexName, searchParams }: SearchSingleIndexProps, requestOptions?: RequestOptions): Promise<SearchResponse<T>>;
/**

@@ -840,0 +840,0 @@ * Searches for synonyms in your index.

@@ -13,6 +13,7 @@ import type { ClientOptions } from '@algolia/client-common';

readonly _ua: string;
addAlgoliaAgent(segment: string, version?: string | undefined): void;
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").SearchResponses<T>>;
addAlgoliaAgent(segment: string, version?: string): void;
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams | import("../model").LegacyGetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendationsResponse>;
search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponses<T>>;
};
//# sourceMappingURL=browser.d.ts.map

@@ -13,6 +13,7 @@ import type { ClientOptions } from '@algolia/client-common';

readonly _ua: string;
addAlgoliaAgent(segment: string, version?: string | undefined): void;
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").SearchResponses<T>>;
addAlgoliaAgent(segment: string, version?: string): void;
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>;
getRecommendations(getRecommendationsParams: import("../model").GetRecommendationsParams | import("../model").LegacyGetRecommendationsParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetRecommendationsResponse>;
search<T>(searchMethodParams: import("../model").LegacySearchMethodProps | import("../model").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").SearchResponses<T>>;
};
//# sourceMappingURL=node.d.ts.map

@@ -285,4 +285,3 @@ function createAuth(appId, apiKey, authMode = 'WithinHeaders') {

function serializeQueryParameters(parameters) {
const isObjectOrArray = value => Object.prototype.toString.call(value) === '[object Object]' || Object.prototype.toString.call(value) === '[object Array]';
return Object.keys(parameters).map(key => `${key}=${encodeURIComponent(isObjectOrArray(parameters[key]) ? JSON.stringify(parameters[key]) : parameters[key]).replaceAll('+', '%20')}`).join('&');
return Object.keys(parameters).filter(key => parameters[key] !== undefined).sort().map(key => `${key}=${encodeURIComponent(Object.prototype.toString.call(parameters[key]) === '[object Array]' ? parameters[key].join(',') : parameters[key]).replaceAll('+', '%20')}`).join('&');
}

@@ -692,3 +691,3 @@ function serializeData(request, requestOptions) {

// 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.
const apiClientVersion = '5.0.0-beta.4';
const apiClientVersion = '5.0.0-beta.5';
function getDefaultHosts(appId) {

@@ -801,2 +800,39 @@ return [

/**
* Retrieves recommendations from selected AI models.
*
* Required API Key ACLs:
* - search.
*
* @param getRecommendationsParams - The getRecommendationsParams object.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRecommendations(getRecommendationsParams, requestOptions) {
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
const newSignatureRequest = {
requests: getRecommendationsParams,
};
// eslint-disable-next-line no-param-reassign
getRecommendationsParams = newSignatureRequest;
}
if (!getRecommendationsParams) {
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
}
if (!getRecommendationsParams.requests) {
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
}
const requestPath = '/1/indexes/*/recommendations';
const headers = {};
const queryParameters = {};
const request = {
method: 'POST',
path: requestPath,
queryParameters,
headers,
data: getRecommendationsParams,
useReadTransporter: true,
cacheable: true,
};
return transporter.request(request, requestOptions);
},
/**
* Sends multiple search request 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.

@@ -803,0 +839,0 @@ *

@@ -5,3 +5,3 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common';

// 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.
const apiClientVersion = '5.0.0-beta.4';
const apiClientVersion = '5.0.0-beta.5';
function getDefaultHosts(appId) {

@@ -114,2 +114,39 @@ return [

/**
* Retrieves recommendations from selected AI models.
*
* Required API Key ACLs:
* - search.
*
* @param getRecommendationsParams - The getRecommendationsParams object.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRecommendations(getRecommendationsParams, requestOptions) {
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
const newSignatureRequest = {
requests: getRecommendationsParams,
};
// eslint-disable-next-line no-param-reassign
getRecommendationsParams = newSignatureRequest;
}
if (!getRecommendationsParams) {
throw new Error('Parameter `getRecommendationsParams` is required when calling `getRecommendations`.');
}
if (!getRecommendationsParams.requests) {
throw new Error('Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.');
}
const requestPath = '/1/indexes/*/recommendations';
const headers = {};
const queryParameters = {};
const request = {
method: 'POST',
path: requestPath,
queryParameters,
headers,
data: getRecommendationsParams,
useReadTransporter: true,
cacheable: true,
};
return transporter.request(request, requestOptions);
},
/**
* Sends multiple search request 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.

@@ -116,0 +153,0 @@ *

@@ -1,2 +0,2 @@

/*! algoliasearch/lite.umd.js | 5.0.0-beta.4 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function o(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(o(s),!t)return;o(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,f),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,f.headers),b="GET"===c.method?{...c.data,...f.data}:{},w={...s,...c.queryParameters,...b};if(a.value&&(w["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?w[e]=f.queryParameters[e].toString():w[e]=f.queryParameters[e];let O=0;const T=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g?f.timeouts?.read||n.read:f.timeouts?.write||n.write;const b={data:v,headers:P,method:c.method,url:h(s,c.path,w),connectTimeout:r(O,f.timeouts?.connect||n.connect),responseTimeout:r(O,a)},q=t=>{const r={request:b,response:t,host:s,triesLeft:e.length};return y.push(r),r},S=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(S)){const a=q(S);return S.isTimedOut&&O++,console.log("Retryable failure",p(a)),await t.set(s,o(s,S.isTimedOut?"timed out":"down")),T(e,r)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(S);throw q(S),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(S,y)},q=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),S=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(q);return T([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(n,e)})},requestsCache:c,responsesCache:f}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-beta.4";function v(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.liteClient=function(e,a,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),n=f({hosts:v(e),...a,algoliaAgent:g({algoliaAgents:s,client:"Lite",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...a.baseHeaders},baseQueryParameters:{...o.queryParameters(),...a.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map((({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...o})}}));
/*! algoliasearch/lite.umd.js | 5.0.0-beta.5 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function o(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(o(s),!t)return;o(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),n(this,"status",void 0),this.status=t}}class m extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class d extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function h(e,t,r){const s=(a=r,Object.keys(a).filter((e=>void 0!==a[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(a[e])?a[e].join(","):a[e]).replaceAll("+","%20")}`)).join("&"));var a;let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(o+=`?${s}`),o}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,f),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,f.headers),w="GET"===c.method?{...c.data,...f.data}:{},b={...s,...c.queryParameters,...w};if(a.value&&(b["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?b[e]=f.queryParameters[e].toString():b[e]=f.queryParameters[e];let q=0;const O=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=g?f.timeouts?.read||n.read:f.timeouts?.write||n.write;const w={data:v,headers:P,method:c.method,url:h(s,c.path,b),connectTimeout:r(q,f.timeouts?.connect||n.connect),responseTimeout:r(q,a)},T=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return y.push(r),r},S=await i.send(w);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(S)){const a=T(S);return S.isTimedOut&&q++,console.log("Retryable failure",p(a)),await t.set(s,o(s,S.isTimedOut?"timed out":"down")),O(e,r)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(S);throw T(S),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(S,y)},T=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),S=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(T);return O([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(n,e)})},requestsCache:c,responsesCache:f}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-beta.5";function v(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.liteClient=function(e,a,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),n=f({hosts:v(e),...a,algoliaAgent:g({algoliaAgents:s,client:"Lite",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...a.baseHeaders},baseQueryParameters:{...o.queryParameters(),...a.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)},getRecommendations(e,t){if(e&&Array.isArray(e)&&(e={requests:e}),!e)throw new Error("Parameter `getRecommendationsParams` is required when calling `getRecommendations`.");if(!e.requests)throw new Error("Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.");const r={method:"POST",path:"/1/indexes/*/recommendations",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map((({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...o})}}));

@@ -60,5 +60,5 @@ import type { SupportedLanguage } from './supportedLanguage';

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;
/**

@@ -65,0 +65,0 @@ * Characters and their normalized replacements. This overrides Algolia\'s default [normalization](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/normalization/).

@@ -102,5 +102,5 @@ import type { Exhaustive } from './exhaustive';

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;
/**

@@ -107,0 +107,0 @@ * Unique identifier for the query. This is used for [click analytics](https://www.algolia.com/doc/guides/analytics/click-analytics/).

@@ -0,1 +1,2 @@

import type { RecommendationsRequest } from './recommendationsRequest';
import type { SearchForFacetsOptions } from './searchForFacetsOptions';

@@ -22,2 +23,8 @@ import type { SearchForHitsOptions } from './searchForHitsOptions';

/**
* Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
*
* @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
*/
export type LegacyGetRecommendationsParams = RecommendationsRequest[];
/**
* In v4, the search parameters are wrapped in a `params` parameter.

@@ -24,0 +31,0 @@ *

@@ -13,5 +13,7 @@ export * from './acl';

export * from './baseIndexSettings';
export * from './baseRecommendRequest';
export * from './baseSearchParams';
export * from './baseSearchParamsWithoutQuery';
export * from './baseSearchResponse';
export * from './boughtTogetherQuery';
export * from './browseParamsObject';

@@ -34,3 +36,8 @@ export * from './browseResponse';

export * from './facetsStats';
export * from './fallbackParams';
export * from './fbtModel';
export * from './frequentlyBoughtTogether';
export * from './getApiKeyResponse';
export * from './getRecommendationsParams';
export * from './getRecommendationsResponse';
export * from './highlightResult';

@@ -42,2 +49,5 @@ export * from './highlightResultOption';

export * from './indexSettingsAsSearchParams';
export * from './lookingSimilar';
export * from './lookingSimilarModel';
export * from './lookingSimilarQuery';
export * from './matchLevel';

@@ -53,5 +63,16 @@ export * from './matchedGeoLocation';

export * from './reRankingApplyFilter';
export * from './recommendHit';
export * from './recommendationsHit';
export * from './recommendationsHits';
export * from './recommendationsRequest';
export * from './recommendationsResults';
export * from './recommendedForYou';
export * from './recommendedForYouModel';
export * from './recommendedForYouQuery';
export * from './redirect';
export * from './redirectRuleIndexMetadata';
export * from './redirectRuleIndexMetadataData';
export * from './relatedModel';
export * from './relatedProducts';
export * from './relatedQuery';
export * from './removeStopWords';

@@ -70,3 +91,2 @@ export * from './removeWordsIfNoResults';

export * from './searchParamsQuery';
export * from './searchParamsString';
export * from './searchQuery';

@@ -85,2 +105,9 @@ export * from './searchResponse';

export * from './tagFilters';
export * from './trendingFacetHit';
export * from './trendingFacets';
export * from './trendingFacetsModel';
export * from './trendingFacetsQuery';
export * from './trendingItems';
export * from './trendingItemsModel';
export * from './trendingItemsQuery';
export * from './typoTolerance';

@@ -87,0 +114,0 @@ export * from './typoToleranceEnum';

import type { SearchParamsObject } from './searchParamsObject';
import type { SearchParamsString } from './searchParamsString';
export type SearchParams = SearchParamsObject | SearchParamsString;
export type SearchParams = Record<string, any> & SearchParamsObject;
//# sourceMappingURL=searchParams.d.ts.map
import type { CreateClientOptions, RequestOptions } from '@algolia/client-common';
import type { CustomPostProps, LegacySearchMethodProps } from '../model/clientMethodProps';
import type { CustomPostProps, LegacyGetRecommendationsParams, LegacySearchMethodProps } from '../model/clientMethodProps';
import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
import type { SearchMethodParams } from '../model/searchMethodParams';
import type { SearchResponses } from '../model/searchResponses';
export declare const apiClientVersion = "5.0.0-beta.4";
export declare const apiClientVersion = "5.0.0-beta.5";
export declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {

@@ -38,2 +40,12 @@ transporter: import("@algolia/client-common").Transporter;

/**
* Retrieves recommendations from selected AI models.
*
* Required API Key ACLs:
* - search.
*
* @param getRecommendationsParams - The getRecommendationsParams object.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRecommendations(getRecommendationsParams: GetRecommendationsParams | LegacyGetRecommendationsParams, requestOptions?: RequestOptions): Promise<GetRecommendationsResponse>;
/**
* Sends multiple search request 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.

@@ -40,0 +52,0 @@ *

@@ -77,5 +77,5 @@ // 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.

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;

@@ -82,0 +82,0 @@ /**

@@ -131,5 +131,5 @@ // 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.

/**
* An object with custom data. You can store up to 32&nbsp;kB as custom data.
* An object with custom data. You can store up to 32kB as custom data.
*/
userData?: any | null;
userData?: Record<string, any>;

@@ -136,0 +136,0 @@ /**

// 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.
import type { RecommendationsRequest } from './recommendationsRequest';
import type { SearchForFacetsOptions } from './searchForFacetsOptions';

@@ -26,2 +27,9 @@ import type { SearchForHitsOptions } from './searchForHitsOptions';

/**
* Recommend method signature compatible with the `algoliasearch` v4 package. When using this signature, extra computation will be required to make it match the new signature.
*
* @deprecated This signature will be removed from the next major version, we recommend using the `GetRecommendationsParams` type for performances and future proof reasons.
*/
export type LegacyGetRecommendationsParams = RecommendationsRequest[];
/**
* In v4, the search parameters are wrapped in a `params` parameter.

@@ -28,0 +36,0 @@ *

@@ -15,5 +15,7 @@ // 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.

export * from './baseIndexSettings';
export * from './baseRecommendRequest';
export * from './baseSearchParams';
export * from './baseSearchParamsWithoutQuery';
export * from './baseSearchResponse';
export * from './boughtTogetherQuery';
export * from './browseParamsObject';

@@ -36,3 +38,8 @@ export * from './browseResponse';

export * from './facetsStats';
export * from './fallbackParams';
export * from './fbtModel';
export * from './frequentlyBoughtTogether';
export * from './getApiKeyResponse';
export * from './getRecommendationsParams';
export * from './getRecommendationsResponse';
export * from './highlightResult';

@@ -44,2 +51,5 @@ export * from './highlightResultOption';

export * from './indexSettingsAsSearchParams';
export * from './lookingSimilar';
export * from './lookingSimilarModel';
export * from './lookingSimilarQuery';
export * from './matchLevel';

@@ -55,5 +65,16 @@ export * from './matchedGeoLocation';

export * from './reRankingApplyFilter';
export * from './recommendHit';
export * from './recommendationsHit';
export * from './recommendationsHits';
export * from './recommendationsRequest';
export * from './recommendationsResults';
export * from './recommendedForYou';
export * from './recommendedForYouModel';
export * from './recommendedForYouQuery';
export * from './redirect';
export * from './redirectRuleIndexMetadata';
export * from './redirectRuleIndexMetadataData';
export * from './relatedModel';
export * from './relatedProducts';
export * from './relatedQuery';
export * from './removeStopWords';

@@ -72,3 +93,2 @@ export * from './removeWordsIfNoResults';

export * from './searchParamsQuery';
export * from './searchParamsString';
export * from './searchQuery';

@@ -87,2 +107,9 @@ export * from './searchResponse';

export * from './tagFilters';
export * from './trendingFacetHit';
export * from './trendingFacets';
export * from './trendingFacetsModel';
export * from './trendingFacetsQuery';
export * from './trendingItems';
export * from './trendingItemsModel';
export * from './trendingItemsQuery';
export * from './typoTolerance';

@@ -89,0 +116,0 @@ export * from './typoToleranceEnum';

// 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.
import type { SearchParamsObject } from './searchParamsObject';
import type { SearchParamsString } from './searchParamsString';
export type SearchParams = SearchParamsObject | SearchParamsString;
export type SearchParams = Record<string, any> & SearchParamsObject;

@@ -20,8 +20,11 @@ // 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.

CustomPostProps,
LegacyGetRecommendationsParams,
LegacySearchMethodProps,
} from '../model/clientMethodProps';
import type { GetRecommendationsParams } from '../model/getRecommendationsParams';
import type { GetRecommendationsResponse } from '../model/getRecommendationsResponse';
import type { SearchMethodParams } from '../model/searchMethodParams';
import type { SearchResponses } from '../model/searchResponses';
export const apiClientVersion = '5.0.0-beta.4';
export const apiClientVersion = '5.0.0-beta.5';

@@ -161,2 +164,55 @@ function getDefaultHosts(appId: string): Host[] {

/**
* Retrieves recommendations from selected AI models.
*
* Required API Key ACLs:
* - search.
*
* @param getRecommendationsParams - The getRecommendationsParams object.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getRecommendations(
getRecommendationsParams:
| GetRecommendationsParams
| LegacyGetRecommendationsParams,
requestOptions?: RequestOptions
): Promise<GetRecommendationsResponse> {
if (getRecommendationsParams && Array.isArray(getRecommendationsParams)) {
const newSignatureRequest: GetRecommendationsParams = {
requests: getRecommendationsParams,
};
// eslint-disable-next-line no-param-reassign
getRecommendationsParams = newSignatureRequest;
}
if (!getRecommendationsParams) {
throw new Error(
'Parameter `getRecommendationsParams` is required when calling `getRecommendations`.'
);
}
if (!getRecommendationsParams.requests) {
throw new Error(
'Parameter `getRecommendationsParams.requests` is required when calling `getRecommendations`.'
);
}
const requestPath = '/1/indexes/*/recommendations';
const headers: Headers = {};
const queryParameters: QueryParameters = {};
const request: Request = {
method: 'POST',
path: requestPath,
queryParameters,
headers,
data: getRecommendationsParams,
useReadTransporter: true,
cacheable: true,
};
return transporter.request(request, requestOptions);
},
/**
* Sends multiple search request 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.

@@ -163,0 +219,0 @@ *

{
"name": "algoliasearch",
"version": "5.0.0-beta.4",
"version": "5.0.0-beta.5",
"description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",
"repository": "algolia/algoliasearch-client-javascript",
"repository": {
"type": "git",
"url": "git+https://github.com/algolia/algoliasearch-client-javascript.git"
},
"license": "MIT",

@@ -63,9 +66,10 @@ "author": "Algolia",

"dependencies": {
"@algolia/client-abtesting": "5.0.0-beta.4",
"@algolia/client-analytics": "5.0.0-beta.4",
"@algolia/client-common": "5.0.0-beta.4",
"@algolia/client-personalization": "5.0.0-beta.4",
"@algolia/client-search": "5.0.0-beta.4",
"@algolia/requester-browser-xhr": "5.0.0-beta.4",
"@algolia/requester-node-http": "5.0.0-beta.4"
"@algolia/client-abtesting": "5.0.0-beta.5",
"@algolia/client-analytics": "5.0.0-beta.5",
"@algolia/client-common": "5.0.0-beta.6",
"@algolia/client-personalization": "5.0.0-beta.5",
"@algolia/client-search": "5.0.0-beta.5",
"@algolia/recommend": "5.0.0-beta.5",
"@algolia/requester-browser-xhr": "5.0.0-beta.6",
"@algolia/requester-node-http": "5.0.0-beta.6"
},

@@ -76,6 +80,6 @@ "devDependencies": {

"@types/jest": "29.5.12",
"@types/node": "20.14.2",
"@types/node": "20.14.8",
"jest": "29.7.0",
"rollup": "4.18.0",
"typescript": "5.4.5"
"typescript": "5.5.2"
},

@@ -82,0 +86,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc