zaileys
Version:
Zaileys - Simplified WhatsApp Node.js API
1,028 lines (1,024 loc) • 139 kB
text/typescript
import NodeCache from 'node-cache';
import { Ora } from 'ora';
import { z } from 'zod';
import * as stream from 'stream';
import { Readable } from 'stream';
declare const AdapterDatabaseType: z.ZodDefault<z.ZodOptional<z.ZodObject<{
type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
url: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
}, {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
}>>>;
declare const CitationType: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
declare const ClientClassesBaseType: z.ZodObject<{
prefix: z.ZodOptional<z.ZodString>;
ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
webhooks: z.ZodOptional<z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url: string;
}>>;
limiter: z.ZodOptional<z.ZodObject<{
durationMs: z.ZodNumber;
maxMessages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
durationMs: number;
maxMessages: number;
}, {
durationMs: number;
maxMessages: number;
}>>;
database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
url: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
}, {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
}>>>;
citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
}, "strip", z.ZodTypeAny, {
citation: Record<string, number[]>;
ignoreMe: boolean;
showLogs: boolean;
autoMentions: boolean;
autoOnline: boolean;
autoRead: boolean;
autoPresence: boolean;
autoRejectCall: boolean;
loadLLMSchemas: boolean;
database: {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
};
webhooks?: {
url: string;
} | undefined;
prefix?: string | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
}, {
citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
webhooks?: {
url: string;
} | undefined;
prefix?: string | undefined;
ignoreMe?: boolean | undefined;
showLogs?: boolean | undefined;
autoMentions?: boolean | undefined;
autoOnline?: boolean | undefined;
autoRead?: boolean | undefined;
autoPresence?: boolean | undefined;
autoRejectCall?: boolean | undefined;
loadLLMSchemas?: boolean | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
database?: {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
} | undefined;
}>;
declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObject<{
authType: z.ZodLiteral<"pairing">;
phoneNumber: z.ZodNumber;
} & {
prefix: z.ZodOptional<z.ZodString>;
ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
webhooks: z.ZodOptional<z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url: string;
}>>;
limiter: z.ZodOptional<z.ZodObject<{
durationMs: z.ZodNumber;
maxMessages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
durationMs: number;
maxMessages: number;
}, {
durationMs: number;
maxMessages: number;
}>>;
database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
url: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
}, {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
}>>>;
citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
}, "strip", z.ZodTypeAny, {
citation: Record<string, number[]>;
authType: "pairing";
phoneNumber: number;
ignoreMe: boolean;
showLogs: boolean;
autoMentions: boolean;
autoOnline: boolean;
autoRead: boolean;
autoPresence: boolean;
autoRejectCall: boolean;
loadLLMSchemas: boolean;
database: {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
};
webhooks?: {
url: string;
} | undefined;
prefix?: string | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
}, {
authType: "pairing";
phoneNumber: number;
citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
webhooks?: {
url: string;
} | undefined;
prefix?: string | undefined;
ignoreMe?: boolean | undefined;
showLogs?: boolean | undefined;
autoMentions?: boolean | undefined;
autoOnline?: boolean | undefined;
autoRead?: boolean | undefined;
autoPresence?: boolean | undefined;
autoRejectCall?: boolean | undefined;
loadLLMSchemas?: boolean | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
database?: {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
} | undefined;
}>, z.ZodObject<{
authType: z.ZodLiteral<"qr">;
phoneNumber: z.ZodOptional<z.ZodUndefined>;
} & {
prefix: z.ZodOptional<z.ZodString>;
ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
webhooks: z.ZodOptional<z.ZodObject<{
url: z.ZodString;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url: string;
}>>;
limiter: z.ZodOptional<z.ZodObject<{
durationMs: z.ZodNumber;
maxMessages: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
durationMs: number;
maxMessages: number;
}, {
durationMs: number;
maxMessages: number;
}>>;
database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
url: z.ZodDefault<z.ZodString>;
}, "strip", z.ZodTypeAny, {
url: string;
}, {
url?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
}, {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
}>>>;
citation: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
}, "strip", z.ZodTypeAny, {
citation: Record<string, number[]>;
authType: "qr";
ignoreMe: boolean;
showLogs: boolean;
autoMentions: boolean;
autoOnline: boolean;
autoRead: boolean;
autoPresence: boolean;
autoRejectCall: boolean;
loadLLMSchemas: boolean;
database: {
type: "sqlite" | "postgresql" | "mysql";
connection: {
url: string;
};
};
webhooks?: {
url: string;
} | undefined;
phoneNumber?: undefined;
prefix?: string | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
}, {
authType: "qr";
citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
webhooks?: {
url: string;
} | undefined;
phoneNumber?: undefined;
prefix?: string | undefined;
ignoreMe?: boolean | undefined;
showLogs?: boolean | undefined;
autoMentions?: boolean | undefined;
autoOnline?: boolean | undefined;
autoRead?: boolean | undefined;
autoPresence?: boolean | undefined;
autoRejectCall?: boolean | undefined;
loadLLMSchemas?: boolean | undefined;
limiter?: {
durationMs: number;
maxMessages: number;
} | undefined;
database?: {
type?: "sqlite" | "postgresql" | "mysql" | undefined;
connection?: {
url?: string | undefined;
} | undefined;
} | undefined;
}>]>;
declare const WebhooksParserBaseType: z.ZodObject<{
id: z.ZodString;
method: z.ZodEnum<["GET", "POST"]>;
host: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
referer: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
date: z.ZodString;
size: z.ZodUnion<[z.ZodNumber, z.ZodUndefined]>;
data: z.ZodObject<{
query: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
json: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
form: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
raw: z.ZodUnion<[z.ZodString, z.ZodNull]>;
}, "strip", z.ZodTypeAny, {
query: Record<string, any> | null;
json: Record<string, any> | null;
form: Record<string, any> | null;
raw: string | null;
}, {
query: Record<string, any> | null;
json: Record<string, any> | null;
form: Record<string, any> | null;
raw: string | null;
}>;
}, "strip", z.ZodTypeAny, {
id: string;
date: string;
method: "GET" | "POST";
data: {
query: Record<string, any> | null;
json: Record<string, any> | null;
form: Record<string, any> | null;
raw: string | null;
};
host?: string | undefined;
referer?: string | undefined;
size?: number | undefined;
}, {
id: string;
date: string;
method: "GET" | "POST";
data: {
query: Record<string, any> | null;
json: Record<string, any> | null;
form: Record<string, any> | null;
raw: string | null;
};
host?: string | undefined;
referer?: string | undefined;
size?: number | undefined;
}>;
declare const EventConnectionType: z.ZodObject<{
status: z.ZodEnum<["connecting", "open", "close"]>;
}, "strip", z.ZodTypeAny, {
status: "open" | "connecting" | "close";
}, {
status: "open" | "connecting" | "close";
}>;
declare const EventMessagesType: z.ZodObject<{
chatId: z.ZodString;
channelId: z.ZodString;
uniqueId: z.ZodString;
receiverId: z.ZodString;
receiverName: z.ZodString;
roomId: z.ZodString;
roomName: z.ZodString;
senderId: z.ZodString;
senderName: z.ZodString;
senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
chatType: z.ZodEnum<["text", "text", "image", "contact", "location", "document", "audio", "video", "protocol", "contactsArray", "highlyStructured", "sendPayment", "liveLocation", "requestPayment", "declinePaymentRequest", "cancelPaymentRequest", "template", "sticker", "groupInvite", "templateButtonReply", "product", "deviceSent", "list", "viewOnce", "order", "listResponse", "ephemeral", "invoice", "buttons", "buttonsResponse", "paymentInvite", "interactive", "reaction", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
timestamp: z.ZodNumber;
mentions: z.ZodArray<z.ZodString, "many">;
text: z.ZodNullable<z.ZodString>;
links: z.ZodArray<z.ZodString, "many">;
isPrefix: z.ZodBoolean;
isSpam: z.ZodBoolean;
isFromMe: z.ZodBoolean;
isTagMe: z.ZodBoolean;
isGroup: z.ZodBoolean;
isStory: z.ZodBoolean;
isViewOnce: z.ZodBoolean;
isEdited: z.ZodBoolean;
isDeleted: z.ZodBoolean;
isPinned: z.ZodBoolean;
isUnPinned: z.ZodBoolean;
isChannel: z.ZodBoolean;
isBroadcast: z.ZodBoolean;
isEphemeral: z.ZodBoolean;
isForwarded: z.ZodBoolean;
citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
media: z.ZodNullable<z.ZodObject<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">>>;
message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
} & {
replied: z.ZodNullable<z.ZodObject<{
chatId: z.ZodString;
channelId: z.ZodString;
uniqueId: z.ZodString;
receiverId: z.ZodString;
receiverName: z.ZodString;
roomId: z.ZodString;
roomName: z.ZodString;
senderId: z.ZodString;
senderName: z.ZodString;
senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
chatType: z.ZodEnum<["text", "text", "image", "contact", "location", "document", "audio", "video", "protocol", "contactsArray", "highlyStructured", "sendPayment", "liveLocation", "requestPayment", "declinePaymentRequest", "cancelPaymentRequest", "template", "sticker", "groupInvite", "templateButtonReply", "product", "deviceSent", "list", "viewOnce", "order", "listResponse", "ephemeral", "invoice", "buttons", "buttonsResponse", "paymentInvite", "interactive", "reaction", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
timestamp: z.ZodNumber;
mentions: z.ZodArray<z.ZodString, "many">;
text: z.ZodNullable<z.ZodString>;
links: z.ZodArray<z.ZodString, "many">;
isPrefix: z.ZodBoolean;
isSpam: z.ZodBoolean;
isFromMe: z.ZodBoolean;
isTagMe: z.ZodBoolean;
isGroup: z.ZodBoolean;
isStory: z.ZodBoolean;
isViewOnce: z.ZodBoolean;
isEdited: z.ZodBoolean;
isDeleted: z.ZodBoolean;
isPinned: z.ZodBoolean;
isUnPinned: z.ZodBoolean;
isChannel: z.ZodBoolean;
isBroadcast: z.ZodBoolean;
isEphemeral: z.ZodBoolean;
isForwarded: z.ZodBoolean;
citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
media: z.ZodNullable<z.ZodObject<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">>>;
message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
}, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
}>>;
}, "strip", z.ZodTypeAny, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
replied: {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
} | null;
}, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
replied: {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
} | null;
}>;
declare const EventCallType: z.ZodObject<{
callId: z.ZodString;
roomId: z.ZodString;
callerId: z.ZodString;
date: z.ZodDate;
offline: z.ZodBoolean;
status: z.ZodEnum<["accept", "offer", "reject", "ringing", "terminate", "timeout"]>;
isVideo: z.ZodBoolean;
isGroup: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
callId: string;
roomId: string;
callerId: string;
date: Date;
offline: boolean;
isVideo: boolean;
isGroup: boolean;
}, {
status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
callId: string;
roomId: string;
callerId: string;
date: Date;
offline: boolean;
isVideo: boolean;
isGroup: boolean;
}>;
declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls", "webhooks"]>;
type EventEnumType = z.infer<typeof EventEnumType>;
type EventCallbackType = {
connection: (ctx: z.infer<typeof EventConnectionType>) => void;
messages: (ctx: z.infer<typeof EventMessagesType>) => void;
calls: (ctx: z.infer<typeof EventCallType>) => void;
webhooks: (ctx: z.infer<typeof WebhooksParserBaseType>) => void;
};
declare const chatsGetMessage: z.ZodObject<{
chatId: z.ZodString;
channelId: z.ZodString;
uniqueId: z.ZodString;
receiverId: z.ZodString;
receiverName: z.ZodString;
roomId: z.ZodString;
roomName: z.ZodString;
senderId: z.ZodString;
senderName: z.ZodString;
senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
chatType: z.ZodEnum<["text", "text", "image", "contact", "location", "document", "audio", "video", "protocol", "contactsArray", "highlyStructured", "sendPayment", "liveLocation", "requestPayment", "declinePaymentRequest", "cancelPaymentRequest", "template", "sticker", "groupInvite", "templateButtonReply", "product", "deviceSent", "list", "viewOnce", "order", "listResponse", "ephemeral", "invoice", "buttons", "buttonsResponse", "paymentInvite", "interactive", "reaction", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
timestamp: z.ZodNumber;
mentions: z.ZodArray<z.ZodString, "many">;
text: z.ZodNullable<z.ZodString>;
links: z.ZodArray<z.ZodString, "many">;
isPrefix: z.ZodBoolean;
isSpam: z.ZodBoolean;
isFromMe: z.ZodBoolean;
isTagMe: z.ZodBoolean;
isGroup: z.ZodBoolean;
isStory: z.ZodBoolean;
isViewOnce: z.ZodBoolean;
isEdited: z.ZodBoolean;
isDeleted: z.ZodBoolean;
isPinned: z.ZodBoolean;
isUnPinned: z.ZodBoolean;
isChannel: z.ZodBoolean;
isBroadcast: z.ZodBoolean;
isEphemeral: z.ZodBoolean;
isForwarded: z.ZodBoolean;
citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
media: z.ZodNullable<z.ZodObject<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">>>;
message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
} & {
replied: z.ZodNullable<z.ZodObject<{
chatId: z.ZodString;
channelId: z.ZodString;
uniqueId: z.ZodString;
receiverId: z.ZodString;
receiverName: z.ZodString;
roomId: z.ZodString;
roomName: z.ZodString;
senderId: z.ZodString;
senderName: z.ZodString;
senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
chatType: z.ZodEnum<["text", "text", "image", "contact", "location", "document", "audio", "video", "protocol", "contactsArray", "highlyStructured", "sendPayment", "liveLocation", "requestPayment", "declinePaymentRequest", "cancelPaymentRequest", "template", "sticker", "groupInvite", "templateButtonReply", "product", "deviceSent", "list", "viewOnce", "order", "listResponse", "ephemeral", "invoice", "buttons", "buttonsResponse", "paymentInvite", "interactive", "reaction", "sticker", "interactiveResponse", "pollCreation", "pollUpdate", "keepInChat", "document", "requestPhoneNumber", "viewOnce", "reaction", "text", "viewOnce", "pollCreation", "scheduledCallCreation", "groupMentioned", "pinInChat", "pollCreation", "scheduledCallEdit", "ptv", "botInvoke", "callLog", "encComment", "bcall", "lottieSticker", "event", "comment", "text", "text", "placeholder", "encEventUpdate"]>;
timestamp: z.ZodNumber;
mentions: z.ZodArray<z.ZodString, "many">;
text: z.ZodNullable<z.ZodString>;
links: z.ZodArray<z.ZodString, "many">;
isPrefix: z.ZodBoolean;
isSpam: z.ZodBoolean;
isFromMe: z.ZodBoolean;
isTagMe: z.ZodBoolean;
isGroup: z.ZodBoolean;
isStory: z.ZodBoolean;
isViewOnce: z.ZodBoolean;
isEdited: z.ZodBoolean;
isDeleted: z.ZodBoolean;
isPinned: z.ZodBoolean;
isUnPinned: z.ZodBoolean;
isChannel: z.ZodBoolean;
isBroadcast: z.ZodBoolean;
isEphemeral: z.ZodBoolean;
isForwarded: z.ZodBoolean;
citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
media: z.ZodNullable<z.ZodObject<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough">>>;
message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
}, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
}>>;
}, "strip", z.ZodTypeAny, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
replied: {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectOutputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
} | null;
}, {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
chatType: "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "contactsArray" | "highlyStructured" | "sendPayment" | "liveLocation" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "templateButtonReply" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "listResponse" | "ephemeral" | "invoice" | "buttons" | "buttonsResponse" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "event" | "comment" | "placeholder" | "encEventUpdate";
timestamp: number;
mentions: string[];
links: string[];
isPrefix: boolean;
isSpam: boolean;
isFromMe: boolean;
isTagMe: boolean;
isStory: boolean;
isViewOnce: boolean;
isEdited: boolean;
isDeleted: boolean;
isPinned: boolean;
isUnPinned: boolean;
isChannel: boolean;
isBroadcast: boolean;
isEphemeral: boolean;
isForwarded: boolean;
citation: Record<string, boolean> | null;
media: z.objectInputType<{
buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
}, z.ZodTypeAny, "passthrough"> | null;
replied: {
channelId: string;
uniqueId: string;
message: (...args: unknown[]) => Record<string, any>;
senderId: string;
roomId: string;
isGroup: boolean;
text: string | null;
chatId: string;
receiverId: string;
receiverName: string;
roomName: string;
senderName: string;
senderDevice: "un