/// import Session from './types/Session'; import Thread from './types/Thread'; import User from './types/User'; import { Readable } from 'stream'; import Message, { MessageOptions } from './types/Message'; import EventEmitter from 'events'; import StrictEventEmitter from 'strict-event-emitter-types'; import ClientEvents from './ClientEvents'; import DeviceId from './types/DeviceId'; export interface ClientOptions { selfListen?: boolean; session?: Session; deviceId?: DeviceId; } declare const Client_base: new () => StrictEventEmitter; /** * Main client class */ export default class Client extends Client_base { private mqttApi; private httpApi; private readonly session; private seqId; loggedIn: boolean; private options; constructor(options?: ClientOptions); login(email: string, password: string): Promise; private doLogin; getSession(): Session; sendMessage(threadId: string, message: string, options?: MessageOptions): Promise<{ succeeded: boolean; errStr?: string; /** * Indicate that the user is currently present in the conversation. * Only relevant for non-group conversations */ }>; /** * Indicate that the user is currently present in the conversation. * Only relevant for non-group conversations */ sendPresenceState(recipientUserId: string, present: boolean): Promise; /** * Send "User is typing" message. * In a non-group conversation, sendPresenceState() must be called first. */ sendTypingState(threadOrRecipientUserId: string, present: boolean): Promise; /** * Mark a message as read. */ sendReadReceipt(message: Message): Promise; getThreadList(count: number): Promise; sendAttachmentFile(threadId: string, attachmentPath: string, extension?: string): Promise; sendAttachmentStream(threadId: string, extension: string, attachment: Readable): Promise; getAttachmentURL(messageId: string, attachmentId: string): Promise; getAttachmentInfo(messageId: string, attachmentId: string): Promise; getStickerURL(stickerId: number): Promise; getThreadInfo(threadId: string): Promise; getUserInfo(userId: string): Promise; getMessages(threadId: string, count: number): Promise; private createQueue; private connectQueue; private handleMS; private handleMessage; } export {};