zorihq 0.14.0 → 0.15.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/v1/analytics/analytics.d.mts +34 -81
- package/resources/v1/analytics/analytics.d.mts.map +1 -1
- package/resources/v1/analytics/analytics.d.ts +34 -81
- package/resources/v1/analytics/analytics.d.ts.map +1 -1
- package/resources/v1/analytics/analytics.js +11 -9
- package/resources/v1/analytics/analytics.js.map +1 -1
- package/resources/v1/analytics/analytics.mjs +12 -10
- package/resources/v1/analytics/analytics.mjs.map +1 -1
- package/resources/v1/analytics/index.d.mts +6 -5
- package/resources/v1/analytics/index.d.mts.map +1 -1
- package/resources/v1/analytics/index.d.ts +6 -5
- package/resources/v1/analytics/index.d.ts.map +1 -1
- package/resources/v1/analytics/index.js +3 -1
- package/resources/v1/analytics/index.js.map +1 -1
- package/resources/v1/analytics/index.mjs +2 -1
- package/resources/v1/analytics/index.mjs.map +1 -1
- package/resources/v1/analytics/retention.d.mts +1 -25
- package/resources/v1/analytics/retention.d.mts.map +1 -1
- package/resources/v1/analytics/retention.d.ts +1 -25
- package/resources/v1/analytics/retention.d.ts.map +1 -1
- package/resources/v1/analytics/retention.js +0 -15
- package/resources/v1/analytics/retention.js.map +1 -1
- package/resources/v1/analytics/retention.mjs +0 -15
- package/resources/v1/analytics/retention.mjs.map +1 -1
- package/resources/v1/analytics/sessions.d.mts +0 -54
- package/resources/v1/analytics/sessions.d.mts.map +1 -1
- package/resources/v1/analytics/sessions.d.ts +0 -54
- package/resources/v1/analytics/sessions.d.ts.map +1 -1
- package/resources/v1/analytics/sessions.js +0 -30
- package/resources/v1/analytics/sessions.js.map +1 -1
- package/resources/v1/analytics/sessions.mjs +0 -30
- package/resources/v1/analytics/sessions.mjs.map +1 -1
- package/resources/v1/analytics/tiles.d.mts +401 -0
- package/resources/v1/analytics/tiles.d.mts.map +1 -0
- package/resources/v1/analytics/tiles.d.ts +401 -0
- package/resources/v1/analytics/tiles.d.ts.map +1 -0
- package/resources/v1/analytics/tiles.js +208 -0
- package/resources/v1/analytics/tiles.js.map +1 -0
- package/resources/v1/analytics/tiles.mjs +204 -0
- package/resources/v1/analytics/tiles.mjs.map +1 -0
- package/resources/v1/analytics/users.d.mts +0 -30
- package/resources/v1/analytics/users.d.mts.map +1 -1
- package/resources/v1/analytics/users.d.ts +0 -30
- package/resources/v1/analytics/users.d.ts.map +1 -1
- package/resources/v1/analytics/users.js +0 -15
- package/resources/v1/analytics/users.js.map +1 -1
- package/resources/v1/analytics/users.mjs +0 -15
- package/resources/v1/analytics/users.mjs.map +1 -1
- package/resources/v1/analytics/visitors.d.mts +1 -74
- package/resources/v1/analytics/visitors.d.mts.map +1 -1
- package/resources/v1/analytics/visitors.d.ts +1 -74
- package/resources/v1/analytics/visitors.d.ts.map +1 -1
- package/resources/v1/analytics/visitors.js +0 -46
- package/resources/v1/analytics/visitors.js.map +1 -1
- package/resources/v1/analytics/visitors.mjs +0 -46
- package/resources/v1/analytics/visitors.mjs.map +1 -1
- package/resources/v1/index.d.mts +1 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +1 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/v1.d.mts +2 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +2 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/analytics/analytics.ts +100 -144
- package/src/resources/v1/analytics/index.ts +33 -23
- package/src/resources/v1/analytics/retention.ts +0 -40
- package/src/resources/v1/analytics/sessions.ts +1 -89
- package/src/resources/v1/analytics/tiles.ts +663 -0
- package/src/resources/v1/analytics/users.ts +1 -44
- package/src/resources/v1/analytics/visitors.ts +0 -121
- package/src/resources/v1/index.ts +2 -13
- package/src/resources/v1/v1.ts +4 -26
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -4,24 +4,46 @@ 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 {
|
|
8
|
-
Retention,
|
|
9
|
-
RetentionChurnRateParams,
|
|
10
|
-
RetentionCohortsParams,
|
|
11
|
-
RetentionReturnRateParams,
|
|
12
|
-
} from './retention';
|
|
7
|
+
import { Retention, RetentionChurnRateParams, RetentionCohortsParams } from './retention';
|
|
13
8
|
import * as SessionsAPI from './sessions';
|
|
14
|
-
import {
|
|
9
|
+
import { Sessions } from './sessions';
|
|
10
|
+
import * as TilesAPI from './tiles';
|
|
11
|
+
import {
|
|
12
|
+
TileGetBounceRateParams,
|
|
13
|
+
TileGetBounceRateResponse,
|
|
14
|
+
TileGetDailyActiveUsersParams,
|
|
15
|
+
TileGetDailyActiveUsersResponse,
|
|
16
|
+
TileGetMonthlyActiveUsersParams,
|
|
17
|
+
TileGetMonthlyActiveUsersResponse,
|
|
18
|
+
TileGetPagesPerSessionParams,
|
|
19
|
+
TileGetPagesPerSessionResponse,
|
|
20
|
+
TileGetReturnRateParams,
|
|
21
|
+
TileGetReturnRateResponse,
|
|
22
|
+
TileGetSessionDurationParams,
|
|
23
|
+
TileGetSessionDurationResponse,
|
|
24
|
+
TileGetTimeBetweenVisitsParams,
|
|
25
|
+
TileGetTimeBetweenVisitsResponse,
|
|
26
|
+
TileGetTrafficByCountryParams,
|
|
27
|
+
TileGetTrafficByCountryResponse,
|
|
28
|
+
TileGetTrafficByRefererParams,
|
|
29
|
+
TileGetTrafficByRefererResponse,
|
|
30
|
+
TileGetTrafficByUtmParams,
|
|
31
|
+
TileGetTrafficByUtmResponse,
|
|
32
|
+
TileGetUniqueSessionsParams,
|
|
33
|
+
TileGetUniqueSessionsResponse,
|
|
34
|
+
TileGetUniqueVisitorsParams,
|
|
35
|
+
TileGetUniqueVisitorsResponse,
|
|
36
|
+
TileGetWeeklyActiveUsersParams,
|
|
37
|
+
TileGetWeeklyActiveUsersResponse,
|
|
38
|
+
Tiles,
|
|
39
|
+
} from './tiles';
|
|
15
40
|
import * as UsersAPI from './users';
|
|
16
|
-
import {
|
|
41
|
+
import { Users } from './users';
|
|
17
42
|
import * as VisitorsAPI from './visitors';
|
|
18
43
|
import {
|
|
19
|
-
VisitorByCountryParams,
|
|
20
44
|
VisitorByDeviceParams,
|
|
21
|
-
VisitorByOriginParams,
|
|
22
45
|
VisitorIdentifyParams,
|
|
23
46
|
VisitorProfileParams,
|
|
24
|
-
VisitorTimelineParams,
|
|
25
47
|
VisitorTopParams,
|
|
26
48
|
Visitors,
|
|
27
49
|
} from './visitors';
|
|
@@ -34,47 +56,27 @@ export class Analytics extends APIResource {
|
|
|
34
56
|
sessions: SessionsAPI.Sessions = new SessionsAPI.Sessions(this._client);
|
|
35
57
|
users: UsersAPI.Users = new UsersAPI.Users(this._client);
|
|
36
58
|
retention: RetentionAPI.Retention = new RetentionAPI.Retention(this._client);
|
|
59
|
+
tiles: TilesAPI.Tiles = new TilesAPI.Tiles(this._client);
|
|
37
60
|
|
|
38
61
|
/**
|
|
39
|
-
* Get
|
|
40
|
-
*
|
|
62
|
+
* Get unique visitor counts over time, split by mobile and desktop devices for
|
|
63
|
+
* chart visualization
|
|
41
64
|
*
|
|
42
65
|
* @example
|
|
43
66
|
* ```ts
|
|
44
|
-
* const
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* time_range: 'last_hour',
|
|
48
|
-
* });
|
|
67
|
+
* const response = await client.v1.analytics.retrieveTimeline(
|
|
68
|
+
* { project_id: 'project_id', time_range: 'last_hour' },
|
|
69
|
+
* );
|
|
49
70
|
* ```
|
|
50
71
|
*/
|
|
51
|
-
|
|
52
|
-
|
|
72
|
+
retrieveTimeline(
|
|
73
|
+
query: AnalyticsRetrieveTimelineParams,
|
|
74
|
+
options?: RequestOptions,
|
|
75
|
+
): APIPromise<AnalyticsRetrieveTimelineResponse> {
|
|
76
|
+
return this._client.get('/api/v1/analytics/timeline', { query, ...options });
|
|
53
77
|
}
|
|
54
78
|
}
|
|
55
79
|
|
|
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
|
-
export interface BounceRateResponse {
|
|
73
|
-
by_page?: Array<BounceRateByPageMetric>;
|
|
74
|
-
|
|
75
|
-
overall_bounce_rate?: number;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
80
|
export interface ChurnRateResponse {
|
|
79
81
|
churn_rate_percent?: number;
|
|
80
82
|
|
|
@@ -107,40 +109,6 @@ export interface CohortData {
|
|
|
107
109
|
week_4_retention?: number;
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
export interface CountryDataPoint {
|
|
111
|
-
country_code?: string;
|
|
112
|
-
|
|
113
|
-
percentage?: number;
|
|
114
|
-
|
|
115
|
-
unique_visitors?: number;
|
|
116
|
-
}
|
|
117
|
-
|
|
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;
|
|
138
|
-
|
|
139
|
-
unique_visitors?: number;
|
|
140
|
-
|
|
141
|
-
wau?: number;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
112
|
export interface EventFilterOptionsResponse {
|
|
145
113
|
event_names?: Array<string>;
|
|
146
114
|
|
|
@@ -181,14 +149,6 @@ export interface ManualIdentifyResponse {
|
|
|
181
149
|
visitor_id?: string;
|
|
182
150
|
}
|
|
183
151
|
|
|
184
|
-
export interface OriginDataPoint {
|
|
185
|
-
origin?: string;
|
|
186
|
-
|
|
187
|
-
percentage?: number;
|
|
188
|
-
|
|
189
|
-
unique_visitors?: number;
|
|
190
|
-
}
|
|
191
|
-
|
|
192
152
|
export interface RecentEvent {
|
|
193
153
|
browser_name?: string;
|
|
194
154
|
|
|
@@ -257,24 +217,6 @@ export interface RecentEventsResponse {
|
|
|
257
217
|
total?: number;
|
|
258
218
|
}
|
|
259
219
|
|
|
260
|
-
export interface ReturnRateResponse {
|
|
261
|
-
avg_time_between_sessions_hours?: number;
|
|
262
|
-
|
|
263
|
-
return_rate_percent?: number;
|
|
264
|
-
|
|
265
|
-
returning_users?: number;
|
|
266
|
-
|
|
267
|
-
total_users?: number;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
export interface SessionMetricsResponse {
|
|
271
|
-
average_pages_per_session?: number;
|
|
272
|
-
|
|
273
|
-
average_session_duration_seconds?: number;
|
|
274
|
-
|
|
275
|
-
total_sessions?: number;
|
|
276
|
-
}
|
|
277
|
-
|
|
278
220
|
export interface TopVisitor {
|
|
279
221
|
browser_name?: string;
|
|
280
222
|
|
|
@@ -319,18 +261,6 @@ export interface TopVisitorsResponse {
|
|
|
319
261
|
visitors?: Array<TopVisitor>;
|
|
320
262
|
}
|
|
321
263
|
|
|
322
|
-
export interface UniqueVisitorsDataPoint {
|
|
323
|
-
desktop?: number;
|
|
324
|
-
|
|
325
|
-
mobile?: number;
|
|
326
|
-
|
|
327
|
-
timestamp?: string;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export interface UniqueVisitorsTimelineResponse {
|
|
331
|
-
data?: Array<UniqueVisitorsDataPoint>;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
264
|
export interface VisitorDataPoint {
|
|
335
265
|
desktop?: number;
|
|
336
266
|
|
|
@@ -423,19 +353,33 @@ export interface VisitorProfileResponse {
|
|
|
423
353
|
visitor_id?: string;
|
|
424
354
|
}
|
|
425
355
|
|
|
426
|
-
export interface VisitorsByCountryResponse {
|
|
427
|
-
data?: Array<CountryDataPoint>;
|
|
428
|
-
}
|
|
429
|
-
|
|
430
356
|
export interface VisitorsByDeviceResponse {
|
|
431
357
|
data?: Array<VisitorDataPoint>;
|
|
432
358
|
}
|
|
433
359
|
|
|
434
|
-
export interface
|
|
435
|
-
data?: Array<
|
|
360
|
+
export interface AnalyticsRetrieveTimelineResponse {
|
|
361
|
+
data?: Array<AnalyticsRetrieveTimelineResponse.Data>;
|
|
362
|
+
|
|
363
|
+
precision?: 'minutes' | 'hourly' | 'daily' | 'weekly' | 'monthly';
|
|
364
|
+
|
|
365
|
+
total_visits?: number;
|
|
436
366
|
}
|
|
437
367
|
|
|
438
|
-
export
|
|
368
|
+
export namespace AnalyticsRetrieveTimelineResponse {
|
|
369
|
+
export interface Data {
|
|
370
|
+
num_desktop_visits?: number;
|
|
371
|
+
|
|
372
|
+
num_mobile_visits?: number;
|
|
373
|
+
|
|
374
|
+
num_revenue?: number;
|
|
375
|
+
|
|
376
|
+
num_unknown_visits?: number;
|
|
377
|
+
|
|
378
|
+
time_bucket?: string;
|
|
379
|
+
}
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
export interface AnalyticsRetrieveTimelineParams {
|
|
439
383
|
project_id: string;
|
|
440
384
|
|
|
441
385
|
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
@@ -460,47 +404,34 @@ Analytics.Events = Events;
|
|
|
460
404
|
Analytics.Sessions = Sessions;
|
|
461
405
|
Analytics.Users = Users;
|
|
462
406
|
Analytics.Retention = Retention;
|
|
407
|
+
Analytics.Tiles = Tiles;
|
|
463
408
|
|
|
464
409
|
export declare namespace Analytics {
|
|
465
410
|
export {
|
|
466
|
-
type ActiveUsersResponse as ActiveUsersResponse,
|
|
467
|
-
type BounceRateByPageMetric as BounceRateByPageMetric,
|
|
468
|
-
type BounceRateResponse as BounceRateResponse,
|
|
469
411
|
type ChurnRateResponse as ChurnRateResponse,
|
|
470
412
|
type CohortAnalysisResponse as CohortAnalysisResponse,
|
|
471
413
|
type CohortData as CohortData,
|
|
472
|
-
type CountryDataPoint as CountryDataPoint,
|
|
473
|
-
type DashboardMetricsResponse as DashboardMetricsResponse,
|
|
474
414
|
type EventFilterOptionsResponse as EventFilterOptionsResponse,
|
|
475
415
|
type EventsOverTimeDataPoint as EventsOverTimeDataPoint,
|
|
476
416
|
type ManualIdentifyRequest as ManualIdentifyRequest,
|
|
477
417
|
type ManualIdentifyResponse as ManualIdentifyResponse,
|
|
478
|
-
type OriginDataPoint as OriginDataPoint,
|
|
479
418
|
type RecentEvent as RecentEvent,
|
|
480
419
|
type RecentEventsResponse as RecentEventsResponse,
|
|
481
|
-
type ReturnRateResponse as ReturnRateResponse,
|
|
482
|
-
type SessionMetricsResponse as SessionMetricsResponse,
|
|
483
420
|
type TopVisitor as TopVisitor,
|
|
484
421
|
type TopVisitorsResponse as TopVisitorsResponse,
|
|
485
|
-
type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint,
|
|
486
|
-
type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse,
|
|
487
422
|
type VisitorDataPoint as VisitorDataPoint,
|
|
488
423
|
type VisitorEvent as VisitorEvent,
|
|
489
424
|
type VisitorProfileResponse as VisitorProfileResponse,
|
|
490
|
-
type VisitorsByCountryResponse as VisitorsByCountryResponse,
|
|
491
425
|
type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
|
|
492
|
-
type
|
|
493
|
-
type
|
|
426
|
+
type AnalyticsRetrieveTimelineResponse as AnalyticsRetrieveTimelineResponse,
|
|
427
|
+
type AnalyticsRetrieveTimelineParams as AnalyticsRetrieveTimelineParams,
|
|
494
428
|
};
|
|
495
429
|
|
|
496
430
|
export {
|
|
497
431
|
Visitors as Visitors,
|
|
498
|
-
type VisitorByCountryParams as VisitorByCountryParams,
|
|
499
432
|
type VisitorByDeviceParams as VisitorByDeviceParams,
|
|
500
|
-
type VisitorByOriginParams as VisitorByOriginParams,
|
|
501
433
|
type VisitorIdentifyParams as VisitorIdentifyParams,
|
|
502
434
|
type VisitorProfileParams as VisitorProfileParams,
|
|
503
|
-
type VisitorTimelineParams as VisitorTimelineParams,
|
|
504
435
|
type VisitorTopParams as VisitorTopParams,
|
|
505
436
|
};
|
|
506
437
|
|
|
@@ -510,18 +441,43 @@ export declare namespace Analytics {
|
|
|
510
441
|
type EventRecentParams as EventRecentParams,
|
|
511
442
|
};
|
|
512
443
|
|
|
513
|
-
export {
|
|
514
|
-
Sessions as Sessions,
|
|
515
|
-
type SessionBounceRateParams as SessionBounceRateParams,
|
|
516
|
-
type SessionMetricsParams as SessionMetricsParams,
|
|
517
|
-
};
|
|
444
|
+
export { Sessions as Sessions };
|
|
518
445
|
|
|
519
|
-
export { Users as Users
|
|
446
|
+
export { Users as Users };
|
|
520
447
|
|
|
521
448
|
export {
|
|
522
449
|
Retention as Retention,
|
|
523
450
|
type RetentionChurnRateParams as RetentionChurnRateParams,
|
|
524
451
|
type RetentionCohortsParams as RetentionCohortsParams,
|
|
525
|
-
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
export {
|
|
455
|
+
Tiles as Tiles,
|
|
456
|
+
type TileGetBounceRateResponse as TileGetBounceRateResponse,
|
|
457
|
+
type TileGetDailyActiveUsersResponse as TileGetDailyActiveUsersResponse,
|
|
458
|
+
type TileGetMonthlyActiveUsersResponse as TileGetMonthlyActiveUsersResponse,
|
|
459
|
+
type TileGetPagesPerSessionResponse as TileGetPagesPerSessionResponse,
|
|
460
|
+
type TileGetReturnRateResponse as TileGetReturnRateResponse,
|
|
461
|
+
type TileGetSessionDurationResponse as TileGetSessionDurationResponse,
|
|
462
|
+
type TileGetTimeBetweenVisitsResponse as TileGetTimeBetweenVisitsResponse,
|
|
463
|
+
type TileGetTrafficByCountryResponse as TileGetTrafficByCountryResponse,
|
|
464
|
+
type TileGetTrafficByRefererResponse as TileGetTrafficByRefererResponse,
|
|
465
|
+
type TileGetTrafficByUtmResponse as TileGetTrafficByUtmResponse,
|
|
466
|
+
type TileGetUniqueSessionsResponse as TileGetUniqueSessionsResponse,
|
|
467
|
+
type TileGetUniqueVisitorsResponse as TileGetUniqueVisitorsResponse,
|
|
468
|
+
type TileGetWeeklyActiveUsersResponse as TileGetWeeklyActiveUsersResponse,
|
|
469
|
+
type TileGetBounceRateParams as TileGetBounceRateParams,
|
|
470
|
+
type TileGetDailyActiveUsersParams as TileGetDailyActiveUsersParams,
|
|
471
|
+
type TileGetMonthlyActiveUsersParams as TileGetMonthlyActiveUsersParams,
|
|
472
|
+
type TileGetPagesPerSessionParams as TileGetPagesPerSessionParams,
|
|
473
|
+
type TileGetReturnRateParams as TileGetReturnRateParams,
|
|
474
|
+
type TileGetSessionDurationParams as TileGetSessionDurationParams,
|
|
475
|
+
type TileGetTimeBetweenVisitsParams as TileGetTimeBetweenVisitsParams,
|
|
476
|
+
type TileGetTrafficByCountryParams as TileGetTrafficByCountryParams,
|
|
477
|
+
type TileGetTrafficByRefererParams as TileGetTrafficByRefererParams,
|
|
478
|
+
type TileGetTrafficByUtmParams as TileGetTrafficByUtmParams,
|
|
479
|
+
type TileGetUniqueSessionsParams as TileGetUniqueSessionsParams,
|
|
480
|
+
type TileGetUniqueVisitorsParams as TileGetUniqueVisitorsParams,
|
|
481
|
+
type TileGetWeeklyActiveUsersParams as TileGetWeeklyActiveUsersParams,
|
|
526
482
|
};
|
|
527
483
|
}
|
|
@@ -2,51 +2,61 @@
|
|
|
2
2
|
|
|
3
3
|
export {
|
|
4
4
|
Analytics,
|
|
5
|
-
type ActiveUsersResponse,
|
|
6
|
-
type BounceRateByPageMetric,
|
|
7
|
-
type BounceRateResponse,
|
|
8
5
|
type ChurnRateResponse,
|
|
9
6
|
type CohortAnalysisResponse,
|
|
10
7
|
type CohortData,
|
|
11
|
-
type CountryDataPoint,
|
|
12
|
-
type DashboardMetricsResponse,
|
|
13
8
|
type EventFilterOptionsResponse,
|
|
14
9
|
type EventsOverTimeDataPoint,
|
|
15
10
|
type ManualIdentifyRequest,
|
|
16
11
|
type ManualIdentifyResponse,
|
|
17
|
-
type OriginDataPoint,
|
|
18
12
|
type RecentEvent,
|
|
19
13
|
type RecentEventsResponse,
|
|
20
|
-
type ReturnRateResponse,
|
|
21
|
-
type SessionMetricsResponse,
|
|
22
14
|
type TopVisitor,
|
|
23
15
|
type TopVisitorsResponse,
|
|
24
|
-
type UniqueVisitorsDataPoint,
|
|
25
|
-
type UniqueVisitorsTimelineResponse,
|
|
26
16
|
type VisitorDataPoint,
|
|
27
17
|
type VisitorEvent,
|
|
28
18
|
type VisitorProfileResponse,
|
|
29
|
-
type VisitorsByCountryResponse,
|
|
30
19
|
type VisitorsByDeviceResponse,
|
|
31
|
-
type
|
|
32
|
-
type
|
|
20
|
+
type AnalyticsRetrieveTimelineResponse,
|
|
21
|
+
type AnalyticsRetrieveTimelineParams,
|
|
33
22
|
} from './analytics';
|
|
34
23
|
export { Events, type EventFilterOptionsParams, type EventRecentParams } from './events';
|
|
24
|
+
export { Retention, type RetentionChurnRateParams, type RetentionCohortsParams } from './retention';
|
|
25
|
+
export { Sessions } from './sessions';
|
|
35
26
|
export {
|
|
36
|
-
|
|
37
|
-
type
|
|
38
|
-
type
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
27
|
+
Tiles,
|
|
28
|
+
type TileGetBounceRateResponse,
|
|
29
|
+
type TileGetDailyActiveUsersResponse,
|
|
30
|
+
type TileGetMonthlyActiveUsersResponse,
|
|
31
|
+
type TileGetPagesPerSessionResponse,
|
|
32
|
+
type TileGetReturnRateResponse,
|
|
33
|
+
type TileGetSessionDurationResponse,
|
|
34
|
+
type TileGetTimeBetweenVisitsResponse,
|
|
35
|
+
type TileGetTrafficByCountryResponse,
|
|
36
|
+
type TileGetTrafficByRefererResponse,
|
|
37
|
+
type TileGetTrafficByUtmResponse,
|
|
38
|
+
type TileGetUniqueSessionsResponse,
|
|
39
|
+
type TileGetUniqueVisitorsResponse,
|
|
40
|
+
type TileGetWeeklyActiveUsersResponse,
|
|
41
|
+
type TileGetBounceRateParams,
|
|
42
|
+
type TileGetDailyActiveUsersParams,
|
|
43
|
+
type TileGetMonthlyActiveUsersParams,
|
|
44
|
+
type TileGetPagesPerSessionParams,
|
|
45
|
+
type TileGetReturnRateParams,
|
|
46
|
+
type TileGetSessionDurationParams,
|
|
47
|
+
type TileGetTimeBetweenVisitsParams,
|
|
48
|
+
type TileGetTrafficByCountryParams,
|
|
49
|
+
type TileGetTrafficByRefererParams,
|
|
50
|
+
type TileGetTrafficByUtmParams,
|
|
51
|
+
type TileGetUniqueSessionsParams,
|
|
52
|
+
type TileGetUniqueVisitorsParams,
|
|
53
|
+
type TileGetWeeklyActiveUsersParams,
|
|
54
|
+
} from './tiles';
|
|
55
|
+
export { Users } from './users';
|
|
43
56
|
export {
|
|
44
57
|
Visitors,
|
|
45
|
-
type VisitorByCountryParams,
|
|
46
58
|
type VisitorByDeviceParams,
|
|
47
|
-
type VisitorByOriginParams,
|
|
48
59
|
type VisitorIdentifyParams,
|
|
49
60
|
type VisitorProfileParams,
|
|
50
|
-
type VisitorTimelineParams,
|
|
51
61
|
type VisitorTopParams,
|
|
52
62
|
} 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
|
}
|
|
@@ -1,93 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
import { APIResource } from '../../../core/resource';
|
|
4
|
-
import * as AnalyticsAPI from './analytics';
|
|
5
|
-
import { APIPromise } from '../../../core/api-promise';
|
|
6
|
-
import { RequestOptions } from '../../../internal/request-options';
|
|
7
4
|
|
|
8
|
-
export class Sessions extends APIResource {
|
|
9
|
-
/**
|
|
10
|
-
* Get bounce rate metrics including overall bounce rate and per-page breakdown
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```ts
|
|
14
|
-
* const bounceRateResponse =
|
|
15
|
-
* await client.v1.analytics.sessions.bounceRate({
|
|
16
|
-
* project_id: 'project_id',
|
|
17
|
-
* time_range: 'last_hour',
|
|
18
|
-
* });
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
bounceRate(
|
|
22
|
-
query: SessionBounceRateParams,
|
|
23
|
-
options?: RequestOptions,
|
|
24
|
-
): APIPromise<AnalyticsAPI.BounceRateResponse> {
|
|
25
|
-
return this._client.get('/api/v1/analytics/sessions/bounce-rate', { query, ...options });
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/**
|
|
29
|
-
* Get session metrics including average duration and pages per session
|
|
30
|
-
*
|
|
31
|
-
* @example
|
|
32
|
-
* ```ts
|
|
33
|
-
* const sessionMetricsResponse =
|
|
34
|
-
* await client.v1.analytics.sessions.metrics({
|
|
35
|
-
* project_id: 'project_id',
|
|
36
|
-
* time_range: 'last_hour',
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
metrics(
|
|
41
|
-
query: SessionMetricsParams,
|
|
42
|
-
options?: RequestOptions,
|
|
43
|
-
): APIPromise<AnalyticsAPI.SessionMetricsResponse> {
|
|
44
|
-
return this._client.get('/api/v1/analytics/sessions/metrics', { query, ...options });
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export interface SessionBounceRateParams {
|
|
49
|
-
project_id: string;
|
|
50
|
-
|
|
51
|
-
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
52
|
-
|
|
53
|
-
customer_id?: string;
|
|
54
|
-
|
|
55
|
-
limit?: number;
|
|
56
|
-
|
|
57
|
-
offset?: number;
|
|
58
|
-
|
|
59
|
-
referrer?: string;
|
|
60
|
-
|
|
61
|
-
utmtag?: string;
|
|
62
|
-
|
|
63
|
-
utmtagValue?: string;
|
|
64
|
-
|
|
65
|
-
visitor_id?: string;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export interface SessionMetricsParams {
|
|
69
|
-
project_id: string;
|
|
70
|
-
|
|
71
|
-
time_range: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
72
|
-
|
|
73
|
-
customer_id?: string;
|
|
74
|
-
|
|
75
|
-
limit?: number;
|
|
76
|
-
|
|
77
|
-
offset?: number;
|
|
78
|
-
|
|
79
|
-
referrer?: string;
|
|
80
|
-
|
|
81
|
-
utmtag?: string;
|
|
82
|
-
|
|
83
|
-
utmtagValue?: string;
|
|
84
|
-
|
|
85
|
-
visitor_id?: string;
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export declare namespace Sessions {
|
|
89
|
-
export {
|
|
90
|
-
type SessionBounceRateParams as SessionBounceRateParams,
|
|
91
|
-
type SessionMetricsParams as SessionMetricsParams,
|
|
92
|
-
};
|
|
93
|
-
}
|
|
5
|
+
export class Sessions extends APIResource {}
|