notificaitons

This commit is contained in:
Alex Holliday committed 2026-01-05 04:35:01 +00:00
1 parent 3182141d0a
commit e62e4898b9
8 files changed
+39 -45

No files matched your search

@@ -16,6 +16,7 @@ import SettingsService from "@/services/system/SettingsService.js";
import ApiError from "@/utils/ApiError.js";
import { getChildLogger } from "@/logger/Logger.js";
import type { IEmailTransport } from "./NotificationServices/Email.js";
import type { Monitor as MonitorEntity } from "@/types/domain/index.js";
const SERVICE_NAME = "NotificationService";
const logger = getChildLogger(SERVICE_NAME);
@@ -28,7 +29,7 @@ export interface ITestResult {
}
export interface INotificationService {
handleNotifications: (
monitor: IMonitor,
monitor: MonitorEntity,
incident: IIncident
) => Promise<void>;
testNotificationChannels: (
@@ -58,7 +59,7 @@ class NotificationService implements INotificationService {
this.webhookService = new WebhookService();
}
handleNotifications = async (monitor: IMonitor, incident: IIncident) => {
handleNotifications = async (monitor: MonitorEntity, incident: IIncident) => {
const notificationIds = monitor.notificationChannels || [];
if (notificationIds.length === 0) {
@@ -88,7 +89,7 @@ class NotificationService implements INotificationService {
private sendForChannel = async (
channel: INotificationChannel,
monitor: IMonitor,
monitor: MonitorEntity,
incident: IIncident
): Promise<boolean> => {
try {