@algolia/client-analytics 5.6.1 → 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 +7 -7
@@ -24,12 +24,12 @@ __export(node_exports, {
24
24
  apiClientVersion: () => apiClientVersion
25
25
  });
26
26
  module.exports = __toCommonJS(node_exports);
27
- var import_client_common2 = require("@algolia/client-common");
28
27
  var import_requester_node_http = require("@algolia/requester-node-http");
28
+ var import_client_common2 = require("@algolia/client-common");
29
29
 
30
30
  // src/analyticsClient.ts
31
31
  var import_client_common = require("@algolia/client-common");
32
- var apiClientVersion = "5.6.1";
32
+ var apiClientVersion = "5.8.0";
33
33
  var REGIONS = ["de", "us"];
34
34
  function getDefaultHosts(region) {
35
35
  const url = !region ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region);
@@ -104,7 +104,6 @@ function createAnalyticsClient({
104
104
  },
105
105
  /**
106
106
  * This method allow you to send requests to the Algolia REST API.
107
- *
108
107
  * @param customDelete - The customDelete object.
109
108
  * @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
110
109
  * @param customDelete.parameters - Query parameters to apply to the current query.
@@ -127,7 +126,6 @@ function createAnalyticsClient({
127
126
  },
128
127
  /**
129
128
  * This method allow you to send requests to the Algolia REST API.
130
- *
131
129
  * @param customGet - The customGet object.
132
130
  * @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
133
131
  * @param customGet.parameters - Query parameters to apply to the current query.
@@ -150,7 +148,6 @@ function createAnalyticsClient({
150
148
  },
151
149
  /**
152
150
  * This method allow you to send requests to the Algolia REST API.
153
- *
154
151
  * @param customPost - The customPost object.
155
152
  * @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
156
153
  * @param customPost.parameters - Query parameters to apply to the current query.
@@ -175,7 +172,6 @@ function createAnalyticsClient({
175
172
  },
176
173
  /**
177
174
  * This method allow you to send requests to the Algolia REST API.
178
- *
179
175
  * @param customPut - The customPut object.
180
176
  * @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
181
177
  * @param customPut.parameters - Query parameters to apply to the current query.
@@ -202,8 +198,7 @@ function createAnalyticsClient({
202
198
  * 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.
203
199
  *
204
200
  * Required API Key ACLs:
205
- * - analytics.
206
- *
201
+ * - analytics
207
202
  * @param getAddToCartRate - The getAddToCartRate object.
208
203
  * @param getAddToCartRate.index - Index name.
209
204
  * @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -219,16 +214,16 @@ function createAnalyticsClient({
219
214
  const headers = {};
220
215
  const queryParameters = {};
221
216
  if (index !== void 0) {
222
- queryParameters.index = index.toString();
217
+ queryParameters["index"] = index.toString();
223
218
  }
224
219
  if (startDate !== void 0) {
225
- queryParameters.startDate = startDate.toString();
220
+ queryParameters["startDate"] = startDate.toString();
226
221
  }
227
222
  if (endDate !== void 0) {
228
- queryParameters.endDate = endDate.toString();
223
+ queryParameters["endDate"] = endDate.toString();
229
224
  }
230
225
  if (tags !== void 0) {
231
- queryParameters.tags = tags.toString();
226
+ queryParameters["tags"] = tags.toString();
232
227
  }
233
228
  const request = {
234
229
  method: "GET",
@@ -242,8 +237,7 @@ function createAnalyticsClient({
242
237
  * 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.
243
238
  *
244
239
  * Required API Key ACLs:
245
- * - analytics.
246
- *
240
+ * - analytics
247
241
  * @param getAverageClickPosition - The getAverageClickPosition object.
248
242
  * @param getAverageClickPosition.index - Index name.
249
243
  * @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -259,16 +253,16 @@ function createAnalyticsClient({
259
253
  const headers = {};
260
254
  const queryParameters = {};
261
255
  if (index !== void 0) {
262
- queryParameters.index = index.toString();
256
+ queryParameters["index"] = index.toString();
263
257
  }
264
258
  if (startDate !== void 0) {
265
- queryParameters.startDate = startDate.toString();
259
+ queryParameters["startDate"] = startDate.toString();
266
260
  }
267
261
  if (endDate !== void 0) {
268
- queryParameters.endDate = endDate.toString();
262
+ queryParameters["endDate"] = endDate.toString();
269
263
  }
270
264
  if (tags !== void 0) {
271
- queryParameters.tags = tags.toString();
265
+ queryParameters["tags"] = tags.toString();
272
266
  }
273
267
  const request = {
274
268
  method: "GET",
@@ -282,8 +276,7 @@ function createAnalyticsClient({
282
276
  * 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.
283
277
  *
284
278
  * Required API Key ACLs:
285
- * - analytics.
286
- *
279
+ * - analytics
287
280
  * @param getClickPositions - The getClickPositions object.
288
281
  * @param getClickPositions.index - Index name.
289
282
  * @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -299,16 +292,16 @@ function createAnalyticsClient({
299
292
  const headers = {};
300
293
  const queryParameters = {};
301
294
  if (index !== void 0) {
302
- queryParameters.index = index.toString();
295
+ queryParameters["index"] = index.toString();
303
296
  }
304
297
  if (startDate !== void 0) {
305
- queryParameters.startDate = startDate.toString();
298
+ queryParameters["startDate"] = startDate.toString();
306
299
  }
307
300
  if (endDate !== void 0) {
308
- queryParameters.endDate = endDate.toString();
301
+ queryParameters["endDate"] = endDate.toString();
309
302
  }
310
303
  if (tags !== void 0) {
311
- queryParameters.tags = tags.toString();
304
+ queryParameters["tags"] = tags.toString();
312
305
  }
313
306
  const request = {
314
307
  method: "GET",
@@ -322,8 +315,7 @@ function createAnalyticsClient({
322
315
  * 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.
323
316
  *
324
317
  * Required API Key ACLs:
325
- * - analytics.
326
- *
318
+ * - analytics
327
319
  * @param getClickThroughRate - The getClickThroughRate object.
328
320
  * @param getClickThroughRate.index - Index name.
329
321
  * @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -339,16 +331,16 @@ function createAnalyticsClient({
339
331
  const headers = {};
340
332
  const queryParameters = {};
341
333
  if (index !== void 0) {
342
- queryParameters.index = index.toString();
334
+ queryParameters["index"] = index.toString();
343
335
  }
344
336
  if (startDate !== void 0) {
345
- queryParameters.startDate = startDate.toString();
337
+ queryParameters["startDate"] = startDate.toString();
346
338
  }
347
339
  if (endDate !== void 0) {
348
- queryParameters.endDate = endDate.toString();
340
+ queryParameters["endDate"] = endDate.toString();
349
341
  }
350
342
  if (tags !== void 0) {
351
- queryParameters.tags = tags.toString();
343
+ queryParameters["tags"] = tags.toString();
352
344
  }
353
345
  const request = {
354
346
  method: "GET",
@@ -362,8 +354,7 @@ function createAnalyticsClient({
362
354
  * 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.
363
355
  *
364
356
  * Required API Key ACLs:
365
- * - analytics.
366
- *
357
+ * - analytics
367
358
  * @param getConversionRate - The getConversionRate object.
368
359
  * @param getConversionRate.index - Index name.
369
360
  * @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -379,16 +370,16 @@ function createAnalyticsClient({
379
370
  const headers = {};
380
371
  const queryParameters = {};
381
372
  if (index !== void 0) {
382
- queryParameters.index = index.toString();
373
+ queryParameters["index"] = index.toString();
383
374
  }
384
375
  if (startDate !== void 0) {
385
- queryParameters.startDate = startDate.toString();
376
+ queryParameters["startDate"] = startDate.toString();
386
377
  }
387
378
  if (endDate !== void 0) {
388
- queryParameters.endDate = endDate.toString();
379
+ queryParameters["endDate"] = endDate.toString();
389
380
  }
390
381
  if (tags !== void 0) {
391
- queryParameters.tags = tags.toString();
382
+ queryParameters["tags"] = tags.toString();
392
383
  }
393
384
  const request = {
394
385
  method: "GET",
@@ -402,8 +393,7 @@ function createAnalyticsClient({
402
393
  * 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.
403
394
  *
404
395
  * Required API Key ACLs:
405
- * - analytics.
406
- *
396
+ * - analytics
407
397
  * @param getNoClickRate - The getNoClickRate object.
408
398
  * @param getNoClickRate.index - Index name.
409
399
  * @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -419,16 +409,16 @@ function createAnalyticsClient({
419
409
  const headers = {};
420
410
  const queryParameters = {};
421
411
  if (index !== void 0) {
422
- queryParameters.index = index.toString();
412
+ queryParameters["index"] = index.toString();
423
413
  }
424
414
  if (startDate !== void 0) {
425
- queryParameters.startDate = startDate.toString();
415
+ queryParameters["startDate"] = startDate.toString();
426
416
  }
427
417
  if (endDate !== void 0) {
428
- queryParameters.endDate = endDate.toString();
418
+ queryParameters["endDate"] = endDate.toString();
429
419
  }
430
420
  if (tags !== void 0) {
431
- queryParameters.tags = tags.toString();
421
+ queryParameters["tags"] = tags.toString();
432
422
  }
433
423
  const request = {
434
424
  method: "GET",
@@ -442,8 +432,7 @@ function createAnalyticsClient({
442
432
  * 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.
443
433
  *
444
434
  * Required API Key ACLs:
445
- * - analytics.
446
- *
435
+ * - analytics
447
436
  * @param getNoResultsRate - The getNoResultsRate object.
448
437
  * @param getNoResultsRate.index - Index name.
449
438
  * @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -459,16 +448,16 @@ function createAnalyticsClient({
459
448
  const headers = {};
460
449
  const queryParameters = {};
461
450
  if (index !== void 0) {
462
- queryParameters.index = index.toString();
451
+ queryParameters["index"] = index.toString();
463
452
  }
464
453
  if (startDate !== void 0) {
465
- queryParameters.startDate = startDate.toString();
454
+ queryParameters["startDate"] = startDate.toString();
466
455
  }
467
456
  if (endDate !== void 0) {
468
- queryParameters.endDate = endDate.toString();
457
+ queryParameters["endDate"] = endDate.toString();
469
458
  }
470
459
  if (tags !== void 0) {
471
- queryParameters.tags = tags.toString();
460
+ queryParameters["tags"] = tags.toString();
472
461
  }
473
462
  const request = {
474
463
  method: "GET",
@@ -482,8 +471,7 @@ function createAnalyticsClient({
482
471
  * 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.
483
472
  *
484
473
  * Required API Key ACLs:
485
- * - analytics.
486
- *
474
+ * - analytics
487
475
  * @param getPurchaseRate - The getPurchaseRate object.
488
476
  * @param getPurchaseRate.index - Index name.
489
477
  * @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -499,16 +487,16 @@ function createAnalyticsClient({
499
487
  const headers = {};
500
488
  const queryParameters = {};
501
489
  if (index !== void 0) {
502
- queryParameters.index = index.toString();
490
+ queryParameters["index"] = index.toString();
503
491
  }
504
492
  if (startDate !== void 0) {
505
- queryParameters.startDate = startDate.toString();
493
+ queryParameters["startDate"] = startDate.toString();
506
494
  }
507
495
  if (endDate !== void 0) {
508
- queryParameters.endDate = endDate.toString();
496
+ queryParameters["endDate"] = endDate.toString();
509
497
  }
510
498
  if (tags !== void 0) {
511
- queryParameters.tags = tags.toString();
499
+ queryParameters["tags"] = tags.toString();
512
500
  }
513
501
  const request = {
514
502
  method: "GET",
@@ -522,8 +510,7 @@ function createAnalyticsClient({
522
510
  * 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.
523
511
  *
524
512
  * Required API Key ACLs:
525
- * - analytics.
526
- *
513
+ * - analytics
527
514
  * @param getRevenue - The getRevenue object.
528
515
  * @param getRevenue.index - Index name.
529
516
  * @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -539,16 +526,16 @@ function createAnalyticsClient({
539
526
  const headers = {};
540
527
  const queryParameters = {};
541
528
  if (index !== void 0) {
542
- queryParameters.index = index.toString();
529
+ queryParameters["index"] = index.toString();
543
530
  }
544
531
  if (startDate !== void 0) {
545
- queryParameters.startDate = startDate.toString();
532
+ queryParameters["startDate"] = startDate.toString();
546
533
  }
547
534
  if (endDate !== void 0) {
548
- queryParameters.endDate = endDate.toString();
535
+ queryParameters["endDate"] = endDate.toString();
549
536
  }
550
537
  if (tags !== void 0) {
551
- queryParameters.tags = tags.toString();
538
+ queryParameters["tags"] = tags.toString();
552
539
  }
553
540
  const request = {
554
541
  method: "GET",
@@ -562,8 +549,7 @@ function createAnalyticsClient({
562
549
  * 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.
563
550
  *
564
551
  * Required API Key ACLs:
565
- * - analytics.
566
- *
552
+ * - analytics
567
553
  * @param getSearchesCount - The getSearchesCount object.
568
554
  * @param getSearchesCount.index - Index name.
569
555
  * @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -579,16 +565,16 @@ function createAnalyticsClient({
579
565
  const headers = {};
580
566
  const queryParameters = {};
581
567
  if (index !== void 0) {
582
- queryParameters.index = index.toString();
568
+ queryParameters["index"] = index.toString();
583
569
  }
584
570
  if (startDate !== void 0) {
585
- queryParameters.startDate = startDate.toString();
571
+ queryParameters["startDate"] = startDate.toString();
586
572
  }
587
573
  if (endDate !== void 0) {
588
- queryParameters.endDate = endDate.toString();
574
+ queryParameters["endDate"] = endDate.toString();
589
575
  }
590
576
  if (tags !== void 0) {
591
- queryParameters.tags = tags.toString();
577
+ queryParameters["tags"] = tags.toString();
592
578
  }
593
579
  const request = {
594
580
  method: "GET",
@@ -602,14 +588,13 @@ function createAnalyticsClient({
602
588
  * Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
603
589
  *
604
590
  * Required API Key ACLs:
605
- * - analytics.
606
- *
591
+ * - analytics
607
592
  * @param getSearchesNoClicks - The getSearchesNoClicks object.
608
593
  * @param getSearchesNoClicks.index - Index name.
609
594
  * @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
610
595
  * @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
611
- * @param getSearchesNoClicks.limit - Number of items to return.
612
- * @param getSearchesNoClicks.offset - Position of the first item to return.
596
+ * @param getSearchesNoClicks.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
597
+ * @param getSearchesNoClicks.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
613
598
  * @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/).
614
599
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
615
600
  */
@@ -621,22 +606,22 @@ function createAnalyticsClient({
621
606
  const headers = {};
622
607
  const queryParameters = {};
623
608
  if (index !== void 0) {
624
- queryParameters.index = index.toString();
609
+ queryParameters["index"] = index.toString();
625
610
  }
626
611
  if (startDate !== void 0) {
627
- queryParameters.startDate = startDate.toString();
612
+ queryParameters["startDate"] = startDate.toString();
628
613
  }
629
614
  if (endDate !== void 0) {
630
- queryParameters.endDate = endDate.toString();
615
+ queryParameters["endDate"] = endDate.toString();
631
616
  }
632
617
  if (limit !== void 0) {
633
- queryParameters.limit = limit.toString();
618
+ queryParameters["limit"] = limit.toString();
634
619
  }
635
620
  if (offset !== void 0) {
636
- queryParameters.offset = offset.toString();
621
+ queryParameters["offset"] = offset.toString();
637
622
  }
638
623
  if (tags !== void 0) {
639
- queryParameters.tags = tags.toString();
624
+ queryParameters["tags"] = tags.toString();
640
625
  }
641
626
  const request = {
642
627
  method: "GET",
@@ -650,14 +635,13 @@ function createAnalyticsClient({
650
635
  * Retrieves the most popular searches that didn\'t return any results.
651
636
  *
652
637
  * Required API Key ACLs:
653
- * - analytics.
654
- *
638
+ * - analytics
655
639
  * @param getSearchesNoResults - The getSearchesNoResults object.
656
640
  * @param getSearchesNoResults.index - Index name.
657
641
  * @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
658
642
  * @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
659
- * @param getSearchesNoResults.limit - Number of items to return.
660
- * @param getSearchesNoResults.offset - Position of the first item to return.
643
+ * @param getSearchesNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
644
+ * @param getSearchesNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
661
645
  * @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/).
662
646
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
663
647
  */
@@ -669,22 +653,22 @@ function createAnalyticsClient({
669
653
  const headers = {};
670
654
  const queryParameters = {};
671
655
  if (index !== void 0) {
672
- queryParameters.index = index.toString();
656
+ queryParameters["index"] = index.toString();
673
657
  }
674
658
  if (startDate !== void 0) {
675
- queryParameters.startDate = startDate.toString();
659
+ queryParameters["startDate"] = startDate.toString();
676
660
  }
677
661
  if (endDate !== void 0) {
678
- queryParameters.endDate = endDate.toString();
662
+ queryParameters["endDate"] = endDate.toString();
679
663
  }
680
664
  if (limit !== void 0) {
681
- queryParameters.limit = limit.toString();
665
+ queryParameters["limit"] = limit.toString();
682
666
  }
683
667
  if (offset !== void 0) {
684
- queryParameters.offset = offset.toString();
668
+ queryParameters["offset"] = offset.toString();
685
669
  }
686
670
  if (tags !== void 0) {
687
- queryParameters.tags = tags.toString();
671
+ queryParameters["tags"] = tags.toString();
688
672
  }
689
673
  const request = {
690
674
  method: "GET",
@@ -698,8 +682,7 @@ function createAnalyticsClient({
698
682
  * Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
699
683
  *
700
684
  * Required API Key ACLs:
701
- * - analytics.
702
- *
685
+ * - analytics
703
686
  * @param getStatus - The getStatus object.
704
687
  * @param getStatus.index - Index name.
705
688
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
@@ -712,7 +695,7 @@ function createAnalyticsClient({
712
695
  const headers = {};
713
696
  const queryParameters = {};
714
697
  if (index !== void 0) {
715
- queryParameters.index = index.toString();
698
+ queryParameters["index"] = index.toString();
716
699
  }
717
700
  const request = {
718
701
  method: "GET",
@@ -726,14 +709,13 @@ function createAnalyticsClient({
726
709
  * Retrieves the countries with the most searches to your index.
727
710
  *
728
711
  * Required API Key ACLs:
729
- * - analytics.
730
- *
712
+ * - analytics
731
713
  * @param getTopCountries - The getTopCountries object.
732
714
  * @param getTopCountries.index - Index name.
733
715
  * @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
734
716
  * @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
735
- * @param getTopCountries.limit - Number of items to return.
736
- * @param getTopCountries.offset - Position of the first item to return.
717
+ * @param getTopCountries.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
718
+ * @param getTopCountries.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
737
719
  * @param getTopCountries.tags - Tags by which to segment the analytics. You can combine multiple tags with `OR` and `AND`. Tags must be URL-encoded. For more information, see [Segment your analytics data](https://www.algolia.com/doc/guides/search-analytics/guides/segments/).
738
720
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
739
721
  */
@@ -745,22 +727,22 @@ function createAnalyticsClient({
745
727
  const headers = {};
746
728
  const queryParameters = {};
747
729
  if (index !== void 0) {
748
- queryParameters.index = index.toString();
730
+ queryParameters["index"] = index.toString();
749
731
  }
750
732
  if (startDate !== void 0) {
751
- queryParameters.startDate = startDate.toString();
733
+ queryParameters["startDate"] = startDate.toString();
752
734
  }
753
735
  if (endDate !== void 0) {
754
- queryParameters.endDate = endDate.toString();
736
+ queryParameters["endDate"] = endDate.toString();
755
737
  }
756
738
  if (limit !== void 0) {
757
- queryParameters.limit = limit.toString();
739
+ queryParameters["limit"] = limit.toString();
758
740
  }
759
741
  if (offset !== void 0) {
760
- queryParameters.offset = offset.toString();
742
+ queryParameters["offset"] = offset.toString();
761
743
  }
762
744
  if (tags !== void 0) {
763
- queryParameters.tags = tags.toString();
745
+ queryParameters["tags"] = tags.toString();
764
746
  }
765
747
  const request = {
766
748
  method: "GET",
@@ -774,15 +756,14 @@ function createAnalyticsClient({
774
756
  * Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
775
757
  *
776
758
  * Required API Key ACLs:
777
- * - analytics.
778
- *
759
+ * - analytics
779
760
  * @param getTopFilterAttributes - The getTopFilterAttributes object.
780
761
  * @param getTopFilterAttributes.index - Index name.
781
762
  * @param getTopFilterAttributes.search - Search query.
782
763
  * @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
783
764
  * @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
784
- * @param getTopFilterAttributes.limit - Number of items to return.
785
- * @param getTopFilterAttributes.offset - Position of the first item to return.
765
+ * @param getTopFilterAttributes.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
766
+ * @param getTopFilterAttributes.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
786
767
  * @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/).
787
768
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
788
769
  */
@@ -794,25 +775,25 @@ function createAnalyticsClient({
794
775
  const headers = {};
795
776
  const queryParameters = {};
796
777
  if (index !== void 0) {
797
- queryParameters.index = index.toString();
778
+ queryParameters["index"] = index.toString();
798
779
  }
799
780
  if (search !== void 0) {
800
- queryParameters.search = search.toString();
781
+ queryParameters["search"] = search.toString();
801
782
  }
802
783
  if (startDate !== void 0) {
803
- queryParameters.startDate = startDate.toString();
784
+ queryParameters["startDate"] = startDate.toString();
804
785
  }
805
786
  if (endDate !== void 0) {
806
- queryParameters.endDate = endDate.toString();
787
+ queryParameters["endDate"] = endDate.toString();
807
788
  }
808
789
  if (limit !== void 0) {
809
- queryParameters.limit = limit.toString();
790
+ queryParameters["limit"] = limit.toString();
810
791
  }
811
792
  if (offset !== void 0) {
812
- queryParameters.offset = offset.toString();
793
+ queryParameters["offset"] = offset.toString();
813
794
  }
814
795
  if (tags !== void 0) {
815
- queryParameters.tags = tags.toString();
796
+ queryParameters["tags"] = tags.toString();
816
797
  }
817
798
  const request = {
818
799
  method: "GET",
@@ -826,16 +807,15 @@ function createAnalyticsClient({
826
807
  * Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
827
808
  *
828
809
  * Required API Key ACLs:
829
- * - analytics.
830
- *
810
+ * - analytics
831
811
  * @param getTopFilterForAttribute - The getTopFilterForAttribute object.
832
812
  * @param getTopFilterForAttribute.attribute - Attribute name.
833
813
  * @param getTopFilterForAttribute.index - Index name.
834
814
  * @param getTopFilterForAttribute.search - Search query.
835
815
  * @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
836
816
  * @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
837
- * @param getTopFilterForAttribute.limit - Number of items to return.
838
- * @param getTopFilterForAttribute.offset - Position of the first item to return.
817
+ * @param getTopFilterForAttribute.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
818
+ * @param getTopFilterForAttribute.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
839
819
  * @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/).
840
820
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
841
821
  */
@@ -850,25 +830,25 @@ function createAnalyticsClient({
850
830
  const headers = {};
851
831
  const queryParameters = {};
852
832
  if (index !== void 0) {
853
- queryParameters.index = index.toString();
833
+ queryParameters["index"] = index.toString();
854
834
  }
855
835
  if (search !== void 0) {
856
- queryParameters.search = search.toString();
836
+ queryParameters["search"] = search.toString();
857
837
  }
858
838
  if (startDate !== void 0) {
859
- queryParameters.startDate = startDate.toString();
839
+ queryParameters["startDate"] = startDate.toString();
860
840
  }
861
841
  if (endDate !== void 0) {
862
- queryParameters.endDate = endDate.toString();
842
+ queryParameters["endDate"] = endDate.toString();
863
843
  }
864
844
  if (limit !== void 0) {
865
- queryParameters.limit = limit.toString();
845
+ queryParameters["limit"] = limit.toString();
866
846
  }
867
847
  if (offset !== void 0) {
868
- queryParameters.offset = offset.toString();
848
+ queryParameters["offset"] = offset.toString();
869
849
  }
870
850
  if (tags !== void 0) {
871
- queryParameters.tags = tags.toString();
851
+ queryParameters["tags"] = tags.toString();
872
852
  }
873
853
  const request = {
874
854
  method: "GET",
@@ -882,15 +862,14 @@ function createAnalyticsClient({
882
862
  * 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.
883
863
  *
884
864
  * Required API Key ACLs:
885
- * - analytics.
886
- *
865
+ * - analytics
887
866
  * @param getTopFiltersNoResults - The getTopFiltersNoResults object.
888
867
  * @param getTopFiltersNoResults.index - Index name.
889
868
  * @param getTopFiltersNoResults.search - Search query.
890
869
  * @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
891
870
  * @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
892
- * @param getTopFiltersNoResults.limit - Number of items to return.
893
- * @param getTopFiltersNoResults.offset - Position of the first item to return.
871
+ * @param getTopFiltersNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
872
+ * @param getTopFiltersNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
894
873
  * @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/).
895
874
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
896
875
  */
@@ -902,25 +881,25 @@ function createAnalyticsClient({
902
881
  const headers = {};
903
882
  const queryParameters = {};
904
883
  if (index !== void 0) {
905
- queryParameters.index = index.toString();
884
+ queryParameters["index"] = index.toString();
906
885
  }
907
886
  if (search !== void 0) {
908
- queryParameters.search = search.toString();
887
+ queryParameters["search"] = search.toString();
909
888
  }
910
889
  if (startDate !== void 0) {
911
- queryParameters.startDate = startDate.toString();
890
+ queryParameters["startDate"] = startDate.toString();
912
891
  }
913
892
  if (endDate !== void 0) {
914
- queryParameters.endDate = endDate.toString();
893
+ queryParameters["endDate"] = endDate.toString();
915
894
  }
916
895
  if (limit !== void 0) {
917
- queryParameters.limit = limit.toString();
896
+ queryParameters["limit"] = limit.toString();
918
897
  }
919
898
  if (offset !== void 0) {
920
- queryParameters.offset = offset.toString();
899
+ queryParameters["offset"] = offset.toString();
921
900
  }
922
901
  if (tags !== void 0) {
923
- queryParameters.tags = tags.toString();
902
+ queryParameters["tags"] = tags.toString();
924
903
  }
925
904
  const request = {
926
905
  method: "GET",
@@ -934,8 +913,7 @@ function createAnalyticsClient({
934
913
  * Retrieves the object IDs of the most frequent search results.
935
914
  *
936
915
  * Required API Key ACLs:
937
- * - analytics.
938
- *
916
+ * - analytics
939
917
  * @param getTopHits - The getTopHits object.
940
918
  * @param getTopHits.index - Index name.
941
919
  * @param getTopHits.search - Search query.
@@ -943,8 +921,8 @@ function createAnalyticsClient({
943
921
  * @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.
944
922
  * @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
945
923
  * @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
946
- * @param getTopHits.limit - Number of items to return.
947
- * @param getTopHits.offset - Position of the first item to return.
924
+ * @param getTopHits.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
925
+ * @param getTopHits.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
948
926
  * @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/).
949
927
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
950
928
  */
@@ -956,31 +934,31 @@ function createAnalyticsClient({
956
934
  const headers = {};
957
935
  const queryParameters = {};
958
936
  if (index !== void 0) {
959
- queryParameters.index = index.toString();
937
+ queryParameters["index"] = index.toString();
960
938
  }
961
939
  if (search !== void 0) {
962
- queryParameters.search = search.toString();
940
+ queryParameters["search"] = search.toString();
963
941
  }
964
942
  if (clickAnalytics !== void 0) {
965
- queryParameters.clickAnalytics = clickAnalytics.toString();
943
+ queryParameters["clickAnalytics"] = clickAnalytics.toString();
966
944
  }
967
945
  if (revenueAnalytics !== void 0) {
968
- queryParameters.revenueAnalytics = revenueAnalytics.toString();
946
+ queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
969
947
  }
970
948
  if (startDate !== void 0) {
971
- queryParameters.startDate = startDate.toString();
949
+ queryParameters["startDate"] = startDate.toString();
972
950
  }
973
951
  if (endDate !== void 0) {
974
- queryParameters.endDate = endDate.toString();
952
+ queryParameters["endDate"] = endDate.toString();
975
953
  }
976
954
  if (limit !== void 0) {
977
- queryParameters.limit = limit.toString();
955
+ queryParameters["limit"] = limit.toString();
978
956
  }
979
957
  if (offset !== void 0) {
980
- queryParameters.offset = offset.toString();
958
+ queryParameters["offset"] = offset.toString();
981
959
  }
982
960
  if (tags !== void 0) {
983
- queryParameters.tags = tags.toString();
961
+ queryParameters["tags"] = tags.toString();
984
962
  }
985
963
  const request = {
986
964
  method: "GET",
@@ -994,8 +972,7 @@ function createAnalyticsClient({
994
972
  * Returns the most popular search terms.
995
973
  *
996
974
  * Required API Key ACLs:
997
- * - analytics.
998
- *
975
+ * - analytics
999
976
  * @param getTopSearches - The getTopSearches object.
1000
977
  * @param getTopSearches.index - Index name.
1001
978
  * @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
@@ -1004,8 +981,8 @@ function createAnalyticsClient({
1004
981
  * @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
1005
982
  * @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
1006
983
  * @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
1007
- * @param getTopSearches.limit - Number of items to return.
1008
- * @param getTopSearches.offset - Position of the first item to return.
984
+ * @param getTopSearches.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
985
+ * @param getTopSearches.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
1009
986
  * @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/).
1010
987
  * @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
1011
988
  */
@@ -1028,34 +1005,34 @@ function createAnalyticsClient({
1028
1005
  const headers = {};
1029
1006
  const queryParameters = {};
1030
1007
  if (index !== void 0) {
1031
- queryParameters.index = index.toString();
1008
+ queryParameters["index"] = index.toString();
1032
1009
  }
1033
1010
  if (clickAnalytics !== void 0) {
1034
- queryParameters.clickAnalytics = clickAnalytics.toString();
1011
+ queryParameters["clickAnalytics"] = clickAnalytics.toString();
1035
1012
  }
1036
1013
  if (revenueAnalytics !== void 0) {
1037
- queryParameters.revenueAnalytics = revenueAnalytics.toString();
1014
+ queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
1038
1015
  }
1039
1016
  if (startDate !== void 0) {
1040
- queryParameters.startDate = startDate.toString();
1017
+ queryParameters["startDate"] = startDate.toString();
1041
1018
  }
1042
1019
  if (endDate !== void 0) {
1043
- queryParameters.endDate = endDate.toString();
1020
+ queryParameters["endDate"] = endDate.toString();
1044
1021
  }
1045
1022
  if (orderBy !== void 0) {
1046
- queryParameters.orderBy = orderBy.toString();
1023
+ queryParameters["orderBy"] = orderBy.toString();
1047
1024
  }
1048
1025
  if (direction !== void 0) {
1049
- queryParameters.direction = direction.toString();
1026
+ queryParameters["direction"] = direction.toString();
1050
1027
  }
1051
1028
  if (limit !== void 0) {
1052
- queryParameters.limit = limit.toString();
1029
+ queryParameters["limit"] = limit.toString();
1053
1030
  }
1054
1031
  if (offset !== void 0) {
1055
- queryParameters.offset = offset.toString();
1032
+ queryParameters["offset"] = offset.toString();
1056
1033
  }
1057
1034
  if (tags !== void 0) {
1058
- queryParameters.tags = tags.toString();
1035
+ queryParameters["tags"] = tags.toString();
1059
1036
  }
1060
1037
  const request = {
1061
1038
  method: "GET",
@@ -1069,8 +1046,7 @@ function createAnalyticsClient({
1069
1046
  * 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.
1070
1047
  *
1071
1048
  * Required API Key ACLs:
1072
- * - analytics.
1073
- *
1049
+ * - analytics
1074
1050
  * @param getUsersCount - The getUsersCount object.
1075
1051
  * @param getUsersCount.index - Index name.
1076
1052
  * @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
@@ -1086,16 +1062,16 @@ function createAnalyticsClient({
1086
1062
  const headers = {};
1087
1063
  const queryParameters = {};
1088
1064
  if (index !== void 0) {
1089
- queryParameters.index = index.toString();
1065
+ queryParameters["index"] = index.toString();
1090
1066
  }
1091
1067
  if (startDate !== void 0) {
1092
- queryParameters.startDate = startDate.toString();
1068
+ queryParameters["startDate"] = startDate.toString();
1093
1069
  }
1094
1070
  if (endDate !== void 0) {
1095
- queryParameters.endDate = endDate.toString();
1071
+ queryParameters["endDate"] = endDate.toString();
1096
1072
  }
1097
1073
  if (tags !== void 0) {
1098
- queryParameters.tags = tags.toString();
1074
+ queryParameters["tags"] = tags.toString();
1099
1075
  }
1100
1076
  const request = {
1101
1077
  method: "GET",