zorihq 0.14.0 → 0.17.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 (93) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/client.d.mts +4 -4
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +4 -4
  5. package/client.d.ts.map +1 -1
  6. package/client.js +15 -9
  7. package/client.js.map +1 -1
  8. package/client.mjs +15 -9
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/v1/analytics/analytics.d.mts +109 -71
  12. package/resources/v1/analytics/analytics.d.mts.map +1 -1
  13. package/resources/v1/analytics/analytics.d.ts +109 -71
  14. package/resources/v1/analytics/analytics.d.ts.map +1 -1
  15. package/resources/v1/analytics/analytics.js +10 -14
  16. package/resources/v1/analytics/analytics.js.map +1 -1
  17. package/resources/v1/analytics/analytics.mjs +11 -15
  18. package/resources/v1/analytics/analytics.mjs.map +1 -1
  19. package/resources/v1/analytics/index.d.mts +4 -5
  20. package/resources/v1/analytics/index.d.mts.map +1 -1
  21. package/resources/v1/analytics/index.d.ts +4 -5
  22. package/resources/v1/analytics/index.d.ts.map +1 -1
  23. package/resources/v1/analytics/index.js +3 -5
  24. package/resources/v1/analytics/index.js.map +1 -1
  25. package/resources/v1/analytics/index.mjs +2 -3
  26. package/resources/v1/analytics/index.mjs.map +1 -1
  27. package/resources/v1/analytics/retention.d.mts +1 -25
  28. package/resources/v1/analytics/retention.d.mts.map +1 -1
  29. package/resources/v1/analytics/retention.d.ts +1 -25
  30. package/resources/v1/analytics/retention.d.ts.map +1 -1
  31. package/resources/v1/analytics/retention.js +0 -15
  32. package/resources/v1/analytics/retention.js.map +1 -1
  33. package/resources/v1/analytics/retention.mjs +0 -15
  34. package/resources/v1/analytics/retention.mjs.map +1 -1
  35. package/resources/v1/analytics/tiles.d.mts +372 -0
  36. package/resources/v1/analytics/tiles.d.mts.map +1 -0
  37. package/resources/v1/analytics/tiles.d.ts +372 -0
  38. package/resources/v1/analytics/tiles.d.ts.map +1 -0
  39. package/resources/v1/analytics/tiles.js +236 -0
  40. package/resources/v1/analytics/tiles.js.map +1 -0
  41. package/resources/v1/analytics/tiles.mjs +232 -0
  42. package/resources/v1/analytics/tiles.mjs.map +1 -0
  43. package/resources/v1/analytics/visitors.d.mts +1 -74
  44. package/resources/v1/analytics/visitors.d.mts.map +1 -1
  45. package/resources/v1/analytics/visitors.d.ts +1 -74
  46. package/resources/v1/analytics/visitors.d.ts.map +1 -1
  47. package/resources/v1/analytics/visitors.js +0 -46
  48. package/resources/v1/analytics/visitors.js.map +1 -1
  49. package/resources/v1/analytics/visitors.mjs +0 -46
  50. package/resources/v1/analytics/visitors.mjs.map +1 -1
  51. package/resources/v1/index.d.mts +1 -1
  52. package/resources/v1/index.d.mts.map +1 -1
  53. package/resources/v1/index.d.ts +1 -1
  54. package/resources/v1/index.d.ts.map +1 -1
  55. package/resources/v1/index.js.map +1 -1
  56. package/resources/v1/index.mjs.map +1 -1
  57. package/resources/v1/v1.d.mts +2 -2
  58. package/resources/v1/v1.d.mts.map +1 -1
  59. package/resources/v1/v1.d.ts +2 -2
  60. package/resources/v1/v1.d.ts.map +1 -1
  61. package/resources/v1/v1.js.map +1 -1
  62. package/resources/v1/v1.mjs.map +1 -1
  63. package/src/client.ts +20 -14
  64. package/src/resources/v1/analytics/analytics.ts +187 -109
  65. package/src/resources/v1/analytics/index.ts +37 -21
  66. package/src/resources/v1/analytics/retention.ts +0 -40
  67. package/src/resources/v1/analytics/tiles.ts +606 -0
  68. package/src/resources/v1/analytics/visitors.ts +0 -121
  69. package/src/resources/v1/index.ts +19 -11
  70. package/src/resources/v1/v1.ts +38 -22
  71. package/src/version.ts +1 -1
  72. package/version.d.mts +1 -1
  73. package/version.d.ts +1 -1
  74. package/version.js +1 -1
  75. package/version.mjs +1 -1
  76. package/resources/v1/analytics/sessions.d.mts +0 -58
  77. package/resources/v1/analytics/sessions.d.mts.map +0 -1
  78. package/resources/v1/analytics/sessions.d.ts +0 -58
  79. package/resources/v1/analytics/sessions.d.ts.map +0 -1
  80. package/resources/v1/analytics/sessions.js +0 -39
  81. package/resources/v1/analytics/sessions.js.map +0 -1
  82. package/resources/v1/analytics/sessions.mjs +0 -35
  83. package/resources/v1/analytics/sessions.mjs.map +0 -1
  84. package/resources/v1/analytics/users.d.mts +0 -34
  85. package/resources/v1/analytics/users.d.mts.map +0 -1
  86. package/resources/v1/analytics/users.d.ts +0 -34
  87. package/resources/v1/analytics/users.d.ts.map +0 -1
  88. package/resources/v1/analytics/users.js +0 -24
  89. package/resources/v1/analytics/users.js.map +0 -1
  90. package/resources/v1/analytics/users.mjs +0 -20
  91. package/resources/v1/analytics/users.mjs.map +0 -1
  92. package/src/resources/v1/analytics/sessions.ts +0 -93
  93. package/src/resources/v1/analytics/users.ts +0 -48
@@ -4,24 +4,31 @@ import { APIResource } from '../../../core/resource';
4
4
  import * as EventsAPI from './events';
5
5
  import { EventFilterOptionsParams, EventRecentParams, Events } from './events';
6
6
  import * as RetentionAPI from './retention';
7
+ import { Retention, RetentionChurnRateParams, RetentionCohortsParams } from './retention';
8
+ import * as TilesAPI from './tiles';
7
9
  import {
8
- Retention,
9
- RetentionChurnRateParams,
10
- RetentionCohortsParams,
11
- RetentionReturnRateParams,
12
- } from './retention';
13
- import * as SessionsAPI from './sessions';
14
- import { SessionBounceRateParams, SessionMetricsParams, Sessions } from './sessions';
15
- import * as UsersAPI from './users';
16
- import { UserActiveParams, Users } from './users';
10
+ TileBounceRateParams,
11
+ TileDauParams,
12
+ TileMauParams,
13
+ TilePagesPerSessionParams,
14
+ TileReturnRateParams,
15
+ TileSessionDurationParams,
16
+ TileTimeBetweenVisitsParams,
17
+ TileTrafficByCountryParams,
18
+ TileTrafficByRefererParams,
19
+ TileTrafficByUtmParams,
20
+ TileUniqueSessionsParams,
21
+ TileUniqueVisitorsParams,
22
+ TileVisitorsByBrowserParams,
23
+ TileVisitorsByOsParams,
24
+ TileWauParams,
25
+ Tiles,
26
+ } from './tiles';
17
27
  import * as VisitorsAPI from './visitors';
18
28
  import {
19
- VisitorByCountryParams,
20
29
  VisitorByDeviceParams,
21
- VisitorByOriginParams,
22
30
  VisitorIdentifyParams,
23
31
  VisitorProfileParams,
24
- VisitorTimelineParams,
25
32
  VisitorTopParams,
26
33
  Visitors,
27
34
  } from './visitors';
@@ -31,50 +38,35 @@ import { RequestOptions } from '../../../internal/request-options';
31
38
  export class Analytics extends APIResource {
32
39
  visitors: VisitorsAPI.Visitors = new VisitorsAPI.Visitors(this._client);
33
40
  events: EventsAPI.Events = new EventsAPI.Events(this._client);
34
- sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
35
- users: UsersAPI.Users = new UsersAPI.Users(this._client);
41
+ tiles: TilesAPI.Tiles = new TilesAPI.Tiles(this._client);
36
42
  retention: RetentionAPI.Retention = new RetentionAPI.Retention(this._client);
37
43
 
38
44
  /**
39
- * Get combined key metrics including sessions, active users, bounce rate, and
40
- * retention for dashboard display
45
+ * Get unique visitor counts over time, split by mobile and desktop devices for
46
+ * chart visualization
41
47
  *
42
48
  * @example
43
49
  * ```ts
44
- * const dashboardMetricsResponse =
45
- * await client.v1.analytics.dashboard({
50
+ * const timelineTileResponse =
51
+ * await client.v1.analytics.timeline({
46
52
  * project_id: 'project_id',
47
53
  * time_range: 'last_hour',
48
54
  * });
49
55
  * ```
50
56
  */
51
- dashboard(query: AnalyticsDashboardParams, options?: RequestOptions): APIPromise<DashboardMetricsResponse> {
52
- return this._client.get('/api/v1/analytics/dashboard', { query, ...options });
57
+ timeline(query: AnalyticsTimelineParams, options?: RequestOptions): APIPromise<TimelineTileResponse> {
58
+ return this._client.get('/api/v1/analytics/timeline', { query, ...options });
53
59
  }
54
60
  }
55
61
 
56
- export interface ActiveUsersResponse {
57
- dau?: number;
58
-
59
- mau?: number;
60
-
61
- wau?: number;
62
- }
63
-
64
- export interface BounceRateByPageMetric {
65
- bounce_rate?: number;
66
-
67
- page?: string;
68
-
69
- sessions?: number;
70
- }
71
-
72
62
  export interface BounceRateResponse {
73
- by_page?: Array<BounceRateByPageMetric>;
63
+ previous_rate?: number;
74
64
 
75
- overall_bounce_rate?: number;
65
+ rate?: number;
76
66
  }
77
67
 
68
+ export type CardPrecision = 'minutes' | 'hourly' | 'daily' | 'weekly' | 'monthly';
69
+
78
70
  export interface ChurnRateResponse {
79
71
  churn_rate_percent?: number;
80
72
 
@@ -107,38 +99,22 @@ export interface CohortData {
107
99
  week_4_retention?: number;
108
100
  }
109
101
 
110
- export interface CountryDataPoint {
111
- country_code?: string;
102
+ export interface CountryTrafficSourceData {
103
+ count?: number;
112
104
 
113
- percentage?: number;
105
+ country?: string;
114
106
 
115
- unique_visitors?: number;
107
+ previous_count?: number;
116
108
  }
117
109
 
118
- export interface DashboardMetricsResponse {
119
- avg_pages_per_session?: number;
120
-
121
- avg_session_duration_seconds?: number;
122
-
123
- bounce_rate?: number;
124
-
125
- dau?: number;
126
-
127
- mau?: number;
128
-
129
- return_rate?: number;
130
-
131
- sessions_today?: number;
132
-
133
- total_events?: number;
134
-
135
- total_sessions_in_period?: number;
136
-
137
- unique_sessions?: number;
110
+ export interface CountryTrafficSourceResponse {
111
+ data?: Array<CountryTrafficSourceData>;
112
+ }
138
113
 
139
- unique_visitors?: number;
114
+ export interface DauResponse {
115
+ count?: number;
140
116
 
141
- wau?: number;
117
+ previous_count?: number;
142
118
  }
143
119
 
144
120
  export interface EventFilterOptionsResponse {
@@ -181,12 +157,16 @@ export interface ManualIdentifyResponse {
181
157
  visitor_id?: string;
182
158
  }
183
159
 
184
- export interface OriginDataPoint {
185
- origin?: string;
160
+ export interface MauResponse {
161
+ count?: number;
186
162
 
187
- percentage?: number;
163
+ previous_count?: number;
164
+ }
188
165
 
189
- unique_visitors?: number;
166
+ export interface PagesPerSessionResponse {
167
+ avg_pages?: number;
168
+
169
+ previous_avg_pages?: number;
190
170
  }
191
171
 
192
172
  export interface RecentEvent {
@@ -257,22 +237,58 @@ export interface RecentEventsResponse {
257
237
  total?: number;
258
238
  }
259
239
 
240
+ export interface RefererTrafficSourceData {
241
+ count?: number;
242
+
243
+ previous_count?: number;
244
+
245
+ previous_revenue?: number;
246
+
247
+ referer_url?: string;
248
+
249
+ revenue?: number;
250
+ }
251
+
252
+ export interface RefererTrafficSourceResponse {
253
+ data?: Array<RefererTrafficSourceData>;
254
+ }
255
+
260
256
  export interface ReturnRateResponse {
261
- avg_time_between_sessions_hours?: number;
257
+ previous_rate?: number;
258
+
259
+ rate?: number;
260
+ }
261
+
262
+ export interface SessionDurationResponse {
263
+ avg_duration?: number;
262
264
 
263
- return_rate_percent?: number;
265
+ previous_avg_duration?: number;
266
+ }
264
267
 
265
- returning_users?: number;
268
+ export interface TimeBetweenVisitsResponse {
269
+ avg_hours?: number;
266
270
 
267
- total_users?: number;
271
+ previous_avg_hours?: number;
268
272
  }
269
273
 
270
- export interface SessionMetricsResponse {
271
- average_pages_per_session?: number;
274
+ export interface TimelineTileData {
275
+ num_desktop_visits?: number;
272
276
 
273
- average_session_duration_seconds?: number;
277
+ num_mobile_visits?: number;
274
278
 
275
- total_sessions?: number;
279
+ num_revenue?: number;
280
+
281
+ num_unknown_visits?: number;
282
+
283
+ time_bucket?: string;
284
+ }
285
+
286
+ export interface TimelineTileResponse {
287
+ data?: Array<TimelineTileData>;
288
+
289
+ precision?: CardPrecision;
290
+
291
+ total_visits?: number;
276
292
  }
277
293
 
278
294
  export interface TopVisitor {
@@ -319,16 +335,38 @@ export interface TopVisitorsResponse {
319
335
  visitors?: Array<TopVisitor>;
320
336
  }
321
337
 
322
- export interface UniqueVisitorsDataPoint {
323
- desktop?: number;
338
+ export interface UniqueSessionsResponse {
339
+ count?: number;
324
340
 
325
- mobile?: number;
341
+ previous_count?: number;
342
+ }
326
343
 
327
- timestamp?: string;
344
+ export interface UniqueVisitorsResponse {
345
+ count?: number;
346
+
347
+ previous_count?: number;
348
+ }
349
+
350
+ export interface UtmTrafficSourceResponse {
351
+ data?: Array<UtmTrafficSourceResponse.Data>;
328
352
  }
329
353
 
330
- export interface UniqueVisitorsTimelineResponse {
331
- data?: Array<UniqueVisitorsDataPoint>;
354
+ export namespace UtmTrafficSourceResponse {
355
+ export interface Data {
356
+ count?: number;
357
+
358
+ previous_count?: number;
359
+
360
+ previous_revenue?: number;
361
+
362
+ revenue?: number;
363
+
364
+ utm_campaign?: string;
365
+
366
+ utm_medium?: string;
367
+
368
+ utm_source?: string;
369
+ }
332
370
  }
333
371
 
334
372
  export interface VisitorDataPoint {
@@ -423,19 +461,45 @@ export interface VisitorProfileResponse {
423
461
  visitor_id?: string;
424
462
  }
425
463
 
426
- export interface VisitorsByCountryResponse {
427
- data?: Array<CountryDataPoint>;
464
+ export interface VisitorsByBrowserResponse {
465
+ data?: Array<VisitorsByBrowserResponse.Data>;
466
+ }
467
+
468
+ export namespace VisitorsByBrowserResponse {
469
+ export interface Data {
470
+ browser_name?: string;
471
+
472
+ count?: number;
473
+
474
+ previous_count?: number;
475
+ }
428
476
  }
429
477
 
430
478
  export interface VisitorsByDeviceResponse {
431
479
  data?: Array<VisitorDataPoint>;
432
480
  }
433
481
 
434
- export interface VisitorsByOriginResponse {
435
- data?: Array<OriginDataPoint>;
482
+ export interface VisitorsByOsResponse {
483
+ data?: Array<VisitorsByOsResponse.Data>;
436
484
  }
437
485
 
438
- export interface AnalyticsDashboardParams {
486
+ export namespace VisitorsByOsResponse {
487
+ export interface Data {
488
+ browser_name?: string;
489
+
490
+ count?: number;
491
+
492
+ previous_count?: number;
493
+ }
494
+ }
495
+
496
+ export interface WauResponse {
497
+ count?: number;
498
+
499
+ previous_count?: number;
500
+ }
501
+
502
+ export interface AnalyticsTimelineParams {
439
503
  project_id: string;
440
504
 
441
505
  time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
@@ -457,50 +521,54 @@ export interface AnalyticsDashboardParams {
457
521
 
458
522
  Analytics.Visitors = Visitors;
459
523
  Analytics.Events = Events;
460
- Analytics.Sessions = Sessions;
461
- Analytics.Users = Users;
524
+ Analytics.Tiles = Tiles;
462
525
  Analytics.Retention = Retention;
463
526
 
464
527
  export declare namespace Analytics {
465
528
  export {
466
- type ActiveUsersResponse as ActiveUsersResponse,
467
- type BounceRateByPageMetric as BounceRateByPageMetric,
468
529
  type BounceRateResponse as BounceRateResponse,
530
+ type CardPrecision as CardPrecision,
469
531
  type ChurnRateResponse as ChurnRateResponse,
470
532
  type CohortAnalysisResponse as CohortAnalysisResponse,
471
533
  type CohortData as CohortData,
472
- type CountryDataPoint as CountryDataPoint,
473
- type DashboardMetricsResponse as DashboardMetricsResponse,
534
+ type CountryTrafficSourceData as CountryTrafficSourceData,
535
+ type CountryTrafficSourceResponse as CountryTrafficSourceResponse,
536
+ type DauResponse as DauResponse,
474
537
  type EventFilterOptionsResponse as EventFilterOptionsResponse,
475
538
  type EventsOverTimeDataPoint as EventsOverTimeDataPoint,
476
539
  type ManualIdentifyRequest as ManualIdentifyRequest,
477
540
  type ManualIdentifyResponse as ManualIdentifyResponse,
478
- type OriginDataPoint as OriginDataPoint,
541
+ type MauResponse as MauResponse,
542
+ type PagesPerSessionResponse as PagesPerSessionResponse,
479
543
  type RecentEvent as RecentEvent,
480
544
  type RecentEventsResponse as RecentEventsResponse,
545
+ type RefererTrafficSourceData as RefererTrafficSourceData,
546
+ type RefererTrafficSourceResponse as RefererTrafficSourceResponse,
481
547
  type ReturnRateResponse as ReturnRateResponse,
482
- type SessionMetricsResponse as SessionMetricsResponse,
548
+ type SessionDurationResponse as SessionDurationResponse,
549
+ type TimeBetweenVisitsResponse as TimeBetweenVisitsResponse,
550
+ type TimelineTileData as TimelineTileData,
551
+ type TimelineTileResponse as TimelineTileResponse,
483
552
  type TopVisitor as TopVisitor,
484
553
  type TopVisitorsResponse as TopVisitorsResponse,
485
- type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint,
486
- type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse,
554
+ type UniqueSessionsResponse as UniqueSessionsResponse,
555
+ type UniqueVisitorsResponse as UniqueVisitorsResponse,
556
+ type UtmTrafficSourceResponse as UtmTrafficSourceResponse,
487
557
  type VisitorDataPoint as VisitorDataPoint,
488
558
  type VisitorEvent as VisitorEvent,
489
559
  type VisitorProfileResponse as VisitorProfileResponse,
490
- type VisitorsByCountryResponse as VisitorsByCountryResponse,
560
+ type VisitorsByBrowserResponse as VisitorsByBrowserResponse,
491
561
  type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
492
- type VisitorsByOriginResponse as VisitorsByOriginResponse,
493
- type AnalyticsDashboardParams as AnalyticsDashboardParams,
562
+ type VisitorsByOsResponse as VisitorsByOsResponse,
563
+ type WauResponse as WauResponse,
564
+ type AnalyticsTimelineParams as AnalyticsTimelineParams,
494
565
  };
495
566
 
496
567
  export {
497
568
  Visitors as Visitors,
498
- type VisitorByCountryParams as VisitorByCountryParams,
499
569
  type VisitorByDeviceParams as VisitorByDeviceParams,
500
- type VisitorByOriginParams as VisitorByOriginParams,
501
570
  type VisitorIdentifyParams as VisitorIdentifyParams,
502
571
  type VisitorProfileParams as VisitorProfileParams,
503
- type VisitorTimelineParams as VisitorTimelineParams,
504
572
  type VisitorTopParams as VisitorTopParams,
505
573
  };
506
574
 
@@ -511,17 +579,27 @@ export declare namespace Analytics {
511
579
  };
512
580
 
513
581
  export {
514
- Sessions as Sessions,
515
- type SessionBounceRateParams as SessionBounceRateParams,
516
- type SessionMetricsParams as SessionMetricsParams,
582
+ Tiles as Tiles,
583
+ type TileBounceRateParams as TileBounceRateParams,
584
+ type TileDauParams as TileDauParams,
585
+ type TileMauParams as TileMauParams,
586
+ type TilePagesPerSessionParams as TilePagesPerSessionParams,
587
+ type TileReturnRateParams as TileReturnRateParams,
588
+ type TileSessionDurationParams as TileSessionDurationParams,
589
+ type TileTimeBetweenVisitsParams as TileTimeBetweenVisitsParams,
590
+ type TileTrafficByCountryParams as TileTrafficByCountryParams,
591
+ type TileTrafficByRefererParams as TileTrafficByRefererParams,
592
+ type TileTrafficByUtmParams as TileTrafficByUtmParams,
593
+ type TileUniqueSessionsParams as TileUniqueSessionsParams,
594
+ type TileUniqueVisitorsParams as TileUniqueVisitorsParams,
595
+ type TileVisitorsByBrowserParams as TileVisitorsByBrowserParams,
596
+ type TileVisitorsByOsParams as TileVisitorsByOsParams,
597
+ type TileWauParams as TileWauParams,
517
598
  };
518
599
 
519
- export { Users as Users, type UserActiveParams as UserActiveParams };
520
-
521
600
  export {
522
601
  Retention as Retention,
523
602
  type RetentionChurnRateParams as RetentionChurnRateParams,
524
603
  type RetentionCohortsParams as RetentionCohortsParams,
525
- type RetentionReturnRateParams as RetentionReturnRateParams,
526
604
  };
527
605
  }
@@ -2,51 +2,67 @@
2
2
 
3
3
  export {
4
4
  Analytics,
5
- type ActiveUsersResponse,
6
- type BounceRateByPageMetric,
7
5
  type BounceRateResponse,
6
+ type CardPrecision,
8
7
  type ChurnRateResponse,
9
8
  type CohortAnalysisResponse,
10
9
  type CohortData,
11
- type CountryDataPoint,
12
- type DashboardMetricsResponse,
10
+ type CountryTrafficSourceData,
11
+ type CountryTrafficSourceResponse,
12
+ type DauResponse,
13
13
  type EventFilterOptionsResponse,
14
14
  type EventsOverTimeDataPoint,
15
15
  type ManualIdentifyRequest,
16
16
  type ManualIdentifyResponse,
17
- type OriginDataPoint,
17
+ type MauResponse,
18
+ type PagesPerSessionResponse,
18
19
  type RecentEvent,
19
20
  type RecentEventsResponse,
21
+ type RefererTrafficSourceData,
22
+ type RefererTrafficSourceResponse,
20
23
  type ReturnRateResponse,
21
- type SessionMetricsResponse,
24
+ type SessionDurationResponse,
25
+ type TimeBetweenVisitsResponse,
26
+ type TimelineTileData,
27
+ type TimelineTileResponse,
22
28
  type TopVisitor,
23
29
  type TopVisitorsResponse,
24
- type UniqueVisitorsDataPoint,
25
- type UniqueVisitorsTimelineResponse,
30
+ type UniqueSessionsResponse,
31
+ type UniqueVisitorsResponse,
32
+ type UtmTrafficSourceResponse,
26
33
  type VisitorDataPoint,
27
34
  type VisitorEvent,
28
35
  type VisitorProfileResponse,
29
- type VisitorsByCountryResponse,
36
+ type VisitorsByBrowserResponse,
30
37
  type VisitorsByDeviceResponse,
31
- type VisitorsByOriginResponse,
32
- type AnalyticsDashboardParams,
38
+ type VisitorsByOsResponse,
39
+ type WauResponse,
40
+ type AnalyticsTimelineParams,
33
41
  } from './analytics';
34
42
  export { Events, type EventFilterOptionsParams, type EventRecentParams } from './events';
43
+ export { Retention, type RetentionChurnRateParams, type RetentionCohortsParams } from './retention';
35
44
  export {
36
- Retention,
37
- type RetentionChurnRateParams,
38
- type RetentionCohortsParams,
39
- type RetentionReturnRateParams,
40
- } from './retention';
41
- export { Sessions, type SessionBounceRateParams, type SessionMetricsParams } from './sessions';
42
- export { Users, type UserActiveParams } from './users';
45
+ Tiles,
46
+ type TileBounceRateParams,
47
+ type TileDauParams,
48
+ type TileMauParams,
49
+ type TilePagesPerSessionParams,
50
+ type TileReturnRateParams,
51
+ type TileSessionDurationParams,
52
+ type TileTimeBetweenVisitsParams,
53
+ type TileTrafficByCountryParams,
54
+ type TileTrafficByRefererParams,
55
+ type TileTrafficByUtmParams,
56
+ type TileUniqueSessionsParams,
57
+ type TileUniqueVisitorsParams,
58
+ type TileVisitorsByBrowserParams,
59
+ type TileVisitorsByOsParams,
60
+ type TileWauParams,
61
+ } from './tiles';
43
62
  export {
44
63
  Visitors,
45
- type VisitorByCountryParams,
46
64
  type VisitorByDeviceParams,
47
- type VisitorByOriginParams,
48
65
  type VisitorIdentifyParams,
49
66
  type VisitorProfileParams,
50
- type VisitorTimelineParams,
51
67
  type VisitorTopParams,
52
68
  } from './visitors';
@@ -43,25 +43,6 @@ export class Retention extends APIResource {
43
43
  ): APIPromise<AnalyticsAPI.CohortAnalysisResponse> {
44
44
  return this._client.get('/api/v1/analytics/retention/cohorts', { query, ...options });
45
45
  }
46
-
47
- /**
48
- * Get metrics about user return rate and time between sessions
49
- *
50
- * @example
51
- * ```ts
52
- * const returnRateResponse =
53
- * await client.v1.analytics.retention.returnRate({
54
- * project_id: 'project_id',
55
- * time_range: 'last_hour',
56
- * });
57
- * ```
58
- */
59
- returnRate(
60
- query: RetentionReturnRateParams,
61
- options?: RequestOptions,
62
- ): APIPromise<AnalyticsAPI.ReturnRateResponse> {
63
- return this._client.get('/api/v1/analytics/retention/return-rate', { query, ...options });
64
- }
65
46
  }
66
47
 
67
48
  export interface RetentionChurnRateParams {
@@ -104,30 +85,9 @@ export interface RetentionCohortsParams {
104
85
  visitor_id?: string;
105
86
  }
106
87
 
107
- export interface RetentionReturnRateParams {
108
- project_id: string;
109
-
110
- time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
111
-
112
- customer_id?: string;
113
-
114
- limit?: number;
115
-
116
- offset?: number;
117
-
118
- referrer?: string;
119
-
120
- utmtag?: string;
121
-
122
- utmtagValue?: string;
123
-
124
- visitor_id?: string;
125
- }
126
-
127
88
  export declare namespace Retention {
128
89
  export {
129
90
  type RetentionChurnRateParams as RetentionChurnRateParams,
130
91
  type RetentionCohortsParams as RetentionCohortsParams,
131
- type RetentionReturnRateParams as RetentionReturnRateParams,
132
92
  };
133
93
  }