@algolia/client-analytics 5.7.0 → 5.8.0

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 (55) hide show
  1. package/README.md +5 -6
  2. package/dist/browser.d.ts +825 -834
  3. package/dist/builds/browser.js +144 -168
  4. package/dist/builds/browser.js.map +1 -1
  5. package/dist/builds/browser.min.js +1 -1
  6. package/dist/builds/browser.min.js.map +1 -1
  7. package/dist/builds/browser.umd.js +3 -3
  8. package/dist/builds/fetch.js +141 -165
  9. package/dist/builds/fetch.js.map +1 -1
  10. package/dist/builds/node.cjs +141 -165
  11. package/dist/builds/node.cjs.map +1 -1
  12. package/dist/builds/node.js +142 -166
  13. package/dist/builds/node.js.map +1 -1
  14. package/dist/fetch.d.ts +824 -832
  15. package/dist/node.d.cts +824 -832
  16. package/dist/node.d.ts +824 -832
  17. package/dist/src/analyticsClient.cjs +140 -164
  18. package/dist/src/analyticsClient.cjs.map +1 -1
  19. package/dist/src/analyticsClient.js +140 -164
  20. package/dist/src/analyticsClient.js.map +1 -1
  21. package/index.js +1 -1
  22. package/model/clickPosition.ts +1 -1
  23. package/model/clientMethodProps.ts +23 -22
  24. package/model/dailyRevenue.ts +1 -1
  25. package/model/getAddToCartRateResponse.ts +1 -1
  26. package/model/getAverageClickPositionResponse.ts +1 -1
  27. package/model/getClickPositionsResponse.ts +1 -1
  28. package/model/getClickThroughRateResponse.ts +1 -1
  29. package/model/getConversionRateResponse.ts +1 -1
  30. package/model/getNoClickRateResponse.ts +1 -1
  31. package/model/getNoResultsRateResponse.ts +1 -1
  32. package/model/getPurchaseRateResponse.ts +1 -1
  33. package/model/getRevenue.ts +2 -2
  34. package/model/getSearchesCountResponse.ts +1 -1
  35. package/model/getSearchesNoClicksResponse.ts +1 -1
  36. package/model/getSearchesNoResultsResponse.ts +1 -1
  37. package/model/getTopCountriesResponse.ts +1 -1
  38. package/model/getTopFilterAttributesResponse.ts +1 -1
  39. package/model/getTopFilterForAttributeResponse.ts +1 -1
  40. package/model/getTopFiltersNoResultsResponse.ts +1 -1
  41. package/model/getTopFiltersNoResultsValues.ts +1 -1
  42. package/model/getUsersCountResponse.ts +1 -1
  43. package/model/index.ts +5 -5
  44. package/model/operator.ts +1 -1
  45. package/model/orderBy.ts +1 -1
  46. package/model/topHitWithRevenueAnalytics.ts +1 -1
  47. package/model/topHitsResponse.ts +1 -1
  48. package/model/topHitsResponseWithAnalytics.ts +1 -1
  49. package/model/topHitsResponseWithRevenueAnalytics.ts +1 -1
  50. package/model/topSearchWithAnalytics.ts +1 -1
  51. package/model/topSearchWithRevenueAnalytics.ts +2 -2
  52. package/model/topSearchesResponse.ts +1 -1
  53. package/model/topSearchesResponseWithAnalytics.ts +1 -1
  54. package/model/topSearchesResponseWithRevenueAnalytics.ts +1 -1
  55. package/package.json +6 -6
@@ -1,18 +1,18 @@
1
1
  // builds/browser.ts
2
+ import { createXhrRequester } from "@algolia/requester-browser-xhr";
2
3
  import {
3
- createNullLogger,
4
- createMemoryCache,
5
- createFallbackableCache,
6
4
  createBrowserLocalStorageCache,
5
+ createFallbackableCache,
6
+ createMemoryCache,
7
+ createNullLogger,
7
8
  DEFAULT_CONNECT_TIMEOUT_BROWSER,
8
9
  DEFAULT_READ_TIMEOUT_BROWSER,
9
10
  DEFAULT_WRITE_TIMEOUT_BROWSER
10
11
  } from "@algolia/client-common";
11
- import { createXhrRequester } from "@algolia/requester-browser-xhr";
12
12
 
13
13
  // src/analyticsClient.ts
14
14
  import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
15
- var apiClientVersion = "5.7.0";
15
+ var apiClientVersion = "5.8.0";
16
16
  var REGIONS = ["de", "us"];
17
17
  function getDefaultHosts(region) {
18
18
  const url = !region ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region);
@@ -87,7 +87,6 @@ function createAnalyticsClient({
87
87
  },
88
88
  /**
89
89
  * This method allow you to send requests to the Algolia REST API.
90
- *
91
90
  * @param customDelete - The customDelete object.
92
91
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
93
92
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -110,7 +109,6 @@ function createAnalyticsClient({
110
109
  },
111
110
  /**
112
111
  * This method allow you to send requests to the Algolia REST API.
113
- *
114
112
  * @param customGet - The customGet object.
115
113
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
116
114
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -133,7 +131,6 @@ function createAnalyticsClient({
133
131
  },
134
132
  /**
135
133
  * This method allow you to send requests to the Algolia REST API.
136
- *
137
134
  * @param customPost - The customPost object.
138
135
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
139
136
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -158,7 +155,6 @@ function createAnalyticsClient({
158
155
  },
159
156
  /**
160
157
  * This method allow you to send requests to the Algolia REST API.
161
- *
162
158
  * @param customPut - The customPut object.
163
159
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
164
160
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -185,8 +181,7 @@ function createAnalyticsClient({
185
181
  * Retrieves the add-to-cart rate for all of your searches with at least one add-to-cart event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
186
182
  *
187
183
  * Required API Key ACLs:
188
- * - analytics.
189
- *
184
+ * - analytics
190
185
  * @param getAddToCartRate - The getAddToCartRate object.
191
186
  * @param getAddToCartRate.index - Index name.
192
187
  * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -202,16 +197,16 @@ function createAnalyticsClient({
202
197
  const headers = {};
203
198
  const queryParameters = {};
204
199
  if (index !== void 0) {
205
- queryParameters.index = index.toString();
200
+ queryParameters["index"] = index.toString();
206
201
  }
207
202
  if (startDate !== void 0) {
208
- queryParameters.startDate = startDate.toString();
203
+ queryParameters["startDate"] = startDate.toString();
209
204
  }
210
205
  if (endDate !== void 0) {
211
- queryParameters.endDate = endDate.toString();
206
+ queryParameters["endDate"] = endDate.toString();
212
207
  }
213
208
  if (tags !== void 0) {
214
- queryParameters.tags = tags.toString();
209
+ queryParameters["tags"] = tags.toString();
215
210
  }
216
211
  const request = {
217
212
  method: "GET",
@@ -225,8 +220,7 @@ function createAnalyticsClient({
225
220
  * Retrieves the average click position of your search results, including a daily breakdown. The average click position is the average of all clicked search results\' positions. For example, if users only ever click on the first result for any search, the average click position is 1. By default, the analyzed period includes the last eight days including the current day.
226
221
  *
227
222
  * Required API Key ACLs:
228
- * - analytics.
229
- *
223
+ * - analytics
230
224
  * @param getAverageClickPosition - The getAverageClickPosition object.
231
225
  * @param getAverageClickPosition.index - Index name.
232
226
  * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -242,16 +236,16 @@ function createAnalyticsClient({
242
236
  const headers = {};
243
237
  const queryParameters = {};
244
238
  if (index !== void 0) {
245
- queryParameters.index = index.toString();
239
+ queryParameters["index"] = index.toString();
246
240
  }
247
241
  if (startDate !== void 0) {
248
- queryParameters.startDate = startDate.toString();
242
+ queryParameters["startDate"] = startDate.toString();
249
243
  }
250
244
  if (endDate !== void 0) {
251
- queryParameters.endDate = endDate.toString();
245
+ queryParameters["endDate"] = endDate.toString();
252
246
  }
253
247
  if (tags !== void 0) {
254
- queryParameters.tags = tags.toString();
248
+ queryParameters["tags"] = tags.toString();
255
249
  }
256
250
  const request = {
257
251
  method: "GET",
@@ -265,8 +259,7 @@ function createAnalyticsClient({
265
259
  * Retrieves the positions in the search results and their associated number of clicks. This lets you check how many clicks the first, second, or tenth search results receive.
266
260
  *
267
261
  * Required API Key ACLs:
268
- * - analytics.
269
- *
262
+ * - analytics
270
263
  * @param getClickPositions - The getClickPositions object.
271
264
  * @param getClickPositions.index - Index name.
272
265
  * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -282,16 +275,16 @@ function createAnalyticsClient({
282
275
  const headers = {};
283
276
  const queryParameters = {};
284
277
  if (index !== void 0) {
285
- queryParameters.index = index.toString();
278
+ queryParameters["index"] = index.toString();
286
279
  }
287
280
  if (startDate !== void 0) {
288
- queryParameters.startDate = startDate.toString();
281
+ queryParameters["startDate"] = startDate.toString();
289
282
  }
290
283
  if (endDate !== void 0) {
291
- queryParameters.endDate = endDate.toString();
284
+ queryParameters["endDate"] = endDate.toString();
292
285
  }
293
286
  if (tags !== void 0) {
294
- queryParameters.tags = tags.toString();
287
+ queryParameters["tags"] = tags.toString();
295
288
  }
296
289
  const request = {
297
290
  method: "GET",
@@ -305,8 +298,7 @@ function createAnalyticsClient({
305
298
  * Retrieves the click-through rate for all of your searches with at least one click event, including a daily breakdown By default, the analyzed period includes the last eight days including the current day.
306
299
  *
307
300
  * Required API Key ACLs:
308
- * - analytics.
309
- *
301
+ * - analytics
310
302
  * @param getClickThroughRate - The getClickThroughRate object.
311
303
  * @param getClickThroughRate.index - Index name.
312
304
  * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -322,16 +314,16 @@ function createAnalyticsClient({
322
314
  const headers = {};
323
315
  const queryParameters = {};
324
316
  if (index !== void 0) {
325
- queryParameters.index = index.toString();
317
+ queryParameters["index"] = index.toString();
326
318
  }
327
319
  if (startDate !== void 0) {
328
- queryParameters.startDate = startDate.toString();
320
+ queryParameters["startDate"] = startDate.toString();
329
321
  }
330
322
  if (endDate !== void 0) {
331
- queryParameters.endDate = endDate.toString();
323
+ queryParameters["endDate"] = endDate.toString();
332
324
  }
333
325
  if (tags !== void 0) {
334
- queryParameters.tags = tags.toString();
326
+ queryParameters["tags"] = tags.toString();
335
327
  }
336
328
  const request = {
337
329
  method: "GET",
@@ -345,8 +337,7 @@ function createAnalyticsClient({
345
337
  * Retrieves the conversion rate for all of your searches with at least one conversion event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
346
338
  *
347
339
  * Required API Key ACLs:
348
- * - analytics.
349
- *
340
+ * - analytics
350
341
  * @param getConversionRate - The getConversionRate object.
351
342
  * @param getConversionRate.index - Index name.
352
343
  * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -362,16 +353,16 @@ function createAnalyticsClient({
362
353
  const headers = {};
363
354
  const queryParameters = {};
364
355
  if (index !== void 0) {
365
- queryParameters.index = index.toString();
356
+ queryParameters["index"] = index.toString();
366
357
  }
367
358
  if (startDate !== void 0) {
368
- queryParameters.startDate = startDate.toString();
359
+ queryParameters["startDate"] = startDate.toString();
369
360
  }
370
361
  if (endDate !== void 0) {
371
- queryParameters.endDate = endDate.toString();
362
+ queryParameters["endDate"] = endDate.toString();
372
363
  }
373
364
  if (tags !== void 0) {
374
- queryParameters.tags = tags.toString();
365
+ queryParameters["tags"] = tags.toString();
375
366
  }
376
367
  const request = {
377
368
  method: "GET",
@@ -385,8 +376,7 @@ function createAnalyticsClient({
385
376
  * Retrieves the fraction of searches that didn\'t lead to any click within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
386
377
  *
387
378
  * Required API Key ACLs:
388
- * - analytics.
389
- *
379
+ * - analytics
390
380
  * @param getNoClickRate - The getNoClickRate object.
391
381
  * @param getNoClickRate.index - Index name.
392
382
  * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -402,16 +392,16 @@ function createAnalyticsClient({
402
392
  const headers = {};
403
393
  const queryParameters = {};
404
394
  if (index !== void 0) {
405
- queryParameters.index = index.toString();
395
+ queryParameters["index"] = index.toString();
406
396
  }
407
397
  if (startDate !== void 0) {
408
- queryParameters.startDate = startDate.toString();
398
+ queryParameters["startDate"] = startDate.toString();
409
399
  }
410
400
  if (endDate !== void 0) {
411
- queryParameters.endDate = endDate.toString();
401
+ queryParameters["endDate"] = endDate.toString();
412
402
  }
413
403
  if (tags !== void 0) {
414
- queryParameters.tags = tags.toString();
404
+ queryParameters["tags"] = tags.toString();
415
405
  }
416
406
  const request = {
417
407
  method: "GET",
@@ -425,8 +415,7 @@ function createAnalyticsClient({
425
415
  * Retrieves the fraction of searches that didn\'t return any results within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
426
416
  *
427
417
  * Required API Key ACLs:
428
- * - analytics.
429
- *
418
+ * - analytics
430
419
  * @param getNoResultsRate - The getNoResultsRate object.
431
420
  * @param getNoResultsRate.index - Index name.
432
421
  * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -442,16 +431,16 @@ function createAnalyticsClient({
442
431
  const headers = {};
443
432
  const queryParameters = {};
444
433
  if (index !== void 0) {
445
- queryParameters.index = index.toString();
434
+ queryParameters["index"] = index.toString();
446
435
  }
447
436
  if (startDate !== void 0) {
448
- queryParameters.startDate = startDate.toString();
437
+ queryParameters["startDate"] = startDate.toString();
449
438
  }
450
439
  if (endDate !== void 0) {
451
- queryParameters.endDate = endDate.toString();
440
+ queryParameters["endDate"] = endDate.toString();
452
441
  }
453
442
  if (tags !== void 0) {
454
- queryParameters.tags = tags.toString();
443
+ queryParameters["tags"] = tags.toString();
455
444
  }
456
445
  const request = {
457
446
  method: "GET",
@@ -465,8 +454,7 @@ function createAnalyticsClient({
465
454
  * Retrieves the purchase rate for all of your searches with at least one purchase event, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
466
455
  *
467
456
  * Required API Key ACLs:
468
- * - analytics.
469
- *
457
+ * - analytics
470
458
  * @param getPurchaseRate - The getPurchaseRate object.
471
459
  * @param getPurchaseRate.index - Index name.
472
460
  * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -482,16 +470,16 @@ function createAnalyticsClient({
482
470
  const headers = {};
483
471
  const queryParameters = {};
484
472
  if (index !== void 0) {
485
- queryParameters.index = index.toString();
473
+ queryParameters["index"] = index.toString();
486
474
  }
487
475
  if (startDate !== void 0) {
488
- queryParameters.startDate = startDate.toString();
476
+ queryParameters["startDate"] = startDate.toString();
489
477
  }
490
478
  if (endDate !== void 0) {
491
- queryParameters.endDate = endDate.toString();
479
+ queryParameters["endDate"] = endDate.toString();
492
480
  }
493
481
  if (tags !== void 0) {
494
- queryParameters.tags = tags.toString();
482
+ queryParameters["tags"] = tags.toString();
495
483
  }
496
484
  const request = {
497
485
  method: "GET",
@@ -505,8 +493,7 @@ function createAnalyticsClient({
505
493
  * Retrieves revenue-related metrics, such as the total revenue or the average order value. To retrieve revenue-related metrics, sent purchase events. By default, the analyzed period includes the last eight days including the current day.
506
494
  *
507
495
  * Required API Key ACLs:
508
- * - analytics.
509
- *
496
+ * - analytics
510
497
  * @param getRevenue - The getRevenue object.
511
498
  * @param getRevenue.index - Index name.
512
499
  * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -522,16 +509,16 @@ function createAnalyticsClient({
522
509
  const headers = {};
523
510
  const queryParameters = {};
524
511
  if (index !== void 0) {
525
- queryParameters.index = index.toString();
512
+ queryParameters["index"] = index.toString();
526
513
  }
527
514
  if (startDate !== void 0) {
528
- queryParameters.startDate = startDate.toString();
515
+ queryParameters["startDate"] = startDate.toString();
529
516
  }
530
517
  if (endDate !== void 0) {
531
- queryParameters.endDate = endDate.toString();
518
+ queryParameters["endDate"] = endDate.toString();
532
519
  }
533
520
  if (tags !== void 0) {
534
- queryParameters.tags = tags.toString();
521
+ queryParameters["tags"] = tags.toString();
535
522
  }
536
523
  const request = {
537
524
  method: "GET",
@@ -545,8 +532,7 @@ function createAnalyticsClient({
545
532
  * Retrieves the number of searches within a time range, including a daily breakdown. By default, the analyzed period includes the last eight days including the current day.
546
533
  *
547
534
  * Required API Key ACLs:
548
- * - analytics.
549
- *
535
+ * - analytics
550
536
  * @param getSearchesCount - The getSearchesCount object.
551
537
  * @param getSearchesCount.index - Index name.
552
538
  * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -562,16 +548,16 @@ function createAnalyticsClient({
562
548
  const headers = {};
563
549
  const queryParameters = {};
564
550
  if (index !== void 0) {
565
- queryParameters.index = index.toString();
551
+ queryParameters["index"] = index.toString();
566
552
  }
567
553
  if (startDate !== void 0) {
568
- queryParameters.startDate = startDate.toString();
554
+ queryParameters["startDate"] = startDate.toString();
569
555
  }
570
556
  if (endDate !== void 0) {
571
- queryParameters.endDate = endDate.toString();
557
+ queryParameters["endDate"] = endDate.toString();
572
558
  }
573
559
  if (tags !== void 0) {
574
- queryParameters.tags = tags.toString();
560
+ queryParameters["tags"] = tags.toString();
575
561
  }
576
562
  const request = {
577
563
  method: "GET",
@@ -585,14 +571,13 @@ function createAnalyticsClient({
585
571
  * Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
586
572
  *
587
573
  * Required API Key ACLs:
588
- * - analytics.
589
- *
574
+ * - analytics
590
575
  * @param getSearchesNoClicks - The getSearchesNoClicks object.
591
576
  * @param getSearchesNoClicks.index - Index name.
592
577
  * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
593
578
  * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
594
- * @param getSearchesNoClicks.limit - Number of items to return.
595
- * @param getSearchesNoClicks.offset - Position of the first item to return.
579
+ * @param getSearchesNoClicks.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
580
+ * @param getSearchesNoClicks.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
596
581
  * @param getSearchesNoClicks.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
597
582
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
598
583
  */
@@ -604,22 +589,22 @@ function createAnalyticsClient({
604
589
  const headers = {};
605
590
  const queryParameters = {};
606
591
  if (index !== void 0) {
607
- queryParameters.index = index.toString();
592
+ queryParameters["index"] = index.toString();
608
593
  }
609
594
  if (startDate !== void 0) {
610
- queryParameters.startDate = startDate.toString();
595
+ queryParameters["startDate"] = startDate.toString();
611
596
  }
612
597
  if (endDate !== void 0) {
613
- queryParameters.endDate = endDate.toString();
598
+ queryParameters["endDate"] = endDate.toString();
614
599
  }
615
600
  if (limit !== void 0) {
616
- queryParameters.limit = limit.toString();
601
+ queryParameters["limit"] = limit.toString();
617
602
  }
618
603
  if (offset !== void 0) {
619
- queryParameters.offset = offset.toString();
604
+ queryParameters["offset"] = offset.toString();
620
605
  }
621
606
  if (tags !== void 0) {
622
- queryParameters.tags = tags.toString();
607
+ queryParameters["tags"] = tags.toString();
623
608
  }
624
609
  const request = {
625
610
  method: "GET",
@@ -633,14 +618,13 @@ function createAnalyticsClient({
633
618
  * Retrieves the most popular searches that didn\'t return any results.
634
619
  *
635
620
  * Required API Key ACLs:
636
- * - analytics.
637
- *
621
+ * - analytics
638
622
  * @param getSearchesNoResults - The getSearchesNoResults object.
639
623
  * @param getSearchesNoResults.index - Index name.
640
624
  * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
641
625
  * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
642
- * @param getSearchesNoResults.limit - Number of items to return.
643
- * @param getSearchesNoResults.offset - Position of the first item to return.
626
+ * @param getSearchesNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
627
+ * @param getSearchesNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
644
628
  * @param getSearchesNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
645
629
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
646
630
  */
@@ -652,22 +636,22 @@ function createAnalyticsClient({
652
636
  const headers = {};
653
637
  const queryParameters = {};
654
638
  if (index !== void 0) {
655
- queryParameters.index = index.toString();
639
+ queryParameters["index"] = index.toString();
656
640
  }
657
641
  if (startDate !== void 0) {
658
- queryParameters.startDate = startDate.toString();
642
+ queryParameters["startDate"] = startDate.toString();
659
643
  }
660
644
  if (endDate !== void 0) {
661
- queryParameters.endDate = endDate.toString();
645
+ queryParameters["endDate"] = endDate.toString();
662
646
  }
663
647
  if (limit !== void 0) {
664
- queryParameters.limit = limit.toString();
648
+ queryParameters["limit"] = limit.toString();
665
649
  }
666
650
  if (offset !== void 0) {
667
- queryParameters.offset = offset.toString();
651
+ queryParameters["offset"] = offset.toString();
668
652
  }
669
653
  if (tags !== void 0) {
670
- queryParameters.tags = tags.toString();
654
+ queryParameters["tags"] = tags.toString();
671
655
  }
672
656
  const request = {
673
657
  method: "GET",
@@ -681,8 +665,7 @@ function createAnalyticsClient({
681
665
  * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
682
666
  *
683
667
  * Required API Key ACLs:
684
- * - analytics.
685
- *
668
+ * - analytics
686
669
  * @param getStatus - The getStatus object.
687
670
  * @param getStatus.index - Index name.
688
671
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -695,7 +678,7 @@ function createAnalyticsClient({
695
678
  const headers = {};
696
679
  const queryParameters = {};
697
680
  if (index !== void 0) {
698
- queryParameters.index = index.toString();
681
+ queryParameters["index"] = index.toString();
699
682
  }
700
683
  const request = {
701
684
  method: "GET",
@@ -709,14 +692,13 @@ function createAnalyticsClient({
709
692
  * Retrieves the countries with the most searches to your index.
710
693
  *
711
694
  * Required API Key ACLs:
712
- * - analytics.
713
- *
695
+ * - analytics
714
696
  * @param getTopCountries - The getTopCountries object.
715
697
  * @param getTopCountries.index - Index name.
716
698
  * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
717
699
  * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
718
- * @param getTopCountries.limit - Number of items to return.
719
- * @param getTopCountries.offset - Position of the first item to return.
700
+ * @param getTopCountries.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
701
+ * @param getTopCountries.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
720
702
  * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
721
703
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
722
704
  */
@@ -728,22 +710,22 @@ function createAnalyticsClient({
728
710
  const headers = {};
729
711
  const queryParameters = {};
730
712
  if (index !== void 0) {
731
- queryParameters.index = index.toString();
713
+ queryParameters["index"] = index.toString();
732
714
  }
733
715
  if (startDate !== void 0) {
734
- queryParameters.startDate = startDate.toString();
716
+ queryParameters["startDate"] = startDate.toString();
735
717
  }
736
718
  if (endDate !== void 0) {
737
- queryParameters.endDate = endDate.toString();
719
+ queryParameters["endDate"] = endDate.toString();
738
720
  }
739
721
  if (limit !== void 0) {
740
- queryParameters.limit = limit.toString();
722
+ queryParameters["limit"] = limit.toString();
741
723
  }
742
724
  if (offset !== void 0) {
743
- queryParameters.offset = offset.toString();
725
+ queryParameters["offset"] = offset.toString();
744
726
  }
745
727
  if (tags !== void 0) {
746
- queryParameters.tags = tags.toString();
728
+ queryParameters["tags"] = tags.toString();
747
729
  }
748
730
  const request = {
749
731
  method: "GET",
@@ -757,15 +739,14 @@ function createAnalyticsClient({
757
739
  * Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
758
740
  *
759
741
  * Required API Key ACLs:
760
- * - analytics.
761
- *
742
+ * - analytics
762
743
  * @param getTopFilterAttributes - The getTopFilterAttributes object.
763
744
  * @param getTopFilterAttributes.index - Index name.
764
745
  * @param getTopFilterAttributes.search - Search query.
765
746
  * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
766
747
  * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
767
- * @param getTopFilterAttributes.limit - Number of items to return.
768
- * @param getTopFilterAttributes.offset - Position of the first item to return.
748
+ * @param getTopFilterAttributes.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
749
+ * @param getTopFilterAttributes.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
769
750
  * @param getTopFilterAttributes.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
770
751
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
771
752
  */
@@ -777,25 +758,25 @@ function createAnalyticsClient({
777
758
  const headers = {};
778
759
  const queryParameters = {};
779
760
  if (index !== void 0) {
780
- queryParameters.index = index.toString();
761
+ queryParameters["index"] = index.toString();
781
762
  }
782
763
  if (search !== void 0) {
783
- queryParameters.search = search.toString();
764
+ queryParameters["search"] = search.toString();
784
765
  }
785
766
  if (startDate !== void 0) {
786
- queryParameters.startDate = startDate.toString();
767
+ queryParameters["startDate"] = startDate.toString();
787
768
  }
788
769
  if (endDate !== void 0) {
789
- queryParameters.endDate = endDate.toString();
770
+ queryParameters["endDate"] = endDate.toString();
790
771
  }
791
772
  if (limit !== void 0) {
792
- queryParameters.limit = limit.toString();
773
+ queryParameters["limit"] = limit.toString();
793
774
  }
794
775
  if (offset !== void 0) {
795
- queryParameters.offset = offset.toString();
776
+ queryParameters["offset"] = offset.toString();
796
777
  }
797
778
  if (tags !== void 0) {
798
- queryParameters.tags = tags.toString();
779
+ queryParameters["tags"] = tags.toString();
799
780
  }
800
781
  const request = {
801
782
  method: "GET",
@@ -809,16 +790,15 @@ function createAnalyticsClient({
809
790
  * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
810
791
  *
811
792
  * Required API Key ACLs:
812
- * - analytics.
813
- *
793
+ * - analytics
814
794
  * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
815
795
  * @param getTopFilterForAttribute.attribute - Attribute name.
816
796
  * @param getTopFilterForAttribute.index - Index name.
817
797
  * @param getTopFilterForAttribute.search - Search query.
818
798
  * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
819
799
  * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
820
- * @param getTopFilterForAttribute.limit - Number of items to return.
821
- * @param getTopFilterForAttribute.offset - Position of the first item to return.
800
+ * @param getTopFilterForAttribute.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
801
+ * @param getTopFilterForAttribute.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
822
802
  * @param getTopFilterForAttribute.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
823
803
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
824
804
  */
@@ -833,25 +813,25 @@ function createAnalyticsClient({
833
813
  const headers = {};
834
814
  const queryParameters = {};
835
815
  if (index !== void 0) {
836
- queryParameters.index = index.toString();
816
+ queryParameters["index"] = index.toString();
837
817
  }
838
818
  if (search !== void 0) {
839
- queryParameters.search = search.toString();
819
+ queryParameters["search"] = search.toString();
840
820
  }
841
821
  if (startDate !== void 0) {
842
- queryParameters.startDate = startDate.toString();
822
+ queryParameters["startDate"] = startDate.toString();
843
823
  }
844
824
  if (endDate !== void 0) {
845
- queryParameters.endDate = endDate.toString();
825
+ queryParameters["endDate"] = endDate.toString();
846
826
  }
847
827
  if (limit !== void 0) {
848
- queryParameters.limit = limit.toString();
828
+ queryParameters["limit"] = limit.toString();
849
829
  }
850
830
  if (offset !== void 0) {
851
- queryParameters.offset = offset.toString();
831
+ queryParameters["offset"] = offset.toString();
852
832
  }
853
833
  if (tags !== void 0) {
854
- queryParameters.tags = tags.toString();
834
+ queryParameters["tags"] = tags.toString();
855
835
  }
856
836
  const request = {
857
837
  method: "GET",
@@ -865,15 +845,14 @@ function createAnalyticsClient({
865
845
  * Retrieves the most frequently used filters for a search that didn\'t return any results. To get the most frequent searches without results, use the [Retrieve searches without results](#tag/search/operation/getSearchesNoResults) operation.
866
846
  *
867
847
  * Required API Key ACLs:
868
- * - analytics.
869
- *
848
+ * - analytics
870
849
  * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
871
850
  * @param getTopFiltersNoResults.index - Index name.
872
851
  * @param getTopFiltersNoResults.search - Search query.
873
852
  * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
874
853
  * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
875
- * @param getTopFiltersNoResults.limit - Number of items to return.
876
- * @param getTopFiltersNoResults.offset - Position of the first item to return.
854
+ * @param getTopFiltersNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
855
+ * @param getTopFiltersNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
877
856
  * @param getTopFiltersNoResults.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
878
857
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
879
858
  */
@@ -885,25 +864,25 @@ function createAnalyticsClient({
885
864
  const headers = {};
886
865
  const queryParameters = {};
887
866
  if (index !== void 0) {
888
- queryParameters.index = index.toString();
867
+ queryParameters["index"] = index.toString();
889
868
  }
890
869
  if (search !== void 0) {
891
- queryParameters.search = search.toString();
870
+ queryParameters["search"] = search.toString();
892
871
  }
893
872
  if (startDate !== void 0) {
894
- queryParameters.startDate = startDate.toString();
873
+ queryParameters["startDate"] = startDate.toString();
895
874
  }
896
875
  if (endDate !== void 0) {
897
- queryParameters.endDate = endDate.toString();
876
+ queryParameters["endDate"] = endDate.toString();
898
877
  }
899
878
  if (limit !== void 0) {
900
- queryParameters.limit = limit.toString();
879
+ queryParameters["limit"] = limit.toString();
901
880
  }
902
881
  if (offset !== void 0) {
903
- queryParameters.offset = offset.toString();
882
+ queryParameters["offset"] = offset.toString();
904
883
  }
905
884
  if (tags !== void 0) {
906
- queryParameters.tags = tags.toString();
885
+ queryParameters["tags"] = tags.toString();
907
886
  }
908
887
  const request = {
909
888
  method: "GET",
@@ -917,8 +896,7 @@ function createAnalyticsClient({
917
896
  * Retrieves the object IDs of the most frequent search results.
918
897
  *
919
898
  * Required API Key ACLs:
920
- * - analytics.
921
- *
899
+ * - analytics
922
900
  * @param getTopHits - The getTopHits object.
923
901
  * @param getTopHits.index - Index name.
924
902
  * @param getTopHits.search - Search query.
@@ -926,8 +904,8 @@ function createAnalyticsClient({
926
904
  * @param getTopHits.revenueAnalytics - Whether to include revenue-related metrics in the response. If true, metrics related to click and conversion events are also included in the response.
927
905
  * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
928
906
  * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
929
- * @param getTopHits.limit - Number of items to return.
930
- * @param getTopHits.offset - Position of the first item to return.
907
+ * @param getTopHits.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
908
+ * @param getTopHits.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
931
909
  * @param getTopHits.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
932
910
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
933
911
  */
@@ -939,31 +917,31 @@ function createAnalyticsClient({
939
917
  const headers = {};
940
918
  const queryParameters = {};
941
919
  if (index !== void 0) {
942
- queryParameters.index = index.toString();
920
+ queryParameters["index"] = index.toString();
943
921
  }
944
922
  if (search !== void 0) {
945
- queryParameters.search = search.toString();
923
+ queryParameters["search"] = search.toString();
946
924
  }
947
925
  if (clickAnalytics !== void 0) {
948
- queryParameters.clickAnalytics = clickAnalytics.toString();
926
+ queryParameters["clickAnalytics"] = clickAnalytics.toString();
949
927
  }
950
928
  if (revenueAnalytics !== void 0) {
951
- queryParameters.revenueAnalytics = revenueAnalytics.toString();
929
+ queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
952
930
  }
953
931
  if (startDate !== void 0) {
954
- queryParameters.startDate = startDate.toString();
932
+ queryParameters["startDate"] = startDate.toString();
955
933
  }
956
934
  if (endDate !== void 0) {
957
- queryParameters.endDate = endDate.toString();
935
+ queryParameters["endDate"] = endDate.toString();
958
936
  }
959
937
  if (limit !== void 0) {
960
- queryParameters.limit = limit.toString();
938
+ queryParameters["limit"] = limit.toString();
961
939
  }
962
940
  if (offset !== void 0) {
963
- queryParameters.offset = offset.toString();
941
+ queryParameters["offset"] = offset.toString();
964
942
  }
965
943
  if (tags !== void 0) {
966
- queryParameters.tags = tags.toString();
944
+ queryParameters["tags"] = tags.toString();
967
945
  }
968
946
  const request = {
969
947
  method: "GET",
@@ -977,8 +955,7 @@ function createAnalyticsClient({
977
955
  * Returns the most popular search terms.
978
956
  *
979
957
  * Required API Key ACLs:
980
- * - analytics.
981
- *
958
+ * - analytics
982
959
  * @param getTopSearches - The getTopSearches object.
983
960
  * @param getTopSearches.index - Index name.
984
961
  * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
@@ -987,8 +964,8 @@ function createAnalyticsClient({
987
964
  * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
988
965
  * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
989
966
  * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
990
- * @param getTopSearches.limit - Number of items to return.
991
- * @param getTopSearches.offset - Position of the first item to return.
967
+ * @param getTopSearches.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
968
+ * @param getTopSearches.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
992
969
  * @param getTopSearches.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
993
970
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
994
971
  */
@@ -1011,34 +988,34 @@ function createAnalyticsClient({
1011
988
  const headers = {};
1012
989
  const queryParameters = {};
1013
990
  if (index !== void 0) {
1014
- queryParameters.index = index.toString();
991
+ queryParameters["index"] = index.toString();
1015
992
  }
1016
993
  if (clickAnalytics !== void 0) {
1017
- queryParameters.clickAnalytics = clickAnalytics.toString();
994
+ queryParameters["clickAnalytics"] = clickAnalytics.toString();
1018
995
  }
1019
996
  if (revenueAnalytics !== void 0) {
1020
- queryParameters.revenueAnalytics = revenueAnalytics.toString();
997
+ queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
1021
998
  }
1022
999
  if (startDate !== void 0) {
1023
- queryParameters.startDate = startDate.toString();
1000
+ queryParameters["startDate"] = startDate.toString();
1024
1001
  }
1025
1002
  if (endDate !== void 0) {
1026
- queryParameters.endDate = endDate.toString();
1003
+ queryParameters["endDate"] = endDate.toString();
1027
1004
  }
1028
1005
  if (orderBy !== void 0) {
1029
- queryParameters.orderBy = orderBy.toString();
1006
+ queryParameters["orderBy"] = orderBy.toString();
1030
1007
  }
1031
1008
  if (direction !== void 0) {
1032
- queryParameters.direction = direction.toString();
1009
+ queryParameters["direction"] = direction.toString();
1033
1010
  }
1034
1011
  if (limit !== void 0) {
1035
- queryParameters.limit = limit.toString();
1012
+ queryParameters["limit"] = limit.toString();
1036
1013
  }
1037
1014
  if (offset !== void 0) {
1038
- queryParameters.offset = offset.toString();
1015
+ queryParameters["offset"] = offset.toString();
1039
1016
  }
1040
1017
  if (tags !== void 0) {
1041
- queryParameters.tags = tags.toString();
1018
+ queryParameters["tags"] = tags.toString();
1042
1019
  }
1043
1020
  const request = {
1044
1021
  method: "GET",
@@ -1052,8 +1029,7 @@ function createAnalyticsClient({
1052
1029
  * Retrieves the number of unique users within a time range, including a daily breakdown. Since this endpoint returns the number of unique users, the sum of the daily values might be different from the total number. By default, Algolia distinguishes search users by their IP address, _unless_ you include a pseudonymous user identifier in your search requests with the `userToken` API parameter or `x-algolia-usertoken` request header. By default, the analyzed period includes the last eight days including the current day.
1053
1030
  *
1054
1031
  * Required API Key ACLs:
1055
- * - analytics.
1056
- *
1032
+ * - analytics
1057
1033
  * @param getUsersCount - The getUsersCount object.
1058
1034
  * @param getUsersCount.index - Index name.
1059
1035
  * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -1069,16 +1045,16 @@ function createAnalyticsClient({
1069
1045
  const headers = {};
1070
1046
  const queryParameters = {};
1071
1047
  if (index !== void 0) {
1072
- queryParameters.index = index.toString();
1048
+ queryParameters["index"] = index.toString();
1073
1049
  }
1074
1050
  if (startDate !== void 0) {
1075
- queryParameters.startDate = startDate.toString();
1051
+ queryParameters["startDate"] = startDate.toString();
1076
1052
  }
1077
1053
  if (endDate !== void 0) {
1078
- queryParameters.endDate = endDate.toString();
1054
+ queryParameters["endDate"] = endDate.toString();
1079
1055
  }
1080
1056
  if (tags !== void 0) {
1081
- queryParameters.tags = tags.toString();
1057
+ queryParameters["tags"] = tags.toString();
1082
1058
  }
1083
1059
  const request = {
1084
1060
  method: "GET",