import { EventEmitter } from 'events' import { RequestInit } from 'node-fetch' import puppeteer = require('puppeteer') declare namespace WAWebJS { export class Client extends EventEmitter { constructor(options: ClientOptions) /** Current connection information */ public info: ClientInfo /** Puppeteer page running WhatsApp Web */ pupPage?: puppeteer.Page /** Puppeteer browser running WhatsApp Web */ pupBrowser?: puppeteer.Browser /**Accepts an invitation to join a group */ acceptInvite(inviteCode: string): Promise /** Accepts a private invitation to join a group (v4 invite) */ acceptGroupV4Invite: (inviteV4: InviteV4Data) => Promise<{status: number}> /**Returns an object with information about the invite code's group */ getInviteInfo(inviteCode: string): Promise /** Enables and returns the archive state of the Chat */ archiveChat(chatId: string): Promise /** Pins the Chat and returns its new Pin state */ pinChat(chatId: string): Promise /** Unpins the Chat and returns its new Pin state */ unpinChat(chatId: string): Promise /** * Create a new group * @param name group title * @param participants an array of Contacts or contact IDs to add to the group */ createGroup(name: string, participants: Contact[] | string[]): Promise /** Closes the client */ destroy(): Promise /** Logs out the client, closing the current session */ logout(): Promise /** Get chat instance by ID */ getChatById(chatId: string): Promise /** Get all current chat instances */ getChats(): Promise /** Get contact instance by ID */ getContactById(contactId: string): Promise /** Get all current contact instances */ getContacts(): Promise /** Get all current Labels */ getLabels(): Promise /** Get Label instance by ID */ getLabelById(labelId: string): Promise