/** * WeChat HTTP 协议客户端 * * 纯协议层,无业务逻辑或状态管理 */ import type { WeixinCredentials, GetUpdatesResponse, GetUploadUrlResponse, GetConfigResponse, MessageItem, QrCodeStartResponse, QrCodeStatusResponse } from './weixin-types.js'; /** * 长轮询获取消息更新 */ export declare function getUpdates(creds: WeixinCredentials, getUpdatesBuf: string, timeoutMs?: number): Promise; /** * 发送消息 */ export declare function sendMessage(creds: WeixinCredentials, toUserId: string, items: MessageItem[], contextToken: string): Promise<{ clientId: string; }>; /** * 发送文本消息(便捷封装) */ export declare function sendTextMessage(creds: WeixinCredentials, toUserId: string, text: string, contextToken: string): Promise<{ clientId: string; }>; /** * 获取账号配置(typing_ticket 等) */ export declare function getConfig(creds: WeixinCredentials, ilinkUserId?: string, contextToken?: string): Promise; /** * 发送输入状态指示 */ export declare function sendTyping(creds: WeixinCredentials, ilinkUserId: string, typingTicket: string, typingStatus: number): Promise; /** * 获取 CDN 上传 URL */ export declare function getUploadUrl(creds: WeixinCredentials, fileKey: string, fileType: number, fileSize: number, fileMd5: string, cipherFileSize: number): Promise; /** * 启动 QR 码登录 */ export declare function startLoginQr(): Promise; /** * 轮询 QR 码登录状态 * * 注意:微信服务器可能长时间不响应,使用较短超时避免阻塞 */ export declare function pollLoginQrStatus(qrcode: string): Promise; //# sourceMappingURL=weixin-api.d.ts.map