@jomkv/keybud-v2-contracts 1.0.6 → 2.0.0

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.
Files changed (37) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/ws/messages copy/event-names.d.ts +6 -0
  6. package/dist/ws/messages copy/event-names.d.ts.map +1 -0
  7. package/dist/ws/messages copy/event-names.js +8 -0
  8. package/dist/ws/messages copy/event-names.js.map +1 -0
  9. package/dist/ws/messages copy/events.d.ts +9 -0
  10. package/dist/ws/messages copy/events.d.ts.map +1 -0
  11. package/dist/ws/messages copy/events.js +3 -0
  12. package/dist/ws/messages copy/events.js.map +1 -0
  13. package/dist/ws/messages copy/index.d.ts +4 -0
  14. package/dist/ws/messages copy/index.d.ts.map +1 -0
  15. package/dist/ws/messages copy/index.js +20 -0
  16. package/dist/ws/messages copy/index.js.map +1 -0
  17. package/dist/ws/messages copy/payloads.d.ts +12 -0
  18. package/dist/ws/messages copy/payloads.d.ts.map +1 -0
  19. package/dist/ws/messages copy/payloads.js +3 -0
  20. package/dist/ws/messages copy/payloads.js.map +1 -0
  21. package/dist/ws/notification/event-names.d.ts +6 -0
  22. package/dist/ws/notification/event-names.d.ts.map +1 -0
  23. package/dist/ws/notification/event-names.js +8 -0
  24. package/dist/ws/notification/event-names.js.map +1 -0
  25. package/dist/ws/notification/events.d.ts +9 -0
  26. package/dist/ws/notification/events.d.ts.map +1 -0
  27. package/dist/ws/notification/events.js +3 -0
  28. package/dist/ws/notification/events.js.map +1 -0
  29. package/dist/ws/notification/index.d.ts +4 -0
  30. package/dist/ws/notification/index.d.ts.map +1 -0
  31. package/dist/ws/notification/index.js +20 -0
  32. package/dist/ws/notification/index.js.map +1 -0
  33. package/dist/ws/notification/payloads.d.ts +19 -0
  34. package/dist/ws/notification/payloads.d.ts.map +1 -0
  35. package/dist/ws/notification/payloads.js +3 -0
  36. package/dist/ws/notification/payloads.js.map +1 -0
  37. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export * from "./ws/auth/index";
2
2
  export * from "./ws/messages/index";
3
+ export * from "./ws/notification/index";
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,yBAAyB,CAAC"}
package/dist/index.js CHANGED
@@ -16,4 +16,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./ws/auth/index"), exports);
18
18
  __exportStar(require("./ws/messages/index"), exports);
19
+ __exportStar(require("./ws/notification/index"), exports);
19
20
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC;AAChC,sDAAoC;AACpC,0DAAwC"}
@@ -0,0 +1,6 @@
1
+ export declare const MESSAGE_EVENT_NAMES: {
2
+ readonly SUBSCRIBE: "message:subscribe";
3
+ readonly NEW_MESSAGE: "message:new";
4
+ };
5
+ export type MessageEventName = (typeof MESSAGE_EVENT_NAMES)[keyof typeof MESSAGE_EVENT_NAMES];
6
+ //# sourceMappingURL=event-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-names.d.ts","sourceRoot":"","sources":["../../../src/ws/messages copy/event-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;CAGtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,OAAO,mBAAmB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MESSAGE_EVENT_NAMES = void 0;
4
+ exports.MESSAGE_EVENT_NAMES = {
5
+ SUBSCRIBE: "message:subscribe",
6
+ NEW_MESSAGE: "message:new",
7
+ };
8
+ //# sourceMappingURL=event-names.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-names.js","sourceRoot":"","sources":["../../../src/ws/messages copy/event-names.ts"],"names":[],"mappings":";;;AAAa,QAAA,mBAAmB,GAAG;IACjC,SAAS,EAAE,mBAAmB;IAC9B,WAAW,EAAE,aAAa;CAClB,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { MESSAGE_EVENT_NAMES } from "./event-names";
2
+ import type { MessageSubscribePayload, NewMessagePayload } from "./payloads";
3
+ export interface MessageClientToServerEvents {
4
+ [MESSAGE_EVENT_NAMES.SUBSCRIBE]: (payload: MessageSubscribePayload) => void;
5
+ }
6
+ export interface MessageServerToClientEvents {
7
+ [MESSAGE_EVENT_NAMES.NEW_MESSAGE]: (payload: NewMessagePayload) => void;
8
+ }
9
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/ws/messages copy/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE7E,MAAM,WAAW,2BAA2B;IAC1C,CAAC,mBAAmB,CAAC,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;CAC7E;AAED,MAAM,WAAW,2BAA2B;IAC1C,CAAC,mBAAmB,CAAC,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACzE"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/ws/messages copy/events.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from "./event-names";
2
+ export * from "./events";
3
+ export * from "./payloads";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ws/messages copy/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./event-names"), exports);
18
+ __exportStar(require("./events"), exports);
19
+ __exportStar(require("./payloads"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ws/messages copy/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B"}
@@ -0,0 +1,12 @@
1
+ export interface NewMessagePayload {
2
+ id: number;
3
+ senderId: number;
4
+ conversationId: number;
5
+ content: string;
6
+ createdAt: Date;
7
+ readAt?: Date;
8
+ }
9
+ export interface MessageSubscribePayload {
10
+ userId: number;
11
+ }
12
+ //# sourceMappingURL=payloads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payloads.d.ts","sourceRoot":"","sources":["../../../src/ws/messages copy/payloads.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;IAChB,MAAM,CAAC,EAAE,IAAI,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payloads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../../src/ws/messages copy/payloads.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ export declare const NOTIFICATION_EVENT_NAMES: {
2
+ readonly SUBSCRIBE: "notification:subscribe";
3
+ readonly NEW_NOTIFICATION: "notification:new";
4
+ };
5
+ export type NotificationEventName = (typeof NOTIFICATION_EVENT_NAMES)[keyof typeof NOTIFICATION_EVENT_NAMES];
6
+ //# sourceMappingURL=event-names.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-names.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/event-names.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,wBAAwB;;;CAG3B,CAAC;AAEX,MAAM,MAAM,qBAAqB,GAC/B,CAAC,OAAO,wBAAwB,CAAC,CAAC,MAAM,OAAO,wBAAwB,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NOTIFICATION_EVENT_NAMES = void 0;
4
+ exports.NOTIFICATION_EVENT_NAMES = {
5
+ SUBSCRIBE: "notification:subscribe",
6
+ NEW_NOTIFICATION: "notification:new",
7
+ };
8
+ //# sourceMappingURL=event-names.js.map
@@ -0,0 +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;CAC5B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import type { NOTIFICATION_EVENT_NAMES } from "./event-names";
2
+ import type { NotificationSubscribePayload, NewNotificationPayload } from "./payloads";
3
+ export interface NotificationClientToServerEvents {
4
+ [NOTIFICATION_EVENT_NAMES.SUBSCRIBE]: (payload: NotificationSubscribePayload) => void;
5
+ }
6
+ export interface NotificationServerToClientEvents {
7
+ [NOTIFICATION_EVENT_NAMES.NEW_NOTIFICATION]: (payload: NewNotificationPayload) => void;
8
+ }
9
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +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,EACvB,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"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../../src/ws/notification/events.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export * from "./event-names";
2
+ export * from "./events";
3
+ export * from "./payloads";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ws/notification/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./event-names"), exports);
18
+ __exportStar(require("./events"), exports);
19
+ __exportStar(require("./payloads"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ws/notification/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA8B;AAC9B,2CAAyB;AACzB,6CAA2B"}
@@ -0,0 +1,19 @@
1
+ export interface NewNotificationPayload {
2
+ recipientId: number;
3
+ status?: {
4
+ id: number;
5
+ title: string;
6
+ description: string;
7
+ };
8
+ sender?: {
9
+ userId: number;
10
+ username: string;
11
+ bio?: string;
12
+ };
13
+ type: string;
14
+ createdAt: Date;
15
+ }
16
+ export interface NotificationSubscribePayload {
17
+ userId: number;
18
+ }
19
+ //# sourceMappingURL=payloads.d.ts.map
@@ -0,0 +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;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,MAAM,CAAC,EAAE;QACP,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,4BAA4B;IAC3C,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=payloads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"payloads.js","sourceRoot":"","sources":["../../../src/ws/notification/payloads.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jomkv/keybud-v2-contracts",
3
- "version": "1.0.6",
3
+ "version": "2.0.0",
4
4
  "description": "Shared TypeScript contracts for KeyBud V2",
5
5
  "keywords": [
6
6
  "keybud",