@algolia/client-analytics
Advanced tools
Comparing version 5.1.1 to 5.2.1
@@ -15,6 +15,6 @@ import type { ClientOptions } from '@algolia/client-common'; | ||
addAlgoliaAgent(segment: string, version?: string): void; | ||
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
getAddToCartRate({ index, startDate, endDate, tags }: import("../model").GetAddToCartRateProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetAddToCartRateResponse>; | ||
@@ -30,10 +30,10 @@ getAverageClickPosition({ index, startDate, endDate, tags }: import("../model").GetAverageClickPositionProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetAverageClickPositionResponse>; | ||
getSearchesCount({ index, startDate, endDate, tags }: import("../model").GetSearchesCountProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesCountResponse>; | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }: import("../model").GetSearchesNoClicksProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoClicksResponse>; | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }: import("../model").GetSearchesNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoResultsResponse>; | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: import("../model").GetSearchesNoClicksProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoClicksResponse>; | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: import("../model").GetSearchesNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoResultsResponse>; | ||
getStatus({ index }: import("../model").GetStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetStatusResponse>; | ||
getTopCountries({ index, startDate, endDate, limit, offset, tags }: import("../model").GetTopCountriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopCountriesResponse>; | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFilterAttributesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterAttributesResponse>; | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFilterForAttributeProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterForAttributeResponse>; | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFiltersNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFiltersNoResultsResponse>; | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }: import("../model").GetTopHitsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopHitsResponse>; | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFilterAttributesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterAttributesResponse>; | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFilterForAttributeProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterForAttributeResponse>; | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFiltersNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFiltersNoResultsResponse>; | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: import("../model").GetTopHitsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopHitsResponse>; | ||
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: import("../model").GetTopSearchesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopSearchesResponse>; | ||
@@ -40,0 +40,0 @@ getUsersCount({ index, startDate, endDate, tags }: import("../model").GetUsersCountProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetUsersCountResponse>; |
@@ -15,6 +15,6 @@ import type { ClientOptions } from '@algolia/client-common'; | ||
addAlgoliaAgent(segment: string, version?: string): void; | ||
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, any>>; | ||
customDelete({ path, parameters }: import("../model").CustomDeleteProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customGet({ path, parameters }: import("../model").CustomGetProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customPost({ path, parameters, body }: import("../model").CustomPostProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
customPut({ path, parameters, body }: import("../model").CustomPutProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<Record<string, unknown>>; | ||
getAddToCartRate({ index, startDate, endDate, tags }: import("../model").GetAddToCartRateProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetAddToCartRateResponse>; | ||
@@ -30,10 +30,10 @@ getAverageClickPosition({ index, startDate, endDate, tags }: import("../model").GetAverageClickPositionProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetAverageClickPositionResponse>; | ||
getSearchesCount({ index, startDate, endDate, tags }: import("../model").GetSearchesCountProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesCountResponse>; | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }: import("../model").GetSearchesNoClicksProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoClicksResponse>; | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }: import("../model").GetSearchesNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoResultsResponse>; | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: import("../model").GetSearchesNoClicksProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoClicksResponse>; | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: import("../model").GetSearchesNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetSearchesNoResultsResponse>; | ||
getStatus({ index }: import("../model").GetStatusProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetStatusResponse>; | ||
getTopCountries({ index, startDate, endDate, limit, offset, tags }: import("../model").GetTopCountriesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopCountriesResponse>; | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFilterAttributesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterAttributesResponse>; | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFilterForAttributeProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterForAttributeResponse>; | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }: import("../model").GetTopFiltersNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFiltersNoResultsResponse>; | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }: import("../model").GetTopHitsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopHitsResponse>; | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFilterAttributesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterAttributesResponse>; | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFilterForAttributeProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFilterForAttributeResponse>; | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: import("../model").GetTopFiltersNoResultsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopFiltersNoResultsResponse>; | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: import("../model").GetTopHitsProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopHitsResponse>; | ||
getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: import("../model").GetTopSearchesProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetTopSearchesResponse>; | ||
@@ -40,0 +40,0 @@ getUsersCount({ index, startDate, endDate, tags }: import("../model").GetUsersCountProps, requestOptions?: import("@algolia/client-common").RequestOptions): Promise<import("../model").GetUsersCountResponse>; |
@@ -5,8 +5,6 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT_NODE, DEFAULT_READ_TIMEOUT_NODE, DEFAULT_WRITE_TIMEOUT_NODE, createNullCache, createMemoryCache } from '@algolia/client-common'; | ||
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
const apiClientVersion = '5.1.1'; | ||
const apiClientVersion = '5.2.1'; | ||
const REGIONS = ['de', 'us']; | ||
function getDefaultHosts(region) { | ||
const url = !region | ||
? 'analytics.algolia.com' | ||
: 'analytics.{region}.algolia.com'.replace('{region}', region); | ||
const url = !region ? 'analytics.algolia.com' : 'analytics.{region}.algolia.com'.replace('{region}', region); | ||
return [{ url, accept: 'readWrite', protocol: 'https' }]; | ||
@@ -45,6 +43,3 @@ } | ||
clearCache() { | ||
return Promise.all([ | ||
transporter.requestsCache.clear(), | ||
transporter.responsesCache.clear(), | ||
]).then(() => undefined); | ||
return Promise.all([transporter.requestsCache.clear(), transporter.responsesCache.clear()]).then(() => undefined); | ||
}, | ||
@@ -577,3 +572,3 @@ /** | ||
*/ | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!index) { | ||
@@ -626,3 +621,3 @@ throw new Error('Parameter `index` is required when calling `getSearchesNoClicks`.'); | ||
*/ | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!index) { | ||
@@ -752,3 +747,3 @@ throw new Error('Parameter `index` is required when calling `getSearchesNoResults`.'); | ||
*/ | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!index) { | ||
@@ -806,3 +801,3 @@ throw new Error('Parameter `index` is required when calling `getTopFilterAttributes`.'); | ||
*/ | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!attribute) { | ||
@@ -862,3 +857,3 @@ throw new Error('Parameter `attribute` is required when calling `getTopFilterForAttribute`.'); | ||
*/ | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!index) { | ||
@@ -917,3 +912,3 @@ throw new Error('Parameter `index` is required when calling `getTopFiltersNoResults`.'); | ||
*/ | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }, requestOptions) { | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }, requestOptions) { | ||
if (!index) { | ||
@@ -920,0 +915,0 @@ throw new Error('Parameter `index` is required when calling `getTopHits`.'); |
@@ -1,2 +0,2 @@ | ||
/*! client-analytics.umd.js | 5.1.1 | © 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){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(i().getItem(r)||"{}")}function s(e){i().setItem(r,JSON.stringify(e))}return{get:(t,r,i={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),i=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(i),!t)return;s(Object.fromEntries(Object.entries(i).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||i.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function r(e){const t=[...e.caches],i=t.shift();return void 0===i?{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,o,s={miss:()=>Promise.resolve()})=>i.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>i.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>i.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>i.clear().catch((()=>r({caches:t}).clear()))}}function i(e={serializable:!0}){let t={};return{get(r,i,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then((e=>o.miss(e))).then((()=>a))},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 s(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 a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class n extends Error{constructor(e,t){super(e),a(this,"name","AlgoliaError"),t&&(this.name=t)}}class d extends n{constructor(e,t,r){super(e,r),a(this,"stackTrace",void 0),this.stackTrace=t}}class c extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class u extends d{constructor(e,t,r,i="ApiError"){super(e,r,i),a(this,"status",void 0),this.status=t}}class l extends n{constructor(e,t){super(e,"DeserializationError"),a(this,"response",void 0),this.response=t}}class g extends u{constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),a(this,"error",void 0),this.error=r}}function h(e,t,r){const i=(o=r,Object.keys(o).filter((e=>void 0!==o[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(o[e])?o[e].join(","):o[e]).replaceAll("+","%20")}`)).join("&"));var o;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(s+=`?${i}`),s}function m(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 v({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:o,timeouts:a,requester:n,requestsCache:d,responsesCache:v}){async function p(d,v,p=!0){const f=[],S=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)}(d,v),w=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e.toLowerCase()]=t})),o}(r,d.headers,v.headers),y="GET"===d.method?{...d.data,...v.data}:{},P={...i,...d.queryParameters,...y};if(o.value&&(P["x-algolia-agent"]=o.value),v&&v.queryParameters)for(const e of Object.keys(v.queryParameters))v.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(v.queryParameters[e])?P[e]=v.queryParameters[e].toString():P[e]=v.queryParameters[e];let q=0;const D=async(e,r)=>{const i=e.pop();if(void 0===i)throw new c(function(e){return e.map((e=>m(e)))}(f));let o=p?v.timeouts?.read||a.read:v.timeouts?.write||a.write;const y={data:S,headers:w,method:d.method,url:h(i,d.path,P),connectTimeout:r(q,v.timeouts?.connect||a.connect),responseTimeout:r(q,o)},T=t=>{const r={request:y,response:t,host:i,triesLeft:e.length};return f.push(r),r},x=await n.send(y);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(x)){const o=T(x);return x.isTimedOut&&q++,console.log("Retryable failure",m(o)),await t.set(i,s(i,x.isTimedOut?"timed out":"down")),D(e,r)}if(function({status:e}){return 2==~~(e/100)}(x))return function(e){try{return JSON.parse(e.content)}catch(t){throw new l(t.message,e)}}(x);throw T(x),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new g(i.message,t,i.error,r):new u(i.message,t,r)}catch(e){}return new u(e,t,r)}(x,f)},T=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),x=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),i=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),a=[...i,...o];return{hosts:a.length>0?a:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return D([...x.hosts].reverse(),x.getTimeout)}return{hostsCache:t,requester:n,timeouts:a,algoliaAgent:o,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return p(e,t,o);const s=()=>p(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const a={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return v.get(a,(()=>d.get(a,(()=>d.set(a,s()).then((e=>Promise.all([d.delete(a),e])),(e=>Promise.all([d.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>v.set(a,e)})},requestsCache:d,responsesCache:v}}function p({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}const f="5.1.1",S=["de","us"];e.analyticsClient=function(e,o,s,a){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");if(s&&("string"!=typeof s||!S.includes(s)))throw new Error(`\`region\` must be one of the following: ${S.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:i,region:o,...s}){const a=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:{}}}(e,t,r),n=v({hosts:(d=o,[{url:d?"analytics.{region}.algolia.com".replace("{region}",d):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:p({algoliaAgents:i,client:"Analytics",version:f}),baseHeaders:{"content-type":"text/plain",...a.headers(),...s.baseHeaders},baseQueryParameters:{...a.queryParameters(),...s.baseQueryParameters}});var d;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})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const i={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const i={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customPost({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},customPut({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},getAddToCartRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return n.request(a,o)},getAverageClickPosition({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return n.request(a,o)},getClickPositions({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return n.request(a,o)},getClickThroughRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return n.request(a,o)},getConversionRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoClickRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoResultsRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return n.request(a,o)},getPurchaseRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return n.request(a,o)},getRevenue({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesNoClicks({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:d,headers:{}};return n.request(c,a)},getSearchesNoResults({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:d,headers:{}};return n.request(c,a)},getStatus({index:e},t){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const r={};void 0!==e&&(r.index=e.toString());const i={method:"GET",path:"/2/status",queryParameters:r,headers:{}};return n.request(i,t)},getTopCountries({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:d,headers:{}};return n.request(c,a)},getTopFilterAttributes({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return n.request(u,d)},getTopFilterForAttribute({attribute:e,index:t,search:r,startDate:i,endDate:o,limit:s,offset:a,tags:d},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==t&&(l.index=t.toString()),void 0!==r&&(l.search=r.toString()),void 0!==i&&(l.startDate=i.toString()),void 0!==o&&(l.endDate=o.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==a&&(l.offset=a.toString()),void 0!==d&&(l.tags=d.toString());const g={method:"GET",path:u,queryParameters:l,headers:{}};return n.request(g,c)},getTopFiltersNoResults({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return n.request(u,d)},getTopHits({index:e,search:t,clickAnalytics:r,revenueAnalytics:i,startDate:o,endDate:s,limit:a,offset:d,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==t&&(l.search=t.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==i&&(l.revenueAnalytics=i.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==s&&(l.endDate=s.toString()),void 0!==a&&(l.limit=a.toString()),void 0!==d&&(l.offset=d.toString()),void 0!==c&&(l.tags=c.toString());const g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return n.request(g,u)},getTopSearches({index:e,clickAnalytics:t,revenueAnalytics:r,startDate:i,endDate:o,orderBy:s,direction:a,limit:d,offset:c,tags:u},l){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const g={};void 0!==e&&(g.index=e.toString()),void 0!==t&&(g.clickAnalytics=t.toString()),void 0!==r&&(g.revenueAnalytics=r.toString()),void 0!==i&&(g.startDate=i.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==s&&(g.orderBy=s.toString()),void 0!==a&&(g.direction=a.toString()),void 0!==d&&(g.limit=d.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());const h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return n.request(h,l)},getUsersCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return n.request(a,o)}}}({appId:e,apiKey:o,region:s,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),o=i(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=i(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:r({caches:[t({key:`${f}-${e}`}),i()]}),...a})},e.apiClientVersion=f})); | ||
/*! client-analytics.umd.js | 5.2.1 | © 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){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(i().getItem(r)||"{}")}function s(e){i().setItem(r,JSON.stringify(e))}return{get:(t,r,i={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),i=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(i),!t)return;s(Object.fromEntries(Object.entries(i).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||i.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function r(e){const t=[...e.caches],i=t.shift();return void 0===i?{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,o,s={miss:()=>Promise.resolve()})=>i.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>i.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>i.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>i.clear().catch((()=>r({caches:t}).clear()))}}function i(e={serializable:!0}){let t={};return{get(r,i,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then((e=>o.miss(e))).then((()=>a))},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 s(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 a(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class n extends Error{constructor(e,t){super(e),a(this,"name","AlgoliaError"),t&&(this.name=t)}}class d extends n{constructor(e,t,r){super(e,r),a(this,"stackTrace",void 0),this.stackTrace=t}}class c extends d{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please reach out to the Algolia Support team: https://alg.li/support.",e,"RetryError")}}class u extends d{constructor(e,t,r,i="ApiError"){super(e,r,i),a(this,"status",void 0),this.status=t}}class l extends n{constructor(e,t){super(e,"DeserializationError"),a(this,"response",void 0),this.response=t}}class g extends u{constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),a(this,"error",void 0),this.error=r}}function h(e,t,r){const i=(o=r,Object.keys(o).filter((e=>void 0!==o[e])).sort().map((e=>`${e}=${encodeURIComponent("[object Array]"===Object.prototype.toString.call(o[e])?o[e].join(","):o[e]).replaceAll("+","%20")}`)).join("&"));var o;let s=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(s+=`?${i}`),s}function m(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 v({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:o,timeouts:a,requester:n,requestsCache:d,responsesCache:v}){async function p(d,v,p=!0){const f=[],S=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)}(d,v),w=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e.toLowerCase()]=t})),o}(r,d.headers,v.headers),y="GET"===d.method?{...d.data,...v.data}:{},P={...i,...d.queryParameters,...y};if(o.value&&(P["x-algolia-agent"]=o.value),v&&v.queryParameters)for(const e of Object.keys(v.queryParameters))v.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(v.queryParameters[e])?P[e]=v.queryParameters[e].toString():P[e]=v.queryParameters[e];let q=0;const D=async(e,r)=>{const i=e.pop();if(void 0===i)throw new c(function(e){return e.map((e=>m(e)))}(f));const o={...a,...v.timeouts},y={data:S,headers:w,method:d.method,url:h(i,d.path,P),connectTimeout:r(q,o.connect),responseTimeout:r(q,p?o.read:o.write)},T=t=>{const r={request:y,response:t,host:i,triesLeft:e.length};return f.push(r),r},x=await n.send(y);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(x)){const o=T(x);return x.isTimedOut&&q++,console.log("Retryable failure",m(o)),await t.set(i,s(i,x.isTimedOut?"timed out":"down")),D(e,r)}if(function({status:e}){return 2==~~(e/100)}(x))return function(e){try{return JSON.parse(e.content)}catch(t){throw new l(t.message,e)}}(x);throw T(x),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new g(i.message,t,i.error,r):new u(i.message,t,r)}catch{}return new u(e,t,r)}(x,f)},T=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),x=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),i=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),a=[...i,...o];return{hosts:a.length>0?a:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return D([...x.hosts].reverse(),x.getTimeout)}return{hostsCache:t,requester:n,timeouts:a,algoliaAgent:o,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return p(e,t,o);const s=()=>p(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const a={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return v.get(a,(()=>d.get(a,(()=>d.set(a,s()).then((e=>Promise.all([d.delete(a),e])),(e=>Promise.all([d.delete(a),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>v.set(a,e)})},requestsCache:d,responsesCache:v}}function p({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}const f="5.2.1",S=["de","us"];e.analyticsClient=function(e,o,s,a){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!o||"string"!=typeof o)throw new Error("`apiKey` is missing.");if(s&&("string"!=typeof s||!S.includes(s)))throw new Error(`\`region\` must be one of the following: ${S.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:i,region:o,...s}){const a=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:{}}}(e,t,r),n=v({hosts:(d=o,[{url:d?"analytics.{region}.algolia.com".replace("{region}",d):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:p({algoliaAgents:i,client:"Analytics",version:f}),baseHeaders:{"content-type":"text/plain",...a.headers(),...s.baseHeaders},baseQueryParameters:{...a.queryParameters(),...s.baseQueryParameters}});var d;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})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const i={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const i={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customPost({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},customPut({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},getAddToCartRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return n.request(a,o)},getAverageClickPosition({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return n.request(a,o)},getClickPositions({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return n.request(a,o)},getClickThroughRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return n.request(a,o)},getConversionRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoClickRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoResultsRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return n.request(a,o)},getPurchaseRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return n.request(a,o)},getRevenue({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesNoClicks({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:d,headers:{}};return n.request(c,a)},getSearchesNoResults({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:d,headers:{}};return n.request(c,a)},getStatus({index:e},t){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const r={};void 0!==e&&(r.index=e.toString());const i={method:"GET",path:"/2/status",queryParameters:r,headers:{}};return n.request(i,t)},getTopCountries({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:d,headers:{}};return n.request(c,a)},getTopFilterAttributes({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return n.request(u,d)},getTopFilterForAttribute({attribute:e,index:t,search:r,startDate:i,endDate:o,limit:s,offset:a,tags:d},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==t&&(l.index=t.toString()),void 0!==r&&(l.search=r.toString()),void 0!==i&&(l.startDate=i.toString()),void 0!==o&&(l.endDate=o.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==a&&(l.offset=a.toString()),void 0!==d&&(l.tags=d.toString());const g={method:"GET",path:u,queryParameters:l,headers:{}};return n.request(g,c)},getTopFiltersNoResults({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return n.request(u,d)},getTopHits({index:e,search:t,clickAnalytics:r,revenueAnalytics:i,startDate:o,endDate:s,limit:a,offset:d,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==t&&(l.search=t.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==i&&(l.revenueAnalytics=i.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==s&&(l.endDate=s.toString()),void 0!==a&&(l.limit=a.toString()),void 0!==d&&(l.offset=d.toString()),void 0!==c&&(l.tags=c.toString());const g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return n.request(g,u)},getTopSearches({index:e,clickAnalytics:t,revenueAnalytics:r,startDate:i,endDate:o,orderBy:s,direction:a,limit:d,offset:c,tags:u},l){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const g={};void 0!==e&&(g.index=e.toString()),void 0!==t&&(g.clickAnalytics=t.toString()),void 0!==r&&(g.revenueAnalytics=r.toString()),void 0!==i&&(g.startDate=i.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==s&&(g.orderBy=s.toString()),void 0!==a&&(g.direction=a.toString()),void 0!==d&&(g.limit=d.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());const h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return n.request(h,l)},getUsersCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return n.request(a,o)}}}({appId:e,apiKey:o,region:s,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),o=i(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=i(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:r({caches:[t({key:`${f}-${e}`}),i()]}),...a})},e.apiClientVersion=f})); |
@@ -44,3 +44,3 @@ import type { Direction } from './direction'; | ||
*/ | ||
body?: Record<string, any>; | ||
body?: Record<string, unknown>; | ||
}; | ||
@@ -62,3 +62,3 @@ /** | ||
*/ | ||
body?: Record<string, any>; | ||
body?: Record<string, unknown>; | ||
}; | ||
@@ -65,0 +65,0 @@ /** |
@@ -1,2 +0,2 @@ | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
export type DailyRevenue = { | ||
@@ -6,3 +6,3 @@ /** | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
/** | ||
@@ -9,0 +9,0 @@ * Date in the format YYYY-MM-DD. |
@@ -1,2 +0,2 @@ | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
import type { DailyRevenue } from './dailyRevenue'; | ||
@@ -7,3 +7,3 @@ export type GetRevenue = { | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
/** | ||
@@ -10,0 +10,0 @@ * Daily revenue. |
export * from './clickPosition'; | ||
export * from './currenciesValue'; | ||
export * from './currencyCode'; | ||
export * from './dailyAddToCartRates'; | ||
@@ -4,0 +4,0 @@ export * from './dailyAverageClicks'; |
@@ -1,2 +0,2 @@ | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
export type TopHitWithRevenueAnalytics = { | ||
@@ -50,4 +50,4 @@ /** | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
}; | ||
//# sourceMappingURL=topHitWithRevenueAnalytics.d.ts.map |
import type { ClickPosition } from './clickPosition'; | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
export type TopSearchWithRevenueAnalytics = { | ||
@@ -47,3 +47,3 @@ /** | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
/** | ||
@@ -50,0 +50,0 @@ * Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true. |
@@ -23,3 +23,3 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common'; | ||
import type { GetUsersCountResponse } from '../model/getUsersCountResponse'; | ||
export declare const apiClientVersion = "5.1.1"; | ||
export declare const apiClientVersion = "5.2.1"; | ||
export declare const REGIONS: readonly ["de", "us"]; | ||
@@ -58,3 +58,3 @@ export type Region = (typeof REGIONS)[number]; | ||
*/ | ||
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, any>>; | ||
customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>; | ||
/** | ||
@@ -68,3 +68,3 @@ * This method allow you to send requests to the Algolia REST API. | ||
*/ | ||
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, any>>; | ||
customGet({ path, parameters }: CustomGetProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>; | ||
/** | ||
@@ -79,3 +79,3 @@ * This method allow you to send requests to the Algolia REST API. | ||
*/ | ||
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, any>>; | ||
customPost({ path, parameters, body }: CustomPostProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>; | ||
/** | ||
@@ -90,3 +90,3 @@ * This method allow you to send requests to the Algolia REST API. | ||
*/ | ||
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, any>>; | ||
customPut({ path, parameters, body }: CustomPutProps, requestOptions?: RequestOptions): Promise<Record<string, unknown>>; | ||
/** | ||
@@ -247,3 +247,3 @@ * Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day. | ||
*/ | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags, }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>; | ||
getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, requestOptions?: RequestOptions): Promise<GetSearchesNoClicksResponse>; | ||
/** | ||
@@ -264,3 +264,3 @@ * Retrieves the most popular searches that didn\'t return any results. | ||
*/ | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags, }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>; | ||
getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, requestOptions?: RequestOptions): Promise<GetSearchesNoResultsResponse>; | ||
/** | ||
@@ -309,3 +309,3 @@ * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes. | ||
*/ | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags, }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>; | ||
getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, requestOptions?: RequestOptions): Promise<GetTopFilterAttributesResponse>; | ||
/** | ||
@@ -328,3 +328,3 @@ * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting. | ||
*/ | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags, }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>; | ||
getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, requestOptions?: RequestOptions): Promise<GetTopFilterForAttributeResponse>; | ||
/** | ||
@@ -346,3 +346,3 @@ * Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation. | ||
*/ | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags, }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>; | ||
getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, requestOptions?: RequestOptions): Promise<GetTopFiltersNoResultsResponse>; | ||
/** | ||
@@ -366,3 +366,3 @@ * Retrieves the object IDs of the most frequent search results. | ||
*/ | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags, }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>; | ||
getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, requestOptions?: RequestOptions): Promise<GetTopHitsResponse>; | ||
/** | ||
@@ -369,0 +369,0 @@ * Returns the most popular search terms. |
@@ -49,3 +49,3 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
*/ | ||
body?: Record<string, any>; | ||
body?: Record<string, unknown>; | ||
}; | ||
@@ -68,3 +68,3 @@ | ||
*/ | ||
body?: Record<string, any>; | ||
body?: Record<string, unknown>; | ||
}; | ||
@@ -71,0 +71,0 @@ |
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
@@ -9,3 +9,3 @@ export type DailyRevenue = { | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
@@ -12,0 +12,0 @@ /** |
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
import type { DailyRevenue } from './dailyRevenue'; | ||
@@ -10,3 +10,3 @@ | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
@@ -13,0 +13,0 @@ /** |
@@ -7,5 +7,2 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
export type GetTopHitsResponse = | ||
| TopHitsResponse | ||
| TopHitsResponseWithAnalytics | ||
| TopHitsResponseWithRevenueAnalytics; | ||
export type GetTopHitsResponse = TopHitsResponse | TopHitsResponseWithAnalytics | TopHitsResponseWithRevenueAnalytics; |
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
export * from './clickPosition'; | ||
export * from './currenciesValue'; | ||
export * from './currencyCode'; | ||
export * from './dailyAddToCartRates'; | ||
@@ -6,0 +6,0 @@ export * from './dailyAverageClicks'; |
@@ -6,6 +6,2 @@ // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
*/ | ||
export type OrderBy = | ||
| 'averageClickPosition' | ||
| 'clickThroughRate' | ||
| 'conversionRate' | ||
| 'searchCount'; | ||
export type OrderBy = 'averageClickPosition' | 'clickThroughRate' | 'conversionRate' | 'searchCount'; |
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
@@ -64,3 +64,3 @@ export type TopHitWithRevenueAnalytics = { | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
}; |
// Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT. | ||
import type { ClickPosition } from './clickPosition'; | ||
import type { CurrenciesValue } from './currenciesValue'; | ||
import type { CurrencyCode } from './currencyCode'; | ||
@@ -60,3 +60,3 @@ export type TopSearchWithRevenueAnalytics = { | ||
*/ | ||
currencies: Record<string, CurrenciesValue>; | ||
currencies: Record<string, CurrencyCode>; | ||
@@ -63,0 +63,0 @@ /** |
{ | ||
"name": "@algolia/client-analytics", | ||
"version": "5.1.1", | ||
"version": "5.2.1", | ||
"description": "JavaScript client for client-analytics", | ||
@@ -47,9 +47,9 @@ "repository": { | ||
"dependencies": { | ||
"@algolia/client-common": "5.1.1", | ||
"@algolia/requester-browser-xhr": "5.1.1", | ||
"@algolia/requester-node-http": "5.1.1" | ||
"@algolia/client-common": "5.2.1", | ||
"@algolia/requester-browser-xhr": "5.2.1", | ||
"@algolia/requester-node-http": "5.2.1" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "22.2.0", | ||
"rollup": "4.20.0", | ||
"@types/node": "22.5.0", | ||
"rollup": "4.21.0", | ||
"typescript": "5.5.4" | ||
@@ -56,0 +56,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is 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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
388800
7327
19
0
80
+ Added@algolia/client-common@5.2.1(transitive)
+ Added@algolia/requester-browser-xhr@5.2.1(transitive)
+ Added@algolia/requester-node-http@5.2.1(transitive)
- Removed@algolia/client-common@5.1.1(transitive)
- Removed@algolia/requester-browser-xhr@5.1.1(transitive)
- Removed@algolia/requester-node-http@5.1.1(transitive)
Updated@algolia/client-common@5.2.1