obi-sdk 0.6.2 → 0.6.4
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/core/init.d.ts +1 -1
- package/dist/modular/chunks/index-d50e99a5.js +6 -0
- package/dist/modular/chunks/index-d50e99a5.js.map +1 -0
- package/dist/modular/chunks/{obi-widget-27b273fd.js → obi-widget-c52bfca4.js} +6110 -139
- package/dist/modular/chunks/obi-widget-c52bfca4.js.map +1 -0
- package/dist/modular/index.js +88 -5757
- package/dist/modular/index.js.map +1 -1
- package/dist/modular/ui.js +13 -13
- package/dist/obi-sdk.standalone.iife.js +46 -42
- package/dist/obi-sdk.standalone.iife.js.map +1 -1
- package/dist/react.es.js +12377 -8139
- package/dist/react.es.js.map +1 -1
- package/dist/react.umd.js +108 -90
- package/dist/react.umd.js.map +1 -1
- package/dist/sentry.d.ts +39 -1
- package/dist/ui/components/courses/courses.d.ts +1 -0
- package/package.json +3 -3
- package/dist/modular/chunks/index-f4e9f79f.js +0 -6
- package/dist/modular/chunks/index-f4e9f79f.js.map +0 -1
- package/dist/modular/chunks/obi-widget-27b273fd.js.map +0 -1
package/dist/sentry.d.ts
CHANGED
|
@@ -1 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
interface SentryContext {
|
|
2
|
+
sessionId?: string;
|
|
3
|
+
apiKey?: string;
|
|
4
|
+
widgetState?: string;
|
|
5
|
+
componentName?: string;
|
|
6
|
+
userId?: string;
|
|
7
|
+
userEmail?: string;
|
|
8
|
+
userMetadata?: any;
|
|
9
|
+
handlerName?: string;
|
|
10
|
+
lifecycle?: string;
|
|
11
|
+
changedProperties?: string[];
|
|
12
|
+
eventType?: string;
|
|
13
|
+
eventData?: Record<string, any>;
|
|
14
|
+
userJourney?: string[];
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
17
|
+
export declare function captureException(error: any, context?: SentryContext): void;
|
|
18
|
+
export declare function captureMessage(message: string, level?: 'info' | 'warning' | 'error', context?: SentryContext): void;
|
|
19
|
+
export declare function trackEvent(eventType: string, eventData?: Record<string, any>, componentName?: string): void;
|
|
20
|
+
export declare function setGlobalContext(context: Partial<SentryContext>): void;
|
|
21
|
+
/**
|
|
22
|
+
* Wraps an async function to automatically capture any exceptions
|
|
23
|
+
*/
|
|
24
|
+
export declare function withSentryAsyncHandler<T extends (...args: any[]) => Promise<any>>(fn: T, handlerName: string, componentName?: string): T;
|
|
25
|
+
/**
|
|
26
|
+
* Wraps a synchronous function to automatically capture any exceptions
|
|
27
|
+
*/
|
|
28
|
+
export declare function withSentryHandler<T extends (...args: any[]) => any>(fn: T, handlerName: string, componentName?: string): T;
|
|
29
|
+
/**
|
|
30
|
+
* Simple wrapper to add Sentry error tracking to component lifecycle methods
|
|
31
|
+
* Use this in your component's connectedCallback, disconnectedCallback, etc.
|
|
32
|
+
*/
|
|
33
|
+
export declare function withComponentErrorTracking(componentName: string): {
|
|
34
|
+
trackLifecycle: (lifecycleMethod: string, fn: () => void) => void;
|
|
35
|
+
trackRender: (renderFn: () => any) => any;
|
|
36
|
+
setContext: () => void;
|
|
37
|
+
};
|
|
38
|
+
export { captureException as default };
|
|
39
|
+
export type { SentryContext };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "obi-sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.4",
|
|
4
4
|
"description": "JavaScript SDK for Obi",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/obi-sdk.umd.js",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"ts-pattern": "^5.7.0",
|
|
44
44
|
"zod": "^3.22.0",
|
|
45
45
|
"@obi/obi-client": "0.2.0",
|
|
46
|
-
"@obi/
|
|
47
|
-
"@obi/
|
|
46
|
+
"@obi/obi-session": "0.3.1",
|
|
47
|
+
"@obi/utils": "0.2.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index-f4e9f79f.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|