Socket
Socket
Sign inDemoInstall

@algolia/client-search

Package Overview
Dependencies
Maintainers
3
Versions
228
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-search - npm Package Compare versions

Comparing version 5.7.0 to 5.8.0

model/banner.ts

2

dist/builds/browser.min.js

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

function B(u){let i,p=`algolia-client-js-${u.key}`;function m(){return i===void 0&&(i=u.localStorage||window.localStorage),i}function h(){return JSON.parse(m().getItem(p)||"{}")}function P(e){m().setItem(p,JSON.stringify(e))}function c(){let e=u.timeToLive?u.timeToLive*1e3:null,r=h(),t=Object.fromEntries(Object.entries(r).filter(([,a])=>a.timestamp!==void 0));if(P(t),!e)return;let o=Object.fromEntries(Object.entries(t).filter(([,a])=>{let s=new Date().getTime();return!(a.timestamp+e<s)}));P(o)}return{get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(c(),h()[JSON.stringify(e)])).then(o=>Promise.all([o?o.value:r(),o!==void 0])).then(([o,a])=>Promise.all([o,a||t.miss(o)])).then(([o])=>o)},set(e,r){return Promise.resolve().then(()=>{let t=h();return t[JSON.stringify(e)]={timestamp:new Date().getTime(),value:r},m().setItem(p,JSON.stringify(t)),r})},delete(e){return Promise.resolve().then(()=>{let r=h();delete r[JSON.stringify(e)],m().setItem(p,JSON.stringify(r))})},clear(){return Promise.resolve().then(()=>{m().removeItem(p)})}}}function re(){return{get(u,i,p={miss:()=>Promise.resolve()}){return i().then(h=>Promise.all([h,p.miss(h)])).then(([h])=>h)},set(u,i){return Promise.resolve(i)},delete(u){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(u){let i=[...u.caches],p=i.shift();return p===void 0?re():{get(m,h,P={miss:()=>Promise.resolve()}){return p.get(m,h,P).catch(()=>O({caches:i}).get(m,h,P))},set(m,h){return p.set(m,h).catch(()=>O({caches:i}).set(m,h))},delete(m){return p.delete(m).catch(()=>O({caches:i}).delete(m))},clear(){return p.clear().catch(()=>O({caches:i}).clear())}}}function I(u={serializable:!0}){let i={};return{get(p,m,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(p);if(P in i)return Promise.resolve(u.serializable?JSON.parse(i[P]):i[P]);let c=m();return c.then(e=>h.miss(e)).then(()=>c)},set(p,m){return i[JSON.stringify(p)]=u.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(p){return delete i[JSON.stringify(p)],Promise.resolve()},clear(){return i={},Promise.resolve()}}}var L=1e3,K=2e3,F=3e4;function te(u){let i={value:`Algolia for JavaScript (${u})`,add(p){let m=`; ${p.segment}${p.version!==void 0?` (${p.version})`:""}`;return i.value.indexOf(m)===-1&&(i.value=`${i.value}${m}`),i}};return i}function _(u,i,p="WithinHeaders"){let m={"x-algolia-api-key":i,"x-algolia-application-id":u};return{headers(){return p==="WithinHeaders"?m:{}},queryParameters(){return p==="WithinQueryParameters"?m:{}}}}function S({func:u,validate:i,aggregator:p,error:m,timeout:h=()=>0}){let P=c=>new Promise((e,r)=>{u(c).then(t=>(p&&p(t),i(t)?e(t):m&&m.validate(t)?r(new Error(m.message(t))):setTimeout(()=>{P(t).then(e).catch(r)},h()))).catch(t=>{r(t)})});return P()}function M({algoliaAgents:u,client:i,version:p}){let m=te(p).add({segment:i,version:p});return u.forEach(h=>m.add(h)),m}function W(){return{debug(u,i){return Promise.resolve()},info(u,i){return Promise.resolve()},error(u,i){return Promise.resolve()}}}var Q=2*60*1e3;function G(u,i="up"){let p=Date.now();function m(){return i==="up"||Date.now()-p>Q}function h(){return i==="timed out"&&Date.now()-p<=Q}return{...u,status:i,lastUpdate:p,isUp:m,isTimedOut:h}}var $=class extends Error{name="AlgoliaError";constructor(u,i){super(u),i&&(this.name=i)}},J=class extends ${stackTrace;constructor(u,i,p){super(u,p),this.stackTrace=i}},se=class extends J{constructor(u){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.",u,"RetryError")}},b=class extends J{status;constructor(u,i,p,m="ApiError"){super(u,p,m),this.status=i}},oe=class extends ${response;constructor(u,i){super(u,"DeserializationError"),this.response=i}},ae=class extends b{error;constructor(u,i,p,m){super(u,i,m,"DetailedApiError"),this.error=p}};function z(u){let i=u;for(let p=u.length-1;p>0;p--){let m=Math.floor(Math.random()*(p+1)),h=u[p];i[p]=u[m],i[m]=h}return i}function ne(u,i,p){let m=ie(p),h=`${u.protocol}://${u.url}${u.port?`:${u.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return m.length&&(h+=`?${m}`),h}function ie(u){return Object.keys(u).filter(i=>u[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(u[i])==="[object Array]"?u[i].join(","):u[i]).replaceAll("+","%20")}`).join("&")}function ue(u,i){if(u.method==="GET"||u.data===void 0&&i.data===void 0)return;let p=Array.isArray(u.data)?u.data:{...u.data,...i.data};return JSON.stringify(p)}function ce(u,i,p){let m={Accept:"application/json",...u,...i,...p},h={};return Object.keys(m).forEach(P=>{let c=m[P];h[P.toLowerCase()]=c}),h}function me(u){try{return JSON.parse(u.content)}catch(i){throw new oe(i.message,u)}}function pe({content:u,status:i},p){try{let m=JSON.parse(u);return"error"in m?new ae(m.message,i,m.error,p):new b(m.message,i,p)}catch{}return new b(u,i,p)}function de({isTimedOut:u,status:i}){return!u&&~~i===0}function he({isTimedOut:u,status:i}){return u||de({isTimedOut:u,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function le({status:u}){return~~(u/100)===2}function Pe(u){return u.map(i=>V(i))}function V(u){let i=u.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...u,request:{...u.request,headers:{...u.request.headers,...i}}}}function X({hosts:u,hostsCache:i,baseHeaders:p,logger:m,baseQueryParameters:h,algoliaAgent:P,timeouts:c,requester:e,requestsCache:r,responsesCache:t}){async function o(n){let d=await Promise.all(n.map(q=>i.get(q,()=>Promise.resolve(G(q))))),l=d.filter(q=>q.isUp()),f=d.filter(q=>q.isTimedOut()),g=[...l,...f];return{hosts:g.length>0?g:n,getTimeout(q,w){return(f.length===0&&q===0?1:f.length+3+q)*w}}}async function a(n,d,l=!0){let f=[],g=ue(n,d),y=ce(p,n.headers,d.headers),q=n.method==="GET"?{...n.data,...d.data}:{},w={...h,...n.queryParameters,...q};if(P.value&&(w["x-algolia-agent"]=P.value),d&&d.queryParameters)for(let R of Object.keys(d.queryParameters))!d.queryParameters[R]||Object.prototype.toString.call(d.queryParameters[R])==="[object Object]"?w[R]=d.queryParameters[R]:w[R]=d.queryParameters[R].toString();let T=0,j=async(R,U)=>{let E=R.pop();if(E===void 0)throw new se(Pe(f));let D={...c,...d.timeouts},N={data:g,headers:y,method:n.method,url:ne(E,n.path,w),connectTimeout:U(T,D.connect),responseTimeout:U(T,l?D.read:D.write)},k=v=>{let H={request:N,response:v,host:E,triesLeft:R.length};return f.push(H),H},x=await e.send(N);if(he(x)){let v=k(x);return x.isTimedOut&&T++,m.info("Retryable failure",V(v)),await i.set(E,G(E,x.isTimedOut?"timed out":"down")),j(R,U)}if(le(x))return me(x);throw k(x),pe(x,f)},ee=u.filter(R=>R.accept==="readWrite"||(l?R.accept==="read":R.accept==="write")),C=await o(ee);return j([...C.hosts].reverse(),C.getTimeout)}function s(n,d={}){let l=n.useReadTransporter||n.method==="GET";if(!l)return a(n,d,l);let f=()=>a(n,d);if((d.cacheable||n.cacheable)!==!0)return f();let y={request:n,requestOptions:d,transporter:{queryParameters:h,headers:p}};return t.get(y,()=>r.get(y,()=>r.set(y,f()).then(q=>Promise.all([r.delete(y),q]),q=>Promise.all([r.delete(y),Promise.reject(q)])).then(([q,w])=>w)),{miss:q=>t.set(y,q)})}return{hostsCache:i,requester:e,timeouts:c,logger:m,algoliaAgent:P,baseHeaders:p,baseQueryParameters:h,hosts:u,request:s,requestsCache:r,responsesCache:t}}function Y(){function u(i){return new Promise(p=>{let m=new XMLHttpRequest;m.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>m.setRequestHeader(e,i.headers[e]));let h=(e,r)=>setTimeout(()=>{m.abort(),p({status:0,content:r,isTimedOut:!0})},e),P=h(i.connectTimeout,"Connection timeout"),c;m.onreadystatechange=()=>{m.readyState>m.OPENED&&c===void 0&&(clearTimeout(P),c=h(i.responseTimeout,"Socket timeout"))},m.onerror=()=>{m.status===0&&(clearTimeout(P),clearTimeout(c),p({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}))},m.onload=()=>{clearTimeout(P),clearTimeout(c),p({content:m.responseText,status:m.status,isTimedOut:!1})},m.send(i.data)})}return{send:u}}var A="5.7.0";function qe(u){return[{url:`${u}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${u}.algolia.net`,accept:"write",protocol:"https"}].concat(z([{url:`${u}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Z({appId:u,apiKey:i,authMode:p,algoliaAgents:m,...h}){let P=_(u,i,p),c=X({hosts:qe(u),...h,algoliaAgent:M({algoliaAgents:m,client:"Search",version:A}),baseHeaders:{"content-type":"text/plain",...P.headers(),...h.baseHeaders},baseQueryParameters:{...P.queryParameters(),...h.baseQueryParameters}});return{transporter:c,appId:u,clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent(e,r){c.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!p||p==="WithinHeaders"?c.baseHeaders["x-algolia-api-key"]=e:c.baseQueryParameters["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:o=s=>Math.min(s*200,5e3)},a){let s=0;return S({func:()=>this.getTask({indexName:e,taskID:r},a),validate:n=>n.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>o(s)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=a=>Math.min(a*200,5e3)},o){let a=0;return S({func:()=>this.getAppTask({taskID:e},o),validate:s=>s.status==="published",aggregator:()=>a+=1,error:{validate:()=>a>=r,message:()=>`The maximum number of retries exceeded. (${a}/${r})`},timeout:()=>t(a)})},waitForApiKey({operation:e,key:r,apiKey:t,maxRetries:o=50,timeout:a=n=>Math.min(n*200,5e3)},s){let n=0,d={aggregator:()=>n+=1,error:{validate:()=>n>=o,message:()=>`The maximum number of retries exceeded. (${n}/${o})`},timeout:()=>a(n)};if(e==="update"){if(!t)throw new Error("`apiKey` is required when waiting for an `update` operation.");return S({...d,func:()=>this.getApiKey({key:r},s),validate:l=>{for(let f of Object.keys(t)){let g=t[f],y=l[f];if(Array.isArray(g)&&Array.isArray(y)){if(g.length!==y.length||g.some((q,w)=>q!==y[w]))return!1}else if(g!==y)return!1}return!0}})}return S({...d,func:()=>this.getApiKey({key:r},s).catch(l=>{if(l.status!==404)throw l}),validate:l=>e==="add"?l!==void 0:l===void 0})},browseObjects({indexName:e,browseParams:r,...t},o){return S({func:a=>this.browse({indexName:e,browseParams:{cursor:a?a.cursor:void 0,...r}},o),validate:a=>a.cursor===void 0,...t})},browseRules({indexName:e,searchRulesParams:r,...t},o){let a={hitsPerPage:1e3,...r};return S({func:s=>this.searchRules({indexName:e,searchRulesParams:{...a,page:s?s.page+1:a.page||0}},o),validate:s=>s.nbHits<a.hitsPerPage,...t})},browseSynonyms({indexName:e,searchSynonymsParams:r,...t},o){let a={page:0,...r,hitsPerPage:1e3};return S({func:s=>{let n=this.searchSynonyms({indexName:e,searchSynonymsParams:{...a,page:a.page}},o);return a.page+=1,n},validate:s=>s.nbHits<a.hitsPerPage,...t})},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:o,batchSize:a=1e3},s){let n=[],d=[],l=r.entries();for(let[f,g]of l)n.push({action:t,body:g}),(n.length===a||f===r.length-1)&&(d.push(await this.batch({indexName:e,batchWriteParams:{requests:n}},s)),n=[]);if(o)for(let f of d)await this.waitForTask({indexName:e,taskID:f.taskID});return d},async saveObjects({indexName:e,objects:r},t){return await this.chunkedBatch({indexName:e,objects:r,action:"addObject"},t)},async deleteObjects({indexName:e,objectIDs:r},t){return await this.chunkedBatch({indexName:e,objects:r.map(o=>({objectID:o})),action:"deleteObject"},t)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t},o){return await this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate"},o)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},o){let a=Math.floor(Math.random()*1e6)+1e5,s=`${e}_tmp_${a}`,n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),d=await this.chunkedBatch({indexName:s,objects:r,waitForTasks:!0,batchSize:t},o);await this.waitForTask({indexName:s,taskID:n.taskID}),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),await this.waitForTask({indexName:s,taskID:n.taskID});let l=await this.operationIndex({indexName:s,operationIndexParams:{operation:"move",destination:e}},o);return await this.waitForTask({indexName:s,taskID:l.taskID}),{copyOperationResponse:n,batchResponses:d,moveOperationResponse:l}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(r){if(r instanceof b&&r.status===404)return!1;throw r}return!0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},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`.");let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(s,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},o){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`.");let d={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let o="/1/clusters/mapping",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,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`.");let o="/1/clusters/mapping/batch",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");let n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return c.request(n,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let o="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let o="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let n={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let n={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customPost({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let d={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},customPut({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let d={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let a="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let a="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getDictionaryLanguages(e){let a={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(a,e)},getDictionarySettings(e){let a={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(a,e)},getLogs({offset:e,length:r,indexName:t,type:o}={},a=void 0){let s="/1/logs",n={},d={};e!==void 0&&(d.offset=e.toString()),r!==void 0&&(d.length=r.toString()),t!==void 0&&(d.indexName=t.toString()),o!==void 0&&(d.type=o.toString());let l={method:"GET",path:s,queryParameters:d,headers:n};return c.request(l,a)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let a="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.attributesToRetrieve=t.toString());let d={method:"GET",path:a,queryParameters:n,headers:s};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");let s={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getSources(e){let a={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(a,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getTopUserIds(e){let a={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(a,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t="/1/clusters/mapping/pending",o={},a={};e!==void 0&&(a.getClusters=e.toString());let s={method:"GET",path:t,queryParameters:a,headers:o};return c.request(s,r)},listApiKeys(e){let a={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(a,e)},listClusters(e){let a={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(a,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let o="/1/indexes",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let o="/1/clusters/mapping",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.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`.");let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:o},a){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`.");let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.createIfNotExists=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return c.request(s,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.clearExistingRules=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.replaceExistingSynonyms=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},search(e,r){if(e&&Array.isArray(e)&&(e={requests:e.map(({params:d,...l})=>l.type==="facet"?{...l,...d,type:"facet"}:{...l,...d,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!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`.");let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");let d={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 c.request(d,o)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");let n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");let n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");let n={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,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`.");let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(s,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"PUT",path:a,queryParameters:n,headers:s,data:r};return c.request(d,o)},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`.");let n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)}}}function Fs(u,i,p){if(!u||typeof u!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return Z({appId:u,apiKey:i,timeouts:{connect:L,read:K,write:F},logger:W(),requester:Y(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:I(),requestsCache:I({serializable:!1}),hostsCache:O({caches:[B({key:`${A}-${u}`}),I()]}),...p})}export{A as apiClientVersion,Fs as searchClient};
function Q(){function u(i){return new Promise(p=>{let m=new XMLHttpRequest;m.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>m.setRequestHeader(e,i.headers[e]));let h=(e,r)=>setTimeout(()=>{m.abort(),p({status:0,content:r,isTimedOut:!0})},e),P=h(i.connectTimeout,"Connection timeout"),c;m.onreadystatechange=()=>{m.readyState>m.OPENED&&c===void 0&&(clearTimeout(P),c=h(i.responseTimeout,"Socket timeout"))},m.onerror=()=>{m.status===0&&(clearTimeout(P),clearTimeout(c),p({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}))},m.onload=()=>{clearTimeout(P),clearTimeout(c),p({content:m.responseText,status:m.status,isTimedOut:!1})},m.send(i.data)})}return{send:u}}function L(u){let i,p=`algolia-client-js-${u.key}`;function m(){return i===void 0&&(i=u.localStorage||window.localStorage),i}function h(){return JSON.parse(m().getItem(p)||"{}")}function P(e){m().setItem(p,JSON.stringify(e))}function c(){let e=u.timeToLive?u.timeToLive*1e3:null,r=h(),t=Object.fromEntries(Object.entries(r).filter(([,a])=>a.timestamp!==void 0));if(P(t),!e)return;let o=Object.fromEntries(Object.entries(t).filter(([,a])=>{let s=new Date().getTime();return!(a.timestamp+e<s)}));P(o)}return{get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(c(),h()[JSON.stringify(e)])).then(o=>Promise.all([o?o.value:r(),o!==void 0])).then(([o,a])=>Promise.all([o,a||t.miss(o)])).then(([o])=>o)},set(e,r){return Promise.resolve().then(()=>{let t=h();return t[JSON.stringify(e)]={timestamp:new Date().getTime(),value:r},m().setItem(p,JSON.stringify(t)),r})},delete(e){return Promise.resolve().then(()=>{let r=h();delete r[JSON.stringify(e)],m().setItem(p,JSON.stringify(r))})},clear(){return Promise.resolve().then(()=>{m().removeItem(p)})}}}function re(){return{get(u,i,p={miss:()=>Promise.resolve()}){return i().then(h=>Promise.all([h,p.miss(h)])).then(([h])=>h)},set(u,i){return Promise.resolve(i)},delete(u){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(u){let i=[...u.caches],p=i.shift();return p===void 0?re():{get(m,h,P={miss:()=>Promise.resolve()}){return p.get(m,h,P).catch(()=>O({caches:i}).get(m,h,P))},set(m,h){return p.set(m,h).catch(()=>O({caches:i}).set(m,h))},delete(m){return p.delete(m).catch(()=>O({caches:i}).delete(m))},clear(){return p.clear().catch(()=>O({caches:i}).clear())}}}function I(u={serializable:!0}){let i={};return{get(p,m,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(p);if(P in i)return Promise.resolve(u.serializable?JSON.parse(i[P]):i[P]);let c=m();return c.then(e=>h.miss(e)).then(()=>c)},set(p,m){return i[JSON.stringify(p)]=u.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(p){return delete i[JSON.stringify(p)],Promise.resolve()},clear(){return i={},Promise.resolve()}}}var K=1e3,F=2e3,_=3e4;function te(u){let i={value:`Algolia for JavaScript (${u})`,add(p){let m=`; ${p.segment}${p.version!==void 0?` (${p.version})`:""}`;return i.value.indexOf(m)===-1&&(i.value=`${i.value}${m}`),i}};return i}function M(u,i,p="WithinHeaders"){let m={"x-algolia-api-key":i,"x-algolia-application-id":u};return{headers(){return p==="WithinHeaders"?m:{}},queryParameters(){return p==="WithinQueryParameters"?m:{}}}}function S({func:u,validate:i,aggregator:p,error:m,timeout:h=()=>0}){let P=c=>new Promise((e,r)=>{u(c).then(t=>(p&&p(t),i(t)?e(t):m&&m.validate(t)?r(new Error(m.message(t))):setTimeout(()=>{P(t).then(e).catch(r)},h()))).catch(t=>{r(t)})});return P()}function W({algoliaAgents:u,client:i,version:p}){let m=te(p).add({segment:i,version:p});return u.forEach(h=>m.add(h)),m}function $(){return{debug(u,i){return Promise.resolve()},info(u,i){return Promise.resolve()},error(u,i){return Promise.resolve()}}}var G=2*60*1e3;function B(u,i="up"){let p=Date.now();function m(){return i==="up"||Date.now()-p>G}function h(){return i==="timed out"&&Date.now()-p<=G}return{...u,status:i,lastUpdate:p,isUp:m,isTimedOut:h}}var J=class extends Error{name="AlgoliaError";constructor(u,i){super(u),i&&(this.name=i)}},z=class extends J{stackTrace;constructor(u,i,p){super(u,p),this.stackTrace=i}},se=class extends z{constructor(u){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.",u,"RetryError")}},b=class extends z{status;constructor(u,i,p,m="ApiError"){super(u,p,m),this.status=i}},oe=class extends J{response;constructor(u,i){super(u,"DeserializationError"),this.response=i}},ae=class extends b{error;constructor(u,i,p,m){super(u,i,m,"DetailedApiError"),this.error=p}};function V(u){let i=u;for(let p=u.length-1;p>0;p--){let m=Math.floor(Math.random()*(p+1)),h=u[p];i[p]=u[m],i[m]=h}return i}function ne(u,i,p){let m=ie(p),h=`${u.protocol}://${u.url}${u.port?`:${u.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return m.length&&(h+=`?${m}`),h}function ie(u){return Object.keys(u).filter(i=>u[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(u[i])==="[object Array]"?u[i].join(","):u[i]).replace(/\+/g,"%20")}`).join("&")}function ue(u,i){if(u.method==="GET"||u.data===void 0&&i.data===void 0)return;let p=Array.isArray(u.data)?u.data:{...u.data,...i.data};return JSON.stringify(p)}function ce(u,i,p){let m={Accept:"application/json",...u,...i,...p},h={};return Object.keys(m).forEach(P=>{let c=m[P];h[P.toLowerCase()]=c}),h}function me(u){try{return JSON.parse(u.content)}catch(i){throw new oe(i.message,u)}}function pe({content:u,status:i},p){try{let m=JSON.parse(u);return"error"in m?new ae(m.message,i,m.error,p):new b(m.message,i,p)}catch{}return new b(u,i,p)}function de({isTimedOut:u,status:i}){return!u&&~~i===0}function he({isTimedOut:u,status:i}){return u||de({isTimedOut:u,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function le({status:u}){return~~(u/100)===2}function Pe(u){return u.map(i=>X(i))}function X(u){let i=u.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...u,request:{...u.request,headers:{...u.request.headers,...i}}}}function Y({hosts:u,hostsCache:i,baseHeaders:p,logger:m,baseQueryParameters:h,algoliaAgent:P,timeouts:c,requester:e,requestsCache:r,responsesCache:t}){async function o(n){let d=await Promise.all(n.map(q=>i.get(q,()=>Promise.resolve(B(q))))),l=d.filter(q=>q.isUp()),f=d.filter(q=>q.isTimedOut()),g=[...l,...f];return{hosts:g.length>0?g:n,getTimeout(q,w){return(f.length===0&&q===0?1:f.length+3+q)*w}}}async function a(n,d,l=!0){let f=[],g=ue(n,d),y=ce(p,n.headers,d.headers),q=n.method==="GET"?{...n.data,...d.data}:{},w={...h,...n.queryParameters,...q};if(P.value&&(w["x-algolia-agent"]=P.value),d&&d.queryParameters)for(let R of Object.keys(d.queryParameters))!d.queryParameters[R]||Object.prototype.toString.call(d.queryParameters[R])==="[object Object]"?w[R]=d.queryParameters[R]:w[R]=d.queryParameters[R].toString();let T=0,j=async(R,U)=>{let E=R.pop();if(E===void 0)throw new se(Pe(f));let D={...c,...d.timeouts},N={data:g,headers:y,method:n.method,url:ne(E,n.path,w),connectTimeout:U(T,D.connect),responseTimeout:U(T,l?D.read:D.write)},k=v=>{let H={request:N,response:v,host:E,triesLeft:R.length};return f.push(H),H},x=await e.send(N);if(he(x)){let v=k(x);return x.isTimedOut&&T++,m.info("Retryable failure",X(v)),await i.set(E,B(E,x.isTimedOut?"timed out":"down")),j(R,U)}if(le(x))return me(x);throw k(x),pe(x,f)},ee=u.filter(R=>R.accept==="readWrite"||(l?R.accept==="read":R.accept==="write")),C=await o(ee);return j([...C.hosts].reverse(),C.getTimeout)}function s(n,d={}){let l=n.useReadTransporter||n.method==="GET";if(!l)return a(n,d,l);let f=()=>a(n,d);if((d.cacheable||n.cacheable)!==!0)return f();let y={request:n,requestOptions:d,transporter:{queryParameters:h,headers:p}};return t.get(y,()=>r.get(y,()=>r.set(y,f()).then(q=>Promise.all([r.delete(y),q]),q=>Promise.all([r.delete(y),Promise.reject(q)])).then(([q,w])=>w)),{miss:q=>t.set(y,q)})}return{hostsCache:i,requester:e,timeouts:c,logger:m,algoliaAgent:P,baseHeaders:p,baseQueryParameters:h,hosts:u,request:s,requestsCache:r,responsesCache:t}}var A="5.8.0";function qe(u){return[{url:`${u}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${u}.algolia.net`,accept:"write",protocol:"https"}].concat(V([{url:`${u}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Z({appId:u,apiKey:i,authMode:p,algoliaAgents:m,...h}){let P=M(u,i,p),c=Y({hosts:qe(u),...h,algoliaAgent:W({algoliaAgents:m,client:"Search",version:A}),baseHeaders:{"content-type":"text/plain",...P.headers(),...h.baseHeaders},baseQueryParameters:{...P.queryParameters(),...h.baseQueryParameters}});return{transporter:c,appId:u,clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent(e,r){c.algoliaAgent.add({segment:e,version:r})},setClientApiKey({apiKey:e}){!p||p==="WithinHeaders"?c.baseHeaders["x-algolia-api-key"]=e:c.baseQueryParameters["x-algolia-api-key"]=e},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:o=s=>Math.min(s*200,5e3)},a){let s=0;return S({func:()=>this.getTask({indexName:e,taskID:r},a),validate:n=>n.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>o(s)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=a=>Math.min(a*200,5e3)},o){let a=0;return S({func:()=>this.getAppTask({taskID:e},o),validate:s=>s.status==="published",aggregator:()=>a+=1,error:{validate:()=>a>=r,message:()=>`The maximum number of retries exceeded. (${a}/${r})`},timeout:()=>t(a)})},waitForApiKey({operation:e,key:r,apiKey:t,maxRetries:o=50,timeout:a=n=>Math.min(n*200,5e3)},s){let n=0,d={aggregator:()=>n+=1,error:{validate:()=>n>=o,message:()=>`The maximum number of retries exceeded. (${n}/${o})`},timeout:()=>a(n)};if(e==="update"){if(!t)throw new Error("`apiKey` is required when waiting for an `update` operation.");return S({...d,func:()=>this.getApiKey({key:r},s),validate:l=>{for(let f of Object.keys(t)){let g=t[f],y=l[f];if(Array.isArray(g)&&Array.isArray(y)){if(g.length!==y.length||g.some((q,w)=>q!==y[w]))return!1}else if(g!==y)return!1}return!0}})}return S({...d,func:()=>this.getApiKey({key:r},s).catch(l=>{if(l.status!==404)throw l}),validate:l=>e==="add"?l!==void 0:l===void 0})},browseObjects({indexName:e,browseParams:r,...t},o){return S({func:a=>this.browse({indexName:e,browseParams:{cursor:a?a.cursor:void 0,...r}},o),validate:a=>a.cursor===void 0,...t})},browseRules({indexName:e,searchRulesParams:r,...t},o){let a={hitsPerPage:1e3,...r};return S({func:s=>this.searchRules({indexName:e,searchRulesParams:{...a,page:s?s.page+1:a.page||0}},o),validate:s=>s.nbHits<a.hitsPerPage,...t})},browseSynonyms({indexName:e,searchSynonymsParams:r,...t},o){let a={page:0,...r,hitsPerPage:1e3};return S({func:s=>{let n=this.searchSynonyms({indexName:e,searchSynonymsParams:{...a,page:a.page}},o);return a.page+=1,n},validate:s=>s.nbHits<a.hitsPerPage,...t})},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:o,batchSize:a=1e3},s){let n=[],d=[],l=r.entries();for(let[f,g]of l)n.push({action:t,body:g}),(n.length===a||f===r.length-1)&&(d.push(await this.batch({indexName:e,batchWriteParams:{requests:n}},s)),n=[]);if(o)for(let f of d)await this.waitForTask({indexName:e,taskID:f.taskID});return d},async saveObjects({indexName:e,objects:r},t){return await this.chunkedBatch({indexName:e,objects:r,action:"addObject"},t)},async deleteObjects({indexName:e,objectIDs:r},t){return await this.chunkedBatch({indexName:e,objects:r.map(o=>({objectID:o})),action:"deleteObject"},t)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t},o){return await this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate"},o)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},o){let a=Math.floor(Math.random()*1e6)+1e5,s=`${e}_tmp_${a}`,n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),d=await this.chunkedBatch({indexName:s,objects:r,waitForTasks:!0,batchSize:t},o);await this.waitForTask({indexName:s,taskID:n.taskID}),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),await this.waitForTask({indexName:s,taskID:n.taskID});let l=await this.operationIndex({indexName:s,operationIndexParams:{operation:"move",destination:e}},o);return await this.waitForTask({indexName:s,taskID:l.taskID}),{copyOperationResponse:n,batchResponses:d,moveOperationResponse:l}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e})}catch(r){if(r instanceof b&&r.status===404)return!1;throw r}return!0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},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`.");let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(s,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},o){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`.");let d={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let o="/1/clusters/mapping",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,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`.");let o="/1/clusters/mapping/batch",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");let n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return c.request(n,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let o="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let o="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let n={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let n={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customPost({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let d={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},customPut({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let d={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let a="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let a="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getDictionaryLanguages(e){let a={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(a,e)},getDictionarySettings(e){let a={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(a,e)},getLogs({offset:e,length:r,indexName:t,type:o}={},a=void 0){let s="/1/logs",n={},d={};e!==void 0&&(d.offset=e.toString()),r!==void 0&&(d.length=r.toString()),t!==void 0&&(d.indexName=t.toString()),o!==void 0&&(d.type=o.toString());let l={method:"GET",path:s,queryParameters:d,headers:n};return c.request(l,a)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let a="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.attributesToRetrieve=t.toString());let d={method:"GET",path:a,queryParameters:n,headers:s};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");let s={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getSources(e){let a={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(a,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getTopUserIds(e){let a={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(a,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t="/1/clusters/mapping/pending",o={},a={};e!==void 0&&(a.getClusters=e.toString());let s={method:"GET",path:t,queryParameters:a,headers:o};return c.request(s,r)},listApiKeys(e){let a={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(a,e)},listClusters(e){let a={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(a,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let o="/1/indexes",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let o="/1/clusters/mapping",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.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`.");let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:o},a){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`.");let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.createIfNotExists=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return c.request(s,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.clearExistingRules=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.replaceExistingSynonyms=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},search(e,r){if(e&&Array.isArray(e)&&(e={requests:e.map(({params:d,...l})=>l.type==="facet"?{...l,...d,type:"facet"}:{...l,...d,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!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`.");let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");let d={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 c.request(d,o)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");let n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");let n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");let n={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,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`.");let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(s,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"PUT",path:a,queryParameters:n,headers:s,data:r};return c.request(d,o)},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`.");let n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)}}}function Vs(u,i,p){if(!u||typeof u!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return Z({appId:u,apiKey:i,timeouts:{connect:K,read:F,write:_},logger:$(),requester:Q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:I(),requestsCache:I({serializable:!1}),hostsCache:O({caches:[L({key:`${A}-${u}`}),I()]}),...p})}export{A as apiClientVersion,Vs as searchClient};
//# sourceMappingURL=browser.min.js.map

@@ -7,7 +7,7 @@ (function (global, factory) {

function B(u){let i,p=`algolia-client-js-${u.key}`;function m(){return i===void 0&&(i=u.localStorage||window.localStorage),i}function h(){return JSON.parse(m().getItem(p)||"{}")}function P(e){m().setItem(p,JSON.stringify(e));}function c(){let e=u.timeToLive?u.timeToLive*1e3:null,r=h(),t=Object.fromEntries(Object.entries(r).filter(([,a])=>a.timestamp!==void 0));if(P(t),!e)return;let o=Object.fromEntries(Object.entries(t).filter(([,a])=>{let s=new Date().getTime();return !(a.timestamp+e<s)}));P(o);}return {get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(c(),h()[JSON.stringify(e)])).then(o=>Promise.all([o?o.value:r(),o!==void 0])).then(([o,a])=>Promise.all([o,a||t.miss(o)])).then(([o])=>o)},set(e,r){return Promise.resolve().then(()=>{let t=h();return t[JSON.stringify(e)]={timestamp:new Date().getTime(),value:r},m().setItem(p,JSON.stringify(t)),r})},delete(e){return Promise.resolve().then(()=>{let r=h();delete r[JSON.stringify(e)],m().setItem(p,JSON.stringify(r));})},clear(){return Promise.resolve().then(()=>{m().removeItem(p);})}}}function re(){return {get(u,i,p={miss:()=>Promise.resolve()}){return i().then(h=>Promise.all([h,p.miss(h)])).then(([h])=>h)},set(u,i){return Promise.resolve(i)},delete(u){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(u){let i=[...u.caches],p=i.shift();return p===void 0?re():{get(m,h,P={miss:()=>Promise.resolve()}){return p.get(m,h,P).catch(()=>O({caches:i}).get(m,h,P))},set(m,h){return p.set(m,h).catch(()=>O({caches:i}).set(m,h))},delete(m){return p.delete(m).catch(()=>O({caches:i}).delete(m))},clear(){return p.clear().catch(()=>O({caches:i}).clear())}}}function I(u={serializable:!0}){let i={};return {get(p,m,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(p);if(P in i)return Promise.resolve(u.serializable?JSON.parse(i[P]):i[P]);let c=m();return c.then(e=>h.miss(e)).then(()=>c)},set(p,m){return i[JSON.stringify(p)]=u.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(p){return delete i[JSON.stringify(p)],Promise.resolve()},clear(){return i={},Promise.resolve()}}}var L=1e3,K=2e3,F=3e4;function te(u){let i={value:`Algolia for JavaScript (${u})`,add(p){let m=`; ${p.segment}${p.version!==void 0?` (${p.version})`:""}`;return i.value.indexOf(m)===-1&&(i.value=`${i.value}${m}`),i}};return i}function _(u,i,p="WithinHeaders"){let m={"x-algolia-api-key":i,"x-algolia-application-id":u};return {headers(){return p==="WithinHeaders"?m:{}},queryParameters(){return p==="WithinQueryParameters"?m:{}}}}function S({func:u,validate:i,aggregator:p,error:m,timeout:h=()=>0}){let P=c=>new Promise((e,r)=>{u(c).then(t=>(p&&p(t),i(t)?e(t):m&&m.validate(t)?r(new Error(m.message(t))):setTimeout(()=>{P(t).then(e).catch(r);},h()))).catch(t=>{r(t);});});return P()}function M({algoliaAgents:u,client:i,version:p}){let m=te(p).add({segment:i,version:p});return u.forEach(h=>m.add(h)),m}function W(){return {debug(u,i){return Promise.resolve()},info(u,i){return Promise.resolve()},error(u,i){return Promise.resolve()}}}var Q=2*60*1e3;function G(u,i="up"){let p=Date.now();function m(){return i==="up"||Date.now()-p>Q}function h(){return i==="timed out"&&Date.now()-p<=Q}return {...u,status:i,lastUpdate:p,isUp:m,isTimedOut:h}}var $=class extends Error{name="AlgoliaError";constructor(u,i){super(u),i&&(this.name=i);}},J=class extends ${stackTrace;constructor(u,i,p){super(u,p),this.stackTrace=i;}},se=class extends J{constructor(u){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.",u,"RetryError");}},b=class extends J{status;constructor(u,i,p,m="ApiError"){super(u,p,m),this.status=i;}},oe=class extends ${response;constructor(u,i){super(u,"DeserializationError"),this.response=i;}},ae=class extends b{error;constructor(u,i,p,m){super(u,i,m,"DetailedApiError"),this.error=p;}};function z(u){let i=u;for(let p=u.length-1;p>0;p--){let m=Math.floor(Math.random()*(p+1)),h=u[p];i[p]=u[m],i[m]=h;}return i}function ne(u,i,p){let m=ie(p),h=`${u.protocol}://${u.url}${u.port?`:${u.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return m.length&&(h+=`?${m}`),h}function ie(u){return Object.keys(u).filter(i=>u[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(u[i])==="[object Array]"?u[i].join(","):u[i]).replaceAll("+","%20")}`).join("&")}function ue(u,i){if(u.method==="GET"||u.data===void 0&&i.data===void 0)return;let p=Array.isArray(u.data)?u.data:{...u.data,...i.data};return JSON.stringify(p)}function ce(u,i,p){let m={Accept:"application/json",...u,...i,...p},h={};return Object.keys(m).forEach(P=>{let c=m[P];h[P.toLowerCase()]=c;}),h}function me(u){try{return JSON.parse(u.content)}catch(i){throw new oe(i.message,u)}}function pe({content:u,status:i},p){try{let m=JSON.parse(u);return "error"in m?new ae(m.message,i,m.error,p):new b(m.message,i,p)}catch{}return new b(u,i,p)}function de({isTimedOut:u,status:i}){return !u&&~~i===0}function he({isTimedOut:u,status:i}){return u||de({isTimedOut:u,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function le({status:u}){return ~~(u/100)===2}function Pe(u){return u.map(i=>V(i))}function V(u){let i=u.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...u,request:{...u.request,headers:{...u.request.headers,...i}}}}function X({hosts:u,hostsCache:i,baseHeaders:p,logger:m,baseQueryParameters:h,algoliaAgent:P,timeouts:c,requester:e,requestsCache:r,responsesCache:t}){async function o(n){let d=await Promise.all(n.map(q=>i.get(q,()=>Promise.resolve(G(q))))),l=d.filter(q=>q.isUp()),f=d.filter(q=>q.isTimedOut()),g=[...l,...f];return {hosts:g.length>0?g:n,getTimeout(q,w){return (f.length===0&&q===0?1:f.length+3+q)*w}}}async function a(n,d,l=!0){let f=[],g=ue(n,d),y=ce(p,n.headers,d.headers),q=n.method==="GET"?{...n.data,...d.data}:{},w={...h,...n.queryParameters,...q};if(P.value&&(w["x-algolia-agent"]=P.value),d&&d.queryParameters)for(let R of Object.keys(d.queryParameters))!d.queryParameters[R]||Object.prototype.toString.call(d.queryParameters[R])==="[object Object]"?w[R]=d.queryParameters[R]:w[R]=d.queryParameters[R].toString();let T=0,j=async(R,U)=>{let E=R.pop();if(E===void 0)throw new se(Pe(f));let D={...c,...d.timeouts},N={data:g,headers:y,method:n.method,url:ne(E,n.path,w),connectTimeout:U(T,D.connect),responseTimeout:U(T,l?D.read:D.write)},k=v=>{let H={request:N,response:v,host:E,triesLeft:R.length};return f.push(H),H},x=await e.send(N);if(he(x)){let v=k(x);return x.isTimedOut&&T++,m.info("Retryable failure",V(v)),await i.set(E,G(E,x.isTimedOut?"timed out":"down")),j(R,U)}if(le(x))return me(x);throw k(x),pe(x,f)},ee=u.filter(R=>R.accept==="readWrite"||(l?R.accept==="read":R.accept==="write")),C=await o(ee);return j([...C.hosts].reverse(),C.getTimeout)}function s(n,d={}){let l=n.useReadTransporter||n.method==="GET";if(!l)return a(n,d,l);let f=()=>a(n,d);if((d.cacheable||n.cacheable)!==!0)return f();let y={request:n,requestOptions:d,transporter:{queryParameters:h,headers:p}};return t.get(y,()=>r.get(y,()=>r.set(y,f()).then(q=>Promise.all([r.delete(y),q]),q=>Promise.all([r.delete(y),Promise.reject(q)])).then(([q,w])=>w)),{miss:q=>t.set(y,q)})}return {hostsCache:i,requester:e,timeouts:c,logger:m,algoliaAgent:P,baseHeaders:p,baseQueryParameters:h,hosts:u,request:s,requestsCache:r,responsesCache:t}}function Y(){function u(i){return new Promise(p=>{let m=new XMLHttpRequest;m.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>m.setRequestHeader(e,i.headers[e]));let h=(e,r)=>setTimeout(()=>{m.abort(),p({status:0,content:r,isTimedOut:!0});},e),P=h(i.connectTimeout,"Connection timeout"),c;m.onreadystatechange=()=>{m.readyState>m.OPENED&&c===void 0&&(clearTimeout(P),c=h(i.responseTimeout,"Socket timeout"));},m.onerror=()=>{m.status===0&&(clearTimeout(P),clearTimeout(c),p({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}));},m.onload=()=>{clearTimeout(P),clearTimeout(c),p({content:m.responseText,status:m.status,isTimedOut:!1});},m.send(i.data);})}return {send:u}}var A="5.7.0";function qe(u){return [{url:`${u}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${u}.algolia.net`,accept:"write",protocol:"https"}].concat(z([{url:`${u}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Z({appId:u,apiKey:i,authMode:p,algoliaAgents:m,...h}){let P=_(u,i,p),c=X({hosts:qe(u),...h,algoliaAgent:M({algoliaAgents:m,client:"Search",version:A}),baseHeaders:{"content-type":"text/plain",...P.headers(),...h.baseHeaders},baseQueryParameters:{...P.queryParameters(),...h.baseQueryParameters}});return {transporter:c,appId:u,clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent(e,r){c.algoliaAgent.add({segment:e,version:r});},setClientApiKey({apiKey:e}){!p||p==="WithinHeaders"?c.baseHeaders["x-algolia-api-key"]=e:c.baseQueryParameters["x-algolia-api-key"]=e;},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:o=s=>Math.min(s*200,5e3)},a){let s=0;return S({func:()=>this.getTask({indexName:e,taskID:r},a),validate:n=>n.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>o(s)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=a=>Math.min(a*200,5e3)},o){let a=0;return S({func:()=>this.getAppTask({taskID:e},o),validate:s=>s.status==="published",aggregator:()=>a+=1,error:{validate:()=>a>=r,message:()=>`The maximum number of retries exceeded. (${a}/${r})`},timeout:()=>t(a)})},waitForApiKey({operation:e,key:r,apiKey:t,maxRetries:o=50,timeout:a=n=>Math.min(n*200,5e3)},s){let n=0,d={aggregator:()=>n+=1,error:{validate:()=>n>=o,message:()=>`The maximum number of retries exceeded. (${n}/${o})`},timeout:()=>a(n)};if(e==="update"){if(!t)throw new Error("`apiKey` is required when waiting for an `update` operation.");return S({...d,func:()=>this.getApiKey({key:r},s),validate:l=>{for(let f of Object.keys(t)){let g=t[f],y=l[f];if(Array.isArray(g)&&Array.isArray(y)){if(g.length!==y.length||g.some((q,w)=>q!==y[w]))return !1}else if(g!==y)return !1}return !0}})}return S({...d,func:()=>this.getApiKey({key:r},s).catch(l=>{if(l.status!==404)throw l}),validate:l=>e==="add"?l!==void 0:l===void 0})},browseObjects({indexName:e,browseParams:r,...t},o){return S({func:a=>this.browse({indexName:e,browseParams:{cursor:a?a.cursor:void 0,...r}},o),validate:a=>a.cursor===void 0,...t})},browseRules({indexName:e,searchRulesParams:r,...t},o){let a={hitsPerPage:1e3,...r};return S({func:s=>this.searchRules({indexName:e,searchRulesParams:{...a,page:s?s.page+1:a.page||0}},o),validate:s=>s.nbHits<a.hitsPerPage,...t})},browseSynonyms({indexName:e,searchSynonymsParams:r,...t},o){let a={page:0,...r,hitsPerPage:1e3};return S({func:s=>{let n=this.searchSynonyms({indexName:e,searchSynonymsParams:{...a,page:a.page}},o);return a.page+=1,n},validate:s=>s.nbHits<a.hitsPerPage,...t})},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:o,batchSize:a=1e3},s){let n=[],d=[],l=r.entries();for(let[f,g]of l)n.push({action:t,body:g}),(n.length===a||f===r.length-1)&&(d.push(await this.batch({indexName:e,batchWriteParams:{requests:n}},s)),n=[]);if(o)for(let f of d)await this.waitForTask({indexName:e,taskID:f.taskID});return d},async saveObjects({indexName:e,objects:r},t){return await this.chunkedBatch({indexName:e,objects:r,action:"addObject"},t)},async deleteObjects({indexName:e,objectIDs:r},t){return await this.chunkedBatch({indexName:e,objects:r.map(o=>({objectID:o})),action:"deleteObject"},t)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t},o){return await this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate"},o)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},o){let a=Math.floor(Math.random()*1e6)+1e5,s=`${e}_tmp_${a}`,n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),d=await this.chunkedBatch({indexName:s,objects:r,waitForTasks:!0,batchSize:t},o);await this.waitForTask({indexName:s,taskID:n.taskID}),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),await this.waitForTask({indexName:s,taskID:n.taskID});let l=await this.operationIndex({indexName:s,operationIndexParams:{operation:"move",destination:e}},o);return await this.waitForTask({indexName:s,taskID:l.taskID}),{copyOperationResponse:n,batchResponses:d,moveOperationResponse:l}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e});}catch(r){if(r instanceof b&&r.status===404)return !1;throw r}return !0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},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`.");let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(s,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},o){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`.");let d={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let o="/1/clusters/mapping",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,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`.");let o="/1/clusters/mapping/batch",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");let n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return c.request(n,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let o="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let o="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let n={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let n={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customPost({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let d={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},customPut({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let d={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let a="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let a="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getDictionaryLanguages(e){let a={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(a,e)},getDictionarySettings(e){let a={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(a,e)},getLogs({offset:e,length:r,indexName:t,type:o}={},a=void 0){let s="/1/logs",n={},d={};e!==void 0&&(d.offset=e.toString()),r!==void 0&&(d.length=r.toString()),t!==void 0&&(d.indexName=t.toString()),o!==void 0&&(d.type=o.toString());let l={method:"GET",path:s,queryParameters:d,headers:n};return c.request(l,a)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let a="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.attributesToRetrieve=t.toString());let d={method:"GET",path:a,queryParameters:n,headers:s};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");let s={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getSources(e){let a={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(a,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getTopUserIds(e){let a={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(a,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t="/1/clusters/mapping/pending",o={},a={};e!==void 0&&(a.getClusters=e.toString());let s={method:"GET",path:t,queryParameters:a,headers:o};return c.request(s,r)},listApiKeys(e){let a={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(a,e)},listClusters(e){let a={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(a,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let o="/1/indexes",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let o="/1/clusters/mapping",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.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`.");let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:o},a){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`.");let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.createIfNotExists=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return c.request(s,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.clearExistingRules=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.replaceExistingSynonyms=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},search(e,r){if(e&&Array.isArray(e)&&(e={requests:e.map(({params:d,...l})=>l.type==="facet"?{...l,...d,type:"facet"}:{...l,...d,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!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`.");let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");let d={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 c.request(d,o)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");let n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");let n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");let n={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,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`.");let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(s,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"PUT",path:a,queryParameters:n,headers:s,data:r};return c.request(d,o)},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`.");let n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)}}}function Fs(u,i,p){if(!u||typeof u!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return Z({appId:u,apiKey:i,timeouts:{connect:L,read:K,write:F},logger:W(),requester:Y(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:I(),requestsCache:I({serializable:!1}),hostsCache:O({caches:[B({key:`${A}-${u}`}),I()]}),...p})}
function Q(){function u(i){return new Promise(p=>{let m=new XMLHttpRequest;m.open(i.method,i.url,!0),Object.keys(i.headers).forEach(e=>m.setRequestHeader(e,i.headers[e]));let h=(e,r)=>setTimeout(()=>{m.abort(),p({status:0,content:r,isTimedOut:!0});},e),P=h(i.connectTimeout,"Connection timeout"),c;m.onreadystatechange=()=>{m.readyState>m.OPENED&&c===void 0&&(clearTimeout(P),c=h(i.responseTimeout,"Socket timeout"));},m.onerror=()=>{m.status===0&&(clearTimeout(P),clearTimeout(c),p({content:m.responseText||"Network request failed",status:m.status,isTimedOut:!1}));},m.onload=()=>{clearTimeout(P),clearTimeout(c),p({content:m.responseText,status:m.status,isTimedOut:!1});},m.send(i.data);})}return {send:u}}function L(u){let i,p=`algolia-client-js-${u.key}`;function m(){return i===void 0&&(i=u.localStorage||window.localStorage),i}function h(){return JSON.parse(m().getItem(p)||"{}")}function P(e){m().setItem(p,JSON.stringify(e));}function c(){let e=u.timeToLive?u.timeToLive*1e3:null,r=h(),t=Object.fromEntries(Object.entries(r).filter(([,a])=>a.timestamp!==void 0));if(P(t),!e)return;let o=Object.fromEntries(Object.entries(t).filter(([,a])=>{let s=new Date().getTime();return !(a.timestamp+e<s)}));P(o);}return {get(e,r,t={miss:()=>Promise.resolve()}){return Promise.resolve().then(()=>(c(),h()[JSON.stringify(e)])).then(o=>Promise.all([o?o.value:r(),o!==void 0])).then(([o,a])=>Promise.all([o,a||t.miss(o)])).then(([o])=>o)},set(e,r){return Promise.resolve().then(()=>{let t=h();return t[JSON.stringify(e)]={timestamp:new Date().getTime(),value:r},m().setItem(p,JSON.stringify(t)),r})},delete(e){return Promise.resolve().then(()=>{let r=h();delete r[JSON.stringify(e)],m().setItem(p,JSON.stringify(r));})},clear(){return Promise.resolve().then(()=>{m().removeItem(p);})}}}function re(){return {get(u,i,p={miss:()=>Promise.resolve()}){return i().then(h=>Promise.all([h,p.miss(h)])).then(([h])=>h)},set(u,i){return Promise.resolve(i)},delete(u){return Promise.resolve()},clear(){return Promise.resolve()}}}function O(u){let i=[...u.caches],p=i.shift();return p===void 0?re():{get(m,h,P={miss:()=>Promise.resolve()}){return p.get(m,h,P).catch(()=>O({caches:i}).get(m,h,P))},set(m,h){return p.set(m,h).catch(()=>O({caches:i}).set(m,h))},delete(m){return p.delete(m).catch(()=>O({caches:i}).delete(m))},clear(){return p.clear().catch(()=>O({caches:i}).clear())}}}function I(u={serializable:!0}){let i={};return {get(p,m,h={miss:()=>Promise.resolve()}){let P=JSON.stringify(p);if(P in i)return Promise.resolve(u.serializable?JSON.parse(i[P]):i[P]);let c=m();return c.then(e=>h.miss(e)).then(()=>c)},set(p,m){return i[JSON.stringify(p)]=u.serializable?JSON.stringify(m):m,Promise.resolve(m)},delete(p){return delete i[JSON.stringify(p)],Promise.resolve()},clear(){return i={},Promise.resolve()}}}var K=1e3,F=2e3,_=3e4;function te(u){let i={value:`Algolia for JavaScript (${u})`,add(p){let m=`; ${p.segment}${p.version!==void 0?` (${p.version})`:""}`;return i.value.indexOf(m)===-1&&(i.value=`${i.value}${m}`),i}};return i}function M(u,i,p="WithinHeaders"){let m={"x-algolia-api-key":i,"x-algolia-application-id":u};return {headers(){return p==="WithinHeaders"?m:{}},queryParameters(){return p==="WithinQueryParameters"?m:{}}}}function S({func:u,validate:i,aggregator:p,error:m,timeout:h=()=>0}){let P=c=>new Promise((e,r)=>{u(c).then(t=>(p&&p(t),i(t)?e(t):m&&m.validate(t)?r(new Error(m.message(t))):setTimeout(()=>{P(t).then(e).catch(r);},h()))).catch(t=>{r(t);});});return P()}function W({algoliaAgents:u,client:i,version:p}){let m=te(p).add({segment:i,version:p});return u.forEach(h=>m.add(h)),m}function $(){return {debug(u,i){return Promise.resolve()},info(u,i){return Promise.resolve()},error(u,i){return Promise.resolve()}}}var G=2*60*1e3;function B(u,i="up"){let p=Date.now();function m(){return i==="up"||Date.now()-p>G}function h(){return i==="timed out"&&Date.now()-p<=G}return {...u,status:i,lastUpdate:p,isUp:m,isTimedOut:h}}var J=class extends Error{name="AlgoliaError";constructor(u,i){super(u),i&&(this.name=i);}},z=class extends J{stackTrace;constructor(u,i,p){super(u,p),this.stackTrace=i;}},se=class extends z{constructor(u){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.",u,"RetryError");}},b=class extends z{status;constructor(u,i,p,m="ApiError"){super(u,p,m),this.status=i;}},oe=class extends J{response;constructor(u,i){super(u,"DeserializationError"),this.response=i;}},ae=class extends b{error;constructor(u,i,p,m){super(u,i,m,"DetailedApiError"),this.error=p;}};function V(u){let i=u;for(let p=u.length-1;p>0;p--){let m=Math.floor(Math.random()*(p+1)),h=u[p];i[p]=u[m],i[m]=h;}return i}function ne(u,i,p){let m=ie(p),h=`${u.protocol}://${u.url}${u.port?`:${u.port}`:""}/${i.charAt(0)==="/"?i.substring(1):i}`;return m.length&&(h+=`?${m}`),h}function ie(u){return Object.keys(u).filter(i=>u[i]!==void 0).sort().map(i=>`${i}=${encodeURIComponent(Object.prototype.toString.call(u[i])==="[object Array]"?u[i].join(","):u[i]).replace(/\+/g,"%20")}`).join("&")}function ue(u,i){if(u.method==="GET"||u.data===void 0&&i.data===void 0)return;let p=Array.isArray(u.data)?u.data:{...u.data,...i.data};return JSON.stringify(p)}function ce(u,i,p){let m={Accept:"application/json",...u,...i,...p},h={};return Object.keys(m).forEach(P=>{let c=m[P];h[P.toLowerCase()]=c;}),h}function me(u){try{return JSON.parse(u.content)}catch(i){throw new oe(i.message,u)}}function pe({content:u,status:i},p){try{let m=JSON.parse(u);return "error"in m?new ae(m.message,i,m.error,p):new b(m.message,i,p)}catch{}return new b(u,i,p)}function de({isTimedOut:u,status:i}){return !u&&~~i===0}function he({isTimedOut:u,status:i}){return u||de({isTimedOut:u,status:i})||~~(i/100)!==2&&~~(i/100)!==4}function le({status:u}){return ~~(u/100)===2}function Pe(u){return u.map(i=>X(i))}function X(u){let i=u.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return {...u,request:{...u.request,headers:{...u.request.headers,...i}}}}function Y({hosts:u,hostsCache:i,baseHeaders:p,logger:m,baseQueryParameters:h,algoliaAgent:P,timeouts:c,requester:e,requestsCache:r,responsesCache:t}){async function o(n){let d=await Promise.all(n.map(q=>i.get(q,()=>Promise.resolve(B(q))))),l=d.filter(q=>q.isUp()),f=d.filter(q=>q.isTimedOut()),g=[...l,...f];return {hosts:g.length>0?g:n,getTimeout(q,w){return (f.length===0&&q===0?1:f.length+3+q)*w}}}async function a(n,d,l=!0){let f=[],g=ue(n,d),y=ce(p,n.headers,d.headers),q=n.method==="GET"?{...n.data,...d.data}:{},w={...h,...n.queryParameters,...q};if(P.value&&(w["x-algolia-agent"]=P.value),d&&d.queryParameters)for(let R of Object.keys(d.queryParameters))!d.queryParameters[R]||Object.prototype.toString.call(d.queryParameters[R])==="[object Object]"?w[R]=d.queryParameters[R]:w[R]=d.queryParameters[R].toString();let T=0,j=async(R,U)=>{let E=R.pop();if(E===void 0)throw new se(Pe(f));let D={...c,...d.timeouts},N={data:g,headers:y,method:n.method,url:ne(E,n.path,w),connectTimeout:U(T,D.connect),responseTimeout:U(T,l?D.read:D.write)},k=v=>{let H={request:N,response:v,host:E,triesLeft:R.length};return f.push(H),H},x=await e.send(N);if(he(x)){let v=k(x);return x.isTimedOut&&T++,m.info("Retryable failure",X(v)),await i.set(E,B(E,x.isTimedOut?"timed out":"down")),j(R,U)}if(le(x))return me(x);throw k(x),pe(x,f)},ee=u.filter(R=>R.accept==="readWrite"||(l?R.accept==="read":R.accept==="write")),C=await o(ee);return j([...C.hosts].reverse(),C.getTimeout)}function s(n,d={}){let l=n.useReadTransporter||n.method==="GET";if(!l)return a(n,d,l);let f=()=>a(n,d);if((d.cacheable||n.cacheable)!==!0)return f();let y={request:n,requestOptions:d,transporter:{queryParameters:h,headers:p}};return t.get(y,()=>r.get(y,()=>r.set(y,f()).then(q=>Promise.all([r.delete(y),q]),q=>Promise.all([r.delete(y),Promise.reject(q)])).then(([q,w])=>w)),{miss:q=>t.set(y,q)})}return {hostsCache:i,requester:e,timeouts:c,logger:m,algoliaAgent:P,baseHeaders:p,baseQueryParameters:h,hosts:u,request:s,requestsCache:r,responsesCache:t}}var A="5.8.0";function qe(u){return [{url:`${u}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${u}.algolia.net`,accept:"write",protocol:"https"}].concat(V([{url:`${u}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${u}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function Z({appId:u,apiKey:i,authMode:p,algoliaAgents:m,...h}){let P=M(u,i,p),c=Y({hosts:qe(u),...h,algoliaAgent:W({algoliaAgents:m,client:"Search",version:A}),baseHeaders:{"content-type":"text/plain",...P.headers(),...h.baseHeaders},baseQueryParameters:{...P.queryParameters(),...h.baseQueryParameters}});return {transporter:c,appId:u,clearCache(){return Promise.all([c.requestsCache.clear(),c.responsesCache.clear()]).then(()=>{})},get _ua(){return c.algoliaAgent.value},addAlgoliaAgent(e,r){c.algoliaAgent.add({segment:e,version:r});},setClientApiKey({apiKey:e}){!p||p==="WithinHeaders"?c.baseHeaders["x-algolia-api-key"]=e:c.baseQueryParameters["x-algolia-api-key"]=e;},waitForTask({indexName:e,taskID:r,maxRetries:t=50,timeout:o=s=>Math.min(s*200,5e3)},a){let s=0;return S({func:()=>this.getTask({indexName:e,taskID:r},a),validate:n=>n.status==="published",aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>o(s)})},waitForAppTask({taskID:e,maxRetries:r=50,timeout:t=a=>Math.min(a*200,5e3)},o){let a=0;return S({func:()=>this.getAppTask({taskID:e},o),validate:s=>s.status==="published",aggregator:()=>a+=1,error:{validate:()=>a>=r,message:()=>`The maximum number of retries exceeded. (${a}/${r})`},timeout:()=>t(a)})},waitForApiKey({operation:e,key:r,apiKey:t,maxRetries:o=50,timeout:a=n=>Math.min(n*200,5e3)},s){let n=0,d={aggregator:()=>n+=1,error:{validate:()=>n>=o,message:()=>`The maximum number of retries exceeded. (${n}/${o})`},timeout:()=>a(n)};if(e==="update"){if(!t)throw new Error("`apiKey` is required when waiting for an `update` operation.");return S({...d,func:()=>this.getApiKey({key:r},s),validate:l=>{for(let f of Object.keys(t)){let g=t[f],y=l[f];if(Array.isArray(g)&&Array.isArray(y)){if(g.length!==y.length||g.some((q,w)=>q!==y[w]))return !1}else if(g!==y)return !1}return !0}})}return S({...d,func:()=>this.getApiKey({key:r},s).catch(l=>{if(l.status!==404)throw l}),validate:l=>e==="add"?l!==void 0:l===void 0})},browseObjects({indexName:e,browseParams:r,...t},o){return S({func:a=>this.browse({indexName:e,browseParams:{cursor:a?a.cursor:void 0,...r}},o),validate:a=>a.cursor===void 0,...t})},browseRules({indexName:e,searchRulesParams:r,...t},o){let a={hitsPerPage:1e3,...r};return S({func:s=>this.searchRules({indexName:e,searchRulesParams:{...a,page:s?s.page+1:a.page||0}},o),validate:s=>s.nbHits<a.hitsPerPage,...t})},browseSynonyms({indexName:e,searchSynonymsParams:r,...t},o){let a={page:0,...r,hitsPerPage:1e3};return S({func:s=>{let n=this.searchSynonyms({indexName:e,searchSynonymsParams:{...a,page:a.page}},o);return a.page+=1,n},validate:s=>s.nbHits<a.hitsPerPage,...t})},async chunkedBatch({indexName:e,objects:r,action:t="addObject",waitForTasks:o,batchSize:a=1e3},s){let n=[],d=[],l=r.entries();for(let[f,g]of l)n.push({action:t,body:g}),(n.length===a||f===r.length-1)&&(d.push(await this.batch({indexName:e,batchWriteParams:{requests:n}},s)),n=[]);if(o)for(let f of d)await this.waitForTask({indexName:e,taskID:f.taskID});return d},async saveObjects({indexName:e,objects:r},t){return await this.chunkedBatch({indexName:e,objects:r,action:"addObject"},t)},async deleteObjects({indexName:e,objectIDs:r},t){return await this.chunkedBatch({indexName:e,objects:r.map(o=>({objectID:o})),action:"deleteObject"},t)},async partialUpdateObjects({indexName:e,objects:r,createIfNotExists:t},o){return await this.chunkedBatch({indexName:e,objects:r,action:t?"partialUpdateObject":"partialUpdateObjectNoCreate"},o)},async replaceAllObjects({indexName:e,objects:r,batchSize:t},o){let a=Math.floor(Math.random()*1e6)+1e5,s=`${e}_tmp_${a}`,n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),d=await this.chunkedBatch({indexName:s,objects:r,waitForTasks:!0,batchSize:t},o);await this.waitForTask({indexName:s,taskID:n.taskID}),n=await this.operationIndex({indexName:e,operationIndexParams:{operation:"copy",destination:s,scope:["settings","rules","synonyms"]}},o),await this.waitForTask({indexName:s,taskID:n.taskID});let l=await this.operationIndex({indexName:s,operationIndexParams:{operation:"move",destination:e}},o);return await this.waitForTask({indexName:s,taskID:l.taskID}),{copyOperationResponse:n,batchResponses:d,moveOperationResponse:l}},async indexExists({indexName:e}){try{await this.getSettings({indexName:e});}catch(r){if(r instanceof b&&r.status===404)return !1;throw r}return !0},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},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`.");let s={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return c.request(s,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},o){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`.");let d={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let o="/1/clusters/mapping",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,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`.");let o="/1/clusters/mapping/batch",a={},s={};e!==void 0&&(a["X-Algolia-User-ID"]=e.toString());let n={method:"POST",path:o,queryParameters:s,headers:a,data:r};return c.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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");let n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return c.request(n,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");let s={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");let o="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},clearSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearSynonyms`.");let o="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),a={},s={};r!==void 0&&(s.forwardToReplicas=r.toString());let n={method:"POST",path:o,queryParameters:s,headers:a};return c.request(n,t)},customDelete({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");let n={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customGet({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");let n={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return c.request(n,t)},customPost({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");let d={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},customPut({path:e,parameters:r,body:t},o){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");let d={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return c.request(d,o)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");let s={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");let s={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");let a="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");let s={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");let a="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"DELETE",path:a,queryParameters:n,headers:s};return c.request(d,o)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");let s={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");let s={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getDictionaryLanguages(e){let a={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return c.request(a,e)},getDictionarySettings(e){let a={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return c.request(a,e)},getLogs({offset:e,length:r,indexName:t,type:o}={},a=void 0){let s="/1/logs",n={},d={};e!==void 0&&(d.offset=e.toString()),r!==void 0&&(d.length=r.toString()),t!==void 0&&(d.indexName=t.toString()),o!==void 0&&(d.type=o.toString());let l={method:"GET",path:s,queryParameters:d,headers:n};return c.request(l,a)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");let a="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={},n={};t!==void 0&&(n.attributesToRetrieve=t.toString());let d={method:"GET",path:a,queryParameters:n,headers:s};return c.request(d,o)},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`.");let s={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");let s={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},getSources(e){let a={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return c.request(a,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,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`.");let n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return c.request(n,t)},getTopUserIds(e){let a={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return c.request(a,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");let s={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},hasPendingMappings({getClusters:e}={},r=void 0){let t="/1/clusters/mapping/pending",o={},a={};e!==void 0&&(a.getClusters=e.toString());let s={method:"GET",path:t,queryParameters:a,headers:o};return c.request(s,r)},listApiKeys(e){let a={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return c.request(a,e)},listClusters(e){let a={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return c.request(a,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){let o="/1/indexes",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){let o="/1/clusters/mapping",a={},s={};e!==void 0&&(s.page=e.toString()),r!==void 0&&(s.hitsPerPage=r.toString());let n={method:"GET",path:o,queryParameters:s,headers:a};return c.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`.");let s={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:o},a){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`.");let s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.createIfNotExists=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");let s={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");let s={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return c.request(s,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");let s={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return c.request(s,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`.");let n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");let s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.clearExistingRules=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:o},a){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`.");let s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),n={},d={};o!==void 0&&(d.forwardToReplicas=o.toString());let l={method:"PUT",path:s,queryParameters:d,headers:n,data:t};return c.request(l,a)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:o},a){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");let s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),n={},d={};t!==void 0&&(d.forwardToReplicas=t.toString()),o!==void 0&&(d.replaceExistingSynonyms=o.toString());let l={method:"POST",path:s,queryParameters:d,headers:n,data:r};return c.request(l,a)},search(e,r){if(e&&Array.isArray(e)&&(e={requests:e.map(({params:d,...l})=>l.type==="facet"?{...l,...d,type:"facet"}:{...l,...d,facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}),!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`.");let s={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");let d={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 c.request(d,o)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");let n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");let n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,t)},searchSynonyms({indexName:e,searchSynonymsParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");let n={method:"POST",path:"/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return c.request(n,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`.");let s={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return c.request(s,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`.");let s={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return c.request(s,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},o){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");let a="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={},n={};t!==void 0&&(n.forwardToReplicas=t.toString());let d={method:"PUT",path:a,queryParameters:n,headers:s,data:r};return c.request(d,o)},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`.");let n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return c.request(n,t)}}}function Vs(u,i,p){if(!u||typeof u!="string")throw new Error("`appId` is missing.");if(!i||typeof i!="string")throw new Error("`apiKey` is missing.");return Z({appId:u,apiKey:i,timeouts:{connect:K,read:F,write:_},logger:$(),requester:Q(),algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:I(),requestsCache:I({serializable:!1}),hostsCache:O({caches:[L({key:`${A}-${u}`}),I()]}),...p})}
exports.apiClientVersion = A;
exports.searchClient = Fs;
exports.searchClient = Vs;
}));
// eslint-disable-next-line import/no-commonjs,import/extensions
module.exports = require('./dist/builds/node.cjs');
module.exports = require('./dist/builds/node.cjs');

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

| 'browse'
| 'deleteObject'
| 'deleteIndex'
| 'deleteObject'
| 'editSettings'

@@ -14,0 +14,0 @@ | 'inference'

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

| 'addObject'
| 'clear'
| 'delete'
| 'deleteObject'
| 'updateObject'
| 'partialUpdateObject'
| 'partialUpdateObjectNoCreate'
| 'updateObject';
| 'deleteObject'
| 'delete'
| 'clear';
// 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 type AlternativesAsExact = 'ignorePlurals' | 'multiWordsSynonym' | 'singleWordSynonym';
export type AlternativesAsExact = 'ignorePlurals' | 'singleWordSynonym' | 'multiWordsSynonym';
// 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.
/**
* Which part of the search query the pattern should match: - `startsWith`. The pattern must match the begginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as pattern with `anchoring: is`.
* Which part of the search query the pattern should match: - `startsWith`. The pattern must match the beginning of the query. - `endsWith`. The pattern must match the end of the query. - `is`. The pattern must match the query exactly. - `contains`. The pattern must match anywhere in the query. Empty queries are only allowed as patterns with `anchoring: is`.
*/
export type Anchoring = 'contains' | 'endsWith' | 'is' | 'startsWith';
export type Anchoring = 'is' | 'startsWith' | 'endsWith' | 'contains';

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

*/
acl: Acl[];
acl: Array<Acl>;

@@ -23,3 +23,3 @@ /**

*/
indexes?: string[];
indexes?: Array<string>;

@@ -37,3 +37,3 @@ /**

/**
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address that\'s outside the restricted range.
* Query parameters to add when making API requests with this API key. To restrict this API key to specific IP addresses, add the `restrictSources` parameter. You can only add a single source, but you can provide a range of IP addresses. Creating an API key fails if the request is made from an IP address outside the restricted range.
*/

@@ -45,3 +45,3 @@ queryParameters?: string;

*/
referers?: string[];
referers?: Array<string>;

@@ -48,0 +48,0 @@ /**

@@ -8,2 +8,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.

*/
export type AroundPrecision = Range[] | number;
export type AroundPrecision = number | Array<Range>;

@@ -8,2 +8,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.

*/
export type AroundRadius = AroundRadiusAll | number;
export type AroundRadius = number | AroundRadiusAll;

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

export type AttributeToUpdate = BuiltInOperation | string;
export type AttributeToUpdate = string | BuiltInOperation;

@@ -8,2 +8,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.

*/
export type AutomaticFacetFilters = AutomaticFacetFilter[] | string[];
export type AutomaticFacetFilters = Array<AutomaticFacetFilter> | Array<string>;

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

/**
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows using this attribute as a filter, but doesn\'t evalue the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are attributes that let you categorize search results. They can be used for filtering search results. By default, no attribute is used for faceting. Attribute names are case-sensitive. **Modifiers** - `filterOnly(\"ATTRIBUTE\")`. Allows the attribute to be used as a filter but doesn\'t evaluate the facet values. - `searchable(\"ATTRIBUTE\")`. Allows searching for facet values. - `afterDistinct(\"ATTRIBUTE\")`. Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`.
*/
attributesForFaceting?: string[];
attributesForFaceting?: Array<string>;
/**
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer by synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
* Creates [replica indices](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/replicas/). Replicas are copies of a primary index with the same records but different settings, synonyms, or rules. If you want to offer a different ranking or sorting of your search results, you\'ll use replica indices. All index operations on a primary index are automatically forwarded to its replicas. To add a replica index, you must provide the complete set of replicas to this parameter. If you omit a replica from this list, the replica turns into a regular, standalone index that will no longer be synced with the primary index. **Modifier** - `virtual(\"REPLICA\")`. Create a virtual replica, Virtual replicas don\'t increase the number of records and are optimized for [Relevant sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/relevant-sort/).
*/
replicas?: string[];
replicas?: Array<string>;

@@ -25,3 +25,3 @@ /**

*/
unretrievableAttributes?: string[];
unretrievableAttributes?: Array<string>;

@@ -31,3 +31,3 @@ /**

*/
disableTypoToleranceOnWords?: string[];
disableTypoToleranceOnWords?: Array<string>;

@@ -37,3 +37,3 @@ /**

*/
attributesToTransliterate?: string[];
attributesToTransliterate?: Array<string>;

@@ -43,3 +43,3 @@ /**

*/
camelCaseAttributes?: string[];
camelCaseAttributes?: Array<string>;

@@ -54,3 +54,3 @@ /**

*/
indexLanguages?: SupportedLanguage[];
indexLanguages?: Array<SupportedLanguage>;

@@ -60,3 +60,3 @@ /**

*/
disablePrefixOnAttributes?: string[];
disablePrefixOnAttributes?: Array<string>;

@@ -69,5 +69,5 @@ /**

/**
* Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. If you want to turn off filtering for all numeric attributes, specifiy an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
* Numeric attributes that can be used as [numerical filters](https://www.algolia.com/doc/guides/managing-results/rules/detecting-intent/how-to/applying-a-custom-filter-for-a-specific-query/#numerical-filters). Attribute names are case-sensitive. By default, all numeric attributes are available as numerical filters. For faster indexing, reduce the number of numeric attributes. To turn off filtering for all numeric attributes, specify an attribute that doesn\'t exist in your index, such as `NO_NUMERIC_FILTERING`. **Modifier** - `equalOnly(\"ATTRIBUTE\")`. Support only filtering based on equality comparisons `=` and `!=`.
*/
numericAttributesForFiltering?: string[];
numericAttributesForFiltering?: Array<string>;

@@ -80,5 +80,5 @@ /**

/**
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
* Attributes used for searching. Attribute names are case-sensitive. By default, all attributes are searchable and the [Attribute](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/#attribute) ranking criterion is turned off. With a non-empty list, Algolia only returns results with matches in the selected attributes. In addition, the Attribute ranking criterion is turned on: matches in attributes that are higher in the list of `searchableAttributes` rank first. To make matches in two attributes rank equally, include them in a comma-separated string, such as `\"title,alternate_title\"`. Attributes with the same priority are always unordered. For more information, see [Searchable attributes](https://www.algolia.com/doc/guides/sending-and-managing-data/prepare-your-data/how-to/setting-searchable-attributes/). **Modifier** - `unordered(\"ATTRIBUTE\")`. Ignore the position of a match within the attribute. Without a modifier, matches at the beginning of an attribute rank higher than matches at the end.
*/
searchableAttributes?: string[];
searchableAttributes?: Array<string>;

@@ -93,3 +93,3 @@ /**

*/
customNormalization?: Record<string, Record<string, string>>;
customNormalization?: { [key: string]: { [key: string]: string } };

@@ -96,0 +96,0 @@ /**

@@ -6,2 +6,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.

export type BaseSearchParams = BaseSearchParamsWithoutQuery & SearchParamsQuery;
export type BaseSearchParams = SearchParamsQuery & BaseSearchParamsWithoutQuery;

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

*/
restrictSearchableAttributes?: string[];
restrictSearchableAttributes?: Array<string>;

@@ -44,3 +44,3 @@ /**

*/
facets?: string[];
facets?: Array<string>;

@@ -68,3 +68,3 @@ /**

/**
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
*/

@@ -90,3 +90,3 @@ aroundLatLng?: string;

*/
insideBoundingBox?: number[][];
insideBoundingBox?: Array<Array<number>>;

@@ -96,3 +96,3 @@ /**

*/
insidePolygon?: number[][];
insidePolygon?: Array<Array<number>>;

@@ -102,3 +102,3 @@ /**

*/
naturalLanguages?: SupportedLanguage[];
naturalLanguages?: Array<SupportedLanguage>;

@@ -108,3 +108,3 @@ /**

*/
ruleContexts?: string[];
ruleContexts?: Array<string>;

@@ -144,3 +144,3 @@ /**

*/
analyticsTags?: string[];
analyticsTags?: Array<string>;

@@ -147,0 +147,0 @@ /**

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

*/
facets?: Record<string, Record<string, number>>;
facets?: { [key: string]: { [key: string]: number } };

@@ -55,3 +55,3 @@ /**

*/
facets_stats?: Record<string, FacetStats>;
facets_stats?: { [key: string]: FacetStats };

@@ -58,0 +58,0 @@ /**

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

*/
users: string[];
users: Array<string>;
};

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

*/
requests: BatchDictionaryEntriesRequest[];
requests: Array<BatchDictionaryEntriesRequest>;
};

@@ -9,3 +9,3 @@ // 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 type BatchParams = {
requests: MultipleBatchRequest[];
requests: Array<MultipleBatchRequest>;
};

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

*/
objectIDs: string[];
objectIDs: Array<string>;
};

@@ -9,3 +9,3 @@ // 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 type BatchWriteParams = {
requests: BatchRequest[];
requests: Array<BatchRequest>;
};
// 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 type BooleanString = 'false' | 'true';
export type BooleanString = 'true' | 'false';
// 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 { BrowseParamsObject } from './browseParamsObject';
import type { SearchParamsString } from './searchParamsString';
export type BrowseParams = BrowseParamsObject | SearchParamsString;
export type BrowseParams = SearchParamsString | BrowseParamsObject;

@@ -6,2 +6,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.

export type BrowseParamsObject = Cursor & SearchParamsObject;
export type BrowseParamsObject = SearchParamsObject & Cursor;

@@ -8,2 +8,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.

export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & Cursor & SearchHits<T>;
export type BrowseResponse<T = Record<string, any>> = BaseSearchResponse & BrowsePagination & SearchHits<T> & Cursor;

@@ -7,8 +7,8 @@ // 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 type BuiltInOperationType =
| 'Increment'
| 'Decrement'
| 'Add'
| 'Remove'
| 'AddUnique'
| 'Decrement'
| 'Increment'
| 'IncrementFrom'
| 'IncrementSet'
| 'Remove';
| 'IncrementSet';
// 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 type BuiltInOperationValue = number | string;
export type BuiltInOperationValue = string | number;
// 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 { CreateIterablePromise } from '@algolia/client-common';
import { Action } from '../model/action';
import type { Action } from './action';
import type { ApiKey } from './apiKey';
import type { ApiKeyOperation } from './apiKeyOperation';
import type { AssignUserIdParams } from './assignUserIdParams';
import type { BatchAssignUserIdsParams } from './batchAssignUserIdsParams';
import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
import type { BatchWriteParams } from './batchWriteParams';
import type { BrowseParams } from './browseParams';
import type { DeleteByParams } from './deleteByParams';
import type { DictionaryType } from './dictionaryType';
import type { IndexSettings } from './indexSettings';
import type { LogType } from './logType';
import type { OperationIndexParams } from './operationIndexParams';
import type { Rule } from './rule';
import type { SearchDictionaryEntriesParams } from './searchDictionaryEntriesParams';
import type { SearchForFacetValuesRequest } from './searchForFacetValuesRequest';
import { ApiKey } from '../model/apiKey';
import { ApiKeyOperation } from '../model/apiKeyOperation';
import { AssignUserIdParams } from '../model/assignUserIdParams';
import { BatchAssignUserIdsParams } from '../model/batchAssignUserIdsParams';
import { BatchDictionaryEntriesParams } from '../model/batchDictionaryEntriesParams';
import { BatchWriteParams } from '../model/batchWriteParams';
import { BrowseParams } from '../model/browseParams';
import { DeleteByParams } from '../model/deleteByParams';
import { DictionaryType } from '../model/dictionaryType';
import { IndexSettings } from '../model/indexSettings';
import { LogType } from '../model/logType';
import { OperationIndexParams } from '../model/operationIndexParams';
import { Rule } from '../model/rule';
import { SearchDictionaryEntriesParams } from '../model/searchDictionaryEntriesParams';
import { SearchForFacetValuesRequest } from '../model/searchForFacetValuesRequest';
import { SearchParams } from '../model/searchParams';
import { SearchRulesParams } from '../model/searchRulesParams';
import { SearchSynonymsParams } from '../model/searchSynonymsParams';
import { SecuredApiKeyRestrictions } from '../model/securedApiKeyRestrictions';
import { Source } from '../model/source';
import { SynonymHit } from '../model/synonymHit';
import type { SearchForFacetsOptions } from './searchForFacetsOptions';
import type { SearchForHitsOptions } from './searchForHitsOptions';
import type { SearchParams } from './searchParams';
import type { SearchParamsObject } from './searchParamsObject';
import type { SearchRulesParams } from './searchRulesParams';
import type { SearchSynonymsParams } from './searchSynonymsParams';
import type { SecuredApiKeyRestrictions } from './securedApiKeyRestrictions';
import type { Source } from './source';
import type { SynonymHit } from './synonymHit';
import { SearchParamsObject } from './searchParamsObject';
import type { CreateIterablePromise } from '@algolia/client-common';
/**

@@ -44,3 +60,3 @@ * Properties for the `addOrUpdateObject` method.

/**
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
*/

@@ -154,3 +170,3 @@ body: Record<string, unknown>;

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
};

@@ -169,3 +185,3 @@

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
};

@@ -184,3 +200,3 @@

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
/**

@@ -203,3 +219,3 @@ * Parameters to send with the custom request.

*/
parameters?: Record<string, any>;
parameters?: { [key: string]: any };
/**

@@ -359,3 +375,3 @@ * Parameters to send with the custom request.

*/
attributesToRetrieve?: string[];
attributesToRetrieve?: Array<string>;
};

@@ -513,3 +529,3 @@

*/
source: Source[];
source: Array<Source>;
};

@@ -536,3 +552,3 @@

/**
* The record, a schemaless object with attributes that are useful in the context of search and discovery.
* The record. A schemaless object with attributes that are useful in the context of search and discovery.
*/

@@ -569,3 +585,3 @@ body: Record<string, unknown>;

indexName: string;
rules: Rule[];
rules: Array<Rule>;
/**

@@ -608,3 +624,3 @@ * Whether changes are applied to replica indices.

indexName: string;
synonymHit: SynonymHit[];
synonymHit: Array<SynonymHit>;
/**

@@ -611,0 +627,0 @@ * Whether changes are applied to replica indices.

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

*/
promote?: Promote[];
promote?: Array<Promote>;

@@ -27,3 +27,3 @@ /**

*/
hide?: ConsequenceHide[];
hide?: Array<ConsequenceHide>;

@@ -30,0 +30,0 @@ /**

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

*/
remove?: string[];
remove?: Array<string>;

@@ -15,3 +15,3 @@ /**

*/
edits?: Edit[];
edits?: Array<Edit>;
};

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

/**
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
* Coordinates for the center of a circle, expressed as a comma-separated string of latitude and longitude. Only records included within a circle around this central location are included in the results. The radius of the circle is determined by the `aroundRadius` and `minimumAroundRadius` settings. This parameter is ignored if you also specify `insidePolygon` or `insideBoundingBox`.
*/

@@ -31,3 +31,3 @@ aroundLatLng?: string;

*/
insideBoundingBox?: number[][];
insideBoundingBox?: Array<Array<number>>;

@@ -37,3 +37,3 @@ /**

*/
insidePolygon?: number[][];
insidePolygon?: Array<Array<number>>;
};

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

*/
words?: string[];
words?: Array<string>;

@@ -32,3 +32,3 @@ /**

*/
decomposition?: string[];
decomposition?: Array<string>;

@@ -35,0 +35,0 @@ state?: DictionaryEntryState;

@@ -6,2 +6,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.

*/
export type DictionaryEntryState = 'disabled' | 'enabled';
export type DictionaryEntryState = 'enabled' | 'disabled';
// 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 type DictionaryType = 'compounds' | 'plurals' | 'stopwords';
export type DictionaryType = 'plurals' | 'stopwords' | 'compounds';

@@ -6,2 +6,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.

*/
export type FacetFilters = FacetFilters[] | string;
export type FacetFilters = Array<FacetFilters> | string;

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

*/
values?: Record<string, Value>;
values?: { [key: string]: Value };
};

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

*/
order?: string[];
order?: Array<string>;
};

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

*/
replicas?: string[];
replicas?: Array<string>;

@@ -60,0 +60,0 @@ /**

@@ -6,2 +6,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.

export type GetApiKeyResponse = ApiKey & BaseGetApiKeyResponse;
export type GetApiKeyResponse = BaseGetApiKeyResponse & ApiKey;

@@ -6,3 +6,3 @@ // 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 type GetLogsResponse = {
logs: Log[];
logs: Array<Log>;
};

@@ -9,3 +9,3 @@ // 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 type GetObjectsParams = {
requests: GetObjectsRequest[];
requests: Array<GetObjectsRequest>;
};

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

*/
attributesToRetrieve?: string[];
attributesToRetrieve?: Array<string>;

@@ -13,0 +13,0 @@ /**

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

*/
topUsers: Array<Record<string, UserId[]>>;
topUsers: Array<{ [key: string]: Array<UserId> }>;
};

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

*/
clusters?: Record<string, string[]>;
clusters?: { [key: string]: Array<string> };
};

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

export type HighlightResult = HighlightResult[] | HighlightResultOption | { [key: string]: HighlightResult };
export type HighlightResult = HighlightResultOption | { [key: string]: HighlightResult } | Array<HighlightResult>;

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

*/
matchedWords: string[];
matchedWords: Array<string>;

@@ -22,0 +22,0 @@ /**

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

*/
_highlightResult?: Record<string, HighlightResult>;
_highlightResult?: { [key: string]: HighlightResult };

@@ -25,3 +25,3 @@ /**

*/
_snippetResult?: Record<string, SnippetResult>;
_snippetResult?: { [key: string]: SnippetResult };

@@ -28,0 +28,0 @@ _rankingInfo?: RankingInfo;

@@ -9,2 +9,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.

*/
export type IgnorePlurals = BooleanString | SupportedLanguage[] | boolean;
export type IgnorePlurals = Array<SupportedLanguage> | BooleanString | boolean;

@@ -18,2 +18,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 './automaticFacetFilters';
export * from './banner';
export * from './bannerImage';
export * from './bannerImageUrl';
export * from './bannerLink';
export * from './banners';
export * from './baseGetApiKeyResponse';

@@ -39,2 +44,3 @@ export * from './baseIndexSettings';

export * from './builtInOperationValue';
export * from './clientMethodProps';
export * from './condition';

@@ -50,4 +56,4 @@ export * from './consequence';

export * from './deleteByParams';
export * from './deletedAtResponse';
export * from './deleteSourceResponse';
export * from './deletedAtResponse';
export * from './dictionaryAction';

@@ -69,4 +75,4 @@ export * from './dictionaryEntry';

export * from './facetOrdering';
export * from './facets';
export * from './facetStats';
export * from './facets';
export * from './fetchedIndex';

@@ -96,4 +102,4 @@ export * from './getApiKeyResponse';

export * from './logType';
export * from './matchedGeoLocation';
export * from './matchLevel';
export * from './matchedGeoLocation';
export * from './mode';

@@ -114,3 +120,2 @@ export * from './multipleBatchRequest';

export * from './rankingInfo';
export * from './reRankingApplyFilter';
export * from './redirect';

@@ -126,2 +131,3 @@ export * from './redirectRuleIndexData';

export * from './replaceSourceResponse';
export * from './reRankingApplyFilter';
export * from './rule';

@@ -133,6 +139,6 @@ export * from './saveObjectResponse';

export * from './searchDictionaryEntriesResponse';
export * from './searchForFacets';
export * from './searchForFacetsOptions';
export * from './searchForFacetValuesRequest';
export * from './searchForFacetValuesResponse';
export * from './searchForFacets';
export * from './searchForFacetsOptions';
export * from './searchForHits';

@@ -184,3 +190,3 @@ export * from './searchForHitsOptions';

export * from './value';
export * from './widgets';
export * from './withPrimary';
export * from './clientMethodProps';

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

*/
attributesToRetrieve?: string[];
attributesToRetrieve?: Array<string>;

@@ -28,3 +28,3 @@ /**

*/
ranking?: string[];
ranking?: Array<string>;

@@ -34,3 +34,3 @@ /**

*/
customRanking?: string[];
customRanking?: Array<string>;

@@ -45,3 +45,3 @@ /**

*/
attributesToHighlight?: string[];
attributesToHighlight?: Array<string>;

@@ -51,3 +51,3 @@ /**

*/
attributesToSnippet?: string[];
attributesToSnippet?: Array<string>;

@@ -99,3 +99,3 @@ /**

*/
disableTypoToleranceOnAttributes?: string[];
disableTypoToleranceOnAttributes?: Array<string>;

@@ -114,3 +114,3 @@ ignorePlurals?: IgnorePlurals;

*/
queryLanguages?: SupportedLanguage[];
queryLanguages?: Array<SupportedLanguage>;

@@ -146,10 +146,10 @@ /**

/**
* Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words dividied by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
* Words that should be considered optional when found in the query. By default, records must match all words in the search query to be included in the search results. Adding optional words can help to increase the number of search results by running an additional search query that doesn\'t include the optional words. For example, if the search query is \"action video\" and \"video\" is an optional word, the search engine runs two queries. One for \"action video\" and one for \"action\". Records that match all words are ranked higher. For a search query with 4 or more words **and** all its words are optional, the number of matched words required for a record to be included in the search results increases for every 1,000 records: - If `optionalWords` has less than 10 words, the required number of matched words increases by 1: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 2 matched words. - If `optionalWords` has 10 or more words, the number of required matched words increases by the number of optional words divided by 5 (rounded down). For example, with 18 optional words: results 1 to 1,000 require 1 matched word, results 1,001 to 2000 need 4 matched words. For more information, see [Optional words](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/#creating-a-list-of-optional-words).
*/
optionalWords?: string[];
optionalWords?: Array<string>;
/**
* Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelyhood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
* Searchable attributes for which you want to [turn off the Exact ranking criterion](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/adjust-exact-settings/#turn-off-exact-for-some-attributes). Attribute names are case-sensitive. This can be useful for attributes with long values, where the likelihood of an exact match is high, such as product descriptions. Turning off the Exact ranking criterion for these attributes favors exact matching on other attributes. This reduces the impact of individual attributes with a lot of content on ranking.
*/
disableExactOnAttributes?: string[];
disableExactOnAttributes?: Array<string>;

@@ -161,3 +161,3 @@ exactOnSingleWordQuery?: ExactOnSingleWordQuery;

*/
alternativesAsExact?: AlternativesAsExact[];
alternativesAsExact?: Array<AlternativesAsExact>;

@@ -167,3 +167,3 @@ /**

*/
advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];
advancedSyntaxFeatures?: Array<AdvancedSyntaxFeatures>;

@@ -173,3 +173,3 @@ distinct?: Distinct;

/**
* Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurences of \"house\" are replaced by \"home\" in the highlighted response.
* Whether to replace a highlighted word with the matched synonym. By default, the original words are highlighted even if a synonym matches. For example, with `home` as a synonym for `house` and a search for `home`, records matching either \"home\" or \"house\" are included in the search results, and either \"home\" or \"house\" are highlighted. With `replaceSynonymsInHighlight` set to `true`, a search for `home` still matches the same records, but all occurrences of \"house\" are replaced by \"home\" in the highlighted response.
*/

@@ -186,3 +186,3 @@ replaceSynonymsInHighlight?: boolean;

*/
responseFields?: string[];
responseFields?: Array<string>;

@@ -189,0 +189,0 @@ /**

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

*/
keys: GetApiKeyResponse[];
keys: Array<GetApiKeyResponse>;
};

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

*/
topUsers: string[];
topUsers: Array<string>;
};

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

*/
items: FetchedIndex[];
items: Array<FetchedIndex>;

@@ -12,0 +12,0 @@ /**

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

*/
userIDs: UserId[];
userIDs: Array<UserId>;
};

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

*/
inner_queries?: LogQuery[];
inner_queries?: Array<LogQuery>;
};
// 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 type LogType = 'all' | 'build' | 'error' | 'query';
export type LogType = 'all' | 'query' | 'build' | 'error';

@@ -6,2 +6,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.

*/
export type MatchLevel = 'full' | 'none' | 'partial';
export type MatchLevel = 'none' | 'partial' | 'full';

@@ -6,2 +6,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.

*/
export type Mode = 'keywordSearch' | 'neuralSearch';
export type Mode = 'neuralSearch' | 'keywordSearch';

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

*/
taskID: Record<string, number>;
taskID: { [key: string]: number };

@@ -13,3 +13,3 @@ /**

*/
objectIDs: string[];
objectIDs: Array<string>;
};
// 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.
/**
* Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparsions are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
* Filter by numeric facets. **Prefer using the `filters` parameter, which supports all filter types and combinations with boolean operators.** You can use numeric comparison operators: `<`, `<=`, `=`, `!=`, `>`, `>=`. Comparisons are precise up to 3 decimals. You can also provide ranges: `facet:<lower> TO <upper>`. The range includes the lower and upper boundaries. The same combination rules apply as for `facetFilters`.
*/
export type NumericFilters = NumericFilters[] | string;
export type NumericFilters = Array<NumericFilters> | string;

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

*/
scope?: ScopeType[];
scope?: Array<ScopeType>;
};

@@ -6,2 +6,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.

*/
export type OperationType = 'copy' | 'move';
export type OperationType = 'move' | 'copy';

@@ -6,2 +6,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.

*/
export type OptionalFilters = OptionalFilters[] | string;
export type OptionalFilters = Array<OptionalFilters> | string;

@@ -6,2 +6,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.

export type Promote = PromoteObjectID | PromoteObjectIDs;
export type Promote = PromoteObjectIDs | PromoteObjectID;

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

*/
objectIDs: string[];
objectIDs: Array<string>;

@@ -13,0 +13,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.
/**
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
* Determines if and how query words are interpreted as prefixes. By default, only the last query word is treated as a prefix (`prefixLast`). To turn off prefix search, use `prefixNone`. Avoid `prefixAll`, which treats all query words as prefixes. This might lead to counterintuitive results and makes your search slower. For more information, see [Prefix searching](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/override-search-engine-defaults/in-depth/prefix-searching/).
*/
export type QueryType = 'prefixAll' | 'prefixLast' | 'prefixNone';
export type QueryType = 'prefixLast' | 'prefixAll' | 'prefixNone';

@@ -9,3 +9,3 @@ // 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 type Redirect = {
index?: RedirectRuleIndexMetadata[];
index?: Array<RedirectRuleIndexMetadata>;
};

@@ -8,2 +8,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.

*/
export type RemoveStopWords = SupportedLanguage[] | boolean;
export type RemoveStopWords = Array<SupportedLanguage> | boolean;

@@ -6,2 +6,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.

*/
export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
export type RemoveWordsIfNoResults = 'none' | 'lastWords' | 'firstWords' | 'allOptional';

@@ -5,5 +5,6 @@ // 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 { RedirectURL } from './redirectURL';
import type { Widgets } from './widgets';
/**
* Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as, the order of facet names and values without changing your frontend code.
* Extra data that can be used in the search UI. You can use this to control aspects of your search UI, such as the order of facet names and values without changing your frontend code.
*/

@@ -14,2 +15,4 @@ export type RenderingContent = {

redirect?: RedirectURL;
widgets?: Widgets;
};

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

*/
batchResponses: BatchResponse[];
batchResponses: Array<BatchResponse>;
moveOperationResponse: UpdatedAtResponse;
};

@@ -6,2 +6,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.

*/
export type ReRankingApplyFilter = ReRankingApplyFilter[] | string;
export type ReRankingApplyFilter = Array<ReRankingApplyFilter> | string;

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

*/
conditions?: Condition[];
conditions?: Array<Condition>;

@@ -37,3 +37,3 @@ consequence?: Consequence;

*/
validity?: TimeRange[];
validity?: Array<TimeRange>;
};
// 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 type ScopeType = 'rules' | 'settings' | 'synonyms';
export type ScopeType = 'settings' | 'synonyms' | 'rules';

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

*/
hits: DictionaryEntry[];
hits: Array<DictionaryEntry>;

@@ -12,0 +12,0 @@ /**

@@ -6,2 +6,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.

export type SearchForFacets = SearchForFacetsOptions & SearchParams;
export type SearchForFacets = SearchParams & SearchForFacetsOptions;

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

*/
facetHits: FacetHits[];
facetHits: Array<FacetHits>;

@@ -12,0 +12,0 @@ /**

@@ -6,2 +6,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.

export type SearchForHits = SearchForHitsOptions & SearchParams;
export type SearchForHits = SearchParams & SearchForHitsOptions;

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

*/
hits: Array<Hit<T>>;
hits: Hit<T>[];

@@ -12,0 +12,0 @@ /**

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

export type SearchMethodParams = {
requests: SearchQuery[];
requests: Array<SearchQuery>;
strategy?: SearchStrategy;
};

@@ -6,2 +6,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.

export type SearchParams = SearchParamsObject | SearchParamsString;
export type SearchParams = SearchParamsString | SearchParamsObject;

@@ -6,2 +6,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.

export type SearchQuery = SearchForFacets | SearchForHits;
export type SearchQuery = SearchForHits | SearchForFacets;

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

export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchHits<T> & SearchPagination;
export type SearchResponse<T = Record<string, any>> = BaseSearchResponse & SearchPagination & SearchHits<T>;

@@ -6,3 +6,3 @@ // 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 type SearchResponses<T = Record<string, any>> = {
results: Array<SearchResult<T>>;
results: SearchResult<T>[];
};

@@ -6,2 +6,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.

export type SearchResult<T = Record<string, any>> = SearchForFacetValuesResponse | SearchResponse<T>;
export type SearchResult<T = Record<string, any>> = SearchResponse<T> | SearchForFacetValuesResponse;

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

*/
hits: Rule[];
hits: Array<Rule>;

@@ -12,0 +12,0 @@ /**

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

*/
hits: SynonymHit[];
hits: Array<SynonymHit>;

@@ -12,0 +12,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.
/**
* OK.
* OK
*/

@@ -6,0 +6,0 @@ export type SearchUserIdsParams = {

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

/**
* UserIDs data.
* userIDs data.
*/

@@ -13,3 +13,3 @@ export type SearchUserIdsResponse = {

*/
hits: UserHit[];
hits: Array<UserHit>;

@@ -16,0 +16,0 @@ /**

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

*/
restrictIndices?: string[];
restrictIndices?: Array<string>;

@@ -24,0 +24,0 @@ /**

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

*/
eventSources?: string[] | null;
eventSources?: Array<string> | null;
};

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

export type SnippetResult = SnippetResult[] | SnippetResultOption | { [key: string]: SnippetResult };
export type SnippetResult = SnippetResultOption | { [key: string]: SnippetResult } | Array<SnippetResult>;

@@ -6,2 +6,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.

*/
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
export type SortRemainingBy = 'count' | 'alpha' | 'hidden';

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

*/
plurals?: Record<string, boolean> | null;
plurals?: { [key: string]: boolean } | null;

@@ -16,3 +16,3 @@ /**

*/
stopwords?: Record<string, boolean> | null;
stopwords?: { [key: string]: boolean } | null;

@@ -22,3 +22,3 @@ /**

*/
compounds?: Record<string, boolean> | null;
compounds?: { [key: string]: boolean } | null;
};

@@ -55,4 +55,4 @@ // 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.

| 'ps'
| 'pt'
| 'pt-br'
| 'pt'
| 'qu'

@@ -59,0 +59,0 @@ | 'ro'

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

*/
synonyms?: string[];
synonyms?: Array<string>;

@@ -35,3 +35,3 @@ /**

*/
corrections?: string[];
corrections?: Array<string>;

@@ -46,3 +46,3 @@ /**

*/
replacements?: string[];
replacements?: Array<string>;
};

@@ -6,2 +6,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.

*/
export type SynonymType = 'altcorrection1' | 'altcorrection2' | 'onewaysynonym' | 'placeholder' | 'synonym';
export type SynonymType = 'synonym' | 'onewaysynonym' | 'altcorrection1' | 'altcorrection2' | 'placeholder';

@@ -6,2 +6,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.

*/
export type TagFilters = TagFilters[] | string;
export type TagFilters = Array<TagFilters> | string;

@@ -6,2 +6,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.

*/
export type TaskStatus = 'notPublished' | 'published';
export type TaskStatus = 'published' | 'notPublished';

@@ -6,4 +6,4 @@ // 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.

/**
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concetenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) is also active.
* Whether [typo tolerance](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/typo-tolerance/) is enabled and how it is applied. If typo tolerance is true, `min`, or `strict`, [word splitting and concatenation](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/handling-natural-languages-nlp/in-depth/splitting-and-concatenation/) are also active.
*/
export type TypoTolerance = TypoToleranceEnum | boolean;
export type TypoTolerance = boolean | TypoToleranceEnum;

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

/**
* UserID of the requested user. Same as userID.
* userID of the requested user. Same as userID.
*/

@@ -30,0 +30,0 @@ objectID: string;

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

*/
order?: string[];
order?: Array<string>;

@@ -17,3 +17,3 @@ sortRemainingBy?: SortRemainingBy;

*/
hide?: string[];
hide?: Array<string>;
};
{
"version": "5.7.0",
"version": "5.8.0",
"repository": {

@@ -52,6 +52,6 @@ "type": "git",

"dependencies": {
"@algolia/client-common": "5.7.0",
"@algolia/requester-browser-xhr": "5.7.0",
"@algolia/requester-fetch": "5.7.0",
"@algolia/requester-node-http": "5.7.0"
"@algolia/client-common": "5.8.0",
"@algolia/requester-browser-xhr": "5.8.0",
"@algolia/requester-fetch": "5.8.0",
"@algolia/requester-node-http": "5.8.0"
},

@@ -62,3 +62,3 @@ "devDependencies": {

"publint": "0.2.11",
"rollup": "4.22.5",
"rollup": "4.24.0",
"tsup": "8.3.0",

@@ -65,0 +65,0 @@ "typescript": "5.6.2"

@@ -43,9 +43,8 @@ <p align="center">

```bash
yarn add @algolia/client-search@5.7.0
yarn add @algolia/client-search@5.8.0
# or
npm install @algolia/client-search@5.7.0
npm install @algolia/client-search@5.8.0
# or
pnpm add @algolia/client-search@5.7.0
pnpm add @algolia/client-search@5.8.0
```

@@ -58,3 +57,3 @@

```html
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.7.0/dist/builds/browser.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@algolia/client-search@5.8.0/dist/builds/browser.umd.js"></script>
```

@@ -80,2 +79,2 @@

The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).
The Algolia JavaScript API Client is an open-sourced software licensed under the [MIT license](LICENSE).

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 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 too big to display

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 not supported yet

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 too big to display

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