@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.
@@ -1,7 +1,19 @@
1
1
  export declare const FAMILY_EVENTS: {
2
- readonly MEMBER_ADD: "family.member.add";
2
+ readonly INVITED: "family.user.invited";
3
+ readonly REMOVED: "family.user.removed";
4
+ readonly USER_ADD: "family.user.add";
3
5
  };
4
- export interface FamilyMemberAddEvent {
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
+ }
@@ -2,5 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FAMILY_EVENTS = void 0;
4
4
  exports.FAMILY_EVENTS = {
5
- MEMBER_ADD: "family.member.add",
5
+ INVITED: "family.user.invited",
6
+ REMOVED: "family.user.removed",
7
+ USER_ADD: "family.user.add",
6
8
  };
@@ -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
- payload: Record<string, unknown>;
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
  }
@@ -3,4 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NOTIFICATION_EVENTS = void 0;
4
4
  exports.NOTIFICATION_EVENTS = {
5
5
  ACCEPTED: "notification.accepted",
6
+ DECLINED: "notification.declined",
7
+ PUSH_WEBSOCKET: "notification.websocket.push",
6
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@requ1emz/events",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "Shared RabbitMQ events for Family Budget microservice ecosystem",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",