feat: add Bark notification channel and related settings

This commit is contained in:
Leon
2024-11-01 11:35:09 +08:00
parent a27a9f55a7
commit 657964cda4
9 changed files with 291 additions and 12 deletions

View File

@@ -24,6 +24,7 @@ export type NotifyChannels = {
webhook?: NotifyChannel;
serverchan?: NotifyChannel;
mail?: NotifyChannelMail;
bark?: NotifyChannelBark;
};
export type NotifyChannel =
@@ -32,7 +33,8 @@ export type NotifyChannel =
| NotifyChannelTelegram
| NotifyChannelWebhook
| NotifyChannelServerChan
| NotifyChannelMail;
| NotifyChannelMail
| NotifyChannelBark;
export type NotifyChannelDingTalk = {
accessToken: string;
@@ -71,6 +73,12 @@ export type NotifyChannelMail = {
enabled: boolean;
};
export type NotifyChannelBark = {
deviceKey: string;
serverUrl: string;
enabled: boolean;
};
export const defaultNotifyTemplate: NotifyTemplate = {
title: "您有 {COUNT} 张证书即将过期",
content: "有 {COUNT} 张证书即将过期,域名分别为 {DOMAINS},请保持关注!",