apptise-core
Version:
Core library for Apptise unified notification system
37 lines • 1.18 kB
TypeScript
import { NotificationPlugin } from '../base/plugin.js';
import type { NotificationMessage, NotificationResult, PluginConfig, PluginRegistration } from '../base/types.js';
/**
* Google Chat 通知插件
* 支持通过 Webhook 向 Google Chat 发送消息
*/
export declare class GoogleChatPlugin extends NotificationPlugin {
readonly registration: PluginRegistration;
/**
* 解析 Google Chat URL
* 支持格式:
* 1. gchat://workspace/key/token
* 2. gchat://workspace/path?key=xxx&token=xxx
* @param url - Google Chat webhook URL
* @returns 解析后的插件配置
*/
parseUrl(url: string): PluginConfig;
/**
* 发送通知到 Google Chat
* @param config - 插件配置
* @param message - 通知消息
* @returns 发送结果
*/
send(config: PluginConfig, message: NotificationMessage): Promise<NotificationResult>;
/**
* 发送消息到 Google Chat
* @private
*/
private sendMessage;
/**
* 构建消息载荷
* @private
*/
private buildPayload;
}
export declare const googleChatPlugin: GoogleChatPlugin;
//# sourceMappingURL=google-chat.d.ts.map