import SMTPTransport from "nodemailer/lib/smtp-transport";
import Mail from "nodemailer/lib/mailer";

//#region src/interfaces/response.d.ts
interface SendResponse<T = any> {
  headers?: any;
  status: number;
  statusText: string;
  data: T;
}
//#endregion
//#region src/interfaces/send.d.ts
/**
 * 要求所有 push 方法都至少实现了 send 接口
 *
 * @author CaoMeiYouRen
 * @date 2021-02-27
 * @export
 * @interface Send
 */
interface Send {
  /**
   * 代理地址。支持 http/https/socks/socks5 协议。例如 http://127.0.0.1:8080
   *
   * @author CaoMeiYouRen
   * @date 2024-04-20
   */
  proxyUrl?: string;
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-09
   * @param title 消息标题
   * @param [desp] 消息描述
   * @param [options] 发送选项
   */
  send(title: string, desp?: string, options?: any): Promise<SendResponse<any>>;
}
//#endregion
//#region src/interfaces/schema.d.ts
type IsUnion<T, U = T> = T extends U ? ([U] extends [T] ? false : true) : never;
type Config = {
  [key: string]: any;
};
/**
 * 配置 Schema
 * 如果字段的类型是 string，则生成的 Schema 类型为 string
 * 如果字段的类型是 number，则生成的 Schema 类型为 number
 * 如果字段的类型是 boolean，则生成的 Schema 类型为 boolean
 * 如果字段的类型是 object，则生成的 Schema 类型为 object
 * 如果字段的类型是 array，则生成的 Schema 类型为 array
 * 如果字段的类型是 联合 number 类型(1 | 2 | 3)，则生成的 Schema 类型为 select
 * 如果字段的类型是 联合 string 类型('text' | 'html')，则生成的 Schema 类型为 select
 *  (IsUnion<T[K]> extends true ? 'select' : never)
 */
type ConfigSchema<T = Config> = { [K in keyof T]: {
  type: T[K] extends boolean ? 'boolean' : (IsUnion<T[K]> extends true ? 'select' : (T[K] extends string ? 'string' : (T[K] extends number ? 'number' : (T[K] extends any[] ? 'array' : (T[K] extends object ? 'object' : ('select'))))));
  title?: string;
  description?: string;
  required: boolean;
  default?: T[K];
  options?: {
    label: string;
    value: T[K];
  }[];
} };
type Option = {
  [key: string]: any;
};
type OptionSchema<T = Option> = ConfigSchema<T>;
//#endregion
//#region src/push/custom-email.d.ts
type CustomEmailType = 'text' | 'html';
interface CustomEmailConfig {
  /**
   *  邮件类型
   */
  EMAIL_TYPE: CustomEmailType;
  /**
   * 收件邮箱
   */
  EMAIL_TO_ADDRESS: string;
  /**
   * 发件邮箱
   */
  EMAIL_AUTH_USER: string;
  /**
   * 发件授权码(或密码)
   */
  EMAIL_AUTH_PASS: string;
  /**
   * 发件域名
   */
  EMAIL_HOST: string;
  /**
   * 发件端口
   */
  EMAIL_PORT: number;
}
type CustomEmailConfigSchema = ConfigSchema<CustomEmailConfig>;
declare const customEmailConfigSchema: CustomEmailConfigSchema;
type CustomEmailOption = Mail.Options;
type OptionalCustomEmailOption = Pick<CustomEmailOption, 'to' | 'from' | 'subject' | 'text' | 'html'>;
/**
 * 由于 CustomEmailOption 的配置太多，所以不提供完整的 Schema，只提供部分配置 schema。
 * 如需使用完整的配置，请查看官方文档
 */
type CustomEmailOptionSchema = OptionSchema<{ [K in keyof OptionalCustomEmailOption]: string }>;
declare const customEmailOptionSchema: CustomEmailOptionSchema;
/**
 * 自定义邮件。官方文档: https://github.com/nodemailer/nodemailer
 *
 * @author CaoMeiYouRen
 * @date 2023-03-12
 * @export
 * @class CustomEmail
 */
declare class CustomEmail implements Send {
  static readonly namespace = "\u81EA\u5B9A\u4E49\u90AE\u4EF6";
  static readonly configSchema: ConfigSchema<CustomEmailConfig>;
  static readonly optionSchema: ConfigSchema<{
    to?: string;
    from?: string;
    subject?: string | undefined;
    text?: string;
    html?: string;
  }>;
  private config;
  private transporter;
  constructor(config: CustomEmailConfig);
  /**
   * 释放资源（需要支持 Symbol.dispose）
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   */
  [Symbol.dispose](): void;
  /**
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息的标题
   * @param [desp] 消息的内容，支持 html
   * @param [option] 额外选项
   */
  send(title: string, desp?: string, option?: CustomEmailOption): Promise<SendResponse<SMTPTransport.SentMessageInfo>>;
}
//#endregion
//#region src/push/dingtalk/markdown.d.ts
/**
 * 钉钉 markdown 消息
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface Markdown
 */
interface Markdown {
  msgtype: 'markdown';
  markdown: {
    title: string;
    text: string;
  };
  at?: {
    atMobiles?: string[];
    atUserIds?: string[];
    isAtAll?: boolean;
  };
}
//#endregion
//#region src/push/dingtalk/text.d.ts
/**
 * 文本消息
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface Text
 */
interface Text {
  msgtype: 'text';
  text: {
    content: string;
  };
  at?: {
    atMobiles?: string[];
    atUserIds?: string[];
    isAtAll?: boolean;
  };
}
//#endregion
//#region src/push/dingtalk/link.d.ts
/**
 * 链接消息
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface Link
 */
interface Link {
  msgtype: 'link';
  link: {
    text: string;
    title: string;
    picUrl?: string;
    messageUrl: string;
  };
}
//#endregion
//#region src/push/dingtalk/feed-card.d.ts
interface FeedCardLink {
  title: string;
  messageURL: string;
  picURL: string;
}
/**
 * 订阅卡片消息
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface FeedCard
 */
interface FeedCard {
  msgtype: 'feedCard';
  feedCard: {
    links: FeedCardLink[];
  };
}
//#endregion
//#region src/push/dingtalk/action-card.d.ts
type OverallJump = {
  singleTitle: string;
  singleURL: string;
};
type IndependentJump = {
  btns: {
    title: string;
    actionURL: string;
  }[];
};
/**
 * 动作卡片消息
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface ActionCard
 */
interface ActionCard {
  msgtype: 'actionCard';
  actionCard: {
    title: string;
    text: string;
    btnOrientation?: '0' | '1';
  } & (OverallJump | IndependentJump);
}
//#endregion
//#region src/push/dingtalk.d.ts
type DingtalkMsgType = 'text' | 'markdown' | 'link' | 'actionCard' | 'feedCard';
interface DingtalkConfig {
  /**
   * 钉钉机器人 access_token。官方文档：https://developers.dingtalk.com/document/app/custom-robot-access
   */
  DINGTALK_ACCESS_TOKEN: string;
  /**
   * 加签安全秘钥（HmacSHA256）
   */
  DINGTALK_SECRET?: string;
}
type DingtalkConfigSchema = ConfigSchema<DingtalkConfig>;
declare const dingtalkConfigSchema: DingtalkConfigSchema;
type DingtalkOption = Partial<(Text | Markdown | Link | FeedCard | ActionCard)>;
type TempDingtalkOption = {
  msgtype?: DingtalkOption['msgtype'];
  text?: Partial<Text['text']>;
  markdown?: Partial<Markdown['markdown']>;
  link?: Partial<Link['link']>;
  actionCard?: Partial<{
    title: string;
    text: string;
    btnOrientation?: '0' | '1';
  }> & Partial<OverallJump> & Partial<IndependentJump>;
  feedCard?: Partial<FeedCard['feedCard']>;
  at?: Text['at'];
  [key: string]: any;
};
type DingtalkOptionSchema = OptionSchema<TempDingtalkOption>;
declare const dingtalkOptionSchema: DingtalkOptionSchema;
interface DingtalkResponse {
  errcode: number;
  errmsg: string;
}
/**
 * 钉钉机器人推送
 * 在 [dingtalk-robot-sdk](https://github.com/ineo6/dingtalk-robot-sdk) 的基础上重构了一下，用法几乎完全一致。
 * @author CaoMeiYouRen
 * @date 2021-02-27
 * @export
 * @class Dingtalk
 */
declare class Dingtalk implements Send {
  static readonly namespace = "\u9489\u9489";
  static readonly configSchema: ConfigSchema<DingtalkConfig>;
  static readonly optionSchema: ConfigSchema<TempDingtalkOption>;
  private ACCESS_TOKEN;
  /**
   * 加签安全秘钥（HmacSHA256）
   *
   * @private
   */
  private SECRET?;
  private webhook;
  /**
   * 参考文档 [钉钉开放平台 - 自定义机器人接入](https://developers.dingtalk.com/document/app/custom-robot-access)
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config
   */
  constructor(config: DingtalkConfig);
  private getSign;
  private push;
  /**
   *
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息的标题
   * @param [desp] 消息的内容，支持 Markdown
   * @returns
   */
  send(title: string, desp?: string, option?: DingtalkOption): Promise<SendResponse<DingtalkResponse>>;
}
//#endregion
//#region src/push/discord.d.ts
interface DiscordConfig {
  /**
   * Webhook Url 可在服务器设置 -> 整合 -> Webhook -> 创建 Webhook 中获取
   */
  DISCORD_WEBHOOK: string;
  /**
   * 代理地址
   */
  PROXY_URL?: string;
}
type DiscordConfigSchema = ConfigSchema<DiscordConfig>;
declare const discordConfigSchema: DiscordConfigSchema;
/**
 * Discord 额外选项
 * 由于参数过多，因此请参考官方文档进行配置。
 * @link https://discord.com/developers/docs/resources/webhook#execute-webhook
 */
type DiscordOption = {
  /**
   * 机器人显示的名称
   */
  username?: string;
  /**
   * 机器人头像的 Url
   */
  avatar_url?: string;
  [key: string]: any;
};
type DiscordOptionSchema = OptionSchema<DiscordOption>;
declare const discordOptionSchema: DiscordOptionSchema;
interface DiscordResponse {}
/**
 * Discord Webhook 推送
 *
 * @author CaoMeiYouRen
 * @date 2023-09-17
 * @export
 * @class Discord
 */
declare class Discord implements Send {
  static readonly namespace = "Discord";
  static readonly configSchema: ConfigSchema<DiscordConfig>;
  static readonly optionSchema: ConfigSchema<DiscordOption>;
  /**
   * Webhook Url 可在服务器设置 -> 整合 -> Webhook -> 创建 Webhook 中获取
   *
   * @author CaoMeiYouRen
   * @date 2023-09-17
   * @private
   */
  private DISCORD_WEBHOOK;
  proxyUrl: string;
  /**
   * 创建 Discord 实例
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 配置
   */
  constructor(config: DiscordConfig);
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息的标题
   * @param [desp] 消息的描述。最多 2000 个字符
   * @param [option] 额外选项
   */
  send(title: string, desp?: string, option?: DiscordOption): Promise<SendResponse<DiscordResponse>>;
}
//#endregion
//#region src/push/feishu.d.ts
interface FeishuConfig {
  /**
   * 飞书应用 ID。官方文档：https://open.feishu.cn/document/server-docs/api-call-guide/terminology#b047be0c
   */
  FEISHU_APP_ID: string;
  /**
   * 飞书应用密钥。官方文档：https://open.feishu.cn/document/server-docs/api-call-guide/terminology#1b5fb6cd
   */
  FEISHU_APP_SECRET: string;
}
type FeishuConfigSchema = ConfigSchema<FeishuConfig>;
declare const feishuConfigSchema: FeishuConfigSchema;
type FeishuOption = {
  receive_id_type: 'open_id' | 'union_id' | 'user_id' | 'email' | 'chat_id';
  receive_id: string;
  msg_type: 'text' | 'post' | 'image' | 'file' | 'audio' | 'media' | 'sticker' | 'interactive' | 'share_chat' | 'share_user' | 'system';
  content?: string;
  uuid?: string;
};
type FeishuOptionSchema = OptionSchema<FeishuOption>;
declare const feishuOptionSchema: FeishuOptionSchema;
/**
 * 飞书。官方文档：https://open.feishu.cn/document/home/index
 *
 * @author CaoMeiYouRen
 * @date 2025-02-10
 * @export
 * @class Feishu
 */
declare class Feishu implements Send {
  static readonly namespace = "\u98DE\u4E66";
  static readonly configSchema: ConfigSchema<FeishuConfig>;
  static readonly optionSchema: ConfigSchema<FeishuOption>;
  private readonly config;
  /**
  * accessToken 的过期时间(时间戳)
  */
  private expiresTime;
  private accessToken;
  constructor(config: FeishuConfig);
  private getAccessToken;
  send(title: string, desp?: string, option?: FeishuOption): Promise<SendResponse>;
}
//#endregion
//#region src/push/i-got.d.ts
interface IGotConfig {
  /**
   * 微信搜索小程序“iGot”获取推送key
   */
  I_GOT_KEY: string;
}
type IGotConfigSchema = ConfigSchema<IGotConfig>;
declare const iGotConfigSchema: IGotConfigSchema;
interface IGotOption {
  /**
   * 链接； 点开消息后会主动跳转至此地址
   */
  url?: string;
  /**
   * 是否自动复制； 为1自动复制
   */
  automaticallyCopy?: number;
  /**
   * 紧急消息，为1表示紧急。此消息将置顶在小程序内， 同时会在推送的消息内做一定的特殊标识
   */
  urgent?: number;
  /**
   * 需要自动复制的文本内容
   */
  copy?: string;
  /**
   * 主题； 订阅链接下有效；对推送内容分类，用户可选择性订阅
   */
  topic?: string;
  [key: string]: any;
}
type IGotOptionSchema = OptionSchema<IGotOption>;
declare const iGotOptionSchema: IGotOptionSchema;
interface IGotResponse {
  /**
   * 状态码； 0为正常
   */
  ret: number;
  /**
   * 响应结果
   */
  data: {
    /**
     * 消息记录，后期开放其他接口用
     * */
    id: string;
  };
  /**
   * 结果描述
   */
  errMsg: string;
}
/**
 * iGot 推送，官方文档：http://hellyw.com
 *
 * @author CaoMeiYouRen
 * @date 2021-03-03
 * @export
 * @class IGot
 */
declare class IGot implements Send {
  static readonly namespace = "iGot";
  static readonly configSchema: ConfigSchema<IGotConfig>;
  static readonly optionSchema: ConfigSchema<IGotOption>;
  /**
   * 微信搜索小程序“iGot”获取推送key
   *
   * @private
   */
  private I_GOT_KEY;
  /**
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 微信搜索小程序“iGot”获取推送key
   */
  constructor(config: IGotConfig);
  /**
   *
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param [desp] 消息正文
   * @param [option] 额外选项
   * @returns
   */
  send(title: string, desp?: string, option?: IGotOption): Promise<SendResponse<IGotResponse>>;
}
//#endregion
//#region src/push/ntfy.d.ts
interface NtfyConfig {
  /**
   * 推送地址
   */
  NTFY_URL: string;
  /**
   * 主题
   * 用于区分不同的推送目标。
   * 主题本质上是一个密码，所以请选择不容易猜到的东西。
   * 例如：`my-topic`
   */
  NTFY_TOPIC: string;
  /**
   * 认证参数。
   * 支持 Basic Auth、Bearer Token。
   * Basic Auth 示例："Basic dGVzdDpwYXNz"
   * Bearer Token 示例："Bearer tk_..."
   */
  NTFY_AUTH?: string;
}
type NtfyConfigSchema = ConfigSchema<NtfyConfig>;
declare const ntfyConfigSchema: NtfyConfigSchema;
interface NtfyOption {
  /**
   * 通知中显示的标题
   */
  title?: string;
  /**
   * 通知中显示的消息正文
   */
  message?: string;
  /**
   * 消息正文
   */
  body?: string;
  /**
   * 消息优先级（1-5，1最低，5最高）
   */
  priority?: number;
  /**
   * 标签列表（逗号分隔），支持Emoji短代码
   */
  tags?: string;
  /**
   * 启用Markdown格式化（设为`true`或`yes`）
   */
  markdown?: boolean;
  /**
   * 延迟发送时间（支持时间戳、自然语言如`tomorrow 10am`）
   */
  delay?: string;
  /**
   * 点击通知时打开的URL
   */
  click?: string;
  /**
   * 附加文件的URL
   */
  attach?: string;
  /**
   * 附件的显示文件名
   */
  filename?: string;
  /**
   * 通知图标的URL（仅支持JPEG/PNG）
   */
  icon?: string;
  /**
   * 定义通知的操作按钮（JSON或简写格式）
   */
  actions?: string;
  /**
   * 设为`no`禁止服务器缓存消息
   */
  cache?: boolean;
  /**
   * 设为`no`禁止转发到Firebase（仅影响Android推送）
   */
  firebase?: boolean;
  /**
   * 设为`1`启用UnifiedPush模式（用于Matrix网关）
   */
  unifiedPush?: boolean;
  /**
   * 将通知转发到指定邮箱
   */
  email?: string;
  /**
   * 发送语音呼叫（需验证手机号，仅限认证用户）
   */
  call?: string;
  /**
   * 设为`text/markdown`启用Markdown
   */
  contentType?: string;
  /**
   * 直接上传文件作为附件（需设置`X-Filename`）
   */
  file?: File;
}
type NtfyOptionSchema = OptionSchema<NtfyOption>;
declare const ntfyOptionSchema: NtfyOptionSchema;
interface NtfyResponse {
  /**
   * 消息ID
   */
  id: string;
  /**
   * 消息发布时间（Unix时间戳）
   */
  time: number;
  /**
   * 消息过期时间（Unix时间戳）
   */
  expires: number;
  /**
   * 事件类型
   */
  event: string;
  /**
   * 主题
   */
  topic: string;
  /**
   * 消息内容
   */
  message: string;
}
/**
 * ntfy推送。
 * 官方文档：https://ntfy.sh/docs/publish/
 *
 * @author CaoMeiYouRen
 * @date 2025-02-11
 * @export
 * @class Ntfy
 */
declare class Ntfy implements Send {
  static readonly namespace = "ntfy";
  static readonly configSchema: ConfigSchema<NtfyConfig>;
  static readonly optionSchema: ConfigSchema<NtfyOption>;
  /**
   * 推送地址
   */
  private NTFY_URL;
  /**
   * 认证参数。
   * 支持 Basic Auth、Bearer Token。
   * Basic Auth 示例："Basic dGVzdDpwYXNz"
   * Bearer Token 示例："Bearer tk_..."
   */
  private NTFY_AUTH?;
  /**
   * 主题
   * 用于区分不同的推送目标。
   * 主题本质上是一个密码，所以请选择不容易猜到的东西。
   * 例如：`my-topic`
   */
  private NTFY_TOPIC;
  constructor(config: NtfyConfig);
  send(title: string, desp: string, option?: NtfyOption): Promise<SendResponse<NtfyResponse>>;
}
//#endregion
//#region src/push/one-bot.d.ts
interface OneBotConfig {
  /**
   * OneBot HTTP 基础路径
   */
  ONE_BOT_BASE_URL: string;
  /**
   * OneBot AccessToken
   * 出于安全原因，请务必设置 AccessToken
   */
  ONE_BOT_ACCESS_TOKEN?: string;
}
type OneBotConfigSchema = ConfigSchema<OneBotConfig>;
declare const oneBotConfigSchema: OneBotConfigSchema;
interface OneBotPrivateMsgOption {
  /**
   * 消息类型
   */
  message_type: 'private';
  /**
   * 对方 QQ 号
   */
  user_id: number;
}
interface OneBotGroupMsgOption {
  /**
   * 消息类型
   */
  message_type: 'group';
  /**
   * 群号
   */
  group_id: number;
}
type OneBotOption = (OneBotPrivateMsgOption | OneBotGroupMsgOption) & {
  /**
   * 消息内容是否作为纯文本发送（即不解析 CQ 码），只在 message 字段是字符串时有效
   */
  auto_escape?: boolean;
};
type OneBotMsgType = OneBotOption['message_type'];
type OneBotOptionSchema = OptionSchema<{
  message_type: OneBotMsgType;
  user_id?: number;
  group_id?: number;
  auto_escape?: boolean;
}>;
declare const oneBotOptionSchema: OneBotOptionSchema;
interface OneBotData {
  ClassType: string;
  message_id: number;
}
interface OneBotResponse {
  status: string;
  retcode: number;
  data: OneBotData;
  echo?: any;
}
/**
 * OneBot。官方文档：https://github.com/botuniverse/onebot-11
 * 本项目实现的版本为 OneBot 11
 * @author CaoMeiYouRen
 * @date 2023-10-22
 * @export
 * @class OneBot
 */
declare class OneBot implements Send {
  static readonly namespace = "OneBot";
  static readonly configSchema: ConfigSchema<OneBotConfig>;
  static readonly optionSchema: ConfigSchema<{
    message_type: OneBotMsgType;
    user_id?: number;
    group_id?: number;
    auto_escape?: boolean;
  }>;
  /**
   *  OneBot 协议版本号
   *
   * @author CaoMeiYouRen
   * @date 2023-10-22
   * @static
   */
  static version: number;
  /**
   * OneBot HTTP 基础路径
   *
   * @author CaoMeiYouRen
   * @date 2023-10-22
   * @private
   * @example http://127.0.0.1
   */
  private ONE_BOT_BASE_URL;
  /**
   * OneBot AccessToken
   * 出于安全原因，请务必设置 AccessToken
   * @author CaoMeiYouRen
   * @date 2023-10-22
   * @private
   */
  private ONE_BOT_ACCESS_TOKEN?;
  /**
   * 创建 OneBot 实例
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config OneBot 配置
   */
  constructor(config: OneBotConfig);
  /**
   *
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param desp 消息正文
   * @param option 额外推送选项
   */
  send(title: string, desp: string, option: OneBotOption): Promise<SendResponse<OneBotResponse>>;
}
//#endregion
//#region src/push/push-deer.d.ts
type PushDeerPushType = 'markdown' | 'text' | 'image';
interface PushDeerConfig {
  /**
   * pushkey。请参考 https://github.com/easychen/pushdeer 获取
   */
  PUSH_DEER_PUSH_KEY: string;
  /**
   * 使用自架版时的服务器端地址。例如 http://127.0.0.1:8800。默认为 https://api2.pushdeer.com
   */
  PUSH_DEER_ENDPOINT?: string;
}
type PushDeerConfigSchema = ConfigSchema<PushDeerConfig>;
declare const pushDeerConfigSchema: PushDeerConfigSchema;
interface PushDeerOption {
  /**
   * 格式。文本=text，markdown，图片=image，默认为markdown。type 为 image 时，text 中为要发送图片的URL
   */
  type?: PushDeerPushType;
}
type PushDeerOptionSchema = OptionSchema<PushDeerOption>;
declare const pushDeerOptionSchema: PushDeerOptionSchema;
interface PushDeerResponse {
  /**
   * 正确为0，错误为非0
   */
  code: number;
  /**
   * 错误信息。无错误时无此字段
   */
  error: string;
  /**
   * 消息内容，错误时无此字段
   */
  content: {
    result: string[];
  };
}
/**
 * PushDeer 推送。 官方文档 https://github.com/easychen/pushdeer
 *
 * @author CaoMeiYouRen
 * @date 2022-02-28
 * @export
 * @class PushDeer
 */
declare class PushDeer implements Send {
  static readonly namespace = "PushDeer";
  static readonly configSchema: ConfigSchema<PushDeerConfig>;
  static readonly optionSchema: ConfigSchema<PushDeerOption>;
  /**
   * pushkey，请参考 https://github.com/easychen/pushdeer 获取
   *
   * @author CaoMeiYouRen
   * @date 2022-02-28
   * @private
   */
  private PUSH_DEER_PUSH_KEY;
  /**
   * 使用自架版时的服务器端地址。例如 http://127.0.0.1:8800
   *
   * @author CaoMeiYouRen
   * @date 2022-02-28
   * @private
   */
  private PUSH_DEER_ENDPOINT;
  /**
   * 创建 PushDeer 实例
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 配置
   */
  constructor(config: PushDeerConfig);
  /**
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param text 推送消息内容
   * @param [desp=''] 消息内容第二部分
   * @param [option={}] 额外推送选项
   */
  send(title: string, desp?: string, option?: PushDeerOption): Promise<SendResponse<PushDeerResponse>>;
}
//#endregion
//#region src/push/push-plus.d.ts
/**
html	默认模板，支持html文本
txt	纯文本展示，不转义html
json	内容基于json格式展示
markdown	内容基于markdown格式展示
cloudMonitor	阿里云监控报警定制模板
jenkins	jenkins插件定制模板
route	路由器插件定制模板 */
type PushPlusTemplateType = 'html' | 'txt' | 'json' | 'markdown' | 'cloudMonitor' | 'jenkins' | 'route';
/**
wechat	免费	微信公众号
webhook	免费	第三方webhook；企业微信、钉钉、飞书、server酱；webhook机器人推送
cp	免费	企业微信应用；具体参考企业微信应用推送
mail	免费	邮箱；具体参考邮件渠道使用说明
sms	收费	短信，未开放
 */
type PushPlusChannelType = 'wechat' | 'webhook' | 'cp' | 'sms' | 'mail';
interface PushPlusConfig {
  /**
   *  请前往 https://www.pushplus.plus 领取
   */
  PUSH_PLUS_TOKEN: string;
}
type PushPlusConfigSchema = ConfigSchema<PushPlusConfig>;
declare const pushPlusConfigSchema: PushPlusConfigSchema;
interface PushPlusOption {
  /**
   * 模板类型
   */
  template?: PushPlusTemplateType;
  /**
   * 渠道类型
   */
  channel?: PushPlusChannelType;
  /**
   * 群组编码，不填仅发送给自己；channel为webhook时无效
   */
  topic?: string;
  /**
   * webhook编码，仅在channel使用webhook渠道和CP渠道时需要填写
   */
  webhook?: string;
  /**
   * 发送结果回调地址
   */
  callbackUrl?: string;
  /**
   * 毫秒时间戳。格式如：1632993318000。服务器时间戳大于此时间戳，则消息不会发送
   */
  timestamp?: number;
}
type PushPlusOptionSchema = OptionSchema<PushPlusOption>;
declare const pushPlusOptionSchema: PushPlusOptionSchema;
interface PushPlusResponse {
  code: number;
  msg: string;
  data: any;
}
/**
 * pushplus 推送加开放平台，仅支持一对一推送。官方文档：https://www.pushplus.plus/doc/
 *
 * @author CaoMeiYouRen
 * @date 2021-03-03
 * @export
 * @class PushPlus
 */
declare class PushPlus implements Send {
  static readonly namespace = "PushPlus";
  static readonly configSchema: ConfigSchema<PushPlusConfig>;
  static readonly optionSchema: ConfigSchema<PushPlusOption>;
  /**
   * 请前往 https://www.pushplus.plus 领取
   *
   * @private
   */
  private PUSH_PLUS_TOKEN;
  /**
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 请前往 https://www.pushplus.plus 领取
   */
  constructor(config: PushPlusConfig);
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param [desp=''] 消息内容
   * @param [option] 额外推送选项
   */
  send(title: string, desp?: string, option?: PushPlusOption): Promise<SendResponse<PushPlusResponse>>;
}
//#endregion
//#region src/push/qmsg.d.ts
/**
 * 推送类型，见 [Qmsg](https://qmsg.zendee.cn/docs/api)。
 */
type QmsgPushType = 'send' | 'group';
interface QmsgConfig {
  /**
   * 推送的 key。在 [Qmsg 酱管理台](https://qmsg.zendee.cn/user) 查看
   */
  QMSG_KEY: string;
}
type QmsgConfigSchema = ConfigSchema<QmsgConfig>;
declare const qmsgConfigSchema: QmsgConfigSchema;
interface QmsgPrivateMsgOption {
  /**
   * send 表示发送消息给指定的QQ号，group 表示发送消息给指定的QQ群。默认为 send
   */
  type: 'send';
  /**
   * 指定要接收消息的QQ号或者QQ群。多个以英文逗号分割，例如：12345,12346
   */
  qq: string;
}
interface QmsgGroupMsgOption {
  /**
   * send 表示发送消息给指定的QQ号，group 表示发送消息给指定的QQ群。默认为 send
   */
  type: 'group';
  /**
   * 指定要接收消息的QQ号或者QQ群。多个以英文逗号分割，例如：12345,12346
   */
  qq: string;
}
type QmsgOption = (QmsgPrivateMsgOption | QmsgGroupMsgOption) & {
  /**
   * 机器人的QQ号。指定使用哪个机器人来发送消息，不指定则会自动随机选择一个在线的机器人发送消息。该参数仅私有云有效
   */
  bot?: string;
};
type QmsgOptionSchema = OptionSchema<{
  type: 'send' | 'group';
  qq: string;
  bot?: string;
}>;
declare const qmsgOptionSchema: QmsgOptionSchema;
interface QmsgResponse {
  /**
   * 本次请求是否成功
   */
  success: boolean;
  /**
   * 本次请求结果描述
   */
  reason: string;
  /**
   * 错误代码。错误代码目前不可靠，如果要判断是否成功请使用success
   */
  code: number;
  info: any;
}
/**
 * Qmsg酱。使用说明见 [Qmsg酱](https://qmsg.zendee.cn/docs)
 *
 * @author CaoMeiYouRen
 * @date 2022-02-17
 * @export
 * @class Qmsg
 */
declare class Qmsg implements Send {
  static readonly namespace = "Qmsg\u9171";
  static readonly configSchema: ConfigSchema<QmsgConfig>;
  static readonly optionSchema: ConfigSchema<{
    type: "send" | "group";
    qq: string;
    bot?: string;
  }>;
  private QMSG_KEY;
  constructor(config: QmsgConfig);
  /**
   *
   * 发送消息
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param [desp] 消息描述
   * @param [option] QmsgOption 选项
   */
  send(title: string, desp: string, option: QmsgOption): Promise<SendResponse<QmsgResponse>>;
}
//#endregion
//#region src/push/server-chan-turbo.d.ts
type ChannelValue = 98 | 66 | 1 | 2 | 3 | 8 | 0 | 88 | 18 | 9;
type Channel = `${ChannelValue}` | `${ChannelValue}|${ChannelValue}`;
interface ServerChanTurboConfig {
  /**
   * Server酱 Turbo 的 SCTKEY
   * 请前往 https://sct.ftqq.com/sendkey 领取
   */
  SERVER_CHAN_TURBO_SENDKEY: string;
}
type ServerChanTurboConfigSchema = ConfigSchema<ServerChanTurboConfig>;
declare const serverChanTurboConfigSchema: ServerChanTurboConfigSchema;
/**
 * 附加参数
 */
type ServerChanTurboOption = {
  /**
   *  消息卡片内容，选填。最大长度 64。如果不指定，将自动从 desp 中截取生成。
   */
  short?: string;
  /**
   * 是否隐藏调用 IP，选填。如果不指定，则显示；为 1 则隐藏。
   */
  noip?: '1' | 1 | true;
  /**
   * 动态指定本次推送使用的消息通道，选填。如不指定，则使用网站上的消息通道页面设置的通道。支持最多两个通道，多个通道值用竖线 "|" 隔开。
   * 通道对应的值如下：
   * 官方Android版·β=98
   * 企业微信应用消息=66
   * 企业微信群机器人=1
   * 钉钉群机器人=2
   * 飞书群机器人=3
   * Bark iOS=8
   * 测试号=0
   * 自定义=88
   * PushDeer=18
   * 方糖服务号=9
   */
  channel?: Channel;
  /**
   * 消息抄送的 openid，选填。只支持测试号和企业微信应用消息通道。多个 openid 用 "," 隔开。企业微信应用消息通道的 openid 参数，内容为接收人在企业微信中的 UID，多个人请 "|" 隔开。
   */
  openid?: string;
};
type ServerChanTurboOptionSchema = OptionSchema<{
  short?: string;
  openid?: string;
  channel?: string;
  noip?: boolean;
}>;
declare const serverChanTurboOptionSchema: ServerChanTurboOptionSchema;
interface ServerChanTurboResponse {
  code: number;
  message: string;
  data: {
    pushid: string;
    readkey: string;
    error: string;
    errno: number;
  };
}
/**
 * Server 酱·Turbo
 * 文档 https://sct.ftqq.com/
 *
 * @author CaoMeiYouRen
 * @date 2021-02-27
 * @export
 * @class ServerChanTurbo
 */
declare class ServerChanTurbo implements Send {
  static readonly namespace = "Server\u9171\u00B7Turbo";
  static readonly configSchema: ConfigSchema<ServerChanTurboConfig>;
  static readonly optionSchema: ConfigSchema<{
    short?: string;
    openid?: string;
    channel?: string;
    noip?: boolean;
  }>;
  /**
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 请前往 https://sct.ftqq.com/sendkey 领取
   */
  constructor(config: ServerChanTurboConfig);
  /**
   *
   *
   * @private 请前往 https://sct.ftqq.com/sendkey 领取
   */
  private SCTKEY;
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息的标题
   * @param [desp=''] 消息的内容，支持 Markdown
   * @param [option={}] 额外发送选项
   */
  send(title: string, desp?: string, option?: ServerChanTurboOption): Promise<SendResponse<ServerChanTurboResponse>>;
}
//#endregion
//#region src/push/server-chan-v3.d.ts
interface ServerChanV3Config {
  /**
   * 请前往 https://sc3.ft07.com/sendkey 领取
   */
  SERVER_CHAN_V3_SENDKEY: string;
}
type ServerChanV3ConfigSchema = ConfigSchema<ServerChanV3Config>;
declare const serverChanV3ConfigSchema: ServerChanV3ConfigSchema;
/**
 * 附加参数
 */
type ServerChanV3Option = {
  tags?: string | string[];
  short?: string;
};
type ServerChanV3OptionSchema = OptionSchema<{
  tags?: string[];
  short?: string;
}>;
declare const serverChanV3OptionSchema: ServerChanV3OptionSchema;
interface ServerChanV3Response {
  code: number;
  message: string;
  errno: number;
  data: {
    pushid: string;
    meta: {
      android: any;
      devices: any[];
    };
  };
}
/**
 * Server酱³
 * 文档：https://sc3.ft07.com/doc
 * @author CaoMeiYouRen
 * @date 2024-10-04
 * @export
 * @class ServerChanV3
 */
declare class ServerChanV3 implements Send {
  static readonly namespace = "Server\u9171\u00B3";
  static readonly configSchema: ConfigSchema<ServerChanV3Config>;
  static readonly optionSchema: ConfigSchema<{
    tags?: string[];
    short?: string;
  }>;
  /**
   * 请前往 https://sc3.ft07.com/sendkey 领取
   *
   * @author CaoMeiYouRen
   * @date 2024-10-04
   * @private
   */
  private sendkey;
  private uid;
  /**
   * 创建 ServerChanV3 实例
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param config 请前往 https://sc3.ft07.com/sendkey 领取
   */
  constructor(config: ServerChanV3Config);
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息的标题
   * @param [desp=''] 消息的内容，支持 Markdown
   * @param [option={}] 额外发送选项
   */
  send(title: string, desp?: string, option?: ServerChanV3Option): Promise<SendResponse<ServerChanV3Response>>;
}
//#endregion
//#region src/push/telegram.d.ts
interface TelegramConfig {
  /**
   * 机器人令牌
   * 您可以从 https://t.me/BotFather 获取 Token。
   * @author CaoMeiYouRen
   * @date 2023-10-22
   */
  TELEGRAM_BOT_TOKEN: string;
  /**
   * 支持对话/群组/频道的 Chat ID
   * 您可以转发消息到 https://t.me/JsonDumpBot 获取 Chat ID
   * @author CaoMeiYouRen
   * @date 2023-10-22
   */
  TELEGRAM_CHAT_ID: number;
  /**
   * 代理地址
   */
  PROXY_URL?: string;
}
type TelegramConfigSchema = ConfigSchema<TelegramConfig>;
declare const telegramConfigSchema: TelegramConfigSchema;
/**
 * 参考 https://core.telegram.org/bots/api#sendmessage
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @interface TelegramOption
 */
interface TelegramOption {
  /**
   * 静默发送
   * 静默地发送消息。消息发布后用户会收到无声通知。
   */
  disable_notification?: boolean;
  /**
   * 阻止转发/保存
   * 如果启用，Telegram 中的机器人消息将受到保护，不会被转发和保存。
   */
  protect_content?: boolean;
  /**
   * 话题 ID
   * 可选的唯一标识符，用以向该标识符对应的话题发送消息，仅限启用了话题功能的超级群组可用
   */
  message_thread_id?: string;
  /**
   * 消息格式，支持 MarkdownV2、HTML 等格式。Markdown字段已弃用，请改为使用MarkdownV2。
   * 详见：https://core.telegram.org/bots/api#formatting-options
   */
  parse_mode?: 'MarkdownV2' | 'HTML';
  [key: string]: any;
}
type TelegramOptionSchema = OptionSchema<TelegramOption>;
declare const telegramOptionSchema: TelegramOptionSchema;
interface From {
  id: number;
  is_bot: boolean;
  first_name: string;
  username: string;
}
interface Chat {
  id: number;
  first_name: string;
  last_name: string;
  username: string;
  type: string;
}
interface Result {
  message_id: number;
  from: From;
  chat: Chat;
  date: number;
  text: string;
}
interface TelegramResponse {
  ok: boolean;
  result: Result;
}
/**
 *  Telegram Bot 推送。
 *  官方文档：https://core.telegram.org/bots/api#making-requests
 *
 * @author CaoMeiYouRen
 * @date 2023-09-16
 * @export
 * @class Telegram
 */
declare class Telegram implements Send {
  static readonly namespace = "Telegram";
  static readonly configSchema: ConfigSchema<TelegramConfig>;
  static readonly optionSchema: ConfigSchema<TelegramOption>;
  /**
   * 机器人令牌
   * 您可以从 https://t.me/BotFather 获取 Token。
   * @author CaoMeiYouRen
   * @date 2023-10-22
   * @private
   */
  private TELEGRAM_BOT_TOKEN;
  /**
   * 支持对话/群组/频道的 Chat ID
   * 您可以转发消息到 https://t.me/JsonDumpBot 获取 Chat ID
   * @author CaoMeiYouRen
   * @date 2023-10-22
   * @private
   */
  private TELEGRAM_CHAT_ID;
  proxyUrl?: string;
  constructor(config: TelegramConfig);
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-09
   * @param title 消息标题
   * @param [desp] 消息正文，和 title 相加后不超过 4096 个字符
   * @param [option] 其他参数
   */
  send(title: string, desp?: string, option?: TelegramOption): Promise<SendResponse<TelegramResponse>>;
}
//#endregion
//#region src/push/wechat-app.d.ts
type WechatAppMsgType = 'text' | 'markdown' | 'voice' | 'file' | 'image' | 'voice' | 'video' | 'textcard' | 'news' | 'mpnews' | 'miniprogram_notice' | 'template_card';
interface WechatAppConfig {
  /**
   * 企业ID，获取方式参考：[术语说明-corpid](https://work.weixin.qq.com/api/doc/90000/90135/91039#14953/corpid)
   *
   */
  WECHAT_APP_CORPID: string;
  /**
   * 应用的凭证密钥，获取方式参考：[术语说明-secret](https://work.weixin.qq.com/api/doc/90000/90135/91039#14953/secret)
   *
   */
  WECHAT_APP_SECRET: string;
  /**
   * 企业应用的id。企业内部开发，可在应用的设置页面查看
   *
   */
  WECHAT_APP_AGENTID: number;
}
type WechatAppConfigSchema = ConfigSchema<WechatAppConfig>;
declare const wechatAppConfigSchema: WechatAppConfigSchema;
type WechatAppOption = {
  msgtype: WechatAppMsgType;
  safe?: 0 | 1;
  enable_id_trans?: 0 | 1;
  enable_duplicate_check?: 0 | 1;
  duplicate_check_interval?: number;
  [key: string]: any;
  touser?: string;
} & ({
  toparty?: string;
} | {
  totag?: string;
});
type WechatAppOptionSchema = OptionSchema<WechatAppOption>;
declare const wechatAppOptionSchema: WechatAppOptionSchema;
interface WechatAppResponse {
  errcode: number;
  errmsg: string;
  invaliduser?: string;
  invalidparty?: string;
  invalidtag?: string;
  unlicenseduser?: string;
  msgid: string;
  response_code?: string;
}
/**
 * 企业微信应用推送，文档：https://developer.work.weixin.qq.com/document/path/90664
 *
 * @author CaoMeiYouRen
 * @date 2021-02-28
 * @export
 * @class WechatApp
 */
declare class WechatApp implements Send {
  static readonly namespace = "\u4F01\u4E1A\u5FAE\u4FE1\u5E94\u7528";
  static readonly configSchema: ConfigSchema<WechatAppConfig>;
  static readonly optionSchema: WechatAppOptionSchema;
  private ACCESS_TOKEN;
  private WECHAT_APP_CORPID;
  private WECHAT_APP_SECRET;
  private WECHAT_APP_AGENTID;
  /**
   * ACCESS_TOKEN 的过期时间(时间戳)
   *
   * @private
   */
  private expiresTime;
  constructor(config: WechatAppConfig);
  private getAccessToken;
  /**
   * 延长过期时间
   *
   * @author CaoMeiYouRen
   * @date 2021-03-03
   * @private
   * @param expiresIn 延长的秒数
   */
  private extendexpiresTime;
  /**
   * 发送消息
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param [desp] 消息内容，最长不超过2048个字节，超过将截断（支持id转译）
   * @param [option] 额外推送选项
   */
  send(title: string, desp?: string, option?: WechatAppOption): Promise<SendResponse<WechatAppResponse>>;
}
//#endregion
//#region src/push/wechat-robot.d.ts
type WechatRobotMsgType = 'text' | 'markdown' | 'image' | 'news' | 'file' | 'voice' | 'template_card';
interface WechatRobotConfig {
  WECHAT_ROBOT_KEY: string;
}
type WechatRobotConfigSchema = ConfigSchema<WechatRobotConfig>;
declare const wechatRobotConfigSchema: WechatRobotConfigSchema;
interface WechatRobotOption {
  msgtype?: WechatRobotMsgType;
  [key: string]: any;
}
type WechatRobotOptionSchema = OptionSchema<WechatRobotOption>;
declare const wechatRobotOptionSchema: WechatRobotOptionSchema;
interface WechatRobotResponse {
  errcode: number;
  errmsg: string;
}
/**
 * 企业微信群机器人。文档: [如何使用群机器人](https://developer.work.weixin.qq.com/document/path/91770)
 *
 * @author CaoMeiYouRen
 * @date 2021-02-28
 * @export
 * @class WechatRobot
 */
declare class WechatRobot implements Send {
  static readonly namespace = "\u4F01\u4E1A\u5FAE\u4FE1\u7FA4\u673A\u5668\u4EBA";
  static readonly configSchema: ConfigSchema<WechatRobotConfig>;
  static readonly optionSchema: ConfigSchema<WechatRobotOption>;
  private WECHAT_ROBOT_KEY;
  constructor(config: WechatRobotConfig);
  /**
   *
   *
   * @author CaoMeiYouRen
   * @date 2024-11-08
   * @param title 消息标题
   * @param [desp] 消息内容。text内容，最长不超过2048个字节；markdown内容，最长不超过4096个字节；必须是utf8编码
   * @param [option] 额外推送选项
   */
  send(title: string, desp?: string, option?: WechatRobotOption): Promise<SendResponse<WechatRobotResponse>>;
}
//#endregion
//#region src/push/xi-zhi.d.ts
interface XiZhiConfig {
  XI_ZHI_KEY: string;
}
type XiZhiConfigSchema = ConfigSchema<XiZhiConfig>;
declare const xiZhiConfigSchema: XiZhiConfigSchema;
interface XiZhiOption {}
type XiZhiOptionSchema = OptionSchema<XiZhiOption>;
declare const xiZhiOptionSchema: XiZhiOptionSchema;
interface XiZhiResponse {
  code: number;
  msg: string;
}
/**
 * 息知 推送，官方文档：https://xz.qqoq.net/#/index
 *
 * @author CaoMeiYouRen
 * @date 2022-02-18
 * @export
 * @class XiZhi
 */
declare class XiZhi implements Send {
  static readonly namespace = "\u606F\u77E5";
  static readonly configSchema: ConfigSchema<XiZhiConfig>;
  static readonly optionSchema: ConfigSchema<XiZhiOption>;
  private XI_ZHI_KEY;
  constructor(config: XiZhiConfig);
  send(title: string, desp?: string, option?: XiZhiOption): Promise<SendResponse<XiZhiResponse>>;
}
//#endregion
//#region src/push/wx-pusher.d.ts
interface WxPusherConfig {
  /**
   * WxPusher 的 appToken。在 https://wxpusher.zjiecode.com/admin/main/app/appToken 申请
   */
  WX_PUSHER_APP_TOKEN: string;
  /**
   * WxPusher 的 uid。在 https://wxpusher.zjiecode.com/admin/main/wxuser/list 查看
   */
  WX_PUSHER_UID: string;
}
type WxPusherConfigSchema = ConfigSchema<WxPusherConfig>;
declare const wxPusherConfigSchema: WxPusherConfigSchema;
interface WxPusherOption {
  /**
   * 消息摘要，显示在微信聊天页面或者模版消息卡片上，限制长度20，可以不传，不传默认截取content前面的内容。
   */
  summary?: string;
  /**
   * 内容类型 1表示文字  2表示html(只发送body标签内部的数据即可，不包括body标签) 3表示markdown
   * @default 1
   */
  contentType?: 1 | 2 | 3;
  /**
   * 是否保存发送内容，1保存，0不保存
   * @default 0
   */
  save?: 0 | 1;
  /**
   * 主题ID，可以根据主题ID发送消息，可以在主题管理中查看主题ID
   */
  topicIds?: number[];
  /**
   * 发送目标的UID，是一个数组。注意uids和topicIds可以同时填写，也可以只填写一个。
   */
  uids?: string[];
  /**
   * 发送url，可以不传，如果传了，则根据url弹出通知
   */
  url?: string;
  /**
   * 验证负载，仅针对text消息类型有效
   */
  verifyPayload?: string;
}
type WxPusherOptionSchema = OptionSchema<WxPusherOption>;
declare const wxPusherOptionSchema: WxPusherOptionSchema;
interface WxPusherResponse {
  /**
   * 请求是否成功
   */
  success: boolean;
  /**
   * 请求返回码
   */
  code: number;
  /**
   * 请求返回消息
   */
  msg: string;
  /**
   * 请求返回数据
   */
  data: {
    /**
     * 消息ID
     */
    messageId: number;
    /**
     * 消息编码
     */
    code: string;
  };
}
/**
 * WxPusher 推送。官方文档：https://wxpusher.zjiecode.com/docs
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @class WxPusher
 */
declare class WxPusher implements Send {
  static readonly namespace = "WxPusher";
  static readonly configSchema: ConfigSchema<WxPusherConfig>;
  static readonly optionSchema: ConfigSchema<WxPusherOption>;
  private WX_PUSHER_APP_TOKEN;
  private WX_PUSHER_UID;
  constructor(config: WxPusherConfig);
  send(title: string, desp?: string, option?: WxPusherOption): Promise<SendResponse<WxPusherResponse>>;
}
//#endregion
//#region src/one.d.ts
declare const PushAllInOne: {
  readonly CustomEmail: typeof CustomEmail;
  readonly Dingtalk: typeof Dingtalk;
  readonly Discord: typeof Discord;
  readonly Feishu: typeof Feishu;
  readonly IGot: typeof IGot;
  readonly Ntfy: typeof Ntfy;
  readonly OneBot: typeof OneBot;
  readonly PushDeer: typeof PushDeer;
  readonly PushPlus: typeof PushPlus;
  readonly Qmsg: typeof Qmsg;
  readonly ServerChanTurbo: typeof ServerChanTurbo;
  readonly ServerChanV3: typeof ServerChanV3;
  readonly Telegram: typeof Telegram;
  readonly WechatApp: typeof WechatApp;
  readonly WechatRobot: typeof WechatRobot;
  readonly WxPusher: typeof WxPusher;
  readonly XiZhi: typeof XiZhi;
};
type IPushAllInOne = typeof PushAllInOne;
type PushType = keyof IPushAllInOne;
type MetaPushConfig<T extends PushType = PushType> = {
  type: T;
  config: ConstructorParameters<IPushAllInOne[T]>[0];
  option: Parameters<IPushAllInOne[T]['prototype']['send']>[2];
};
/**
 * 从传入变量中读取配置，并选择一个渠道推送
 *
 * @author CaoMeiYouRen
 * @date 2024-11-09
 * @export
 * @template T
 * @param title 推送标题
 * @param desp 推送内容
 * @param pushConfig 推送配置
 */
declare function runPushAllInOne<T extends PushType>(title: string, desp: string, pushConfig: MetaPushConfig<T>): Promise<SendResponse<any>>;
type MetaCloudPushConfig<T extends PushType = PushType> = {
  type: T;
  config: ConstructorParameters<IPushAllInOne[T]>[0];
  option: Parameters<IPushAllInOne[T]['prototype']['send']>[2];
  /**
   * push-all-in-cloud 服务器地址
   */
  baseUrl: string;
  /**
   * push-all-in-cloud AUTH_FORWARD_KEY 鉴权密钥
   */
  authToken: string;
};
/**
 * 调用 push-all-in-cloud 服务进行推送
 *
 * @author CaoMeiYouRen
 * @date 2025-11-06
 * @export
 * @template T
 * @param title 推送标题
 * @param desp 推送内容
 * @param pushConfig 推送配置
 */
declare function runPushAllInCloud<T extends PushType>(title: string, desp: string, pushConfig: MetaCloudPushConfig<T>): Promise<SendResponse<any>>;
//#endregion
export { Channel, ChannelValue, Config, ConfigSchema, CustomEmail, CustomEmailConfig, CustomEmailConfigSchema, CustomEmailOption, CustomEmailOptionSchema, CustomEmailType, Dingtalk, DingtalkConfig, DingtalkConfigSchema, DingtalkMsgType, DingtalkOption, DingtalkOptionSchema, DingtalkResponse, Discord, DiscordConfig, DiscordConfigSchema, DiscordOption, DiscordOptionSchema, DiscordResponse, Feishu, FeishuConfig, FeishuConfigSchema, FeishuOption, FeishuOptionSchema, IGot, IGotConfig, IGotConfigSchema, IGotOption, IGotOptionSchema, IGotResponse, IPushAllInOne, MetaCloudPushConfig, MetaPushConfig, Ntfy, NtfyConfig, NtfyConfigSchema, NtfyOption, NtfyOptionSchema, NtfyResponse, OneBot, OneBotConfig, OneBotConfigSchema, OneBotData, OneBotGroupMsgOption, OneBotMsgType, OneBotOption, OneBotOptionSchema, OneBotPrivateMsgOption, OneBotResponse, Option, OptionSchema, PushAllInOne, PushDeer, PushDeerConfig, PushDeerConfigSchema, PushDeerOption, PushDeerOptionSchema, PushDeerPushType, PushDeerResponse, PushPlus, PushPlusChannelType, PushPlusConfig, PushPlusConfigSchema, PushPlusOption, PushPlusOptionSchema, PushPlusResponse, PushPlusTemplateType, PushType, Qmsg, QmsgConfig, QmsgConfigSchema, QmsgGroupMsgOption, QmsgOption, QmsgOptionSchema, QmsgPrivateMsgOption, QmsgPushType, QmsgResponse, Send, SendResponse, ServerChanTurbo, ServerChanTurboConfig, ServerChanTurboConfigSchema, ServerChanTurboOption, ServerChanTurboOptionSchema, ServerChanTurboResponse, ServerChanV3, ServerChanV3Config, ServerChanV3ConfigSchema, ServerChanV3Option, ServerChanV3OptionSchema, ServerChanV3Response, Telegram, TelegramConfig, TelegramConfigSchema, TelegramOption, TelegramOptionSchema, TelegramResponse, WechatApp, WechatAppConfig, WechatAppConfigSchema, WechatAppMsgType, WechatAppOption, WechatAppOptionSchema, WechatAppResponse, WechatRobot, WechatRobotConfig, WechatRobotConfigSchema, WechatRobotMsgType, WechatRobotOption, WechatRobotOptionSchema, WechatRobotResponse, WxPusher, WxPusherConfig, WxPusherConfigSchema, WxPusherOption, WxPusherOptionSchema, WxPusherResponse, XiZhi, XiZhiConfig, XiZhiConfigSchema, XiZhiOption, XiZhiOptionSchema, XiZhiResponse, customEmailConfigSchema, customEmailOptionSchema, dingtalkConfigSchema, dingtalkOptionSchema, discordConfigSchema, discordOptionSchema, feishuConfigSchema, feishuOptionSchema, iGotConfigSchema, iGotOptionSchema, ntfyConfigSchema, ntfyOptionSchema, oneBotConfigSchema, oneBotOptionSchema, pushDeerConfigSchema, pushDeerOptionSchema, pushPlusConfigSchema, pushPlusOptionSchema, qmsgConfigSchema, qmsgOptionSchema, runPushAllInCloud, runPushAllInOne, serverChanTurboConfigSchema, serverChanTurboOptionSchema, serverChanV3ConfigSchema, serverChanV3OptionSchema, telegramConfigSchema, telegramOptionSchema, wechatAppConfigSchema, wechatAppOptionSchema, wechatRobotConfigSchema, wechatRobotOptionSchema, wxPusherConfigSchema, wxPusherOptionSchema, xiZhiConfigSchema, xiZhiOptionSchema };
//# sourceMappingURL=index.d.mts.map