@hawk.so/types 0.1.30 → 0.1.32-rc.1

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.
@@ -46,12 +46,6 @@ export interface EventData<CatcherAddons extends EventAddons> {
46
46
  * It sets the timestamp to the event payload.
47
47
  */
48
48
  export interface EventDataAccepted<EventAddons> extends EventData<EventAddons> {
49
- /**
50
- * Occurrence time
51
- * Unix timestamp in seconds (example: 1567009247.576)
52
- * (Set by the Collector)
53
- */
54
- timestamp: number;
55
49
  }
56
50
  /**
57
51
  * Event data with decoded unsafe fields
@@ -34,6 +34,12 @@ export interface GroupedEventDBScheme {
34
34
  * Array of users who visited this event
35
35
  */
36
36
  visitedBy: UserDBScheme[];
37
+ /**
38
+ * Occurrence time
39
+ * Unix timestamp in seconds (example: 1567009247.576)
40
+ * (Set by the Collector)
41
+ */
42
+ timestamp: number;
37
43
  }
38
44
  /**
39
45
  * Grouped event with decoded event data
@@ -41,4 +41,8 @@ export interface ProjectNotificationsRuleDBScheme {
41
41
  * Size of period (in milliseconds) to count events to compare to rule threshold
42
42
  */
43
43
  thresholdPeriod?: number;
44
+ /**
45
+ * If rule is created automatically (on project creation or conversion of old projects)
46
+ */
47
+ autoAdded?: string;
44
48
  }
@@ -11,10 +11,21 @@ export interface RepetitionDBScheme {
11
11
  */
12
12
  groupHash: string;
13
13
  /**
14
+ * @deprecated, use delta instead
14
15
  * And any of EventDataAccepted field with diff
15
16
  * except fields that used in groupHash
16
17
  */
17
- payload: EventDataAccepted<EventAddons>;
18
+ payload?: EventDataAccepted<EventAddons>;
19
+ /**
20
+ * Delta between original event and repetition
21
+ */
22
+ delta?: string;
23
+ /**
24
+ * Occurrence time
25
+ * Unix timestamp in seconds (example: 1567009247.576)
26
+ * (Set by the Collector)
27
+ */
28
+ timestamp: number;
18
29
  }
19
30
  /**
20
31
  * Repetition with decoded event data
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.1.30",
3
+ "version": "0.1.32-rc.1",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -54,14 +54,7 @@ export interface EventData<CatcherAddons extends EventAddons> {
54
54
  * Event accepted and processed by Collector.
55
55
  * It sets the timestamp to the event payload.
56
56
  */
57
- export interface EventDataAccepted<EventAddons> extends EventData<EventAddons> {
58
- /**
59
- * Occurrence time
60
- * Unix timestamp in seconds (example: 1567009247.576)
61
- * (Set by the Collector)
62
- */
63
- timestamp: number;
64
- }
57
+ export interface EventDataAccepted<EventAddons> extends EventData<EventAddons> {}
65
58
 
66
59
 
67
60
  /**
@@ -41,6 +41,13 @@ export interface GroupedEventDBScheme {
41
41
  * Array of users who visited this event
42
42
  */
43
43
  visitedBy: UserDBScheme[];
44
+
45
+ /**
46
+ * Occurrence time
47
+ * Unix timestamp in seconds (example: 1567009247.576)
48
+ * (Set by the Collector)
49
+ */
50
+ timestamp: number;
44
51
  }
45
52
 
46
53
  /**
@@ -50,4 +50,9 @@ export interface ProjectNotificationsRuleDBScheme {
50
50
  * Size of period (in milliseconds) to count events to compare to rule threshold
51
51
  */
52
52
  thresholdPeriod?: number;
53
+
54
+ /**
55
+ * If rule is created automatically (on project creation or conversion of old projects)
56
+ */
57
+ autoAdded?: string;
53
58
  }
@@ -14,10 +14,23 @@ export interface RepetitionDBScheme {
14
14
  groupHash: string;
15
15
 
16
16
  /**
17
+ * @deprecated, use delta instead
17
18
  * And any of EventDataAccepted field with diff
18
19
  * except fields that used in groupHash
19
20
  */
20
- payload: EventDataAccepted<EventAddons>;
21
+ payload?: EventDataAccepted<EventAddons>;
22
+
23
+ /**
24
+ * Delta between original event and repetition
25
+ */
26
+ delta?: string,
27
+
28
+ /**
29
+ * Occurrence time
30
+ * Unix timestamp in seconds (example: 1567009247.576)
31
+ * (Set by the Collector)
32
+ */
33
+ timestamp: number;
21
34
  }
22
35
 
23
36
  /**