@entrolytics/shared 2.0.1 → 2.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.
package/dist/index.d.ts DELETED
@@ -1,685 +0,0 @@
1
- /**
2
- * Shared constants across Entrolytics ecosystem
3
- * Used by: CLI, SDKs, Dashboard, Integrations
4
- */
5
- /**
6
- * Plan definitions and limits
7
- */
8
- declare const PLANS: {
9
- readonly starter: {
10
- readonly id: "starter";
11
- readonly name: "Starter";
12
- readonly price: 0;
13
- readonly limits: {
14
- readonly pageviewsPerMonth: 25000;
15
- readonly websites: 2;
16
- readonly retentionDays: 30;
17
- readonly seats: 1;
18
- };
19
- readonly features: {
20
- readonly funnels: false;
21
- readonly attribution: false;
22
- readonly revenue: false;
23
- readonly customDashboards: false;
24
- readonly apiAccess: false;
25
- readonly weeklyReports: true;
26
- readonly support: "community";
27
- };
28
- };
29
- readonly pro: {
30
- readonly id: "pro";
31
- readonly name: "Pro";
32
- readonly price: 29;
33
- readonly limits: {
34
- readonly pageviewsPerMonth: 250000;
35
- readonly websites: 10;
36
- readonly retentionDays: 365;
37
- readonly seats: 5;
38
- };
39
- readonly features: {
40
- readonly funnels: true;
41
- readonly attribution: true;
42
- readonly revenue: true;
43
- readonly customDashboards: false;
44
- readonly apiAccess: true;
45
- readonly weeklyReports: true;
46
- readonly support: "email";
47
- };
48
- };
49
- readonly business: {
50
- readonly id: "business";
51
- readonly name: "Business";
52
- readonly price: 99;
53
- readonly limits: {
54
- readonly pageviewsPerMonth: 1000000;
55
- readonly websites: -1;
56
- readonly retentionDays: 730;
57
- readonly seats: -1;
58
- };
59
- readonly features: {
60
- readonly funnels: true;
61
- readonly attribution: true;
62
- readonly revenue: true;
63
- readonly customDashboards: true;
64
- readonly apiAccess: true;
65
- readonly weeklyReports: true;
66
- readonly support: "priority";
67
- };
68
- };
69
- readonly enterprise: {
70
- readonly id: "enterprise";
71
- readonly name: "Enterprise";
72
- readonly price: -1;
73
- readonly limits: {
74
- readonly pageviewsPerMonth: -1;
75
- readonly websites: -1;
76
- readonly retentionDays: -1;
77
- readonly seats: -1;
78
- };
79
- readonly features: {
80
- readonly funnels: true;
81
- readonly attribution: true;
82
- readonly revenue: true;
83
- readonly customDashboards: true;
84
- readonly apiAccess: true;
85
- readonly weeklyReports: true;
86
- readonly support: "dedicated";
87
- readonly sso: true;
88
- readonly auditLogs: true;
89
- readonly customRetention: true;
90
- };
91
- };
92
- };
93
- /**
94
- * Plan feature names for display
95
- */
96
- declare const PLAN_FEATURES: {
97
- readonly funnels: "Funnel Analytics";
98
- readonly attribution: "Attribution Reports";
99
- readonly revenue: "Revenue Tracking";
100
- readonly customDashboards: "Custom Dashboards";
101
- readonly apiAccess: "API Access";
102
- readonly weeklyReports: "Weekly Email Reports";
103
- readonly sso: "SSO/SAML";
104
- readonly auditLogs: "Audit Logs";
105
- readonly customRetention: "Custom Data Retention";
106
- };
107
- /**
108
- * Usage warning thresholds (percentages)
109
- */
110
- declare const USAGE_THRESHOLDS: {
111
- readonly warning: 90;
112
- readonly critical: 95;
113
- };
114
- /**
115
- * Billing-related error codes
116
- */
117
- declare const BILLING_ERRORS: {
118
- readonly quotaExceeded: "QUOTA_EXCEEDED";
119
- readonly planRequired: "PLAN_REQUIRED";
120
- readonly featureNotAvailable: "FEATURE_NOT_AVAILABLE";
121
- readonly subscriptionInactive: "SUBSCRIPTION_INACTIVE";
122
- readonly paymentFailed: "PAYMENT_FAILED";
123
- };
124
- /**
125
- * API endpoint configuration
126
- */
127
- declare const API_ENDPOINTS: {
128
- readonly production: "https://ng.entrolytics.click";
129
- readonly development: "http://localhost:3000";
130
- };
131
- /**
132
- * Default API host
133
- */
134
- declare const DEFAULT_API_HOST: "https://ng.entrolytics.click" | "http://localhost:3000";
135
- /**
136
- * Environment variable naming conventions by framework
137
- */
138
- declare const ENV_VAR_NAMES: {
139
- readonly nextjs: {
140
- readonly websiteId: "NEXT_PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
141
- readonly host: "NEXT_PUBLIC_ENTROLYTICS_NG_HOST";
142
- readonly envFile: ".env.local";
143
- };
144
- readonly react: {
145
- readonly websiteId: "VITE_ENTROLYTICS_NG_WEBSITE_ID";
146
- readonly host: "VITE_ENTROLYTICS_NG_HOST";
147
- readonly envFile: ".env";
148
- readonly fallback: {
149
- readonly websiteId: "REACT_APP_ENTROLYTICS_NG_WEBSITE_ID";
150
- readonly host: "REACT_APP_ENTROLYTICS_NG_HOST";
151
- };
152
- };
153
- readonly vue: {
154
- readonly websiteId: "VITE_ENTROLYTICS_NG_WEBSITE_ID";
155
- readonly host: "VITE_ENTROLYTICS_NG_HOST";
156
- readonly envFile: ".env";
157
- };
158
- readonly svelte: {
159
- readonly websiteId: "PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
160
- readonly host: "PUBLIC_ENTROLYTICS_NG_HOST";
161
- readonly envFile: ".env";
162
- };
163
- readonly astro: {
164
- readonly websiteId: "PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
165
- readonly host: "PUBLIC_ENTROLYTICS_NG_HOST";
166
- readonly envFile: ".env";
167
- };
168
- readonly html: {
169
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
170
- readonly host: "ENTROLYTICS_NG_HOST";
171
- readonly envFile: ".env";
172
- };
173
- readonly node: {
174
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
175
- readonly host: "ENTROLYTICS_NG_HOST";
176
- readonly envFile: ".env";
177
- };
178
- readonly php: {
179
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
180
- readonly host: "ENTROLYTICS_NG_HOST";
181
- readonly envFile: ".env";
182
- };
183
- readonly python: {
184
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
185
- readonly host: "ENTROLYTICS_NG_HOST";
186
- readonly envFile: ".env";
187
- };
188
- readonly go: {
189
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
190
- readonly host: "ENTROLYTICS_NG_HOST";
191
- readonly envFile: ".env";
192
- };
193
- };
194
- /**
195
- * CLI configuration constants
196
- */
197
- declare const CLI_CONFIG: {
198
- readonly tokenExpiryMinutes: 15;
199
- readonly maxTokensPerUser: 10;
200
- readonly pollIntervalMs: 2000;
201
- readonly setupTimeoutMs: 300000;
202
- readonly minCliVersion: "1.0.0";
203
- };
204
- /**
205
- * Standard event types
206
- */
207
- declare const EVENT_TYPES: {
208
- readonly pageView: "page_view";
209
- readonly click: "click";
210
- readonly formSubmit: "form_submit";
211
- readonly custom: "custom";
212
- readonly error: "error";
213
- readonly performance: "performance";
214
- };
215
- /**
216
- * Web Vitals metric types (Phase 2)
217
- * Core Web Vitals: LCP, INP, CLS
218
- * Additional: TTFB, FCP
219
- */
220
- declare const VITAL_TYPES: {
221
- readonly LCP: "LCP";
222
- readonly INP: "INP";
223
- readonly CLS: "CLS";
224
- readonly TTFB: "TTFB";
225
- readonly FCP: "FCP";
226
- };
227
- /**
228
- * Web Vitals rating thresholds
229
- */
230
- declare const VITAL_RATINGS: {
231
- readonly good: "good";
232
- readonly needsImprovement: "needs-improvement";
233
- readonly poor: "poor";
234
- };
235
- /**
236
- * Web Vitals thresholds by metric (in milliseconds, except CLS which is unitless)
237
- */
238
- declare const VITAL_THRESHOLDS: {
239
- readonly LCP: {
240
- readonly good: 2500;
241
- readonly poor: 4000;
242
- };
243
- readonly INP: {
244
- readonly good: 200;
245
- readonly poor: 500;
246
- };
247
- readonly CLS: {
248
- readonly good: 0.1;
249
- readonly poor: 0.25;
250
- };
251
- readonly TTFB: {
252
- readonly good: 800;
253
- readonly poor: 1800;
254
- };
255
- readonly FCP: {
256
- readonly good: 1800;
257
- readonly poor: 3000;
258
- };
259
- };
260
- /**
261
- * Navigation types for Web Vitals context
262
- */
263
- declare const NAVIGATION_TYPES: {
264
- readonly navigate: "navigate";
265
- readonly reload: "reload";
266
- readonly backForward: "back-forward";
267
- readonly backForwardCache: "back-forward-cache";
268
- readonly prerender: "prerender";
269
- readonly restore: "restore";
270
- };
271
- /**
272
- * Form event types (Phase 2)
273
- */
274
- declare const FORM_EVENT_TYPES: {
275
- readonly start: "start";
276
- readonly fieldFocus: "field_focus";
277
- readonly fieldBlur: "field_blur";
278
- readonly fieldError: "field_error";
279
- readonly submit: "submit";
280
- readonly abandon: "abandon";
281
- };
282
- /**
283
- * Form field types
284
- */
285
- declare const FORM_FIELD_TYPES: {
286
- readonly text: "text";
287
- readonly email: "email";
288
- readonly password: "password";
289
- readonly tel: "tel";
290
- readonly number: "number";
291
- readonly url: "url";
292
- readonly textarea: "textarea";
293
- readonly select: "select";
294
- readonly checkbox: "checkbox";
295
- readonly radio: "radio";
296
- readonly date: "date";
297
- readonly file: "file";
298
- readonly hidden: "hidden";
299
- readonly submit: "submit";
300
- readonly other: "other";
301
- };
302
- /**
303
- * Deployment platform sources (Phase 2)
304
- */
305
- declare const DEPLOYMENT_SOURCES: {
306
- readonly vercel: "vercel";
307
- readonly netlify: "netlify";
308
- readonly cloudflare: "cloudflare";
309
- readonly railway: "railway";
310
- readonly render: "render";
311
- readonly fly: "fly";
312
- readonly heroku: "heroku";
313
- readonly aws: "aws";
314
- readonly gcp: "gcp";
315
- readonly azure: "azure";
316
- readonly custom: "custom";
317
- };
318
- /**
319
- * Deployment environment variables by platform
320
- */
321
- declare const DEPLOYMENT_ENV_VARS: {
322
- readonly vercel: {
323
- readonly deployId: "VERCEL_DEPLOYMENT_ID";
324
- readonly gitSha: "VERCEL_GIT_COMMIT_SHA";
325
- readonly gitBranch: "VERCEL_GIT_COMMIT_REF";
326
- readonly url: "VERCEL_URL";
327
- };
328
- readonly netlify: {
329
- readonly deployId: "DEPLOY_ID";
330
- readonly gitSha: "COMMIT_REF";
331
- readonly gitBranch: "BRANCH";
332
- readonly url: "DEPLOY_URL";
333
- };
334
- readonly cloudflare: {
335
- readonly deployId: "CF_PAGES_COMMIT_SHA";
336
- readonly gitSha: "CF_PAGES_COMMIT_SHA";
337
- readonly gitBranch: "CF_PAGES_BRANCH";
338
- readonly url: "CF_PAGES_URL";
339
- };
340
- };
341
- /**
342
- * HTTP status codes
343
- */
344
- declare const HTTP_STATUS: {
345
- readonly ok: 200;
346
- readonly created: 201;
347
- readonly accepted: 202;
348
- readonly noContent: 204;
349
- readonly badRequest: 400;
350
- readonly unauthorized: 401;
351
- readonly forbidden: 403;
352
- readonly notFound: 404;
353
- readonly conflict: 409;
354
- readonly tooManyRequests: 429;
355
- readonly internalServerError: 500;
356
- readonly serviceUnavailable: 503;
357
- };
358
- /**
359
- * API route paths
360
- */
361
- declare const API_ROUTES: {
362
- readonly cliAuthToken: "/api/auth/cli/token";
363
- readonly cliAuthTokens: "/api/auth/cli/tokens";
364
- readonly cliToken: "/api/cli/token";
365
- readonly cliValidate: "/api/cli/validate";
366
- readonly shareToken: (shareId: string) => string;
367
- readonly links: "/api/links";
368
- readonly linkRedirect: (slug: string) => string;
369
- readonly websites: "/api/websites";
370
- readonly websiteById: (id: string) => string;
371
- readonly websiteEvents: (id: string) => string;
372
- readonly websiteRecentEvents: (id: string) => string;
373
- readonly userOnboarding: "/api/user/onboarding";
374
- readonly userProfile: "/api/user/profile";
375
- readonly userEmailPreferences: "/api/me/email-preferences";
376
- readonly billingUsage: "/api/billing/usage";
377
- readonly billingCheckout: "/api/billing/checkout";
378
- readonly billingPortal: "/api/billing/portal";
379
- readonly billingWebhook: "/api/billing/webhook";
380
- readonly collect: "/api/collect";
381
- readonly send: "/api/send";
382
- readonly collectVitals: "/api/collect/vitals";
383
- readonly collectForms: "/api/collect/forms";
384
- readonly websiteVitals: (id: string) => string;
385
- readonly websiteForms: (id: string) => string;
386
- readonly websiteDeployments: (id: string) => string;
387
- readonly health: "/api/health";
388
- readonly healthIntegrations: "/api/health/integrations";
389
- };
390
- /**
391
- * Onboarding step identifiers
392
- */
393
- declare const ONBOARDING_STEPS: {
394
- readonly welcome: "welcome";
395
- readonly createWebsite: "create-website";
396
- readonly installTracking: "install-tracking";
397
- readonly verify: "verify";
398
- readonly complete: "complete";
399
- readonly skipped: "skipped";
400
- };
401
- /**
402
- * CLI token statuses
403
- */
404
- declare const CLI_TOKEN_STATUS: {
405
- readonly pending: "pending";
406
- readonly used: "used";
407
- readonly expired: "expired";
408
- readonly revoked: "revoked";
409
- };
410
- /**
411
- * User roles
412
- */
413
- declare const USER_ROLES: {
414
- readonly admin: "admin";
415
- readonly user: "user";
416
- readonly viewer: "viewer";
417
- };
418
- /**
419
- * Framework package names
420
- */
421
- declare const FRAMEWORK_PACKAGES: {
422
- readonly nextjs: "@entrolytics/nextjs";
423
- readonly react: "@entrolytics/react";
424
- readonly vue: "@entrolytics/vue";
425
- readonly svelte: "@entrolytics/svelte";
426
- readonly astro: "@entrolytics/astro";
427
- readonly node: "@entrolytics/node";
428
- };
429
- /**
430
- * Framework detection patterns
431
- */
432
- declare const FRAMEWORK_PATTERNS: {
433
- readonly nextjs: {
434
- readonly files: readonly ["next.config.js", "next.config.mjs", "next.config.ts"];
435
- readonly dependencies: readonly ["next"];
436
- };
437
- readonly react: {
438
- readonly files: readonly ["vite.config.js", "vite.config.ts"];
439
- readonly dependencies: readonly ["react", "vite"];
440
- };
441
- readonly vue: {
442
- readonly files: readonly ["vite.config.js", "vite.config.ts"];
443
- readonly dependencies: readonly ["vue", "vite"];
444
- };
445
- readonly svelte: {
446
- readonly files: readonly ["svelte.config.js", "svelte.config.ts"];
447
- readonly dependencies: readonly ["svelte"];
448
- };
449
- readonly astro: {
450
- readonly files: readonly ["astro.config.mjs", "astro.config.ts"];
451
- readonly dependencies: readonly ["astro"];
452
- };
453
- };
454
- /**
455
- * Rate limiting configuration
456
- * Updated to match server-side implementation
457
- */
458
- declare const RATE_LIMITS: {
459
- readonly cliTokenExchange: {
460
- readonly windowSeconds: 60;
461
- readonly maxRequests: 5;
462
- };
463
- readonly shareTokenGeneration: {
464
- readonly windowSeconds: 60;
465
- readonly maxRequests: 10;
466
- };
467
- readonly linkCreation: {
468
- readonly windowSeconds: 60;
469
- readonly maxRequests: 20;
470
- };
471
- readonly linkRedirect: {
472
- readonly windowSeconds: 60;
473
- readonly maxRequests: 100;
474
- };
475
- readonly apiGeneral: {
476
- readonly windowSeconds: 60;
477
- readonly maxRequests: 100;
478
- };
479
- readonly cliTokenGeneration: {
480
- readonly windowMs: 3600000;
481
- readonly maxRequests: 10;
482
- };
483
- readonly cliValidation: {
484
- readonly windowMs: 3600000;
485
- readonly maxRequests: 100;
486
- };
487
- readonly eventCollection: {
488
- readonly windowMs: 60000;
489
- readonly maxRequests: 1000;
490
- };
491
- };
492
- /**
493
- * Error messages
494
- */
495
- declare const ERROR_MESSAGES: {
496
- readonly unauthorized: "Unauthorized access";
497
- readonly forbidden: "Access forbidden";
498
- readonly tokenExpired: "Token has expired";
499
- readonly tokenInvalid: "Invalid token";
500
- readonly tokenNotFound: "Token not found";
501
- readonly tokenAlreadyUsed: "Token has already been used";
502
- readonly tokenRevoked: "Token has been revoked";
503
- readonly tokenMissingJti: "Token missing JTI - please re-authenticate";
504
- readonly userBanned: "User account has been banned";
505
- readonly userDeleted: "User account has been deleted";
506
- readonly shareTokenExpired: "Share token has expired";
507
- readonly shareTokenRevoked: "Share has been revoked";
508
- readonly shareTokenInvalid: "Invalid share token";
509
- readonly invalidUrl: "Invalid URL provided";
510
- readonly invalidUrlProtocol: "URL must use http or https protocol";
511
- readonly openRedirectBlocked: "Open redirect attempt blocked";
512
- readonly invalidInput: "Invalid input provided";
513
- readonly missingRequired: "Missing required fields";
514
- readonly invalidFormat: "Invalid format";
515
- readonly notFound: "Resource not found";
516
- readonly websiteNotFound: "Website not found";
517
- readonly userNotFound: "User not found";
518
- readonly linkNotFound: "Link not found";
519
- readonly tooManyRequests: "Too many requests. Please try again later.";
520
- readonly rateLimitExceeded: "Rate limit exceeded";
521
- readonly internalError: "Internal server error";
522
- readonly serviceUnavailable: "Service temporarily unavailable";
523
- };
524
- /**
525
- * Success messages
526
- */
527
- declare const SUCCESS_MESSAGES: {
528
- readonly tokenGenerated: "Setup token generated successfully";
529
- readonly tokenValidated: "Token validated successfully";
530
- readonly tokenRevoked: "Token revoked successfully";
531
- readonly allTokensRevoked: "All tokens revoked successfully";
532
- readonly websiteCreated: "Website created successfully";
533
- readonly linkCreated: "Link created successfully";
534
- readonly shareCreated: "Share created successfully";
535
- readonly onboardingComplete: "Onboarding completed successfully";
536
- readonly setupComplete: "Setup completed successfully";
537
- };
538
- /**
539
- * CLI Access Token metadata
540
- */
541
- interface CliAccessTokenMetadata {
542
- jti: string;
543
- createdAt: string;
544
- expiresAt: string;
545
- lastUsedAt: string | null;
546
- ipAddress: string | null;
547
- userAgent: string | null;
548
- }
549
- type Framework = keyof typeof ENV_VAR_NAMES;
550
- type EventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
551
- type OnboardingStep = (typeof ONBOARDING_STEPS)[keyof typeof ONBOARDING_STEPS];
552
- type CliTokenStatus = (typeof CLI_TOKEN_STATUS)[keyof typeof CLI_TOKEN_STATUS];
553
- type UserRole = (typeof USER_ROLES)[keyof typeof USER_ROLES];
554
- type PlanId = keyof typeof PLANS;
555
- type Plan = (typeof PLANS)[PlanId];
556
- type PlanFeature = keyof typeof PLAN_FEATURES;
557
- type BillingError = (typeof BILLING_ERRORS)[keyof typeof BILLING_ERRORS];
558
- type VitalType = (typeof VITAL_TYPES)[keyof typeof VITAL_TYPES];
559
- type VitalRating = (typeof VITAL_RATINGS)[keyof typeof VITAL_RATINGS];
560
- type NavigationType = (typeof NAVIGATION_TYPES)[keyof typeof NAVIGATION_TYPES];
561
- type FormEventType = (typeof FORM_EVENT_TYPES)[keyof typeof FORM_EVENT_TYPES];
562
- type FormFieldType = (typeof FORM_FIELD_TYPES)[keyof typeof FORM_FIELD_TYPES];
563
- type DeploymentSource = (typeof DEPLOYMENT_SOURCES)[keyof typeof DEPLOYMENT_SOURCES];
564
- /**
565
- * Web Vital data structure for SDK tracking
566
- */
567
- interface WebVitalData {
568
- metric: VitalType;
569
- value: number;
570
- rating: VitalRating;
571
- delta?: number;
572
- id?: string;
573
- navigationType?: NavigationType;
574
- attribution?: Record<string, unknown>;
575
- url?: string;
576
- path?: string;
577
- }
578
- /**
579
- * Form event data structure for SDK tracking
580
- */
581
- interface FormEventData {
582
- eventType: FormEventType;
583
- formId: string;
584
- formName?: string;
585
- urlPath: string;
586
- fieldName?: string;
587
- fieldType?: FormFieldType;
588
- fieldIndex?: number;
589
- timeOnField?: number;
590
- timeSinceStart?: number;
591
- errorMessage?: string;
592
- success?: boolean;
593
- }
594
- /**
595
- * Deployment context for SDK tracking
596
- */
597
- interface DeploymentContext {
598
- deployId: string;
599
- gitSha?: string;
600
- gitBranch?: string;
601
- deployUrl?: string;
602
- source?: DeploymentSource;
603
- }
604
- /**
605
- * Utility functions
606
- */
607
- declare function getEnvVarNames(framework: Framework): {
608
- readonly websiteId: "NEXT_PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
609
- readonly host: "NEXT_PUBLIC_ENTROLYTICS_NG_HOST";
610
- readonly envFile: ".env.local";
611
- } | {
612
- readonly websiteId: "VITE_ENTROLYTICS_NG_WEBSITE_ID";
613
- readonly host: "VITE_ENTROLYTICS_NG_HOST";
614
- readonly envFile: ".env";
615
- readonly fallback: {
616
- readonly websiteId: "REACT_APP_ENTROLYTICS_NG_WEBSITE_ID";
617
- readonly host: "REACT_APP_ENTROLYTICS_NG_HOST";
618
- };
619
- } | {
620
- readonly websiteId: "VITE_ENTROLYTICS_NG_WEBSITE_ID";
621
- readonly host: "VITE_ENTROLYTICS_NG_HOST";
622
- readonly envFile: ".env";
623
- } | {
624
- readonly websiteId: "PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
625
- readonly host: "PUBLIC_ENTROLYTICS_NG_HOST";
626
- readonly envFile: ".env";
627
- } | {
628
- readonly websiteId: "PUBLIC_ENTROLYTICS_NG_WEBSITE_ID";
629
- readonly host: "PUBLIC_ENTROLYTICS_NG_HOST";
630
- readonly envFile: ".env";
631
- } | {
632
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
633
- readonly host: "ENTROLYTICS_NG_HOST";
634
- readonly envFile: ".env";
635
- } | {
636
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
637
- readonly host: "ENTROLYTICS_NG_HOST";
638
- readonly envFile: ".env";
639
- } | {
640
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
641
- readonly host: "ENTROLYTICS_NG_HOST";
642
- readonly envFile: ".env";
643
- } | {
644
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
645
- readonly host: "ENTROLYTICS_NG_HOST";
646
- readonly envFile: ".env";
647
- } | {
648
- readonly websiteId: "ENTROLYTICS_NG_WEBSITE_ID";
649
- readonly host: "ENTROLYTICS_NG_HOST";
650
- readonly envFile: ".env";
651
- };
652
- declare function getFrameworkPackage(framework: Framework): "@entrolytics/nextjs" | "@entrolytics/react" | "@entrolytics/vue" | "@entrolytics/svelte" | "@entrolytics/astro" | "@entrolytics/node";
653
- declare function isValidFramework(framework: string): framework is Framework;
654
- declare function getApiRoute(route: keyof typeof API_ROUTES, ...args: string[]): string;
655
- /**
656
- * Get plan by ID
657
- */
658
- declare function getPlan(planId: PlanId): Plan;
659
- /**
660
- * Check if a feature is available for a plan
661
- */
662
- declare function isPlanFeatureEnabled(planId: PlanId, feature: PlanFeature): boolean;
663
- /**
664
- * Get plan limit value (-1 means unlimited)
665
- */
666
- declare function getPlanLimit(planId: PlanId, limit: keyof Plan['limits']): number;
667
- /**
668
- * Check if usage is at warning threshold
669
- */
670
- declare function isUsageWarning(current: number, limit: number): boolean;
671
- /**
672
- * Check if usage is at critical threshold
673
- */
674
- declare function isUsageCritical(current: number, limit: number): boolean;
675
- /**
676
- * Calculate Web Vital rating from value (Phase 2)
677
- */
678
- declare function getVitalRating(metric: VitalType, value: number): VitalRating;
679
- /**
680
- * Detect deployment context from environment variables (Phase 2)
681
- * Works in Node.js environments only - returns null in browser
682
- */
683
- declare function detectDeploymentContext(): DeploymentContext | null;
684
-
685
- export { API_ENDPOINTS, API_ROUTES, BILLING_ERRORS, type BillingError, CLI_CONFIG, CLI_TOKEN_STATUS, type CliAccessTokenMetadata, type CliTokenStatus, DEFAULT_API_HOST, DEPLOYMENT_ENV_VARS, DEPLOYMENT_SOURCES, type DeploymentContext, type DeploymentSource, ENV_VAR_NAMES, ERROR_MESSAGES, EVENT_TYPES, type EventType, FORM_EVENT_TYPES, FORM_FIELD_TYPES, FRAMEWORK_PACKAGES, FRAMEWORK_PATTERNS, type FormEventData, type FormEventType, type FormFieldType, type Framework, HTTP_STATUS, NAVIGATION_TYPES, type NavigationType, ONBOARDING_STEPS, type OnboardingStep, PLANS, PLAN_FEATURES, type Plan, type PlanFeature, type PlanId, RATE_LIMITS, SUCCESS_MESSAGES, USAGE_THRESHOLDS, USER_ROLES, type UserRole, VITAL_RATINGS, VITAL_THRESHOLDS, VITAL_TYPES, type VitalRating, type VitalType, type WebVitalData, detectDeploymentContext, getApiRoute, getEnvVarNames, getFrameworkPackage, getPlan, getPlanLimit, getVitalRating, isPlanFeatureEnabled, isUsageCritical, isUsageWarning, isValidFramework };