@bentolabs/sdk 2.0.2 → 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 +676 -372
- package/dist/index.browser.js.map +4 -4
- package/dist/index.browser.min.js +23 -23
- package/dist/index.browser.min.js.map +4 -4
- package/dist/index.d.ts +15 -0
- package/dist/index.js +683 -399
- package/dist/index.js.map +4 -4
- package/package.json +4 -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;
|
|
@@ -221,6 +231,11 @@ export declare class BentoLabsSDK {
|
|
|
221
231
|
* Get console logs
|
|
222
232
|
*/
|
|
223
233
|
getConsoleLogs(): ConsoleLog[];
|
|
234
|
+
/**
|
|
235
|
+
* Start Web Vitals monitoring
|
|
236
|
+
* Captures LCP, FCP, INP, CLS, and optionally TTFB
|
|
237
|
+
*/
|
|
238
|
+
startWebVitalsCapture(): void;
|
|
224
239
|
/**
|
|
225
240
|
* Stop recording and clean up resources
|
|
226
241
|
*/
|