clarion-shared-types 1.0.70 → 1.0.72
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/incident/enums/incident-app-id.enum.js +21 -0
- package/dist/cjs/modules/incident/enums/incident-app-id.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/incident/enums/incident-app-id.enum.js +21 -0
- package/dist/esm/modules/incident/enums/incident-app-id.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/incident/enums/incident-app-id.enum.d.ts +21 -1
- 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":""}
|
|
@@ -6,5 +6,26 @@ var IncidentAppId;
|
|
|
6
6
|
IncidentAppId["UPESY"] = "Upesy";
|
|
7
7
|
IncidentAppId["GRM"] = "GRM";
|
|
8
8
|
IncidentAppId["PASHA"] = "Pasha";
|
|
9
|
+
// Security companies
|
|
10
|
+
IncidentAppId["GARDAWORLD"] = "GardaWorld";
|
|
11
|
+
IncidentAppId["G4S"] = "G4S";
|
|
12
|
+
IncidentAppId["SECUREX"] = "Securex";
|
|
13
|
+
IncidentAppId["TANDU"] = "Tandu";
|
|
14
|
+
IncidentAppId["SGA"] = "SGA";
|
|
15
|
+
IncidentAppId["BM"] = "BM";
|
|
16
|
+
IncidentAppId["GROUP_911"] = "911Group";
|
|
17
|
+
IncidentAppId["RADAR"] = "Radar";
|
|
18
|
+
IncidentAppId["RILEY"] = "Riley";
|
|
19
|
+
IncidentAppId["SANACA"] = "Sanaca";
|
|
20
|
+
IncidentAppId["TSS"] = "TSS";
|
|
21
|
+
IncidentAppId["ABSOLUTE"] = "Absolute";
|
|
22
|
+
IncidentAppId["ULTIMATE"] = "Ultimate";
|
|
23
|
+
IncidentAppId["MAGNUM"] = "Magnum";
|
|
24
|
+
IncidentAppId["TWENTY_FOUR"] = "TwentyFour";
|
|
25
|
+
IncidentAppId["BRINKS"] = "Brinks";
|
|
26
|
+
IncidentAppId["APACHE_GROUP"] = "ApacheGroup";
|
|
27
|
+
IncidentAppId["LAVINGTON_SECURITY"] = "LavingtonSecurity";
|
|
28
|
+
IncidentAppId["SENTINEL"] = "Sentinel";
|
|
29
|
+
IncidentAppId["JEFF_HAMILTON"] = "JeffHamilton";
|
|
9
30
|
})(IncidentAppId || (exports.IncidentAppId = IncidentAppId = {}));
|
|
10
31
|
//# sourceMappingURL=incident-app-id.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incident-app-id.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-app-id.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"incident-app-id.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-app-id.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAyBX;AAzBD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,qBAAqB;IACrB,0CAAyB,CAAA;IACzB,4BAAW,CAAA;IACX,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,0BAAS,CAAA;IACT,uCAAsB,CAAA;IACtB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,4BAAW,CAAA;IACX,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,2CAA0B,CAAA;IAC1B,kCAAiB,CAAA;IACjB,6CAA4B,CAAA;IAC5B,yDAAwC,CAAA;IACxC,sCAAqB,CAAA;IACrB,+CAA8B,CAAA;AAClC,CAAC,EAzBW,aAAa,6BAAb,aAAa,QAyBxB"}
|
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":""}
|
|
@@ -3,5 +3,26 @@ export var IncidentAppId;
|
|
|
3
3
|
IncidentAppId["UPESY"] = "Upesy";
|
|
4
4
|
IncidentAppId["GRM"] = "GRM";
|
|
5
5
|
IncidentAppId["PASHA"] = "Pasha";
|
|
6
|
+
// Security companies
|
|
7
|
+
IncidentAppId["GARDAWORLD"] = "GardaWorld";
|
|
8
|
+
IncidentAppId["G4S"] = "G4S";
|
|
9
|
+
IncidentAppId["SECUREX"] = "Securex";
|
|
10
|
+
IncidentAppId["TANDU"] = "Tandu";
|
|
11
|
+
IncidentAppId["SGA"] = "SGA";
|
|
12
|
+
IncidentAppId["BM"] = "BM";
|
|
13
|
+
IncidentAppId["GROUP_911"] = "911Group";
|
|
14
|
+
IncidentAppId["RADAR"] = "Radar";
|
|
15
|
+
IncidentAppId["RILEY"] = "Riley";
|
|
16
|
+
IncidentAppId["SANACA"] = "Sanaca";
|
|
17
|
+
IncidentAppId["TSS"] = "TSS";
|
|
18
|
+
IncidentAppId["ABSOLUTE"] = "Absolute";
|
|
19
|
+
IncidentAppId["ULTIMATE"] = "Ultimate";
|
|
20
|
+
IncidentAppId["MAGNUM"] = "Magnum";
|
|
21
|
+
IncidentAppId["TWENTY_FOUR"] = "TwentyFour";
|
|
22
|
+
IncidentAppId["BRINKS"] = "Brinks";
|
|
23
|
+
IncidentAppId["APACHE_GROUP"] = "ApacheGroup";
|
|
24
|
+
IncidentAppId["LAVINGTON_SECURITY"] = "LavingtonSecurity";
|
|
25
|
+
IncidentAppId["SENTINEL"] = "Sentinel";
|
|
26
|
+
IncidentAppId["JEFF_HAMILTON"] = "JeffHamilton";
|
|
6
27
|
})(IncidentAppId || (IncidentAppId = {}));
|
|
7
28
|
//# sourceMappingURL=incident-app-id.enum.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"incident-app-id.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-app-id.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,
|
|
1
|
+
{"version":3,"file":"incident-app-id.enum.js","sourceRoot":"","sources":["../../../../../src/modules/incident/enums/incident-app-id.enum.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,aAyBX;AAzBD,WAAY,aAAa;IACrB,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,gCAAe,CAAA;IACf,qBAAqB;IACrB,0CAAyB,CAAA;IACzB,4BAAW,CAAA;IACX,oCAAmB,CAAA;IACnB,gCAAe,CAAA;IACf,4BAAW,CAAA;IACX,0BAAS,CAAA;IACT,uCAAsB,CAAA;IACtB,gCAAe,CAAA;IACf,gCAAe,CAAA;IACf,kCAAiB,CAAA;IACjB,4BAAW,CAAA;IACX,sCAAqB,CAAA;IACrB,sCAAqB,CAAA;IACrB,kCAAiB,CAAA;IACjB,2CAA0B,CAAA;IAC1B,kCAAiB,CAAA;IACjB,6CAA4B,CAAA;IAC5B,yDAAwC,CAAA;IACxC,sCAAqB,CAAA;IACrB,+CAA8B,CAAA;AAClC,CAAC,EAzBW,aAAa,KAAb,aAAa,QAyBxB"}
|
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
|
+
}
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
export declare enum IncidentAppId {
|
|
2
2
|
UPESY = "Upesy",
|
|
3
3
|
GRM = "GRM",
|
|
4
|
-
PASHA = "Pasha"
|
|
4
|
+
PASHA = "Pasha",
|
|
5
|
+
GARDAWORLD = "GardaWorld",
|
|
6
|
+
G4S = "G4S",
|
|
7
|
+
SECUREX = "Securex",
|
|
8
|
+
TANDU = "Tandu",
|
|
9
|
+
SGA = "SGA",
|
|
10
|
+
BM = "BM",
|
|
11
|
+
GROUP_911 = "911Group",
|
|
12
|
+
RADAR = "Radar",
|
|
13
|
+
RILEY = "Riley",
|
|
14
|
+
SANACA = "Sanaca",
|
|
15
|
+
TSS = "TSS",
|
|
16
|
+
ABSOLUTE = "Absolute",
|
|
17
|
+
ULTIMATE = "Ultimate",
|
|
18
|
+
MAGNUM = "Magnum",
|
|
19
|
+
TWENTY_FOUR = "TwentyFour",
|
|
20
|
+
BRINKS = "Brinks",
|
|
21
|
+
APACHE_GROUP = "ApacheGroup",
|
|
22
|
+
LAVINGTON_SECURITY = "LavingtonSecurity",
|
|
23
|
+
SENTINEL = "Sentinel",
|
|
24
|
+
JEFF_HAMILTON = "JeffHamilton"
|
|
5
25
|
}
|