zorihq 0.11.1 → 0.12.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 (80) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/resources/v1/analytics/analytics.d.mts +13 -43
  4. package/resources/v1/analytics/analytics.d.mts.map +1 -1
  5. package/resources/v1/analytics/analytics.d.ts +13 -43
  6. package/resources/v1/analytics/analytics.d.ts.map +1 -1
  7. package/resources/v1/analytics/analytics.js +4 -2
  8. package/resources/v1/analytics/analytics.js.map +1 -1
  9. package/resources/v1/analytics/analytics.mjs +4 -2
  10. package/resources/v1/analytics/analytics.mjs.map +1 -1
  11. package/resources/v1/analytics/events.d.mts +30 -42
  12. package/resources/v1/analytics/events.d.mts.map +1 -1
  13. package/resources/v1/analytics/events.d.ts +30 -42
  14. package/resources/v1/analytics/events.d.ts.map +1 -1
  15. package/resources/v1/analytics/events.js +8 -2
  16. package/resources/v1/analytics/events.js.map +1 -1
  17. package/resources/v1/analytics/events.mjs +8 -2
  18. package/resources/v1/analytics/events.mjs.map +1 -1
  19. package/resources/v1/analytics/retention.d.mts +39 -34
  20. package/resources/v1/analytics/retention.d.mts.map +1 -1
  21. package/resources/v1/analytics/retention.d.ts +39 -34
  22. package/resources/v1/analytics/retention.d.ts.map +1 -1
  23. package/resources/v1/analytics/retention.js +12 -6
  24. package/resources/v1/analytics/retention.js.map +1 -1
  25. package/resources/v1/analytics/retention.mjs +12 -6
  26. package/resources/v1/analytics/retention.mjs.map +1 -1
  27. package/resources/v1/analytics/sessions.d.mts +26 -24
  28. package/resources/v1/analytics/sessions.d.mts.map +1 -1
  29. package/resources/v1/analytics/sessions.d.ts +26 -24
  30. package/resources/v1/analytics/sessions.d.ts.map +1 -1
  31. package/resources/v1/analytics/sessions.js +8 -4
  32. package/resources/v1/analytics/sessions.js.map +1 -1
  33. package/resources/v1/analytics/sessions.mjs +8 -4
  34. package/resources/v1/analytics/sessions.mjs.map +1 -1
  35. package/resources/v1/analytics/users.d.mts +13 -5
  36. package/resources/v1/analytics/users.d.mts.map +1 -1
  37. package/resources/v1/analytics/users.d.ts +13 -5
  38. package/resources/v1/analytics/users.d.ts.map +1 -1
  39. package/resources/v1/analytics/users.js +4 -1
  40. package/resources/v1/analytics/users.js.map +1 -1
  41. package/resources/v1/analytics/users.mjs +4 -1
  42. package/resources/v1/analytics/users.mjs.map +1 -1
  43. package/resources/v1/analytics/visitors.d.mts +78 -64
  44. package/resources/v1/analytics/visitors.d.mts.map +1 -1
  45. package/resources/v1/analytics/visitors.d.ts +78 -64
  46. package/resources/v1/analytics/visitors.d.ts.map +1 -1
  47. package/resources/v1/analytics/visitors.js +24 -12
  48. package/resources/v1/analytics/visitors.js.map +1 -1
  49. package/resources/v1/analytics/visitors.mjs +24 -12
  50. package/resources/v1/analytics/visitors.mjs.map +1 -1
  51. package/resources/v1/payment-providers/payment-providers.d.mts +0 -3
  52. package/resources/v1/payment-providers/payment-providers.d.mts.map +1 -1
  53. package/resources/v1/payment-providers/payment-providers.d.ts +0 -3
  54. package/resources/v1/payment-providers/payment-providers.d.ts.map +1 -1
  55. package/resources/v1/payment-providers/payment-providers.js.map +1 -1
  56. package/resources/v1/payment-providers/payment-providers.mjs.map +1 -1
  57. package/resources/v1/revenue/cohort.d.mts +0 -39
  58. package/resources/v1/revenue/cohort.d.mts.map +1 -1
  59. package/resources/v1/revenue/cohort.d.ts +0 -39
  60. package/resources/v1/revenue/cohort.d.ts.map +1 -1
  61. package/resources/v1/revenue/revenue.d.mts +0 -84
  62. package/resources/v1/revenue/revenue.d.mts.map +1 -1
  63. package/resources/v1/revenue/revenue.d.ts +0 -84
  64. package/resources/v1/revenue/revenue.d.ts.map +1 -1
  65. package/resources/v1/revenue/revenue.js.map +1 -1
  66. package/resources/v1/revenue/revenue.mjs.map +1 -1
  67. package/src/resources/v1/analytics/analytics.ts +20 -43
  68. package/src/resources/v1/analytics/events.ts +42 -42
  69. package/src/resources/v1/analytics/retention.ts +59 -34
  70. package/src/resources/v1/analytics/sessions.ts +39 -24
  71. package/src/resources/v1/analytics/users.ts +21 -5
  72. package/src/resources/v1/analytics/visitors.ts +119 -64
  73. package/src/resources/v1/payment-providers/payment-providers.ts +0 -3
  74. package/src/resources/v1/revenue/cohort.ts +0 -39
  75. package/src/resources/v1/revenue/revenue.ts +0 -84
  76. package/src/version.ts +1 -1
  77. package/version.d.mts +1 -1
  78. package/version.d.ts +1 -1
  79. package/version.js +1 -1
  80. package/version.mjs +1 -1
@@ -43,8 +43,10 @@ export class Analytics extends APIResource {
43
43
  * ```ts
44
44
  * const dashboardMetricsResponse =
45
45
  * await client.v1.analytics.dashboard({
46
- * project_id: 'project_id',
47
- * time_range: 'last_hour',
46
+ * limit: 1,
47
+ * offset: 0,
48
+ * projectID: 'projectID',
49
+ * timeBoundaries: 'last_hour',
48
50
  * });
49
51
  * ```
50
52
  */
@@ -120,35 +122,20 @@ export interface DashboardMetricsResponse {
120
122
 
121
123
  avg_session_duration_seconds?: number;
122
124
 
123
- /**
124
- * Engagement metrics
125
- */
126
125
  bounce_rate?: number;
127
126
 
128
- /**
129
- * Active users
130
- */
131
127
  dau?: number;
132
128
 
133
129
  mau?: number;
134
130
 
135
131
  return_rate?: number;
136
132
 
137
- /**
138
- * Sessions
139
- */
140
133
  sessions_today?: number;
141
134
 
142
- /**
143
- * Total metrics
144
- */
145
135
  total_events?: number;
146
136
 
147
137
  total_sessions_in_period?: number;
148
138
 
149
- /**
150
- * Total unique sessions in period
151
- */
152
139
  unique_sessions?: number;
153
140
 
154
141
  unique_visitors?: number;
@@ -157,14 +144,8 @@ export interface DashboardMetricsResponse {
157
144
  }
158
145
 
159
146
  export interface EventFilterOptionsResponse {
160
- /**
161
- * Unique page paths
162
- */
163
147
  pages?: Array<string>;
164
148
 
165
- /**
166
- * Unique referrer domains
167
- */
168
149
  traffic_origins?: Array<string>;
169
150
  }
170
151
 
@@ -215,16 +196,10 @@ export interface RecentEvent {
215
196
 
216
197
  click_element_selector?: string;
217
198
 
218
- /**
219
- * Click element details
220
- */
221
199
  click_element_tag?: string;
222
200
 
223
201
  click_element_text?: string;
224
202
 
225
- /**
226
- * Click element classification
227
- */
228
203
  click_element_type?: string;
229
204
 
230
205
  click_position_x?: number;
@@ -357,16 +332,10 @@ export interface VisitorEvent {
357
332
 
358
333
  click_element_selector?: string;
359
334
 
360
- /**
361
- * Click element details
362
- */
363
335
  click_element_tag?: string;
364
336
 
365
337
  click_element_text?: string;
366
338
 
367
- /**
368
- * Click element classification
369
- */
370
339
  click_element_type?: string;
371
340
 
372
341
  click_position_x?: number;
@@ -451,15 +420,23 @@ export interface VisitorsByOriginResponse {
451
420
  }
452
421
 
453
422
  export interface AnalyticsDashboardParams {
454
- /**
455
- * Project ID
456
- */
457
- project_id: string;
423
+ limit: number;
458
424
 
459
- /**
460
- * Time range
461
- */
462
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
425
+ offset: number;
426
+
427
+ projectID: string;
428
+
429
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
430
+
431
+ customerID?: string;
432
+
433
+ referrer?: string;
434
+
435
+ utmtag?: string;
436
+
437
+ utmtagValue?: string;
438
+
439
+ visitorID?: string;
463
440
  }
464
441
 
465
442
  Analytics.Visitors = Visitors;
@@ -13,7 +13,10 @@ export class Events extends APIResource {
13
13
  * ```ts
14
14
  * const eventFilterOptionsResponse =
15
15
  * await client.v1.analytics.events.filterOptions({
16
- * project_id: 'project_id',
16
+ * limit: 1,
17
+ * offset: 0,
18
+ * projectID: 'projectID',
19
+ * timeBoundaries: 'last_hour',
17
20
  * });
18
21
  * ```
19
22
  */
@@ -32,7 +35,10 @@ export class Events extends APIResource {
32
35
  * ```ts
33
36
  * const recentEventsResponse =
34
37
  * await client.v1.analytics.events.recent({
35
- * project_id: 'project_id',
38
+ * limit: 1,
39
+ * offset: 0,
40
+ * projectID: 'projectID',
41
+ * timeBoundaries: 'last_hour',
36
42
  * });
37
43
  * ```
38
44
  */
@@ -42,57 +48,51 @@ export class Events extends APIResource {
42
48
  }
43
49
 
44
50
  export interface EventFilterOptionsParams {
45
- /**
46
- * Project ID
47
- */
48
- project_id: string;
51
+ limit: number;
49
52
 
50
- /**
51
- * Time range
52
- */
53
- time_range?: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
53
+ offset: number;
54
+
55
+ projectID: string;
56
+
57
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
58
+
59
+ customerID?: string;
60
+
61
+ referrer?: string;
62
+
63
+ utmtag?: string;
64
+
65
+ utmtagValue?: string;
66
+
67
+ visitorID?: string;
54
68
  }
55
69
 
56
70
  export interface EventRecentParams {
57
- /**
58
- * Project ID
59
- */
60
- project_id: string;
71
+ limit: number;
61
72
 
62
- /**
63
- * Filter by external ID
64
- */
65
- external_id?: string;
73
+ offset: number;
66
74
 
67
- /**
68
- * Maximum number of events to return (default: 15)
69
- */
70
- limit?: number;
75
+ projectID: string;
71
76
 
72
- /**
73
- * Offset for pagination (default: 0)
74
- */
75
- offset?: number;
77
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
76
78
 
77
- /**
78
- * Filter by page path
79
- */
80
- page_path?: string;
79
+ customerID?: string;
81
80
 
82
- /**
83
- * Filter by traffic origin (referrer domain)
84
- */
85
- traffic_origin?: string;
81
+ externalID?: string;
86
82
 
87
- /**
88
- * Filter by user ID
89
- */
90
- user_id?: string;
83
+ pagePath?: string;
91
84
 
92
- /**
93
- * Filter by visitor ID
94
- */
95
- visitor_id?: string;
85
+ referrer?: string;
86
+
87
+ trafficOrigin?: string;
88
+
89
+ userID?: string;
90
+
91
+ utmtag?: string;
92
+
93
+ utmtagValue?: string;
94
+
95
+ visitorID?: string;
96
96
  }
97
97
 
98
98
  export declare namespace Events {
@@ -13,8 +13,10 @@ export class Retention extends APIResource {
13
13
  * ```ts
14
14
  * const churnRateResponse =
15
15
  * await client.v1.analytics.retention.churnRate({
16
- * project_id: 'project_id',
17
- * time_range: 'last_hour',
16
+ * limit: 1,
17
+ * offset: 0,
18
+ * projectID: 'projectID',
19
+ * timeBoundaries: 'last_hour',
18
20
  * });
19
21
  * ```
20
22
  */
@@ -32,8 +34,10 @@ export class Retention extends APIResource {
32
34
  * ```ts
33
35
  * const cohortAnalysisResponse =
34
36
  * await client.v1.analytics.retention.cohorts({
35
- * project_id: 'project_id',
36
- * time_range: 'last_hour',
37
+ * limit: 1,
38
+ * offset: 0,
39
+ * projectID: 'projectID',
40
+ * timeBoundaries: 'last_hour',
37
41
  * });
38
42
  * ```
39
43
  */
@@ -51,8 +55,10 @@ export class Retention extends APIResource {
51
55
  * ```ts
52
56
  * const returnRateResponse =
53
57
  * await client.v1.analytics.retention.returnRate({
54
- * project_id: 'project_id',
55
- * time_range: 'last_hour',
58
+ * limit: 1,
59
+ * offset: 0,
60
+ * projectID: 'projectID',
61
+ * timeBoundaries: 'last_hour',
56
62
  * });
57
63
  * ```
58
64
  */
@@ -65,44 +71,63 @@ export class Retention extends APIResource {
65
71
  }
66
72
 
67
73
  export interface RetentionChurnRateParams {
68
- /**
69
- * Project ID
70
- */
71
- project_id: string;
74
+ limit: number;
72
75
 
73
- /**
74
- * Time range
75
- */
76
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
76
+ offset: number;
77
77
 
78
- /**
79
- * Days of inactivity to consider churned (default: 30)
80
- */
81
- churn_threshold_days?: number;
78
+ projectID: string;
79
+
80
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
81
+
82
+ customerID?: string;
83
+
84
+ referrer?: string;
85
+
86
+ utmtag?: string;
87
+
88
+ utmtagValue?: string;
89
+
90
+ visitorID?: string;
82
91
  }
83
92
 
84
93
  export interface RetentionCohortsParams {
85
- /**
86
- * Project ID
87
- */
88
- project_id: string;
94
+ limit: number;
89
95
 
90
- /**
91
- * Time range
92
- */
93
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
96
+ offset: number;
97
+
98
+ projectID: string;
99
+
100
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
101
+
102
+ customerID?: string;
103
+
104
+ referrer?: string;
105
+
106
+ utmtag?: string;
107
+
108
+ utmtagValue?: string;
109
+
110
+ visitorID?: string;
94
111
  }
95
112
 
96
113
  export interface RetentionReturnRateParams {
97
- /**
98
- * Project ID
99
- */
100
- project_id: string;
114
+ limit: number;
101
115
 
102
- /**
103
- * Time range
104
- */
105
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
116
+ offset: number;
117
+
118
+ projectID: string;
119
+
120
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
121
+
122
+ customerID?: string;
123
+
124
+ referrer?: string;
125
+
126
+ utmtag?: string;
127
+
128
+ utmtagValue?: string;
129
+
130
+ visitorID?: string;
106
131
  }
107
132
 
108
133
  export declare namespace Retention {
@@ -13,8 +13,10 @@ export class Sessions extends APIResource {
13
13
  * ```ts
14
14
  * const bounceRateResponse =
15
15
  * await client.v1.analytics.sessions.bounceRate({
16
- * project_id: 'project_id',
17
- * time_range: 'last_hour',
16
+ * limit: 1,
17
+ * offset: 0,
18
+ * projectID: 'projectID',
19
+ * timeBoundaries: 'last_hour',
18
20
  * });
19
21
  * ```
20
22
  */
@@ -32,8 +34,10 @@ export class Sessions extends APIResource {
32
34
  * ```ts
33
35
  * const sessionMetricsResponse =
34
36
  * await client.v1.analytics.sessions.metrics({
35
- * project_id: 'project_id',
36
- * time_range: 'last_hour',
37
+ * limit: 1,
38
+ * offset: 0,
39
+ * projectID: 'projectID',
40
+ * timeBoundaries: 'last_hour',
37
41
  * });
38
42
  * ```
39
43
  */
@@ -46,32 +50,43 @@ export class Sessions extends APIResource {
46
50
  }
47
51
 
48
52
  export interface SessionBounceRateParams {
49
- /**
50
- * Project ID
51
- */
52
- project_id: string;
53
+ limit: number;
53
54
 
54
- /**
55
- * Time range
56
- */
57
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
55
+ offset: number;
58
56
 
59
- /**
60
- * Limit for per-page breakdown (default: 20)
61
- */
62
- limit?: number;
57
+ projectID: string;
58
+
59
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
60
+
61
+ customerID?: string;
62
+
63
+ referrer?: string;
64
+
65
+ utmtag?: string;
66
+
67
+ utmtagValue?: string;
68
+
69
+ visitorID?: string;
63
70
  }
64
71
 
65
72
  export interface SessionMetricsParams {
66
- /**
67
- * Project ID
68
- */
69
- project_id: string;
73
+ limit: number;
70
74
 
71
- /**
72
- * Time range
73
- */
74
- time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
75
+ offset: number;
76
+
77
+ projectID: string;
78
+
79
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
80
+
81
+ customerID?: string;
82
+
83
+ referrer?: string;
84
+
85
+ utmtag?: string;
86
+
87
+ utmtagValue?: string;
88
+
89
+ visitorID?: string;
75
90
  }
76
91
 
77
92
  export declare namespace Sessions {
@@ -13,7 +13,10 @@ export class Users extends APIResource {
13
13
  * ```ts
14
14
  * const activeUsersResponse =
15
15
  * await client.v1.analytics.users.active({
16
- * project_id: 'project_id',
16
+ * limit: 1,
17
+ * offset: 0,
18
+ * projectID: 'projectID',
19
+ * timeBoundaries: 'last_hour',
17
20
  * });
18
21
  * ```
19
22
  */
@@ -23,10 +26,23 @@ export class Users extends APIResource {
23
26
  }
24
27
 
25
28
  export interface UserActiveParams {
26
- /**
27
- * Project ID
28
- */
29
- project_id: string;
29
+ limit: number;
30
+
31
+ offset: number;
32
+
33
+ projectID: string;
34
+
35
+ timeBoundaries: 'last_hour' | 'today' | 'yesterday' | 'last_7_days' | 'last_30_days' | 'last_90_days';
36
+
37
+ customerID?: string;
38
+
39
+ referrer?: string;
40
+
41
+ utmtag?: string;
42
+
43
+ utmtagValue?: string;
44
+
45
+ visitorID?: string;
30
46
  }
31
47
 
32
48
  export declare namespace Users {