diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js index a821d7440..4558064e4 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingOrders.js @@ -17,7 +17,7 @@ exports.newAlgorithmicTradingBotModulesTradingOrders = function (processIndex) { let sessionParameters let exchangeAPIModuleObject = TS.projects.algorithmicTrading.botModules.exchangeAPI.newAlgorithmicTradingBotModulesExchangeAPI(processIndex) - let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex) + let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) return thisObject diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js index a1e1a0de1..31458fe13 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/Low-Frequency-Trading/TradingStages.js @@ -24,7 +24,7 @@ exports.newAlgorithmicTradingBotModulesTradingStages = function (processIndex) { let tradingStrategyModuleObject = TS.projects.algorithmicTrading.botModules.tradingStrategy.newAlgorithmicTradingBotModulesTradingStrategy(processIndex) let tradingPositionModuleObject = TS.projects.algorithmicTrading.botModules.tradingPosition.newAlgorithmicTradingBotModulesTradingPosition(processIndex) let tradingExecutionModuleObject = TS.projects.algorithmicTrading.botModules.tradingExecution.newAlgorithmicTradingBotModulesTradingExecution(processIndex) - let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newFoundationsBotModulesAnnouncements(processIndex) + let announcementsModuleObject = TS.projects.foundations.botModules.announcements.newSocialBotsBotModulesAnnouncements(processIndex) let snapshotsModuleObject = TS.projects.algorithmicTrading.botModules.snapshots.newAlgorithmicTradingBotModulesSnapshots(processIndex) let tradingEpisodeModuleObject = TS.projects.algorithmicTrading.botModules.tradingEpisode.newAlgorithmicTradingBotModulesTradingEpisode(processIndex) diff --git a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js index d9d3586ee..081e044bb 100644 --- a/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js +++ b/Projects/Algorithmic-Trading/TS/Bot-Modules/Trading-Bot/TradingSession.js @@ -7,7 +7,7 @@ } TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE = - TS.projects.foundations.botModules.socialBots.newFoundationsBotModulesSocialBots(processIndex) + TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) return thisObject; diff --git a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js index 50459a29f..3831288b2 100644 --- a/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js +++ b/Projects/Machine-Learning/TS/Bot-Modules/Learning-Bot/LearningSession.js @@ -7,7 +7,7 @@ } TS.projects.foundations.globals.processVariables.VARIABLES_BY_PROCESS_INDEX_MAP.get(processIndex).SOCIAL_BOTS_MODULE = - TS.projects.foundations.botModules.socialBots.newFoundationsBotModulesSocialBots(processIndex) + TS.projects.foundations.botModules.socialBots.newSocialBotsBotModulesSocialBots(processIndex) return thisObject; diff --git a/Projects/ProjectsSchema.json b/Projects/ProjectsSchema.json index a8544b17a..8a72cd471 100644 --- a/Projects/ProjectsSchema.json +++ b/Projects/ProjectsSchema.json @@ -331,11 +331,6 @@ "name": "Workspace Functions", "propertyName": "workspaceFunctions", "functionName": "newFoundationsFunctionLibraryWorkspaceFunctions" - }, - { - "name": "Social Bots Functions", - "propertyName": "socialBotsFunctions", - "functionName": "newFoundationsFunctionLibrarySocialBotsFunctions" } ], "utilities": [ @@ -739,50 +734,7 @@ "fileName": "ProcessOutput.js" } ], - "botModules": [ - { - "name": "Announcements", - "propertyName": "announcements", - "functionName": "newFoundationsBotModulesAnnouncements", - "fileName": "Announcements.js", - "folderName": "Trading-Bot/Announcements" - }, - { - "name": "Social Bots", - "propertyName": "socialBots", - "functionName": "newFoundationsBotModulesSocialBots", - "fileName": "SocialBots.js", - "folderName": "Trading-Bot/Announcements" - }, - { - "name": "Telegram Bot", - "propertyName": "telegramBot", - "functionName": "newFoundationsBotModulesTelegramBot", - "fileName": "TelegramBot.js", - "folderName": "Trading-Bot/Announcements" - }, - { - "name": "Discord Bot", - "propertyName": "discordBot", - "functionName": "newFoundationsBotModulesDiscordBot", - "fileName": "DiscordBot.js", - "folderName": "Trading-Bot/Announcements" - }, - { - "name": "Slack Bot", - "propertyName": "slackBot", - "functionName": "newFoundationsBotModulesSlackBot", - "fileName": "SlackBot.js", - "folderName": "Trading-Bot/Announcements" - }, - { - "name": "Twitter Bot", - "propertyName": "twitterBot", - "functionName": "newFoundationsBotModulesTwitterBot", - "fileName": "TwitterBot.js", - "folderName": "Trading-Bot/Announcements" - } - ] + "botModules": [] }, "PL": { "utilities": [ @@ -1599,5 +1551,76 @@ } ] } + }, + { + "name": "Social-Bots", + "propertyName": "socialBots", + "UI": { + "functionLibraries": [ + { + "name": "Social Bots Functions", + "propertyName": "socialBotsFunctions", + "functionName": "newSocialBotsFunctionLibrarySocialBotsFunctions" + } + ], + "utilities": [] + }, + "TS": { + "botModules": [ + { + "name": "Announcements", + "propertyName": "announcements", + "functionName": "newSocialBotsBotModulesAnnouncements", + "fileName": "Announcements.js", + "folderName": "" + }, + { + "name": "Social Bots", + "propertyName": "socialBots", + "functionName": "newSocialBotsBotModulesSocialBots", + "fileName": "SocialBots.js", + "folderName": "" + }, + { + "name": "Telegram Bot", + "propertyName": "telegramBot", + "functionName": "newSocialBotsBotModulesTelegramBot", + "fileName": "TelegramBot.js", + "folderName": "" + }, + { + "name": "Discord Bot", + "propertyName": "discordBot", + "functionName": "newSocialBotsBotModulesDiscordBot", + "fileName": "DiscordBot.js", + "folderName": "" + }, + { + "name": "Slack Bot", + "propertyName": "slackBot", + "functionName": "newSocialBotsBotModulesSlackBot", + "fileName": "SlackBot.js", + "folderName": "" + }, + { + "name": "Twitter Bot", + "propertyName": "twitterBot", + "functionName": "newSocialBotsBotModulesTwitterBot", + "fileName": "TwitterBot.js", + "folderName": "" + } + ] + } + }, + { + "name": "Visual-Scripting", + "propertyName": "visualScripting", + "UI": { + "functionLibraries": [], + "utilities": [] + }, + "TS": { + "botModules": [] + } } ] \ No newline at end of file diff --git a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/Announcements.js b/Projects/Social-Bots/TS/Bot-Modules/Announcements.js similarity index 98% rename from Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/Announcements.js rename to Projects/Social-Bots/TS/Bot-Modules/Announcements.js index d0e5821a3..509531592 100644 --- a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/Announcements.js +++ b/Projects/Social-Bots/TS/Bot-Modules/Announcements.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesAnnouncements = function (processIndex) { +exports.newSocialBotsBotModulesAnnouncements = function (processIndex) { const MODULE_NAME = 'Announcements' diff --git a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/DiscordBot.js b/Projects/Social-Bots/TS/Bot-Modules/DiscordBot.js similarity index 97% rename from Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/DiscordBot.js rename to Projects/Social-Bots/TS/Bot-Modules/DiscordBot.js index c64b09847..6f1a4c8dd 100644 --- a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/DiscordBot.js +++ b/Projects/Social-Bots/TS/Bot-Modules/DiscordBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesDiscordBot = function (processIndex) { +exports.newSocialBotsBotModulesDiscordBot = function (processIndex) { const MODULE_NAME = 'Discord Bot' diff --git a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SlackBot.js b/Projects/Social-Bots/TS/Bot-Modules/SlackBot.js similarity index 97% rename from Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SlackBot.js rename to Projects/Social-Bots/TS/Bot-Modules/SlackBot.js index 09136775a..f266debd1 100644 --- a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SlackBot.js +++ b/Projects/Social-Bots/TS/Bot-Modules/SlackBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesSlackBot = function (processIndex) { +exports.newSocialBotsBotModulesSlackBot = function (processIndex) { const MODULE_NAME = 'Slack Bot' diff --git a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SocialBots.js b/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js similarity index 95% rename from Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SocialBots.js rename to Projects/Social-Bots/TS/Bot-Modules/SocialBots.js index bae559bce..3dbbb07a6 100644 --- a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/SocialBots.js +++ b/Projects/Social-Bots/TS/Bot-Modules/SocialBots.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesSocialBots = function (processIndex) { +exports.newSocialBotsBotModulesSocialBots = function (processIndex) { const MODULE_NAME = 'Social Bots' @@ -19,13 +19,13 @@ exports.newFoundationsBotModulesSocialBots = function (processIndex) { let config = socialBot.config let commands = socialBot.socialBotCommand if (socialBot.type === "Telegram Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.telegramBot.newFoundationsBotModulesTelegramBot(processIndex) + socialBot.botInstance = TS.projects.foundations.botModules.telegramBot.newSocialBotsBotModulesTelegramBot(processIndex) socialBot.botInstance.initialize(config, commands) } else if (socialBot.type === "Discord Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.discordBot.newFoundationsBotModulesDiscordBot(processIndex) + socialBot.botInstance = TS.projects.foundations.botModules.discordBot.newSocialBotsBotModulesDiscordBot(processIndex) socialBot.botInstance.initialize(config) } else if (socialBot.type === "Slack Bot") { - socialBot.botInstance = TS.projects.foundations.botModules.slackBot.newFoundationsBotModulesSlackBot(processIndex) + socialBot.botInstance = TS.projects.foundations.botModules.slackBot.newSocialBotsBotModulesSlackBot(processIndex) socialBot.botInstance.initialize(config) } } diff --git a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/TelegramBot.js b/Projects/Social-Bots/TS/Bot-Modules/TelegramBot.js similarity index 98% rename from Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/TelegramBot.js rename to Projects/Social-Bots/TS/Bot-Modules/TelegramBot.js index 5fe10448c..72437baaa 100644 --- a/Projects/Foundations/TS/Bot-Modules/Trading-Bot/Announcements/TelegramBot.js +++ b/Projects/Social-Bots/TS/Bot-Modules/TelegramBot.js @@ -1,4 +1,4 @@ -exports.newFoundationsBotModulesTelegramBot = function (processIndex) { +exports.newSocialBotsBotModulesTelegramBot = function (processIndex) { const MODULE_NAME = 'Telegram Bot' diff --git a/Projects/Social-Bots/UI/Function-Libraries/ActionSwitch.js b/Projects/Social-Bots/UI/Function-Libraries/ActionSwitch.js new file mode 100644 index 000000000..c8ee8cb63 --- /dev/null +++ b/Projects/Social-Bots/UI/Function-Libraries/ActionSwitch.js @@ -0,0 +1,38 @@ +function newSocialBotsActionSwitch() { + + let thisObject = { + executeAction: executeAction, + initialize: initialize, + finalize: finalize + } + + return thisObject + + function finalize() { + + } + + function initialize() { + /* Nothing to initialize since a Function Library does not hold any state. */ + } + + async function executeAction(action) { + switch (action.name) { + case 'Add All Output Datasets': + { + UI.projects.dataMining.functionLibraries.mineFunctions.addAllOutputDatasets(action.node) + } + break + case 'Add All Data Dependencies': + { + UI.projects.dataMining.functionLibraries.mineFunctions.addAllDataDependencies(action.node) + } + break + case 'Add All Data Mine Dependencies': + { + UI.projects.dataMining.functionLibraries.mineFunctions.addAllDataMineDataDependencies(action.node, action.rootNodes) + } + break + } + } +} diff --git a/Projects/Foundations/UI/Function-Libraries/SocialBotsFunctions.js b/Projects/Social-Bots/UI/Function-Libraries/SocialBotsFunctions.js similarity index 99% rename from Projects/Foundations/UI/Function-Libraries/SocialBotsFunctions.js rename to Projects/Social-Bots/UI/Function-Libraries/SocialBotsFunctions.js index 37a675e10..31923fe33 100644 --- a/Projects/Foundations/UI/Function-Libraries/SocialBotsFunctions.js +++ b/Projects/Social-Bots/UI/Function-Libraries/SocialBotsFunctions.js @@ -1,4 +1,4 @@ -function newFoundationsFunctionLibrarySocialBotsFunctions() { +function newSocialBotsFunctionLibrarySocialBotsFunctions() { let thisObject = { sendTelegramTestMessage: sendTelegramTestMessage, sendDiscordTestMessage: sendDiscordTestMessage,