zaileys 1.1.15 → 1.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1459 @@
1
+ import NodeCache from 'node-cache';
2
+ import { Ora } from 'ora';
3
+ import { z } from 'zod';
4
+ import * as stream from 'stream';
5
+ import { Readable } from 'stream';
6
+
7
+ declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObject<{
8
+ authType: z.ZodLiteral<"pairing">;
9
+ phoneNumber: z.ZodNumber;
10
+ } & {
11
+ prefix: z.ZodOptional<z.ZodString>;
12
+ ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
13
+ showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
14
+ autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
15
+ autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
16
+ autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
17
+ autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
18
+ autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
19
+ database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
20
+ type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
21
+ connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
22
+ url: z.ZodDefault<z.ZodString>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ url: string;
25
+ }, {
26
+ url?: string | undefined;
27
+ }>>>;
28
+ }, "strip", z.ZodTypeAny, {
29
+ type: "sqlite" | "postgresql" | "mysql";
30
+ connection: {
31
+ url: string;
32
+ };
33
+ }, {
34
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
35
+ connection?: {
36
+ url?: string | undefined;
37
+ } | undefined;
38
+ }>>>;
39
+ 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>;
40
+ }, "strip", z.ZodTypeAny, {
41
+ citation: Record<string, number[]>;
42
+ authType: "pairing";
43
+ phoneNumber: number;
44
+ ignoreMe: boolean;
45
+ showLogs: boolean;
46
+ autoMentions: boolean;
47
+ autoOnline: boolean;
48
+ autoRead: boolean;
49
+ autoPresence: boolean;
50
+ autoRejectCall: boolean;
51
+ database: {
52
+ type: "sqlite" | "postgresql" | "mysql";
53
+ connection: {
54
+ url: string;
55
+ };
56
+ };
57
+ prefix?: string | undefined;
58
+ }, {
59
+ authType: "pairing";
60
+ phoneNumber: number;
61
+ citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
62
+ prefix?: string | undefined;
63
+ ignoreMe?: boolean | undefined;
64
+ showLogs?: boolean | undefined;
65
+ autoMentions?: boolean | undefined;
66
+ autoOnline?: boolean | undefined;
67
+ autoRead?: boolean | undefined;
68
+ autoPresence?: boolean | undefined;
69
+ autoRejectCall?: boolean | undefined;
70
+ database?: {
71
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
72
+ connection?: {
73
+ url?: string | undefined;
74
+ } | undefined;
75
+ } | undefined;
76
+ }>, z.ZodObject<{
77
+ authType: z.ZodLiteral<"qr">;
78
+ phoneNumber: z.ZodOptional<z.ZodUndefined>;
79
+ } & {
80
+ prefix: z.ZodOptional<z.ZodString>;
81
+ ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
82
+ showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
83
+ autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
84
+ autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
85
+ autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
86
+ autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
87
+ autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
88
+ database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
89
+ type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
90
+ connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
91
+ url: z.ZodDefault<z.ZodString>;
92
+ }, "strip", z.ZodTypeAny, {
93
+ url: string;
94
+ }, {
95
+ url?: string | undefined;
96
+ }>>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type: "sqlite" | "postgresql" | "mysql";
99
+ connection: {
100
+ url: string;
101
+ };
102
+ }, {
103
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
104
+ connection?: {
105
+ url?: string | undefined;
106
+ } | undefined;
107
+ }>>>;
108
+ 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>;
109
+ }, "strip", z.ZodTypeAny, {
110
+ citation: Record<string, number[]>;
111
+ authType: "qr";
112
+ ignoreMe: boolean;
113
+ showLogs: boolean;
114
+ autoMentions: boolean;
115
+ autoOnline: boolean;
116
+ autoRead: boolean;
117
+ autoPresence: boolean;
118
+ autoRejectCall: boolean;
119
+ database: {
120
+ type: "sqlite" | "postgresql" | "mysql";
121
+ connection: {
122
+ url: string;
123
+ };
124
+ };
125
+ phoneNumber?: undefined;
126
+ prefix?: string | undefined;
127
+ }, {
128
+ authType: "qr";
129
+ citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
130
+ phoneNumber?: undefined;
131
+ prefix?: string | undefined;
132
+ ignoreMe?: boolean | undefined;
133
+ showLogs?: boolean | undefined;
134
+ autoMentions?: boolean | undefined;
135
+ autoOnline?: boolean | undefined;
136
+ autoRead?: boolean | undefined;
137
+ autoPresence?: boolean | undefined;
138
+ autoRejectCall?: boolean | undefined;
139
+ database?: {
140
+ type?: "sqlite" | "postgresql" | "mysql" | undefined;
141
+ connection?: {
142
+ url?: string | undefined;
143
+ } | undefined;
144
+ } | undefined;
145
+ }>]>;
146
+
147
+ declare const EventConnectionType: z.ZodObject<{
148
+ status: z.ZodEnum<["connecting", "open", "close"]>;
149
+ }, "strip", z.ZodTypeAny, {
150
+ status: "open" | "connecting" | "close";
151
+ }, {
152
+ status: "open" | "connecting" | "close";
153
+ }>;
154
+ declare const EventMessagesType: z.ZodObject<{
155
+ chatId: z.ZodString;
156
+ channelId: z.ZodString;
157
+ receiverId: z.ZodString;
158
+ receiverName: z.ZodString;
159
+ roomId: z.ZodString;
160
+ roomName: z.ZodString;
161
+ senderId: z.ZodString;
162
+ senderName: z.ZodString;
163
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
164
+ 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"]>;
165
+ timestamp: z.ZodNumber;
166
+ mentions: z.ZodArray<z.ZodString, "many">;
167
+ text: z.ZodNullable<z.ZodString>;
168
+ links: z.ZodArray<z.ZodString, "many">;
169
+ isPrefix: z.ZodBoolean;
170
+ isFromMe: z.ZodBoolean;
171
+ isTagMe: z.ZodBoolean;
172
+ isGroup: z.ZodBoolean;
173
+ isStory: z.ZodBoolean;
174
+ isViewOnce: z.ZodBoolean;
175
+ isEdited: z.ZodBoolean;
176
+ isDeleted: z.ZodBoolean;
177
+ isPinned: z.ZodBoolean;
178
+ isUnPinned: z.ZodBoolean;
179
+ isChannel: z.ZodBoolean;
180
+ isBroadcast: z.ZodBoolean;
181
+ isEphemeral: z.ZodBoolean;
182
+ isForwarded: z.ZodBoolean;
183
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
184
+ media: z.ZodNullable<z.ZodObject<{
185
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
186
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
187
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
188
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
189
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
190
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
191
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
192
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
193
+ }, z.ZodTypeAny, "passthrough">>>;
194
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
195
+ } & {
196
+ replied: z.ZodNullable<z.ZodObject<{
197
+ chatId: z.ZodString;
198
+ channelId: z.ZodString;
199
+ receiverId: z.ZodString;
200
+ receiverName: z.ZodString;
201
+ roomId: z.ZodString;
202
+ roomName: z.ZodString;
203
+ senderId: z.ZodString;
204
+ senderName: z.ZodString;
205
+ senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
206
+ 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"]>;
207
+ timestamp: z.ZodNumber;
208
+ mentions: z.ZodArray<z.ZodString, "many">;
209
+ text: z.ZodNullable<z.ZodString>;
210
+ links: z.ZodArray<z.ZodString, "many">;
211
+ isPrefix: z.ZodBoolean;
212
+ isFromMe: z.ZodBoolean;
213
+ isTagMe: z.ZodBoolean;
214
+ isGroup: z.ZodBoolean;
215
+ isStory: z.ZodBoolean;
216
+ isViewOnce: z.ZodBoolean;
217
+ isEdited: z.ZodBoolean;
218
+ isDeleted: z.ZodBoolean;
219
+ isPinned: z.ZodBoolean;
220
+ isUnPinned: z.ZodBoolean;
221
+ isChannel: z.ZodBoolean;
222
+ isBroadcast: z.ZodBoolean;
223
+ isEphemeral: z.ZodBoolean;
224
+ isForwarded: z.ZodBoolean;
225
+ citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
226
+ media: z.ZodNullable<z.ZodObject<{
227
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
228
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
229
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
230
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
231
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
232
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
233
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
234
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
235
+ }, z.ZodTypeAny, "passthrough">>>;
236
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
237
+ }, "strip", z.ZodTypeAny, {
238
+ message: (...args: unknown[]) => Record<string, any>;
239
+ roomId: string;
240
+ isGroup: boolean;
241
+ text: string | null;
242
+ chatId: string;
243
+ channelId: string;
244
+ receiverId: string;
245
+ receiverName: string;
246
+ roomName: string;
247
+ senderId: string;
248
+ senderName: string;
249
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
250
+ 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";
251
+ timestamp: number;
252
+ mentions: string[];
253
+ links: string[];
254
+ isPrefix: boolean;
255
+ isFromMe: boolean;
256
+ isTagMe: boolean;
257
+ isStory: boolean;
258
+ isViewOnce: boolean;
259
+ isEdited: boolean;
260
+ isDeleted: boolean;
261
+ isPinned: boolean;
262
+ isUnPinned: boolean;
263
+ isChannel: boolean;
264
+ isBroadcast: boolean;
265
+ isEphemeral: boolean;
266
+ isForwarded: boolean;
267
+ citation: Record<string, boolean> | null;
268
+ media: z.objectOutputType<{
269
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
270
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
271
+ }, z.ZodTypeAny, "passthrough"> | null;
272
+ }, {
273
+ message: (...args: unknown[]) => Record<string, any>;
274
+ roomId: string;
275
+ isGroup: boolean;
276
+ text: string | null;
277
+ chatId: string;
278
+ channelId: string;
279
+ receiverId: string;
280
+ receiverName: string;
281
+ roomName: string;
282
+ senderId: string;
283
+ senderName: string;
284
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
285
+ 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";
286
+ timestamp: number;
287
+ mentions: string[];
288
+ links: string[];
289
+ isPrefix: boolean;
290
+ isFromMe: boolean;
291
+ isTagMe: boolean;
292
+ isStory: boolean;
293
+ isViewOnce: boolean;
294
+ isEdited: boolean;
295
+ isDeleted: boolean;
296
+ isPinned: boolean;
297
+ isUnPinned: boolean;
298
+ isChannel: boolean;
299
+ isBroadcast: boolean;
300
+ isEphemeral: boolean;
301
+ isForwarded: boolean;
302
+ citation: Record<string, boolean> | null;
303
+ media: z.objectInputType<{
304
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
305
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
306
+ }, z.ZodTypeAny, "passthrough"> | null;
307
+ }>>;
308
+ }, "strip", z.ZodTypeAny, {
309
+ message: (...args: unknown[]) => Record<string, any>;
310
+ roomId: string;
311
+ isGroup: boolean;
312
+ text: string | null;
313
+ chatId: string;
314
+ channelId: string;
315
+ receiverId: string;
316
+ receiverName: string;
317
+ roomName: string;
318
+ senderId: string;
319
+ senderName: string;
320
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
321
+ 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";
322
+ timestamp: number;
323
+ mentions: string[];
324
+ links: string[];
325
+ isPrefix: boolean;
326
+ isFromMe: boolean;
327
+ isTagMe: boolean;
328
+ isStory: boolean;
329
+ isViewOnce: boolean;
330
+ isEdited: boolean;
331
+ isDeleted: boolean;
332
+ isPinned: boolean;
333
+ isUnPinned: boolean;
334
+ isChannel: boolean;
335
+ isBroadcast: boolean;
336
+ isEphemeral: boolean;
337
+ isForwarded: boolean;
338
+ citation: Record<string, boolean> | null;
339
+ media: z.objectOutputType<{
340
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
341
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
342
+ }, z.ZodTypeAny, "passthrough"> | null;
343
+ replied: {
344
+ message: (...args: unknown[]) => Record<string, any>;
345
+ roomId: string;
346
+ isGroup: boolean;
347
+ text: string | null;
348
+ chatId: string;
349
+ channelId: string;
350
+ receiverId: string;
351
+ receiverName: string;
352
+ roomName: string;
353
+ senderId: string;
354
+ senderName: string;
355
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
356
+ 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";
357
+ timestamp: number;
358
+ mentions: string[];
359
+ links: string[];
360
+ isPrefix: boolean;
361
+ isFromMe: boolean;
362
+ isTagMe: boolean;
363
+ isStory: boolean;
364
+ isViewOnce: boolean;
365
+ isEdited: boolean;
366
+ isDeleted: boolean;
367
+ isPinned: boolean;
368
+ isUnPinned: boolean;
369
+ isChannel: boolean;
370
+ isBroadcast: boolean;
371
+ isEphemeral: boolean;
372
+ isForwarded: boolean;
373
+ citation: Record<string, boolean> | null;
374
+ media: z.objectOutputType<{
375
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
376
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
377
+ }, z.ZodTypeAny, "passthrough"> | null;
378
+ } | null;
379
+ }, {
380
+ message: (...args: unknown[]) => Record<string, any>;
381
+ roomId: string;
382
+ isGroup: boolean;
383
+ text: string | null;
384
+ chatId: string;
385
+ channelId: string;
386
+ receiverId: string;
387
+ receiverName: string;
388
+ roomName: string;
389
+ senderId: string;
390
+ senderName: string;
391
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
392
+ 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";
393
+ timestamp: number;
394
+ mentions: string[];
395
+ links: string[];
396
+ isPrefix: boolean;
397
+ isFromMe: boolean;
398
+ isTagMe: boolean;
399
+ isStory: boolean;
400
+ isViewOnce: boolean;
401
+ isEdited: boolean;
402
+ isDeleted: boolean;
403
+ isPinned: boolean;
404
+ isUnPinned: boolean;
405
+ isChannel: boolean;
406
+ isBroadcast: boolean;
407
+ isEphemeral: boolean;
408
+ isForwarded: boolean;
409
+ citation: Record<string, boolean> | null;
410
+ media: z.objectInputType<{
411
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
412
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
413
+ }, z.ZodTypeAny, "passthrough"> | null;
414
+ replied: {
415
+ message: (...args: unknown[]) => Record<string, any>;
416
+ roomId: string;
417
+ isGroup: boolean;
418
+ text: string | null;
419
+ chatId: string;
420
+ channelId: string;
421
+ receiverId: string;
422
+ receiverName: string;
423
+ roomName: string;
424
+ senderId: string;
425
+ senderName: string;
426
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
427
+ 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";
428
+ timestamp: number;
429
+ mentions: string[];
430
+ links: string[];
431
+ isPrefix: boolean;
432
+ isFromMe: boolean;
433
+ isTagMe: boolean;
434
+ isStory: boolean;
435
+ isViewOnce: boolean;
436
+ isEdited: boolean;
437
+ isDeleted: boolean;
438
+ isPinned: boolean;
439
+ isUnPinned: boolean;
440
+ isChannel: boolean;
441
+ isBroadcast: boolean;
442
+ isEphemeral: boolean;
443
+ isForwarded: boolean;
444
+ citation: Record<string, boolean> | null;
445
+ media: z.objectInputType<{
446
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
447
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
448
+ }, z.ZodTypeAny, "passthrough"> | null;
449
+ } | null;
450
+ }>;
451
+ declare const EventCallType: z.ZodObject<{
452
+ callId: z.ZodString;
453
+ roomId: z.ZodString;
454
+ callerId: z.ZodString;
455
+ date: z.ZodDate;
456
+ offline: z.ZodBoolean;
457
+ status: z.ZodEnum<["accept", "offer", "reject", "ringing", "terminate", "timeout"]>;
458
+ isVideo: z.ZodBoolean;
459
+ isGroup: z.ZodBoolean;
460
+ }, "strip", z.ZodTypeAny, {
461
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
462
+ callId: string;
463
+ roomId: string;
464
+ callerId: string;
465
+ date: Date;
466
+ offline: boolean;
467
+ isVideo: boolean;
468
+ isGroup: boolean;
469
+ }, {
470
+ status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
471
+ callId: string;
472
+ roomId: string;
473
+ callerId: string;
474
+ date: Date;
475
+ offline: boolean;
476
+ isVideo: boolean;
477
+ isGroup: boolean;
478
+ }>;
479
+ declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls"]>;
480
+ type EventEnumType = z.infer<typeof EventEnumType>;
481
+ type EventCallbackType = {
482
+ connection: (ctx: z.infer<typeof EventConnectionType>) => void;
483
+ messages: (ctx: z.infer<typeof EventMessagesType>) => void;
484
+ calls: (ctx: z.infer<typeof EventCallType>) => void;
485
+ };
486
+
487
+ declare const TextWorkerBaseType: z.ZodUnion<[z.ZodString, z.ZodObject<{
488
+ image: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
489
+ text: z.ZodOptional<z.ZodString>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ image: string | Buffer<ArrayBufferLike> | Readable;
492
+ text?: string | undefined;
493
+ }, {
494
+ image: string | Buffer<ArrayBufferLike> | Readable;
495
+ text?: string | undefined;
496
+ }>, z.ZodObject<{
497
+ video: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
498
+ text: z.ZodOptional<z.ZodString>;
499
+ }, "strip", z.ZodTypeAny, {
500
+ video: string | Buffer<ArrayBufferLike> | Readable;
501
+ text?: string | undefined;
502
+ }, {
503
+ video: string | Buffer<ArrayBufferLike> | Readable;
504
+ text?: string | undefined;
505
+ }>, z.ZodObject<{
506
+ videoNote: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
507
+ }, "strip", z.ZodTypeAny, {
508
+ videoNote: string | Buffer<ArrayBufferLike> | Readable;
509
+ }, {
510
+ videoNote: string | Buffer<ArrayBufferLike> | Readable;
511
+ }>, z.ZodObject<{
512
+ gif: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
513
+ text: z.ZodOptional<z.ZodString>;
514
+ }, "strip", z.ZodTypeAny, {
515
+ gif: string | Buffer<ArrayBufferLike> | Readable;
516
+ text?: string | undefined;
517
+ }, {
518
+ gif: string | Buffer<ArrayBufferLike> | Readable;
519
+ text?: string | undefined;
520
+ }>, z.ZodObject<{
521
+ audio: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
522
+ }, "strip", z.ZodTypeAny, {
523
+ audio: string | Buffer<ArrayBufferLike> | Readable;
524
+ }, {
525
+ audio: string | Buffer<ArrayBufferLike> | Readable;
526
+ }>, z.ZodObject<{
527
+ audioNote: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
528
+ }, "strip", z.ZodTypeAny, {
529
+ audioNote: string | Buffer<ArrayBufferLike> | Readable;
530
+ }, {
531
+ audioNote: string | Buffer<ArrayBufferLike> | Readable;
532
+ }>, z.ZodObject<{
533
+ sticker: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
534
+ }, "strip", z.ZodTypeAny, {
535
+ sticker: string | Buffer<ArrayBufferLike> | Readable;
536
+ }, {
537
+ sticker: string | Buffer<ArrayBufferLike> | Readable;
538
+ }>]>;
539
+ declare const TextWorkerOptionsType: z.ZodObject<{
540
+ roomId: z.ZodString;
541
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
542
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
543
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
544
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
545
+ }, "strip", z.ZodTypeAny, {
546
+ roomId: string;
547
+ asForwarded?: boolean | undefined;
548
+ asViewOnce?: boolean | undefined;
549
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
550
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
551
+ }, {
552
+ roomId: string;
553
+ asForwarded?: boolean | undefined;
554
+ asViewOnce?: boolean | undefined;
555
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
556
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
557
+ }>;
558
+ declare const LocationWorkerOptionsType: z.ZodObject<{
559
+ roomId: z.ZodString;
560
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
561
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
562
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
563
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
564
+ }, "strip", z.ZodTypeAny, {
565
+ roomId: string;
566
+ asForwarded?: boolean | undefined;
567
+ asViewOnce?: boolean | undefined;
568
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
569
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
570
+ }, {
571
+ roomId: string;
572
+ asForwarded?: boolean | undefined;
573
+ asViewOnce?: boolean | undefined;
574
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
575
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
576
+ }>;
577
+ declare const LocationWorkerBaseType: z.ZodObject<{
578
+ latitude: z.ZodNumber;
579
+ longitude: z.ZodNumber;
580
+ title: z.ZodOptional<z.ZodString>;
581
+ footer: z.ZodOptional<z.ZodString>;
582
+ }, "strip", z.ZodTypeAny, {
583
+ latitude: number;
584
+ longitude: number;
585
+ title?: string | undefined;
586
+ footer?: string | undefined;
587
+ }, {
588
+ latitude: number;
589
+ longitude: number;
590
+ title?: string | undefined;
591
+ footer?: string | undefined;
592
+ }>;
593
+ declare const ContactWorkerOptionsType: z.ZodObject<{
594
+ roomId: z.ZodString;
595
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
596
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
597
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
598
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
599
+ }, "strip", z.ZodTypeAny, {
600
+ roomId: string;
601
+ asForwarded?: boolean | undefined;
602
+ asViewOnce?: boolean | undefined;
603
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
604
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
605
+ }, {
606
+ roomId: string;
607
+ asForwarded?: boolean | undefined;
608
+ asViewOnce?: boolean | undefined;
609
+ verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
610
+ quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
611
+ }>;
612
+ declare const ContactWorkerBaseType: z.ZodObject<{
613
+ fullname: z.ZodString;
614
+ nickname: z.ZodOptional<z.ZodString>;
615
+ organization: z.ZodOptional<z.ZodString>;
616
+ role: z.ZodOptional<z.ZodString>;
617
+ email: z.ZodOptional<z.ZodString>;
618
+ whatsAppNumber: z.ZodNumber;
619
+ callNumber: z.ZodOptional<z.ZodNumber>;
620
+ voiceNumber: z.ZodOptional<z.ZodNumber>;
621
+ website: z.ZodOptional<z.ZodString>;
622
+ homeAddress: z.ZodOptional<z.ZodString>;
623
+ workAddress: z.ZodOptional<z.ZodString>;
624
+ avatar: z.ZodOptional<z.ZodString>;
625
+ }, "strip", z.ZodTypeAny, {
626
+ fullname: string;
627
+ whatsAppNumber: number;
628
+ nickname?: string | undefined;
629
+ organization?: string | undefined;
630
+ role?: string | undefined;
631
+ email?: string | undefined;
632
+ callNumber?: number | undefined;
633
+ voiceNumber?: number | undefined;
634
+ website?: string | undefined;
635
+ homeAddress?: string | undefined;
636
+ workAddress?: string | undefined;
637
+ avatar?: string | undefined;
638
+ }, {
639
+ fullname: string;
640
+ whatsAppNumber: number;
641
+ nickname?: string | undefined;
642
+ organization?: string | undefined;
643
+ role?: string | undefined;
644
+ email?: string | undefined;
645
+ callNumber?: number | undefined;
646
+ voiceNumber?: number | undefined;
647
+ website?: string | undefined;
648
+ homeAddress?: string | undefined;
649
+ workAddress?: string | undefined;
650
+ avatar?: string | undefined;
651
+ }>;
652
+ declare const ReactionWorkerOptionsType: z.ZodObject<{
653
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
654
+ }, "strip", z.ZodTypeAny, {
655
+ message: (...args: unknown[]) => Record<string, any>;
656
+ }, {
657
+ message: (...args: unknown[]) => Record<string, any>;
658
+ }>;
659
+ declare const ReactionWorkerBaseType: z.ZodString;
660
+ declare const PinWorkerOptionsType: z.ZodObject<{
661
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
662
+ }, "strip", z.ZodTypeAny, {
663
+ message: (...args: unknown[]) => Record<string, any>;
664
+ }, {
665
+ message: (...args: unknown[]) => Record<string, any>;
666
+ }>;
667
+ declare const PinWorkerBaseType: z.ZodObject<{
668
+ action: z.ZodEnum<["pin", "unpin"]>;
669
+ expired: z.ZodEnum<["24h", "7d", "30d"]>;
670
+ }, "strip", z.ZodTypeAny, {
671
+ action: "pin" | "unpin";
672
+ expired: "24h" | "7d" | "30d";
673
+ }, {
674
+ action: "pin" | "unpin";
675
+ expired: "24h" | "7d" | "30d";
676
+ }>;
677
+ declare const PollWorkerOptionsType: z.ZodObject<Pick<{
678
+ roomId: z.ZodString;
679
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
680
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
681
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
682
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
683
+ }, "roomId">, "strip", z.ZodTypeAny, {
684
+ roomId: string;
685
+ }, {
686
+ roomId: string;
687
+ }>;
688
+ declare const PollWorkerBaseType: z.ZodObject<{
689
+ name: z.ZodString;
690
+ answers: z.ZodArray<z.ZodString, "many">;
691
+ multipleAnswers: z.ZodOptional<z.ZodBoolean>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ name: string;
694
+ answers: string[];
695
+ multipleAnswers?: boolean | undefined;
696
+ }, {
697
+ name: string;
698
+ answers: string[];
699
+ multipleAnswers?: boolean | undefined;
700
+ }>;
701
+ declare const EditWorkerOptionsType: z.ZodObject<{
702
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
703
+ }, "strip", z.ZodTypeAny, {
704
+ message: (...args: unknown[]) => Record<string, any>;
705
+ }, {
706
+ message: (...args: unknown[]) => Record<string, any>;
707
+ }>;
708
+ declare const EditWorkerBaseType: z.ZodString;
709
+ declare const DeleteWorkerBaseType: z.ZodObject<{
710
+ message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
711
+ }, "strip", z.ZodTypeAny, {
712
+ message: (...args: unknown[]) => Record<string, any>;
713
+ }, {
714
+ message: (...args: unknown[]) => Record<string, any>;
715
+ }>;
716
+ declare const RejectCallWorkerBaseType: z.ZodObject<{
717
+ callId: z.ZodString;
718
+ callerId: z.ZodString;
719
+ }, "strip", z.ZodTypeAny, {
720
+ callId: string;
721
+ callerId: string;
722
+ }, {
723
+ callId: string;
724
+ callerId: string;
725
+ }>;
726
+ declare const MuteWorkerOptionsType: z.ZodObject<Pick<{
727
+ roomId: z.ZodString;
728
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
729
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
730
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
731
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
732
+ }, "roomId">, "strip", z.ZodTypeAny, {
733
+ roomId: string;
734
+ }, {
735
+ roomId: string;
736
+ }>;
737
+ declare const MuteWorkerBaseType: z.ZodObject<{
738
+ expired: z.ZodEnum<["remove", "8h", "7d"]>;
739
+ }, "strip", z.ZodTypeAny, {
740
+ expired: "7d" | "remove" | "8h";
741
+ }, {
742
+ expired: "7d" | "remove" | "8h";
743
+ }>;
744
+ declare const ProfileWorkerBaseType: z.ZodString;
745
+ declare const ProfileWorkerBaseOutputType: z.ZodObject<{
746
+ type: z.ZodEnum<["group", "user"]>;
747
+ id: z.ZodString;
748
+ name: z.ZodString;
749
+ bio: z.ZodString;
750
+ avatar: z.ZodString;
751
+ ephemeralDuration: z.ZodOptional<z.ZodNumber>;
752
+ isRestrict: z.ZodOptional<z.ZodBoolean>;
753
+ isAnnounce: z.ZodOptional<z.ZodBoolean>;
754
+ isCommunity: z.ZodOptional<z.ZodBoolean>;
755
+ isCommunityAnnounce: z.ZodOptional<z.ZodBoolean>;
756
+ isJoinApprovalMode: z.ZodOptional<z.ZodBoolean>;
757
+ isMemberAddMode: z.ZodOptional<z.ZodBoolean>;
758
+ owner: z.ZodNullable<z.ZodObject<{
759
+ type: z.ZodLiteral<"user">;
760
+ id: z.ZodString;
761
+ }, "strip", z.ZodTypeAny, {
762
+ id: string;
763
+ type: "user";
764
+ }, {
765
+ id: string;
766
+ type: "user";
767
+ }>>;
768
+ roomCreatedAt: z.ZodOptional<z.ZodNumber>;
769
+ nameUpdatedAt: z.ZodOptional<z.ZodNumber>;
770
+ bioUpdatedAt: z.ZodOptional<z.ZodNumber>;
771
+ membersLength: z.ZodOptional<z.ZodNumber>;
772
+ members: z.ZodOptional<z.ZodArray<z.ZodObject<{
773
+ type: z.ZodEnum<["user", "admin", "superadmin"]>;
774
+ id: z.ZodString;
775
+ }, "strip", z.ZodTypeAny, {
776
+ id: string;
777
+ type: "user" | "admin" | "superadmin";
778
+ }, {
779
+ id: string;
780
+ type: "user" | "admin" | "superadmin";
781
+ }>, "many">>;
782
+ }, "strip", z.ZodTypeAny, {
783
+ id: string;
784
+ type: "user" | "group";
785
+ name: string;
786
+ owner: {
787
+ id: string;
788
+ type: "user";
789
+ } | null;
790
+ avatar: string;
791
+ bio: string;
792
+ isCommunity?: boolean | undefined;
793
+ isCommunityAnnounce?: boolean | undefined;
794
+ ephemeralDuration?: number | undefined;
795
+ isRestrict?: boolean | undefined;
796
+ isAnnounce?: boolean | undefined;
797
+ isJoinApprovalMode?: boolean | undefined;
798
+ isMemberAddMode?: boolean | undefined;
799
+ roomCreatedAt?: number | undefined;
800
+ nameUpdatedAt?: number | undefined;
801
+ bioUpdatedAt?: number | undefined;
802
+ membersLength?: number | undefined;
803
+ members?: {
804
+ id: string;
805
+ type: "user" | "admin" | "superadmin";
806
+ }[] | undefined;
807
+ }, {
808
+ id: string;
809
+ type: "user" | "group";
810
+ name: string;
811
+ owner: {
812
+ id: string;
813
+ type: "user";
814
+ } | null;
815
+ avatar: string;
816
+ bio: string;
817
+ isCommunity?: boolean | undefined;
818
+ isCommunityAnnounce?: boolean | undefined;
819
+ ephemeralDuration?: number | undefined;
820
+ isRestrict?: boolean | undefined;
821
+ isAnnounce?: boolean | undefined;
822
+ isJoinApprovalMode?: boolean | undefined;
823
+ isMemberAddMode?: boolean | undefined;
824
+ roomCreatedAt?: number | undefined;
825
+ nameUpdatedAt?: number | undefined;
826
+ bioUpdatedAt?: number | undefined;
827
+ membersLength?: number | undefined;
828
+ members?: {
829
+ id: string;
830
+ type: "user" | "admin" | "superadmin";
831
+ }[] | undefined;
832
+ }>;
833
+ declare const PresenceWorkerOptionsType: z.ZodObject<Pick<{
834
+ roomId: z.ZodString;
835
+ asForwarded: z.ZodOptional<z.ZodBoolean>;
836
+ asViewOnce: z.ZodOptional<z.ZodBoolean>;
837
+ verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
838
+ quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
839
+ }, "roomId">, "strip", z.ZodTypeAny, {
840
+ roomId: string;
841
+ }, {
842
+ roomId: string;
843
+ }>;
844
+ declare const PresenceWorkerBaseType: z.ZodEnum<["typing", "recording", "online", "offline", "paused"]>;
845
+
846
+ declare class Worker {
847
+ private wa;
848
+ private parser;
849
+ constructor(wa: {
850
+ client: Client;
851
+ db: Client["db"];
852
+ socket: Client["socket"];
853
+ });
854
+ private sendMessage;
855
+ text(text: z.infer<typeof TextWorkerBaseType>, options: z.infer<typeof TextWorkerOptionsType>): Promise<{
856
+ message: (...args: unknown[]) => Record<string, any>;
857
+ roomId: string;
858
+ isGroup: boolean;
859
+ text: string | null;
860
+ chatId: string;
861
+ channelId: string;
862
+ receiverId: string;
863
+ receiverName: string;
864
+ roomName: string;
865
+ senderId: string;
866
+ senderName: string;
867
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
868
+ 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";
869
+ timestamp: number;
870
+ mentions: string[];
871
+ links: string[];
872
+ isPrefix: boolean;
873
+ isFromMe: boolean;
874
+ isTagMe: boolean;
875
+ isStory: boolean;
876
+ isViewOnce: boolean;
877
+ isEdited: boolean;
878
+ isDeleted: boolean;
879
+ isPinned: boolean;
880
+ isUnPinned: boolean;
881
+ isChannel: boolean;
882
+ isBroadcast: boolean;
883
+ isEphemeral: boolean;
884
+ isForwarded: boolean;
885
+ citation: Record<string, boolean> | null;
886
+ media: z.objectOutputType<{
887
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
888
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
889
+ }, z.ZodTypeAny, "passthrough"> | null;
890
+ replied: {
891
+ message: (...args: unknown[]) => Record<string, any>;
892
+ roomId: string;
893
+ isGroup: boolean;
894
+ text: string | null;
895
+ chatId: string;
896
+ channelId: string;
897
+ receiverId: string;
898
+ receiverName: string;
899
+ roomName: string;
900
+ senderId: string;
901
+ senderName: string;
902
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
903
+ 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";
904
+ timestamp: number;
905
+ mentions: string[];
906
+ links: string[];
907
+ isPrefix: boolean;
908
+ isFromMe: boolean;
909
+ isTagMe: boolean;
910
+ isStory: boolean;
911
+ isViewOnce: boolean;
912
+ isEdited: boolean;
913
+ isDeleted: boolean;
914
+ isPinned: boolean;
915
+ isUnPinned: boolean;
916
+ isChannel: boolean;
917
+ isBroadcast: boolean;
918
+ isEphemeral: boolean;
919
+ isForwarded: boolean;
920
+ citation: Record<string, boolean> | null;
921
+ media: z.objectOutputType<{
922
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
923
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
924
+ }, z.ZodTypeAny, "passthrough"> | null;
925
+ } | null;
926
+ } | null | undefined>;
927
+ location(loc: z.infer<typeof LocationWorkerBaseType>, options: z.infer<typeof LocationWorkerOptionsType>): Promise<{
928
+ message: (...args: unknown[]) => Record<string, any>;
929
+ roomId: string;
930
+ isGroup: boolean;
931
+ text: string | null;
932
+ chatId: string;
933
+ channelId: string;
934
+ receiverId: string;
935
+ receiverName: string;
936
+ roomName: string;
937
+ senderId: string;
938
+ senderName: string;
939
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
940
+ 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";
941
+ timestamp: number;
942
+ mentions: string[];
943
+ links: string[];
944
+ isPrefix: boolean;
945
+ isFromMe: boolean;
946
+ isTagMe: boolean;
947
+ isStory: boolean;
948
+ isViewOnce: boolean;
949
+ isEdited: boolean;
950
+ isDeleted: boolean;
951
+ isPinned: boolean;
952
+ isUnPinned: boolean;
953
+ isChannel: boolean;
954
+ isBroadcast: boolean;
955
+ isEphemeral: boolean;
956
+ isForwarded: boolean;
957
+ citation: Record<string, boolean> | null;
958
+ media: z.objectOutputType<{
959
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
960
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
961
+ }, z.ZodTypeAny, "passthrough"> | null;
962
+ replied: {
963
+ message: (...args: unknown[]) => Record<string, any>;
964
+ roomId: string;
965
+ isGroup: boolean;
966
+ text: string | null;
967
+ chatId: string;
968
+ channelId: string;
969
+ receiverId: string;
970
+ receiverName: string;
971
+ roomName: string;
972
+ senderId: string;
973
+ senderName: string;
974
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
975
+ 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";
976
+ timestamp: number;
977
+ mentions: string[];
978
+ links: string[];
979
+ isPrefix: boolean;
980
+ isFromMe: boolean;
981
+ isTagMe: boolean;
982
+ isStory: boolean;
983
+ isViewOnce: boolean;
984
+ isEdited: boolean;
985
+ isDeleted: boolean;
986
+ isPinned: boolean;
987
+ isUnPinned: boolean;
988
+ isChannel: boolean;
989
+ isBroadcast: boolean;
990
+ isEphemeral: boolean;
991
+ isForwarded: boolean;
992
+ citation: Record<string, boolean> | null;
993
+ media: z.objectOutputType<{
994
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
995
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
996
+ }, z.ZodTypeAny, "passthrough"> | null;
997
+ } | null;
998
+ } | null>;
999
+ contact(vcard: z.infer<typeof ContactWorkerBaseType>, options: z.infer<typeof ContactWorkerOptionsType>): Promise<{
1000
+ message: (...args: unknown[]) => Record<string, any>;
1001
+ roomId: string;
1002
+ isGroup: boolean;
1003
+ text: string | null;
1004
+ chatId: string;
1005
+ channelId: string;
1006
+ receiverId: string;
1007
+ receiverName: string;
1008
+ roomName: string;
1009
+ senderId: string;
1010
+ senderName: string;
1011
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1012
+ 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";
1013
+ timestamp: number;
1014
+ mentions: string[];
1015
+ links: string[];
1016
+ isPrefix: boolean;
1017
+ isFromMe: boolean;
1018
+ isTagMe: boolean;
1019
+ isStory: boolean;
1020
+ isViewOnce: boolean;
1021
+ isEdited: boolean;
1022
+ isDeleted: boolean;
1023
+ isPinned: boolean;
1024
+ isUnPinned: boolean;
1025
+ isChannel: boolean;
1026
+ isBroadcast: boolean;
1027
+ isEphemeral: boolean;
1028
+ isForwarded: boolean;
1029
+ citation: Record<string, boolean> | null;
1030
+ media: z.objectOutputType<{
1031
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1032
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1033
+ }, z.ZodTypeAny, "passthrough"> | null;
1034
+ replied: {
1035
+ message: (...args: unknown[]) => Record<string, any>;
1036
+ roomId: string;
1037
+ isGroup: boolean;
1038
+ text: string | null;
1039
+ chatId: string;
1040
+ channelId: string;
1041
+ receiverId: string;
1042
+ receiverName: string;
1043
+ roomName: string;
1044
+ senderId: string;
1045
+ senderName: string;
1046
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1047
+ 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";
1048
+ timestamp: number;
1049
+ mentions: string[];
1050
+ links: string[];
1051
+ isPrefix: boolean;
1052
+ isFromMe: boolean;
1053
+ isTagMe: boolean;
1054
+ isStory: boolean;
1055
+ isViewOnce: boolean;
1056
+ isEdited: boolean;
1057
+ isDeleted: boolean;
1058
+ isPinned: boolean;
1059
+ isUnPinned: boolean;
1060
+ isChannel: boolean;
1061
+ isBroadcast: boolean;
1062
+ isEphemeral: boolean;
1063
+ isForwarded: boolean;
1064
+ citation: Record<string, boolean> | null;
1065
+ media: z.objectOutputType<{
1066
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1067
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1068
+ }, z.ZodTypeAny, "passthrough"> | null;
1069
+ } | null;
1070
+ } | null>;
1071
+ reaction(emoticon: z.infer<typeof ReactionWorkerBaseType>, options: z.infer<typeof ReactionWorkerOptionsType>): Promise<{
1072
+ message: (...args: unknown[]) => Record<string, any>;
1073
+ roomId: string;
1074
+ isGroup: boolean;
1075
+ text: string | null;
1076
+ chatId: string;
1077
+ channelId: string;
1078
+ receiverId: string;
1079
+ receiverName: string;
1080
+ roomName: string;
1081
+ senderId: string;
1082
+ senderName: string;
1083
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1084
+ 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";
1085
+ timestamp: number;
1086
+ mentions: string[];
1087
+ links: string[];
1088
+ isPrefix: boolean;
1089
+ isFromMe: boolean;
1090
+ isTagMe: boolean;
1091
+ isStory: boolean;
1092
+ isViewOnce: boolean;
1093
+ isEdited: boolean;
1094
+ isDeleted: boolean;
1095
+ isPinned: boolean;
1096
+ isUnPinned: boolean;
1097
+ isChannel: boolean;
1098
+ isBroadcast: boolean;
1099
+ isEphemeral: boolean;
1100
+ isForwarded: boolean;
1101
+ citation: Record<string, boolean> | null;
1102
+ media: z.objectOutputType<{
1103
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1104
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1105
+ }, z.ZodTypeAny, "passthrough"> | null;
1106
+ replied: {
1107
+ message: (...args: unknown[]) => Record<string, any>;
1108
+ roomId: string;
1109
+ isGroup: boolean;
1110
+ text: string | null;
1111
+ chatId: string;
1112
+ channelId: string;
1113
+ receiverId: string;
1114
+ receiverName: string;
1115
+ roomName: string;
1116
+ senderId: string;
1117
+ senderName: string;
1118
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1119
+ 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";
1120
+ timestamp: number;
1121
+ mentions: string[];
1122
+ links: string[];
1123
+ isPrefix: boolean;
1124
+ isFromMe: boolean;
1125
+ isTagMe: boolean;
1126
+ isStory: boolean;
1127
+ isViewOnce: boolean;
1128
+ isEdited: boolean;
1129
+ isDeleted: boolean;
1130
+ isPinned: boolean;
1131
+ isUnPinned: boolean;
1132
+ isChannel: boolean;
1133
+ isBroadcast: boolean;
1134
+ isEphemeral: boolean;
1135
+ isForwarded: boolean;
1136
+ citation: Record<string, boolean> | null;
1137
+ media: z.objectOutputType<{
1138
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1139
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1140
+ }, z.ZodTypeAny, "passthrough"> | null;
1141
+ } | null;
1142
+ } | null>;
1143
+ pin(pin: z.infer<typeof PinWorkerBaseType>, options: z.infer<typeof PinWorkerOptionsType>): Promise<{
1144
+ message: (...args: unknown[]) => Record<string, any>;
1145
+ roomId: string;
1146
+ isGroup: boolean;
1147
+ text: string | null;
1148
+ chatId: string;
1149
+ channelId: string;
1150
+ receiverId: string;
1151
+ receiverName: string;
1152
+ roomName: string;
1153
+ senderId: string;
1154
+ senderName: string;
1155
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1156
+ 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";
1157
+ timestamp: number;
1158
+ mentions: string[];
1159
+ links: string[];
1160
+ isPrefix: boolean;
1161
+ isFromMe: boolean;
1162
+ isTagMe: boolean;
1163
+ isStory: boolean;
1164
+ isViewOnce: boolean;
1165
+ isEdited: boolean;
1166
+ isDeleted: boolean;
1167
+ isPinned: boolean;
1168
+ isUnPinned: boolean;
1169
+ isChannel: boolean;
1170
+ isBroadcast: boolean;
1171
+ isEphemeral: boolean;
1172
+ isForwarded: boolean;
1173
+ citation: Record<string, boolean> | null;
1174
+ media: z.objectOutputType<{
1175
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1176
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1177
+ }, z.ZodTypeAny, "passthrough"> | null;
1178
+ replied: {
1179
+ message: (...args: unknown[]) => Record<string, any>;
1180
+ roomId: string;
1181
+ isGroup: boolean;
1182
+ text: string | null;
1183
+ chatId: string;
1184
+ channelId: string;
1185
+ receiverId: string;
1186
+ receiverName: string;
1187
+ roomName: string;
1188
+ senderId: string;
1189
+ senderName: string;
1190
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1191
+ 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";
1192
+ timestamp: number;
1193
+ mentions: string[];
1194
+ links: string[];
1195
+ isPrefix: boolean;
1196
+ isFromMe: boolean;
1197
+ isTagMe: boolean;
1198
+ isStory: boolean;
1199
+ isViewOnce: boolean;
1200
+ isEdited: boolean;
1201
+ isDeleted: boolean;
1202
+ isPinned: boolean;
1203
+ isUnPinned: boolean;
1204
+ isChannel: boolean;
1205
+ isBroadcast: boolean;
1206
+ isEphemeral: boolean;
1207
+ isForwarded: boolean;
1208
+ citation: Record<string, boolean> | null;
1209
+ media: z.objectOutputType<{
1210
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1211
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1212
+ }, z.ZodTypeAny, "passthrough"> | null;
1213
+ } | null;
1214
+ } | null>;
1215
+ poll(poll: z.infer<typeof PollWorkerBaseType>, options: z.infer<typeof PollWorkerOptionsType>): Promise<{
1216
+ message: (...args: unknown[]) => Record<string, any>;
1217
+ roomId: string;
1218
+ isGroup: boolean;
1219
+ text: string | null;
1220
+ chatId: string;
1221
+ channelId: string;
1222
+ receiverId: string;
1223
+ receiverName: string;
1224
+ roomName: string;
1225
+ senderId: string;
1226
+ senderName: string;
1227
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1228
+ 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";
1229
+ timestamp: number;
1230
+ mentions: string[];
1231
+ links: string[];
1232
+ isPrefix: boolean;
1233
+ isFromMe: boolean;
1234
+ isTagMe: boolean;
1235
+ isStory: boolean;
1236
+ isViewOnce: boolean;
1237
+ isEdited: boolean;
1238
+ isDeleted: boolean;
1239
+ isPinned: boolean;
1240
+ isUnPinned: boolean;
1241
+ isChannel: boolean;
1242
+ isBroadcast: boolean;
1243
+ isEphemeral: boolean;
1244
+ isForwarded: boolean;
1245
+ citation: Record<string, boolean> | null;
1246
+ media: z.objectOutputType<{
1247
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1248
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1249
+ }, z.ZodTypeAny, "passthrough"> | null;
1250
+ replied: {
1251
+ message: (...args: unknown[]) => Record<string, any>;
1252
+ roomId: string;
1253
+ isGroup: boolean;
1254
+ text: string | null;
1255
+ chatId: string;
1256
+ channelId: string;
1257
+ receiverId: string;
1258
+ receiverName: string;
1259
+ roomName: string;
1260
+ senderId: string;
1261
+ senderName: string;
1262
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1263
+ 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";
1264
+ timestamp: number;
1265
+ mentions: string[];
1266
+ links: string[];
1267
+ isPrefix: boolean;
1268
+ isFromMe: boolean;
1269
+ isTagMe: boolean;
1270
+ isStory: boolean;
1271
+ isViewOnce: boolean;
1272
+ isEdited: boolean;
1273
+ isDeleted: boolean;
1274
+ isPinned: boolean;
1275
+ isUnPinned: boolean;
1276
+ isChannel: boolean;
1277
+ isBroadcast: boolean;
1278
+ isEphemeral: boolean;
1279
+ isForwarded: boolean;
1280
+ citation: Record<string, boolean> | null;
1281
+ media: z.objectOutputType<{
1282
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1283
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1284
+ }, z.ZodTypeAny, "passthrough"> | null;
1285
+ } | null;
1286
+ } | null>;
1287
+ edit(text: z.infer<typeof EditWorkerBaseType>, options: z.infer<typeof EditWorkerOptionsType>): Promise<{
1288
+ message: (...args: unknown[]) => Record<string, any>;
1289
+ roomId: string;
1290
+ isGroup: boolean;
1291
+ text: string | null;
1292
+ chatId: string;
1293
+ channelId: string;
1294
+ receiverId: string;
1295
+ receiverName: string;
1296
+ roomName: string;
1297
+ senderId: string;
1298
+ senderName: string;
1299
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1300
+ 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";
1301
+ timestamp: number;
1302
+ mentions: string[];
1303
+ links: string[];
1304
+ isPrefix: boolean;
1305
+ isFromMe: boolean;
1306
+ isTagMe: boolean;
1307
+ isStory: boolean;
1308
+ isViewOnce: boolean;
1309
+ isEdited: boolean;
1310
+ isDeleted: boolean;
1311
+ isPinned: boolean;
1312
+ isUnPinned: boolean;
1313
+ isChannel: boolean;
1314
+ isBroadcast: boolean;
1315
+ isEphemeral: boolean;
1316
+ isForwarded: boolean;
1317
+ citation: Record<string, boolean> | null;
1318
+ media: z.objectOutputType<{
1319
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1320
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1321
+ }, z.ZodTypeAny, "passthrough"> | null;
1322
+ replied: {
1323
+ message: (...args: unknown[]) => Record<string, any>;
1324
+ roomId: string;
1325
+ isGroup: boolean;
1326
+ text: string | null;
1327
+ chatId: string;
1328
+ channelId: string;
1329
+ receiverId: string;
1330
+ receiverName: string;
1331
+ roomName: string;
1332
+ senderId: string;
1333
+ senderName: string;
1334
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1335
+ 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";
1336
+ timestamp: number;
1337
+ mentions: string[];
1338
+ links: string[];
1339
+ isPrefix: boolean;
1340
+ isFromMe: boolean;
1341
+ isTagMe: boolean;
1342
+ isStory: boolean;
1343
+ isViewOnce: boolean;
1344
+ isEdited: boolean;
1345
+ isDeleted: boolean;
1346
+ isPinned: boolean;
1347
+ isUnPinned: boolean;
1348
+ isChannel: boolean;
1349
+ isBroadcast: boolean;
1350
+ isEphemeral: boolean;
1351
+ isForwarded: boolean;
1352
+ citation: Record<string, boolean> | null;
1353
+ media: z.objectOutputType<{
1354
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1355
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1356
+ }, z.ZodTypeAny, "passthrough"> | null;
1357
+ } | null;
1358
+ } | null>;
1359
+ delete(del: z.infer<typeof DeleteWorkerBaseType>): Promise<{
1360
+ message: (...args: unknown[]) => Record<string, any>;
1361
+ roomId: string;
1362
+ isGroup: boolean;
1363
+ text: string | null;
1364
+ chatId: string;
1365
+ channelId: string;
1366
+ receiverId: string;
1367
+ receiverName: string;
1368
+ roomName: string;
1369
+ senderId: string;
1370
+ senderName: string;
1371
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1372
+ 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";
1373
+ timestamp: number;
1374
+ mentions: string[];
1375
+ links: string[];
1376
+ isPrefix: boolean;
1377
+ isFromMe: boolean;
1378
+ isTagMe: boolean;
1379
+ isStory: boolean;
1380
+ isViewOnce: boolean;
1381
+ isEdited: boolean;
1382
+ isDeleted: boolean;
1383
+ isPinned: boolean;
1384
+ isUnPinned: boolean;
1385
+ isChannel: boolean;
1386
+ isBroadcast: boolean;
1387
+ isEphemeral: boolean;
1388
+ isForwarded: boolean;
1389
+ citation: Record<string, boolean> | null;
1390
+ media: z.objectOutputType<{
1391
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1392
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1393
+ }, z.ZodTypeAny, "passthrough"> | null;
1394
+ replied: {
1395
+ message: (...args: unknown[]) => Record<string, any>;
1396
+ roomId: string;
1397
+ isGroup: boolean;
1398
+ text: string | null;
1399
+ chatId: string;
1400
+ channelId: string;
1401
+ receiverId: string;
1402
+ receiverName: string;
1403
+ roomName: string;
1404
+ senderId: string;
1405
+ senderName: string;
1406
+ senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1407
+ 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";
1408
+ timestamp: number;
1409
+ mentions: string[];
1410
+ links: string[];
1411
+ isPrefix: boolean;
1412
+ isFromMe: boolean;
1413
+ isTagMe: boolean;
1414
+ isStory: boolean;
1415
+ isViewOnce: boolean;
1416
+ isEdited: boolean;
1417
+ isDeleted: boolean;
1418
+ isPinned: boolean;
1419
+ isUnPinned: boolean;
1420
+ isChannel: boolean;
1421
+ isBroadcast: boolean;
1422
+ isEphemeral: boolean;
1423
+ isForwarded: boolean;
1424
+ citation: Record<string, boolean> | null;
1425
+ media: z.objectOutputType<{
1426
+ buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1427
+ stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1428
+ }, z.ZodTypeAny, "passthrough"> | null;
1429
+ } | null;
1430
+ } | null>;
1431
+ rejectCall(call: z.infer<typeof RejectCallWorkerBaseType>): Promise<void | undefined>;
1432
+ mute(mute: z.infer<typeof MuteWorkerBaseType>, options: z.infer<typeof MuteWorkerOptionsType>): Promise<void | undefined>;
1433
+ profile(roomId: z.infer<typeof ProfileWorkerBaseType>): Promise<z.infer<typeof ProfileWorkerBaseOutputType> | null>;
1434
+ presence(action: z.infer<typeof PresenceWorkerBaseType>, options: z.infer<typeof PresenceWorkerOptionsType>): Promise<void | undefined>;
1435
+ }
1436
+
1437
+ declare class Client {
1438
+ private props;
1439
+ options: z.infer<typeof ClientClassesType>;
1440
+ cache: NodeCache;
1441
+ private chatId;
1442
+ private logger;
1443
+ private db;
1444
+ private socket;
1445
+ private events;
1446
+ private spinners;
1447
+ private worker;
1448
+ constructor(props: z.input<typeof ClientClassesType>);
1449
+ initialize(): Promise<void>;
1450
+ startSpinner(key: string, message: string): Ora;
1451
+ stopSpinner(key: string, succeed: boolean, message?: string): void;
1452
+ failSpinner(key: string, message?: string): void;
1453
+ on<T extends EventEnumType>(event: T, handler: EventCallbackType[T]): void;
1454
+ emit<T extends EventEnumType>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
1455
+ }
1456
+ interface Client extends Worker {
1457
+ }
1458
+
1459
+ export { Client, Client as default };