@jomkv/keybud-v2-contracts 2.0.0 → 2.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/ws/notification/event-names.d.ts +1 -0
- package/dist/ws/notification/event-names.d.ts.map +1 -1
- package/dist/ws/notification/event-names.js +1 -0
- package/dist/ws/notification/event-names.js.map +1 -1
- package/dist/ws/notification/events.d.ts +4 -1
- package/dist/ws/notification/events.d.ts.map +1 -1
- package/dist/ws/notification/payloads.d.ts +6 -2
- package/dist/ws/notification/payloads.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export declare const NOTIFICATION_EVENT_NAMES: {
|
|
2
2
|
readonly SUBSCRIBE: "notification:subscribe";
|
|
3
3
|
readonly NEW_NOTIFICATION: "notification:new";
|
|
4
|
+
readonly DELETE_NOTIFACTION: "notification:delete";
|
|
4
5
|
};
|
|
5
6
|
export type NotificationEventName = (typeof NOTIFICATION_EVENT_NAMES)[keyof typeof NOTIFICATION_EVENT_NAMES];
|
|
6
7
|
//# sourceMappingURL=event-names.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-names.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/event-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB
|
|
1
|
+
{"version":3,"file":"event-names.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/event-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;;CAI3B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-names.js","sourceRoot":"","sources":["../../../src/ws/notification/event-names.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,wBAAwB;IACnC,gBAAgB,EAAE,kBAAkB;
|
|
1
|
+
{"version":3,"file":"event-names.js","sourceRoot":"","sources":["../../../src/ws/notification/event-names.ts"],"names":[],"mappings":";;;AAAa,QAAA,wBAAwB,GAAG;IACtC,SAAS,EAAE,wBAAwB;IACnC,gBAAgB,EAAE,kBAAkB;IACpC,kBAAkB,EAAE,qBAAqB;CACjC,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import type { NOTIFICATION_EVENT_NAMES } from "./event-names";
|
|
2
|
-
import type { NotificationSubscribePayload, NewNotificationPayload } from "./payloads";
|
|
2
|
+
import type { NotificationSubscribePayload, NewNotificationPayload, DeleteNotificationPayload } from "./payloads";
|
|
3
3
|
export interface NotificationClientToServerEvents {
|
|
4
4
|
[NOTIFICATION_EVENT_NAMES.SUBSCRIBE]: (payload: NotificationSubscribePayload) => void;
|
|
5
5
|
}
|
|
6
6
|
export interface NotificationServerToClientEvents {
|
|
7
7
|
[NOTIFICATION_EVENT_NAMES.NEW_NOTIFICATION]: (payload: NewNotificationPayload) => void;
|
|
8
8
|
}
|
|
9
|
+
export interface NotificationServerToClientEvents {
|
|
10
|
+
[NOTIFICATION_EVENT_NAMES.DELETE_NOTIFACTION]: (payload: DeleteNotificationPayload) => void;
|
|
11
|
+
}
|
|
9
12
|
//# sourceMappingURL=events.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EACV,4BAA4B,EAC5B,sBAAsB,EACtB,yBAAyB,EAC1B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,gCAAgC;IAC/C,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,CACpC,OAAO,EAAE,4BAA4B,KAClC,IAAI,CAAC;CACX;AAED,MAAM,WAAW,gCAAgC;IAC/C,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,EAAE,CAC3C,OAAO,EAAE,sBAAsB,KAC5B,IAAI,CAAC;CACX;AAED,MAAM,WAAW,gCAAgC;IAC/C,CAAC,wBAAwB,CAAC,kBAAkB,CAAC,EAAE,CAC7C,OAAO,EAAE,yBAAyB,KAC/B,IAAI,CAAC;CACX"}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
export interface NewNotificationPayload {
|
|
2
|
+
notificationId: number;
|
|
2
3
|
recipientId: number;
|
|
3
4
|
status?: {
|
|
4
5
|
id: number;
|
|
5
|
-
title
|
|
6
|
+
title?: string;
|
|
6
7
|
description: string;
|
|
7
8
|
};
|
|
8
|
-
sender
|
|
9
|
+
sender: {
|
|
9
10
|
userId: number;
|
|
10
11
|
username: string;
|
|
11
12
|
bio?: string;
|
|
@@ -13,6 +14,9 @@ export interface NewNotificationPayload {
|
|
|
13
14
|
type: string;
|
|
14
15
|
createdAt: Date;
|
|
15
16
|
}
|
|
17
|
+
export interface DeleteNotificationPayload {
|
|
18
|
+
notificationId: number;
|
|
19
|
+
}
|
|
16
20
|
export interface NotificationSubscribePayload {
|
|
17
21
|
userId: number;
|
|
18
22
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/payloads.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/payloads.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,CAAC;IACF,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,yBAAyB;IACxC,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB"}
|