@futdevpro/nts-dynamo 1.14.8 → 1.14.10
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/build/_collections/global-settings.const.d.ts.map +1 -1
- package/build/_collections/global-settings.const.js +1 -0
- package/build/_collections/global-settings.const.js.map +1 -1
- package/build/_models/interfaces/global-settings.interface.d.ts +18 -2
- package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
- package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +3 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts.map +1 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.js +15 -0
- package/build/_modules/assistant/_collections/ass-global-settings.const.js.map +1 -0
- package/build/_modules/assistant/_collections/ass.util.d.ts +16 -0
- package/build/_modules/assistant/_collections/ass.util.d.ts.map +1 -0
- package/build/_modules/assistant/_collections/ass.util.js +43 -0
- package/build/_modules/assistant/_collections/ass.util.js.map +1 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +14 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.js +3 -0
- package/build/_modules/assistant/_models/ass-global-settings.interface.js.map +1 -0
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts +23 -0
- package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass-io.control-service.js +59 -0
- package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -0
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts +15 -0
- package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass-main.control-service.js +12 -0
- package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -0
- package/build/_modules/assistant/_services/ass.service-base.d.ts +31 -0
- package/build/_modules/assistant/_services/ass.service-base.d.ts.map +1 -0
- package/build/_modules/assistant/_services/ass.service-base.js +56 -0
- package/build/_modules/assistant/_services/ass.service-base.js.map +1 -0
- package/build/_modules/assistant/index.d.ts +7 -0
- package/build/_modules/assistant/index.d.ts.map +1 -0
- package/build/_modules/assistant/index.js +19 -0
- package/build/_modules/assistant/index.js.map +1 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +3 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.js +14 -0
- package/build/_modules/bot/_collections/bot-default-commands.const.js.map +1 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +3 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.js +32 -0
- package/build/_modules/bot/_collections/bot-global-settings.const.js.map +1 -0
- package/build/_modules/bot/_collections/bot-operations.util.d.ts +21 -0
- package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_collections/bot-operations.util.js +74 -0
- package/build/_modules/bot/_collections/bot-operations.util.js.map +1 -0
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts +7 -0
- package/build/_modules/bot/_enums/bot-provider.enum.d.ts.map +1 -0
- package/build/_modules/bot/_enums/bot-provider.enum.js +11 -0
- package/build/_modules/bot/_enums/bot-provider.enum.js.map +1 -0
- package/build/_modules/bot/_models/bot-channel.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-channel.interface.js +3 -0
- package/build/_modules/bot/_models/bot-channel.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-command.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-command.interface.js +3 -0
- package/build/_modules/bot/_models/bot-command.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +79 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.js +3 -0
- package/build/_modules/bot/_models/bot-global-settings.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +7 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.js +3 -0
- package/build/_modules/bot/_models/bot-last-mention-date.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +6 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.js +3 -0
- package/build/_modules/bot/_models/bot-last-message-date.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-message.interface.d.ts +15 -0
- package/build/_modules/bot/_models/bot-message.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-message.interface.js +3 -0
- package/build/_modules/bot/_models/bot-message.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-provider.interface.d.ts +60 -0
- package/build/_modules/bot/_models/bot-provider.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-provider.interface.js +3 -0
- package/build/_modules/bot/_models/bot-provider.interface.js.map +1 -0
- package/build/_modules/bot/_models/bot-user.interface.d.ts +8 -0
- package/build/_modules/bot/_models/bot-user.interface.d.ts.map +1 -0
- package/build/_modules/bot/_models/bot-user.interface.js +3 -0
- package/build/_modules/bot/_models/bot-user.interface.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js +13 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +5 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js +19 -0
- package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts +8 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +3 -0
- package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts +53 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js +369 -0
- package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts +5 -0
- package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/discord-bot/index.js +16 -0
- package/build/_modules/bot/_modules/discord-bot/index.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js +13 -0
- package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +7 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +3 -0
- package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts +40 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js +116 -0
- package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts +4 -0
- package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/slack-bot/index.js +15 -0
- package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +11 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js +13 -0
- package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +7 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +3 -0
- package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts +40 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js +116 -0
- package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts +4 -0
- package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -0
- package/build/_modules/bot/_modules/teams-bot/index.js +15 -0
- package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -0
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts +15 -0
- package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-commands.control-service.js +72 -0
- package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-io.control-service.d.ts +24 -0
- package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-io.control-service.js +207 -0
- package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-main.control-service.d.ts +42 -0
- package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-main.control-service.js +223 -0
- package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts +5 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.js +28 -0
- package/build/_modules/bot/_services/bot-provider-factory.service.js.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts +17 -0
- package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -0
- package/build/_modules/bot/_services/bot-routines.control-service.js +40 -0
- package/build/_modules/bot/_services/bot-routines.control-service.js.map +1 -0
- package/build/_modules/bot/index.d.ts +21 -0
- package/build/_modules/bot/index.d.ts.map +1 -0
- package/build/_modules/bot/index.js +35 -0
- package/build/_modules/bot/index.js.map +1 -0
- package/build/_modules/defaults/_models/default-user.data-model.d.ts +20 -0
- package/build/_modules/defaults/_models/default-user.data-model.d.ts.map +1 -0
- package/build/_modules/defaults/_models/default-user.data-model.js +73 -0
- package/build/_modules/defaults/_models/default-user.data-model.js.map +1 -0
- package/build/_modules/defaults/_services/default-auth.service.d.ts +51 -0
- package/build/_modules/defaults/_services/default-auth.service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-auth.service.js +159 -0
- package/build/_modules/defaults/_services/default-auth.service.js.map +1 -0
- package/build/_modules/defaults/_services/default-socket-events.service.d.ts +24 -0
- package/build/_modules/defaults/_services/default-socket-events.service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-socket-events.service.js +61 -0
- package/build/_modules/defaults/_services/default-socket-events.service.js.map +1 -0
- package/build/_modules/defaults/_services/default-user.data-service.d.ts +25 -0
- package/build/_modules/defaults/_services/default-user.data-service.d.ts.map +1 -0
- package/build/_modules/defaults/_services/default-user.data-service.js +88 -0
- package/build/_modules/defaults/_services/default-user.data-service.js.map +1 -0
- package/build/_modules/defaults/index.d.ts +5 -0
- package/build/_modules/defaults/index.d.ts.map +1 -0
- package/build/_modules/defaults/index.js +16 -0
- package/build/_modules/defaults/index.js.map +1 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +6 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts.map +1 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.js +27 -0
- package/build/_modules/messaging/_collections/msg-global-settings.const.js.map +1 -0
- package/build/_modules/messaging/_collections/msg.util.d.ts +25 -0
- package/build/_modules/messaging/_collections/msg.util.d.ts.map +1 -0
- package/build/_modules/messaging/_collections/msg.util.js +63 -0
- package/build/_modules/messaging/_collections/msg.util.js.map +1 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +38 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.js +3 -0
- package/build/_modules/messaging/_models/msg-global-settings.interface.js.map +1 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +29 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.js +110 -0
- package/build/_modules/messaging/_services/msg-conversation.data-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-events.service.d.ts +62 -0
- package/build/_modules/messaging/_services/msg-events.service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-events.service.js +204 -0
- package/build/_modules/messaging/_services/msg-events.service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts +26 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.js +126 -0
- package/build/_modules/messaging/_services/msg-integration.control-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -0
- package/build/_modules/messaging/_services/msg-main.control-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-main.control-service.js +408 -0
- package/build/_modules/messaging/_services/msg-main.control-service.js.map +1 -0
- package/build/_modules/messaging/_services/msg-message.data-service.d.ts +29 -0
- package/build/_modules/messaging/_services/msg-message.data-service.d.ts.map +1 -0
- package/build/_modules/messaging/_services/msg-message.data-service.js +104 -0
- package/build/_modules/messaging/_services/msg-message.data-service.js.map +1 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.d.ts +8 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.d.ts.map +1 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.js +21 -0
- package/build/_modules/messaging/get-messaging-routing-module.util.js.map +1 -0
- package/build/_modules/messaging/index.d.ts +12 -0
- package/build/_modules/messaging/index.d.ts.map +1 -0
- package/build/_modules/messaging/index.js +30 -0
- package/build/_modules/messaging/index.js.map +1 -0
- package/build/_modules/messaging/messaging.controller.d.ts +13 -0
- package/build/_modules/messaging/messaging.controller.d.ts.map +1 -0
- package/build/_modules/messaging/messaging.controller.js +257 -0
- package/build/_modules/messaging/messaging.controller.js.map +1 -0
- package/package.json +72 -4
- package/src/_collections/global-settings.const.ts +2 -0
- package/src/_models/interfaces/global-settings.interface.ts +20 -2
- package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -0
- package/src/_modules/assistant/_collections/ass.util.ts +50 -0
- package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -0
- package/src/_modules/assistant/_services/ass-io.control-service.ts +100 -0
- package/src/_modules/assistant/_services/ass-main.control-service.ts +38 -0
- package/src/_modules/assistant/_services/ass.service-base.ts +92 -0
- package/src/_modules/assistant/index.ts +19 -0
- package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -0
- package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -0
- package/src/_modules/bot/_collections/bot-operations.util.ts +149 -0
- package/src/_modules/bot/_enums/bot-provider.enum.ts +6 -0
- package/src/_modules/bot/_models/bot-channel.interface.ts +7 -0
- package/src/_modules/bot/_models/bot-command.interface.ts +8 -0
- package/src/_modules/bot/_models/bot-global-settings.interface.ts +87 -0
- package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -0
- package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -0
- package/src/_modules/bot/_models/bot-message.interface.ts +14 -0
- package/src/_modules/bot/_models/bot-provider.interface.ts +80 -0
- package/src/_modules/bot/_models/bot-user.interface.ts +7 -0
- package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +20 -0
- package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/discord-bot/_services/dib-provider.service.ts +462 -0
- package/src/_modules/bot/_modules/discord-bot/index.ts +15 -0
- package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/slack-bot/_services/slb-provider.service.ts +152 -0
- package/src/_modules/bot/_modules/slack-bot/index.ts +14 -0
- package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +18 -0
- package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -0
- package/src/_modules/bot/_modules/teams-bot/_services/teb-provider.service.ts +152 -0
- package/src/_modules/bot/_modules/teams-bot/index.ts +14 -0
- package/src/_modules/bot/_services/bot-commands.control-service.ts +126 -0
- package/src/_modules/bot/_services/bot-io.control-service.ts +325 -0
- package/src/_modules/bot/_services/bot-main.control-service.ts +344 -0
- package/src/_modules/bot/_services/bot-provider-factory.service.ts +30 -0
- package/src/_modules/bot/_services/bot-routines.control-service.ts +83 -0
- package/src/_modules/bot/index.ts +36 -0
- package/src/_modules/defaults/_models/default-user.data-model.ts +72 -0
- package/src/_modules/defaults/_services/default-auth.service.ts +177 -0
- package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -0
- package/src/_modules/defaults/_services/default-user.data-service.ts +98 -0
- package/src/_modules/defaults/index.ts +14 -0
- package/src/_modules/messaging/_collections/msg-global-settings.const.ts +27 -0
- package/src/_modules/messaging/_collections/msg.util.ts +83 -0
- package/src/_modules/messaging/_models/msg-global-settings.interface.ts +49 -0
- package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -0
- package/src/_modules/messaging/_services/msg-events.service.ts +267 -0
- package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -0
- package/src/_modules/messaging/_services/msg-main.control-service.ts +548 -0
- package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -0
- package/src/_modules/messaging/get-messaging-routing-module.util.ts +26 -0
- package/src/_modules/messaging/index.ts +33 -0
- package/src/_modules/messaging/messaging.controller.ts +370 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-global-settings.const.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_collections/msg-global-settings.const.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAErF;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAqBvC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_Msg_global_settings = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Default messaging module settings
|
|
6
|
+
*/
|
|
7
|
+
exports.DyNTS_Msg_global_settings = {
|
|
8
|
+
enableRealtimeEvents: true,
|
|
9
|
+
maxMessagesPerLoad: 50,
|
|
10
|
+
enableThreading: true,
|
|
11
|
+
enableReactions: true,
|
|
12
|
+
enableAttachments: true,
|
|
13
|
+
maxAttachmentSize: 10 * 1024 * 1024, // 10MB
|
|
14
|
+
enableMentions: true,
|
|
15
|
+
enableReadReceipts: true,
|
|
16
|
+
enableTypingIndicators: true,
|
|
17
|
+
integration: {
|
|
18
|
+
syncBotMessages: true,
|
|
19
|
+
syncAssistantMessages: true,
|
|
20
|
+
enableAgentProcessViz: true,
|
|
21
|
+
},
|
|
22
|
+
retry: {
|
|
23
|
+
maxRetries: 3,
|
|
24
|
+
retryDelay: 1000, // 1 second
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=msg-global-settings.const.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-global-settings.const.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_collections/msg-global-settings.const.ts"],"names":[],"mappings":";;;AAEA;;GAEG;AACU,QAAA,yBAAyB,GAA8B;IAClE,oBAAoB,EAAE,IAAI;IAC1B,kBAAkB,EAAE,EAAE;IACtB,eAAe,EAAE,IAAI;IACrB,eAAe,EAAE,IAAI;IACrB,iBAAiB,EAAE,IAAI;IACvB,iBAAiB,EAAE,EAAE,GAAG,IAAI,GAAG,IAAI,EAAE,OAAO;IAC5C,cAAc,EAAE,IAAI;IACpB,kBAAkB,EAAE,IAAI;IACxB,sBAAsB,EAAE,IAAI;IAE5B,WAAW,EAAE;QACX,eAAe,EAAE,IAAI;QACrB,qBAAqB,EAAE,IAAI;QAC3B,qBAAqB,EAAE,IAAI;KAC5B;IAED,KAAK,EAAE;QACL,UAAU,EAAE,CAAC;QACb,UAAU,EAAE,IAAI,EAAE,WAAW;KAC9B;CACF,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DyFM_Msg_Message, DyFM_Msg_Conversation } from '@futdevpro/fsm-dynamo/messaging';
|
|
2
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
3
|
+
/**
|
|
4
|
+
* Messaging utility functions
|
|
5
|
+
*/
|
|
6
|
+
export declare class DyNTS_Msg_Util {
|
|
7
|
+
/**
|
|
8
|
+
* Convert bot message to messaging system message
|
|
9
|
+
*/
|
|
10
|
+
static botMessageToMsgMessage<T>(botMessage: DyNTS_Bot_Message<T>, conversationId: string, issuer: string): DyFM_Msg_Message;
|
|
11
|
+
/**
|
|
12
|
+
* Create AI message from assistant response
|
|
13
|
+
*/
|
|
14
|
+
static createAIMessage(conversationId: string, content: string, aiProvider: string, aiModel: string, senderId: string, issuer: string): DyFM_Msg_Message;
|
|
15
|
+
/**
|
|
16
|
+
* Extract mentions from message content
|
|
17
|
+
* Looks for @username or @userId patterns
|
|
18
|
+
*/
|
|
19
|
+
static extractMentions(content: string): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Check if user has permission to access conversation
|
|
22
|
+
*/
|
|
23
|
+
static userCanAccessConversation(conversation: DyFM_Msg_Conversation, userId: string): boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=msg.util.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg.util.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_collections/msg.util.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAGtB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E;;GAEG;AACH,qBAAa,cAAc;IAEzB;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAAC,CAAC,EAC7B,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAChC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GACb,gBAAgB;IAiBnB;;OAEG;IACH,MAAM,CAAC,eAAe,CACpB,cAAc,EAAE,MAAM,EACtB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,gBAAgB;IAgBnB;;;OAGG;IACH,MAAM,CAAC,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE;IAMjD;;OAEG;IACH,MAAM,CAAC,yBAAyB,CAC9B,YAAY,EAAE,qBAAqB,EACnC,MAAM,EAAE,MAAM,GACb,OAAO;CAGX"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_Msg_Util = void 0;
|
|
4
|
+
const messaging_1 = require("@futdevpro/fsm-dynamo/messaging");
|
|
5
|
+
/**
|
|
6
|
+
* Messaging utility functions
|
|
7
|
+
*/
|
|
8
|
+
class DyNTS_Msg_Util {
|
|
9
|
+
/**
|
|
10
|
+
* Convert bot message to messaging system message
|
|
11
|
+
*/
|
|
12
|
+
static botMessageToMsgMessage(botMessage, conversationId, issuer) {
|
|
13
|
+
return new messaging_1.DyFM_Msg_Message({
|
|
14
|
+
conversationId,
|
|
15
|
+
content: botMessage.content || '',
|
|
16
|
+
type: messaging_1.DyFM_Msg_Type.userToUser,
|
|
17
|
+
status: messaging_1.DyFM_Msg_Status.sent,
|
|
18
|
+
senderId: botMessage.authorId,
|
|
19
|
+
senderName: botMessage.authorName,
|
|
20
|
+
senderDisplayName: botMessage.authorDisplayName,
|
|
21
|
+
platformMessageId: botMessage.rawPlatformMessage?.id || botMessage.id,
|
|
22
|
+
platformChannelId: botMessage.channelId,
|
|
23
|
+
sentAt: new Date(botMessage.timestamp),
|
|
24
|
+
__createdBy: issuer,
|
|
25
|
+
__lastModifiedBy: issuer,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Create AI message from assistant response
|
|
30
|
+
*/
|
|
31
|
+
static createAIMessage(conversationId, content, aiProvider, aiModel, senderId, issuer) {
|
|
32
|
+
return new messaging_1.DyFM_Msg_Message({
|
|
33
|
+
conversationId,
|
|
34
|
+
content,
|
|
35
|
+
type: messaging_1.DyFM_Msg_Type.aiToUser,
|
|
36
|
+
status: messaging_1.DyFM_Msg_Status.sent,
|
|
37
|
+
senderId,
|
|
38
|
+
isAIGenerated: true,
|
|
39
|
+
aiProvider,
|
|
40
|
+
aiModel,
|
|
41
|
+
sentAt: new Date(),
|
|
42
|
+
__createdBy: issuer,
|
|
43
|
+
__lastModifiedBy: issuer,
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Extract mentions from message content
|
|
48
|
+
* Looks for @username or @userId patterns
|
|
49
|
+
*/
|
|
50
|
+
static extractMentions(content) {
|
|
51
|
+
const mentionRegex = /@(\w+)/g;
|
|
52
|
+
const matches = content.match(mentionRegex);
|
|
53
|
+
return matches ? matches.map(m => m.substring(1)) : [];
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Check if user has permission to access conversation
|
|
57
|
+
*/
|
|
58
|
+
static userCanAccessConversation(conversation, userId) {
|
|
59
|
+
return conversation.participants?.some(p => p.userId === userId) ?? false;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
exports.DyNTS_Msg_Util = DyNTS_Msg_Util;
|
|
63
|
+
//# sourceMappingURL=msg.util.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg.util.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_collections/msg.util.ts"],"names":[],"mappings":";;;AAAA,+DAKyC;AAGzC;;GAEG;AACH,MAAa,cAAc;IAEzB;;OAEG;IACH,MAAM,CAAC,sBAAsB,CAC3B,UAAgC,EAChC,cAAsB,EACtB,MAAc;QAEd,OAAO,IAAI,4BAAgB,CAAC;YAC1B,cAAc;YACd,OAAO,EAAE,UAAU,CAAC,OAAO,IAAI,EAAE;YACjC,IAAI,EAAE,yBAAa,CAAC,UAAU;YAC9B,MAAM,EAAE,2BAAe,CAAC,IAAI;YAC5B,QAAQ,EAAE,UAAU,CAAC,QAAQ;YAC7B,UAAU,EAAE,UAAU,CAAC,UAAU;YACjC,iBAAiB,EAAE,UAAU,CAAC,iBAAiB;YAC/C,iBAAiB,EAAG,UAAU,CAA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|
2
|
+
* Messaging Module Global Settings
|
|
3
|
+
*/
|
|
4
|
+
export interface DyNTS_Msg_Global_Settings {
|
|
5
|
+
/** Enable real-time socket events for messages */
|
|
6
|
+
enableRealtimeEvents?: boolean;
|
|
7
|
+
/** Maximum messages per conversation to load */
|
|
8
|
+
maxMessagesPerLoad?: number;
|
|
9
|
+
/** Enable conversation threading */
|
|
10
|
+
enableThreading?: boolean;
|
|
11
|
+
/** Enable message reactions */
|
|
12
|
+
enableReactions?: boolean;
|
|
13
|
+
/** Enable file attachments */
|
|
14
|
+
enableAttachments?: boolean;
|
|
15
|
+
/** Maximum attachment size in bytes */
|
|
16
|
+
maxAttachmentSize?: number;
|
|
17
|
+
/** Enable mentions */
|
|
18
|
+
enableMentions?: boolean;
|
|
19
|
+
/** Enable read receipts */
|
|
20
|
+
enableReadReceipts?: boolean;
|
|
21
|
+
/** Enable typing indicators */
|
|
22
|
+
enableTypingIndicators?: boolean;
|
|
23
|
+
/** Integration settings */
|
|
24
|
+
integration?: {
|
|
25
|
+
/** Auto-sync bot messages to messaging system */
|
|
26
|
+
syncBotMessages?: boolean;
|
|
27
|
+
/** Auto-sync assistant messages to messaging system */
|
|
28
|
+
syncAssistantMessages?: boolean;
|
|
29
|
+
/** Enable agent process visualization */
|
|
30
|
+
enableAgentProcessViz?: boolean;
|
|
31
|
+
};
|
|
32
|
+
/** Retry settings for failed messages */
|
|
33
|
+
retry?: {
|
|
34
|
+
maxRetries?: number;
|
|
35
|
+
retryDelay?: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=msg-global-settings.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-global-settings.interface.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_models/msg-global-settings.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACxC,kDAAkD;IAClD,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B,gDAAgD;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B,oCAAoC;IACpC,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,+BAA+B;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,8BAA8B;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,uCAAuC;IACvC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAE3B,sBAAsB;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,2BAA2B;IAC3B,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B,+BAA+B;IAC/B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,2BAA2B;IAC3B,WAAW,CAAC,EAAE;QACZ,iDAAiD;QACjD,eAAe,CAAC,EAAE,OAAO,CAAC;QAE1B,uDAAuD;QACvD,qBAAqB,CAAC,EAAE,OAAO,CAAC;QAEhC,yCAAyC;QACzC,qBAAqB,CAAC,EAAE,OAAO,CAAC;KACjC,CAAC;IAEF,yCAAyC;IACzC,KAAK,CAAC,EAAE;QACN,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-global-settings.interface.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_models/msg-global-settings.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { DyFM_Msg_Conversation, DyFM_Msg_Participant } from '@futdevpro/fsm-dynamo/messaging';
|
|
2
|
+
import { DyNTS_DataService } from '../../../_services/base/data.service';
|
|
3
|
+
/**
|
|
4
|
+
* Conversation Data Service
|
|
5
|
+
* Handles CRUD operations for conversations
|
|
6
|
+
*/
|
|
7
|
+
export declare class DyNTS_Msg_Conversation_DataService extends DyNTS_DataService<DyFM_Msg_Conversation> {
|
|
8
|
+
constructor(set: {
|
|
9
|
+
conversation?: DyFM_Msg_Conversation;
|
|
10
|
+
issuer: string;
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* Get conversations for a user
|
|
14
|
+
*/
|
|
15
|
+
getUserConversations(userId: string): Promise<DyFM_Msg_Conversation[]>;
|
|
16
|
+
/**
|
|
17
|
+
* Add participant to conversation
|
|
18
|
+
*/
|
|
19
|
+
addParticipant(conversationId: string, participant: DyFM_Msg_Participant): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Remove participant from conversation
|
|
22
|
+
*/
|
|
23
|
+
removeParticipant(conversationId: string, userId: string): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Update last message info
|
|
26
|
+
*/
|
|
27
|
+
updateLastMessage(conversationId: string, messageId: string, messagePreview: string): Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=msg-conversation.data-service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-conversation.data-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-conversation.data-service.ts"],"names":[],"mappings":"AACA,OAAO,EACL,qBAAqB,EAErB,oBAAoB,EACrB,MAAM,iCAAiC,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAGzE;;;GAGG;AACH,qBAAa,kCAAmC,SAAQ,iBAAiB,CAAC,qBAAqB,CAAC;gBAG5F,GAAG,EAAE;QACH,YAAY,CAAC,EAAE,qBAAqB,CAAC;QACrC,MAAM,EAAE,MAAM,CAAC;KAChB;IASH;;OAEG;IACG,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,EAAE,CAAC;IAqB5E;;OAEG;IACG,cAAc,CAClB,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,oBAAoB,GAChC,OAAO,CAAC,IAAI,CAAC;IA8BhB;;OAEG;IACG,iBAAiB,CACrB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IAsBhB;;OAEG;IACG,iBAAiB,CACrB,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,IAAI,CAAC;CAqBjB"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_Msg_Conversation_DataService = void 0;
|
|
4
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
5
|
+
const messaging_1 = require("@futdevpro/fsm-dynamo/messaging");
|
|
6
|
+
const data_service_1 = require("../../../_services/base/data.service");
|
|
7
|
+
const global_settings_const_1 = require("../../../_collections/global-settings.const");
|
|
8
|
+
/**
|
|
9
|
+
* Conversation Data Service
|
|
10
|
+
* Handles CRUD operations for conversations
|
|
11
|
+
*/
|
|
12
|
+
class DyNTS_Msg_Conversation_DataService extends data_service_1.DyNTS_DataService {
|
|
13
|
+
constructor(set) {
|
|
14
|
+
super(new messaging_1.DyFM_Msg_Conversation(set?.conversation), messaging_1.DyFM_msgConversation_dataParams, set.issuer);
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Get conversations for a user
|
|
18
|
+
*/
|
|
19
|
+
async getUserConversations(userId) {
|
|
20
|
+
try {
|
|
21
|
+
await this.dataDBService
|
|
22
|
+
.find({
|
|
23
|
+
'participants.userId': userId,
|
|
24
|
+
__deleted: { $exists: false },
|
|
25
|
+
})
|
|
26
|
+
.then((res) => {
|
|
27
|
+
this.dataList = res.sort((a, b) => (b.lastMessageAt?.getTime() || 0) - (a.lastMessageAt?.getTime() || 0));
|
|
28
|
+
});
|
|
29
|
+
return this.dataList;
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
33
|
+
...this.getDefaultErrorSettings('getUserConversations', error),
|
|
34
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-GUC`,
|
|
35
|
+
userMessage: 'Failed to retrieve user conversations.',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Add participant to conversation
|
|
41
|
+
*/
|
|
42
|
+
async addParticipant(conversationId, participant) {
|
|
43
|
+
try {
|
|
44
|
+
const conversation = await this.getDataById(conversationId);
|
|
45
|
+
if (!conversation) {
|
|
46
|
+
throw new Error('Conversation not found');
|
|
47
|
+
}
|
|
48
|
+
if (!conversation.participants) {
|
|
49
|
+
conversation.participants = [];
|
|
50
|
+
}
|
|
51
|
+
// Check if participant already exists
|
|
52
|
+
const exists = conversation.participants.some(p => p.userId === participant.userId);
|
|
53
|
+
if (!exists) {
|
|
54
|
+
conversation.participants.push(participant);
|
|
55
|
+
await this.saveData(conversation);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
catch (error) {
|
|
59
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
60
|
+
...this.getDefaultErrorSettings('addParticipant', error),
|
|
61
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-AP`,
|
|
62
|
+
userMessage: 'Failed to add participant to conversation.',
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Remove participant from conversation
|
|
68
|
+
*/
|
|
69
|
+
async removeParticipant(conversationId, userId) {
|
|
70
|
+
try {
|
|
71
|
+
const conversation = await this.getDataById(conversationId);
|
|
72
|
+
if (!conversation) {
|
|
73
|
+
throw new Error('Conversation not found');
|
|
74
|
+
}
|
|
75
|
+
conversation.participants = conversation.participants?.filter(p => p.userId !== userId) || [];
|
|
76
|
+
await this.saveData(conversation);
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
80
|
+
...this.getDefaultErrorSettings('removeParticipant', error),
|
|
81
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-RP`,
|
|
82
|
+
userMessage: 'Failed to remove participant from conversation.',
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Update last message info
|
|
88
|
+
*/
|
|
89
|
+
async updateLastMessage(conversationId, messageId, messagePreview) {
|
|
90
|
+
try {
|
|
91
|
+
const conversation = await this.getDataById(conversationId);
|
|
92
|
+
if (!conversation) {
|
|
93
|
+
throw new Error('Conversation not found');
|
|
94
|
+
}
|
|
95
|
+
conversation.lastMessageId = messageId;
|
|
96
|
+
conversation.lastMessageAt = new Date();
|
|
97
|
+
conversation.lastMessagePreview = messagePreview;
|
|
98
|
+
await this.saveData(conversation);
|
|
99
|
+
}
|
|
100
|
+
catch (error) {
|
|
101
|
+
throw new fsm_dynamo_1.DyFM_Error({
|
|
102
|
+
...this.getDefaultErrorSettings('updateLastMessage', error),
|
|
103
|
+
errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-ULM`,
|
|
104
|
+
userMessage: 'Failed to update conversation last message.',
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
exports.DyNTS_Msg_Conversation_DataService = DyNTS_Msg_Conversation_DataService;
|
|
110
|
+
//# sourceMappingURL=msg-conversation.data-service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-conversation.data-service.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-conversation.data-service.ts"],"names":[],"mappings":";;;AAAA,sDAAkE;AAClE,+DAIyC;AAEzC,uEAAyE;AACzE,uFAAoF;AAEpF;;;GAGG;AACH,MAAa,kCAAmC,SAAQ,gCAAwC;IAE9F,YACE,GAGC;QAED,KAAK,CACH,IAAI,iCAAqB,CAAC,GAAG,EAAE,YAAY,CAA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ACtE,WAAW,EAAE,iDAAiD;aAC/D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,cAAsB,EACtB,SAAiB,EACjB,cAAsB;QAEtB,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;YAE5D,IAAI,CAAC,YAAY,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,wBAAwB,CAAC,CAAC;YAC5C,CAAC;YAED,YAAY,CAAC,aAAa,GAAG,SAAS,CAAC;YACvC,YAAY,CAAC,aAAa,GAAG,IAAI,IAAI,EAAE,CAAC;YACxC,YAAY,CAAC,kBAAkB,GAAG,cAAc,CAAC;YAEjD,MAAM,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;QACpC,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,IAAI,uBAAU,CAAC;gBACnB,GAAG,IAAI,CAAC,uBAAuB,CAAC,mBAAmB,EAAE,KAAK,CAAC;gBAC3D,SAAS,EAAE,GAAG,6CAAqB,CAAC,mBAAmB,gBAAgB;gBACvE,WAAW,EAAE,6CAA6C;aAC3D,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF;AAnID,gFAmIC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { DyNTS_SingletonService } from '../../../_services/base/singleton.service';
|
|
2
|
+
/**
|
|
3
|
+
* Messaging Events Service
|
|
4
|
+
* Handles real-time socket events for messaging
|
|
5
|
+
*/
|
|
6
|
+
export declare class DyNTS_Msg_Events_Service extends DyNTS_SingletonService {
|
|
7
|
+
static getInstance(): DyNTS_Msg_Events_Service;
|
|
8
|
+
/**
|
|
9
|
+
* Get socket server instance
|
|
10
|
+
* Override this in extended classes to provide custom socket server
|
|
11
|
+
*/
|
|
12
|
+
protected getSocketServer(): any | null;
|
|
13
|
+
/**
|
|
14
|
+
* Emit message sent event
|
|
15
|
+
*/
|
|
16
|
+
emitMessageSent(message: any, conversationId: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Emit message updated event
|
|
19
|
+
*/
|
|
20
|
+
emitMessageUpdated(message: any, conversationId: string): void;
|
|
21
|
+
/**
|
|
22
|
+
* Emit typing indicator
|
|
23
|
+
*/
|
|
24
|
+
emitTypingIndicator(userId: string, conversationId: string, isTyping: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Emit conversation created event
|
|
27
|
+
*/
|
|
28
|
+
emitConversationCreated(conversation: any, participantIds: string[]): void;
|
|
29
|
+
/**
|
|
30
|
+
* Emit message deleted event
|
|
31
|
+
*/
|
|
32
|
+
emitMessageDeleted(messageId: string, conversationId: string): void;
|
|
33
|
+
/**
|
|
34
|
+
* Emit conversation updated event
|
|
35
|
+
*/
|
|
36
|
+
emitConversationUpdated(conversation: any): void;
|
|
37
|
+
/**
|
|
38
|
+
* Emit conversation deleted event
|
|
39
|
+
*/
|
|
40
|
+
emitConversationDeleted(conversationId: string): void;
|
|
41
|
+
/**
|
|
42
|
+
* Emit participant added event
|
|
43
|
+
*/
|
|
44
|
+
emitParticipantAdded(conversationId: string, userId: string): void;
|
|
45
|
+
/**
|
|
46
|
+
* Emit participant removed event
|
|
47
|
+
*/
|
|
48
|
+
emitParticipantRemoved(conversationId: string, userId: string): void;
|
|
49
|
+
/**
|
|
50
|
+
* Emit message read event
|
|
51
|
+
*/
|
|
52
|
+
emitMessageRead(messageId: string, userId: string, conversationId: string): void;
|
|
53
|
+
/**
|
|
54
|
+
* Emit reaction added event
|
|
55
|
+
*/
|
|
56
|
+
emitReactionAdded(messageId: string, reaction: any): void;
|
|
57
|
+
/**
|
|
58
|
+
* Emit reaction removed event
|
|
59
|
+
*/
|
|
60
|
+
emitReactionRemoved(messageId: string, userId: string, emoji: string): void;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=msg-events.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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EAAE,QAAQ,EAAE,GAAG,GAAG,IAAI;IAgBzD;;OAEG;IACH,mBAAmB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI;CAe5E"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DyNTS_Msg_Events_Service = void 0;
|
|
4
|
+
const singleton_service_1 = require("../../../_services/base/singleton.service");
|
|
5
|
+
const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
|
|
6
|
+
const messaging_1 = require("@futdevpro/fsm-dynamo/messaging");
|
|
7
|
+
/**
|
|
8
|
+
* Messaging Events Service
|
|
9
|
+
* Handles real-time socket events for messaging
|
|
10
|
+
*/
|
|
11
|
+
class DyNTS_Msg_Events_Service extends singleton_service_1.DyNTS_SingletonService {
|
|
12
|
+
static getInstance() {
|
|
13
|
+
return DyNTS_Msg_Events_Service.getSingletonInstance();
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Get socket server instance
|
|
17
|
+
* Override this in extended classes to provide custom socket server
|
|
18
|
+
*/
|
|
19
|
+
getSocketServer() {
|
|
20
|
+
// Default: no socket server (messaging works without real-time events)
|
|
21
|
+
return null;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Emit message sent event
|
|
25
|
+
*/
|
|
26
|
+
emitMessageSent(message, conversationId) {
|
|
27
|
+
try {
|
|
28
|
+
const socketServer = this.getSocketServer();
|
|
29
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
30
|
+
// Emit to conversation room
|
|
31
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, messaging_1.DyFM_Msg_EventKey.messageSent, message);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit message sent event', error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Emit message updated event
|
|
40
|
+
*/
|
|
41
|
+
emitMessageUpdated(message, conversationId) {
|
|
42
|
+
try {
|
|
43
|
+
const socketServer = this.getSocketServer();
|
|
44
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
45
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, messaging_1.DyFM_Msg_EventKey.messageUpdated, message);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit message updated event', error);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Emit typing indicator
|
|
54
|
+
*/
|
|
55
|
+
emitTypingIndicator(userId, conversationId, isTyping) {
|
|
56
|
+
try {
|
|
57
|
+
const socketServer = this.getSocketServer();
|
|
58
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
59
|
+
const eventKey = isTyping
|
|
60
|
+
? messaging_1.DyFM_Msg_EventKey.typingStart
|
|
61
|
+
: messaging_1.DyFM_Msg_EventKey.typingStop;
|
|
62
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, eventKey, { userId, conversationId });
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
catch (error) {
|
|
66
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit typing indicator', error);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Emit conversation created event
|
|
71
|
+
*/
|
|
72
|
+
emitConversationCreated(conversation, participantIds) {
|
|
73
|
+
try {
|
|
74
|
+
const socketServer = this.getSocketServer();
|
|
75
|
+
if (socketServer && socketServer.emitToUser) {
|
|
76
|
+
// Emit to each participant
|
|
77
|
+
participantIds.forEach(userId => {
|
|
78
|
+
socketServer.emitToUser(userId, messaging_1.DyFM_Msg_EventKey.conversationCreated, conversation);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
catch (error) {
|
|
83
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit conversation created event', error);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Emit message deleted event
|
|
88
|
+
*/
|
|
89
|
+
emitMessageDeleted(messageId, conversationId) {
|
|
90
|
+
try {
|
|
91
|
+
const socketServer = this.getSocketServer();
|
|
92
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
93
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, messaging_1.DyFM_Msg_EventKey.messageDeleted, { messageId, conversationId });
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
catch (error) {
|
|
97
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit message deleted event', error);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Emit conversation updated event
|
|
102
|
+
*/
|
|
103
|
+
emitConversationUpdated(conversation) {
|
|
104
|
+
try {
|
|
105
|
+
const socketServer = this.getSocketServer();
|
|
106
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
107
|
+
const participantIds = conversation.participants?.map((p) => p.userId) || [];
|
|
108
|
+
participantIds.forEach(userId => {
|
|
109
|
+
socketServer.emitToUser(userId, messaging_1.DyFM_Msg_EventKey.conversationUpdated, conversation);
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
catch (error) {
|
|
114
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit conversation updated event', error);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Emit conversation deleted event
|
|
119
|
+
*/
|
|
120
|
+
emitConversationDeleted(conversationId) {
|
|
121
|
+
try {
|
|
122
|
+
const socketServer = this.getSocketServer();
|
|
123
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
124
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, messaging_1.DyFM_Msg_EventKey.conversationDeleted, { conversationId });
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
catch (error) {
|
|
128
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit conversation deleted event', error);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Emit participant added event
|
|
133
|
+
*/
|
|
134
|
+
emitParticipantAdded(conversationId, userId) {
|
|
135
|
+
try {
|
|
136
|
+
const socketServer = this.getSocketServer();
|
|
137
|
+
if (socketServer && socketServer.emitToUser) {
|
|
138
|
+
socketServer.emitToUser(userId, messaging_1.DyFM_Msg_EventKey.participantAdded, { conversationId, userId });
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
catch (error) {
|
|
142
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit participant added event', error);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Emit participant removed event
|
|
147
|
+
*/
|
|
148
|
+
emitParticipantRemoved(conversationId, userId) {
|
|
149
|
+
try {
|
|
150
|
+
const socketServer = this.getSocketServer();
|
|
151
|
+
if (socketServer && socketServer.emitToUser) {
|
|
152
|
+
socketServer.emitToUser(userId, messaging_1.DyFM_Msg_EventKey.participantRemoved, { conversationId, userId });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
catch (error) {
|
|
156
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit participant removed event', error);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Emit message read event
|
|
161
|
+
*/
|
|
162
|
+
emitMessageRead(messageId, userId, conversationId) {
|
|
163
|
+
try {
|
|
164
|
+
const socketServer = this.getSocketServer();
|
|
165
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
166
|
+
socketServer.emitToRoom(`conversation:${conversationId}`, messaging_1.DyFM_Msg_EventKey.messageRead, { messageId, userId, conversationId });
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
catch (error) {
|
|
170
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit message read event', error);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* Emit reaction added event
|
|
175
|
+
*/
|
|
176
|
+
emitReactionAdded(messageId, reaction) {
|
|
177
|
+
try {
|
|
178
|
+
const socketServer = this.getSocketServer();
|
|
179
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
180
|
+
socketServer.emitToRoom(`conversation:${reaction.conversationId || 'unknown'}`, messaging_1.DyFM_Msg_EventKey.reactionAdded, { messageId, reaction });
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit reaction added event', error);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Emit reaction removed event
|
|
189
|
+
*/
|
|
190
|
+
emitReactionRemoved(messageId, userId, emoji) {
|
|
191
|
+
try {
|
|
192
|
+
const socketServer = this.getSocketServer();
|
|
193
|
+
if (socketServer && socketServer.emitToRoom) {
|
|
194
|
+
socketServer.emitToRoom(`conversation:${userId}`, // This should be conversationId, but we don't have it
|
|
195
|
+
messaging_1.DyFM_Msg_EventKey.reactionRemoved, { messageId, userId, emoji });
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
catch (error) {
|
|
199
|
+
fsm_dynamo_1.DyFM_Log.error('Failed to emit reaction removed event', error);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
exports.DyNTS_Msg_Events_Service = DyNTS_Msg_Events_Service;
|
|
204
|
+
//# sourceMappingURL=msg-events.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"msg-events.service.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-events.service.ts"],"names":[],"mappings":";;;AAAA,iFAAmF;AAEnF,sDAAiD;AACjD,+DAAoE;AAEpE;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,0CAAsB;IAElE,MAAM,CAAC,WAAW;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ACH,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YAE5C,IAAI,YAAY,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;gBAC5C,YAAY,CAAC,UAAU,CACrB,gBAAgB,QAAQ,CAAC,cAAc,IAAI,SAAS,EAAE,EACtD,6BAAiB,CAAC,aAAa,EAC/B,EAAE,SAAS,EAAE,QAAQ,EAAE,CACxB,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,qBAAQ,CAAC,KAAK,CAAC,qCAAqC,EAAE,KAAK,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED;;OAEG;IACH,mBAAmB,CAAC,SAAiB,EAAE,MAAc,EAAE,KAAa;QAClE,IAAI,CAAC;YACH,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;YAE5C,IAAI,YAAY,IAAI,YAAY,CAAC,UAAU,EAAE,CAAC;gBAC5C,YAAY,CAAC,UAAU,CACrB,gBAAgB,MAAM,EAAE,EAAE,sDAAsD;gBAChF,6BAAiB,CAAC,eAAe,EACjC,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,CAC7B,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,qBAAQ,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;CACF;AAjQD,4DAiQC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { DyNTS_SingletonService } from '../../../_services/base/singleton.service';
|
|
2
|
+
import { DyFM_Msg_Message, DyFM_Msg_Conversation } from '@futdevpro/fsm-dynamo/messaging';
|
|
3
|
+
import { DyNTS_Bot_Message } from '../../bot/_models/bot-message.interface';
|
|
4
|
+
/**
|
|
5
|
+
* Messaging Integration Control Service
|
|
6
|
+
* Handles integration between messaging system and bot/assistant modules
|
|
7
|
+
*/
|
|
8
|
+
export declare class DyNTS_Msg_Integration_ControlService extends DyNTS_SingletonService {
|
|
9
|
+
static getInstance(): DyNTS_Msg_Integration_ControlService;
|
|
10
|
+
private eventsService;
|
|
11
|
+
/**
|
|
12
|
+
* Sync bot message to messaging system
|
|
13
|
+
* Called from bot IO when message is received
|
|
14
|
+
*/
|
|
15
|
+
syncBotMessage<T>(botMessage: DyNTS_Bot_Message<T>, conversationId: string, issuer: string): Promise<DyFM_Msg_Message>;
|
|
16
|
+
/**
|
|
17
|
+
* Sync assistant response to messaging system
|
|
18
|
+
* Called from assistant IO when AI responds
|
|
19
|
+
*/
|
|
20
|
+
syncAssistantMessage(content: string, conversationId: string, aiProvider: string, aiModel: string, senderId: string, issuer: string): Promise<DyFM_Msg_Message>;
|
|
21
|
+
/**
|
|
22
|
+
* Find or create conversation for bot channel
|
|
23
|
+
*/
|
|
24
|
+
findOrCreateBotConversation(channelId: string, platformSource: string, issuer: string): Promise<DyFM_Msg_Conversation>;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=msg-integration.control-service.d.ts.map
|