@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.
- 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 +6 -6
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// src/analyticsClient.ts
|
|
2
2
|
import { createAuth, createTransporter, getAlgoliaAgent } from "@algolia/client-common";
|
|
3
|
-
var apiClientVersion = "5.
|
|
3
|
+
var apiClientVersion = "5.8.0";
|
|
4
4
|
var REGIONS = ["de", "us"];
|
|
5
5
|
function getDefaultHosts(region) {
|
|
6
6
|
const url = !region ? "analytics.algolia.com" : "analytics.{region}.algolia.com".replace("{region}", region);
|
|
@@ -75,7 +75,6 @@ function createAnalyticsClient({
|
|
|
75
75
|
},
|
|
76
76
|
/**
|
|
77
77
|
* This method allow you to send requests to the Algolia REST API.
|
|
78
|
-
*
|
|
79
78
|
* @param customDelete - The customDelete object.
|
|
80
79
|
* @param customDelete.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
81
80
|
* @param customDelete.parameters - Query parameters to apply to the current query.
|
|
@@ -98,7 +97,6 @@ function createAnalyticsClient({
|
|
|
98
97
|
},
|
|
99
98
|
/**
|
|
100
99
|
* This method allow you to send requests to the Algolia REST API.
|
|
101
|
-
*
|
|
102
100
|
* @param customGet - The customGet object.
|
|
103
101
|
* @param customGet.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
104
102
|
* @param customGet.parameters - Query parameters to apply to the current query.
|
|
@@ -121,7 +119,6 @@ function createAnalyticsClient({
|
|
|
121
119
|
},
|
|
122
120
|
/**
|
|
123
121
|
* This method allow you to send requests to the Algolia REST API.
|
|
124
|
-
*
|
|
125
122
|
* @param customPost - The customPost object.
|
|
126
123
|
* @param customPost.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
127
124
|
* @param customPost.parameters - Query parameters to apply to the current query.
|
|
@@ -146,7 +143,6 @@ function createAnalyticsClient({
|
|
|
146
143
|
},
|
|
147
144
|
/**
|
|
148
145
|
* This method allow you to send requests to the Algolia REST API.
|
|
149
|
-
*
|
|
150
146
|
* @param customPut - The customPut object.
|
|
151
147
|
* @param customPut.path - Path of the endpoint, anything after \"/1\" must be specified.
|
|
152
148
|
* @param customPut.parameters - Query parameters to apply to the current query.
|
|
@@ -173,8 +169,7 @@ function createAnalyticsClient({
|
|
|
173
169
|
* 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.
|
|
174
170
|
*
|
|
175
171
|
* Required API Key ACLs:
|
|
176
|
-
*
|
|
177
|
-
*
|
|
172
|
+
* - analytics
|
|
178
173
|
* @param getAddToCartRate - The getAddToCartRate object.
|
|
179
174
|
* @param getAddToCartRate.index - Index name.
|
|
180
175
|
* @param getAddToCartRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -190,16 +185,16 @@ function createAnalyticsClient({
|
|
|
190
185
|
const headers = {};
|
|
191
186
|
const queryParameters = {};
|
|
192
187
|
if (index !== void 0) {
|
|
193
|
-
queryParameters
|
|
188
|
+
queryParameters["index"] = index.toString();
|
|
194
189
|
}
|
|
195
190
|
if (startDate !== void 0) {
|
|
196
|
-
queryParameters
|
|
191
|
+
queryParameters["startDate"] = startDate.toString();
|
|
197
192
|
}
|
|
198
193
|
if (endDate !== void 0) {
|
|
199
|
-
queryParameters
|
|
194
|
+
queryParameters["endDate"] = endDate.toString();
|
|
200
195
|
}
|
|
201
196
|
if (tags !== void 0) {
|
|
202
|
-
queryParameters
|
|
197
|
+
queryParameters["tags"] = tags.toString();
|
|
203
198
|
}
|
|
204
199
|
const request = {
|
|
205
200
|
method: "GET",
|
|
@@ -213,8 +208,7 @@ function createAnalyticsClient({
|
|
|
213
208
|
* 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.
|
|
214
209
|
*
|
|
215
210
|
* Required API Key ACLs:
|
|
216
|
-
*
|
|
217
|
-
*
|
|
211
|
+
* - analytics
|
|
218
212
|
* @param getAverageClickPosition - The getAverageClickPosition object.
|
|
219
213
|
* @param getAverageClickPosition.index - Index name.
|
|
220
214
|
* @param getAverageClickPosition.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -230,16 +224,16 @@ function createAnalyticsClient({
|
|
|
230
224
|
const headers = {};
|
|
231
225
|
const queryParameters = {};
|
|
232
226
|
if (index !== void 0) {
|
|
233
|
-
queryParameters
|
|
227
|
+
queryParameters["index"] = index.toString();
|
|
234
228
|
}
|
|
235
229
|
if (startDate !== void 0) {
|
|
236
|
-
queryParameters
|
|
230
|
+
queryParameters["startDate"] = startDate.toString();
|
|
237
231
|
}
|
|
238
232
|
if (endDate !== void 0) {
|
|
239
|
-
queryParameters
|
|
233
|
+
queryParameters["endDate"] = endDate.toString();
|
|
240
234
|
}
|
|
241
235
|
if (tags !== void 0) {
|
|
242
|
-
queryParameters
|
|
236
|
+
queryParameters["tags"] = tags.toString();
|
|
243
237
|
}
|
|
244
238
|
const request = {
|
|
245
239
|
method: "GET",
|
|
@@ -253,8 +247,7 @@ function createAnalyticsClient({
|
|
|
253
247
|
* 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.
|
|
254
248
|
*
|
|
255
249
|
* Required API Key ACLs:
|
|
256
|
-
*
|
|
257
|
-
*
|
|
250
|
+
* - analytics
|
|
258
251
|
* @param getClickPositions - The getClickPositions object.
|
|
259
252
|
* @param getClickPositions.index - Index name.
|
|
260
253
|
* @param getClickPositions.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -270,16 +263,16 @@ function createAnalyticsClient({
|
|
|
270
263
|
const headers = {};
|
|
271
264
|
const queryParameters = {};
|
|
272
265
|
if (index !== void 0) {
|
|
273
|
-
queryParameters
|
|
266
|
+
queryParameters["index"] = index.toString();
|
|
274
267
|
}
|
|
275
268
|
if (startDate !== void 0) {
|
|
276
|
-
queryParameters
|
|
269
|
+
queryParameters["startDate"] = startDate.toString();
|
|
277
270
|
}
|
|
278
271
|
if (endDate !== void 0) {
|
|
279
|
-
queryParameters
|
|
272
|
+
queryParameters["endDate"] = endDate.toString();
|
|
280
273
|
}
|
|
281
274
|
if (tags !== void 0) {
|
|
282
|
-
queryParameters
|
|
275
|
+
queryParameters["tags"] = tags.toString();
|
|
283
276
|
}
|
|
284
277
|
const request = {
|
|
285
278
|
method: "GET",
|
|
@@ -293,8 +286,7 @@ function createAnalyticsClient({
|
|
|
293
286
|
* 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.
|
|
294
287
|
*
|
|
295
288
|
* Required API Key ACLs:
|
|
296
|
-
*
|
|
297
|
-
*
|
|
289
|
+
* - analytics
|
|
298
290
|
* @param getClickThroughRate - The getClickThroughRate object.
|
|
299
291
|
* @param getClickThroughRate.index - Index name.
|
|
300
292
|
* @param getClickThroughRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -310,16 +302,16 @@ function createAnalyticsClient({
|
|
|
310
302
|
const headers = {};
|
|
311
303
|
const queryParameters = {};
|
|
312
304
|
if (index !== void 0) {
|
|
313
|
-
queryParameters
|
|
305
|
+
queryParameters["index"] = index.toString();
|
|
314
306
|
}
|
|
315
307
|
if (startDate !== void 0) {
|
|
316
|
-
queryParameters
|
|
308
|
+
queryParameters["startDate"] = startDate.toString();
|
|
317
309
|
}
|
|
318
310
|
if (endDate !== void 0) {
|
|
319
|
-
queryParameters
|
|
311
|
+
queryParameters["endDate"] = endDate.toString();
|
|
320
312
|
}
|
|
321
313
|
if (tags !== void 0) {
|
|
322
|
-
queryParameters
|
|
314
|
+
queryParameters["tags"] = tags.toString();
|
|
323
315
|
}
|
|
324
316
|
const request = {
|
|
325
317
|
method: "GET",
|
|
@@ -333,8 +325,7 @@ function createAnalyticsClient({
|
|
|
333
325
|
* 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.
|
|
334
326
|
*
|
|
335
327
|
* Required API Key ACLs:
|
|
336
|
-
*
|
|
337
|
-
*
|
|
328
|
+
* - analytics
|
|
338
329
|
* @param getConversionRate - The getConversionRate object.
|
|
339
330
|
* @param getConversionRate.index - Index name.
|
|
340
331
|
* @param getConversionRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -350,16 +341,16 @@ function createAnalyticsClient({
|
|
|
350
341
|
const headers = {};
|
|
351
342
|
const queryParameters = {};
|
|
352
343
|
if (index !== void 0) {
|
|
353
|
-
queryParameters
|
|
344
|
+
queryParameters["index"] = index.toString();
|
|
354
345
|
}
|
|
355
346
|
if (startDate !== void 0) {
|
|
356
|
-
queryParameters
|
|
347
|
+
queryParameters["startDate"] = startDate.toString();
|
|
357
348
|
}
|
|
358
349
|
if (endDate !== void 0) {
|
|
359
|
-
queryParameters
|
|
350
|
+
queryParameters["endDate"] = endDate.toString();
|
|
360
351
|
}
|
|
361
352
|
if (tags !== void 0) {
|
|
362
|
-
queryParameters
|
|
353
|
+
queryParameters["tags"] = tags.toString();
|
|
363
354
|
}
|
|
364
355
|
const request = {
|
|
365
356
|
method: "GET",
|
|
@@ -373,8 +364,7 @@ function createAnalyticsClient({
|
|
|
373
364
|
* 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.
|
|
374
365
|
*
|
|
375
366
|
* Required API Key ACLs:
|
|
376
|
-
*
|
|
377
|
-
*
|
|
367
|
+
* - analytics
|
|
378
368
|
* @param getNoClickRate - The getNoClickRate object.
|
|
379
369
|
* @param getNoClickRate.index - Index name.
|
|
380
370
|
* @param getNoClickRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -390,16 +380,16 @@ function createAnalyticsClient({
|
|
|
390
380
|
const headers = {};
|
|
391
381
|
const queryParameters = {};
|
|
392
382
|
if (index !== void 0) {
|
|
393
|
-
queryParameters
|
|
383
|
+
queryParameters["index"] = index.toString();
|
|
394
384
|
}
|
|
395
385
|
if (startDate !== void 0) {
|
|
396
|
-
queryParameters
|
|
386
|
+
queryParameters["startDate"] = startDate.toString();
|
|
397
387
|
}
|
|
398
388
|
if (endDate !== void 0) {
|
|
399
|
-
queryParameters
|
|
389
|
+
queryParameters["endDate"] = endDate.toString();
|
|
400
390
|
}
|
|
401
391
|
if (tags !== void 0) {
|
|
402
|
-
queryParameters
|
|
392
|
+
queryParameters["tags"] = tags.toString();
|
|
403
393
|
}
|
|
404
394
|
const request = {
|
|
405
395
|
method: "GET",
|
|
@@ -413,8 +403,7 @@ function createAnalyticsClient({
|
|
|
413
403
|
* 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.
|
|
414
404
|
*
|
|
415
405
|
* Required API Key ACLs:
|
|
416
|
-
*
|
|
417
|
-
*
|
|
406
|
+
* - analytics
|
|
418
407
|
* @param getNoResultsRate - The getNoResultsRate object.
|
|
419
408
|
* @param getNoResultsRate.index - Index name.
|
|
420
409
|
* @param getNoResultsRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -430,16 +419,16 @@ function createAnalyticsClient({
|
|
|
430
419
|
const headers = {};
|
|
431
420
|
const queryParameters = {};
|
|
432
421
|
if (index !== void 0) {
|
|
433
|
-
queryParameters
|
|
422
|
+
queryParameters["index"] = index.toString();
|
|
434
423
|
}
|
|
435
424
|
if (startDate !== void 0) {
|
|
436
|
-
queryParameters
|
|
425
|
+
queryParameters["startDate"] = startDate.toString();
|
|
437
426
|
}
|
|
438
427
|
if (endDate !== void 0) {
|
|
439
|
-
queryParameters
|
|
428
|
+
queryParameters["endDate"] = endDate.toString();
|
|
440
429
|
}
|
|
441
430
|
if (tags !== void 0) {
|
|
442
|
-
queryParameters
|
|
431
|
+
queryParameters["tags"] = tags.toString();
|
|
443
432
|
}
|
|
444
433
|
const request = {
|
|
445
434
|
method: "GET",
|
|
@@ -453,8 +442,7 @@ function createAnalyticsClient({
|
|
|
453
442
|
* 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.
|
|
454
443
|
*
|
|
455
444
|
* Required API Key ACLs:
|
|
456
|
-
*
|
|
457
|
-
*
|
|
445
|
+
* - analytics
|
|
458
446
|
* @param getPurchaseRate - The getPurchaseRate object.
|
|
459
447
|
* @param getPurchaseRate.index - Index name.
|
|
460
448
|
* @param getPurchaseRate.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -470,16 +458,16 @@ function createAnalyticsClient({
|
|
|
470
458
|
const headers = {};
|
|
471
459
|
const queryParameters = {};
|
|
472
460
|
if (index !== void 0) {
|
|
473
|
-
queryParameters
|
|
461
|
+
queryParameters["index"] = index.toString();
|
|
474
462
|
}
|
|
475
463
|
if (startDate !== void 0) {
|
|
476
|
-
queryParameters
|
|
464
|
+
queryParameters["startDate"] = startDate.toString();
|
|
477
465
|
}
|
|
478
466
|
if (endDate !== void 0) {
|
|
479
|
-
queryParameters
|
|
467
|
+
queryParameters["endDate"] = endDate.toString();
|
|
480
468
|
}
|
|
481
469
|
if (tags !== void 0) {
|
|
482
|
-
queryParameters
|
|
470
|
+
queryParameters["tags"] = tags.toString();
|
|
483
471
|
}
|
|
484
472
|
const request = {
|
|
485
473
|
method: "GET",
|
|
@@ -493,8 +481,7 @@ function createAnalyticsClient({
|
|
|
493
481
|
* 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.
|
|
494
482
|
*
|
|
495
483
|
* Required API Key ACLs:
|
|
496
|
-
*
|
|
497
|
-
*
|
|
484
|
+
* - analytics
|
|
498
485
|
* @param getRevenue - The getRevenue object.
|
|
499
486
|
* @param getRevenue.index - Index name.
|
|
500
487
|
* @param getRevenue.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -510,16 +497,16 @@ function createAnalyticsClient({
|
|
|
510
497
|
const headers = {};
|
|
511
498
|
const queryParameters = {};
|
|
512
499
|
if (index !== void 0) {
|
|
513
|
-
queryParameters
|
|
500
|
+
queryParameters["index"] = index.toString();
|
|
514
501
|
}
|
|
515
502
|
if (startDate !== void 0) {
|
|
516
|
-
queryParameters
|
|
503
|
+
queryParameters["startDate"] = startDate.toString();
|
|
517
504
|
}
|
|
518
505
|
if (endDate !== void 0) {
|
|
519
|
-
queryParameters
|
|
506
|
+
queryParameters["endDate"] = endDate.toString();
|
|
520
507
|
}
|
|
521
508
|
if (tags !== void 0) {
|
|
522
|
-
queryParameters
|
|
509
|
+
queryParameters["tags"] = tags.toString();
|
|
523
510
|
}
|
|
524
511
|
const request = {
|
|
525
512
|
method: "GET",
|
|
@@ -533,8 +520,7 @@ function createAnalyticsClient({
|
|
|
533
520
|
* 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.
|
|
534
521
|
*
|
|
535
522
|
* Required API Key ACLs:
|
|
536
|
-
*
|
|
537
|
-
*
|
|
523
|
+
* - analytics
|
|
538
524
|
* @param getSearchesCount - The getSearchesCount object.
|
|
539
525
|
* @param getSearchesCount.index - Index name.
|
|
540
526
|
* @param getSearchesCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -550,16 +536,16 @@ function createAnalyticsClient({
|
|
|
550
536
|
const headers = {};
|
|
551
537
|
const queryParameters = {};
|
|
552
538
|
if (index !== void 0) {
|
|
553
|
-
queryParameters
|
|
539
|
+
queryParameters["index"] = index.toString();
|
|
554
540
|
}
|
|
555
541
|
if (startDate !== void 0) {
|
|
556
|
-
queryParameters
|
|
542
|
+
queryParameters["startDate"] = startDate.toString();
|
|
557
543
|
}
|
|
558
544
|
if (endDate !== void 0) {
|
|
559
|
-
queryParameters
|
|
545
|
+
queryParameters["endDate"] = endDate.toString();
|
|
560
546
|
}
|
|
561
547
|
if (tags !== void 0) {
|
|
562
|
-
queryParameters
|
|
548
|
+
queryParameters["tags"] = tags.toString();
|
|
563
549
|
}
|
|
564
550
|
const request = {
|
|
565
551
|
method: "GET",
|
|
@@ -573,14 +559,13 @@ function createAnalyticsClient({
|
|
|
573
559
|
* Retrieves the most popular searches that didn\'t lead to any clicks, from the 1,000 most frequent searches.
|
|
574
560
|
*
|
|
575
561
|
* Required API Key ACLs:
|
|
576
|
-
*
|
|
577
|
-
*
|
|
562
|
+
* - analytics
|
|
578
563
|
* @param getSearchesNoClicks - The getSearchesNoClicks object.
|
|
579
564
|
* @param getSearchesNoClicks.index - Index name.
|
|
580
565
|
* @param getSearchesNoClicks.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
581
566
|
* @param getSearchesNoClicks.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
582
|
-
* @param getSearchesNoClicks.limit - Number of items to return.
|
|
583
|
-
* @param getSearchesNoClicks.offset - Position of the first item to return.
|
|
567
|
+
* @param getSearchesNoClicks.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
568
|
+
* @param getSearchesNoClicks.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
584
569
|
* @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/).
|
|
585
570
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
586
571
|
*/
|
|
@@ -592,22 +577,22 @@ function createAnalyticsClient({
|
|
|
592
577
|
const headers = {};
|
|
593
578
|
const queryParameters = {};
|
|
594
579
|
if (index !== void 0) {
|
|
595
|
-
queryParameters
|
|
580
|
+
queryParameters["index"] = index.toString();
|
|
596
581
|
}
|
|
597
582
|
if (startDate !== void 0) {
|
|
598
|
-
queryParameters
|
|
583
|
+
queryParameters["startDate"] = startDate.toString();
|
|
599
584
|
}
|
|
600
585
|
if (endDate !== void 0) {
|
|
601
|
-
queryParameters
|
|
586
|
+
queryParameters["endDate"] = endDate.toString();
|
|
602
587
|
}
|
|
603
588
|
if (limit !== void 0) {
|
|
604
|
-
queryParameters
|
|
589
|
+
queryParameters["limit"] = limit.toString();
|
|
605
590
|
}
|
|
606
591
|
if (offset !== void 0) {
|
|
607
|
-
queryParameters
|
|
592
|
+
queryParameters["offset"] = offset.toString();
|
|
608
593
|
}
|
|
609
594
|
if (tags !== void 0) {
|
|
610
|
-
queryParameters
|
|
595
|
+
queryParameters["tags"] = tags.toString();
|
|
611
596
|
}
|
|
612
597
|
const request = {
|
|
613
598
|
method: "GET",
|
|
@@ -621,14 +606,13 @@ function createAnalyticsClient({
|
|
|
621
606
|
* Retrieves the most popular searches that didn\'t return any results.
|
|
622
607
|
*
|
|
623
608
|
* Required API Key ACLs:
|
|
624
|
-
*
|
|
625
|
-
*
|
|
609
|
+
* - analytics
|
|
626
610
|
* @param getSearchesNoResults - The getSearchesNoResults object.
|
|
627
611
|
* @param getSearchesNoResults.index - Index name.
|
|
628
612
|
* @param getSearchesNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
629
613
|
* @param getSearchesNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
630
|
-
* @param getSearchesNoResults.limit - Number of items to return.
|
|
631
|
-
* @param getSearchesNoResults.offset - Position of the first item to return.
|
|
614
|
+
* @param getSearchesNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
615
|
+
* @param getSearchesNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
632
616
|
* @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/).
|
|
633
617
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
634
618
|
*/
|
|
@@ -640,22 +624,22 @@ function createAnalyticsClient({
|
|
|
640
624
|
const headers = {};
|
|
641
625
|
const queryParameters = {};
|
|
642
626
|
if (index !== void 0) {
|
|
643
|
-
queryParameters
|
|
627
|
+
queryParameters["index"] = index.toString();
|
|
644
628
|
}
|
|
645
629
|
if (startDate !== void 0) {
|
|
646
|
-
queryParameters
|
|
630
|
+
queryParameters["startDate"] = startDate.toString();
|
|
647
631
|
}
|
|
648
632
|
if (endDate !== void 0) {
|
|
649
|
-
queryParameters
|
|
633
|
+
queryParameters["endDate"] = endDate.toString();
|
|
650
634
|
}
|
|
651
635
|
if (limit !== void 0) {
|
|
652
|
-
queryParameters
|
|
636
|
+
queryParameters["limit"] = limit.toString();
|
|
653
637
|
}
|
|
654
638
|
if (offset !== void 0) {
|
|
655
|
-
queryParameters
|
|
639
|
+
queryParameters["offset"] = offset.toString();
|
|
656
640
|
}
|
|
657
641
|
if (tags !== void 0) {
|
|
658
|
-
queryParameters
|
|
642
|
+
queryParameters["tags"] = tags.toString();
|
|
659
643
|
}
|
|
660
644
|
const request = {
|
|
661
645
|
method: "GET",
|
|
@@ -669,8 +653,7 @@ function createAnalyticsClient({
|
|
|
669
653
|
* Retrieves the time when the Analytics data for the specified index was last updated. The Analytics data is updated every 5 minutes.
|
|
670
654
|
*
|
|
671
655
|
* Required API Key ACLs:
|
|
672
|
-
*
|
|
673
|
-
*
|
|
656
|
+
* - analytics
|
|
674
657
|
* @param getStatus - The getStatus object.
|
|
675
658
|
* @param getStatus.index - Index name.
|
|
676
659
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
@@ -683,7 +666,7 @@ function createAnalyticsClient({
|
|
|
683
666
|
const headers = {};
|
|
684
667
|
const queryParameters = {};
|
|
685
668
|
if (index !== void 0) {
|
|
686
|
-
queryParameters
|
|
669
|
+
queryParameters["index"] = index.toString();
|
|
687
670
|
}
|
|
688
671
|
const request = {
|
|
689
672
|
method: "GET",
|
|
@@ -697,14 +680,13 @@ function createAnalyticsClient({
|
|
|
697
680
|
* Retrieves the countries with the most searches to your index.
|
|
698
681
|
*
|
|
699
682
|
* Required API Key ACLs:
|
|
700
|
-
*
|
|
701
|
-
*
|
|
683
|
+
* - analytics
|
|
702
684
|
* @param getTopCountries - The getTopCountries object.
|
|
703
685
|
* @param getTopCountries.index - Index name.
|
|
704
686
|
* @param getTopCountries.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
705
687
|
* @param getTopCountries.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
706
|
-
* @param getTopCountries.limit - Number of items to return.
|
|
707
|
-
* @param getTopCountries.offset - Position of the first item to return.
|
|
688
|
+
* @param getTopCountries.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
689
|
+
* @param getTopCountries.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
708
690
|
* @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/).
|
|
709
691
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
710
692
|
*/
|
|
@@ -716,22 +698,22 @@ function createAnalyticsClient({
|
|
|
716
698
|
const headers = {};
|
|
717
699
|
const queryParameters = {};
|
|
718
700
|
if (index !== void 0) {
|
|
719
|
-
queryParameters
|
|
701
|
+
queryParameters["index"] = index.toString();
|
|
720
702
|
}
|
|
721
703
|
if (startDate !== void 0) {
|
|
722
|
-
queryParameters
|
|
704
|
+
queryParameters["startDate"] = startDate.toString();
|
|
723
705
|
}
|
|
724
706
|
if (endDate !== void 0) {
|
|
725
|
-
queryParameters
|
|
707
|
+
queryParameters["endDate"] = endDate.toString();
|
|
726
708
|
}
|
|
727
709
|
if (limit !== void 0) {
|
|
728
|
-
queryParameters
|
|
710
|
+
queryParameters["limit"] = limit.toString();
|
|
729
711
|
}
|
|
730
712
|
if (offset !== void 0) {
|
|
731
|
-
queryParameters
|
|
713
|
+
queryParameters["offset"] = offset.toString();
|
|
732
714
|
}
|
|
733
715
|
if (tags !== void 0) {
|
|
734
|
-
queryParameters
|
|
716
|
+
queryParameters["tags"] = tags.toString();
|
|
735
717
|
}
|
|
736
718
|
const request = {
|
|
737
719
|
method: "GET",
|
|
@@ -745,15 +727,14 @@ function createAnalyticsClient({
|
|
|
745
727
|
* Retrieves the most frequently used filter attributes. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
746
728
|
*
|
|
747
729
|
* Required API Key ACLs:
|
|
748
|
-
*
|
|
749
|
-
*
|
|
730
|
+
* - analytics
|
|
750
731
|
* @param getTopFilterAttributes - The getTopFilterAttributes object.
|
|
751
732
|
* @param getTopFilterAttributes.index - Index name.
|
|
752
733
|
* @param getTopFilterAttributes.search - Search query.
|
|
753
734
|
* @param getTopFilterAttributes.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
754
735
|
* @param getTopFilterAttributes.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
755
|
-
* @param getTopFilterAttributes.limit - Number of items to return.
|
|
756
|
-
* @param getTopFilterAttributes.offset - Position of the first item to return.
|
|
736
|
+
* @param getTopFilterAttributes.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
737
|
+
* @param getTopFilterAttributes.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
757
738
|
* @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/).
|
|
758
739
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
759
740
|
*/
|
|
@@ -765,25 +746,25 @@ function createAnalyticsClient({
|
|
|
765
746
|
const headers = {};
|
|
766
747
|
const queryParameters = {};
|
|
767
748
|
if (index !== void 0) {
|
|
768
|
-
queryParameters
|
|
749
|
+
queryParameters["index"] = index.toString();
|
|
769
750
|
}
|
|
770
751
|
if (search !== void 0) {
|
|
771
|
-
queryParameters
|
|
752
|
+
queryParameters["search"] = search.toString();
|
|
772
753
|
}
|
|
773
754
|
if (startDate !== void 0) {
|
|
774
|
-
queryParameters
|
|
755
|
+
queryParameters["startDate"] = startDate.toString();
|
|
775
756
|
}
|
|
776
757
|
if (endDate !== void 0) {
|
|
777
|
-
queryParameters
|
|
758
|
+
queryParameters["endDate"] = endDate.toString();
|
|
778
759
|
}
|
|
779
760
|
if (limit !== void 0) {
|
|
780
|
-
queryParameters
|
|
761
|
+
queryParameters["limit"] = limit.toString();
|
|
781
762
|
}
|
|
782
763
|
if (offset !== void 0) {
|
|
783
|
-
queryParameters
|
|
764
|
+
queryParameters["offset"] = offset.toString();
|
|
784
765
|
}
|
|
785
766
|
if (tags !== void 0) {
|
|
786
|
-
queryParameters
|
|
767
|
+
queryParameters["tags"] = tags.toString();
|
|
787
768
|
}
|
|
788
769
|
const request = {
|
|
789
770
|
method: "GET",
|
|
@@ -797,16 +778,15 @@ function createAnalyticsClient({
|
|
|
797
778
|
* Retrieves the most frequent filter (facet) values for a filter attribute. These are attributes of your records that you included in the `attributesForFaceting` setting.
|
|
798
779
|
*
|
|
799
780
|
* Required API Key ACLs:
|
|
800
|
-
*
|
|
801
|
-
*
|
|
781
|
+
* - analytics
|
|
802
782
|
* @param getTopFilterForAttribute - The getTopFilterForAttribute object.
|
|
803
783
|
* @param getTopFilterForAttribute.attribute - Attribute name.
|
|
804
784
|
* @param getTopFilterForAttribute.index - Index name.
|
|
805
785
|
* @param getTopFilterForAttribute.search - Search query.
|
|
806
786
|
* @param getTopFilterForAttribute.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
807
787
|
* @param getTopFilterForAttribute.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
808
|
-
* @param getTopFilterForAttribute.limit - Number of items to return.
|
|
809
|
-
* @param getTopFilterForAttribute.offset - Position of the first item to return.
|
|
788
|
+
* @param getTopFilterForAttribute.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
789
|
+
* @param getTopFilterForAttribute.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
810
790
|
* @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/).
|
|
811
791
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
812
792
|
*/
|
|
@@ -821,25 +801,25 @@ function createAnalyticsClient({
|
|
|
821
801
|
const headers = {};
|
|
822
802
|
const queryParameters = {};
|
|
823
803
|
if (index !== void 0) {
|
|
824
|
-
queryParameters
|
|
804
|
+
queryParameters["index"] = index.toString();
|
|
825
805
|
}
|
|
826
806
|
if (search !== void 0) {
|
|
827
|
-
queryParameters
|
|
807
|
+
queryParameters["search"] = search.toString();
|
|
828
808
|
}
|
|
829
809
|
if (startDate !== void 0) {
|
|
830
|
-
queryParameters
|
|
810
|
+
queryParameters["startDate"] = startDate.toString();
|
|
831
811
|
}
|
|
832
812
|
if (endDate !== void 0) {
|
|
833
|
-
queryParameters
|
|
813
|
+
queryParameters["endDate"] = endDate.toString();
|
|
834
814
|
}
|
|
835
815
|
if (limit !== void 0) {
|
|
836
|
-
queryParameters
|
|
816
|
+
queryParameters["limit"] = limit.toString();
|
|
837
817
|
}
|
|
838
818
|
if (offset !== void 0) {
|
|
839
|
-
queryParameters
|
|
819
|
+
queryParameters["offset"] = offset.toString();
|
|
840
820
|
}
|
|
841
821
|
if (tags !== void 0) {
|
|
842
|
-
queryParameters
|
|
822
|
+
queryParameters["tags"] = tags.toString();
|
|
843
823
|
}
|
|
844
824
|
const request = {
|
|
845
825
|
method: "GET",
|
|
@@ -853,15 +833,14 @@ function createAnalyticsClient({
|
|
|
853
833
|
* 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.
|
|
854
834
|
*
|
|
855
835
|
* Required API Key ACLs:
|
|
856
|
-
*
|
|
857
|
-
*
|
|
836
|
+
* - analytics
|
|
858
837
|
* @param getTopFiltersNoResults - The getTopFiltersNoResults object.
|
|
859
838
|
* @param getTopFiltersNoResults.index - Index name.
|
|
860
839
|
* @param getTopFiltersNoResults.search - Search query.
|
|
861
840
|
* @param getTopFiltersNoResults.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
862
841
|
* @param getTopFiltersNoResults.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
863
|
-
* @param getTopFiltersNoResults.limit - Number of items to return.
|
|
864
|
-
* @param getTopFiltersNoResults.offset - Position of the first item to return.
|
|
842
|
+
* @param getTopFiltersNoResults.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
843
|
+
* @param getTopFiltersNoResults.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
865
844
|
* @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/).
|
|
866
845
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
867
846
|
*/
|
|
@@ -873,25 +852,25 @@ function createAnalyticsClient({
|
|
|
873
852
|
const headers = {};
|
|
874
853
|
const queryParameters = {};
|
|
875
854
|
if (index !== void 0) {
|
|
876
|
-
queryParameters
|
|
855
|
+
queryParameters["index"] = index.toString();
|
|
877
856
|
}
|
|
878
857
|
if (search !== void 0) {
|
|
879
|
-
queryParameters
|
|
858
|
+
queryParameters["search"] = search.toString();
|
|
880
859
|
}
|
|
881
860
|
if (startDate !== void 0) {
|
|
882
|
-
queryParameters
|
|
861
|
+
queryParameters["startDate"] = startDate.toString();
|
|
883
862
|
}
|
|
884
863
|
if (endDate !== void 0) {
|
|
885
|
-
queryParameters
|
|
864
|
+
queryParameters["endDate"] = endDate.toString();
|
|
886
865
|
}
|
|
887
866
|
if (limit !== void 0) {
|
|
888
|
-
queryParameters
|
|
867
|
+
queryParameters["limit"] = limit.toString();
|
|
889
868
|
}
|
|
890
869
|
if (offset !== void 0) {
|
|
891
|
-
queryParameters
|
|
870
|
+
queryParameters["offset"] = offset.toString();
|
|
892
871
|
}
|
|
893
872
|
if (tags !== void 0) {
|
|
894
|
-
queryParameters
|
|
873
|
+
queryParameters["tags"] = tags.toString();
|
|
895
874
|
}
|
|
896
875
|
const request = {
|
|
897
876
|
method: "GET",
|
|
@@ -905,8 +884,7 @@ function createAnalyticsClient({
|
|
|
905
884
|
* Retrieves the object IDs of the most frequent search results.
|
|
906
885
|
*
|
|
907
886
|
* Required API Key ACLs:
|
|
908
|
-
*
|
|
909
|
-
*
|
|
887
|
+
* - analytics
|
|
910
888
|
* @param getTopHits - The getTopHits object.
|
|
911
889
|
* @param getTopHits.index - Index name.
|
|
912
890
|
* @param getTopHits.search - Search query.
|
|
@@ -914,8 +892,8 @@ function createAnalyticsClient({
|
|
|
914
892
|
* @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.
|
|
915
893
|
* @param getTopHits.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
916
894
|
* @param getTopHits.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
917
|
-
* @param getTopHits.limit - Number of items to return.
|
|
918
|
-
* @param getTopHits.offset - Position of the first item to return.
|
|
895
|
+
* @param getTopHits.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
896
|
+
* @param getTopHits.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
919
897
|
* @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/).
|
|
920
898
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
921
899
|
*/
|
|
@@ -927,31 +905,31 @@ function createAnalyticsClient({
|
|
|
927
905
|
const headers = {};
|
|
928
906
|
const queryParameters = {};
|
|
929
907
|
if (index !== void 0) {
|
|
930
|
-
queryParameters
|
|
908
|
+
queryParameters["index"] = index.toString();
|
|
931
909
|
}
|
|
932
910
|
if (search !== void 0) {
|
|
933
|
-
queryParameters
|
|
911
|
+
queryParameters["search"] = search.toString();
|
|
934
912
|
}
|
|
935
913
|
if (clickAnalytics !== void 0) {
|
|
936
|
-
queryParameters
|
|
914
|
+
queryParameters["clickAnalytics"] = clickAnalytics.toString();
|
|
937
915
|
}
|
|
938
916
|
if (revenueAnalytics !== void 0) {
|
|
939
|
-
queryParameters
|
|
917
|
+
queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
|
|
940
918
|
}
|
|
941
919
|
if (startDate !== void 0) {
|
|
942
|
-
queryParameters
|
|
920
|
+
queryParameters["startDate"] = startDate.toString();
|
|
943
921
|
}
|
|
944
922
|
if (endDate !== void 0) {
|
|
945
|
-
queryParameters
|
|
923
|
+
queryParameters["endDate"] = endDate.toString();
|
|
946
924
|
}
|
|
947
925
|
if (limit !== void 0) {
|
|
948
|
-
queryParameters
|
|
926
|
+
queryParameters["limit"] = limit.toString();
|
|
949
927
|
}
|
|
950
928
|
if (offset !== void 0) {
|
|
951
|
-
queryParameters
|
|
929
|
+
queryParameters["offset"] = offset.toString();
|
|
952
930
|
}
|
|
953
931
|
if (tags !== void 0) {
|
|
954
|
-
queryParameters
|
|
932
|
+
queryParameters["tags"] = tags.toString();
|
|
955
933
|
}
|
|
956
934
|
const request = {
|
|
957
935
|
method: "GET",
|
|
@@ -965,8 +943,7 @@ function createAnalyticsClient({
|
|
|
965
943
|
* Returns the most popular search terms.
|
|
966
944
|
*
|
|
967
945
|
* Required API Key ACLs:
|
|
968
|
-
*
|
|
969
|
-
*
|
|
946
|
+
* - analytics
|
|
970
947
|
* @param getTopSearches - The getTopSearches object.
|
|
971
948
|
* @param getTopSearches.index - Index name.
|
|
972
949
|
* @param getTopSearches.clickAnalytics - Whether to include metrics related to click and conversion events in the response.
|
|
@@ -975,8 +952,8 @@ function createAnalyticsClient({
|
|
|
975
952
|
* @param getTopSearches.endDate - End date of the period to analyze, in `YYYY-MM-DD` format.
|
|
976
953
|
* @param getTopSearches.orderBy - Attribute by which to order the response items. If the `clickAnalytics` parameter is false, only `searchCount` is available.
|
|
977
954
|
* @param getTopSearches.direction - Sorting direction of the results: ascending or descending.
|
|
978
|
-
* @param getTopSearches.limit - Number of items to return.
|
|
979
|
-
* @param getTopSearches.offset - Position of the first item to return.
|
|
955
|
+
* @param getTopSearches.limit - Number of items to return. Combined with the `offset` parameter, only the first 1000 items can be retrieved.
|
|
956
|
+
* @param getTopSearches.offset - Position of the first item to return. Combined with the `limit` parameter, only the first 1000 items can be retrieved.
|
|
980
957
|
* @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/).
|
|
981
958
|
* @param requestOptions - The requestOptions to send along with the query, they will be merged with the transporter requestOptions.
|
|
982
959
|
*/
|
|
@@ -999,34 +976,34 @@ function createAnalyticsClient({
|
|
|
999
976
|
const headers = {};
|
|
1000
977
|
const queryParameters = {};
|
|
1001
978
|
if (index !== void 0) {
|
|
1002
|
-
queryParameters
|
|
979
|
+
queryParameters["index"] = index.toString();
|
|
1003
980
|
}
|
|
1004
981
|
if (clickAnalytics !== void 0) {
|
|
1005
|
-
queryParameters
|
|
982
|
+
queryParameters["clickAnalytics"] = clickAnalytics.toString();
|
|
1006
983
|
}
|
|
1007
984
|
if (revenueAnalytics !== void 0) {
|
|
1008
|
-
queryParameters
|
|
985
|
+
queryParameters["revenueAnalytics"] = revenueAnalytics.toString();
|
|
1009
986
|
}
|
|
1010
987
|
if (startDate !== void 0) {
|
|
1011
|
-
queryParameters
|
|
988
|
+
queryParameters["startDate"] = startDate.toString();
|
|
1012
989
|
}
|
|
1013
990
|
if (endDate !== void 0) {
|
|
1014
|
-
queryParameters
|
|
991
|
+
queryParameters["endDate"] = endDate.toString();
|
|
1015
992
|
}
|
|
1016
993
|
if (orderBy !== void 0) {
|
|
1017
|
-
queryParameters
|
|
994
|
+
queryParameters["orderBy"] = orderBy.toString();
|
|
1018
995
|
}
|
|
1019
996
|
if (direction !== void 0) {
|
|
1020
|
-
queryParameters
|
|
997
|
+
queryParameters["direction"] = direction.toString();
|
|
1021
998
|
}
|
|
1022
999
|
if (limit !== void 0) {
|
|
1023
|
-
queryParameters
|
|
1000
|
+
queryParameters["limit"] = limit.toString();
|
|
1024
1001
|
}
|
|
1025
1002
|
if (offset !== void 0) {
|
|
1026
|
-
queryParameters
|
|
1003
|
+
queryParameters["offset"] = offset.toString();
|
|
1027
1004
|
}
|
|
1028
1005
|
if (tags !== void 0) {
|
|
1029
|
-
queryParameters
|
|
1006
|
+
queryParameters["tags"] = tags.toString();
|
|
1030
1007
|
}
|
|
1031
1008
|
const request = {
|
|
1032
1009
|
method: "GET",
|
|
@@ -1040,8 +1017,7 @@ function createAnalyticsClient({
|
|
|
1040
1017
|
* 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.
|
|
1041
1018
|
*
|
|
1042
1019
|
* Required API Key ACLs:
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1020
|
+
* - analytics
|
|
1045
1021
|
* @param getUsersCount - The getUsersCount object.
|
|
1046
1022
|
* @param getUsersCount.index - Index name.
|
|
1047
1023
|
* @param getUsersCount.startDate - Start date of the period to analyze, in `YYYY-MM-DD` format.
|
|
@@ -1057,16 +1033,16 @@ function createAnalyticsClient({
|
|
|
1057
1033
|
const headers = {};
|
|
1058
1034
|
const queryParameters = {};
|
|
1059
1035
|
if (index !== void 0) {
|
|
1060
|
-
queryParameters
|
|
1036
|
+
queryParameters["index"] = index.toString();
|
|
1061
1037
|
}
|
|
1062
1038
|
if (startDate !== void 0) {
|
|
1063
|
-
queryParameters
|
|
1039
|
+
queryParameters["startDate"] = startDate.toString();
|
|
1064
1040
|
}
|
|
1065
1041
|
if (endDate !== void 0) {
|
|
1066
|
-
queryParameters
|
|
1042
|
+
queryParameters["endDate"] = endDate.toString();
|
|
1067
1043
|
}
|
|
1068
1044
|
if (tags !== void 0) {
|
|
1069
|
-
queryParameters
|
|
1045
|
+
queryParameters["tags"] = tags.toString();
|
|
1070
1046
|
}
|
|
1071
1047
|
const request = {
|
|
1072
1048
|
method: "GET",
|