Socket
Socket
Sign inDemoInstall

@algolia/client-search

Package Overview
Dependencies
Maintainers
3
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-search - npm Package Compare versions

Comparing version 5.0.0-beta.2 to 5.0.0-beta.3

dist/model/replaceAllObjectsResponse.d.ts

2

dist/builds/browser.d.ts

@@ -15,2 +15,3 @@ import type { ClientOptions } from '@algolia/client-common';

waitForTask({ indexName, taskID, maxRetries, timeout, }: import("../model").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("../model").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("../model").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("../model").GetApiKeyResponse>;

@@ -51,2 +52,3 @@ browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("../model").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("../model").BrowseResponse<T>>, "aggregator">> & import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BrowseResponse<T>>;

getApiKey({ key }: import("../model").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetApiKeyResponse>;
getAppTask({ taskID }: import("../model").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("../model").Languages>>;

@@ -53,0 +55,0 @@ getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetDictionarySettingsResponse>;

@@ -33,2 +33,3 @@ import type { ClientOptions } from '@algolia/client-common';

waitForTask({ indexName, taskID, maxRetries, timeout, }: import("../model").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
waitForAppTask({ taskID, maxRetries, timeout, }: import("../model").WaitForAppTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("../model").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("../model").GetApiKeyResponse>;

@@ -69,2 +70,3 @@ browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("../model").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("../model").BrowseResponse<T>>, "aggregator">> & import("../model").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").BrowseResponse<T>>;

getApiKey({ key }: import("../model").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetApiKeyResponse>;
getAppTask({ taskID }: import("../model").GetAppTaskProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetTaskResponse>;
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("../model").Languages>>;

@@ -71,0 +73,0 @@ getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("../model").GetDictionarySettingsResponse>;

4

dist/client-search.umd.js

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

/*! client-search.umd.js | 5.0.0-beta.2 | © 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)["@algolia/client-search"]={})}(this,(function(e){"use strict";function r({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=i=>new Promise(((o,c)=>{e(i).then((e=>(t&&t(e),r(e)?o(e):a&&a.validate(e)?c(new Error(a.message(e))):setTimeout((()=>{s(e).then(o).catch(c)}),n())))).catch((e=>{c(e)}))}));return s()}function t(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 a(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,n,s={miss:()=>Promise.resolve()})=>t.get(e,n,s).catch((()=>a({caches:r}).get(e,n,s))),set:(e,n)=>t.set(e,n).catch((()=>a({caches:r}).set(e,n))),delete:e=>t.delete(e).catch((()=>a({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>a({caches:r}).clear()))}}function n(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 s=12e4;function i(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>s},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=s}}}function o(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=o(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class d extends Error{constructor(e,r){super(e),c(this,"name","AlgoliaError"),r&&(this.name=r)}}class u extends d{constructor(e,r,t){super(e,t),c(this,"stackTrace",void 0),this.stackTrace=r}}class m 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 h extends u{constructor(e,r,t,a="ApiError"){super(e,t,a),c(this,"status",void 0),this.status=r}}class l extends d{constructor(e,r){super(e,"DeserializationError"),c(this,"response",void 0),this.response=r}}class p extends h{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 g(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:o,requestsCache:c,responsesCache:d}){async function u(c,d,u=!0){const y=[],P=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)}(c,d),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,c.headers,d.headers),f="GET"===c.method?{...c.data,...d.data}:{},x={...a,...c.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),d&&d.queryParameters)for(const e of Object.keys(d.queryParameters))d.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[e])?x[e]=d.queryParameters[e].toString():x[e]=d.queryParameters[e];let b=0;const E=async(e,t)=>{const a=e.pop();if(void 0===a)throw new m(function(e){return e.map((e=>g(e)))}(y));let n=u?d.timeouts?.read||s.read:d.timeouts?.write||s.write;const f={data:P,headers:q,method:c.method,url:w(a,c.path,x),connectTimeout:t(b,d.timeouts?.connect||s.connect),responseTimeout:t(b,n)},I=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return y.push(t),t},N=await o.send(f);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&!~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(N)){const n=I(N);return N.isTimedOut&&b++,console.log("Retryable failure",g(n)),await r.set(a,i(a,N.isTimedOut?"timed out":"down")),E(e,t)}if(function({status:e}){return 2==~~(e/100)}(N))return function(e){try{return JSON.parse(e.content)}catch(r){throw new l(r.message,e)}}(N);throw I(N),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 h(a.message,r,t)}catch(e){}return new h(e,r,t)}(N,y)},I=e.filter((e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept))),N=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(i(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(I);return E([...N.hosts].reverse(),N.getTimeout)}return{hostsCache:r,requester:o,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return u(e,r,n);const s=()=>u(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const i={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return d.get(i,(()=>c.get(i,(()=>c.set(i,s()).then((e=>Promise.all([c.delete(i),e])),(e=>Promise.all([c.delete(i),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>d.set(i,e)})},requestsCache:c,responsesCache:d}}function P({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const q="5.0.0-beta.2";function f(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"}]))}e.apiClientVersion=q,e.searchClient=function(e,s,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!s||"string"!=typeof s)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,...s}){const i=function(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:{}}}(e,t,a),o=y({hosts:f(e),...s,algoliaAgent:P({algoliaAgents:n,client:"Search",version:q}),baseHeaders:{"content-type":"text/plain",...i.headers(),...s.baseHeaders},baseQueryParameters:{...i.queryParameters(),...s.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,r){o.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:t,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let i=0;return r({func:()=>this.getTask({indexName:e,taskID:t},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:t,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},i){let o=0;const c={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 r({...c,func:()=>this.getApiKey({key:t},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 r({...c,func:()=>this.getApiKey({key:t},i).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:t,...a},n){return r({func:r=>this.browse({indexName:e,browseParams:{cursor:r?r.cursor:void 0,...t}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:t,...a},n){const s={hitsPerPage:1e3,...t};return r({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:t,...a},n){const s={page:0,...t,hitsPerPage:1e3};return r({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,c]of r.entries())i.push({action:t,body:c}),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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return o.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return o.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 o.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 o.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 o.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 o.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 o.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return o.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 o.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 o.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return o.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 o.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 o.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return o.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return o.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 o.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 o.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 o.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 o.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 c={method:"POST",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 o.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 o.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 o.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 o.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 c={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 c={method:"POST",path:s,queryParameters:i,headers:{},data:r};return o.request(c,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 c={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 c={method:"POST",path:s,queryParameters:i,headers:{},data:r};return o.request(c,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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.request(a,t)}}}({appId:e,apiKey:s,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:n(),requestsCache:n({serializable:!1}),hostsCache:a({caches:[t({key:`${q}-${e}`}),n()]}),...i})}}));
/*! client-search.umd.js | 5.0.0-beta.3 | © 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)["@algolia/client-search"]={})}(this,(function(e){"use strict";function r({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=i=>new Promise(((o,c)=>{e(i).then((e=>(t&&t(e),r(e)?o(e):a&&a.validate(e)?c(new Error(a.message(e))):setTimeout((()=>{s(e).then(o).catch(c)}),n())))).catch((e=>{c(e)}))}));return s()}function t(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 a(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,n,s={miss:()=>Promise.resolve()})=>t.get(e,n,s).catch((()=>a({caches:r}).get(e,n,s))),set:(e,n)=>t.set(e,n).catch((()=>a({caches:r}).set(e,n))),delete:e=>t.delete(e).catch((()=>a({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>a({caches:r}).clear()))}}function n(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 s=12e4;function i(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>s},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=s}}}function o(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class c extends Error{constructor(e,r){super(e),o(this,"name","AlgoliaError"),r&&(this.name=r)}}class d extends c{constructor(e,r,t){super(e,t),o(this,"stackTrace",void 0),this.stackTrace=r}}class u extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class m extends d{constructor(e,r,t,a="ApiError"){super(e,t,a),o(this,"status",void 0),this.status=r}}class h extends c{constructor(e,r){super(e,"DeserializationError"),o(this,"response",void 0),this.response=r}}class l extends m{constructor(e,r,t,a){super(e,r,a,"DetailedApiError"),o(this,"error",void 0),this.error=t}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${encodeURIComponent(r(e[t])?JSON.stringify(e[t]):e[t]).replaceAll("+","%20")}`)).join("&")}(t);let n=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===r.charAt(0)?r.substring(1):r}`;return a.length&&(n+=`?${a}`),n}function w(e){const r=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...r}}}}function g({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:o,requestsCache:c,responsesCache:d}){async function g(c,d,g=!0){const y=[],P=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)}(c,d),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,c.headers,d.headers),f="GET"===c.method?{...c.data,...d.data}:{},x={...a,...c.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),d&&d.queryParameters)for(const e of Object.keys(d.queryParameters))d.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[e])?x[e]=d.queryParameters[e].toString():x[e]=d.queryParameters[e];let b=0;const E=async(e,t)=>{const a=e.pop();if(void 0===a)throw new u(function(e){return e.map((e=>w(e)))}(y));let n=g?d.timeouts?.read||s.read:d.timeouts?.write||s.write;const f={data:P,headers:q,method:c.method,url:p(a,c.path,x),connectTimeout:t(b,d.timeouts?.connect||s.connect),responseTimeout:t(b,n)},I=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return y.push(t),t},N=await o.send(f);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&!~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(N)){const n=I(N);return N.isTimedOut&&b++,console.log("Retryable failure",w(n)),await r.set(a,i(a,N.isTimedOut?"timed out":"down")),E(e,t)}if(function({status:e}){return 2==~~(e/100)}(N))return function(e){try{return JSON.parse(e.content)}catch(r){throw new h(r.message,e)}}(N);throw I(N),function({content:e,status:r},t){try{const a=JSON.parse(e);return"error"in a?new l(a.message,r,a.error,t):new m(a.message,r,t)}catch(e){}return new m(e,r,t)}(N,y)},I=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),N=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(i(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(I);return E([...N.hosts].reverse(),N.getTimeout)}return{hostsCache:r,requester:o,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return g(e,r,n);const s=()=>g(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const i={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return d.get(i,(()=>c.get(i,(()=>c.set(i,s()).then((e=>Promise.all([c.delete(i),e])),(e=>Promise.all([c.delete(i),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>d.set(i,e)})},requestsCache:c,responsesCache:d}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const P="5.0.0-beta.3";function q(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"}]))}e.apiClientVersion=P,e.searchClient=function(e,s,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!s||"string"!=typeof s)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,...s}){const i=function(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:{}}}(e,t,a),o=g({hosts:q(e),...s,algoliaAgent:y({algoliaAgents:n,client:"Search",version:P}),baseHeaders:{"content-type":"text/plain",...i.headers(),...s.baseHeaders},baseQueryParameters:{...i.queryParameters(),...s.baseQueryParameters}});return{transporter:o,appId:e,clearCache:()=>Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then((()=>{})),get _ua(){return o.algoliaAgent.value},addAlgoliaAgent(e,r){o.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:t,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let i=0;return r({func:()=>this.getTask({indexName:e,taskID:t},s),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=a,message:()=>`The maximum number of retries exceeded. (${i}/${a})`},timeout:()=>n(i)})},waitForAppTask({taskID:e,maxRetries:t=50,timeout:a=(e=>Math.min(200*e,5e3))},n){let s=0;return r({func:()=>this.getAppTask({taskID:e},n),validate:e=>"published"===e.status,aggregator:()=>s+=1,error:{validate:()=>s>=t,message:()=>`The maximum number of retries exceeded. (${s}/${t})`},timeout:()=>a(s)})},waitForApiKey({operation:e,key:t,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},i){let o=0;const c={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 r({...c,func:()=>this.getApiKey({key:t},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 r({...c,func:()=>this.getApiKey({key:t},i).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:t,...a},n){return r({func:r=>this.browse({indexName:e,browseParams:{cursor:r?r.cursor:void 0,...t}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:t,...a},n){const s={hitsPerPage:1e3,...t};return r({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:t,...a},n){const s={page:0,...t,hitsPerPage:1e3};return r({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=[],c=r.entries();for(const[a,d]of c)i.push({action:t,body:d}),i.length!==n&&a!==r.length-1||(o.push(await this.batch({indexName:e,batchWriteParams:{requests:i}},s)),i=[]);if(a)for(const r of o)await this.waitForTask({indexName:e,taskID:r.taskID});return o},async replaceAllObjects({indexName:e,objects:r,batchSize:t},a){const n=`${e}_tmp_${Math.random().toString(36).substring(7)}`,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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.request(t,r)},getAppTask({taskID:e},r){if(!e)throw new Error("Parameter `taskID` is required when calling `getAppTask`.");const t={method:"GET",path:"/1/task/{taskID}".replace("{taskID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return o.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return o.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return o.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 o.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 o.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 o.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 o.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 o.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return o.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 o.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 o.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return o.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 o.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 o.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return o.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return o.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 o.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 o.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 o.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 o.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 c={method:"POST",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 o.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 o.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 o.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 o.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 c={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 c={method:"POST",path:s,queryParameters:i,headers:{},data:r};return o.request(c,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 c={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return o.request(c,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 c={method:"POST",path:s,queryParameters:i,headers:{},data:r};return o.request(c,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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.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 o.request(a,t)}}}({appId:e,apiKey:s,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:n(),requestsCache:n({serializable:!1}),hostsCache:a({caches:[t({key:`${P}-${e}`}),n()]}),...i})}}));

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

import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
import type { BatchResponse } from './batchResponse';
import type { BatchWriteParams } from './batchWriteParams';

@@ -30,3 +29,2 @@ import type { BrowseParams } from './browseParams';

import type { SynonymHit } from './synonymHit';
import type { UpdatedAtResponse } from './updatedAtResponse';
/**

@@ -288,2 +286,11 @@ * Properties for the `addOrUpdateObject` method.

/**
* Properties for the `getAppTask` method.
*/
export type GetAppTaskProps = {
/**
* Unique task identifier.
*/
taskID: number;
};
/**
* Properties for the `getLogs` method.

@@ -683,8 +690,4 @@ */

}>;
export type WaitForTaskOptions = WaitForOptions & {
export type WaitForAppTaskOptions = WaitForOptions & {
/**
* The `indexName` where the operation was performed.
*/
indexName: string;
/**
* The `taskID` returned by the method response.

@@ -694,2 +697,8 @@ */

};
export type WaitForTaskOptions = WaitForAppTaskOptions & {
/**
* The `indexName` where the operation was performed.
*/
indexName: string;
};
export type WaitForApiKeyOptions = WaitForOptions & {

@@ -756,17 +765,3 @@ /**

};
export type ReplaceAllObjectsResponse = {
/**
* The response of the `operationIndex` request for the `copy` operation.
*/
copyOperationResponse: UpdatedAtResponse;
/**
* The response of the `batch` request(s).
*/
batchResponses: BatchResponse[];
/**
* The response of the `operationIndex` request for the `move` operation.
*/
moveOperationResponse: UpdatedAtResponse;
};
export {};
//# sourceMappingURL=clientMethodProps.d.ts.map

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

export * from './renderingContent';
export * from './replaceAllObjectsResponse';
export * from './replaceSourceResponse';

@@ -113,0 +114,0 @@ export * from './rule';

@@ -10,3 +10,3 @@ import type { MatchedGeoLocation } from './matchedGeoLocation';

*/
filters: number;
filters?: number;
/**

@@ -37,3 +37,3 @@ * Position of the first matched word in the best matching attribute of the record.

*/
promoted: boolean;
promoted?: boolean;
/**

@@ -50,3 +50,3 @@ * Number of words between multiple matches in the query plus 1. For single word queries, `proximityDistance` is 0.

*/
words: number;
words?: number;
/**

@@ -53,0 +53,0 @@ * Whether the record is re-ranked.

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

import type { BrowseResponse } from '../model/browseResponse';
import type { BrowseOptions, ChunkedBatchOptions, ReplaceAllObjectsOptions, ReplaceAllObjectsResponse, WaitForApiKeyOptions, WaitForTaskOptions, AddOrUpdateObjectProps, AssignUserIdProps, BatchProps, BatchAssignUserIdsProps, BatchDictionaryEntriesProps, BrowseProps, ClearObjectsProps, ClearRulesProps, ClearSynonymsProps, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteApiKeyProps, DeleteByProps, DeleteIndexProps, DeleteObjectProps, DeleteRuleProps, DeleteSourceProps, DeleteSynonymProps, GetApiKeyProps, GetLogsProps, GetObjectProps, GetRuleProps, GetSettingsProps, GetSynonymProps, GetTaskProps, GetUserIdProps, HasPendingMappingsProps, ListIndicesProps, ListUserIdsProps, OperationIndexProps, PartialUpdateObjectProps, RemoveUserIdProps, ReplaceSourcesProps, RestoreApiKeyProps, SaveObjectProps, SaveRuleProps, SaveRulesProps, SaveSynonymProps, SaveSynonymsProps, LegacySearchMethodProps, SearchDictionaryEntriesProps, SearchForFacetValuesProps, SearchRulesProps, SearchSingleIndexProps, SearchSynonymsProps, SetSettingsProps, UpdateApiKeyProps } from '../model/clientMethodProps';
import type { BrowseOptions, ChunkedBatchOptions, ReplaceAllObjectsOptions, WaitForApiKeyOptions, WaitForTaskOptions, WaitForAppTaskOptions, AddOrUpdateObjectProps, AssignUserIdProps, BatchProps, BatchAssignUserIdsProps, BatchDictionaryEntriesProps, BrowseProps, ClearObjectsProps, ClearRulesProps, ClearSynonymsProps, CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteApiKeyProps, DeleteByProps, DeleteIndexProps, DeleteObjectProps, DeleteRuleProps, DeleteSourceProps, DeleteSynonymProps, GetApiKeyProps, GetAppTaskProps, GetLogsProps, GetObjectProps, GetRuleProps, GetSettingsProps, GetSynonymProps, GetTaskProps, GetUserIdProps, HasPendingMappingsProps, ListIndicesProps, ListUserIdsProps, OperationIndexProps, PartialUpdateObjectProps, RemoveUserIdProps, ReplaceSourcesProps, RestoreApiKeyProps, SaveObjectProps, SaveRuleProps, SaveRulesProps, SaveSynonymProps, SaveSynonymsProps, LegacySearchMethodProps, SearchDictionaryEntriesProps, SearchForFacetValuesProps, SearchRulesProps, SearchSingleIndexProps, SearchSynonymsProps, SetSettingsProps, UpdateApiKeyProps } from '../model/clientMethodProps';
import type { CreatedAtResponse } from '../model/createdAtResponse';

@@ -30,2 +30,3 @@ import type { DeleteApiKeyResponse } from '../model/deleteApiKeyResponse';

import type { RemoveUserIdResponse } from '../model/removeUserIdResponse';
import type { ReplaceAllObjectsResponse } from '../model/replaceAllObjectsResponse';
import type { ReplaceSourceResponse } from '../model/replaceSourceResponse';

@@ -51,3 +52,3 @@ import type { Rule } from '../model/rule';

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

@@ -87,2 +88,13 @@ transporter: import("@algolia/client-common").Transporter;

/**
* Helper: Wait for an application-level task to complete for a given `taskID`.
*
* @summary Helper method that waits for a task to be published (completed).
* @param waitForAppTaskOptions - The `waitForTaskOptions` object.
* @param waitForAppTaskOptions.taskID - The `taskID` returned in the method response.
* @param waitForAppTaskOptions.maxRetries - The maximum number of retries. 50 by default.
* @param waitForAppTaskOptions.timeout - The function to decide how long to wait between retries.
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.
*/
waitForAppTask({ taskID, maxRetries, timeout, }: WaitForAppTaskOptions, requestOptions?: RequestOptions): Promise<GetTaskResponse>;
/**
* Helper: Wait for an API key to be added, updated or deleted based on a given `operation`.

@@ -178,3 +190,3 @@ *

* @param replaceAllObjects.objects - The array of `objects` to store in the given Algolia `indexName`.
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `length(objects) / batchSize`. Defaults to 1000.
* @param replaceAllObjects.batchSize - The size of the chunk of `objects`. The number of `batch` calls will be equal to `objects.length / batchSize`. Defaults to 1000.
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `getTask` method and merged with the transporter requestOptions.

@@ -438,2 +450,13 @@ */

/**
* Checks the status of a given application task.
*
* Required API Key ACLs:
* - editSettings.
*
* @param getAppTask - The getAppTask object.
* @param getAppTask.taskID - Unique task identifier.
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
*/
getAppTask({ taskID }: GetAppTaskProps, requestOptions?: RequestOptions): Promise<GetTaskResponse>;
/**
* Lists supported languages with their supported dictionary types and number of custom entries.

@@ -630,3 +653,3 @@ *

/**
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for index-specific API keys and analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
* Copies or moves (renames) an index within the same Algolia application. - Existing destination indices are overwritten, except for their analytics data. - If the destination index doesn\'t exist yet, it\'ll be created. **Copy** - Copying a source index that doesn\'t exist creates a new index with 0 records and default settings. - The API keys of the source index are merged with the existing keys in the destination index. - You can\'t copy the `enableReRanking`, `mode`, and `replicas` settings. - You can\'t copy to a destination index that already has replicas. - Be aware of the [size limits](https://www.algolia.com/doc/guides/scaling/algolia-service-limits/#application-record-and-index-limits). - Related guide: [Copy indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/copy-indices/) **Move** - Moving a source index that doesn\'t exist is ignored without returning an error. - When moving an index, the analytics data keep their original name and a new set of analytics data is started for the new name. To access the original analytics in the dashboard, create an index with the original name. - If the destination index has replicas, moving will overwrite the existing index and copy the data to the replica indices. - Related guide: [Move indices](https://www.algolia.com/doc/guides/sending-and-managing-data/manage-indices-and-apps/manage-indices/how-to/move-indices/).
*

@@ -633,0 +656,0 @@ * Required API Key ACLs:

@@ -12,3 +12,2 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.

import type { BatchDictionaryEntriesParams } from './batchDictionaryEntriesParams';
import type { BatchResponse } from './batchResponse';
import type { BatchWriteParams } from './batchWriteParams';

@@ -33,3 +32,2 @@ import type { BrowseParams } from './browseParams';

import type { SynonymHit } from './synonymHit';
import type { UpdatedAtResponse } from './updatedAtResponse';

@@ -313,2 +311,12 @@ /**

/**
* Properties for the `getAppTask` method.
*/
export type GetAppTaskProps = {
/**
* Unique task identifier.
*/
taskID: number;
};
/**
* Properties for the `getLogs` method.

@@ -746,8 +754,4 @@ */

export type WaitForTaskOptions = WaitForOptions & {
export type WaitForAppTaskOptions = WaitForOptions & {
/**
* The `indexName` where the operation was performed.
*/
indexName: string;
/**
* The `taskID` returned by the method response.

@@ -758,2 +762,9 @@ */

export type WaitForTaskOptions = WaitForAppTaskOptions & {
/**
* The `indexName` where the operation was performed.
*/
indexName: string;
};
export type WaitForApiKeyOptions = WaitForOptions & {

@@ -831,18 +842,1 @@ /**

};
export type ReplaceAllObjectsResponse = {
/**
* The response of the `operationIndex` request for the `copy` operation.
*/
copyOperationResponse: UpdatedAtResponse;
/**
* The response of the `batch` request(s).
*/
batchResponses: BatchResponse[];
/**
* The response of the `operationIndex` request for the `move` operation.
*/
moveOperationResponse: UpdatedAtResponse;
};

@@ -113,2 +113,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 * from './renderingContent';
export * from './replaceAllObjectsResponse';
export * from './replaceSourceResponse';

@@ -115,0 +116,0 @@ export * from './rule';

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

*/
filters: number;
filters?: number;

@@ -48,3 +48,3 @@ /**

*/
promoted: boolean;
promoted?: boolean;

@@ -64,3 +64,3 @@ /**

*/
words: number;
words?: number;

@@ -67,0 +67,0 @@ /**

{
"name": "@algolia/client-search",
"version": "5.0.0-beta.2",
"version": "5.0.0-beta.3",
"description": "JavaScript client for client-search",

@@ -42,9 +42,9 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-common": "5.0.0-beta.2",
"@algolia/requester-browser-xhr": "5.0.0-beta.2",
"@algolia/requester-node-http": "5.0.0-beta.2"
"@algolia/client-common": "5.0.0-beta.3",
"@algolia/requester-browser-xhr": "5.0.0-beta.3",
"@algolia/requester-node-http": "5.0.0-beta.3"
},
"devDependencies": {
"@types/node": "20.12.11",
"rollup": "4.17.2",
"@types/node": "20.14.2",
"rollup": "4.18.0",
"typescript": "5.4.5"

@@ -51,0 +51,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc