@entrolytics/shared 2.0.6 → 2.2.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/LICENSE +21 -0
- package/README.md +76 -0
- package/dist/index.cjs +28 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +227 -28
- package/dist/index.d.ts +227 -28
- package/dist/index.js +27 -15
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,189 @@
|
|
|
1
|
+
interface DateRangeFilter {
|
|
2
|
+
websiteId: string;
|
|
3
|
+
startDate: Date;
|
|
4
|
+
endDate: Date;
|
|
5
|
+
filters?: {
|
|
6
|
+
country?: string;
|
|
7
|
+
device?: 'desktop' | 'mobile' | 'tablet';
|
|
8
|
+
browser?: string;
|
|
9
|
+
path?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
interface OverviewStats {
|
|
13
|
+
pageviews: number;
|
|
14
|
+
visitors: number;
|
|
15
|
+
sessions: number;
|
|
16
|
+
pagesPerVisitor: number;
|
|
17
|
+
avgLoadTime: number;
|
|
18
|
+
}
|
|
19
|
+
interface TimeseriesData {
|
|
20
|
+
date: Date;
|
|
21
|
+
pageviews: number;
|
|
22
|
+
visitors: number;
|
|
23
|
+
sessions: number;
|
|
24
|
+
}
|
|
25
|
+
interface TopPage {
|
|
26
|
+
path: string;
|
|
27
|
+
views: number;
|
|
28
|
+
uniqueVisitors: number;
|
|
29
|
+
avgLoadTime: number;
|
|
30
|
+
p95LoadTime: number;
|
|
31
|
+
}
|
|
32
|
+
interface Referrer {
|
|
33
|
+
referrerDomain: string;
|
|
34
|
+
visits: number;
|
|
35
|
+
uniqueVisitors: number;
|
|
36
|
+
}
|
|
37
|
+
interface DeviceStats {
|
|
38
|
+
deviceType: string;
|
|
39
|
+
browser: string;
|
|
40
|
+
os: string;
|
|
41
|
+
pageviews: number;
|
|
42
|
+
uniqueVisitors: number;
|
|
43
|
+
}
|
|
44
|
+
interface GeoStats {
|
|
45
|
+
country: string;
|
|
46
|
+
city: string;
|
|
47
|
+
pageviews: number;
|
|
48
|
+
uniqueVisitors: number;
|
|
49
|
+
}
|
|
50
|
+
interface RealtimeStats {
|
|
51
|
+
visitors: number;
|
|
52
|
+
sessions: number;
|
|
53
|
+
pageviews: number;
|
|
54
|
+
}
|
|
55
|
+
interface RealtimeEvent {
|
|
56
|
+
timestamp: Date;
|
|
57
|
+
eventType: string;
|
|
58
|
+
eventName?: string;
|
|
59
|
+
path: string;
|
|
60
|
+
visitorId: string;
|
|
61
|
+
country?: string;
|
|
62
|
+
deviceType: string;
|
|
63
|
+
browser: string;
|
|
64
|
+
}
|
|
65
|
+
interface ActivePage {
|
|
66
|
+
path: string;
|
|
67
|
+
viewers: number;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Core event interface
|
|
71
|
+
*/
|
|
72
|
+
interface EntrolyticsEvent {
|
|
73
|
+
id: string;
|
|
74
|
+
websiteId: string;
|
|
75
|
+
sessionId: string;
|
|
76
|
+
visitorId: string;
|
|
77
|
+
timestamp: Date;
|
|
78
|
+
eventType: string;
|
|
79
|
+
eventName?: string;
|
|
80
|
+
url: string;
|
|
81
|
+
path: string;
|
|
82
|
+
referrer?: string;
|
|
83
|
+
referrerDomain?: string;
|
|
84
|
+
browser: string;
|
|
85
|
+
browserVersion?: string;
|
|
86
|
+
os: string;
|
|
87
|
+
osVersion?: string;
|
|
88
|
+
deviceType: 'desktop' | 'mobile' | 'tablet';
|
|
89
|
+
screenWidth?: number;
|
|
90
|
+
screenHeight?: number;
|
|
91
|
+
country?: string;
|
|
92
|
+
city?: string;
|
|
93
|
+
region?: string;
|
|
94
|
+
loadTime?: number;
|
|
95
|
+
domInteractive?: number;
|
|
96
|
+
domComplete?: number;
|
|
97
|
+
utmSource?: string;
|
|
98
|
+
utmMedium?: string;
|
|
99
|
+
utmCampaign?: string;
|
|
100
|
+
utmTerm?: string;
|
|
101
|
+
utmContent?: string;
|
|
102
|
+
properties?: Record<string, unknown>;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Event Protocol Types
|
|
107
|
+
*
|
|
108
|
+
* These types define the canonical event structures used across the Entrolytics ecosystem.
|
|
109
|
+
* Used by: API Server, SDKs, CLI, worker processes.
|
|
110
|
+
*
|
|
111
|
+
* This file was extracted from the internal @entrolytics/protocol package to enable
|
|
112
|
+
* sharing with external packages.
|
|
113
|
+
*/
|
|
114
|
+
/**
|
|
115
|
+
* Core event types supported by the analytics platform
|
|
116
|
+
*/
|
|
117
|
+
declare const EventType$1: {
|
|
118
|
+
readonly PageView: "pageview";
|
|
119
|
+
readonly Custom: "custom_event";
|
|
120
|
+
readonly Click: "click";
|
|
121
|
+
};
|
|
122
|
+
type EventType$1 = (typeof EventType$1)[keyof typeof EventType$1];
|
|
123
|
+
/**
|
|
124
|
+
* Event payload as sent from client SDKs
|
|
125
|
+
*/
|
|
126
|
+
interface EventPayload {
|
|
127
|
+
websiteId: string;
|
|
128
|
+
sessionId: string;
|
|
129
|
+
visitorId: string;
|
|
130
|
+
url: string;
|
|
131
|
+
referrer?: string;
|
|
132
|
+
eventType: EventType$1;
|
|
133
|
+
eventName?: string;
|
|
134
|
+
properties?: Record<string, unknown>;
|
|
135
|
+
screenWidth?: number;
|
|
136
|
+
screenHeight?: number;
|
|
137
|
+
loadTime?: number;
|
|
138
|
+
domInteractive?: number;
|
|
139
|
+
domComplete?: number;
|
|
140
|
+
utmSource?: string;
|
|
141
|
+
utmMedium?: string;
|
|
142
|
+
utmCampaign?: string;
|
|
143
|
+
utmTerm?: string;
|
|
144
|
+
utmContent?: string;
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Event DB row structure as stored in ClickHouse
|
|
148
|
+
* Uses snake_case to match database column naming convention
|
|
149
|
+
*/
|
|
150
|
+
interface EventDBRow {
|
|
151
|
+
id: string;
|
|
152
|
+
website_id: string;
|
|
153
|
+
session_id: string;
|
|
154
|
+
visitor_id: string;
|
|
155
|
+
timestamp: string;
|
|
156
|
+
event_type: EventType$1;
|
|
157
|
+
event_name: string | null;
|
|
158
|
+
url: string;
|
|
159
|
+
path: string;
|
|
160
|
+
referrer: string | null;
|
|
161
|
+
referrer_domain: string | null;
|
|
162
|
+
browser: string;
|
|
163
|
+
browser_version: string | null;
|
|
164
|
+
os: string;
|
|
165
|
+
os_version: string | null;
|
|
166
|
+
device_type: 'desktop' | 'mobile' | 'tablet';
|
|
167
|
+
screen_width: number | null;
|
|
168
|
+
screen_height: number | null;
|
|
169
|
+
country: string | null;
|
|
170
|
+
city: string | null;
|
|
171
|
+
region: string | null;
|
|
172
|
+
load_time: number | null;
|
|
173
|
+
dom_interactive: number | null;
|
|
174
|
+
dom_complete: number | null;
|
|
175
|
+
utm_source: string | null;
|
|
176
|
+
utm_medium: string | null;
|
|
177
|
+
utm_campaign: string | null;
|
|
178
|
+
utm_term: string | null;
|
|
179
|
+
utm_content: string | null;
|
|
180
|
+
properties: string;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Device types for analytics segmentation
|
|
184
|
+
*/
|
|
185
|
+
type DeviceType = 'desktop' | 'mobile' | 'tablet';
|
|
186
|
+
|
|
1
187
|
/**
|
|
2
188
|
* Shared constants across Entrolytics ecosystem
|
|
3
189
|
* Used by: CLI, SDKs, Dashboard, Integrations
|
|
@@ -125,68 +311,68 @@ declare const BILLING_ERRORS: {
|
|
|
125
311
|
* API endpoint configuration
|
|
126
312
|
*/
|
|
127
313
|
declare const API_ENDPOINTS: {
|
|
128
|
-
readonly production: "https://
|
|
314
|
+
readonly production: "https://entrolytics.click";
|
|
129
315
|
readonly development: "http://localhost:3000";
|
|
130
316
|
};
|
|
131
317
|
/**
|
|
132
318
|
* Default API host
|
|
133
319
|
*/
|
|
134
|
-
declare const DEFAULT_API_HOST: "https://
|
|
320
|
+
declare const DEFAULT_API_HOST: "https://entrolytics.click" | "http://localhost:3000";
|
|
135
321
|
/**
|
|
136
322
|
* Environment variable naming conventions by framework
|
|
137
323
|
*/
|
|
138
324
|
declare const ENV_VAR_NAMES: {
|
|
139
325
|
readonly nextjs: {
|
|
140
|
-
readonly websiteId: "
|
|
326
|
+
readonly websiteId: "NEXT_PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
141
327
|
readonly host: "NEXT_PUBLIC_ENTROLYTICS_HOST";
|
|
142
328
|
readonly envFile: ".env.local";
|
|
143
329
|
};
|
|
144
330
|
readonly react: {
|
|
145
|
-
readonly websiteId: "
|
|
331
|
+
readonly websiteId: "VITE_ENTROLYTICS_WEBSITE_ID";
|
|
146
332
|
readonly host: "VITE_ENTROLYTICS_HOST";
|
|
147
333
|
readonly envFile: ".env";
|
|
148
334
|
readonly fallback: {
|
|
149
|
-
readonly websiteId: "
|
|
335
|
+
readonly websiteId: "REACT_APP_ENTROLYTICS_WEBSITE_ID";
|
|
150
336
|
readonly host: "REACT_APP_ENTROLYTICS_HOST";
|
|
151
337
|
};
|
|
152
338
|
};
|
|
153
339
|
readonly vue: {
|
|
154
|
-
readonly websiteId: "
|
|
340
|
+
readonly websiteId: "VITE_ENTROLYTICS_WEBSITE_ID";
|
|
155
341
|
readonly host: "VITE_ENTROLYTICS_HOST";
|
|
156
342
|
readonly envFile: ".env";
|
|
157
343
|
};
|
|
158
344
|
readonly svelte: {
|
|
159
|
-
readonly websiteId: "
|
|
345
|
+
readonly websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
160
346
|
readonly host: "PUBLIC_ENTROLYTICS_HOST";
|
|
161
347
|
readonly envFile: ".env";
|
|
162
348
|
};
|
|
163
349
|
readonly astro: {
|
|
164
|
-
readonly websiteId: "
|
|
350
|
+
readonly websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
165
351
|
readonly host: "PUBLIC_ENTROLYTICS_HOST";
|
|
166
352
|
readonly envFile: ".env";
|
|
167
353
|
};
|
|
168
354
|
readonly html: {
|
|
169
|
-
readonly websiteId: "
|
|
355
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
170
356
|
readonly host: "ENTROLYTICS_HOST";
|
|
171
357
|
readonly envFile: ".env";
|
|
172
358
|
};
|
|
173
359
|
readonly node: {
|
|
174
|
-
readonly websiteId: "
|
|
360
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
175
361
|
readonly host: "ENTROLYTICS_HOST";
|
|
176
362
|
readonly envFile: ".env";
|
|
177
363
|
};
|
|
178
364
|
readonly php: {
|
|
179
|
-
readonly websiteId: "
|
|
365
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
180
366
|
readonly host: "ENTROLYTICS_HOST";
|
|
181
367
|
readonly envFile: ".env";
|
|
182
368
|
};
|
|
183
369
|
readonly python: {
|
|
184
|
-
readonly websiteId: "
|
|
370
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
185
371
|
readonly host: "ENTROLYTICS_HOST";
|
|
186
372
|
readonly envFile: ".env";
|
|
187
373
|
};
|
|
188
374
|
readonly go: {
|
|
189
|
-
readonly websiteId: "
|
|
375
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
190
376
|
readonly host: "ENTROLYTICS_HOST";
|
|
191
377
|
readonly envFile: ".env";
|
|
192
378
|
};
|
|
@@ -202,13 +388,25 @@ declare const CLI_CONFIG: {
|
|
|
202
388
|
readonly minCliVersion: "1.0.0";
|
|
203
389
|
};
|
|
204
390
|
/**
|
|
205
|
-
*
|
|
391
|
+
* Core event types - matches backend protocol values exactly
|
|
392
|
+
* Used by: API Server, SDKs, CLI, worker processes
|
|
393
|
+
* See: entrolytics/packages/protocol/src/events.ts
|
|
206
394
|
*/
|
|
207
395
|
declare const EVENT_TYPES: {
|
|
208
|
-
readonly pageView: "
|
|
396
|
+
readonly pageView: "pageview";
|
|
397
|
+
readonly custom: "custom_event";
|
|
398
|
+
readonly click: "click";
|
|
399
|
+
};
|
|
400
|
+
/**
|
|
401
|
+
* Extended event types for SDK-level semantics
|
|
402
|
+
* These are higher-level event categories used by SDKs
|
|
403
|
+
* They map to the core EVENT_TYPES when sent to the backend
|
|
404
|
+
*/
|
|
405
|
+
declare const SDK_EVENT_TYPES: {
|
|
406
|
+
readonly pageView: "pageview";
|
|
209
407
|
readonly click: "click";
|
|
210
408
|
readonly formSubmit: "form_submit";
|
|
211
|
-
readonly custom: "
|
|
409
|
+
readonly custom: "custom_event";
|
|
212
410
|
readonly error: "error";
|
|
213
411
|
readonly performance: "performance";
|
|
214
412
|
};
|
|
@@ -548,6 +746,7 @@ interface CliAccessTokenMetadata {
|
|
|
548
746
|
}
|
|
549
747
|
type Framework = keyof typeof ENV_VAR_NAMES;
|
|
550
748
|
type EventType = (typeof EVENT_TYPES)[keyof typeof EVENT_TYPES];
|
|
749
|
+
type SdkEventType = (typeof SDK_EVENT_TYPES)[keyof typeof SDK_EVENT_TYPES];
|
|
551
750
|
type OnboardingStep = (typeof ONBOARDING_STEPS)[keyof typeof ONBOARDING_STEPS];
|
|
552
751
|
type CliTokenStatus = (typeof CLI_TOKEN_STATUS)[keyof typeof CLI_TOKEN_STATUS];
|
|
553
752
|
type UserRole = (typeof USER_ROLES)[keyof typeof USER_ROLES];
|
|
@@ -605,47 +804,47 @@ interface DeploymentContext {
|
|
|
605
804
|
* Utility functions
|
|
606
805
|
*/
|
|
607
806
|
declare function getEnvVarNames(framework: Framework): {
|
|
608
|
-
readonly websiteId: "
|
|
807
|
+
readonly websiteId: "NEXT_PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
609
808
|
readonly host: "NEXT_PUBLIC_ENTROLYTICS_HOST";
|
|
610
809
|
readonly envFile: ".env.local";
|
|
611
810
|
} | {
|
|
612
|
-
readonly websiteId: "
|
|
811
|
+
readonly websiteId: "VITE_ENTROLYTICS_WEBSITE_ID";
|
|
613
812
|
readonly host: "VITE_ENTROLYTICS_HOST";
|
|
614
813
|
readonly envFile: ".env";
|
|
615
814
|
readonly fallback: {
|
|
616
|
-
readonly websiteId: "
|
|
815
|
+
readonly websiteId: "REACT_APP_ENTROLYTICS_WEBSITE_ID";
|
|
617
816
|
readonly host: "REACT_APP_ENTROLYTICS_HOST";
|
|
618
817
|
};
|
|
619
818
|
} | {
|
|
620
|
-
readonly websiteId: "
|
|
819
|
+
readonly websiteId: "VITE_ENTROLYTICS_WEBSITE_ID";
|
|
621
820
|
readonly host: "VITE_ENTROLYTICS_HOST";
|
|
622
821
|
readonly envFile: ".env";
|
|
623
822
|
} | {
|
|
624
|
-
readonly websiteId: "
|
|
823
|
+
readonly websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
625
824
|
readonly host: "PUBLIC_ENTROLYTICS_HOST";
|
|
626
825
|
readonly envFile: ".env";
|
|
627
826
|
} | {
|
|
628
|
-
readonly websiteId: "
|
|
827
|
+
readonly websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID";
|
|
629
828
|
readonly host: "PUBLIC_ENTROLYTICS_HOST";
|
|
630
829
|
readonly envFile: ".env";
|
|
631
830
|
} | {
|
|
632
|
-
readonly websiteId: "
|
|
831
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
633
832
|
readonly host: "ENTROLYTICS_HOST";
|
|
634
833
|
readonly envFile: ".env";
|
|
635
834
|
} | {
|
|
636
|
-
readonly websiteId: "
|
|
835
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
637
836
|
readonly host: "ENTROLYTICS_HOST";
|
|
638
837
|
readonly envFile: ".env";
|
|
639
838
|
} | {
|
|
640
|
-
readonly websiteId: "
|
|
839
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
641
840
|
readonly host: "ENTROLYTICS_HOST";
|
|
642
841
|
readonly envFile: ".env";
|
|
643
842
|
} | {
|
|
644
|
-
readonly websiteId: "
|
|
843
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
645
844
|
readonly host: "ENTROLYTICS_HOST";
|
|
646
845
|
readonly envFile: ".env";
|
|
647
846
|
} | {
|
|
648
|
-
readonly websiteId: "
|
|
847
|
+
readonly websiteId: "ENTROLYTICS_WEBSITE_ID";
|
|
649
848
|
readonly host: "ENTROLYTICS_HOST";
|
|
650
849
|
readonly envFile: ".env";
|
|
651
850
|
};
|
|
@@ -682,4 +881,4 @@ declare function getVitalRating(metric: VitalType, value: number): VitalRating;
|
|
|
682
881
|
*/
|
|
683
882
|
declare function detectDeploymentContext(): DeploymentContext | null;
|
|
684
883
|
|
|
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 };
|
|
884
|
+
export { API_ENDPOINTS, API_ROUTES, type ActivePage, BILLING_ERRORS, type BillingError, CLI_CONFIG, CLI_TOKEN_STATUS, type CliAccessTokenMetadata, type CliTokenStatus, DEFAULT_API_HOST, DEPLOYMENT_ENV_VARS, DEPLOYMENT_SOURCES, type DateRangeFilter, type DeploymentContext, type DeploymentSource, type DeviceStats, type DeviceType, ENV_VAR_NAMES, ERROR_MESSAGES, EVENT_TYPES, type EntrolyticsEvent, type EventDBRow, type EventPayload, type EventType, FORM_EVENT_TYPES, FORM_FIELD_TYPES, FRAMEWORK_PACKAGES, FRAMEWORK_PATTERNS, type FormEventData, type FormEventType, type FormFieldType, type Framework, type GeoStats, HTTP_STATUS, NAVIGATION_TYPES, type NavigationType, ONBOARDING_STEPS, type OnboardingStep, type OverviewStats, PLANS, PLAN_FEATURES, type Plan, type PlanFeature, type PlanId, RATE_LIMITS, type RealtimeEvent, type RealtimeStats, type Referrer, SDK_EVENT_TYPES, SUCCESS_MESSAGES, type SdkEventType, type TimeseriesData, type TopPage, 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 };
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
// src/event-protocol.ts
|
|
2
|
+
var EventType = {
|
|
3
|
+
PageView: "pageview",
|
|
4
|
+
Custom: "custom_event",
|
|
5
|
+
Click: "click"
|
|
6
|
+
};
|
|
7
|
+
|
|
1
8
|
// src/index.ts
|
|
2
9
|
var PLANS = {
|
|
3
10
|
starter: {
|
|
@@ -113,63 +120,63 @@ var BILLING_ERRORS = {
|
|
|
113
120
|
paymentFailed: "PAYMENT_FAILED"
|
|
114
121
|
};
|
|
115
122
|
var API_ENDPOINTS = {
|
|
116
|
-
production: "https://
|
|
123
|
+
production: "https://entrolytics.click",
|
|
117
124
|
development: "http://localhost:3000"
|
|
118
125
|
};
|
|
119
126
|
var DEFAULT_API_HOST = process.env.NODE_ENV === "production" ? API_ENDPOINTS.production : API_ENDPOINTS.development;
|
|
120
127
|
var ENV_VAR_NAMES = {
|
|
121
128
|
nextjs: {
|
|
122
|
-
websiteId: "
|
|
129
|
+
websiteId: "NEXT_PUBLIC_ENTROLYTICS_WEBSITE_ID",
|
|
123
130
|
host: "NEXT_PUBLIC_ENTROLYTICS_HOST",
|
|
124
131
|
envFile: ".env.local"
|
|
125
132
|
},
|
|
126
133
|
react: {
|
|
127
|
-
websiteId: "
|
|
134
|
+
websiteId: "VITE_ENTROLYTICS_WEBSITE_ID",
|
|
128
135
|
host: "VITE_ENTROLYTICS_HOST",
|
|
129
136
|
envFile: ".env",
|
|
130
137
|
fallback: {
|
|
131
138
|
// CRA fallback
|
|
132
|
-
websiteId: "
|
|
139
|
+
websiteId: "REACT_APP_ENTROLYTICS_WEBSITE_ID",
|
|
133
140
|
host: "REACT_APP_ENTROLYTICS_HOST"
|
|
134
141
|
}
|
|
135
142
|
},
|
|
136
143
|
vue: {
|
|
137
|
-
websiteId: "
|
|
144
|
+
websiteId: "VITE_ENTROLYTICS_WEBSITE_ID",
|
|
138
145
|
host: "VITE_ENTROLYTICS_HOST",
|
|
139
146
|
envFile: ".env"
|
|
140
147
|
},
|
|
141
148
|
svelte: {
|
|
142
|
-
websiteId: "
|
|
149
|
+
websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID",
|
|
143
150
|
host: "PUBLIC_ENTROLYTICS_HOST",
|
|
144
151
|
envFile: ".env"
|
|
145
152
|
},
|
|
146
153
|
astro: {
|
|
147
|
-
websiteId: "
|
|
154
|
+
websiteId: "PUBLIC_ENTROLYTICS_WEBSITE_ID",
|
|
148
155
|
host: "PUBLIC_ENTROLYTICS_HOST",
|
|
149
156
|
envFile: ".env"
|
|
150
157
|
},
|
|
151
158
|
html: {
|
|
152
|
-
websiteId: "
|
|
159
|
+
websiteId: "ENTROLYTICS_WEBSITE_ID",
|
|
153
160
|
host: "ENTROLYTICS_HOST",
|
|
154
161
|
envFile: ".env"
|
|
155
162
|
},
|
|
156
163
|
node: {
|
|
157
|
-
websiteId: "
|
|
164
|
+
websiteId: "ENTROLYTICS_WEBSITE_ID",
|
|
158
165
|
host: "ENTROLYTICS_HOST",
|
|
159
166
|
envFile: ".env"
|
|
160
167
|
},
|
|
161
168
|
php: {
|
|
162
|
-
websiteId: "
|
|
169
|
+
websiteId: "ENTROLYTICS_WEBSITE_ID",
|
|
163
170
|
host: "ENTROLYTICS_HOST",
|
|
164
171
|
envFile: ".env"
|
|
165
172
|
},
|
|
166
173
|
python: {
|
|
167
|
-
websiteId: "
|
|
174
|
+
websiteId: "ENTROLYTICS_WEBSITE_ID",
|
|
168
175
|
host: "ENTROLYTICS_HOST",
|
|
169
176
|
envFile: ".env"
|
|
170
177
|
},
|
|
171
178
|
go: {
|
|
172
|
-
websiteId: "
|
|
179
|
+
websiteId: "ENTROLYTICS_WEBSITE_ID",
|
|
173
180
|
host: "ENTROLYTICS_HOST",
|
|
174
181
|
envFile: ".env"
|
|
175
182
|
}
|
|
@@ -183,10 +190,15 @@ var CLI_CONFIG = {
|
|
|
183
190
|
minCliVersion: "1.0.0"
|
|
184
191
|
};
|
|
185
192
|
var EVENT_TYPES = {
|
|
186
|
-
pageView: "
|
|
193
|
+
pageView: "pageview",
|
|
194
|
+
custom: "custom_event",
|
|
195
|
+
click: "click"
|
|
196
|
+
};
|
|
197
|
+
var SDK_EVENT_TYPES = {
|
|
198
|
+
pageView: "pageview",
|
|
187
199
|
click: "click",
|
|
188
200
|
formSubmit: "form_submit",
|
|
189
|
-
custom: "
|
|
201
|
+
custom: "custom_event",
|
|
190
202
|
error: "error",
|
|
191
203
|
performance: "performance"
|
|
192
204
|
};
|
|
@@ -562,6 +574,6 @@ function getEnv() {
|
|
|
562
574
|
}
|
|
563
575
|
}
|
|
564
576
|
|
|
565
|
-
export { API_ENDPOINTS, API_ROUTES, BILLING_ERRORS, CLI_CONFIG, CLI_TOKEN_STATUS, DEFAULT_API_HOST, DEPLOYMENT_ENV_VARS, DEPLOYMENT_SOURCES, ENV_VAR_NAMES, ERROR_MESSAGES, EVENT_TYPES, FORM_EVENT_TYPES, FORM_FIELD_TYPES, FRAMEWORK_PACKAGES, FRAMEWORK_PATTERNS, HTTP_STATUS, NAVIGATION_TYPES, ONBOARDING_STEPS, PLANS, PLAN_FEATURES, RATE_LIMITS, SUCCESS_MESSAGES, USAGE_THRESHOLDS, USER_ROLES, VITAL_RATINGS, VITAL_THRESHOLDS, VITAL_TYPES, detectDeploymentContext, getApiRoute, getEnvVarNames, getFrameworkPackage, getPlan, getPlanLimit, getVitalRating, isPlanFeatureEnabled, isUsageCritical, isUsageWarning, isValidFramework };
|
|
577
|
+
export { API_ENDPOINTS, API_ROUTES, BILLING_ERRORS, CLI_CONFIG, CLI_TOKEN_STATUS, DEFAULT_API_HOST, DEPLOYMENT_ENV_VARS, DEPLOYMENT_SOURCES, ENV_VAR_NAMES, ERROR_MESSAGES, EVENT_TYPES, EventType, FORM_EVENT_TYPES, FORM_FIELD_TYPES, FRAMEWORK_PACKAGES, FRAMEWORK_PATTERNS, HTTP_STATUS, NAVIGATION_TYPES, ONBOARDING_STEPS, PLANS, PLAN_FEATURES, RATE_LIMITS, SDK_EVENT_TYPES, SUCCESS_MESSAGES, USAGE_THRESHOLDS, USER_ROLES, VITAL_RATINGS, VITAL_THRESHOLDS, VITAL_TYPES, detectDeploymentContext, getApiRoute, getEnvVarNames, getFrameworkPackage, getPlan, getPlanLimit, getVitalRating, isPlanFeatureEnabled, isUsageCritical, isUsageWarning, isValidFramework };
|
|
566
578
|
//# sourceMappingURL=index.js.map
|
|
567
579
|
//# sourceMappingURL=index.js.map
|