You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/client-analytics/src/analyticsClient.ts
+31-29Lines changed: 31 additions & 29 deletions
Original file line number
Diff line number
Diff line change
@@ -291,7 +291,6 @@ export function createAnalyticsClient({
291
291
if(index!==undefined){
292
292
queryParameters.index=index.toString();
293
293
}
294
-
295
294
if(startDate!==undefined){
296
295
queryParameters.startDate=startDate.toString();
297
296
}
@@ -343,7 +342,6 @@ export function createAnalyticsClient({
343
342
if(startDate!==undefined){
344
343
queryParameters.startDate=startDate.toString();
345
344
}
346
-
347
345
if(endDate!==undefined){
348
346
queryParameters.endDate=endDate.toString();
349
347
}
@@ -388,13 +386,13 @@ export function createAnalyticsClient({
388
386
if(index!==undefined){
389
387
queryParameters.index=index.toString();
390
388
}
389
+
391
390
if(startDate!==undefined){
392
391
queryParameters.startDate=startDate.toString();
393
392
}
394
393
if(endDate!==undefined){
395
394
queryParameters.endDate=endDate.toString();
396
395
}
397
-
398
396
if(tags!==undefined){
399
397
queryParameters.tags=tags.toString();
400
398
}
@@ -433,13 +431,14 @@ export function createAnalyticsClient({
433
431
constrequestPath='/2/clicks/clickThroughRate';
434
432
constheaders: Headers={};
435
433
constqueryParameters: QueryParameters={};
436
-
437
434
if(index!==undefined){
438
435
queryParameters.index=index.toString();
439
436
}
437
+
440
438
if(startDate!==undefined){
441
439
queryParameters.startDate=startDate.toString();
442
440
}
441
+
443
442
if(endDate!==undefined){
444
443
queryParameters.endDate=endDate.toString();
445
444
}
@@ -484,13 +483,13 @@ export function createAnalyticsClient({
484
483
if(index!==undefined){
485
484
queryParameters.index=index.toString();
486
485
}
487
-
488
486
if(startDate!==undefined){
489
487
queryParameters.startDate=startDate.toString();
490
488
}
491
489
if(endDate!==undefined){
492
490
queryParameters.endDate=endDate.toString();
493
491
}
492
+
494
493
if(tags!==undefined){
495
494
queryParameters.tags=tags.toString();
496
495
}
@@ -627,7 +626,6 @@ export function createAnalyticsClient({
627
626
if(index!==undefined){
628
627
queryParameters.index=index.toString();
629
628
}
630
-
631
629
if(startDate!==undefined){
632
630
queryParameters.startDate=startDate.toString();
633
631
}
@@ -675,9 +673,11 @@ export function createAnalyticsClient({
675
673
if(index!==undefined){
676
674
queryParameters.index=index.toString();
677
675
}
676
+
678
677
if(startDate!==undefined){
679
678
queryParameters.startDate=startDate.toString();
680
679
}
680
+
681
681
if(endDate!==undefined){
682
682
queryParameters.endDate=endDate.toString();
683
683
}
@@ -722,13 +722,13 @@ export function createAnalyticsClient({
722
722
if(index!==undefined){
723
723
queryParameters.index=index.toString();
724
724
}
725
-
726
725
if(startDate!==undefined){
727
726
queryParameters.startDate=startDate.toString();
728
727
}
729
728
if(endDate!==undefined){
730
729
queryParameters.endDate=endDate.toString();
731
730
}
731
+
732
732
if(tags!==undefined){
733
733
queryParameters.tags=tags.toString();
734
734
}
@@ -753,8 +753,8 @@ export function createAnalyticsClient({
753
753
* @param getSearchesNoClicks.index - Index name.
754
754
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
755
755
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
756
-
* @param getSearchesNoClicks.limit - Number of items to return.
757
-
* @param getSearchesNoClicks.offset - Position of the first item to return.
756
+
* @param getSearchesNoClicks.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
757
+
* @param getSearchesNoClicks.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
758
758
* @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/).
759
759
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
760
760
*/
@@ -772,6 +772,7 @@ export function createAnalyticsClient({
772
772
if(index!==undefined){
773
773
queryParameters.index=index.toString();
774
774
}
775
+
775
776
if(startDate!==undefined){
776
777
queryParameters.startDate=startDate.toString();
777
778
}
@@ -781,10 +782,10 @@ export function createAnalyticsClient({
781
782
if(limit!==undefined){
782
783
queryParameters.limit=limit.toString();
783
784
}
784
-
785
785
if(offset!==undefined){
786
786
queryParameters.offset=offset.toString();
787
787
}
788
+
788
789
if(tags!==undefined){
789
790
queryParameters.tags=tags.toString();
790
791
}
@@ -809,8 +810,8 @@ export function createAnalyticsClient({
809
810
* @param getSearchesNoResults.index - Index name.
810
811
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
811
812
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
812
-
* @param getSearchesNoResults.limit - Number of items to return.
813
-
* @param getSearchesNoResults.offset - Position of the first item to return.
813
+
* @param getSearchesNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
814
+
* @param getSearchesNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
814
815
* @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/).
815
816
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
816
817
*/
@@ -838,10 +839,10 @@ export function createAnalyticsClient({
838
839
if(limit!==undefined){
839
840
queryParameters.limit=limit.toString();
840
841
}
841
-
842
842
if(offset!==undefined){
843
843
queryParameters.offset=offset.toString();
844
844
}
845
+
845
846
if(tags!==undefined){
846
847
queryParameters.tags=tags.toString();
847
848
}
@@ -898,8 +899,8 @@ export function createAnalyticsClient({
898
899
* @param getTopCountries.index - Index name.
899
900
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
900
901
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
901
-
* @param getTopCountries.limit - Number of items to return.
902
-
* @param getTopCountries.offset - Position of the first item to return.
902
+
* @param getTopCountries.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
903
+
* @param getTopCountries.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
903
904
* @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/).
904
905
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
905
906
*/
@@ -926,7 +927,6 @@ export function createAnalyticsClient({
926
927
if(limit!==undefined){
927
928
queryParameters.limit=limit.toString();
928
929
}
929
-
930
930
if(offset!==undefined){
931
931
queryParameters.offset=offset.toString();
932
932
}
@@ -955,8 +955,8 @@ export function createAnalyticsClient({
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
957
957
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
958
-
* @param getTopFilterAttributes.limit - Number of items to return.
959
-
* @param getTopFilterAttributes.offset - Position of the first item to return.
958
+
* @param getTopFilterAttributes.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
959
+
* @param getTopFilterAttributes.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
960
960
* @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/).
961
961
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
962
962
*/
@@ -971,7 +971,6 @@ export function createAnalyticsClient({
971
971
constrequestPath='/2/filters';
972
972
constheaders: Headers={};
973
973
constqueryParameters: QueryParameters={};
974
-
975
974
if(index!==undefined){
976
975
queryParameters.index=index.toString();
977
976
}
@@ -981,13 +980,13 @@ export function createAnalyticsClient({
981
980
if(startDate!==undefined){
982
981
queryParameters.startDate=startDate.toString();
983
982
}
983
+
984
984
if(endDate!==undefined){
985
985
queryParameters.endDate=endDate.toString();
986
986
}
987
987
if(limit!==undefined){
988
988
queryParameters.limit=limit.toString();
989
989
}
990
-
991
990
if(offset!==undefined){
992
991
queryParameters.offset=offset.toString();
993
992
}
@@ -1017,8 +1016,8 @@ export function createAnalyticsClient({
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1019
1018
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1020
-
* @param getTopFilterForAttribute.limit - Number of items to return.
1021
-
* @param getTopFilterForAttribute.offset - Position of the first item to return.
1019
+
* @param getTopFilterForAttribute.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
1020
+
* @param getTopFilterForAttribute.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
1022
1021
* @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/).
1023
1022
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1024
1023
*/
@@ -1040,10 +1039,10 @@ export function createAnalyticsClient({
1040
1039
if(index!==undefined){
1041
1040
queryParameters.index=index.toString();
1042
1041
}
1042
+
1043
1043
if(search!==undefined){
1044
1044
queryParameters.search=search.toString();
1045
1045
}
1046
-
1047
1046
if(startDate!==undefined){
1048
1047
queryParameters.startDate=startDate.toString();
1049
1048
}
@@ -1053,6 +1052,7 @@ export function createAnalyticsClient({
1053
1052
if(limit!==undefined){
1054
1053
queryParameters.limit=limit.toString();
1055
1054
}
1055
+
1056
1056
if(offset!==undefined){
1057
1057
queryParameters.offset=offset.toString();
1058
1058
}
@@ -1081,8 +1081,8 @@ export function createAnalyticsClient({
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1083
1083
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1084
-
* @param getTopFiltersNoResults.limit - Number of items to return.
1085
-
* @param getTopFiltersNoResults.offset - Position of the first item to return.
1084
+
* @param getTopFiltersNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
1085
+
* @param getTopFiltersNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
1086
1086
* @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/).
1087
1087
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1088
1088
*/
@@ -1113,6 +1113,7 @@ export function createAnalyticsClient({
1113
1113
if(limit!==undefined){
1114
1114
queryParameters.limit=limit.toString();
1115
1115
}
1116
+
1116
1117
if(offset!==undefined){
1117
1118
queryParameters.offset=offset.toString();
1118
1119
}
@@ -1143,8 +1144,8 @@ export function createAnalyticsClient({
1143
1144
* @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.
1144
1145
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
1145
1146
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1146
-
* @param getTopHits.limit - Number of items to return.
1147
-
* @param getTopHits.offset - Position of the first item to return.
1147
+
* @param getTopHits.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
1148
+
* @param getTopHits.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
1148
1149
* @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/).
1149
1150
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1150
1151
*/
@@ -1213,8 +1214,8 @@ export function createAnalyticsClient({
1213
1214
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1214
1215
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
1215
1216
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
1216
-
* @param getTopSearches.limit - Number of items to return.
1217
-
* @param getTopSearches.offset - Position of the first item to return.
1217
+
* @param getTopSearches.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
1218
+
* @param getTopSearches.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
1218
1219
* @param getTopSearches.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/).
1219
1220
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1220
1221
*/
@@ -1262,6 +1263,7 @@ export function createAnalyticsClient({
0 commit comments