algoliasearch 5.0.0-alpha.3 → 5.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/algoliasearch/builds/browser.d.ts +15 -10
- package/dist/algoliasearch/builds/browser.d.ts.map +1 -1
- package/dist/algoliasearch/builds/node.d.ts +15 -10
- package/dist/algoliasearch/builds/node.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/acl.d.ts +3 -0
- package/dist/algoliasearch/lite/model/acl.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/addApiKeyResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/attributeToUpdate.d.ts +3 -0
- package/dist/algoliasearch/lite/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/baseBrowseResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/baseBrowseResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/algoliasearch/lite/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts +1 -1
- package/dist/algoliasearch/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/getApiKeyResponse.d.ts +4 -0
- package/dist/algoliasearch/lite/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/algoliasearch/lite/model/index.d.ts +3 -3
- package/dist/algoliasearch/lite/model/index.d.ts.map +1 -1
- package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts +4 -0
- package/dist/algoliasearch/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/algoliasearch/lite/src/liteClient.d.ts +9 -1
- package/dist/algoliasearch/lite/src/liteClient.d.ts.map +1 -1
- package/dist/algoliasearch.cjs.js +190 -29
- package/dist/algoliasearch.esm.browser.js +218 -57
- package/dist/algoliasearch.esm.node.js +191 -30
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/builds/browser.d.ts +15 -10
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +15 -10
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts +9 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts.map +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +9 -1
- package/dist/client-analytics/src/analyticsClient.d.ts.map +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +9 -1
- package/dist/client-personalization/src/personalizationClient.d.ts.map +1 -1
- package/dist/client-search/model/acl.d.ts +3 -0
- package/dist/client-search/model/acl.d.ts.map +1 -1
- package/dist/client-search/model/addApiKeyResponse.d.ts +1 -1
- package/dist/client-search/model/attributeToUpdate.d.ts +3 -0
- package/dist/client-search/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/client-search/model/baseBrowseResponse.d.ts +1 -1
- package/dist/client-search/model/baseBrowseResponse.d.ts.map +1 -1
- package/dist/client-search/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/client-search/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/client-search/model/baseSearchResponse.d.ts +1 -1
- package/dist/client-search/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/client-search/model/batchParams.d.ts +1 -1
- package/dist/client-search/model/batchParams.d.ts.map +1 -1
- package/dist/client-search/model/clientMethodProps.d.ts +22 -11
- package/dist/client-search/model/clientMethodProps.d.ts.map +1 -1
- package/dist/client-search/model/getApiKeyResponse.d.ts +4 -0
- package/dist/client-search/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/client-search/model/getObjectsParams.d.ts +1 -1
- package/dist/client-search/model/getObjectsParams.d.ts.map +1 -1
- package/dist/client-search/model/index.d.ts +3 -3
- package/dist/client-search/model/index.d.ts.map +1 -1
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts +4 -0
- package/dist/client-search/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/client-search/model/listApiKeysResponse.d.ts +2 -2
- package/dist/client-search/model/listApiKeysResponse.d.ts.map +1 -1
- package/dist/client-search/model/multipleBatchRequest.d.ts +3 -3
- package/dist/client-search/model/multipleBatchRequest.d.ts.map +1 -1
- package/dist/client-search/model/multipleBatchResponse.d.ts +2 -2
- package/dist/client-search/model/multipleBatchResponse.d.ts.map +1 -1
- package/dist/client-search/model/updateApiKeyResponse.d.ts +1 -1
- package/dist/client-search/src/searchClient.d.ts +64 -17
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/builds/browser.d.ts +15 -10
- package/dist/lite/builds/browser.d.ts.map +1 -1
- package/dist/lite/builds/node.d.ts +15 -10
- package/dist/lite/builds/node.d.ts.map +1 -1
- package/dist/lite/lite/model/acl.d.ts +3 -0
- package/dist/lite/lite/model/acl.d.ts.map +1 -1
- package/dist/lite/lite/model/addApiKeyResponse.d.ts +1 -1
- package/dist/lite/lite/model/attributeToUpdate.d.ts +3 -0
- package/dist/lite/lite/model/attributeToUpdate.d.ts.map +1 -0
- package/dist/lite/lite/model/baseBrowseResponse.d.ts +1 -1
- package/dist/lite/lite/model/baseBrowseResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/baseGetApiKeyResponse.d.ts +11 -0
- package/dist/lite/lite/model/baseGetApiKeyResponse.d.ts.map +1 -0
- package/dist/lite/lite/model/baseSearchResponse.d.ts +1 -1
- package/dist/lite/lite/model/baseSearchResponse.d.ts.map +1 -1
- package/dist/lite/lite/model/getApiKeyResponse.d.ts +4 -0
- package/dist/lite/lite/model/getApiKeyResponse.d.ts.map +1 -0
- package/dist/lite/lite/model/index.d.ts +3 -3
- package/dist/lite/lite/model/index.d.ts.map +1 -1
- package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts +4 -0
- package/dist/lite/lite/model/indexSettingsAsSearchParams.d.ts.map +1 -1
- package/dist/lite/lite/src/liteClient.d.ts +9 -1
- package/dist/lite/lite/src/liteClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs.js +14 -1
- package/dist/lite/lite.esm.browser.js +14 -1
- package/dist/lite/lite.esm.node.js +14 -1
- package/dist/lite/lite.umd.js +2 -2
- package/lite/model/acl.ts +3 -0
- package/lite/model/addApiKeyResponse.ts +1 -1
- package/lite/model/{attributeOrBuiltInOperation.ts → attributeToUpdate.ts} +1 -1
- package/lite/model/baseBrowseResponse.ts +1 -1
- package/lite/model/baseGetApiKeyResponse.ts +13 -0
- package/lite/model/baseSearchResponse.ts +1 -1
- package/lite/model/{key.ts → getApiKeyResponse.ts} +2 -2
- package/lite/model/index.ts +3 -3
- package/lite/model/indexSettingsAsSearchParams.ts +5 -0
- package/lite/src/liteClient.ts +19 -1
- package/package.json +9 -9
- package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/algoliasearch/lite/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/algoliasearch/lite/model/createdAtObject.d.ts +0 -7
- package/dist/algoliasearch/lite/model/createdAtObject.d.ts.map +0 -1
- package/dist/algoliasearch/lite/model/key.d.ts +0 -4
- package/dist/algoliasearch/lite/model/key.d.ts.map +0 -1
- package/dist/client-search/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/client-search/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/client-search/model/createdAtObject.d.ts +0 -7
- package/dist/client-search/model/createdAtObject.d.ts.map +0 -1
- package/dist/client-search/model/key.d.ts +0 -4
- package/dist/client-search/model/key.d.ts.map +0 -1
- package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts +0 -3
- package/dist/lite/lite/model/attributeOrBuiltInOperation.d.ts.map +0 -1
- package/dist/lite/lite/model/createdAtObject.d.ts +0 -7
- package/dist/lite/lite/model/createdAtObject.d.ts.map +0 -1
- package/dist/lite/lite/model/key.d.ts +0 -4
- package/dist/lite/lite/model/key.d.ts.map +0 -1
- package/lite/model/createdAtObject.ts +0 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! algoliasearch.umd.js | 5.0.0-alpha.
|
|
2
|
-
!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){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){if(null==e)return{};var t,a,n=function(e,r){if(null==e)return{};var t,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function a(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:{}}}const n=e=>Math.min(200*e,5e3);function i({func:e,validate:r,maxRetries:t=50,timeout:a=n}){let i=0;const o=()=>new Promise(((n,s)=>{e().then((e=>{r(e)?n(e):i+1>=t?s(new Error(`The maximum number of retries exceeded. (${i+1}/${t})`)):(i+=1,setTimeout((()=>{o().then(n).catch(s)}),a(i)))})).catch((e=>{s(e)}))}));return o()}function o(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)||"{}")}return{get:(e,r,t={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const t=JSON.stringify(e),a=n()[t];return Promise.all([a||r(),void 0!==a])})).then((([e,r])=>Promise.all([e,r||t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=n();return i[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(i)),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 s(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,n={miss:()=>Promise.resolve()})=>t.get(e,a,n).catch((()=>s({caches:r}).get(e,a,n))),set:(e,a)=>t.set(e,a).catch((()=>s({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>s({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>s({caches:r}).clear()))}}function d(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const i=JSON.stringify(t);if(i in r)return Promise.resolve(e.serializable?JSON.parse(r[i]):r[i]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const c=12e4;function u(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>c},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=c}}}function l(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class h extends Error{constructor(e,r){super(e),l(this,"name","AlgoliaError"),r&&(this.name=r)}}class m extends h{constructor(e,r,t){super(e,t),l(this,"stackTrace",void 0),this.stackTrace=r}}class p extends m{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class g extends m{constructor(e,r,t){super(e,t,"ApiError"),l(this,"status",void 0),this.status=r}}class f extends h{constructor(e,r){super(e,"DeserializationError"),l(this,"response",void 0),this.response=r}}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}=${r(e[t])?JSON.stringify(e[t]):e[t]}`)).join("&")}(t);let n=`${e.protocol}://${e.url}/${"/"===r.charAt(0)?r.substr(1):r}`;return a.length&&(n+=`?${a}`),n}function v(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:i,requester:o,requestsCache:s,responsesCache:d}){async function c(s,d,c=!0){const l=[],h=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)}(s,d),m=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,s.headers,d.headers),y="GET"===s.method?{...s.data,...d.data}:{},P={"x-algolia-agent":n.value,...a,...s.queryParameters,...y};if(d&&d.queryParameters)for(const e of Object.keys(d.queryParameters))d.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[e])?P[e]=d.queryParameters[e].toString():P[e]=d.queryParameters[e];let q=0;const b=async(e,t)=>{const a=e.pop();if(void 0===a)throw new p(function(e){return e.map((e=>v(e)))}(l));let n=d.timeout;void 0===n&&(n=c?i.read:i.write);const y={data:h,headers:m,method:s.method,url:w(a,s.path,P),connectTimeout:t(q,i.connect),responseTimeout:t(q,n)},E=r=>{const t={request:y,response:r,host:a,triesLeft:e.length};return l.push(t),t},S=await o.send(y);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&0==~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(S)){const n=E(S);return S.isTimedOut&&q++,console.log("Retryable failure",v(n)),await r.set(a,u(a,S.isTimedOut?"timed out":"down")),b(e,t)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(r){throw new f(r.message,e)}}(S);throw E(S),function({content:e,status:r},t){let a=e;try{a=JSON.parse(e).message}catch(e){}return new g(a,r,t)}(S,l)},E=e.filter((e=>"readWrite"===e.accept||(c?"read"===e.accept:"write"===e.accept))),S=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(u(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),i=[...a,...n];return{hosts:i.length>0?i:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(E);return b([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:r,requester:o,timeouts:i,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return c(e,r,n);const i=()=>c(e,r);if(!0!==(r.cacheable||e.cacheable))return i();const o={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return d.get(o,(()=>s.get(o,(()=>s.set(o,i()).then((e=>Promise.all([s.delete(o),e])),(e=>Promise.all([s.delete(o),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>d.set(o,e)})},requestsCache:s,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}var q=["appId","apiKey","authMode","algoliaAgents","region"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function E(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var S=["de","us"];function x(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,d=e.region,c=t(e,q),u=a(n,i,o),l=y(E(E({hosts:(r=d,[{url:r?"analytics.{region}.algolia.com".replace("{region}",r):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},c),{},{algoliaAgent:P({algoliaAgents:s,client:"Abtesting",version:"5.0.0-alpha.3"}),baseHeaders:E(E({"content-type":"text/plain"},u.headers()),c.baseHeaders),baseQueryParameters:E(E({},u.queryParameters()),c.baseQueryParameters)}));return{transporter:l,get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},addABTests:function(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.variant)throw new Error("Parameter `addABTestsRequest.variant` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");var t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return l.request(t,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},deleteABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `deleteABTest`.");var a={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `getABTest`.");var a={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},listABTests:function(e,r){var t=e.offset,a=e.limit,n={};void 0!==t&&(n.offset=t.toString()),void 0!==a&&(n.limit=a.toString());var i={method:"GET",path:"/2/abtests",queryParameters:n,headers:{}};return l.request(i,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},stopABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `stopABTest`.");var a={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)}}}var T=["appId","apiKey","authMode","algoliaAgents","region"];function O(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function D(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?O(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):O(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var I=["de","us"];function N(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,d=e.region,c=t(e,T),u=a(n,i,o),l=y(D(D({hosts:(r=d,[{url:r?"analytics.{region}.algolia.com".replace("{region}",r):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},c),{},{algoliaAgent:P({algoliaAgents:s,client:"Analytics",version:"5.0.0-alpha.3"}),baseHeaders:D(D({"content-type":"text/plain"},u.headers()),c.baseHeaders),baseQueryParameters:D(D({},u.queryParameters()),c.baseQueryParameters)}));return{transporter:l,get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getAverageClickPosition:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:o,headers:{}};return l.request(s,r)},getClickPositions:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getClickPositions`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/positions",queryParameters:o,headers:{}};return l.request(s,r)},getClickThroughRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:o,headers:{}};return l.request(s,r)},getConversationRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getConversationRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/conversions/conversionRate",queryParameters:o,headers:{}};return l.request(s,r)},getNoClickRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/noClickRate",queryParameters:o,headers:{}};return l.request(s,r)},getNoResultsRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/noResultRate",queryParameters:o,headers:{}};return l.request(s,r)},getSearchesCount:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/count",queryParameters:o,headers:{}};return l.request(s,r)},getSearchesNoClicks:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");var d={};void 0!==t&&(d.index=t.toString()),void 0!==a&&(d.startDate=a.toString()),void 0!==n&&(d.endDate=n.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());var c={method:"GET",path:"/2/searches/noClicks",queryParameters:d,headers:{}};return l.request(c,r)},getSearchesNoResults:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");var d={};void 0!==t&&(d.index=t.toString()),void 0!==a&&(d.startDate=a.toString()),void 0!==n&&(d.endDate=n.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());var c={method:"GET",path:"/2/searches/noResults",queryParameters:d,headers:{}};return l.request(c,r)},getStatus:function(e,r){var t=e.index;if(!t)throw new Error("Parameter `index` is required when calling `getStatus`.");var a={};void 0!==t&&(a.index=t.toString());var n={method:"GET",path:"/2/status",queryParameters:a,headers:{}};return l.request(n,r)},getTopCountries:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopCountries`.");var d={};void 0!==t&&(d.index=t.toString()),void 0!==a&&(d.startDate=a.toString()),void 0!==n&&(d.endDate=n.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());var c={method:"GET",path:"/2/countries",queryParameters:d,headers:{}};return l.request(c,r)},getTopFilterAttributes:function(e,r){var t=e.index,a=e.search,n=e.startDate,i=e.endDate,o=e.limit,s=e.offset,d=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");var c={};void 0!==t&&(c.index=t.toString()),void 0!==a&&(c.search=a.toString()),void 0!==n&&(c.startDate=n.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==d&&(c.tags=d.toString());var u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return l.request(u,r)},getTopFilterForAttribute:function(e,r){var t=e.attribute,a=e.index,n=e.search,i=e.startDate,o=e.endDate,s=e.limit,d=e.offset,c=e.tags;if(!t)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!a)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");var u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(t)),h={};void 0!==a&&(h.index=a.toString()),void 0!==n&&(h.search=n.toString()),void 0!==i&&(h.startDate=i.toString()),void 0!==o&&(h.endDate=o.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==d&&(h.offset=d.toString()),void 0!==c&&(h.tags=c.toString());var m={method:"GET",path:u,queryParameters:h,headers:{}};return l.request(m,r)},getTopFiltersNoResults:function(e,r){var t=e.index,a=e.search,n=e.startDate,i=e.endDate,o=e.limit,s=e.offset,d=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");var c={};void 0!==t&&(c.index=t.toString()),void 0!==a&&(c.search=a.toString()),void 0!==n&&(c.startDate=n.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==d&&(c.tags=d.toString());var u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return l.request(u,r)},getTopHits:function(e,r){var t=e.index,a=e.search,n=e.clickAnalytics,i=e.startDate,o=e.endDate,s=e.limit,d=e.offset,c=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopHits`.");var u={};void 0!==t&&(u.index=t.toString()),void 0!==a&&(u.search=a.toString()),void 0!==n&&(u.clickAnalytics=n.toString()),void 0!==i&&(u.startDate=i.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==s&&(u.limit=s.toString()),void 0!==d&&(u.offset=d.toString()),void 0!==c&&(u.tags=c.toString());var h={method:"GET",path:"/2/hits",queryParameters:u,headers:{}};return l.request(h,r)},getTopSearches:function(e,r){var t=e.index,a=e.clickAnalytics,n=e.startDate,i=e.endDate,o=e.orderBy,s=e.direction,d=e.limit,c=e.offset,u=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopSearches`.");var h={};void 0!==t&&(h.index=t.toString()),void 0!==a&&(h.clickAnalytics=a.toString()),void 0!==n&&(h.startDate=n.toString()),void 0!==i&&(h.endDate=i.toString()),void 0!==o&&(h.orderBy=o.toString()),void 0!==s&&(h.direction=s.toString()),void 0!==d&&(h.limit=d.toString()),void 0!==c&&(h.offset=c.toString()),void 0!==u&&(h.tags=u.toString());var m={method:"GET",path:"/2/searches",queryParameters:h,headers:{}};return l.request(m,r)},getUsersCount:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getUsersCount`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/users/count",queryParameters:o,headers:{}};return l.request(s,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)}}}var j=["appId","apiKey","authMode","algoliaAgents","region"];function R(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function U(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?R(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):R(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var A=["eu","us"];function C(e){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},C(e)}var k=["appId","apiKey","authMode","algoliaAgents"],G=["indexName","taskID"],K=["operation","key","apiKey"],B=["params"];function z(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function H(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?z(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):z(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var F="5.0.0-alpha.3";function L(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(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:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function J(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function M(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?J(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):J(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var $=F;e.algoliasearch=function(e,r,n){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!r||"string"!=typeof r)throw new Error("`apiKey` is missing.");var c=M({apiKey:r,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 i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===i&&(clearTimeout(n),i=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(i),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(i),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:d(),requestsCache:d({serializable:!1}),hostsCache:s({caches:[o({key:"".concat($,"-").concat(e)}),d()]})},n);return M(M({},function(e){var r=e.appId,n=e.apiKey,o=e.authMode,s=e.algoliaAgents,d=t(e,k),c=a(r,n,o),u=y(H(H({hosts:L(r)},d),{},{algoliaAgent:P({algoliaAgents:s,client:"Search",version:F}),baseHeaders:H(H({"content-type":"text/plain"},c.headers()),d.baseHeaders),baseQueryParameters:H(H({},c.queryParameters()),d.baseQueryParameters)}));return{transporter:u,get _ua(){return u.algoliaAgent.value},addAlgoliaAgent:function(e,r){u.algoliaAgent.add({segment:e,version:r})},waitForTask:function(e,r){var a=this,n=e.indexName,o=e.taskID;return i(H(H({},t(e,G)),{},{func:function(){return a.getTask({indexName:n,taskID:o},r)},validate:function(e){return"published"===e.status}}))},waitForApiKey:function(e,r){var a=this,n=e.operation,o=e.key,s=e.apiKey,d=t(e,K);if("update"===n){if(!s)throw new Error("`apiKey` is required when waiting for an `update` operation.");return i(H(H({},d),{},{func:function(){return a.getApiKey({key:o},r)},validate:function(e){for(var r=function(){var r=a[t];if(Array.isArray(s[r])){if(s[r].length!==e[r].length||s[r].some((function(t,a){return t!==e[r][a]})))return{v:!1}}else if(e[r]!==s[r])return{v:!1}},t=0,a=Object.keys(s);t<a.length;t++){var n=r();if("object"===C(n))return n.v}return!0}}))}return i(H(H({},d),{},{func:function(){return a.getApiKey({key:o},r).catch((function(e){return e}))},validate:function(e){return"add"===n?404!==e.status:404===e.status}}))},addApiKey:function(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`.");var t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return u.request(t,r)},addOrUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!n)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");var i={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n};return u.request(i,r)},appendSource:function(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");var t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return u.request(t,r)},assignUserId:function(e,r){var t=e.xAlgoliaUserID,a=e.assignUserIdParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!a)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!a.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:n,data:a};return u.request(i,r)},batch:function(e,r){var t=e.indexName,a=e.batchWriteParams;if(!t)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!a)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");var n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},batchAssignUserIds:function(e,r){var t=e.xAlgoliaUserID,a=e.batchAssignUserIdsParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!a)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!a.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!a.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:n,data:a};return u.request(i,r)},batchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.batchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!a)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!a.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},browse:function(e,r){var t=e.indexName,a=e.browseRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `browse`.");var n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{}};return u.request(n,r)},clearAllSynonyms:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");var n="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return u.request(o,r)},clearObjects:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");var a={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},clearRules:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearRules`.");var n="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return u.request(o,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return u.request(n,r)},deleteApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");var a={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteBy:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!a)throw new Error("Parameter `searchParams` is required when calling `deleteBy`.");var n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},deleteIndex:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");var a={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteObject:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");var n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},deleteRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");var i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return u.request(s,r)},deleteSource:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `deleteSource`.");var a={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");var i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return u.request(s,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return u.request(n,r)},getApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `getApiKey`.");var a={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},getDictionaryLanguages:function(e){var r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return u.request(r,e)},getDictionarySettings:function(e){var r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return u.request(r,e)},getLogs:function(e,r){var t=e.offset,a=e.length,n=e.indexName,i=e.type,o={};void 0!==t&&(o.offset=t.toString()),void 0!==a&&(o.length=a.toString()),void 0!==n&&(o.indexName=n.toString()),void 0!==i&&(o.type=i.toString());var s={method:"GET",path:"/1/logs",queryParameters:o,headers:{}};return u.request(s,r)},getObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToRetrieve;if(!t)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getObject`.");var i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.attributesToRetrieve=n.toString());var s={method:"GET",path:i,queryParameters:o,headers:{}};return u.request(s,r)},getObjects:function(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");var t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(t,r)},getRule:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getRule`.");var n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getSettings:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `getSettings`.");var a={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},getSources:function(e){var r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return u.request(r,e)},getSynonym:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");var n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getTask:function(e,r){var t=e.indexName,a=e.taskID;if(!t)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!a)throw new Error("Parameter `taskID` is required when calling `getTask`.");var n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getTopUserIds:function(e){var r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return u.request(r,e)},getUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `getUserId`.");var a={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},hasPendingMappings:function(e,r){var t=e.getClusters,a={};void 0!==t&&(a.getClusters=t.toString());var n={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:a,headers:{}};return u.request(n,r)},listApiKeys:function(e){var r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return u.request(r,e)},listClusters:function(e){var r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return u.request(r,e)},listIndices:function(e,r){var t=e.page,a={};void 0!==t&&(a.page=t.toString());var n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return u.request(n,r)},listUserIds:function(e,r){var t=e.page,a=e.hitsPerPage,n={};void 0!==t&&(n.page=t.toString()),void 0!==a&&(n.hitsPerPage=a.toString());var i={method:"GET",path:"/1/clusters/mapping",queryParameters:n,headers:{}};return u.request(i,r)},multipleBatch:function(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");var t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return u.request(t,r)},operationIndex:function(e,r){var t=e.indexName,a=e.operationIndexParams;if(!t)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!a)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!a.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!a.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},partialUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributeOrBuiltInOperation,i=e.createIfNotExists;if(!t)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!n)throw new Error("Parameter `attributeOrBuiltInOperation` is required when calling `partialUpdateObject`.");var o="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.createIfNotExists=i.toString());var d={method:"POST",path:o,queryParameters:s,headers:{},data:n};return u.request(d,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return u.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return u.request(i,r)},removeUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `removeUserId`.");var a={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},replaceSources:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `replaceSources`.");var a={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:t};return u.request(a,r)},restoreApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");var a={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},saveObject:function(e,r){var t=e.indexName,a=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!a)throw new Error("Parameter `body` is required when calling `saveObject`.");var n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},saveRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.rule,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!n)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!n.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");var o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var d={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return u.request(d,r)},saveRules:function(e,r){var t=e.indexName,a=e.rule,n=e.forwardToReplicas,i=e.clearExistingRules;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!a)throw new Error("Parameter `rule` is required when calling `saveRules`.");var o="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.clearExistingRules=i.toString());var d={method:"POST",path:o,queryParameters:s,headers:{},data:a};return u.request(d,r)},saveSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.synonymHit,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!n)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!n.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");var o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var d={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return u.request(d,r)},saveSynonyms:function(e,r){var t=e.indexName,a=e.synonymHit,n=e.forwardToReplicas,i=e.replaceExistingSynonyms;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!a)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");var o="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.replaceExistingSynonyms=i.toString());var d={method:"POST",path:o,queryParameters:s,headers:{},data:a};return u.request(d,r)},search:function(e,r){if(e&&Array.isArray(e)){var a={requests:e.map((function(e){var r=e.params,a=t(e,B);return"facet"===a.type?H(H(H({},a),r),{},{type:"facet"}):H(H(H({},a),r),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=a}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`.");var n={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.searchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!a)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!a.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchForFacetValues:function(e,r){var t=e.indexName,a=e.facetName,n=e.searchForFacetValuesRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!a)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");var i={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(t)).replace("{facetName}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return u.request(i,r)},searchRules:function(e,r){var t=e.indexName,a=e.searchRulesParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchRules`.");if(!a)throw new Error("Parameter `searchRulesParams` is required when calling `searchRules`.");var n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchSingleIndex:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchSynonyms:function(e,r){var t=e.indexName,a=e.type,n=e.page,i=e.hitsPerPage,o=e.searchSynonymsParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");var s="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(t)),d={};void 0!==a&&(d.type=a.toString()),void 0!==n&&(d.page=n.toString()),void 0!==i&&(d.hitsPerPage=i.toString());var c={method:"POST",path:s,queryParameters:d,headers:{},data:o||{},useReadTransporter:!0,cacheable:!0};return u.request(c,r)},searchUserIds:function(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`.");var t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(t,r)},setDictionarySettings:function(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`.");var t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return u.request(t,r)},setSettings:function(e,r){var t=e.indexName,a=e.indexSettings,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!a)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");var i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"PUT",path:i,queryParameters:o,headers:{},data:a};return u.request(s,r)},updateApiKey:function(e,r){var t=e.key,a=e.apiKey;if(!t)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!a)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!a.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");var n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)}}}(c)),{},{get _ua(){return this.transporter.algoliaAgent.value},initAnalytics:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.region&&("string"!=typeof e.region||!I.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(I.join(", ")));return N(M(M(M({},c),e.options),e))},initPersonalization:function(e){if(!e.region)throw new Error("`region` is missing.");if(e.region&&("string"!=typeof e.region||!A.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(A.join(", ")));return function(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,d=e.region,c=t(e,j),u=a(n,i,o),l=y(U(U({hosts:(r=d,[{url:"personalization.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}])},c),{},{algoliaAgent:P({algoliaAgents:s,client:"Personalization",version:"5.0.0-alpha.3"}),baseHeaders:U(U({"content-type":"text/plain"},u.headers()),c.baseHeaders),baseQueryParameters:U(U({},u.queryParameters()),c.baseQueryParameters)}));return{transporter:l,get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},deleteUserProfile:function(e,r){var t=e.userToken;if(!t)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");var a={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getPersonalizationStrategy:function(e){var r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return l.request(r,e)},getUserTokenProfile:function(e,r){var t=e.userToken;if(!t)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");var a={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},setPersonalizationStrategy:function(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`.");var t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return l.request(t,r)}}}(M(M(M({},c),e.options),e))},initAbtesting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.region&&("string"!=typeof e.region||!S.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(S.join(", ")));return x(M(M(M({},c),e.options),e))}})},e.apiClientVersion=$}));
|
|
1
|
+
/*! algoliasearch.umd.js | 5.0.0-alpha.6 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!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){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function t(e,r){if(null==e)return{};var t,a,n=function(e,r){if(null==e)return{};var t,a,n={},i=Object.keys(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)t=i[a],r.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}function a(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 n({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const i=o=>new Promise(((s,c)=>{e(o).then((e=>(t&&t(e),r(e)?s(e):a&&a.validate(e)?c(new Error(a.message(e))):setTimeout((()=>{i(e).then(s).catch(c)}),n())))).catch((e=>{c(e)}))}));return i()}function i(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)||"{}")}return{get:(e,r,t={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const t=JSON.stringify(e),a=n()[t];return Promise.all([a||r(),void 0!==a])})).then((([e,r])=>Promise.all([e,r||t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve().then((()=>{const i=n();return i[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(i)),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 o(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,n={miss:()=>Promise.resolve()})=>t.get(e,a,n).catch((()=>o({caches:r}).get(e,a,n))),set:(e,a)=>t.set(e,a).catch((()=>o({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>o({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>o({caches:r}).clear()))}}function s(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const i=JSON.stringify(t);if(i in r)return Promise.resolve(e.serializable?JSON.parse(r[i]):r[i]);const o=a();return o.then((e=>n.miss(e))).then((()=>o))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const c=12e4;function d(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>c},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=c}}}function u(e,r,t){return r in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class l extends Error{constructor(e,r){super(e),u(this,"name","AlgoliaError"),r&&(this.name=r)}}class h extends l{constructor(e,r,t){super(e,t),u(this,"stackTrace",void 0),this.stackTrace=r}}class m extends h{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class p extends h{constructor(e,r,t){super(e,t,"ApiError"),u(this,"status",void 0),this.status=r}}class g extends l{constructor(e,r){super(e,"DeserializationError"),u(this,"response",void 0),this.response=r}}function f(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}=${r(e[t])?JSON.stringify(e[t]):e[t]}`)).join("&")}(t);let n=`${e.protocol}://${e.url}/${"/"===r.charAt(0)?r.substr(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 v({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:i,requester:o,requestsCache:s,responsesCache:c}){async function u(s,c,u=!0){const l=[],h=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)}(s,c),v=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,s.headers,c.headers),y="GET"===s.method?{...s.data,...c.data}:{},P={"x-algolia-agent":n.value,...a,...s.queryParameters,...y};if(c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?P[e]=c.queryParameters[e].toString():P[e]=c.queryParameters[e];let q=0;const b=async(e,t)=>{const a=e.pop();if(void 0===a)throw new m(function(e){return e.map((e=>w(e)))}(l));let n=c.timeout;void 0===n&&(n=u?i.read:i.write);const y={data:h,headers:v,method:s.method,url:f(a,s.path,P),connectTimeout:t(q,i.connect),responseTimeout:t(q,n)},E=r=>{const t={request:y,response:r,host:a,triesLeft:e.length};return l.push(t),t},S=await o.send(y);if(function({isTimedOut:e,status:r}){return e||function({isTimedOut:e,status:r}){return!e&&0==~~r}({isTimedOut:e,status:r})||2!=~~(r/100)&&4!=~~(r/100)}(S)){const n=E(S);return S.isTimedOut&&q++,console.log("Retryable failure",w(n)),await r.set(a,d(a,S.isTimedOut?"timed out":"down")),b(e,t)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(r){throw new g(r.message,e)}}(S);throw E(S),function({content:e,status:r},t){let a=e;try{a=JSON.parse(e).message}catch(e){}return new p(a,r,t)}(S,l)},E=e.filter((e=>"readWrite"===e.accept||(u?"read"===e.accept:"write"===e.accept))),S=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(d(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),i=[...a,...n];return{hosts:i.length>0?i:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(E);return b([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:r,requester:o,timeouts:i,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 i=()=>u(e,r);if(!0!==(r.cacheable||e.cacheable))return i();const o={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return c.get(o,(()=>s.get(o,(()=>s.set(o,i()).then((e=>Promise.all([s.delete(o),e])),(e=>Promise.all([s.delete(o),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>c.set(o,e)})},requestsCache:s,responsesCache:c}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}var P=["appId","apiKey","authMode","algoliaAgents","region"];function q(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function b(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?q(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):q(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var E=["de","us"];function S(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,c=e.region,d=t(e,P),u=a(n,i,o),l=v(b(b({hosts:(r=c,[{url:r?"analytics.{region}.algolia.com".replace("{region}",r):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},d),{},{algoliaAgent:y({algoliaAgents:s,client:"Abtesting",version:"5.0.0-alpha.6"}),baseHeaders:b(b({"content-type":"text/plain"},u.headers()),d.baseHeaders),baseQueryParameters:b(b({},u.queryParameters()),d.baseQueryParameters)}));return{transporter:l,appId:n,clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then((function(){}))},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},addABTests:function(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.variant)throw new Error("Parameter `addABTestsRequest.variant` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");var t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return l.request(t,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},deleteABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `deleteABTest`.");var a={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `getABTest`.");var a={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},listABTests:function(e,r){var t=e.offset,a=e.limit,n={};void 0!==t&&(n.offset=t.toString()),void 0!==a&&(n.limit=a.toString());var i={method:"GET",path:"/2/abtests",queryParameters:n,headers:{}};return l.request(i,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},stopABTest:function(e,r){var t=e.id;if(!t)throw new Error("Parameter `id` is required when calling `stopABTest`.");var a={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)}}}var x=["appId","apiKey","authMode","algoliaAgents","region"];function T(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function O(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?T(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):T(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var D=["de","us"];function I(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,c=e.region,d=t(e,x),u=a(n,i,o),l=v(O(O({hosts:(r=c,[{url:r?"analytics.{region}.algolia.com".replace("{region}",r):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},d),{},{algoliaAgent:y({algoliaAgents:s,client:"Analytics",version:"5.0.0-alpha.6"}),baseHeaders:O(O({"content-type":"text/plain"},u.headers()),d.baseHeaders),baseQueryParameters:O(O({},u.queryParameters()),d.baseQueryParameters)}));return{transporter:l,appId:n,clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then((function(){}))},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getAverageClickPosition:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:o,headers:{}};return l.request(s,r)},getClickPositions:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getClickPositions`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/positions",queryParameters:o,headers:{}};return l.request(s,r)},getClickThroughRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:o,headers:{}};return l.request(s,r)},getConversationRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getConversationRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/conversions/conversionRate",queryParameters:o,headers:{}};return l.request(s,r)},getNoClickRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/noClickRate",queryParameters:o,headers:{}};return l.request(s,r)},getNoResultsRate:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/noResultRate",queryParameters:o,headers:{}};return l.request(s,r)},getSearchesCount:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/searches/count",queryParameters:o,headers:{}};return l.request(s,r)},getSearchesNoClicks:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");var c={};void 0!==t&&(c.index=t.toString()),void 0!==a&&(c.startDate=a.toString()),void 0!==n&&(c.endDate=n.toString()),void 0!==i&&(c.limit=i.toString()),void 0!==o&&(c.offset=o.toString()),void 0!==s&&(c.tags=s.toString());var d={method:"GET",path:"/2/searches/noClicks",queryParameters:c,headers:{}};return l.request(d,r)},getSearchesNoResults:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");var c={};void 0!==t&&(c.index=t.toString()),void 0!==a&&(c.startDate=a.toString()),void 0!==n&&(c.endDate=n.toString()),void 0!==i&&(c.limit=i.toString()),void 0!==o&&(c.offset=o.toString()),void 0!==s&&(c.tags=s.toString());var d={method:"GET",path:"/2/searches/noResults",queryParameters:c,headers:{}};return l.request(d,r)},getStatus:function(e,r){var t=e.index;if(!t)throw new Error("Parameter `index` is required when calling `getStatus`.");var a={};void 0!==t&&(a.index=t.toString());var n={method:"GET",path:"/2/status",queryParameters:a,headers:{}};return l.request(n,r)},getTopCountries:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.limit,o=e.offset,s=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopCountries`.");var c={};void 0!==t&&(c.index=t.toString()),void 0!==a&&(c.startDate=a.toString()),void 0!==n&&(c.endDate=n.toString()),void 0!==i&&(c.limit=i.toString()),void 0!==o&&(c.offset=o.toString()),void 0!==s&&(c.tags=s.toString());var d={method:"GET",path:"/2/countries",queryParameters:c,headers:{}};return l.request(d,r)},getTopFilterAttributes:function(e,r){var t=e.index,a=e.search,n=e.startDate,i=e.endDate,o=e.limit,s=e.offset,c=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");var d={};void 0!==t&&(d.index=t.toString()),void 0!==a&&(d.search=a.toString()),void 0!==n&&(d.startDate=n.toString()),void 0!==i&&(d.endDate=i.toString()),void 0!==o&&(d.limit=o.toString()),void 0!==s&&(d.offset=s.toString()),void 0!==c&&(d.tags=c.toString());var u={method:"GET",path:"/2/filters",queryParameters:d,headers:{}};return l.request(u,r)},getTopFilterForAttribute:function(e,r){var t=e.attribute,a=e.index,n=e.search,i=e.startDate,o=e.endDate,s=e.limit,c=e.offset,d=e.tags;if(!t)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!a)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");var u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(t)),h={};void 0!==a&&(h.index=a.toString()),void 0!==n&&(h.search=n.toString()),void 0!==i&&(h.startDate=i.toString()),void 0!==o&&(h.endDate=o.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==c&&(h.offset=c.toString()),void 0!==d&&(h.tags=d.toString());var m={method:"GET",path:u,queryParameters:h,headers:{}};return l.request(m,r)},getTopFiltersNoResults:function(e,r){var t=e.index,a=e.search,n=e.startDate,i=e.endDate,o=e.limit,s=e.offset,c=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");var d={};void 0!==t&&(d.index=t.toString()),void 0!==a&&(d.search=a.toString()),void 0!==n&&(d.startDate=n.toString()),void 0!==i&&(d.endDate=i.toString()),void 0!==o&&(d.limit=o.toString()),void 0!==s&&(d.offset=s.toString()),void 0!==c&&(d.tags=c.toString());var u={method:"GET",path:"/2/filters/noResults",queryParameters:d,headers:{}};return l.request(u,r)},getTopHits:function(e,r){var t=e.index,a=e.search,n=e.clickAnalytics,i=e.startDate,o=e.endDate,s=e.limit,c=e.offset,d=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopHits`.");var u={};void 0!==t&&(u.index=t.toString()),void 0!==a&&(u.search=a.toString()),void 0!==n&&(u.clickAnalytics=n.toString()),void 0!==i&&(u.startDate=i.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==s&&(u.limit=s.toString()),void 0!==c&&(u.offset=c.toString()),void 0!==d&&(u.tags=d.toString());var h={method:"GET",path:"/2/hits",queryParameters:u,headers:{}};return l.request(h,r)},getTopSearches:function(e,r){var t=e.index,a=e.clickAnalytics,n=e.startDate,i=e.endDate,o=e.orderBy,s=e.direction,c=e.limit,d=e.offset,u=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getTopSearches`.");var h={};void 0!==t&&(h.index=t.toString()),void 0!==a&&(h.clickAnalytics=a.toString()),void 0!==n&&(h.startDate=n.toString()),void 0!==i&&(h.endDate=i.toString()),void 0!==o&&(h.orderBy=o.toString()),void 0!==s&&(h.direction=s.toString()),void 0!==c&&(h.limit=c.toString()),void 0!==d&&(h.offset=d.toString()),void 0!==u&&(h.tags=u.toString());var m={method:"GET",path:"/2/searches",queryParameters:h,headers:{}};return l.request(m,r)},getUsersCount:function(e,r){var t=e.index,a=e.startDate,n=e.endDate,i=e.tags;if(!t)throw new Error("Parameter `index` is required when calling `getUsersCount`.");var o={};void 0!==t&&(o.index=t.toString()),void 0!==a&&(o.startDate=a.toString()),void 0!==n&&(o.endDate=n.toString()),void 0!==i&&(o.tags=i.toString());var s={method:"GET",path:"/2/users/count",queryParameters:o,headers:{}};return l.request(s,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)}}}var N=["appId","apiKey","authMode","algoliaAgents","region"];function j(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function R(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?j(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):j(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var U=["eu","us"];function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}var C=["appId","apiKey","authMode","algoliaAgents"],k=["indexName","browseRequest"],G=["indexName","searchRulesParams"],K=["indexName","validate","aggregator"],B=["params"];function H(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function z(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?H(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):H(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var F="5.0.0-alpha.6";function L(e){return[{url:"".concat(e,"-dsn.algolia.net"),accept:"read",protocol:"https"},{url:"".concat(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:"".concat(e,"-1.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-2.algolianet.com"),accept:"readWrite",protocol:"https"},{url:"".concat(e,"-3.algolianet.com"),accept:"readWrite",protocol:"https"}]))}function M(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);r&&(a=a.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,a)}return t}function J(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?M(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):M(Object(a)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(a,r))}))}return e}var Q=F;e.algoliasearch=function(e,r,c){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!r||"string"!=typeof r)throw new Error("`apiKey` is missing.");var d=J({apiKey:r,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 i;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===i&&(clearTimeout(n),i=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(i),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(i),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:o({caches:[i({key:"".concat(Q,"-").concat(e)}),s()]})},c);return J(J({},function(e){var r=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,c=t(e,C),d=a(r,i,o),u=v(z(z({hosts:L(r)},c),{},{algoliaAgent:y({algoliaAgents:s,client:"Search",version:F}),baseHeaders:z(z({"content-type":"text/plain"},d.headers()),c.baseHeaders),baseQueryParameters:z(z({},d.queryParameters()),c.baseQueryParameters)}));return{transporter:u,appId:r,clearCache:function(){return Promise.all([u.requestsCache.clear(),u.responsesCache.clear()]).then((function(){}))},get _ua(){return u.algoliaAgent.value},addAlgoliaAgent:function(e,r){u.algoliaAgent.add({segment:e,version:r})},waitForTask:function(e,r){var t=this,a=e.indexName,i=e.taskID,o=e.maxRetries,s=void 0===o?50:o,c=e.timeout,d=void 0===c?function(e){return Math.min(200*e,5e3)}:c,u=0;return n({func:function(){return t.getTask({indexName:a,taskID:i},r)},validate:function(e){return"published"===e.status},aggregator:function(){return u+=1},error:{validate:function(){return u>=s},message:function(){return"The maximum number of retries exceeded. (".concat(u,"/").concat(s,")")}},timeout:function(){return d(u)}})},waitForApiKey:function(e,r){var t=this,a=e.operation,i=e.key,o=e.apiKey,s=e.maxRetries,c=void 0===s?50:s,d=e.timeout,u=void 0===d?function(e){return Math.min(200*e,5e3)}:d,l=0,h={aggregator:function(){return l+=1},error:{validate:function(){return l>=c},message:function(){return"The maximum number of retries exceeded. (".concat(l,"/").concat(c,")")}},timeout:function(){return u(l)}};if("update"===a){if(!o)throw new Error("`apiKey` is required when waiting for an `update` operation.");return n(z(z({},h),{},{func:function(){return t.getApiKey({key:i},r)},validate:function(e){for(var r=function(){var r=a[t];if(Array.isArray(o[r])){if(o[r].length!==e[r].length||o[r].some((function(t,a){return t!==e[r][a]})))return{v:!1}}else if(e[r]!==o[r])return{v:!1}},t=0,a=Object.keys(o);t<a.length;t++){var n=r();if("object"===A(n))return n.v}return!0}}))}return n(z(z({},h),{},{func:function(){return t.getApiKey({key:i},r).catch((function(e){return e}))},validate:function(e){return"add"===a?404!==e.status:404===e.status}}))},browseObjects:function(e,r){var a=this,i=e.indexName,o=e.browseRequest;return n(z({func:function(e){return a.browse({indexName:i,browseRequest:z({cursor:e?e.cursor:void 0},o)},r)},validate:function(e){return void 0===e.cursor}},t(e,k)))},browseRules:function(e,r){var a=this,i=e.indexName,o=e.searchRulesParams,s=t(e,G),c=z({hitsPerPage:1e3},o);return n(z({func:function(e){return a.searchRules({indexName:i,searchRulesParams:z(z({},c),{},{page:e?e.page+1:c.page||0})},r)},validate:function(e){return e.nbHits<c.hitsPerPage}},s))},browseSynonyms:function(e,r){var a=this,i=e.indexName;e.validate,e.aggregator;var o=t(e,K),s=z({hitsPerPage:1e3},o);return n(z({func:function(e){return a.searchSynonyms(z(z({},s),{},{indexName:i,page:e?e.page+1:o.page||0}),r)},validate:function(e){return e.nbHits<s.hitsPerPage}},o))},addApiKey:function(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`.");var t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return u.request(t,r)},addOrUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!n)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");var i={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n};return u.request(i,r)},appendSource:function(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");var t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return u.request(t,r)},assignUserId:function(e,r){var t=e.xAlgoliaUserID,a=e.assignUserIdParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!a)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!a.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:n,data:a};return u.request(i,r)},batch:function(e,r){var t=e.indexName,a=e.batchWriteParams;if(!t)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!a)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");var n={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},batchAssignUserIds:function(e,r){var t=e.xAlgoliaUserID,a=e.batchAssignUserIdsParams;if(!t)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!a)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!a.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!a.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");var n={};void 0!==t&&(n["X-Algolia-User-ID"]=t.toString());var i={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:n,data:a};return u.request(i,r)},batchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.batchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!a)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!a.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},browse:function(e,r){var t=e.indexName,a=e.browseRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `browse`.");var n={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{}};return u.request(n,r)},clearAllSynonyms:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");var n="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return u.request(o,r)},clearObjects:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");var a={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},clearRules:function(e,r){var t=e.indexName,a=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `clearRules`.");var n="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(t)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());var o={method:"POST",path:n,queryParameters:i,headers:{}};return u.request(o,r)},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return u.request(n,r)},deleteApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");var a={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteBy:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!a)throw new Error("Parameter `searchParams` is required when calling `deleteBy`.");var n={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},deleteIndex:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");var a={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteObject:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");var n={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},deleteRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");var i="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return u.request(s,r)},deleteSource:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `deleteSource`.");var a={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},deleteSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");var i="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"DELETE",path:i,queryParameters:o,headers:{}};return u.request(s,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return u.request(n,r)},getApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `getApiKey`.");var a={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},getDictionaryLanguages:function(e){var r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return u.request(r,e)},getDictionarySettings:function(e){var r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return u.request(r,e)},getLogs:function(e,r){var t=e.offset,a=e.length,n=e.indexName,i=e.type,o={};void 0!==t&&(o.offset=t.toString()),void 0!==a&&(o.length=a.toString()),void 0!==n&&(o.indexName=n.toString()),void 0!==i&&(o.type=i.toString());var s={method:"GET",path:"/1/logs",queryParameters:o,headers:{}};return u.request(s,r)},getObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToRetrieve;if(!t)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getObject`.");var i="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),o={};void 0!==n&&(o.attributesToRetrieve=n.toString());var s={method:"GET",path:i,queryParameters:o,headers:{}};return u.request(s,r)},getObjects:function(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`.");var t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(t,r)},getRule:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getRule`.");var n={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getSettings:function(e,r){var t=e.indexName;if(!t)throw new Error("Parameter `indexName` is required when calling `getSettings`.");var a={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},getSources:function(e){var r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return u.request(r,e)},getSynonym:function(e,r){var t=e.indexName,a=e.objectID;if(!t)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");var n={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getTask:function(e,r){var t=e.indexName,a=e.taskID;if(!t)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!a)throw new Error("Parameter `taskID` is required when calling `getTask`.");var n={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(t)).replace("{taskID}",encodeURIComponent(a)),queryParameters:{},headers:{}};return u.request(n,r)},getTopUserIds:function(e){var r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return u.request(r,e)},getUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `getUserId`.");var a={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},hasPendingMappings:function(e,r){var t=e.getClusters,a={};void 0!==t&&(a.getClusters=t.toString());var n={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:a,headers:{}};return u.request(n,r)},listApiKeys:function(e){var r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return u.request(r,e)},listClusters:function(e){var r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return u.request(r,e)},listIndices:function(e,r){var t=e.page,a={};void 0!==t&&(a.page=t.toString());var n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return u.request(n,r)},listUserIds:function(e,r){var t=e.page,a=e.hitsPerPage,n={};void 0!==t&&(n.page=t.toString()),void 0!==a&&(n.hitsPerPage=a.toString());var i={method:"GET",path:"/1/clusters/mapping",queryParameters:n,headers:{}};return u.request(i,r)},multipleBatch:function(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`.");var t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return u.request(t,r)},operationIndex:function(e,r){var t=e.indexName,a=e.operationIndexParams;if(!t)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!a)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!a.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!a.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},partialUpdateObject:function(e,r){var t=e.indexName,a=e.objectID,n=e.attributesToUpdate,i=e.createIfNotExists;if(!t)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!a)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!n)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");var o="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.createIfNotExists=i.toString());var c={method:"POST",path:o,queryParameters:s,headers:{},data:n};return u.request(c,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return u.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return u.request(i,r)},removeUserId:function(e,r){var t=e.userID;if(!t)throw new Error("Parameter `userID` is required when calling `removeUserId`.");var a={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},replaceSources:function(e,r){var t=e.source;if(!t)throw new Error("Parameter `source` is required when calling `replaceSources`.");var a={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:t};return u.request(a,r)},restoreApiKey:function(e,r){var t=e.key;if(!t)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");var a={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{}};return u.request(a,r)},saveObject:function(e,r){var t=e.indexName,a=e.body;if(!t)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!a)throw new Error("Parameter `body` is required when calling `saveObject`.");var n={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)},saveRule:function(e,r){var t=e.indexName,a=e.objectID,n=e.rule,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!n)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!n.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");var o="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var c={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return u.request(c,r)},saveRules:function(e,r){var t=e.indexName,a=e.rules,n=e.forwardToReplicas,i=e.clearExistingRules;if(!t)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!a)throw new Error("Parameter `rules` is required when calling `saveRules`.");var o="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.clearExistingRules=i.toString());var c={method:"POST",path:o,queryParameters:s,headers:{},data:a};return u.request(c,r)},saveSynonym:function(e,r){var t=e.indexName,a=e.objectID,n=e.synonymHit,i=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!a)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!n)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!n.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");var o="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(t)).replace("{objectID}",encodeURIComponent(a)),s={};void 0!==i&&(s.forwardToReplicas=i.toString());var c={method:"PUT",path:o,queryParameters:s,headers:{},data:n};return u.request(c,r)},saveSynonyms:function(e,r){var t=e.indexName,a=e.synonymHit,n=e.forwardToReplicas,i=e.replaceExistingSynonyms;if(!t)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!a)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");var o="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(t)),s={};void 0!==n&&(s.forwardToReplicas=n.toString()),void 0!==i&&(s.replaceExistingSynonyms=i.toString());var c={method:"POST",path:o,queryParameters:s,headers:{},data:a};return u.request(c,r)},search:function(e,r){if(e&&Array.isArray(e)){var a={requests:e.map((function(e){var r=e.params,a=t(e,B);return"facet"===a.type?z(z(z({},a),r),{},{type:"facet"}):z(z(z({},a),r),{},{facet:void 0,maxFacetHits:void 0,facetQuery:void 0})}))};e=a}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`.");var n={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchDictionaryEntries:function(e,r){var t=e.dictionaryName,a=e.searchDictionaryEntriesParams;if(!t)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!a)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!a.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");var n={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a,useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchForFacetValues:function(e,r){var t=e.indexName,a=e.facetName,n=e.searchForFacetValuesRequest;if(!t)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!a)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");var i={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(t)).replace("{facetName}",encodeURIComponent(a)),queryParameters:{},headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return u.request(i,r)},searchRules:function(e,r){var t=e.indexName,a=e.searchRulesParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchRules`.");var n={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchSingleIndex:function(e,r){var t=e.indexName,a=e.searchParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");var n={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a||{},useReadTransporter:!0,cacheable:!0};return u.request(n,r)},searchSynonyms:function(e,r){var t=e.indexName,a=e.type,n=e.page,i=e.hitsPerPage,o=e.searchSynonymsParams;if(!t)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");var s="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(t)),c={};void 0!==a&&(c.type=a.toString()),void 0!==n&&(c.page=n.toString()),void 0!==i&&(c.hitsPerPage=i.toString());var d={method:"POST",path:s,queryParameters:c,headers:{},data:o||{},useReadTransporter:!0,cacheable:!0};return u.request(d,r)},searchUserIds:function(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`.");var t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return u.request(t,r)},setDictionarySettings:function(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`.");var t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return u.request(t,r)},setSettings:function(e,r){var t=e.indexName,a=e.indexSettings,n=e.forwardToReplicas;if(!t)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!a)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");var i="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(t)),o={};void 0!==n&&(o.forwardToReplicas=n.toString());var s={method:"PUT",path:i,queryParameters:o,headers:{},data:a};return u.request(s,r)},updateApiKey:function(e,r){var t=e.key,a=e.apiKey;if(!t)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!a)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!a.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");var n={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(t)),queryParameters:{},headers:{},data:a};return u.request(n,r)}}}(d)),{},{get _ua(){return this.transporter.algoliaAgent.value},initAnalytics:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.region&&("string"!=typeof e.region||!D.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(D.join(", ")));return I(J(J(J({},d),e.options),e))},initPersonalization:function(e){if(!e.region)throw new Error("`region` is missing.");if(e.region&&("string"!=typeof e.region||!U.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(U.join(", ")));return function(e){var r,n=e.appId,i=e.apiKey,o=e.authMode,s=e.algoliaAgents,c=e.region,d=t(e,N),u=a(n,i,o),l=v(R(R({hosts:(r=c,[{url:"personalization.{region}.algolia.com".replace("{region}",r),accept:"readWrite",protocol:"https"}])},d),{},{algoliaAgent:y({algoliaAgents:s,client:"Personalization",version:"5.0.0-alpha.6"}),baseHeaders:R(R({"content-type":"text/plain"},u.headers()),d.baseHeaders),baseQueryParameters:R(R({},u.queryParameters()),d.baseQueryParameters)}));return{transporter:l,appId:n,clearCache:function(){return Promise.all([l.requestsCache.clear(),l.responsesCache.clear()]).then((function(){}))},get _ua(){return l.algoliaAgent.value},addAlgoliaAgent:function(e,r){l.algoliaAgent.add({segment:e,version:r})},del:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `del`.");var n={method:"DELETE",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},deleteUserProfile:function(e,r){var t=e.userToken;if(!t)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");var a={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},get:function(e,r){var t=e.path,a=e.parameters;if(!t)throw new Error("Parameter `path` is required when calling `get`.");var n={method:"GET",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{}};return l.request(n,r)},getPersonalizationStrategy:function(e){var r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return l.request(r,e)},getUserTokenProfile:function(e,r){var t=e.userToken;if(!t)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");var a={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(t)),queryParameters:{},headers:{}};return l.request(a,r)},post:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `post`.");var i={method:"POST",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},put:function(e,r){var t=e.path,a=e.parameters,n=e.body;if(!t)throw new Error("Parameter `path` is required when calling `put`.");var i={method:"PUT",path:"/1{path}".replace("{path}",t),queryParameters:a||{},headers:{},data:n||{}};return l.request(i,r)},setPersonalizationStrategy:function(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`.");var t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return l.request(t,r)}}}(J(J(J({},d),e.options),e))},initAbtesting:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e.region&&("string"!=typeof e.region||!E.includes(e.region)))throw new Error("`region` must be one of the following: ".concat(E.join(", ")));return S(J(J(J({},d),e.options),e))}})},e.apiClientVersion=Q}));
|
package/dist/builds/browser.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.6";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -15,9 +15,14 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
15
15
|
initPersonalization: (initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>) => PersonalizationClient;
|
|
16
16
|
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
|
|
17
17
|
transporter: import("@algolia/client-common").Transporter;
|
|
18
|
+
appId: string;
|
|
19
|
+
clearCache(): Promise<void>;
|
|
18
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
19
|
-
waitForTask({ indexName, taskID,
|
|
20
|
-
waitForApiKey({ operation, key, apiKey,
|
|
21
|
+
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
22
|
+
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
23
|
+
browseObjects<T>({ indexName, browseRequest, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
|
+
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
25
|
+
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
21
26
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
22
27
|
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
23
28
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -25,7 +30,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
25
30
|
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
|
|
26
31
|
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
27
32
|
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
28
|
-
browse<
|
|
33
|
+
browse<T_1>({ indexName, browseRequest }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_1>>;
|
|
29
34
|
clearAllSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearAllSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
30
35
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
31
36
|
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
@@ -38,12 +43,12 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
38
43
|
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
|
|
39
44
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
|
|
40
45
|
get({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").GetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
41
|
-
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/
|
|
46
|
+
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
42
47
|
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
|
|
43
48
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
44
49
|
getLogs({ offset, length, indexName, type }: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
|
|
45
50
|
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
|
|
46
|
-
getObjects<
|
|
51
|
+
getObjects<T_2>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_2>>;
|
|
47
52
|
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/rule").Rule>;
|
|
48
53
|
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
|
|
49
54
|
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
|
|
@@ -58,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
58
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
59
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
60
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
61
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
62
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
63
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
64
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -66,14 +71,14 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
66
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
67
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
68
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
69
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
70
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
71
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
72
|
-
search<
|
|
77
|
+
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
73
78
|
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
74
79
|
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
|
|
75
80
|
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
76
|
-
searchSingleIndex<
|
|
81
|
+
searchSingleIndex<T_4>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_4>>;
|
|
77
82
|
searchSynonyms({ indexName, type, page, hitsPerPage, searchSynonymsParams, }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
78
83
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
79
84
|
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../packages/algoliasearch/builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAavD,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EACV,MAAM,IAAI,qBAAqB,EAC/B,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AAOnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,kBAAsB,CAAC;AAEpD;;GAEG;AACH,oBAAY,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCAiCR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCA2CH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAxBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe
|
|
1
|
+
{"version":3,"file":"browser.d.ts","sourceRoot":"","sources":["../../../../packages/algoliasearch/builds/browser.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAavD,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EACV,MAAM,IAAI,qBAAqB,EAC/B,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AAOnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,kBAAsB,CAAC;AAEpD;;GAEG;AACH,oBAAY,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCAiCR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCA2CH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAxBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DnB"}
|
package/dist/builds/node.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { ClientOptions } from '@algolia/client-common';
|
|
|
4
4
|
import type { Region as PersonalizationRegion, PersonalizationClient } from '@algolia/client-personalization/src/personalizationClient';
|
|
5
5
|
import type { InitClientOptions, InitClientRegion } from './models';
|
|
6
6
|
export * from './models';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.6";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -15,9 +15,14 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
15
15
|
initPersonalization: (initOptions: InitClientOptions & Required<InitClientRegion<PersonalizationRegion>>) => PersonalizationClient;
|
|
16
16
|
initAbtesting: (initOptions?: InitClientOptions & InitClientRegion<AbtestingRegion>) => AbtestingClient;
|
|
17
17
|
transporter: import("@algolia/client-common").Transporter;
|
|
18
|
+
appId: string;
|
|
19
|
+
clearCache(): Promise<void>;
|
|
18
20
|
addAlgoliaAgent(segment: string, version?: string | undefined): void;
|
|
19
|
-
waitForTask({ indexName, taskID,
|
|
20
|
-
waitForApiKey({ operation, key, apiKey,
|
|
21
|
+
waitForTask({ indexName, taskID, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForTaskOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getTaskResponse").GetTaskResponse>;
|
|
22
|
+
waitForApiKey({ operation, key, apiKey, maxRetries, timeout, }: import("@algolia/client-search/model/clientMethodProps").WaitForApiKeyOptions, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-common").ApiError | import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
23
|
+
browseObjects<T>({ indexName, browseRequest, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
|
+
browseRules({ indexName, searchRulesParams, ...browseRulesOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
25
|
+
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
21
26
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
22
27
|
addOrUpdateObject({ indexName, objectID, body }: import("@algolia/client-search/model/clientMethodProps").AddOrUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
23
28
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -25,7 +30,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
25
30
|
batch({ indexName, batchWriteParams }: import("@algolia/client-search/model/clientMethodProps").BatchProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/batchResponse").BatchResponse>;
|
|
26
31
|
batchAssignUserIds({ xAlgoliaUserID, batchAssignUserIdsParams }: import("@algolia/client-search/model/clientMethodProps").BatchAssignUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
27
32
|
batchDictionaryEntries({ dictionaryName, batchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").BatchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
28
|
-
browse<
|
|
33
|
+
browse<T_1>({ indexName, browseRequest }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_1>>;
|
|
29
34
|
clearAllSynonyms({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearAllSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
30
35
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
31
36
|
clearRules({ indexName, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").ClearRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
@@ -38,12 +43,12 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
38
43
|
deleteSource({ source }: import("@algolia/client-search/model/clientMethodProps").DeleteSourceProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deleteSourceResponse").DeleteSourceResponse>;
|
|
39
44
|
deleteSynonym({ indexName, objectID, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").DeleteSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/deletedAtResponse").DeletedAtResponse>;
|
|
40
45
|
get({ path, parameters }: import("@algolia/client-search/model/clientMethodProps").GetProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
41
|
-
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/
|
|
46
|
+
getApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").GetApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getApiKeyResponse").GetApiKeyResponse>;
|
|
42
47
|
getDictionaryLanguages(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, import("@algolia/client-search/model/languages").Languages>>;
|
|
43
48
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
44
49
|
getLogs({ offset, length, indexName, type }: import("@algolia/client-search/model/clientMethodProps").GetLogsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getLogsResponse").GetLogsResponse>;
|
|
45
50
|
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
|
|
46
|
-
getObjects<
|
|
51
|
+
getObjects<T_2>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_2>>;
|
|
47
52
|
getRule({ indexName, objectID }: import("@algolia/client-search/model/clientMethodProps").GetRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/rule").Rule>;
|
|
48
53
|
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
|
|
49
54
|
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
|
|
@@ -58,7 +63,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
58
63
|
listUserIds({ page, hitsPerPage }: import("@algolia/client-search/model/clientMethodProps").ListUserIdsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/listUserIdsResponse").ListUserIdsResponse>;
|
|
59
64
|
multipleBatch(batchParams: import("@algolia/client-search/model/batchParams").BatchParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/multipleBatchResponse").MultipleBatchResponse>;
|
|
60
65
|
operationIndex({ indexName, operationIndexParams }: import("@algolia/client-search/model/clientMethodProps").OperationIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
61
|
-
partialUpdateObject({ indexName, objectID,
|
|
66
|
+
partialUpdateObject({ indexName, objectID, attributesToUpdate, createIfNotExists, }: import("@algolia/client-search/model/clientMethodProps").PartialUpdateObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtWithObjectIdResponse").UpdatedAtWithObjectIdResponse>;
|
|
62
67
|
post({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PostProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
63
68
|
put({ path, parameters, body }: import("@algolia/client-search/model/clientMethodProps").PutProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, any>>;
|
|
64
69
|
removeUserId({ userID }: import("@algolia/client-search/model/clientMethodProps").RemoveUserIdProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/removeUserIdResponse").RemoveUserIdResponse>;
|
|
@@ -66,14 +71,14 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
66
71
|
restoreApiKey({ key }: import("@algolia/client-search/model/clientMethodProps").RestoreApiKeyProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
67
72
|
saveObject({ indexName, body }: import("@algolia/client-search/model/clientMethodProps").SaveObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveObjectResponse").SaveObjectResponse>;
|
|
68
73
|
saveRule({ indexName, objectID, rule, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveRuleProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedRuleResponse").UpdatedRuleResponse>;
|
|
69
|
-
saveRules({ indexName,
|
|
74
|
+
saveRules({ indexName, rules, forwardToReplicas, clearExistingRules, }: import("@algolia/client-search/model/clientMethodProps").SaveRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
70
75
|
saveSynonym({ indexName, objectID, synonymHit, forwardToReplicas }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/saveSynonymResponse").SaveSynonymResponse>;
|
|
71
76
|
saveSynonyms({ indexName, synonymHit, forwardToReplicas, replaceExistingSynonyms, }: import("@algolia/client-search/model/clientMethodProps").SaveSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
72
|
-
search<
|
|
77
|
+
search<T_3>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponses").SearchResponses<T_3>>;
|
|
73
78
|
searchDictionaryEntries({ dictionaryName, searchDictionaryEntriesParams, }: import("@algolia/client-search/model/clientMethodProps").SearchDictionaryEntriesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
74
79
|
searchForFacetValues({ indexName, facetName, searchForFacetValuesRequest, }: import("@algolia/client-search/model/clientMethodProps").SearchForFacetValuesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse>;
|
|
75
80
|
searchRules({ indexName, searchRulesParams }: import("@algolia/client-search/model/clientMethodProps").SearchRulesProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchRulesResponse").SearchRulesResponse>;
|
|
76
|
-
searchSingleIndex<
|
|
81
|
+
searchSingleIndex<T_4>({ indexName, searchParams }: import("@algolia/client-search/model/clientMethodProps").SearchSingleIndexProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchResponse").SearchResponse<T_4>>;
|
|
77
82
|
searchSynonyms({ indexName, type, page, hitsPerPage, searchSynonymsParams, }: import("@algolia/client-search/model/clientMethodProps").SearchSynonymsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchSynonymsResponse").SearchSynonymsResponse>;
|
|
78
83
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
79
84
|
setDictionarySettings(dictionarySettingsParams: import("@algolia/client-search/model/dictionarySettingsParams").DictionarySettingsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../packages/algoliasearch/builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAYvD,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EACV,MAAM,IAAI,qBAAqB,EAC/B,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AAOnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,kBAAsB,CAAC;AAEpD;;GAEG;AACH,oBAAY,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCA2BR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCA2CH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAxBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../../packages/algoliasearch/builds/node.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAKvD,OAAO,KAAK,EACV,MAAM,IAAI,eAAe,EACzB,eAAe,EAChB,MAAM,+CAA+C,CAAC;AAYvD,OAAO,KAAK,EAEV,aAAa,EACd,MAAM,wBAAwB,CAAC;AAKhC,OAAO,KAAK,EACV,MAAM,IAAI,qBAAqB,EAC/B,qBAAqB,EACtB,MAAM,2DAA2D,CAAC;AAOnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEpE,cAAc,UAAU,CAAC;AAEzB,eAAO,MAAM,gBAAgB,kBAAsB,CAAC;AAEpD;;GAEG;AACH,oBAAY,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AAG7D,wBAAgB,aAAa,CAC3B,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,OAAO,CAAC,EAAE,aAAa;;kCA2BR,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;uCA2CH,iBAAiB,GAC5B,SAAS,iBAAiB,qBAAqB,CAAC,CAAC,KAClD,qBAAqB;kCAxBT,iBAAiB,GAAG,iBAAiB,eAAe,CAAC,KACjE,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2DnB"}
|
|
@@ -4,13 +4,21 @@ import type { ABTestResponse } from '../model/aBTestResponse';
|
|
|
4
4
|
import type { AddABTestsRequest } from '../model/addABTestsRequest';
|
|
5
5
|
import type { DelProps, DeleteABTestProps, GetProps, GetABTestProps, ListABTestsProps, PostProps, PutProps, StopABTestProps } from '../model/clientMethodProps';
|
|
6
6
|
import type { ListABTestsResponse } from '../model/listABTestsResponse';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.6";
|
|
8
8
|
export declare const REGIONS: readonly ["de", "us"];
|
|
9
9
|
export declare type Region = typeof REGIONS[number];
|
|
10
10
|
export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
11
11
|
region?: Region;
|
|
12
12
|
}): {
|
|
13
13
|
transporter: import("@algolia/client-common").Transporter;
|
|
14
|
+
/**
|
|
15
|
+
* The `appId` currently in use.
|
|
16
|
+
*/
|
|
17
|
+
appId: string;
|
|
18
|
+
/**
|
|
19
|
+
* Clears the cache of the transporter for the `requestsCache` and `responsesCache` properties.
|
|
20
|
+
*/
|
|
21
|
+
clearCache(): Promise<void>;
|
|
14
22
|
/**
|
|
15
23
|
* Get the value of the `algoliaAgent`, used by our libraries internally and telemetry system.
|
|
16
24
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abtestingClient.d.ts","sourceRoot":"","sources":["../../../../../packages/client-abtesting/src/abtestingClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAW5C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;
|
|
1
|
+
{"version":3,"file":"abtestingClient.d.ts","sourceRoot":"","sources":["../../../../../packages/client-abtesting/src/abtestingClient.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEf,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EACV,QAAQ,EACR,iBAAiB,EACjB,QAAQ,EACR,cAAc,EACd,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACR,eAAe,EAChB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,eAAO,MAAM,gBAAgB,kBAAkB,CAAC;AAEhD,eAAO,MAAM,OAAO,uBAAwB,CAAC;AAC7C,oBAAY,MAAM,GAAG,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC;AAW5C,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EAAE,WAAW,EAClB,MAAM,EAAE,YAAY,EACpB,QAAQ,EACR,aAAa,EACb,MAAM,EAAE,YAAY,EACpB,GAAG,OAAO,EACX,EAAE,mBAAmB,GAAG;IAAE,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE;;IAwBxC;;OAEG;;IAGH;;OAEG;kBACW,QAAQ,IAAI,CAAC;IAO3B;;OAEG;;IAKH;;;;;OAKG;6BACsB,MAAM,YAAY,MAAM,GAAG,IAAI;IAIxD;;;;;;OAMG;kCAEkB,iBAAiB,mBACnB,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAsC1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;yBAEO,iBAAiB,mBACR,cAAc,GAC9B,QAAQ,cAAc,CAAC;IAwB1B;;;;;;;;OAQG;8BAEqB,QAAQ,mBACb,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAmB/B;;;;;;;OAOG;sBAEO,cAAc,mBACL,cAAc,GAC9B,QAAQ,MAAM,CAAC;IAsBlB;;;;;;;;OAQG;mCAEkB,gBAAgB,mBAClB,cAAc,GAC9B,QAAQ,mBAAmB,CAAC;IAuB/B;;;;;;;;;OASG;qCAE2B,SAAS,mBACpB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;;;OASG;oCAE2B,QAAQ,mBACnB,cAAc,GAC9B,QAAQ,OAAO,MAAM,EAAE,GAAG,CAAC,CAAC;IAoB/B;;;;;;;OAOG;uBAEO,eAAe,mBACN,cAAc,GAC9B,QAAQ,cAAc,CAAC;EAwB7B;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC"}
|