feat: support pushover as notification

This commit is contained in:
imlonghao
2025-04-12 11:07:32 +08:00
parent 4e3f499d76
commit 6b8dbf5235
11 changed files with 239 additions and 0 deletions

View File

@@ -44,6 +44,7 @@ export const NOTIFY_CHANNELS = Object.freeze({
EMAIL: "email",
GOTIFY: "gotify",
LARK: "lark",
PUSHOVER: "pushover",
PUSHPLUS: "pushplus",
SERVERCHAN: "serverchan",
TELEGRAM: "telegram",
@@ -64,6 +65,7 @@ export type NotifyChannelsSettingsContent = {
[NOTIFY_CHANNELS.EMAIL]?: EmailNotifyChannelConfig;
[NOTIFY_CHANNELS.GOTIFY]?: GotifyNotifyChannelConfig;
[NOTIFY_CHANNELS.LARK]?: LarkNotifyChannelConfig;
[NOTIFY_CHANNELS.PUSHOVER]?: PushoverNotifyChannelConfig;
[NOTIFY_CHANNELS.PUSHPLUS]?: PushPlusNotifyChannelConfig;
[NOTIFY_CHANNELS.SERVERCHAN]?: ServerChanNotifyChannelConfig;
[NOTIFY_CHANNELS.TELEGRAM]?: TelegramNotifyChannelConfig;
@@ -106,6 +108,12 @@ export type LarkNotifyChannelConfig = {
enabled?: boolean;
};
export type PushoverNotifyChannelConfig = {
token: string;
user: string;
enabled?: boolean;
};
export type PushPlusNotifyChannelConfig = {
token: string;
enabled?: boolean;
@@ -143,6 +151,7 @@ export const notifyChannelsMap: Map<NotifyChannel["type"], NotifyChannel> = new
[NOTIFY_CHANNELS.DINGTALK, "common.notifier.dingtalk"],
[NOTIFY_CHANNELS.GOTIFY, "common.notifier.gotify"],
[NOTIFY_CHANNELS.LARK, "common.notifier.lark"],
[NOTIFY_CHANNELS.PUSHOVER, "common.notifier.pushover"],
[NOTIFY_CHANNELS.PUSHPLUS, "common.notifier.pushplus"],
[NOTIFY_CHANNELS.WECOM, "common.notifier.wecom"],
[NOTIFY_CHANNELS.TELEGRAM, "common.notifier.telegram"],