Socket
Socket
Sign inDemoInstall

@algolia/client-analytics

Package Overview
Dependencies
Maintainers
3
Versions
220
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@algolia/client-analytics - npm Package Compare versions

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

4

dist/builds/browser.d.ts

@@ -1,6 +0,6 @@

import type { InitClientOptions } from '@algolia/client-common';
import type { ClientOptions } from '@algolia/client-common';
import type { AnalyticsClient, Region } from '../src/analyticsClient';
export { apiClientVersion, AnalyticsClient } from '../src/analyticsClient';
export * from '../model';
export declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: InitClientOptions): AnalyticsClient;
export declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): AnalyticsClient;
//# sourceMappingURL=browser.d.ts.map

@@ -1,6 +0,6 @@

import type { InitClientOptions } from '@algolia/client-common';
import type { ClientOptions } from '@algolia/client-common';
import type { AnalyticsClient, Region } from '../src/analyticsClient';
export { apiClientVersion, AnalyticsClient } from '../src/analyticsClient';
export * from '../model';
export declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: InitClientOptions): AnalyticsClient;
export declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): AnalyticsClient;
//# sourceMappingURL=node.d.ts.map

@@ -9,3 +9,3 @@ 'use strict';

// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
const apiClientVersion = '5.0.0-alpha.2';
const apiClientVersion = '5.0.0-alpha.3';
const REGIONS = ['de', 'us'];

@@ -12,0 +12,0 @@ function getDefaultHosts(region) {

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

// This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.
const apiClientVersion = '5.0.0-alpha.2';
const apiClientVersion = '5.0.0-alpha.3';
const REGIONS = ['de', 'us'];

@@ -8,0 +8,0 @@ function getDefaultHosts(region) {

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

/*! client-analytics.umd.js | 5.0.0-alpha.2 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-analytics"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(i().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),i=a()[r];return Promise.all([i||t(),void 0!==i])})).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,i().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function i(e){const t=[...e.caches],r=t.shift();return void 0===r?{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()})=>r.get(e,a,o).catch((()=>i({caches:t}).get(e,a,o))),set:(e,a)=>r.set(e,a).catch((()=>i({caches:t}).set(e,a))),delete:e=>r.delete(e).catch((()=>i({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>i({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,i,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=i();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),s(this,"name","AlgoliaError"),t&&(this.name=t)}}class d extends c{constructor(e,t,r){super(e,r),s(this,"stackTrace",void 0),this.stackTrace=t}}class u extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends d{constructor(e,t,r){super(e,r,"ApiError"),s(this,"status",void 0),this.status=t}}class g extends c{constructor(e,t){super(e,"DeserializationError"),s(this,"response",void 0),this.response=t}}function h(e,t,r){const i=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}=${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 i.length&&(a+=`?${i}`),a}function v(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 m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:a,timeouts:o,requester:s,requestsCache:c,responsesCache:d}){async function m(c,d,m=!0){const f=[],p=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,d),y=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},a={};return Object.keys(i).forEach((e=>{const t=i[e];a[e.toLowerCase()]=t})),a}(r,c.headers,d.headers),S="GET"===c.method?{...c.data,...d.data}:{},w={"x-algolia-agent":a.value,...i,...c.queryParameters,...S};if(d&&d.queryParameters)for(const e of Object.keys(d.queryParameters))d.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[e])?w[e]=d.queryParameters[e].toString():w[e]=d.queryParameters[e];let P=0;const q=async(e,r)=>{const i=e.pop();if(void 0===i)throw new u(function(e){return e.map((e=>v(e)))}(f));let a=d.timeout;void 0===a&&(a=m?o.read:o.write);const S={data:p,headers:y,method:c.method,url:h(i,c.path,w),connectTimeout:r(P,o.connect),responseTimeout:r(P,a)},b=t=>{const r={request:S,response:t,host:i,triesLeft:e.length};return f.push(r),r},O=await s.send(S);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)}(O)){const a=b(O);return O.isTimedOut&&P++,console.log("Retryable failure",v(a)),await t.set(i,n(i,O.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new g(t.message,e)}}(O);throw b(O),function({content:e,status:t},r){let i=e;try{i=JSON.parse(e).message}catch(e){}return new l(i,t,r)}(O,f)},b=e.filter((e=>"readWrite"===e.accept||(m?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),i=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...i,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(b);return q([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:s,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return m(e,t,a);const o=()=>m(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return d.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=>d.set(n,e)})},requestsCache:c,responsesCache:d}}function f({algoliaAgents:e,client:t,version:r}){const i=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=>i.add(e))),i}function p(e,t){if(null==e)return{};var r,i,a=function(e,t){if(null==e)return{};var r,i,a={},o=Object.keys(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var y=["appId","apiKey","authMode","algoliaAgents","region"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function w(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?S(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var P="5.0.0-alpha.2",q=["de","us"];function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}e.analyticsClient=function(e,o,n,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!q.includes(n)))throw new Error("`region` must be one of the following: ".concat(q.join(", ")));return function(e){var t,r=e.appId,i=e.apiKey,a=e.authMode,o=e.algoliaAgents,n=e.region,s=p(e,y),c=function(e,t,r="WithinHeaders"){const i={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?i:{},queryParameters:()=>"WithinQueryParameters"===r?i:{}}}(r,i,a),d=m(w(w({hosts:(t=n,[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},s),{},{algoliaAgent:f({algoliaAgents:o,client:"Analytics",version:P}),baseHeaders:w(w({"content-type":"text/plain"},c.headers()),s.baseHeaders),baseQueryParameters:w(w({},c.queryParameters()),s.baseQueryParameters)}));return{transporter:d,get _ua(){return d.algoliaAgent.value},addAlgoliaAgent:function(e,t){d.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,i=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var a={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{}};return d.request(a,t)},get:function(e,t){var r=e.path,i=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var a={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{}};return d.request(a,t)},getAverageClickPosition:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:n,headers:{}};return d.request(s,t)},getClickPositions:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getClickPositions`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/positions",queryParameters:n,headers:{}};return d.request(s,t)},getClickThroughRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:n,headers:{}};return d.request(s,t)},getConversationRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getConversationRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/conversions/conversionRate",queryParameters:n,headers:{}};return d.request(s,t)},getNoClickRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/noClickRate",queryParameters:n,headers:{}};return d.request(s,t)},getNoResultsRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/noResultRate",queryParameters:n,headers:{}};return d.request(s,t)},getSearchesCount:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/count",queryParameters:n,headers:{}};return d.request(s,t)},getSearchesNoClicks:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/searches/noClicks",queryParameters:c,headers:{}};return d.request(u,t)},getSearchesNoResults:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/searches/noResults",queryParameters:c,headers:{}};return d.request(u,t)},getStatus:function(e,t){var r=e.index;if(!r)throw new Error("Parameter `index` is required when calling `getStatus`.");var i={};void 0!==r&&(i.index=r.toString());var a={method:"GET",path:"/2/status",queryParameters:i,headers:{}};return d.request(a,t)},getTopCountries:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopCountries`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/countries",queryParameters:c,headers:{}};return d.request(u,t)},getTopFilterAttributes:function(e,t){var r=e.index,i=e.search,a=e.startDate,o=e.endDate,n=e.limit,s=e.offset,c=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");var u={};void 0!==r&&(u.index=r.toString()),void 0!==i&&(u.search=i.toString()),void 0!==a&&(u.startDate=a.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==n&&(u.limit=n.toString()),void 0!==s&&(u.offset=s.toString()),void 0!==c&&(u.tags=c.toString());var l={method:"GET",path:"/2/filters",queryParameters:u,headers:{}};return d.request(l,t)},getTopFilterForAttribute:function(e,t){var r=e.attribute,i=e.index,a=e.search,o=e.startDate,n=e.endDate,s=e.limit,c=e.offset,u=e.tags;if(!r)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!i)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");var l="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(r)),g={};void 0!==i&&(g.index=i.toString()),void 0!==a&&(g.search=a.toString()),void 0!==o&&(g.startDate=o.toString()),void 0!==n&&(g.endDate=n.toString()),void 0!==s&&(g.limit=s.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());var h={method:"GET",path:l,queryParameters:g,headers:{}};return d.request(h,t)},getTopFiltersNoResults:function(e,t){var r=e.index,i=e.search,a=e.startDate,o=e.endDate,n=e.limit,s=e.offset,c=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");var u={};void 0!==r&&(u.index=r.toString()),void 0!==i&&(u.search=i.toString()),void 0!==a&&(u.startDate=a.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==n&&(u.limit=n.toString()),void 0!==s&&(u.offset=s.toString()),void 0!==c&&(u.tags=c.toString());var l={method:"GET",path:"/2/filters/noResults",queryParameters:u,headers:{}};return d.request(l,t)},getTopHits:function(e,t){var r=e.index,i=e.search,a=e.clickAnalytics,o=e.startDate,n=e.endDate,s=e.limit,c=e.offset,u=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopHits`.");var l={};void 0!==r&&(l.index=r.toString()),void 0!==i&&(l.search=i.toString()),void 0!==a&&(l.clickAnalytics=a.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==c&&(l.offset=c.toString()),void 0!==u&&(l.tags=u.toString());var g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return d.request(g,t)},getTopSearches:function(e,t){var r=e.index,i=e.clickAnalytics,a=e.startDate,o=e.endDate,n=e.orderBy,s=e.direction,c=e.limit,u=e.offset,l=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopSearches`.");var g={};void 0!==r&&(g.index=r.toString()),void 0!==i&&(g.clickAnalytics=i.toString()),void 0!==a&&(g.startDate=a.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==n&&(g.orderBy=n.toString()),void 0!==s&&(g.direction=s.toString()),void 0!==c&&(g.limit=c.toString()),void 0!==u&&(g.offset=u.toString()),void 0!==l&&(g.tags=l.toString());var h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return d.request(h,t)},getUsersCount:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getUsersCount`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/users/count",queryParameters:n,headers:{}};return d.request(s,t)},post:function(e,t){var r=e.path,i=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var o={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{},data:a||{}};return d.request(o,t)},put:function(e,t){var r=e.path,i=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var o={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{},data:a||{}};return d.request(o,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?b(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({appId:e,apiKey:o,region:n,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 i=(e,i)=>setTimeout((()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})}),e),a=i(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=i(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:a(),requestsCache:a({serializable:!1}),hostsCache:i({caches:[r({key:"".concat(P,"-").concat(e)}),a()]})},s))},e.apiClientVersion=P}));
/*! client-analytics.umd.js | 5.0.0-alpha.3 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-analytics"]={})}(this,(function(e){"use strict";function t(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function r(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(i().getItem(r)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),i=a()[r];return Promise.all([i||t(),void 0!==i])})).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,i().setItem(r,JSON.stringify(o)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function i(e){const t=[...e.caches],r=t.shift();return void 0===r?{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()})=>r.get(e,a,o).catch((()=>i({caches:t}).get(e,a,o))),set:(e,a)=>r.set(e,a).catch((()=>i({caches:t}).set(e,a))),delete:e=>r.delete(e).catch((()=>i({caches:t}).delete(e))),clear:()=>r.clear().catch((()=>i({caches:t}).clear()))}}function a(e={serializable:!0}){let t={};return{get(r,i,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=i();return n.then((e=>a.miss(e))).then((()=>n))},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function s(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class c extends Error{constructor(e,t){super(e),s(this,"name","AlgoliaError"),t&&(this.name=t)}}class d extends c{constructor(e,t,r){super(e,r),s(this,"stackTrace",void 0),this.stackTrace=t}}class u extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",e,"RetryError")}}class l extends d{constructor(e,t,r){super(e,r,"ApiError"),s(this,"status",void 0),this.status=t}}class g extends c{constructor(e,t){super(e,"DeserializationError"),s(this,"response",void 0),this.response=t}}function h(e,t,r){const i=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}=${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 i.length&&(a+=`?${i}`),a}function v(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 m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:a,timeouts:o,requester:s,requestsCache:c,responsesCache:d}){async function m(c,d,m=!0){const f=[],p=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,d),y=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},a={};return Object.keys(i).forEach((e=>{const t=i[e];a[e.toLowerCase()]=t})),a}(r,c.headers,d.headers),S="GET"===c.method?{...c.data,...d.data}:{},w={"x-algolia-agent":a.value,...i,...c.queryParameters,...S};if(d&&d.queryParameters)for(const e of Object.keys(d.queryParameters))d.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(d.queryParameters[e])?w[e]=d.queryParameters[e].toString():w[e]=d.queryParameters[e];let P=0;const q=async(e,r)=>{const i=e.pop();if(void 0===i)throw new u(function(e){return e.map((e=>v(e)))}(f));let a=d.timeout;void 0===a&&(a=m?o.read:o.write);const S={data:p,headers:y,method:c.method,url:h(i,c.path,w),connectTimeout:r(P,o.connect),responseTimeout:r(P,a)},b=t=>{const r={request:S,response:t,host:i,triesLeft:e.length};return f.push(r),r},O=await s.send(S);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)}(O)){const a=b(O);return O.isTimedOut&&P++,console.log("Retryable failure",v(a)),await t.set(i,n(i,O.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(O))return function(e){try{return JSON.parse(e.content)}catch(t){throw new g(t.message,e)}}(O);throw b(O),function({content:e,status:t},r){let i=e;try{i=JSON.parse(e).message}catch(e){}return new l(i,t,r)}(O,f)},b=e.filter((e=>"readWrite"===e.accept||(m?"read"===e.accept:"write"===e.accept))),O=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),i=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...i,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(b);return q([...O.hosts].reverse(),O.getTimeout)}return{hostsCache:t,requester:s,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return m(e,t,a);const o=()=>m(e,t);if(!0!==(t.cacheable||e.cacheable))return o();const n={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return d.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=>d.set(n,e)})},requestsCache:c,responsesCache:d}}function f({algoliaAgents:e,client:t,version:r}){const i=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=>i.add(e))),i}function p(e,t){if(null==e)return{};var r,i,a=function(e,t){if(null==e)return{};var r,i,a={},o=Object.keys(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)r=o[i],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var y=["appId","apiKey","authMode","algoliaAgents","region"];function S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function w(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?S(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):S(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}var P="5.0.0-alpha.3",q=["de","us"];function b(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}e.analyticsClient=function(e,o,n,s){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!q.includes(n)))throw new Error("`region` must be one of the following: ".concat(q.join(", ")));return function(e){var t,r=e.appId,i=e.apiKey,a=e.authMode,o=e.algoliaAgents,n=e.region,s=p(e,y),c=function(e,t,r="WithinHeaders"){const i={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?i:{},queryParameters:()=>"WithinQueryParameters"===r?i:{}}}(r,i,a),d=m(w(w({hosts:(t=n,[{url:t?"analytics.{region}.algolia.com".replace("{region}",t):"analytics.algolia.com",accept:"readWrite",protocol:"https"}])},s),{},{algoliaAgent:f({algoliaAgents:o,client:"Analytics",version:P}),baseHeaders:w(w({"content-type":"text/plain"},c.headers()),s.baseHeaders),baseQueryParameters:w(w({},c.queryParameters()),s.baseQueryParameters)}));return{transporter:d,get _ua(){return d.algoliaAgent.value},addAlgoliaAgent:function(e,t){d.algoliaAgent.add({segment:e,version:t})},del:function(e,t){var r=e.path,i=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `del`.");var a={method:"DELETE",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{}};return d.request(a,t)},get:function(e,t){var r=e.path,i=e.parameters;if(!r)throw new Error("Parameter `path` is required when calling `get`.");var a={method:"GET",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{}};return d.request(a,t)},getAverageClickPosition:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:n,headers:{}};return d.request(s,t)},getClickPositions:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getClickPositions`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/positions",queryParameters:n,headers:{}};return d.request(s,t)},getClickThroughRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:n,headers:{}};return d.request(s,t)},getConversationRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getConversationRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/conversions/conversionRate",queryParameters:n,headers:{}};return d.request(s,t)},getNoClickRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/noClickRate",queryParameters:n,headers:{}};return d.request(s,t)},getNoResultsRate:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/noResultRate",queryParameters:n,headers:{}};return d.request(s,t)},getSearchesCount:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/searches/count",queryParameters:n,headers:{}};return d.request(s,t)},getSearchesNoClicks:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/searches/noClicks",queryParameters:c,headers:{}};return d.request(u,t)},getSearchesNoResults:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/searches/noResults",queryParameters:c,headers:{}};return d.request(u,t)},getStatus:function(e,t){var r=e.index;if(!r)throw new Error("Parameter `index` is required when calling `getStatus`.");var i={};void 0!==r&&(i.index=r.toString());var a={method:"GET",path:"/2/status",queryParameters:i,headers:{}};return d.request(a,t)},getTopCountries:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.limit,n=e.offset,s=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopCountries`.");var c={};void 0!==r&&(c.index=r.toString()),void 0!==i&&(c.startDate=i.toString()),void 0!==a&&(c.endDate=a.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==n&&(c.offset=n.toString()),void 0!==s&&(c.tags=s.toString());var u={method:"GET",path:"/2/countries",queryParameters:c,headers:{}};return d.request(u,t)},getTopFilterAttributes:function(e,t){var r=e.index,i=e.search,a=e.startDate,o=e.endDate,n=e.limit,s=e.offset,c=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");var u={};void 0!==r&&(u.index=r.toString()),void 0!==i&&(u.search=i.toString()),void 0!==a&&(u.startDate=a.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==n&&(u.limit=n.toString()),void 0!==s&&(u.offset=s.toString()),void 0!==c&&(u.tags=c.toString());var l={method:"GET",path:"/2/filters",queryParameters:u,headers:{}};return d.request(l,t)},getTopFilterForAttribute:function(e,t){var r=e.attribute,i=e.index,a=e.search,o=e.startDate,n=e.endDate,s=e.limit,c=e.offset,u=e.tags;if(!r)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!i)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");var l="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(r)),g={};void 0!==i&&(g.index=i.toString()),void 0!==a&&(g.search=a.toString()),void 0!==o&&(g.startDate=o.toString()),void 0!==n&&(g.endDate=n.toString()),void 0!==s&&(g.limit=s.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());var h={method:"GET",path:l,queryParameters:g,headers:{}};return d.request(h,t)},getTopFiltersNoResults:function(e,t){var r=e.index,i=e.search,a=e.startDate,o=e.endDate,n=e.limit,s=e.offset,c=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");var u={};void 0!==r&&(u.index=r.toString()),void 0!==i&&(u.search=i.toString()),void 0!==a&&(u.startDate=a.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==n&&(u.limit=n.toString()),void 0!==s&&(u.offset=s.toString()),void 0!==c&&(u.tags=c.toString());var l={method:"GET",path:"/2/filters/noResults",queryParameters:u,headers:{}};return d.request(l,t)},getTopHits:function(e,t){var r=e.index,i=e.search,a=e.clickAnalytics,o=e.startDate,n=e.endDate,s=e.limit,c=e.offset,u=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopHits`.");var l={};void 0!==r&&(l.index=r.toString()),void 0!==i&&(l.search=i.toString()),void 0!==a&&(l.clickAnalytics=a.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==n&&(l.endDate=n.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==c&&(l.offset=c.toString()),void 0!==u&&(l.tags=u.toString());var g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return d.request(g,t)},getTopSearches:function(e,t){var r=e.index,i=e.clickAnalytics,a=e.startDate,o=e.endDate,n=e.orderBy,s=e.direction,c=e.limit,u=e.offset,l=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getTopSearches`.");var g={};void 0!==r&&(g.index=r.toString()),void 0!==i&&(g.clickAnalytics=i.toString()),void 0!==a&&(g.startDate=a.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==n&&(g.orderBy=n.toString()),void 0!==s&&(g.direction=s.toString()),void 0!==c&&(g.limit=c.toString()),void 0!==u&&(g.offset=u.toString()),void 0!==l&&(g.tags=l.toString());var h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return d.request(h,t)},getUsersCount:function(e,t){var r=e.index,i=e.startDate,a=e.endDate,o=e.tags;if(!r)throw new Error("Parameter `index` is required when calling `getUsersCount`.");var n={};void 0!==r&&(n.index=r.toString()),void 0!==i&&(n.startDate=i.toString()),void 0!==a&&(n.endDate=a.toString()),void 0!==o&&(n.tags=o.toString());var s={method:"GET",path:"/2/users/count",queryParameters:n,headers:{}};return d.request(s,t)},post:function(e,t){var r=e.path,i=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `post`.");var o={method:"POST",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{},data:a||{}};return d.request(o,t)},put:function(e,t){var r=e.path,i=e.parameters,a=e.body;if(!r)throw new Error("Parameter `path` is required when calling `put`.");var o={method:"PUT",path:"/1{path}".replace("{path}",r),queryParameters:i||{},headers:{},data:a||{}};return d.request(o,t)}}}(function(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?b(Object(i),!0).forEach((function(r){t(e,r,i[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):b(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({appId:e,apiKey:o,region:n,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 i=(e,i)=>setTimeout((()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})}),e),a=i(e.connectTimeout,"Connection timeout");let o;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===o&&(clearTimeout(a),o=i(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:a(),requestsCache:a({serializable:!1}),hostsCache:i({caches:[r({key:"".concat(P,"-").concat(e)}),a()]})},s))},e.apiClientVersion=P}));

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

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

@@ -23,0 +23,0 @@ export declare type Region = typeof REGIONS[number];

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

average: number;
/**

@@ -13,2 +14,3 @@ * The number of click event.

clickCount: number;
/**

@@ -15,0 +17,0 @@ * Date of the event.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

position: number[];
/**

@@ -10,0 +11,0 @@ * The number of click event.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -13,2 +14,3 @@ * The number of click event.

clickCount: number;
/**

@@ -18,2 +20,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -20,0 +23,0 @@ * Date of the event.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -13,2 +14,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -18,2 +20,3 @@ * The number of converted clicks.

conversionCount: number;
/**

@@ -20,0 +23,0 @@ * Date of the event.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

average: number;
/**

@@ -15,2 +16,3 @@ * The number of click event.

clickCount: number;
/**

@@ -17,0 +19,0 @@ * A list of average click position with their date.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -15,2 +16,3 @@ * The number of click event.

clickCount: number;
/**

@@ -20,2 +22,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -22,0 +25,0 @@ * A list of click-through rate events with their date.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -15,2 +16,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -20,2 +22,3 @@ * The number of converted clicks.

conversionCount: number;
/**

@@ -22,0 +25,0 @@ * A list of conversion events with their date.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -15,2 +16,3 @@ * The number of click event.

count: number;
/**

@@ -20,2 +22,3 @@ * The number of click event.

noClickCount: number;
/**

@@ -22,0 +25,0 @@ * A list of searches without clicks with their date, rate and counts.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -15,2 +16,3 @@ * The number of occurrences.

count: number;
/**

@@ -20,2 +22,3 @@ * The number of occurrences.

noResultCount: number;
/**

@@ -22,0 +25,0 @@ * A list of searches without results with their date, rate and counts.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

count: number;
/**

@@ -12,0 +13,0 @@ * A list of search events with their date and count.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

attribute: string;
/**

@@ -10,0 +11,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

attribute: string;
/**

@@ -13,2 +14,3 @@ * The operator.

operator: string;
/**

@@ -18,2 +20,3 @@ * The value of the attribute.

value: string;
/**

@@ -20,0 +23,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

attribute: string;
/**

@@ -13,2 +14,3 @@ * The operator.

operator: string;
/**

@@ -15,0 +17,0 @@ * The value of the attribute.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

count: number;
/**

@@ -12,0 +13,0 @@ * A list of filters without results.

@@ -10,2 +10,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

count: number;
/**

@@ -12,0 +13,0 @@ * A list of users count with their date.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

rate: number;
/**

@@ -13,2 +14,3 @@ * The number of click event.

count: number;
/**

@@ -18,2 +20,3 @@ * The number of click event.

noClickCount: number;
/**

@@ -20,0 +23,0 @@ * Date of the event.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

date: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

noResultCount: number;
/**

@@ -18,2 +20,3 @@ * The number of occurrences.

count: number;
/**

@@ -20,0 +23,0 @@ * The click-through rate.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

date: string;
/**

@@ -10,0 +11,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

search: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

count: number;
/**

@@ -15,0 +17,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

search: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

count: number;
/**

@@ -15,0 +17,0 @@ * Number of hits that the search query matched.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

country: string;
/**

@@ -10,0 +11,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

hit: string;
/**

@@ -10,0 +11,0 @@ * The number of occurrences.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

hit: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

count: number;
/**

@@ -18,2 +20,3 @@ * The click-through rate.

clickThroughRate: number;
/**

@@ -23,2 +26,3 @@ * The conversion rate.

conversionRate: number;
/**

@@ -28,2 +32,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -33,2 +38,3 @@ * The number of click event.

clickCount: number;
/**

@@ -35,0 +41,0 @@ * The number of converted clicks.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

search: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

count: number;
/**

@@ -15,0 +17,0 @@ * Number of hits that the search query matched.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

search: string;
/**

@@ -13,2 +14,3 @@ * The number of occurrences.

count: number;
/**

@@ -18,2 +20,3 @@ * The click-through rate.

clickThroughRate: number;
/**

@@ -23,2 +26,3 @@ * The average position of all the click count event.

averageClickPosition: number;
/**

@@ -28,2 +32,3 @@ * The conversion rate.

conversionRate: number;
/**

@@ -33,2 +38,3 @@ * The number of tracked search click.

trackedSearchCount: number;
/**

@@ -38,2 +44,3 @@ * The number of click event.

clickCount: number;
/**

@@ -43,2 +50,3 @@ * The number of converted clicks.

conversionCount: number;
/**

@@ -45,0 +53,0 @@ * Number of hits that the search query matched.

@@ -8,2 +8,3 @@ // This file is generated, manual changes will be lost - read more on https://github.com/algolia/api-clients-automation.

date: string;
/**

@@ -10,0 +11,0 @@ * The number of occurrences.

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

@@ -24,5 +24,5 @@ "repository": "algolia/algoliasearch-client-javascript",

"dependencies": {
"@algolia/client-common": "5.0.0-alpha.2",
"@algolia/requester-browser-xhr": "5.0.0-alpha.2",
"@algolia/requester-node-http": "5.0.0-alpha.2"
"@algolia/client-common": "5.0.0-alpha.3",
"@algolia/requester-browser-xhr": "5.0.0-alpha.3",
"@algolia/requester-node-http": "5.0.0-alpha.3"
},

@@ -29,0 +29,0 @@ "devDependencies": {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc