@requ1emz/events 1.0.0 → 1.0.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.
package/dist/family/index.d.ts
CHANGED
|
@@ -1,7 +1,19 @@
|
|
|
1
1
|
export declare const FAMILY_EVENTS: {
|
|
2
|
-
readonly
|
|
2
|
+
readonly INVITED: "family.user.invited";
|
|
3
|
+
readonly REMOVED: "family.user.removed";
|
|
4
|
+
readonly USER_ADD: "family.user.add";
|
|
3
5
|
};
|
|
4
|
-
export interface
|
|
6
|
+
export interface UserInvitedEvent {
|
|
7
|
+
invitedUserId: string;
|
|
8
|
+
familyId: string;
|
|
9
|
+
invitedByUserId: string;
|
|
10
|
+
familyName: string;
|
|
11
|
+
}
|
|
12
|
+
export interface UserAddEvent {
|
|
5
13
|
familyId: string;
|
|
6
14
|
userId: string;
|
|
7
15
|
}
|
|
16
|
+
export interface UserRemovedEvent {
|
|
17
|
+
removedMemberId: string;
|
|
18
|
+
familyId: string;
|
|
19
|
+
}
|
package/dist/family/index.js
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
export declare const NOTIFICATION_EVENTS: {
|
|
2
2
|
readonly ACCEPTED: "notification.accepted";
|
|
3
|
+
readonly DECLINED: "notification.declined";
|
|
4
|
+
readonly PUSH_WEBSOCKET: "notification.websocket.push";
|
|
3
5
|
};
|
|
4
|
-
export interface NotificationAcceptedEvent {
|
|
5
|
-
|
|
6
|
+
export interface NotificationAcceptedEvent<T = Record<string, unknown>> {
|
|
7
|
+
notificationId: string;
|
|
8
|
+
userId: string;
|
|
9
|
+
payload: T;
|
|
10
|
+
}
|
|
11
|
+
export interface NotificationDeclinedEvent {
|
|
12
|
+
notificationId: string;
|
|
13
|
+
userId: string;
|
|
14
|
+
}
|
|
15
|
+
export interface NotificationPushWebSocketEvent<T = Record<string, unknown>> {
|
|
16
|
+
notificationId: string;
|
|
17
|
+
userId: string;
|
|
18
|
+
type: string;
|
|
19
|
+
payload: T;
|
|
6
20
|
}
|