zorihq 0.7.0 → 0.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/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/resources/v1/analytics/analytics.d.mts +145 -3
- package/resources/v1/analytics/analytics.d.mts.map +1 -1
- package/resources/v1/analytics/analytics.d.ts +145 -3
- package/resources/v1/analytics/analytics.d.ts.map +1 -1
- package/resources/v1/analytics/analytics.js +4 -0
- package/resources/v1/analytics/analytics.js.map +1 -1
- package/resources/v1/analytics/analytics.mjs +4 -0
- package/resources/v1/analytics/analytics.mjs.map +1 -1
- package/resources/v1/analytics/events.d.mts +49 -2
- package/resources/v1/analytics/events.d.mts.map +1 -1
- package/resources/v1/analytics/events.d.ts +49 -2
- package/resources/v1/analytics/events.d.ts.map +1 -1
- package/resources/v1/analytics/events.js +16 -1
- package/resources/v1/analytics/events.js.map +1 -1
- package/resources/v1/analytics/events.mjs +16 -1
- package/resources/v1/analytics/events.mjs.map +1 -1
- package/resources/v1/analytics/index.d.mts +3 -2
- package/resources/v1/analytics/index.d.mts.map +1 -1
- package/resources/v1/analytics/index.d.ts +3 -2
- 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 +1 -0
- package/resources/v1/analytics/index.mjs.map +1 -1
- package/resources/v1/analytics/revenue.d.mts +60 -0
- package/resources/v1/analytics/revenue.d.mts.map +1 -0
- package/resources/v1/analytics/revenue.d.ts +60 -0
- package/resources/v1/analytics/revenue.d.ts.map +1 -0
- package/resources/v1/analytics/revenue.js +39 -0
- package/resources/v1/analytics/revenue.js.map +1 -0
- package/resources/v1/analytics/revenue.mjs +35 -0
- package/resources/v1/analytics/revenue.mjs.map +1 -0
- 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 +217 -2
- package/src/resources/v1/analytics/events.ts +66 -2
- package/src/resources/v1/analytics/index.ts +8 -1
- package/src/resources/v1/analytics/revenue.ts +79 -0
- package/src/resources/v1/index.ts +6 -0
- package/src/resources/v1/v1.ts +12 -0
- 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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
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
|
+
|
|
8
|
+
export class Revenue extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Get revenue metrics grouped by UTM source, medium, or campaign
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const revenueByUtmResponse =
|
|
15
|
+
* await client.v1.analytics.revenue.byUtm({
|
|
16
|
+
* project_id: 'project_id',
|
|
17
|
+
* time_range: 'last_hour',
|
|
18
|
+
* });
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
byUtm(query: RevenueByUtmParams, options?: RequestOptions): APIPromise<AnalyticsAPI.RevenueByUtmResponse> {
|
|
22
|
+
return this._client.get('/api/v1/analytics/revenue/by-utm', { query, ...options });
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Get revenue metrics over time for chart visualization
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```ts
|
|
30
|
+
* const revenueTimelineResponse =
|
|
31
|
+
* await client.v1.analytics.revenue.timeline({
|
|
32
|
+
* project_id: 'project_id',
|
|
33
|
+
* time_range: 'last_hour',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
timeline(
|
|
38
|
+
query: RevenueTimelineParams,
|
|
39
|
+
options?: RequestOptions,
|
|
40
|
+
): APIPromise<AnalyticsAPI.RevenueTimelineResponse> {
|
|
41
|
+
return this._client.get('/api/v1/analytics/revenue/timeline', { query, ...options });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface RevenueByUtmParams {
|
|
46
|
+
/**
|
|
47
|
+
* Project ID
|
|
48
|
+
*/
|
|
49
|
+
project_id: string;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Time range
|
|
53
|
+
*/
|
|
54
|
+
time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* UTM type: source, medium, or campaign (default: source)
|
|
58
|
+
*/
|
|
59
|
+
utm_type?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface RevenueTimelineParams {
|
|
63
|
+
/**
|
|
64
|
+
* Project ID
|
|
65
|
+
*/
|
|
66
|
+
project_id: string;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Time range
|
|
70
|
+
*/
|
|
71
|
+
time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export declare namespace Revenue {
|
|
75
|
+
export {
|
|
76
|
+
type RevenueByUtmParams as RevenueByUtmParams,
|
|
77
|
+
type RevenueTimelineParams as RevenueTimelineParams,
|
|
78
|
+
};
|
|
79
|
+
}
|
|
@@ -10,6 +10,7 @@ export {
|
|
|
10
10
|
type CohortData,
|
|
11
11
|
type CountryDataPoint,
|
|
12
12
|
type DashboardMetricsResponse,
|
|
13
|
+
type EventFilterOptionsResponse,
|
|
13
14
|
type EventsOverTimeDataPoint,
|
|
14
15
|
type ManualIdentifyRequest,
|
|
15
16
|
type ManualIdentifyResponse,
|
|
@@ -17,13 +18,18 @@ export {
|
|
|
17
18
|
type RecentEvent,
|
|
18
19
|
type RecentEventsResponse,
|
|
19
20
|
type ReturnRateResponse,
|
|
21
|
+
type RevenueByUtmResponse,
|
|
22
|
+
type RevenueTimelineDataPoint,
|
|
23
|
+
type RevenueTimelineResponse,
|
|
20
24
|
type SessionMetricsResponse,
|
|
21
25
|
type TopVisitor,
|
|
22
26
|
type TopVisitorsResponse,
|
|
23
27
|
type UniqueVisitorsDataPoint,
|
|
24
28
|
type UniqueVisitorsTimelineResponse,
|
|
29
|
+
type UtmRevenueDataPoint,
|
|
25
30
|
type VisitorDataPoint,
|
|
26
31
|
type VisitorEvent,
|
|
32
|
+
type VisitorPayment,
|
|
27
33
|
type VisitorProfileResponse,
|
|
28
34
|
type VisitorsByCountryResponse,
|
|
29
35
|
type VisitorsByDeviceResponse,
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -51,6 +51,7 @@ import {
|
|
|
51
51
|
CohortData,
|
|
52
52
|
CountryDataPoint,
|
|
53
53
|
DashboardMetricsResponse,
|
|
54
|
+
EventFilterOptionsResponse,
|
|
54
55
|
EventsOverTimeDataPoint,
|
|
55
56
|
ManualIdentifyRequest,
|
|
56
57
|
ManualIdentifyResponse,
|
|
@@ -58,13 +59,18 @@ import {
|
|
|
58
59
|
RecentEvent,
|
|
59
60
|
RecentEventsResponse,
|
|
60
61
|
ReturnRateResponse,
|
|
62
|
+
RevenueByUtmResponse,
|
|
63
|
+
RevenueTimelineDataPoint,
|
|
64
|
+
RevenueTimelineResponse,
|
|
61
65
|
SessionMetricsResponse,
|
|
62
66
|
TopVisitor,
|
|
63
67
|
TopVisitorsResponse,
|
|
64
68
|
UniqueVisitorsDataPoint,
|
|
65
69
|
UniqueVisitorsTimelineResponse,
|
|
70
|
+
UtmRevenueDataPoint,
|
|
66
71
|
VisitorDataPoint,
|
|
67
72
|
VisitorEvent,
|
|
73
|
+
VisitorPayment,
|
|
68
74
|
VisitorProfileResponse,
|
|
69
75
|
VisitorsByCountryResponse,
|
|
70
76
|
VisitorsByDeviceResponse,
|
|
@@ -96,6 +102,7 @@ export declare namespace V1 {
|
|
|
96
102
|
type CohortData as CohortData,
|
|
97
103
|
type CountryDataPoint as CountryDataPoint,
|
|
98
104
|
type DashboardMetricsResponse as DashboardMetricsResponse,
|
|
105
|
+
type EventFilterOptionsResponse as EventFilterOptionsResponse,
|
|
99
106
|
type EventsOverTimeDataPoint as EventsOverTimeDataPoint,
|
|
100
107
|
type ManualIdentifyRequest as ManualIdentifyRequest,
|
|
101
108
|
type ManualIdentifyResponse as ManualIdentifyResponse,
|
|
@@ -103,13 +110,18 @@ export declare namespace V1 {
|
|
|
103
110
|
type RecentEvent as RecentEvent,
|
|
104
111
|
type RecentEventsResponse as RecentEventsResponse,
|
|
105
112
|
type ReturnRateResponse as ReturnRateResponse,
|
|
113
|
+
type RevenueByUtmResponse as RevenueByUtmResponse,
|
|
114
|
+
type RevenueTimelineDataPoint as RevenueTimelineDataPoint,
|
|
115
|
+
type RevenueTimelineResponse as RevenueTimelineResponse,
|
|
106
116
|
type SessionMetricsResponse as SessionMetricsResponse,
|
|
107
117
|
type TopVisitor as TopVisitor,
|
|
108
118
|
type TopVisitorsResponse as TopVisitorsResponse,
|
|
109
119
|
type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint,
|
|
110
120
|
type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse,
|
|
121
|
+
type UtmRevenueDataPoint as UtmRevenueDataPoint,
|
|
111
122
|
type VisitorDataPoint as VisitorDataPoint,
|
|
112
123
|
type VisitorEvent as VisitorEvent,
|
|
124
|
+
type VisitorPayment as VisitorPayment,
|
|
113
125
|
type VisitorProfileResponse as VisitorProfileResponse,
|
|
114
126
|
type VisitorsByCountryResponse as VisitorsByCountryResponse,
|
|
115
127
|
type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.8.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.8.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.8.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|