@futdevpro/nts-dynamo 1.14.7 → 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 (304) 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/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.d.ts.map +1 -1
  7. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js +0 -1
  8. package/build/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.js.map +1 -1
  9. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts +1 -0
  10. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.d.ts.map +1 -1
  11. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js +29 -25
  12. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.js.map +1 -1
  13. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts +1 -0
  14. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.d.ts.map +1 -1
  15. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js +63 -23
  16. package/build/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.js.map +1 -1
  17. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.d.ts.map +1 -1
  18. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js +50 -33
  19. package/build/_modules/ai/_modules/open-ai/_services/oai-document.data-service.js.map +1 -1
  20. package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts +3 -0
  21. package/build/_modules/assistant/_collections/ass-global-settings.const.d.ts.map +1 -0
  22. package/build/_modules/assistant/_collections/ass-global-settings.const.js +15 -0
  23. package/build/_modules/assistant/_collections/ass-global-settings.const.js.map +1 -0
  24. package/build/_modules/assistant/_collections/ass.util.d.ts +16 -0
  25. package/build/_modules/assistant/_collections/ass.util.d.ts.map +1 -0
  26. package/build/_modules/assistant/_collections/ass.util.js +43 -0
  27. package/build/_modules/assistant/_collections/ass.util.js.map +1 -0
  28. package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts +14 -0
  29. package/build/_modules/assistant/_models/ass-global-settings.interface.d.ts.map +1 -0
  30. package/build/_modules/assistant/_models/ass-global-settings.interface.js +3 -0
  31. package/build/_modules/assistant/_models/ass-global-settings.interface.js.map +1 -0
  32. package/build/_modules/assistant/_services/ass-io.control-service.d.ts +23 -0
  33. package/build/_modules/assistant/_services/ass-io.control-service.d.ts.map +1 -0
  34. package/build/_modules/assistant/_services/ass-io.control-service.js +59 -0
  35. package/build/_modules/assistant/_services/ass-io.control-service.js.map +1 -0
  36. package/build/_modules/assistant/_services/ass-main.control-service.d.ts +15 -0
  37. package/build/_modules/assistant/_services/ass-main.control-service.d.ts.map +1 -0
  38. package/build/_modules/assistant/_services/ass-main.control-service.js +12 -0
  39. package/build/_modules/assistant/_services/ass-main.control-service.js.map +1 -0
  40. package/build/_modules/assistant/_services/ass.service-base.d.ts +31 -0
  41. package/build/_modules/assistant/_services/ass.service-base.d.ts.map +1 -0
  42. package/build/_modules/assistant/_services/ass.service-base.js +56 -0
  43. package/build/_modules/assistant/_services/ass.service-base.js.map +1 -0
  44. package/build/_modules/assistant/index.d.ts +7 -0
  45. package/build/_modules/assistant/index.d.ts.map +1 -0
  46. package/build/_modules/assistant/index.js +19 -0
  47. package/build/_modules/assistant/index.js.map +1 -0
  48. package/build/_modules/bot/_collections/bot-default-commands.const.d.ts +3 -0
  49. package/build/_modules/bot/_collections/bot-default-commands.const.d.ts.map +1 -0
  50. package/build/_modules/bot/_collections/bot-default-commands.const.js +14 -0
  51. package/build/_modules/bot/_collections/bot-default-commands.const.js.map +1 -0
  52. package/build/_modules/bot/_collections/bot-global-settings.const.d.ts +3 -0
  53. package/build/_modules/bot/_collections/bot-global-settings.const.d.ts.map +1 -0
  54. package/build/_modules/bot/_collections/bot-global-settings.const.js +32 -0
  55. package/build/_modules/bot/_collections/bot-global-settings.const.js.map +1 -0
  56. package/build/_modules/bot/_collections/bot-operations.util.d.ts +21 -0
  57. package/build/_modules/bot/_collections/bot-operations.util.d.ts.map +1 -0
  58. package/build/_modules/bot/_collections/bot-operations.util.js +74 -0
  59. package/build/_modules/bot/_collections/bot-operations.util.js.map +1 -0
  60. package/build/_modules/bot/_enums/bot-provider.enum.d.ts +7 -0
  61. package/build/_modules/bot/_enums/bot-provider.enum.d.ts.map +1 -0
  62. package/build/_modules/bot/_enums/bot-provider.enum.js +11 -0
  63. package/build/_modules/bot/_enums/bot-provider.enum.js.map +1 -0
  64. package/build/_modules/bot/_models/bot-channel.interface.d.ts +8 -0
  65. package/build/_modules/bot/_models/bot-channel.interface.d.ts.map +1 -0
  66. package/build/_modules/bot/_models/bot-channel.interface.js +3 -0
  67. package/build/_modules/bot/_models/bot-channel.interface.js.map +1 -0
  68. package/build/_modules/bot/_models/bot-command.interface.d.ts +8 -0
  69. package/build/_modules/bot/_models/bot-command.interface.d.ts.map +1 -0
  70. package/build/_modules/bot/_models/bot-command.interface.js +3 -0
  71. package/build/_modules/bot/_models/bot-command.interface.js.map +1 -0
  72. package/build/_modules/bot/_models/bot-global-settings.interface.d.ts +79 -0
  73. package/build/_modules/bot/_models/bot-global-settings.interface.d.ts.map +1 -0
  74. package/build/_modules/bot/_models/bot-global-settings.interface.js +3 -0
  75. package/build/_modules/bot/_models/bot-global-settings.interface.js.map +1 -0
  76. package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts +7 -0
  77. package/build/_modules/bot/_models/bot-last-mention-date.interface.d.ts.map +1 -0
  78. package/build/_modules/bot/_models/bot-last-mention-date.interface.js +3 -0
  79. package/build/_modules/bot/_models/bot-last-mention-date.interface.js.map +1 -0
  80. package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts +6 -0
  81. package/build/_modules/bot/_models/bot-last-message-date.interface.d.ts.map +1 -0
  82. package/build/_modules/bot/_models/bot-last-message-date.interface.js +3 -0
  83. package/build/_modules/bot/_models/bot-last-message-date.interface.js.map +1 -0
  84. package/build/_modules/bot/_models/bot-message.interface.d.ts +15 -0
  85. package/build/_modules/bot/_models/bot-message.interface.d.ts.map +1 -0
  86. package/build/_modules/bot/_models/bot-message.interface.js +3 -0
  87. package/build/_modules/bot/_models/bot-message.interface.js.map +1 -0
  88. package/build/_modules/bot/_models/bot-provider.interface.d.ts +60 -0
  89. package/build/_modules/bot/_models/bot-provider.interface.d.ts.map +1 -0
  90. package/build/_modules/bot/_models/bot-provider.interface.js +3 -0
  91. package/build/_modules/bot/_models/bot-provider.interface.js.map +1 -0
  92. package/build/_modules/bot/_models/bot-user.interface.d.ts +8 -0
  93. package/build/_modules/bot/_models/bot-user.interface.d.ts.map +1 -0
  94. package/build/_modules/bot/_models/bot-user.interface.js +3 -0
  95. package/build/_modules/bot/_models/bot-user.interface.js.map +1 -0
  96. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts +11 -0
  97. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.d.ts.map +1 -0
  98. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js +13 -0
  99. package/build/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.js.map +1 -0
  100. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts +5 -0
  101. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.d.ts.map +1 -0
  102. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js +19 -0
  103. package/build/_modules/bot/_modules/discord-bot/_collections/dib.util.js.map +1 -0
  104. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts +8 -0
  105. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.d.ts.map +1 -0
  106. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js +3 -0
  107. package/build/_modules/bot/_modules/discord-bot/_models/dib-platform.types.js.map +1 -0
  108. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts +53 -0
  109. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.d.ts.map +1 -0
  110. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js +369 -0
  111. package/build/_modules/bot/_modules/discord-bot/_services/dib-provider.service.js.map +1 -0
  112. package/build/_modules/bot/_modules/discord-bot/index.d.ts +5 -0
  113. package/build/_modules/bot/_modules/discord-bot/index.d.ts.map +1 -0
  114. package/build/_modules/bot/_modules/discord-bot/index.js +16 -0
  115. package/build/_modules/bot/_modules/discord-bot/index.js.map +1 -0
  116. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts +11 -0
  117. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.d.ts.map +1 -0
  118. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js +13 -0
  119. package/build/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.js.map +1 -0
  120. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts +7 -0
  121. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.d.ts.map +1 -0
  122. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js +3 -0
  123. package/build/_modules/bot/_modules/slack-bot/_models/slb-platform.types.js.map +1 -0
  124. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts +40 -0
  125. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.d.ts.map +1 -0
  126. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js +116 -0
  127. package/build/_modules/bot/_modules/slack-bot/_services/slb-provider.service.js.map +1 -0
  128. package/build/_modules/bot/_modules/slack-bot/index.d.ts +4 -0
  129. package/build/_modules/bot/_modules/slack-bot/index.d.ts.map +1 -0
  130. package/build/_modules/bot/_modules/slack-bot/index.js +15 -0
  131. package/build/_modules/bot/_modules/slack-bot/index.js.map +1 -0
  132. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts +11 -0
  133. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.d.ts.map +1 -0
  134. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js +13 -0
  135. package/build/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.js.map +1 -0
  136. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts +7 -0
  137. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.d.ts.map +1 -0
  138. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js +3 -0
  139. package/build/_modules/bot/_modules/teams-bot/_models/teb-platform.types.js.map +1 -0
  140. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts +40 -0
  141. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.d.ts.map +1 -0
  142. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js +116 -0
  143. package/build/_modules/bot/_modules/teams-bot/_services/teb-provider.service.js.map +1 -0
  144. package/build/_modules/bot/_modules/teams-bot/index.d.ts +4 -0
  145. package/build/_modules/bot/_modules/teams-bot/index.d.ts.map +1 -0
  146. package/build/_modules/bot/_modules/teams-bot/index.js +15 -0
  147. package/build/_modules/bot/_modules/teams-bot/index.js.map +1 -0
  148. package/build/_modules/bot/_services/bot-commands.control-service.d.ts +15 -0
  149. package/build/_modules/bot/_services/bot-commands.control-service.d.ts.map +1 -0
  150. package/build/_modules/bot/_services/bot-commands.control-service.js +72 -0
  151. package/build/_modules/bot/_services/bot-commands.control-service.js.map +1 -0
  152. package/build/_modules/bot/_services/bot-io.control-service.d.ts +24 -0
  153. package/build/_modules/bot/_services/bot-io.control-service.d.ts.map +1 -0
  154. package/build/_modules/bot/_services/bot-io.control-service.js +207 -0
  155. package/build/_modules/bot/_services/bot-io.control-service.js.map +1 -0
  156. package/build/_modules/bot/_services/bot-main.control-service.d.ts +42 -0
  157. package/build/_modules/bot/_services/bot-main.control-service.d.ts.map +1 -0
  158. package/build/_modules/bot/_services/bot-main.control-service.js +223 -0
  159. package/build/_modules/bot/_services/bot-main.control-service.js.map +1 -0
  160. package/build/_modules/bot/_services/bot-provider-factory.service.d.ts +5 -0
  161. package/build/_modules/bot/_services/bot-provider-factory.service.d.ts.map +1 -0
  162. package/build/_modules/bot/_services/bot-provider-factory.service.js +28 -0
  163. package/build/_modules/bot/_services/bot-provider-factory.service.js.map +1 -0
  164. package/build/_modules/bot/_services/bot-routines.control-service.d.ts +17 -0
  165. package/build/_modules/bot/_services/bot-routines.control-service.d.ts.map +1 -0
  166. package/build/_modules/bot/_services/bot-routines.control-service.js +40 -0
  167. package/build/_modules/bot/_services/bot-routines.control-service.js.map +1 -0
  168. package/build/_modules/bot/index.d.ts +21 -0
  169. package/build/_modules/bot/index.d.ts.map +1 -0
  170. package/build/_modules/bot/index.js +35 -0
  171. package/build/_modules/bot/index.js.map +1 -0
  172. package/build/_modules/defaults/_models/default-user.data-model.d.ts +20 -0
  173. package/build/_modules/defaults/_models/default-user.data-model.d.ts.map +1 -0
  174. package/build/_modules/defaults/_models/default-user.data-model.js +73 -0
  175. package/build/_modules/defaults/_models/default-user.data-model.js.map +1 -0
  176. package/build/_modules/defaults/_services/default-auth.service.d.ts +51 -0
  177. package/build/_modules/defaults/_services/default-auth.service.d.ts.map +1 -0
  178. package/build/_modules/defaults/_services/default-auth.service.js +159 -0
  179. package/build/_modules/defaults/_services/default-auth.service.js.map +1 -0
  180. package/build/_modules/defaults/_services/default-socket-events.service.d.ts +24 -0
  181. package/build/_modules/defaults/_services/default-socket-events.service.d.ts.map +1 -0
  182. package/build/_modules/defaults/_services/default-socket-events.service.js +61 -0
  183. package/build/_modules/defaults/_services/default-socket-events.service.js.map +1 -0
  184. package/build/_modules/defaults/_services/default-user.data-service.d.ts +25 -0
  185. package/build/_modules/defaults/_services/default-user.data-service.d.ts.map +1 -0
  186. package/build/_modules/defaults/_services/default-user.data-service.js +88 -0
  187. package/build/_modules/defaults/_services/default-user.data-service.js.map +1 -0
  188. package/build/_modules/defaults/index.d.ts +5 -0
  189. package/build/_modules/defaults/index.d.ts.map +1 -0
  190. package/build/_modules/defaults/index.js +16 -0
  191. package/build/_modules/defaults/index.js.map +1 -0
  192. package/build/_modules/discord-bot/_services/dibo-io.control-service.js +1 -1
  193. package/build/_modules/discord-bot/_services/dibo-io.control-service.js.map +1 -1
  194. package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts +6 -0
  195. package/build/_modules/messaging/_collections/msg-global-settings.const.d.ts.map +1 -0
  196. package/build/_modules/messaging/_collections/msg-global-settings.const.js +27 -0
  197. package/build/_modules/messaging/_collections/msg-global-settings.const.js.map +1 -0
  198. package/build/_modules/messaging/_collections/msg.util.d.ts +25 -0
  199. package/build/_modules/messaging/_collections/msg.util.d.ts.map +1 -0
  200. package/build/_modules/messaging/_collections/msg.util.js +63 -0
  201. package/build/_modules/messaging/_collections/msg.util.js.map +1 -0
  202. package/build/_modules/messaging/_enums/msg-event-key.enum.d.ts +23 -0
  203. package/build/_modules/messaging/_enums/msg-event-key.enum.d.ts.map +1 -0
  204. package/build/_modules/messaging/_enums/msg-event-key.enum.js +32 -0
  205. package/build/_modules/messaging/_enums/msg-event-key.enum.js.map +1 -0
  206. package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts +38 -0
  207. package/build/_modules/messaging/_models/msg-global-settings.interface.d.ts.map +1 -0
  208. package/build/_modules/messaging/_models/msg-global-settings.interface.js +3 -0
  209. package/build/_modules/messaging/_models/msg-global-settings.interface.js.map +1 -0
  210. package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts +29 -0
  211. package/build/_modules/messaging/_services/msg-conversation.data-service.d.ts.map +1 -0
  212. package/build/_modules/messaging/_services/msg-conversation.data-service.js +110 -0
  213. package/build/_modules/messaging/_services/msg-conversation.data-service.js.map +1 -0
  214. package/build/_modules/messaging/_services/msg-events.service.d.ts +62 -0
  215. package/build/_modules/messaging/_services/msg-events.service.d.ts.map +1 -0
  216. package/build/_modules/messaging/_services/msg-events.service.js +204 -0
  217. package/build/_modules/messaging/_services/msg-events.service.js.map +1 -0
  218. package/build/_modules/messaging/_services/msg-integration.control-service.d.ts +26 -0
  219. package/build/_modules/messaging/_services/msg-integration.control-service.d.ts.map +1 -0
  220. package/build/_modules/messaging/_services/msg-integration.control-service.js +126 -0
  221. package/build/_modules/messaging/_services/msg-integration.control-service.js.map +1 -0
  222. package/build/_modules/messaging/_services/msg-main.control-service.d.ts +62 -0
  223. package/build/_modules/messaging/_services/msg-main.control-service.d.ts.map +1 -0
  224. package/build/_modules/messaging/_services/msg-main.control-service.js +408 -0
  225. package/build/_modules/messaging/_services/msg-main.control-service.js.map +1 -0
  226. package/build/_modules/messaging/_services/msg-message.data-service.d.ts +29 -0
  227. package/build/_modules/messaging/_services/msg-message.data-service.d.ts.map +1 -0
  228. package/build/_modules/messaging/_services/msg-message.data-service.js +104 -0
  229. package/build/_modules/messaging/_services/msg-message.data-service.js.map +1 -0
  230. package/build/_modules/messaging/get-messaging-routing-module.util.d.ts +8 -0
  231. package/build/_modules/messaging/get-messaging-routing-module.util.d.ts.map +1 -0
  232. package/build/_modules/messaging/get-messaging-routing-module.util.js +21 -0
  233. package/build/_modules/messaging/get-messaging-routing-module.util.js.map +1 -0
  234. package/build/_modules/messaging/index.d.ts +13 -0
  235. package/build/_modules/messaging/index.d.ts.map +1 -0
  236. package/build/_modules/messaging/index.js +30 -0
  237. package/build/_modules/messaging/index.js.map +1 -0
  238. package/build/_modules/messaging/messaging.controller.d.ts +13 -0
  239. package/build/_modules/messaging/messaging.controller.d.ts.map +1 -0
  240. package/build/_modules/messaging/messaging.controller.js +257 -0
  241. package/build/_modules/messaging/messaging.controller.js.map +1 -0
  242. package/package.json +71 -3
  243. package/src/_collections/global-settings.const.ts +2 -0
  244. package/src/_models/interfaces/global-settings.interface.ts +20 -2
  245. package/src/_modules/ai/_modules/document-ai/_models/data-models/dai-doc-chunk.data-model.ts +0 -1
  246. package/src/_modules/ai/_modules/open-ai/_services/oai-doc-chunk-data.service.ts +34 -27
  247. package/src/_modules/ai/_modules/open-ai/_services/oai-doc-page.data-service.ts +77 -23
  248. package/src/_modules/ai/_modules/open-ai/_services/oai-document.data-service.ts +59 -33
  249. package/src/_modules/assistant/_collections/ass-global-settings.const.ts +13 -0
  250. package/src/_modules/assistant/_collections/ass.util.ts +50 -0
  251. package/src/_modules/assistant/_models/ass-global-settings.interface.ts +15 -0
  252. package/src/_modules/assistant/_services/ass-io.control-service.ts +100 -0
  253. package/src/_modules/assistant/_services/ass-main.control-service.ts +38 -0
  254. package/src/_modules/assistant/_services/ass.service-base.ts +92 -0
  255. package/src/_modules/assistant/index.ts +19 -0
  256. package/src/_modules/bot/_collections/bot-default-commands.const.ts +12 -0
  257. package/src/_modules/bot/_collections/bot-global-settings.const.ts +39 -0
  258. package/src/_modules/bot/_collections/bot-operations.util.ts +149 -0
  259. package/src/_modules/bot/_enums/bot-provider.enum.ts +6 -0
  260. package/src/_modules/bot/_models/bot-channel.interface.ts +7 -0
  261. package/src/_modules/bot/_models/bot-command.interface.ts +8 -0
  262. package/src/_modules/bot/_models/bot-global-settings.interface.ts +87 -0
  263. package/src/_modules/bot/_models/bot-last-mention-date.interface.ts +6 -0
  264. package/src/_modules/bot/_models/bot-last-message-date.interface.ts +5 -0
  265. package/src/_modules/bot/_models/bot-message.interface.ts +14 -0
  266. package/src/_modules/bot/_models/bot-provider.interface.ts +80 -0
  267. package/src/_modules/bot/_models/bot-user.interface.ts +7 -0
  268. package/src/_modules/bot/_modules/discord-bot/_collections/dib-operations.util.ts +18 -0
  269. package/src/_modules/bot/_modules/discord-bot/_collections/dib.util.ts +20 -0
  270. package/src/_modules/bot/_modules/discord-bot/_models/dib-platform.types.ts +9 -0
  271. package/src/_modules/bot/_modules/discord-bot/_services/dib-provider.service.ts +462 -0
  272. package/src/_modules/bot/_modules/discord-bot/index.ts +15 -0
  273. package/src/_modules/bot/_modules/slack-bot/_collections/slb-operations.util.ts +18 -0
  274. package/src/_modules/bot/_modules/slack-bot/_models/slb-platform.types.ts +9 -0
  275. package/src/_modules/bot/_modules/slack-bot/_services/slb-provider.service.ts +152 -0
  276. package/src/_modules/bot/_modules/slack-bot/index.ts +14 -0
  277. package/src/_modules/bot/_modules/teams-bot/_collections/teb-operations.util.ts +18 -0
  278. package/src/_modules/bot/_modules/teams-bot/_models/teb-platform.types.ts +9 -0
  279. package/src/_modules/bot/_modules/teams-bot/_services/teb-provider.service.ts +152 -0
  280. package/src/_modules/bot/_modules/teams-bot/index.ts +14 -0
  281. package/src/_modules/bot/_services/bot-commands.control-service.ts +126 -0
  282. package/src/_modules/bot/_services/bot-io.control-service.ts +325 -0
  283. package/src/_modules/bot/_services/bot-main.control-service.ts +344 -0
  284. package/src/_modules/bot/_services/bot-provider-factory.service.ts +30 -0
  285. package/src/_modules/bot/_services/bot-routines.control-service.ts +83 -0
  286. package/src/_modules/bot/index.ts +36 -0
  287. package/src/_modules/defaults/_models/default-user.data-model.ts +72 -0
  288. package/src/_modules/defaults/_services/default-auth.service.ts +177 -0
  289. package/src/_modules/defaults/_services/default-socket-events.service.ts +61 -0
  290. package/src/_modules/defaults/_services/default-user.data-service.ts +98 -0
  291. package/src/_modules/defaults/index.ts +14 -0
  292. package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +1 -1
  293. package/src/_modules/messaging/_collections/msg-global-settings.const.ts +27 -0
  294. package/src/_modules/messaging/_collections/msg.util.ts +83 -0
  295. package/src/_modules/messaging/_enums/msg-event-key.enum.ts +31 -0
  296. package/src/_modules/messaging/_models/msg-global-settings.interface.ts +49 -0
  297. package/src/_modules/messaging/_services/msg-conversation.data-service.ts +146 -0
  298. package/src/_modules/messaging/_services/msg-events.service.ts +267 -0
  299. package/src/_modules/messaging/_services/msg-integration.control-service.ts +179 -0
  300. package/src/_modules/messaging/_services/msg-main.control-service.ts +548 -0
  301. package/src/_modules/messaging/_services/msg-message.data-service.ts +129 -0
  302. package/src/_modules/messaging/get-messaging-routing-module.util.ts +26 -0
  303. package/src/_modules/messaging/index.ts +33 -0
  304. package/src/_modules/messaging/messaging.controller.ts +370 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ //
3
+ // Messaging Module
4
+ //
5
+ // Unified messaging system for user↔user and user↔AI communication
6
+ // Integrates with bot and assistant modules
7
+ // Provides real-time events via sockets
8
+ //
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ const tslib_1 = require("tslib");
11
+ // Re-export FSM models
12
+ tslib_1.__exportStar(require("@futdevpro/fsm-dynamo/messaging"), exports);
13
+ // MODELS
14
+ tslib_1.__exportStar(require("./_models/msg-global-settings.interface"), exports);
15
+ // COLLECTIONS
16
+ tslib_1.__exportStar(require("./_collections/msg.util"), exports);
17
+ tslib_1.__exportStar(require("./_collections/msg-global-settings.const"), exports);
18
+ // ENUMS
19
+ tslib_1.__exportStar(require("./_enums/msg-event-key.enum"), exports);
20
+ // SERVICES
21
+ tslib_1.__exportStar(require("./_services/msg-message.data-service"), exports);
22
+ tslib_1.__exportStar(require("./_services/msg-conversation.data-service"), exports);
23
+ tslib_1.__exportStar(require("./_services/msg-integration.control-service"), exports);
24
+ tslib_1.__exportStar(require("./_services/msg-events.service"), exports);
25
+ tslib_1.__exportStar(require("./_services/msg-main.control-service"), exports);
26
+ // CONTROLLER
27
+ tslib_1.__exportStar(require("./messaging.controller"), exports);
28
+ // ROUTING
29
+ tslib_1.__exportStar(require("./get-messaging-routing-module.util"), exports);
30
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/_modules/messaging/index.ts"],"names":[],"mappings":";AAAA,EAAE;AACF,mBAAmB;AACnB,EAAE;AACF,mEAAmE;AACnE,4CAA4C;AAC5C,wCAAwC;AACxC,EAAE;;;AAEF,uBAAuB;AACvB,0EAAgD;AAEhD,SAAS;AACT,kFAAwD;AAExD,cAAc;AACd,kEAAwC;AACxC,mFAAyD;AAEzD,QAAQ;AACR,sEAA4C;AAE5C,WAAW;AACX,+EAAqD;AACrD,oFAA0D;AAC1D,sFAA4D;AAC5D,yEAA+C;AAC/C,+EAAqD;AAErD,aAAa;AACb,iEAAuC;AAEvC,UAAU;AACV,8EAAoD"}
@@ -0,0 +1,13 @@
1
+ import { DyNTS_Controller } from '../../_services/route/controller.service';
2
+ /**
3
+ * Messaging Controller
4
+ * Handles HTTP endpoints for messaging operations
5
+ */
6
+ export declare class DyNTS_Messaging_Controller extends DyNTS_Controller {
7
+ static getInstance(): DyNTS_Messaging_Controller;
8
+ private authService;
9
+ private eventsService;
10
+ private msgControlService;
11
+ setupEndpoints(): void;
12
+ }
13
+ //# sourceMappingURL=messaging.controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging.controller.d.ts","sourceRoot":"","sources":["../../../src/_modules/messaging/messaging.controller.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAM5E;;;GAGG;AACH,qBAAa,0BAA2B,SAAQ,gBAAgB;IAE9D,MAAM,CAAC,WAAW,IAAI,0BAA0B;IAIhD,OAAO,CAAC,WAAW,CAAoB;IACvC,OAAO,CAAC,aAAa,CAA0C;IAC/D,OAAO,CAAC,iBAAiB,CAA+C;IAExE,cAAc,IAAI,IAAI;CAgVvB"}
@@ -0,0 +1,257 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DyNTS_Messaging_Controller = void 0;
4
+ const fsm_dynamo_1 = require("@futdevpro/fsm-dynamo");
5
+ const messaging_1 = require("@futdevpro/fsm-dynamo/messaging");
6
+ const endpoint_params_control_model_1 = require("../../_models/control-models/endpoint-params.control-model");
7
+ const global_service_1 = require("../../_services/core/global.service");
8
+ const controller_service_1 = require("../../_services/route/controller.service");
9
+ const msg_message_data_service_1 = require("./_services/msg-message.data-service");
10
+ const msg_conversation_data_service_1 = require("./_services/msg-conversation.data-service");
11
+ const msg_events_service_1 = require("./_services/msg-events.service");
12
+ const msg_main_control_service_1 = require("./_services/msg-main.control-service");
13
+ /**
14
+ * Messaging Controller
15
+ * Handles HTTP endpoints for messaging operations
16
+ */
17
+ class DyNTS_Messaging_Controller extends controller_service_1.DyNTS_Controller {
18
+ static getInstance() {
19
+ return DyNTS_Messaging_Controller.getSingletonInstance();
20
+ }
21
+ authService;
22
+ eventsService = msg_events_service_1.DyNTS_Msg_Events_Service.getInstance();
23
+ msgControlService = msg_main_control_service_1.DyNTS_Msg_Main_ControlService.getInstance();
24
+ setupEndpoints() {
25
+ try {
26
+ this.authService = global_service_1.DyNTS_GlobalService.getAuthService();
27
+ }
28
+ catch (error) {
29
+ // Auth service not available - use default auth service
30
+ const { DyNTS_Default_AuthService } = require('../defaults/_services/default-auth.service');
31
+ this.authService = DyNTS_Default_AuthService.getInstance();
32
+ }
33
+ this.endpoints = [
34
+ // Get user's conversations
35
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
36
+ name: 'getConversations',
37
+ type: fsm_dynamo_1.DyFM_HttpCallType.get,
38
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.getConversations,
39
+ tasks: [
40
+ async (req, res, issuer) => {
41
+ const userId = this.authService.getIssuerFromRequest(req);
42
+ const conversationService = new msg_conversation_data_service_1.DyNTS_Msg_Conversation_DataService({
43
+ issuer,
44
+ });
45
+ const conversations = await conversationService.getUserConversations(userId);
46
+ res.send(conversations);
47
+ },
48
+ ],
49
+ }),
50
+ // Get single conversation
51
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
52
+ name: 'getConversation',
53
+ type: fsm_dynamo_1.DyFM_HttpCallType.get,
54
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.getConversation,
55
+ tasks: [
56
+ async (req, res, issuer) => {
57
+ const conversationService = new msg_conversation_data_service_1.DyNTS_Msg_Conversation_DataService({
58
+ issuer,
59
+ });
60
+ await conversationService.getDataById(req.params.conversationId);
61
+ res.send(conversationService.data);
62
+ },
63
+ ],
64
+ }),
65
+ // Create conversation
66
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
67
+ name: 'createConversation',
68
+ type: fsm_dynamo_1.DyFM_HttpCallType.post,
69
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.createConversation,
70
+ tasks: [
71
+ async (req, res, issuer) => {
72
+ const creatorId = this.authService.getIssuerFromRequest(req);
73
+ const conversation = await this.msgControlService.createConversation(req.body, creatorId, issuer);
74
+ res.status(201).send(conversation);
75
+ },
76
+ ],
77
+ }),
78
+ // Get messages for conversation
79
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
80
+ name: 'getMessages',
81
+ type: fsm_dynamo_1.DyFM_HttpCallType.get,
82
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.getMessages,
83
+ tasks: [
84
+ async (req, res, issuer) => {
85
+ const conversationId = req.params.conversationId;
86
+ const limit = req.query.limit ? parseInt(req.query.limit) : undefined;
87
+ const skip = req.query.skip ? parseInt(req.query.skip) : undefined;
88
+ const messageService = new msg_message_data_service_1.DyNTS_Msg_Message_DataService({
89
+ issuer,
90
+ });
91
+ const messages = await messageService.getConversationMessages(conversationId, limit, skip);
92
+ res.send(messages);
93
+ },
94
+ ],
95
+ }),
96
+ // Send message
97
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
98
+ name: 'sendMessage',
99
+ type: fsm_dynamo_1.DyFM_HttpCallType.post,
100
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.sendMessage,
101
+ tasks: [
102
+ async (req, res, issuer) => {
103
+ const conversationId = req.params.conversationId;
104
+ const senderId = this.authService.getIssuerFromRequest(req);
105
+ const message = await this.msgControlService.sendMessage(conversationId, req.body, senderId, issuer);
106
+ res.status(201).send(message);
107
+ },
108
+ ],
109
+ }),
110
+ // Edit message
111
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
112
+ name: 'editMessage',
113
+ type: fsm_dynamo_1.DyFM_HttpCallType.patch,
114
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.editMessage,
115
+ tasks: [
116
+ async (req, res, issuer) => {
117
+ const messageId = req.params.messageId;
118
+ const userId = this.authService.getIssuerFromRequest(req);
119
+ const message = await this.msgControlService.editMessage(messageId, req.body.content, userId, issuer);
120
+ res.send(message);
121
+ },
122
+ ],
123
+ }),
124
+ // Delete message
125
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
126
+ name: 'deleteMessage',
127
+ type: fsm_dynamo_1.DyFM_HttpCallType.delete,
128
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.deleteMessage,
129
+ tasks: [
130
+ async (req, res, issuer) => {
131
+ const messageId = req.params.messageId;
132
+ const userId = this.authService.getIssuerFromRequest(req);
133
+ await this.msgControlService.deleteMessage(messageId, userId, issuer);
134
+ res.send({ success: true });
135
+ },
136
+ ],
137
+ }),
138
+ // Mark messages as read
139
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
140
+ name: 'markAsRead',
141
+ type: fsm_dynamo_1.DyFM_HttpCallType.post,
142
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.markAsRead,
143
+ tasks: [
144
+ async (req, res, issuer) => {
145
+ const userId = this.authService.getIssuerFromRequest(req);
146
+ const messageIds = req.body.messageIds || [];
147
+ const result = await this.msgControlService.markMessagesAsRead(messageIds, userId, issuer);
148
+ res.send(result);
149
+ },
150
+ ],
151
+ }),
152
+ // Add reaction
153
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
154
+ name: 'addReaction',
155
+ type: fsm_dynamo_1.DyFM_HttpCallType.post,
156
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.addReaction,
157
+ tasks: [
158
+ async (req, res, issuer) => {
159
+ const messageId = req.params.messageId;
160
+ const { emoji } = req.body;
161
+ const userId = this.authService.getIssuerFromRequest(req);
162
+ const message = await this.msgControlService.addReaction(messageId, emoji, userId, issuer);
163
+ res.send(message);
164
+ },
165
+ ],
166
+ }),
167
+ // Remove reaction
168
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
169
+ name: 'removeReaction',
170
+ type: fsm_dynamo_1.DyFM_HttpCallType.delete,
171
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.removeReaction,
172
+ tasks: [
173
+ async (req, res, issuer) => {
174
+ const messageId = req.params.messageId;
175
+ const { emoji } = req.params;
176
+ const userId = this.authService.getIssuerFromRequest(req);
177
+ const message = await this.msgControlService.removeReaction(messageId, emoji, userId, issuer);
178
+ res.send(message);
179
+ },
180
+ ],
181
+ }),
182
+ // Update conversation
183
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
184
+ name: 'updateConversation',
185
+ type: fsm_dynamo_1.DyFM_HttpCallType.patch,
186
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.updateConversation,
187
+ tasks: [
188
+ async (req, res, issuer) => {
189
+ const conversationId = req.params.conversationId;
190
+ const userId = this.authService.getIssuerFromRequest(req);
191
+ const conversation = await this.msgControlService.updateConversation(conversationId, req.body, userId, issuer);
192
+ res.send(conversation);
193
+ },
194
+ ],
195
+ }),
196
+ // Delete conversation
197
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
198
+ name: 'deleteConversation',
199
+ type: fsm_dynamo_1.DyFM_HttpCallType.delete,
200
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.deleteConversation,
201
+ tasks: [
202
+ async (req, res, issuer) => {
203
+ const conversationId = req.params.conversationId;
204
+ const userId = this.authService.getIssuerFromRequest(req);
205
+ await this.msgControlService.deleteConversation(conversationId, userId, issuer);
206
+ res.send({ success: true });
207
+ },
208
+ ],
209
+ }),
210
+ // Add participant
211
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
212
+ name: 'addParticipant',
213
+ type: fsm_dynamo_1.DyFM_HttpCallType.post,
214
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.addParticipant,
215
+ tasks: [
216
+ async (req, res, issuer) => {
217
+ const conversationId = req.params.conversationId;
218
+ const { userId: newUserId, role = 'member' } = req.body;
219
+ const requesterId = this.authService.getIssuerFromRequest(req);
220
+ await this.msgControlService.addParticipant(conversationId, newUserId, role, requesterId, issuer);
221
+ res.send({ success: true });
222
+ },
223
+ ],
224
+ }),
225
+ // Remove participant
226
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
227
+ name: 'removeParticipant',
228
+ type: fsm_dynamo_1.DyFM_HttpCallType.delete,
229
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.removeParticipant,
230
+ tasks: [
231
+ async (req, res, issuer) => {
232
+ const conversationId = req.params.conversationId;
233
+ const userIdToRemove = req.params.userId;
234
+ const requesterId = this.authService.getIssuerFromRequest(req);
235
+ await this.msgControlService.removeParticipant(conversationId, userIdToRemove, requesterId, issuer);
236
+ res.send({ success: true });
237
+ },
238
+ ],
239
+ }),
240
+ // Get agent process
241
+ new endpoint_params_control_model_1.DyNTS_Endpoint_Params({
242
+ name: 'getAgentProcess',
243
+ type: fsm_dynamo_1.DyFM_HttpCallType.get,
244
+ endpoint: messaging_1.DyFM_msgModule_settings.endPoints.getAgentProcess,
245
+ tasks: [
246
+ async (req, res, issuer) => {
247
+ const messageId = req.params.messageId;
248
+ const agentProcessSteps = await this.msgControlService.getAgentProcessSteps(messageId, issuer);
249
+ res.send(agentProcessSteps);
250
+ },
251
+ ],
252
+ }),
253
+ ];
254
+ }
255
+ }
256
+ exports.DyNTS_Messaging_Controller = DyNTS_Messaging_Controller;
257
+ //# sourceMappingURL=messaging.controller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"messaging.controller.js","sourceRoot":"","sources":["../../../src/_modules/messaging/messaging.controller.ts"],"names":[],"mappings":";;;AACA,sDAA0D;AAC1D,+DAMyC;AAEzC,8GAAmG;AAEnG,wEAA0E;AAC1E,iFAA4E;AAC5E,mFAAqF;AACrF,6FAA+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AC;SACJ,CAAC;IACJ,CAAC;CACF;AA1VD,gEA0VC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@futdevpro/nts-dynamo",
3
- "version": "01.14.07",
3
+ "version": "01.14.09",
4
4
  "description": "Dynamic NodeTS (NodeJS-Typescript), MongoDB Backend System Framework by Future Development Program Ltd.",
5
5
  "DyBu_settings": {
6
6
  "packageType": "server-package",
@@ -60,13 +60,46 @@
60
60
  "types": "./build/_modules/ai/_modules/open-ai/index.d.ts",
61
61
  "typings": "./build/_modules/ai/_modules/open-ai/index.d.ts"
62
62
  },
63
-
63
+
64
+ "./bot": {
65
+ "default": "./build/_modules/bot/index.js",
66
+ "module": "./build/_modules/bot/index.js",
67
+ "types": "./build/_modules/bot/index.d.ts",
68
+ "typings": "./build/_modules/bot/index.d.ts"
69
+ },
70
+ "./bot/discord-bot": {
71
+ "default": "./build/_modules/bot/_modules/discord-bot/index.js",
72
+ "module": "./build/_modules/bot/_modules/discord-bot/index.js",
73
+ "types": "./build/_modules/bot/_modules/discord-bot/index.d.ts",
74
+ "typings": "./build/_modules/bot/_modules/discord-bot/index.d.ts"
75
+ },
76
+ "./bot/slack-bot": {
77
+ "default": "./build/_modules/bot/_modules/slack-bot/index.js",
78
+ "module": "./build/_modules/bot/_modules/slack-bot/index.js",
79
+ "types": "./build/_modules/bot/_modules/slack-bot/index.d.ts",
80
+ "typings": "./build/_modules/bot/_modules/slack-bot/index.d.ts"
81
+ },
82
+ "./bot/teams-bot": {
83
+ "default": "./build/_modules/bot/_modules/teams-bot/index.js",
84
+ "module": "./build/_modules/bot/_modules/teams-bot/index.js",
85
+ "types": "./build/_modules/bot/_modules/teams-bot/index.d.ts",
86
+ "typings": "./build/_modules/bot/_modules/teams-bot/index.d.ts"
87
+ },
88
+
64
89
  "./custom-data": {
65
90
  "default": "./build/_modules/custom-data/index.js",
66
91
  "module": "./build/_modules/custom-data/index.js",
67
92
  "types": "./build/_modules/custom-data/index.d.ts",
68
93
  "typings": "./build/_modules/custom-data/index.d.ts"
69
94
  },
95
+
96
+ "./defaults": {
97
+ "default": "./build/_modules/defaults/index.js",
98
+ "module": "./build/_modules/defaults/index.js",
99
+ "types": "./build/_modules/defaults/index.d.ts",
100
+ "typings": "./build/_modules/defaults/index.d.ts"
101
+ },
102
+
70
103
  "./discord-assistant": {
71
104
  "default": "./build/_modules/discord-assistant/index.js",
72
105
  "module": "./build/_modules/discord-assistant/index.js",
@@ -85,6 +118,20 @@
85
118
  "types": "./build/_modules/discord-bot/index.d.ts",
86
119
  "typings": "./build/_modules/discord-bot/index.d.ts"
87
120
  },
121
+
122
+ "./messaging": {
123
+ "default": "./build/_modules/messaging/index.js",
124
+ "module": "./build/_modules/messaging/index.js",
125
+ "types": "./build/_modules/messaging/index.d.ts",
126
+ "typings": "./build/_modules/messaging/index.d.ts"
127
+ },
128
+ "./messaging/agent": {
129
+ "default": "./build/_modules/messaging/_modules/agent/index.js",
130
+ "module": "./build/_modules/messaging/_modules/agent/index.js",
131
+ "types": "./build/_modules/messaging/_modules/agent/index.d.ts",
132
+ "typings": "./build/_modules/messaging/_modules/agent/index.d.ts"
133
+ },
134
+
88
135
  "./mock": {
89
136
  "default": "./build/_mock/index.js",
90
137
  "module": "./build/_mock/index.js",
@@ -134,6 +181,19 @@
134
181
  "build/_modules/ai/_modules/open-ai/index.d.ts"
135
182
  ],
136
183
 
184
+ "bot": [
185
+ "build/_modules/bot/index.d.ts"
186
+ ],
187
+ "bot/discord-bot": [
188
+ "build/_modules/bot/_modules/discord-bot/index.d.ts"
189
+ ],
190
+ "bot/slack-bot": [
191
+ "build/_modules/bot/_modules/slack-bot/index.d.ts"
192
+ ],
193
+ "bot/teams-bot": [
194
+ "build/_modules/bot/_modules/teams-bot/index.d.ts"
195
+ ],
196
+
137
197
  "custom-data": [
138
198
  "build/_modules/custom-data/index.d.ts"
139
199
  ],
@@ -146,6 +206,14 @@
146
206
  "discord-bot": [
147
207
  "build/_modules/discord-bot/index.d.ts"
148
208
  ],
209
+
210
+ "messaging": [
211
+ "build/_modules/messaging/index.d.ts"
212
+ ],
213
+ "messaging/agent": [
214
+ "build/_modules/messaging/_modules/agent/index.d.ts"
215
+ ],
216
+
149
217
  "mock": [
150
218
  "build/_modules/mock/index.d.ts"
151
219
  ],
@@ -190,7 +258,7 @@
190
258
  "empty": ""
191
259
  },
192
260
  "peerDependencies": {
193
- "@futdevpro/fsm-dynamo": "1.14.6",
261
+ "@futdevpro/fsm-dynamo": "1.14.8",
194
262
 
195
263
  "@types/express": "4.17.21",
196
264
  "@types/geoip-lite": "~1.4.1",
@@ -55,6 +55,8 @@ export const DyNTS_global_settings: DyNTS_Global_Settings = {
55
55
 
56
56
  dias_settings: null,
57
57
 
58
+ assistant_settings: null,
59
+
58
60
  docChunking: {
59
61
  maxChunkSize: 1000,
60
62
  maxChunkCount: 1000,
@@ -87,10 +87,10 @@ export interface DyNTS_Global_Settings {
87
87
 
88
88
  /**
89
89
  * this setting will set the bot settings
90
- * (this will be set in the {@link DyNTS_DiBo_Main_ControlService} constructor)
90
+ * (this will be set in the {@link DyNTS_Bot_Main_ControlService} constructor)
91
91
  *
92
92
  * {@link DyNTS_GlobalBot_Settings}
93
- * default settings: {@link DyNTS_DiBo_Global_Settings}
93
+ * default settings: {@link DyNTS_Bot_Global_Settings}
94
94
  */
95
95
  bot_settings: any;
96
96
 
@@ -113,6 +113,15 @@ export interface DyNTS_Global_Settings {
113
113
  */
114
114
  dias_settings: any;
115
115
 
116
+ /**
117
+ * this setting will set the assistant settings
118
+ * (this will be set in the {@link DyNTS_Ass_ServiceBase} constructor)
119
+ *
120
+ * {@link DyNTS_Ass_Global_Settings}
121
+ * default settings: {@link DyNTS_Ass_global_settings}
122
+ */
123
+ assistant_settings?: any;
124
+
116
125
  /**
117
126
  * this setting will set the doc chunking settings
118
127
  */
@@ -120,4 +129,13 @@ export interface DyNTS_Global_Settings {
120
129
  maxChunkSize: number;
121
130
  maxChunkCount: number;
122
131
  };
132
+
133
+ /**
134
+ * this setting will set the messaging settings
135
+ * (this will be set in the {@link DyNTS_Msg_Main_ControlService} constructor)
136
+ *
137
+ * {@link DyNTS_Msg_Global_Settings}
138
+ * default settings: {@link DyNTS_Msg_global_settings}
139
+ */
140
+ messaging_settings?: any;
123
141
  }
@@ -139,7 +139,6 @@ export const DyNTS_DAI_docChunk_dataParams: DyFM_DataModel_Params<DyNTS_DAI_DocC
139
139
  // Generic embedding configuration - will be set by provider
140
140
  vectorizedFrom: [ 'path', 'chunkContent' ],
141
141
  vectorizeUseIndex: 'chunkParentedContentVectorized',
142
- vectorizeAlways: true,
143
142
  },
144
143
  }
145
144
  });
@@ -68,10 +68,21 @@ export class DyNTS_OAI_DocChunkDataService<
68
68
  const oldChunk = oldChunks[i];
69
69
  if (oldChunk) {
70
70
  newChunk._id = oldChunk._id;
71
- const savedChunk: T_Chunk = await this.saveData(newChunk, true);
72
- const chunkCompareResult: DyNTS_DAI_DocChunkCompareResult<T_Chunk> = await this.compareChunk(savedChunk, oldChunk);
73
- chunkCompareResults.push(chunkCompareResult);
71
+ // Compare first to determine if we need to save
72
+ const chunkCompareResult: DyNTS_DAI_DocChunkCompareResult<T_Chunk> = await this.compareChunk(newChunk, oldChunk);
73
+
74
+ if (chunkCompareResult.result === DyNTS_DAI_CompareResult_Type.equal) {
75
+ // No changes detected, reuse existing chunk without saving
76
+ chunkCompareResult.newChunk = oldChunk;
77
+ chunkCompareResults.push(chunkCompareResult);
78
+ } else {
79
+ // Changes detected, save the updated chunk
80
+ const savedChunk: T_Chunk = await this.saveData(newChunk, true);
81
+ chunkCompareResult.newChunk = savedChunk;
82
+ chunkCompareResults.push(chunkCompareResult);
83
+ }
74
84
  } else {
85
+ // New chunk, save it
75
86
  const savedChunk: T_Chunk = await this.saveData(newChunk, true);
76
87
  chunkCompareResults.push({
77
88
  result: DyNTS_DAI_CompareResult_Type.new,
@@ -146,31 +157,20 @@ export class DyNTS_OAI_DocChunkDataService<
146
157
  DyFM_Log.info(`🔍 Comparing ${this.dataParams.dataName} chunk: ${newChunk.chunkIndex}`);
147
158
  }
148
159
 
149
- /* oldChunk ??= await this.findData({
150
- path: newChunk.path,
151
- chunkIndex: newChunk.chunkIndex,
152
- } as DyFM_DBFilterSimple<T_Chunk>); */
153
-
154
- /* DyFM_Log.H_info(`✅ Comparing ${this.dataParams.dataName} chunk: ${newChunk.chunkIndex}`, {
155
- newChunk: newChunk,
156
- oldChunk: oldChunk,
157
- new: !oldChunk,
158
- equal: oldChunk?.chunkParentedContent === newChunk.chunkParentedContent,
159
- modified: oldChunk && oldChunk.chunkParentedContent !== newChunk.chunkParentedContent,
160
- }); */
161
-
162
- /* if (!oldChunk) {
163
- // itt kéne vektor search-el utána keresni,
164
- // hogy a page link-je megtalálható-e (avagy csak átnevezésre került-e)
165
- // hogy az adott tartalom, nem-e csak átnevezésre, szétbontásra vagy összevonásra került-e
166
- return {
167
- result: DyNTS_DAI_CompareResult_Type.new,
168
- newChunk: newChunk,
169
- oldChunk: null,
170
- };
171
- } */
160
+ // Compare all relevant fields for comprehensive change detection
161
+ const contentEqual = oldChunk.chunkContent === newChunk.chunkContent;
162
+ const pathEqual = oldChunk.path === newChunk.path;
163
+ const documentNameEqual = oldChunk.documentName === newChunk.documentName;
164
+ const pageNameEqual = oldChunk.pageName === newChunk.pageName;
165
+ const pageLinkEqual = oldChunk.pageLink === newChunk.pageLink;
166
+
167
+ // Compare allFlaggedParents arrays
168
+ const allFlaggedParentsEqual = this.compareStringArrays(
169
+ oldChunk.allFlaggedParents || [],
170
+ newChunk.allFlaggedParents || []
171
+ );
172
172
 
173
- if (oldChunk.chunkContent === newChunk.chunkContent) {
173
+ if (contentEqual && pathEqual && documentNameEqual && pageNameEqual && pageLinkEqual && allFlaggedParentsEqual) {
174
174
  return {
175
175
  result: DyNTS_DAI_CompareResult_Type.equal,
176
176
  newChunk: newChunk,
@@ -190,6 +190,13 @@ export class DyNTS_OAI_DocChunkDataService<
190
190
  });
191
191
  }
192
192
  }
193
+
194
+ private compareStringArrays(arr1: string[], arr2: string[]): boolean {
195
+ if (arr1.length !== arr2.length) {
196
+ return false;
197
+ }
198
+ return arr1.every((item, index) => item === arr2[index]);
199
+ }
193
200
 
194
201
  async chunkPage(page: T_Page): Promise<T_Chunk[]> {
195
202
  try {