@entrolytics/api-client 2.2.3 → 3.0.2

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 (54) hide show
  1. package/README.md +2 -2
  2. package/dist/client.d.ts +81 -0
  3. package/dist/client.d.ts.map +1 -0
  4. package/dist/edge-helpers.d.ts +146 -0
  5. package/dist/edge-helpers.d.ts.map +1 -0
  6. package/dist/endpoints/admin.d.ts +41 -0
  7. package/dist/endpoints/admin.d.ts.map +1 -0
  8. package/dist/endpoints/auth.d.ts +25 -0
  9. package/dist/endpoints/auth.d.ts.map +1 -0
  10. package/dist/endpoints/billing.d.ts +25 -0
  11. package/dist/endpoints/billing.d.ts.map +1 -0
  12. package/dist/endpoints/boards.d.ts +49 -0
  13. package/dist/endpoints/boards.d.ts.map +1 -0
  14. package/dist/endpoints/config.d.ts +24 -0
  15. package/dist/endpoints/config.d.ts.map +1 -0
  16. package/dist/endpoints/events.d.ts +59 -0
  17. package/dist/endpoints/events.d.ts.map +1 -0
  18. package/dist/endpoints/index.d.ts +18 -0
  19. package/dist/endpoints/index.d.ts.map +1 -0
  20. package/dist/endpoints/integrations.d.ts +11 -0
  21. package/dist/endpoints/integrations.d.ts.map +1 -0
  22. package/dist/endpoints/links.d.ts +33 -0
  23. package/dist/endpoints/links.d.ts.map +1 -0
  24. package/dist/endpoints/me.d.ts +24 -0
  25. package/dist/endpoints/me.d.ts.map +1 -0
  26. package/dist/endpoints/orgs.d.ts +64 -0
  27. package/dist/endpoints/orgs.d.ts.map +1 -0
  28. package/dist/endpoints/pixels.d.ts +29 -0
  29. package/dist/endpoints/pixels.d.ts.map +1 -0
  30. package/dist/endpoints/reports.d.ts +148 -0
  31. package/dist/endpoints/reports.d.ts.map +1 -0
  32. package/dist/endpoints/segments.d.ts +25 -0
  33. package/dist/endpoints/segments.d.ts.map +1 -0
  34. package/dist/endpoints/sessions.d.ts +39 -0
  35. package/dist/endpoints/sessions.d.ts.map +1 -0
  36. package/dist/endpoints/users.d.ts +39 -0
  37. package/dist/endpoints/users.d.ts.map +1 -0
  38. package/dist/endpoints/webhooks.d.ts +11 -0
  39. package/dist/endpoints/webhooks.d.ts.map +1 -0
  40. package/dist/endpoints/websites.d.ts +203 -0
  41. package/dist/endpoints/websites.d.ts.map +1 -0
  42. package/dist/index.cjs +61 -82
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.ts +129 -1904
  45. package/dist/index.d.ts.map +1 -1
  46. package/dist/index.js +22 -43
  47. package/dist/index.js.map +1 -1
  48. package/dist/runtime.d.ts +118 -0
  49. package/dist/runtime.d.ts.map +1 -0
  50. package/dist/types/index.d.ts +602 -0
  51. package/dist/types/index.d.ts.map +1 -0
  52. package/package.json +22 -19
  53. package/dist/index.d.cts +0 -1927
  54. package/dist/index.d.cts.map +0 -1
@@ -0,0 +1,118 @@
1
+ /**
2
+ * Runtime detection utilities for Node.js vs Edge environments
3
+ *
4
+ * @module runtime
5
+ * @example
6
+ * ```ts
7
+ * import { detectRuntime, isNodeRuntime, isEdgeRuntime } from 'entro-api/runtime';
8
+ *
9
+ * // Detect current runtime
10
+ * const runtime = detectRuntime();
11
+ * console.log(runtime); // 'node' | 'edge' | 'unknown'
12
+ *
13
+ * // Check specific runtime
14
+ * if (isNodeRuntime()) {
15
+ * // Use Node.js-specific features
16
+ * }
17
+ *
18
+ * if (isEdgeRuntime()) {
19
+ * // Use edge-compatible features only
20
+ * }
21
+ * ```
22
+ */
23
+ export type Runtime = "node" | "edge" | "unknown";
24
+ /**
25
+ * Detect the current JavaScript runtime environment
26
+ *
27
+ * @returns {Runtime} The detected runtime ('node', 'edge', or 'unknown')
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * const runtime = detectRuntime();
32
+ *
33
+ * switch (runtime) {
34
+ * case 'node':
35
+ * console.log('Running in Node.js');
36
+ * break;
37
+ * case 'edge':
38
+ * console.log('Running in Edge Runtime');
39
+ * break;
40
+ * default:
41
+ * console.log('Unknown runtime');
42
+ * }
43
+ * ```
44
+ */
45
+ export declare function detectRuntime(): Runtime;
46
+ /**
47
+ * Check if code is running in Node.js runtime
48
+ *
49
+ * @returns {boolean} True if running in Node.js
50
+ *
51
+ * @example
52
+ * ```ts
53
+ * if (isNodeRuntime()) {
54
+ * // Safe to use Node.js-only features
55
+ * const fs = require('fs');
56
+ * const data = fs.readFileSync('file.txt');
57
+ * }
58
+ * ```
59
+ */
60
+ export declare function isNodeRuntime(): boolean;
61
+ /**
62
+ * Check if code is running in Edge runtime
63
+ *
64
+ * @returns {boolean} True if running in Edge runtime (Vercel, Netlify, Cloudflare)
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * if (isEdgeRuntime()) {
69
+ * // Use only edge-compatible features
70
+ * const response = await fetch('https://api.example.com');
71
+ * }
72
+ * ```
73
+ */
74
+ export declare function isEdgeRuntime(): boolean;
75
+ /**
76
+ * Get runtime capabilities
77
+ *
78
+ * @returns Runtime capabilities object
79
+ *
80
+ * @example
81
+ * ```ts
82
+ * const capabilities = getRuntimeCapabilities();
83
+ *
84
+ * if (capabilities.supportsFileSystem) {
85
+ * // Can use fs module
86
+ * }
87
+ *
88
+ * if (capabilities.supportsWebCrypto) {
89
+ * // Can use Web Crypto API
90
+ * }
91
+ * ```
92
+ */
93
+ export declare function getRuntimeCapabilities(): {
94
+ runtime: Runtime;
95
+ isNode: boolean;
96
+ isEdge: boolean;
97
+ supportsFileSystem: boolean;
98
+ supportsWebCrypto: boolean;
99
+ supportsFetch: boolean;
100
+ supportsStreams: boolean;
101
+ };
102
+ /**
103
+ * Assert that code is running in a specific runtime
104
+ *
105
+ * @param {Runtime} expected - The expected runtime
106
+ * @throws {Error} If not running in the expected runtime
107
+ *
108
+ * @example
109
+ * ```ts
110
+ * // Ensure we're in edge runtime
111
+ * assertRuntime('edge');
112
+ *
113
+ * // Now safe to use edge-only features
114
+ * export const runtime = 'edge';
115
+ * ```
116
+ */
117
+ export declare function assertRuntime(expected: Runtime): void;
118
+ //# sourceMappingURL=runtime.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"runtime.d.ts","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAyBvC;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,IAAI,OAAO,CAEvC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB;;;;;;;;EAYrC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,IAAI,CAQrD"}
@@ -0,0 +1,602 @@
1
+ import type { DeploymentSource, FormEventType, FormFieldType, NavigationType, VitalRating, VitalType } from "@entrolytics/shared";
2
+ export interface ApiResponse<T> {
3
+ ok: boolean;
4
+ status: number;
5
+ data?: T;
6
+ error?: string;
7
+ }
8
+ export interface PaginationParams {
9
+ page?: number;
10
+ pageSize?: number;
11
+ orderBy?: string;
12
+ }
13
+ export interface DateRangeParams {
14
+ startAt: number;
15
+ endAt: number;
16
+ [key: string]: string | number | boolean | undefined;
17
+ }
18
+ export type PlatformRole = "admin" | "user" | "view-only";
19
+ export type OrganizationRole = "owner" | "admin" | "member" | "viewer";
20
+ export interface User {
21
+ id: string;
22
+ /** Clerk user ID (user_xxx format) */
23
+ clerkId: string;
24
+ /** Primary email address */
25
+ email: string;
26
+ /** Display name (computed from firstName + lastName or email) */
27
+ displayName: string;
28
+ /** First name from Clerk */
29
+ firstName?: string | null;
30
+ /** Last name from Clerk */
31
+ lastName?: string | null;
32
+ /** Profile image URL */
33
+ imageUrl?: string | null;
34
+ /** Platform-level role */
35
+ role: PlatformRole;
36
+ /** Whether user has admin privileges */
37
+ isAdmin: boolean;
38
+ /** Current organization ID (if in org context) */
39
+ orgId?: string | null;
40
+ /** Role within current organization */
41
+ orgRole?: OrganizationRole | null;
42
+ createdAt: string;
43
+ updatedAt?: string | null;
44
+ }
45
+ export interface CreateUserData {
46
+ email: string;
47
+ firstName?: string;
48
+ lastName?: string;
49
+ role?: PlatformRole;
50
+ }
51
+ export interface UpdateUserData {
52
+ firstName?: string;
53
+ lastName?: string;
54
+ role?: PlatformRole;
55
+ }
56
+ export interface Organization {
57
+ id: string;
58
+ name: string;
59
+ createdAt: string;
60
+ }
61
+ export interface CreateOrgData {
62
+ name: string;
63
+ }
64
+ export interface UpdateOrgData {
65
+ name?: string;
66
+ }
67
+ export interface OrgMember {
68
+ id: string;
69
+ userId: string;
70
+ orgId: string;
71
+ role: OrganizationRole;
72
+ user: User;
73
+ createdAt: string;
74
+ }
75
+ export interface JoinOrgData {
76
+ accessCode: string;
77
+ }
78
+ export interface Website {
79
+ id: string;
80
+ name: string;
81
+ domain: string;
82
+ shareId?: string;
83
+ resetAt?: string;
84
+ userId?: string;
85
+ orgId?: string;
86
+ createdAt: string;
87
+ deletedAt?: string;
88
+ }
89
+ export interface CreateWebsiteData {
90
+ name: string;
91
+ domain: string;
92
+ shareId?: string;
93
+ orgId?: string;
94
+ }
95
+ export interface UpdateWebsiteData {
96
+ name?: string;
97
+ domain?: string;
98
+ shareId?: string;
99
+ }
100
+ export interface WebsiteStats {
101
+ pageviews: {
102
+ value: number;
103
+ change: number;
104
+ };
105
+ visitors: {
106
+ value: number;
107
+ change: number;
108
+ };
109
+ visits: {
110
+ value: number;
111
+ change: number;
112
+ };
113
+ bounces: {
114
+ value: number;
115
+ change: number;
116
+ };
117
+ totalTime: {
118
+ value: number;
119
+ change: number;
120
+ };
121
+ }
122
+ /**
123
+ * Link statistics - alias to WebsiteStats as they share the same structure
124
+ */
125
+ export type LinkStats = WebsiteStats;
126
+ export interface PageviewData {
127
+ x: string;
128
+ y: number;
129
+ }
130
+ export interface WebsitePageviews {
131
+ pageviews: PageviewData[];
132
+ sessions: PageviewData[];
133
+ }
134
+ export interface MetricData {
135
+ x: string;
136
+ y: number;
137
+ }
138
+ export type MetricType = "url" | "title" | "referrer" | "browser" | "os" | "device" | "country" | "region" | "city" | "language" | "event";
139
+ export interface WebsiteMetricsParams extends DateRangeParams {
140
+ type: MetricType;
141
+ url?: string;
142
+ referrer?: string;
143
+ title?: string;
144
+ query?: string;
145
+ event?: string;
146
+ limit?: number;
147
+ offset?: number;
148
+ [key: string]: string | number | boolean | undefined;
149
+ }
150
+ export interface WebsiteEvent {
151
+ id: string;
152
+ websiteId: string;
153
+ sessionId: string;
154
+ createdAt: string;
155
+ urlPath: string;
156
+ urlQuery?: string;
157
+ referrerPath?: string;
158
+ referrerQuery?: string;
159
+ referrerDomain?: string;
160
+ pageTitle?: string;
161
+ eventType: number;
162
+ eventName?: string;
163
+ }
164
+ export interface EventStats {
165
+ events: number;
166
+ fields: number;
167
+ }
168
+ export interface EventData {
169
+ eventName: string;
170
+ propertyName: string;
171
+ dataType: number;
172
+ total: number;
173
+ }
174
+ export interface EventDataField {
175
+ fieldName: string;
176
+ dataType: number;
177
+ fieldValue?: string;
178
+ }
179
+ export interface Session {
180
+ id: string;
181
+ websiteId: string;
182
+ hostname: string;
183
+ browser: string;
184
+ os: string;
185
+ device: string;
186
+ screen: string;
187
+ language: string;
188
+ country?: string;
189
+ subdivision1?: string;
190
+ subdivision2?: string;
191
+ city?: string;
192
+ createdAt: string;
193
+ distinctId?: string;
194
+ }
195
+ export interface SessionStats {
196
+ pageviews: number;
197
+ visitors: number;
198
+ visits: number;
199
+ countries: number;
200
+ }
201
+ export interface SessionActivity {
202
+ createdAt: string;
203
+ urlPath: string;
204
+ urlQuery?: string;
205
+ referrerDomain?: string;
206
+ referrerPath?: string;
207
+ eventName?: string;
208
+ eventType: number;
209
+ }
210
+ export interface Report {
211
+ id: string;
212
+ userId: string;
213
+ websiteId: string;
214
+ type: string;
215
+ name: string;
216
+ description?: string;
217
+ parameters: string;
218
+ createdAt: string;
219
+ updatedAt: string;
220
+ }
221
+ export interface CreateReportData {
222
+ websiteId: string;
223
+ type: string;
224
+ name: string;
225
+ description?: string;
226
+ parameters: Record<string, unknown>;
227
+ }
228
+ export interface UpdateReportData {
229
+ name?: string;
230
+ description?: string;
231
+ parameters?: Record<string, unknown>;
232
+ }
233
+ export interface Segment {
234
+ id: string;
235
+ websiteId: string;
236
+ name: string;
237
+ data: string;
238
+ createdAt: string;
239
+ updatedAt: string;
240
+ }
241
+ export interface CreateSegmentData {
242
+ name: string;
243
+ data: Record<string, unknown>;
244
+ }
245
+ export interface UpdateSegmentData {
246
+ name?: string;
247
+ data?: Record<string, unknown>;
248
+ }
249
+ export interface Link {
250
+ id: string;
251
+ orgId: string;
252
+ name: string;
253
+ url: string;
254
+ shortUrl: string;
255
+ clicks: number;
256
+ createdAt: string;
257
+ }
258
+ export interface CreateLinkData {
259
+ name: string;
260
+ url: string;
261
+ shortUrl?: string;
262
+ }
263
+ export interface UpdateLinkData {
264
+ name?: string;
265
+ url?: string;
266
+ }
267
+ export interface Pixel {
268
+ id: string;
269
+ orgId: string;
270
+ name: string;
271
+ trackingId: string;
272
+ impressions: number;
273
+ createdAt: string;
274
+ }
275
+ export interface CreatePixelData {
276
+ name: string;
277
+ }
278
+ export interface UpdatePixelData {
279
+ name?: string;
280
+ }
281
+ export interface RealtimeData {
282
+ pageviews: PageviewData[];
283
+ sessions: PageviewData[];
284
+ events: EventData[];
285
+ timestamp: number;
286
+ }
287
+ export interface ActiveVisitor {
288
+ x: string;
289
+ y: number;
290
+ }
291
+ export interface Board {
292
+ id: string;
293
+ userId: string;
294
+ orgId?: string;
295
+ websiteId: string;
296
+ name: string;
297
+ description?: string;
298
+ createdAt: string;
299
+ updatedAt: string;
300
+ }
301
+ export interface BoardWidget {
302
+ id: string;
303
+ boardId: string;
304
+ title: string;
305
+ type: string;
306
+ parameters: Record<string, unknown>;
307
+ position: {
308
+ x: number;
309
+ y: number;
310
+ w: number;
311
+ h: number;
312
+ };
313
+ createdAt: string;
314
+ updatedAt: string;
315
+ }
316
+ export interface CreateBoardData {
317
+ websiteId: string;
318
+ name: string;
319
+ description?: string;
320
+ }
321
+ export interface UpdateBoardData {
322
+ name?: string;
323
+ description?: string;
324
+ }
325
+ export interface CreateBoardWidgetData {
326
+ title: string;
327
+ type: string;
328
+ parameters?: Record<string, unknown>;
329
+ position?: {
330
+ x: number;
331
+ y: number;
332
+ w: number;
333
+ h: number;
334
+ };
335
+ }
336
+ export interface UpdateBoardWidgetData {
337
+ title?: string;
338
+ type?: string;
339
+ parameters?: Record<string, unknown>;
340
+ position?: {
341
+ x: number;
342
+ y: number;
343
+ w: number;
344
+ h: number;
345
+ };
346
+ }
347
+ export type PlanId = "starter" | "pro" | "business" | "enterprise";
348
+ export interface AccountUsage {
349
+ /** Current billing period start date (ISO string) */
350
+ periodStart: string;
351
+ /** Current billing period end date (ISO string) */
352
+ periodEnd: string;
353
+ /** Number of pageviews recorded this period */
354
+ pageviews: number;
355
+ /** Number of custom events recorded this period */
356
+ events: number;
357
+ /** Number of websites currently active */
358
+ websites: number;
359
+ /** Number of team members (for org accounts) */
360
+ teamMembers: number;
361
+ }
362
+ export interface AccountEntitlements {
363
+ /** User's current plan */
364
+ plan: PlanId;
365
+ /** Maximum pageviews per month */
366
+ maxPageviews: number;
367
+ /** Maximum custom events per month */
368
+ maxEvents: number;
369
+ /** Maximum websites allowed */
370
+ maxWebsites: number;
371
+ /** Maximum team members allowed */
372
+ maxTeamMembers: number;
373
+ /** Data retention period in months */
374
+ dataRetentionMonths: number;
375
+ /** Feature flags */
376
+ features: {
377
+ customDomains: boolean;
378
+ apiAccess: boolean;
379
+ webhooks: boolean;
380
+ advancedReports: boolean;
381
+ exportData: boolean;
382
+ whiteLabel: boolean;
383
+ prioritySupport: boolean;
384
+ sla: boolean;
385
+ };
386
+ }
387
+ export interface Subscription {
388
+ /** Subscription ID */
389
+ id: string;
390
+ /** Current plan */
391
+ plan: PlanId;
392
+ /** Subscription status */
393
+ status: "active" | "past_due" | "canceled" | "trialing" | "incomplete";
394
+ /** Current billing period start */
395
+ currentPeriodStart: string;
396
+ /** Current billing period end */
397
+ currentPeriodEnd: string;
398
+ /** Whether subscription will cancel at period end */
399
+ cancelAtPeriodEnd: boolean;
400
+ /** Trial end date (if trialing) */
401
+ trialEnd?: string;
402
+ }
403
+ export interface CheckoutOptions {
404
+ /** Plan to checkout */
405
+ plan: PlanId;
406
+ /** Billing interval */
407
+ interval?: "month" | "year";
408
+ /** Success redirect URL */
409
+ successUrl?: string;
410
+ /** Cancel redirect URL */
411
+ cancelUrl?: string;
412
+ }
413
+ export interface CheckoutResponse {
414
+ /** Stripe checkout URL */
415
+ url: string;
416
+ }
417
+ export interface PortalResponse {
418
+ /** Stripe customer portal URL */
419
+ url: string;
420
+ }
421
+ /**
422
+ * Website ingest mode configuration
423
+ */
424
+ export type IngestMode = "auto" | "node" | "edge";
425
+ export interface WebsiteModeConfig {
426
+ ingestMode: IngestMode;
427
+ }
428
+ /**
429
+ * Routing health status
430
+ */
431
+ export interface RoutingHealth {
432
+ status: "ok" | "degraded" | "error";
433
+ edge: {
434
+ healthy: boolean;
435
+ latency: number;
436
+ };
437
+ node: {
438
+ healthy: boolean;
439
+ latency: number;
440
+ };
441
+ timestamp: string;
442
+ }
443
+ /**
444
+ * Routing statistics
445
+ */
446
+ export interface RoutingStats {
447
+ period: {
448
+ start: string;
449
+ end: string;
450
+ };
451
+ requests: {
452
+ total: number;
453
+ edge: number;
454
+ node: number;
455
+ };
456
+ latency: {
457
+ edge: {
458
+ p50: number;
459
+ p95: number;
460
+ p99: number;
461
+ };
462
+ node: {
463
+ p50: number;
464
+ p95: number;
465
+ p99: number;
466
+ };
467
+ };
468
+ }
469
+ export type VitalMetric = VitalType;
470
+ export type { DeploymentSource, FormEventType, FormFieldType, NavigationType, VitalRating };
471
+ export interface WebVital {
472
+ id: string;
473
+ websiteId: string;
474
+ sessionId?: string;
475
+ createdAt: string;
476
+ metricName: VitalMetric;
477
+ metricValue: number;
478
+ metricRating: VitalRating;
479
+ urlPath: string;
480
+ deviceType?: string;
481
+ connectionType?: string;
482
+ deployId?: string;
483
+ navigationType?: NavigationType;
484
+ }
485
+ export interface WebVitalsStats {
486
+ metricName: VitalMetric;
487
+ goodCount: number;
488
+ needsImprovementCount: number;
489
+ poorCount: number;
490
+ p75Value: number;
491
+ p95Value: number;
492
+ avgValue: number;
493
+ count: number;
494
+ goodPercentage: number;
495
+ }
496
+ export interface WebVitalsParams extends DateRangeParams {
497
+ metric?: VitalMetric;
498
+ urlPath?: string;
499
+ deployId?: string;
500
+ deviceType?: string;
501
+ }
502
+ export interface TrackVitalData {
503
+ visitorId: string;
504
+ sessionId: string;
505
+ url: string;
506
+ path: string;
507
+ metric: VitalMetric;
508
+ value: number;
509
+ rating: VitalRating;
510
+ delta?: number;
511
+ id?: string;
512
+ navigationType?: NavigationType;
513
+ attribution?: Record<string, unknown>;
514
+ deviceType?: string;
515
+ browser?: string;
516
+ }
517
+ export interface FormEvent {
518
+ id: string;
519
+ websiteId: string;
520
+ sessionId?: string;
521
+ createdAt: string;
522
+ formId: string;
523
+ formName?: string;
524
+ eventType: FormEventType;
525
+ fieldName?: string;
526
+ fieldType?: string;
527
+ fieldIndex?: number;
528
+ timeOnField?: number;
529
+ timeSinceStart?: number;
530
+ errorMessage?: string;
531
+ success?: boolean;
532
+ urlPath: string;
533
+ }
534
+ export interface FormStats {
535
+ formId: string;
536
+ formName: string | null;
537
+ starts: number;
538
+ submits: number;
539
+ abandons: number;
540
+ conversionRate: number;
541
+ }
542
+ export interface FormFieldStats {
543
+ fieldName: string;
544
+ fieldType: FormFieldType;
545
+ focusCount: number;
546
+ blurCount: number;
547
+ errorCount: number;
548
+ avgTimeOnField: number;
549
+ }
550
+ export interface FormAnalyticsParams extends DateRangeParams {
551
+ formId?: string;
552
+ urlPath?: string;
553
+ }
554
+ export interface TrackFormEventData {
555
+ visitorId: string;
556
+ sessionId: string;
557
+ eventType: FormEventType;
558
+ formId: string;
559
+ formName?: string;
560
+ urlPath: string;
561
+ fieldName?: string;
562
+ fieldType?: string;
563
+ fieldIndex?: number;
564
+ timeOnField?: number;
565
+ timeSinceStart?: number;
566
+ errorMessage?: string;
567
+ success?: boolean;
568
+ }
569
+ export interface Deployment {
570
+ deployId: string;
571
+ gitSha: string | null;
572
+ gitBranch: string | null;
573
+ source: "vercel" | "netlify" | "cloudflare" | "railway" | "render" | "fly" | "heroku" | "aws" | "gcp" | "azure" | "custom";
574
+ deployUrl: string | null;
575
+ environment: string | null;
576
+ deployedAt: string;
577
+ pageviews: number;
578
+ visitors: number;
579
+ errors: number;
580
+ }
581
+ export interface DeploymentComparison {
582
+ deployId: string;
583
+ gitSha: string | null;
584
+ deployedAt: string;
585
+ pageviews: number;
586
+ visitors: number;
587
+ avgLoadTime: number | null;
588
+ errorCount: number;
589
+ }
590
+ export interface DeploymentParams extends DateRangeParams {
591
+ deployId?: string;
592
+ gitBranch?: string;
593
+ limit?: number;
594
+ }
595
+ export interface SetDeploymentData {
596
+ deployId: string;
597
+ gitSha?: string;
598
+ gitBranch?: string;
599
+ deployUrl?: string;
600
+ source?: "vercel" | "netlify" | "cloudflare" | "railway" | "render" | "fly" | "heroku" | "aws" | "gcp" | "azure" | "custom";
601
+ }
602
+ //# sourceMappingURL=index.d.ts.map