From f67c7cb0f02718f1403b8204c4cab077f24a84a8 Mon Sep 17 00:00:00 2001 From: cool Date: Fri, 21 Jul 2023 16:44:21 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=AD=E4=BF=A1=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/interface.ts | 85 ++++++++++++++++++++++++++++++++++ 1 file changed, 85 insertions(+) diff --git a/packages/core/src/interface.ts b/packages/core/src/interface.ts index 2bf228b..2f2e205 100644 --- a/packages/core/src/interface.ts +++ b/packages/core/src/interface.ts @@ -19,6 +19,8 @@ export interface ModuleConfig { } export interface CoolConfig { + /** 短信 */ + sms: CoolSmsConfig, /** 是否自动导入数据库 */ initDB?: boolean; // 实体配置 @@ -300,3 +302,86 @@ export interface CoolIotConfig { /** 服务配置 */ serve?: AedesOptions; } + + +export interface CoolSmsConfig { + /** + * 阿里云短信配置 + */ + ali: CoolSmsAliConfig; + /** + * 腾讯云短信配置 + */ + tx: CoolTxConfig; + /** + * 云片短信配置 + */ + yp: CoolYpConfig; +} + +/** + * 阿里云配置 + */ +export interface CoolSmsAliConfig { + /** + * 阿里云accessKeyId + */ + accessKeyId: string; + /** + * 阿里云accessKeySecret + */ + accessKeySecret: string; + /** + * 签名,非必填,调用时可以传入 + */ + signName?: string; + /** + * 模板,非必填,调用时可以传入 + */ + template?: string; +} + +/** + * 腾讯云配置 + */ +export interface CoolTxConfig { + /** + * 应用ID + */ + appId: string; + /** + * 腾讯云secretId + */ + secretId: string; + /** + * 腾讯云secretKey + */ + secretKey: string; + /** + * 签名,非必填,调用时可以传入 + */ + signName?: string; + /** + * 模板,非必填,调用时可以传入 + */ + template?: string; +} + +/** + * 云片短信配置 + */ +export interface CoolYpConfig { + /** + * 云片apikey + */ + apikey: string; + /** + * 签名,非必填,调用时可以传入 + */ + signName?: string; + /** + * 模板,非必填,调用时可以传入 + */ + template?: string; +} +