@futdevpro/nts-dynamo 1.10.77 → 1.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/_collections/atlas-default-db-options.const.d.ts +28 -0
- package/build/_collections/atlas-default-db-options.const.d.ts.map +1 -0
- package/build/_collections/atlas-default-db-options.const.js +10 -0
- package/build/_collections/atlas-default-db-options.const.js.map +1 -0
- package/build/_collections/get-environment-settings.util.d.ts +3 -0
- package/build/_collections/get-environment-settings.util.d.ts.map +1 -0
- package/build/_collections/get-environment-settings.util.js +45 -0
- package/build/_collections/get-environment-settings.util.js.map +1 -0
- package/build/_collections/global-settings.const.d.ts.map +1 -1
- package/build/_collections/global-settings.const.js +9 -4
- package/build/_collections/global-settings.const.js.map +1 -1
- package/build/_models/control-models/app-params.control-model.d.ts +6 -0
- package/build/_models/control-models/app-params.control-model.d.ts.map +1 -1
- package/build/_models/control-models/app-params.control-model.js +29 -2
- package/build/_models/control-models/app-params.control-model.js.map +1 -1
- package/build/_models/control-models/app-params.control-model.spec.js +5 -4
- package/build/_models/control-models/app-params.control-model.spec.js.map +1 -1
- package/build/_models/control-models/endpoint-params.control-model.js +1 -1
- package/build/_models/control-models/endpoint-params.control-model.js.map +1 -1
- package/build/_models/interfaces/environment-settings.interface.d.ts +35 -0
- package/build/_models/interfaces/environment-settings.interface.d.ts.map +1 -0
- package/build/_models/interfaces/environment-settings.interface.js +3 -0
- package/build/_models/interfaces/environment-settings.interface.js.map +1 -0
- package/build/_models/interfaces/global-settings.interface.d.ts +34 -2
- package/build/_models/interfaces/global-settings.interface.d.ts.map +1 -1
- package/build/_modules/custom-data/index.d.ts.map +1 -1
- package/build/_modules/custom-data/index.js +1 -0
- package/build/_modules/custom-data/index.js.map +1 -1
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts +3 -0
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js +17 -0
- package/build/_modules/discord-assistant/_collections/dias-global-settings.const.js.map +1 -0
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts +18 -0
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js +3 -0
- package/build/_modules/discord-assistant/_models/dias-global-settings.interface.js.map +1 -0
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts +10 -0
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js +41 -0
- package/build/_modules/discord-assistant/_models/dias-knowledge.data-model.js.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts +14 -0
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js +88 -0
- package/build/_modules/discord-assistant/_services/dias-chunk.data-service.js.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts +10 -0
- package/build/_modules/discord-assistant/_services/dias-io.control-service.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-io.control-service.js +39 -0
- package/build/_modules/discord-assistant/_services/dias-io.control-service.js.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts +8 -0
- package/build/_modules/discord-assistant/_services/dias-main.control-service.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_services/dias-main.control-service.js +23 -0
- package/build/_modules/discord-assistant/_services/dias-main.control-service.js.map +1 -0
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts +13 -0
- package/build/_modules/discord-assistant/_services/dias.service-base.d.ts.map +1 -0
- package/build/_modules/discord-assistant/_services/dias.service-base.js +61 -0
- package/build/_modules/discord-assistant/_services/dias.service-base.js.map +1 -0
- package/build/_modules/discord-assistant/index.d.ts +10 -0
- package/build/_modules/discord-assistant/index.d.ts.map +1 -0
- package/build/_modules/discord-assistant/index.js +23 -0
- package/build/_modules/discord-assistant/index.js.map +1 -0
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts +4 -0
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.d.ts.map +1 -0
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js +8 -0
- package/build/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.js.map +1 -0
- package/build/_modules/discord-assistant-voiced/index.d.ts +3 -0
- package/build/_modules/discord-assistant-voiced/index.d.ts.map +1 -0
- package/build/_modules/discord-assistant-voiced/index.js +26 -0
- package/build/_modules/discord-assistant-voiced/index.js.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts +3 -0
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.d.ts.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js +13 -0
- package/build/_modules/discord-bot/_collections/dibo-default-commands.const.js.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts +3 -0
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.d.ts.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js +44 -0
- package/build/_modules/discord-bot/_collections/dibo-global-settings.conts.js.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts +22 -0
- package/build/_modules/discord-bot/_collections/dibo-operations.util.d.ts.map +1 -0
- package/build/_modules/discord-bot/_collections/dibo-operations.util.js +261 -0
- package/build/_modules/discord-bot/_collections/dibo-operations.util.js.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts +8 -0
- package/build/_modules/discord-bot/_models/dibo-command.interface.d.ts.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-command.interface.js +3 -0
- package/build/_modules/discord-bot/_models/dibo-command.interface.js.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts +7 -0
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.d.ts.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js +3 -0
- package/build/_modules/discord-bot/_models/dibo-last-mention-date.inteface.js.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts +6 -0
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.d.ts.map +1 -0
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js +3 -0
- package/build/_modules/discord-bot/_models/dibo-last-message-date.interface.js.map +1 -0
- package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.d.ts +88 -0
- package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.d.ts.map +1 -0
- package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.js +3 -0
- package/build/_modules/discord-bot/_models/global-bot-log-settings.interface.js.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts +12 -0
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.d.ts.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.js +72 -0
- package/build/_modules/discord-bot/_services/dibo-commands.control-service.js.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts +19 -0
- package/build/_modules/discord-bot/_services/dibo-io.control-service.d.ts.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-io.control-service.js +176 -0
- package/build/_modules/discord-bot/_services/dibo-io.control-service.js.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts +85 -0
- package/build/_modules/discord-bot/_services/dibo-main.control-service.d.ts.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js +228 -0
- package/build/_modules/discord-bot/_services/dibo-main.control-service.js.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts +13 -0
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.d.ts.map +1 -0
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.js +38 -0
- package/build/_modules/discord-bot/_services/dibo-routines.control-service.js.map +1 -0
- package/build/_modules/discord-bot/index.d.ts +12 -0
- package/build/_modules/discord-bot/index.d.ts.map +1 -0
- package/build/_modules/discord-bot/index.js +30 -0
- package/build/_modules/discord-bot/index.js.map +1 -0
- package/build/_modules/oauth2/index.d.ts.map +1 -1
- package/build/_modules/oauth2/index.js +7 -0
- package/build/_modules/oauth2/index.js.map +1 -1
- package/build/_modules/open-ai/_collections/oai-chunking.util.d.ts +74 -0
- package/build/_modules/open-ai/_collections/oai-chunking.util.d.ts.map +1 -0
- package/build/_modules/open-ai/_collections/oai-chunking.util.js +385 -0
- package/build/_modules/open-ai/_collections/oai-chunking.util.js.map +1 -0
- package/build/_modules/open-ai/_collections/oai-document.util.d.ts +4 -0
- package/build/_modules/open-ai/_collections/oai-document.util.d.ts.map +1 -0
- package/build/_modules/open-ai/_collections/oai-document.util.js +12 -0
- package/build/_modules/open-ai/_collections/oai-document.util.js.map +1 -0
- package/build/_modules/open-ai/_collections/oai-global-settings.const.d.ts +3 -0
- package/build/_modules/open-ai/_collections/oai-global-settings.const.d.ts.map +1 -0
- package/build/_modules/open-ai/_collections/oai-global-settings.const.js +9 -0
- package/build/_modules/open-ai/_collections/oai-global-settings.const.js.map +1 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts +3 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.d.ts.map +1 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js +75 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.js.map +1 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts +3 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.d.ts.map +1 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js +68 -0
- package/build/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.js.map +1 -0
- package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts +6 -0
- package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.d.ts.map +1 -0
- package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js +10 -0
- package/build/_modules/open-ai/_enums/oai-compare-result-type.enum.js.map +1 -0
- package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts +18 -0
- package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.d.ts.map +1 -0
- package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.js +40 -0
- package/build/_modules/open-ai/_enums/oai-gpt-message-role.enum.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts +7 -0
- package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts +14 -0
- package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-document-page.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts +6 -0
- package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-global-settings.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts +6 -0
- package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts +52 -0
- package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts +13 -0
- package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js +3 -0
- package/build/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.js.map +1 -0
- package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.d.ts +18 -0
- package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.d.ts.map +1 -0
- package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js +80 -0
- package/build/_modules/open-ai/_models/oai-doc-chunk.data-model.js.map +1 -0
- package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts +13 -0
- package/build/_modules/open-ai/_services/oai-chunk.service-base.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/oai-chunk.service-base.js +170 -0
- package/build/_modules/open-ai/_services/oai-chunk.service-base.js.map +1 -0
- package/build/_modules/open-ai/_services/{embedding.control-service.d.ts → oai-embedding.control-service.d.ts} +3 -3
- package/build/_modules/open-ai/_services/oai-embedding.control-service.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/{embedding.control-service.js → oai-embedding.control-service.js} +5 -5
- package/build/_modules/open-ai/_services/oai-embedding.control-service.js.map +1 -0
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts +161 -0
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js +332 -0
- package/build/_modules/open-ai/_services/oai-llm-chat.service-base.js.map +1 -0
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts +231 -0
- package/build/_modules/open-ai/_services/oai-llm.service-base.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/oai-llm.service-base.js +438 -0
- package/build/_modules/open-ai/_services/oai-llm.service-base.js.map +1 -0
- package/build/_modules/open-ai/_services/{vector-data.service.d.ts → oai-vector-data.service.d.ts} +4 -4
- package/build/_modules/open-ai/_services/oai-vector-data.service.d.ts.map +1 -0
- package/build/_modules/open-ai/_services/{vector-data.service.js → oai-vector-data.service.js} +27 -7
- package/build/_modules/open-ai/_services/oai-vector-data.service.js.map +1 -0
- package/build/_modules/open-ai/index.d.ts +18 -4
- package/build/_modules/open-ai/index.d.ts.map +1 -1
- package/build/_modules/open-ai/index.js +35 -4
- package/build/_modules/open-ai/index.js.map +1 -1
- package/build/_modules/server/index.d.ts +1 -1
- package/build/_modules/server/index.d.ts.map +1 -1
- package/build/_modules/server/index.js +16 -2
- package/build/_modules/server/index.js.map +1 -1
- package/build/_modules/server/server-status/server-status.controller.d.ts.map +1 -1
- package/build/_modules/server/server-status/server-status.controller.js +10 -0
- package/build/_modules/server/server-status/server-status.controller.js.map +1 -1
- package/build/_modules/socket/index.d.ts.map +1 -1
- package/build/_modules/socket/index.js +18 -0
- package/build/_modules/socket/index.js.map +1 -1
- package/build/_modules/test/index.d.ts.map +1 -1
- package/build/_modules/test/index.js +5 -0
- package/build/_modules/test/index.js.map +1 -1
- package/build/_modules/usage/index.d.ts.map +1 -1
- package/build/_modules/usage/index.js +5 -0
- package/build/_modules/usage/index.js.map +1 -1
- package/build/_services/server/app.server.js +1 -2
- package/build/_services/server/app.server.js.map +1 -1
- package/build/index.d.ts +3 -1
- package/build/index.d.ts.map +1 -1
- package/build/index.js +26 -1
- package/build/index.js.map +1 -1
- package/package.json +40 -10
- package/src/_collections/atlas-default-db-options.const.ts +10 -0
- package/src/_collections/get-environment-settings.util.ts +49 -0
- package/src/_collections/global-settings.const.ts +15 -4
- package/src/_collections/sample.env +21 -0
- package/src/_models/control-models/app-params.control-model.spec.ts +5 -4
- package/src/_models/control-models/app-params.control-model.ts +31 -2
- package/src/_models/control-models/endpoint-params.control-model.ts +1 -1
- package/src/_models/interfaces/environment-settings.interface.ts +59 -0
- package/src/_models/interfaces/global-settings.interface.ts +41 -1
- package/src/_modules/custom-data/index.ts +3 -0
- package/src/_modules/discord-assistant/_collections/dias-global-settings.const.ts +19 -0
- package/src/_modules/discord-assistant/_models/dias-global-settings.interface.ts +20 -0
- package/src/_modules/discord-assistant/_models/dias-knowledge.data-model.ts +46 -0
- package/src/_modules/discord-assistant/_services/dias-chunk.data-service.ts +152 -0
- package/src/_modules/discord-assistant/_services/dias-io.control-service.ts +59 -0
- package/src/_modules/discord-assistant/_services/dias-main.control-service.ts +28 -0
- package/src/_modules/discord-assistant/_services/dias.service-base.ts +81 -0
- package/src/_modules/discord-assistant/index.ts +36 -0
- package/src/_modules/discord-assistant-voiced/_services/dias-discord-bot.control-service.ts +11 -0
- package/src/_modules/discord-assistant-voiced/index.ts +36 -0
- package/src/_modules/discord-bot/_collections/dibo-default-commands.const.ts +17 -0
- package/src/_modules/discord-bot/_collections/dibo-global-settings.conts.ts +56 -0
- package/src/_modules/discord-bot/_collections/dibo-operations.util.ts +372 -0
- package/src/_modules/discord-bot/_models/dibo-command.interface.ts +12 -0
- package/src/_modules/discord-bot/_models/dibo-last-mention-date.inteface.ts +8 -0
- package/src/_modules/discord-bot/_models/dibo-last-message-date.interface.ts +6 -0
- package/src/_modules/discord-bot/_models/global-bot-log-settings.interface.ts +98 -0
- package/src/_modules/discord-bot/_services/dibo-commands.control-service.ts +120 -0
- package/src/_modules/discord-bot/_services/dibo-io.control-service.ts +245 -0
- package/src/_modules/discord-bot/_services/dibo-main.control-service.ts +304 -0
- package/src/_modules/discord-bot/_services/dibo-routines.control-service.ts +60 -0
- package/src/_modules/discord-bot/index.ts +36 -0
- package/src/_modules/oauth2/index.ts +8 -0
- package/src/_modules/open-ai/_collections/oai-chunking.util.ts +496 -0
- package/src/_modules/open-ai/_collections/oai-document.util.ts +10 -0
- package/src/_modules/open-ai/_collections/oai-global-settings.const.ts +9 -0
- package/src/_modules/open-ai/_collections/oai-llm-predefined-requests-hu.conts.ts +83 -0
- package/src/_modules/open-ai/_collections/oai-llm-predefined-requests.conts.ts +76 -0
- package/src/_modules/open-ai/_enums/oai-compare-result-type.enum.ts +7 -0
- package/src/_modules/open-ai/_enums/oai-gpt-message-role.enum.ts +45 -0
- package/src/_modules/open-ai/_models/interfaces/oai-chunk-compare-result.interface.ts +10 -0
- package/src/_modules/open-ai/_models/interfaces/oai-document-page.interface.ts +20 -0
- package/src/_modules/open-ai/_models/interfaces/oai-global-settings.interface.ts +8 -0
- package/src/_modules/open-ai/_models/interfaces/oai-gpt-message.interface.ts +7 -0
- package/src/_modules/open-ai/_models/interfaces/oai-llm-predefined-requests.interface.ts +57 -0
- package/src/_modules/open-ai/_models/interfaces/oai-page-compare-result.interface.ts +18 -0
- package/src/_modules/open-ai/_models/oai-doc-chunk.data-model.ts +92 -0
- package/src/_modules/open-ai/_services/oai-chunk.service-base.ts +214 -0
- package/src/_modules/open-ai/_services/{embedding.control-service.ts → oai-embedding.control-service.ts} +2 -2
- package/src/_modules/open-ai/_services/oai-llm-chat.service-base.ts +609 -0
- package/src/_modules/open-ai/_services/oai-llm.service-base.ts +648 -0
- package/src/_modules/open-ai/_services/{vector-data.service.ts → oai-vector-data.service.ts} +32 -5
- package/src/_modules/open-ai/index.ts +42 -4
- package/src/_modules/server/index.ts +18 -2
- package/src/_modules/server/server-status/server-status.controller.ts +13 -0
- package/src/_modules/socket/index.ts +23 -0
- package/src/_modules/test/index.ts +8 -0
- package/src/_modules/usage/index.ts +8 -0
- package/src/_services/server/app.server.ts +1 -1
- package/src/index.ts +28 -1
- package/build/_modules/open-ai/_services/embedding.control-service.d.ts.map +0 -1
- package/build/_modules/open-ai/_services/embedding.control-service.js.map +0 -1
- package/build/_modules/open-ai/_services/gpt.service-base.d.ts +0 -98
- package/build/_modules/open-ai/_services/gpt.service-base.d.ts.map +0 -1
- package/build/_modules/open-ai/_services/gpt.service-base.js +0 -284
- package/build/_modules/open-ai/_services/gpt.service-base.js.map +0 -1
- package/build/_modules/open-ai/_services/open-ai.service-base.d.ts +0 -21
- package/build/_modules/open-ai/_services/open-ai.service-base.d.ts.map +0 -1
- package/build/_modules/open-ai/_services/open-ai.service-base.js +0 -50
- package/build/_modules/open-ai/_services/open-ai.service-base.js.map +0 -1
- package/build/_modules/open-ai/_services/vector-data.service.d.ts.map +0 -1
- package/build/_modules/open-ai/_services/vector-data.service.js.map +0 -1
- package/build/_services/server/env-set.d.ts +0 -2
- package/build/_services/server/env-set.d.ts.map +0 -1
- package/build/_services/server/env-set.js +0 -20
- package/build/_services/server/env-set.js.map +0 -1
- package/src/_modules/open-ai/_services/gpt.service-base.ts +0 -438
- package/src/_modules/open-ai/_services/open-ai.service-base.ts +0 -69
- package/src/_services/server/env-set.ts +0 -21
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import { Client, GatewayIntentBits, Guild, Collection, GuildMember, Message, Partials, Role, TextChannel } from 'discord.js'
|
|
2
|
+
import * as dotenv from 'dotenv'
|
|
3
|
+
import { DyNTS_SingletonService } from '../../../_services/base/singleton.service';
|
|
4
|
+
import { DyFM_delay, DyFM_Error, DyFM_Log } from '@futdevpro/fsm-dynamo';
|
|
5
|
+
import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
|
|
6
|
+
import { DyNTS_DiBo_Routines_ControlService } from './dibo-routines.control-service';
|
|
7
|
+
import { DyNTS_DiBo_IO_ControlService } from './dibo-io.control-service';
|
|
8
|
+
import { DyNTS_DiBo_global_settings } from '../_collections/dibo-global-settings.conts';
|
|
9
|
+
import { DyNTS_GlobalService } from '../../../_services/core/global.service';
|
|
10
|
+
import { DyNTS_DiBo_Operations_Util } from '../_collections/dibo-operations.util';
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This is the main control service for the Discord Bot.
|
|
15
|
+
*
|
|
16
|
+
*
|
|
17
|
+
* Setup:
|
|
18
|
+
* 1. creating the Bot
|
|
19
|
+
* - go to: https://discord.com/developers/applications
|
|
20
|
+
* - click: "New Application"
|
|
21
|
+
* - give a name → Create
|
|
22
|
+
*
|
|
23
|
+
* 2. adding the Bot to the app
|
|
24
|
+
* - on the left: "Bot" → "Add Bot" → Yes, do it
|
|
25
|
+
*
|
|
26
|
+
* 3. getting the token
|
|
27
|
+
* - on the same page: "Reset Token" → Copy
|
|
28
|
+
* - put the token in the .env file: DISCORD_TOKEN=...
|
|
29
|
+
*
|
|
30
|
+
* 4. Bot ID (Client ID) and Invite link
|
|
31
|
+
* - on the left: "OAuth2" > "URL Generator"
|
|
32
|
+
* - Scopes: tick the bot
|
|
33
|
+
* - Bot Permissions: pl. Send Messages, Read Message History
|
|
34
|
+
* - at the bottom: generate Invite URL → open it → add it to a server
|
|
35
|
+
* - the Client ID is on the same page, the "Application ID" on the "OAuth2 > General" or "Application" tab.
|
|
36
|
+
* - it only works if you are admin on that server or have "Manage Server" permissions.
|
|
37
|
+
*
|
|
38
|
+
* 5. Permissions
|
|
39
|
+
* - on the left: "Bot" tab
|
|
40
|
+
* - enable these:
|
|
41
|
+
* - MESSAGE CONTENT INTENT
|
|
42
|
+
* - PRESENCE INTENT (if you use it)
|
|
43
|
+
* - SERVER MEMBERS INTENT (if you need guild user info)
|
|
44
|
+
* - Save
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export abstract class DyNTS_DiBo_Main_ControlService extends DyNTS_SingletonService {
|
|
48
|
+
|
|
49
|
+
/* static getInstance(): DyNTS_DiBo_Main_ControlService {
|
|
50
|
+
return DyNTS_DiBo_Main_ControlService.getSingletonInstance();
|
|
51
|
+
} */
|
|
52
|
+
|
|
53
|
+
readonly client: Client;
|
|
54
|
+
|
|
55
|
+
private _discordServer: Guild;
|
|
56
|
+
get discordServer(): Guild {
|
|
57
|
+
return this._discordServer;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
get botClientId(): string {
|
|
61
|
+
return this.client.user?.id ?? DyNTS_global_settings.env_settings.discord.clientId;
|
|
62
|
+
}
|
|
63
|
+
get botDisplayName(): string {
|
|
64
|
+
return this.client.user?.displayName;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
protected botIO_CS: DyNTS_DiBo_IO_ControlService;
|
|
68
|
+
protected abstract getBotIOControlService(): DyNTS_DiBo_IO_ControlService;
|
|
69
|
+
|
|
70
|
+
protected routines_CS: DyNTS_DiBo_Routines_ControlService;
|
|
71
|
+
protected abstract getRoutinesControlService(): DyNTS_DiBo_Routines_ControlService;
|
|
72
|
+
|
|
73
|
+
private _channelsByNames: {
|
|
74
|
+
[key: string]: TextChannel;
|
|
75
|
+
} = {};
|
|
76
|
+
|
|
77
|
+
private _rolesByNames: {
|
|
78
|
+
[key: string]: Role;
|
|
79
|
+
} = {};
|
|
80
|
+
|
|
81
|
+
protected debugLog = false;
|
|
82
|
+
|
|
83
|
+
protected constructor() {
|
|
84
|
+
super();
|
|
85
|
+
|
|
86
|
+
DyNTS_global_settings.bot_settings = DyNTS_DiBo_global_settings;
|
|
87
|
+
|
|
88
|
+
if (this.client) {
|
|
89
|
+
throw new DyFM_Error({
|
|
90
|
+
...this.getDefaultErrorSettings(
|
|
91
|
+
'start',
|
|
92
|
+
new Error('Discord client already initialized'),
|
|
93
|
+
'system-init'
|
|
94
|
+
),
|
|
95
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DiBo-MCS-C000`,
|
|
96
|
+
})
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
this.client = new Client({
|
|
100
|
+
intents: DyNTS_global_settings.bot_settings.intents,
|
|
101
|
+
partials: DyNTS_global_settings.bot_settings.partials,
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
this.setup('system-init');
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async setup(issuer: string): Promise<void> {
|
|
108
|
+
try {
|
|
109
|
+
await DyFM_delay(100);
|
|
110
|
+
|
|
111
|
+
if (!DyNTS_global_settings.env_settings.discord.guildId) {
|
|
112
|
+
throw new Error(
|
|
113
|
+
`No discord server id found!` +
|
|
114
|
+
`\nPlease set the DISCORD_GUILD_ID in the .env file, ` +
|
|
115
|
+
`or directly in the DyNTS_global_settings.env_settings.discord.guildId` +
|
|
116
|
+
`\nYou also will need to set the DISCORD_TOKEN, DISCORD_CLIENT_ID and DISCORD_OAUTH2_URL.`
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
if (!DyNTS_global_settings.env_settings.discord.token) {
|
|
121
|
+
throw new Error(
|
|
122
|
+
`No discord token found!` +
|
|
123
|
+
`\nPlease set the DISCORD_TOKEN in the .env file, ` +
|
|
124
|
+
`or directly in the DyNTS_global_settings.env_settings.discord.token` +
|
|
125
|
+
`\nYou also will need to set the DISCORD_GUILD_ID, DISCORD_CLIENT_ID and DISCORD_OAUTH2_URL.`
|
|
126
|
+
);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
if (!DyNTS_global_settings.env_settings.discord.clientId) {
|
|
130
|
+
throw new Error(
|
|
131
|
+
`No discord client id found!` +
|
|
132
|
+
`\nPlease set the DISCORD_CLIENT_ID in the .env file, ` +
|
|
133
|
+
`or directly in the DyNTS_global_settings.env_settings.discord.clientId` +
|
|
134
|
+
`\nYou also will need to set the DISCORD_GUILD_ID, DISCORD_TOKEN and DISCORD_OAUTH2_URL.`
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (!DyNTS_global_settings.env_settings.discord.oauth2Url) {
|
|
139
|
+
throw new Error(
|
|
140
|
+
`No discord oauth2 url found!` +
|
|
141
|
+
`\nPlease set the DISCORD_OAUTH2_URL in the .env file, ` +
|
|
142
|
+
`or directly in the DyNTS_global_settings.env_settings.discord.oauth2Url` +
|
|
143
|
+
`\nYou also will need to set the DISCORD_GUILD_ID, DISCORD_TOKEN and DISCORD_CLIENT_ID.`
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
DyNTS_DiBo_global_settings.channelSettings.defaultChannels.forEach(
|
|
148
|
+
channelName => {
|
|
149
|
+
if (!DyNTS_DiBo_global_settings.channelSettings.allowedChannels.includes(channelName)) {
|
|
150
|
+
DyNTS_DiBo_global_settings.channelSettings.allowedChannels.push(channelName);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
if (!DyNTS_DiBo_global_settings.channelSettings.allowedChannels.includes(
|
|
155
|
+
DyNTS_DiBo_global_settings.channelSettings.reportChannelName
|
|
156
|
+
)) {
|
|
157
|
+
DyNTS_DiBo_global_settings.channelSettings.allowedChannels.push(
|
|
158
|
+
DyNTS_DiBo_global_settings.channelSettings.reportChannelName
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return new Promise((resolve, reject) => {
|
|
163
|
+
this.client.on('error', (error) => {
|
|
164
|
+
if (DyNTS_DiBo_global_settings.debugLevel >= 1) {
|
|
165
|
+
DyFM_Log.error('Discord client error:', error);
|
|
166
|
+
}
|
|
167
|
+
DyNTS_GlobalService.globalErrorHandler(error);
|
|
168
|
+
reject(error);
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
this.client.on('ready', async () => {
|
|
172
|
+
if (DyNTS_DiBo_global_settings.debugLevel >= 1) {
|
|
173
|
+
DyFM_Log.success(`Logged in as ${this.client.user?.tag}`)
|
|
174
|
+
}
|
|
175
|
+
// szerver azonosító
|
|
176
|
+
this._discordServer = this.client.guilds.cache.get(
|
|
177
|
+
DyNTS_global_settings.env_settings.discord.guildId
|
|
178
|
+
)
|
|
179
|
+
|
|
180
|
+
if (!this._discordServer) {
|
|
181
|
+
throw new Error(`No discord server found`);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
await this.start(issuer);
|
|
185
|
+
|
|
186
|
+
//await Operations.reportIn(this._discordServer, this.client)
|
|
187
|
+
|
|
188
|
+
resolve();
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
this.client.on('messageCreate', (message: Message) => {
|
|
192
|
+
try {
|
|
193
|
+
this.botIO_CS.handleNewMessage(message, message?.author?.id ?? 'unknown')
|
|
194
|
+
} catch (error) {
|
|
195
|
+
DyFM_Log.error('Error handling new message:', error);
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
process.on('exit', () => {
|
|
200
|
+
try {
|
|
201
|
+
DyFM_Log.warn('Bot is shutting down...')
|
|
202
|
+
DyNTS_DiBo_Operations_Util.sendMessageToChannelByName(
|
|
203
|
+
this._discordServer,
|
|
204
|
+
DyNTS_DiBo_global_settings.channelSettings.reportChannelName,
|
|
205
|
+
`Bot is shutting down...`
|
|
206
|
+
)
|
|
207
|
+
} catch (error) {
|
|
208
|
+
DyFM_Log.error('Error sending message to report channel:', error);
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
this.client.login(DyNTS_global_settings.env_settings.discord.token).catch((error) => {
|
|
213
|
+
reject(error);
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
} catch (error) {
|
|
217
|
+
if (this.discordServer) {
|
|
218
|
+
try {
|
|
219
|
+
DyNTS_DiBo_Operations_Util.sendMessageToChannelByName(
|
|
220
|
+
this.discordServer,
|
|
221
|
+
DyNTS_DiBo_global_settings.channelSettings.reportChannelName,
|
|
222
|
+
`#Error during bot startup:\n` +
|
|
223
|
+
((error as DyFM_Error)._message ?? error.message ?? error)
|
|
224
|
+
)
|
|
225
|
+
} catch {}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
throw new DyFM_Error({
|
|
229
|
+
...this.getDefaultErrorSettings('start', error, issuer),
|
|
230
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DiBo-MCS-SE0`,
|
|
231
|
+
})
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
async start(issuer: string): Promise<void> {
|
|
236
|
+
try {
|
|
237
|
+
this.botIO_CS = this.getBotIOControlService();
|
|
238
|
+
this.routines_CS = this.getRoutinesControlService();
|
|
239
|
+
|
|
240
|
+
await this.routines_CS.start(issuer);
|
|
241
|
+
|
|
242
|
+
} catch (error) {
|
|
243
|
+
throw new DyFM_Error({
|
|
244
|
+
...this.getDefaultErrorSettings('start', error, issuer),
|
|
245
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DiBo-MCS-ST0`,
|
|
246
|
+
})
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
async getRolePingByName(roleName: string): Promise<string> {
|
|
251
|
+
const role: Role = this.getRoleByName(roleName);
|
|
252
|
+
|
|
253
|
+
return role ? `<@&${role.id}>` : '';
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
async getRolePingsByName(roleNames: string[]): Promise<string> {
|
|
257
|
+
const pings: string[] = await Promise.all(
|
|
258
|
+
roleNames.map(roleName => this.getRolePingByName(roleName))
|
|
259
|
+
);
|
|
260
|
+
|
|
261
|
+
return pings.join(' ');
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
getRoleByName(roleName: string): Role {
|
|
265
|
+
this._rolesByNames[roleName] ??= this.discordServer.roles.cache.find(r => r.name === roleName);
|
|
266
|
+
|
|
267
|
+
return this._rolesByNames[roleName];
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
getChannelByName(channelName: string): TextChannel {
|
|
271
|
+
this._channelsByNames[channelName] ??= DyNTS_DiBo_Operations_Util.findTextChannelByName(
|
|
272
|
+
this.discordServer.channels,
|
|
273
|
+
channelName
|
|
274
|
+
);
|
|
275
|
+
|
|
276
|
+
return this._channelsByNames[channelName];
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* A leggyakoribb client.on(...) események a következők (TypeScript + discord.js 14+):
|
|
282
|
+
*
|
|
283
|
+
* 🔁 Alap események
|
|
284
|
+
* client.on('ready', () => {}) // Bot elindult
|
|
285
|
+
* client.on('messageCreate', (msg) => {}) // Üzenet érkezett
|
|
286
|
+
* client.on('interactionCreate', (i) => {}) // Slash command vagy gomb stb.
|
|
287
|
+
* client.on('guildCreate', (guild) => {}) // Új szerverre került
|
|
288
|
+
* client.on('guildDelete', (guild) => {}) // Szerverről eltávolították
|
|
289
|
+
* client.on('error', (err) => {}) // Hiba történt
|
|
290
|
+
*
|
|
291
|
+
* 👥 Felhasználókkal kapcsolatos események
|
|
292
|
+
* client.on('guildMemberAdd', (member) => {}) // Új user csatlakozott
|
|
293
|
+
* client.on('guildMemberRemove', (member) => {}) // User kilépett
|
|
294
|
+
* client.on('presenceUpdate', (oldP, newP) => {})// Status változott (pl. online → idle)
|
|
295
|
+
* ✏️ Üzenet események
|
|
296
|
+
* client.on('messageUpdate', (oldMsg, newMsg) => {}) // Üzenet módosult
|
|
297
|
+
* client.on('messageDelete', (msg) => {}) // Üzenetet töröltek
|
|
298
|
+
*
|
|
299
|
+
* 🔧 Moderáció/jogosultság/stb.
|
|
300
|
+
* client.on('roleCreate', (role) => {})
|
|
301
|
+
* client.on('roleDelete', (role) => {})
|
|
302
|
+
* client.on('channelCreate', (ch) => {})
|
|
303
|
+
* client.on('channelDelete', (ch) => {})
|
|
304
|
+
*/
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { timer, of, Subscription } from 'rxjs';
|
|
2
|
+
import { switchMap, filter, tap } from 'rxjs/operators';
|
|
3
|
+
import { Guild } from 'discord.js';
|
|
4
|
+
|
|
5
|
+
import { day, DyFM_delay, DyFM_Error, hour, minute } from '@futdevpro/fsm-dynamo';
|
|
6
|
+
import { DyNTS_SingletonService } from '../../../_services/base/singleton.service';
|
|
7
|
+
import { DyNTS_DiBo_Main_ControlService } from './dibo-main.control-service';
|
|
8
|
+
import { DyNTS_global_settings } from '../../../_collections/global-settings.const';
|
|
9
|
+
|
|
10
|
+
export abstract class DyNTS_DiBo_Routines_ControlService extends DyNTS_SingletonService {
|
|
11
|
+
|
|
12
|
+
static getInstance(): DyNTS_DiBo_Routines_ControlService {
|
|
13
|
+
return DyNTS_DiBo_Routines_ControlService.getSingletonInstance();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
protected abstract getMainDiscordBotControlService(): DyNTS_DiBo_Main_ControlService;
|
|
17
|
+
|
|
18
|
+
protected readonly mainDiscordBot_CS: DyNTS_DiBo_Main_ControlService =
|
|
19
|
+
this.getMainDiscordBotControlService();
|
|
20
|
+
|
|
21
|
+
get discordServer(): Guild {
|
|
22
|
+
return this.mainDiscordBot_CS.discordServer;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
protected constructor() {
|
|
26
|
+
super();
|
|
27
|
+
|
|
28
|
+
if (!this.discordServer) {
|
|
29
|
+
throw new DyFM_Error({
|
|
30
|
+
...this.getDefaultErrorSettings(
|
|
31
|
+
'constructor',
|
|
32
|
+
new Error(
|
|
33
|
+
'Discord server not yet initialized, ' +
|
|
34
|
+
'should only be called after DiscordBot_ControlService.start'
|
|
35
|
+
),
|
|
36
|
+
'system-init'
|
|
37
|
+
),
|
|
38
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DiBo-RCS-C000`,
|
|
39
|
+
})
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async start(issuer: string): Promise<void> {
|
|
44
|
+
try {
|
|
45
|
+
await this.startRoutines(issuer);
|
|
46
|
+
} catch (error) {
|
|
47
|
+
throw new DyFM_Error({
|
|
48
|
+
...this.getDefaultErrorSettings('start', error, issuer),
|
|
49
|
+
errorCode: `${DyNTS_global_settings.systemShortCodeName}|DyNTS-DiBo-RCS-ST0`,
|
|
50
|
+
})
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
abstract startRoutines(issuer: string): Promise<void>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
try {
|
|
6
|
+
require('discord.js');
|
|
7
|
+
} catch (error) {
|
|
8
|
+
console.log(
|
|
9
|
+
'❌ Discord.js package not found, please install it with: pnpm add discord.js'
|
|
10
|
+
);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
//
|
|
14
|
+
// Discord Bot module
|
|
15
|
+
//
|
|
16
|
+
// This module is created to simplify the usage of Discord Bot
|
|
17
|
+
// It creates universal solutions for the most common use cases
|
|
18
|
+
//
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
// COLLECTIONS
|
|
22
|
+
export * from './_collections/dibo-default-commands.const';
|
|
23
|
+
export * from './_collections/dibo-global-settings.conts';
|
|
24
|
+
export * from './_collections/dibo-operations.util';
|
|
25
|
+
|
|
26
|
+
// MODELS
|
|
27
|
+
export * from './_models/dibo-command.interface';
|
|
28
|
+
export * from './_models/dibo-last-mention-date.inteface';
|
|
29
|
+
export * from './_models/dibo-last-message-date.interface';
|
|
30
|
+
export * from './_models/global-bot-log-settings.interface';
|
|
31
|
+
|
|
32
|
+
// SERVICES
|
|
33
|
+
export * from './_services/dibo-commands.control-service';
|
|
34
|
+
export * from './_services/dibo-io.control-service';
|
|
35
|
+
export * from './_services/dibo-main.control-service';
|
|
36
|
+
export * from './_services/dibo-routines.control-service';
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
+
try {
|
|
2
|
+
require('crypto');
|
|
3
|
+
} catch (error) {
|
|
4
|
+
console.log(
|
|
5
|
+
'❌ CryptoJS package not found, please install it with: pnpm add crypto-js'
|
|
6
|
+
);
|
|
7
|
+
}
|
|
1
8
|
|
|
9
|
+
// This module is implementing solutions for OAuth2.0 protocol for the server.
|
|
2
10
|
|
|
3
11
|
|
|
4
12
|
export * from './_routes/oauth2.controller';
|