/** * Port of upstream Baileys' `Utils/history.ts:processHistoryMessage`. * * Walks a decoded `proto.IHistorySync` and produces the * `messaging-history.set` payload (chats, contacts, messages, lidPnMappings). * The bridge already decoded the proto for us — this module only handles * the structured walk + normalization that upstream consumers expect. * * 1:1 with upstream (`Baileys/src/Utils/history.ts:47-139`); changes here * are limited to swapping upstream imports for baileyrs equivalents and * keeping the WAProto namespace as our re-export. */ import type { proto } from 'whatsapp-rust-bridge/proto-types'; import type { Chat, Contact, LIDMapping, WAMessage } from '../Types/index.js'; export interface ProcessedHistorySync { chats: Chat[]; contacts: Contact[]; messages: WAMessage[]; lidPnMappings: LIDMapping[]; syncType?: number; progress?: number; } /** * Walk a decoded HistorySync proto and extract the upstream * `messaging-history.set` payload. Mirrors upstream's behavior exactly, * including the side-effect of removing `chat.messages` (kept only as a * 1-element preview after the walk). */ export declare const processHistoryMessage: (item: proto.IHistorySync) => ProcessedHistorySync; //# sourceMappingURL=process-history-message.d.ts.map