@misternooblet/squara-types 1.0.17 → 1.0.18
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,5 +1,8 @@
|
|
|
1
1
|
export declare enum NotificationType {
|
|
2
|
-
GroupUpdate = "GROUP_UPDATE"
|
|
2
|
+
GroupUpdate = "GROUP_UPDATE",
|
|
3
|
+
PendingSettlement = "PENDING_SETTLEMENT",
|
|
4
|
+
NewGroupMember = "NEW_GROUP_MEMBER",
|
|
5
|
+
NewGroupExpense = "NEW_GROUP_EXPENSE"
|
|
3
6
|
}
|
|
4
7
|
export interface Notification {
|
|
5
8
|
type: NotificationType;
|
|
@@ -8,6 +11,30 @@ export interface GroupUpdateNotification extends Notification {
|
|
|
8
11
|
type: NotificationType.GroupUpdate;
|
|
9
12
|
groupId: string;
|
|
10
13
|
}
|
|
14
|
+
export interface PendingSettlementNotification extends Notification {
|
|
15
|
+
type: NotificationType.PendingSettlement;
|
|
16
|
+
settlementId: string;
|
|
17
|
+
settlementFromUserId: string;
|
|
18
|
+
settlementToUserId: string;
|
|
19
|
+
groupId: string;
|
|
20
|
+
amount: number;
|
|
21
|
+
currency: string;
|
|
22
|
+
}
|
|
23
|
+
export interface NewGroupMemberNotification extends Notification {
|
|
24
|
+
type: NotificationType.NewGroupMember;
|
|
25
|
+
groupId: string;
|
|
26
|
+
userId: string;
|
|
27
|
+
}
|
|
28
|
+
export interface NewGroupExpenseNotification extends Notification {
|
|
29
|
+
type: NotificationType.NewGroupExpense;
|
|
30
|
+
groupId: string;
|
|
31
|
+
expenseId: string;
|
|
32
|
+
amount: number;
|
|
33
|
+
currency: string;
|
|
34
|
+
}
|
|
11
35
|
export declare const NOTIFICATION_TYPE_TO_PAYLOAD_MAP: {
|
|
12
36
|
GROUP_UPDATE: GroupUpdateNotification;
|
|
37
|
+
PENDING_SETTLEMENT: PendingSettlementNotification;
|
|
38
|
+
NEW_GROUP_MEMBER: NewGroupMemberNotification;
|
|
39
|
+
NEW_GROUP_EXPENSE: NewGroupExpenseNotification;
|
|
13
40
|
};
|
|
@@ -4,7 +4,13 @@ exports.NOTIFICATION_TYPE_TO_PAYLOAD_MAP = exports.NotificationType = void 0;
|
|
|
4
4
|
var NotificationType;
|
|
5
5
|
(function (NotificationType) {
|
|
6
6
|
NotificationType["GroupUpdate"] = "GROUP_UPDATE";
|
|
7
|
+
NotificationType["PendingSettlement"] = "PENDING_SETTLEMENT";
|
|
8
|
+
NotificationType["NewGroupMember"] = "NEW_GROUP_MEMBER";
|
|
9
|
+
NotificationType["NewGroupExpense"] = "NEW_GROUP_EXPENSE";
|
|
7
10
|
})(NotificationType || (exports.NotificationType = NotificationType = {}));
|
|
8
11
|
exports.NOTIFICATION_TYPE_TO_PAYLOAD_MAP = {
|
|
9
12
|
[NotificationType.GroupUpdate]: {},
|
|
13
|
+
[NotificationType.PendingSettlement]: {},
|
|
14
|
+
[NotificationType.NewGroupMember]: {},
|
|
15
|
+
[NotificationType.NewGroupExpense]: {},
|
|
10
16
|
};
|