更新通知服务

This commit is contained in:
hanhh
2021-09-17 00:35:27 +08:00
parent 9534cda1f9
commit f2dac51a62
5 changed files with 319 additions and 51 deletions
+34 -33
View File
@@ -16,65 +16,66 @@ abstract class NotificationBaseInfo {
}
export class GoCqHttpBotNotification extends NotificationBaseInfo {
public GOBOT_URL = '';
public GOBOT_TOKEN = '';
public GOBOT_QQ = '';
public goCqHttpBotUrl = '';
public goCqHttpBotToken = '';
public goCqHttpBotQq = '';
}
export class ServerChanNotification extends NotificationBaseInfo {
public SCKEY = '';
public serverChanKey = '';
}
export class BarkNotification extends NotificationBaseInfo {
public BARK_PUSH = '';
public BARK_SOUND = '';
public BARK_GROUP = 'qinglong';
public barkPush = '';
public barkSound = '';
public barkGroup = 'qinglong';
}
export class TelegramBotNotification extends NotificationBaseInfo {
public TG_BOT_TOKEN = '';
public TG_USER_ID = '';
public TG_PROXY_HOST = '';
public TG_PROXY_PORT = '';
public TG_PROXY_AUTH = '';
public TG_API_HOST = 'api.telegram.org';
public telegramBotToken = '';
public telegramBotUserId = '';
public telegramBotProxyHost = '';
public telegramBotProxyPort = '';
public telegramBotProxyAuth = '';
public telegramBotApiHost = 'api.telegram.org';
}
export class DingtalkBotNotification extends NotificationBaseInfo {
public DD_BOT_TOKEN = '';
public DD_BOT_SECRET = '';
public dingtalkBotToken = '';
public dingtalkBotSecret = '';
}
export class WeWorkBotNotification extends NotificationBaseInfo {
public QYWX_KEY = '';
public weWorkBotKey = '';
}
export class WeWorkAppNotification extends NotificationBaseInfo {
public QYWX_AM = '';
public weWorkAppKey = '';
}
export class IGotNotification extends NotificationBaseInfo {
public IGOT_PUSH_KEY = '';
public iGotPushKey = '';
}
export class PushPlusNotification extends NotificationBaseInfo {
public PUSH_PLUS_TOKEN = '';
public PUSH_PLUS_USER = '';
public pushPlusToken = '';
public pushPlusUser = '';
}
export class EmailNotification extends NotificationBaseInfo {
public service: string = '';
public user: string = '';
public pass: string = '';
public emailService: string = '';
public emailUser: string = '';
public emailPass: string = '';
}
export type NotificationInfo =
| GoCqHttpBotNotification
| ServerChanNotification
| BarkNotification
| TelegramBotNotification
| DingtalkBotNotification
| WeWorkBotNotification
| IGotNotification
| PushPlusNotification
| EmailNotification;
export interface NotificationInfo
extends GoCqHttpBotNotification,
ServerChanNotification,
BarkNotification,
TelegramBotNotification,
DingtalkBotNotification,
WeWorkBotNotification,
WeWorkAppNotification,
IGotNotification,
PushPlusNotification,
EmailNotification {}