import type * as WhatsApp from '@juzi/whatsapp-web.js' import type { SetOptional } from 'type-fest' export type { Client as WhatsAppClientType, ClientInfo, ClientInfoPhone, ClientOptions, BatteryInfo, CreateGroupResult, // GroupNotification, ChatTypes, Events, MessageAck as MessageAckType, Status, WAState as WAStateType, MessageInfo, InviteV4Data, Message as WhatsAppMessage, // MessageId, Location, Label, MessageSendOptions, MediaFromURLOptions, // MessageMedia, MessageContent, Contact as WhatsAppContact, ContactId, BusinessContact, PrivateContact, Chat, MessageSearchOptions, ChatId, PrivateChat, GroupParticipant, ChangeParticipantsPermissions, // GroupChat, ProductMetadata, Product, Order, Payment, Call, Buttons, Row, List, } from '@juzi/whatsapp-web.js' export interface MessageId { fromMe: boolean, remote: string | { server: string user: string _serialized: string, }, id: string, _serialized: string, } export type WhatsAppContactPayload = { avatar: string announce?: string } & Omit export type WhatsAppMessagePayload = SetOptional<{mentionedIds: string[], location?: WhatsApp.Location, orderId?: string, id: MessageId, _data?: any} & Omit, 'urlLink' | 'productMessage' | 'editScheduledEvent' | 'eventStartTime' | 'isEventCaneled' | 'getPollVotes' | 'vote'> export interface GroupMetadata { desc: string owner: WhatsApp.ContactId participants: WhatsApp.GroupParticipant[] } export type GroupChat = {groupMetadata:GroupMetadata} & SetOptional export interface GroupNotificationId { fromMe: boolean, remote: string, id: string, participant?: string, _serialized: string, } export type GroupNotification = {id: GroupNotificationId} & Omit export const SpecialSystemType = 'SpecialSystem' as WhatsApp.MessageTypes