evolution-api-sdk
Version:
Unofficial SDK for the Evolution Whatsapp API v2
54 lines (51 loc) • 1.51 kB
text/typescript
import { Media } from '../../../schemas/common.mjs';
import { Jid, MessageId } from '../../../types/tags.mjs';
import { BaseMessageOptions } from './base.mjs';
interface StickerMessageResponseRaw {
key: {
remoteJid: string;
id: string;
};
message: {
stickerMessage: {
url: string;
fileSha256: string;
fileEncSha256: string;
mediaKey: string;
mimetype?: string;
directPath: string;
fileLength: number | string;
mediaKeyTimestamp: number | string;
};
};
messageTimestamp: string | Date;
}
interface StickerMessageOptions extends BaseMessageOptions {
/**
* Image URL or file in base64
*/
sticker: Media;
}
interface StickerMessageResponse {
receiver: {
phoneNumber: string;
jid: Jid;
};
media: {
url: string;
mimetype?: string;
length: number;
sha256: string;
encryptedSha256: string;
directPath: string;
key: string;
keyTimestamp: Date;
};
id: MessageId;
timestamp: Date;
}
declare const StickerMessageResponseTransform: (data: StickerMessageResponseRaw) => StickerMessageResponse;
declare const ResponseSchema: {
parse: (data: StickerMessageResponseRaw) => StickerMessageResponse;
};
export { ResponseSchema, type StickerMessageOptions, type StickerMessageResponse, type StickerMessageResponseRaw, StickerMessageResponseTransform };