@algolia/client-analytics 4.14.1 → 5.0.0-alpha.10

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.
Files changed (150) hide show
  1. package/dist/builds/browser.d.ts +6 -0
  2. package/dist/builds/browser.d.ts.map +1 -0
  3. package/dist/builds/node.d.ts +6 -0
  4. package/dist/builds/node.d.ts.map +1 -0
  5. package/dist/client-analytics.cjs.js +920 -65
  6. package/dist/client-analytics.esm.browser.js +1646 -0
  7. package/dist/client-analytics.esm.node.js +930 -0
  8. package/dist/client-analytics.umd.js +2 -0
  9. package/dist/model/averageClickEvent.d.ts +15 -0
  10. package/dist/model/averageClickEvent.d.ts.map +1 -0
  11. package/dist/model/clickPosition.d.ts +11 -0
  12. package/dist/model/clickPosition.d.ts.map +1 -0
  13. package/dist/model/clickThroughRateEvent.d.ts +19 -0
  14. package/dist/model/clickThroughRateEvent.d.ts.map +1 -0
  15. package/dist/model/clientMethodProps.d.ts +508 -0
  16. package/dist/model/clientMethodProps.d.ts.map +1 -0
  17. package/dist/model/conversionRateEvent.d.ts +19 -0
  18. package/dist/model/conversionRateEvent.d.ts.map +1 -0
  19. package/dist/model/direction.d.ts +2 -0
  20. package/dist/model/direction.d.ts.map +1 -0
  21. package/dist/model/errorBase.d.ts +7 -0
  22. package/dist/model/errorBase.d.ts.map +1 -0
  23. package/dist/model/getAverageClickPositionResponse.d.ts +16 -0
  24. package/dist/model/getAverageClickPositionResponse.d.ts.map +1 -0
  25. package/dist/model/getClickPositionsResponse.d.ts +8 -0
  26. package/dist/model/getClickPositionsResponse.d.ts.map +1 -0
  27. package/dist/model/getClickThroughRateResponse.d.ts +20 -0
  28. package/dist/model/getClickThroughRateResponse.d.ts.map +1 -0
  29. package/dist/model/getConversationRateResponse.d.ts +20 -0
  30. package/dist/model/getConversationRateResponse.d.ts.map +1 -0
  31. package/dist/model/getNoClickRateResponse.d.ts +20 -0
  32. package/dist/model/getNoClickRateResponse.d.ts.map +1 -0
  33. package/dist/model/getNoResultsRateResponse.d.ts +20 -0
  34. package/dist/model/getNoResultsRateResponse.d.ts.map +1 -0
  35. package/dist/model/getSearchesCountResponse.d.ts +12 -0
  36. package/dist/model/getSearchesCountResponse.d.ts.map +1 -0
  37. package/dist/model/getSearchesNoClicksResponse.d.ts +8 -0
  38. package/dist/model/getSearchesNoClicksResponse.d.ts.map +1 -0
  39. package/dist/model/getSearchesNoResultsResponse.d.ts +8 -0
  40. package/dist/model/getSearchesNoResultsResponse.d.ts.map +1 -0
  41. package/dist/model/getStatusResponse.d.ts +7 -0
  42. package/dist/model/getStatusResponse.d.ts.map +1 -0
  43. package/dist/model/getTopCountriesResponse.d.ts +8 -0
  44. package/dist/model/getTopCountriesResponse.d.ts.map +1 -0
  45. package/dist/model/getTopFilterAttribute.d.ts +11 -0
  46. package/dist/model/getTopFilterAttribute.d.ts.map +1 -0
  47. package/dist/model/getTopFilterAttributesResponse.d.ts +8 -0
  48. package/dist/model/getTopFilterAttributesResponse.d.ts.map +1 -0
  49. package/dist/model/getTopFilterForAttribute.d.ts +19 -0
  50. package/dist/model/getTopFilterForAttribute.d.ts.map +1 -0
  51. package/dist/model/getTopFilterForAttributeResponse.d.ts +8 -0
  52. package/dist/model/getTopFilterForAttributeResponse.d.ts.map +1 -0
  53. package/dist/model/getTopFiltersNoResultsResponse.d.ts +8 -0
  54. package/dist/model/getTopFiltersNoResultsResponse.d.ts.map +1 -0
  55. package/dist/model/getTopFiltersNoResultsValue.d.ts +15 -0
  56. package/dist/model/getTopFiltersNoResultsValue.d.ts.map +1 -0
  57. package/dist/model/getTopFiltersNoResultsValues.d.ts +12 -0
  58. package/dist/model/getTopFiltersNoResultsValues.d.ts.map +1 -0
  59. package/dist/model/getTopHitsResponse.d.ts +4 -0
  60. package/dist/model/getTopHitsResponse.d.ts.map +1 -0
  61. package/dist/model/getTopSearchesResponse.d.ts +4 -0
  62. package/dist/model/getTopSearchesResponse.d.ts.map +1 -0
  63. package/dist/model/getUsersCountResponse.d.ts +12 -0
  64. package/dist/model/getUsersCountResponse.d.ts.map +1 -0
  65. package/dist/model/index.d.ts +45 -0
  66. package/dist/model/index.d.ts.map +1 -0
  67. package/dist/model/noClickRateEvent.d.ts +19 -0
  68. package/dist/model/noClickRateEvent.d.ts.map +1 -0
  69. package/dist/model/noResultsRateEvent.d.ts +19 -0
  70. package/dist/model/noResultsRateEvent.d.ts.map +1 -0
  71. package/dist/model/orderBy.d.ts +2 -0
  72. package/dist/model/orderBy.d.ts.map +1 -0
  73. package/dist/model/searchEvent.d.ts +11 -0
  74. package/dist/model/searchEvent.d.ts.map +1 -0
  75. package/dist/model/searchNoClickEvent.d.ts +15 -0
  76. package/dist/model/searchNoClickEvent.d.ts.map +1 -0
  77. package/dist/model/searchNoResultEvent.d.ts +15 -0
  78. package/dist/model/searchNoResultEvent.d.ts.map +1 -0
  79. package/dist/model/topCountry.d.ts +11 -0
  80. package/dist/model/topCountry.d.ts.map +1 -0
  81. package/dist/model/topHit.d.ts +11 -0
  82. package/dist/model/topHit.d.ts.map +1 -0
  83. package/dist/model/topHitWithAnalytics.d.ts +31 -0
  84. package/dist/model/topHitWithAnalytics.d.ts.map +1 -0
  85. package/dist/model/topHitsResponse.d.ts +8 -0
  86. package/dist/model/topHitsResponse.d.ts.map +1 -0
  87. package/dist/model/topHitsResponseWithAnalytics.d.ts +8 -0
  88. package/dist/model/topHitsResponseWithAnalytics.d.ts.map +1 -0
  89. package/dist/model/topSearch.d.ts +15 -0
  90. package/dist/model/topSearch.d.ts.map +1 -0
  91. package/dist/model/topSearchWithAnalytics.d.ts +39 -0
  92. package/dist/model/topSearchWithAnalytics.d.ts.map +1 -0
  93. package/dist/model/topSearchesResponse.d.ts +8 -0
  94. package/dist/model/topSearchesResponse.d.ts.map +1 -0
  95. package/dist/model/topSearchesResponseWithAnalytics.d.ts +8 -0
  96. package/dist/model/topSearchesResponseWithAnalytics.d.ts.map +1 -0
  97. package/dist/model/userWithDate.d.ts +11 -0
  98. package/dist/model/userWithDate.d.ts.map +1 -0
  99. package/dist/src/analyticsClient.d.ts +319 -0
  100. package/dist/src/analyticsClient.d.ts.map +1 -0
  101. package/index.d.ts +2 -0
  102. package/index.js +1 -1
  103. package/model/averageClickEvent.ts +18 -0
  104. package/model/clickPosition.ts +13 -0
  105. package/model/clickThroughRateEvent.ts +23 -0
  106. package/model/clientMethodProps.ts +530 -0
  107. package/model/conversionRateEvent.ts +23 -0
  108. package/model/direction.ts +3 -0
  109. package/model/errorBase.ts +8 -0
  110. package/model/getAverageClickPositionResponse.ts +20 -0
  111. package/model/getClickPositionsResponse.ts +10 -0
  112. package/model/getClickThroughRateResponse.ts +25 -0
  113. package/model/getConversationRateResponse.ts +25 -0
  114. package/model/getNoClickRateResponse.ts +25 -0
  115. package/model/getNoResultsRateResponse.ts +25 -0
  116. package/model/getSearchesCountResponse.ts +15 -0
  117. package/model/getSearchesNoClicksResponse.ts +10 -0
  118. package/model/getSearchesNoResultsResponse.ts +10 -0
  119. package/model/getStatusResponse.ts +8 -0
  120. package/model/getTopCountriesResponse.ts +10 -0
  121. package/model/getTopFilterAttribute.ts +13 -0
  122. package/model/getTopFilterAttributesResponse.ts +10 -0
  123. package/model/getTopFilterForAttribute.ts +23 -0
  124. package/model/getTopFilterForAttributeResponse.ts +10 -0
  125. package/model/getTopFiltersNoResultsResponse.ts +10 -0
  126. package/model/getTopFiltersNoResultsValue.ts +18 -0
  127. package/model/getTopFiltersNoResultsValues.ts +15 -0
  128. package/model/getTopHitsResponse.ts +6 -0
  129. package/model/getTopSearchesResponse.ts +8 -0
  130. package/model/getUsersCountResponse.ts +15 -0
  131. package/model/index.ts +46 -0
  132. package/model/noClickRateEvent.ts +23 -0
  133. package/model/noResultsRateEvent.ts +23 -0
  134. package/model/orderBy.ts +7 -0
  135. package/model/searchEvent.ts +13 -0
  136. package/model/searchNoClickEvent.ts +18 -0
  137. package/model/searchNoResultEvent.ts +18 -0
  138. package/model/topCountry.ts +13 -0
  139. package/model/topHit.ts +13 -0
  140. package/model/topHitWithAnalytics.ts +38 -0
  141. package/model/topHitsResponse.ts +10 -0
  142. package/model/topHitsResponseWithAnalytics.ts +10 -0
  143. package/model/topSearch.ts +18 -0
  144. package/model/topSearchWithAnalytics.ts +48 -0
  145. package/model/topSearchesResponse.ts +10 -0
  146. package/model/topSearchesResponseWithAnalytics.ts +10 -0
  147. package/model/userWithDate.ts +13 -0
  148. package/package.json +27 -14
  149. package/dist/client-analytics.d.ts +0 -233
  150. package/dist/client-analytics.esm.js +0 -71
@@ -0,0 +1,2 @@
1
+ /*! client-analytics.umd.js | 5.0.0-alpha.10 | © 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-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)||"{}")}return{get:(e,t,r={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>{const r=JSON.stringify(e),i=o()[r];return Promise.all([i||t(),void 0!==i])})).then((([e,t])=>Promise.all([e,t||r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]=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 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, contact support@algolia.com.",e,"RetryError")}}class u extends d{constructor(e,t,r){super(e,r,"ApiError"),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}}function g(e,t,r){const i=function(e){const t=e=>"[object Object]"===Object.prototype.toString.call(e)||"[object Array]"===Object.prototype.toString.call(e);return Object.keys(e).map((r=>`${r}=${t(e[r])?JSON.stringify(e[r]):e[r]}`)).join("&")}(r);let o=`${e.protocol}://${e.url}/${"/"===t.charAt(0)?t.substr(1):t}`;return i.length&&(o+=`?${i}`),o}function h(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function m({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:o,timeouts:a,requester:n,requestsCache:d,responsesCache:m}){async function p(d,m,p=!0){const f=[],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)}(d,m),S=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,m.headers),y="GET"===d.method?{...d.data,...m.data}:{},w={...i,...d.queryParameters,...y};if(o.value&&(w["x-algolia-agent"]=o.value),m&&m.queryParameters)for(const e of Object.keys(m.queryParameters))m.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(m.queryParameters[e])?w[e]=m.queryParameters[e].toString():w[e]=m.queryParameters[e];let P=0;const q=async(e,r)=>{const i=e.pop();if(void 0===i)throw new c(function(e){return e.map((e=>h(e)))}(f));let o=m.timeout;void 0===o&&(o=p?a.read:a.write);const y={data:v,headers:S,method:d.method,url:g(i,d.path,w),connectTimeout:r(P,a.connect),responseTimeout:r(P,o)},D=t=>{const r={request:y,response:t,host:i,triesLeft:e.length};return f.push(r),r},T=await n.send(y);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&0==~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(T)){const o=D(T);return T.isTimedOut&&P++,console.log("Retryable failure",h(o)),await t.set(i,s(i,T.isTimedOut?"timed out":"down")),q(e,r)}if(function({status:e}){return 2==~~(e/100)}(T))return function(e){try{return JSON.parse(e.content)}catch(t){throw new l(t.message,e)}}(T);throw D(T),function({content:e,status:t},r){let i=e;try{i=JSON.parse(e).message}catch(e){}return new u(i,t,r)}(T,f)},D=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),T=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}}(D);return q([...T.hosts].reverse(),T.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 m.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=>m.set(a,e)})},requestsCache:d,responsesCache:m}}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.0.0-alpha.10",v=["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||!v.includes(s)))throw new Error(`\`region\` must be one of the following: ${v.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=m({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})},del({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `del`.");const i={method:"DELETE",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},get({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `get`.");const i={method:"GET",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},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)},getConversationRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getConversationRate`.");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)},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,startDate:i,endDate:o,limit:s,offset:a,tags:d},c){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const u={};void 0!==e&&(u.index=e.toString()),void 0!==t&&(u.search=t.toString()),void 0!==r&&(u.clickAnalytics=r.toString()),void 0!==i&&(u.startDate=i.toString()),void 0!==o&&(u.endDate=o.toString()),void 0!==s&&(u.limit=s.toString()),void 0!==a&&(u.offset=a.toString()),void 0!==d&&(u.tags=d.toString());const l={method:"GET",path:"/2/hits",queryParameters:u,headers:{}};return n.request(l,c)},getTopSearches({index:e,clickAnalytics:t,startDate:r,endDate:i,orderBy:o,direction:s,limit:a,offset:d,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==t&&(l.clickAnalytics=t.toString()),void 0!==r&&(l.startDate=r.toString()),void 0!==i&&(l.endDate=i.toString()),void 0!==o&&(l.orderBy=o.toString()),void 0!==s&&(l.direction=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/searches",queryParameters:l,headers:{}};return n.request(g,u)},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)},post({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `post`.");const o={method:"POST",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},put({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `put`.");const o={method:"PUT",path:"/1{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)}}}({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:`5.0.0-alpha.10-${e}`}),i()]}),...a})},e.apiClientVersion=f}));
@@ -0,0 +1,15 @@
1
+ export declare type AverageClickEvent = {
2
+ /**
3
+ * The average of all the click count event.
4
+ */
5
+ average: number;
6
+ /**
7
+ * The number of click event.
8
+ */
9
+ clickCount: number;
10
+ /**
11
+ * Date of the event.
12
+ */
13
+ date: string;
14
+ };
15
+ //# sourceMappingURL=averageClickEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"averageClickEvent.d.ts","sourceRoot":"","sources":["../../model/averageClickEvent.ts"],"names":[],"mappings":"AAEA,oBAAY,iBAAiB,GAAG;IAC9B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,11 @@
1
+ export declare type ClickPosition = {
2
+ /**
3
+ * Range of positions with the following pattern: - Positions from 1 to 10 included are displayed in separated groups. - Positions from 11 to 20 included are grouped together. - Positions from 21 and up are grouped together.
4
+ */
5
+ position: number[];
6
+ /**
7
+ * The number of click event.
8
+ */
9
+ clickCount: number;
10
+ };
11
+ //# sourceMappingURL=clickPosition.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickPosition.d.ts","sourceRoot":"","sources":["../../model/clickPosition.ts"],"names":[],"mappings":"AAEA,oBAAY,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,EAAE,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare type ClickThroughRateEvent = {
2
+ /**
3
+ * The click-through rate.
4
+ */
5
+ rate: number;
6
+ /**
7
+ * The number of click event.
8
+ */
9
+ clickCount: number;
10
+ /**
11
+ * The number of tracked search click.
12
+ */
13
+ trackedSearchCount: number;
14
+ /**
15
+ * Date of the event.
16
+ */
17
+ date: string;
18
+ };
19
+ //# sourceMappingURL=clickThroughRateEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clickThroughRateEvent.d.ts","sourceRoot":"","sources":["../../model/clickThroughRateEvent.ts"],"names":[],"mappings":"AAEA,oBAAY,qBAAqB,GAAG;IAClC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,508 @@
1
+ import type { Direction } from './direction';
2
+ import type { OrderBy } from './orderBy';
3
+ /**
4
+ * Properties for the `del` method.
5
+ */
6
+ export declare type DelProps = {
7
+ /**
8
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
9
+ */
10
+ path: string;
11
+ /**
12
+ * Query parameters to be applied to the current query.
13
+ */
14
+ parameters?: Record<string, any>;
15
+ };
16
+ /**
17
+ * Properties for the `get` method.
18
+ */
19
+ export declare type GetProps = {
20
+ /**
21
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
22
+ */
23
+ path: string;
24
+ /**
25
+ * Query parameters to be applied to the current query.
26
+ */
27
+ parameters?: Record<string, any>;
28
+ };
29
+ /**
30
+ * Properties for the `getAverageClickPosition` method.
31
+ */
32
+ export declare type GetAverageClickPositionProps = {
33
+ /**
34
+ * The index name to target.
35
+ */
36
+ index: string;
37
+ /**
38
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
39
+ */
40
+ startDate?: string;
41
+ /**
42
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
43
+ */
44
+ endDate?: string;
45
+ /**
46
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
47
+ */
48
+ tags?: string;
49
+ };
50
+ /**
51
+ * Properties for the `getClickPositions` method.
52
+ */
53
+ export declare type GetClickPositionsProps = {
54
+ /**
55
+ * The index name to target.
56
+ */
57
+ index: string;
58
+ /**
59
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
60
+ */
61
+ startDate?: string;
62
+ /**
63
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
64
+ */
65
+ endDate?: string;
66
+ /**
67
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
68
+ */
69
+ tags?: string;
70
+ };
71
+ /**
72
+ * Properties for the `getClickThroughRate` method.
73
+ */
74
+ export declare type GetClickThroughRateProps = {
75
+ /**
76
+ * The index name to target.
77
+ */
78
+ index: string;
79
+ /**
80
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
81
+ */
82
+ startDate?: string;
83
+ /**
84
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
85
+ */
86
+ endDate?: string;
87
+ /**
88
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
89
+ */
90
+ tags?: string;
91
+ };
92
+ /**
93
+ * Properties for the `getConversationRate` method.
94
+ */
95
+ export declare type GetConversationRateProps = {
96
+ /**
97
+ * The index name to target.
98
+ */
99
+ index: string;
100
+ /**
101
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
102
+ */
103
+ startDate?: string;
104
+ /**
105
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
106
+ */
107
+ endDate?: string;
108
+ /**
109
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
110
+ */
111
+ tags?: string;
112
+ };
113
+ /**
114
+ * Properties for the `getNoClickRate` method.
115
+ */
116
+ export declare type GetNoClickRateProps = {
117
+ /**
118
+ * The index name to target.
119
+ */
120
+ index: string;
121
+ /**
122
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
123
+ */
124
+ startDate?: string;
125
+ /**
126
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
127
+ */
128
+ endDate?: string;
129
+ /**
130
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
131
+ */
132
+ tags?: string;
133
+ };
134
+ /**
135
+ * Properties for the `getNoResultsRate` method.
136
+ */
137
+ export declare type GetNoResultsRateProps = {
138
+ /**
139
+ * The index name to target.
140
+ */
141
+ index: string;
142
+ /**
143
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
144
+ */
145
+ startDate?: string;
146
+ /**
147
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
148
+ */
149
+ endDate?: string;
150
+ /**
151
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
152
+ */
153
+ tags?: string;
154
+ };
155
+ /**
156
+ * Properties for the `getSearchesCount` method.
157
+ */
158
+ export declare type GetSearchesCountProps = {
159
+ /**
160
+ * The index name to target.
161
+ */
162
+ index: string;
163
+ /**
164
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
165
+ */
166
+ startDate?: string;
167
+ /**
168
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
169
+ */
170
+ endDate?: string;
171
+ /**
172
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
173
+ */
174
+ tags?: string;
175
+ };
176
+ /**
177
+ * Properties for the `getSearchesNoClicks` method.
178
+ */
179
+ export declare type GetSearchesNoClicksProps = {
180
+ /**
181
+ * The index name to target.
182
+ */
183
+ index: string;
184
+ /**
185
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
186
+ */
187
+ startDate?: string;
188
+ /**
189
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
190
+ */
191
+ endDate?: string;
192
+ /**
193
+ * Number of records to return. Limit is the size of the page.
194
+ */
195
+ limit?: number;
196
+ /**
197
+ * Position of the starting record. Used for paging. 0 is the first record.
198
+ */
199
+ offset?: number;
200
+ /**
201
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
202
+ */
203
+ tags?: string;
204
+ };
205
+ /**
206
+ * Properties for the `getSearchesNoResults` method.
207
+ */
208
+ export declare type GetSearchesNoResultsProps = {
209
+ /**
210
+ * The index name to target.
211
+ */
212
+ index: string;
213
+ /**
214
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
215
+ */
216
+ startDate?: string;
217
+ /**
218
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
219
+ */
220
+ endDate?: string;
221
+ /**
222
+ * Number of records to return. Limit is the size of the page.
223
+ */
224
+ limit?: number;
225
+ /**
226
+ * Position of the starting record. Used for paging. 0 is the first record.
227
+ */
228
+ offset?: number;
229
+ /**
230
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
231
+ */
232
+ tags?: string;
233
+ };
234
+ /**
235
+ * Properties for the `getStatus` method.
236
+ */
237
+ export declare type GetStatusProps = {
238
+ /**
239
+ * The index name to target.
240
+ */
241
+ index: string;
242
+ };
243
+ /**
244
+ * Properties for the `getTopCountries` method.
245
+ */
246
+ export declare type GetTopCountriesProps = {
247
+ /**
248
+ * The index name to target.
249
+ */
250
+ index: string;
251
+ /**
252
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
253
+ */
254
+ startDate?: string;
255
+ /**
256
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
257
+ */
258
+ endDate?: string;
259
+ /**
260
+ * Number of records to return. Limit is the size of the page.
261
+ */
262
+ limit?: number;
263
+ /**
264
+ * Position of the starting record. Used for paging. 0 is the first record.
265
+ */
266
+ offset?: number;
267
+ /**
268
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
269
+ */
270
+ tags?: string;
271
+ };
272
+ /**
273
+ * Properties for the `getTopFilterAttributes` method.
274
+ */
275
+ export declare type GetTopFilterAttributesProps = {
276
+ /**
277
+ * The index name to target.
278
+ */
279
+ index: string;
280
+ /**
281
+ * The query term to search for. Must match the exact user input.
282
+ */
283
+ search?: string;
284
+ /**
285
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
286
+ */
287
+ startDate?: string;
288
+ /**
289
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
290
+ */
291
+ endDate?: string;
292
+ /**
293
+ * Number of records to return. Limit is the size of the page.
294
+ */
295
+ limit?: number;
296
+ /**
297
+ * Position of the starting record. Used for paging. 0 is the first record.
298
+ */
299
+ offset?: number;
300
+ /**
301
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
302
+ */
303
+ tags?: string;
304
+ };
305
+ /**
306
+ * Properties for the `getTopFilterForAttribute` method.
307
+ */
308
+ export declare type GetTopFilterForAttributeProps = {
309
+ /**
310
+ * The exact name of the attribute.
311
+ */
312
+ attribute: string;
313
+ /**
314
+ * The index name to target.
315
+ */
316
+ index: string;
317
+ /**
318
+ * The query term to search for. Must match the exact user input.
319
+ */
320
+ search?: string;
321
+ /**
322
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
323
+ */
324
+ startDate?: string;
325
+ /**
326
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
327
+ */
328
+ endDate?: string;
329
+ /**
330
+ * Number of records to return. Limit is the size of the page.
331
+ */
332
+ limit?: number;
333
+ /**
334
+ * Position of the starting record. Used for paging. 0 is the first record.
335
+ */
336
+ offset?: number;
337
+ /**
338
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
339
+ */
340
+ tags?: string;
341
+ };
342
+ /**
343
+ * Properties for the `getTopFiltersNoResults` method.
344
+ */
345
+ export declare type GetTopFiltersNoResultsProps = {
346
+ /**
347
+ * The index name to target.
348
+ */
349
+ index: string;
350
+ /**
351
+ * The query term to search for. Must match the exact user input.
352
+ */
353
+ search?: string;
354
+ /**
355
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
356
+ */
357
+ startDate?: string;
358
+ /**
359
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
360
+ */
361
+ endDate?: string;
362
+ /**
363
+ * Number of records to return. Limit is the size of the page.
364
+ */
365
+ limit?: number;
366
+ /**
367
+ * Position of the starting record. Used for paging. 0 is the first record.
368
+ */
369
+ offset?: number;
370
+ /**
371
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
372
+ */
373
+ tags?: string;
374
+ };
375
+ /**
376
+ * Properties for the `getTopHits` method.
377
+ */
378
+ export declare type GetTopHitsProps = {
379
+ /**
380
+ * The index name to target.
381
+ */
382
+ index: string;
383
+ /**
384
+ * The query term to search for. Must match the exact user input.
385
+ */
386
+ search?: string;
387
+ /**
388
+ * Whether to include the click-through and conversion rates for a search.
389
+ */
390
+ clickAnalytics?: boolean;
391
+ /**
392
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
393
+ */
394
+ startDate?: string;
395
+ /**
396
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
397
+ */
398
+ endDate?: string;
399
+ /**
400
+ * Number of records to return. Limit is the size of the page.
401
+ */
402
+ limit?: number;
403
+ /**
404
+ * Position of the starting record. Used for paging. 0 is the first record.
405
+ */
406
+ offset?: number;
407
+ /**
408
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
409
+ */
410
+ tags?: string;
411
+ };
412
+ /**
413
+ * Properties for the `getTopSearches` method.
414
+ */
415
+ export declare type GetTopSearchesProps = {
416
+ /**
417
+ * The index name to target.
418
+ */
419
+ index: string;
420
+ /**
421
+ * Whether to include the click-through and conversion rates for a search.
422
+ */
423
+ clickAnalytics?: boolean;
424
+ /**
425
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
426
+ */
427
+ startDate?: string;
428
+ /**
429
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
430
+ */
431
+ endDate?: string;
432
+ /**
433
+ * Reorder the results.
434
+ */
435
+ orderBy?: OrderBy;
436
+ /**
437
+ * The sorting of the result.
438
+ */
439
+ direction?: Direction;
440
+ /**
441
+ * Number of records to return. Limit is the size of the page.
442
+ */
443
+ limit?: number;
444
+ /**
445
+ * Position of the starting record. Used for paging. 0 is the first record.
446
+ */
447
+ offset?: number;
448
+ /**
449
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
450
+ */
451
+ tags?: string;
452
+ };
453
+ /**
454
+ * Properties for the `getUsersCount` method.
455
+ */
456
+ export declare type GetUsersCountProps = {
457
+ /**
458
+ * The index name to target.
459
+ */
460
+ index: string;
461
+ /**
462
+ * The lower bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
463
+ */
464
+ startDate?: string;
465
+ /**
466
+ * The upper bound timestamp (a date, a string like \"2006-01-02\") of the period to analyze.
467
+ */
468
+ endDate?: string;
469
+ /**
470
+ * Filter metrics on the provided tags. Each tag must correspond to an analyticsTags set at search time. Multiple tags can be combined with the operators OR and AND. If a tag contains characters like spaces or parentheses, it should be URL encoded.
471
+ */
472
+ tags?: string;
473
+ };
474
+ /**
475
+ * Properties for the `post` method.
476
+ */
477
+ export declare type PostProps = {
478
+ /**
479
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
480
+ */
481
+ path: string;
482
+ /**
483
+ * Query parameters to be applied to the current query.
484
+ */
485
+ parameters?: Record<string, any>;
486
+ /**
487
+ * The parameters to send with the custom request.
488
+ */
489
+ body?: Record<string, any>;
490
+ };
491
+ /**
492
+ * Properties for the `put` method.
493
+ */
494
+ export declare type PutProps = {
495
+ /**
496
+ * The path of the API endpoint to target, anything after the /1 needs to be specified.
497
+ */
498
+ path: string;
499
+ /**
500
+ * Query parameters to be applied to the current query.
501
+ */
502
+ parameters?: Record<string, any>;
503
+ /**
504
+ * The parameters to send with the custom request.
505
+ */
506
+ body?: Record<string, any>;
507
+ };
508
+ //# sourceMappingURL=clientMethodProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientMethodProps.d.ts","sourceRoot":"","sources":["../../model/clientMethodProps.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC,CAAC;AAEF;;GAEG;AACH,oBAAY,4BAA4B,GAAG;IACzC;;OAEG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E,MAAM,CAAC;IACjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;GAEG;AACH,oBAAY,SAAS,GAAG;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC;AAEF;;GAEG;AACH,oBAAY,QAAQ,GAAG;IACrB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,19 @@
1
+ export declare type ConversionRateEvent = {
2
+ /**
3
+ * The click-through rate.
4
+ */
5
+ rate: number;
6
+ /**
7
+ * The number of tracked search click.
8
+ */
9
+ trackedSearchCount: number;
10
+ /**
11
+ * The number of converted clicks.
12
+ */
13
+ conversionCount: number;
14
+ /**
15
+ * Date of the event.
16
+ */
17
+ date: string;
18
+ };
19
+ //# sourceMappingURL=conversionRateEvent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conversionRateEvent.d.ts","sourceRoot":"","sources":["../../model/conversionRateEvent.ts"],"names":[],"mappings":"AAEA,oBAAY,mBAAmB,GAAG;IAChC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,eAAe,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare type Direction = 'asc' | 'desc';
2
+ //# sourceMappingURL=direction.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direction.d.ts","sourceRoot":"","sources":["../../model/direction.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GAAG,KAAK,GAAG,MAAM,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Error.
3
+ */
4
+ export declare type ErrorBase = Record<string, any> & {
5
+ message?: string;
6
+ };
7
+ //# sourceMappingURL=errorBase.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errorBase.d.ts","sourceRoot":"","sources":["../../model/errorBase.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,oBAAY,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC"}