@algolia/client-analytics 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.
- package/dist/client-analytics.cjs +39 -39
- package/dist/client-analytics.esm.browser.js +41 -44
- package/dist/client-analytics.esm.node.js +39 -39
- package/dist/client-analytics.umd.js +2 -2
- package/dist/model/clientMethodProps.d.ts +38 -38
- package/dist/model/getStatusResponse.d.ts +1 -1
- package/dist/src/analyticsClient.d.ts +39 -39
- package/model/clientMethodProps.ts +38 -38
- package/model/getStatusResponse.ts +1 -1
- package/package.json +7 -7
|
@@ -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.
|
|
5
|
+
const apiClientVersion = '5.0.0-alpha.112';
|
|
6
6
|
const REGIONS = ['de', 'us'];
|
|
7
7
|
function getDefaultHosts(region) {
|
|
8
8
|
const url = !region
|
|
@@ -165,8 +165,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
165
165
|
*
|
|
166
166
|
* @param getAddToCartRate - The getAddToCartRate object.
|
|
167
167
|
* @param getAddToCartRate.index - Index name.
|
|
168
|
-
* @param getAddToCartRate.startDate - Start date
|
|
169
|
-
* @param getAddToCartRate.endDate - End date
|
|
168
|
+
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
169
|
+
* @param getAddToCartRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
170
170
|
* @param getAddToCartRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
171
171
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
172
172
|
*/
|
|
@@ -205,8 +205,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
205
205
|
*
|
|
206
206
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
207
207
|
* @param getAverageClickPosition.index - Index name.
|
|
208
|
-
* @param getAverageClickPosition.startDate - Start date
|
|
209
|
-
* @param getAverageClickPosition.endDate - End date
|
|
208
|
+
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
209
|
+
* @param getAverageClickPosition.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
210
210
|
* @param getAverageClickPosition.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
211
211
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
212
212
|
*/
|
|
@@ -245,8 +245,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
245
245
|
*
|
|
246
246
|
* @param getClickPositions - The getClickPositions object.
|
|
247
247
|
* @param getClickPositions.index - Index name.
|
|
248
|
-
* @param getClickPositions.startDate - Start date
|
|
249
|
-
* @param getClickPositions.endDate - End date
|
|
248
|
+
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
249
|
+
* @param getClickPositions.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
250
250
|
* @param getClickPositions.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
251
251
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
252
252
|
*/
|
|
@@ -285,8 +285,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
285
285
|
*
|
|
286
286
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
287
287
|
* @param getClickThroughRate.index - Index name.
|
|
288
|
-
* @param getClickThroughRate.startDate - Start date
|
|
289
|
-
* @param getClickThroughRate.endDate - End date
|
|
288
|
+
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
289
|
+
* @param getClickThroughRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
290
290
|
* @param getClickThroughRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
291
291
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
292
292
|
*/
|
|
@@ -325,8 +325,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
325
325
|
*
|
|
326
326
|
* @param getConversionRate - The getConversionRate object.
|
|
327
327
|
* @param getConversionRate.index - Index name.
|
|
328
|
-
* @param getConversionRate.startDate - Start date
|
|
329
|
-
* @param getConversionRate.endDate - End date
|
|
328
|
+
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
329
|
+
* @param getConversionRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
330
330
|
* @param getConversionRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
331
331
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
332
332
|
*/
|
|
@@ -365,8 +365,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
365
365
|
*
|
|
366
366
|
* @param getNoClickRate - The getNoClickRate object.
|
|
367
367
|
* @param getNoClickRate.index - Index name.
|
|
368
|
-
* @param getNoClickRate.startDate - Start date
|
|
369
|
-
* @param getNoClickRate.endDate - End date
|
|
368
|
+
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
369
|
+
* @param getNoClickRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
370
370
|
* @param getNoClickRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
371
371
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
372
372
|
*/
|
|
@@ -405,8 +405,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
405
405
|
*
|
|
406
406
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
407
407
|
* @param getNoResultsRate.index - Index name.
|
|
408
|
-
* @param getNoResultsRate.startDate - Start date
|
|
409
|
-
* @param getNoResultsRate.endDate - End date
|
|
408
|
+
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
409
|
+
* @param getNoResultsRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
410
410
|
* @param getNoResultsRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
411
411
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
412
412
|
*/
|
|
@@ -445,8 +445,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
445
445
|
*
|
|
446
446
|
* @param getPurchaseRate - The getPurchaseRate object.
|
|
447
447
|
* @param getPurchaseRate.index - Index name.
|
|
448
|
-
* @param getPurchaseRate.startDate - Start date
|
|
449
|
-
* @param getPurchaseRate.endDate - End date
|
|
448
|
+
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
449
|
+
* @param getPurchaseRate.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
450
450
|
* @param getPurchaseRate.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
451
451
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
452
452
|
*/
|
|
@@ -485,8 +485,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
485
485
|
*
|
|
486
486
|
* @param getRevenue - The getRevenue object.
|
|
487
487
|
* @param getRevenue.index - Index name.
|
|
488
|
-
* @param getRevenue.startDate - Start date
|
|
489
|
-
* @param getRevenue.endDate - End date
|
|
488
|
+
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
489
|
+
* @param getRevenue.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
490
490
|
* @param getRevenue.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
491
491
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
492
492
|
*/
|
|
@@ -525,8 +525,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
525
525
|
*
|
|
526
526
|
* @param getSearchesCount - The getSearchesCount object.
|
|
527
527
|
* @param getSearchesCount.index - Index name.
|
|
528
|
-
* @param getSearchesCount.startDate - Start date
|
|
529
|
-
* @param getSearchesCount.endDate - End date
|
|
528
|
+
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
529
|
+
* @param getSearchesCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
530
530
|
* @param getSearchesCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
531
531
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
532
532
|
*/
|
|
@@ -565,8 +565,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
565
565
|
*
|
|
566
566
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
567
567
|
* @param getSearchesNoClicks.index - Index name.
|
|
568
|
-
* @param getSearchesNoClicks.startDate - Start date
|
|
569
|
-
* @param getSearchesNoClicks.endDate - End date
|
|
568
|
+
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
569
|
+
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
570
570
|
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
571
571
|
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
572
572
|
* @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -613,8 +613,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
613
613
|
*
|
|
614
614
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
615
615
|
* @param getSearchesNoResults.index - Index name.
|
|
616
|
-
* @param getSearchesNoResults.startDate - Start date
|
|
617
|
-
* @param getSearchesNoResults.endDate - End date
|
|
616
|
+
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
617
|
+
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
618
618
|
* @param getSearchesNoResults.limit - Number of items to return.
|
|
619
619
|
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
620
620
|
* @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -689,8 +689,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
689
689
|
*
|
|
690
690
|
* @param getTopCountries - The getTopCountries object.
|
|
691
691
|
* @param getTopCountries.index - Index name.
|
|
692
|
-
* @param getTopCountries.startDate - Start date
|
|
693
|
-
* @param getTopCountries.endDate - End date
|
|
692
|
+
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
693
|
+
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
694
694
|
* @param getTopCountries.limit - Number of items to return.
|
|
695
695
|
* @param getTopCountries.offset - Position of the first item to return.
|
|
696
696
|
* @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -738,8 +738,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
738
738
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
739
739
|
* @param getTopFilterAttributes.index - Index name.
|
|
740
740
|
* @param getTopFilterAttributes.search - Search query.
|
|
741
|
-
* @param getTopFilterAttributes.startDate - Start date
|
|
742
|
-
* @param getTopFilterAttributes.endDate - End date
|
|
741
|
+
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
742
|
+
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
743
743
|
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
744
744
|
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
745
745
|
* @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -791,8 +791,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
791
791
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
792
792
|
* @param getTopFilterForAttribute.index - Index name.
|
|
793
793
|
* @param getTopFilterForAttribute.search - Search query.
|
|
794
|
-
* @param getTopFilterForAttribute.startDate - Start date
|
|
795
|
-
* @param getTopFilterForAttribute.endDate - End date
|
|
794
|
+
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
795
|
+
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
796
796
|
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
797
797
|
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
798
798
|
* @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -846,8 +846,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
846
846
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
847
847
|
* @param getTopFiltersNoResults.index - Index name.
|
|
848
848
|
* @param getTopFiltersNoResults.search - Search query.
|
|
849
|
-
* @param getTopFiltersNoResults.startDate - Start date
|
|
850
|
-
* @param getTopFiltersNoResults.endDate - End date
|
|
849
|
+
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
850
|
+
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
851
851
|
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
852
852
|
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
853
853
|
* @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -900,8 +900,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
900
900
|
* @param getTopHits.search - Search query.
|
|
901
901
|
* @param getTopHits.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
902
902
|
* @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
903
|
-
* @param getTopHits.startDate - Start date
|
|
904
|
-
* @param getTopHits.endDate - End date
|
|
903
|
+
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
904
|
+
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
905
905
|
* @param getTopHits.limit - Number of items to return.
|
|
906
906
|
* @param getTopHits.offset - Position of the first item to return.
|
|
907
907
|
* @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
@@ -959,8 +959,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
959
959
|
* @param getTopSearches.index - Index name.
|
|
960
960
|
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
961
961
|
* @param getTopSearches.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
|
|
962
|
-
* @param getTopSearches.startDate - Start date
|
|
963
|
-
* @param getTopSearches.endDate - End date
|
|
962
|
+
* @param getTopSearches.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
963
|
+
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
964
964
|
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
965
965
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
966
966
|
* @param getTopSearches.limit - Number of items to return.
|
|
@@ -1021,8 +1021,8 @@ function createAnalyticsClient({ appId: appIdOption, apiKey: apiKeyOption, authM
|
|
|
1021
1021
|
*
|
|
1022
1022
|
* @param getUsersCount - The getUsersCount object.
|
|
1023
1023
|
* @param getUsersCount.index - Index name.
|
|
1024
|
-
* @param getUsersCount.startDate - Start date
|
|
1025
|
-
* @param getUsersCount.endDate - End date
|
|
1024
|
+
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1025
|
+
* @param getUsersCount.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
1026
1026
|
* @param getUsersCount.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
|
|
1027
1027
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
1028
1028
|
*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! client-analytics.umd.js | 5.0.0-alpha.
|
|
2
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self)["@algolia/client-analytics"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(i().getItem(r)||"{}")}function s(e){i().setItem(r,JSON.stringify(e))}return{get:(t,r,i={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),i=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(i),!t)return;s(Object.fromEntries(Object.entries(i).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||i.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function r(e){const t=[...e.caches],i=t.shift();return void 0===i?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,o,s={miss:()=>Promise.resolve()})=>i.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>i.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>i.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>i.clear().catch((()=>r({caches:t}).clear()))}}function i(e={serializable:!0}){let t={};return{get(r,i,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then((e=>o.miss(e))).then((()=>a))},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function n(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class d extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends d{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class l extends c{constructor(e,t,r,i="ApiError"){super(e,r,i),n(this,"status",void 0),this.status=t}}class g extends d{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function m(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}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(o+=`?${i}`),o}function v(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:o,timeouts:a,requester:n,requestsCache:d,responsesCache:c}){async function p(d,c,p=!0){const f=[],S=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(d,c),w=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e.toLowerCase()]=t})),o}(r,d.headers,c.headers),y="GET"===d.method?{...d.data,...c.data}:{},P={...i,...d.queryParameters,...y};if(o.value&&(P["x-algolia-agent"]=o.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?P[e]=c.queryParameters[e].toString():P[e]=c.queryParameters[e];let q=0;const D=async(e,r)=>{const i=e.pop();if(void 0===i)throw new u(function(e){return e.map((e=>v(e)))}(f));let o=c.timeout;void 0===o&&(o=p?a.read:a.write);const y={data:S,headers:w,method:d.method,url:m(i,d.path,P),connectTimeout:r(q,a.connect),responseTimeout:r(q,o)},T=t=>{const r={request:y,response:t,host:i,triesLeft:e.length};return f.push(r),r},x=await n.send(y);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(x)){const o=T(x);return x.isTimedOut&&q++,console.log("Retryable failure",v(o)),await t.set(i,s(i,x.isTimedOut?"timed out":"down")),D(e,r)}if(function({status:e}){return 2==~~(e/100)}(x))return function(e){try{return JSON.parse(e.content)}catch(t){throw new g(t.message,e)}}(x);throw T(x),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new h(i.message,t,i.error,r):new l(i.message,t,r)}catch(e){}return new l(e,t,r)}(x,f)},T=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),x=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),i=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),a=[...i,...o];return{hosts:a.length>0?a:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return D([...x.hosts].reverse(),x.getTimeout)}return{hostsCache:t,requester:n,timeouts:a,algoliaAgent:o,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return p(e,t,o);const s=()=>p(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const a={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return c.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=>c.set(a,e)})},requestsCache:d,responsesCache:c}}function f({algoliaAgents:e,client:t,version:r}){const i=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>i.add(e))),i}const S="5.0.0-alpha.110",w=["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||!w.includes(s)))throw new Error(`\`region\` must be one of the following: ${w.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=p({hosts:(d=o,[{url:d?"analytics.{region}.algolia.com".replace("{region}",d):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:f({algoliaAgents:i,client:"Analytics",version:S}),baseHeaders:{"content-type":"text/plain",...a.headers(),...s.baseHeaders},baseQueryParameters:{...a.queryParameters(),...s.baseQueryParameters}});var d;return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const i={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const i={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customPost({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},customPut({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},getAddToCartRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return n.request(a,o)},getAverageClickPosition({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return n.request(a,o)},getClickPositions({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return n.request(a,o)},getClickThroughRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return n.request(a,o)},getConversionRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoClickRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoResultsRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return n.request(a,o)},getPurchaseRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return n.request(a,o)},getRevenue({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesNoClicks({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:d,headers:{}};return n.request(c,a)},getSearchesNoResults({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:d,headers:{}};return n.request(c,a)},getStatus({index:e},t){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const r={};void 0!==e&&(r.index=e.toString());const i={method:"GET",path:"/2/status",queryParameters:r,headers:{}};return n.request(i,t)},getTopCountries({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:d,headers:{}};return n.request(c,a)},getTopFilterAttributes({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return n.request(u,d)},getTopFilterForAttribute({attribute:e,index:t,search:r,startDate:i,endDate:o,limit:s,offset:a,tags:d},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==t&&(l.index=t.toString()),void 0!==r&&(l.search=r.toString()),void 0!==i&&(l.startDate=i.toString()),void 0!==o&&(l.endDate=o.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==a&&(l.offset=a.toString()),void 0!==d&&(l.tags=d.toString());const g={method:"GET",path:u,queryParameters:l,headers:{}};return n.request(g,c)},getTopFiltersNoResults({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return n.request(u,d)},getTopHits({index:e,search:t,clickAnalytics:r,revenueAnalytics:i,startDate:o,endDate:s,limit:a,offset:d,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==t&&(l.search=t.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==i&&(l.revenueAnalytics=i.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==s&&(l.endDate=s.toString()),void 0!==a&&(l.limit=a.toString()),void 0!==d&&(l.offset=d.toString()),void 0!==c&&(l.tags=c.toString());const g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return n.request(g,u)},getTopSearches({index:e,clickAnalytics:t,revenueAnalytics:r,startDate:i,endDate:o,orderBy:s,direction:a,limit:d,offset:c,tags:u},l){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const g={};void 0!==e&&(g.index=e.toString()),void 0!==t&&(g.clickAnalytics=t.toString()),void 0!==r&&(g.revenueAnalytics=r.toString()),void 0!==i&&(g.startDate=i.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==s&&(g.orderBy=s.toString()),void 0!==a&&(g.direction=a.toString()),void 0!==d&&(g.limit=d.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());const h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return n.request(h,l)},getUsersCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return n.request(a,o)}}}({appId:e,apiKey:o,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const i=(e,i)=>setTimeout((()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})}),e),o=i(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=i(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:r({caches:[t({key:`${S}-${e}`}),i()]}),...a})},e.apiClientVersion=S}));
|
|
1
|
+
/*! client-analytics.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-analytics"]={})}(this,(function(e){"use strict";function t(e){let t;const r=`algolia-client-js-${e.key}`;function i(){return void 0===t&&(t=e.localStorage||window.localStorage),t}function o(){return JSON.parse(i().getItem(r)||"{}")}function s(e){i().setItem(r,JSON.stringify(e))}return{get:(t,r,i={miss:()=>Promise.resolve()})=>Promise.resolve().then((()=>(function(){const t=e.timeToLive?1e3*e.timeToLive:null,r=o(),i=Object.fromEntries(Object.entries(r).filter((([,e])=>void 0!==e.timestamp)));if(s(i),!t)return;s(Object.fromEntries(Object.entries(i).filter((([,e])=>{const r=(new Date).getTime();return!(e.timestamp+t<r)}))))}(),o()[JSON.stringify(t)]))).then((e=>Promise.all([e?e.value:r(),void 0!==e]))).then((([e,t])=>Promise.all([e,t||i.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve().then((()=>{const s=o();return s[JSON.stringify(e)]={timestamp:(new Date).getTime(),value:t},i().setItem(r,JSON.stringify(s)),t})),delete:e=>Promise.resolve().then((()=>{const t=o();delete t[JSON.stringify(e)],i().setItem(r,JSON.stringify(t))})),clear:()=>Promise.resolve().then((()=>{i().removeItem(r)}))}}function r(e){const t=[...e.caches],i=t.shift();return void 0===i?{get:(e,t,r={miss:()=>Promise.resolve()})=>t().then((e=>Promise.all([e,r.miss(e)]))).then((([e])=>e)),set:(e,t)=>Promise.resolve(t),delete:e=>Promise.resolve(),clear:()=>Promise.resolve()}:{get:(e,o,s={miss:()=>Promise.resolve()})=>i.get(e,o,s).catch((()=>r({caches:t}).get(e,o,s))),set:(e,o)=>i.set(e,o).catch((()=>r({caches:t}).set(e,o))),delete:e=>i.delete(e).catch((()=>r({caches:t}).delete(e))),clear:()=>i.clear().catch((()=>r({caches:t}).clear()))}}function i(e={serializable:!0}){let t={};return{get(r,i,o={miss:()=>Promise.resolve()}){const s=JSON.stringify(r);if(s in t)return Promise.resolve(e.serializable?JSON.parse(t[s]):t[s]);const a=i();return a.then((e=>o.miss(e))).then((()=>a))},set:(r,i)=>(t[JSON.stringify(r)]=e.serializable?JSON.stringify(i):i,Promise.resolve(i)),delete:e=>(delete t[JSON.stringify(e)],Promise.resolve()),clear:()=>(t={},Promise.resolve())}}const o=12e4;function s(e,t="up"){const r=Date.now();return{...e,status:t,lastUpdate:r,isUp:function(){return"up"===t||Date.now()-r>o},isTimedOut:function(){return"timed out"===t&&Date.now()-r<=o}}}function a(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,t||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function n(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}class d extends Error{constructor(e,t){super(e),n(this,"name","AlgoliaError"),t&&(this.name=t)}}class c extends d{constructor(e,t,r){super(e,r),n(this,"stackTrace",void 0),this.stackTrace=t}}class u extends c{constructor(e){super("Unreachable hosts - your application id may be incorrect. If the error persists, please create a ticket at https://support.algolia.com/ sharing steps we can use to reproduce the issue.",e,"RetryError")}}class l extends c{constructor(e,t,r,i="ApiError"){super(e,r,i),n(this,"status",void 0),this.status=t}}class g extends d{constructor(e,t){super(e,"DeserializationError"),n(this,"response",void 0),this.response=t}}class h extends l{constructor(e,t,r,i){super(e,t,i,"DetailedApiError"),n(this,"error",void 0),this.error=r}}function m(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}=${encodeURIComponent(t(e[r])?JSON.stringify(e[r]):e[r]).replaceAll("+","%20")}`)).join("&")}(r);let o=`${e.protocol}://${e.url}${e.port?`:${e.port}`:""}/${"/"===t.charAt(0)?t.substring(1):t}`;return i.length&&(o+=`?${i}`),o}function v(e){const t=e.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...e,request:{...e.request,headers:{...e.request.headers,...t}}}}function p({hosts:e,hostsCache:t,baseHeaders:r,baseQueryParameters:i,algoliaAgent:o,timeouts:a,requester:n,requestsCache:d,responsesCache:c}){async function p(d,c,p=!0){const f=[],S=function(e,t){if("GET"===e.method||void 0===e.data&&void 0===t.data)return;const r=Array.isArray(e.data)?e.data:{...e.data,...t.data};return JSON.stringify(r)}(d,c),w=function(e,t,r){const i={Accept:"application/json",...e,...t,...r},o={};return Object.keys(i).forEach((e=>{const t=i[e];o[e.toLowerCase()]=t})),o}(r,d.headers,c.headers),y="GET"===d.method?{...d.data,...c.data}:{},P={...i,...d.queryParameters,...y};if(o.value&&(P["x-algolia-agent"]=o.value),c&&c.queryParameters)for(const e of Object.keys(c.queryParameters))c.queryParameters[e]&&"[object Object]"!==Object.prototype.toString.call(c.queryParameters[e])?P[e]=c.queryParameters[e].toString():P[e]=c.queryParameters[e];let q=0;const D=async(e,r)=>{const i=e.pop();if(void 0===i)throw new u(function(e){return e.map((e=>v(e)))}(f));let o=p?c.timeouts?.read||a.read:c.timeouts?.write||a.write;const y={data:S,headers:w,method:d.method,url:m(i,d.path,P),connectTimeout:r(q,c.timeouts?.connect||a.connect),responseTimeout:r(q,o)},T=t=>{const r={request:y,response:t,host:i,triesLeft:e.length};return f.push(r),r},x=await n.send(y);if(function({isTimedOut:e,status:t}){return e||function({isTimedOut:e,status:t}){return!e&&!~~t}({isTimedOut:e,status:t})||2!=~~(t/100)&&4!=~~(t/100)}(x)){const o=T(x);return x.isTimedOut&&q++,console.log("Retryable failure",v(o)),await t.set(i,s(i,x.isTimedOut?"timed out":"down")),D(e,r)}if(function({status:e}){return 2==~~(e/100)}(x))return function(e){try{return JSON.parse(e.content)}catch(t){throw new g(t.message,e)}}(x);throw T(x),function({content:e,status:t},r){try{const i=JSON.parse(e);return"error"in i?new h(i.message,t,i.error,r):new l(i.message,t,r)}catch(e){}return new l(e,t,r)}(x,f)},T=e.filter((e=>"readWrite"===e.accept||(p?"read"===e.accept:"write"===e.accept))),x=await async function(e){const r=await Promise.all(e.map((e=>t.get(e,(()=>Promise.resolve(s(e))))))),i=r.filter((e=>e.isUp())),o=r.filter((e=>e.isTimedOut())),a=[...i,...o];return{hosts:a.length>0?a:e,getTimeout:(e,t)=>(0===o.length&&0===e?1:o.length+3+e)*t}}(T);return D([...x.hosts].reverse(),x.getTimeout)}return{hostsCache:t,requester:n,timeouts:a,algoliaAgent:o,baseHeaders:r,baseQueryParameters:i,hosts:e,request:function(e,t={}){const o=e.useReadTransporter||"GET"===e.method;if(!o)return p(e,t,o);const s=()=>p(e,t);if(!0!==(t.cacheable||e.cacheable))return s();const a={request:e,requestOptions:t,transporter:{queryParameters:i,headers:r}};return c.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=>c.set(a,e)})},requestsCache:d,responsesCache:c}}function f({algoliaAgents:e,client:t,version:r}){const i=function(e){const t={value:`Algolia for JavaScript (${e})`,add(e){const r=`; ${e.segment}${void 0!==e.version?` (${e.version})`:""}`;return-1===t.value.indexOf(r)&&(t.value=`${t.value}${r}`),t}};return t}(r).add({segment:t,version:r});return e.forEach((e=>i.add(e))),i}const S="5.0.0-alpha.112",w=["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||!w.includes(s)))throw new Error(`\`region\` must be one of the following: ${w.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=p({hosts:(d=o,[{url:d?"analytics.{region}.algolia.com".replace("{region}",d):"analytics.algolia.com",accept:"readWrite",protocol:"https"}]),...s,algoliaAgent:f({algoliaAgents:i,client:"Analytics",version:S}),baseHeaders:{"content-type":"text/plain",...a.headers(),...s.baseHeaders},baseQueryParameters:{...a.queryParameters(),...s.baseQueryParameters}});var d;return{transporter:n,appId:e,clearCache:()=>Promise.all([n.requestsCache.clear(),n.responsesCache.clear()]).then((()=>{})),get _ua(){return n.algoliaAgent.value},addAlgoliaAgent(e,t){n.algoliaAgent.add({segment:e,version:t})},customDelete({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customDelete`.");const i={method:"DELETE",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customGet({path:e,parameters:t},r){if(!e)throw new Error("Parameter `path` is required when calling `customGet`.");const i={method:"GET",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{}};return n.request(i,r)},customPost({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPost`.");const o={method:"POST",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},customPut({path:e,parameters:t,body:r},i){if(!e)throw new Error("Parameter `path` is required when calling `customPut`.");const o={method:"PUT",path:"/{path}".replace("{path}",e),queryParameters:t||{},headers:{},data:r||{}};return n.request(o,i)},getAddToCartRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAddToCartRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/addToCartRate",queryParameters:s,headers:{}};return n.request(a,o)},getAverageClickPosition({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getAverageClickPosition`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/averageClickPosition",queryParameters:s,headers:{}};return n.request(a,o)},getClickPositions({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickPositions`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/positions",queryParameters:s,headers:{}};return n.request(a,o)},getClickThroughRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getClickThroughRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/clicks/clickThroughRate",queryParameters:s,headers:{}};return n.request(a,o)},getConversionRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getConversionRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/conversionRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoClickRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoClickRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noClickRate",queryParameters:s,headers:{}};return n.request(a,o)},getNoResultsRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getNoResultsRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/noResultRate",queryParameters:s,headers:{}};return n.request(a,o)},getPurchaseRate({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getPurchaseRate`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/purchaseRate",queryParameters:s,headers:{}};return n.request(a,o)},getRevenue({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getRevenue`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/conversions/revenue",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/searches/count",queryParameters:s,headers:{}};return n.request(a,o)},getSearchesNoClicks({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoClicks`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noClicks",queryParameters:d,headers:{}};return n.request(c,a)},getSearchesNoResults({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getSearchesNoResults`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/searches/noResults",queryParameters:d,headers:{}};return n.request(c,a)},getStatus({index:e},t){if(!e)throw new Error("Parameter `index` is required when calling `getStatus`.");const r={};void 0!==e&&(r.index=e.toString());const i={method:"GET",path:"/2/status",queryParameters:r,headers:{}};return n.request(i,t)},getTopCountries({index:e,startDate:t,endDate:r,limit:i,offset:o,tags:s},a){if(!e)throw new Error("Parameter `index` is required when calling `getTopCountries`.");const d={};void 0!==e&&(d.index=e.toString()),void 0!==t&&(d.startDate=t.toString()),void 0!==r&&(d.endDate=r.toString()),void 0!==i&&(d.limit=i.toString()),void 0!==o&&(d.offset=o.toString()),void 0!==s&&(d.tags=s.toString());const c={method:"GET",path:"/2/countries",queryParameters:d,headers:{}};return n.request(c,a)},getTopFilterAttributes({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFilterAttributes`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters",queryParameters:c,headers:{}};return n.request(u,d)},getTopFilterForAttribute({attribute:e,index:t,search:r,startDate:i,endDate:o,limit:s,offset:a,tags:d},c){if(!e)throw new Error("Parameter `attribute` is required when calling `getTopFilterForAttribute`.");if(!t)throw new Error("Parameter `index` is required when calling `getTopFilterForAttribute`.");const u="/2/filters/{attribute}".replace("{attribute}",encodeURIComponent(e)),l={};void 0!==t&&(l.index=t.toString()),void 0!==r&&(l.search=r.toString()),void 0!==i&&(l.startDate=i.toString()),void 0!==o&&(l.endDate=o.toString()),void 0!==s&&(l.limit=s.toString()),void 0!==a&&(l.offset=a.toString()),void 0!==d&&(l.tags=d.toString());const g={method:"GET",path:u,queryParameters:l,headers:{}};return n.request(g,c)},getTopFiltersNoResults({index:e,search:t,startDate:r,endDate:i,limit:o,offset:s,tags:a},d){if(!e)throw new Error("Parameter `index` is required when calling `getTopFiltersNoResults`.");const c={};void 0!==e&&(c.index=e.toString()),void 0!==t&&(c.search=t.toString()),void 0!==r&&(c.startDate=r.toString()),void 0!==i&&(c.endDate=i.toString()),void 0!==o&&(c.limit=o.toString()),void 0!==s&&(c.offset=s.toString()),void 0!==a&&(c.tags=a.toString());const u={method:"GET",path:"/2/filters/noResults",queryParameters:c,headers:{}};return n.request(u,d)},getTopHits({index:e,search:t,clickAnalytics:r,revenueAnalytics:i,startDate:o,endDate:s,limit:a,offset:d,tags:c},u){if(!e)throw new Error("Parameter `index` is required when calling `getTopHits`.");const l={};void 0!==e&&(l.index=e.toString()),void 0!==t&&(l.search=t.toString()),void 0!==r&&(l.clickAnalytics=r.toString()),void 0!==i&&(l.revenueAnalytics=i.toString()),void 0!==o&&(l.startDate=o.toString()),void 0!==s&&(l.endDate=s.toString()),void 0!==a&&(l.limit=a.toString()),void 0!==d&&(l.offset=d.toString()),void 0!==c&&(l.tags=c.toString());const g={method:"GET",path:"/2/hits",queryParameters:l,headers:{}};return n.request(g,u)},getTopSearches({index:e,clickAnalytics:t,revenueAnalytics:r,startDate:i,endDate:o,orderBy:s,direction:a,limit:d,offset:c,tags:u},l){if(!e)throw new Error("Parameter `index` is required when calling `getTopSearches`.");const g={};void 0!==e&&(g.index=e.toString()),void 0!==t&&(g.clickAnalytics=t.toString()),void 0!==r&&(g.revenueAnalytics=r.toString()),void 0!==i&&(g.startDate=i.toString()),void 0!==o&&(g.endDate=o.toString()),void 0!==s&&(g.orderBy=s.toString()),void 0!==a&&(g.direction=a.toString()),void 0!==d&&(g.limit=d.toString()),void 0!==c&&(g.offset=c.toString()),void 0!==u&&(g.tags=u.toString());const h={method:"GET",path:"/2/searches",queryParameters:g,headers:{}};return n.request(h,l)},getUsersCount({index:e,startDate:t,endDate:r,tags:i},o){if(!e)throw new Error("Parameter `index` is required when calling `getUsersCount`.");const s={};void 0!==e&&(s.index=e.toString()),void 0!==t&&(s.startDate=t.toString()),void 0!==r&&(s.endDate=r.toString()),void 0!==i&&(s.tags=i.toString());const a={method:"GET",path:"/2/users/count",queryParameters:s,headers:{}};return n.request(a,o)}}}({appId:e,apiKey:o,region:s,timeouts:{connect:1e3,read:2e3,write:3e4},requester:{send:function(e){return new Promise((t=>{const r=new XMLHttpRequest;r.open(e.method,e.url,!0),Object.keys(e.headers).forEach((t=>r.setRequestHeader(t,e.headers[t])));const i=(e,i)=>setTimeout((()=>{r.abort(),t({status:0,content:i,isTimedOut:!0})}),e),o=i(e.connectTimeout,"Connection timeout");let s;r.onreadystatechange=()=>{r.readyState>r.OPENED&&void 0===s&&(clearTimeout(o),s=i(e.responseTimeout,"Socket timeout"))},r.onerror=()=>{0===r.status&&(clearTimeout(o),clearTimeout(s),t({content:r.responseText||"Network request failed",status:r.status,isTimedOut:!1}))},r.onload=()=>{clearTimeout(o),clearTimeout(s),t({content:r.responseText,status:r.status,isTimedOut:!1})},r.send(e.data)}))}},algoliaAgents:[{segment:"Browser"}],authMode:"WithinQueryParameters",responsesCache:i(),requestsCache:i({serializable:!1}),hostsCache:r({caches:[t({key:`${S}-${e}`}),i()]}),...a})},e.apiClientVersion=S}));
|
|
@@ -69,11 +69,11 @@ export type GetAddToCartRateProps = {
|
|
|
69
69
|
*/
|
|
70
70
|
index: string;
|
|
71
71
|
/**
|
|
72
|
-
* Start date
|
|
72
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
73
73
|
*/
|
|
74
74
|
startDate?: string;
|
|
75
75
|
/**
|
|
76
|
-
* End date
|
|
76
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
77
77
|
*/
|
|
78
78
|
endDate?: string;
|
|
79
79
|
/**
|
|
@@ -90,11 +90,11 @@ export type GetAverageClickPositionProps = {
|
|
|
90
90
|
*/
|
|
91
91
|
index: string;
|
|
92
92
|
/**
|
|
93
|
-
* Start date
|
|
93
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
94
94
|
*/
|
|
95
95
|
startDate?: string;
|
|
96
96
|
/**
|
|
97
|
-
* End date
|
|
97
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
98
98
|
*/
|
|
99
99
|
endDate?: string;
|
|
100
100
|
/**
|
|
@@ -111,11 +111,11 @@ export type GetClickPositionsProps = {
|
|
|
111
111
|
*/
|
|
112
112
|
index: string;
|
|
113
113
|
/**
|
|
114
|
-
* Start date
|
|
114
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
115
115
|
*/
|
|
116
116
|
startDate?: string;
|
|
117
117
|
/**
|
|
118
|
-
* End date
|
|
118
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
119
119
|
*/
|
|
120
120
|
endDate?: string;
|
|
121
121
|
/**
|
|
@@ -132,11 +132,11 @@ export type GetClickThroughRateProps = {
|
|
|
132
132
|
*/
|
|
133
133
|
index: string;
|
|
134
134
|
/**
|
|
135
|
-
* Start date
|
|
135
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
136
136
|
*/
|
|
137
137
|
startDate?: string;
|
|
138
138
|
/**
|
|
139
|
-
* End date
|
|
139
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
140
140
|
*/
|
|
141
141
|
endDate?: string;
|
|
142
142
|
/**
|
|
@@ -153,11 +153,11 @@ export type GetConversionRateProps = {
|
|
|
153
153
|
*/
|
|
154
154
|
index: string;
|
|
155
155
|
/**
|
|
156
|
-
* Start date
|
|
156
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
157
157
|
*/
|
|
158
158
|
startDate?: string;
|
|
159
159
|
/**
|
|
160
|
-
* End date
|
|
160
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
161
161
|
*/
|
|
162
162
|
endDate?: string;
|
|
163
163
|
/**
|
|
@@ -174,11 +174,11 @@ export type GetNoClickRateProps = {
|
|
|
174
174
|
*/
|
|
175
175
|
index: string;
|
|
176
176
|
/**
|
|
177
|
-
* Start date
|
|
177
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
178
178
|
*/
|
|
179
179
|
startDate?: string;
|
|
180
180
|
/**
|
|
181
|
-
* End date
|
|
181
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
182
182
|
*/
|
|
183
183
|
endDate?: string;
|
|
184
184
|
/**
|
|
@@ -195,11 +195,11 @@ export type GetNoResultsRateProps = {
|
|
|
195
195
|
*/
|
|
196
196
|
index: string;
|
|
197
197
|
/**
|
|
198
|
-
* Start date
|
|
198
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
199
199
|
*/
|
|
200
200
|
startDate?: string;
|
|
201
201
|
/**
|
|
202
|
-
* End date
|
|
202
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
203
203
|
*/
|
|
204
204
|
endDate?: string;
|
|
205
205
|
/**
|
|
@@ -216,11 +216,11 @@ export type GetPurchaseRateProps = {
|
|
|
216
216
|
*/
|
|
217
217
|
index: string;
|
|
218
218
|
/**
|
|
219
|
-
* Start date
|
|
219
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
220
220
|
*/
|
|
221
221
|
startDate?: string;
|
|
222
222
|
/**
|
|
223
|
-
* End date
|
|
223
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
224
224
|
*/
|
|
225
225
|
endDate?: string;
|
|
226
226
|
/**
|
|
@@ -237,11 +237,11 @@ export type GetRevenueProps = {
|
|
|
237
237
|
*/
|
|
238
238
|
index: string;
|
|
239
239
|
/**
|
|
240
|
-
* Start date
|
|
240
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
241
241
|
*/
|
|
242
242
|
startDate?: string;
|
|
243
243
|
/**
|
|
244
|
-
* End date
|
|
244
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
245
245
|
*/
|
|
246
246
|
endDate?: string;
|
|
247
247
|
/**
|
|
@@ -258,11 +258,11 @@ export type GetSearchesCountProps = {
|
|
|
258
258
|
*/
|
|
259
259
|
index: string;
|
|
260
260
|
/**
|
|
261
|
-
* Start date
|
|
261
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
262
262
|
*/
|
|
263
263
|
startDate?: string;
|
|
264
264
|
/**
|
|
265
|
-
* End date
|
|
265
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
266
266
|
*/
|
|
267
267
|
endDate?: string;
|
|
268
268
|
/**
|
|
@@ -279,11 +279,11 @@ export type GetSearchesNoClicksProps = {
|
|
|
279
279
|
*/
|
|
280
280
|
index: string;
|
|
281
281
|
/**
|
|
282
|
-
* Start date
|
|
282
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
283
283
|
*/
|
|
284
284
|
startDate?: string;
|
|
285
285
|
/**
|
|
286
|
-
* End date
|
|
286
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
287
287
|
*/
|
|
288
288
|
endDate?: string;
|
|
289
289
|
/**
|
|
@@ -308,11 +308,11 @@ export type GetSearchesNoResultsProps = {
|
|
|
308
308
|
*/
|
|
309
309
|
index: string;
|
|
310
310
|
/**
|
|
311
|
-
* Start date
|
|
311
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
312
312
|
*/
|
|
313
313
|
startDate?: string;
|
|
314
314
|
/**
|
|
315
|
-
* End date
|
|
315
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
316
316
|
*/
|
|
317
317
|
endDate?: string;
|
|
318
318
|
/**
|
|
@@ -346,11 +346,11 @@ export type GetTopCountriesProps = {
|
|
|
346
346
|
*/
|
|
347
347
|
index: string;
|
|
348
348
|
/**
|
|
349
|
-
* Start date
|
|
349
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
350
350
|
*/
|
|
351
351
|
startDate?: string;
|
|
352
352
|
/**
|
|
353
|
-
* End date
|
|
353
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
354
354
|
*/
|
|
355
355
|
endDate?: string;
|
|
356
356
|
/**
|
|
@@ -379,11 +379,11 @@ export type GetTopFilterAttributesProps = {
|
|
|
379
379
|
*/
|
|
380
380
|
search?: string;
|
|
381
381
|
/**
|
|
382
|
-
* Start date
|
|
382
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
383
383
|
*/
|
|
384
384
|
startDate?: string;
|
|
385
385
|
/**
|
|
386
|
-
* End date
|
|
386
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
387
387
|
*/
|
|
388
388
|
endDate?: string;
|
|
389
389
|
/**
|
|
@@ -416,11 +416,11 @@ export type GetTopFilterForAttributeProps = {
|
|
|
416
416
|
*/
|
|
417
417
|
search?: string;
|
|
418
418
|
/**
|
|
419
|
-
* Start date
|
|
419
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
420
420
|
*/
|
|
421
421
|
startDate?: string;
|
|
422
422
|
/**
|
|
423
|
-
* End date
|
|
423
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
424
424
|
*/
|
|
425
425
|
endDate?: string;
|
|
426
426
|
/**
|
|
@@ -449,11 +449,11 @@ export type GetTopFiltersNoResultsProps = {
|
|
|
449
449
|
*/
|
|
450
450
|
search?: string;
|
|
451
451
|
/**
|
|
452
|
-
* Start date
|
|
452
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
453
453
|
*/
|
|
454
454
|
startDate?: string;
|
|
455
455
|
/**
|
|
456
|
-
* End date
|
|
456
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
457
457
|
*/
|
|
458
458
|
endDate?: string;
|
|
459
459
|
/**
|
|
@@ -490,11 +490,11 @@ export type GetTopHitsProps = {
|
|
|
490
490
|
*/
|
|
491
491
|
revenueAnalytics?: boolean;
|
|
492
492
|
/**
|
|
493
|
-
* Start date
|
|
493
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
494
494
|
*/
|
|
495
495
|
startDate?: string;
|
|
496
496
|
/**
|
|
497
|
-
* End date
|
|
497
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
498
498
|
*/
|
|
499
499
|
endDate?: string;
|
|
500
500
|
/**
|
|
@@ -527,11 +527,11 @@ export type GetTopSearchesProps = {
|
|
|
527
527
|
*/
|
|
528
528
|
revenueAnalytics?: boolean;
|
|
529
529
|
/**
|
|
530
|
-
* Start date
|
|
530
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
531
531
|
*/
|
|
532
532
|
startDate?: string;
|
|
533
533
|
/**
|
|
534
|
-
* End date
|
|
534
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
535
535
|
*/
|
|
536
536
|
endDate?: string;
|
|
537
537
|
/**
|
|
@@ -564,11 +564,11 @@ export type GetUsersCountProps = {
|
|
|
564
564
|
*/
|
|
565
565
|
index: string;
|
|
566
566
|
/**
|
|
567
|
-
* Start date
|
|
567
|
+
* Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
568
568
|
*/
|
|
569
569
|
startDate?: string;
|
|
570
570
|
/**
|
|
571
|
-
* End date
|
|
571
|
+
* End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
572
572
|
*/
|
|
573
573
|
endDate?: string;
|
|
574
574
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type GetStatusResponse = {
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Date and time when the object was updated, in RFC 3339 format.
|
|
4
4
|
*/
|
|
5
5
|
updatedAt: string | null;
|
|
6
6
|
};
|