obi-sdk 0.18.29 → 0.18.30

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.
@@ -1,3 +1,6 @@
1
+ /**
2
+ * @deprecated Use `getErrorCollector().captureError(...)` from `@obi/obi-components` instead.
3
+ */
1
4
  interface SentryContext {
2
5
  sessionId?: string;
3
6
  apiKey?: string;
@@ -14,21 +17,33 @@ interface SentryContext {
14
17
  userJourney?: string[];
15
18
  [key: string]: any;
16
19
  }
20
+ /**
21
+ * @deprecated Use `getErrorCollector().captureError(error, context)` from `@obi/obi-components` instead.
22
+ */
17
23
  export declare function captureException(error: any, context?: SentryContext): void;
24
+ /**
25
+ * @deprecated Use `getErrorCollector().captureMessage(message, level, context)` from `@obi/obi-components` instead.
26
+ */
18
27
  export declare function captureMessage(message: string, level?: "info" | "warning" | "error", context?: SentryContext): void;
19
28
  export declare function trackEvent(eventType: string, eventData?: Record<string, any>, componentName?: string): void;
29
+ /**
30
+ * @deprecated Use `getErrorCollector().setContext(context)` from `@obi/obi-components` instead.
31
+ */
20
32
  export declare function setGlobalContext(context: Partial<SentryContext>): void;
21
33
  /**
22
34
  * Wraps an async function to automatically capture any exceptions
35
+ * @deprecated Use your own try/catch and `getErrorCollector().captureError(...)` instead.
23
36
  */
24
37
  export declare function withSentryAsyncHandler<T extends (...args: any[]) => Promise<any>>(fn: T, handlerName: string, componentName?: string): T;
25
38
  /**
26
39
  * Wraps a synchronous function to automatically capture any exceptions
40
+ * @deprecated Use your own try/catch and `getErrorCollector().captureError(...)` instead.
27
41
  */
28
42
  export declare function withSentryHandler<T extends (...args: any[]) => any>(fn: T, handlerName: string, componentName?: string): T;
29
43
  /**
30
44
  * Simple wrapper to add Sentry error tracking to component lifecycle methods
31
45
  * Use this in your component's connectedCallback, disconnectedCallback, etc.
46
+ * @deprecated Use the collector directly.
32
47
  */
33
48
  export declare function withComponentErrorTracking(componentName: string): {
34
49
  trackLifecycle: (lifecycleMethod: string, fn: () => void) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "obi-sdk",
3
- "version": "0.18.29",
3
+ "version": "0.18.30",
4
4
  "description": "JavaScript SDK for Obi",
5
5
  "type": "module",
6
6
  "main": "dist/obi-sdk.umd.js",