@hawk.so/types 0.1.20 → 0.1.22

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.
@@ -41,6 +41,10 @@ export interface PayloadOfDepositByUser {
41
41
  * Amount of payment
42
42
  */
43
43
  amount: number;
44
+ /**
45
+ * Currency of payment
46
+ */
47
+ currency: string;
44
48
  /**
45
49
  * ID of the user who made the payment
46
50
  */
@@ -62,6 +66,10 @@ export interface PayloadOfWorkspacePlanPurchase {
62
66
  * Amount of payment
63
67
  */
64
68
  amount: number;
69
+ /**
70
+ * Currency of payment
71
+ */
72
+ currency: string;
65
73
  /**
66
74
  * ID of the user who made the payment
67
75
  */
@@ -12,9 +12,13 @@ export interface PlanDBScheme {
12
12
  */
13
13
  name: string;
14
14
  /**
15
- * Monthly charge for plan in dollars
15
+ * Monthly charge for plan in currencry specified in `monthlyChargeCurrency`
16
16
  */
17
17
  monthlyCharge: number;
18
+ /**
19
+ * Currency of `monthlyCharge`
20
+ */
21
+ monthlyChargeCurrency: string;
18
22
  /**
19
23
  * Maximum amount of events available for plan
20
24
  */
@@ -18,7 +18,7 @@ export interface ProjectNotificationsRuleDBScheme {
18
18
  */
19
19
  uidAdded: ObjectId;
20
20
  /**
21
- * Receive type: 'ALL' or 'ONLY_NEW'
21
+ * Receive type: 'SEEN_MORE' or 'ONLY_NEW'
22
22
  */
23
23
  whatToReceive: ReceiveTypes;
24
24
  /**
@@ -33,4 +33,12 @@ export interface ProjectNotificationsRuleDBScheme {
33
33
  * Available channels to receive
34
34
  */
35
35
  channels: NotificationsChannelsDBScheme;
36
+ /**
37
+ * If this number of events is reached in the eventThresholdPeriod, the rule will be triggered
38
+ */
39
+ threshold?: number;
40
+ /**
41
+ * Size of period (in milliseconds) to count events to compare to rule threshold
42
+ */
43
+ thresholdPeriod?: number;
36
44
  }
@@ -3,9 +3,9 @@
3
3
  */
4
4
  export declare enum ReceiveTypes {
5
5
  /**
6
- * All notifications
6
+ * If event seen more than threshold in thresholdPeriod
7
7
  */
8
- ALL = "ALL",
8
+ SEEN_MORE = "SEEN_MORE",
9
9
  /**
10
10
  * Only first occurrence
11
11
  */
@@ -7,9 +7,9 @@ exports.ReceiveTypes = void 0;
7
7
  var ReceiveTypes;
8
8
  (function (ReceiveTypes) {
9
9
  /**
10
- * All notifications
10
+ * If event seen more than threshold in thresholdPeriod
11
11
  */
12
- ReceiveTypes["ALL"] = "ALL";
12
+ ReceiveTypes["SEEN_MORE"] = "SEEN_MORE";
13
13
  /**
14
14
  * Only first occurrence
15
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hawk.so/types",
3
- "version": "0.1.20",
3
+ "version": "0.1.22",
4
4
  "description": "TypeScript definitions for Hawk",
5
5
  "types": "build/index.d.ts",
6
6
  "main": "build/index.js",
@@ -49,6 +49,11 @@ export interface PayloadOfDepositByUser {
49
49
  */
50
50
  amount: number;
51
51
 
52
+ /**
53
+ * Currency of payment
54
+ */
55
+ currency: string;
56
+
52
57
  /**
53
58
  * ID of the user who made the payment
54
59
  */
@@ -74,6 +79,11 @@ export interface PayloadOfWorkspacePlanPurchase {
74
79
  */
75
80
  amount: number;
76
81
 
82
+ /**
83
+ * Currency of payment
84
+ */
85
+ currency: string;
86
+
77
87
  /**
78
88
  * ID of the user who made the payment
79
89
  */
@@ -15,10 +15,15 @@ export interface PlanDBScheme {
15
15
  name: string;
16
16
 
17
17
  /**
18
- * Monthly charge for plan in dollars
18
+ * Monthly charge for plan in currencry specified in `monthlyChargeCurrency`
19
19
  */
20
20
  monthlyCharge: number;
21
21
 
22
+ /**
23
+ * Currency of `monthlyCharge`
24
+ */
25
+ monthlyChargeCurrency: string;
26
+
22
27
  /**
23
28
  * Maximum amount of events available for plan
24
29
  */
@@ -22,7 +22,7 @@ export interface ProjectNotificationsRuleDBScheme {
22
22
  uidAdded: ObjectId;
23
23
 
24
24
  /**
25
- * Receive type: 'ALL' or 'ONLY_NEW'
25
+ * Receive type: 'SEEN_MORE' or 'ONLY_NEW'
26
26
  */
27
27
  whatToReceive: ReceiveTypes;
28
28
 
@@ -40,4 +40,14 @@ export interface ProjectNotificationsRuleDBScheme {
40
40
  * Available channels to receive
41
41
  */
42
42
  channels: NotificationsChannelsDBScheme;
43
+
44
+ /**
45
+ * If this number of events is reached in the eventThresholdPeriod, the rule will be triggered
46
+ */
47
+ threshold?: number;
48
+
49
+ /**
50
+ * Size of period (in milliseconds) to count events to compare to rule threshold
51
+ */
52
+ thresholdPeriod?: number;
43
53
  }
@@ -3,12 +3,12 @@
3
3
  */
4
4
  export enum ReceiveTypes {
5
5
  /**
6
- * All notifications
6
+ * If event seen more than threshold in thresholdPeriod
7
7
  */
8
- ALL = 'ALL',
8
+ SEEN_MORE = 'SEEN_MORE',
9
9
 
10
10
  /**
11
11
  * Only first occurrence
12
12
  */
13
13
  ONLY_NEW = 'ONLY_NEW',
14
- }
14
+ }