@algolia/client-analytics 5.0.0-alpha.107 → 5.0.0-alpha.109

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 (186) hide show
  1. package/dist/builds/browser.d.ts +6 -3
  2. package/dist/builds/browser.d.ts.map +1 -1
  3. package/dist/builds/node.d.ts +6 -3
  4. package/dist/builds/node.d.ts.map +1 -1
  5. package/dist/client-analytics.cjs +181 -53
  6. package/dist/client-analytics.esm.browser.js +182 -54
  7. package/dist/client-analytics.esm.node.js +181 -53
  8. package/dist/client-analytics.umd.js +2 -2
  9. package/dist/model/clickPositionsInner.d.ts +14 -0
  10. package/dist/model/clickPositionsInner.d.ts.map +1 -0
  11. package/dist/model/clientMethodProps.d.ts +96 -25
  12. package/dist/model/clientMethodProps.d.ts.map +1 -1
  13. package/dist/model/currenciesValue.d.ts +14 -0
  14. package/dist/model/currenciesValue.d.ts.map +1 -0
  15. package/dist/model/dailyAddToCartRates.d.ts +19 -0
  16. package/dist/model/dailyAddToCartRates.d.ts.map +1 -0
  17. package/dist/model/dailyAverageClicks.d.ts +15 -0
  18. package/dist/model/dailyAverageClicks.d.ts.map +1 -0
  19. package/dist/model/dailyClickThroughRates.d.ts +19 -0
  20. package/dist/model/dailyClickThroughRates.d.ts.map +1 -0
  21. package/dist/model/dailyConversionRates.d.ts +19 -0
  22. package/dist/model/dailyConversionRates.d.ts.map +1 -0
  23. package/dist/model/dailyNoClickRates.d.ts +19 -0
  24. package/dist/model/dailyNoClickRates.d.ts.map +1 -0
  25. package/dist/model/dailyNoResultsRates.d.ts +19 -0
  26. package/dist/model/dailyNoResultsRates.d.ts.map +1 -0
  27. package/dist/model/dailyPurchaseRates.d.ts +19 -0
  28. package/dist/model/dailyPurchaseRates.d.ts.map +1 -0
  29. package/dist/model/dailyRevenue.d.ts +12 -0
  30. package/dist/model/dailyRevenue.d.ts.map +1 -0
  31. package/dist/model/dailySearches.d.ts +11 -0
  32. package/dist/model/dailySearches.d.ts.map +1 -0
  33. package/dist/model/dailySearchesNoClicks.d.ts +15 -0
  34. package/dist/model/dailySearchesNoClicks.d.ts.map +1 -0
  35. package/dist/model/dailySearchesNoResults.d.ts +15 -0
  36. package/dist/model/dailySearchesNoResults.d.ts.map +1 -0
  37. package/dist/model/dailyUsers.d.ts +11 -0
  38. package/dist/model/dailyUsers.d.ts.map +1 -0
  39. package/dist/model/getAddToCartRateResponse.d.ts +20 -0
  40. package/dist/model/getAddToCartRateResponse.d.ts.map +1 -0
  41. package/dist/model/getAverageClickPositionResponse.d.ts +6 -6
  42. package/dist/model/getAverageClickPositionResponse.d.ts.map +1 -1
  43. package/dist/model/getClickPositionsResponse.d.ts +3 -3
  44. package/dist/model/getClickPositionsResponse.d.ts.map +1 -1
  45. package/dist/model/getClickThroughRateResponse.d.ts +8 -8
  46. package/dist/model/getClickThroughRateResponse.d.ts.map +1 -1
  47. package/dist/model/getConversionRateResponse.d.ts +20 -0
  48. package/dist/model/getConversionRateResponse.d.ts.map +1 -0
  49. package/dist/model/getNoClickRateResponse.d.ts +6 -6
  50. package/dist/model/getNoClickRateResponse.d.ts.map +1 -1
  51. package/dist/model/getNoResultsRateResponse.d.ts +6 -6
  52. package/dist/model/getNoResultsRateResponse.d.ts.map +1 -1
  53. package/dist/model/getPurchaseRateResponse.d.ts +20 -0
  54. package/dist/model/getPurchaseRateResponse.d.ts.map +1 -0
  55. package/dist/model/getRevenue.d.ts +13 -0
  56. package/dist/model/getRevenue.d.ts.map +1 -0
  57. package/dist/model/getSearchesCountResponse.d.ts +3 -3
  58. package/dist/model/getSearchesCountResponse.d.ts.map +1 -1
  59. package/dist/model/getSearchesNoClicksResponse.d.ts +3 -3
  60. package/dist/model/getSearchesNoClicksResponse.d.ts.map +1 -1
  61. package/dist/model/getSearchesNoResultsResponse.d.ts +3 -3
  62. package/dist/model/getSearchesNoResultsResponse.d.ts.map +1 -1
  63. package/dist/model/getStatusResponse.d.ts +2 -2
  64. package/dist/model/getStatusResponse.d.ts.map +1 -1
  65. package/dist/model/getTopCountriesResponse.d.ts +1 -1
  66. package/dist/model/getTopFilterAttributesResponse.d.ts +1 -1
  67. package/dist/model/getTopFilterForAttribute.d.ts +2 -4
  68. package/dist/model/getTopFilterForAttribute.d.ts.map +1 -1
  69. package/dist/model/getTopFiltersNoResultsResponse.d.ts +2 -2
  70. package/dist/model/getTopFiltersNoResultsResponse.d.ts.map +1 -1
  71. package/dist/model/getTopFiltersNoResultsValue.d.ts +2 -4
  72. package/dist/model/getTopFiltersNoResultsValue.d.ts.map +1 -1
  73. package/dist/model/getTopHitsResponse.d.ts +2 -1
  74. package/dist/model/getTopHitsResponse.d.ts.map +1 -1
  75. package/dist/model/getTopSearchesResponse.d.ts +2 -1
  76. package/dist/model/getTopSearchesResponse.d.ts.map +1 -1
  77. package/dist/model/getUsersCountResponse.d.ts +4 -4
  78. package/dist/model/getUsersCountResponse.d.ts.map +1 -1
  79. package/dist/model/index.d.ts +23 -11
  80. package/dist/model/index.d.ts.map +1 -1
  81. package/dist/model/operator.d.ts +5 -0
  82. package/dist/model/operator.d.ts.map +1 -0
  83. package/dist/model/orderBy.d.ts +1 -1
  84. package/dist/model/topCountry.d.ts +1 -1
  85. package/dist/model/topHit.d.ts +1 -1
  86. package/dist/model/topHitWithAnalytics.d.ts +9 -9
  87. package/dist/model/topHitWithAnalytics.d.ts.map +1 -1
  88. package/dist/model/topHitWithRevenueAnalytics.d.ts +52 -0
  89. package/dist/model/topHitWithRevenueAnalytics.d.ts.map +1 -0
  90. package/dist/model/topHitsResponse.d.ts +1 -1
  91. package/dist/model/topHitsResponseWithAnalytics.d.ts +1 -1
  92. package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts +8 -0
  93. package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts.map +1 -0
  94. package/dist/model/topSearch.d.ts +2 -2
  95. package/dist/model/topSearchWithAnalytics.d.ts +17 -12
  96. package/dist/model/topSearchWithAnalytics.d.ts.map +1 -1
  97. package/dist/model/topSearchWithRevenueAnalytics.d.ts +65 -0
  98. package/dist/model/topSearchWithRevenueAnalytics.d.ts.map +1 -0
  99. package/dist/model/topSearchesResponse.d.ts +1 -1
  100. package/dist/model/topSearchesResponseWithAnalytics.d.ts +1 -1
  101. package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts +8 -0
  102. package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +1 -0
  103. package/dist/src/analyticsClient.d.ts +97 -50
  104. package/dist/src/analyticsClient.d.ts.map +1 -1
  105. package/model/clickPositionsInner.ts +16 -0
  106. package/model/clientMethodProps.ts +99 -25
  107. package/model/currenciesValue.ts +16 -0
  108. package/model/dailyAddToCartRates.ts +23 -0
  109. package/model/dailyAverageClicks.ts +18 -0
  110. package/model/dailyClickThroughRates.ts +23 -0
  111. package/model/dailyConversionRates.ts +23 -0
  112. package/model/dailyNoClickRates.ts +23 -0
  113. package/model/dailyNoResultsRates.ts +23 -0
  114. package/model/dailyPurchaseRates.ts +23 -0
  115. package/model/dailyRevenue.ts +15 -0
  116. package/model/{searchEvent.ts → dailySearches.ts} +2 -2
  117. package/model/{searchNoResultEvent.ts → dailySearchesNoClicks.ts} +3 -3
  118. package/model/{searchNoClickEvent.ts → dailySearchesNoResults.ts} +3 -3
  119. package/model/{userWithDate.ts → dailyUsers.ts} +3 -3
  120. package/model/getAddToCartRateResponse.ts +25 -0
  121. package/model/getAverageClickPositionResponse.ts +6 -6
  122. package/model/getClickPositionsResponse.ts +3 -3
  123. package/model/getClickThroughRateResponse.ts +8 -8
  124. package/model/getConversionRateResponse.ts +25 -0
  125. package/model/getNoClickRateResponse.ts +6 -6
  126. package/model/getNoResultsRateResponse.ts +6 -6
  127. package/model/getPurchaseRateResponse.ts +25 -0
  128. package/model/getRevenue.ts +16 -0
  129. package/model/getSearchesCountResponse.ts +3 -3
  130. package/model/getSearchesNoClicksResponse.ts +3 -3
  131. package/model/getSearchesNoResultsResponse.ts +3 -3
  132. package/model/getStatusResponse.ts +2 -2
  133. package/model/getTopCountriesResponse.ts +1 -1
  134. package/model/getTopFilterAttributesResponse.ts +1 -1
  135. package/model/getTopFilterForAttribute.ts +3 -4
  136. package/model/getTopFiltersNoResultsResponse.ts +2 -2
  137. package/model/getTopFiltersNoResultsValue.ts +3 -4
  138. package/model/getTopHitsResponse.ts +5 -1
  139. package/model/getTopSearchesResponse.ts +3 -1
  140. package/model/getUsersCountResponse.ts +4 -4
  141. package/model/index.ts +23 -11
  142. package/model/operator.ts +6 -0
  143. package/model/orderBy.ts +1 -1
  144. package/model/topCountry.ts +1 -1
  145. package/model/topHit.ts +1 -1
  146. package/model/topHitWithAnalytics.ts +9 -9
  147. package/model/topHitWithRevenueAnalytics.ts +65 -0
  148. package/model/topHitsResponse.ts +1 -1
  149. package/model/topHitsResponseWithAnalytics.ts +1 -1
  150. package/model/topHitsResponseWithRevenueAnalytics.ts +10 -0
  151. package/model/topSearch.ts +2 -2
  152. package/model/topSearchWithAnalytics.ts +19 -12
  153. package/model/topSearchWithRevenueAnalytics.ts +81 -0
  154. package/model/topSearchesResponse.ts +1 -1
  155. package/model/topSearchesResponseWithAnalytics.ts +1 -1
  156. package/model/topSearchesResponseWithRevenueAnalytics.ts +10 -0
  157. package/package.json +7 -7
  158. package/dist/model/averageClickEvent.d.ts +0 -15
  159. package/dist/model/averageClickEvent.d.ts.map +0 -1
  160. package/dist/model/clickPosition.d.ts +0 -11
  161. package/dist/model/clickPosition.d.ts.map +0 -1
  162. package/dist/model/clickThroughRateEvent.d.ts +0 -19
  163. package/dist/model/clickThroughRateEvent.d.ts.map +0 -1
  164. package/dist/model/conversionRateEvent.d.ts +0 -19
  165. package/dist/model/conversionRateEvent.d.ts.map +0 -1
  166. package/dist/model/getConversationRateResponse.d.ts +0 -20
  167. package/dist/model/getConversationRateResponse.d.ts.map +0 -1
  168. package/dist/model/noClickRateEvent.d.ts +0 -19
  169. package/dist/model/noClickRateEvent.d.ts.map +0 -1
  170. package/dist/model/noResultsRateEvent.d.ts +0 -19
  171. package/dist/model/noResultsRateEvent.d.ts.map +0 -1
  172. package/dist/model/searchEvent.d.ts +0 -11
  173. package/dist/model/searchEvent.d.ts.map +0 -1
  174. package/dist/model/searchNoClickEvent.d.ts +0 -15
  175. package/dist/model/searchNoClickEvent.d.ts.map +0 -1
  176. package/dist/model/searchNoResultEvent.d.ts +0 -15
  177. package/dist/model/searchNoResultEvent.d.ts.map +0 -1
  178. package/dist/model/userWithDate.d.ts +0 -11
  179. package/dist/model/userWithDate.d.ts.map +0 -1
  180. package/model/averageClickEvent.ts +0 -18
  181. package/model/clickPosition.ts +0 -13
  182. package/model/clickThroughRateEvent.ts +0 -23
  183. package/model/conversionRateEvent.ts +0 -23
  184. package/model/getConversationRateResponse.ts +0 -25
  185. package/model/noClickRateEvent.ts +0 -23
  186. package/model/noResultsRateEvent.ts +0 -23
@@ -67,6 +67,28 @@ export type CustomPutProps = {
67
67
  body?: Record<string, any>;
68
68
  };
69
69
 
70
+ /**
71
+ * Properties for the `getAddToCartRate` method.
72
+ */
73
+ export type GetAddToCartRateProps = {
74
+ /**
75
+ * Index name.
76
+ */
77
+ index: string;
78
+ /**
79
+ * Start date (`YYYY-MM-DD`) of the period to analyze.
80
+ */
81
+ startDate?: string;
82
+ /**
83
+ * End date (`YYYY-MM-DD`) of the period to analyze.
84
+ */
85
+ endDate?: string;
86
+ /**
87
+ * 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/).
88
+ */
89
+ tags?: string;
90
+ };
91
+
70
92
  /**
71
93
  * Properties for the `getAverageClickPosition` method.
72
94
  */
@@ -84,7 +106,7 @@ export type GetAverageClickPositionProps = {
84
106
  */
85
107
  endDate?: string;
86
108
  /**
87
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
109
+ * 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/).
88
110
  */
89
111
  tags?: string;
90
112
  };
@@ -106,7 +128,7 @@ export type GetClickPositionsProps = {
106
128
  */
107
129
  endDate?: string;
108
130
  /**
109
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
131
+ * 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/).
110
132
  */
111
133
  tags?: string;
112
134
  };
@@ -128,15 +150,15 @@ export type GetClickThroughRateProps = {
128
150
  */
129
151
  endDate?: string;
130
152
  /**
131
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
153
+ * 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/).
132
154
  */
133
155
  tags?: string;
134
156
  };
135
157
 
136
158
  /**
137
- * Properties for the `getConversationRate` method.
159
+ * Properties for the `getConversionRate` method.
138
160
  */
139
- export type GetConversationRateProps = {
161
+ export type GetConversionRateProps = {
140
162
  /**
141
163
  * Index name.
142
164
  */
@@ -150,7 +172,7 @@ export type GetConversationRateProps = {
150
172
  */
151
173
  endDate?: string;
152
174
  /**
153
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
175
+ * 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/).
154
176
  */
155
177
  tags?: string;
156
178
  };
@@ -172,7 +194,7 @@ export type GetNoClickRateProps = {
172
194
  */
173
195
  endDate?: string;
174
196
  /**
175
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
197
+ * 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/).
176
198
  */
177
199
  tags?: string;
178
200
  };
@@ -194,7 +216,51 @@ export type GetNoResultsRateProps = {
194
216
  */
195
217
  endDate?: string;
196
218
  /**
197
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
219
+ * 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/).
220
+ */
221
+ tags?: string;
222
+ };
223
+
224
+ /**
225
+ * Properties for the `getPurchaseRate` method.
226
+ */
227
+ export type GetPurchaseRateProps = {
228
+ /**
229
+ * Index name.
230
+ */
231
+ index: string;
232
+ /**
233
+ * Start date (`YYYY-MM-DD`) of the period to analyze.
234
+ */
235
+ startDate?: string;
236
+ /**
237
+ * End date (`YYYY-MM-DD`) of the period to analyze.
238
+ */
239
+ endDate?: string;
240
+ /**
241
+ * 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/).
242
+ */
243
+ tags?: string;
244
+ };
245
+
246
+ /**
247
+ * Properties for the `getRevenue` method.
248
+ */
249
+ export type GetRevenueProps = {
250
+ /**
251
+ * Index name.
252
+ */
253
+ index: string;
254
+ /**
255
+ * Start date (`YYYY-MM-DD`) of the period to analyze.
256
+ */
257
+ startDate?: string;
258
+ /**
259
+ * End date (`YYYY-MM-DD`) of the period to analyze.
260
+ */
261
+ endDate?: string;
262
+ /**
263
+ * 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/).
198
264
  */
199
265
  tags?: string;
200
266
  };
@@ -216,7 +282,7 @@ export type GetSearchesCountProps = {
216
282
  */
217
283
  endDate?: string;
218
284
  /**
219
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
285
+ * 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/).
220
286
  */
221
287
  tags?: string;
222
288
  };
@@ -246,7 +312,7 @@ export type GetSearchesNoClicksProps = {
246
312
  */
247
313
  offset?: number;
248
314
  /**
249
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
315
+ * 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/).
250
316
  */
251
317
  tags?: string;
252
318
  };
@@ -276,7 +342,7 @@ export type GetSearchesNoResultsProps = {
276
342
  */
277
343
  offset?: number;
278
344
  /**
279
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
345
+ * 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/).
280
346
  */
281
347
  tags?: string;
282
348
  };
@@ -316,7 +382,7 @@ export type GetTopCountriesProps = {
316
382
  */
317
383
  offset?: number;
318
384
  /**
319
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
385
+ * 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/).
320
386
  */
321
387
  tags?: string;
322
388
  };
@@ -330,7 +396,7 @@ export type GetTopFilterAttributesProps = {
330
396
  */
331
397
  index: string;
332
398
  /**
333
- * User query.
399
+ * Search query.
334
400
  */
335
401
  search?: string;
336
402
  /**
@@ -350,7 +416,7 @@ export type GetTopFilterAttributesProps = {
350
416
  */
351
417
  offset?: number;
352
418
  /**
353
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
419
+ * 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/).
354
420
  */
355
421
  tags?: string;
356
422
  };
@@ -368,7 +434,7 @@ export type GetTopFilterForAttributeProps = {
368
434
  */
369
435
  index: string;
370
436
  /**
371
- * User query.
437
+ * Search query.
372
438
  */
373
439
  search?: string;
374
440
  /**
@@ -388,7 +454,7 @@ export type GetTopFilterForAttributeProps = {
388
454
  */
389
455
  offset?: number;
390
456
  /**
391
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
457
+ * 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/).
392
458
  */
393
459
  tags?: string;
394
460
  };
@@ -402,7 +468,7 @@ export type GetTopFiltersNoResultsProps = {
402
468
  */
403
469
  index: string;
404
470
  /**
405
- * User query.
471
+ * Search query.
406
472
  */
407
473
  search?: string;
408
474
  /**
@@ -422,7 +488,7 @@ export type GetTopFiltersNoResultsProps = {
422
488
  */
423
489
  offset?: number;
424
490
  /**
425
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
491
+ * 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/).
426
492
  */
427
493
  tags?: string;
428
494
  };
@@ -436,13 +502,17 @@ export type GetTopHitsProps = {
436
502
  */
437
503
  index: string;
438
504
  /**
439
- * User query.
505
+ * Search query.
440
506
  */
441
507
  search?: string;
442
508
  /**
443
- * Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
509
+ * Whether to include metrics related to click and conversion events in the response.
444
510
  */
445
511
  clickAnalytics?: boolean;
512
+ /**
513
+ * Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
514
+ */
515
+ revenueAnalytics?: boolean;
446
516
  /**
447
517
  * Start date (`YYYY-MM-DD`) of the period to analyze.
448
518
  */
@@ -460,7 +530,7 @@ export type GetTopHitsProps = {
460
530
  */
461
531
  offset?: number;
462
532
  /**
463
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
533
+ * 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/).
464
534
  */
465
535
  tags?: string;
466
536
  };
@@ -474,9 +544,13 @@ export type GetTopSearchesProps = {
474
544
  */
475
545
  index: string;
476
546
  /**
477
- * Whether to include [click and conversion](https://www.algolia.com/doc/guides/sending-events/getting-started/) rates for a search.
547
+ * Whether to include metrics related to click and conversion events in the response.
478
548
  */
479
549
  clickAnalytics?: boolean;
550
+ /**
551
+ * Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
552
+ */
553
+ revenueAnalytics?: boolean;
480
554
  /**
481
555
  * Start date (`YYYY-MM-DD`) of the period to analyze.
482
556
  */
@@ -486,7 +560,7 @@ export type GetTopSearchesProps = {
486
560
  */
487
561
  endDate?: string;
488
562
  /**
489
- * Reorder the results.
563
+ * Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
490
564
  */
491
565
  orderBy?: OrderBy;
492
566
  /**
@@ -502,7 +576,7 @@ export type GetTopSearchesProps = {
502
576
  */
503
577
  offset?: number;
504
578
  /**
505
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
579
+ * 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/).
506
580
  */
507
581
  tags?: string;
508
582
  };
@@ -524,7 +598,7 @@ export type GetUsersCountProps = {
524
598
  */
525
599
  endDate?: string;
526
600
  /**
527
- * Filter analytics on the [`analyticsTags`](https://www.algolia.com/doc/api-reference/api-parameters/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 must be URL-encoded.
601
+ * 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/).
528
602
  */
529
603
  tags?: string;
530
604
  };
@@ -0,0 +1,16 @@
1
+ // 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.
2
+
3
+ /**
4
+ * Currency code.
5
+ */
6
+ export type CurrenciesValue = {
7
+ /**
8
+ * Currency code.
9
+ */
10
+ currency?: string;
11
+
12
+ /**
13
+ * Revenue associated with this search in this currency.
14
+ */
15
+ revenue?: number;
16
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyAddToCartRates = {
4
+ /**
5
+ * Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
6
+ */
7
+ rate: number | null;
8
+
9
+ /**
10
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
11
+ */
12
+ trackedSearchCount: number;
13
+
14
+ /**
15
+ * Number of add-to-cart events from this search.
16
+ */
17
+ addToCartCount: number;
18
+
19
+ /**
20
+ * Date in the format YYYY-MM-DD.
21
+ */
22
+ date: string;
23
+ };
@@ -0,0 +1,18 @@
1
+ // 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.
2
+
3
+ export type DailyAverageClicks = {
4
+ /**
5
+ * Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
6
+ */
7
+ average: number | null;
8
+
9
+ /**
10
+ * Number of clicks associated with this search.
11
+ */
12
+ clickCount: number;
13
+
14
+ /**
15
+ * Date in the format YYYY-MM-DD.
16
+ */
17
+ date: string;
18
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyClickThroughRates = {
4
+ /**
5
+ * Click-through rate, calculated as number of tracked searches with at least one click event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
6
+ */
7
+ rate: number | null;
8
+
9
+ /**
10
+ * Number of clicks associated with this search.
11
+ */
12
+ clickCount: number;
13
+
14
+ /**
15
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
16
+ */
17
+ trackedSearchCount: number;
18
+
19
+ /**
20
+ * Date in the format YYYY-MM-DD.
21
+ */
22
+ date: string;
23
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyConversionRates = {
4
+ /**
5
+ * Conversion rate, calculated as number of tracked searches with at least one conversion event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
6
+ */
7
+ rate: number | null;
8
+
9
+ /**
10
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
11
+ */
12
+ trackedSearchCount: number;
13
+
14
+ /**
15
+ * Number of conversions from this search.
16
+ */
17
+ conversionCount: number;
18
+
19
+ /**
20
+ * Date in the format YYYY-MM-DD.
21
+ */
22
+ date: string;
23
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyNoClickRates = {
4
+ /**
5
+ * No click rate, calculated as number of tracked searches without any click divided by the number of tracked searches.
6
+ */
7
+ rate: number;
8
+
9
+ /**
10
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
11
+ */
12
+ count: number;
13
+
14
+ /**
15
+ * Number of times this search was returned as a result without any click.
16
+ */
17
+ noClickCount: number;
18
+
19
+ /**
20
+ * Date in the format YYYY-MM-DD.
21
+ */
22
+ date: string;
23
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyNoResultsRates = {
4
+ /**
5
+ * Date in the format YYYY-MM-DD.
6
+ */
7
+ date: string;
8
+
9
+ /**
10
+ * Number of searches without any results.
11
+ */
12
+ noResultCount: number;
13
+
14
+ /**
15
+ * Number of searches.
16
+ */
17
+ count: number;
18
+
19
+ /**
20
+ * No results rate, calculated as number of searches with zero results divided by the total number of searches.
21
+ */
22
+ rate: number;
23
+ };
@@ -0,0 +1,23 @@
1
+ // 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.
2
+
3
+ export type DailyPurchaseRates = {
4
+ /**
5
+ * Purchase rate, calculated as number of tracked searches with at least one purchase event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
6
+ */
7
+ rate: number | null;
8
+
9
+ /**
10
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
11
+ */
12
+ trackedSearchCount: number;
13
+
14
+ /**
15
+ * Number of purchase events from this search.
16
+ */
17
+ purchaseCount: number;
18
+
19
+ /**
20
+ * Date in the format YYYY-MM-DD.
21
+ */
22
+ date: string;
23
+ };
@@ -0,0 +1,15 @@
1
+ // 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.
2
+
3
+ import type { CurrenciesValue } from './currenciesValue';
4
+
5
+ export type DailyRevenue = {
6
+ /**
7
+ * Revenue associated with this search, broken-down by currencies.
8
+ */
9
+ currencies: Record<string, CurrenciesValue>;
10
+
11
+ /**
12
+ * Date in the format YYYY-MM-DD.
13
+ */
14
+ date: string;
15
+ };
@@ -1,8 +1,8 @@
1
1
  // 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.
2
2
 
3
- export type SearchEvent = {
3
+ export type DailySearches = {
4
4
  /**
5
- * Date of the event in the format YYYY-MM-DD.
5
+ * Date in the format YYYY-MM-DD.
6
6
  */
7
7
  date: string;
8
8
 
@@ -1,13 +1,13 @@
1
1
  // 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.
2
2
 
3
- export type SearchNoResultEvent = {
3
+ export type DailySearchesNoClicks = {
4
4
  /**
5
- * User query.
5
+ * Search query.
6
6
  */
7
7
  search: string;
8
8
 
9
9
  /**
10
- * Number of occurrences.
10
+ * Number of tracked searches.
11
11
  */
12
12
  count: number;
13
13
 
@@ -1,8 +1,8 @@
1
1
  // 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.
2
2
 
3
- export type SearchNoClickEvent = {
3
+ export type DailySearchesNoResults = {
4
4
  /**
5
- * User query.
5
+ * Search query.
6
6
  */
7
7
  search: string;
8
8
 
@@ -12,7 +12,7 @@ export type SearchNoClickEvent = {
12
12
  count: number;
13
13
 
14
14
  /**
15
- * Number of occurrences.
15
+ * Number of searches for this term with applied filters.
16
16
  */
17
17
  withFilterCount: number;
18
18
  };
@@ -1,13 +1,13 @@
1
1
  // 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.
2
2
 
3
- export type UserWithDate = {
3
+ export type DailyUsers = {
4
4
  /**
5
- * Date of the event in the format YYYY-MM-DD.
5
+ * Date in the format YYYY-MM-DD.
6
6
  */
7
7
  date: string;
8
8
 
9
9
  /**
10
- * Number of occurrences.
10
+ * Number of unique users.
11
11
  */
12
12
  count: number;
13
13
  };
@@ -0,0 +1,25 @@
1
+ // 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.
2
+
3
+ import type { DailyAddToCartRates } from './dailyAddToCartRates';
4
+
5
+ export type GetAddToCartRateResponse = {
6
+ /**
7
+ * Add-to-cart rate, calculated as number of tracked searches with at least one add-to-cart event divided by the number of tracked searches. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
8
+ */
9
+ rate: number | null;
10
+
11
+ /**
12
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
13
+ */
14
+ trackedSearchCount: number;
15
+
16
+ /**
17
+ * Number of add-to-cart events from this search.
18
+ */
19
+ addToCartCount: number;
20
+
21
+ /**
22
+ * Daily add-to-cart rates.
23
+ */
24
+ dates: DailyAddToCartRates[];
25
+ };
@@ -1,20 +1,20 @@
1
1
  // 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.
2
2
 
3
- import type { AverageClickEvent } from './averageClickEvent';
3
+ import type { DailyAverageClicks } from './dailyAverageClicks';
4
4
 
5
5
  export type GetAverageClickPositionResponse = {
6
6
  /**
7
- * Average count of all click events.
7
+ * Average position of a clicked search result in the list of search results. If null, Algolia didn\'t receive any search requests with `clickAnalytics` set to true.
8
8
  */
9
- average: number;
9
+ average: number | null;
10
10
 
11
11
  /**
12
- * Number of click events.
12
+ * Number of clicks associated with this search.
13
13
  */
14
14
  clickCount: number;
15
15
 
16
16
  /**
17
- * Average click positions.
17
+ * Daily average click positions.
18
18
  */
19
- dates: AverageClickEvent[];
19
+ dates: DailyAverageClicks[];
20
20
  };
@@ -1,10 +1,10 @@
1
1
  // 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.
2
2
 
3
- import type { ClickPosition } from './clickPosition';
3
+ import type { ClickPositionsInner } from './clickPositionsInner';
4
4
 
5
5
  export type GetClickPositionsResponse = {
6
6
  /**
7
- * Click positions.
7
+ * List of positions in the search results and clicks associated with this search.
8
8
  */
9
- positions: ClickPosition[];
9
+ positions: ClickPositionsInner[];
10
10
  };