"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.alertsRouter = void 0;
const express_1 = require("express");
const permissions_1 = require("../../util/config/permissions");
const alerts_1 = require("../controller/alerts");
const permission_1 = require("../middlewares/permission");
const router = (0, express_1.Router)();
// Dashboard routes
router.get('/DashBoardSummaryGraph', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getDashboardSummaryGraph);
router.get('/summary', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getSummary);
router.get('/incidents', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getIncidents);
// Conditions routes
router.get('/conditions', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getConditions);
router.get('/conditions-details/:alertId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getConditionDetails);
// Notification channels routes
router.get('/notification', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getNotificationChannels);
router.get('/notification-details/:notificationChannelId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getNotificationChannelDetails);
router.post('/create-notification-channel', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_WRITE), alerts_1.AlertsController.createNotificationChannel);
router.put('/update-notification-channel/:notificationChannelId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_WRITE), alerts_1.AlertsController.updateNotificationChannel);
// Alerts routes
router.get('/notification-channel-alerts/:notificationChannelId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getNotificationChannelAlerts);
router.get('/alert-incidents/:alertId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_READ), alerts_1.AlertsController.getAlertIncidents);
router.post('/create', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_WRITE), alerts_1.AlertsController.createAlert);
router.put('/update/:alertId', (0, permission_1.hasPermission)(permissions_1.Permission.PROJECT_WRITE), alerts_1.AlertsController.updateAlert);
exports.alertsRouter = router;
//# sourceMappingURL=alerts.js.map