@algolia/client-insights 5.0.0-alpha.110 → 5.0.0-alpha.112

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,7 +4,7 @@ var clientCommon = require('@algolia/client-common');
4
4
  var requesterNodeHttp = require('@algolia/requester-node-http');
5
5
 
6
6
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
7
- const apiClientVersion = '5.0.0-alpha.110';
7
+ const apiClientVersion = '5.0.0-alpha.112';
8
8
  const REGIONS = ['de', 'us'];
9
9
  function getDefaultHosts(region) {
10
10
  const url = !region
@@ -449,16 +449,13 @@ function createTransporter({
449
449
  if (host === undefined) {
450
450
  throw new RetryError(stackTraceWithoutCredentials(stackTrace));
451
451
  }
452
- let responseTimeout = requestOptions.timeout;
453
- if (responseTimeout === undefined) {
454
- responseTimeout = isRead ? timeouts.read : timeouts.write;
455
- }
452
+ let responseTimeout = isRead ? requestOptions.timeouts?.read || timeouts.read : requestOptions.timeouts?.write || timeouts.write;
456
453
  const payload = {
457
454
  data,
458
455
  headers,
459
456
  method: request.method,
460
457
  url: serializeUrl(host, request.path, queryParameters),
461
- connectTimeout: getTimeout(timeoutsCount, timeouts.connect),
458
+ connectTimeout: getTimeout(timeoutsCount, requestOptions.timeouts?.connect || timeouts.connect),
462
459
  responseTimeout: getTimeout(timeoutsCount, responseTimeout)
463
460
  };
464
461
  /**
@@ -686,7 +683,7 @@ function createXhrRequester() {
686
683
  }
687
684
 
688
685
  // 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.
689
- const apiClientVersion = '5.0.0-alpha.110';
686
+ const apiClientVersion = '5.0.0-alpha.112';
690
687
  const REGIONS = ['de', 'us'];
691
688
  function getDefaultHosts(region) {
692
689
  const url = !region
@@ -2,7 +2,7 @@ import { createAuth, createTransporter, getAlgoliaAgent, DEFAULT_CONNECT_TIMEOUT
2
2
  import { createHttpRequester } from '@algolia/requester-node-http';
3
3
 
4
4
  // Code generated by OpenAPI Generator (https://openapi-generator.tech), manual changes will be lost - read more on https://github.com/algolia/api-clients-automation. DO NOT EDIT.
5
- const apiClientVersion = '5.0.0-alpha.110';
5
+ const apiClientVersion = '5.0.0-alpha.112';
6
6
  const REGIONS = ['de', 'us'];
7
7
  function getDefaultHosts(region) {
8
8
  const url = !region
@@ -1,2 +1,2 @@
1
- /*! client-insights.umd.js | 5.0.0-alpha.110 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-insights"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=o(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),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class h extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class m extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends h{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),w="GET"===c.method?{...c.data,...u.data}:{},b={...s,...c.queryParameters,...w};if(a.value&&(b["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?b[e]=u.queryParameters[e].toString():b[e]=u.queryParameters[e];let T=0;const q=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=u.timeout;void 0===a&&(a=f?o.read:o.write);const w={data:v,headers:P,method:c.method,url:p(s,c.path,b),connectTimeout:r(T,o.connect),responseTimeout:r(T,a)},O=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(w);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)}(E)){const a=O(E);return E.isTimedOut&&T++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new h(s.message,t,r)}catch(e){}return new h(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return q([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const v="5.0.0-alpha.110",P=["de","us"];e.apiClientVersion=v,e.insightsClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!P.includes(n)))throw new Error(`\`region\` must be one of the following: ${P.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=f({hosts:(c=a,[{url:c?"insights.{region}.algolia.io".replace("{region}",c):"insights.algolia.io",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:y({algoliaAgents:s,client:"Insights",version:v}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.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 s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},deleteUserToken({userToken:e},t){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserToken`.");const r={method:"DELETE",path:"/1/usertokens/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},pushEvents(e,t){if(!e)throw new Error("Parameter `insightsEvents` is required when calling `pushEvents`.");if(!e.events)throw new Error("Parameter `insightsEvents.events` is required when calling `pushEvents`.");const r={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:e};return i.request(r,t)}}}({appId:e,apiKey:a,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 s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${v}-${e}`}),s()]}),...o})}}));
1
+ /*! client-insights.umd.js | 5.0.0-alpha.112 | © Algolia, inc. | https://github.com/algolia/algoliasearch-client-javascript */
2
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-insights"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function s(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function a(){return JSON.parse(s().getItem(r)||"{}")}function n(e){s().setItem(r,JSON.stringify(e))}return{get:(t,r,s={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=a(),s=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(n(s),!t)return;n(Object.fromEntries(Object.entries(s).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),a()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||s.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const n=a();return n[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},s().setItem(r,JSON.stringify(n)),t})),delete:e=>Promise.resolve().then((()=>{const t=a();delete t[JSON.stringify(e)],s().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{s().removeItem(r)}))}}function r(e){const t=[...e.caches],s=t.shift();return void 0===s?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,a,n={miss:()=>Promise.resolve()})=>s.get(e,a,n).catch((()=>r({caches:t}).get(e,a,n))),set:(e,a)=>s.set(e,a).catch((()=>r({caches:t}).set(e,a))),delete:e=>s.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>s.clear().catch((()=>r({caches:t}).clear()))}}function s(e={serializable:!0}){let t={};return{get(r,s,a={miss:()=>Promise.resolve()}){const n=JSON.stringify(r);if(n in t)return Promise.resolve(e.serializable?JSON.parse(t[n]):t[n]);const o=s();return o.then((e=>a.miss(e))).then((()=>o))},set:(r,s)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(s):s,Promise.resolve(s)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const a=12e4;function n(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>a},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=a}}}function o(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,t||"default");if("object"!=typeof s)return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function i(e,t,r){return(t=o(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),i(this,"name","AlgoliaError"),t&&(this.name=t)}}class u extends c{constructor(e,t,r){super(e,r),i(this,"stackTrace",void 0),this.stackTrace=t}}class l extends u{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class h extends u{constructor(e,t,r,s="ApiError"){super(e,r,s),i(this,"status",void 0),this.status=t}}class m extends c{constructor(e,t){super(e,"DeserializationError"),i(this,"response",void 0),this.response=t}}class d extends h{constructor(e,t,r,s){super(e,t,s,"DetailedApiError"),i(this,"error",void 0),this.error=r}}function p(e,t,r){const s=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let a=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return s.length&&(a+=`?${s}`),a}function g(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function f({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:s,algoliaAgent:a,timeouts:o,requester:i,requestsCache:c,responsesCache:u}){async function f(c,u,f=!0){const y=[],v=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(c,u),P=function(e,t,r){const s={Accept:"application/json",...e,...t,...r},a={};return Object.keys(s).forEach((e=>{const t=s[e];a[e.toLowerCase()]=t})),a}(r,c.headers,u.headers),w="GET"===c.method?{...c.data,...u.data}:{},b={...s,...c.queryParameters,...w};if(a.value&&(b["x-algolia-agent"]=a.value),u&&u.queryParameters)for(const e of Object.keys(u.queryParameters))u.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(u.queryParameters[e])?b[e]=u.queryParameters[e].toString():b[e]=u.queryParameters[e];let T=0;const q=async(e,r)=>{const s=e.pop();if(void 0===s)throw new l(function(e){return e.map((e=>g(e)))}(y));let a=f?u.timeouts?.read||o.read:u.timeouts?.write||o.write;const w={data:v,headers:P,method:c.method,url:p(s,c.path,b),connectTimeout:r(T,u.timeouts?.connect||o.connect),responseTimeout:r(T,a)},O=t=>{const r={request:w,response:t,host:s,triesLeft:e.length};return y.push(r),r},E=await i.send(w);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)}(E)){const a=O(E);return E.isTimedOut&&T++,console.log("Retryable failure",g(a)),await t.set(s,n(s,E.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(E))return function(e){try{return JSON.parse(e.content)}catch(t){throw new m(t.message,e)}}(E);throw O(E),function({content:e,status:t},r){try{const s=JSON.parse(e);return"error"in s?new d(s.message,t,s.error,r):new h(s.message,t,r)}catch(e){}return new h(e,t,r)}(E,y)},O=e.filter((e=>"readWrite"===e.accept||(f?"read"===e.accept:"write"===e.accept))),E=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(n(e))))))),s=r.filter((e=>e.isUp())),a=r.filter((e=>e.isTimedOut())),o=[...s,...a];return{hosts:o.length>0?o:e,getTimeout:(e,t)=>(0===a.length&&0===e?1:a.length+3+e)*t}}(O);return q([...E.hosts].reverse(),E.getTimeout)}return{hostsCache:t,requester:i,timeouts:o,algoliaAgent:a,baseHeaders:r,baseQueryParameters:s,hosts:e,request:function(e,t={}){const a=e.useReadTransporter||"GET"===e.method;if(!a)return f(e,t,a);const n=()=>f(e,t);if(!0!==(t.cacheable||e.cacheable))return n();const o={request:e,requestOptions:t,transporter:{queryParameters:s,headers:r}};return u.get(o,(()=>c.get(o,(()=>c.set(o,n()).then((e=>Promise.all([c.delete(o),e])),(e=>Promise.all([c.delete(o),Promise.reject(e)]))).then((([e,t])=>t))))),{miss:e=>u.set(o,e)})},requestsCache:c,responsesCache:u}}function y({algoliaAgents:e,client:t,version:r}){const s=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>s.add(e))),s}const v="5.0.0-alpha.112",P=["de","us"];e.apiClientVersion=v,e.insightsClient=function(e,a,n,o){if(!e||"string"!=typeof e)throw new Error("`appId` is missing.");if(!a||"string"!=typeof a)throw new Error("`apiKey` is missing.");if(n&&("string"!=typeof n||!P.includes(n)))throw new Error(`\`region\` must be one of the following: ${P.join(", ")}`);return function({appId:e,apiKey:t,authMode:r,algoliaAgents:s,region:a,...n}){const o=function(e,t,r="WithinHeaders"){const s={"x-algolia-api-key":t,"x-algolia-application-id":e};return{headers:()=>"WithinHeaders"===r?s:{},queryParameters:()=>"WithinQueryParameters"===r?s:{}}}(e,t,r),i=f({hosts:(c=a,[{url:c?"insights.{region}.algolia.io".replace("{region}",c):"insights.algolia.io",accept:"readWrite",protocol:"https"}]),...n,algoliaAgent:y({algoliaAgents:s,client:"Insights",version:v}),baseHeaders:{"content-type":"text/plain",...o.headers(),...n.baseHeaders},baseQueryParameters:{...o.queryParameters(),...n.baseQueryParameters}});var c;return{transporter:i,appId:e,clearCache:()=>Promise.all([i.requestsCache.clear(),i.responsesCache.clear()]).then((()=>{})),get _ua(){return i.algoliaAgent.value},addAlgoliaAgent(e,t){i.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 s={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const s={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return i.request(s,r)},customPost({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const a={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},customPut({path:e,parameters:t,body:r},s){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const a={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return i.request(a,s)},deleteUserToken({userToken:e},t){if(!e)throw new Error("Parameter `userToken` is required when calling `deleteUserToken`.");const r={method:"DELETE",path:"/1/usertokens/{userToken}".replace("{userToken}",encodeURIComponent(e)),queryParameters:{},headers:{}};return i.request(r,t)},pushEvents(e,t){if(!e)throw new Error("Parameter `insightsEvents` is required when calling `pushEvents`.");if(!e.events)throw new Error("Parameter `insightsEvents.events` is required when calling `pushEvents`.");const r={method:"POST",path:"/1/events",queryParameters:{},headers:{},data:e};return i.request(r,t)}}}({appId:e,apiKey:a,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 s=(e,s)=>setTimeout((()=>{r.abort(),t({status:0,content:s,isTimedOut:!0})}),e),a=s(e.connectTimeout,"Connection timeout");let n;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===n&&(clearTimeout(a),n=s(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(a),clearTimeout(n),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(a),clearTimeout(n),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:s(),requestsCache:s({serializable:!1}),hostsCache:r({caches:[t({key:`${v}-${e}`}),s()]}),...o})}}));
@@ -13,7 +13,7 @@ export type AddedToCartObjectIDs = {
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: AddToCartEvent;
15
15
  /**
16
- * Index name to which the event\'s items belong.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
@@ -37,7 +37,7 @@ export type AddedToCartObjectIDs = {
37
37
  */
38
38
  objectData?: ObjectData[];
39
39
  /**
40
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
40
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
41
  */
42
42
  timestamp?: number;
43
43
  value?: Value;
@@ -13,7 +13,7 @@ export type AddedToCartObjectIDsAfterSearch = {
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: AddToCartEvent;
15
15
  /**
16
- * Index name to which the event\'s items belong.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
@@ -41,7 +41,7 @@ export type AddedToCartObjectIDsAfterSearch = {
41
41
  */
42
42
  objectData?: ObjectDataAfterSearch[];
43
43
  /**
44
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
44
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
45
45
  */
46
46
  timestamp?: number;
47
47
  value?: Value;
@@ -9,7 +9,7 @@ export type ClickedFilters = {
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -25,7 +25,7 @@ export type ClickedFilters = {
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -9,7 +9,7 @@ export type ClickedObjectIDs = {
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -25,7 +25,7 @@ export type ClickedObjectIDs = {
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -9,7 +9,7 @@ export type ClickedObjectIDsAfterSearch = {
9
9
  eventName: string;
10
10
  eventType: ClickEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -33,7 +33,7 @@ export type ClickedObjectIDsAfterSearch = {
33
33
  */
34
34
  authenticatedUserToken?: string;
35
35
  /**
36
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
36
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
37
37
  */
38
38
  timestamp?: number;
39
39
  };
@@ -6,7 +6,7 @@ export type ConvertedFilters = {
6
6
  eventName: string;
7
7
  eventType: ConversionEvent;
8
8
  /**
9
- * Index name to which the event\'s items belong.
9
+ * Index name (case-sensitive) to which the event\'s items belong.
10
10
  */
11
11
  index: string;
12
12
  /**
@@ -22,7 +22,7 @@ export type ConvertedFilters = {
22
22
  */
23
23
  authenticatedUserToken?: string;
24
24
  /**
25
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
25
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
26
26
  */
27
27
  timestamp?: number;
28
28
  };
@@ -9,7 +9,7 @@ export type ConvertedObjectIDs = {
9
9
  eventName: string;
10
10
  eventType: ConversionEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -25,7 +25,7 @@ export type ConvertedObjectIDs = {
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -9,7 +9,7 @@ export type ConvertedObjectIDsAfterSearch = {
9
9
  eventName: string;
10
10
  eventType: ConversionEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -29,7 +29,7 @@ export type ConvertedObjectIDsAfterSearch = {
29
29
  */
30
30
  authenticatedUserToken?: string;
31
31
  /**
32
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
32
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
33
33
  */
34
34
  timestamp?: number;
35
35
  };
@@ -13,7 +13,7 @@ export type PurchasedObjectIDs = {
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: PurchaseEvent;
15
15
  /**
16
- * Index name to which the event\'s items belong.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
@@ -37,7 +37,7 @@ export type PurchasedObjectIDs = {
37
37
  */
38
38
  objectData?: ObjectData[];
39
39
  /**
40
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
40
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
41
  */
42
42
  timestamp?: number;
43
43
  value?: Value;
@@ -13,7 +13,7 @@ export type PurchasedObjectIDsAfterSearch = {
13
13
  eventType: ConversionEvent;
14
14
  eventSubtype: PurchaseEvent;
15
15
  /**
16
- * Index name to which the event\'s items belong.
16
+ * Index name (case-sensitive) to which the event\'s items belong.
17
17
  */
18
18
  index: string;
19
19
  /**
@@ -37,7 +37,7 @@ export type PurchasedObjectIDsAfterSearch = {
37
37
  */
38
38
  objectData: ObjectDataAfterSearch[];
39
39
  /**
40
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
40
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
41
41
  */
42
42
  timestamp?: number;
43
43
  value?: Value;
@@ -9,7 +9,7 @@ export type ViewedFilters = {
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -25,7 +25,7 @@ export type ViewedFilters = {
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -9,7 +9,7 @@ export type ViewedObjectIDs = {
9
9
  eventName: string;
10
10
  eventType: ViewEvent;
11
11
  /**
12
- * Index name to which the event\'s items belong.
12
+ * Index name (case-sensitive) to which the event\'s items belong.
13
13
  */
14
14
  index: string;
15
15
  /**
@@ -25,7 +25,7 @@ export type ViewedObjectIDs = {
25
25
  */
26
26
  authenticatedUserToken?: string;
27
27
  /**
28
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
28
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
29
29
  */
30
30
  timestamp?: number;
31
31
  };
@@ -2,7 +2,7 @@ import type { CreateClientOptions, RequestOptions } from '@algolia/client-common
2
2
  import type { CustomDeleteProps, CustomGetProps, CustomPostProps, CustomPutProps, DeleteUserTokenProps } from '../model/clientMethodProps';
3
3
  import type { EventsResponse } from '../model/eventsResponse';
4
4
  import type { InsightsEvents } from '../model/insightsEvents';
5
- export declare const apiClientVersion = "5.0.0-alpha.110";
5
+ export declare const apiClientVersion = "5.0.0-alpha.112";
6
6
  export declare const REGIONS: readonly ["de", "us"];
7
7
  export type Region = (typeof REGIONS)[number];
8
8
  export declare function createInsightsClient({ appId: appIdOption, apiKey: apiKeyOption, authMode, algoliaAgents, region: regionOption, ...options }: CreateClientOptions & {
@@ -19,7 +19,7 @@ export type AddedToCartObjectIDs = {
19
19
  eventSubtype: AddToCartEvent;
20
20
 
21
21
  /**
22
- * Index name to which the event\'s items belong.
22
+ * Index name (case-sensitive) to which the event\'s items belong.
23
23
  */
24
24
  index: string;
25
25
 
@@ -49,7 +49,7 @@ export type AddedToCartObjectIDs = {
49
49
  objectData?: ObjectData[];
50
50
 
51
51
  /**
52
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
52
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
53
53
  */
54
54
  timestamp?: number;
55
55
 
@@ -19,7 +19,7 @@ export type AddedToCartObjectIDsAfterSearch = {
19
19
  eventSubtype: AddToCartEvent;
20
20
 
21
21
  /**
22
- * Index name to which the event\'s items belong.
22
+ * Index name (case-sensitive) to which the event\'s items belong.
23
23
  */
24
24
  index: string;
25
25
 
@@ -54,7 +54,7 @@ export type AddedToCartObjectIDsAfterSearch = {
54
54
  objectData?: ObjectDataAfterSearch[];
55
55
 
56
56
  /**
57
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
57
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
58
58
  */
59
59
  timestamp?: number;
60
60
 
@@ -14,7 +14,7 @@ export type ClickedFilters = {
14
14
  eventType: ClickEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -34,7 +34,7 @@ export type ClickedFilters = {
34
34
  authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
37
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
38
38
  */
39
39
  timestamp?: number;
40
40
  };
@@ -14,7 +14,7 @@ export type ClickedObjectIDs = {
14
14
  eventType: ClickEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -34,7 +34,7 @@ export type ClickedObjectIDs = {
34
34
  authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
37
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
38
38
  */
39
39
  timestamp?: number;
40
40
  };
@@ -14,7 +14,7 @@ export type ClickedObjectIDsAfterSearch = {
14
14
  eventType: ClickEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -44,7 +44,7 @@ export type ClickedObjectIDsAfterSearch = {
44
44
  authenticatedUserToken?: string;
45
45
 
46
46
  /**
47
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
47
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
48
48
  */
49
49
  timestamp?: number;
50
50
  };
@@ -11,7 +11,7 @@ export type ConvertedFilters = {
11
11
  eventType: ConversionEvent;
12
12
 
13
13
  /**
14
- * Index name to which the event\'s items belong.
14
+ * Index name (case-sensitive) to which the event\'s items belong.
15
15
  */
16
16
  index: string;
17
17
 
@@ -31,7 +31,7 @@ export type ConvertedFilters = {
31
31
  authenticatedUserToken?: string;
32
32
 
33
33
  /**
34
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
34
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
35
35
  */
36
36
  timestamp?: number;
37
37
  };
@@ -14,7 +14,7 @@ export type ConvertedObjectIDs = {
14
14
  eventType: ConversionEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -34,7 +34,7 @@ export type ConvertedObjectIDs = {
34
34
  authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
37
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
38
38
  */
39
39
  timestamp?: number;
40
40
  };
@@ -14,7 +14,7 @@ export type ConvertedObjectIDsAfterSearch = {
14
14
  eventType: ConversionEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -39,7 +39,7 @@ export type ConvertedObjectIDsAfterSearch = {
39
39
  authenticatedUserToken?: string;
40
40
 
41
41
  /**
42
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
42
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
43
43
  */
44
44
  timestamp?: number;
45
45
  };
@@ -19,7 +19,7 @@ export type PurchasedObjectIDs = {
19
19
  eventSubtype: PurchaseEvent;
20
20
 
21
21
  /**
22
- * Index name to which the event\'s items belong.
22
+ * Index name (case-sensitive) to which the event\'s items belong.
23
23
  */
24
24
  index: string;
25
25
 
@@ -49,7 +49,7 @@ export type PurchasedObjectIDs = {
49
49
  objectData?: ObjectData[];
50
50
 
51
51
  /**
52
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
52
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
53
53
  */
54
54
  timestamp?: number;
55
55
 
@@ -19,7 +19,7 @@ export type PurchasedObjectIDsAfterSearch = {
19
19
  eventSubtype: PurchaseEvent;
20
20
 
21
21
  /**
22
- * Index name to which the event\'s items belong.
22
+ * Index name (case-sensitive) to which the event\'s items belong.
23
23
  */
24
24
  index: string;
25
25
 
@@ -49,7 +49,7 @@ export type PurchasedObjectIDsAfterSearch = {
49
49
  objectData: ObjectDataAfterSearch[];
50
50
 
51
51
  /**
52
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
52
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
53
53
  */
54
54
  timestamp?: number;
55
55
 
@@ -14,7 +14,7 @@ export type ViewedFilters = {
14
14
  eventType: ViewEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -34,7 +34,7 @@ export type ViewedFilters = {
34
34
  authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
37
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
38
38
  */
39
39
  timestamp?: number;
40
40
  };
@@ -14,7 +14,7 @@ export type ViewedObjectIDs = {
14
14
  eventType: ViewEvent;
15
15
 
16
16
  /**
17
- * Index name to which the event\'s items belong.
17
+ * Index name (case-sensitive) to which the event\'s items belong.
18
18
  */
19
19
  index: string;
20
20
 
@@ -34,7 +34,7 @@ export type ViewedObjectIDs = {
34
34
  authenticatedUserToken?: string;
35
35
 
36
36
  /**
37
- * Timestamp of the event in milliseconds in [Unix epoch time](https://wikipedia.org/wiki/Unix_time). By default, the Insights API uses the time it receives an event as its timestamp.
37
+ * Timestamp of the event, measured in milliseconds since the Unix epoch. By default, the Insights API uses the time it receives an event as its timestamp.
38
38
  */
39
39
  timestamp?: number;
40
40
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@algolia/client-insights",
3
- "version": "5.0.0-alpha.110",
3
+ "version": "5.0.0-alpha.112",
4
4
  "description": "JavaScript client for client-insights",
5
5
  "repository": "algolia/algoliasearch-client-javascript",
6
6
  "license": "MIT",
@@ -39,14 +39,14 @@
39
39
  "clean": "rm -rf ./dist || true"
40
40
  },
41
41
  "dependencies": {
42
- "@algolia/client-common": "5.0.0-alpha.111",
43
- "@algolia/requester-browser-xhr": "5.0.0-alpha.111",
44
- "@algolia/requester-node-http": "5.0.0-alpha.111"
42
+ "@algolia/client-common": "5.0.0-alpha.113",
43
+ "@algolia/requester-browser-xhr": "5.0.0-alpha.113",
44
+ "@algolia/requester-node-http": "5.0.0-alpha.113"
45
45
  },
46
46
  "devDependencies": {
47
- "@types/node": "20.11.30",
48
- "rollup": "4.13.2",
49
- "typescript": "5.4.3"
47
+ "@types/node": "20.12.7",
48
+ "rollup": "4.14.2",
49
+ "typescript": "5.4.5"
50
50
  },
51
51
  "engines": {
52
52
  "node": ">= 14.0.0"