@futdevpro/nts-dynamo 1.14.8 → 1.14.9
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/_enums/msg-event-key.enum.d.ts +23 -0
- package/build/_modules/messaging/_enums/msg-event-key.enum.d.ts.map +1 -0
- package/build/_modules/messaging/_enums/msg-event-key.enum.js +32 -0
- package/build/_modules/messaging/_enums/msg-event-key.enum.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 +13 -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 +71 -3
- 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/_enums/msg-event-key.enum.ts +31 -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,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Messaging Module
|
|
3
|
+
//
|
|
4
|
+
// Unified messaging system for user↔user and user↔AI communication
|
|
5
|
+
// Integrates with bot and assistant modules
|
|
6
|
+
// Provides real-time events via sockets
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
// Re-export FSM models
|
|
10
|
+
export * from '@futdevpro/fsm-dynamo/messaging';
|
|
11
|
+
|
|
12
|
+
// MODELS
|
|
13
|
+
export * from './_models/msg-global-settings.interface';
|
|
14
|
+
|
|
15
|
+
// COLLECTIONS
|
|
16
|
+
export * from './_collections/msg.util';
|
|
17
|
+
export * from './_collections/msg-global-settings.const';
|
|
18
|
+
|
|
19
|
+
// ENUMS
|
|
20
|
+
export * from './_enums/msg-event-key.enum';
|
|
21
|
+
|
|
22
|
+
// SERVICES
|
|
23
|
+
export * from './_services/msg-message.data-service';
|
|
24
|
+
export * from './_services/msg-conversation.data-service';
|
|
25
|
+
export * from './_services/msg-integration.control-service';
|
|
26
|
+
export * from './_services/msg-events.service';
|
|
27
|
+
export * from './_services/msg-main.control-service';
|
|
28
|
+
|
|
29
|
+
// CONTROLLER
|
|
30
|
+
export * from './messaging.controller';
|
|
31
|
+
|
|
32
|
+
// ROUTING
|
|
33
|
+
export * from './get-messaging-routing-module.util';
|
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
import { Request, Response } from 'express';
|
|
2
|
+
import { DyFM_HttpCallType } from '@futdevpro/fsm-dynamo';
|
|
3
|
+
import {
|
|
4
|
+
DyFM_msgModule_settings,
|
|
5
|
+
DyFM_Msg_Message,
|
|
6
|
+
DyFM_Msg_Conversation,
|
|
7
|
+
DyFM_Msg_Status,
|
|
8
|
+
DyFM_Msg_Reaction,
|
|
9
|
+
} from '@futdevpro/fsm-dynamo/messaging';
|
|
10
|
+
|
|
11
|
+
import { DyNTS_Endpoint_Params } from '../../_models/control-models/endpoint-params.control-model';
|
|
12
|
+
import { DyNTS_AuthService } from '../../_services/core/auth.service';
|
|
13
|
+
import { DyNTS_GlobalService } from '../../_services/core/global.service';
|
|
14
|
+
import { DyNTS_Controller } from '../../_services/route/controller.service';
|
|
15
|
+
import { DyNTS_Msg_Message_DataService } from './_services/msg-message.data-service';
|
|
16
|
+
import { DyNTS_Msg_Conversation_DataService } from './_services/msg-conversation.data-service';
|
|
17
|
+
import { DyNTS_Msg_Events_Service } from './_services/msg-events.service';
|
|
18
|
+
import { DyNTS_Msg_Main_ControlService } from './_services/msg-main.control-service';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Messaging Controller
|
|
22
|
+
* Handles HTTP endpoints for messaging operations
|
|
23
|
+
*/
|
|
24
|
+
export class DyNTS_Messaging_Controller extends DyNTS_Controller {
|
|
25
|
+
|
|
26
|
+
static getInstance(): DyNTS_Messaging_Controller {
|
|
27
|
+
return DyNTS_Messaging_Controller.getSingletonInstance();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private authService: DyNTS_AuthService;
|
|
31
|
+
private eventsService = DyNTS_Msg_Events_Service.getInstance();
|
|
32
|
+
private msgControlService = DyNTS_Msg_Main_ControlService.getInstance();
|
|
33
|
+
|
|
34
|
+
setupEndpoints(): void {
|
|
35
|
+
try {
|
|
36
|
+
this.authService = DyNTS_GlobalService.getAuthService();
|
|
37
|
+
} catch (error) {
|
|
38
|
+
// Auth service not available - use default auth service
|
|
39
|
+
const { DyNTS_Default_AuthService } = require('../defaults/_services/default-auth.service');
|
|
40
|
+
this.authService = DyNTS_Default_AuthService.getInstance();
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.endpoints = [
|
|
44
|
+
// Get user's conversations
|
|
45
|
+
new DyNTS_Endpoint_Params({
|
|
46
|
+
name: 'getConversations',
|
|
47
|
+
type: DyFM_HttpCallType.get,
|
|
48
|
+
endpoint: DyFM_msgModule_settings.endPoints.getConversations,
|
|
49
|
+
tasks: [
|
|
50
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
51
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
52
|
+
|
|
53
|
+
const conversationService = new DyNTS_Msg_Conversation_DataService({
|
|
54
|
+
issuer,
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
const conversations = await conversationService.getUserConversations(userId);
|
|
58
|
+
|
|
59
|
+
res.send(conversations);
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
}),
|
|
63
|
+
|
|
64
|
+
// Get single conversation
|
|
65
|
+
new DyNTS_Endpoint_Params({
|
|
66
|
+
name: 'getConversation',
|
|
67
|
+
type: DyFM_HttpCallType.get,
|
|
68
|
+
endpoint: DyFM_msgModule_settings.endPoints.getConversation,
|
|
69
|
+
tasks: [
|
|
70
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
71
|
+
const conversationService = new DyNTS_Msg_Conversation_DataService({
|
|
72
|
+
issuer,
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
await conversationService.getDataById(req.params.conversationId);
|
|
76
|
+
|
|
77
|
+
res.send(conversationService.data);
|
|
78
|
+
},
|
|
79
|
+
],
|
|
80
|
+
}),
|
|
81
|
+
|
|
82
|
+
// Create conversation
|
|
83
|
+
new DyNTS_Endpoint_Params({
|
|
84
|
+
name: 'createConversation',
|
|
85
|
+
type: DyFM_HttpCallType.post,
|
|
86
|
+
endpoint: DyFM_msgModule_settings.endPoints.createConversation,
|
|
87
|
+
tasks: [
|
|
88
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
89
|
+
const creatorId = this.authService.getIssuerFromRequest(req);
|
|
90
|
+
|
|
91
|
+
const conversation = await this.msgControlService.createConversation(
|
|
92
|
+
req.body,
|
|
93
|
+
creatorId,
|
|
94
|
+
issuer
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
res.status(201).send(conversation);
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
}),
|
|
101
|
+
|
|
102
|
+
// Get messages for conversation
|
|
103
|
+
new DyNTS_Endpoint_Params({
|
|
104
|
+
name: 'getMessages',
|
|
105
|
+
type: DyFM_HttpCallType.get,
|
|
106
|
+
endpoint: DyFM_msgModule_settings.endPoints.getMessages,
|
|
107
|
+
tasks: [
|
|
108
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
109
|
+
const conversationId = req.params.conversationId;
|
|
110
|
+
const limit = req.query.limit ? parseInt(req.query.limit as string) : undefined;
|
|
111
|
+
const skip = req.query.skip ? parseInt(req.query.skip as string) : undefined;
|
|
112
|
+
|
|
113
|
+
const messageService = new DyNTS_Msg_Message_DataService({
|
|
114
|
+
issuer,
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
const messages = await messageService.getConversationMessages(
|
|
118
|
+
conversationId,
|
|
119
|
+
limit,
|
|
120
|
+
skip
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
res.send(messages);
|
|
124
|
+
},
|
|
125
|
+
],
|
|
126
|
+
}),
|
|
127
|
+
|
|
128
|
+
// Send message
|
|
129
|
+
new DyNTS_Endpoint_Params({
|
|
130
|
+
name: 'sendMessage',
|
|
131
|
+
type: DyFM_HttpCallType.post,
|
|
132
|
+
endpoint: DyFM_msgModule_settings.endPoints.sendMessage,
|
|
133
|
+
tasks: [
|
|
134
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
135
|
+
const conversationId = req.params.conversationId;
|
|
136
|
+
const senderId = this.authService.getIssuerFromRequest(req);
|
|
137
|
+
|
|
138
|
+
const message = await this.msgControlService.sendMessage(
|
|
139
|
+
conversationId,
|
|
140
|
+
req.body,
|
|
141
|
+
senderId,
|
|
142
|
+
issuer
|
|
143
|
+
);
|
|
144
|
+
|
|
145
|
+
res.status(201).send(message);
|
|
146
|
+
},
|
|
147
|
+
],
|
|
148
|
+
}),
|
|
149
|
+
|
|
150
|
+
// Edit message
|
|
151
|
+
new DyNTS_Endpoint_Params({
|
|
152
|
+
name: 'editMessage',
|
|
153
|
+
type: DyFM_HttpCallType.patch,
|
|
154
|
+
endpoint: DyFM_msgModule_settings.endPoints.editMessage,
|
|
155
|
+
tasks: [
|
|
156
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
157
|
+
const messageId = req.params.messageId;
|
|
158
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
159
|
+
|
|
160
|
+
const message = await this.msgControlService.editMessage(
|
|
161
|
+
messageId,
|
|
162
|
+
req.body.content,
|
|
163
|
+
userId,
|
|
164
|
+
issuer
|
|
165
|
+
);
|
|
166
|
+
|
|
167
|
+
res.send(message);
|
|
168
|
+
},
|
|
169
|
+
],
|
|
170
|
+
}),
|
|
171
|
+
|
|
172
|
+
// Delete message
|
|
173
|
+
new DyNTS_Endpoint_Params({
|
|
174
|
+
name: 'deleteMessage',
|
|
175
|
+
type: DyFM_HttpCallType.delete,
|
|
176
|
+
endpoint: DyFM_msgModule_settings.endPoints.deleteMessage,
|
|
177
|
+
tasks: [
|
|
178
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
179
|
+
const messageId = req.params.messageId;
|
|
180
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
181
|
+
|
|
182
|
+
await this.msgControlService.deleteMessage(
|
|
183
|
+
messageId,
|
|
184
|
+
userId,
|
|
185
|
+
issuer
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
res.send({ success: true });
|
|
189
|
+
},
|
|
190
|
+
],
|
|
191
|
+
}),
|
|
192
|
+
|
|
193
|
+
// Mark messages as read
|
|
194
|
+
new DyNTS_Endpoint_Params({
|
|
195
|
+
name: 'markAsRead',
|
|
196
|
+
type: DyFM_HttpCallType.post,
|
|
197
|
+
endpoint: DyFM_msgModule_settings.endPoints.markAsRead,
|
|
198
|
+
tasks: [
|
|
199
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
200
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
201
|
+
const messageIds: string[] = req.body.messageIds || [];
|
|
202
|
+
|
|
203
|
+
const result = await this.msgControlService.markMessagesAsRead(
|
|
204
|
+
messageIds,
|
|
205
|
+
userId,
|
|
206
|
+
issuer
|
|
207
|
+
);
|
|
208
|
+
|
|
209
|
+
res.send(result);
|
|
210
|
+
},
|
|
211
|
+
],
|
|
212
|
+
}),
|
|
213
|
+
|
|
214
|
+
// Add reaction
|
|
215
|
+
new DyNTS_Endpoint_Params({
|
|
216
|
+
name: 'addReaction',
|
|
217
|
+
type: DyFM_HttpCallType.post,
|
|
218
|
+
endpoint: DyFM_msgModule_settings.endPoints.addReaction,
|
|
219
|
+
tasks: [
|
|
220
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
221
|
+
const messageId = req.params.messageId;
|
|
222
|
+
const { emoji } = req.body;
|
|
223
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
224
|
+
|
|
225
|
+
const message = await this.msgControlService.addReaction(
|
|
226
|
+
messageId,
|
|
227
|
+
emoji,
|
|
228
|
+
userId,
|
|
229
|
+
issuer
|
|
230
|
+
);
|
|
231
|
+
|
|
232
|
+
res.send(message);
|
|
233
|
+
},
|
|
234
|
+
],
|
|
235
|
+
}),
|
|
236
|
+
|
|
237
|
+
// Remove reaction
|
|
238
|
+
new DyNTS_Endpoint_Params({
|
|
239
|
+
name: 'removeReaction',
|
|
240
|
+
type: DyFM_HttpCallType.delete,
|
|
241
|
+
endpoint: DyFM_msgModule_settings.endPoints.removeReaction,
|
|
242
|
+
tasks: [
|
|
243
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
244
|
+
const messageId = req.params.messageId;
|
|
245
|
+
const { emoji } = req.params;
|
|
246
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
247
|
+
|
|
248
|
+
const message = await this.msgControlService.removeReaction(
|
|
249
|
+
messageId,
|
|
250
|
+
emoji,
|
|
251
|
+
userId,
|
|
252
|
+
issuer
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
res.send(message);
|
|
256
|
+
},
|
|
257
|
+
],
|
|
258
|
+
}),
|
|
259
|
+
|
|
260
|
+
// Update conversation
|
|
261
|
+
new DyNTS_Endpoint_Params({
|
|
262
|
+
name: 'updateConversation',
|
|
263
|
+
type: DyFM_HttpCallType.patch,
|
|
264
|
+
endpoint: DyFM_msgModule_settings.endPoints.updateConversation,
|
|
265
|
+
tasks: [
|
|
266
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
267
|
+
const conversationId = req.params.conversationId;
|
|
268
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
269
|
+
|
|
270
|
+
const conversation = await this.msgControlService.updateConversation(
|
|
271
|
+
conversationId,
|
|
272
|
+
req.body,
|
|
273
|
+
userId,
|
|
274
|
+
issuer
|
|
275
|
+
);
|
|
276
|
+
|
|
277
|
+
res.send(conversation);
|
|
278
|
+
},
|
|
279
|
+
],
|
|
280
|
+
}),
|
|
281
|
+
|
|
282
|
+
// Delete conversation
|
|
283
|
+
new DyNTS_Endpoint_Params({
|
|
284
|
+
name: 'deleteConversation',
|
|
285
|
+
type: DyFM_HttpCallType.delete,
|
|
286
|
+
endpoint: DyFM_msgModule_settings.endPoints.deleteConversation,
|
|
287
|
+
tasks: [
|
|
288
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
289
|
+
const conversationId = req.params.conversationId;
|
|
290
|
+
const userId = this.authService.getIssuerFromRequest(req);
|
|
291
|
+
|
|
292
|
+
await this.msgControlService.deleteConversation(
|
|
293
|
+
conversationId,
|
|
294
|
+
userId,
|
|
295
|
+
issuer
|
|
296
|
+
);
|
|
297
|
+
|
|
298
|
+
res.send({ success: true });
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
}),
|
|
302
|
+
|
|
303
|
+
// Add participant
|
|
304
|
+
new DyNTS_Endpoint_Params({
|
|
305
|
+
name: 'addParticipant',
|
|
306
|
+
type: DyFM_HttpCallType.post,
|
|
307
|
+
endpoint: DyFM_msgModule_settings.endPoints.addParticipant,
|
|
308
|
+
tasks: [
|
|
309
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
310
|
+
const conversationId = req.params.conversationId;
|
|
311
|
+
const { userId: newUserId, role = 'member' } = req.body;
|
|
312
|
+
const requesterId = this.authService.getIssuerFromRequest(req);
|
|
313
|
+
|
|
314
|
+
await this.msgControlService.addParticipant(
|
|
315
|
+
conversationId,
|
|
316
|
+
newUserId,
|
|
317
|
+
role,
|
|
318
|
+
requesterId,
|
|
319
|
+
issuer
|
|
320
|
+
);
|
|
321
|
+
|
|
322
|
+
res.send({ success: true });
|
|
323
|
+
},
|
|
324
|
+
],
|
|
325
|
+
}),
|
|
326
|
+
|
|
327
|
+
// Remove participant
|
|
328
|
+
new DyNTS_Endpoint_Params({
|
|
329
|
+
name: 'removeParticipant',
|
|
330
|
+
type: DyFM_HttpCallType.delete,
|
|
331
|
+
endpoint: DyFM_msgModule_settings.endPoints.removeParticipant,
|
|
332
|
+
tasks: [
|
|
333
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
334
|
+
const conversationId = req.params.conversationId;
|
|
335
|
+
const userIdToRemove = req.params.userId;
|
|
336
|
+
const requesterId = this.authService.getIssuerFromRequest(req);
|
|
337
|
+
|
|
338
|
+
await this.msgControlService.removeParticipant(
|
|
339
|
+
conversationId,
|
|
340
|
+
userIdToRemove,
|
|
341
|
+
requesterId,
|
|
342
|
+
issuer
|
|
343
|
+
);
|
|
344
|
+
|
|
345
|
+
res.send({ success: true });
|
|
346
|
+
},
|
|
347
|
+
],
|
|
348
|
+
}),
|
|
349
|
+
|
|
350
|
+
// Get agent process
|
|
351
|
+
new DyNTS_Endpoint_Params({
|
|
352
|
+
name: 'getAgentProcess',
|
|
353
|
+
type: DyFM_HttpCallType.get,
|
|
354
|
+
endpoint: DyFM_msgModule_settings.endPoints.getAgentProcess,
|
|
355
|
+
tasks: [
|
|
356
|
+
async (req: Request, res: Response, issuer: string): Promise<void> => {
|
|
357
|
+
const messageId = req.params.messageId;
|
|
358
|
+
|
|
359
|
+
const agentProcessSteps = await this.msgControlService.getAgentProcessSteps(
|
|
360
|
+
messageId,
|
|
361
|
+
issuer
|
|
362
|
+
);
|
|
363
|
+
|
|
364
|
+
res.send(agentProcessSteps);
|
|
365
|
+
},
|
|
366
|
+
],
|
|
367
|
+
}),
|
|
368
|
+
];
|
|
369
|
+
}
|
|
370
|
+
}
|