algoliasearch 5.0.0-alpha.86 → 5.0.0-alpha.88
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.cjs +26 -4
- package/dist/algoliasearch.esm.browser.js +26 -4
- package/dist/algoliasearch.esm.node.js +26 -4
- package/dist/algoliasearch.umd.js +2 -2
- package/dist/builds/browser.d.ts +10 -4
- package/dist/builds/browser.d.ts.map +1 -1
- package/dist/builds/node.d.ts +10 -4
- package/dist/builds/node.d.ts.map +1 -1
- package/dist/client-abtesting/model/aBTest.d.ts +18 -2
- package/dist/client-abtesting/model/aBTest.d.ts.map +1 -1
- package/dist/client-abtesting/model/currenciesValue.d.ts +19 -0
- package/dist/client-abtesting/model/currenciesValue.d.ts.map +1 -0
- package/dist/client-abtesting/model/filterEffects.d.ts +10 -0
- package/dist/client-abtesting/model/filterEffects.d.ts.map +1 -0
- package/dist/client-abtesting/model/filterEffectsEmptySearch.d.ts +14 -0
- package/dist/client-abtesting/model/filterEffectsEmptySearch.d.ts.map +1 -0
- package/dist/client-abtesting/model/filterEffectsOutliers.d.ts +14 -0
- package/dist/client-abtesting/model/filterEffectsOutliers.d.ts.map +1 -0
- package/dist/client-abtesting/model/index.d.ts +4 -0
- package/dist/client-abtesting/model/index.d.ts.map +1 -1
- package/dist/client-abtesting/model/variant.d.ts +19 -4
- package/dist/client-abtesting/model/variant.d.ts.map +1 -1
- package/dist/client-abtesting/src/abtestingClient.d.ts +1 -1
- package/dist/client-analytics/src/analyticsClient.d.ts +1 -1
- package/dist/client-personalization/src/personalizationClient.d.ts +1 -1
- package/dist/client-search/src/searchClient.d.ts +26 -4
- package/dist/client-search/src/searchClient.d.ts.map +1 -1
- package/dist/lite/lite.cjs +1 -1
- package/dist/lite/lite.esm.browser.js +1 -1
- package/dist/lite/lite.esm.node.js +1 -1
- package/dist/lite/lite.umd.js +2 -2
- package/dist/lite/src/liteClient.d.ts +1 -1
- package/lite/src/liteClient.ts +1 -1
- package/package.json +9 -9
package/dist/algoliasearch.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
7
|
+
const apiClientVersion$4 = '5.0.0-alpha.88';
|
|
8
8
|
const REGIONS$2 = ['de', 'us'];
|
|
9
9
|
function getDefaultHosts$3(region) {
|
|
10
10
|
const url = !region
|
|
@@ -303,7 +303,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
306
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
306
|
+
const apiClientVersion$3 = '5.0.0-alpha.88';
|
|
307
307
|
const REGIONS$1 = ['de', 'us'];
|
|
308
308
|
function getDefaultHosts$2(region) {
|
|
309
309
|
const url = !region
|
|
@@ -1200,7 +1200,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1200
1200
|
}
|
|
1201
1201
|
|
|
1202
1202
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1203
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1203
|
+
const apiClientVersion$2 = '5.0.0-alpha.88';
|
|
1204
1204
|
const REGIONS = ['eu', 'us'];
|
|
1205
1205
|
function getDefaultHosts$1(region) {
|
|
1206
1206
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1457,7 +1457,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1457
1457
|
}
|
|
1458
1458
|
|
|
1459
1459
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1460
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1460
|
+
const apiClientVersion$1 = '5.0.0-alpha.88';
|
|
1461
1461
|
function getDefaultHosts(appId) {
|
|
1462
1462
|
return [
|
|
1463
1463
|
{
|
|
@@ -1703,6 +1703,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1703
1703
|
...browseSynonymsOptions,
|
|
1704
1704
|
});
|
|
1705
1705
|
},
|
|
1706
|
+
/**
|
|
1707
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
1708
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
1709
|
+
*
|
|
1710
|
+
* @summary Search multiple indices for `hits`.
|
|
1711
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
1712
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1713
|
+
*/
|
|
1714
|
+
searchForHits(searchMethodParams, requestOptions) {
|
|
1715
|
+
return this.search(searchMethodParams, requestOptions);
|
|
1716
|
+
},
|
|
1717
|
+
/**
|
|
1718
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
1719
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
1720
|
+
*
|
|
1721
|
+
* @summary Search multiple indices for `facets`.
|
|
1722
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
1723
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1724
|
+
*/
|
|
1725
|
+
searchForFacets(searchMethodParams, requestOptions) {
|
|
1726
|
+
return this.search(searchMethodParams, requestOptions);
|
|
1727
|
+
},
|
|
1706
1728
|
/**
|
|
1707
1729
|
* Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
|
1708
1730
|
*
|
|
@@ -661,7 +661,7 @@ const DEFAULT_READ_TIMEOUT_BROWSER = 2000;
|
|
|
661
661
|
const DEFAULT_WRITE_TIMEOUT_BROWSER = 30000;
|
|
662
662
|
|
|
663
663
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
664
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
664
|
+
const apiClientVersion$4 = '5.0.0-alpha.88';
|
|
665
665
|
const REGIONS$2 = ['de', 'us'];
|
|
666
666
|
function getDefaultHosts$3(region) {
|
|
667
667
|
const url = !region
|
|
@@ -960,7 +960,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
960
960
|
}
|
|
961
961
|
|
|
962
962
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
963
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
963
|
+
const apiClientVersion$3 = '5.0.0-alpha.88';
|
|
964
964
|
const REGIONS$1 = ['de', 'us'];
|
|
965
965
|
function getDefaultHosts$2(region) {
|
|
966
966
|
const url = !region
|
|
@@ -1857,7 +1857,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1857
1857
|
}
|
|
1858
1858
|
|
|
1859
1859
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1860
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1860
|
+
const apiClientVersion$2 = '5.0.0-alpha.88';
|
|
1861
1861
|
const REGIONS = ['eu', 'us'];
|
|
1862
1862
|
function getDefaultHosts$1(region) {
|
|
1863
1863
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -2114,7 +2114,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
2114
2114
|
}
|
|
2115
2115
|
|
|
2116
2116
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
2117
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
2117
|
+
const apiClientVersion$1 = '5.0.0-alpha.88';
|
|
2118
2118
|
function getDefaultHosts(appId) {
|
|
2119
2119
|
return [
|
|
2120
2120
|
{
|
|
@@ -2360,6 +2360,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
2360
2360
|
...browseSynonymsOptions,
|
|
2361
2361
|
});
|
|
2362
2362
|
},
|
|
2363
|
+
/**
|
|
2364
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
2365
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
2366
|
+
*
|
|
2367
|
+
* @summary Search multiple indices for `hits`.
|
|
2368
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
2369
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2370
|
+
*/
|
|
2371
|
+
searchForHits(searchMethodParams, requestOptions) {
|
|
2372
|
+
return this.search(searchMethodParams, requestOptions);
|
|
2373
|
+
},
|
|
2374
|
+
/**
|
|
2375
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
2376
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
2377
|
+
*
|
|
2378
|
+
* @summary Search multiple indices for `facets`.
|
|
2379
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
2380
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
2381
|
+
*/
|
|
2382
|
+
searchForFacets(searchMethodParams, requestOptions) {
|
|
2383
|
+
return this.search(searchMethodParams, requestOptions);
|
|
2384
|
+
},
|
|
2363
2385
|
/**
|
|
2364
2386
|
* Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
|
2365
2387
|
*
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, createIterablePromise,
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
5
|
-
const apiClientVersion$4 = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion$4 = '5.0.0-alpha.88';
|
|
6
6
|
const REGIONS$2 = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts$3(region) {
|
|
8
8
|
const url = !region
|
|
@@ -301,7 +301,7 @@ function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
301
301
|
}
|
|
302
302
|
|
|
303
303
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
304
|
-
const apiClientVersion$3 = '5.0.0-alpha.
|
|
304
|
+
const apiClientVersion$3 = '5.0.0-alpha.88';
|
|
305
305
|
const REGIONS$1 = ['de', 'us'];
|
|
306
306
|
function getDefaultHosts$2(region) {
|
|
307
307
|
const url = !region
|
|
@@ -1198,7 +1198,7 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
1200
1200
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1201
|
-
const apiClientVersion$2 = '5.0.0-alpha.
|
|
1201
|
+
const apiClientVersion$2 = '5.0.0-alpha.88';
|
|
1202
1202
|
const REGIONS = ['eu', 'us'];
|
|
1203
1203
|
function getDefaultHosts$1(region) {
|
|
1204
1204
|
const url = 'personalization.{region}.algolia.com'.replace('{region}', region);
|
|
@@ -1455,7 +1455,7 @@ function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption,
|
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
1457
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
1458
|
-
const apiClientVersion$1 = '5.0.0-alpha.
|
|
1458
|
+
const apiClientVersion$1 = '5.0.0-alpha.88';
|
|
1459
1459
|
function getDefaultHosts(appId) {
|
|
1460
1460
|
return [
|
|
1461
1461
|
{
|
|
@@ -1701,6 +1701,28 @@ function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode
|
|
|
1701
1701
|
...browseSynonymsOptions,
|
|
1702
1702
|
});
|
|
1703
1703
|
},
|
|
1704
|
+
/**
|
|
1705
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
1706
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
1707
|
+
*
|
|
1708
|
+
* @summary Search multiple indices for `hits`.
|
|
1709
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
1710
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1711
|
+
*/
|
|
1712
|
+
searchForHits(searchMethodParams, requestOptions) {
|
|
1713
|
+
return this.search(searchMethodParams, requestOptions);
|
|
1714
|
+
},
|
|
1715
|
+
/**
|
|
1716
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
1717
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
1718
|
+
*
|
|
1719
|
+
* @summary Search multiple indices for `facets`.
|
|
1720
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
1721
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1722
|
+
*/
|
|
1723
|
+
searchForFacets(searchMethodParams, requestOptions) {
|
|
1724
|
+
return this.search(searchMethodParams, requestOptions);
|
|
1725
|
+
},
|
|
1704
1726
|
/**
|
|
1705
1727
|
* Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
|
1706
1728
|
*
|
|
@@ -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="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=i=>new Promise(((o,d)=>{e(i).then((e=>(t&&t(e),r(e)?o(e):a&&a.validate(e)?d(new Error(a.message(e))):setTimeout((()=>{s(e).then(o).catch(d)}),n())))).catch((e=>{d(e)}))}));return s()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}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 s=n();return s[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(s)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,s={miss:()=>Promise.resolve()})=>t.get(e,a,s).catch((()=>n({caches:r}).get(e,a,s))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function s(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(t);if(s in r)return Promise.resolve(e.serializable?JSON.parse(r[s]):r[s]);const i=a();return i.then((e=>n.miss(e))).then((()=>i))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const i=12e4;function o(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>i},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=i}}}function d(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class c extends Error{constructor(e,r){super(e),d(this,"name","AlgoliaError"),r&&(this.name=r)}}class h extends c{constructor(e,r,t){super(e,t),d(this,"stackTrace",void 0),this.stackTrace=r}}class l extends h{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class u extends h{constructor(e,r,t,a="ApiError"){super(e,t,a),d(this,"status",void 0),this.status=r}}class m extends c{constructor(e,r){super(e,"DeserializationError"),d(this,"response",void 0),this.response=r}}class g extends u{constructor(e,r,t,a){super(e,r,a,"DetailedApiError"),d(this,"error",void 0),this.error=t}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${encodeURIComponent(r(e[t])?JSON.stringify(e[t]):e[t])}`)).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 P({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:i,requestsCache:d,responsesCache:c}){async function h(d,c,h=!0){const P=[],y=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(d,c),q=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,d.headers,c.headers),f="GET"===d.method?{...d.data,...c.data}:{},x={...a,...d.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?x[e]=c.queryParameters[e].toString():x[e]=c.queryParameters[e];let E=0;const S=async(e,t)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>w(e)))}(P));let n=c.timeout;void 0===n&&(n=h?s.read:s.write);const f={data:y,headers:q,method:d.method,url:p(a,d.path,x),connectTimeout:t(E,s.connect),responseTimeout:t(E,n)},v=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return P.push(t),t},b=await i.send(f);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)}(b)){const n=v(b);return b.isTimedOut&&E++,console.log("Retryable failure",w(n)),await r.set(a,o(a,b.isTimedOut?"timed out":"down")),S(e,t)}if(function({status:e}){return 2==~~(e/100)}(b))return function(e){try{return JSON.parse(e.content)}catch(r){throw new m(r.message,e)}}(b);throw v(b),function({content:e,status:r},t){try{const a=JSON.parse(e);return"error"in a?new g(a.message,r,a.error,t):new u(a.message,r,t)}catch(e){}return new u(e,r,t)}(b,P)},v=e.filter((e=>"readWrite"===e.accept||(h?"read"===e.accept:"write"===e.accept))),b=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(o(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(v);return S([...b.hosts].reverse(),b.getTimeout)}return{hostsCache:r,requester:i,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return h(e,r,n);const s=()=>h(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const i={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return c.get(i,(()=>d.get(i,(()=>d.set(i,s()).then((e=>Promise.all([d.delete(i),e])),(e=>Promise.all([d.delete(i),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>c.set(i,e)})},requestsCache:d,responsesCache:c}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const q="5.0.0-alpha.86",f=["de","us"];const x="5.0.0-alpha.86",E=["de","us"];const S="5.0.0-alpha.86",v=["eu","us"];const b="5.0.0-alpha.86";function T(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function I({appId:e,apiKey:a,authMode:n,algoliaAgents:s,...i}){const o=r(e,a,n),d=P({hosts:T(e),...i,algoliaAgent:y({algoliaAgents:s,client:"Search",version:b}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:r,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let i=0;return t({func:()=>this.getTask({indexName:e,taskID:r},s),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=a,message:()=>`The maximum number of retries exceeded. (${i}/${a})`},timeout:()=>n(i)})},waitForApiKey({operation:e,key:r,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},i){let o=0;const d={aggregator:()=>o+=1,error:{validate:()=>o>=n,message:()=>`The maximum number of retries exceeded. (${o}/${n})`},timeout:()=>s(o)};if("update"===e){if(!a)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t({...d,func:()=>this.getApiKey({key:r},i),validate:e=>{for(const r of Object.keys(a)){const t=a[r],n=e[r];if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length||t.some(((e,r)=>e!==n[r])))return!1}else if(t!==n)return!1}return!0}})}return t({...d,func:()=>this.getApiKey({key:r},i).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:r,...a},n){return t({func:t=>this.browse({indexName:e,browseParams:{cursor:t?t.cursor:void 0,...r}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:r,...a},n){const s={hitsPerPage:1e3,...r};return t({func:r=>this.searchRules({indexName:e,searchRulesParams:{...s,page:r?r.page+1:s.page||0}},n),validate:e=>e.nbHits<s.hitsPerPage,...a})},browseSynonyms({indexName:e,validate:r,aggregator:a,...n},s){const i={hitsPerPage:1e3,...n};return t({func:r=>this.searchSynonyms({...i,indexName:e,page:r?r.page+1:n.page||0},s),validate:e=>e.nbHits<i.hitsPerPage,...n})},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return d.request(t,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const n={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return d.request(n,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return d.request(t,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return d.request(n,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const a={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return d.request(n,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");const a={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return d.request(a,t)},clearAllSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");const a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const t={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const t={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const a={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const t={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const a={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const n="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");const t={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const n="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");const t={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return d.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return d.request(r,e)},getLogs({offset:e,length:r,indexName:t,type:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.length=r.toString()),void 0!==t&&(s.indexName=t.toString()),void 0!==a&&(s.type=a.toString());const i={method:"GET",path:"/1/logs",queryParameters:s,headers:{}};return d.request(i,n)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");const n="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.attributesToRetrieve=t.toString());const i={method:"GET",path:n,queryParameters:s,headers:{}};return d.request(i,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");const a={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const t={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return d.request(r,e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const a={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const a={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return d.request(r,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");const t={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},hasPendingMappings({getClusters:e}={},r=void 0){const t={};void 0!==e&&(t.getClusters=e.toString());const a={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return d.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return d.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return d.request(r,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return d.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return d.request(n,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return d.request(t,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.createIfNotExists=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const t={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");const t={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return d.request(t,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const t={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");const a={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");const s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");const s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.clearExistingRules=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.replaceExistingSynonyms=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},search(e,r){if(e&&Array.isArray(e)){const r={requests:e.map((({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const t={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const n={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return d.request(n,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const a={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSynonyms({indexName:e,type:r,page:t,hitsPerPage:a,searchSynonymsParams:n},s){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const i="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),o={};void 0!==r&&(o.type=r.toString()),void 0!==t&&(o.page=t.toString()),void 0!==a&&(o.hitsPerPage=a.toString());const c={method:"POST",path:i,queryParameters:o,headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return d.request(c,s)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return d.request(t,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const n="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"PUT",path:n,queryParameters:s,headers:{},data:r};return d.request(i,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const a={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)}}}const D=b;e.algoliasearch=function(e,t,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const o={apiKey:t,appId:e,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(s),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(s),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:n({caches:[a({key:`${D}-${e}`}),s()]}),...i};return{...I(o),get _ua(){return this.transporter.algoliaAgent.value},initAnalytics:function(e={}){if(e.region&&("string"!=typeof e.region||!E.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${E.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return d.request(i,n)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return d.request(i,n)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return d.request(i,n)},getConversationRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getConversationRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:o,headers:{}};return d.request(c,i)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:o,headers:{}};return d.request(c,i)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const t={};void 0!==e&&(t.index=e.toString());const a={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return d.request(a,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:o,headers:{}};return d.request(c,i)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const h={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return d.request(h,o)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:n,limit:s,offset:i,tags:o},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const h="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==r&&(l.index=r.toString()),void 0!==t&&(l.search=t.toString()),void 0!==a&&(l.startDate=a.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==i&&(l.offset=i.toString()),void 0!==o&&(l.tags=o.toString());const u={method:"GET",path:h,queryParameters:l,headers:{}};return d.request(u,c)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const h={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return d.request(h,o)},getTopHits({index:e,search:r,clickAnalytics:t,startDate:a,endDate:n,limit:s,offset:i,tags:o},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.search=r.toString()),void 0!==t&&(h.clickAnalytics=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==n&&(h.endDate=n.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==i&&(h.offset=i.toString()),void 0!==o&&(h.tags=o.toString());const l={method:"GET",path:"/2/hits",queryParameters:h,headers:{}};return d.request(l,c)},getTopSearches({index:e,clickAnalytics:r,startDate:t,endDate:a,orderBy:n,direction:s,limit:i,offset:o,tags:c},h){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==t&&(l.startDate=t.toString()),void 0!==a&&(l.endDate=a.toString()),void 0!==n&&(l.orderBy=n.toString()),void 0!==s&&(l.direction=s.toString()),void 0!==i&&(l.limit=i.toString()),void 0!==o&&(l.offset=o.toString()),void 0!==c&&(l.tags=c.toString());const u={method:"GET",path:"/2/searches",queryParameters:l,headers:{}};return d.request(u,h)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return d.request(i,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)}}}({...o,...e.options,...e})},initPersonalization:function(e){if(!e.region||e.region&&("string"!=typeof e.region||!v.includes(e.region)))throw new Error(`\`region\` is required and must be one of the following: ${v.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:"personalization.{region}.algolia.com".replace("{region}",c),accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Personalization",version:S}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const t={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getPersonalizationStrategy(e){const r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return d.request(r,e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const t={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return d.request(t,r)}}}({...o,...e.options,...e})},initAbtesting:function(e={}){if(e.region&&("string"!=typeof e.region||!f.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${f.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Abtesting",version:q}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return d.request(t,r)},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const t={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const t={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.limit=r.toString()),void 0!==t&&(s.indexPrefix=t.toString()),void 0!==a&&(s.indexSuffix=a.toString());const i={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return d.request(i,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const t={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)}}}({...o,...e.options,...e})}}},e.apiClientVersion=D}));
|
|
1
|
+
/*! algoliasearch.umd.js | 5.0.0-alpha.88 | © 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="WithinHeaders"){const a={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===t?a:{},queryParameters:()=>"WithinQueryParameters"===t?a:{}}}function t({func:e,validate:r,aggregator:t,error:a,timeout:n=(()=>0)}){const s=i=>new Promise(((o,d)=>{e(i).then((e=>(t&&t(e),r(e)?o(e):a&&a.validate(e)?d(new Error(a.message(e))):setTimeout((()=>{s(e).then(o).catch(d)}),n())))).catch((e=>{d(e)}))}));return s()}function a(e){let r;const t=`algolia-client-js-${e.key}`;function a(){return void 0===r&&(r=e.localStorage||window.localStorage),r}function n(){return JSON.parse(a().getItem(t)||"{}")}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 s=n();return s[JSON.stringify(e)]=r,a().setItem(t,JSON.stringify(s)),r})),delete:e=>Promise.resolve().then((()=>{const r=n();delete r[JSON.stringify(e)],a().setItem(t,JSON.stringify(r))})),clear:()=>Promise.resolve().then((()=>{a().removeItem(t)}))}}function n(e){const r=[...e.caches],t=r.shift();return void 0===t?{get:(e,r,t={miss:()=>Promise.resolve()})=>r().then((e=>Promise.all([e,t.miss(e)]))).then((([e])=>e)),set:(e,r)=>Promise.resolve(r),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,s={miss:()=>Promise.resolve()})=>t.get(e,a,s).catch((()=>n({caches:r}).get(e,a,s))),set:(e,a)=>t.set(e,a).catch((()=>n({caches:r}).set(e,a))),delete:e=>t.delete(e).catch((()=>n({caches:r}).delete(e))),clear:()=>t.clear().catch((()=>n({caches:r}).clear()))}}function s(e={serializable:!0}){let r={};return{get(t,a,n={miss:()=>Promise.resolve()}){const s=JSON.stringify(t);if(s in r)return Promise.resolve(e.serializable?JSON.parse(r[s]):r[s]);const i=a();return i.then((e=>n.miss(e))).then((()=>i))},set:(t,a)=>(r[JSON.stringify(t)]=e.serializable?JSON.stringify(a):a,Promise.resolve(a)),delete:e=>(delete r[JSON.stringify(e)],Promise.resolve()),clear:()=>(r={},Promise.resolve())}}const i=12e4;function o(e,r="up"){const t=Date.now();return{...e,status:r,lastUpdate:t,isUp:function(){return"up"===r||Date.now()-t>i},isTimedOut:function(){return"timed out"===r&&Date.now()-t<=i}}}function d(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,r||"default");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:String(r)}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}class c extends Error{constructor(e,r){super(e),d(this,"name","AlgoliaError"),r&&(this.name=r)}}class h extends c{constructor(e,r,t){super(e,t),d(this,"stackTrace",void 0),this.stackTrace=r}}class l extends h{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class u extends h{constructor(e,r,t,a="ApiError"){super(e,t,a),d(this,"status",void 0),this.status=r}}class m extends c{constructor(e,r){super(e,"DeserializationError"),d(this,"response",void 0),this.response=r}}class g extends u{constructor(e,r,t,a){super(e,r,a,"DetailedApiError"),d(this,"error",void 0),this.error=t}}function p(e,r,t){const a=function(e){const r=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((t=>`${t}=${encodeURIComponent(r(e[t])?JSON.stringify(e[t]):e[t])}`)).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 P({hosts:e,hostsCache:r,baseHeaders:t,baseQueryParameters:a,algoliaAgent:n,timeouts:s,requester:i,requestsCache:d,responsesCache:c}){async function h(d,c,h=!0){const P=[],y=function(e,r){if("GET"===e.method||void 0===e.data&&void 0===r.data)return;const t=Array.isArray(e.data)?e.data:{...e.data,...r.data};return JSON.stringify(t)}(d,c),q=function(e,r,t){const a={Accept:"application/json",...e,...r,...t},n={};return Object.keys(a).forEach((e=>{const r=a[e];n[e.toLowerCase()]=r})),n}(t,d.headers,c.headers),f="GET"===d.method?{...d.data,...c.data}:{},x={...a,...d.queryParameters,...f};if(n.value&&(x["x-algolia-agent"]=n.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?x[e]=c.queryParameters[e].toString():x[e]=c.queryParameters[e];let E=0;const S=async(e,t)=>{const a=e.pop();if(void 0===a)throw new l(function(e){return e.map((e=>w(e)))}(P));let n=c.timeout;void 0===n&&(n=h?s.read:s.write);const f={data:y,headers:q,method:d.method,url:p(a,d.path,x),connectTimeout:t(E,s.connect),responseTimeout:t(E,n)},v=r=>{const t={request:f,response:r,host:a,triesLeft:e.length};return P.push(t),t},b=await i.send(f);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)}(b)){const n=v(b);return b.isTimedOut&&E++,console.log("Retryable failure",w(n)),await r.set(a,o(a,b.isTimedOut?"timed out":"down")),S(e,t)}if(function({status:e}){return 2==~~(e/100)}(b))return function(e){try{return JSON.parse(e.content)}catch(r){throw new m(r.message,e)}}(b);throw v(b),function({content:e,status:r},t){try{const a=JSON.parse(e);return"error"in a?new g(a.message,r,a.error,t):new u(a.message,r,t)}catch(e){}return new u(e,r,t)}(b,P)},v=e.filter((e=>"readWrite"===e.accept||(h?"read"===e.accept:"write"===e.accept))),b=await async function(e){const t=await Promise.all(e.map((e=>r.get(e,(()=>Promise.resolve(o(e))))))),a=t.filter((e=>e.isUp())),n=t.filter((e=>e.isTimedOut())),s=[...a,...n];return{hosts:s.length>0?s:e,getTimeout:(e,r)=>(0===n.length&&0===e?1:n.length+3+e)*r}}(v);return S([...b.hosts].reverse(),b.getTimeout)}return{hostsCache:r,requester:i,timeouts:s,algoliaAgent:n,baseHeaders:t,baseQueryParameters:a,hosts:e,request:function(e,r={}){const n=e.useReadTransporter||"GET"===e.method;if(!n)return h(e,r,n);const s=()=>h(e,r);if(!0!==(r.cacheable||e.cacheable))return s();const i={request:e,requestOptions:r,transporter:{queryParameters:a,headers:t}};return c.get(i,(()=>d.get(i,(()=>d.set(i,s()).then((e=>Promise.all([d.delete(i),e])),(e=>Promise.all([d.delete(i),Promise.reject(e)]))).then((([e,r])=>r))))),{miss:e=>c.set(i,e)})},requestsCache:d,responsesCache:c}}function y({algoliaAgents:e,client:r,version:t}){const a=function(e){const r={value:`Algolia for JavaScript (${e})`,add(e){const t=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===r.value.indexOf(t)&&(r.value=`${r.value}${t}`),r}};return r}(t).add({segment:r,version:t});return e.forEach((e=>a.add(e))),a}const q="5.0.0-alpha.88",f=["de","us"];const x="5.0.0-alpha.88",E=["de","us"];const S="5.0.0-alpha.88",v=["eu","us"];const b="5.0.0-alpha.88";function T(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const r=e;for(let t=e.length-1;t>0;t--){const a=Math.floor(Math.random()*(t+1)),n=e[t];r[t]=e[a],r[a]=n}return r}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}function I({appId:e,apiKey:a,authMode:n,algoliaAgents:s,...i}){const o=r(e,a,n),d=P({hosts:T(e),...i,algoliaAgent:y({algoliaAgents:s,client:"Search",version:b}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},waitForTask({indexName:e,taskID:r,maxRetries:a=50,timeout:n=(e=>Math.min(200*e,5e3))},s){let i=0;return t({func:()=>this.getTask({indexName:e,taskID:r},s),validate:e=>"published"===e.status,aggregator:()=>i+=1,error:{validate:()=>i>=a,message:()=>`The maximum number of retries exceeded. (${i}/${a})`},timeout:()=>n(i)})},waitForApiKey({operation:e,key:r,apiKey:a,maxRetries:n=50,timeout:s=(e=>Math.min(200*e,5e3))},i){let o=0;const d={aggregator:()=>o+=1,error:{validate:()=>o>=n,message:()=>`The maximum number of retries exceeded. (${o}/${n})`},timeout:()=>s(o)};if("update"===e){if(!a)throw new Error("`apiKey` is required when waiting for an `update` operation.");return t({...d,func:()=>this.getApiKey({key:r},i),validate:e=>{for(const r of Object.keys(a)){const t=a[r],n=e[r];if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length||t.some(((e,r)=>e!==n[r])))return!1}else if(t!==n)return!1}return!0}})}return t({...d,func:()=>this.getApiKey({key:r},i).catch((e=>e)),validate:r=>"add"===e?404!==r.status:404===r.status})},browseObjects({indexName:e,browseParams:r,...a},n){return t({func:t=>this.browse({indexName:e,browseParams:{cursor:t?t.cursor:void 0,...r}},n),validate:e=>void 0===e.cursor,...a})},browseRules({indexName:e,searchRulesParams:r,...a},n){const s={hitsPerPage:1e3,...r};return t({func:r=>this.searchRules({indexName:e,searchRulesParams:{...s,page:r?r.page+1:s.page||0}},n),validate:e=>e.nbHits<s.hitsPerPage,...a})},browseSynonyms({indexName:e,validate:r,aggregator:a,...n},s){const i={hitsPerPage:1e3,...n};return t({func:r=>this.searchSynonyms({...i,indexName:e,page:r?r.page+1:n.page||0},s),validate:e=>e.nbHits<i.hitsPerPage,...n})},searchForHits(e,r){return this.search(e,r)},searchForFacets(e,r){return this.search(e,r)},addApiKey(e,r){if(!e)throw new Error("Parameter `apiKey` is required when calling `addApiKey`.");if(!e.acl)throw new Error("Parameter `apiKey.acl` is required when calling `addApiKey`.");const t={method:"POST",path:"/1/keys",queryParameters:{},headers:{},data:e};return d.request(t,r)},addOrUpdateObject({indexName:e,objectID:r,body:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `addOrUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `addOrUpdateObject`.");if(!t)throw new Error("Parameter `body` is required when calling `addOrUpdateObject`.");const n={method:"PUT",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t};return d.request(n,a)},appendSource(e,r){if(!e)throw new Error("Parameter `source` is required when calling `appendSource`.");if(!e.source)throw new Error("Parameter `source.source` is required when calling `appendSource`.");const t={method:"POST",path:"/1/security/sources/append",queryParameters:{},headers:{},data:e};return d.request(t,r)},assignUserId({xAlgoliaUserID:e,assignUserIdParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `assignUserId`.");if(!r)throw new Error("Parameter `assignUserIdParams` is required when calling `assignUserId`.");if(!r.cluster)throw new Error("Parameter `assignUserIdParams.cluster` is required when calling `assignUserId`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping",queryParameters:{},headers:a,data:r};return d.request(n,t)},batch({indexName:e,batchWriteParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `batch`.");if(!r)throw new Error("Parameter `batchWriteParams` is required when calling `batch`.");if(!r.requests)throw new Error("Parameter `batchWriteParams.requests` is required when calling `batch`.");const a={method:"POST",path:"/1/indexes/{indexName}/batch".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},batchAssignUserIds({xAlgoliaUserID:e,batchAssignUserIdsParams:r},t){if(!e)throw new Error("Parameter `xAlgoliaUserID` is required when calling `batchAssignUserIds`.");if(!r)throw new Error("Parameter `batchAssignUserIdsParams` is required when calling `batchAssignUserIds`.");if(!r.cluster)throw new Error("Parameter `batchAssignUserIdsParams.cluster` is required when calling `batchAssignUserIds`.");if(!r.users)throw new Error("Parameter `batchAssignUserIdsParams.users` is required when calling `batchAssignUserIds`.");const a={};void 0!==e&&(a["X-Algolia-User-ID"]=e.toString());const n={method:"POST",path:"/1/clusters/mapping/batch",queryParameters:{},headers:a,data:r};return d.request(n,t)},batchDictionaryEntries({dictionaryName:e,batchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `batchDictionaryEntries`.");if(!r)throw new Error("Parameter `batchDictionaryEntriesParams` is required when calling `batchDictionaryEntries`.");if(!r.requests)throw new Error("Parameter `batchDictionaryEntriesParams.requests` is required when calling `batchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/batch".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},browse({indexName:e,browseParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `browse`.");const a={method:"POST",path:"/1/indexes/{indexName}/browse".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{}};return d.request(a,t)},clearAllSynonyms({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearAllSynonyms`.");const a="/1/indexes/{indexName}/synonyms/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},clearObjects({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `clearObjects`.");const t={method:"POST",path:"/1/indexes/{indexName}/clear".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},clearRules({indexName:e,forwardToReplicas:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `clearRules`.");const a="/1/indexes/{indexName}/rules/clear".replace("{indexName}",encodeURIComponent(e)),n={};void 0!==r&&(n.forwardToReplicas=r.toString());const s={method:"POST",path:a,queryParameters:n,headers:{}};return d.request(s,t)},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `deleteApiKey`.");const t={method:"DELETE",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteBy({indexName:e,deleteByParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteBy`.");if(!r)throw new Error("Parameter `deleteByParams` is required when calling `deleteBy`.");const a={method:"POST",path:"/1/indexes/{indexName}/deleteByQuery".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},deleteIndex({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteIndex`.");const t={method:"DELETE",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteObject({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteObject`.");const a={method:"DELETE",path:"/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},deleteRule({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteRule`.");const n="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},deleteSource({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `deleteSource`.");const t={method:"DELETE",path:"/1/security/sources/{source}".replace("{source}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},deleteSynonym({indexName:e,objectID:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `deleteSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `deleteSynonym`.");const n="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"DELETE",path:n,queryParameters:s,headers:{}};return d.request(i,a)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `getApiKey`.");const t={method:"GET",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getDictionaryLanguages(e){const r={method:"GET",path:"/1/dictionaries/*/languages",queryParameters:{},headers:{}};return d.request(r,e)},getDictionarySettings(e){const r={method:"GET",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{}};return d.request(r,e)},getLogs({offset:e,length:r,indexName:t,type:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.length=r.toString()),void 0!==t&&(s.indexName=t.toString()),void 0!==a&&(s.type=a.toString());const i={method:"GET",path:"/1/logs",queryParameters:s,headers:{}};return d.request(i,n)},getObject({indexName:e,objectID:r,attributesToRetrieve:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `getObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getObject`.");const n="/1/indexes/{indexName}/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),s={};void 0!==t&&(s.attributesToRetrieve=t.toString());const i={method:"GET",path:n,queryParameters:s,headers:{}};return d.request(i,a)},getObjects(e,r){if(!e)throw new Error("Parameter `getObjectsParams` is required when calling `getObjects`.");if(!e.requests)throw new Error("Parameter `getObjectsParams.requests` is required when calling `getObjects`.");const t={method:"POST",path:"/1/indexes/*/objects",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},getRule({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getRule`.");const a={method:"GET",path:"/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getSettings({indexName:e},r){if(!e)throw new Error("Parameter `indexName` is required when calling `getSettings`.");const t={method:"GET",path:"/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},getSources(e){const r={method:"GET",path:"/1/security/sources",queryParameters:{},headers:{}};return d.request(r,e)},getSynonym({indexName:e,objectID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `getSynonym`.");const a={method:"GET",path:"/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTask({indexName:e,taskID:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `getTask`.");if(!r)throw new Error("Parameter `taskID` is required when calling `getTask`.");const a={method:"GET",path:"/1/indexes/{indexName}/task/{taskID}".replace("{indexName}",encodeURIComponent(e)).replace("{taskID}",encodeURIComponent(r)),queryParameters:{},headers:{}};return d.request(a,t)},getTopUserIds(e){const r={method:"GET",path:"/1/clusters/mapping/top",queryParameters:{},headers:{}};return d.request(r,e)},getUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `getUserId`.");const t={method:"GET",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},hasPendingMappings({getClusters:e}={},r=void 0){const t={};void 0!==e&&(t.getClusters=e.toString());const a={method:"GET",path:"/1/clusters/mapping/pending",queryParameters:t,headers:{}};return d.request(a,r)},listApiKeys(e){const r={method:"GET",path:"/1/keys",queryParameters:{},headers:{}};return d.request(r,e)},listClusters(e){const r={method:"GET",path:"/1/clusters",queryParameters:{},headers:{}};return d.request(r,e)},listIndices({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/indexes",queryParameters:a,headers:{}};return d.request(n,t)},listUserIds({page:e,hitsPerPage:r}={},t=void 0){const a={};void 0!==e&&(a.page=e.toString()),void 0!==r&&(a.hitsPerPage=r.toString());const n={method:"GET",path:"/1/clusters/mapping",queryParameters:a,headers:{}};return d.request(n,t)},multipleBatch(e,r){if(!e)throw new Error("Parameter `batchParams` is required when calling `multipleBatch`.");if(!e.requests)throw new Error("Parameter `batchParams.requests` is required when calling `multipleBatch`.");const t={method:"POST",path:"/1/indexes/*/batch",queryParameters:{},headers:{},data:e};return d.request(t,r)},operationIndex({indexName:e,operationIndexParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `operationIndex`.");if(!r)throw new Error("Parameter `operationIndexParams` is required when calling `operationIndex`.");if(!r.operation)throw new Error("Parameter `operationIndexParams.operation` is required when calling `operationIndex`.");if(!r.destination)throw new Error("Parameter `operationIndexParams.destination` is required when calling `operationIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/operation".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},partialUpdateObject({indexName:e,objectID:r,attributesToUpdate:t,createIfNotExists:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `partialUpdateObject`.");if(!r)throw new Error("Parameter `objectID` is required when calling `partialUpdateObject`.");if(!t)throw new Error("Parameter `attributesToUpdate` is required when calling `partialUpdateObject`.");const s="/1/indexes/{indexName}/{objectID}/partial".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.createIfNotExists=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},removeUserId({userID:e},r){if(!e)throw new Error("Parameter `userID` is required when calling `removeUserId`.");const t={method:"DELETE",path:"/1/clusters/mapping/{userID}".replace("{userID}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},replaceSources({source:e},r){if(!e)throw new Error("Parameter `source` is required when calling `replaceSources`.");const t={method:"PUT",path:"/1/security/sources",queryParameters:{},headers:{},data:e};return d.request(t,r)},restoreApiKey({key:e},r){if(!e)throw new Error("Parameter `key` is required when calling `restoreApiKey`.");const t={method:"POST",path:"/1/keys/{key}/restore".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},saveObject({indexName:e,body:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `saveObject`.");if(!r)throw new Error("Parameter `body` is required when calling `saveObject`.");const a={method:"POST",path:"/1/indexes/{indexName}".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)},saveRule({indexName:e,objectID:r,rule:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRule`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveRule`.");if(!t)throw new Error("Parameter `rule` is required when calling `saveRule`.");if(!t.objectID)throw new Error("Parameter `rule.objectID` is required when calling `saveRule`.");const s="/1/indexes/{indexName}/rules/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveRules({indexName:e,rules:r,forwardToReplicas:t,clearExistingRules:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveRules`.");if(!r)throw new Error("Parameter `rules` is required when calling `saveRules`.");const s="/1/indexes/{indexName}/rules/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.clearExistingRules=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},saveSynonym({indexName:e,objectID:r,synonymHit:t,forwardToReplicas:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonym`.");if(!r)throw new Error("Parameter `objectID` is required when calling `saveSynonym`.");if(!t)throw new Error("Parameter `synonymHit` is required when calling `saveSynonym`.");if(!t.objectID)throw new Error("Parameter `synonymHit.objectID` is required when calling `saveSynonym`.");if(!t.type)throw new Error("Parameter `synonymHit.type` is required when calling `saveSynonym`.");const s="/1/indexes/{indexName}/synonyms/{objectID}".replace("{indexName}",encodeURIComponent(e)).replace("{objectID}",encodeURIComponent(r)),i={};void 0!==a&&(i.forwardToReplicas=a.toString());const o={method:"PUT",path:s,queryParameters:i,headers:{},data:t};return d.request(o,n)},saveSynonyms({indexName:e,synonymHit:r,forwardToReplicas:t,replaceExistingSynonyms:a},n){if(!e)throw new Error("Parameter `indexName` is required when calling `saveSynonyms`.");if(!r)throw new Error("Parameter `synonymHit` is required when calling `saveSynonyms`.");const s="/1/indexes/{indexName}/synonyms/batch".replace("{indexName}",encodeURIComponent(e)),i={};void 0!==t&&(i.forwardToReplicas=t.toString()),void 0!==a&&(i.replaceExistingSynonyms=a.toString());const o={method:"POST",path:s,queryParameters:i,headers:{},data:r};return d.request(o,n)},search(e,r){if(e&&Array.isArray(e)){const r={requests:e.map((({params:e,...r})=>"facet"===r.type?{...r,...e,type:"facet"}:{...r,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=r}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const t={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},searchDictionaryEntries({dictionaryName:e,searchDictionaryEntriesParams:r},t){if(!e)throw new Error("Parameter `dictionaryName` is required when calling `searchDictionaryEntries`.");if(!r)throw new Error("Parameter `searchDictionaryEntriesParams` is required when calling `searchDictionaryEntries`.");if(!r.query)throw new Error("Parameter `searchDictionaryEntriesParams.query` is required when calling `searchDictionaryEntries`.");const a={method:"POST",path:"/1/dictionaries/{dictionaryName}/search".replace("{dictionaryName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r,useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchForFacetValues({indexName:e,facetName:r,searchForFacetValuesRequest:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `searchForFacetValues`.");if(!r)throw new Error("Parameter `facetName` is required when calling `searchForFacetValues`.");const n={method:"POST",path:"/1/indexes/{indexName}/facets/{facetName}/query".replace("{indexName}",encodeURIComponent(e)).replace("{facetName}",encodeURIComponent(r)),queryParameters:{},headers:{},data:t||{},useReadTransporter:!0,cacheable:!0};return d.request(n,a)},searchRules({indexName:e,searchRulesParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchRules`.");const a={method:"POST",path:"/1/indexes/{indexName}/rules/search".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSingleIndex({indexName:e,searchParams:r},t){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSingleIndex`.");const a={method:"POST",path:"/1/indexes/{indexName}/query".replace("{indexName}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r||{},useReadTransporter:!0,cacheable:!0};return d.request(a,t)},searchSynonyms({indexName:e,type:r,page:t,hitsPerPage:a,searchSynonymsParams:n},s){if(!e)throw new Error("Parameter `indexName` is required when calling `searchSynonyms`.");const i="/1/indexes/{indexName}/synonyms/search".replace("{indexName}",encodeURIComponent(e)),o={};void 0!==r&&(o.type=r.toString()),void 0!==t&&(o.page=t.toString()),void 0!==a&&(o.hitsPerPage=a.toString());const c={method:"POST",path:i,queryParameters:o,headers:{},data:n||{},useReadTransporter:!0,cacheable:!0};return d.request(c,s)},searchUserIds(e,r){if(!e)throw new Error("Parameter `searchUserIdsParams` is required when calling `searchUserIds`.");if(!e.query)throw new Error("Parameter `searchUserIdsParams.query` is required when calling `searchUserIds`.");const t={method:"POST",path:"/1/clusters/mapping/search",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return d.request(t,r)},setDictionarySettings(e,r){if(!e)throw new Error("Parameter `dictionarySettingsParams` is required when calling `setDictionarySettings`.");if(!e.disableStandardEntries)throw new Error("Parameter `dictionarySettingsParams.disableStandardEntries` is required when calling `setDictionarySettings`.");const t={method:"PUT",path:"/1/dictionaries/*/settings",queryParameters:{},headers:{},data:e};return d.request(t,r)},setSettings({indexName:e,indexSettings:r,forwardToReplicas:t},a){if(!e)throw new Error("Parameter `indexName` is required when calling `setSettings`.");if(!r)throw new Error("Parameter `indexSettings` is required when calling `setSettings`.");const n="/1/indexes/{indexName}/settings".replace("{indexName}",encodeURIComponent(e)),s={};void 0!==t&&(s.forwardToReplicas=t.toString());const i={method:"PUT",path:n,queryParameters:s,headers:{},data:r};return d.request(i,a)},updateApiKey({key:e,apiKey:r},t){if(!e)throw new Error("Parameter `key` is required when calling `updateApiKey`.");if(!r)throw new Error("Parameter `apiKey` is required when calling `updateApiKey`.");if(!r.acl)throw new Error("Parameter `apiKey.acl` is required when calling `updateApiKey`.");const a={method:"PUT",path:"/1/keys/{key}".replace("{key}",encodeURIComponent(e)),queryParameters:{},headers:{},data:r};return d.request(a,t)}}}const D=b;e.algoliasearch=function(e,t,i){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!t||"string"!=typeof t)throw new Error("`apiKey` is missing.");const o={apiKey:t,appId:e,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((r=>{const t=new XMLHttpRequest;t.open(e.method,e.url,!0),Object.keys(e.headers).forEach((r=>t.setRequestHeader(r,e.headers[r])));const a=(e,a)=>setTimeout((()=>{t.abort(),r({status:0,content:a,isTimedOut:!0})}),e),n=a(e.connectTimeout,"Connection timeout");let s;t.onreadystatechange=()=>{t.readyState>t.OPENED&&void 0===s&&(clearTimeout(n),s=a(e.responseTimeout,"Socket timeout"))},t.onerror=()=>{0===t.status&&(clearTimeout(n),clearTimeout(s),r({content:t.responseText||"Network request failed",status:t.status,isTimedOut:!1}))},t.onload=()=>{clearTimeout(n),clearTimeout(s),r({content:t.responseText,status:t.status,isTimedOut:!1})},t.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:n({caches:[a({key:`${D}-${e}`}),s()]}),...i};return{...I(o),get _ua(){return this.transporter.algoliaAgent.value},initAnalytics:function(e={}){if(e.region&&("string"!=typeof e.region||!E.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${E.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Analytics",version:x}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getAverageClickPosition({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return d.request(i,n)},getClickPositions({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return d.request(i,n)},getClickThroughRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return d.request(i,n)},getConversationRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getConversationRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoClickRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return d.request(i,n)},getNoResultsRate({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return d.request(i,n)},getSearchesNoClicks({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:o,headers:{}};return d.request(c,i)},getSearchesNoResults({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:o,headers:{}};return d.request(c,i)},getStatus({index:e},r){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const t={};void 0!==e&&(t.index=e.toString());const a={method:"GET",path:"/2/status",queryParameters:t,headers:{}};return d.request(a,r)},getTopCountries({index:e,startDate:r,endDate:t,limit:a,offset:n,tags:s},i){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const o={};void 0!==e&&(o.index=e.toString()),void 0!==r&&(o.startDate=r.toString()),void 0!==t&&(o.endDate=t.toString()),void 0!==a&&(o.limit=a.toString()),void 0!==n&&(o.offset=n.toString()),void 0!==s&&(o.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:o,headers:{}};return d.request(c,i)},getTopFilterAttributes({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const h={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return d.request(h,o)},getTopFilterForAttribute({attribute:e,index:r,search:t,startDate:a,endDate:n,limit:s,offset:i,tags:o},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const h="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==r&&(l.index=r.toString()),void 0!==t&&(l.search=t.toString()),void 0!==a&&(l.startDate=a.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==i&&(l.offset=i.toString()),void 0!==o&&(l.tags=o.toString());const u={method:"GET",path:h,queryParameters:l,headers:{}};return d.request(u,c)},getTopFiltersNoResults({index:e,search:r,startDate:t,endDate:a,limit:n,offset:s,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==r&&(c.search=r.toString()),void 0!==t&&(c.startDate=t.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==n&&(c.limit=n.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==i&&(c.tags=i.toString());const h={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return d.request(h,o)},getTopHits({index:e,search:r,clickAnalytics:t,startDate:a,endDate:n,limit:s,offset:i,tags:o},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const h={};void 0!==e&&(h.index=e.toString()),void 0!==r&&(h.search=r.toString()),void 0!==t&&(h.clickAnalytics=t.toString()),void 0!==a&&(h.startDate=a.toString()),void 0!==n&&(h.endDate=n.toString()),void 0!==s&&(h.limit=s.toString()),void 0!==i&&(h.offset=i.toString()),void 0!==o&&(h.tags=o.toString());const l={method:"GET",path:"/2/hits",queryParameters:h,headers:{}};return d.request(l,c)},getTopSearches({index:e,clickAnalytics:r,startDate:t,endDate:a,orderBy:n,direction:s,limit:i,offset:o,tags:c},h){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==t&&(l.startDate=t.toString()),void 0!==a&&(l.endDate=a.toString()),void 0!==n&&(l.orderBy=n.toString()),void 0!==s&&(l.direction=s.toString()),void 0!==i&&(l.limit=i.toString()),void 0!==o&&(l.offset=o.toString()),void 0!==c&&(l.tags=c.toString());const u={method:"GET",path:"/2/searches",queryParameters:l,headers:{}};return d.request(u,h)},getUsersCount({index:e,startDate:r,endDate:t,tags:a},n){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==r&&(s.startDate=r.toString()),void 0!==t&&(s.endDate=t.toString()),void 0!==a&&(s.tags=a.toString());const i={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return d.request(i,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)}}}({...o,...e.options,...e})},initPersonalization:function(e){if(!e.region||e.region&&("string"!=typeof e.region||!v.includes(e.region)))throw new Error(`\`region\` is required and must be one of the following: ${v.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:"personalization.{region}.algolia.com".replace("{region}",c),accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Personalization",version:S}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteUserProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserProfile`.");const t={method:"DELETE",path:"/1/profiles/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getPersonalizationStrategy(e){const r={method:"GET",path:"/1/strategies/personalization",queryParameters:{},headers:{}};return d.request(r,e)},getUserTokenProfile({userToken:e},r){if(!e)throw new Error("Parameter `userToken` is required when calling `getUserTokenProfile`.");const t={method:"GET",path:"/1/profiles/personalization/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},setPersonalizationStrategy(e,r){if(!e)throw new Error("Parameter `personalizationStrategyParams` is required when calling `setPersonalizationStrategy`.");if(!e.eventScoring)throw new Error("Parameter `personalizationStrategyParams.eventScoring` is required when calling `setPersonalizationStrategy`.");if(!e.facetScoring)throw new Error("Parameter `personalizationStrategyParams.facetScoring` is required when calling `setPersonalizationStrategy`.");if(!e.personalizationImpact)throw new Error("Parameter `personalizationStrategyParams.personalizationImpact` is required when calling `setPersonalizationStrategy`.");const t={method:"POST",path:"/1/strategies/personalization",queryParameters:{},headers:{},data:e};return d.request(t,r)}}}({...o,...e.options,...e})},initAbtesting:function(e={}){if(e.region&&("string"!=typeof e.region||!f.includes(e.region)))throw new Error(`\`region\` must be one of the following: ${f.join(", ")}`);return function({appId:e,apiKey:t,authMode:a,algoliaAgents:n,region:s,...i}){const o=r(e,t,a),d=P({hosts:(c=s,[{url:c?"analytics.{region}.algolia.com".replace("{region}",c):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...i,algoliaAgent:y({algoliaAgents:n,client:"Abtesting",version:q}),baseHeaders:{"content-type":"text/plain",...o.headers(),...i.baseHeaders},baseQueryParameters:{...o.queryParameters(),...i.baseQueryParameters}});var c;return{transporter:d,appId:e,clearCache:()=>Promise.all([d.requestsCache.clear(),d.responsesCache.clear()]).then((()=>{})),get _ua(){return d.algoliaAgent.value},addAlgoliaAgent(e,r){d.algoliaAgent.add({segment:e,version:r})},addABTests(e,r){if(!e)throw new Error("Parameter `addABTestsRequest` is required when calling `addABTests`.");if(!e.name)throw new Error("Parameter `addABTestsRequest.name` is required when calling `addABTests`.");if(!e.variants)throw new Error("Parameter `addABTestsRequest.variants` is required when calling `addABTests`.");if(!e.endAt)throw new Error("Parameter `addABTestsRequest.endAt` is required when calling `addABTests`.");const t={method:"POST",path:"/2/abtests",queryParameters:{},headers:{},data:e};return d.request(t,r)},del({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const a={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},deleteABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `deleteABTest`.");const t={method:"DELETE",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},get({path:e,parameters:r},t){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const a={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{}};return d.request(a,t)},getABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `getABTest`.");const t={method:"GET",path:"/2/abtests/{id}".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)},listABTests({offset:e,limit:r,indexPrefix:t,indexSuffix:a}={},n=void 0){const s={};void 0!==e&&(s.offset=e.toString()),void 0!==r&&(s.limit=r.toString()),void 0!==t&&(s.indexPrefix=t.toString()),void 0!==a&&(s.indexSuffix=a.toString());const i={method:"GET",path:"/2/abtests",queryParameters:s,headers:{}};return d.request(i,n)},post({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const n={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},put({path:e,parameters:r,body:t},a){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const n={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:r||{},headers:{},data:t||{}};return d.request(n,a)},stopABTest({id:e},r){if(!e)throw new Error("Parameter `id` is required when calling `stopABTest`.");const t={method:"POST",path:"/2/abtests/{id}/stop".replace("{id}",encodeURIComponent(e)),queryParameters:{},headers:{}};return d.request(t,r)}}}({...o,...e.options,...e})}}},e.apiClientVersion=D}));
|
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.88";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -23,6 +23,12 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
23
23
|
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
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
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>;
|
|
26
|
+
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
27
|
+
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
|
|
28
|
+
}>;
|
|
29
|
+
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
30
|
+
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
|
|
31
|
+
}>;
|
|
26
32
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
27
33
|
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>;
|
|
28
34
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -30,7 +36,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
30
36
|
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>;
|
|
31
37
|
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>;
|
|
32
38
|
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>;
|
|
33
|
-
browse<
|
|
39
|
+
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
|
|
34
40
|
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>;
|
|
35
41
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
36
42
|
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>;
|
|
@@ -48,7 +54,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
48
54
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
49
55
|
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>;
|
|
50
56
|
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
|
|
51
|
-
getObjects<
|
|
57
|
+
getObjects<T_3>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_3>>;
|
|
52
58
|
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>;
|
|
53
59
|
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
|
|
54
60
|
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
|
|
@@ -78,7 +84,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
78
84
|
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>;
|
|
79
85
|
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>;
|
|
80
86
|
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>;
|
|
81
|
-
searchSingleIndex<
|
|
87
|
+
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>>;
|
|
82
88
|
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>;
|
|
83
89
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
84
90
|
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":["../../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,mBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,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":["../../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,mBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDnB"}
|
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.88";
|
|
8
8
|
/**
|
|
9
9
|
* The client type.
|
|
10
10
|
*/
|
|
@@ -23,6 +23,12 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
23
23
|
browseObjects<T>({ indexName, browseParams, ...browseObjectsOptions }: Partial<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "validate">> & Required<Pick<import("@algolia/client-common").CreateIterablePromise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>, "aggregator">> & import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T>>;
|
|
24
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
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>;
|
|
26
|
+
searchForHits<T_1>(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
27
|
+
results: import("@algolia/client-search/model/searchResponse").SearchResponse<T_1>[];
|
|
28
|
+
}>;
|
|
29
|
+
searchForFacets(searchMethodParams: import("@algolia/client-search/model/clientMethodProps").LegacySearchMethodProps | import("@algolia/client-search/model/searchMethodParams").SearchMethodParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<{
|
|
30
|
+
results: import("@algolia/client-search/model/searchForFacetValuesResponse").SearchForFacetValuesResponse[];
|
|
31
|
+
}>;
|
|
26
32
|
addApiKey(apiKey: import("@algolia/client-search/model/apiKey").ApiKey, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/addApiKeyResponse").AddApiKeyResponse>;
|
|
27
33
|
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>;
|
|
28
34
|
appendSource(source: import("@algolia/client-search/model/source").Source, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/createdAtResponse").CreatedAtResponse>;
|
|
@@ -30,7 +36,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
30
36
|
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>;
|
|
31
37
|
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>;
|
|
32
38
|
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>;
|
|
33
|
-
browse<
|
|
39
|
+
browse<T_2>({ indexName, browseParams }: import("@algolia/client-search/model/clientMethodProps").BrowseProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/browseResponse").BrowseResponse<T_2>>;
|
|
34
40
|
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>;
|
|
35
41
|
clearObjects({ indexName }: import("@algolia/client-search/model/clientMethodProps").ClearObjectsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/updatedAtResponse").UpdatedAtResponse>;
|
|
36
42
|
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>;
|
|
@@ -48,7 +54,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
48
54
|
getDictionarySettings(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getDictionarySettingsResponse").GetDictionarySettingsResponse>;
|
|
49
55
|
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>;
|
|
50
56
|
getObject({ indexName, objectID, attributesToRetrieve }: import("@algolia/client-search/model/clientMethodProps").GetObjectProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<Record<string, string>>;
|
|
51
|
-
getObjects<
|
|
57
|
+
getObjects<T_3>(getObjectsParams: import("@algolia/client-search/model/getObjectsParams").GetObjectsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/getObjectsResponse").GetObjectsResponse<T_3>>;
|
|
52
58
|
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>;
|
|
53
59
|
getSettings({ indexName }: import("@algolia/client-search/model/clientMethodProps").GetSettingsProps, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/indexSettings").IndexSettings>;
|
|
54
60
|
getSources(requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/source").Source[]>;
|
|
@@ -78,7 +84,7 @@ export declare function algoliasearch(appId: string, apiKey: string, options?: C
|
|
|
78
84
|
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>;
|
|
79
85
|
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>;
|
|
80
86
|
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>;
|
|
81
|
-
searchSingleIndex<
|
|
87
|
+
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>>;
|
|
82
88
|
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>;
|
|
83
89
|
searchUserIds(searchUserIdsParams: import("@algolia/client-search/model/searchUserIdsParams").SearchUserIdsParams, requestOptions?: import("@algolia/client-common").RequestOptions | undefined): Promise<import("@algolia/client-search/model/searchUserIdsResponse").SearchUserIdsResponse>;
|
|
84
90
|
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":["../../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,mBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,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":["../../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,mBAAsB,CAAC;AAEpD;;GAEG;AACH,MAAM,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwDnB"}
|
|
@@ -9,9 +9,21 @@ export type ABTest = {
|
|
|
9
9
|
*/
|
|
10
10
|
clickSignificance: number;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on conversion. A value of 0.95 or over is considered to be _significant_.
|
|
13
|
+
*/
|
|
14
|
+
conversionSignificance: number;
|
|
15
|
+
/**
|
|
16
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on add-to-cart data. A value of 0.95 or over is considered to be _significant_.
|
|
17
|
+
*/
|
|
18
|
+
addToCartSignificance: number;
|
|
19
|
+
/**
|
|
20
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on purchase data. A value of 0.95 or over is considered to be _significant_.
|
|
13
21
|
*/
|
|
14
|
-
|
|
22
|
+
purchaseSignificance: number;
|
|
23
|
+
/**
|
|
24
|
+
* [A/B test significance](https://www.algolia.com/doc/guides/ab-testing/what-is-ab-testing/in-depth/how-ab-test-scores-are-calculated/#statistical-significance-or-chance) based on revenue data. A value of 0.95 or over is considered to be _significant_.
|
|
25
|
+
*/
|
|
26
|
+
revenueSignificance: Record<string, number>;
|
|
15
27
|
/**
|
|
16
28
|
* Update date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
17
29
|
*/
|
|
@@ -20,6 +32,10 @@ export type ABTest = {
|
|
|
20
32
|
* Creation date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
21
33
|
*/
|
|
22
34
|
createdAt: string;
|
|
35
|
+
/**
|
|
36
|
+
* End date timestamp in [ISO-8601](https://wikipedia.org/wiki/ISO_8601) format.
|
|
37
|
+
*/
|
|
38
|
+
endAt: string;
|
|
23
39
|
/**
|
|
24
40
|
* A/B test name.
|
|
25
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
|
|
1
|
+
{"version":3,"file":"aBTest.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/aBTest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,MAAM,MAAM,GAAG;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,qBAAqB,EAAE,MAAM,CAAC;IAE9B;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE5C;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type CurrenciesValue = {
|
|
2
|
+
/**
|
|
3
|
+
* Currency code.
|
|
4
|
+
*/
|
|
5
|
+
currency?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Revenue for this currency.
|
|
8
|
+
*/
|
|
9
|
+
revenue?: number;
|
|
10
|
+
/**
|
|
11
|
+
* Mean for this currency.
|
|
12
|
+
*/
|
|
13
|
+
mean?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Standard deviation for this currency.
|
|
16
|
+
*/
|
|
17
|
+
standardDeviation?: number;
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=currenciesValue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"currenciesValue.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/currenciesValue.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FilterEffectsEmptySearch } from './filterEffectsEmptySearch';
|
|
2
|
+
import type { FilterEffectsOutliers } from './filterEffectsOutliers';
|
|
3
|
+
/**
|
|
4
|
+
* A/B test filter effects resulting from configuration settings.
|
|
5
|
+
*/
|
|
6
|
+
export type FilterEffects = {
|
|
7
|
+
outliers?: FilterEffectsOutliers;
|
|
8
|
+
emptySearch?: FilterEffectsEmptySearch;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=filterEffects.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEffects.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/filterEffects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,qBAAqB,CAAC;IAEjC,WAAW,CAAC,EAAE,wBAAwB,CAAC;CACxC,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Empty searches removed from the A/B test as a result of configuration settings.
|
|
3
|
+
*/
|
|
4
|
+
export type FilterEffectsEmptySearch = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of users removed from the A/B test.
|
|
7
|
+
*/
|
|
8
|
+
usersCount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of tracked searches removed from the A/B test.
|
|
11
|
+
*/
|
|
12
|
+
trackedSearchesCount?: number;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=filterEffectsEmptySearch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEffectsEmptySearch.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/filterEffectsEmptySearch.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Outliers removed from the A/B test as a result of configuration settings.
|
|
3
|
+
*/
|
|
4
|
+
export type FilterEffectsOutliers = {
|
|
5
|
+
/**
|
|
6
|
+
* Number of users removed from the A/B test.
|
|
7
|
+
*/
|
|
8
|
+
usersCount?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Number of tracked searches removed from the A/B test.
|
|
11
|
+
*/
|
|
12
|
+
trackedSearchesCount?: number;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=filterEffectsOutliers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filterEffectsOutliers.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/filterEffectsOutliers.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC"}
|
|
@@ -4,8 +4,12 @@ export * from './abTestsVariant';
|
|
|
4
4
|
export * from './abTestsVariantSearchParams';
|
|
5
5
|
export * from './addABTestsRequest';
|
|
6
6
|
export * from './addABTestsVariant';
|
|
7
|
+
export * from './currenciesValue';
|
|
7
8
|
export * from './customSearchParams';
|
|
8
9
|
export * from './errorBase';
|
|
10
|
+
export * from './filterEffects';
|
|
11
|
+
export * from './filterEffectsEmptySearch';
|
|
12
|
+
export * from './filterEffectsOutliers';
|
|
9
13
|
export * from './listABTestsResponse';
|
|
10
14
|
export * from './variant';
|
|
11
15
|
export * from './clientMethodProps';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/index.ts"],"names":[],"mappings":"AAEA,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,WAAW,CAAC;AAC1B,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import type { CurrenciesValue } from './currenciesValue';
|
|
2
|
+
import type { FilterEffects } from './filterEffects';
|
|
1
3
|
export type Variant = {
|
|
4
|
+
/**
|
|
5
|
+
* Number of add-to-cart events for this variant.
|
|
6
|
+
*/
|
|
7
|
+
addToCartCount: number;
|
|
8
|
+
/**
|
|
9
|
+
* Variant\'s [add-to-cart rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#add-to-cart-rate).
|
|
10
|
+
*/
|
|
11
|
+
addToCartRate: number;
|
|
2
12
|
/**
|
|
3
13
|
* Variant\'s [average click position](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#click-position).
|
|
4
14
|
*/
|
|
@@ -19,10 +29,15 @@ export type Variant = {
|
|
|
19
29
|
* Variant\'s [conversion rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#conversion-rate).
|
|
20
30
|
*/
|
|
21
31
|
conversionRate: number;
|
|
32
|
+
/**
|
|
33
|
+
* A/B test currencies.
|
|
34
|
+
*/
|
|
35
|
+
currencies: Record<string, CurrenciesValue>;
|
|
22
36
|
/**
|
|
23
37
|
* A/B test description.
|
|
24
38
|
*/
|
|
25
39
|
description: string;
|
|
40
|
+
filterEffects?: FilterEffects;
|
|
26
41
|
/**
|
|
27
42
|
* A/B test index.
|
|
28
43
|
*/
|
|
@@ -32,13 +47,13 @@ export type Variant = {
|
|
|
32
47
|
*/
|
|
33
48
|
noResultCount: number;
|
|
34
49
|
/**
|
|
35
|
-
* Number of
|
|
50
|
+
* Number of purchase events for this variant.
|
|
36
51
|
*/
|
|
37
|
-
|
|
52
|
+
purchaseCount: number;
|
|
38
53
|
/**
|
|
39
|
-
*
|
|
54
|
+
* Variant\'s [purchase rate](https://www.algolia.com/doc/guides/search-analytics/concepts/metrics/#purchase-rate).
|
|
40
55
|
*/
|
|
41
|
-
|
|
56
|
+
purchaseRate: number;
|
|
42
57
|
/**
|
|
43
58
|
* Number of searches carried out during the A/B test.
|
|
44
59
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/variant.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,
|
|
1
|
+
{"version":3,"file":"variant.d.ts","sourceRoot":"","sources":["../../../../client-abtesting/model/variant.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,OAAO,GAAG;IACpB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,oBAAoB,EAAE,MAAM,CAAC;IAE7B;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,gBAAgB,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAE5C;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAE9B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,iBAAiB,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC"}
|
|
@@ -4,7 +4,7 @@ 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.88";
|
|
8
8
|
export declare const REGIONS: readonly ["de", "us"];
|
|
9
9
|
export type Region = (typeof REGIONS)[number];
|
|
10
10
|
export declare function createAbtestingClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -17,7 +17,7 @@ import type { GetTopFiltersNoResultsResponse } from '../model/getTopFiltersNoRes
|
|
|
17
17
|
import type { GetTopHitsResponse } from '../model/getTopHitsResponse';
|
|
18
18
|
import type { GetTopSearchesResponse } from '../model/getTopSearchesResponse';
|
|
19
19
|
import type { GetUsersCountResponse } from '../model/getUsersCountResponse';
|
|
20
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
20
|
+
export declare const apiClientVersion = "5.0.0-alpha.88";
|
|
21
21
|
export declare const REGIONS: readonly ["de", "us"];
|
|
22
22
|
export type Region = (typeof REGIONS)[number];
|
|
23
23
|
export declare function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -4,7 +4,7 @@ import type { DeleteUserProfileResponse } from '../model/deleteUserProfileRespon
|
|
|
4
4
|
import type { GetUserTokenResponse } from '../model/getUserTokenResponse';
|
|
5
5
|
import type { PersonalizationStrategyParams } from '../model/personalizationStrategyParams';
|
|
6
6
|
import type { SetPersonalizationStrategyResponse } from '../model/setPersonalizationStrategyResponse';
|
|
7
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
7
|
+
export declare const apiClientVersion = "5.0.0-alpha.88";
|
|
8
8
|
export declare const REGIONS: readonly ["eu", "us"];
|
|
9
9
|
export type Region = (typeof REGIONS)[number];
|
|
10
10
|
export declare function createPersonalizationClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
|
|
@@ -45,7 +45,7 @@ import type { UpdatedAtResponse } from '../model/updatedAtResponse';
|
|
|
45
45
|
import type { UpdatedAtWithObjectIdResponse } from '../model/updatedAtWithObjectIdResponse';
|
|
46
46
|
import type { UpdatedRuleResponse } from '../model/updatedRuleResponse';
|
|
47
47
|
import type { UserId } from '../model/userId';
|
|
48
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
48
|
+
export declare const apiClientVersion = "5.0.0-alpha.88";
|
|
49
49
|
export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
50
50
|
transporter: import("@algolia/client-common").Transporter;
|
|
51
51
|
/**
|
|
@@ -127,6 +127,28 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
127
127
|
* @param requestOptions - The requestOptions to send along with the query, they will be forwarded to the `searchSynonyms` method and merged with the transporter requestOptions.
|
|
128
128
|
*/
|
|
129
129
|
browseSynonyms({ indexName, validate, aggregator, ...browseSynonymsOptions }: BrowseOptions<SearchSynonymsResponse> & SearchSynonymsProps, requestOptions?: RequestOptions): Promise<SearchSynonymsResponse>;
|
|
130
|
+
/**
|
|
131
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia records (hits) and not facets.
|
|
132
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `hits` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
133
|
+
*
|
|
134
|
+
* @summary Search multiple indices for `hits`.
|
|
135
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
136
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
137
|
+
*/
|
|
138
|
+
searchForHits<T_1>(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
139
|
+
results: SearchResponse<T_1>[];
|
|
140
|
+
}>;
|
|
141
|
+
/**
|
|
142
|
+
* Helper: calls the `search` method but with certainty that we will only request Algolia facets and not records (hits).
|
|
143
|
+
* Disclaimer: We don't assert that the parameters you pass to this method only contains `facets` requests to prevent impacting search performances, this helper is purely for typing purposes.
|
|
144
|
+
*
|
|
145
|
+
* @summary Search multiple indices for `facets`.
|
|
146
|
+
* @param searchMethodParams - Query requests and strategies. Results will be received in the same order as the queries.
|
|
147
|
+
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
148
|
+
*/
|
|
149
|
+
searchForFacets(searchMethodParams: LegacySearchMethodProps | SearchMethodParams, requestOptions?: RequestOptions): Promise<{
|
|
150
|
+
results: SearchForFacetValuesResponse[];
|
|
151
|
+
}>;
|
|
130
152
|
/**
|
|
131
153
|
* Add a new API key with specific permissions and restrictions. The request must be authenticated with the admin API key. The response returns an API key string.
|
|
132
154
|
*
|
|
@@ -203,7 +225,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
203
225
|
* @param browse.browseParams - The browseParams object.
|
|
204
226
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
205
227
|
*/
|
|
206
|
-
browse<
|
|
228
|
+
browse<T_2>({ indexName, browseParams }: BrowseProps, requestOptions?: RequestOptions): Promise<BrowseResponse<T_2>>;
|
|
207
229
|
/**
|
|
208
230
|
* Delete all synonyms in the index.
|
|
209
231
|
*
|
|
@@ -375,7 +397,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
375
397
|
* @param getObjectsParams - Request object.
|
|
376
398
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
377
399
|
*/
|
|
378
|
-
getObjects<
|
|
400
|
+
getObjects<T_3>(getObjectsParams: GetObjectsParams, requestOptions?: RequestOptions): Promise<GetObjectsResponse<T_3>>;
|
|
379
401
|
/**
|
|
380
402
|
* Get a rule by its `objectID`. To find the `objectID` for rules, use the [`search` operation](#tag/Rules/operation/searchRules).
|
|
381
403
|
*
|
|
@@ -666,7 +688,7 @@ export declare function createSearchClient({ appId: appIdOption, apiKey: apiKeyO
|
|
|
666
688
|
* @param searchSingleIndex.searchParams - The searchParams object.
|
|
667
689
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
668
690
|
*/
|
|
669
|
-
searchSingleIndex<
|
|
691
|
+
searchSingleIndex<T_4>({ indexName, searchParams }: SearchSingleIndexProps, requestOptions?: RequestOptions): Promise<SearchResponse<T_4>>;
|
|
670
692
|
/**
|
|
671
693
|
* Search for synonyms in your index. You can control and filter the search with parameters. To get all synonyms, send an empty request body.
|
|
672
694
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"searchClient.d.ts","sourceRoot":"","sources":["../../../../client-search/src/searchClient.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,mBAAmB,EAInB,cAAc,EAEd,QAAQ,EAET,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EACV,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACV,uBAAuB,EACvB,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,iBAAiB,EACjB,eAAe,EACf,QAAQ,EACR,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,QAAQ,EACR,cAAc,EACd,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,SAAS,EACT,QAAQ,EACR,iBAAiB,EACjB,mBAAmB,EACnB,kBAAkB,EAClB,eAAe,EACf,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,gBAAgB,EAChB,sBAAsB,EACtB,mBAAmB,EACnB,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,4BAA4B,CAAC;AACpC,OAAO,KAAK,EAAE,iBAAiB,EAAE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AQG;kCAEgB,iBAAiB,mBACjB,cAAc,GAC9B,QAAQ,oBAAoB,CAAC;EAqCnC;AAED;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC"}
|
package/dist/lite/lite.cjs
CHANGED
|
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
|
|
|
4
4
|
var requesterNodeHttp = require('@algolia/requester-node-http');
|
|
5
5
|
|
|
6
6
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
7
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
7
|
+
const apiClientVersion = '5.0.0-alpha.88';
|
|
8
8
|
function getDefaultHosts(appId) {
|
|
9
9
|
return [
|
|
10
10
|
{
|
|
@@ -673,7 +673,7 @@ function createXhrRequester() {
|
|
|
673
673
|
}
|
|
674
674
|
|
|
675
675
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
676
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
676
|
+
const apiClientVersion = '5.0.0-alpha.88';
|
|
677
677
|
function getDefaultHosts(appId) {
|
|
678
678
|
return [
|
|
679
679
|
{
|
|
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, shuffle, DEFAULT_CONNEC
|
|
|
2
2
|
import { createHttpRequester } from '@algolia/requester-node-http';
|
|
3
3
|
|
|
4
4
|
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
|
|
5
|
-
const apiClientVersion = '5.0.0-alpha.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.88';
|
|
6
6
|
function getDefaultHosts(appId) {
|
|
7
7
|
return [
|
|
8
8
|
{
|
package/dist/lite/lite.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! algoliasearch/lite.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),n(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,f),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,f.headers),b="GET"===c.method?{...c.data,...f.data}:{},w={...s,...c.queryParameters,...b};if(a.value&&(w["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?w[e]=f.queryParameters[e].toString():w[e]=f.queryParameters[e];let O=0;const q=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=f.timeout;void 0===a&&(a=g?n.read:n.write);const b={data:v,headers:P,method:c.method,url:m(s,c.path,w),connectTimeout:r(O,n.connect),responseTimeout:r(O,a)},T=t=>{const r={request:b,response:t,host:s,triesLeft:e.length};return y.push(r),r},S=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(S)){const a=T(S);return S.isTimedOut&&O++,console.log("Retryable failure",p(a)),await t.set(s,o(s,S.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(S);throw T(S),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(S,y)},T=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),S=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(T);return q([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(n,e)})},requestsCache:c,responsesCache:f}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-alpha.86";function v(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.liteClient=function(e,a,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),n=f({hosts:v(e),...a,algoliaAgent:g({algoliaAgents:s,client:"Lite",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...a.baseHeaders},baseQueryParameters:{...o.queryParameters(),...a.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map((({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...o})}}));
|
|
1
|
+
/*! algoliasearch/lite.umd.js | 5.0.0-alpha.88 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
|
|
2
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["algoliasearch/lite"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),s=a()[r];return Promise.all([s||t(),void 0!==s])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const o=a();return o[JSON.stringify(e)]=t,s().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,o={miss:()=>Promise.resolve()})=>s.get(e,a,o).catch((()=>r({caches:t}).get(e,a,o))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const o=JSON.stringify(r);if(o in t)return Promise.resolve(e.serializable?JSON.parse(t[o]):t[o]);const n=s();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function o(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function n(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class i extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends i{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends c{constructor(e,t,r,s="ApiError"){super(e,r,s),n(this,"status",void 0),this.status=t}}class d extends i{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function m(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r])}`)).join("&")}(r);let a=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return s.length&&(a+=`?${s}`),a}function p(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:n,requester:i,requestsCache:c,responsesCache:f}){async function g(c,f,g=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,f),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,f.headers),b="GET"===c.method?{...c.data,...f.data}:{},w={...s,...c.queryParameters,...b};if(a.value&&(w["x-algolia-agent"]=a.value),f&&f.queryParameters)for(const e of Object.keys(f.queryParameters))f.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(f.queryParameters[e])?w[e]=f.queryParameters[e].toString():w[e]=f.queryParameters[e];let O=0;const q=async(e,r)=>{const s=e.pop();if(void 0===s)throw new u(function(e){return e.map((e=>p(e)))}(y));let a=f.timeout;void 0===a&&(a=g?n.read:n.write);const b={data:v,headers:P,method:c.method,url:m(s,c.path,w),connectTimeout:r(O,n.connect),responseTimeout:r(O,a)},T=t=>{const r={request:b,response:t,host:s,triesLeft:e.length};return y.push(r),r},S=await i.send(b);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(S)){const a=T(S);return S.isTimedOut&&O++,console.log("Retryable failure",p(a)),await t.set(s,o(s,S.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(S))return function(e){try{return JSON.parse(e.content)}catch(t){throw new d(t.message,e)}}(S);throw T(S),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new h(s.message,t,s.error,r):new l(s.message,t,r)}catch(e){}return new l(e,t,r)}(S,y)},T=e.filter((e=>"readWrite"===e.accept||(g?"read"===e.accept:"write"===e.accept))),S=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(o(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),n=[...s,...a];return{hosts:n.length>0?n:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(T);return q([...S.hosts].reverse(),S.getTimeout)}return{hostsCache:t,requester:i,timeouts:n,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return g(e,t,a);const o=()=>g(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return f.get(n,(()=>c.get(n,(()=>c.set(n,o()).then((e=>Promise.all([c.delete(n),e])),(e=>Promise.all([c.delete(n),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>f.set(n,e)})},requestsCache:c,responsesCache:f}}function g({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const y="5.0.0-alpha.88";function v(e){return[{url:`${e}-dsn.algolia.net`,accept:"read",protocol:"https"},{url:`${e}.algolia.net`,accept:"write",protocol:"https"}].concat(function(e){const t=e;for(let r=e.length-1;r>0;r--){const s=Math.floor(Math.random()*(r+1)),a=e[r];t[r]=e[s],t[s]=a}return t}([{url:`${e}-1.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-2.algolianet.com`,accept:"readWrite",protocol:"https"},{url:`${e}-3.algolianet.com`,accept:"readWrite",protocol:"https"}]))}e.apiClientVersion=y,e.liteClient=function(e,a,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,...a}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),n=f({hosts:v(e),...a,algoliaAgent:g({algoliaAgents:s,client:"Lite",version:y}),baseHeaders:{"content-type":"text/plain",...o.headers(),...a.baseHeaders},baseQueryParameters:{...o.queryParameters(),...a.baseQueryParameters}});return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},post({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const a={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(a,s)},search(e,t){if(e&&Array.isArray(e)){const t={requests:e.map((({params:e,...t})=>"facet"===t.type?{...t,...e,type:"facet"}:{...t,...e,facet:void 0,maxFacetHits:void 0,facetQuery:void 0}))};e=t}if(!e)throw new Error("Parameter `searchMethodParams` is required when calling `search`.");if(!e.requests)throw new Error("Parameter `searchMethodParams.requests` is required when calling `search`.");const r={method:"POST",path:"/1/indexes/*/queries",queryParameters:{},headers:{},data:e,useReadTransporter:!0,cacheable:!0};return n.request(r,t)}}}({appId:e,apiKey:a,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(o),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(o),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${y}-${e}`}),s()]}),...o})}}));
|
|
@@ -2,7 +2,7 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
|
|
|
2
2
|
import type { PostProps, LegacySearchMethodProps } from '../model/clientMethodProps';
|
|
3
3
|
import type { SearchMethodParams } from '../model/searchMethodParams';
|
|
4
4
|
import type { SearchResponses } from '../model/searchResponses';
|
|
5
|
-
export declare const apiClientVersion = "5.0.0-alpha.
|
|
5
|
+
export declare const apiClientVersion = "5.0.0-alpha.88";
|
|
6
6
|
export declare function createLiteClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, ...options }: CreateClientOptions): {
|
|
7
7
|
transporter: import("@algolia/client-common").Transporter;
|
|
8
8
|
/**
|
package/lite/src/liteClient.ts
CHANGED
|
@@ -22,7 +22,7 @@ import type {
|
|
|
22
22
|
import type { SearchMethodParams } from '../model/searchMethodParams';
|
|
23
23
|
import type { SearchResponses } from '../model/searchResponses';
|
|
24
24
|
|
|
25
|
-
export const apiClientVersion = '5.0.0-alpha.
|
|
25
|
+
export const apiClientVersion = '5.0.0-alpha.88';
|
|
26
26
|
|
|
27
27
|
function getDefaultHosts(appId: string): Host[] {
|
|
28
28
|
return (
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "algoliasearch",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.88",
|
|
4
4
|
"description": "A fully-featured and blazing-fast JavaScript API client to interact with Algolia API.",
|
|
5
5
|
"repository": "algolia/algoliasearch-client-javascript",
|
|
6
6
|
"license": "MIT",
|
|
@@ -60,17 +60,17 @@
|
|
|
60
60
|
"test": "jest"
|
|
61
61
|
},
|
|
62
62
|
"dependencies": {
|
|
63
|
-
"@algolia/client-abtesting": "5.0.0-alpha.
|
|
64
|
-
"@algolia/client-analytics": "5.0.0-alpha.
|
|
65
|
-
"@algolia/client-common": "5.0.0-alpha.
|
|
66
|
-
"@algolia/client-personalization": "5.0.0-alpha.
|
|
67
|
-
"@algolia/client-search": "5.0.0-alpha.
|
|
68
|
-
"@algolia/requester-browser-xhr": "5.0.0-alpha.
|
|
69
|
-
"@algolia/requester-node-http": "5.0.0-alpha.
|
|
63
|
+
"@algolia/client-abtesting": "5.0.0-alpha.88",
|
|
64
|
+
"@algolia/client-analytics": "5.0.0-alpha.88",
|
|
65
|
+
"@algolia/client-common": "5.0.0-alpha.89",
|
|
66
|
+
"@algolia/client-personalization": "5.0.0-alpha.88",
|
|
67
|
+
"@algolia/client-search": "5.0.0-alpha.88",
|
|
68
|
+
"@algolia/requester-browser-xhr": "5.0.0-alpha.89",
|
|
69
|
+
"@algolia/requester-node-http": "5.0.0-alpha.89"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@types/jest": "29.5.5",
|
|
73
|
-
"@types/node": "18.18.
|
|
73
|
+
"@types/node": "18.18.5",
|
|
74
74
|
"jest": "29.7.0",
|
|
75
75
|
"rollup": "3.29.4",
|
|
76
76
|
"ts-jest": "29.1.1",
|