Socket
Socket
Sign inDemoInstall

algoliasearch

Package Overview
Dependencies
7
Maintainers
10
Versions
329
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-alpha.110 to 5.0.0-alpha.111

4

dist/algoliasearch.umd.js

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

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

@@ -10,3 +10,3 @@ import type { AbtestingClient } from '@algolia/client-abtesting';

export * from './models';
export declare const apiClientVersion = "5.0.0-alpha.110";
export declare const apiClientVersion = "5.0.0-alpha.111";
/**

@@ -13,0 +13,0 @@ * The client type.

@@ -10,3 +10,3 @@ import type { AbtestingClient } from '@algolia/client-abtesting';

export * from './models';
export declare const apiClientVersion = "5.0.0-alpha.110";
export declare const apiClientVersion = "5.0.0-alpha.111";
/**

@@ -13,0 +13,0 @@ * The client type.

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

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

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

@@ -72,7 +72,7 @@ import type { Direction } from './direction';

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -94,7 +94,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -116,7 +116,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -138,7 +138,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -160,7 +160,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -182,7 +182,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -204,7 +204,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -226,7 +226,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -248,7 +248,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -270,7 +270,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -292,7 +292,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -322,7 +322,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -361,7 +361,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -395,7 +395,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -433,7 +433,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -467,7 +467,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -509,7 +509,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -547,7 +547,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -585,7 +585,7 @@ endDate?: string;

/**
* Start date (`YYYY-MM-DD`) of the period to analyze.
* Start date of the period to analyze, in `YYYY-MM-DD` format.
*/
startDate?: string;
/**
* End date (`YYYY-MM-DD`) of the period to analyze.
* End date of the period to analyze, in `YYYY-MM-DD` format.
*/

@@ -592,0 +592,0 @@ endDate?: string;

export type GetStatusResponse = {
/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format. If null, no update was performed yet.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ updatedAt: string | null;

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

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

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

* @param getAddToCartRate.index - Index name.
* @param getAddToCartRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getAddToCartRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -111,4 +111,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getAverageClickPosition.index - Index name.
* @param getAverageClickPosition.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getAverageClickPosition.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -126,4 +126,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getClickPositions.index - Index name.
* @param getClickPositions.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getClickPositions.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -141,4 +141,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getClickThroughRate.index - Index name.
* @param getClickThroughRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getClickThroughRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -156,4 +156,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getConversionRate.index - Index name.
* @param getConversionRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getConversionRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -171,4 +171,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getNoClickRate.index - Index name.
* @param getNoClickRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getNoClickRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -186,4 +186,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getNoResultsRate.index - Index name.
* @param getNoResultsRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getNoResultsRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -201,4 +201,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getPurchaseRate.index - Index name.
* @param getPurchaseRate.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getPurchaseRate.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -216,4 +216,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getRevenue.index - Index name.
* @param getRevenue.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getRevenue.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -231,4 +231,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getSearchesCount.index - Index name.
* @param getSearchesCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -246,4 +246,4 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getSearchesNoClicks.index - Index name.
* @param getSearchesNoClicks.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesNoClicks.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoClicks.limit - Number of items to return.

@@ -263,4 +263,4 @@ * @param getSearchesNoClicks.offset - Position of the first item to return.

* @param getSearchesNoResults.index - Index name.
* @param getSearchesNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getSearchesNoResults.limit - Number of items to return.

@@ -291,4 +291,4 @@ * @param getSearchesNoResults.offset - Position of the first item to return.

* @param getTopCountries.index - Index name.
* @param getTopCountries.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopCountries.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopCountries.limit - Number of items to return.

@@ -309,4 +309,4 @@ * @param getTopCountries.offset - Position of the first item to return.

* @param getTopFilterAttributes.search - Search query.
* @param getTopFilterAttributes.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFilterAttributes.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterAttributes.limit - Number of items to return.

@@ -328,4 +328,4 @@ * @param getTopFilterAttributes.offset - Position of the first item to return.

* @param getTopFilterForAttribute.search - Search query.
* @param getTopFilterForAttribute.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFilterForAttribute.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFilterForAttribute.limit - Number of items to return.

@@ -346,4 +346,4 @@ * @param getTopFilterForAttribute.offset - Position of the first item to return.

* @param getTopFiltersNoResults.search - Search query.
* @param getTopFiltersNoResults.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFiltersNoResults.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopFiltersNoResults.limit - Number of items to return.

@@ -366,4 +366,4 @@ * @param getTopFiltersNoResults.offset - Position of the first item to return.

* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
* @param getTopHits.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopHits.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopHits.limit - Number of items to return.

@@ -385,4 +385,4 @@ * @param getTopHits.offset - Position of the first item to return.

* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
* @param getTopSearches.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopSearches.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.

@@ -404,4 +404,4 @@ * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.

* @param getUsersCount.index - Index name.
* @param getUsersCount.startDate - Start date (`YYYY-MM-DD`) of the period to analyze.
* @param getUsersCount.endDate - End date (`YYYY-MM-DD`) of the period to analyze.
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).

@@ -408,0 +408,0 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

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

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

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

@@ -7,3 +7,3 @@ export type AddApiKeyResponse = {

/**
* Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was created, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ createdAt: string;

@@ -7,3 +7,3 @@ export type BaseGetApiKeyResponse = {

/**
* Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time).
* Timestamp when the object was created, in milliseconds since the Unix epoch.
*/

@@ -10,0 +10,0 @@ createdAt: number;

import type { SupportedLanguage } from './supportedLanguage';
export type BaseIndexSettings = {
/**
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers** <dl> <dt><code>filterOnly(\"ATTRIBUTE\")</code></dt> <dd>Allows using this attribute as a filter, but doesn\'t evalue the facet values.</dd> <dt><code>searchable(\"ATTRIBUTE\")</code></dt> <dd>Allows searching for facet values.</dd> <dt><code>afterDistinct(\"ATTRIBUTE\")</code></dt> <dd> Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. </dd> </dl> Without modifiers, the attribute is used as a regular facet.
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **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))`.
*/
attributesForFaceting?: 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** <dl> <dt><code>virtual(\"REPLICA\")</code></dt> <dd> 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/). </dd> </dl> Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-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 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/).
*/

@@ -48,3 +48,3 @@ replicas?: string[];

/**
* 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). 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** <dl> <dt><code>equalOnly(\"ATTRIBUTE\")</code></dt> <dd> Support only filtering based on equality comparisons `=` and `!=`. </dd> </dl> Without modifier, all numeric comparisons are supported.
* 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). 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 `!=`.
*/

@@ -57,3 +57,3 @@ numericAttributesForFiltering?: string[];

/**
* Attributes used for searching. 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** <dl> <dt><code>unordered(\"ATTRIBUTE\")</code></dt> <dd> Ignore the position of a match within the attribute. </dd> </dl> Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
* Attributes used for searching. 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.
*/

@@ -60,0 +60,0 @@ searchableAttributes?: string[];

@@ -13,3 +13,3 @@ import type { AroundPrecision } from './aroundPrecision';

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -16,0 +16,0 @@ filters?: string;

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

/**
* User ID to assign.
* Unique identifier of the user who makes the search request.
*/

@@ -73,3 +73,3 @@ xAlgoliaUserID: string;

/**
* User ID to assign.
* Unique identifier of the user who makes the search request.
*/

@@ -378,3 +378,3 @@ xAlgoliaUserID: string;

/**
* User ID to assign.
* Unique identifier of the user who makes the search request.
*/

@@ -454,3 +454,3 @@ userID: string;

/**
* User ID to assign.
* Unique identifier of the user who makes the search request.
*/

@@ -457,0 +457,0 @@ userID: string;

@@ -6,3 +6,3 @@ /**

/**
* Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was created, in RFC 3339 format.
*/

@@ -9,0 +9,0 @@ createdAt: string;

export type DeleteApiKeyResponse = {
/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ deletedAt: string;

@@ -8,3 +8,3 @@ import type { AroundRadius } from './aroundRadius';

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -11,0 +11,0 @@ filters?: string;

@@ -10,3 +10,3 @@ /**

/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/

@@ -13,0 +13,0 @@ deletedAt: string;

export type DeleteSourceResponse = {
/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ deletedAt: string;

/**
* Determines how 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) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
* Determines how 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) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t.
*/
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
//# sourceMappingURL=exactOnSingleWordQuery.d.ts.map

@@ -11,3 +11,3 @@ export type FetchedIndex = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -14,0 +14,0 @@ updatedAt: string;

@@ -21,7 +21,7 @@ import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';

/**
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
*/
ranking?: string[];
/**
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
*/

@@ -118,7 +118,7 @@ customRanking?: string[];

/**
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
*/
alternativesAsExact?: AlternativesAsExact[];
/**
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
*/

@@ -148,3 +148,3 @@ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];

/**
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
*/

@@ -151,0 +151,0 @@ sortFacetValuesBy?: string;

import type { LogQuery } from './logQuery';
export type Log = {
/**
* Timestamp of the API request in ISO 8601 format.
* Date and time of the API request, in RFC 3339 format.
*/

@@ -6,0 +6,0 @@ timestamp: string;

export type RemoveUserIdResponse = {
/**
* Timestamp of deletion in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was deleted, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ deletedAt: string;

/**
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
*/
export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
//# sourceMappingURL=removeWordsIfNoResults.d.ts.map
export type ReplaceSourceResponse = {
/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ updatedAt: string;

export type SaveObjectResponse = {
/**
* Timestamp when the record was added, in ISO 8601 format.
* Date and time when the object was created, in RFC 3339 format.
*/

@@ -5,0 +5,0 @@ createdAt: string;

@@ -7,3 +7,3 @@ export type SaveSynonymResponse = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ updatedAt: string;

@@ -23,3 +23,3 @@ import type { UserHit } from './userHit';

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -26,0 +26,0 @@ updatedAt: string;

@@ -9,3 +9,3 @@ import type { SearchParamsObject } from './searchParamsObject';

/**
* Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire.
* Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
*/

@@ -12,0 +12,0 @@ validUntil?: number;

/**
* Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
*/
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
//# sourceMappingURL=sortRemainingBy.d.ts.map

@@ -7,3 +7,3 @@ export type UpdateApiKeyResponse = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ updatedAt: string;

@@ -10,3 +10,3 @@ /**

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -13,0 +13,0 @@ updatedAt: string;

@@ -10,3 +10,3 @@ /**

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -13,0 +13,0 @@ updatedAt?: string;

@@ -7,3 +7,3 @@ export type UpdatedRuleResponse = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ updatedAt: string;

import type { UserHighlightResult } from './userHighlightResult';
export type UserHit = {
/**
* User ID.
* Unique identifier of the user who makes the search request.
*/

@@ -6,0 +6,0 @@ userID: string;

@@ -6,3 +6,3 @@ /**

/**
* User ID.
* Unique identifier of the user who makes the search request.
*/

@@ -9,0 +9,0 @@ userID: string;

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

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

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

* @param assignUserId - The assignUserId object.
* @param assignUserId.xAlgoliaUserID - User ID to assign.
* @param assignUserId.xAlgoliaUserID - Unique identifier of the user who makes the search request.
* @param assignUserId.assignUserIdParams - The assignUserIdParams object.

@@ -241,3 +241,3 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param batchAssignUserIds - The batchAssignUserIds object.
* @param batchAssignUserIds.xAlgoliaUserID - User ID to assign.
* @param batchAssignUserIds.xAlgoliaUserID - Unique identifier of the user who makes the search request.
* @param batchAssignUserIds.batchAssignUserIdsParams - The batchAssignUserIdsParams object.

@@ -562,3 +562,3 @@ * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

* @param getUserId - The getUserId object.
* @param getUserId.userID - User ID to assign.
* @param getUserId.userID - Unique identifier of the user who makes the search request.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -660,3 +660,3 @@ */

* @param removeUserId - The removeUserId object.
* @param removeUserId.userID - User ID to assign.
* @param removeUserId.userID - Unique identifier of the user who makes the search request.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.

@@ -663,0 +663,0 @@ */

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

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
const apiClientVersion = '5.0.0-alpha.110';
const apiClientVersion = '5.0.0-alpha.111';
function getDefaultHosts(appId) {

@@ -703,0 +703,0 @@ return [

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

// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
const apiClientVersion = '5.0.0-alpha.110';
const apiClientVersion = '5.0.0-alpha.111';
function getDefaultHosts(appId) {

@@ -8,0 +8,0 @@ return [

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

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

@@ -7,3 +7,3 @@ export type AddApiKeyResponse = {

/**
* Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was created, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ createdAt: string;

@@ -7,3 +7,3 @@ export type BaseGetApiKeyResponse = {

/**
* Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time).
* Timestamp when the object was created, in milliseconds since the Unix epoch.
*/

@@ -10,0 +10,0 @@ createdAt: number;

import type { SupportedLanguage } from './supportedLanguage';
export type BaseIndexSettings = {
/**
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers** <dl> <dt><code>filterOnly(\"ATTRIBUTE\")</code></dt> <dd>Allows using this attribute as a filter, but doesn\'t evalue the facet values.</dd> <dt><code>searchable(\"ATTRIBUTE\")</code></dt> <dd>Allows searching for facet values.</dd> <dt><code>afterDistinct(\"ATTRIBUTE\")</code></dt> <dd> Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. </dd> </dl> Without modifiers, the attribute is used as a regular facet.
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **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))`.
*/
attributesForFaceting?: 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** <dl> <dt><code>virtual(\"REPLICA\")</code></dt> <dd> 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/). </dd> </dl> Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-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 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/).
*/

@@ -48,3 +48,3 @@ replicas?: string[];

/**
* 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). 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** <dl> <dt><code>equalOnly(\"ATTRIBUTE\")</code></dt> <dd> Support only filtering based on equality comparisons `=` and `!=`. </dd> </dl> Without modifier, all numeric comparisons are supported.
* 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). 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 `!=`.
*/

@@ -57,3 +57,3 @@ numericAttributesForFiltering?: string[];

/**
* Attributes used for searching. 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** <dl> <dt><code>unordered(\"ATTRIBUTE\")</code></dt> <dd> Ignore the position of a match within the attribute. </dd> </dl> Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
* Attributes used for searching. 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.
*/

@@ -60,0 +60,0 @@ searchableAttributes?: string[];

@@ -13,3 +13,3 @@ import type { AroundPrecision } from './aroundPrecision';

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -16,0 +16,0 @@ filters?: string;

@@ -8,3 +8,3 @@ import type { AroundRadius } from './aroundRadius';

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -11,0 +11,0 @@ filters?: string;

/**
* Determines how 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) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
* Determines how 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) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t.
*/
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';
//# sourceMappingURL=exactOnSingleWordQuery.d.ts.map

@@ -11,3 +11,3 @@ export type FetchedIndex = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -14,0 +14,0 @@ updatedAt: string;

@@ -21,7 +21,7 @@ import type { AdvancedSyntaxFeatures } from './advancedSyntaxFeatures';

/**
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
*/
ranking?: string[];
/**
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
*/

@@ -118,7 +118,7 @@ customRanking?: string[];

/**
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
*/
alternativesAsExact?: AlternativesAsExact[];
/**
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
*/

@@ -148,3 +148,3 @@ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];

/**
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
*/

@@ -151,0 +151,0 @@ sortFacetValuesBy?: string;

/**
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
*/
export type RemoveWordsIfNoResults = 'allOptional' | 'firstWords' | 'lastWords' | 'none';
//# sourceMappingURL=removeWordsIfNoResults.d.ts.map

@@ -9,3 +9,3 @@ import type { SearchParamsObject } from './searchParamsObject';

/**
* Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire.
* Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
*/

@@ -12,0 +12,0 @@ validUntil?: number;

/**
* Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
*/
export type SortRemainingBy = 'alpha' | 'count' | 'hidden';
//# sourceMappingURL=sortRemainingBy.d.ts.map

@@ -7,3 +7,3 @@ export type UpdatedRuleResponse = {

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -10,0 +10,0 @@ updatedAt: string;

@@ -6,3 +6,3 @@ /**

/**
* User ID.
* Unique identifier of the user who makes the search request.
*/

@@ -9,0 +9,0 @@ userID: string;

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

import type { SearchResponses } from '../model/searchResponses';
export declare const apiClientVersion = "5.0.0-alpha.110";
export declare const apiClientVersion = "5.0.0-alpha.111";
export declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {

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

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

/**
* Timestamp of creation in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was created, in RFC 3339 format.
*/
createdAt: string;
};

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

/**
* Timestamp of creation in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time).
* Timestamp when the object was created, in milliseconds since the Unix epoch.
*/
createdAt: number;
};

@@ -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.

/**
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **Modifiers** <dl> <dt><code>filterOnly(\"ATTRIBUTE\")</code></dt> <dd>Allows using this attribute as a filter, but doesn\'t evalue the facet values.</dd> <dt><code>searchable(\"ATTRIBUTE\")</code></dt> <dd>Allows searching for facet values.</dd> <dt><code>afterDistinct(\"ATTRIBUTE\")</code></dt> <dd> Evaluates the facet count _after_ deduplication with `distinct`. This ensures accurate facet counts. You can apply this modifier to searchable facets: `afterDistinct(searchable(ATTRIBUTE))`. </dd> </dl> Without modifiers, the attribute is used as a regular facet.
* Attributes used for [faceting](https://www.algolia.com/doc/guides/managing-results/refine-results/faceting/). Facets are ways to categorize search results based on attributes. Facets can be used to let user filter search results. By default, no attribute is used for faceting. **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))`.
*/

@@ -13,3 +13,3 @@ attributesForFaceting?: 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** <dl> <dt><code>virtual(\"REPLICA\")</code></dt> <dd> 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/). </dd> </dl> Without modifier, a standard replica is created, which duplicates your record count and is used for strict, or [exhaustive sorting](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/in-depth/exhaustive-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 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/).
*/

@@ -64,3 +64,3 @@ replicas?: string[];

/**
* 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). 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** <dl> <dt><code>equalOnly(\"ATTRIBUTE\")</code></dt> <dd> Support only filtering based on equality comparisons `=` and `!=`. </dd> </dl> Without modifier, all numeric comparisons are supported.
* 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). 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 `!=`.
*/

@@ -75,3 +75,3 @@ numericAttributesForFiltering?: string[];

/**
* Attributes used for searching. 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** <dl> <dt><code>unordered(\"ATTRIBUTE\")</code></dt> <dd> Ignore the position of a match within the attribute. </dd> </dl> Without modifier, matches at the beginning of an attribute rank higer than matches at the end.
* Attributes used for searching. 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.
*/

@@ -78,0 +78,0 @@ searchableAttributes?: 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.

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -20,0 +20,0 @@ filters?: string;

@@ -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.

/**
* Filter the search so that only records with matching values are included in the results. These filters are supported: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
* Filter expression to only include items that match the filter criteria in the response. You can use these filter expressions: - **Numeric filters.** `<facet> <op> <number>`, where `<op>` is one of `<`, `<=`, `=`, `!=`, `>`, `>=`. - **Ranges.** `<facet>:<lower> TO <upper>` where `<lower>` and `<upper>` are the lower and upper limits of the range (inclusive). - **Facet filters.** `<facet>:<value>` where `<facet>` is a facet attribute (case-sensitive) and `<value>` a facet value. - **Tag filters.** `_tags:<value>` or just `<value>` (case-sensitive). - **Boolean filters.** `<facet>: true | false`. You can combine filters with `AND`, `OR`, and `NOT` operators with the following restrictions: - You can only combine filters of the same type with `OR`. **Not supported:** `facet:value OR num > 3`. - You can\'t use `NOT` with combinations of filters. **Not supported:** `NOT(facet:value OR facet:value)` - You can\'t combine conjunctions (`AND`) with `OR`. **Not supported:** `facet:value OR (facet:value AND facet:value)` Use quotes around your filters, if the facet attribute name or facet value has spaces, keywords (`OR`, `AND`, `NOT`), or quotes. If a facet attribute is an array, the filter matches if it matches at least one element of the array. For more information, see [Filters](https://www.algolia.com/doc/guides/managing-results/refine-results/filtering/).
*/

@@ -15,0 +15,0 @@ filters?: 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.
/**
* Determines how 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) is computed when the search query has only one word. <dl> <dt><code>attribute</code></dt> <dd> The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". </dd> <dt><code>none</code></dt> <dd> The Exact ranking criterion is ignored on single-word searches. </dd> <dt><code>word</code></dt> <dd> The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. </dd> </dl> If `exactOnSingleWordQuery` is `word`, only exact matches will be highlighted, partial and prefix matches won\'t.
* Determines how 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) is computed when the search query has only one word. - `attribute`. The Exact ranking criterion is 1 if the query word and attribute value are the same. For example, a search for \"road\" will match the value \"road\", but not \"road trip\". - `none`. The Exact ranking criterion is ignored on single-word searches. - `word`. The Exact ranking criterion is 1 if the query word is found in the attribute value. The query word must have at least 3 characters and must not be a stop word. Only exact matches will be highlighted, partial and prefix matches won\'t.
*/
export type ExactOnSingleWordQuery = 'attribute' | 'none' | 'word';

@@ -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.

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -18,0 +18,0 @@ updatedAt: string;

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

/**
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
* Determines the order in which Algolia returns your results. By default, each entry corresponds to a [ranking criteria](https://www.algolia.com/doc/guides/managing-results/relevance-overview/in-depth/ranking-criteria/). The tie-breaking algorithm sequentially applies each criterion in the order they\'re specified. If you configure a replica index for [sorting by an attribute](https://www.algolia.com/doc/guides/managing-results/refine-results/sorting/how-to/sort-by-attribute/), you put the sorting attribute at the top of the list. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. Before you modify the default setting, you should test your changes in the dashboard, and by [A/B testing](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/).
*/

@@ -31,3 +31,3 @@ ranking?: string[];

/**
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** <dl> <dt><code>asc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in ascending order.</dd> <dt><code>desc(\"ATTRIBUTE\")</code></dt> <dd>Sort the index by the values of an attribute, in descending order.</dd> </dl> If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
* Attributes to use as [custom ranking](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/). The custom ranking attributes decide which items are shown first if the other ranking criteria are equal. Records with missing values for your selected custom ranking attributes are always sorted last. Boolean attributes are sorted based on their alphabetical order. **Modifiers** - `asc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in ascending order. - `desc(\"ATTRIBUTE\")`. Sort the index by the values of an attribute, in descending order. If you use two or more custom ranking attributes, [reduce the precision](https://www.algolia.com/doc/guides/managing-results/must-do/custom-ranking/how-to/controlling-custom-ranking-metrics-precision/) of your first attributes, or the other attributes will never be applied.
*/

@@ -153,3 +153,3 @@ customRanking?: string[];

/**
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. <dl> <dt><code>ignorePlurals</code></dt> <dd> Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. </dd> <dt><code>singleWordSynonym</code></dt> <dd> Single-word synonyms, such as \"NY/NYC\" are considered exact matches. </dd> <dt><code>multiWordsSynonym</code></dt> <dd> Multi-word synonyms, such as \"NY/New York\" are considered exact matches. </dd> </dl>.
* Alternatives of query words that should be considered as exact matches by the Exact ranking criterion. - `ignorePlurals`. Plurals and similar declensions added by the `ignorePlurals` setting are considered exact matches. - `singleWordSynonym`. Single-word synonyms, such as \"NY/NYC\" are considered exact matches. - `multiWordsSynonym`. Multi-word synonyms, such as \"NY/New York\" are considered exact matches.
*/

@@ -159,3 +159,3 @@ alternativesAsExact?: AlternativesAsExact[];

/**
* Advanced search syntax features you want to support. <dl> <dt><code>exactPhrase</code></dt> <dd> Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". </dd> <dt><code>excludeWords</code></dt> <dd> Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". </dd> </dl> This setting only has an effect if `advancedSyntax` is true.
* Advanced search syntax features you want to support. - `exactPhrase`. Phrases in quotes must match exactly. For example, `sparkly blue \"iPhone case\"` only returns records with the exact string \"iPhone case\". - `excludeWords`. Query words prefixed with a `-` must not occur in a record. For example, `search -engine` matches records that contain \"search\" but not \"engine\". This setting only has an effect if `advancedSyntax` is true.
*/

@@ -192,3 +192,3 @@ advancedSyntaxFeatures?: AdvancedSyntaxFeatures[];

/**
* Order in which to retrieve facet values. <dl> <dt><code>count</code></dt> <dd> Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Retrieve facet values alphabetically.</dd> </dl> This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
* Order in which to retrieve facet values. - `count`. Facet values are retrieved by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Retrieve facet values alphabetically. This setting doesn\'t influence how facet values are displayed in your UI (see `renderingContent`). For more information, see [facet value display](https://www.algolia.com/doc/guides/building-search-ui/ui-and-ux-patterns/facet-display/js/).
*/

@@ -195,0 +195,0 @@ sortFacetValuesBy?: 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.
/**
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. <dl> <dt><code>none</code></dt> <dd>No words are removed when a query doesn\'t return results.</dd> <dt><code>lastWords</code></dt> <dd>Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>firstWords</code></dt> <dd>Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed.</dd> <dt><code>allOptional</code></dt> <dd>Treat all words as optional.</dd> </dl> For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
* Strategy for removing words from the query when it doesn\'t return any results. This helps to avoid returning empty search results. - `none`. No words are removed when a query doesn\'t return results. - `lastWords`. Treat the last (then second to last, then third to last) word as optional, until there are results or at most 5 words have been removed. - `firstWords`. Treat the first (then second, then third) word as optional, until there are results or at most 5 words have been removed. - `allOptional`. Treat all words as optional. For more information, see [Remove words to improve results](https://www.algolia.com/doc/guides/managing-results/optimize-search-results/empty-or-insufficient-results/in-depth/why-use-remove-words-if-no-results/).
*/

@@ -6,0 +6,0 @@ export type RemoveWordsIfNoResults =

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

/**
* Timestamp in [Unix epoch time](https://en.wikipedia.org/wiki/Unix_time) when the API key should expire.
* Timestamp when the secured API key expires, measured in seconds since the Unix epoch.
*/

@@ -17,0 +17,0 @@ validUntil?: 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.
/**
* Order of facet values that aren\'t explicitly positioned with the `order` setting. <dl> <dt><code>count</code></dt> <dd> Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. </dd> <dt><code>alpha</code></dt> <dd>Sort facet values alphabetically.</dd> <dt><code>hidden</code></dt> <dd>Don\'t show facet values that aren\'t explicitly positioned.</dd> </dl>.
* Order of facet values that aren\'t explicitly positioned with the `order` setting. - `count`. Order remaining facet values by decreasing count. The count is the number of matching records containing this facet value. - `alpha`. Sort facet values alphabetically. - `hidden`. Don\'t show facet values that aren\'t explicitly positioned.
*/
export type SortRemainingBy = 'alpha' | 'count' | '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.

/**
* Timestamp of the last update in [ISO 8601](https://wikipedia.org/wiki/ISO_8601) format.
* Date and time when the object was updated, in RFC 3339 format.
*/

@@ -13,0 +13,0 @@ updatedAt: string;

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

/**
* User ID.
* Unique identifier of the user who makes the search request.
*/

@@ -11,0 +11,0 @@ userID: string;

@@ -25,3 +25,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 const apiClientVersion = '5.0.0-alpha.110';
export const apiClientVersion = '5.0.0-alpha.111';

@@ -28,0 +28,0 @@ function getDefaultHosts(appId: string): Host[] {

{
"name": "algoliasearch",
"version": "5.0.0-alpha.110",
"version": "5.0.0-alpha.111",
"description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",

@@ -63,18 +63,18 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-abtesting": "5.0.0-alpha.110",
"@algolia/client-analytics": "5.0.0-alpha.110",
"@algolia/client-common": "5.0.0-alpha.111",
"@algolia/client-personalization": "5.0.0-alpha.110",
"@algolia/client-search": "5.0.0-alpha.110",
"@algolia/requester-browser-xhr": "5.0.0-alpha.111",
"@algolia/requester-node-http": "5.0.0-alpha.111"
"@algolia/client-abtesting": "5.0.0-alpha.111",
"@algolia/client-analytics": "5.0.0-alpha.111",
"@algolia/client-common": "5.0.0-alpha.112",
"@algolia/client-personalization": "5.0.0-alpha.111",
"@algolia/client-search": "5.0.0-alpha.111",
"@algolia/requester-browser-xhr": "5.0.0-alpha.112",
"@algolia/requester-node-http": "5.0.0-alpha.112"
},
"devDependencies": {
"@babel/preset-env": "7.24.3",
"@babel/preset-env": "7.24.4",
"@babel/preset-typescript": "7.24.1",
"@types/jest": "29.5.12",
"@types/node": "20.11.30",
"@types/node": "20.12.5",
"jest": "29.7.0",
"rollup": "4.13.2",
"typescript": "5.4.3"
"rollup": "4.14.0",
"typescript": "5.4.4"
},

@@ -81,0 +81,0 @@ "engines": {

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc