clarion-shared-types 1.0.69 → 1.0.71
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/index.js +1 -0
- package/dist/cjs/index.js.map +1 -1
- 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/enums/chat-conversation-status.enum.js +9 -0
- package/dist/cjs/modules/chat/enums/chat-conversation-status.enum.js.map +1 -0
- package/dist/cjs/modules/chat/enums/chat-conversation-type.enum.js +9 -0
- package/dist/cjs/modules/chat/enums/chat-conversation-type.enum.js.map +1 -0
- package/dist/cjs/modules/chat/enums/chat-message-type.enum.js +9 -0
- package/dist/cjs/modules/chat/enums/chat-message-type.enum.js.map +1 -0
- package/dist/cjs/modules/chat/enums/chat-participant-role.enum.js +10 -0
- package/dist/cjs/modules/chat/enums/chat-participant-role.enum.js.map +1 -0
- package/dist/cjs/modules/chat/index.js +31 -0
- package/dist/cjs/modules/chat/index.js.map +1 -0
- package/dist/cjs/modules/chat/interfaces/chat-conversation-with-participants.js +3 -0
- package/dist/cjs/modules/chat/interfaces/chat-conversation-with-participants.js.map +1 -0
- package/dist/cjs/modules/chat/interfaces/chat-conversation.js +3 -0
- package/dist/cjs/modules/chat/interfaces/chat-conversation.js.map +1 -0
- package/dist/cjs/modules/chat/interfaces/chat-message.js +3 -0
- package/dist/cjs/modules/chat/interfaces/chat-message.js.map +1 -0
- package/dist/cjs/modules/chat/interfaces/chat-participant.js +3 -0
- package/dist/cjs/modules/chat/interfaces/chat-participant.js.map +1 -0
- package/dist/cjs/modules/chat/interfaces/chat-presence-info.js +3 -0
- package/dist/cjs/modules/chat/interfaces/chat-presence-info.js.map +1 -0
- package/dist/cjs/modules/role/constants/roles-by-scope.js +2 -1
- package/dist/cjs/modules/role/constants/roles-by-scope.js.map +1 -1
- package/dist/cjs/modules/role/enums/role.enum.js +1 -0
- package/dist/cjs/modules/role/enums/role.enum.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/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/enums/chat-conversation-status.enum.js +6 -0
- package/dist/esm/modules/chat/enums/chat-conversation-status.enum.js.map +1 -0
- package/dist/esm/modules/chat/enums/chat-conversation-type.enum.js +6 -0
- package/dist/esm/modules/chat/enums/chat-conversation-type.enum.js.map +1 -0
- package/dist/esm/modules/chat/enums/chat-message-type.enum.js +6 -0
- package/dist/esm/modules/chat/enums/chat-message-type.enum.js.map +1 -0
- package/dist/esm/modules/chat/enums/chat-participant-role.enum.js +7 -0
- package/dist/esm/modules/chat/enums/chat-participant-role.enum.js.map +1 -0
- package/dist/esm/modules/chat/index.js +15 -0
- package/dist/esm/modules/chat/index.js.map +1 -0
- package/dist/esm/modules/chat/interfaces/chat-conversation-with-participants.js +2 -0
- package/dist/esm/modules/chat/interfaces/chat-conversation-with-participants.js.map +1 -0
- package/dist/esm/modules/chat/interfaces/chat-conversation.js +2 -0
- package/dist/esm/modules/chat/interfaces/chat-conversation.js.map +1 -0
- package/dist/esm/modules/chat/interfaces/chat-message.js +2 -0
- package/dist/esm/modules/chat/interfaces/chat-message.js.map +1 -0
- package/dist/esm/modules/chat/interfaces/chat-participant.js +2 -0
- package/dist/esm/modules/chat/interfaces/chat-participant.js.map +1 -0
- package/dist/esm/modules/chat/interfaces/chat-presence-info.js +2 -0
- package/dist/esm/modules/chat/interfaces/chat-presence-info.js.map +1 -0
- package/dist/esm/modules/role/constants/roles-by-scope.js +2 -1
- package/dist/esm/modules/role/constants/roles-by-scope.js.map +1 -1
- package/dist/esm/modules/role/enums/role.enum.js +1 -0
- package/dist/esm/modules/role/enums/role.enum.js.map +1 -1
- package/dist/types/index.d.ts +1 -0
- 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/enums/chat-conversation-status.enum.d.ts +4 -0
- package/dist/types/modules/chat/enums/chat-conversation-type.enum.d.ts +4 -0
- package/dist/types/modules/chat/enums/chat-message-type.enum.d.ts +4 -0
- package/dist/types/modules/chat/enums/chat-participant-role.enum.d.ts +5 -0
- package/dist/types/modules/chat/index.d.ts +11 -0
- package/dist/types/modules/chat/interfaces/chat-conversation-with-participants.d.ts +5 -0
- package/dist/types/modules/chat/interfaces/chat-conversation.d.ts +18 -0
- package/dist/types/modules/chat/interfaces/chat-message.d.ts +16 -0
- package/dist/types/modules/chat/interfaces/chat-participant.d.ts +16 -0
- package/dist/types/modules/chat/interfaces/chat-presence-info.d.ts +5 -0
- package/dist/types/modules/role/enums/role.enum.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -30,6 +30,7 @@ __exportStar(require("./modules/sms/index"), exports);
|
|
|
30
30
|
__exportStar(require("./modules/gis/index"), exports);
|
|
31
31
|
__exportStar(require("./modules/socket/index"), exports);
|
|
32
32
|
__exportStar(require("./modules/web-notification/index"), exports);
|
|
33
|
+
__exportStar(require("./modules/chat/index"), exports);
|
|
33
34
|
// Interfaces
|
|
34
35
|
__exportStar(require("./modules/common/interfaces/server-message"), exports);
|
|
35
36
|
__exportStar(require("./modules/common/interfaces/pagination"), exports);
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,UAAU;AACV,uDAAqC;AACrC,+DAA6C;AAC7C,yDAAuC;AACvC,6DAA2C;AAC3C,uDAAqC;AACrC,uDAAqC;AACrC,iEAA+C;AAC/C,gEAA8C;AAC9C,2DAAyC;AACzC,2DAAyC;AACzC,sDAAoC;AACpC,sDAAoC;AACpC,sDAAoC;AACpC,yDAAuC;AACvC,mEAAiD;AACjD,uDAAqC;AAErC,aAAa;AACb,6EAA2D;AAC3D,yEAAuD"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatConversationStatus = void 0;
|
|
4
|
+
var ChatConversationStatus;
|
|
5
|
+
(function (ChatConversationStatus) {
|
|
6
|
+
ChatConversationStatus["ACTIVE"] = "ACTIVE";
|
|
7
|
+
ChatConversationStatus["ARCHIVED"] = "ARCHIVED";
|
|
8
|
+
})(ChatConversationStatus || (exports.ChatConversationStatus = ChatConversationStatus = {}));
|
|
9
|
+
//# sourceMappingURL=chat-conversation-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-conversation-status.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;AACzB,CAAC,EAHW,sBAAsB,sCAAtB,sBAAsB,QAGjC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatConversationType = void 0;
|
|
4
|
+
var ChatConversationType;
|
|
5
|
+
(function (ChatConversationType) {
|
|
6
|
+
ChatConversationType["DIRECT"] = "DIRECT";
|
|
7
|
+
ChatConversationType["GROUP"] = "GROUP";
|
|
8
|
+
})(ChatConversationType || (exports.ChatConversationType = ChatConversationType = {}));
|
|
9
|
+
//# sourceMappingURL=chat-conversation-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-type.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-conversation-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,yCAAiB,CAAA;IACjB,uCAAe,CAAA;AACnB,CAAC,EAHW,oBAAoB,oCAApB,oBAAoB,QAG/B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatMessageType = void 0;
|
|
4
|
+
var ChatMessageType;
|
|
5
|
+
(function (ChatMessageType) {
|
|
6
|
+
ChatMessageType["TEXT"] = "TEXT";
|
|
7
|
+
ChatMessageType["SYSTEM"] = "SYSTEM";
|
|
8
|
+
})(ChatMessageType || (exports.ChatMessageType = ChatMessageType = {}));
|
|
9
|
+
//# sourceMappingURL=chat-message-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-type.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-message-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,oCAAiB,CAAA;AACrB,CAAC,EAHW,eAAe,+BAAf,eAAe,QAG1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ChatParticipantRole = void 0;
|
|
4
|
+
var ChatParticipantRole;
|
|
5
|
+
(function (ChatParticipantRole) {
|
|
6
|
+
ChatParticipantRole["OWNER"] = "OWNER";
|
|
7
|
+
ChatParticipantRole["ADMIN"] = "ADMIN";
|
|
8
|
+
ChatParticipantRole["MEMBER"] = "MEMBER";
|
|
9
|
+
})(ChatParticipantRole || (exports.ChatParticipantRole = ChatParticipantRole = {}));
|
|
10
|
+
//# sourceMappingURL=chat-participant-role.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-participant-role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-participant-role.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,wCAAiB,CAAA;AACrB,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
// enums
|
|
18
|
+
__exportStar(require("./enums/chat-conversation-status.enum"), exports);
|
|
19
|
+
__exportStar(require("./enums/chat-conversation-type.enum"), exports);
|
|
20
|
+
__exportStar(require("./enums/chat-message-type.enum"), exports);
|
|
21
|
+
__exportStar(require("./enums/chat-participant-role.enum"), exports);
|
|
22
|
+
// interfaces
|
|
23
|
+
__exportStar(require("./interfaces/chat-conversation"), exports);
|
|
24
|
+
__exportStar(require("./interfaces/chat-conversation-with-participants"), exports);
|
|
25
|
+
__exportStar(require("./interfaces/chat-message"), exports);
|
|
26
|
+
__exportStar(require("./interfaces/chat-participant"), exports);
|
|
27
|
+
__exportStar(require("./interfaces/chat-presence-info"), exports);
|
|
28
|
+
// constants
|
|
29
|
+
__exportStar(require("./constants/chat-ws-events"), exports);
|
|
30
|
+
__exportStar(require("./constants/chat-room-names"), exports);
|
|
31
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,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 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-with-participants.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-conversation-with-participants.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-conversation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-message.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-participant.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-participant.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-presence-info.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-presence-info.ts"],"names":[],"mappings":""}
|
|
@@ -9,7 +9,8 @@ exports.ORGANIZATION_ROLES = [
|
|
|
9
9
|
];
|
|
10
10
|
exports.CONTROL_CENTRE_ROLES = [
|
|
11
11
|
role_enum_1.Roles.CONTROL_CENTRE_ADMIN,
|
|
12
|
-
role_enum_1.Roles.CONTROL_CENTRE_USER
|
|
12
|
+
role_enum_1.Roles.CONTROL_CENTRE_USER,
|
|
13
|
+
role_enum_1.Roles.RESPONDER
|
|
13
14
|
];
|
|
14
15
|
exports.MOBILE_ROLES = [
|
|
15
16
|
role_enum_1.Roles.MOBILE_USER
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":";;;AAAA,kDAA2C;AAE9B,QAAA,kBAAkB,GAAa;IACxC,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,iBAAiB;CAC1B,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC1C,iBAAK,CAAC,oBAAoB;IAC1B,iBAAK,CAAC,mBAAmB;
|
|
1
|
+
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":";;;AAAA,kDAA2C;AAE9B,QAAA,kBAAkB,GAAa;IACxC,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,kBAAkB;IACxB,iBAAK,CAAC,iBAAiB;CAC1B,CAAC;AAEW,QAAA,oBAAoB,GAAa;IAC1C,iBAAK,CAAC,oBAAoB;IAC1B,iBAAK,CAAC,mBAAmB;IACzB,iBAAK,CAAC,SAAS;CAClB,CAAC;AAEW,QAAA,YAAY,GAAa;IAClC,iBAAK,CAAC,WAAW;CACpB,CAAC"}
|
|
@@ -9,6 +9,7 @@ var Roles;
|
|
|
9
9
|
Roles["ORGANIZATION_USER"] = "Organization:User";
|
|
10
10
|
Roles["CONTROL_CENTRE_ADMIN"] = "Control-Centre:Admin";
|
|
11
11
|
Roles["CONTROL_CENTRE_USER"] = "Control-Centre:User";
|
|
12
|
+
Roles["RESPONDER"] = "Responder";
|
|
12
13
|
Roles["MOBILE_USER"] = "Mobile-User";
|
|
13
14
|
})(Roles || (exports.Roles = Roles = {}));
|
|
14
15
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,KASX;AATD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EATW,KAAK,qBAAL,KAAK,QAShB;AAED;;GAEG"}
|
package/dist/esm/index.js
CHANGED
|
@@ -14,6 +14,7 @@ export * from './modules/sms/index';
|
|
|
14
14
|
export * from './modules/gis/index';
|
|
15
15
|
export * from './modules/socket/index';
|
|
16
16
|
export * from './modules/web-notification/index';
|
|
17
|
+
export * from './modules/chat/index';
|
|
17
18
|
// Interfaces
|
|
18
19
|
export * from './modules/common/interfaces/server-message';
|
|
19
20
|
export * from './modules/common/interfaces/pagination';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,UAAU;AACV,cAAc,sBAAsB,CAAC;AACrC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,sBAAsB,CAAC;AAErC,aAAa;AACb,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var ChatConversationStatus;
|
|
2
|
+
(function (ChatConversationStatus) {
|
|
3
|
+
ChatConversationStatus["ACTIVE"] = "ACTIVE";
|
|
4
|
+
ChatConversationStatus["ARCHIVED"] = "ARCHIVED";
|
|
5
|
+
})(ChatConversationStatus || (ChatConversationStatus = {}));
|
|
6
|
+
//# sourceMappingURL=chat-conversation-status.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-status.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-conversation-status.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAC9B,2CAAiB,CAAA;IACjB,+CAAqB,CAAA;AACzB,CAAC,EAHW,sBAAsB,KAAtB,sBAAsB,QAGjC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export var ChatConversationType;
|
|
2
|
+
(function (ChatConversationType) {
|
|
3
|
+
ChatConversationType["DIRECT"] = "DIRECT";
|
|
4
|
+
ChatConversationType["GROUP"] = "GROUP";
|
|
5
|
+
})(ChatConversationType || (ChatConversationType = {}));
|
|
6
|
+
//# sourceMappingURL=chat-conversation-type.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-type.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-conversation-type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,oBAGX;AAHD,WAAY,oBAAoB;IAC5B,yCAAiB,CAAA;IACjB,uCAAe,CAAA;AACnB,CAAC,EAHW,oBAAoB,KAApB,oBAAoB,QAG/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message-type.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-message-type.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,oCAAiB,CAAA;AACrB,CAAC,EAHW,eAAe,KAAf,eAAe,QAG1B"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export var ChatParticipantRole;
|
|
2
|
+
(function (ChatParticipantRole) {
|
|
3
|
+
ChatParticipantRole["OWNER"] = "OWNER";
|
|
4
|
+
ChatParticipantRole["ADMIN"] = "ADMIN";
|
|
5
|
+
ChatParticipantRole["MEMBER"] = "MEMBER";
|
|
6
|
+
})(ChatParticipantRole || (ChatParticipantRole = {}));
|
|
7
|
+
//# sourceMappingURL=chat-participant-role.enum.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-participant-role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/chat/enums/chat-participant-role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,sCAAe,CAAA;IACf,wCAAiB,CAAA;AACrB,CAAC,EAJW,mBAAmB,KAAnB,mBAAmB,QAI9B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// enums
|
|
2
|
+
export * from './enums/chat-conversation-status.enum';
|
|
3
|
+
export * from './enums/chat-conversation-type.enum';
|
|
4
|
+
export * from './enums/chat-message-type.enum';
|
|
5
|
+
export * from './enums/chat-participant-role.enum';
|
|
6
|
+
// interfaces
|
|
7
|
+
export * from './interfaces/chat-conversation';
|
|
8
|
+
export * from './interfaces/chat-conversation-with-participants';
|
|
9
|
+
export * from './interfaces/chat-message';
|
|
10
|
+
export * from './interfaces/chat-participant';
|
|
11
|
+
export * from './interfaces/chat-presence-info';
|
|
12
|
+
// constants
|
|
13
|
+
export * from './constants/chat-ws-events';
|
|
14
|
+
export * from './constants/chat-room-names';
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/modules/chat/index.ts"],"names":[],"mappings":"AAAA,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 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation-with-participants.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-conversation-with-participants.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-conversation.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-conversation.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-message.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-message.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-participant.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-participant.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-presence-info.js","sourceRoot":"","sources":["../../../../../src/modules/chat/interfaces/chat-presence-info.ts"],"names":[],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;
|
|
1
|
+
{"version":3,"file":"roles-by-scope.js","sourceRoot":"","sources":["../../../../../src/modules/role/constants/roles-by-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAE3C,MAAM,CAAC,MAAM,kBAAkB,GAAa;IACxC,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,kBAAkB;IACxB,KAAK,CAAC,iBAAiB;CAC1B,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAa;IAC1C,KAAK,CAAC,oBAAoB;IAC1B,KAAK,CAAC,mBAAmB;IACzB,KAAK,CAAC,SAAS;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAa;IAClC,KAAK,CAAC,WAAW;CACpB,CAAC"}
|
|
@@ -6,6 +6,7 @@ export var Roles;
|
|
|
6
6
|
Roles["ORGANIZATION_USER"] = "Organization:User";
|
|
7
7
|
Roles["CONTROL_CENTRE_ADMIN"] = "Control-Centre:Admin";
|
|
8
8
|
Roles["CONTROL_CENTRE_USER"] = "Control-Centre:User";
|
|
9
|
+
Roles["RESPONDER"] = "Responder";
|
|
9
10
|
Roles["MOBILE_USER"] = "Mobile-User";
|
|
10
11
|
})(Roles || (Roles = {}));
|
|
11
12
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"role.enum.js","sourceRoot":"","sources":["../../../../../src/modules/role/enums/role.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KASX;AATD,WAAY,KAAK;IACb,oCAA2B,CAAA;IAC3B,kDAAyC,CAAA;IACzC,kDAAyC,CAAA;IACzC,gDAAuC,CAAA;IACvC,sDAA6C,CAAA;IAC7C,oDAA2C,CAAA;IAC3C,gCAAuB,CAAA;IACvB,oCAA2B,CAAA;AAC/B,CAAC,EATW,KAAK,KAAL,KAAK,QAShB;AAED;;GAEG"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -13,5 +13,6 @@ export * from './modules/sms/index';
|
|
|
13
13
|
export * from './modules/gis/index';
|
|
14
14
|
export * from './modules/socket/index';
|
|
15
15
|
export * from './modules/web-notification/index';
|
|
16
|
+
export * from './modules/chat/index';
|
|
16
17
|
export * from './modules/common/interfaces/server-message';
|
|
17
18
|
export * from './modules/common/interfaces/pagination';
|
|
@@ -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
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './enums/chat-conversation-status.enum';
|
|
2
|
+
export * from './enums/chat-conversation-type.enum';
|
|
3
|
+
export * from './enums/chat-message-type.enum';
|
|
4
|
+
export * from './enums/chat-participant-role.enum';
|
|
5
|
+
export * from './interfaces/chat-conversation';
|
|
6
|
+
export * from './interfaces/chat-conversation-with-participants';
|
|
7
|
+
export * from './interfaces/chat-message';
|
|
8
|
+
export * from './interfaces/chat-participant';
|
|
9
|
+
export * from './interfaces/chat-presence-info';
|
|
10
|
+
export * from './constants/chat-ws-events';
|
|
11
|
+
export * from './constants/chat-room-names';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ChatConversationStatus } from "../enums/chat-conversation-status.enum";
|
|
2
|
+
import { ChatConversationType } from "../enums/chat-conversation-type.enum";
|
|
3
|
+
import { ChatMessage } from "./chat-message";
|
|
4
|
+
import { ChatParticipant } from "./chat-participant";
|
|
5
|
+
export interface ChatConversation {
|
|
6
|
+
id?: string;
|
|
7
|
+
type: ChatConversationType;
|
|
8
|
+
name?: string;
|
|
9
|
+
status?: ChatConversationStatus;
|
|
10
|
+
participantUserIds: number[];
|
|
11
|
+
createdBy?: number;
|
|
12
|
+
createdAt?: string;
|
|
13
|
+
updatedAt?: string;
|
|
14
|
+
deletedAt?: string;
|
|
15
|
+
participants?: ChatParticipant[];
|
|
16
|
+
messages?: ChatMessage[];
|
|
17
|
+
metadata?: Record<string, any>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChatMessageType } from "../enums/chat-message-type.enum";
|
|
2
|
+
import { ChatConversation } from "./chat-conversation";
|
|
3
|
+
import { ChatParticipant } from "./chat-participant";
|
|
4
|
+
export interface ChatMessage {
|
|
5
|
+
id: string;
|
|
6
|
+
conversationId: string;
|
|
7
|
+
senderId: number;
|
|
8
|
+
type: ChatMessageType;
|
|
9
|
+
content: string;
|
|
10
|
+
metadata?: Record<string, any>;
|
|
11
|
+
clientMessageId?: string;
|
|
12
|
+
createdAt: string;
|
|
13
|
+
deletedAt?: string;
|
|
14
|
+
conversation: ChatConversation;
|
|
15
|
+
readByParticipants: ChatParticipant[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChatParticipantRole } from "../enums/chat-participant-role.enum";
|
|
2
|
+
import { ChatConversation } from "./chat-conversation";
|
|
3
|
+
import { ChatMessage } from "./chat-message";
|
|
4
|
+
export interface ChatParticipant {
|
|
5
|
+
id: string;
|
|
6
|
+
conversationId: string;
|
|
7
|
+
userId: number;
|
|
8
|
+
role: ChatParticipantRole;
|
|
9
|
+
joinedAt: string;
|
|
10
|
+
leftAt?: string;
|
|
11
|
+
deletedAt?: string;
|
|
12
|
+
lastReadMessageId?: string;
|
|
13
|
+
lastReadAt?: string;
|
|
14
|
+
conversation: ChatConversation;
|
|
15
|
+
lastReadMessage?: ChatMessage;
|
|
16
|
+
}
|