apptise-core
Version:
Core library for Apptise unified notification system
36 lines • 1.12 kB
TypeScript
import type { NotificationMessage, NotificationResult, PluginConfig, PluginRegistration } from '../base/types.js';
import { NotificationPlugin } from '../base/plugin.js';
/**
* ServerChan 通知插件
* 支持 Server酱 推送服务
*/
export declare class ServerChanPlugin extends NotificationPlugin {
readonly registration: PluginRegistration;
private readonly serviceConfig;
/**
* 解析 ServerChan URL
* 支持格式:
* - serverchan://sendkey
* - sc://sendkey
* - schan://sendkey
* - serverchan://sendkey@custom.domain.com
*/
parseUrl(url: string): PluginConfig;
/**
* 发送通知到 ServerChan
*/
send(config: PluginConfig, message: NotificationMessage): Promise<NotificationResult>;
/**
* 验证 ServerChan 特定配置
*/
validateConfig(config: PluginConfig): boolean;
}
/**
* 创建 ServerChan 插件实例
*/
export declare function createServerChanPlugin(): ServerChanPlugin;
/**
* 默认 ServerChan 插件实例
*/
export declare const serverChanPlugin: ServerChanPlugin;
//# sourceMappingURL=serverchan.d.ts.map