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