初始化模版工程
This commit is contained in:
40
remote-control/config/types.ts
Normal file
40
remote-control/config/types.ts
Normal file
@@ -0,0 +1,40 @@
|
||||
export interface PlatformConfig {
|
||||
enabled: boolean
|
||||
}
|
||||
|
||||
export interface DiscordConfig extends PlatformConfig {
|
||||
botToken: string
|
||||
}
|
||||
|
||||
export interface DingtalkConfig extends PlatformConfig {
|
||||
clientId: string
|
||||
clientSecret: string
|
||||
}
|
||||
|
||||
export interface LarkConfig extends PlatformConfig {
|
||||
appId: string
|
||||
appSecret: string
|
||||
}
|
||||
|
||||
export interface TelegramConfig extends PlatformConfig {
|
||||
botToken: string
|
||||
}
|
||||
|
||||
export interface SlackConfig extends PlatformConfig {
|
||||
botToken: string // xoxb-
|
||||
appToken: string // xapp-
|
||||
}
|
||||
|
||||
export interface RemoteControlConfig {
|
||||
discord: DiscordConfig
|
||||
dingtalk: DingtalkConfig
|
||||
lark: LarkConfig
|
||||
telegram: TelegramConfig
|
||||
slack: SlackConfig
|
||||
}
|
||||
|
||||
export interface ConfigChangeEvent {
|
||||
previousConfig: RemoteControlConfig
|
||||
newConfig: RemoteControlConfig
|
||||
changedPlatforms: ('discord' | 'dingtalk' | 'lark' | 'telegram' | 'slack')[]
|
||||
}
|
||||
Reference in New Issue
Block a user