zorihq 0.8.0 → 0.9.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 +1 -124
- package/resources/v1/analytics/analytics.d.mts.map +1 -1
- package/resources/v1/analytics/analytics.d.ts +1 -124
- package/resources/v1/analytics/analytics.d.ts.map +1 -1
- package/resources/v1/analytics/analytics.js +0 -4
- package/resources/v1/analytics/analytics.js.map +1 -1
- package/resources/v1/analytics/analytics.mjs +0 -4
- package/resources/v1/analytics/analytics.mjs.map +1 -1
- package/resources/v1/analytics/index.d.mts +1 -2
- package/resources/v1/analytics/index.d.mts.map +1 -1
- package/resources/v1/analytics/index.d.ts +1 -2
- package/resources/v1/analytics/index.d.ts.map +1 -1
- package/resources/v1/analytics/index.js +1 -3
- package/resources/v1/analytics/index.js.map +1 -1
- package/resources/v1/analytics/index.mjs +0 -1
- package/resources/v1/analytics/index.mjs.map +1 -1
- package/resources/v1/index.d.mts +2 -1
- package/resources/v1/index.d.mts.map +1 -1
- package/resources/v1/index.d.ts +2 -1
- package/resources/v1/index.d.ts.map +1 -1
- package/resources/v1/index.js +3 -1
- package/resources/v1/index.js.map +1 -1
- package/resources/v1/index.mjs +1 -0
- package/resources/v1/index.mjs.map +1 -1
- package/resources/v1/{analytics/revenue.d.mts → revenue/attribution.d.mts} +21 -19
- package/resources/v1/revenue/attribution.d.mts.map +1 -0
- package/resources/v1/{analytics/revenue.d.ts → revenue/attribution.d.ts} +21 -19
- package/resources/v1/revenue/attribution.d.ts.map +1 -0
- package/resources/v1/revenue/attribution.js +41 -0
- package/resources/v1/revenue/attribution.js.map +1 -0
- package/resources/v1/revenue/attribution.mjs +37 -0
- package/resources/v1/revenue/attribution.mjs.map +1 -0
- package/resources/v1/revenue/conversion.d.mts +34 -0
- package/resources/v1/revenue/conversion.d.mts.map +1 -0
- package/resources/v1/revenue/conversion.d.ts +34 -0
- package/resources/v1/revenue/conversion.d.ts.map +1 -0
- package/resources/v1/revenue/conversion.js +25 -0
- package/resources/v1/revenue/conversion.js.map +1 -0
- package/resources/v1/revenue/conversion.mjs +21 -0
- package/resources/v1/revenue/conversion.mjs.map +1 -0
- package/resources/v1/revenue/customers.d.mts +61 -0
- package/resources/v1/revenue/customers.d.mts.map +1 -0
- package/resources/v1/revenue/customers.d.ts +61 -0
- package/resources/v1/revenue/customers.d.ts.map +1 -0
- package/resources/v1/revenue/customers.js +40 -0
- package/resources/v1/revenue/customers.js.map +1 -0
- package/resources/v1/revenue/customers.mjs +36 -0
- package/resources/v1/revenue/customers.mjs.map +1 -0
- package/resources/v1/revenue/index.d.mts +5 -0
- package/resources/v1/revenue/index.d.mts.map +1 -0
- package/resources/v1/revenue/index.d.ts +5 -0
- package/resources/v1/revenue/index.d.ts.map +1 -0
- package/resources/v1/revenue/index.js +13 -0
- package/resources/v1/revenue/index.js.map +1 -0
- package/resources/v1/revenue/index.mjs +6 -0
- package/resources/v1/revenue/index.mjs.map +1 -0
- package/resources/v1/revenue/revenue.d.mts +255 -0
- package/resources/v1/revenue/revenue.d.mts.map +1 -0
- package/resources/v1/revenue/revenue.d.ts +255 -0
- package/resources/v1/revenue/revenue.d.ts.map +1 -0
- package/resources/v1/revenue/revenue.js +53 -0
- package/resources/v1/revenue/revenue.js.map +1 -0
- package/resources/v1/revenue/revenue.mjs +48 -0
- package/resources/v1/revenue/revenue.mjs.map +1 -0
- package/resources/v1/revenue.d.mts +2 -0
- package/resources/v1/revenue.d.mts.map +1 -0
- package/resources/v1/revenue.d.ts +2 -0
- package/resources/v1/revenue.d.ts.map +1 -0
- package/resources/v1/revenue.js +6 -0
- package/resources/v1/revenue.js.map +1 -0
- package/resources/v1/revenue.mjs +3 -0
- package/resources/v1/revenue.mjs.map +1 -0
- package/resources/v1/v1.d.mts +6 -2
- package/resources/v1/v1.d.mts.map +1 -1
- package/resources/v1/v1.d.ts +6 -2
- package/resources/v1/v1.d.ts.map +1 -1
- package/resources/v1/v1.js +4 -0
- package/resources/v1/v1.js.map +1 -1
- package/resources/v1/v1.mjs +4 -0
- package/resources/v1/v1.mjs.map +1 -1
- package/src/resources/v1/analytics/analytics.ts +0 -183
- package/src/resources/v1/analytics/index.ts +0 -6
- package/src/resources/v1/index.ts +18 -5
- package/src/resources/v1/{analytics/revenue.ts → revenue/attribution.ts} +29 -24
- package/src/resources/v1/revenue/conversion.ts +44 -0
- package/src/resources/v1/revenue/customers.ts +77 -0
- package/src/resources/v1/revenue/index.ts +23 -0
- package/src/resources/v1/revenue/revenue.ts +385 -0
- package/src/resources/v1/revenue.ts +3 -0
- package/src/resources/v1/v1.ts +40 -10
- 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
- package/resources/v1/analytics/revenue.d.mts.map +0 -1
- package/resources/v1/analytics/revenue.d.ts.map +0 -1
- package/resources/v1/analytics/revenue.js +0 -39
- package/resources/v1/analytics/revenue.js.map +0 -1
- package/resources/v1/analytics/revenue.mjs +0 -35
- package/resources/v1/analytics/revenue.mjs.map +0 -1
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import * as AttributionAPI from './attribution';
|
|
5
|
+
import { Attribution, AttributionByOriginParams, AttributionByUtmParams } from './attribution';
|
|
6
|
+
import * as ConversionAPI from './conversion';
|
|
7
|
+
import { Conversion, ConversionMetricsParams } from './conversion';
|
|
8
|
+
import * as CustomersAPI from './customers';
|
|
9
|
+
import { CustomerProfileParams, CustomerTopParams, Customers } from './customers';
|
|
10
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
11
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
12
|
+
|
|
13
|
+
export class Revenue extends APIResource {
|
|
14
|
+
attribution: AttributionAPI.Attribution = new AttributionAPI.Attribution(this._client);
|
|
15
|
+
customers: CustomersAPI.Customers = new CustomersAPI.Customers(this._client);
|
|
16
|
+
conversion: ConversionAPI.Conversion = new ConversionAPI.Conversion(this._client);
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Get key revenue metrics including total revenue, conversion rate, and average
|
|
20
|
+
* order value
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* const dashboardResponse = await client.v1.revenue.dashboard(
|
|
25
|
+
* { project_id: 'project_id', time_range: 'last_hour' },
|
|
26
|
+
* );
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
dashboard(query: RevenueDashboardParams, options?: RequestOptions): APIPromise<DashboardResponse> {
|
|
30
|
+
return this._client.get('/api/v1/revenue/dashboard', { query, ...options });
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Get revenue metrics over time for chart visualization
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const timelineResponse = await client.v1.revenue.timeline({
|
|
39
|
+
* project_id: 'project_id',
|
|
40
|
+
* time_range: 'last_hour',
|
|
41
|
+
* });
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
timeline(query: RevenueTimelineParams, options?: RequestOptions): APIPromise<TimelineResponse> {
|
|
45
|
+
return this._client.get('/api/v1/revenue/timeline', { query, ...options });
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface AttributionByOriginResponse {
|
|
50
|
+
data?: Array<OriginAttributionDataPoint>;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface AttributionByUtmResponse {
|
|
54
|
+
data?: Array<UtmAttributionDataPoint>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ConversionMetricsResponse {
|
|
58
|
+
avg_purchases_per_customer?: number;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Time to conversion
|
|
62
|
+
*/
|
|
63
|
+
avg_time_to_first_purchase_hours?: number;
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* % of visitors who paid
|
|
67
|
+
*/
|
|
68
|
+
conversion_rate?: number;
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Customer value
|
|
72
|
+
*/
|
|
73
|
+
customer_lifetime_value?: number;
|
|
74
|
+
|
|
75
|
+
median_time_to_first_purchase_hours?: number;
|
|
76
|
+
|
|
77
|
+
paying_customers?: number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Repeat purchase metrics
|
|
81
|
+
*/
|
|
82
|
+
repeat_purchase_rate?: number;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Funnel metrics
|
|
86
|
+
*/
|
|
87
|
+
total_visitors?: number;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface CustomerProfileResponse {
|
|
91
|
+
avg_order_value?: number;
|
|
92
|
+
|
|
93
|
+
currency?: string;
|
|
94
|
+
|
|
95
|
+
email?: string;
|
|
96
|
+
|
|
97
|
+
external_id?: string;
|
|
98
|
+
|
|
99
|
+
first_payment_date?: string;
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Attribution
|
|
103
|
+
*/
|
|
104
|
+
first_traffic_origin?: string;
|
|
105
|
+
|
|
106
|
+
first_utm_campaign?: string;
|
|
107
|
+
|
|
108
|
+
first_utm_medium?: string;
|
|
109
|
+
|
|
110
|
+
first_utm_source?: string;
|
|
111
|
+
|
|
112
|
+
last_payment_date?: string;
|
|
113
|
+
|
|
114
|
+
name?: string;
|
|
115
|
+
|
|
116
|
+
payment_count?: number;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Payment history
|
|
120
|
+
*/
|
|
121
|
+
payments?: Array<Payment>;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Revenue over time (last 90 days)
|
|
125
|
+
*/
|
|
126
|
+
revenue_over_time?: Array<RevenueOverTimeDataPoint>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Revenue summary
|
|
130
|
+
*/
|
|
131
|
+
total_revenue?: number;
|
|
132
|
+
|
|
133
|
+
user_id?: string;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Identity
|
|
137
|
+
*/
|
|
138
|
+
visitor_id?: string;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface DashboardResponse {
|
|
142
|
+
/**
|
|
143
|
+
* Average metrics
|
|
144
|
+
*/
|
|
145
|
+
avg_order_value?: number;
|
|
146
|
+
|
|
147
|
+
/**
|
|
148
|
+
* Average revenue per paying customer
|
|
149
|
+
*/
|
|
150
|
+
avg_revenue_per_customer?: number;
|
|
151
|
+
|
|
152
|
+
avg_revenue_per_identified_customer?: number;
|
|
153
|
+
|
|
154
|
+
/**
|
|
155
|
+
* Average revenue per session
|
|
156
|
+
*/
|
|
157
|
+
avg_revenue_per_session?: number;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* % of visitors who paid
|
|
161
|
+
*/
|
|
162
|
+
conversion_rate?: number;
|
|
163
|
+
|
|
164
|
+
currency?: string;
|
|
165
|
+
|
|
166
|
+
identified_customer_revenue?: number;
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Identified customers (have email/user_id)
|
|
170
|
+
*/
|
|
171
|
+
identified_customers?: number;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Customer metrics
|
|
175
|
+
*/
|
|
176
|
+
paying_customers?: number;
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Count of successful payments
|
|
180
|
+
*/
|
|
181
|
+
total_payments?: number;
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Core revenue metrics
|
|
185
|
+
*/
|
|
186
|
+
total_revenue?: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
export interface OriginAttributionDataPoint {
|
|
190
|
+
/**
|
|
191
|
+
* Average revenue per paying customer
|
|
192
|
+
*/
|
|
193
|
+
avg_revenue_per_customer?: number;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* paying_customers / unique_visitors \* 100
|
|
197
|
+
*/
|
|
198
|
+
conversion_rate?: number;
|
|
199
|
+
|
|
200
|
+
currency?: string;
|
|
201
|
+
|
|
202
|
+
origin?: string;
|
|
203
|
+
|
|
204
|
+
paying_customers?: number;
|
|
205
|
+
|
|
206
|
+
payment_count?: number;
|
|
207
|
+
|
|
208
|
+
revenue_percentage?: number;
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* Revenue in smallest currency unit (cents)
|
|
212
|
+
*/
|
|
213
|
+
total_revenue?: number;
|
|
214
|
+
|
|
215
|
+
unique_visitors?: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface Payment {
|
|
219
|
+
amount?: number;
|
|
220
|
+
|
|
221
|
+
currency?: string;
|
|
222
|
+
|
|
223
|
+
payment_id?: string;
|
|
224
|
+
|
|
225
|
+
payment_timestamp?: string;
|
|
226
|
+
|
|
227
|
+
product_name?: string;
|
|
228
|
+
|
|
229
|
+
provider_type?: string;
|
|
230
|
+
|
|
231
|
+
status?: string;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export interface RevenueOverTimeDataPoint {
|
|
235
|
+
payment_count?: number;
|
|
236
|
+
|
|
237
|
+
timestamp?: string;
|
|
238
|
+
|
|
239
|
+
total_revenue?: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface TimelineDataPoint {
|
|
243
|
+
currency?: string;
|
|
244
|
+
|
|
245
|
+
payment_count?: number;
|
|
246
|
+
|
|
247
|
+
timestamp?: string;
|
|
248
|
+
|
|
249
|
+
/**
|
|
250
|
+
* Revenue in smallest currency unit (cents)
|
|
251
|
+
*/
|
|
252
|
+
total_revenue?: number;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export interface TimelineResponse {
|
|
256
|
+
data?: Array<TimelineDataPoint>;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export interface TopCustomer {
|
|
260
|
+
avg_order_value?: number;
|
|
261
|
+
|
|
262
|
+
currency?: string;
|
|
263
|
+
|
|
264
|
+
email?: string;
|
|
265
|
+
|
|
266
|
+
external_id?: string;
|
|
267
|
+
|
|
268
|
+
first_payment_date?: string;
|
|
269
|
+
|
|
270
|
+
first_traffic_origin?: string;
|
|
271
|
+
|
|
272
|
+
last_payment_date?: string;
|
|
273
|
+
|
|
274
|
+
location_country_iso?: string;
|
|
275
|
+
|
|
276
|
+
name?: string;
|
|
277
|
+
|
|
278
|
+
payment_count?: number;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Total revenue in smallest currency unit (cents)
|
|
282
|
+
*/
|
|
283
|
+
total_revenue?: number;
|
|
284
|
+
|
|
285
|
+
user_id?: string;
|
|
286
|
+
|
|
287
|
+
visitor_id?: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
export interface TopCustomersResponse {
|
|
291
|
+
customers?: Array<TopCustomer>;
|
|
292
|
+
|
|
293
|
+
total?: number;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface UtmAttributionDataPoint {
|
|
297
|
+
/**
|
|
298
|
+
* Average revenue per paying customer
|
|
299
|
+
*/
|
|
300
|
+
avg_revenue_per_customer?: number;
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* paying_customers / unique_visitors \* 100
|
|
304
|
+
*/
|
|
305
|
+
conversion_rate?: number;
|
|
306
|
+
|
|
307
|
+
currency?: string;
|
|
308
|
+
|
|
309
|
+
paying_customers?: number;
|
|
310
|
+
|
|
311
|
+
payment_count?: number;
|
|
312
|
+
|
|
313
|
+
revenue_percentage?: number;
|
|
314
|
+
|
|
315
|
+
/**
|
|
316
|
+
* Revenue in smallest currency unit (cents)
|
|
317
|
+
*/
|
|
318
|
+
total_revenue?: number;
|
|
319
|
+
|
|
320
|
+
unique_visitors?: number;
|
|
321
|
+
|
|
322
|
+
utm_value?: string;
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
export interface RevenueDashboardParams {
|
|
326
|
+
/**
|
|
327
|
+
* Project ID
|
|
328
|
+
*/
|
|
329
|
+
project_id: string;
|
|
330
|
+
|
|
331
|
+
/**
|
|
332
|
+
* Time range
|
|
333
|
+
*/
|
|
334
|
+
time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
export interface RevenueTimelineParams {
|
|
338
|
+
/**
|
|
339
|
+
* Project ID
|
|
340
|
+
*/
|
|
341
|
+
project_id: string;
|
|
342
|
+
|
|
343
|
+
/**
|
|
344
|
+
* Time range
|
|
345
|
+
*/
|
|
346
|
+
time_range: 'last_hour' | 'today' | 'last_7_days' | 'last_30_days' | 'last_90_days';
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
Revenue.Attribution = Attribution;
|
|
350
|
+
Revenue.Customers = Customers;
|
|
351
|
+
Revenue.Conversion = Conversion;
|
|
352
|
+
|
|
353
|
+
export declare namespace Revenue {
|
|
354
|
+
export {
|
|
355
|
+
type AttributionByOriginResponse as AttributionByOriginResponse,
|
|
356
|
+
type AttributionByUtmResponse as AttributionByUtmResponse,
|
|
357
|
+
type ConversionMetricsResponse as ConversionMetricsResponse,
|
|
358
|
+
type CustomerProfileResponse as CustomerProfileResponse,
|
|
359
|
+
type DashboardResponse as DashboardResponse,
|
|
360
|
+
type OriginAttributionDataPoint as OriginAttributionDataPoint,
|
|
361
|
+
type Payment as Payment,
|
|
362
|
+
type RevenueOverTimeDataPoint as RevenueOverTimeDataPoint,
|
|
363
|
+
type TimelineDataPoint as TimelineDataPoint,
|
|
364
|
+
type TimelineResponse as TimelineResponse,
|
|
365
|
+
type TopCustomer as TopCustomer,
|
|
366
|
+
type TopCustomersResponse as TopCustomersResponse,
|
|
367
|
+
type UtmAttributionDataPoint as UtmAttributionDataPoint,
|
|
368
|
+
type RevenueDashboardParams as RevenueDashboardParams,
|
|
369
|
+
type RevenueTimelineParams as RevenueTimelineParams,
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
export {
|
|
373
|
+
Attribution as Attribution,
|
|
374
|
+
type AttributionByOriginParams as AttributionByOriginParams,
|
|
375
|
+
type AttributionByUtmParams as AttributionByUtmParams,
|
|
376
|
+
};
|
|
377
|
+
|
|
378
|
+
export {
|
|
379
|
+
Customers as Customers,
|
|
380
|
+
type CustomerProfileParams as CustomerProfileParams,
|
|
381
|
+
type CustomerTopParams as CustomerTopParams,
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
export { Conversion as Conversion, type ConversionMetricsParams as ConversionMetricsParams };
|
|
385
|
+
}
|
package/src/resources/v1/v1.ts
CHANGED
|
@@ -59,26 +59,41 @@ import {
|
|
|
59
59
|
RecentEvent,
|
|
60
60
|
RecentEventsResponse,
|
|
61
61
|
ReturnRateResponse,
|
|
62
|
-
RevenueByUtmResponse,
|
|
63
|
-
RevenueTimelineDataPoint,
|
|
64
|
-
RevenueTimelineResponse,
|
|
65
62
|
SessionMetricsResponse,
|
|
66
63
|
TopVisitor,
|
|
67
64
|
TopVisitorsResponse,
|
|
68
65
|
UniqueVisitorsDataPoint,
|
|
69
66
|
UniqueVisitorsTimelineResponse,
|
|
70
|
-
UtmRevenueDataPoint,
|
|
71
67
|
VisitorDataPoint,
|
|
72
68
|
VisitorEvent,
|
|
73
|
-
VisitorPayment,
|
|
74
69
|
VisitorProfileResponse,
|
|
75
70
|
VisitorsByCountryResponse,
|
|
76
71
|
VisitorsByDeviceResponse,
|
|
77
72
|
VisitorsByOriginResponse,
|
|
78
73
|
} from './analytics/analytics';
|
|
74
|
+
import * as RevenueAPI from './revenue/revenue';
|
|
75
|
+
import {
|
|
76
|
+
AttributionByOriginResponse,
|
|
77
|
+
AttributionByUtmResponse,
|
|
78
|
+
ConversionMetricsResponse,
|
|
79
|
+
CustomerProfileResponse,
|
|
80
|
+
DashboardResponse,
|
|
81
|
+
OriginAttributionDataPoint,
|
|
82
|
+
Payment,
|
|
83
|
+
Revenue,
|
|
84
|
+
RevenueDashboardParams,
|
|
85
|
+
RevenueOverTimeDataPoint,
|
|
86
|
+
RevenueTimelineParams,
|
|
87
|
+
TimelineDataPoint,
|
|
88
|
+
TimelineResponse,
|
|
89
|
+
TopCustomer,
|
|
90
|
+
TopCustomersResponse,
|
|
91
|
+
UtmAttributionDataPoint,
|
|
92
|
+
} from './revenue/revenue';
|
|
79
93
|
|
|
80
94
|
export class V1 extends APIResource {
|
|
81
95
|
analytics: AnalyticsAPI.Analytics = new AnalyticsAPI.Analytics(this._client);
|
|
96
|
+
revenue: RevenueAPI.Revenue = new RevenueAPI.Revenue(this._client);
|
|
82
97
|
projects: ProjectsAPI.Projects = new ProjectsAPI.Projects(this._client);
|
|
83
98
|
auth: AuthAPI.Auth = new AuthAPI.Auth(this._client);
|
|
84
99
|
paymentProviders: PaymentProvidersAPI.PaymentProviders = new PaymentProvidersAPI.PaymentProviders(
|
|
@@ -87,6 +102,7 @@ export class V1 extends APIResource {
|
|
|
87
102
|
}
|
|
88
103
|
|
|
89
104
|
V1.Analytics = Analytics;
|
|
105
|
+
V1.Revenue = Revenue;
|
|
90
106
|
V1.Projects = Projects;
|
|
91
107
|
V1.Auth = Auth;
|
|
92
108
|
V1.PaymentProviders = PaymentProviders;
|
|
@@ -110,18 +126,13 @@ export declare namespace V1 {
|
|
|
110
126
|
type RecentEvent as RecentEvent,
|
|
111
127
|
type RecentEventsResponse as RecentEventsResponse,
|
|
112
128
|
type ReturnRateResponse as ReturnRateResponse,
|
|
113
|
-
type RevenueByUtmResponse as RevenueByUtmResponse,
|
|
114
|
-
type RevenueTimelineDataPoint as RevenueTimelineDataPoint,
|
|
115
|
-
type RevenueTimelineResponse as RevenueTimelineResponse,
|
|
116
129
|
type SessionMetricsResponse as SessionMetricsResponse,
|
|
117
130
|
type TopVisitor as TopVisitor,
|
|
118
131
|
type TopVisitorsResponse as TopVisitorsResponse,
|
|
119
132
|
type UniqueVisitorsDataPoint as UniqueVisitorsDataPoint,
|
|
120
133
|
type UniqueVisitorsTimelineResponse as UniqueVisitorsTimelineResponse,
|
|
121
|
-
type UtmRevenueDataPoint as UtmRevenueDataPoint,
|
|
122
134
|
type VisitorDataPoint as VisitorDataPoint,
|
|
123
135
|
type VisitorEvent as VisitorEvent,
|
|
124
|
-
type VisitorPayment as VisitorPayment,
|
|
125
136
|
type VisitorProfileResponse as VisitorProfileResponse,
|
|
126
137
|
type VisitorsByCountryResponse as VisitorsByCountryResponse,
|
|
127
138
|
type VisitorsByDeviceResponse as VisitorsByDeviceResponse,
|
|
@@ -129,6 +140,25 @@ export declare namespace V1 {
|
|
|
129
140
|
type AnalyticsDashboardParams as AnalyticsDashboardParams,
|
|
130
141
|
};
|
|
131
142
|
|
|
143
|
+
export {
|
|
144
|
+
Revenue as Revenue,
|
|
145
|
+
type AttributionByOriginResponse as AttributionByOriginResponse,
|
|
146
|
+
type AttributionByUtmResponse as AttributionByUtmResponse,
|
|
147
|
+
type ConversionMetricsResponse as ConversionMetricsResponse,
|
|
148
|
+
type CustomerProfileResponse as CustomerProfileResponse,
|
|
149
|
+
type DashboardResponse as DashboardResponse,
|
|
150
|
+
type OriginAttributionDataPoint as OriginAttributionDataPoint,
|
|
151
|
+
type Payment as Payment,
|
|
152
|
+
type RevenueOverTimeDataPoint as RevenueOverTimeDataPoint,
|
|
153
|
+
type TimelineDataPoint as TimelineDataPoint,
|
|
154
|
+
type TimelineResponse as TimelineResponse,
|
|
155
|
+
type TopCustomer as TopCustomer,
|
|
156
|
+
type TopCustomersResponse as TopCustomersResponse,
|
|
157
|
+
type UtmAttributionDataPoint as UtmAttributionDataPoint,
|
|
158
|
+
type RevenueDashboardParams as RevenueDashboardParams,
|
|
159
|
+
type RevenueTimelineParams as RevenueTimelineParams,
|
|
160
|
+
};
|
|
161
|
+
|
|
132
162
|
export {
|
|
133
163
|
Projects as Projects,
|
|
134
164
|
type CreateProjectRequest as CreateProjectRequest,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.9.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.9.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.9.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.9.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.d.mts","sourceRoot":"","sources":["../../../src/resources/v1/analytics/revenue.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,oBAAoB,CAAC;IAIzG;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,KAAK,EAAE,qBAAqB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC;CAGpD;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;IAEpF;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;CACrF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.d.ts","sourceRoot":"","sources":["../../../src/resources/v1/analytics/revenue.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,YAAY;OACjB,EAAE,UAAU,EAAE;OACd,EAAE,cAAc,EAAE;AAEzB,qBAAa,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAK,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,YAAY,CAAC,oBAAoB,CAAC;IAIzG;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,KAAK,EAAE,qBAAqB,EAC5B,OAAO,CAAC,EAAE,cAAc,GACvB,UAAU,CAAC,YAAY,CAAC,uBAAuB,CAAC;CAGpD;AAED,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;IAEpF;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,EAAE,WAAW,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,cAAc,CAAC;CACrF;AAED,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,kBAAkB,IAAI,kBAAkB,EAC7C,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.Revenue = void 0;
|
|
5
|
-
const resource_1 = require("../../../core/resource.js");
|
|
6
|
-
class Revenue extends resource_1.APIResource {
|
|
7
|
-
/**
|
|
8
|
-
* Get revenue metrics grouped by UTM source, medium, or campaign
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* ```ts
|
|
12
|
-
* const revenueByUtmResponse =
|
|
13
|
-
* await client.v1.analytics.revenue.byUtm({
|
|
14
|
-
* project_id: 'project_id',
|
|
15
|
-
* time_range: 'last_hour',
|
|
16
|
-
* });
|
|
17
|
-
* ```
|
|
18
|
-
*/
|
|
19
|
-
byUtm(query, options) {
|
|
20
|
-
return this._client.get('/api/v1/analytics/revenue/by-utm', { query, ...options });
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* Get revenue metrics over time for chart visualization
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* ```ts
|
|
27
|
-
* const revenueTimelineResponse =
|
|
28
|
-
* await client.v1.analytics.revenue.timeline({
|
|
29
|
-
* project_id: 'project_id',
|
|
30
|
-
* time_range: 'last_hour',
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
timeline(query, options) {
|
|
35
|
-
return this._client.get('/api/v1/analytics/revenue/timeline', { query, ...options });
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
exports.Revenue = Revenue;
|
|
39
|
-
//# sourceMappingURL=revenue.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.js","sourceRoot":"","sources":["../../../src/resources/v1/analytics/revenue.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wDAAqD;AAKrD,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAyB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF;AAnCD,0BAmCC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
-
import { APIResource } from "../../../core/resource.mjs";
|
|
3
|
-
export class Revenue extends APIResource {
|
|
4
|
-
/**
|
|
5
|
-
* Get revenue metrics grouped by UTM source, medium, or campaign
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```ts
|
|
9
|
-
* const revenueByUtmResponse =
|
|
10
|
-
* await client.v1.analytics.revenue.byUtm({
|
|
11
|
-
* project_id: 'project_id',
|
|
12
|
-
* time_range: 'last_hour',
|
|
13
|
-
* });
|
|
14
|
-
* ```
|
|
15
|
-
*/
|
|
16
|
-
byUtm(query, options) {
|
|
17
|
-
return this._client.get('/api/v1/analytics/revenue/by-utm', { query, ...options });
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Get revenue metrics over time for chart visualization
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```ts
|
|
24
|
-
* const revenueTimelineResponse =
|
|
25
|
-
* await client.v1.analytics.revenue.timeline({
|
|
26
|
-
* project_id: 'project_id',
|
|
27
|
-
* time_range: 'last_hour',
|
|
28
|
-
* });
|
|
29
|
-
* ```
|
|
30
|
-
*/
|
|
31
|
-
timeline(query, options) {
|
|
32
|
-
return this._client.get('/api/v1/analytics/revenue/timeline', { query, ...options });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=revenue.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"revenue.mjs","sourceRoot":"","sources":["../../../src/resources/v1/analytics/revenue.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAKtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,KAAyB,EAAE,OAAwB;QACvD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;;;;;;;;;;OAWG;IACH,QAAQ,CACN,KAA4B,EAC5B,OAAwB;QAExB,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,oCAAoC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACvF,CAAC;CACF"}
|