@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.
Files changed (283) hide show
  1. package/build/_collections/global-settings.const.d.ts.map +1 -1
  2. package/build/_collections/global-settings.const.js +1 -0
  3. package/build/_collections/global-settings.const.js.map +1 -1
  4. package/build/_models/interfaces/global-settings.interface.d.ts +18 -2
  5. package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
  6. package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +3 -0
  7. package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts.map +1 -0
  8. package/build/_modules/assistant/_collections/ass-global-settings.const.js +15 -0
  9. package/build/_modules/assistant/_collections/ass-global-settings.const.js.map +1 -0
  10. package/build/_modules/assistant/_collections/ass.util.d.ts +16 -0
  11. package/build/_modules/assistant/_collections/ass.util.d.ts.map +1 -0
  12. package/build/_modules/assistant/_collections/ass.util.js +43 -0
  13. package/build/_modules/assistant/_collections/ass.util.js.map +1 -0
  14. package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +14 -0
  15. package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts.map +1 -0
  16. package/build/_modules/assistant/_models/ass-global-settings.interface.js +3 -0
  17. package/build/_modules/assistant/_models/ass-global-settings.interface.js.map +1 -0
  18. package/build/_modules/assistant/_services/ass-io.control-service.d.ts +23 -0
  19. package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -0
  20. package/build/_modules/assistant/_services/ass-io.control-service.js +59 -0
  21. package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -0
  22. package/build/_modules/assistant/_services/ass-main.control-service.d.ts +15 -0
  23. package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -0
  24. package/build/_modules/assistant/_services/ass-main.control-service.js +12 -0
  25. package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -0
  26. package/build/_modules/assistant/_services/ass.service-base.d.ts +31 -0
  27. package/build/_modules/assistant/_services/ass.service-base.d.ts.map +1 -0
  28. package/build/_modules/assistant/_services/ass.service-base.js +56 -0
  29. package/build/_modules/assistant/_services/ass.service-base.js.map +1 -0
  30. package/build/_modules/assistant/index.d.ts +7 -0
  31. package/build/_modules/assistant/index.d.ts.map +1 -0
  32. package/build/_modules/assistant/index.js +19 -0
  33. package/build/_modules/assistant/index.js.map +1 -0
  34. package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +3 -0
  35. package/build/_modules/bot/_collections/bot-default-commands.const.d.ts.map +1 -0
  36. package/build/_modules/bot/_collections/bot-default-commands.const.js +14 -0
  37. package/build/_modules/bot/_collections/bot-default-commands.const.js.map +1 -0
  38. package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +3 -0
  39. package/build/_modules/bot/_collections/bot-global-settings.const.d.ts.map +1 -0
  40. package/build/_modules/bot/_collections/bot-global-settings.const.js +32 -0
  41. package/build/_modules/bot/_collections/bot-global-settings.const.js.map +1 -0
  42. package/build/_modules/bot/_collections/bot-operations.util.d.ts +21 -0
  43. package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +1 -0
  44. package/build/_modules/bot/_collections/bot-operations.util.js +74 -0
  45. package/build/_modules/bot/_collections/bot-operations.util.js.map +1 -0
  46. package/build/_modules/bot/_enums/bot-provider.enum.d.ts +7 -0
  47. package/build/_modules/bot/_enums/bot-provider.enum.d.ts.map +1 -0
  48. package/build/_modules/bot/_enums/bot-provider.enum.js +11 -0
  49. package/build/_modules/bot/_enums/bot-provider.enum.js.map +1 -0
  50. package/build/_modules/bot/_models/bot-channel.interface.d.ts +8 -0
  51. package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +1 -0
  52. package/build/_modules/bot/_models/bot-channel.interface.js +3 -0
  53. package/build/_modules/bot/_models/bot-channel.interface.js.map +1 -0
  54. package/build/_modules/bot/_models/bot-command.interface.d.ts +8 -0
  55. package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -0
  56. package/build/_modules/bot/_models/bot-command.interface.js +3 -0
  57. package/build/_modules/bot/_models/bot-command.interface.js.map +1 -0
  58. package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +79 -0
  59. package/build/_modules/bot/_models/bot-global-settings.interface.d.ts.map +1 -0
  60. package/build/_modules/bot/_models/bot-global-settings.interface.js +3 -0
  61. package/build/_modules/bot/_models/bot-global-settings.interface.js.map +1 -0
  62. package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +7 -0
  63. package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts.map +1 -0
  64. package/build/_modules/bot/_models/bot-last-mention-date.interface.js +3 -0
  65. package/build/_modules/bot/_models/bot-last-mention-date.interface.js.map +1 -0
  66. package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +6 -0
  67. package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts.map +1 -0
  68. package/build/_modules/bot/_models/bot-last-message-date.interface.js +3 -0
  69. package/build/_modules/bot/_models/bot-last-message-date.interface.js.map +1 -0
  70. package/build/_modules/bot/_models/bot-message.interface.d.ts +15 -0
  71. package/build/_modules/bot/_models/bot-message.interface.d.ts.map +1 -0
  72. package/build/_modules/bot/_models/bot-message.interface.js +3 -0
  73. package/build/_modules/bot/_models/bot-message.interface.js.map +1 -0
  74. package/build/_modules/bot/_models/bot-provider.interface.d.ts +60 -0
  75. package/build/_modules/bot/_models/bot-provider.interface.d.ts.map +1 -0
  76. package/build/_modules/bot/_models/bot-provider.interface.js +3 -0
  77. package/build/_modules/bot/_models/bot-provider.interface.js.map +1 -0
  78. package/build/_modules/bot/_models/bot-user.interface.d.ts +8 -0
  79. package/build/_modules/bot/_models/bot-user.interface.d.ts.map +1 -0
  80. package/build/_modules/bot/_models/bot-user.interface.js +3 -0
  81. package/build/_modules/bot/_models/bot-user.interface.js.map +1 -0
  82. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +11 -0
  83. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +1 -0
  84. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js +13 -0
  85. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js.map +1 -0
  86. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +5 -0
  87. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +1 -0
  88. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js +19 -0
  89. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +1 -0
  90. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts +8 -0
  91. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts.map +1 -0
  92. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +3 -0
  93. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js.map +1 -0
  94. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts +53 -0
  95. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts.map +1 -0
  96. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js +369 -0
  97. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js.map +1 -0
  98. package/build/_modules/bot/_modules/discord-bot/index.d.ts +5 -0
  99. package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -0
  100. package/build/_modules/bot/_modules/discord-bot/index.js +16 -0
  101. package/build/_modules/bot/_modules/discord-bot/index.js.map +1 -0
  102. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +11 -0
  103. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +1 -0
  104. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js +13 -0
  105. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js.map +1 -0
  106. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +7 -0
  107. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts.map +1 -0
  108. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +3 -0
  109. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js.map +1 -0
  110. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts +40 -0
  111. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts.map +1 -0
  112. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js +116 -0
  113. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js.map +1 -0
  114. package/build/_modules/bot/_modules/slack-bot/index.d.ts +4 -0
  115. package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -0
  116. package/build/_modules/bot/_modules/slack-bot/index.js +15 -0
  117. package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -0
  118. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +11 -0
  119. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +1 -0
  120. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js +13 -0
  121. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js.map +1 -0
  122. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +7 -0
  123. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts.map +1 -0
  124. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +3 -0
  125. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js.map +1 -0
  126. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts +40 -0
  127. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts.map +1 -0
  128. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js +116 -0
  129. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js.map +1 -0
  130. package/build/_modules/bot/_modules/teams-bot/index.d.ts +4 -0
  131. package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -0
  132. package/build/_modules/bot/_modules/teams-bot/index.js +15 -0
  133. package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -0
  134. package/build/_modules/bot/_services/bot-commands.control-service.d.ts +15 -0
  135. package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -0
  136. package/build/_modules/bot/_services/bot-commands.control-service.js +72 -0
  137. package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -0
  138. package/build/_modules/bot/_services/bot-io.control-service.d.ts +24 -0
  139. package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -0
  140. package/build/_modules/bot/_services/bot-io.control-service.js +207 -0
  141. package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -0
  142. package/build/_modules/bot/_services/bot-main.control-service.d.ts +42 -0
  143. package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -0
  144. package/build/_modules/bot/_services/bot-main.control-service.js +223 -0
  145. package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -0
  146. package/build/_modules/bot/_services/bot-provider-factory.service.d.ts +5 -0
  147. package/build/_modules/bot/_services/bot-provider-factory.service.d.ts.map +1 -0
  148. package/build/_modules/bot/_services/bot-provider-factory.service.js +28 -0
  149. package/build/_modules/bot/_services/bot-provider-factory.service.js.map +1 -0
  150. package/build/_modules/bot/_services/bot-routines.control-service.d.ts +17 -0
  151. package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -0
  152. package/build/_modules/bot/_services/bot-routines.control-service.js +40 -0
  153. package/build/_modules/bot/_services/bot-routines.control-service.js.map +1 -0
  154. package/build/_modules/bot/index.d.ts +21 -0
  155. package/build/_modules/bot/index.d.ts.map +1 -0
  156. package/build/_modules/bot/index.js +35 -0
  157. package/build/_modules/bot/index.js.map +1 -0
  158. package/build/_modules/defaults/_models/default-user.data-model.d.ts +20 -0
  159. package/build/_modules/defaults/_models/default-user.data-model.d.ts.map +1 -0
  160. package/build/_modules/defaults/_models/default-user.data-model.js +73 -0
  161. package/build/_modules/defaults/_models/default-user.data-model.js.map +1 -0
  162. package/build/_modules/defaults/_services/default-auth.service.d.ts +51 -0
  163. package/build/_modules/defaults/_services/default-auth.service.d.ts.map +1 -0
  164. package/build/_modules/defaults/_services/default-auth.service.js +159 -0
  165. package/build/_modules/defaults/_services/default-auth.service.js.map +1 -0
  166. package/build/_modules/defaults/_services/default-socket-events.service.d.ts +24 -0
  167. package/build/_modules/defaults/_services/default-socket-events.service.d.ts.map +1 -0
  168. package/build/_modules/defaults/_services/default-socket-events.service.js +61 -0
  169. package/build/_modules/defaults/_services/default-socket-events.service.js.map +1 -0
  170. package/build/_modules/defaults/_services/default-user.data-service.d.ts +25 -0
  171. package/build/_modules/defaults/_services/default-user.data-service.d.ts.map +1 -0
  172. package/build/_modules/defaults/_services/default-user.data-service.js +88 -0
  173. package/build/_modules/defaults/_services/default-user.data-service.js.map +1 -0
  174. package/build/_modules/defaults/index.d.ts +5 -0
  175. package/build/_modules/defaults/index.d.ts.map +1 -0
  176. package/build/_modules/defaults/index.js +16 -0
  177. package/build/_modules/defaults/index.js.map +1 -0
  178. package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +6 -0
  179. package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts.map +1 -0
  180. package/build/_modules/messaging/_collections/msg-global-settings.const.js +27 -0
  181. package/build/_modules/messaging/_collections/msg-global-settings.const.js.map +1 -0
  182. package/build/_modules/messaging/_collections/msg.util.d.ts +25 -0
  183. package/build/_modules/messaging/_collections/msg.util.d.ts.map +1 -0
  184. package/build/_modules/messaging/_collections/msg.util.js +63 -0
  185. package/build/_modules/messaging/_collections/msg.util.js.map +1 -0
  186. package/build/_modules/messaging/_enums/msg-event-key.enum.d.ts +23 -0
  187. package/build/_modules/messaging/_enums/msg-event-key.enum.d.ts.map +1 -0
  188. package/build/_modules/messaging/_enums/msg-event-key.enum.js +32 -0
  189. package/build/_modules/messaging/_enums/msg-event-key.enum.js.map +1 -0
  190. package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +38 -0
  191. package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts.map +1 -0
  192. package/build/_modules/messaging/_models/msg-global-settings.interface.js +3 -0
  193. package/build/_modules/messaging/_models/msg-global-settings.interface.js.map +1 -0
  194. package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +29 -0
  195. package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts.map +1 -0
  196. package/build/_modules/messaging/_services/msg-conversation.data-service.js +110 -0
  197. package/build/_modules/messaging/_services/msg-conversation.data-service.js.map +1 -0
  198. package/build/_modules/messaging/_services/msg-events.service.d.ts +62 -0
  199. package/build/_modules/messaging/_services/msg-events.service.d.ts.map +1 -0
  200. package/build/_modules/messaging/_services/msg-events.service.js +204 -0
  201. package/build/_modules/messaging/_services/msg-events.service.js.map +1 -0
  202. package/build/_modules/messaging/_services/msg-integration.control-service.d.ts +26 -0
  203. package/build/_modules/messaging/_services/msg-integration.control-service.d.ts.map +1 -0
  204. package/build/_modules/messaging/_services/msg-integration.control-service.js +126 -0
  205. package/build/_modules/messaging/_services/msg-integration.control-service.js.map +1 -0
  206. package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -0
  207. package/build/_modules/messaging/_services/msg-main.control-service.d.ts.map +1 -0
  208. package/build/_modules/messaging/_services/msg-main.control-service.js +408 -0
  209. package/build/_modules/messaging/_services/msg-main.control-service.js.map +1 -0
  210. package/build/_modules/messaging/_services/msg-message.data-service.d.ts +29 -0
  211. package/build/_modules/messaging/_services/msg-message.data-service.d.ts.map +1 -0
  212. package/build/_modules/messaging/_services/msg-message.data-service.js +104 -0
  213. package/build/_modules/messaging/_services/msg-message.data-service.js.map +1 -0
  214. package/build/_modules/messaging/get-messaging-routing-module.util.d.ts +8 -0
  215. package/build/_modules/messaging/get-messaging-routing-module.util.d.ts.map +1 -0
  216. package/build/_modules/messaging/get-messaging-routing-module.util.js +21 -0
  217. package/build/_modules/messaging/get-messaging-routing-module.util.js.map +1 -0
  218. package/build/_modules/messaging/index.d.ts +13 -0
  219. package/build/_modules/messaging/index.d.ts.map +1 -0
  220. package/build/_modules/messaging/index.js +30 -0
  221. package/build/_modules/messaging/index.js.map +1 -0
  222. package/build/_modules/messaging/messaging.controller.d.ts +13 -0
  223. package/build/_modules/messaging/messaging.controller.d.ts.map +1 -0
  224. package/build/_modules/messaging/messaging.controller.js +257 -0
  225. package/build/_modules/messaging/messaging.controller.js.map +1 -0
  226. package/package.json +71 -3
  227. package/src/_collections/global-settings.const.ts +2 -0
  228. package/src/_models/interfaces/global-settings.interface.ts +20 -2
  229. package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -0
  230. package/src/_modules/assistant/_collections/ass.util.ts +50 -0
  231. package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -0
  232. package/src/_modules/assistant/_services/ass-io.control-service.ts +100 -0
  233. package/src/_modules/assistant/_services/ass-main.control-service.ts +38 -0
  234. package/src/_modules/assistant/_services/ass.service-base.ts +92 -0
  235. package/src/_modules/assistant/index.ts +19 -0
  236. package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -0
  237. package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -0
  238. package/src/_modules/bot/_collections/bot-operations.util.ts +149 -0
  239. package/src/_modules/bot/_enums/bot-provider.enum.ts +6 -0
  240. package/src/_modules/bot/_models/bot-channel.interface.ts +7 -0
  241. package/src/_modules/bot/_models/bot-command.interface.ts +8 -0
  242. package/src/_modules/bot/_models/bot-global-settings.interface.ts +87 -0
  243. package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -0
  244. package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -0
  245. package/src/_modules/bot/_models/bot-message.interface.ts +14 -0
  246. package/src/_modules/bot/_models/bot-provider.interface.ts +80 -0
  247. package/src/_modules/bot/_models/bot-user.interface.ts +7 -0
  248. package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +18 -0
  249. package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +20 -0
  250. package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -0
  251. package/src/_modules/bot/_modules/discord-bot/_services/dib-provider.service.ts +462 -0
  252. package/src/_modules/bot/_modules/discord-bot/index.ts +15 -0
  253. package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +18 -0
  254. package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -0
  255. package/src/_modules/bot/_modules/slack-bot/_services/slb-provider.service.ts +152 -0
  256. package/src/_modules/bot/_modules/slack-bot/index.ts +14 -0
  257. package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +18 -0
  258. package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -0
  259. package/src/_modules/bot/_modules/teams-bot/_services/teb-provider.service.ts +152 -0
  260. package/src/_modules/bot/_modules/teams-bot/index.ts +14 -0
  261. package/src/_modules/bot/_services/bot-commands.control-service.ts +126 -0
  262. package/src/_modules/bot/_services/bot-io.control-service.ts +325 -0
  263. package/src/_modules/bot/_services/bot-main.control-service.ts +344 -0
  264. package/src/_modules/bot/_services/bot-provider-factory.service.ts +30 -0
  265. package/src/_modules/bot/_services/bot-routines.control-service.ts +83 -0
  266. package/src/_modules/bot/index.ts +36 -0
  267. package/src/_modules/defaults/_models/default-user.data-model.ts +72 -0
  268. package/src/_modules/defaults/_services/default-auth.service.ts +177 -0
  269. package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -0
  270. package/src/_modules/defaults/_services/default-user.data-service.ts +98 -0
  271. package/src/_modules/defaults/index.ts +14 -0
  272. package/src/_modules/messaging/_collections/msg-global-settings.const.ts +27 -0
  273. package/src/_modules/messaging/_collections/msg.util.ts +83 -0
  274. package/src/_modules/messaging/_enums/msg-event-key.enum.ts +31 -0
  275. package/src/_modules/messaging/_models/msg-global-settings.interface.ts +49 -0
  276. package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -0
  277. package/src/_modules/messaging/_services/msg-events.service.ts +267 -0
  278. package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -0
  279. package/src/_modules/messaging/_services/msg-main.control-service.ts +548 -0
  280. package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -0
  281. package/src/_modules/messaging/get-messaging-routing-module.util.ts +26 -0
  282. package/src/_modules/messaging/index.ts +33 -0
  283. package/src/_modules/messaging/messaging.controller.ts +370 -0
@@ -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 msg_event_key_enum_1 = require("../_enums/msg-event-key.enum");
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}`, msg_event_key_enum_1.DyNTS_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}`, msg_event_key_enum_1.DyNTS_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
+ ? msg_event_key_enum_1.DyNTS_Msg_EventKey.typingStart
61
+ : msg_event_key_enum_1.DyNTS_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, msg_event_key_enum_1.DyNTS_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}`, msg_event_key_enum_1.DyNTS_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, msg_event_key_enum_1.DyNTS_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}`, msg_event_key_enum_1.DyNTS_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, msg_event_key_enum_1.DyNTS_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, msg_event_key_enum_1.DyNTS_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}`, msg_event_key_enum_1.DyNTS_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'}`, msg_event_key_enum_1.DyNTS_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
+ msg_event_key_enum_1.DyNTS_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,qEAAkE;AAElE;;;GAGG;AACH,MAAa,wBAAyB,SAAQ,0CAAsB;IAElE,MAAM,CAAC,WAAW;QAChB,OAAO,wBAAwB,CAAC,oBAAoB,EAAE,CAAC;IACzD,CAAC;IAED;;;OAGG;IACO,eAAe;QACvB,uEAA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AAE,CAAC;gBAC5C,YAAY,CAAC,UAAU,CACrB,gBAAgB,QAAQ,CAAC,cAAc,IAAI,SAAS,EAAE,EACtD,uCAAkB,CAAC,aAAa,EAChC,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,uCAAkB,CAAC,eAAe,EAClC,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
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-integration.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-integration.control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AAM1F,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAE5E;;;GAGG;AACH,qBAAa,oCAAqC,SAAQ,sBAAsB;IAE9E,MAAM,CAAC,WAAW,IAAI,oCAAoC;IAI1D,OAAO,CAAC,aAAa,CAA0C;IAE/D;;;OAGG;IACG,cAAc,CAAC,CAAC,EACpB,UAAU,EAAE,iBAAiB,CAAC,CAAC,CAAC,EAChC,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC;IA8C5B;;;OAGG;IACG,oBAAoB,CACxB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC;IAiD5B;;OAEG;IACG,2BAA2B,CAC/B,SAAS,EAAE,MAAM,EACjB,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,qBAAqB,CAAC;CAmClC"}
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_Msg_Integration_ControlService = void 0;
4
+ const singleton_service_1 = require("../../../_services/base/singleton.service");
5
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
6
+ const global_settings_const_1 = require("../../../_collections/global-settings.const");
7
+ const msg_message_data_service_1 = require("./msg-message.data-service");
8
+ const msg_conversation_data_service_1 = require("./msg-conversation.data-service");
9
+ const msg_events_service_1 = require("./msg-events.service");
10
+ const msg_util_1 = require("../_collections/msg.util");
11
+ /**
12
+ * Messaging Integration Control Service
13
+ * Handles integration between messaging system and bot/assistant modules
14
+ */
15
+ class DyNTS_Msg_Integration_ControlService extends singleton_service_1.DyNTS_SingletonService {
16
+ static getInstance() {
17
+ return DyNTS_Msg_Integration_ControlService.getSingletonInstance();
18
+ }
19
+ eventsService = msg_events_service_1.DyNTS_Msg_Events_Service.getInstance();
20
+ /**
21
+ * Sync bot message to messaging system
22
+ * Called from bot IO when message is received
23
+ */
24
+ async syncBotMessage(botMessage, conversationId, issuer) {
25
+ try {
26
+ if (!global_settings_const_1.DyNTS_global_settings.messaging_settings?.integration?.syncBotMessages) {
27
+ throw new Error('Bot message sync is disabled');
28
+ }
29
+ // Convert bot message to messaging format
30
+ const msgMessage = msg_util_1.DyNTS_Msg_Util.botMessageToMsgMessage(botMessage, conversationId, issuer);
31
+ // Save to database
32
+ const messageService = new msg_message_data_service_1.DyNTS_Msg_Message_DataService({
33
+ message: msgMessage,
34
+ issuer,
35
+ });
36
+ await messageService.saveData(messageService.data, false, false);
37
+ // Update conversation last message
38
+ const conversationService = new msg_conversation_data_service_1.DyNTS_Msg_Conversation_DataService({
39
+ issuer,
40
+ });
41
+ await conversationService.updateLastMessage(conversationId, messageService.data._id, msgMessage.content.substring(0, 100));
42
+ // Emit real-time event
43
+ this.eventsService.emitMessageSent(messageService.data, conversationId);
44
+ return messageService.data;
45
+ }
46
+ catch (error) {
47
+ fsm_dynamo_1.DyFM_Log.error('Failed to sync bot message', error);
48
+ throw new fsm_dynamo_1.DyFM_Error({
49
+ ...this.getDefaultErrorSettings('syncBotMessage', error, issuer),
50
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-SBM`,
51
+ userMessage: 'Failed to sync bot message to messaging system.',
52
+ });
53
+ }
54
+ }
55
+ /**
56
+ * Sync assistant response to messaging system
57
+ * Called from assistant IO when AI responds
58
+ */
59
+ async syncAssistantMessage(content, conversationId, aiProvider, aiModel, senderId, issuer) {
60
+ try {
61
+ if (!global_settings_const_1.DyNTS_global_settings.messaging_settings?.integration?.syncAssistantMessages) {
62
+ throw new Error('Assistant message sync is disabled');
63
+ }
64
+ // Create AI message
65
+ const msgMessage = msg_util_1.DyNTS_Msg_Util.createAIMessage(conversationId, content, aiProvider, aiModel, senderId, issuer);
66
+ // Save to database
67
+ const messageService = new msg_message_data_service_1.DyNTS_Msg_Message_DataService({
68
+ message: msgMessage,
69
+ issuer,
70
+ });
71
+ await messageService.saveData(messageService.data, false, false);
72
+ // Update conversation last message
73
+ const conversationService = new msg_conversation_data_service_1.DyNTS_Msg_Conversation_DataService({
74
+ issuer,
75
+ });
76
+ await conversationService.updateLastMessage(conversationId, messageService.data._id, content.substring(0, 100));
77
+ // Emit real-time event
78
+ this.eventsService.emitMessageSent(messageService.data, conversationId);
79
+ return messageService.data;
80
+ }
81
+ catch (error) {
82
+ fsm_dynamo_1.DyFM_Log.error('Failed to sync assistant message', error);
83
+ throw new fsm_dynamo_1.DyFM_Error({
84
+ ...this.getDefaultErrorSettings('syncAssistantMessage', error, issuer),
85
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-SAM`,
86
+ userMessage: 'Failed to sync assistant message to messaging system.',
87
+ });
88
+ }
89
+ }
90
+ /**
91
+ * Find or create conversation for bot channel
92
+ */
93
+ async findOrCreateBotConversation(channelId, platformSource, issuer) {
94
+ try {
95
+ const conversationService = new msg_conversation_data_service_1.DyNTS_Msg_Conversation_DataService({
96
+ issuer,
97
+ });
98
+ // Try to find existing conversation
99
+ const existingConversation = await conversationService.dataDBService.findOne({
100
+ platformChannelId: channelId,
101
+ platformSource,
102
+ __deleted: { $exists: false },
103
+ });
104
+ if (existingConversation) {
105
+ conversationService.data = existingConversation;
106
+ }
107
+ // Create new if not found
108
+ if (!conversationService.data._id) {
109
+ conversationService.data.platformChannelId = channelId;
110
+ conversationService.data.platformSource = platformSource;
111
+ conversationService.data.participants = [];
112
+ await conversationService.saveData(conversationService.data, false, false);
113
+ }
114
+ return conversationService.data;
115
+ }
116
+ catch (error) {
117
+ throw new fsm_dynamo_1.DyFM_Error({
118
+ ...this.getDefaultErrorSettings('findOrCreateBotConversation', error, issuer),
119
+ errorCode: `${global_settings_const_1.DyNTS_global_settings.systemShortCodeName}|DyNTS-MSG-FCBC`,
120
+ userMessage: 'Failed to find or create bot conversation.',
121
+ });
122
+ }
123
+ }
124
+ }
125
+ exports.DyNTS_Msg_Integration_ControlService = DyNTS_Msg_Integration_ControlService;
126
+ //# sourceMappingURL=msg-integration.control-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-integration.control-service.js","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-integration.control-service.ts"],"names":[],"mappings":";;;AAAA,iFAAmF;AACnF,sDAA4E;AAE5E,uFAAoF;AACpF,yEAA2E;AAC3E,mFAAqF;AACrF,6DAAgE;AAChE,uDAA0D;AAG1D;;;GAGG;AACH,MAAa,oCAAqC,SAAQ,0CAAsB;IAE9E,MAAM,CAAC,WAAW;QAChB,OAAO,oCAAoC,CAAC,oBAAoB,EAAE,CAAC;IACrE,CAAC;IAEO,aAAa,GAAG,6CAAwB,CAAC,WAAW,EAAE,CAAC;IAE/D;;;OAGG;IACH,KAAK,CAAC,cAAc,CAClB,UAAgC,EAChC,cAAsB,EACtB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 -0,0 +1,62 @@
1
+ import { DyNTS_SingletonService } from '../../../_services/base/singleton.service';
2
+ import { DyFM_Msg_Message, DyFM_Msg_Conversation, DyFM_Msg_ParticipantRole } from '@futdevpro/fsm-dynamo/messaging';
3
+ /**
4
+ * Main Messaging Control Service
5
+ * Handles all business logic for messaging operations
6
+ */
7
+ export declare class DyNTS_Msg_Main_ControlService extends DyNTS_SingletonService {
8
+ static getInstance(): DyNTS_Msg_Main_ControlService;
9
+ private eventsService;
10
+ /**
11
+ * Send a message
12
+ */
13
+ sendMessage(conversationId: string, messageData: Partial<DyFM_Msg_Message>, senderId: string, issuer: string): Promise<DyFM_Msg_Message>;
14
+ /**
15
+ * Edit a message
16
+ */
17
+ editMessage(messageId: string, content: string, userId: string, issuer: string): Promise<DyFM_Msg_Message>;
18
+ /**
19
+ * Delete a message
20
+ */
21
+ deleteMessage(messageId: string, userId: string, issuer: string): Promise<void>;
22
+ /**
23
+ * Mark messages as read
24
+ */
25
+ markMessagesAsRead(messageIds: string[], userId: string, issuer: string): Promise<{
26
+ success: boolean;
27
+ count: number;
28
+ }>;
29
+ /**
30
+ * Add reaction to message
31
+ */
32
+ addReaction(messageId: string, emoji: string, userId: string, issuer: string): Promise<DyFM_Msg_Message>;
33
+ /**
34
+ * Remove reaction from message
35
+ */
36
+ removeReaction(messageId: string, emoji: string, userId: string, issuer: string): Promise<DyFM_Msg_Message>;
37
+ /**
38
+ * Create conversation
39
+ */
40
+ createConversation(conversationData: Partial<DyFM_Msg_Conversation>, creatorId: string, issuer: string): Promise<DyFM_Msg_Conversation>;
41
+ /**
42
+ * Update conversation
43
+ */
44
+ updateConversation(conversationId: string, updateData: Partial<DyFM_Msg_Conversation>, userId: string, issuer: string): Promise<DyFM_Msg_Conversation>;
45
+ /**
46
+ * Delete conversation
47
+ */
48
+ deleteConversation(conversationId: string, userId: string, issuer: string): Promise<void>;
49
+ /**
50
+ * Add participant to conversation
51
+ */
52
+ addParticipant(conversationId: string, newUserId: string, role: DyFM_Msg_ParticipantRole, requesterId: string, issuer: string): Promise<void>;
53
+ /**
54
+ * Remove participant from conversation
55
+ */
56
+ removeParticipant(conversationId: string, userIdToRemove: string, requesterId: string, issuer: string): Promise<void>;
57
+ /**
58
+ * Get agent process steps for a message
59
+ */
60
+ getAgentProcessSteps(messageId: string, issuer: string): Promise<any[]>;
61
+ }
62
+ //# sourceMappingURL=msg-main.control-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"msg-main.control-service.d.ts","sourceRoot":"","sources":["../../../../src/_modules/messaging/_services/msg-main.control-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AAEnF,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EAIrB,wBAAwB,EAGzB,MAAM,iCAAiC,CAAC;AAOzC;;;GAGG;AACH,qBAAa,6BAA8B,SAAQ,sBAAsB;IAEvE,MAAM,CAAC,WAAW,IAAI,6BAA6B;IAInD,OAAO,CAAC,aAAa,CAA0C;IAE/D;;OAEG;IACG,WAAW,CACf,cAAc,EAAE,MAAM,EACtB,WAAW,EAAE,OAAO,CAAC,gBAAgB,CAAC,EACtC,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC;IA6C5B;;OAEG;IACG,WAAW,CACf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,CAAC;IAoC5B;;OAEG;IACG,aAAa,CACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,IAAI,CAAC;IA8BhB;;OAEG;IACG,kBAAkB,CACtB,UAAU,EAAE,MAAM,EAAE,EACpB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,GACb,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CA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