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