import axios from 'axios';
export const DashboardScenarioService = {
    
    getExecScenarioByProject (project) {
        return axios.get('/getExecScenarioByProject', {
            params: project
    });
    },

    //funzione per recuperare la lista con TUTTI i progetti
    getProjects() {
        return axios.get('/projects');
    },

   
     getExecutions(filters) {
         return axios.post('/executions-dash', {    
                 dateFrom: filters.dateFrom,
                 dateTo: filters.dateTo,
                 projectNameList: filters.projectNames,
                 scenarioNameList: filters.scenarioNames
             }
         );   
     },

     getExecutionsStats(filters) {
         return axios.post('/executions-stats-dash', {    
                 dateFrom: filters.dateFrom,
                 dateTo: filters.dateTo,
                 projectNameList: filters.projectNames,
                 scenarioNameList: filters.scenarioNames
             }
         );   
     },


     getUsers(filters) {
         return axios.get('/users-by-projects', {
             params: {
                 projectIdsArr: filters
             }
         });
            
     },

     getScenarios(filters) {
        return axios.get('/scenarios-filter', { 
            params: {
                dateFrom: filters.dateFrom,
                dateTo: filters.dateTo,
                selectedAccount: filters.account
            }  
            });
    },

    
    getChats(filters) {
        return axios.get('/chats', {
            params: {
                dateFrom: filters.dateFrom,
                dateTo: filters.dateTo,
                projectId: filters.projectId,
                user: filters.user
            }
        });

    },

     getChatStats(filters) {
         return axios.post('/dashboard-chat-stats', {    
                 dateFrom: filters.dateFrom,
                 dateTo: filters.dateTo,
                 projectNameList: filters.projectNames,
                 scenarioIdList: filters.scenarioId
             }
         );   
     },
    


};