@solufy/evolution-sdk
Version:
Unofficial SDK for the Evolution Whatsapp API v2
33 lines (30 loc) • 1.24 kB
TypeScript
import { ApiService } from '../../api/service.js';
import { GroupInviteCode, GroupJid } from '../../types/tags.js';
import { FindAllGroupsResponse, FindAllGroupsWithParticipantsResponse } from './schemas/find-all.js';
import { FindGroupByInviteCodeResponse } from './schemas/find-by-invite-code.js';
import { FindGroupByJidResponse } from './schemas/find-by-jid.js';
import '../../schemas/client.js';
import 'zod';
import '../../types/api.js';
import 'libphonenumber-js';
declare class GroupsModule {
private readonly api;
constructor(api: ApiService);
/**
* Gets all groups
* @param getParticipants - Whether to get participants
*/
findAll(getParticipants: false): Promise<FindAllGroupsResponse>;
findAll(getParticipants: true): Promise<FindAllGroupsWithParticipantsResponse>;
/**
* Gets a group by invite code
* @param inviteCode - The group invite code (not the URL)
*/
findByInviteCode(inviteCode: string | GroupInviteCode): Promise<FindGroupByInviteCodeResponse>;
/**
* Gets a group by JID
* @param groupJid - The group JID terminated with \@g.us
*/
findByJid(groupJid: string | GroupJid): Promise<FindGroupByJidResponse>;
}
export { GroupsModule };