UNPKG

evolution-api-sdk

Version:

Unofficial SDK for the Evolution Whatsapp API v2

51 lines (48 loc) 1.68 kB
import { GroupJid, Jid } from '../../../types/tags.js'; interface GroupResponseRaw { id: string; subject: string; subjectOwner: string; subjectTime: string | Date; pictureUrl?: string | null; size: number; creation: string | Date; owner: string; restrict: boolean; announce: boolean; } interface ParticipantResponseRaw { id: string; admin?: "admin" | "superadmin" | null; } interface GroupWithParticipantsResponseRaw extends GroupResponseRaw { participants: ParticipantResponseRaw[]; } interface GroupResponse { jid: GroupJid; name: string; pictureUrl?: string; size: number; subject: { owner: Jid; time: Date; }; owner: { jid: Jid; phoneNumber: string; }; createdAt: Date; restrict: boolean; announce: boolean; } interface ParticipantResponse { id: string; role: "admin" | "superadmin" | "member"; } interface GroupWithParticipantsResponse extends GroupResponse { participants: ParticipantResponse[]; } declare const GroupResponseSchemaTransform: (group: GroupResponseRaw) => GroupResponse; declare const ParticipantResponseSchemaTransform: (participant: ParticipantResponseRaw) => ParticipantResponse; declare const GroupWithParticipantsResponseSchemaTransform: (group: GroupWithParticipantsResponseRaw) => GroupWithParticipantsResponse; export { type GroupResponse, type GroupResponseRaw, GroupResponseSchemaTransform, type GroupWithParticipantsResponse, type GroupWithParticipantsResponseRaw, GroupWithParticipantsResponseSchemaTransform, type ParticipantResponse, type ParticipantResponseRaw, ParticipantResponseSchemaTransform };