zaileys 1.1.17 → 1.1.20

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