UNPKG

evolution-api-sdk

Version:

Unofficial SDK for the Evolution Whatsapp API v2

48 lines (45 loc) 1.25 kB
import { Media } from '../../../schemas/common.mjs'; import { BaseMessageOptions } from './base.mjs'; import '../../../types/tags.mjs'; interface MediaMessageOptions extends BaseMessageOptions { mediatype: "audio" | "image" | "video" | "document"; mimetype?: string; caption?: string; media: Media; fileName?: string; linkPreview?: boolean; mentionsEveryOne?: boolean; mentioned?: string[]; quoted?: { key: { id: string; }; message: { conversation: string; }; }; } interface MediaMessageResponse { key: { remoteJid: string; fromMe: boolean; id: string; }; message: { [T in "audioMessage" | "imageMessage" | "videoMessage" | "documentMessage"]: { url: string; mimetype: string; fileSha256: string; fileLength: string; seconds: number; ptt: boolean; mediaKey: string; fileEncSha256: string; directPath: string; mediaKeyTimestamp: string; }; }; messageTimestamp: string; status: "PENDING" | "SUCCESS" | "FAILED"; } export type { MediaMessageOptions, MediaMessageResponse };