import { Page } from 'puppeteer'; import { Chat, Contact, ContactStatus, Message, PartialMessage, WhatsappProfile } from '../model'; import { SenderLayer } from './sender.layer'; export declare class RetrieverLayer extends SenderLayer { constructor(page: Page); /** * Receive all blocked contacts * @returns array of [0,1,2,3....] */ getBlockList(): Promise; /** * Retrieves all chats * @returns array of [Chat] */ getAllChats(withNewMessageOnly?: boolean): Promise; /** * Retrieves all chats with messages * @returns array of [Chat] */ getAllChatsWithMessages(withNewMessageOnly?: boolean): Promise; /** * Retrieve all groups * @returns array of groups */ getAllGroups(withNewMessagesOnly?: boolean): Promise; /** * Retrieves contact detail object of given contact id * @param contactId * @returns contact detial as promise */ getContact(contactId: string): Promise; /** * Retrieves all contacts * @returns array of [Contact] */ getAllContacts(): Promise; /** * Retrieves chat object of given contact id * @param contactId * @returns contact detial as promise */ getChatById(contactId: string): Promise; /** * Retrieves chat object of given contact id * @param contactId * @returns contact detial as promise * @deprecated */ getChat(contactId: string): Promise; /** * Retrieves chat picture * @param chatId Chat id * @returns url of the chat picture or undefined if there is no picture for the chat. */ getProfilePicFromServer(chatId: string): Promise; /** * Load more messages in chat object from server. Use this in a while loop * @param contactId * @returns contact detial as promise * @deprecated */ loadEarlierMessages(contactId: string): Promise; /** * Retrieves status of given contact * @param contactId */ getStatus(contactId: string): Promise; /** * Checks if a number is a valid whatsapp number * @param contactId, you need to include the @c.us at the end. * @returns contact detial as promise */ getNumberProfile(contactId: string): Promise; /** * Retrieves all undread Messages * @param includeMe * @param includeNotifications * @param useUnreadCount * @returns any * @deprecated */ getUnreadMessages(includeMe: boolean, includeNotifications: boolean, useUnreadCount: boolean): Promise; /** * Retrieves all unread messages (where ack is -1) * @returns list of messages */ getAllUnreadMessages(): Promise; /** * Retrieves all new messages (where isNewMsg is true) * @returns List of messages * @deprecated Use getAllUnreadMessages */ getAllNewMessages(): Promise; /** * Retrieves all messages already loaded in a chat * For loading every message use loadAndGetAllMessagesInChat * @param chatId, the chat to get the messages from * @param includeMe, include my own messages? boolean * @param includeNotifications * @returns any */ getAllMessagesInChat(chatId: string, includeMe: boolean, includeNotifications: boolean): Promise; /** * Loads and Retrieves all Messages in a chat * @param chatId, the chat to get the messages from * @param includeMe, include my own messages? boolean * @param includeNotifications * @returns any */ loadAndGetAllMessagesInChat(chatId: string, includeMe?: boolean, includeNotifications?: boolean): Promise; }