@trackunit/react-core-contexts-api 0.2.148 → 0.2.150
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/index.cjs.js +0 -1
- package/index.esm.js +0 -1
- package/package.json +1 -1
- package/src/analyticsContext.d.ts +0 -7
- package/src/errorHandlingContext.d.ts +26 -0
- package/src/index.d.ts +1 -0
package/index.cjs.js
CHANGED
@@ -25,7 +25,6 @@ const TimeZonePreference = {
|
|
25
25
|
*/
|
26
26
|
const createEvent = (event) => ({
|
27
27
|
description: event === null || event === void 0 ? void 0 : event.description,
|
28
|
-
amplitudeName: event === null || event === void 0 ? void 0 : event.amplitudeName,
|
29
28
|
properties: {},
|
30
29
|
});
|
31
30
|
|
package/index.esm.js
CHANGED
@@ -21,7 +21,6 @@ const TimeZonePreference = {
|
|
21
21
|
*/
|
22
22
|
const createEvent = (event) => ({
|
23
23
|
description: event === null || event === void 0 ? void 0 : event.description,
|
24
|
-
amplitudeName: event === null || event === void 0 ? void 0 : event.amplitudeName,
|
25
24
|
properties: {},
|
26
25
|
});
|
27
26
|
|
package/package.json
CHANGED
@@ -11,12 +11,6 @@ export type Event<T> = {
|
|
11
11
|
* Explain what this event means
|
12
12
|
*/
|
13
13
|
description?: string;
|
14
|
-
/**
|
15
|
-
* Alternative name to show in Amplitude. Only here for legacy reasons.
|
16
|
-
*
|
17
|
-
* @deprecated Use the key of object given to useAnalytics instead
|
18
|
-
*/
|
19
|
-
amplitudeName?: string;
|
20
14
|
/**
|
21
15
|
* The properties to log. Pick an existing type or make a custom one.
|
22
16
|
* Be specific.
|
@@ -33,7 +27,6 @@ export type Event<T> = {
|
|
33
27
|
* @returns {*} {Event<T>}
|
34
28
|
*/
|
35
29
|
export declare const createEvent: <T extends object = BaseEvent>(event?: {
|
36
|
-
amplitudeName?: string;
|
37
30
|
description?: string;
|
38
31
|
}) => Event<T>;
|
39
32
|
export interface IAnalyticsContext<Events extends Record<string, Event<BaseEvent | UnspecifiedEvent>>> {
|
@@ -0,0 +1,26 @@
|
|
1
|
+
export type Severity = "fatal" | "error" | "warning" | "log" | "info" | "debug";
|
2
|
+
export interface Breadcrumb {
|
3
|
+
type?: string;
|
4
|
+
level?: Severity;
|
5
|
+
event_id?: string;
|
6
|
+
category?: string;
|
7
|
+
message?: string;
|
8
|
+
data?: {
|
9
|
+
[key: string]: any;
|
10
|
+
};
|
11
|
+
timestamp?: number;
|
12
|
+
}
|
13
|
+
export interface CaptureExceptionsOptions {
|
14
|
+
fingerprint?: string[];
|
15
|
+
level: Severity;
|
16
|
+
}
|
17
|
+
export interface ErrorHandlingContextValue {
|
18
|
+
/**
|
19
|
+
* Captures an error event.
|
20
|
+
*
|
21
|
+
* @param details The error event to capture.
|
22
|
+
*/
|
23
|
+
captureException(details: Error, options?: CaptureExceptionsOptions): void;
|
24
|
+
addBreadcrumb(breadcrumb: Breadcrumb): void;
|
25
|
+
setTag(key: string, value?: string | number | bigint | symbol | boolean | null): void;
|
26
|
+
}
|
package/src/index.d.ts
CHANGED
@@ -4,6 +4,7 @@ export * from "./assetSortingContext";
|
|
4
4
|
export * from "./confirmationDialogContext";
|
5
5
|
export * from "./currentUserContext";
|
6
6
|
export * from "./environmentContext";
|
7
|
+
export * from "./errorHandlingContext";
|
7
8
|
export * from "./filterBarContext";
|
8
9
|
export * from "./modalDialogContext";
|
9
10
|
export * from "./navigationContext";
|