message push config
This commit is contained in:
@@ -1,9 +1,50 @@
|
||||
export type Setting = {
|
||||
id?: string;
|
||||
name?: string;
|
||||
content: EmailsSetting;
|
||||
content?: EmailsSetting | NotifyTemplates | NotifyChannels;
|
||||
};
|
||||
|
||||
type EmailsSetting = {
|
||||
export type EmailsSetting = {
|
||||
emails: string[];
|
||||
};
|
||||
|
||||
export type NotifyTemplates = {
|
||||
notifyTemplates: NotifyTemplate[];
|
||||
};
|
||||
|
||||
export type NotifyTemplate = {
|
||||
title: string;
|
||||
content: string;
|
||||
};
|
||||
|
||||
export type NotifyChannels = {
|
||||
dingtalk?: NotifyChannel;
|
||||
telegram?: NotifyChannel;
|
||||
webhook?: NotifyChannel;
|
||||
};
|
||||
|
||||
export type NotifyChannel =
|
||||
| NotifyChannelDingTalk
|
||||
| NotifyChannelTelegram
|
||||
| NotifyChannelWebhook;
|
||||
|
||||
export type NotifyChannelDingTalk = {
|
||||
accessToken: string;
|
||||
secret: string;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
export type NotifyChannelTelegram = {
|
||||
apiToken: string;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
export type NotifyChannelWebhook = {
|
||||
url: string;
|
||||
enabled: boolean;
|
||||
};
|
||||
|
||||
export const defaultNotifyTemplate: NotifyTemplate = {
|
||||
title: "您有{COUNT}张证书即将过期",
|
||||
content: "有{COUNT}张证书即将过期,域名分别为{DOMAINS},请保持关注!",
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user