import { Page, Browser } from 'puppeteer'; import { CreateConfig } from '../../config/create-config'; import { RetrieverLayer } from './retriever.layer'; import { GroupSettings } from '../model/enum'; export declare class GroupLayer extends RetrieverLayer { browser: Browser; page: Page; constructor(browser: Browser, page: Page, session?: string, options?: CreateConfig); /** * Parameters to change group settings, see {@link GroupSettings for details} * @param {string} groupId group number * @param {GroupSettings} settings * @param {boolean} value */ setGroupSettings(groupId: string, settings: GroupSettings, value: boolean): Promise; /** * Parameters to change group image * @param {string} groupId group number * @param {string} path of image */ setGroupImage(groupId: string, path: string): Promise; /** * Parameters to change group title * @param {string} groupId group number * @param {string} title group title */ setGroupTitle(groupId: string, title: string): Promise; /** * Parameters to change group description * @param {string} groupId group number * @param {string} description group description */ setGroupDescription(groupId: string, description: string): Promise; /** * Retrieve all groups * @returns array of groups */ getAllChatsGroups(): Promise; /** * Retrieve all groups new messages * @returns array of groups */ getChatGroupNewMsg(): Promise; /** * Removes the host device from the group * @param groupId group id */ leaveGroup(groupId: string): Promise; /** * Retrieves group members as [Id] objects * @param groupId group id */ getGroupMembers(groupId: string, time: string): Promise; /** * Reset group invitation link * @param chatId * @returns boolean */ revokeGroupInviteLink(chatId: string): Promise; /** * Generates group-invite link * @param chatId * @returns Invitation link */ getGroupInviteLink(chatId: string): Promise; /** * Generates group-invite link * @param inviteCode * @returns Invite code from group link. Example: CMJYfPFqRyE2GxrnkldYED */ getGroupInfoFromInviteLink(inviteCode: string): Promise; /** * Creates a new chat group * @param groupName Group name * @param contacts Contacts that should be added. */ createGroup(groupName: string, contacts: string | string[]): Promise; /** * Removes participant from group * @param groupId Chat id ('0000000000-00000000@g.us') * @param participantId Participant id'000000000000@c.us' */ removeParticipant(groupId: string, participantId: string | string[]): Promise; /** * Adds participant to Group * @param groupId Chat id ('0000000000-00000000@g.us') * @param participantId Participant id'000000000000@c.us' */ addParticipant(groupId: string, participantId: string | string[]): Promise; /** * Promotes participant as Admin in given group * @param groupId Chat id ('0000000000-00000000@g.us') * @param participantId Participant id'000000000000@c.us' */ promoteParticipant(groupId: string, participantId: string | string[]): Promise; /** * Demotes admin privileges of participant * @param groupId Chat id ('0000000000-00000000@g.us') * @param participantId Participant id'000000000000@c.us' */ demoteParticipant(groupId: string, participantId: string | string[]): Promise; /** * Retrieves group admins * @param groupId Group/Chat id ('0000000000-00000000@g.us') */ getGroupAdmins(groupId: string): Promise; /** * Join a group with invite code * @param inviteCode */ joinGroup(inviteCode: string): Promise; }