@algolia/client-analytics 5.2.4 → 5.2.5

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 (142) hide show
  1. package/dist/browser.d.ts +1399 -0
  2. package/dist/builds/browser.js +1115 -0
  3. package/dist/builds/browser.js.map +1 -0
  4. package/dist/builds/browser.min.js +2 -0
  5. package/dist/builds/browser.min.js.map +1 -0
  6. package/dist/builds/browser.umd.js +12 -0
  7. package/dist/builds/node.cjs +1133 -0
  8. package/dist/builds/node.cjs.map +1 -0
  9. package/dist/builds/node.js +1113 -0
  10. package/dist/builds/node.js.map +1 -0
  11. package/dist/node.d.cts +1399 -0
  12. package/dist/node.d.ts +1399 -0
  13. package/dist/src/analyticsClient.cjs +1100 -0
  14. package/dist/src/analyticsClient.cjs.map +1 -0
  15. package/dist/src/{analyticsClient.d.ts → analyticsClient.js} +739 -58
  16. package/dist/src/analyticsClient.js.map +1 -0
  17. package/index.d.ts +1 -1
  18. package/index.js +1 -1
  19. package/package.json +28 -25
  20. package/dist/builds/browser.d.ts +0 -40
  21. package/dist/builds/browser.d.ts.map +0 -1
  22. package/dist/builds/node.d.ts +0 -40
  23. package/dist/builds/node.d.ts.map +0 -1
  24. package/dist/client-analytics.cjs +0 -1089
  25. package/dist/client-analytics.esm.browser.js +0 -1763
  26. package/dist/client-analytics.esm.node.js +0 -1086
  27. package/dist/client-analytics.umd.js +0 -2
  28. package/dist/model/clickPosition.d.ts +0 -14
  29. package/dist/model/clickPosition.d.ts.map +0 -1
  30. package/dist/model/clientMethodProps.d.ts +0 -579
  31. package/dist/model/clientMethodProps.d.ts.map +0 -1
  32. package/dist/model/currencyCode.d.ts +0 -14
  33. package/dist/model/currencyCode.d.ts.map +0 -1
  34. package/dist/model/dailyAddToCartRates.d.ts +0 -19
  35. package/dist/model/dailyAddToCartRates.d.ts.map +0 -1
  36. package/dist/model/dailyAverageClicks.d.ts +0 -15
  37. package/dist/model/dailyAverageClicks.d.ts.map +0 -1
  38. package/dist/model/dailyClickThroughRates.d.ts +0 -19
  39. package/dist/model/dailyClickThroughRates.d.ts.map +0 -1
  40. package/dist/model/dailyConversionRates.d.ts +0 -19
  41. package/dist/model/dailyConversionRates.d.ts.map +0 -1
  42. package/dist/model/dailyNoClickRates.d.ts +0 -19
  43. package/dist/model/dailyNoClickRates.d.ts.map +0 -1
  44. package/dist/model/dailyNoResultsRates.d.ts +0 -19
  45. package/dist/model/dailyNoResultsRates.d.ts.map +0 -1
  46. package/dist/model/dailyPurchaseRates.d.ts +0 -19
  47. package/dist/model/dailyPurchaseRates.d.ts.map +0 -1
  48. package/dist/model/dailyRevenue.d.ts +0 -12
  49. package/dist/model/dailyRevenue.d.ts.map +0 -1
  50. package/dist/model/dailySearches.d.ts +0 -11
  51. package/dist/model/dailySearches.d.ts.map +0 -1
  52. package/dist/model/dailySearchesNoClicks.d.ts +0 -15
  53. package/dist/model/dailySearchesNoClicks.d.ts.map +0 -1
  54. package/dist/model/dailySearchesNoResults.d.ts +0 -15
  55. package/dist/model/dailySearchesNoResults.d.ts.map +0 -1
  56. package/dist/model/dailyUsers.d.ts +0 -11
  57. package/dist/model/dailyUsers.d.ts.map +0 -1
  58. package/dist/model/direction.d.ts +0 -2
  59. package/dist/model/direction.d.ts.map +0 -1
  60. package/dist/model/errorBase.d.ts +0 -7
  61. package/dist/model/errorBase.d.ts.map +0 -1
  62. package/dist/model/getAddToCartRateResponse.d.ts +0 -20
  63. package/dist/model/getAddToCartRateResponse.d.ts.map +0 -1
  64. package/dist/model/getAverageClickPositionResponse.d.ts +0 -16
  65. package/dist/model/getAverageClickPositionResponse.d.ts.map +0 -1
  66. package/dist/model/getClickPositionsResponse.d.ts +0 -8
  67. package/dist/model/getClickPositionsResponse.d.ts.map +0 -1
  68. package/dist/model/getClickThroughRateResponse.d.ts +0 -20
  69. package/dist/model/getClickThroughRateResponse.d.ts.map +0 -1
  70. package/dist/model/getConversionRateResponse.d.ts +0 -20
  71. package/dist/model/getConversionRateResponse.d.ts.map +0 -1
  72. package/dist/model/getNoClickRateResponse.d.ts +0 -20
  73. package/dist/model/getNoClickRateResponse.d.ts.map +0 -1
  74. package/dist/model/getNoResultsRateResponse.d.ts +0 -20
  75. package/dist/model/getNoResultsRateResponse.d.ts.map +0 -1
  76. package/dist/model/getPurchaseRateResponse.d.ts +0 -20
  77. package/dist/model/getPurchaseRateResponse.d.ts.map +0 -1
  78. package/dist/model/getRevenue.d.ts +0 -13
  79. package/dist/model/getRevenue.d.ts.map +0 -1
  80. package/dist/model/getSearchesCountResponse.d.ts +0 -12
  81. package/dist/model/getSearchesCountResponse.d.ts.map +0 -1
  82. package/dist/model/getSearchesNoClicksResponse.d.ts +0 -8
  83. package/dist/model/getSearchesNoClicksResponse.d.ts.map +0 -1
  84. package/dist/model/getSearchesNoResultsResponse.d.ts +0 -8
  85. package/dist/model/getSearchesNoResultsResponse.d.ts.map +0 -1
  86. package/dist/model/getStatusResponse.d.ts +0 -7
  87. package/dist/model/getStatusResponse.d.ts.map +0 -1
  88. package/dist/model/getTopCountriesResponse.d.ts +0 -8
  89. package/dist/model/getTopCountriesResponse.d.ts.map +0 -1
  90. package/dist/model/getTopFilterAttribute.d.ts +0 -11
  91. package/dist/model/getTopFilterAttribute.d.ts.map +0 -1
  92. package/dist/model/getTopFilterAttributesResponse.d.ts +0 -8
  93. package/dist/model/getTopFilterAttributesResponse.d.ts.map +0 -1
  94. package/dist/model/getTopFilterForAttribute.d.ts +0 -17
  95. package/dist/model/getTopFilterForAttribute.d.ts.map +0 -1
  96. package/dist/model/getTopFilterForAttributeResponse.d.ts +0 -8
  97. package/dist/model/getTopFilterForAttributeResponse.d.ts.map +0 -1
  98. package/dist/model/getTopFiltersNoResultsResponse.d.ts +0 -8
  99. package/dist/model/getTopFiltersNoResultsResponse.d.ts.map +0 -1
  100. package/dist/model/getTopFiltersNoResultsValue.d.ts +0 -13
  101. package/dist/model/getTopFiltersNoResultsValue.d.ts.map +0 -1
  102. package/dist/model/getTopFiltersNoResultsValues.d.ts +0 -12
  103. package/dist/model/getTopFiltersNoResultsValues.d.ts.map +0 -1
  104. package/dist/model/getTopHitsResponse.d.ts +0 -5
  105. package/dist/model/getTopHitsResponse.d.ts.map +0 -1
  106. package/dist/model/getTopSearchesResponse.d.ts +0 -5
  107. package/dist/model/getTopSearchesResponse.d.ts.map +0 -1
  108. package/dist/model/getUsersCountResponse.d.ts +0 -12
  109. package/dist/model/getUsersCountResponse.d.ts.map +0 -1
  110. package/dist/model/index.d.ts +0 -57
  111. package/dist/model/index.d.ts.map +0 -1
  112. package/dist/model/operator.d.ts +0 -5
  113. package/dist/model/operator.d.ts.map +0 -1
  114. package/dist/model/orderBy.d.ts +0 -5
  115. package/dist/model/orderBy.d.ts.map +0 -1
  116. package/dist/model/topCountry.d.ts +0 -11
  117. package/dist/model/topCountry.d.ts.map +0 -1
  118. package/dist/model/topHit.d.ts +0 -11
  119. package/dist/model/topHit.d.ts.map +0 -1
  120. package/dist/model/topHitWithAnalytics.d.ts +0 -31
  121. package/dist/model/topHitWithAnalytics.d.ts.map +0 -1
  122. package/dist/model/topHitWithRevenueAnalytics.d.ts +0 -52
  123. package/dist/model/topHitWithRevenueAnalytics.d.ts.map +0 -1
  124. package/dist/model/topHitsResponse.d.ts +0 -8
  125. package/dist/model/topHitsResponse.d.ts.map +0 -1
  126. package/dist/model/topHitsResponseWithAnalytics.d.ts +0 -8
  127. package/dist/model/topHitsResponseWithAnalytics.d.ts.map +0 -1
  128. package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts +0 -8
  129. package/dist/model/topHitsResponseWithRevenueAnalytics.d.ts.map +0 -1
  130. package/dist/model/topSearch.d.ts +0 -15
  131. package/dist/model/topSearch.d.ts.map +0 -1
  132. package/dist/model/topSearchWithAnalytics.d.ts +0 -44
  133. package/dist/model/topSearchWithAnalytics.d.ts.map +0 -1
  134. package/dist/model/topSearchWithRevenueAnalytics.d.ts +0 -65
  135. package/dist/model/topSearchWithRevenueAnalytics.d.ts.map +0 -1
  136. package/dist/model/topSearchesResponse.d.ts +0 -8
  137. package/dist/model/topSearchesResponse.d.ts.map +0 -1
  138. package/dist/model/topSearchesResponseWithAnalytics.d.ts +0 -8
  139. package/dist/model/topSearchesResponseWithAnalytics.d.ts.map +0 -1
  140. package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts +0 -8
  141. package/dist/model/topSearchesResponseWithRevenueAnalytics.d.ts.map +0 -1
  142. package/dist/src/analyticsClient.d.ts.map +0 -1
package/dist/node.d.ts ADDED
@@ -0,0 +1,1399 @@
1
+ import * as _algolia_client_common from '@algolia/client-common';
2
+ import { ClientOptions } from '@algolia/client-common';
3
+
4
+ /**
5
+ * Click position.
6
+ */
7
+ type ClickPosition = {
8
+ /**
9
+ * Range of positions in the search results, using the pattern `[start,end]`. For positions 11 and up, click events are summed over the specified range. `-1` indicates the end of the list of search results.
10
+ */
11
+ position?: number[];
12
+ /**
13
+ * Number of times this search has been clicked at that position.
14
+ */
15
+ clickCount?: number;
16
+ };
17
+
18
+ /**
19
+ * Currency code.
20
+ */
21
+ type CurrencyCode = {
22
+ /**
23
+ * Currency code.
24
+ */
25
+ currency?: string;
26
+ /**
27
+ * Revenue associated with this search in this currency.
28
+ */
29
+ revenue?: number;
30
+ };
31
+
32
+ type DailyAddToCartRates = {
33
+ /**
34
+ * 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.
35
+ */
36
+ rate: number | null;
37
+ /**
38
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
39
+ */
40
+ trackedSearchCount: number;
41
+ /**
42
+ * Number of add-to-cart events from this search.
43
+ */
44
+ addToCartCount: number;
45
+ /**
46
+ * Date in the format YYYY-MM-DD.
47
+ */
48
+ date: string;
49
+ };
50
+
51
+ type DailyAverageClicks = {
52
+ /**
53
+ * 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.
54
+ */
55
+ average: number | null;
56
+ /**
57
+ * Number of clicks associated with this search.
58
+ */
59
+ clickCount: number;
60
+ /**
61
+ * Date in the format YYYY-MM-DD.
62
+ */
63
+ date: string;
64
+ };
65
+
66
+ type DailyClickThroughRates = {
67
+ /**
68
+ * 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.
69
+ */
70
+ rate: number | null;
71
+ /**
72
+ * Number of clicks associated with this search.
73
+ */
74
+ clickCount: number;
75
+ /**
76
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
77
+ */
78
+ trackedSearchCount: number;
79
+ /**
80
+ * Date in the format YYYY-MM-DD.
81
+ */
82
+ date: string;
83
+ };
84
+
85
+ type DailyConversionRates = {
86
+ /**
87
+ * 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.
88
+ */
89
+ rate: number | null;
90
+ /**
91
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
92
+ */
93
+ trackedSearchCount: number;
94
+ /**
95
+ * Number of conversions from this search.
96
+ */
97
+ conversionCount: number;
98
+ /**
99
+ * Date in the format YYYY-MM-DD.
100
+ */
101
+ date: string;
102
+ };
103
+
104
+ type DailyNoClickRates = {
105
+ /**
106
+ * No click rate, calculated as number of tracked searches without any click divided by the number of tracked searches.
107
+ */
108
+ rate: number;
109
+ /**
110
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
111
+ */
112
+ count: number;
113
+ /**
114
+ * Number of times this search was returned as a result without any click.
115
+ */
116
+ noClickCount: number;
117
+ /**
118
+ * Date in the format YYYY-MM-DD.
119
+ */
120
+ date: string;
121
+ };
122
+
123
+ type DailyNoResultsRates = {
124
+ /**
125
+ * Date in the format YYYY-MM-DD.
126
+ */
127
+ date: string;
128
+ /**
129
+ * Number of searches without any results.
130
+ */
131
+ noResultCount: number;
132
+ /**
133
+ * Number of searches.
134
+ */
135
+ count: number;
136
+ /**
137
+ * No results rate, calculated as number of searches with zero results divided by the total number of searches.
138
+ */
139
+ rate: number;
140
+ };
141
+
142
+ type DailyPurchaseRates = {
143
+ /**
144
+ * 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.
145
+ */
146
+ rate: number | null;
147
+ /**
148
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
149
+ */
150
+ trackedSearchCount: number;
151
+ /**
152
+ * Number of purchase events from this search.
153
+ */
154
+ purchaseCount: number;
155
+ /**
156
+ * Date in the format YYYY-MM-DD.
157
+ */
158
+ date: string;
159
+ };
160
+
161
+ type DailyRevenue = {
162
+ /**
163
+ * Revenue associated with this search, broken-down by currencies.
164
+ */
165
+ currencies: Record<string, CurrencyCode>;
166
+ /**
167
+ * Date in the format YYYY-MM-DD.
168
+ */
169
+ date: string;
170
+ };
171
+
172
+ type DailySearches = {
173
+ /**
174
+ * Date in the format YYYY-MM-DD.
175
+ */
176
+ date: string;
177
+ /**
178
+ * Number of occurrences.
179
+ */
180
+ count: number;
181
+ };
182
+
183
+ type DailySearchesNoClicks = {
184
+ /**
185
+ * Search query.
186
+ */
187
+ search: string;
188
+ /**
189
+ * Number of tracked searches.
190
+ */
191
+ count: number;
192
+ /**
193
+ * Number of results (hits).
194
+ */
195
+ nbHits: number;
196
+ };
197
+
198
+ type DailySearchesNoResults = {
199
+ /**
200
+ * Search query.
201
+ */
202
+ search: string;
203
+ /**
204
+ * Number of occurrences.
205
+ */
206
+ count: number;
207
+ /**
208
+ * Number of searches for this term with applied filters.
209
+ */
210
+ withFilterCount: number;
211
+ };
212
+
213
+ type DailyUsers = {
214
+ /**
215
+ * Date in the format YYYY-MM-DD.
216
+ */
217
+ date: string;
218
+ /**
219
+ * Number of unique users.
220
+ */
221
+ count: number;
222
+ };
223
+
224
+ type Direction = 'asc' | 'desc';
225
+
226
+ /**
227
+ * Error.
228
+ */
229
+ type ErrorBase = Record<string, any> & {
230
+ message?: string;
231
+ };
232
+
233
+ type GetAddToCartRateResponse = {
234
+ /**
235
+ * 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.
236
+ */
237
+ rate: number | null;
238
+ /**
239
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
240
+ */
241
+ trackedSearchCount: number;
242
+ /**
243
+ * Number of add-to-cart events from this search.
244
+ */
245
+ addToCartCount: number;
246
+ /**
247
+ * Daily add-to-cart rates.
248
+ */
249
+ dates: DailyAddToCartRates[];
250
+ };
251
+
252
+ type GetAverageClickPositionResponse = {
253
+ /**
254
+ * 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.
255
+ */
256
+ average: number | null;
257
+ /**
258
+ * Number of clicks associated with this search.
259
+ */
260
+ clickCount: number;
261
+ /**
262
+ * Daily average click positions.
263
+ */
264
+ dates: DailyAverageClicks[];
265
+ };
266
+
267
+ type GetClickPositionsResponse = {
268
+ /**
269
+ * List of positions in the search results and clicks associated with this search.
270
+ */
271
+ positions: ClickPosition[];
272
+ };
273
+
274
+ type GetClickThroughRateResponse = {
275
+ /**
276
+ * 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.
277
+ */
278
+ rate: number | null;
279
+ /**
280
+ * Number of clicks associated with this search.
281
+ */
282
+ clickCount: number;
283
+ /**
284
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
285
+ */
286
+ trackedSearchCount: number;
287
+ /**
288
+ * Daily click-through rates.
289
+ */
290
+ dates: DailyClickThroughRates[];
291
+ };
292
+
293
+ type GetConversionRateResponse = {
294
+ /**
295
+ * 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.
296
+ */
297
+ rate: number | null;
298
+ /**
299
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
300
+ */
301
+ trackedSearchCount: number;
302
+ /**
303
+ * Number of conversions from this search.
304
+ */
305
+ conversionCount: number;
306
+ /**
307
+ * Daily conversion rates.
308
+ */
309
+ dates: DailyConversionRates[];
310
+ };
311
+
312
+ type GetNoClickRateResponse = {
313
+ /**
314
+ * No click rate, calculated as number of tracked searches without any click divided by the number of tracked searches.
315
+ */
316
+ rate: number;
317
+ /**
318
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
319
+ */
320
+ count: number;
321
+ /**
322
+ * Number of times this search was returned as a result without any click.
323
+ */
324
+ noClickCount: number;
325
+ /**
326
+ * Daily no click rates.
327
+ */
328
+ dates: DailyNoClickRates[];
329
+ };
330
+
331
+ type GetNoResultsRateResponse = {
332
+ /**
333
+ * No results rate, calculated as number of searches with zero results divided by the total number of searches.
334
+ */
335
+ rate: number;
336
+ /**
337
+ * Number of searches.
338
+ */
339
+ count: number;
340
+ /**
341
+ * Number of searches without any results.
342
+ */
343
+ noResultCount: number;
344
+ /**
345
+ * Daily no results rates.
346
+ */
347
+ dates: DailyNoResultsRates[];
348
+ };
349
+
350
+ type GetPurchaseRateResponse = {
351
+ /**
352
+ * 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.
353
+ */
354
+ rate: number | null;
355
+ /**
356
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
357
+ */
358
+ trackedSearchCount: number;
359
+ /**
360
+ * Number of purchase events from this search.
361
+ */
362
+ purchaseCount: number;
363
+ /**
364
+ * Daily purchase rates.
365
+ */
366
+ dates: DailyPurchaseRates[];
367
+ };
368
+
369
+ type GetRevenue = {
370
+ /**
371
+ * Revenue associated with this search, broken-down by currencies.
372
+ */
373
+ currencies: Record<string, CurrencyCode>;
374
+ /**
375
+ * Daily revenue.
376
+ */
377
+ dates: DailyRevenue[];
378
+ };
379
+
380
+ type GetSearchesCountResponse = {
381
+ /**
382
+ * Number of occurrences.
383
+ */
384
+ count: number;
385
+ /**
386
+ * Daily number of searches.
387
+ */
388
+ dates: DailySearches[];
389
+ };
390
+
391
+ type GetSearchesNoClicksResponse = {
392
+ /**
393
+ * Searches without any clicks.
394
+ */
395
+ searches: DailySearchesNoClicks[];
396
+ };
397
+
398
+ type GetSearchesNoResultsResponse = {
399
+ /**
400
+ * Searches without results.
401
+ */
402
+ searches: DailySearchesNoResults[];
403
+ };
404
+
405
+ type GetStatusResponse = {
406
+ /**
407
+ * Date and time when the object was updated, in RFC 3339 format.
408
+ */
409
+ updatedAt: string | null;
410
+ };
411
+
412
+ type TopCountry = {
413
+ /**
414
+ * Country code.
415
+ */
416
+ country: string;
417
+ /**
418
+ * Number of occurrences.
419
+ */
420
+ count: number;
421
+ };
422
+
423
+ type GetTopCountriesResponse = {
424
+ /**
425
+ * Countries and number of searches.
426
+ */
427
+ countries: TopCountry[];
428
+ };
429
+
430
+ type GetTopFilterAttribute = {
431
+ /**
432
+ * Attribute name.
433
+ */
434
+ attribute: string;
435
+ /**
436
+ * Number of occurrences.
437
+ */
438
+ count: number;
439
+ };
440
+
441
+ type GetTopFilterAttributesResponse = {
442
+ /**
443
+ * Most frequent filters.
444
+ */
445
+ attributes: GetTopFilterAttribute[];
446
+ };
447
+
448
+ /**
449
+ * Character that characterizes how the filter is applied. For example, for a facet filter `facet:value`, `:` is the operator. For a numeric filter `count>50`, `>` is the operator.
450
+ */
451
+ type Operator = ':' | '!=' | '<' | '<=' | '=' | '>' | '>=';
452
+
453
+ type GetTopFilterForAttribute = {
454
+ /**
455
+ * Attribute name.
456
+ */
457
+ attribute: string;
458
+ operator: Operator;
459
+ /**
460
+ * Attribute value.
461
+ */
462
+ value: string;
463
+ /**
464
+ * Number of occurrences.
465
+ */
466
+ count: number;
467
+ };
468
+
469
+ type GetTopFilterForAttributeResponse = {
470
+ /**
471
+ * Filter values for an attribute.
472
+ */
473
+ values: GetTopFilterForAttribute[];
474
+ };
475
+
476
+ type GetTopFiltersNoResultsValue = {
477
+ /**
478
+ * Attribute name.
479
+ */
480
+ attribute: string;
481
+ operator: Operator;
482
+ /**
483
+ * Attribute value.
484
+ */
485
+ value: string;
486
+ };
487
+
488
+ type GetTopFiltersNoResultsValues = {
489
+ /**
490
+ * Number of occurrences.
491
+ */
492
+ count: number;
493
+ /**
494
+ * Filters with no results.
495
+ */
496
+ values: GetTopFiltersNoResultsValue[];
497
+ };
498
+
499
+ type GetTopFiltersNoResultsResponse = {
500
+ /**
501
+ * Filters for searches without any results. If null, the search term specified with the `search` parameter is not a search without results, or the `search` parameter is absent from the request.
502
+ */
503
+ values: GetTopFiltersNoResultsValues[] | null;
504
+ };
505
+
506
+ type TopHit = {
507
+ /**
508
+ * Object ID of a record that\'s returned as a search result.
509
+ */
510
+ hit: string;
511
+ /**
512
+ * Number of occurrences.
513
+ */
514
+ count: number;
515
+ };
516
+
517
+ type TopHitsResponse = {
518
+ /**
519
+ * Most frequent search results.
520
+ */
521
+ hits: TopHit[];
522
+ };
523
+
524
+ type TopHitWithAnalytics = {
525
+ /**
526
+ * Object ID of a record that\'s returned as a search result.
527
+ */
528
+ hit: string;
529
+ /**
530
+ * Number of occurrences.
531
+ */
532
+ count: number;
533
+ /**
534
+ * 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.
535
+ */
536
+ clickThroughRate: number | null;
537
+ /**
538
+ * 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.
539
+ */
540
+ conversionRate: number | null;
541
+ /**
542
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
543
+ */
544
+ trackedHitCount: number;
545
+ /**
546
+ * Number of clicks associated with this search.
547
+ */
548
+ clickCount: number;
549
+ /**
550
+ * Number of conversions from this search.
551
+ */
552
+ conversionCount: number;
553
+ };
554
+
555
+ type TopHitsResponseWithAnalytics = {
556
+ /**
557
+ * Most frequent search results with click and conversion metrics.
558
+ */
559
+ hits: TopHitWithAnalytics[];
560
+ };
561
+
562
+ type TopHitWithRevenueAnalytics = {
563
+ /**
564
+ * Object ID of a record that\'s returned as a search result.
565
+ */
566
+ hit: string;
567
+ /**
568
+ * Number of occurrences.
569
+ */
570
+ count: number;
571
+ /**
572
+ * 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.
573
+ */
574
+ clickThroughRate: number | null;
575
+ /**
576
+ * 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.
577
+ */
578
+ conversionRate: number | null;
579
+ /**
580
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
581
+ */
582
+ trackedHitCount: number;
583
+ /**
584
+ * Number of clicks associated with this search.
585
+ */
586
+ clickCount: number;
587
+ /**
588
+ * Number of conversions from this search.
589
+ */
590
+ conversionCount: number;
591
+ /**
592
+ * 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.
593
+ */
594
+ addToCartRate: number | null;
595
+ /**
596
+ * Number of add-to-cart events from this search.
597
+ */
598
+ addToCartCount: number;
599
+ /**
600
+ * 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.
601
+ */
602
+ purchaseRate: number | null;
603
+ /**
604
+ * Number of purchase events from this search.
605
+ */
606
+ purchaseCount: number;
607
+ /**
608
+ * Revenue associated with this search, broken-down by currencies.
609
+ */
610
+ currencies: Record<string, CurrencyCode>;
611
+ };
612
+
613
+ type TopHitsResponseWithRevenueAnalytics = {
614
+ /**
615
+ * Most frequent search results with click, conversion, and revenue metrics.
616
+ */
617
+ hits: TopHitWithRevenueAnalytics[];
618
+ };
619
+
620
+ type GetTopHitsResponse = TopHitsResponse | TopHitsResponseWithAnalytics | TopHitsResponseWithRevenueAnalytics;
621
+
622
+ type TopSearch = {
623
+ /**
624
+ * Search query.
625
+ */
626
+ search: string;
627
+ /**
628
+ * Number of searches.
629
+ */
630
+ count: number;
631
+ /**
632
+ * Number of results (hits).
633
+ */
634
+ nbHits: number;
635
+ };
636
+
637
+ type TopSearchesResponse = {
638
+ /**
639
+ * Most popular searches and their number of search results (hits).
640
+ */
641
+ searches: TopSearch[];
642
+ };
643
+
644
+ type TopSearchWithAnalytics = {
645
+ /**
646
+ * Search query.
647
+ */
648
+ search: string;
649
+ /**
650
+ * Number of searches.
651
+ */
652
+ count: number;
653
+ /**
654
+ * 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.
655
+ */
656
+ clickThroughRate: number | null;
657
+ /**
658
+ * 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.
659
+ */
660
+ averageClickPosition: number | null;
661
+ /**
662
+ * List of positions in the search results and clicks associated with this search.
663
+ */
664
+ clickPositions: ClickPosition[];
665
+ /**
666
+ * 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.
667
+ */
668
+ conversionRate: number | null;
669
+ /**
670
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
671
+ */
672
+ trackedSearchCount: number;
673
+ /**
674
+ * Number of clicks associated with this search.
675
+ */
676
+ clickCount: number;
677
+ /**
678
+ * Number of conversions from this search.
679
+ */
680
+ conversionCount: number;
681
+ /**
682
+ * Number of results (hits).
683
+ */
684
+ nbHits: number;
685
+ };
686
+
687
+ type TopSearchesResponseWithAnalytics = {
688
+ /**
689
+ * Most popular searches and their associated click and conversion metrics.
690
+ */
691
+ searches: TopSearchWithAnalytics[];
692
+ };
693
+
694
+ type TopSearchWithRevenueAnalytics = {
695
+ /**
696
+ * Search query.
697
+ */
698
+ search: string;
699
+ /**
700
+ * Number of searches.
701
+ */
702
+ count: number;
703
+ /**
704
+ * 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.
705
+ */
706
+ clickThroughRate: number | null;
707
+ /**
708
+ * 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.
709
+ */
710
+ averageClickPosition: number | null;
711
+ /**
712
+ * List of positions in the search results and clicks associated with this search.
713
+ */
714
+ clickPositions: ClickPosition[];
715
+ /**
716
+ * 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.
717
+ */
718
+ conversionRate: number | null;
719
+ /**
720
+ * Number of tracked searches. Tracked searches are search requests where the `clickAnalytics` parameter is true.
721
+ */
722
+ trackedSearchCount: number;
723
+ /**
724
+ * Number of clicks associated with this search.
725
+ */
726
+ clickCount: number;
727
+ /**
728
+ * Number of conversions from this search.
729
+ */
730
+ conversionCount: number;
731
+ /**
732
+ * Number of results (hits).
733
+ */
734
+ nbHits: number;
735
+ /**
736
+ * Revenue associated with this search, broken-down by currencies.
737
+ */
738
+ currencies: Record<string, CurrencyCode>;
739
+ /**
740
+ * 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.
741
+ */
742
+ addToCartRate: number | null;
743
+ /**
744
+ * Number of add-to-cart events from this search.
745
+ */
746
+ addToCartCount: number;
747
+ /**
748
+ * 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.
749
+ */
750
+ purchaseRate: number | null;
751
+ /**
752
+ * Number of purchase events from this search.
753
+ */
754
+ purchaseCount: number;
755
+ };
756
+
757
+ type TopSearchesResponseWithRevenueAnalytics = {
758
+ /**
759
+ * Most popular searches, including their click and revenue metrics.
760
+ */
761
+ searches: TopSearchWithRevenueAnalytics[];
762
+ };
763
+
764
+ type GetTopSearchesResponse = TopSearchesResponse | TopSearchesResponseWithAnalytics | TopSearchesResponseWithRevenueAnalytics;
765
+
766
+ type GetUsersCountResponse = {
767
+ /**
768
+ * Number of unique users.
769
+ */
770
+ count: number;
771
+ /**
772
+ * Daily number of unique users.
773
+ */
774
+ dates: DailyUsers[];
775
+ };
776
+
777
+ /**
778
+ * Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
779
+ */
780
+ type OrderBy = 'averageClickPosition' | 'clickThroughRate' | 'conversionRate' | 'searchCount';
781
+
782
+ /**
783
+ * Properties for the `customDelete` method.
784
+ */
785
+ type CustomDeleteProps = {
786
+ /**
787
+ * Path of the endpoint, anything after \"/1\" must be specified.
788
+ */
789
+ path: string;
790
+ /**
791
+ * Query parameters to apply to the current query.
792
+ */
793
+ parameters?: Record<string, any>;
794
+ };
795
+ /**
796
+ * Properties for the `customGet` method.
797
+ */
798
+ type CustomGetProps = {
799
+ /**
800
+ * Path of the endpoint, anything after \"/1\" must be specified.
801
+ */
802
+ path: string;
803
+ /**
804
+ * Query parameters to apply to the current query.
805
+ */
806
+ parameters?: Record<string, any>;
807
+ };
808
+ /**
809
+ * Properties for the `customPost` method.
810
+ */
811
+ type CustomPostProps = {
812
+ /**
813
+ * Path of the endpoint, anything after \"/1\" must be specified.
814
+ */
815
+ path: string;
816
+ /**
817
+ * Query parameters to apply to the current query.
818
+ */
819
+ parameters?: Record<string, any>;
820
+ /**
821
+ * Parameters to send with the custom request.
822
+ */
823
+ body?: Record<string, unknown>;
824
+ };
825
+ /**
826
+ * Properties for the `customPut` method.
827
+ */
828
+ type CustomPutProps = {
829
+ /**
830
+ * Path of the endpoint, anything after \"/1\" must be specified.
831
+ */
832
+ path: string;
833
+ /**
834
+ * Query parameters to apply to the current query.
835
+ */
836
+ parameters?: Record<string, any>;
837
+ /**
838
+ * Parameters to send with the custom request.
839
+ */
840
+ body?: Record<string, unknown>;
841
+ };
842
+ /**
843
+ * Properties for the `getAddToCartRate` method.
844
+ */
845
+ type GetAddToCartRateProps = {
846
+ /**
847
+ * Index name.
848
+ */
849
+ index: string;
850
+ /**
851
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
852
+ */
853
+ startDate?: string;
854
+ /**
855
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
856
+ */
857
+ endDate?: string;
858
+ /**
859
+ * 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/).
860
+ */
861
+ tags?: string;
862
+ };
863
+ /**
864
+ * Properties for the `getAverageClickPosition` method.
865
+ */
866
+ type GetAverageClickPositionProps = {
867
+ /**
868
+ * Index name.
869
+ */
870
+ index: string;
871
+ /**
872
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
873
+ */
874
+ startDate?: string;
875
+ /**
876
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
877
+ */
878
+ endDate?: string;
879
+ /**
880
+ * 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/).
881
+ */
882
+ tags?: string;
883
+ };
884
+ /**
885
+ * Properties for the `getClickPositions` method.
886
+ */
887
+ type GetClickPositionsProps = {
888
+ /**
889
+ * Index name.
890
+ */
891
+ index: string;
892
+ /**
893
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
894
+ */
895
+ startDate?: string;
896
+ /**
897
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
898
+ */
899
+ endDate?: string;
900
+ /**
901
+ * 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/).
902
+ */
903
+ tags?: string;
904
+ };
905
+ /**
906
+ * Properties for the `getClickThroughRate` method.
907
+ */
908
+ type GetClickThroughRateProps = {
909
+ /**
910
+ * Index name.
911
+ */
912
+ index: string;
913
+ /**
914
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
915
+ */
916
+ startDate?: string;
917
+ /**
918
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
919
+ */
920
+ endDate?: string;
921
+ /**
922
+ * 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/).
923
+ */
924
+ tags?: string;
925
+ };
926
+ /**
927
+ * Properties for the `getConversionRate` method.
928
+ */
929
+ type GetConversionRateProps = {
930
+ /**
931
+ * Index name.
932
+ */
933
+ index: string;
934
+ /**
935
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
936
+ */
937
+ startDate?: string;
938
+ /**
939
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
940
+ */
941
+ endDate?: string;
942
+ /**
943
+ * 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/).
944
+ */
945
+ tags?: string;
946
+ };
947
+ /**
948
+ * Properties for the `getNoClickRate` method.
949
+ */
950
+ type GetNoClickRateProps = {
951
+ /**
952
+ * Index name.
953
+ */
954
+ index: string;
955
+ /**
956
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
957
+ */
958
+ startDate?: string;
959
+ /**
960
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
961
+ */
962
+ endDate?: string;
963
+ /**
964
+ * 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/).
965
+ */
966
+ tags?: string;
967
+ };
968
+ /**
969
+ * Properties for the `getNoResultsRate` method.
970
+ */
971
+ type GetNoResultsRateProps = {
972
+ /**
973
+ * Index name.
974
+ */
975
+ index: string;
976
+ /**
977
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
978
+ */
979
+ startDate?: string;
980
+ /**
981
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
982
+ */
983
+ endDate?: string;
984
+ /**
985
+ * 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/).
986
+ */
987
+ tags?: string;
988
+ };
989
+ /**
990
+ * Properties for the `getPurchaseRate` method.
991
+ */
992
+ type GetPurchaseRateProps = {
993
+ /**
994
+ * Index name.
995
+ */
996
+ index: string;
997
+ /**
998
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
999
+ */
1000
+ startDate?: string;
1001
+ /**
1002
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1003
+ */
1004
+ endDate?: string;
1005
+ /**
1006
+ * 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/).
1007
+ */
1008
+ tags?: string;
1009
+ };
1010
+ /**
1011
+ * Properties for the `getRevenue` method.
1012
+ */
1013
+ type GetRevenueProps = {
1014
+ /**
1015
+ * Index name.
1016
+ */
1017
+ index: string;
1018
+ /**
1019
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1020
+ */
1021
+ startDate?: string;
1022
+ /**
1023
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1024
+ */
1025
+ endDate?: string;
1026
+ /**
1027
+ * 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/).
1028
+ */
1029
+ tags?: string;
1030
+ };
1031
+ /**
1032
+ * Properties for the `getSearchesCount` method.
1033
+ */
1034
+ type GetSearchesCountProps = {
1035
+ /**
1036
+ * Index name.
1037
+ */
1038
+ index: string;
1039
+ /**
1040
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1041
+ */
1042
+ startDate?: string;
1043
+ /**
1044
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1045
+ */
1046
+ endDate?: string;
1047
+ /**
1048
+ * 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/).
1049
+ */
1050
+ tags?: string;
1051
+ };
1052
+ /**
1053
+ * Properties for the `getSearchesNoClicks` method.
1054
+ */
1055
+ type GetSearchesNoClicksProps = {
1056
+ /**
1057
+ * Index name.
1058
+ */
1059
+ index: string;
1060
+ /**
1061
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1062
+ */
1063
+ startDate?: string;
1064
+ /**
1065
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1066
+ */
1067
+ endDate?: string;
1068
+ /**
1069
+ * Number of items to return.
1070
+ */
1071
+ limit?: number;
1072
+ /**
1073
+ * Position of the first item to return.
1074
+ */
1075
+ offset?: number;
1076
+ /**
1077
+ * 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/).
1078
+ */
1079
+ tags?: string;
1080
+ };
1081
+ /**
1082
+ * Properties for the `getSearchesNoResults` method.
1083
+ */
1084
+ type GetSearchesNoResultsProps = {
1085
+ /**
1086
+ * Index name.
1087
+ */
1088
+ index: string;
1089
+ /**
1090
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1091
+ */
1092
+ startDate?: string;
1093
+ /**
1094
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1095
+ */
1096
+ endDate?: string;
1097
+ /**
1098
+ * Number of items to return.
1099
+ */
1100
+ limit?: number;
1101
+ /**
1102
+ * Position of the first item to return.
1103
+ */
1104
+ offset?: number;
1105
+ /**
1106
+ * 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/).
1107
+ */
1108
+ tags?: string;
1109
+ };
1110
+ /**
1111
+ * Properties for the `getStatus` method.
1112
+ */
1113
+ type GetStatusProps = {
1114
+ /**
1115
+ * Index name.
1116
+ */
1117
+ index: string;
1118
+ };
1119
+ /**
1120
+ * Properties for the `getTopCountries` method.
1121
+ */
1122
+ type GetTopCountriesProps = {
1123
+ /**
1124
+ * Index name.
1125
+ */
1126
+ index: string;
1127
+ /**
1128
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1129
+ */
1130
+ startDate?: string;
1131
+ /**
1132
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1133
+ */
1134
+ endDate?: string;
1135
+ /**
1136
+ * Number of items to return.
1137
+ */
1138
+ limit?: number;
1139
+ /**
1140
+ * Position of the first item to return.
1141
+ */
1142
+ offset?: number;
1143
+ /**
1144
+ * 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/).
1145
+ */
1146
+ tags?: string;
1147
+ };
1148
+ /**
1149
+ * Properties for the `getTopFilterAttributes` method.
1150
+ */
1151
+ type GetTopFilterAttributesProps = {
1152
+ /**
1153
+ * Index name.
1154
+ */
1155
+ index: string;
1156
+ /**
1157
+ * Search query.
1158
+ */
1159
+ search?: string;
1160
+ /**
1161
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1162
+ */
1163
+ startDate?: string;
1164
+ /**
1165
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1166
+ */
1167
+ endDate?: string;
1168
+ /**
1169
+ * Number of items to return.
1170
+ */
1171
+ limit?: number;
1172
+ /**
1173
+ * Position of the first item to return.
1174
+ */
1175
+ offset?: number;
1176
+ /**
1177
+ * 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/).
1178
+ */
1179
+ tags?: string;
1180
+ };
1181
+ /**
1182
+ * Properties for the `getTopFilterForAttribute` method.
1183
+ */
1184
+ type GetTopFilterForAttributeProps = {
1185
+ /**
1186
+ * Attribute name.
1187
+ */
1188
+ attribute: string;
1189
+ /**
1190
+ * Index name.
1191
+ */
1192
+ index: string;
1193
+ /**
1194
+ * Search query.
1195
+ */
1196
+ search?: string;
1197
+ /**
1198
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1199
+ */
1200
+ startDate?: string;
1201
+ /**
1202
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1203
+ */
1204
+ endDate?: string;
1205
+ /**
1206
+ * Number of items to return.
1207
+ */
1208
+ limit?: number;
1209
+ /**
1210
+ * Position of the first item to return.
1211
+ */
1212
+ offset?: number;
1213
+ /**
1214
+ * 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/).
1215
+ */
1216
+ tags?: string;
1217
+ };
1218
+ /**
1219
+ * Properties for the `getTopFiltersNoResults` method.
1220
+ */
1221
+ type GetTopFiltersNoResultsProps = {
1222
+ /**
1223
+ * Index name.
1224
+ */
1225
+ index: string;
1226
+ /**
1227
+ * Search query.
1228
+ */
1229
+ search?: string;
1230
+ /**
1231
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1232
+ */
1233
+ startDate?: string;
1234
+ /**
1235
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1236
+ */
1237
+ endDate?: string;
1238
+ /**
1239
+ * Number of items to return.
1240
+ */
1241
+ limit?: number;
1242
+ /**
1243
+ * Position of the first item to return.
1244
+ */
1245
+ offset?: number;
1246
+ /**
1247
+ * 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/).
1248
+ */
1249
+ tags?: string;
1250
+ };
1251
+ /**
1252
+ * Properties for the `getTopHits` method.
1253
+ */
1254
+ type GetTopHitsProps = {
1255
+ /**
1256
+ * Index name.
1257
+ */
1258
+ index: string;
1259
+ /**
1260
+ * Search query.
1261
+ */
1262
+ search?: string;
1263
+ /**
1264
+ * Whether to include metrics related to click and conversion events in the response.
1265
+ */
1266
+ clickAnalytics?: boolean;
1267
+ /**
1268
+ * Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
1269
+ */
1270
+ revenueAnalytics?: boolean;
1271
+ /**
1272
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1273
+ */
1274
+ startDate?: string;
1275
+ /**
1276
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1277
+ */
1278
+ endDate?: string;
1279
+ /**
1280
+ * Number of items to return.
1281
+ */
1282
+ limit?: number;
1283
+ /**
1284
+ * Position of the first item to return.
1285
+ */
1286
+ offset?: number;
1287
+ /**
1288
+ * 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/).
1289
+ */
1290
+ tags?: string;
1291
+ };
1292
+ /**
1293
+ * Properties for the `getTopSearches` method.
1294
+ */
1295
+ type GetTopSearchesProps = {
1296
+ /**
1297
+ * Index name.
1298
+ */
1299
+ index: string;
1300
+ /**
1301
+ * Whether to include metrics related to click and conversion events in the response.
1302
+ */
1303
+ clickAnalytics?: boolean;
1304
+ /**
1305
+ * Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
1306
+ */
1307
+ revenueAnalytics?: boolean;
1308
+ /**
1309
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1310
+ */
1311
+ startDate?: string;
1312
+ /**
1313
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1314
+ */
1315
+ endDate?: string;
1316
+ /**
1317
+ * Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
1318
+ */
1319
+ orderBy?: OrderBy;
1320
+ /**
1321
+ * Sorting direction of the results: ascending or descending.
1322
+ */
1323
+ direction?: Direction;
1324
+ /**
1325
+ * Number of items to return.
1326
+ */
1327
+ limit?: number;
1328
+ /**
1329
+ * Position of the first item to return.
1330
+ */
1331
+ offset?: number;
1332
+ /**
1333
+ * 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/).
1334
+ */
1335
+ tags?: string;
1336
+ };
1337
+ /**
1338
+ * Properties for the `getUsersCount` method.
1339
+ */
1340
+ type GetUsersCountProps = {
1341
+ /**
1342
+ * Index name.
1343
+ */
1344
+ index: string;
1345
+ /**
1346
+ * Start date of the period to analyze, in `YYYY-MM-DD` format.
1347
+ */
1348
+ startDate?: string;
1349
+ /**
1350
+ * End date of the period to analyze, in `YYYY-MM-DD` format.
1351
+ */
1352
+ endDate?: string;
1353
+ /**
1354
+ * 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/).
1355
+ */
1356
+ tags?: string;
1357
+ };
1358
+
1359
+ declare const apiClientVersion = "5.2.5";
1360
+ declare const REGIONS: readonly ["de", "us"];
1361
+ type Region = (typeof REGIONS)[number];
1362
+
1363
+ /**
1364
+ * The client type.
1365
+ */
1366
+ type AnalyticsClient = ReturnType<typeof analyticsClient>;
1367
+ declare function analyticsClient(appId: string, apiKey: string, region?: Region, options?: ClientOptions): {
1368
+ transporter: _algolia_client_common.Transporter;
1369
+ appId: string;
1370
+ clearCache(): Promise<void>;
1371
+ _ua: string;
1372
+ addAlgoliaAgent(segment: string, version?: string): void;
1373
+ customDelete({ path, parameters }: CustomDeleteProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
1374
+ customGet({ path, parameters }: CustomGetProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
1375
+ customPost({ path, parameters, body }: CustomPostProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
1376
+ customPut({ path, parameters, body }: CustomPutProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<Record<string, unknown>>;
1377
+ getAddToCartRate({ index, startDate, endDate, tags }: GetAddToCartRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetAddToCartRateResponse>;
1378
+ getAverageClickPosition({ index, startDate, endDate, tags }: GetAverageClickPositionProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetAverageClickPositionResponse>;
1379
+ getClickPositions({ index, startDate, endDate, tags }: GetClickPositionsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetClickPositionsResponse>;
1380
+ getClickThroughRate({ index, startDate, endDate, tags }: GetClickThroughRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetClickThroughRateResponse>;
1381
+ getConversionRate({ index, startDate, endDate, tags }: GetConversionRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetConversionRateResponse>;
1382
+ getNoClickRate({ index, startDate, endDate, tags }: GetNoClickRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetNoClickRateResponse>;
1383
+ getNoResultsRate({ index, startDate, endDate, tags }: GetNoResultsRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetNoResultsRateResponse>;
1384
+ getPurchaseRate({ index, startDate, endDate, tags }: GetPurchaseRateProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetPurchaseRateResponse>;
1385
+ getRevenue({ index, startDate, endDate, tags }: GetRevenueProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetRevenue>;
1386
+ getSearchesCount({ index, startDate, endDate, tags }: GetSearchesCountProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetSearchesCountResponse>;
1387
+ getSearchesNoClicks({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoClicksProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetSearchesNoClicksResponse>;
1388
+ getSearchesNoResults({ index, startDate, endDate, limit, offset, tags }: GetSearchesNoResultsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetSearchesNoResultsResponse>;
1389
+ getStatus({ index }: GetStatusProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetStatusResponse>;
1390
+ getTopCountries({ index, startDate, endDate, limit, offset, tags }: GetTopCountriesProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopCountriesResponse>;
1391
+ getTopFilterAttributes({ index, search, startDate, endDate, limit, offset, tags }: GetTopFilterAttributesProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopFilterAttributesResponse>;
1392
+ getTopFilterForAttribute({ attribute, index, search, startDate, endDate, limit, offset, tags }: GetTopFilterForAttributeProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopFilterForAttributeResponse>;
1393
+ getTopFiltersNoResults({ index, search, startDate, endDate, limit, offset, tags }: GetTopFiltersNoResultsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopFiltersNoResultsResponse>;
1394
+ getTopHits({ index, search, clickAnalytics, revenueAnalytics, startDate, endDate, limit, offset, tags }: GetTopHitsProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopHitsResponse>;
1395
+ getTopSearches({ index, clickAnalytics, revenueAnalytics, startDate, endDate, orderBy, direction, limit, offset, tags, }: GetTopSearchesProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetTopSearchesResponse>;
1396
+ getUsersCount({ index, startDate, endDate, tags }: GetUsersCountProps, requestOptions?: _algolia_client_common.RequestOptions): Promise<GetUsersCountResponse>;
1397
+ };
1398
+
1399
+ export { type AnalyticsClient, type ClickPosition, type CurrencyCode, type CustomDeleteProps, type CustomGetProps, type CustomPostProps, type CustomPutProps, type DailyAddToCartRates, type DailyAverageClicks, type DailyClickThroughRates, type DailyConversionRates, type DailyNoClickRates, type DailyNoResultsRates, type DailyPurchaseRates, type DailyRevenue, type DailySearches, type DailySearchesNoClicks, type DailySearchesNoResults, type DailyUsers, type Direction, type ErrorBase, type GetAddToCartRateProps, type GetAddToCartRateResponse, type GetAverageClickPositionProps, type GetAverageClickPositionResponse, type GetClickPositionsProps, type GetClickPositionsResponse, type GetClickThroughRateProps, type GetClickThroughRateResponse, type GetConversionRateProps, type GetConversionRateResponse, type GetNoClickRateProps, type GetNoClickRateResponse, type GetNoResultsRateProps, type GetNoResultsRateResponse, type GetPurchaseRateProps, type GetPurchaseRateResponse, type GetRevenue, type GetRevenueProps, type GetSearchesCountProps, type GetSearchesCountResponse, type GetSearchesNoClicksProps, type GetSearchesNoClicksResponse, type GetSearchesNoResultsProps, type GetSearchesNoResultsResponse, type GetStatusProps, type GetStatusResponse, type GetTopCountriesProps, type GetTopCountriesResponse, type GetTopFilterAttribute, type GetTopFilterAttributesProps, type GetTopFilterAttributesResponse, type GetTopFilterForAttribute, type GetTopFilterForAttributeProps, type GetTopFilterForAttributeResponse, type GetTopFiltersNoResultsProps, type GetTopFiltersNoResultsResponse, type GetTopFiltersNoResultsValue, type GetTopFiltersNoResultsValues, type GetTopHitsProps, type GetTopHitsResponse, type GetTopSearchesProps, type GetTopSearchesResponse, type GetUsersCountProps, type GetUsersCountResponse, type Operator, type OrderBy, type Region, type TopCountry, type TopHit, type TopHitWithAnalytics, type TopHitWithRevenueAnalytics, type TopHitsResponse, type TopHitsResponseWithAnalytics, type TopHitsResponseWithRevenueAnalytics, type TopSearch, type TopSearchWithAnalytics, type TopSearchWithRevenueAnalytics, type TopSearchesResponse, type TopSearchesResponseWithAnalytics, type TopSearchesResponseWithRevenueAnalytics, analyticsClient, apiClientVersion };