export interface ProfilePicThumb { eurl?: string; id?: string; img?: string; imgFull?: string; tag?: string; } export interface Sender { id: string; name: string; shortName: string; pushname: string; type: string; isBusiness: boolean; isEnterprise: boolean; isSmb: boolean; isContactSyncCompleted: number; disappearingModeDuration: number; disappearingModeSettingTimestamp: number; textStatusLastUpdateTime: number; syncToAddressbook: boolean; formattedName: string; isMe: boolean; isMyContact: boolean; isPSA: boolean; isUser: boolean; status?: string; isVerified: boolean; isWAContact: boolean; profilePicThumbObj?: ProfilePicThumb; msgs: any; } export interface Contact { id: string; name: string; shortName: string; pushname: string; type: string; isBusiness: boolean; isEnterprise: boolean; isSmb: boolean; isContactSyncCompleted: number; disappearingModeDuration: number; disappearingModeSettingTimestamp: number; textStatusLastUpdateTime: number; syncToAddressbook: boolean; formattedName: string; isMe: boolean; isMyContact: boolean; isPSA: boolean; isUser: boolean; isVerified: boolean; isWAContact: boolean; profilePicThumbObj?: Partial; msgs: any; } export interface Chat { id: string; pendingMsgs: boolean; lastReceivedKey?: { fromMe: boolean; remote: string; id: string; _serialized: string; }; t: number; unreadCount: number; unreadDividerOffset: number; archive: boolean; isReadOnly: boolean; isLocked: boolean; muteExpiration: number; isAutoMuted: boolean; name: string; notSpam: boolean; pin: number; ephemeralDuration: number; ephemeralSettingTimestamp: number; disappearingModeInitiator: string; disappearingModeTrigger: string; createdLocally: boolean; unreadMentionsOfMe: any[]; unreadMentionCount: number; hasUnreadMention: boolean; archiveAtMentionViewedInDrawer: boolean; hasChatBeenOpened: boolean; tcToken: Record; tcTokenTimestamp: number; tcTokenSenderTimestamp: number; endOfHistoryTransferType: number; pendingInitialLoading: boolean; chatlistPreview?: any; unreadEditTimestampMs: number; celebrationAnimationLastPlayed: number; hasRequestedWelcomeMsg: boolean; msgs: any; canSend: boolean; isGroup: boolean; pic?: string; formattedTitle: string; contact: Contact; groupMetadata: any; presence?: { id: string; chatstates: any[]; }; isOnline: boolean; participantsCount: number; } export interface WhatsAppMessage { id: string; viewed: boolean; body: string; type: string; t: number; notifyName: string; from: string; to: string; author: string | null; invis: boolean; isNewMsg: boolean; star: boolean; kicNotified: boolean; recvFresh: boolean; isFromTemplate: boolean; thumbnail?: string; pollInvalidated: boolean; isSentCagPollCreation: boolean; latestEditMsgKey: any; latestEditSenderTimestampMs: any; mentionedJidList: any[]; groupMentions: any[]; isEventCanceled: boolean; eventInvalidated: boolean; isVcardOverMmsDocument: boolean; labels: any[]; hasReaction: boolean; ephemeralDuration: number; ephemeralSettingTimestamp: number; disappearingModeInitiator: string; disappearingModeTrigger: string; viewMode: string; productHeaderImageRejected: boolean; lastPlaybackProgress: number; isDynamicReplyButtonsMsg: boolean; isCarouselCard: boolean; parentMsgId: any; callSilenceReason: any; isVideoCall: boolean; callDuration: any; callParticipants: any; isMdHistoryMsg: boolean; stickerSentTs: number; isAvatar: boolean; lastUpdateFromServerTs: number; invokedBotWid: any; bizBotType: any; botResponseTargetId: any; botPluginType: any; botPluginReferenceIndex: any; botPluginSearchProvider: any; botPluginSearchUrl: any; botPluginSearchQuery: any; botPluginMaybeParent: boolean; botReelPluginThumbnailCdnUrl: any; botMessageDisclaimerText: any; botMsgBodyType: any; reportingTokenInfo: any; requiresDirectConnection: boolean; bizContentPlaceholderType: any; hostedBizEncStateMismatch: boolean; senderOrRecipientAccountTypeHosted: boolean; placeholderCreatedWhenAccountIsHosted: boolean; device: number; local: boolean; fromMe: boolean; mId: string; sender: Sender; senderId: any; timestamp: number; content: string; isGroupMsg: boolean; isQuotedMsgAvailable: boolean; isMedia: boolean; chat: Chat; isOnline: boolean; chatId: string; mediaData: Record; text: string; } export interface Participant { id: string; name: string; isMe: boolean; isAdmin?: boolean; } export interface Msg { id: string; from: string; to: string; ts: number; type: 'chat' | 'image' | 'audio' | 'sticker' | 'doc'; text?: string; mediaUrl?: string; mentions?: string[]; meta: { ack: number; hasReaction: boolean; isQuoted: boolean; }; } export interface Conversation { chatId: string; title: string; isGroup: boolean; unreadCount: number; participants: Participant[]; messages: Msg[]; createdAt: number; }