Skip to content

Commit

Permalink
feat: 增加 命名空间 声明;添加 readonly 声明
Browse files Browse the repository at this point in the history
  • Loading branch information
CaoMeiYouRen committed Nov 19, 2024
1 parent e8b403f commit 7aaca63
Show file tree
Hide file tree
Showing 14 changed files with 45 additions and 29 deletions.
6 changes: 4 additions & 2 deletions src/push/custom-email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,12 @@ export const customEmailOptionSchema: CustomEmailOptionSchema = {
* @class CustomEmail
*/
export class CustomEmail implements Send {
// 命名空间
static readonly namespace = '自定义邮件'

static configSchema = customEmailConfigSchema
static readonly configSchema = customEmailConfigSchema

static optionSchema = customEmailOptionSchema
static readonly optionSchema = customEmailOptionSchema

private config: CustomEmailConfig

Expand Down
6 changes: 4 additions & 2 deletions src/push/dingtalk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,11 @@ export interface DingtalkResponse {
*/
export class Dingtalk implements Send {

static configSchema = dingtalkConfigSchema
static readonly namespace = '钉钉'

static optionSchema = dingtalkOptionSchema
static readonly configSchema = dingtalkConfigSchema

static readonly optionSchema = dingtalkOptionSchema

private ACCESS_TOKEN: string
/**
Expand Down
6 changes: 4 additions & 2 deletions src/push/discord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ export interface DiscordResponse { }
*/
export class Discord implements Send {

static configSchema = discordConfigSchema
static optionSchema = discordOptionSchema
static readonly namespace = 'Discord'
static readonly configSchema = discordConfigSchema
static readonly optionSchema = discordOptionSchema

/**
* Webhook Url 可在服务器设置 -> 整合 -> Webhook -> 创建 Webhook 中获取
*
Expand Down
5 changes: 3 additions & 2 deletions src/push/i-got.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ export interface IGotResponse {
* @class IGot
*/
export class IGot implements Send {
static configSchema = iGotConfigSchema
static optionSchema = iGotOptionSchema
static readonly namespace = 'iGot'
static readonly configSchema = iGotConfigSchema
static readonly optionSchema = iGotOptionSchema
/**
* 微信搜索小程序“iGot”获取推送key
*
Expand Down
6 changes: 3 additions & 3 deletions src/push/one-bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ export interface OneBotResponse {
* @class OneBot
*/
export class OneBot implements Send {

static configSchema = oneBotConfigSchema
static optionSchema = oneBotOptionSchema
static readonly namespace = 'OneBot'
static readonly configSchema = oneBotConfigSchema
static readonly optionSchema = oneBotOptionSchema

/**
* OneBot 协议版本号
Expand Down
5 changes: 3 additions & 2 deletions src/push/push-deer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@ export interface PushDeerResponse {
*/
export class PushDeer implements Send {

static configSchema = pushDeerConfigSchema
static optionSchema = pushDeerOptionSchema
static readonly namespace = 'PushDeer'
static readonly configSchema = pushDeerConfigSchema
static readonly optionSchema = pushDeerOptionSchema

/**
* pushkey,请参考 https://github.com/easychen/pushdeer 获取
Expand Down
5 changes: 3 additions & 2 deletions src/push/push-plus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,9 @@ export interface PushPlusResponse {
* @class PushPlus
*/
export class PushPlus implements Send {
static configSchema = pushPlusConfigSchema
static optionSchema = pushPlusOptionSchema
static readonly namespace = 'PushPlus'
static readonly configSchema = pushPlusConfigSchema
static readonly optionSchema = pushPlusOptionSchema
/**
* 请前往 https://www.pushplus.plus 领取
*
Expand Down
5 changes: 3 additions & 2 deletions src/push/qmsg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,9 @@ export interface QmsgResponse {
*/
export class Qmsg implements Send {

static configSchema = qmsgConfigSchema
static optionSchema = qmsgOptionSchema
static readonly namespace = 'Qmsg酱'
static readonly configSchema = qmsgConfigSchema
static readonly optionSchema = qmsgOptionSchema

private QMSG_KEY: string

Expand Down
5 changes: 3 additions & 2 deletions src/push/server-chan-turbo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ export interface ServerChanTurboResponse {
*/
export class ServerChanTurbo implements Send {

static configSchema = serverChanTurboConfigSchema
static optionSchema = serverChanTurboOptionSchema
static readonly namespace = 'Server酱·Turbo'
static readonly configSchema = serverChanTurboConfigSchema
static readonly optionSchema = serverChanTurboOptionSchema

/**
*
Expand Down
5 changes: 3 additions & 2 deletions src/push/server-chan-v3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,9 @@ export interface ServerChanV3Response {
*/
export class ServerChanV3 implements Send {

static configSchema = serverChanV3ConfigSchema
static optionSchema = serverChanV3OptionSchema
static readonly namespace = 'Server酱³'
static readonly configSchema = serverChanV3ConfigSchema
static readonly optionSchema = serverChanV3OptionSchema

/**
* 请前往 https://sc3.ft07.com/sendkey 领取
Expand Down
5 changes: 3 additions & 2 deletions src/push/telegram.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,9 @@ export interface TelegramResponse {
*/
export class Telegram implements Send {

static configSchema = telegramConfigSchema
static optionSchema = telegramOptionSchema
static readonly namespace = 'Telegram'
static readonly configSchema = telegramConfigSchema
static readonly optionSchema = telegramOptionSchema

/**
* 机器人令牌
Expand Down
5 changes: 3 additions & 2 deletions src/push/wechat-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,9 @@ export interface WechatAppResponse {
*/
export class WechatApp implements Send {

static configSchema = wechatAppConfigSchema
static optionSchema = wechatAppOptionSchema
static readonly namespace = '企业微信应用'
static readonly configSchema = wechatAppConfigSchema
static readonly optionSchema = wechatAppOptionSchema

private ACCESS_TOKEN: string

Expand Down
5 changes: 3 additions & 2 deletions src/push/wechat-robot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,9 @@ export interface WechatRobotResponse {
*/
export class WechatRobot implements Send {

static configSchema = wechatRobotConfigSchema
static optionSchema = wechatRobotOptionSchema
static readonly namespace = '企业微信群机器人'
static readonly configSchema = wechatRobotConfigSchema
static readonly optionSchema = wechatRobotOptionSchema

private WECHAT_ROBOT_KEY: string

Expand Down
5 changes: 3 additions & 2 deletions src/push/xi-zhi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ export interface XiZhiResponse {
*/
export class XiZhi implements Send {

static configSchema = xiZhiConfigSchema
static optionSchema = xiZhiOptionSchema
static readonly namespace = '息知'
static readonly configSchema = xiZhiConfigSchema
static readonly optionSchema = xiZhiOptionSchema

private XI_ZHI_KEY: string

Expand Down

0 comments on commit 7aaca63

Please sign in to comment.