import type WebSocket from 'ws'; import type { EnterpriseMedia } from '@xopcai/xopc/channels/enterprise/media.js'; import type { EnterpriseCredentials, EnterpriseRegistration } from '@xopcai/xopc/channels/enterprise/setup.js'; import { type OnSocketFailure, type SocketConnection } from '@xopcai/xopc/channels/enterprise/socket.js'; export declare const WECOM_QR_ORIGIN = "https://work.weixin.qq.com/ai/qc"; export declare const WECOM_WS_ENDPOINT = "wss://openws.work.weixin.qq.com"; export declare class WeComCommandError extends Error { readonly code: number; constructor(code: number); } export declare function beginWeComRegistration(signal: AbortSignal): Promise; export declare function selectWeComMediaType(media: EnterpriseMedia): 'image' | 'video' | 'voice' | 'file'; export interface WeComRawCallback { reqId: string; body: Record; } export declare class WeComWsClient { readonly botId: string; readonly secret: string; private socket?; private authenticatedSocket?; private readonly pending; constructor(botId: string, secret: string); isConnected(): boolean; private commandWithBody; private command; createSocketConnection(onCallback?: (cb: WeComRawCallback) => Promise, onDisconnectedEvent?: () => void): SocketConnection; run(signal: AbortSignal, onCallback: (cb: WeComRawCallback) => Promise, setOnline: (socket?: WebSocket) => void, onFailure?: OnSocketFailure): Promise; sendStreamChunk(reqId: string, streamId: string, content: string, finish: boolean): Promise; sendMarkdown(target: string, isGroup: boolean, text: string, replyId?: string, chunkLimit?: number): Promise; private uploadMedia; sendMedia(target: string, _isGroup: boolean, media: EnterpriseMedia, caption?: string, replyId?: string, chunkLimit?: number): Promise; } export declare function verifyWeComCredentials(credentials: EnterpriseCredentials): Promise;