@metrone-io/server 1.0.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.
@@ -0,0 +1,357 @@
1
+ /**
2
+ * Shared types for the Metrone server SDK.
3
+ *
4
+ * These types mirror the Worker's RawEventPayload exactly so payloads pass
5
+ * validation on the ingestion side without translation.
6
+ */
7
+ type EventSource = 'web' | 'voice' | 'chat' | 'assistant' | 'sms' | 'listing';
8
+ interface MetroneServerConfig {
9
+ /** API key (required). Format: metrone_live_* or metrone_test_* */
10
+ apiKey: string;
11
+ /** Ingestion endpoint. Default: https://api.metrone.io */
12
+ endpoint?: string;
13
+ /** Max events to buffer before auto-flush. 0 = send immediately. Default: 10 */
14
+ batchSize?: number;
15
+ /** Milliseconds between auto-flushes. Default: 5000 */
16
+ flushIntervalMs?: number;
17
+ /** Max retries per request. Default: 3 */
18
+ maxRetries?: number;
19
+ /** Base delay for exponential backoff in ms. Default: 1000 */
20
+ retryBaseMs?: number;
21
+ /** Timeout per HTTP request in ms. Default: 10000 */
22
+ timeoutMs?: number;
23
+ /** Maximum events to buffer while offline or during backpressure. Default: 1000 */
24
+ maxQueueSize?: number;
25
+ /** Enable debug logging to stderr. Default: false */
26
+ debug?: boolean;
27
+ /** Custom fetch implementation (for edge runtimes or testing). */
28
+ fetch?: typeof globalThis.fetch;
29
+ }
30
+ interface EventPayload {
31
+ event_type: string;
32
+ event_name?: string;
33
+ source?: EventSource;
34
+ channel?: string;
35
+ page_url?: string;
36
+ page_path?: string;
37
+ page_title?: string;
38
+ referrer?: string;
39
+ session_id?: string;
40
+ utm_source?: string;
41
+ utm_medium?: string;
42
+ utm_campaign?: string;
43
+ utm_term?: string;
44
+ utm_content?: string;
45
+ ai_provider?: string;
46
+ ai_call_id?: string;
47
+ ai_session_id?: string;
48
+ ai_intent?: string;
49
+ ai_duration_sec?: number;
50
+ /** Agent identification — who sent this event */
51
+ agent_id?: string;
52
+ agent_type?: string;
53
+ /** Idempotency key to prevent duplicate processing */
54
+ idempotency_key?: string;
55
+ properties?: Record<string, unknown>;
56
+ timestamp?: string;
57
+ }
58
+ interface AICallData {
59
+ call_id: string;
60
+ provider?: string;
61
+ duration?: number;
62
+ intent?: string;
63
+ transcript_snippet?: string;
64
+ outcome?: string;
65
+ session_id?: string;
66
+ properties?: Record<string, unknown>;
67
+ }
68
+ interface AIChatData {
69
+ session_id: string;
70
+ provider?: string;
71
+ message_count?: number;
72
+ intent?: string;
73
+ resolved?: boolean;
74
+ duration?: number;
75
+ properties?: Record<string, unknown>;
76
+ }
77
+ interface AIIntentData {
78
+ intent: string;
79
+ confidence?: number;
80
+ source?: 'voice' | 'chat' | 'assistant';
81
+ properties?: Record<string, unknown>;
82
+ }
83
+ interface AISessionData {
84
+ session_id: string;
85
+ provider?: string;
86
+ action: 'start' | 'end' | 'timeout';
87
+ duration?: number;
88
+ properties?: Record<string, unknown>;
89
+ }
90
+ interface ConversionData {
91
+ conversion_type: string;
92
+ value?: number;
93
+ currency?: string;
94
+ properties?: Record<string, unknown>;
95
+ }
96
+ interface StatsParams {
97
+ days?: number;
98
+ from?: string | Date;
99
+ to?: string | Date;
100
+ }
101
+ interface EventsParams {
102
+ days?: number;
103
+ from?: string | Date;
104
+ to?: string | Date;
105
+ limit?: number;
106
+ offset?: number;
107
+ event_type?: string;
108
+ source?: EventSource;
109
+ }
110
+ interface PagesParams {
111
+ days?: number;
112
+ from?: string | Date;
113
+ to?: string | Date;
114
+ limit?: number;
115
+ }
116
+ interface SourcesParams {
117
+ days?: number;
118
+ from?: string | Date;
119
+ to?: string | Date;
120
+ }
121
+ interface ApiResponse<T = unknown> {
122
+ ok: boolean;
123
+ status: number;
124
+ data?: T;
125
+ error?: ApiError;
126
+ }
127
+ interface ApiError {
128
+ code: string;
129
+ message: string;
130
+ details?: unknown;
131
+ retry_after_ms?: number;
132
+ }
133
+ interface FlushResult {
134
+ sent: number;
135
+ failed: number;
136
+ errors: Array<{
137
+ index: number;
138
+ error: string;
139
+ }>;
140
+ }
141
+ interface StatsResponse {
142
+ total_events: number;
143
+ pageviews: number;
144
+ conversions: number;
145
+ unique_visitors: number;
146
+ unique_sessions: number;
147
+ ai_interactions: number;
148
+ conversion_rate: number;
149
+ bounce_rate: number;
150
+ period: {
151
+ from: string;
152
+ to: string;
153
+ };
154
+ }
155
+ interface EventRow {
156
+ event_id: string;
157
+ timestamp: string;
158
+ event_type: string;
159
+ event_name: string | null;
160
+ source: string;
161
+ page_url: string | null;
162
+ page_path: string | null;
163
+ referrer_domain: string | null;
164
+ country_code: string | null;
165
+ country: string | null;
166
+ region: string | null;
167
+ city: string | null;
168
+ browser: string | null;
169
+ os: string | null;
170
+ device_type: string | null;
171
+ utm_source: string | null;
172
+ utm_medium: string | null;
173
+ utm_campaign: string | null;
174
+ session_id: string | null;
175
+ properties: Record<string, unknown> | null;
176
+ }
177
+ interface EventsResponse {
178
+ data: EventRow[];
179
+ meta: {
180
+ limit: number;
181
+ offset: number;
182
+ count: number;
183
+ period: {
184
+ from: string;
185
+ to: string;
186
+ };
187
+ };
188
+ }
189
+ interface PageRow {
190
+ page_path: string;
191
+ page_url: string | null;
192
+ pageviews: number;
193
+ unique_sessions: number;
194
+ conversions: number;
195
+ }
196
+ interface PagesResponse {
197
+ data: PageRow[];
198
+ }
199
+ interface ChannelRow {
200
+ source: string;
201
+ events: number;
202
+ conversions: number;
203
+ unique_sessions: number;
204
+ share: number;
205
+ }
206
+ interface ReferrerRow {
207
+ referrer_domain: string;
208
+ events: number;
209
+ unique_sessions: number;
210
+ }
211
+ interface SourcesResponse {
212
+ channels: ChannelRow[];
213
+ referrers: ReferrerRow[];
214
+ }
215
+ interface LiveResponse {
216
+ active_visitors: number;
217
+ today_events: number;
218
+ today_pageviews: number;
219
+ today_sessions: number;
220
+ today_conversions: number;
221
+ }
222
+
223
+ /**
224
+ * MetroneServer — the main server-side SDK client.
225
+ *
226
+ * Zero dependencies. Uses global fetch (Node 18+, Deno, Bun, edge runtimes).
227
+ * Runtime-agnostic: no DOM, no window, no navigator, no localStorage.
228
+ *
229
+ * Features:
230
+ * - Event ingestion (single + batch) with automatic batching
231
+ * - AI tracking (calls, chats, intents, sessions)
232
+ * - Read API (stats, events, pages, sources, live)
233
+ * - Retry with exponential backoff + jitter
234
+ * - Idempotency key support
235
+ * - Agent identity tracking
236
+ * - Graceful shutdown with flush()
237
+ */
238
+
239
+ declare class MetroneServer {
240
+ private readonly config;
241
+ private queue;
242
+ private flushTimer;
243
+ private flushing;
244
+ private destroyed;
245
+ constructor(config: MetroneServerConfig);
246
+ /**
247
+ * Track a custom event. Queued for batch sending unless batchSize is 0.
248
+ */
249
+ track(eventType: string, data?: Partial<EventPayload>): void;
250
+ /**
251
+ * Track a page view.
252
+ */
253
+ pageview(url: string, title?: string, data?: Partial<EventPayload>): void;
254
+ /**
255
+ * Track a conversion event.
256
+ */
257
+ conversion(data: ConversionData): void;
258
+ /**
259
+ * Track an AI voice call.
260
+ */
261
+ trackAICall(data: AICallData): void;
262
+ /**
263
+ * Track an AI chat interaction.
264
+ */
265
+ trackAIChat(data: AIChatData): void;
266
+ /**
267
+ * Track an AI intent detection.
268
+ */
269
+ trackAIIntent(data: AIIntentData): void;
270
+ /**
271
+ * Track an AI session lifecycle event (start, end, timeout).
272
+ */
273
+ trackAISession(data: AISessionData): void;
274
+ /**
275
+ * Get aggregated analytics stats for a time period.
276
+ */
277
+ getStats(params?: StatsParams): Promise<StatsResponse>;
278
+ /**
279
+ * Get individual analytics events with pagination and filters.
280
+ */
281
+ getEvents(params?: EventsParams): Promise<EventsResponse>;
282
+ /**
283
+ * Get page analytics broken down by path.
284
+ */
285
+ getPages(params?: PagesParams): Promise<PagesResponse>;
286
+ /**
287
+ * Get traffic source and referrer analytics.
288
+ */
289
+ getSources(params?: SourcesParams): Promise<SourcesResponse>;
290
+ /**
291
+ * Get real-time live stats (active visitors, today's totals).
292
+ */
293
+ getLive(): Promise<LiveResponse>;
294
+ /**
295
+ * Immediately flush all queued events. Returns the result.
296
+ * Safe to call multiple times concurrently — only one flush runs at a time.
297
+ */
298
+ flush(): Promise<FlushResult>;
299
+ /**
300
+ * Flush remaining events, stop the auto-flush timer, and mark the
301
+ * client as destroyed. Subsequent calls will throw.
302
+ */
303
+ shutdown(): Promise<FlushResult>;
304
+ /** Number of events currently in the send queue. */
305
+ get queueSize(): number;
306
+ /** Whether shutdown() has been called. */
307
+ get isDestroyed(): boolean;
308
+ private assertNotDestroyed;
309
+ private buildDateParams;
310
+ }
311
+
312
+ /**
313
+ * Structured error types for the Metrone server SDK.
314
+ *
315
+ * All errors carry a machine-readable `code` that agents can switch on,
316
+ * plus a human-readable `message` for logs.
317
+ */
318
+ declare class MetroneError extends Error {
319
+ readonly code: string;
320
+ readonly status?: number;
321
+ readonly retryable: boolean;
322
+ constructor(code: string, message: string, status?: number, retryable?: boolean);
323
+ }
324
+ declare class MetroneConfigError extends MetroneError {
325
+ constructor(message: string);
326
+ }
327
+ declare class MetroneAuthError extends MetroneError {
328
+ constructor(message?: string);
329
+ }
330
+ declare class MetroneRateLimitError extends MetroneError {
331
+ readonly retryAfterMs: number;
332
+ constructor(retryAfterMs: number);
333
+ }
334
+ declare class MetroneQuotaError extends MetroneError {
335
+ constructor(message?: string);
336
+ }
337
+ declare class MetroneNetworkError extends MetroneError {
338
+ constructor(message?: string);
339
+ }
340
+ declare class MetroneTimeoutError extends MetroneError {
341
+ constructor(timeoutMs: number);
342
+ }
343
+ declare class MetroneValidationError extends MetroneError {
344
+ readonly fields: Array<{
345
+ field: string;
346
+ message: string;
347
+ }>;
348
+ constructor(fields: Array<{
349
+ field: string;
350
+ message: string;
351
+ }>);
352
+ }
353
+ declare class MetroneServerError extends MetroneError {
354
+ constructor(status: number, message?: string);
355
+ }
356
+
357
+ export { type AICallData, type AIChatData, type AIIntentData, type AISessionData, type ApiError, type ApiResponse, type ChannelRow, type ConversionData, type EventPayload, type EventRow, type EventSource, type EventsParams, type EventsResponse, type FlushResult, type LiveResponse, MetroneAuthError, MetroneConfigError, MetroneError, MetroneNetworkError, MetroneQuotaError, MetroneRateLimitError, MetroneServer, type MetroneServerConfig, MetroneServerError, MetroneTimeoutError, MetroneValidationError, type PageRow, type PagesParams, type PagesResponse, type ReferrerRow, type SourcesParams, type SourcesResponse, type StatsParams, type StatsResponse };
@@ -0,0 +1,357 @@
1
+ /**
2
+ * Shared types for the Metrone server SDK.
3
+ *
4
+ * These types mirror the Worker's RawEventPayload exactly so payloads pass
5
+ * validation on the ingestion side without translation.
6
+ */
7
+ type EventSource = 'web' | 'voice' | 'chat' | 'assistant' | 'sms' | 'listing';
8
+ interface MetroneServerConfig {
9
+ /** API key (required). Format: metrone_live_* or metrone_test_* */
10
+ apiKey: string;
11
+ /** Ingestion endpoint. Default: https://api.metrone.io */
12
+ endpoint?: string;
13
+ /** Max events to buffer before auto-flush. 0 = send immediately. Default: 10 */
14
+ batchSize?: number;
15
+ /** Milliseconds between auto-flushes. Default: 5000 */
16
+ flushIntervalMs?: number;
17
+ /** Max retries per request. Default: 3 */
18
+ maxRetries?: number;
19
+ /** Base delay for exponential backoff in ms. Default: 1000 */
20
+ retryBaseMs?: number;
21
+ /** Timeout per HTTP request in ms. Default: 10000 */
22
+ timeoutMs?: number;
23
+ /** Maximum events to buffer while offline or during backpressure. Default: 1000 */
24
+ maxQueueSize?: number;
25
+ /** Enable debug logging to stderr. Default: false */
26
+ debug?: boolean;
27
+ /** Custom fetch implementation (for edge runtimes or testing). */
28
+ fetch?: typeof globalThis.fetch;
29
+ }
30
+ interface EventPayload {
31
+ event_type: string;
32
+ event_name?: string;
33
+ source?: EventSource;
34
+ channel?: string;
35
+ page_url?: string;
36
+ page_path?: string;
37
+ page_title?: string;
38
+ referrer?: string;
39
+ session_id?: string;
40
+ utm_source?: string;
41
+ utm_medium?: string;
42
+ utm_campaign?: string;
43
+ utm_term?: string;
44
+ utm_content?: string;
45
+ ai_provider?: string;
46
+ ai_call_id?: string;
47
+ ai_session_id?: string;
48
+ ai_intent?: string;
49
+ ai_duration_sec?: number;
50
+ /** Agent identification — who sent this event */
51
+ agent_id?: string;
52
+ agent_type?: string;
53
+ /** Idempotency key to prevent duplicate processing */
54
+ idempotency_key?: string;
55
+ properties?: Record<string, unknown>;
56
+ timestamp?: string;
57
+ }
58
+ interface AICallData {
59
+ call_id: string;
60
+ provider?: string;
61
+ duration?: number;
62
+ intent?: string;
63
+ transcript_snippet?: string;
64
+ outcome?: string;
65
+ session_id?: string;
66
+ properties?: Record<string, unknown>;
67
+ }
68
+ interface AIChatData {
69
+ session_id: string;
70
+ provider?: string;
71
+ message_count?: number;
72
+ intent?: string;
73
+ resolved?: boolean;
74
+ duration?: number;
75
+ properties?: Record<string, unknown>;
76
+ }
77
+ interface AIIntentData {
78
+ intent: string;
79
+ confidence?: number;
80
+ source?: 'voice' | 'chat' | 'assistant';
81
+ properties?: Record<string, unknown>;
82
+ }
83
+ interface AISessionData {
84
+ session_id: string;
85
+ provider?: string;
86
+ action: 'start' | 'end' | 'timeout';
87
+ duration?: number;
88
+ properties?: Record<string, unknown>;
89
+ }
90
+ interface ConversionData {
91
+ conversion_type: string;
92
+ value?: number;
93
+ currency?: string;
94
+ properties?: Record<string, unknown>;
95
+ }
96
+ interface StatsParams {
97
+ days?: number;
98
+ from?: string | Date;
99
+ to?: string | Date;
100
+ }
101
+ interface EventsParams {
102
+ days?: number;
103
+ from?: string | Date;
104
+ to?: string | Date;
105
+ limit?: number;
106
+ offset?: number;
107
+ event_type?: string;
108
+ source?: EventSource;
109
+ }
110
+ interface PagesParams {
111
+ days?: number;
112
+ from?: string | Date;
113
+ to?: string | Date;
114
+ limit?: number;
115
+ }
116
+ interface SourcesParams {
117
+ days?: number;
118
+ from?: string | Date;
119
+ to?: string | Date;
120
+ }
121
+ interface ApiResponse<T = unknown> {
122
+ ok: boolean;
123
+ status: number;
124
+ data?: T;
125
+ error?: ApiError;
126
+ }
127
+ interface ApiError {
128
+ code: string;
129
+ message: string;
130
+ details?: unknown;
131
+ retry_after_ms?: number;
132
+ }
133
+ interface FlushResult {
134
+ sent: number;
135
+ failed: number;
136
+ errors: Array<{
137
+ index: number;
138
+ error: string;
139
+ }>;
140
+ }
141
+ interface StatsResponse {
142
+ total_events: number;
143
+ pageviews: number;
144
+ conversions: number;
145
+ unique_visitors: number;
146
+ unique_sessions: number;
147
+ ai_interactions: number;
148
+ conversion_rate: number;
149
+ bounce_rate: number;
150
+ period: {
151
+ from: string;
152
+ to: string;
153
+ };
154
+ }
155
+ interface EventRow {
156
+ event_id: string;
157
+ timestamp: string;
158
+ event_type: string;
159
+ event_name: string | null;
160
+ source: string;
161
+ page_url: string | null;
162
+ page_path: string | null;
163
+ referrer_domain: string | null;
164
+ country_code: string | null;
165
+ country: string | null;
166
+ region: string | null;
167
+ city: string | null;
168
+ browser: string | null;
169
+ os: string | null;
170
+ device_type: string | null;
171
+ utm_source: string | null;
172
+ utm_medium: string | null;
173
+ utm_campaign: string | null;
174
+ session_id: string | null;
175
+ properties: Record<string, unknown> | null;
176
+ }
177
+ interface EventsResponse {
178
+ data: EventRow[];
179
+ meta: {
180
+ limit: number;
181
+ offset: number;
182
+ count: number;
183
+ period: {
184
+ from: string;
185
+ to: string;
186
+ };
187
+ };
188
+ }
189
+ interface PageRow {
190
+ page_path: string;
191
+ page_url: string | null;
192
+ pageviews: number;
193
+ unique_sessions: number;
194
+ conversions: number;
195
+ }
196
+ interface PagesResponse {
197
+ data: PageRow[];
198
+ }
199
+ interface ChannelRow {
200
+ source: string;
201
+ events: number;
202
+ conversions: number;
203
+ unique_sessions: number;
204
+ share: number;
205
+ }
206
+ interface ReferrerRow {
207
+ referrer_domain: string;
208
+ events: number;
209
+ unique_sessions: number;
210
+ }
211
+ interface SourcesResponse {
212
+ channels: ChannelRow[];
213
+ referrers: ReferrerRow[];
214
+ }
215
+ interface LiveResponse {
216
+ active_visitors: number;
217
+ today_events: number;
218
+ today_pageviews: number;
219
+ today_sessions: number;
220
+ today_conversions: number;
221
+ }
222
+
223
+ /**
224
+ * MetroneServer — the main server-side SDK client.
225
+ *
226
+ * Zero dependencies. Uses global fetch (Node 18+, Deno, Bun, edge runtimes).
227
+ * Runtime-agnostic: no DOM, no window, no navigator, no localStorage.
228
+ *
229
+ * Features:
230
+ * - Event ingestion (single + batch) with automatic batching
231
+ * - AI tracking (calls, chats, intents, sessions)
232
+ * - Read API (stats, events, pages, sources, live)
233
+ * - Retry with exponential backoff + jitter
234
+ * - Idempotency key support
235
+ * - Agent identity tracking
236
+ * - Graceful shutdown with flush()
237
+ */
238
+
239
+ declare class MetroneServer {
240
+ private readonly config;
241
+ private queue;
242
+ private flushTimer;
243
+ private flushing;
244
+ private destroyed;
245
+ constructor(config: MetroneServerConfig);
246
+ /**
247
+ * Track a custom event. Queued for batch sending unless batchSize is 0.
248
+ */
249
+ track(eventType: string, data?: Partial<EventPayload>): void;
250
+ /**
251
+ * Track a page view.
252
+ */
253
+ pageview(url: string, title?: string, data?: Partial<EventPayload>): void;
254
+ /**
255
+ * Track a conversion event.
256
+ */
257
+ conversion(data: ConversionData): void;
258
+ /**
259
+ * Track an AI voice call.
260
+ */
261
+ trackAICall(data: AICallData): void;
262
+ /**
263
+ * Track an AI chat interaction.
264
+ */
265
+ trackAIChat(data: AIChatData): void;
266
+ /**
267
+ * Track an AI intent detection.
268
+ */
269
+ trackAIIntent(data: AIIntentData): void;
270
+ /**
271
+ * Track an AI session lifecycle event (start, end, timeout).
272
+ */
273
+ trackAISession(data: AISessionData): void;
274
+ /**
275
+ * Get aggregated analytics stats for a time period.
276
+ */
277
+ getStats(params?: StatsParams): Promise<StatsResponse>;
278
+ /**
279
+ * Get individual analytics events with pagination and filters.
280
+ */
281
+ getEvents(params?: EventsParams): Promise<EventsResponse>;
282
+ /**
283
+ * Get page analytics broken down by path.
284
+ */
285
+ getPages(params?: PagesParams): Promise<PagesResponse>;
286
+ /**
287
+ * Get traffic source and referrer analytics.
288
+ */
289
+ getSources(params?: SourcesParams): Promise<SourcesResponse>;
290
+ /**
291
+ * Get real-time live stats (active visitors, today's totals).
292
+ */
293
+ getLive(): Promise<LiveResponse>;
294
+ /**
295
+ * Immediately flush all queued events. Returns the result.
296
+ * Safe to call multiple times concurrently — only one flush runs at a time.
297
+ */
298
+ flush(): Promise<FlushResult>;
299
+ /**
300
+ * Flush remaining events, stop the auto-flush timer, and mark the
301
+ * client as destroyed. Subsequent calls will throw.
302
+ */
303
+ shutdown(): Promise<FlushResult>;
304
+ /** Number of events currently in the send queue. */
305
+ get queueSize(): number;
306
+ /** Whether shutdown() has been called. */
307
+ get isDestroyed(): boolean;
308
+ private assertNotDestroyed;
309
+ private buildDateParams;
310
+ }
311
+
312
+ /**
313
+ * Structured error types for the Metrone server SDK.
314
+ *
315
+ * All errors carry a machine-readable `code` that agents can switch on,
316
+ * plus a human-readable `message` for logs.
317
+ */
318
+ declare class MetroneError extends Error {
319
+ readonly code: string;
320
+ readonly status?: number;
321
+ readonly retryable: boolean;
322
+ constructor(code: string, message: string, status?: number, retryable?: boolean);
323
+ }
324
+ declare class MetroneConfigError extends MetroneError {
325
+ constructor(message: string);
326
+ }
327
+ declare class MetroneAuthError extends MetroneError {
328
+ constructor(message?: string);
329
+ }
330
+ declare class MetroneRateLimitError extends MetroneError {
331
+ readonly retryAfterMs: number;
332
+ constructor(retryAfterMs: number);
333
+ }
334
+ declare class MetroneQuotaError extends MetroneError {
335
+ constructor(message?: string);
336
+ }
337
+ declare class MetroneNetworkError extends MetroneError {
338
+ constructor(message?: string);
339
+ }
340
+ declare class MetroneTimeoutError extends MetroneError {
341
+ constructor(timeoutMs: number);
342
+ }
343
+ declare class MetroneValidationError extends MetroneError {
344
+ readonly fields: Array<{
345
+ field: string;
346
+ message: string;
347
+ }>;
348
+ constructor(fields: Array<{
349
+ field: string;
350
+ message: string;
351
+ }>);
352
+ }
353
+ declare class MetroneServerError extends MetroneError {
354
+ constructor(status: number, message?: string);
355
+ }
356
+
357
+ export { type AICallData, type AIChatData, type AIIntentData, type AISessionData, type ApiError, type ApiResponse, type ChannelRow, type ConversionData, type EventPayload, type EventRow, type EventSource, type EventsParams, type EventsResponse, type FlushResult, type LiveResponse, MetroneAuthError, MetroneConfigError, MetroneError, MetroneNetworkError, MetroneQuotaError, MetroneRateLimitError, MetroneServer, type MetroneServerConfig, MetroneServerError, MetroneTimeoutError, MetroneValidationError, type PageRow, type PagesParams, type PagesResponse, type ReferrerRow, type SourcesParams, type SourcesResponse, type StatsParams, type StatsResponse };