import { MJConfig, MJMessage, LoadingHandler, MJEmit, MJInfo, MJSettings, OnModal, MJShorten, MJDescribe } from "./interfaces"; import { MidjourneyApi } from "./midjourney.api"; import WebSocket from "isomorphic-ws"; export declare class WsMessage { config: MJConfig; MJApi: MidjourneyApi; ws: WebSocket; private closed; private event; private waitMjEvents; private skipMessageId; private reconnectTime; private heartbeatInterval; UserId: string; constructor(config: MJConfig, MJApi: MidjourneyApi); private heartbeat; close(): void; checkWs(): Promise; onceReady(): Promise; reconnect(): void; private open; private auth; timeout(ms: number): Promise; private messageCreate; private messageUpdate; private onInteractionSuccess; private onReady; private onMessageCreate; private onMessageUpdate; private onMessageDelete; private parseMessage; private continue; private verifyHuman; private EventError; private done; private processingImage; private filterMessages; private getEventByContent; private getEventById; private getEventByNonce; private updateMjEventIdByNonce; protected log(...args: any[]): Promise; emit(event: string, message: any): void; private emitImage; private emitMJ; on(event: string, callback: (message: any) => void): void; onSystem(event: "ready" | "messageCreate" | "messageUpdate" | "messageDelete" | "interactionCreate" | "interactionSuccess", callback: (message: any) => void): void; private emitSystem; once(event: string, callback: (message: any) => void): void; remove(event: string, callback: (message: any) => void): void; removeEvent(event: string): void; onceInfo(callback: (message: any) => void): void; onceSettings(callback: (message: any) => void): void; onceMJ(nonce: string, callback: (data: any) => void): void; private removeSkipMessageId; private removeWaitMjEvent; onceImage(nonce: string, callback: (data: MJEmit) => void): void; waitImageMessage({ nonce, prompt, onmodal, messageId, loading, }: { nonce: string; prompt?: string; messageId?: string; onmodal?: OnModal; loading?: LoadingHandler; }): Promise; waitDescribe(nonce: string): Promise; waitShorten(nonce: string): Promise; waitContent(event: string): Promise; waitInfo(): Promise; waitSettings(): Promise; }