feat: Add Pushover notification channel

- Adds Pushover as a new notification channel option. Includes fields for `api_token` and `user_key` in the `alert_configurations` schema and integrates it into the channel type dropdown and form handling.
This commit is contained in:
Tola Leng
2025-08-23 20:10:03 +07:00
parent d01f682a83
commit b3b64806f6
3 changed files with 59 additions and 3 deletions
@@ -7,7 +7,7 @@ export interface AlertConfiguration {
collectionId?: string;
collectionName?: string;
service_id: string;
notification_type: "telegram" | "discord" | "slack" | "signal" | "google_chat" | "email" | "ntfy" | "webhook";
notification_type: "telegram" | "discord" | "slack" | "signal" | "google_chat" | "email" | "ntfy" | "pushover" | "webhook";
telegram_chat_id?: string;
discord_webhook_url?: string;
signal_number?: string;
@@ -29,6 +29,8 @@ export interface AlertConfiguration {
webhook_id?: string;
channel_id?: string;
ntfy_endpoint?: string;
api_token?: string;
user_key?: string;
webhook_url?: string;
webhook_payload_template?: string;
}
@@ -85,6 +87,10 @@ export const alertConfigService = {
} else if (config.notification_type === "ntfy") {
cleanConfig.ntfy_endpoint = config.ntfy_endpoint || "";
} else if (config.notification_type === "pushover") {
cleanConfig.api_token = config.api_token || "";
cleanConfig.user_key = config.user_key || "";
} else if (config.notification_type === "webhook") {
cleanConfig.webhook_url = config.webhook_url || "";