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