export declare const VERSION: "4.7"; export declare const MESSAGE_BUILDER_VERSION: "4.7"; export interface AIRichItemOptions { id?: string; replace?: string | number; insertAt?: string | number; } export declare class AIRichError extends Error { constructor(message: string, code: string, meta?: Record); code: string; } export declare class ItemNotFoundError extends AIRichError { constructor(id: string, availableIds?: string[]); id: string; availableIds: string[]; } export declare class DuplicateIdError extends AIRichError { constructor(id: string); id: string; } export declare class InvalidTargetError extends AIRichError { constructor(message: string, meta?: Record); } export declare class ContentValidationError extends AIRichError { constructor(message: string, meta?: Record); } export declare class Toolkit { constructor(); static extractIE(text: string, options?: Record): any; static resize(buffer: Buffer, x: number, y: number, fit?: string): Promise; static waitAllPromises(input: any): Promise; static fetchBuffer(url: string, options?: Record, settings?: { silent?: boolean }): Promise; static toUrl(client: any, path: any, mediaType?: string): Promise; static resolveMedia(client: any, media: any, mediaType?: string, options?: Record): Promise; static getMp4Duration(buffer: Buffer, options?: { silent?: boolean }): number; static getMp4Preview(videoBuffer: Buffer, options?: Record): Promise; static stringifyEscaped(obj: any): string; } declare class BaseBuilder { setTitle(title: string): this; setSubtitle(subtitle: string): this; setBody(body: string): this; setFooter(footer: string): this; setContextInfo(obj: Record): this; addPayload(obj: Record): this; } export declare class Button extends BaseBuilder { constructor(client: any); loadFrom(msg: any): this; setVideo(path: any, options?: Record): this; setImage(path: any, options?: Record): this; setDocument(path: any, options?: Record): this; setMedia(obj: Record): this; clearButtons(): this; setParams(obj: Record): this; addButton(name: string, params: Record | string): this; makeRow(header?: string, title?: string, description?: string, id?: string): this; makeSection(title?: string, highlightLabel?: string): this; addSelection(title: string, options?: Record): this; addReply(displayText?: string, id?: string, options?: Record): this; addCall(displayText?: string, id?: string, options?: Record): this; addReminder(displayText?: string, id?: string, options?: Record): this; addCancelReminder(displayText?: string, id?: string, options?: Record): this; addAddress(displayText?: string, id?: string, options?: Record): this; addLocation(options?: Record): this; addUrl(displayText?: string, url?: string, webviewInteraction?: boolean, options?: Record): this; addCopy(displayText?: string, copyCode?: string, options?: Record): this; static paramsList: Record; toCard(): Promise; build(jid: string, options?: Record): Promise; send(jid: string, options?: Record): Promise; } export declare class ButtonV2 extends BaseBuilder { constructor(client: any); loadFrom(msg: any): this; addButton(displayText?: string, buttonId?: string): this; addRawButton(obj: Record): this; setRawThumbnail(thumbnail: string): this; setThumbnail(path: any): this; setMedia(obj: Record): this; build(jid: string, options?: Record): Promise; send(jid: string, options?: Record): Promise; } export declare class Carousel extends BaseBuilder { constructor(client: any); loadFrom(msg: any): this; addCard(card: any): this; build(jid: string, options?: Record): any; send(jid: string, options?: Record): Promise; } export declare class AIRich extends BaseBuilder { constructor(client: any, options?: { dynamic?: boolean; unsupportedTypeAlert?: boolean }); static readonly DEFAULT_BOT_JID: string; static readonly MAP_DELTA: number; static readonly LAYOUT_FIELDS: Readonly>; static readonly SECTION_TYPENAME: string; static readonly UNIFIED_RESPONSE_TYPENAME: string; static tokenizer(code: string, lang?: string): any; static toTableMetadata(rows: any[], options?: Record): any; static generateVerificationMetadata(): any; static isMetaSignature(verificationMetadata: any): boolean; static readonly PLACEHOLDER_MARKER: Buffer; static wrapRichResponse(richResponseMessage: any, forwardWrapper?: boolean): any; static newLayout(name: string, data: any, extra?: Record): any; static normalizeSection(section: any): any; /** True while the loaded proof and its signed bytes are still going out untouched. */ readonly isSignaturePreserved: boolean; loadFrom(msg: any): this; setResponseMeta(meta: Record): this; setResponseId(id: string): this; refreshResponseId(): this; setBotResponseId(id: string): this; refreshBotResponseId(): this; createAlert(type: string): any; hasId(id: string): boolean; getIds(): string[]; peek(id?: string | number): any; assignId(target: string | number, id: string): this; delete(target: string | number): this; addSubmessage(submessage: any, options?: AIRichItemOptions): this; /** * A section with no submessage travels as submessages: [], which every * rendered AI Rich message has non-empty. Pass text for the plain-text * twin, or submessage to shape it yourself. */ addSection(section: any, options?: AIRichItemOptions & { text?: string; submessage?: any }): this; addFooterSection(section: any): this; addEmbeddedScreen(screen: any): this; setBotMetadata(extra: Record): this; clearFooterSections(): this; addText(text: string, options?: AIRichItemOptions & { hyperlink?: boolean; citation?: boolean; latex?: boolean }): this; addFOAText(text: string, options?: AIRichItemOptions): this; addCode(language: string, code: string, options?: AIRichItemOptions): this; addTable(table: string[][], options?: AIRichItemOptions & { hyperlink?: boolean; citation?: boolean; latex?: boolean }): this; addMap( places: { latitude: number; longitude: number; title?: string; name?: string; body?: string; description?: string; address?: string; id?: string | number; imageUrl?: string; itemType?: string; }[], options?: AIRichItemOptions & { center?: { latitude: number; longitude: number }; latitudeDelta?: number; longitudeDelta?: number; showInfoList?: boolean; motivation?: string; staticMapUrl?: string; staticMapDarkUrl?: string; } ): this; addSource(sources?: any[], options?: AIRichItemOptions): this; addReels(reelsItems?: any, options?: AIRichItemOptions): this; addImage(imageUrl: any, options?: AIRichItemOptions & { width?: number; height?: number; status?: string; update_text?: string; resolveUrl?: boolean }): this; addVideo(videoUrl: any, options?: AIRichItemOptions & { autoFill?: boolean; status?: string; estimatedTime?: number }): this; addProduct(data?: any, options?: AIRichItemOptions): this; addPost(data?: any, options?: AIRichItemOptions): this; addMetadata(text: string, options?: AIRichItemOptions): this; addTip(text: string, options?: AIRichItemOptions): this; addWidget(data: any, options?: AIRichItemOptions & { layout?: string }): this; addFooterAction(data: any, options?: AIRichItemOptions & { layout?: string }): this; addSuggest(suggestion: string | string[], options?: AIRichItemOptions & { scroll?: boolean; layout?: string }): this; build(jid: string, options?: Record): Promise; buildEdit(targetJid: string, targetId: string, options?: Record): Promise; send(jid: string, options?: Record): Promise; sendEdit(jid?: string, id?: string, options?: Record): Promise; readonly sections: any[]; readonly items: any[]; static tokenizer(code: string, lang?: string): any; static toTableMetadata(arr: string[][], options?: Record): any; static readonly SECTION_TYPENAME: 'GenAIUnifiedResponseSection'; static readonly UNIFIED_RESPONSE_TYPENAME: 'XMSGGenAIUnifiedResponse'; static newLayout(name: string, data: any, extra?: Record): any; static normalizeSection(section: any): any; static generateVerificationMetadata(): any; } export declare const MessageBuilder: Readonly<{ VERSION: "4.7"; Button: typeof Button; ButtonV2: typeof ButtonV2; Carousel: typeof Carousel; AIRich: typeof AIRich; Toolkit: typeof Toolkit; AIRichError: typeof AIRichError; ItemNotFoundError: typeof ItemNotFoundError; DuplicateIdError: typeof DuplicateIdError; InvalidTargetError: typeof InvalidTargetError; ContentValidationError: typeof ContentValidationError; }>; export declare const MB: typeof MessageBuilder;