const {
    getAllTeamsData,
    getAllTeamsDataCollaborators,
    getTeamById,
    updateTeam,
    updateUser,
    getAllUserRoles,
    addTeamMembers,
    deleteTeam,
    viewProfile,
    addInternalNote,
    manageWorkflows,
    addToRequest,
    getRequests,
    searchTeam,
    isPrivileged,
    sendMessage,
    viewMessage,
    getAllUsers,
    getNewMsgCount,
    getAllServices,
    updateProfilePic,
    updateCoverImage,
    saveTeamMemberCartOrder,
    getAllTeamsDataForChat,
    updateNotificationSettings,
    getNotificationSettings,
    updateUserActive,
    helpDeskUserActive,
    getAllSalesRepsData,
    getAllProjectSalesRepsData
} = require("../controllers/teams");
const { getAllContactTags } = require("../models/contactTag");
const { getAllTeamFacingWorkflow } = require("../models/onboard");
const { getAllWorkflows} = require("../models/teams");

const teamsRoutes = [
    {
        method: "POST",
        url: "/webservice/teams/get-all-teams-data",
        handler: getAllTeamsData
    },
    {
        method: "POST",
        url: "/webservice/teams/get-all-teams-data-collaborators",
        handler: getAllTeamsDataCollaborators
    },
    {
        method : "POST",
        url: "/webservice/teams/get-all-sales-reps-data",
        handler: getAllSalesRepsData
    },
    {
        method: "POST",
        url: "/webservice/teams/get-all-teams-data-for-chat",
        handler: getAllTeamsDataForChat
    },
    {
        method: "POST",
        url: "/webservice/teams/get-team-by-id",
        handler: getTeamById
    },
    {
        method: "POST",
        url: "/webservice/teams/update-team",
        handler: updateTeam
    },
    {
        method: "POST",
        url: "/webservice/teams/update-user",
        handler: updateUser
    },
    {
        method: "POST",
        url: "/webservice/teams/update-user-active",
        handler: updateUserActive
    },
    {
        method: "POST",
        url: "/webservice/teams/get-user-active",
        handler: helpDeskUserActive
    },
    {
        method: "POST",
        url: "/webservice/teams/get-user-roles",
        handler: getAllUserRoles
    },
    {
        method: "POST",
        url: "/webservice/teams/get-work-flows",
        handler: getAllTeamFacingWorkflow
    },
    {
        method: "POST",
        url: "/webservice/teams/get-contact-tags",
        handler: getAllContactTags
    },
    {
        method: "POST",
        url: "/webservice/teams/get-services",
        handler: getAllServices
    },
    {
        method: "POST",
        url: "/webservice/teams/add-team-members",
        handler: addTeamMembers
    },
    {
        method: "POST",
        url: "/webservice/teams/delete-team-members",
        handler: deleteTeam
    },
    {
        method : "POST",
        url: "/webservice/teams/view-team-profile",
        handler:viewProfile
    },
    {
        method : "POST",
        url: "/webservice/teams/add-internal-note",
        handler:addInternalNote
    },
    {
        method : "POST",
        url: "/webservice/teams/update-workflows",
        handler:manageWorkflows
    },
    {
        method : "POST",
        url: "/webservice/teams/add-to-requests",
        handler:addToRequest
    },
    {
        method : "POST",
        url: "/webservice/teams/get-requests",
        handler:getRequests
    },
    {
        method : "POST",
        url: "/webservice/teams/search-team",
        handler:searchTeam
    },
    {
        method : "POST",
        url: "/webservice/admin/is-privileged",
        handler:isPrivileged
    },
    {
        method : "POST",
        url: "/webservice/teams/send-message",
        handler:sendMessage
    },
    {
        method : "POST",
        url: "/webservice/teams/view-message",
        handler:viewMessage
    },
    {
        method : "POST",
        url: "/webservice/teams/get-all-users",
        handler:getAllUsers
    },
    {
        method : "POST",
        url: "/webservice/teams/get-new-msg-count",
        handler:getNewMsgCount
    },
    {
        method : "POST",
        url: "/webservice/teams/update-profile-pic",
        handler:updateProfilePic
    },
    {
        method : "POST",
        url: "/webservice/teams/update-cover-image",
        handler:updateCoverImage
    },
    {
        method : "POST",
        url: "/webservice/teams/save-card-order-id",
        handler:saveTeamMemberCartOrder
    },
    {
        method : "POST",
        url: "/webservice/teams/sms-email-notification",
        handler:updateNotificationSettings
    },
    {
        method : "POST",
        url: "/webservice/teams/get-sms-email-notification",
        handler:getNotificationSettings
    },
    {
        method : "POST",
        url: "/webservice/teams/get-all-project-sales-reps-data",
        handler: getAllProjectSalesRepsData,
    },
];

module.exports = teamsRoutes;