@solufy/evolution-sdk
Version:
Unofficial SDK for the Evolution Whatsapp API v2
179 lines (176 loc) • 5.51 kB
text/typescript
import * as libphonenumber_js from 'libphonenumber-js';
import { z } from 'zod';
import { MessageId } from '../../../types/tags.mjs';
declare const StickerMessageOptionsSchema: z.ZodObject<{
number: z.ZodUnion<[z.ZodEffects<z.ZodType<string, z.ZodTypeDef, string>, string, string>, z.ZodType<`${string}@s.whatsapp.net`, z.ZodTypeDef, `${string}@s.whatsapp.net`>, z.ZodType<`${string}@g.us`, z.ZodTypeDef, `${string}@g.us`>]>;
delay: z.ZodOptional<z.ZodNumber>;
} & {
/**
* Image URL or file in base64
*/
sticker: z.ZodUnion<[z.ZodString, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
number: string;
sticker: string;
delay?: number | undefined;
}, {
number: string;
sticker: string;
delay?: number | undefined;
}>;
declare const StickerMessageBodySchema: z.ZodObject<{
number: z.ZodUnion<[z.ZodEffects<z.ZodType<string, z.ZodTypeDef, string>, string, string>, z.ZodType<`${string}@s.whatsapp.net`, z.ZodTypeDef, `${string}@s.whatsapp.net`>, z.ZodType<`${string}@g.us`, z.ZodTypeDef, `${string}@g.us`>]>;
delay: z.ZodOptional<z.ZodNumber>;
} & {
/**
* Image URL or file in base64
*/
sticker: z.ZodUnion<[z.ZodString, z.ZodString]>;
}, "strip", z.ZodTypeAny, {
number: string;
sticker: string;
delay?: number | undefined;
}, {
number: string;
sticker: string;
delay?: number | undefined;
}>;
declare const StickerMessageResponseSchema: z.ZodEffects<z.ZodObject<{
key: z.ZodObject<{
remoteJid: z.ZodString;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
remoteJid: string;
}, {
id: string;
remoteJid: string;
}>;
message: z.ZodObject<{
stickerMessage: z.ZodObject<{
url: z.ZodString;
fileSha256: z.ZodString;
fileEncSha256: z.ZodString;
mediaKey: z.ZodString;
mimetype: z.ZodOptional<z.ZodString>;
directPath: z.ZodString;
fileLength: z.ZodNumber;
mediaKeyTimestamp: z.ZodEffects<z.ZodNumber, Date, number>;
}, "strip", z.ZodTypeAny, {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: Date;
mimetype?: string | undefined;
}, {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: number;
mimetype?: string | undefined;
}>;
}, "strip", z.ZodTypeAny, {
stickerMessage: {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: Date;
mimetype?: string | undefined;
};
}, {
stickerMessage: {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: number;
mimetype?: string | undefined;
};
}>;
messageTimestamp: z.ZodDate;
}, "strip", z.ZodTypeAny, {
message: {
stickerMessage: {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: Date;
mimetype?: string | undefined;
};
};
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}, {
message: {
stickerMessage: {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: number;
mimetype?: string | undefined;
};
};
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}>, {
receiver: {
phoneNumber: libphonenumber_js.E164Number;
jid: `${string}@s.whatsapp.net`;
};
media: {
url: string;
mimetype: string | undefined;
length: number;
sha256: string;
encryptedSha256: string;
directPath: string;
key: string;
keyTimestamp: Date;
};
id: MessageId;
timestamp: Date;
}, {
message: {
stickerMessage: {
url: string;
fileSha256: string;
fileLength: number;
mediaKey: string;
fileEncSha256: string;
directPath: string;
mediaKeyTimestamp: number;
mimetype?: string | undefined;
};
};
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}>;
type StickerMessageOptions = z.infer<typeof StickerMessageOptionsSchema>;
type StickerMessageResponse = z.infer<typeof StickerMessageResponseSchema>;
export { StickerMessageBodySchema as BodySchema, StickerMessageOptionsSchema as OptionsSchema, StickerMessageResponseSchema as ResponseSchema, StickerMessageBodySchema, type StickerMessageOptions, StickerMessageOptionsSchema, type StickerMessageResponse, StickerMessageResponseSchema };