@hawk.so/types 0.1.32-rc.5 → 0.1.32-rc.7

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,14 +1,14 @@
1
- import { EventData } from '../base/event/event';
1
+ import { DecodedEventData, EventData } from '../base/event/event';
2
2
  import { PerformanceData } from '../base/performance/performance';
3
- import type { JavaScriptAddons, PhpAddons, NodeJSAddons, GoAddons, PythonAddons } from '../base/event/addons';
3
+ import type { JavaScriptAddons, PhpAddons, NodeJSAddons, GoAddons, PythonAddons, DefaultAddons } from '../base/event/addons';
4
4
  /**
5
5
  * Type that represents all supported Catcher message types for events
6
6
  */
7
- declare type ErrorsCatcherType = 'errors/javascript' | 'errors/php' | 'errors/nodejs' | 'errors/go' | 'errors/python';
7
+ export declare type ErrorsCatcherType = 'errors/javascript' | 'errors/php' | 'errors/nodejs' | 'errors/go' | 'errors/python' | 'errors/default';
8
8
  /**
9
9
  * Type that represents all supported Catcher message types for performance
10
10
  */
11
- declare type MetricsCatcherType = 'performance';
11
+ export declare type MetricsCatcherType = 'performance';
12
12
  /**
13
13
  * Union type that represents all supported Catcher message types
14
14
  */
@@ -17,7 +17,8 @@ export declare type CatcherMessageType = ErrorsCatcherType | MetricsCatcherType;
17
17
  * Type that represents the payload of a Catcher message based on its type
18
18
  */
19
19
  export declare type CatcherMessagePayload<Type extends CatcherMessageType> = {
20
- 'errors/javascript': EventData<JavaScriptAddons>;
20
+ 'errors/default': DecodedEventData<DefaultAddons>;
21
+ 'errors/javascript': DecodedEventData<JavaScriptAddons>;
21
22
  'errors/php': EventData<PhpAddons>;
22
23
  'errors/nodejs': EventData<NodeJSAddons>;
23
24
  'errors/go': EventData<GoAddons>;
@@ -57,4 +58,3 @@ export declare type CatcherMessageAccepted<Type extends CatcherMessageType> = Om
57
58
  */
58
59
  timestamp: number;
59
60
  };
60
- export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.1.32-rc.5",
3
+ "version": "0.1.32-rc.7",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -1,4 +1,4 @@
1
- import { EventData } from '../base/event/event';
1
+ import { DecodedEventData, EventData } from '../base/event/event';
2
2
  import { PerformanceData } from '../base/performance/performance';
3
3
 
4
4
  import type {
@@ -29,12 +29,12 @@ export type CatcherMessageType = ErrorsCatcherType | MetricsCatcherType;
29
29
  * Type that represents the payload of a Catcher message based on its type
30
30
  */
31
31
  export type CatcherMessagePayload<Type extends CatcherMessageType> = {
32
- 'errors/javascript': EventData<JavaScriptAddons>;
32
+ 'errors/default': DecodedEventData<DefaultAddons>;
33
+ 'errors/javascript': DecodedEventData<JavaScriptAddons>;
33
34
  'errors/php': EventData<PhpAddons>;
34
35
  'errors/nodejs': EventData<NodeJSAddons>;
35
36
  'errors/go': EventData<GoAddons>;
36
37
  'errors/python': EventData<PythonAddons>;
37
- 'errors/default': EventData<DefaultAddons>;
38
38
  'performance': PerformanceData;
39
39
  }[Type];
40
40