@solufy/evolution-sdk
Version:
Unofficial SDK for the Evolution Whatsapp API v2
93 lines (90 loc) • 2.88 kB
TypeScript
import * as libphonenumber_js from 'libphonenumber-js';
import { z } from 'zod';
import { MessageId } from '../../../types/tags.js';
declare const TextMessageOptionsSchema: 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>;
} & {
/**
* Message text content
*/
text: z.ZodString;
/**
* Whether link preview should be shown
*/
linkPreview: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
number: string;
text: string;
delay?: number | undefined;
linkPreview?: boolean | undefined;
}, {
number: string;
text: string;
delay?: number | undefined;
linkPreview?: boolean | undefined;
}>;
declare const TextMessageBodySchema: 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>;
} & {
/**
* Message text content
*/
text: z.ZodString;
/**
* Whether link preview should be shown
*/
linkPreview: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
number: string;
text: string;
delay?: number | undefined;
linkPreview?: boolean | undefined;
}, {
number: string;
text: string;
delay?: number | undefined;
linkPreview?: boolean | undefined;
}>;
declare const TextMessageResponseSchema: z.ZodEffects<z.ZodObject<{
key: z.ZodObject<{
remoteJid: z.ZodString;
id: z.ZodString;
}, "strip", z.ZodTypeAny, {
id: string;
remoteJid: string;
}, {
id: string;
remoteJid: string;
}>;
messageTimestamp: z.ZodDate;
}, "strip", z.ZodTypeAny, {
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}, {
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}>, {
receiver: {
phoneNumber: libphonenumber_js.E164Number;
jid: `${string}@s.whatsapp.net`;
};
messageId: MessageId;
timestamp: Date;
}, {
key: {
id: string;
remoteJid: string;
};
messageTimestamp: Date;
}>;
type TextMessageOptions = z.infer<typeof TextMessageOptionsSchema>;
type TextMessageResponse = z.infer<typeof TextMessageResponseSchema>;
export { TextMessageBodySchema as BodySchema, TextMessageOptionsSchema as OptionsSchema, TextMessageResponseSchema as ResponseSchema, TextMessageBodySchema, type TextMessageOptions, TextMessageOptionsSchema, type TextMessageResponse, TextMessageResponseSchema };