@bentolabs/sdk 2.0.0 → 2.0.3
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.browser.js +14754 -0
- package/dist/index.browser.js.map +7 -0
- package/dist/index.browser.min.js +74 -0
- package/dist/index.browser.min.js.map +7 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.js +747 -411
- package/dist/index.js.map +4 -4
- package/package.json +5 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,6 +19,12 @@ interface ConsoleOptions {
|
|
|
19
19
|
maxPayloadSize?: number;
|
|
20
20
|
captureStackTrace?: boolean;
|
|
21
21
|
}
|
|
22
|
+
interface WebVitalsOptions {
|
|
23
|
+
/** Which metrics to capture. Default: ['LCP', 'FCP', 'INP', 'CLS'] */
|
|
24
|
+
allowedMetrics?: ('LCP' | 'FCP' | 'INP' | 'CLS' | 'TTFB')[];
|
|
25
|
+
/** Whether to capture full metric attribution data. Default: true */
|
|
26
|
+
captureAttribution?: boolean;
|
|
27
|
+
}
|
|
22
28
|
interface SDKConfig {
|
|
23
29
|
apiKey: string;
|
|
24
30
|
endpoint: string;
|
|
@@ -40,6 +46,8 @@ interface SDKConfig {
|
|
|
40
46
|
storageOptions: StorageOptions;
|
|
41
47
|
capture_console: boolean;
|
|
42
48
|
consoleOptions: ConsoleOptions;
|
|
49
|
+
capture_web_vitals: boolean;
|
|
50
|
+
webVitalsOptions: WebVitalsOptions;
|
|
43
51
|
bootstrap?: {
|
|
44
52
|
distinctID?: string;
|
|
45
53
|
isIdentifiedID?: boolean;
|
|
@@ -65,6 +73,8 @@ interface SDKOptions {
|
|
|
65
73
|
storageOptions?: StorageOptions;
|
|
66
74
|
capture_console?: boolean;
|
|
67
75
|
consoleOptions?: ConsoleOptions;
|
|
76
|
+
capture_web_vitals?: boolean;
|
|
77
|
+
webVitalsOptions?: WebVitalsOptions;
|
|
68
78
|
bootstrap?: {
|
|
69
79
|
distinctID?: string;
|
|
70
80
|
isIdentifiedID?: boolean;
|
|
@@ -119,6 +129,7 @@ export declare class BentoLabsSDK {
|
|
|
119
129
|
private isRecording;
|
|
120
130
|
private batchTimer;
|
|
121
131
|
private retryTimer;
|
|
132
|
+
private isSending;
|
|
122
133
|
private stopRecordingFn;
|
|
123
134
|
private distinctId;
|
|
124
135
|
private identity;
|
|
@@ -220,6 +231,11 @@ export declare class BentoLabsSDK {
|
|
|
220
231
|
* Get console logs
|
|
221
232
|
*/
|
|
222
233
|
getConsoleLogs(): ConsoleLog[];
|
|
234
|
+
/**
|
|
235
|
+
* Start Web Vitals monitoring
|
|
236
|
+
* Captures LCP, FCP, INP, CLS, and optionally TTFB
|
|
237
|
+
*/
|
|
238
|
+
startWebVitalsCapture(): void;
|
|
223
239
|
/**
|
|
224
240
|
* Stop recording and clean up resources
|
|
225
241
|
*/
|