UNPKG

evolution-api-sdk

Version:

Unofficial SDK for the Evolution Whatsapp API v2

63 lines (60 loc) 1.48 kB
import { Jid, MessageId } from '../../../types/tags.mjs'; import { BaseMessageOptions } from './base.mjs'; interface TextMessageResponseRaw { key: { remoteJid: string; fromMe: boolean; id: string; }; pushName: string; status: string; message: { conversation: string; }; contextInfo: null; messageType: string; messageTimestamp: number; instanceId: string; source: string; } interface TextMessageOptions extends BaseMessageOptions { /** * Message text content */ text: string; /** * Whether link preview should be shown */ linkPreview?: boolean; } interface TextMessageResponse { key: { remoteJid: string; fromMe: boolean; id: string; }; pushName: string; status: string; message: { conversation: string; }; contextInfo: null; messageType: string; messageTimestamp: number; instanceId: string; source: string; receiver: { phoneNumber: string; jid: Jid; }; messageId: MessageId; timestamp: Date; } interface TextMessageReceived { conversation: string; extendedTextMessage: { text: string; }; } declare const TextMessageResponseTransform: (data: TextMessageResponseRaw) => TextMessageResponse; export { type TextMessageOptions, type TextMessageReceived, type TextMessageResponse, type TextMessageResponseRaw, TextMessageResponseTransform };