grm-shared-library 1.1.159 → 1.1.161
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/cjs/modules/chat/constants/chat-room-names.js +13 -0
- package/dist/cjs/modules/chat/constants/chat-room-names.js.map +1 -0
- package/dist/cjs/modules/chat/constants/chat-ws-events.js +19 -0
- package/dist/cjs/modules/chat/constants/chat-ws-events.js.map +1 -0
- package/dist/cjs/modules/chat/index.js +3 -0
- package/dist/cjs/modules/chat/index.js.map +1 -1
- package/dist/esm/modules/chat/constants/chat-room-names.js +10 -0
- package/dist/esm/modules/chat/constants/chat-room-names.js.map +1 -0
- package/dist/esm/modules/chat/constants/chat-ws-events.js +16 -0
- package/dist/esm/modules/chat/constants/chat-ws-events.js.map +1 -0
- package/dist/esm/modules/chat/index.js +3 -0
- package/dist/esm/modules/chat/index.js.map +1 -1
- package/dist/types/modules/chat/constants/chat-room-names.d.ts +8 -0
- package/dist/types/modules/chat/constants/chat-ws-events.d.ts +12 -0
- package/dist/types/modules/chat/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAT_ROOM_NAMES = void 0;
|
|
4
|
+
exports.CHAT_ROOM_NAMES = {
|
|
5
|
+
/** Global room for all connected sockets (use with caution) */
|
|
6
|
+
GLOBAL: 'global',
|
|
7
|
+
/** Per-user room for direct messages: user:{userId} */
|
|
8
|
+
USER: (userId) => `user:${userId}`,
|
|
9
|
+
/** Per-conversation room for group chats: conversation:{conversationId} */
|
|
10
|
+
CONVERSATION: (conversationId) => `conversation:${conversationId}`
|
|
11
|
+
// Add more room types as needed, e.g. for presence or typing indicators
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=chat-room-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-room-names.js","sourceRoot":"","sources":["../../../../../src/modules/chat/constants/chat-room-names.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG;IAC3B,+DAA+D;IAC/D,MAAM,EAAE,QAAQ;IAEhB,uDAAuD;IACvD,IAAI,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,QAAQ,MAAM,EAAE;IAE1C,2EAA2E;IAC3E,YAAY,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,gBAAgB,cAAc,EAAE;IAE1E,wEAAwE;CAC3E,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CHAT_WS_EVENTS = void 0;
|
|
4
|
+
exports.CHAT_WS_EVENTS = {
|
|
5
|
+
// Client → Server
|
|
6
|
+
MESSAGE_SEND: 'message:send',
|
|
7
|
+
TYPING_START: 'typing:start',
|
|
8
|
+
TYPING_STOP: 'typing:stop',
|
|
9
|
+
CONVERSATION_JOIN: 'conversation:join',
|
|
10
|
+
CONVERSATION_LEAVE: 'conversation:leave',
|
|
11
|
+
// Server → Client
|
|
12
|
+
MESSAGE_NEW: 'message:new',
|
|
13
|
+
MESSAGE_ACK: 'message:ack',
|
|
14
|
+
PRESENCE_UPDATE: 'presence:update',
|
|
15
|
+
TYPING_UPDATE: 'typing:update',
|
|
16
|
+
// Errors
|
|
17
|
+
ERROR: 'error',
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=chat-ws-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-ws-events.js","sourceRoot":"","sources":["../../../../../src/modules/chat/constants/chat-ws-events.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC1B,kBAAkB;IAClB,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IAExC,kBAAkB;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,aAAa,EAAE,eAAe;IAE9B,SAAS;IACT,KAAK,EAAE,OAAO;CACjB,CAAC"}
|
|
@@ -30,4 +30,7 @@ __exportStar(require("./interfaces/chat-conversation-with-participants"), export
|
|
|
30
30
|
__exportStar(require("./interfaces/chat-message"), exports);
|
|
31
31
|
__exportStar(require("./interfaces/chat-participant"), exports);
|
|
32
32
|
__exportStar(require("./interfaces/chat-presence-info"), exports);
|
|
33
|
+
// constants
|
|
34
|
+
__exportStar(require("./constants/chat-ws-events"), exports);
|
|
35
|
+
__exportStar(require("./constants/chat-room-names"), exports);
|
|
33
36
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,wDAAsC;AACtC,sEAAoD;AACpD,iEAA+C;AAC/C,kEAAgD;AAEhD,QAAQ;AACR,wEAAsD;AACtD,sEAAoD;AACpD,iEAA+C;AAC/C,qEAAmD;AAEnD,aAAa;AACb,iEAA+C;AAC/C,mFAAiE;AACjE,4DAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO;AACP,wDAAsC;AACtC,sEAAoD;AACpD,iEAA+C;AAC/C,kEAAgD;AAEhD,QAAQ;AACR,wEAAsD;AACtD,sEAAoD;AACpD,iEAA+C;AAC/C,qEAAmD;AAEnD,aAAa;AACb,iEAA+C;AAC/C,mFAAiE;AACjE,4DAA0C;AAC1C,gEAA8C;AAC9C,kEAAgD;AAEhD,YAAY;AACZ,6DAA2C;AAC3C,8DAA4C"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export const CHAT_ROOM_NAMES = {
|
|
2
|
+
/** Global room for all connected sockets (use with caution) */
|
|
3
|
+
GLOBAL: 'global',
|
|
4
|
+
/** Per-user room for direct messages: user:{userId} */
|
|
5
|
+
USER: (userId) => `user:${userId}`,
|
|
6
|
+
/** Per-conversation room for group chats: conversation:{conversationId} */
|
|
7
|
+
CONVERSATION: (conversationId) => `conversation:${conversationId}`
|
|
8
|
+
// Add more room types as needed, e.g. for presence or typing indicators
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=chat-room-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-room-names.js","sourceRoot":"","sources":["../../../../../src/modules/chat/constants/chat-room-names.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,+DAA+D;IAC/D,MAAM,EAAE,QAAQ;IAEhB,uDAAuD;IACvD,IAAI,EAAE,CAAC,MAAc,EAAE,EAAE,CAAC,QAAQ,MAAM,EAAE;IAE1C,2EAA2E;IAC3E,YAAY,EAAE,CAAC,cAAsB,EAAE,EAAE,CAAC,gBAAgB,cAAc,EAAE;IAE1E,wEAAwE;CAC3E,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export const CHAT_WS_EVENTS = {
|
|
2
|
+
// Client → Server
|
|
3
|
+
MESSAGE_SEND: 'message:send',
|
|
4
|
+
TYPING_START: 'typing:start',
|
|
5
|
+
TYPING_STOP: 'typing:stop',
|
|
6
|
+
CONVERSATION_JOIN: 'conversation:join',
|
|
7
|
+
CONVERSATION_LEAVE: 'conversation:leave',
|
|
8
|
+
// Server → Client
|
|
9
|
+
MESSAGE_NEW: 'message:new',
|
|
10
|
+
MESSAGE_ACK: 'message:ack',
|
|
11
|
+
PRESENCE_UPDATE: 'presence:update',
|
|
12
|
+
TYPING_UPDATE: 'typing:update',
|
|
13
|
+
// Errors
|
|
14
|
+
ERROR: 'error',
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=chat-ws-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-ws-events.js","sourceRoot":"","sources":["../../../../../src/modules/chat/constants/chat-ws-events.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,kBAAkB;IAClB,YAAY,EAAE,cAAc;IAC5B,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,iBAAiB,EAAE,mBAAmB;IACtC,kBAAkB,EAAE,oBAAoB;IAExC,kBAAkB;IAClB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,aAAa;IAC1B,eAAe,EAAE,iBAAiB;IAClC,aAAa,EAAE,eAAe;IAE9B,SAAS;IACT,KAAK,EAAE,OAAO;CACjB,CAAC"}
|
|
@@ -14,4 +14,7 @@ export * from './interfaces/chat-conversation-with-participants';
|
|
|
14
14
|
export * from './interfaces/chat-message';
|
|
15
15
|
export * from './interfaces/chat-participant';
|
|
16
16
|
export * from './interfaces/chat-presence-info';
|
|
17
|
+
// constants
|
|
18
|
+
export * from './constants/chat-ws-events';
|
|
19
|
+
export * from './constants/chat-room-names';
|
|
17
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAEhD,QAAQ;AACR,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAEnD,aAAa;AACb,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,OAAO;AACP,cAAc,uBAAuB,CAAC;AACtC,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAEhD,QAAQ;AACR,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AAEnD,aAAa;AACb,cAAc,gCAAgC,CAAC;AAC/C,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAEhD,YAAY;AACZ,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const CHAT_ROOM_NAMES: {
|
|
2
|
+
/** Global room for all connected sockets (use with caution) */
|
|
3
|
+
GLOBAL: string;
|
|
4
|
+
/** Per-user room for direct messages: user:{userId} */
|
|
5
|
+
USER: (userId: number) => string;
|
|
6
|
+
/** Per-conversation room for group chats: conversation:{conversationId} */
|
|
7
|
+
CONVERSATION: (conversationId: string) => string;
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const CHAT_WS_EVENTS: {
|
|
2
|
+
MESSAGE_SEND: string;
|
|
3
|
+
TYPING_START: string;
|
|
4
|
+
TYPING_STOP: string;
|
|
5
|
+
CONVERSATION_JOIN: string;
|
|
6
|
+
CONVERSATION_LEAVE: string;
|
|
7
|
+
MESSAGE_NEW: string;
|
|
8
|
+
MESSAGE_ACK: string;
|
|
9
|
+
PRESENCE_UPDATE: string;
|
|
10
|
+
TYPING_UPDATE: string;
|
|
11
|
+
ERROR: string;
|
|
12
|
+
};
|
|
@@ -11,3 +11,5 @@ export * from './interfaces/chat-conversation-with-participants';
|
|
|
11
11
|
export * from './interfaces/chat-message';
|
|
12
12
|
export * from './interfaces/chat-participant';
|
|
13
13
|
export * from './interfaces/chat-presence-info';
|
|
14
|
+
export * from './constants/chat-ws-events';
|
|
15
|
+
export * from './constants/chat-room-names';
|