zaileys 1.1.33 → 1.1.35

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.
package/dist/index.d.ts CHANGED
@@ -1,1697 +1,667 @@
1
+ import * as nanospinner from 'nanospinner';
2
+ import * as baileys from 'baileys';
3
+ import baileys__default, { AnyMessageContent } from 'baileys';
1
4
  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';
5
+ import z$2, { z } from 'zod/v4';
6
+ import * as zod from 'zod';
7
+ import { z as z$1 } from 'zod';
8
+ import * as zod_v4_core from 'zod/v4/core';
6
9
 
7
- declare const AdapterDatabaseType: z.ZodDefault<z.ZodOptional<z.ZodObject<{
8
- type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
9
- connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
10
- url: z.ZodDefault<z.ZodString>;
11
- }, "strip", z.ZodTypeAny, {
12
- url: string;
13
- }, {
14
- url?: string | undefined;
15
- }>>>;
16
- }, "strip", z.ZodTypeAny, {
17
- type: "sqlite" | "postgresql" | "mysql";
18
- connection: {
19
- url: string;
20
- };
21
- }, {
22
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
23
- connection?: {
24
- url?: string | undefined;
25
- } | undefined;
26
- }>>>;
27
- declare const CitationType: z.ZodEffects<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnion<[z.ZodArray<z.ZodNumber, "many">, z.ZodPromise<z.ZodArray<z.ZodNumber, "many">>]>>>>, Record<string, number[]>, Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined>;
28
- declare const ClientClassesBaseType: z.ZodObject<{
29
- prefix: z.ZodOptional<z.ZodString>;
30
- ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
31
- showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
32
- autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
33
- autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
34
- autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
35
- autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
36
- autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
37
- loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
38
- webhooks: z.ZodOptional<z.ZodObject<{
39
- url: z.ZodString;
40
- }, "strip", z.ZodTypeAny, {
41
- url: string;
42
- }, {
43
- url: string;
44
- }>>;
45
- limiter: z.ZodOptional<z.ZodObject<{
46
- durationMs: z.ZodNumber;
47
- maxMessages: z.ZodNumber;
48
- }, "strip", z.ZodTypeAny, {
49
- durationMs: number;
50
- maxMessages: number;
51
- }, {
52
- durationMs: number;
53
- maxMessages: number;
54
- }>>;
55
- database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
56
- type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
57
- connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
58
- url: z.ZodDefault<z.ZodString>;
59
- }, "strip", z.ZodTypeAny, {
60
- url: string;
61
- }, {
62
- url?: string | undefined;
63
- }>>>;
64
- }, "strip", z.ZodTypeAny, {
65
- type: "sqlite" | "postgresql" | "mysql";
66
- connection: {
67
- url: string;
68
- };
69
- }, {
70
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
71
- connection?: {
72
- url?: string | undefined;
73
- } | undefined;
74
- }>>>;
75
- 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>;
76
- }, "strip", z.ZodTypeAny, {
77
- citation: Record<string, number[]>;
78
- ignoreMe: boolean;
79
- showLogs: boolean;
80
- autoMentions: boolean;
81
- autoOnline: boolean;
82
- autoRead: boolean;
83
- autoPresence: boolean;
84
- autoRejectCall: boolean;
85
- loadLLMSchemas: boolean;
86
- database: {
87
- type: "sqlite" | "postgresql" | "mysql";
88
- connection: {
89
- url: string;
90
- };
91
- };
92
- webhooks?: {
93
- url: string;
94
- } | undefined;
95
- prefix?: string | undefined;
96
- limiter?: {
97
- durationMs: number;
98
- maxMessages: number;
99
- } | undefined;
100
- }, {
101
- citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
102
- webhooks?: {
103
- url: string;
104
- } | undefined;
105
- prefix?: string | undefined;
106
- ignoreMe?: boolean | undefined;
107
- showLogs?: boolean | undefined;
108
- autoMentions?: boolean | undefined;
109
- autoOnline?: boolean | undefined;
110
- autoRead?: boolean | undefined;
111
- autoPresence?: boolean | undefined;
112
- autoRejectCall?: boolean | undefined;
113
- loadLLMSchemas?: boolean | undefined;
114
- limiter?: {
115
- durationMs: number;
116
- maxMessages: number;
117
- } | undefined;
118
- database?: {
119
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
120
- connection?: {
121
- url?: string | undefined;
122
- } | undefined;
123
- } | undefined;
124
- }>;
125
- declare const ClientClassesType: z.ZodDiscriminatedUnion<"authType", [z.ZodObject<{
126
- authType: z.ZodLiteral<"pairing">;
127
- phoneNumber: z.ZodNumber;
128
- } & {
129
- prefix: z.ZodOptional<z.ZodString>;
130
- ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
131
- showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
132
- autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
133
- autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
134
- autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
135
- autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
136
- autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
137
- loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
138
- webhooks: z.ZodOptional<z.ZodObject<{
139
- url: z.ZodString;
140
- }, "strip", z.ZodTypeAny, {
141
- url: string;
142
- }, {
143
- url: string;
144
- }>>;
145
- limiter: z.ZodOptional<z.ZodObject<{
146
- durationMs: z.ZodNumber;
147
- maxMessages: z.ZodNumber;
148
- }, "strip", z.ZodTypeAny, {
149
- durationMs: number;
150
- maxMessages: number;
151
- }, {
152
- durationMs: number;
153
- maxMessages: number;
154
- }>>;
155
- database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
156
- type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
157
- connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
158
- url: z.ZodDefault<z.ZodString>;
159
- }, "strip", z.ZodTypeAny, {
160
- url: string;
161
- }, {
162
- url?: string | undefined;
163
- }>>>;
164
- }, "strip", z.ZodTypeAny, {
165
- type: "sqlite" | "postgresql" | "mysql";
166
- connection: {
167
- url: string;
168
- };
169
- }, {
170
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
171
- connection?: {
172
- url?: string | undefined;
173
- } | undefined;
174
- }>>>;
175
- 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>;
176
- }, "strip", z.ZodTypeAny, {
177
- citation: Record<string, number[]>;
178
- authType: "pairing";
179
- phoneNumber: number;
180
- ignoreMe: boolean;
181
- showLogs: boolean;
182
- autoMentions: boolean;
183
- autoOnline: boolean;
184
- autoRead: boolean;
185
- autoPresence: boolean;
186
- autoRejectCall: boolean;
187
- loadLLMSchemas: boolean;
188
- database: {
189
- type: "sqlite" | "postgresql" | "mysql";
190
- connection: {
191
- url: string;
192
- };
193
- };
194
- webhooks?: {
195
- url: string;
196
- } | undefined;
197
- prefix?: string | undefined;
198
- limiter?: {
199
- durationMs: number;
200
- maxMessages: number;
201
- } | undefined;
202
- }, {
203
- authType: "pairing";
204
- phoneNumber: number;
205
- citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
206
- webhooks?: {
207
- url: string;
208
- } | undefined;
209
- prefix?: string | undefined;
210
- ignoreMe?: boolean | undefined;
211
- showLogs?: boolean | undefined;
212
- autoMentions?: boolean | undefined;
213
- autoOnline?: boolean | undefined;
214
- autoRead?: boolean | undefined;
215
- autoPresence?: boolean | undefined;
216
- autoRejectCall?: boolean | undefined;
217
- loadLLMSchemas?: boolean | undefined;
218
- limiter?: {
219
- durationMs: number;
220
- maxMessages: number;
221
- } | undefined;
222
- database?: {
223
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
224
- connection?: {
225
- url?: string | undefined;
226
- } | undefined;
227
- } | undefined;
228
- }>, z.ZodObject<{
229
- authType: z.ZodLiteral<"qr">;
230
- phoneNumber: z.ZodOptional<z.ZodUndefined>;
231
- } & {
232
- prefix: z.ZodOptional<z.ZodString>;
233
- ignoreMe: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
234
- showLogs: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
235
- autoMentions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
236
- autoOnline: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
237
- autoRead: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
238
- autoPresence: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
239
- autoRejectCall: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
240
- loadLLMSchemas: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
241
- webhooks: z.ZodOptional<z.ZodObject<{
242
- url: z.ZodString;
243
- }, "strip", z.ZodTypeAny, {
244
- url: string;
245
- }, {
246
- url: string;
247
- }>>;
248
- limiter: z.ZodOptional<z.ZodObject<{
249
- durationMs: z.ZodNumber;
250
- maxMessages: z.ZodNumber;
251
- }, "strip", z.ZodTypeAny, {
252
- durationMs: number;
253
- maxMessages: number;
254
- }, {
255
- durationMs: number;
256
- maxMessages: number;
257
- }>>;
258
- database: z.ZodDefault<z.ZodOptional<z.ZodObject<{
259
- type: z.ZodDefault<z.ZodEnum<["sqlite", "postgresql", "mysql"]>>;
260
- connection: z.ZodDefault<z.ZodOptional<z.ZodObject<{
261
- url: z.ZodDefault<z.ZodString>;
262
- }, "strip", z.ZodTypeAny, {
263
- url: string;
264
- }, {
265
- url?: string | undefined;
266
- }>>>;
267
- }, "strip", z.ZodTypeAny, {
268
- type: "sqlite" | "postgresql" | "mysql";
269
- connection: {
270
- url: string;
271
- };
272
- }, {
273
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
274
- connection?: {
275
- url?: string | undefined;
276
- } | undefined;
277
- }>>>;
278
- 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>;
279
- }, "strip", z.ZodTypeAny, {
280
- citation: Record<string, number[]>;
281
- authType: "qr";
282
- ignoreMe: boolean;
283
- showLogs: boolean;
284
- autoMentions: boolean;
285
- autoOnline: boolean;
286
- autoRead: boolean;
287
- autoPresence: boolean;
288
- autoRejectCall: boolean;
289
- loadLLMSchemas: boolean;
290
- database: {
291
- type: "sqlite" | "postgresql" | "mysql";
292
- connection: {
293
- url: string;
294
- };
295
- };
296
- webhooks?: {
297
- url: string;
298
- } | undefined;
299
- phoneNumber?: undefined;
300
- prefix?: string | undefined;
301
- limiter?: {
302
- durationMs: number;
303
- maxMessages: number;
304
- } | undefined;
305
- }, {
306
- authType: "qr";
307
- citation?: Record<string, (...args: unknown[]) => number[] | Promise<number[]>> | undefined;
308
- webhooks?: {
309
- url: string;
310
- } | undefined;
311
- phoneNumber?: undefined;
312
- prefix?: string | undefined;
313
- ignoreMe?: boolean | undefined;
314
- showLogs?: boolean | undefined;
315
- autoMentions?: boolean | undefined;
316
- autoOnline?: boolean | undefined;
317
- autoRead?: boolean | undefined;
318
- autoPresence?: boolean | undefined;
319
- autoRejectCall?: boolean | undefined;
320
- loadLLMSchemas?: boolean | undefined;
321
- limiter?: {
322
- durationMs: number;
323
- maxMessages: number;
324
- } | undefined;
325
- database?: {
326
- type?: "sqlite" | "postgresql" | "mysql" | undefined;
327
- connection?: {
328
- url?: string | undefined;
329
- } | undefined;
330
- } | undefined;
331
- }>]>;
332
-
333
- declare const WebhooksParserBaseType: z.ZodObject<{
334
- id: z.ZodString;
335
- method: z.ZodEnum<["GET", "POST"]>;
336
- host: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
337
- referer: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
338
- date: z.ZodString;
339
- size: z.ZodUnion<[z.ZodNumber, z.ZodUndefined]>;
340
- data: z.ZodObject<{
341
- query: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
342
- json: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
343
- form: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodNull]>;
344
- raw: z.ZodUnion<[z.ZodString, z.ZodNull]>;
345
- }, "strip", z.ZodTypeAny, {
346
- query: Record<string, any> | null;
347
- json: Record<string, any> | null;
348
- form: Record<string, any> | null;
349
- raw: string | null;
350
- }, {
351
- query: Record<string, any> | null;
352
- json: Record<string, any> | null;
353
- form: Record<string, any> | null;
354
- raw: string | null;
355
- }>;
356
- }, "strip", z.ZodTypeAny, {
357
- id: string;
358
- date: string;
359
- method: "GET" | "POST";
360
- data: {
361
- query: Record<string, any> | null;
362
- json: Record<string, any> | null;
363
- form: Record<string, any> | null;
364
- raw: string | null;
365
- };
366
- host?: string | undefined;
367
- referer?: string | undefined;
368
- size?: number | undefined;
369
- }, {
370
- id: string;
371
- date: string;
372
- method: "GET" | "POST";
373
- data: {
374
- query: Record<string, any> | null;
375
- json: Record<string, any> | null;
376
- form: Record<string, any> | null;
377
- raw: string | null;
378
- };
379
- host?: string | undefined;
380
- referer?: string | undefined;
381
- size?: number | undefined;
382
- }>;
10
+ interface Store {
11
+ read: (id: string) => Promise<unknown>;
12
+ write: (obj: Record<string, unknown>) => Promise<void>;
13
+ }
14
+ interface JsonDBInterface {
15
+ initialize(session: string): Promise<void>;
16
+ store(key: string): Store;
17
+ upsert(id: string, value: unknown): Promise<void>;
18
+ read(id: string): Promise<unknown>;
19
+ remove(id: string): Promise<void>;
20
+ clear(): Promise<void>;
21
+ delete(): Promise<void>;
22
+ }
23
+ interface JsonDBInterface {
24
+ initialize(session: string): Promise<void>;
25
+ store(key: string): Store;
26
+ upsert(id: string, value: unknown): Promise<void>;
27
+ read(id: string): Promise<unknown>;
28
+ remove(id: string): Promise<void>;
29
+ clear(): Promise<void>;
30
+ delete(): Promise<void>;
31
+ }
32
+ declare class JsonDB implements JsonDBInterface {
33
+ private session;
34
+ private db;
35
+ private storeDir;
36
+ initialize(session: string): Promise<void>;
37
+ private tryRecoverRaw;
38
+ private chunks;
39
+ private writeChunks;
40
+ store(key: string): Store;
41
+ upsert(id: string, value: unknown): Promise<void>;
42
+ read(id: string): Promise<any>;
43
+ remove(id: string): Promise<void>;
44
+ clear(): Promise<void>;
45
+ delete(): Promise<void>;
46
+ }
383
47
 
384
- declare const EventConnectionType: z.ZodObject<{
385
- status: z.ZodEnum<["connecting", "open", "close"]>;
386
- }, "strip", z.ZodTypeAny, {
387
- status: "open" | "connecting" | "close";
388
- }, {
389
- status: "open" | "connecting" | "close";
390
- }>;
391
- declare const EventMessagesType: z.ZodObject<{
392
- chatId: z.ZodString;
393
- channelId: z.ZodString;
394
- uniqueId: z.ZodString;
395
- receiverId: z.ZodString;
396
- receiverName: z.ZodString;
397
- roomId: z.ZodString;
398
- roomName: z.ZodString;
399
- senderId: z.ZodString;
400
- senderName: z.ZodString;
401
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
402
- 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"]>;
403
- timestamp: z.ZodNumber;
404
- mentions: z.ZodArray<z.ZodString, "many">;
405
- text: z.ZodNullable<z.ZodString>;
406
- links: z.ZodArray<z.ZodString, "many">;
407
- isPrefix: z.ZodBoolean;
408
- isSpam: z.ZodBoolean;
409
- isFromMe: z.ZodBoolean;
410
- isTagMe: z.ZodBoolean;
411
- isGroup: z.ZodBoolean;
412
- isStory: z.ZodBoolean;
413
- isViewOnce: z.ZodBoolean;
414
- isEdited: z.ZodBoolean;
415
- isDeleted: z.ZodBoolean;
416
- isPinned: z.ZodBoolean;
417
- isUnPinned: z.ZodBoolean;
418
- isChannel: z.ZodBoolean;
419
- isBroadcast: z.ZodBoolean;
420
- isEphemeral: z.ZodBoolean;
421
- isForwarded: z.ZodBoolean;
422
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
423
- media: z.ZodNullable<z.ZodObject<{
424
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
425
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
426
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
427
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
428
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
429
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
430
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
431
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
432
- }, z.ZodTypeAny, "passthrough">>>;
433
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
434
- } & {
435
- replied: z.ZodNullable<z.ZodObject<{
436
- chatId: z.ZodString;
437
- channelId: z.ZodString;
438
- uniqueId: z.ZodString;
439
- receiverId: z.ZodString;
440
- receiverName: z.ZodString;
441
- roomId: z.ZodString;
442
- roomName: z.ZodString;
443
- senderId: z.ZodString;
444
- senderName: z.ZodString;
445
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
446
- 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"]>;
447
- timestamp: z.ZodNumber;
448
- mentions: z.ZodArray<z.ZodString, "many">;
449
- text: z.ZodNullable<z.ZodString>;
450
- links: z.ZodArray<z.ZodString, "many">;
451
- isPrefix: z.ZodBoolean;
452
- isSpam: z.ZodBoolean;
453
- isFromMe: z.ZodBoolean;
454
- isTagMe: z.ZodBoolean;
455
- isGroup: z.ZodBoolean;
456
- isStory: z.ZodBoolean;
457
- isViewOnce: z.ZodBoolean;
458
- isEdited: z.ZodBoolean;
459
- isDeleted: z.ZodBoolean;
460
- isPinned: z.ZodBoolean;
461
- isUnPinned: z.ZodBoolean;
462
- isChannel: z.ZodBoolean;
463
- isBroadcast: z.ZodBoolean;
464
- isEphemeral: z.ZodBoolean;
465
- isForwarded: z.ZodBoolean;
466
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
467
- media: z.ZodNullable<z.ZodObject<{
468
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
469
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
470
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
471
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
472
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
473
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
474
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
475
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
476
- }, z.ZodTypeAny, "passthrough">>>;
477
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
478
- }, "strip", z.ZodTypeAny, {
479
- channelId: string;
480
- uniqueId: string;
481
- message: (...args: unknown[]) => Record<string, any>;
482
- senderId: string;
483
- roomId: string;
484
- isGroup: boolean;
485
- text: string | null;
486
- chatId: string;
487
- receiverId: string;
488
- receiverName: string;
489
- roomName: string;
490
- senderName: string;
491
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
492
- 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";
493
- timestamp: number;
494
- mentions: string[];
495
- links: string[];
496
- isPrefix: boolean;
497
- isSpam: boolean;
498
- isFromMe: boolean;
499
- isTagMe: boolean;
500
- isStory: boolean;
501
- isViewOnce: boolean;
502
- isEdited: boolean;
503
- isDeleted: boolean;
504
- isPinned: boolean;
505
- isUnPinned: boolean;
506
- isChannel: boolean;
507
- isBroadcast: boolean;
508
- isEphemeral: boolean;
509
- isForwarded: boolean;
510
- citation: Record<string, boolean> | null;
511
- media: z.objectOutputType<{
512
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
513
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
514
- }, z.ZodTypeAny, "passthrough"> | null;
515
- }, {
516
- channelId: string;
517
- uniqueId: string;
518
- message: (...args: unknown[]) => Record<string, any>;
519
- senderId: string;
520
- roomId: string;
521
- isGroup: boolean;
522
- text: string | null;
523
- chatId: string;
524
- receiverId: string;
525
- receiverName: string;
526
- roomName: string;
527
- senderName: string;
528
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
529
- 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";
530
- timestamp: number;
531
- mentions: string[];
532
- links: string[];
533
- isPrefix: boolean;
534
- isSpam: boolean;
535
- isFromMe: boolean;
536
- isTagMe: boolean;
537
- isStory: boolean;
538
- isViewOnce: boolean;
539
- isEdited: boolean;
540
- isDeleted: boolean;
541
- isPinned: boolean;
542
- isUnPinned: boolean;
543
- isChannel: boolean;
544
- isBroadcast: boolean;
545
- isEphemeral: boolean;
546
- isForwarded: boolean;
547
- citation: Record<string, boolean> | null;
548
- media: z.objectInputType<{
549
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
550
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
551
- }, z.ZodTypeAny, "passthrough"> | null;
552
- }>>;
553
- }, "strip", z.ZodTypeAny, {
554
- channelId: string;
555
- uniqueId: string;
556
- message: (...args: unknown[]) => Record<string, any>;
557
- senderId: string;
558
- roomId: string;
559
- isGroup: boolean;
560
- text: string | null;
561
- chatId: string;
562
- receiverId: string;
563
- receiverName: string;
564
- roomName: string;
565
- senderName: string;
566
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
567
- 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";
568
- timestamp: number;
569
- mentions: string[];
570
- links: string[];
571
- isPrefix: boolean;
572
- isSpam: boolean;
573
- isFromMe: boolean;
574
- isTagMe: boolean;
575
- isStory: boolean;
576
- isViewOnce: boolean;
577
- isEdited: boolean;
578
- isDeleted: boolean;
579
- isPinned: boolean;
580
- isUnPinned: boolean;
581
- isChannel: boolean;
582
- isBroadcast: boolean;
583
- isEphemeral: boolean;
584
- isForwarded: boolean;
585
- citation: Record<string, boolean> | null;
586
- media: z.objectOutputType<{
587
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
588
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
589
- }, z.ZodTypeAny, "passthrough"> | null;
590
- replied: {
591
- channelId: string;
592
- uniqueId: string;
593
- message: (...args: unknown[]) => Record<string, any>;
594
- senderId: string;
595
- roomId: string;
596
- isGroup: boolean;
597
- text: string | null;
598
- chatId: string;
599
- receiverId: string;
600
- receiverName: string;
601
- roomName: string;
602
- senderName: string;
603
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
604
- 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";
605
- timestamp: number;
606
- mentions: string[];
607
- links: string[];
608
- isPrefix: boolean;
609
- isSpam: boolean;
610
- isFromMe: boolean;
611
- isTagMe: boolean;
612
- isStory: boolean;
613
- isViewOnce: boolean;
614
- isEdited: boolean;
615
- isDeleted: boolean;
616
- isPinned: boolean;
617
- isUnPinned: boolean;
618
- isChannel: boolean;
619
- isBroadcast: boolean;
620
- isEphemeral: boolean;
621
- isForwarded: boolean;
622
- citation: Record<string, boolean> | null;
623
- media: z.objectOutputType<{
624
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
625
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
626
- }, z.ZodTypeAny, "passthrough"> | null;
627
- } | null;
628
- }, {
629
- channelId: string;
630
- uniqueId: string;
631
- message: (...args: unknown[]) => Record<string, any>;
632
- senderId: string;
633
- roomId: string;
634
- isGroup: boolean;
635
- text: string | null;
636
- chatId: string;
637
- receiverId: string;
638
- receiverName: string;
639
- roomName: string;
640
- senderName: string;
641
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
642
- 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";
643
- timestamp: number;
644
- mentions: string[];
645
- links: string[];
646
- isPrefix: boolean;
647
- isSpam: boolean;
648
- isFromMe: boolean;
649
- isTagMe: boolean;
650
- isStory: boolean;
651
- isViewOnce: boolean;
652
- isEdited: boolean;
653
- isDeleted: boolean;
654
- isPinned: boolean;
655
- isUnPinned: boolean;
656
- isChannel: boolean;
657
- isBroadcast: boolean;
658
- isEphemeral: boolean;
659
- isForwarded: boolean;
660
- citation: Record<string, boolean> | null;
661
- media: z.objectInputType<{
662
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
663
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
664
- }, z.ZodTypeAny, "passthrough"> | null;
665
- replied: {
666
- channelId: string;
667
- uniqueId: string;
668
- message: (...args: unknown[]) => Record<string, any>;
669
- senderId: string;
670
- roomId: string;
671
- isGroup: boolean;
672
- text: string | null;
673
- chatId: string;
674
- receiverId: string;
675
- receiverName: string;
676
- roomName: string;
677
- senderName: string;
678
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
679
- 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";
680
- timestamp: number;
681
- mentions: string[];
682
- links: string[];
683
- isPrefix: boolean;
684
- isSpam: boolean;
685
- isFromMe: boolean;
686
- isTagMe: boolean;
687
- isStory: boolean;
688
- isViewOnce: boolean;
689
- isEdited: boolean;
690
- isDeleted: boolean;
691
- isPinned: boolean;
692
- isUnPinned: boolean;
693
- isChannel: boolean;
694
- isBroadcast: boolean;
695
- isEphemeral: boolean;
696
- isForwarded: boolean;
697
- citation: Record<string, boolean> | null;
698
- media: z.objectInputType<{
699
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
700
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
701
- }, z.ZodTypeAny, "passthrough"> | null;
702
- } | null;
703
- }>;
704
- declare const EventCallType: z.ZodObject<{
48
+ declare const ExtractorCallsType: z.ZodObject<{
705
49
  callId: z.ZodString;
706
50
  roomId: z.ZodString;
707
51
  callerId: z.ZodString;
708
52
  date: z.ZodDate;
709
53
  offline: z.ZodBoolean;
710
- status: z.ZodEnum<["accept", "offer", "reject", "ringing", "terminate", "timeout"]>;
54
+ status: z.ZodEnum<{
55
+ accept: "accept";
56
+ offer: "offer";
57
+ reject: "reject";
58
+ ringing: "ringing";
59
+ terminate: "terminate";
60
+ timeout: "timeout";
61
+ }>;
711
62
  isVideo: z.ZodBoolean;
712
63
  isGroup: z.ZodBoolean;
713
- }, "strip", z.ZodTypeAny, {
714
- status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
715
- callId: string;
716
- roomId: string;
717
- callerId: string;
718
- date: Date;
719
- offline: boolean;
720
- isVideo: boolean;
721
- isGroup: boolean;
722
- }, {
723
- status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
724
- callId: string;
725
- roomId: string;
726
- callerId: string;
727
- date: Date;
728
- offline: boolean;
729
- isVideo: boolean;
730
- isGroup: boolean;
64
+ }, z.core.$strip>;
65
+
66
+ declare const ExtractorConnectionType: z.ZodObject<{
67
+ status: z.ZodEnum<{
68
+ connecting: "connecting";
69
+ open: "open";
70
+ close: "close";
71
+ }>;
72
+ }, z.core.$strip>;
73
+
74
+ declare const ExtractorMessagesType: z$1.ZodObject<{
75
+ chatId: z$1.ZodString;
76
+ channelId: z$1.ZodString;
77
+ uniqueId: z$1.ZodString;
78
+ receiverId: z$1.ZodString;
79
+ receiverName: z$1.ZodString;
80
+ roomId: z$1.ZodString;
81
+ roomName: z$1.ZodString;
82
+ senderLid: z$1.ZodString;
83
+ senderId: z$1.ZodString;
84
+ senderName: z$1.ZodString;
85
+ senderDevice: z$1.ZodEnum<{
86
+ unknown: "unknown";
87
+ android: "android";
88
+ ios: "ios";
89
+ desktop: "desktop";
90
+ web: "web";
91
+ }>;
92
+ chatType: z$1.ZodEnum<{
93
+ contacts: "contacts";
94
+ event: "event";
95
+ text: "text";
96
+ image: "image";
97
+ contact: "contact";
98
+ location: "location";
99
+ document: "document";
100
+ audio: "audio";
101
+ video: "video";
102
+ protocol: "protocol";
103
+ highlyStructured: "highlyStructured";
104
+ sendPayment: "sendPayment";
105
+ requestPayment: "requestPayment";
106
+ declinePaymentRequest: "declinePaymentRequest";
107
+ cancelPaymentRequest: "cancelPaymentRequest";
108
+ template: "template";
109
+ sticker: "sticker";
110
+ groupInvite: "groupInvite";
111
+ buttons: "buttons";
112
+ product: "product";
113
+ deviceSent: "deviceSent";
114
+ list: "list";
115
+ viewOnce: "viewOnce";
116
+ order: "order";
117
+ ephemeral: "ephemeral";
118
+ invoice: "invoice";
119
+ paymentInvite: "paymentInvite";
120
+ interactive: "interactive";
121
+ reaction: "reaction";
122
+ interactiveResponse: "interactiveResponse";
123
+ pollCreation: "pollCreation";
124
+ pollUpdate: "pollUpdate";
125
+ keepInChat: "keepInChat";
126
+ requestPhoneNumber: "requestPhoneNumber";
127
+ scheduledCallCreation: "scheduledCallCreation";
128
+ groupMentioned: "groupMentioned";
129
+ pinInChat: "pinInChat";
130
+ scheduledCallEdit: "scheduledCallEdit";
131
+ ptv: "ptv";
132
+ botInvoke: "botInvoke";
133
+ callLog: "callLog";
134
+ encComment: "encComment";
135
+ bcall: "bcall";
136
+ lottieSticker: "lottieSticker";
137
+ comment: "comment";
138
+ placeholder: "placeholder";
139
+ encEventUpdate: "encEventUpdate";
140
+ }>;
141
+ timestamp: z$1.ZodNumber;
142
+ text: z$1.ZodNullable<z$1.ZodString>;
143
+ mentions: z$1.ZodArray<z$1.ZodString>;
144
+ links: z$1.ZodArray<z$1.ZodString>;
145
+ isPrefix: z$1.ZodBoolean;
146
+ isSpam: z$1.ZodBoolean;
147
+ isFromMe: z$1.ZodBoolean;
148
+ isTagMe: z$1.ZodBoolean;
149
+ isGroup: z$1.ZodBoolean;
150
+ isStory: z$1.ZodBoolean;
151
+ isViewOnce: z$1.ZodBoolean;
152
+ isEdited: z$1.ZodBoolean;
153
+ isDeleted: z$1.ZodBoolean;
154
+ isPinned: z$1.ZodBoolean;
155
+ isUnPinned: z$1.ZodBoolean;
156
+ isChannel: z$1.ZodBoolean;
157
+ isBroadcast: z$1.ZodBoolean;
158
+ isEphemeral: z$1.ZodBoolean;
159
+ isForwarded: z$1.ZodBoolean;
160
+ citation: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodBoolean>>;
161
+ media: z$1.ZodNullable<z$1.ZodObject<{
162
+ buffer: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
163
+ stream: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
164
+ }, z$1.core.$loose>>;
165
+ message: z$1.ZodFunction<z$1.ZodTuple<readonly [], null>, z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
166
+ replied: z$1.ZodNullable<z$1.ZodObject</*elided*/ any, z$1.core.$strip>>;
167
+ }, z$1.core.$strip>;
168
+
169
+ type ExtractZod<T> = T extends z.ZodTypeAny ? z.infer<T> : never;
170
+
171
+ declare const PluginsType: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
172
+ necessary: z$2.ZodString;
173
+ }, z$2.core.$loose>>>;
174
+ declare const LimiterType: z$2.ZodOptional<z$2.ZodObject<{
175
+ durationMs: z$2.ZodNumber;
176
+ maxMessages: z$2.ZodNumber;
177
+ }, z$2.core.$strip>>;
178
+ declare const CitationType: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
179
+ declare const FakeReplyType: z$2.ZodOptional<z$2.ZodObject<{
180
+ provider: z$2.ZodEnum<{
181
+ whatsapp: "whatsapp";
182
+ meta: "meta";
183
+ chatgpt: "chatgpt";
184
+ copilot: "copilot";
185
+ instagram: "instagram";
186
+ tiktok: "tiktok";
187
+ }>;
188
+ }, z$2.core.$strip>>;
189
+ declare const ClientBaseType: z$2.ZodObject<{
190
+ session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
191
+ prefix: z$2.ZodOptional<z$2.ZodString>;
192
+ ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
193
+ showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
194
+ autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
195
+ autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
196
+ autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
197
+ autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
198
+ autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
199
+ plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
200
+ necessary: z$2.ZodString;
201
+ }, z$2.core.$loose>>>;
202
+ limiter: z$2.ZodOptional<z$2.ZodObject<{
203
+ durationMs: z$2.ZodNumber;
204
+ maxMessages: z$2.ZodNumber;
205
+ }, z$2.core.$strip>>;
206
+ citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
207
+ fakeReply: z$2.ZodOptional<z$2.ZodObject<{
208
+ provider: z$2.ZodEnum<{
209
+ whatsapp: "whatsapp";
210
+ meta: "meta";
211
+ chatgpt: "chatgpt";
212
+ copilot: "copilot";
213
+ instagram: "instagram";
214
+ tiktok: "tiktok";
215
+ }>;
216
+ }, z$2.core.$strip>>;
217
+ }, z$2.core.$strip>;
218
+ declare const ClientAuthPairingType: z$2.ZodObject<{
219
+ authType: z$2.ZodLiteral<"pairing">;
220
+ phoneNumber: z$2.ZodNumber;
221
+ }, z$2.core.$strip>;
222
+ declare const ClientAuthQRType: z$2.ZodObject<{
223
+ authType: z$2.ZodLiteral<"qr">;
224
+ }, z$2.core.$strip>;
225
+ declare const ClientOptionsType: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
226
+ authType: z$2.ZodLiteral<"pairing">;
227
+ phoneNumber: z$2.ZodNumber;
228
+ session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
229
+ prefix: z$2.ZodOptional<z$2.ZodString>;
230
+ ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
231
+ showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
232
+ autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
233
+ autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
234
+ autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
235
+ autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
236
+ autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
237
+ plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
238
+ necessary: z$2.ZodString;
239
+ }, z$2.core.$loose>>>;
240
+ limiter: z$2.ZodOptional<z$2.ZodObject<{
241
+ durationMs: z$2.ZodNumber;
242
+ maxMessages: z$2.ZodNumber;
243
+ }, z$2.core.$strip>>;
244
+ citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
245
+ fakeReply: z$2.ZodOptional<z$2.ZodObject<{
246
+ provider: z$2.ZodEnum<{
247
+ whatsapp: "whatsapp";
248
+ meta: "meta";
249
+ chatgpt: "chatgpt";
250
+ copilot: "copilot";
251
+ instagram: "instagram";
252
+ tiktok: "tiktok";
253
+ }>;
254
+ }, z$2.core.$strip>>;
255
+ }, z$2.core.$strip>, z$2.ZodObject<{
256
+ authType: z$2.ZodLiteral<"qr">;
257
+ session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
258
+ prefix: z$2.ZodOptional<z$2.ZodString>;
259
+ ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
260
+ showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
261
+ autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
262
+ autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
263
+ autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
264
+ autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
265
+ autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
266
+ plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
267
+ necessary: z$2.ZodString;
268
+ }, z$2.core.$loose>>>;
269
+ limiter: z$2.ZodOptional<z$2.ZodObject<{
270
+ durationMs: z$2.ZodNumber;
271
+ maxMessages: z$2.ZodNumber;
272
+ }, z$2.core.$strip>>;
273
+ citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
274
+ fakeReply: z$2.ZodOptional<z$2.ZodObject<{
275
+ provider: z$2.ZodEnum<{
276
+ whatsapp: "whatsapp";
277
+ meta: "meta";
278
+ chatgpt: "chatgpt";
279
+ copilot: "copilot";
280
+ instagram: "instagram";
281
+ tiktok: "tiktok";
282
+ }>;
283
+ }, z$2.core.$strip>>;
284
+ }, z$2.core.$strip>], "authType">;
285
+ declare const EventEnumType: z$2.ZodEnum<{
286
+ connection: "connection";
287
+ messages: "messages";
288
+ calls: "calls";
289
+ webhooks: "webhooks";
731
290
  }>;
732
- declare const EventEnumType: z.ZodEnum<["connection", "messages", "calls", "webhooks"]>;
733
- type EventEnumType = z.infer<typeof EventEnumType>;
734
291
  type EventCallbackType = {
735
- connection: (ctx: z.infer<typeof EventConnectionType>) => void;
736
- messages: (ctx: z.infer<typeof EventMessagesType>) => void;
737
- calls: (ctx: z.infer<typeof EventCallType>) => void;
738
- webhooks: (ctx: z.infer<typeof WebhooksParserBaseType>) => void;
292
+ connection: (ctx: ExtractZod<typeof ExtractorConnectionType>) => void;
293
+ messages: (ctx: ExtractZod<typeof ExtractorMessagesType>) => void;
294
+ calls: (ctx: ExtractZod<typeof ExtractorCallsType>) => void;
295
+ webhooks: (ctx: ExtractZod<typeof EventEnumType>) => void;
739
296
  };
740
297
 
741
- declare const chatsGetMessage: z.ZodObject<{
742
- chatId: z.ZodString;
743
- channelId: z.ZodString;
744
- uniqueId: z.ZodString;
745
- receiverId: z.ZodString;
746
- receiverName: z.ZodString;
747
- roomId: z.ZodString;
748
- roomName: z.ZodString;
749
- senderId: z.ZodString;
750
- senderName: z.ZodString;
751
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
752
- 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"]>;
753
- timestamp: z.ZodNumber;
754
- mentions: z.ZodArray<z.ZodString, "many">;
755
- text: z.ZodNullable<z.ZodString>;
756
- links: z.ZodArray<z.ZodString, "many">;
757
- isPrefix: z.ZodBoolean;
758
- isSpam: z.ZodBoolean;
759
- isFromMe: z.ZodBoolean;
760
- isTagMe: z.ZodBoolean;
761
- isGroup: z.ZodBoolean;
762
- isStory: z.ZodBoolean;
763
- isViewOnce: z.ZodBoolean;
764
- isEdited: z.ZodBoolean;
765
- isDeleted: z.ZodBoolean;
766
- isPinned: z.ZodBoolean;
767
- isUnPinned: z.ZodBoolean;
768
- isChannel: z.ZodBoolean;
769
- isBroadcast: z.ZodBoolean;
770
- isEphemeral: z.ZodBoolean;
771
- isForwarded: z.ZodBoolean;
772
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
773
- media: z.ZodNullable<z.ZodObject<{
774
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
775
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
776
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
777
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
778
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
779
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
780
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
781
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
782
- }, z.ZodTypeAny, "passthrough">>>;
783
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
784
- } & {
785
- replied: z.ZodNullable<z.ZodObject<{
786
- chatId: z.ZodString;
787
- channelId: z.ZodString;
788
- uniqueId: z.ZodString;
789
- receiverId: z.ZodString;
790
- receiverName: z.ZodString;
791
- roomId: z.ZodString;
792
- roomName: z.ZodString;
793
- senderId: z.ZodString;
794
- senderName: z.ZodString;
795
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
796
- 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"]>;
797
- timestamp: z.ZodNumber;
798
- mentions: z.ZodArray<z.ZodString, "many">;
799
- text: z.ZodNullable<z.ZodString>;
800
- links: z.ZodArray<z.ZodString, "many">;
801
- isPrefix: z.ZodBoolean;
802
- isSpam: z.ZodBoolean;
803
- isFromMe: z.ZodBoolean;
804
- isTagMe: z.ZodBoolean;
805
- isGroup: z.ZodBoolean;
806
- isStory: z.ZodBoolean;
807
- isViewOnce: z.ZodBoolean;
808
- isEdited: z.ZodBoolean;
809
- isDeleted: z.ZodBoolean;
810
- isPinned: z.ZodBoolean;
811
- isUnPinned: z.ZodBoolean;
812
- isChannel: z.ZodBoolean;
813
- isBroadcast: z.ZodBoolean;
814
- isEphemeral: z.ZodBoolean;
815
- isForwarded: z.ZodBoolean;
816
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
817
- media: z.ZodNullable<z.ZodObject<{
818
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
819
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
820
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
821
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
822
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
823
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
824
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
825
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
826
- }, z.ZodTypeAny, "passthrough">>>;
827
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
828
- }, "strip", z.ZodTypeAny, {
829
- channelId: string;
830
- uniqueId: string;
831
- message: (...args: unknown[]) => Record<string, any>;
832
- senderId: string;
833
- roomId: string;
834
- isGroup: boolean;
835
- text: string | null;
836
- chatId: string;
837
- receiverId: string;
838
- receiverName: string;
839
- roomName: string;
840
- senderName: string;
841
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
842
- 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";
843
- timestamp: number;
844
- mentions: string[];
845
- links: string[];
846
- isPrefix: boolean;
847
- isSpam: boolean;
848
- isFromMe: boolean;
849
- isTagMe: boolean;
850
- isStory: boolean;
851
- isViewOnce: boolean;
852
- isEdited: boolean;
853
- isDeleted: boolean;
854
- isPinned: boolean;
855
- isUnPinned: boolean;
856
- isChannel: boolean;
857
- isBroadcast: boolean;
858
- isEphemeral: boolean;
859
- isForwarded: boolean;
860
- citation: Record<string, boolean> | null;
861
- media: z.objectOutputType<{
862
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
863
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
864
- }, z.ZodTypeAny, "passthrough"> | null;
865
- }, {
866
- channelId: string;
867
- uniqueId: string;
868
- message: (...args: unknown[]) => Record<string, any>;
869
- senderId: string;
870
- roomId: string;
871
- isGroup: boolean;
872
- text: string | null;
873
- chatId: string;
874
- receiverId: string;
875
- receiverName: string;
876
- roomName: string;
877
- senderName: string;
878
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
879
- 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";
880
- timestamp: number;
881
- mentions: string[];
882
- links: string[];
883
- isPrefix: boolean;
884
- isSpam: 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> | null;
898
- media: z.objectInputType<{
899
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
900
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
901
- }, z.ZodTypeAny, "passthrough"> | null;
902
- }>>;
903
- }, "strip", z.ZodTypeAny, {
904
- channelId: string;
905
- uniqueId: string;
906
- message: (...args: unknown[]) => Record<string, any>;
907
- senderId: string;
908
- roomId: string;
909
- isGroup: boolean;
910
- text: string | null;
911
- chatId: string;
912
- receiverId: string;
913
- receiverName: string;
914
- roomName: 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
- isSpam: boolean;
923
- isFromMe: boolean;
924
- isTagMe: boolean;
925
- isStory: boolean;
926
- isViewOnce: boolean;
927
- isEdited: boolean;
928
- isDeleted: boolean;
929
- isPinned: boolean;
930
- isUnPinned: boolean;
931
- isChannel: boolean;
932
- isBroadcast: boolean;
933
- isEphemeral: boolean;
934
- isForwarded: boolean;
935
- citation: Record<string, boolean> | null;
936
- media: z.objectOutputType<{
937
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
938
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
939
- }, z.ZodTypeAny, "passthrough"> | null;
940
- replied: {
941
- channelId: string;
942
- uniqueId: string;
943
- message: (...args: unknown[]) => Record<string, any>;
944
- senderId: string;
945
- roomId: string;
946
- isGroup: boolean;
947
- text: string | null;
948
- chatId: string;
949
- receiverId: string;
950
- receiverName: string;
951
- roomName: string;
952
- senderName: string;
953
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
954
- 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";
955
- timestamp: number;
956
- mentions: string[];
957
- links: string[];
958
- isPrefix: boolean;
959
- isSpam: boolean;
960
- isFromMe: boolean;
961
- isTagMe: boolean;
962
- isStory: boolean;
963
- isViewOnce: boolean;
964
- isEdited: boolean;
965
- isDeleted: boolean;
966
- isPinned: boolean;
967
- isUnPinned: boolean;
968
- isChannel: boolean;
969
- isBroadcast: boolean;
970
- isEphemeral: boolean;
971
- isForwarded: boolean;
972
- citation: Record<string, boolean> | null;
973
- media: z.objectOutputType<{
974
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
975
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
976
- }, z.ZodTypeAny, "passthrough"> | null;
977
- } | null;
978
- }, {
979
- channelId: string;
980
- uniqueId: string;
981
- message: (...args: unknown[]) => Record<string, any>;
982
- senderId: string;
983
- roomId: string;
984
- isGroup: boolean;
985
- text: string | null;
986
- chatId: string;
987
- receiverId: string;
988
- receiverName: string;
989
- roomName: string;
990
- senderName: string;
991
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
992
- 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";
993
- timestamp: number;
994
- mentions: string[];
995
- links: string[];
996
- isPrefix: boolean;
997
- isSpam: 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> | null;
1011
- media: z.objectInputType<{
1012
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1013
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1014
- }, z.ZodTypeAny, "passthrough"> | null;
1015
- replied: {
1016
- channelId: string;
1017
- uniqueId: string;
1018
- message: (...args: unknown[]) => Record<string, any>;
1019
- senderId: string;
1020
- roomId: string;
1021
- isGroup: boolean;
1022
- text: string | null;
1023
- chatId: string;
1024
- receiverId: string;
1025
- receiverName: string;
1026
- roomName: string;
1027
- senderName: string;
1028
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1029
- 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";
1030
- timestamp: number;
1031
- mentions: string[];
1032
- links: string[];
1033
- isPrefix: boolean;
1034
- isSpam: boolean;
1035
- isFromMe: boolean;
1036
- isTagMe: boolean;
1037
- isStory: boolean;
1038
- isViewOnce: boolean;
1039
- isEdited: boolean;
1040
- isDeleted: boolean;
1041
- isPinned: boolean;
1042
- isUnPinned: boolean;
1043
- isChannel: boolean;
1044
- isBroadcast: boolean;
1045
- isEphemeral: boolean;
1046
- isForwarded: boolean;
1047
- citation: Record<string, boolean> | null;
1048
- media: z.objectInputType<{
1049
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1050
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1051
- }, z.ZodTypeAny, "passthrough"> | null;
1052
- } | null;
1053
- }>;
1054
- type chatsAdapter = {
1055
- getMessage: (chatId: string) => Promise<z.infer<typeof chatsGetMessage> | null>;
1056
- };
298
+ declare const RelayTextType: z.ZodUnion<[z.ZodString, z.ZodObject<{
299
+ text: z.ZodString;
300
+ roomId: z.ZodOptional<z.ZodString>;
301
+ options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
302
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
303
+ }, z.core.$strip>]>;
1057
304
 
1058
- declare const llmMessagesTable: z.ZodObject<{
1059
- channelId: z.ZodString;
1060
- uniqueId: z.ZodString;
1061
- model: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1062
- role: z.ZodString;
1063
- content: z.ZodString;
1064
- additional: z.ZodNullable<z.ZodOptional<z.ZodString>>;
1065
- }, "strip", z.ZodTypeAny, {
1066
- channelId: string;
1067
- uniqueId: string;
1068
- role: string;
1069
- content: string;
1070
- model?: string | null | undefined;
1071
- additional?: string | null | undefined;
1072
- }, {
1073
- channelId: string;
1074
- uniqueId: string;
1075
- role: string;
1076
- content: string;
1077
- model?: string | null | undefined;
1078
- additional?: string | null | undefined;
305
+ declare const RelayReplyType: z.ZodUnion<[z.ZodString, z.ZodObject<{
306
+ text: z.ZodString;
307
+ roomId: z.ZodOptional<z.ZodString>;
308
+ options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
309
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
310
+ }, z.core.$strip>]>;
311
+
312
+ declare const RelayForwardType: z.ZodUnion<[z.ZodString, z.ZodObject<{
313
+ text: z.ZodString;
314
+ isForwardMany: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
315
+ roomId: z.ZodOptional<z.ZodString>;
316
+ options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
317
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
318
+ }, z.core.$strip>]>;
319
+
320
+ declare const RelayImageEnumType: z.ZodEnum<{
321
+ text: "text";
322
+ reply: "reply";
323
+ forward: "forward";
1079
324
  }>;
1080
- declare const llmPersonalizationTable: z.ZodObject<{
1081
- uniqueId: z.ZodString;
1082
- senderId: z.ZodString;
1083
- content: z.ZodString;
1084
- }, "strip", z.ZodTypeAny, {
1085
- uniqueId: string;
1086
- content: string;
1087
- senderId: string;
1088
- }, {
1089
- uniqueId: string;
1090
- content: string;
1091
- senderId: string;
325
+ declare const RelayImageType: z.ZodObject<{
326
+ image: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
327
+ text: z.ZodOptional<z.ZodString>;
328
+ viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
329
+ roomId: z.ZodOptional<z.ZodString>;
330
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
331
+ }, z.core.$strip>;
332
+
333
+ declare const RelayVideoEnumType: z.ZodEnum<{
334
+ text: "text";
335
+ reply: "reply";
336
+ forward: "forward";
1092
337
  }>;
1093
- declare const llmRAGTable: z.ZodObject<{
1094
- metadata: z.ZodDefault<z.ZodObject<{
1095
- id: z.ZodDefault<z.ZodString>;
1096
- }, "strip", z.ZodTypeAny, {
1097
- id: string;
1098
- }, {
1099
- id?: string | undefined;
1100
- }>>;
1101
- pageContent: z.ZodString;
1102
- }, "strip", z.ZodTypeAny, {
1103
- metadata: {
1104
- id: string;
1105
- };
1106
- pageContent: string;
1107
- }, {
1108
- pageContent: string;
1109
- metadata?: {
1110
- id?: string | undefined;
1111
- } | undefined;
338
+ declare const RelayVideoType: z.ZodObject<{
339
+ video: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
340
+ text: z.ZodOptional<z.ZodString>;
341
+ viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
342
+ roomId: z.ZodOptional<z.ZodString>;
343
+ }, z.core.$strip>;
344
+
345
+ declare const RelayAudioEnumType: z.ZodEnum<{
346
+ text: "text";
347
+ reply: "reply";
348
+ forward: "forward";
1112
349
  }>;
1113
- declare const addRAGType: z.ZodObject<Pick<{
1114
- metadata: z.ZodDefault<z.ZodObject<{
1115
- id: z.ZodDefault<z.ZodString>;
1116
- }, "strip", z.ZodTypeAny, {
1117
- id: string;
1118
- }, {
1119
- id?: string | undefined;
1120
- }>>;
1121
- pageContent: z.ZodString;
1122
- }, "pageContent">, "strip", z.ZodTypeAny, {
1123
- pageContent: string;
1124
- }, {
1125
- pageContent: string;
350
+ declare const RelayAudioType: z.ZodObject<{
351
+ audio: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
352
+ viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
353
+ roomId: z.ZodOptional<z.ZodString>;
354
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
355
+ }, z.core.$strip>;
356
+
357
+ declare const RelayStickerEnumType: z.ZodEnum<{
358
+ text: "text";
359
+ reply: "reply";
360
+ forward: "forward";
1126
361
  }>;
1127
- type llmsAdapter = {
1128
- addCompletion: (props: z.infer<typeof llmMessagesTable>) => Promise<z.infer<typeof llmMessagesTable>>;
1129
- deleteCompletion: (uniqueId: string) => Promise<boolean>;
1130
- updateCompletion: (uniqueId: string, props: Partial<z.infer<typeof llmMessagesTable>>) => Promise<z.infer<typeof llmMessagesTable>>;
1131
- clearCompletions: (channelId: string) => Promise<boolean>;
1132
- getCompletion: (uniqueId: string) => Promise<z.infer<typeof llmMessagesTable> | null>;
1133
- getCompletions: (channelId: string) => Promise<z.infer<typeof llmMessagesTable>[]>;
1134
- addPersonalization: (props: z.infer<typeof llmPersonalizationTable>) => Promise<z.infer<typeof llmPersonalizationTable>>;
1135
- deletePersonalization: (uniqueId: string) => Promise<boolean>;
1136
- clearPersonalization: (senderId: string) => Promise<boolean>;
1137
- getPersonalization: (senderId: string) => Promise<z.infer<typeof llmPersonalizationTable>[]>;
1138
- addRAG: (props: z.infer<typeof addRAGType>) => Promise<z.infer<typeof llmRAGTable>>;
1139
- deleteRAG: (id: string) => Promise<boolean>;
1140
- updateRAG: (id: string) => Promise<z.infer<typeof llmRAGTable>>;
1141
- clearRAGs: () => Promise<boolean>;
1142
- getRAG: (id: string) => Promise<z.infer<typeof llmRAGTable> | null>;
1143
- getRAGs: (keyword: string) => Promise<z.infer<typeof llmRAGTable>[]>;
1144
- };
362
+ declare const RelayStickerType: z.ZodObject<{
363
+ sticker: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
364
+ roomId: z.ZodOptional<z.ZodString>;
365
+ }, z.core.$strip>;
1145
366
 
1146
- declare const MediaInputWorkerType: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1147
- declare const TextWorkerBaseType: z.ZodUnion<[z.ZodString, z.ZodObject<{
1148
- image: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1149
- text: z.ZodOptional<z.ZodString>;
1150
- }, "strict", z.ZodTypeAny, {
1151
- image: string | Buffer<ArrayBufferLike> | Readable;
1152
- text?: string | undefined;
1153
- }, {
1154
- image: string | Buffer<ArrayBufferLike> | Readable;
1155
- text?: string | undefined;
1156
- }>, z.ZodObject<{
1157
- video: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1158
- text: z.ZodOptional<z.ZodString>;
1159
- }, "strict", z.ZodTypeAny, {
1160
- video: string | Buffer<ArrayBufferLike> | Readable;
1161
- text?: string | undefined;
1162
- }, {
1163
- video: string | Buffer<ArrayBufferLike> | Readable;
1164
- text?: string | undefined;
1165
- }>, z.ZodObject<{
1166
- note: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1167
- }, "strict", z.ZodTypeAny, {
1168
- note: string | Buffer<ArrayBufferLike> | Readable;
1169
- }, {
1170
- note: string | Buffer<ArrayBufferLike> | Readable;
1171
- }>, z.ZodObject<{
1172
- gif: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1173
- text: z.ZodOptional<z.ZodString>;
1174
- }, "strict", z.ZodTypeAny, {
1175
- gif: string | Buffer<ArrayBufferLike> | Readable;
1176
- text?: string | undefined;
1177
- }, {
1178
- gif: string | Buffer<ArrayBufferLike> | Readable;
1179
- text?: string | undefined;
1180
- }>, z.ZodObject<{
1181
- audio: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1182
- }, "strict", z.ZodTypeAny, {
1183
- audio: string | Buffer<ArrayBufferLike> | Readable;
1184
- }, {
1185
- audio: string | Buffer<ArrayBufferLike> | Readable;
1186
- }>, z.ZodObject<{
1187
- voice: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1188
- }, "strict", z.ZodTypeAny, {
1189
- voice: string | Buffer<ArrayBufferLike> | Readable;
1190
- }, {
1191
- voice: string | Buffer<ArrayBufferLike> | Readable;
1192
- }>, z.ZodObject<{
1193
- sticker: z.ZodUnion<[z.ZodString, z.ZodUnion<[z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>]>]>;
1194
- }, "strict", z.ZodTypeAny, {
1195
- sticker: string | Buffer<ArrayBufferLike> | Readable;
1196
- }, {
1197
- sticker: string | Buffer<ArrayBufferLike> | Readable;
1198
- }>]>;
1199
- declare const TextWorkerOptionsType: z.ZodObject<{
1200
- roomId: z.ZodString;
1201
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1202
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1203
- asAI: z.ZodOptional<z.ZodBoolean>;
1204
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1205
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1206
- }, "strip", z.ZodTypeAny, {
1207
- roomId: string;
1208
- asForwarded?: boolean | undefined;
1209
- asViewOnce?: boolean | undefined;
1210
- asAI?: boolean | undefined;
1211
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1212
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
1213
- }, {
1214
- roomId: string;
1215
- asForwarded?: boolean | undefined;
1216
- asViewOnce?: boolean | undefined;
1217
- asAI?: boolean | undefined;
1218
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1219
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
367
+ declare const RelayEditType: z.ZodObject<{
368
+ text: z.ZodString;
369
+ message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
370
+ }, z.core.$strip>;
371
+
372
+ declare const RelayDeleteType: z.ZodObject<{
373
+ message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
374
+ }, z.core.$strip>;
375
+
376
+ declare const RelayRejectType: zod.ZodObject<{
377
+ callId: zod.ZodString;
378
+ callerId: zod.ZodString;
379
+ }, zod_v4_core.$strip>;
380
+
381
+ declare const RelayPresenceType: z.ZodEnum<{
382
+ offline: "offline";
383
+ typing: "typing";
384
+ recording: "recording";
385
+ online: "online";
386
+ paused: "paused";
1220
387
  }>;
1221
- declare const LocationWorkerOptionsType: z.ZodObject<{
1222
- roomId: z.ZodString;
1223
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1224
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1225
- asAI: z.ZodOptional<z.ZodBoolean>;
1226
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1227
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1228
- }, "strip", z.ZodTypeAny, {
1229
- roomId: string;
1230
- asForwarded?: boolean | undefined;
1231
- asViewOnce?: boolean | undefined;
1232
- asAI?: boolean | undefined;
1233
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1234
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
1235
- }, {
1236
- roomId: string;
1237
- asForwarded?: boolean | undefined;
1238
- asViewOnce?: boolean | undefined;
1239
- asAI?: boolean | undefined;
1240
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1241
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
388
+
389
+ declare const RelayReactionType: z.ZodUnion<[z.ZodEmoji, z.ZodObject<{
390
+ emoticon: z.ZodEmoji;
391
+ message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
392
+ }, z.core.$strip>]>;
393
+
394
+ declare const RelayLocationEnumType: z.ZodEnum<{
395
+ text: "text";
396
+ reply: "reply";
397
+ forward: "forward";
1242
398
  }>;
1243
- declare const LocationWorkerBaseType: z.ZodObject<{
399
+ declare const RelayLocationType: z.ZodObject<{
1244
400
  latitude: z.ZodNumber;
1245
401
  longitude: z.ZodNumber;
1246
402
  title: z.ZodOptional<z.ZodString>;
1247
403
  footer: z.ZodOptional<z.ZodString>;
1248
- }, "strip", z.ZodTypeAny, {
1249
- latitude: number;
1250
- longitude: number;
1251
- title?: string | undefined;
1252
- footer?: string | undefined;
1253
- }, {
1254
- latitude: number;
1255
- longitude: number;
1256
- title?: string | undefined;
1257
- footer?: string | undefined;
1258
- }>;
1259
- declare const ContactWorkerOptionsType: z.ZodObject<{
1260
- roomId: z.ZodString;
1261
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1262
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1263
- asAI: z.ZodOptional<z.ZodBoolean>;
1264
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1265
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1266
- }, "strip", z.ZodTypeAny, {
1267
- roomId: string;
1268
- asForwarded?: boolean | undefined;
1269
- asViewOnce?: boolean | undefined;
1270
- asAI?: boolean | undefined;
1271
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1272
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
1273
- }, {
1274
- roomId: string;
1275
- asForwarded?: boolean | undefined;
1276
- asViewOnce?: boolean | undefined;
1277
- asAI?: boolean | undefined;
1278
- verifiedReply?: "whatsapp" | "meta" | "chatgpt" | "copilot" | "instagram" | "tiktok" | undefined;
1279
- quoted?: ((...args: unknown[]) => Record<string, any>) | undefined;
1280
- }>;
1281
- declare const ContactWorkerBaseType: z.ZodObject<{
1282
- fullname: z.ZodString;
1283
- nickname: z.ZodOptional<z.ZodString>;
1284
- organization: z.ZodOptional<z.ZodString>;
1285
- role: z.ZodOptional<z.ZodString>;
1286
- email: z.ZodOptional<z.ZodString>;
1287
- whatsAppNumber: z.ZodNumber;
1288
- callNumber: z.ZodOptional<z.ZodNumber>;
1289
- voiceNumber: z.ZodOptional<z.ZodNumber>;
1290
- website: z.ZodOptional<z.ZodString>;
1291
- homeAddress: z.ZodOptional<z.ZodString>;
1292
- workAddress: z.ZodOptional<z.ZodString>;
1293
- avatar: z.ZodOptional<z.ZodString>;
1294
- }, "strip", z.ZodTypeAny, {
1295
- fullname: string;
1296
- whatsAppNumber: number;
1297
- role?: string | undefined;
1298
- nickname?: string | undefined;
1299
- organization?: string | undefined;
1300
- email?: string | undefined;
1301
- callNumber?: number | undefined;
1302
- voiceNumber?: number | undefined;
1303
- website?: string | undefined;
1304
- homeAddress?: string | undefined;
1305
- workAddress?: string | undefined;
1306
- avatar?: string | undefined;
1307
- }, {
1308
- fullname: string;
1309
- whatsAppNumber: number;
1310
- role?: string | undefined;
1311
- nickname?: string | undefined;
1312
- organization?: string | undefined;
1313
- email?: string | undefined;
1314
- callNumber?: number | undefined;
1315
- voiceNumber?: number | undefined;
1316
- website?: string | undefined;
1317
- homeAddress?: string | undefined;
1318
- workAddress?: string | undefined;
1319
- avatar?: string | undefined;
1320
- }>;
1321
- declare const ReactionWorkerOptionsType: z.ZodObject<{
1322
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1323
- }, "strip", z.ZodTypeAny, {
1324
- message: (...args: unknown[]) => Record<string, any>;
1325
- }, {
1326
- message: (...args: unknown[]) => Record<string, any>;
1327
- }>;
1328
- declare const ReactionWorkerBaseType: z.ZodString;
1329
- declare const PinWorkerOptionsType: z.ZodObject<{
1330
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1331
- }, "strip", z.ZodTypeAny, {
1332
- message: (...args: unknown[]) => Record<string, any>;
1333
- }, {
1334
- message: (...args: unknown[]) => Record<string, any>;
1335
- }>;
1336
- declare const PinWorkerBaseType: z.ZodObject<{
1337
- action: z.ZodEnum<["pin", "unpin"]>;
1338
- expired: z.ZodEnum<["24h", "7d", "30d"]>;
1339
- }, "strip", z.ZodTypeAny, {
1340
- action: "pin" | "unpin";
1341
- expired: "24h" | "7d" | "30d";
1342
- }, {
1343
- action: "pin" | "unpin";
1344
- expired: "24h" | "7d" | "30d";
404
+ roomId: z.ZodOptional<z.ZodString>;
405
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
406
+ }, z.core.$strip>;
407
+
408
+ declare const RelayContactEnumType: z.ZodEnum<{
409
+ text: "text";
410
+ reply: "reply";
411
+ forward: "forward";
1345
412
  }>;
1346
- declare const PollWorkerOptionsType: z.ZodObject<Pick<{
1347
- roomId: z.ZodString;
1348
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1349
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1350
- asAI: z.ZodOptional<z.ZodBoolean>;
1351
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1352
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1353
- }, "roomId">, "strip", z.ZodTypeAny, {
1354
- roomId: string;
1355
- }, {
1356
- roomId: string;
413
+ declare const RelayContactType: z.ZodObject<{
414
+ title: z.ZodOptional<z.ZodString>;
415
+ contacts: z.ZodArray<z.ZodObject<{
416
+ fullname: z.ZodString;
417
+ nickname: z.ZodOptional<z.ZodString>;
418
+ organization: z.ZodOptional<z.ZodString>;
419
+ phoneNumber: z.ZodNumber;
420
+ website: z.ZodOptional<z.ZodURL>;
421
+ }, z.core.$strip>>;
422
+ roomId: z.ZodOptional<z.ZodString>;
423
+ }, z.core.$strip>;
424
+
425
+ declare const RelayPollEnumType: z.ZodEnum<{
426
+ text: "text";
427
+ reply: "reply";
428
+ forward: "forward";
1357
429
  }>;
1358
- declare const PollWorkerBaseType: z.ZodObject<{
430
+ declare const RelayPollType: z.ZodDiscriminatedUnion<[z.ZodObject<{
431
+ action: z.ZodLiteral<"create">;
1359
432
  name: z.ZodString;
1360
- answers: z.ZodArray<z.ZodString, "many">;
1361
- multipleAnswers: z.ZodOptional<z.ZodBoolean>;
1362
- }, "strip", z.ZodTypeAny, {
1363
- name: string;
1364
- answers: string[];
1365
- multipleAnswers?: boolean | undefined;
1366
- }, {
1367
- name: string;
1368
- answers: string[];
1369
- multipleAnswers?: boolean | undefined;
1370
- }>;
1371
- declare const EditWorkerOptionsType: z.ZodObject<{
1372
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1373
- }, "strip", z.ZodTypeAny, {
1374
- message: (...args: unknown[]) => Record<string, any>;
1375
- }, {
1376
- message: (...args: unknown[]) => Record<string, any>;
1377
- }>;
1378
- declare const EditWorkerBaseType: z.ZodString;
1379
- declare const DeleteWorkerBaseType: z.ZodObject<{
1380
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1381
- }, "strip", z.ZodTypeAny, {
1382
- message: (...args: unknown[]) => Record<string, any>;
1383
- }, {
1384
- message: (...args: unknown[]) => Record<string, any>;
1385
- }>;
1386
- declare const RejectCallWorkerBaseType: z.ZodObject<{
1387
- callId: z.ZodString;
1388
- callerId: z.ZodString;
1389
- }, "strip", z.ZodTypeAny, {
1390
- callId: string;
1391
- callerId: string;
1392
- }, {
1393
- callId: string;
1394
- callerId: string;
1395
- }>;
1396
- declare const MuteWorkerOptionsType: z.ZodObject<Pick<{
1397
- roomId: z.ZodString;
1398
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1399
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1400
- asAI: z.ZodOptional<z.ZodBoolean>;
1401
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1402
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1403
- }, "roomId">, "strip", z.ZodTypeAny, {
1404
- roomId: string;
1405
- }, {
1406
- roomId: string;
433
+ answers: z.ZodArray<z.ZodString>;
434
+ isMultiple: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
435
+ roomId: z.ZodOptional<z.ZodString>;
436
+ }, z.core.$strip>], "action">;
437
+
438
+ declare const RelayDocumentEnumType: z.ZodEnum<{
439
+ text: "text";
440
+ reply: "reply";
441
+ forward: "forward";
1407
442
  }>;
1408
- declare const MuteWorkerBaseType: z.ZodObject<{
1409
- expired: z.ZodEnum<["remove", "8h", "7d"]>;
1410
- }, "strip", z.ZodTypeAny, {
1411
- expired: "7d" | "remove" | "8h";
1412
- }, {
1413
- expired: "7d" | "remove" | "8h";
443
+ declare const RelayDocumentType: z.ZodObject<{
444
+ document: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
445
+ mimetype: z.ZodString;
446
+ text: z.ZodOptional<z.ZodString>;
447
+ fileName: z.ZodOptional<z.ZodString>;
448
+ roomId: z.ZodOptional<z.ZodString>;
449
+ externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
450
+ }, z.core.$strip>;
451
+
452
+ declare const RelayButtonEnumType: z.ZodEnum<{
453
+ text: "text";
454
+ reply: "reply";
455
+ forward: "forward";
1414
456
  }>;
1415
- declare const ProfileWorkerBaseType: z.ZodString;
1416
- declare const ProfileWorkerBaseOutputType: z.ZodObject<{
1417
- type: z.ZodEnum<["group", "user"]>;
1418
- id: z.ZodString;
1419
- name: z.ZodString;
1420
- bio: z.ZodString;
1421
- avatar: z.ZodString;
1422
- ephemeralDuration: z.ZodOptional<z.ZodNumber>;
1423
- isRestrict: z.ZodOptional<z.ZodBoolean>;
1424
- isAnnounce: z.ZodOptional<z.ZodBoolean>;
1425
- isCommunity: z.ZodOptional<z.ZodBoolean>;
1426
- isCommunityAnnounce: z.ZodOptional<z.ZodBoolean>;
1427
- isJoinApprovalMode: z.ZodOptional<z.ZodBoolean>;
1428
- isMemberAddMode: z.ZodOptional<z.ZodBoolean>;
1429
- owner: z.ZodNullable<z.ZodObject<{
1430
- type: z.ZodLiteral<"user">;
457
+ declare const RelayButtonType: z.ZodDiscriminatedUnion<[z.ZodObject<{
458
+ type: z.ZodLiteral<"simple">;
459
+ text: z.ZodString;
460
+ footer: z.ZodOptional<z.ZodString>;
461
+ buttons: z.ZodArray<z.ZodObject<{
1431
462
  id: z.ZodString;
1432
- }, "strip", z.ZodTypeAny, {
1433
- type: "user";
1434
- id: string;
1435
- }, {
1436
- type: "user";
1437
- id: string;
1438
- }>>;
1439
- roomCreatedAt: z.ZodOptional<z.ZodNumber>;
1440
- nameUpdatedAt: z.ZodOptional<z.ZodNumber>;
1441
- bioUpdatedAt: z.ZodOptional<z.ZodNumber>;
1442
- membersLength: z.ZodOptional<z.ZodNumber>;
1443
- members: z.ZodOptional<z.ZodArray<z.ZodObject<{
1444
- type: z.ZodEnum<["user", "admin", "superadmin"]>;
463
+ text: z.ZodString;
464
+ }, z.core.$strip>>;
465
+ roomId: z.ZodOptional<z.ZodString>;
466
+ }, z.core.$strip>, z.ZodObject<{
467
+ type: z.ZodLiteral<"interactive">;
468
+ text: z.ZodString;
469
+ footer: z.ZodOptional<z.ZodString>;
470
+ buttons: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
471
+ type: z.ZodLiteral<"quick_reply">;
1445
472
  id: z.ZodString;
1446
- }, "strip", z.ZodTypeAny, {
1447
- type: "user" | "admin" | "superadmin";
1448
- id: string;
1449
- }, {
1450
- type: "user" | "admin" | "superadmin";
1451
- id: string;
1452
- }>, "many">>;
1453
- }, "strip", z.ZodTypeAny, {
1454
- type: "user" | "group";
1455
- id: string;
1456
- name: string;
1457
- owner: {
1458
- type: "user";
1459
- id: string;
1460
- } | null;
1461
- avatar: string;
1462
- bio: string;
1463
- isCommunity?: boolean | undefined;
1464
- isCommunityAnnounce?: boolean | undefined;
1465
- ephemeralDuration?: number | undefined;
1466
- isRestrict?: boolean | undefined;
1467
- isAnnounce?: boolean | undefined;
1468
- isJoinApprovalMode?: boolean | undefined;
1469
- isMemberAddMode?: boolean | undefined;
1470
- roomCreatedAt?: number | undefined;
1471
- nameUpdatedAt?: number | undefined;
1472
- bioUpdatedAt?: number | undefined;
1473
- membersLength?: number | undefined;
1474
- members?: {
1475
- type: "user" | "admin" | "superadmin";
1476
- id: string;
1477
- }[] | undefined;
1478
- }, {
1479
- type: "user" | "group";
1480
- id: string;
1481
- name: string;
1482
- owner: {
1483
- type: "user";
1484
- id: string;
1485
- } | null;
1486
- avatar: string;
1487
- bio: string;
1488
- isCommunity?: boolean | undefined;
1489
- isCommunityAnnounce?: boolean | undefined;
1490
- ephemeralDuration?: number | undefined;
1491
- isRestrict?: boolean | undefined;
1492
- isAnnounce?: boolean | undefined;
1493
- isJoinApprovalMode?: boolean | undefined;
1494
- isMemberAddMode?: boolean | undefined;
1495
- roomCreatedAt?: number | undefined;
1496
- nameUpdatedAt?: number | undefined;
1497
- bioUpdatedAt?: number | undefined;
1498
- membersLength?: number | undefined;
1499
- members?: {
1500
- type: "user" | "admin" | "superadmin";
1501
- id: string;
1502
- }[] | undefined;
1503
- }>;
1504
- declare const PresenceWorkerOptionsType: z.ZodObject<Pick<{
473
+ text: z.ZodString;
474
+ }, z.core.$strip>, z.ZodObject<{
475
+ type: z.ZodLiteral<"cta_url">;
476
+ id: z.ZodString;
477
+ url: z.ZodURL;
478
+ text: z.ZodString;
479
+ }, z.core.$strip>, z.ZodObject<{
480
+ type: z.ZodLiteral<"cta_copy">;
481
+ id: z.ZodString;
482
+ copy: z.ZodString;
483
+ text: z.ZodString;
484
+ }, z.core.$strip>, z.ZodObject<{
485
+ type: z.ZodLiteral<"cta_call">;
486
+ id: z.ZodString;
487
+ phoneNumber: z.ZodString;
488
+ text: z.ZodString;
489
+ }, z.core.$strip>], "type">>;
490
+ roomId: z.ZodOptional<z.ZodString>;
491
+ }, z.core.$strip>], "type">;
492
+
493
+ declare const RelayGroupCreateType: z.ZodObject<{
494
+ title: z.ZodString;
495
+ members: z.ZodArray<z.ZodString>;
496
+ }, z.core.$strip>;
497
+
498
+ declare const RelayGroupActionType: z.ZodObject<{
1505
499
  roomId: z.ZodString;
1506
- asForwarded: z.ZodOptional<z.ZodBoolean>;
1507
- asViewOnce: z.ZodOptional<z.ZodBoolean>;
1508
- asAI: z.ZodOptional<z.ZodBoolean>;
1509
- verifiedReply: z.ZodOptional<z.ZodEnum<["whatsapp", "meta", "chatgpt", "copilot", "instagram", "tiktok"]>>;
1510
- quoted: z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>>;
1511
- }, "roomId">, "strip", z.ZodTypeAny, {
1512
- roomId: string;
1513
- }, {
1514
- roomId: string;
1515
- }>;
1516
- declare const PresenceWorkerBaseType: z.ZodEnum<["typing", "recording", "online", "offline", "paused"]>;
500
+ action: z.ZodEnum<{
501
+ add: "add";
502
+ kick: "kick";
503
+ promote: "promote";
504
+ demote: "demote";
505
+ }>;
506
+ members: z.ZodArray<z.ZodString>;
507
+ }, z.core.$strip>;
1517
508
 
1518
- declare class Worker {
1519
- private wa;
1520
- private parser;
1521
- private caching;
1522
- constructor(wa: {
1523
- client: Client;
1524
- db: Client["db"];
1525
- socket: Client["socket"];
1526
- });
1527
- private sendMessage;
1528
- text(input: z.infer<typeof TextWorkerBaseType>, options: z.infer<typeof TextWorkerOptionsType>): Promise<{
1529
- channelId: string;
1530
- uniqueId: string;
1531
- message: (...args: unknown[]) => Record<string, any>;
1532
- senderId: string;
1533
- roomId: string;
1534
- isGroup: boolean;
1535
- text: string | null;
1536
- chatId: string;
1537
- receiverId: string;
1538
- receiverName: string;
1539
- roomName: string;
1540
- senderName: string;
1541
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1542
- 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";
1543
- timestamp: number;
1544
- mentions: string[];
1545
- links: string[];
1546
- isPrefix: boolean;
1547
- isSpam: boolean;
1548
- isFromMe: boolean;
1549
- isTagMe: boolean;
1550
- isStory: boolean;
1551
- isViewOnce: boolean;
1552
- isEdited: boolean;
1553
- isDeleted: boolean;
1554
- isPinned: boolean;
1555
- isUnPinned: boolean;
1556
- isChannel: boolean;
1557
- isBroadcast: boolean;
1558
- isEphemeral: boolean;
1559
- isForwarded: boolean;
1560
- citation: Record<string, boolean> | null;
1561
- media: z.objectOutputType<{
1562
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1563
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1564
- }, z.ZodTypeAny, "passthrough"> | null;
1565
- replied: {
1566
- channelId: string;
1567
- uniqueId: string;
1568
- message: (...args: unknown[]) => Record<string, any>;
1569
- senderId: string;
1570
- roomId: string;
1571
- isGroup: boolean;
1572
- text: string | null;
1573
- chatId: string;
1574
- receiverId: string;
1575
- receiverName: string;
1576
- roomName: string;
1577
- senderName: string;
1578
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1579
- 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";
1580
- timestamp: number;
1581
- mentions: string[];
1582
- links: string[];
1583
- isPrefix: boolean;
1584
- isSpam: boolean;
1585
- isFromMe: boolean;
1586
- isTagMe: boolean;
1587
- isStory: boolean;
1588
- isViewOnce: boolean;
1589
- isEdited: boolean;
1590
- isDeleted: boolean;
1591
- isPinned: boolean;
1592
- isUnPinned: boolean;
1593
- isChannel: boolean;
1594
- isBroadcast: boolean;
1595
- isEphemeral: boolean;
1596
- isForwarded: boolean;
1597
- citation: Record<string, boolean> | null;
1598
- media: z.objectOutputType<{
1599
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1600
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1601
- }, z.ZodTypeAny, "passthrough"> | null;
1602
- } | null;
1603
- } | null>;
1604
- location(loc: z.infer<typeof LocationWorkerBaseType>, options: z.infer<typeof LocationWorkerOptionsType>): Promise<{
1605
- channelId: string;
1606
- uniqueId: string;
1607
- message: (...args: unknown[]) => Record<string, any>;
1608
- senderId: string;
1609
- roomId: string;
1610
- isGroup: boolean;
1611
- text: string | null;
1612
- chatId: string;
1613
- receiverId: string;
1614
- receiverName: string;
1615
- roomName: string;
1616
- senderName: string;
1617
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1618
- 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";
1619
- timestamp: number;
1620
- mentions: string[];
1621
- links: string[];
1622
- isPrefix: boolean;
1623
- isSpam: boolean;
1624
- isFromMe: boolean;
1625
- isTagMe: boolean;
1626
- isStory: boolean;
1627
- isViewOnce: boolean;
1628
- isEdited: boolean;
1629
- isDeleted: boolean;
1630
- isPinned: boolean;
1631
- isUnPinned: boolean;
1632
- isChannel: boolean;
1633
- isBroadcast: boolean;
1634
- isEphemeral: boolean;
1635
- isForwarded: boolean;
1636
- citation: Record<string, boolean> | null;
1637
- media: z.objectOutputType<{
1638
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1639
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1640
- }, z.ZodTypeAny, "passthrough"> | null;
1641
- replied: {
1642
- channelId: string;
1643
- uniqueId: string;
1644
- message: (...args: unknown[]) => Record<string, any>;
1645
- senderId: string;
1646
- roomId: string;
1647
- isGroup: boolean;
1648
- text: string | null;
1649
- chatId: string;
1650
- receiverId: string;
1651
- receiverName: string;
1652
- roomName: string;
1653
- senderName: string;
1654
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1655
- 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";
1656
- timestamp: number;
1657
- mentions: string[];
1658
- links: string[];
1659
- isPrefix: boolean;
1660
- isSpam: boolean;
1661
- isFromMe: boolean;
1662
- isTagMe: boolean;
1663
- isStory: boolean;
1664
- isViewOnce: boolean;
1665
- isEdited: boolean;
1666
- isDeleted: boolean;
1667
- isPinned: boolean;
1668
- isUnPinned: boolean;
1669
- isChannel: boolean;
1670
- isBroadcast: boolean;
1671
- isEphemeral: boolean;
1672
- isForwarded: boolean;
1673
- citation: Record<string, boolean> | null;
1674
- media: z.objectOutputType<{
1675
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1676
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1677
- }, z.ZodTypeAny, "passthrough"> | null;
1678
- } | null;
1679
- } | null>;
1680
- contact(vcard: z.infer<typeof ContactWorkerBaseType>, options: z.infer<typeof ContactWorkerOptionsType>): Promise<{
509
+ declare const RelayGroupUpdateType: z.ZodObject<{
510
+ roomId: z.ZodString;
511
+ text: z.ZodString;
512
+ action: z.ZodEnum<{
513
+ subject: "subject";
514
+ description: "description";
515
+ }>;
516
+ }, z.core.$strip>;
517
+
518
+ declare const RelayGroupSettingsType: z.ZodObject<{
519
+ roomId: z.ZodString;
520
+ action: z.ZodEnum<{
521
+ open: "open";
522
+ close: "close";
523
+ lock: "lock";
524
+ unlock: "unlock";
525
+ }>;
526
+ }, z.core.$strip>;
527
+
528
+ declare const RelayGroupLeaveType: z.ZodObject<{
529
+ roomId: z.ZodString;
530
+ }, z.core.$strip>;
531
+
532
+ declare const RelayGroupLinksType: z.ZodObject<{
533
+ roomId: z.ZodString;
534
+ action: z.ZodEnum<{
535
+ get: "get";
536
+ revoke: "revoke";
537
+ }>;
538
+ }, z.core.$strip>;
539
+
540
+ declare const RelayGroupInviteType: z.ZodObject<{
541
+ url: z.ZodURL;
542
+ action: z.ZodEnum<{
543
+ join: "join";
544
+ info: "info";
545
+ }>;
546
+ }, z.core.$strip>;
547
+
548
+ declare const RelayGroupRequestsListType: z.ZodObject<{
549
+ roomId: z.ZodString;
550
+ }, z.core.$strip>;
551
+ declare const RelayGroupRequestsApproveType: z.ZodObject<{
552
+ roomId: z.ZodString;
553
+ members: z.ZodArray<z.ZodString>;
554
+ }, z.core.$strip>;
555
+ declare const RelayGroupRequestsRejectType: z.ZodObject<{
556
+ roomId: z.ZodString;
557
+ members: z.ZodArray<z.ZodString>;
558
+ }, z.core.$strip>;
559
+
560
+ declare const RelayGroupMetadataType: z.ZodObject<{
561
+ roomId: z.ZodString;
562
+ }, z.core.$strip>;
563
+
564
+ declare const RelayPrivacyUpdateType: z.ZodDiscriminatedUnion<[z.ZodObject<{
565
+ action: z.ZodLiteral<"control">;
566
+ type: z.ZodEnum<{
567
+ block: "block";
568
+ unblock: "unblock";
569
+ }>;
570
+ senderId: z.ZodString;
571
+ }, z.core.$strip>, z.ZodObject<{
572
+ action: z.ZodLiteral<"lastSeen">;
573
+ type: z.ZodEnum<{
574
+ contacts: "contacts";
575
+ all: "all";
576
+ contact_blacklist: "contact_blacklist";
577
+ none: "none";
578
+ }>;
579
+ }, z.core.$strip>, z.ZodObject<{
580
+ action: z.ZodLiteral<"online">;
581
+ type: z.ZodEnum<{
582
+ all: "all";
583
+ match_last_seen: "match_last_seen";
584
+ }>;
585
+ }, z.core.$strip>, z.ZodObject<{
586
+ action: z.ZodLiteral<"avatar">;
587
+ type: z.ZodEnum<{
588
+ contacts: "contacts";
589
+ all: "all";
590
+ contact_blacklist: "contact_blacklist";
591
+ none: "none";
592
+ }>;
593
+ }, z.core.$strip>, z.ZodObject<{
594
+ action: z.ZodLiteral<"story">;
595
+ type: z.ZodEnum<{
596
+ contacts: "contacts";
597
+ all: "all";
598
+ contact_blacklist: "contact_blacklist";
599
+ none: "none";
600
+ }>;
601
+ }, z.core.$strip>, z.ZodObject<{
602
+ action: z.ZodLiteral<"read">;
603
+ type: z.ZodEnum<{
604
+ all: "all";
605
+ none: "none";
606
+ }>;
607
+ }, z.core.$strip>, z.ZodObject<{
608
+ action: z.ZodLiteral<"groupsAdd">;
609
+ type: z.ZodEnum<{
610
+ contacts: "contacts";
611
+ all: "all";
612
+ contact_blacklist: "contact_blacklist";
613
+ }>;
614
+ }, z.core.$strip>, z.ZodObject<{
615
+ action: z.ZodLiteral<"ephemeral">;
616
+ type: z.ZodEnum<{
617
+ remove: "remove";
618
+ "24h": "24h";
619
+ "7d": "7d";
620
+ "90d": "90d";
621
+ }>;
622
+ }, z.core.$strip>], "action">;
623
+
624
+ declare const RelayProfileBioType: z.ZodObject<{
625
+ senderId: z.ZodString;
626
+ }, z.core.$strip>;
627
+
628
+ declare const RelayProfileUpdateType: z.ZodObject<{
629
+ type: z.ZodEnum<{
630
+ name: "name";
631
+ avatar: "avatar";
632
+ bio: "bio";
633
+ }>;
634
+ text: z.ZodOptional<z.ZodString>;
635
+ roomId: z.ZodOptional<z.ZodString>;
636
+ avatar: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>, z.ZodLiteral<"remove">]>;
637
+ }, z.core.$strip>;
638
+
639
+ declare const RelayProfileCheckType: z.ZodObject<{
640
+ senderId: z.ZodString;
641
+ }, z.core.$strip>;
642
+
643
+ declare class Relay {
644
+ private client;
645
+ private message;
646
+ db: JsonDBInterface;
647
+ ctx: Client & {
648
+ db: JsonDBInterface;
649
+ };
650
+ bind(client: Client, db: JsonDBInterface): void;
651
+ private initial;
652
+ text(props: ExtractZod<typeof RelayTextType>): Promise<{
653
+ chatId: string;
1681
654
  channelId: string;
1682
655
  uniqueId: string;
1683
- message: (...args: unknown[]) => Record<string, any>;
1684
- senderId: string;
1685
- roomId: string;
1686
- isGroup: boolean;
1687
- text: string | null;
1688
- chatId: string;
1689
656
  receiverId: string;
1690
657
  receiverName: string;
658
+ roomId: string;
1691
659
  roomName: string;
660
+ senderLid: string;
661
+ senderId: string;
1692
662
  senderName: string;
1693
663
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1694
- 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";
664
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1695
665
  timestamp: number;
1696
666
  mentions: string[];
1697
667
  links: string[];
@@ -1699,6 +669,7 @@ declare class Worker {
1699
669
  isSpam: boolean;
1700
670
  isFromMe: boolean;
1701
671
  isTagMe: boolean;
672
+ isGroup: boolean;
1702
673
  isStory: boolean;
1703
674
  isViewOnce: boolean;
1704
675
  isEdited: boolean;
@@ -1709,26 +680,27 @@ declare class Worker {
1709
680
  isBroadcast: boolean;
1710
681
  isEphemeral: boolean;
1711
682
  isForwarded: boolean;
1712
- citation: Record<string, boolean> | null;
1713
- media: z.objectOutputType<{
1714
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1715
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1716
- }, z.ZodTypeAny, "passthrough"> | null;
1717
- replied: {
683
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
684
+ text?: string;
685
+ citation?: Record<string, boolean>;
686
+ media?: {
687
+ [x: string]: unknown;
688
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
689
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
690
+ };
691
+ replied?: {
692
+ chatId: string;
1718
693
  channelId: string;
1719
694
  uniqueId: string;
1720
- message: (...args: unknown[]) => Record<string, any>;
1721
- senderId: string;
1722
- roomId: string;
1723
- isGroup: boolean;
1724
- text: string | null;
1725
- chatId: string;
1726
695
  receiverId: string;
1727
696
  receiverName: string;
697
+ roomId: string;
1728
698
  roomName: string;
699
+ senderLid: string;
700
+ senderId: string;
1729
701
  senderName: string;
1730
702
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1731
- 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";
703
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1732
704
  timestamp: number;
1733
705
  mentions: string[];
1734
706
  links: string[];
@@ -1736,6 +708,7 @@ declare class Worker {
1736
708
  isSpam: boolean;
1737
709
  isFromMe: boolean;
1738
710
  isTagMe: boolean;
711
+ isGroup: boolean;
1739
712
  isStory: boolean;
1740
713
  isViewOnce: boolean;
1741
714
  isEdited: boolean;
@@ -1746,28 +719,30 @@ declare class Worker {
1746
719
  isBroadcast: boolean;
1747
720
  isEphemeral: boolean;
1748
721
  isForwarded: boolean;
1749
- citation: Record<string, boolean> | null;
1750
- media: z.objectOutputType<{
1751
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1752
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1753
- }, z.ZodTypeAny, "passthrough"> | null;
1754
- } | null;
1755
- } | null>;
1756
- reaction(emoticon: z.infer<typeof ReactionWorkerBaseType>, options: z.infer<typeof ReactionWorkerOptionsType>): Promise<{
722
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
723
+ text?: string;
724
+ citation?: Record<string, boolean>;
725
+ media?: {
726
+ [x: string]: unknown;
727
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
728
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
729
+ };
730
+ replied?: /*elided*/ any;
731
+ };
732
+ }>;
733
+ reply(props: ExtractZod<typeof RelayReplyType>): Promise<{
734
+ chatId: string;
1757
735
  channelId: string;
1758
736
  uniqueId: string;
1759
- message: (...args: unknown[]) => Record<string, any>;
1760
- senderId: string;
1761
- roomId: string;
1762
- isGroup: boolean;
1763
- text: string | null;
1764
- chatId: string;
1765
737
  receiverId: string;
1766
738
  receiverName: string;
739
+ roomId: string;
1767
740
  roomName: string;
741
+ senderLid: string;
742
+ senderId: string;
1768
743
  senderName: string;
1769
744
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1770
- 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";
745
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1771
746
  timestamp: number;
1772
747
  mentions: string[];
1773
748
  links: string[];
@@ -1775,6 +750,7 @@ declare class Worker {
1775
750
  isSpam: boolean;
1776
751
  isFromMe: boolean;
1777
752
  isTagMe: boolean;
753
+ isGroup: boolean;
1778
754
  isStory: boolean;
1779
755
  isViewOnce: boolean;
1780
756
  isEdited: boolean;
@@ -1785,26 +761,27 @@ declare class Worker {
1785
761
  isBroadcast: boolean;
1786
762
  isEphemeral: boolean;
1787
763
  isForwarded: boolean;
1788
- citation: Record<string, boolean> | null;
1789
- media: z.objectOutputType<{
1790
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1791
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1792
- }, z.ZodTypeAny, "passthrough"> | null;
1793
- replied: {
764
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
765
+ text?: string;
766
+ citation?: Record<string, boolean>;
767
+ media?: {
768
+ [x: string]: unknown;
769
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
770
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
771
+ };
772
+ replied?: {
773
+ chatId: string;
1794
774
  channelId: string;
1795
775
  uniqueId: string;
1796
- message: (...args: unknown[]) => Record<string, any>;
1797
- senderId: string;
1798
- roomId: string;
1799
- isGroup: boolean;
1800
- text: string | null;
1801
- chatId: string;
1802
776
  receiverId: string;
1803
777
  receiverName: string;
778
+ roomId: string;
1804
779
  roomName: string;
780
+ senderLid: string;
781
+ senderId: string;
1805
782
  senderName: string;
1806
783
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1807
- 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";
784
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1808
785
  timestamp: number;
1809
786
  mentions: string[];
1810
787
  links: string[];
@@ -1812,6 +789,7 @@ declare class Worker {
1812
789
  isSpam: boolean;
1813
790
  isFromMe: boolean;
1814
791
  isTagMe: boolean;
792
+ isGroup: boolean;
1815
793
  isStory: boolean;
1816
794
  isViewOnce: boolean;
1817
795
  isEdited: boolean;
@@ -1822,28 +800,30 @@ declare class Worker {
1822
800
  isBroadcast: boolean;
1823
801
  isEphemeral: boolean;
1824
802
  isForwarded: boolean;
1825
- citation: Record<string, boolean> | null;
1826
- media: z.objectOutputType<{
1827
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1828
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1829
- }, z.ZodTypeAny, "passthrough"> | null;
1830
- } | null;
1831
- } | null>;
1832
- pin(pin: z.infer<typeof PinWorkerBaseType>, options: z.infer<typeof PinWorkerOptionsType>): Promise<{
803
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
804
+ text?: string;
805
+ citation?: Record<string, boolean>;
806
+ media?: {
807
+ [x: string]: unknown;
808
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
809
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
810
+ };
811
+ replied?: /*elided*/ any;
812
+ };
813
+ }>;
814
+ forward(props: ExtractZod<typeof RelayForwardType>): Promise<{
815
+ chatId: string;
1833
816
  channelId: string;
1834
817
  uniqueId: string;
1835
- message: (...args: unknown[]) => Record<string, any>;
1836
- senderId: string;
1837
- roomId: string;
1838
- isGroup: boolean;
1839
- text: string | null;
1840
- chatId: string;
1841
818
  receiverId: string;
1842
819
  receiverName: string;
820
+ roomId: string;
1843
821
  roomName: string;
822
+ senderLid: string;
823
+ senderId: string;
1844
824
  senderName: string;
1845
825
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1846
- 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";
826
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1847
827
  timestamp: number;
1848
828
  mentions: string[];
1849
829
  links: string[];
@@ -1851,6 +831,7 @@ declare class Worker {
1851
831
  isSpam: boolean;
1852
832
  isFromMe: boolean;
1853
833
  isTagMe: boolean;
834
+ isGroup: boolean;
1854
835
  isStory: boolean;
1855
836
  isViewOnce: boolean;
1856
837
  isEdited: boolean;
@@ -1861,26 +842,27 @@ declare class Worker {
1861
842
  isBroadcast: boolean;
1862
843
  isEphemeral: boolean;
1863
844
  isForwarded: boolean;
1864
- citation: Record<string, boolean> | null;
1865
- media: z.objectOutputType<{
1866
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1867
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1868
- }, z.ZodTypeAny, "passthrough"> | null;
1869
- replied: {
845
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
846
+ text?: string;
847
+ citation?: Record<string, boolean>;
848
+ media?: {
849
+ [x: string]: unknown;
850
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
851
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
852
+ };
853
+ replied?: {
854
+ chatId: string;
1870
855
  channelId: string;
1871
856
  uniqueId: string;
1872
- message: (...args: unknown[]) => Record<string, any>;
1873
- senderId: string;
1874
- roomId: string;
1875
- isGroup: boolean;
1876
- text: string | null;
1877
- chatId: string;
1878
857
  receiverId: string;
1879
858
  receiverName: string;
859
+ roomId: string;
1880
860
  roomName: string;
861
+ senderLid: string;
862
+ senderId: string;
1881
863
  senderName: string;
1882
864
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1883
- 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";
865
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1884
866
  timestamp: number;
1885
867
  mentions: string[];
1886
868
  links: string[];
@@ -1888,6 +870,7 @@ declare class Worker {
1888
870
  isSpam: boolean;
1889
871
  isFromMe: boolean;
1890
872
  isTagMe: boolean;
873
+ isGroup: boolean;
1891
874
  isStory: boolean;
1892
875
  isViewOnce: boolean;
1893
876
  isEdited: boolean;
@@ -1898,28 +881,30 @@ declare class Worker {
1898
881
  isBroadcast: boolean;
1899
882
  isEphemeral: boolean;
1900
883
  isForwarded: boolean;
1901
- citation: Record<string, boolean> | null;
1902
- media: z.objectOutputType<{
1903
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1904
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1905
- }, z.ZodTypeAny, "passthrough"> | null;
1906
- } | null;
1907
- } | null>;
1908
- poll(poll: z.infer<typeof PollWorkerBaseType>, options: z.infer<typeof PollWorkerOptionsType>): Promise<{
884
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
885
+ text?: string;
886
+ citation?: Record<string, boolean>;
887
+ media?: {
888
+ [x: string]: unknown;
889
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
890
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
891
+ };
892
+ replied?: /*elided*/ any;
893
+ };
894
+ }>;
895
+ edit(props: ExtractZod<typeof RelayEditType>): Promise<{
896
+ chatId: string;
1909
897
  channelId: string;
1910
898
  uniqueId: string;
1911
- message: (...args: unknown[]) => Record<string, any>;
1912
- senderId: string;
1913
- roomId: string;
1914
- isGroup: boolean;
1915
- text: string | null;
1916
- chatId: string;
1917
899
  receiverId: string;
1918
900
  receiverName: string;
901
+ roomId: string;
1919
902
  roomName: string;
903
+ senderLid: string;
904
+ senderId: string;
1920
905
  senderName: string;
1921
906
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1922
- 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";
907
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1923
908
  timestamp: number;
1924
909
  mentions: string[];
1925
910
  links: string[];
@@ -1927,6 +912,7 @@ declare class Worker {
1927
912
  isSpam: boolean;
1928
913
  isFromMe: boolean;
1929
914
  isTagMe: boolean;
915
+ isGroup: boolean;
1930
916
  isStory: boolean;
1931
917
  isViewOnce: boolean;
1932
918
  isEdited: boolean;
@@ -1937,26 +923,27 @@ declare class Worker {
1937
923
  isBroadcast: boolean;
1938
924
  isEphemeral: boolean;
1939
925
  isForwarded: boolean;
1940
- citation: Record<string, boolean> | null;
1941
- media: z.objectOutputType<{
1942
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1943
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1944
- }, z.ZodTypeAny, "passthrough"> | null;
1945
- replied: {
926
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
927
+ text?: string;
928
+ citation?: Record<string, boolean>;
929
+ media?: {
930
+ [x: string]: unknown;
931
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
932
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
933
+ };
934
+ replied?: {
935
+ chatId: string;
1946
936
  channelId: string;
1947
937
  uniqueId: string;
1948
- message: (...args: unknown[]) => Record<string, any>;
1949
- senderId: string;
1950
- roomId: string;
1951
- isGroup: boolean;
1952
- text: string | null;
1953
- chatId: string;
1954
938
  receiverId: string;
1955
939
  receiverName: string;
940
+ roomId: string;
1956
941
  roomName: string;
942
+ senderLid: string;
943
+ senderId: string;
1957
944
  senderName: string;
1958
945
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1959
- 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";
946
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1960
947
  timestamp: number;
1961
948
  mentions: string[];
1962
949
  links: string[];
@@ -1964,6 +951,7 @@ declare class Worker {
1964
951
  isSpam: boolean;
1965
952
  isFromMe: boolean;
1966
953
  isTagMe: boolean;
954
+ isGroup: boolean;
1967
955
  isStory: boolean;
1968
956
  isViewOnce: boolean;
1969
957
  isEdited: boolean;
@@ -1974,28 +962,30 @@ declare class Worker {
1974
962
  isBroadcast: boolean;
1975
963
  isEphemeral: boolean;
1976
964
  isForwarded: boolean;
1977
- citation: Record<string, boolean> | null;
1978
- media: z.objectOutputType<{
1979
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
1980
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
1981
- }, z.ZodTypeAny, "passthrough"> | null;
1982
- } | null;
1983
- } | null>;
1984
- edit(text: z.infer<typeof EditWorkerBaseType>, options: z.infer<typeof EditWorkerOptionsType>): Promise<{
965
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
966
+ text?: string;
967
+ citation?: Record<string, boolean>;
968
+ media?: {
969
+ [x: string]: unknown;
970
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
971
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
972
+ };
973
+ replied?: /*elided*/ any;
974
+ };
975
+ }>;
976
+ delete(props: ExtractZod<typeof RelayDeleteType>): Promise<{
977
+ chatId: string;
1985
978
  channelId: string;
1986
979
  uniqueId: string;
1987
- message: (...args: unknown[]) => Record<string, any>;
1988
- senderId: string;
1989
- roomId: string;
1990
- isGroup: boolean;
1991
- text: string | null;
1992
- chatId: string;
1993
980
  receiverId: string;
1994
981
  receiverName: string;
982
+ roomId: string;
1995
983
  roomName: string;
984
+ senderLid: string;
985
+ senderId: string;
1996
986
  senderName: string;
1997
987
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1998
- 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";
988
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
1999
989
  timestamp: number;
2000
990
  mentions: string[];
2001
991
  links: string[];
@@ -2003,6 +993,7 @@ declare class Worker {
2003
993
  isSpam: boolean;
2004
994
  isFromMe: boolean;
2005
995
  isTagMe: boolean;
996
+ isGroup: boolean;
2006
997
  isStory: boolean;
2007
998
  isViewOnce: boolean;
2008
999
  isEdited: boolean;
@@ -2013,26 +1004,27 @@ declare class Worker {
2013
1004
  isBroadcast: boolean;
2014
1005
  isEphemeral: boolean;
2015
1006
  isForwarded: boolean;
2016
- citation: Record<string, boolean> | null;
2017
- media: z.objectOutputType<{
2018
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2019
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2020
- }, z.ZodTypeAny, "passthrough"> | null;
2021
- replied: {
1007
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1008
+ text?: string;
1009
+ citation?: Record<string, boolean>;
1010
+ media?: {
1011
+ [x: string]: unknown;
1012
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1013
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1014
+ };
1015
+ replied?: {
1016
+ chatId: string;
2022
1017
  channelId: string;
2023
1018
  uniqueId: string;
2024
- message: (...args: unknown[]) => Record<string, any>;
2025
- senderId: string;
2026
- roomId: string;
2027
- isGroup: boolean;
2028
- text: string | null;
2029
- chatId: string;
2030
1019
  receiverId: string;
2031
1020
  receiverName: string;
1021
+ roomId: string;
2032
1022
  roomName: string;
1023
+ senderLid: string;
1024
+ senderId: string;
2033
1025
  senderName: string;
2034
1026
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2035
- 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";
1027
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
2036
1028
  timestamp: number;
2037
1029
  mentions: string[];
2038
1030
  links: string[];
@@ -2040,6 +1032,7 @@ declare class Worker {
2040
1032
  isSpam: boolean;
2041
1033
  isFromMe: boolean;
2042
1034
  isTagMe: boolean;
1035
+ isGroup: boolean;
2043
1036
  isStory: boolean;
2044
1037
  isViewOnce: boolean;
2045
1038
  isEdited: boolean;
@@ -2050,28 +1043,32 @@ declare class Worker {
2050
1043
  isBroadcast: boolean;
2051
1044
  isEphemeral: boolean;
2052
1045
  isForwarded: boolean;
2053
- citation: Record<string, boolean> | null;
2054
- media: z.objectOutputType<{
2055
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2056
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2057
- }, z.ZodTypeAny, "passthrough"> | null;
2058
- } | null;
2059
- } | null>;
2060
- delete(del: z.infer<typeof DeleteWorkerBaseType>): Promise<{
1046
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1047
+ text?: string;
1048
+ citation?: Record<string, boolean>;
1049
+ media?: {
1050
+ [x: string]: unknown;
1051
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1052
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1053
+ };
1054
+ replied?: /*elided*/ any;
1055
+ };
1056
+ }>;
1057
+ reject(props: ExtractZod<typeof RelayRejectType>): Promise<void>;
1058
+ presence(props: ExtractZod<typeof RelayPresenceType>): Promise<void>;
1059
+ reaction(props: ExtractZod<typeof RelayReactionType>): Promise<{
1060
+ chatId: string;
2061
1061
  channelId: string;
2062
1062
  uniqueId: string;
2063
- message: (...args: unknown[]) => Record<string, any>;
2064
- senderId: string;
2065
- roomId: string;
2066
- isGroup: boolean;
2067
- text: string | null;
2068
- chatId: string;
2069
1063
  receiverId: string;
2070
1064
  receiverName: string;
1065
+ roomId: string;
2071
1066
  roomName: string;
1067
+ senderLid: string;
1068
+ senderId: string;
2072
1069
  senderName: string;
2073
1070
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2074
- 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";
1071
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
2075
1072
  timestamp: number;
2076
1073
  mentions: string[];
2077
1074
  links: string[];
@@ -2079,6 +1076,7 @@ declare class Worker {
2079
1076
  isSpam: boolean;
2080
1077
  isFromMe: boolean;
2081
1078
  isTagMe: boolean;
1079
+ isGroup: boolean;
2082
1080
  isStory: boolean;
2083
1081
  isViewOnce: boolean;
2084
1082
  isEdited: boolean;
@@ -2089,26 +1087,27 @@ declare class Worker {
2089
1087
  isBroadcast: boolean;
2090
1088
  isEphemeral: boolean;
2091
1089
  isForwarded: boolean;
2092
- citation: Record<string, boolean> | null;
2093
- media: z.objectOutputType<{
2094
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2095
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2096
- }, z.ZodTypeAny, "passthrough"> | null;
2097
- replied: {
1090
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1091
+ text?: string;
1092
+ citation?: Record<string, boolean>;
1093
+ media?: {
1094
+ [x: string]: unknown;
1095
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1096
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1097
+ };
1098
+ replied?: {
1099
+ chatId: string;
2098
1100
  channelId: string;
2099
1101
  uniqueId: string;
2100
- message: (...args: unknown[]) => Record<string, any>;
2101
- senderId: string;
2102
- roomId: string;
2103
- isGroup: boolean;
2104
- text: string | null;
2105
- chatId: string;
2106
1102
  receiverId: string;
2107
1103
  receiverName: string;
1104
+ roomId: string;
2108
1105
  roomName: string;
1106
+ senderLid: string;
1107
+ senderId: string;
2109
1108
  senderName: string;
2110
1109
  senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2111
- 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";
1110
+ chatType: "contacts" | "event" | "text" | "image" | "contact" | "location" | "document" | "audio" | "video" | "protocol" | "highlyStructured" | "sendPayment" | "requestPayment" | "declinePaymentRequest" | "cancelPaymentRequest" | "template" | "sticker" | "groupInvite" | "buttons" | "product" | "deviceSent" | "list" | "viewOnce" | "order" | "ephemeral" | "invoice" | "paymentInvite" | "interactive" | "reaction" | "interactiveResponse" | "pollCreation" | "pollUpdate" | "keepInChat" | "requestPhoneNumber" | "scheduledCallCreation" | "groupMentioned" | "pinInChat" | "scheduledCallEdit" | "ptv" | "botInvoke" | "callLog" | "encComment" | "bcall" | "lottieSticker" | "comment" | "placeholder" | "encEventUpdate";
2112
1111
  timestamp: number;
2113
1112
  mentions: string[];
2114
1113
  links: string[];
@@ -2116,6 +1115,7 @@ declare class Worker {
2116
1115
  isSpam: boolean;
2117
1116
  isFromMe: boolean;
2118
1117
  isTagMe: boolean;
1118
+ isGroup: boolean;
2119
1119
  isStory: boolean;
2120
1120
  isViewOnce: boolean;
2121
1121
  isEdited: boolean;
@@ -2126,594 +1126,105 @@ declare class Worker {
2126
1126
  isBroadcast: boolean;
2127
1127
  isEphemeral: boolean;
2128
1128
  isForwarded: boolean;
2129
- citation: Record<string, boolean> | null;
2130
- media: z.objectOutputType<{
2131
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2132
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<stream.Readable, z.ZodTypeDef, stream.Readable>>;
2133
- }, z.ZodTypeAny, "passthrough"> | null;
2134
- } | null;
2135
- } | null>;
2136
- rejectCall(call: z.infer<typeof RejectCallWorkerBaseType>): Promise<void | undefined>;
2137
- mute(mute: z.infer<typeof MuteWorkerBaseType>, options: z.infer<typeof MuteWorkerOptionsType>): Promise<void | undefined>;
2138
- profile(roomId: z.infer<typeof ProfileWorkerBaseType>): Promise<z.infer<typeof ProfileWorkerBaseOutputType> | null>;
2139
- presence(action: z.infer<typeof PresenceWorkerBaseType>, options: z.infer<typeof PresenceWorkerOptionsType>): Promise<void | undefined>;
2140
- private addCompletion;
2141
- private deleteCompletion;
2142
- private updateCompletion;
2143
- private clearCompletions;
2144
- private getCompletion;
2145
- private getCompletions;
2146
- private addPersonalization;
2147
- private deletePersonalization;
2148
- private clearPersonalization;
2149
- private getPersonalization;
2150
- private addRAG;
2151
- private deleteRAG;
2152
- private updateRAG;
2153
- private clearRAGs;
2154
- private getRAG;
2155
- private getRAGs;
2156
- private getMessage;
2157
- llms: llmsAdapter;
2158
- chats: chatsAdapter;
1129
+ message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1130
+ text?: string;
1131
+ citation?: Record<string, boolean>;
1132
+ media?: {
1133
+ [x: string]: unknown;
1134
+ buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1135
+ stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1136
+ };
1137
+ replied?: /*elided*/ any;
1138
+ };
1139
+ }>;
1140
+ document(type: ExtractZod<typeof RelayDocumentEnumType>, props: ExtractZod<typeof RelayDocumentType>): Promise<void>;
1141
+ image(type: ExtractZod<typeof RelayImageEnumType>, props: ExtractZod<typeof RelayImageType>): Promise<void>;
1142
+ sticker(type: ExtractZod<typeof RelayStickerEnumType>, props: ExtractZod<typeof RelayStickerType>): Promise<void>;
1143
+ video(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1144
+ audio(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
1145
+ voice(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
1146
+ note(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1147
+ gif(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1148
+ location(type: ExtractZod<typeof RelayLocationEnumType>, props: ExtractZod<typeof RelayLocationType>): Promise<void>;
1149
+ contacts(type: ExtractZod<typeof RelayContactEnumType>, props: ExtractZod<typeof RelayContactType>): Promise<void>;
1150
+ poll(type: ExtractZod<typeof RelayPollEnumType>, props: ExtractZod<typeof RelayPollType>): Promise<void>;
1151
+ button(type: ExtractZod<typeof RelayButtonEnumType>, props: ExtractZod<typeof RelayButtonType>): Promise<void>;
1152
+ group(): {
1153
+ create: (props: ExtractZod<typeof RelayGroupCreateType>) => Promise<baileys.GroupMetadata>;
1154
+ action: (props: ExtractZod<typeof RelayGroupActionType>) => Promise<{
1155
+ status: string;
1156
+ jid: string;
1157
+ content: baileys.BinaryNode;
1158
+ }[]>;
1159
+ update: (props: ExtractZod<typeof RelayGroupUpdateType>) => Promise<void>;
1160
+ settings: (props: ExtractZod<typeof RelayGroupSettingsType>) => Promise<void>;
1161
+ leave: (props: ExtractZod<typeof RelayGroupLeaveType>) => Promise<void>;
1162
+ links: (props: ExtractZod<typeof RelayGroupLinksType>) => Promise<string>;
1163
+ invite: (props: ExtractZod<typeof RelayGroupInviteType>) => Promise<string | baileys.GroupMetadata>;
1164
+ metadata: (props: ExtractZod<typeof RelayGroupMetadataType>) => Promise<baileys.GroupMetadata>;
1165
+ requests: {
1166
+ list: (props: ExtractZod<typeof RelayGroupRequestsListType>) => Promise<{
1167
+ [key: string]: string;
1168
+ }[]>;
1169
+ approve: (props: ExtractZod<typeof RelayGroupRequestsApproveType>) => Promise<{
1170
+ status: string;
1171
+ jid: string;
1172
+ }[]>;
1173
+ reject: (props: ExtractZod<typeof RelayGroupRequestsRejectType>) => Promise<{
1174
+ status: string;
1175
+ jid: string;
1176
+ }[]>;
1177
+ };
1178
+ };
1179
+ privacy(): {
1180
+ update: (props: ExtractZod<typeof RelayPrivacyUpdateType>) => Promise<void>;
1181
+ fetch: {
1182
+ settings: () => Promise<{
1183
+ [_: string]: string;
1184
+ }>;
1185
+ blocklists: () => Promise<string[]>;
1186
+ };
1187
+ };
1188
+ profile(): {
1189
+ bio: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<baileys.USyncQueryResultList[]>;
1190
+ avatar: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<string>;
1191
+ business: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<void | baileys.WABusinessProfile>;
1192
+ update: (props: ExtractZod<typeof RelayProfileUpdateType>) => Promise<void>;
1193
+ check: (props: ExtractZod<typeof RelayProfileCheckType>) => Promise<{
1194
+ jid: string;
1195
+ exists: unknown;
1196
+ lid: unknown;
1197
+ isOnWhatsApp: boolean;
1198
+ avatar: string;
1199
+ bio: baileys.USyncQueryResultList[];
1200
+ } | {
1201
+ isOnWhatsApp: boolean;
1202
+ }>;
1203
+ };
2159
1204
  }
2160
1205
 
2161
1206
  declare class Client {
2162
- private props;
2163
- options: z.infer<typeof ClientClassesType>;
2164
- cache: NodeCache;
2165
- private chatId;
1207
+ props: ExtractZod<typeof ClientOptionsType>;
1208
+ db: JsonDBInterface;
2166
1209
  private logger;
2167
- private db;
2168
- private socket;
2169
1210
  private events;
2170
- private spinners;
2171
- private worker;
2172
- constructor(props: z.input<typeof ClientClassesType>);
1211
+ private relay;
1212
+ private retryCount;
1213
+ private maxRetries;
1214
+ private connectionTimeout;
1215
+ spinner: nanospinner.Spinner;
1216
+ socket: ReturnType<typeof baileys__default> | undefined;
1217
+ cache: NodeCache;
1218
+ constructor(props: ExtractZod<typeof ClientOptionsType>);
2173
1219
  initialize(): Promise<void>;
2174
- startSpinner(key: string, message: string): Ora;
2175
- stopSpinner(key: string, succeed: boolean, message?: string): void;
2176
- failSpinner(key: string, message?: string): void;
2177
- on<T extends EventEnumType>(event: T, handler: EventCallbackType[T]): void;
2178
- emit<T extends EventEnumType>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
1220
+ private startConnectionTimeout;
1221
+ private handleConnectionTimeout;
1222
+ private autoReload;
1223
+ resetRetryCount(): void;
1224
+ on<T extends ExtractZod<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
1225
+ emit<T extends ExtractZod<typeof EventEnumType>>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
2179
1226
  }
2180
- interface Client extends Worker {
1227
+ interface Client extends Relay {
2181
1228
  }
2182
1229
 
2183
- declare const CallsParserBaseType: z.ZodObject<{
2184
- callId: z.ZodString;
2185
- roomId: z.ZodString;
2186
- callerId: z.ZodString;
2187
- date: z.ZodDate;
2188
- offline: z.ZodBoolean;
2189
- status: z.ZodEnum<["accept", "offer", "reject", "ringing", "terminate", "timeout"]>;
2190
- isVideo: z.ZodBoolean;
2191
- isGroup: z.ZodBoolean;
2192
- }, "strip", z.ZodTypeAny, {
2193
- status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
2194
- callId: string;
2195
- roomId: string;
2196
- callerId: string;
2197
- date: Date;
2198
- offline: boolean;
2199
- isVideo: boolean;
2200
- isGroup: boolean;
2201
- }, {
2202
- status: "accept" | "offer" | "reject" | "ringing" | "terminate" | "timeout";
2203
- callId: string;
2204
- roomId: string;
2205
- callerId: string;
2206
- date: Date;
2207
- offline: boolean;
2208
- isVideo: boolean;
2209
- isGroup: boolean;
2210
- }>;
2211
-
2212
- declare const MessagesMediaType: {
2213
- readonly text: "text";
2214
- readonly conversation: "text";
2215
- readonly imageMessage: "image";
2216
- readonly contactMessage: "contact";
2217
- readonly locationMessage: "location";
2218
- readonly documentMessage: "document";
2219
- readonly audioMessage: "audio";
2220
- readonly videoMessage: "video";
2221
- readonly protocolMessage: "protocol";
2222
- readonly contactsArrayMessage: "contactsArray";
2223
- readonly highlyStructuredMessage: "highlyStructured";
2224
- readonly sendPaymentMessage: "sendPayment";
2225
- readonly liveLocationMessage: "liveLocation";
2226
- readonly requestPaymentMessage: "requestPayment";
2227
- readonly declinePaymentRequestMessage: "declinePaymentRequest";
2228
- readonly cancelPaymentRequestMessage: "cancelPaymentRequest";
2229
- readonly templateMessage: "template";
2230
- readonly stickerMessage: "sticker";
2231
- readonly groupInviteMessage: "groupInvite";
2232
- readonly templateButtonReplyMessage: "templateButtonReply";
2233
- readonly productMessage: "product";
2234
- readonly deviceSentMessage: "deviceSent";
2235
- readonly listMessage: "list";
2236
- readonly viewOnceMessage: "viewOnce";
2237
- readonly orderMessage: "order";
2238
- readonly listResponseMessage: "listResponse";
2239
- readonly ephemeralMessage: "ephemeral";
2240
- readonly invoiceMessage: "invoice";
2241
- readonly buttonsMessage: "buttons";
2242
- readonly buttonsResponseMessage: "buttonsResponse";
2243
- readonly paymentInviteMessage: "paymentInvite";
2244
- readonly interactiveMessage: "interactive";
2245
- readonly reactionMessage: "reaction";
2246
- readonly stickerSyncRmrMessage: "sticker";
2247
- readonly interactiveResponseMessage: "interactiveResponse";
2248
- readonly pollCreationMessage: "pollCreation";
2249
- readonly pollUpdateMessage: "pollUpdate";
2250
- readonly keepInChatMessage: "keepInChat";
2251
- readonly documentWithCaptionMessage: "document";
2252
- readonly requestPhoneNumberMessage: "requestPhoneNumber";
2253
- readonly viewOnceMessageV2: "viewOnce";
2254
- readonly encReactionMessage: "reaction";
2255
- readonly editedMessage: "text";
2256
- readonly viewOnceMessageV2Extension: "viewOnce";
2257
- readonly pollCreationMessageV2: "pollCreation";
2258
- readonly scheduledCallCreationMessage: "scheduledCallCreation";
2259
- readonly groupMentionedMessage: "groupMentioned";
2260
- readonly pinInChatMessage: "pinInChat";
2261
- readonly pollCreationMessageV3: "pollCreation";
2262
- readonly scheduledCallEditMessage: "scheduledCallEdit";
2263
- readonly ptvMessage: "ptv";
2264
- readonly botInvokeMessage: "botInvoke";
2265
- readonly callLogMesssage: "callLog";
2266
- readonly encCommentMessage: "encComment";
2267
- readonly bcallMessage: "bcall";
2268
- readonly lottieStickerMessage: "lottieSticker";
2269
- readonly eventMessage: "event";
2270
- readonly commentMessage: "comment";
2271
- readonly newsletterAdminInviteMessage: "text";
2272
- readonly extendedTextMessageWithParentKey: "text";
2273
- readonly extendedTextMessage: "text";
2274
- readonly placeholderMessage: "placeholder";
2275
- readonly encEventUpdateMessage: "encEventUpdate";
2276
- };
2277
- declare const MessagesVerifiedPlatformType: {
2278
- readonly whatsapp: "0@s.whatsapp.net";
2279
- readonly meta: "13135550002@s.whatsapp.net";
2280
- readonly chatgpt: "18002428478@s.whatsapp.net";
2281
- readonly copilot: "18772241042@s.whatsapp.net";
2282
- readonly instagram: "447723442971@s.whatsapp.net";
2283
- readonly tiktok: "6285574670498@s.whatsapp.net";
2284
- };
2285
- declare const MessagesEnumType: 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"]>;
2286
- declare const MessagesDeviceEnumType: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2287
- declare const MessagesParserBaseType: z.ZodObject<{
2288
- chatId: z.ZodString;
2289
- channelId: z.ZodString;
2290
- uniqueId: z.ZodString;
2291
- receiverId: z.ZodString;
2292
- receiverName: z.ZodString;
2293
- roomId: z.ZodString;
2294
- roomName: z.ZodString;
2295
- senderId: z.ZodString;
2296
- senderName: z.ZodString;
2297
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2298
- 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"]>;
2299
- timestamp: z.ZodNumber;
2300
- mentions: z.ZodArray<z.ZodString, "many">;
2301
- text: z.ZodNullable<z.ZodString>;
2302
- links: z.ZodArray<z.ZodString, "many">;
2303
- isPrefix: z.ZodBoolean;
2304
- isSpam: z.ZodBoolean;
2305
- isFromMe: z.ZodBoolean;
2306
- isTagMe: z.ZodBoolean;
2307
- isGroup: z.ZodBoolean;
2308
- isStory: z.ZodBoolean;
2309
- isViewOnce: z.ZodBoolean;
2310
- isEdited: z.ZodBoolean;
2311
- isDeleted: z.ZodBoolean;
2312
- isPinned: z.ZodBoolean;
2313
- isUnPinned: z.ZodBoolean;
2314
- isChannel: z.ZodBoolean;
2315
- isBroadcast: z.ZodBoolean;
2316
- isEphemeral: z.ZodBoolean;
2317
- isForwarded: z.ZodBoolean;
2318
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2319
- media: z.ZodNullable<z.ZodObject<{
2320
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2321
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2322
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2323
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2324
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2325
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2326
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2327
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2328
- }, z.ZodTypeAny, "passthrough">>>;
2329
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2330
- }, "strip", z.ZodTypeAny, {
2331
- channelId: string;
2332
- uniqueId: string;
2333
- message: (...args: unknown[]) => Record<string, any>;
2334
- senderId: string;
2335
- roomId: string;
2336
- isGroup: boolean;
2337
- text: string | null;
2338
- chatId: string;
2339
- receiverId: string;
2340
- receiverName: string;
2341
- roomName: string;
2342
- senderName: string;
2343
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2344
- 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";
2345
- timestamp: number;
2346
- mentions: string[];
2347
- links: string[];
2348
- isPrefix: boolean;
2349
- isSpam: boolean;
2350
- isFromMe: boolean;
2351
- isTagMe: boolean;
2352
- isStory: boolean;
2353
- isViewOnce: boolean;
2354
- isEdited: boolean;
2355
- isDeleted: boolean;
2356
- isPinned: boolean;
2357
- isUnPinned: boolean;
2358
- isChannel: boolean;
2359
- isBroadcast: boolean;
2360
- isEphemeral: boolean;
2361
- isForwarded: boolean;
2362
- citation: Record<string, boolean> | null;
2363
- media: z.objectOutputType<{
2364
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2365
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2366
- }, z.ZodTypeAny, "passthrough"> | null;
2367
- }, {
2368
- channelId: string;
2369
- uniqueId: string;
2370
- message: (...args: unknown[]) => Record<string, any>;
2371
- senderId: string;
2372
- roomId: string;
2373
- isGroup: boolean;
2374
- text: string | null;
2375
- chatId: string;
2376
- receiverId: string;
2377
- receiverName: string;
2378
- roomName: string;
2379
- senderName: string;
2380
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2381
- 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";
2382
- timestamp: number;
2383
- mentions: string[];
2384
- links: string[];
2385
- isPrefix: boolean;
2386
- isSpam: boolean;
2387
- isFromMe: boolean;
2388
- isTagMe: boolean;
2389
- isStory: boolean;
2390
- isViewOnce: boolean;
2391
- isEdited: boolean;
2392
- isDeleted: boolean;
2393
- isPinned: boolean;
2394
- isUnPinned: boolean;
2395
- isChannel: boolean;
2396
- isBroadcast: boolean;
2397
- isEphemeral: boolean;
2398
- isForwarded: boolean;
2399
- citation: Record<string, boolean> | null;
2400
- media: z.objectInputType<{
2401
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2402
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2403
- }, z.ZodTypeAny, "passthrough"> | null;
2404
- }>;
2405
- declare const MessagesParserType: z.ZodObject<{
2406
- chatId: z.ZodString;
2407
- channelId: z.ZodString;
2408
- uniqueId: z.ZodString;
2409
- receiverId: z.ZodString;
2410
- receiverName: z.ZodString;
2411
- roomId: z.ZodString;
2412
- roomName: z.ZodString;
2413
- senderId: z.ZodString;
2414
- senderName: z.ZodString;
2415
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2416
- 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"]>;
2417
- timestamp: z.ZodNumber;
2418
- mentions: z.ZodArray<z.ZodString, "many">;
2419
- text: z.ZodNullable<z.ZodString>;
2420
- links: z.ZodArray<z.ZodString, "many">;
2421
- isPrefix: z.ZodBoolean;
2422
- isSpam: z.ZodBoolean;
2423
- isFromMe: z.ZodBoolean;
2424
- isTagMe: z.ZodBoolean;
2425
- isGroup: z.ZodBoolean;
2426
- isStory: z.ZodBoolean;
2427
- isViewOnce: z.ZodBoolean;
2428
- isEdited: z.ZodBoolean;
2429
- isDeleted: z.ZodBoolean;
2430
- isPinned: z.ZodBoolean;
2431
- isUnPinned: z.ZodBoolean;
2432
- isChannel: z.ZodBoolean;
2433
- isBroadcast: z.ZodBoolean;
2434
- isEphemeral: z.ZodBoolean;
2435
- isForwarded: z.ZodBoolean;
2436
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2437
- media: z.ZodNullable<z.ZodObject<{
2438
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2439
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2440
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2441
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2442
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2443
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2444
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2445
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2446
- }, z.ZodTypeAny, "passthrough">>>;
2447
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2448
- } & {
2449
- replied: z.ZodNullable<z.ZodObject<{
2450
- chatId: z.ZodString;
2451
- channelId: z.ZodString;
2452
- uniqueId: z.ZodString;
2453
- receiverId: z.ZodString;
2454
- receiverName: z.ZodString;
2455
- roomId: z.ZodString;
2456
- roomName: z.ZodString;
2457
- senderId: z.ZodString;
2458
- senderName: z.ZodString;
2459
- senderDevice: z.ZodEnum<["unknown", "android", "ios", "desktop", "web"]>;
2460
- 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"]>;
2461
- timestamp: z.ZodNumber;
2462
- mentions: z.ZodArray<z.ZodString, "many">;
2463
- text: z.ZodNullable<z.ZodString>;
2464
- links: z.ZodArray<z.ZodString, "many">;
2465
- isPrefix: z.ZodBoolean;
2466
- isSpam: z.ZodBoolean;
2467
- isFromMe: z.ZodBoolean;
2468
- isTagMe: z.ZodBoolean;
2469
- isGroup: z.ZodBoolean;
2470
- isStory: z.ZodBoolean;
2471
- isViewOnce: z.ZodBoolean;
2472
- isEdited: z.ZodBoolean;
2473
- isDeleted: z.ZodBoolean;
2474
- isPinned: z.ZodBoolean;
2475
- isUnPinned: z.ZodBoolean;
2476
- isChannel: z.ZodBoolean;
2477
- isBroadcast: z.ZodBoolean;
2478
- isEphemeral: z.ZodBoolean;
2479
- isForwarded: z.ZodBoolean;
2480
- citation: z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
2481
- media: z.ZodNullable<z.ZodObject<{
2482
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2483
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2484
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
2485
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2486
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2487
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
2488
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2489
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2490
- }, z.ZodTypeAny, "passthrough">>>;
2491
- message: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodRecord<z.ZodString, z.ZodAny>>;
2492
- }, "strip", z.ZodTypeAny, {
2493
- channelId: string;
2494
- uniqueId: string;
2495
- message: (...args: unknown[]) => Record<string, any>;
2496
- senderId: string;
2497
- roomId: string;
2498
- isGroup: boolean;
2499
- text: string | null;
2500
- chatId: string;
2501
- receiverId: string;
2502
- receiverName: string;
2503
- roomName: string;
2504
- senderName: string;
2505
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2506
- 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";
2507
- timestamp: number;
2508
- mentions: string[];
2509
- links: string[];
2510
- isPrefix: boolean;
2511
- isSpam: boolean;
2512
- isFromMe: boolean;
2513
- isTagMe: boolean;
2514
- isStory: boolean;
2515
- isViewOnce: boolean;
2516
- isEdited: boolean;
2517
- isDeleted: boolean;
2518
- isPinned: boolean;
2519
- isUnPinned: boolean;
2520
- isChannel: boolean;
2521
- isBroadcast: boolean;
2522
- isEphemeral: boolean;
2523
- isForwarded: boolean;
2524
- citation: Record<string, boolean> | null;
2525
- media: z.objectOutputType<{
2526
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2527
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2528
- }, z.ZodTypeAny, "passthrough"> | null;
2529
- }, {
2530
- channelId: string;
2531
- uniqueId: string;
2532
- message: (...args: unknown[]) => Record<string, any>;
2533
- senderId: string;
2534
- roomId: string;
2535
- isGroup: boolean;
2536
- text: string | null;
2537
- chatId: string;
2538
- receiverId: string;
2539
- receiverName: string;
2540
- roomName: string;
2541
- senderName: string;
2542
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2543
- 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";
2544
- timestamp: number;
2545
- mentions: string[];
2546
- links: string[];
2547
- isPrefix: boolean;
2548
- isSpam: boolean;
2549
- isFromMe: boolean;
2550
- isTagMe: boolean;
2551
- isStory: boolean;
2552
- isViewOnce: boolean;
2553
- isEdited: boolean;
2554
- isDeleted: boolean;
2555
- isPinned: boolean;
2556
- isUnPinned: boolean;
2557
- isChannel: boolean;
2558
- isBroadcast: boolean;
2559
- isEphemeral: boolean;
2560
- isForwarded: boolean;
2561
- citation: Record<string, boolean> | null;
2562
- media: z.objectInputType<{
2563
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2564
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2565
- }, z.ZodTypeAny, "passthrough"> | null;
2566
- }>>;
2567
- }, "strip", z.ZodTypeAny, {
2568
- channelId: string;
2569
- uniqueId: string;
2570
- message: (...args: unknown[]) => Record<string, any>;
2571
- senderId: string;
2572
- roomId: string;
2573
- isGroup: boolean;
2574
- text: string | null;
2575
- chatId: string;
2576
- receiverId: string;
2577
- receiverName: string;
2578
- roomName: string;
2579
- senderName: string;
2580
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2581
- 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";
2582
- timestamp: number;
2583
- mentions: string[];
2584
- links: string[];
2585
- isPrefix: boolean;
2586
- isSpam: boolean;
2587
- isFromMe: boolean;
2588
- isTagMe: boolean;
2589
- isStory: boolean;
2590
- isViewOnce: boolean;
2591
- isEdited: boolean;
2592
- isDeleted: boolean;
2593
- isPinned: boolean;
2594
- isUnPinned: boolean;
2595
- isChannel: boolean;
2596
- isBroadcast: boolean;
2597
- isEphemeral: boolean;
2598
- isForwarded: boolean;
2599
- citation: Record<string, boolean> | null;
2600
- media: z.objectOutputType<{
2601
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2602
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2603
- }, z.ZodTypeAny, "passthrough"> | null;
2604
- replied: {
2605
- channelId: string;
2606
- uniqueId: string;
2607
- message: (...args: unknown[]) => Record<string, any>;
2608
- senderId: string;
2609
- roomId: string;
2610
- isGroup: boolean;
2611
- text: string | null;
2612
- chatId: string;
2613
- receiverId: string;
2614
- receiverName: string;
2615
- roomName: string;
2616
- senderName: string;
2617
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2618
- 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";
2619
- timestamp: number;
2620
- mentions: string[];
2621
- links: string[];
2622
- isPrefix: boolean;
2623
- isSpam: boolean;
2624
- isFromMe: boolean;
2625
- isTagMe: boolean;
2626
- isStory: boolean;
2627
- isViewOnce: boolean;
2628
- isEdited: boolean;
2629
- isDeleted: boolean;
2630
- isPinned: boolean;
2631
- isUnPinned: boolean;
2632
- isChannel: boolean;
2633
- isBroadcast: boolean;
2634
- isEphemeral: boolean;
2635
- isForwarded: boolean;
2636
- citation: Record<string, boolean> | null;
2637
- media: z.objectOutputType<{
2638
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2639
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2640
- }, z.ZodTypeAny, "passthrough"> | null;
2641
- } | null;
2642
- }, {
2643
- channelId: string;
2644
- uniqueId: string;
2645
- message: (...args: unknown[]) => Record<string, any>;
2646
- senderId: string;
2647
- roomId: string;
2648
- isGroup: boolean;
2649
- text: string | null;
2650
- chatId: string;
2651
- receiverId: string;
2652
- receiverName: string;
2653
- roomName: string;
2654
- senderName: string;
2655
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2656
- 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";
2657
- timestamp: number;
2658
- mentions: string[];
2659
- links: string[];
2660
- isPrefix: boolean;
2661
- isSpam: boolean;
2662
- isFromMe: boolean;
2663
- isTagMe: boolean;
2664
- isStory: boolean;
2665
- isViewOnce: boolean;
2666
- isEdited: boolean;
2667
- isDeleted: boolean;
2668
- isPinned: boolean;
2669
- isUnPinned: boolean;
2670
- isChannel: boolean;
2671
- isBroadcast: boolean;
2672
- isEphemeral: boolean;
2673
- isForwarded: boolean;
2674
- citation: Record<string, boolean> | null;
2675
- media: z.objectInputType<{
2676
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2677
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2678
- }, z.ZodTypeAny, "passthrough"> | null;
2679
- replied: {
2680
- channelId: string;
2681
- uniqueId: string;
2682
- message: (...args: unknown[]) => Record<string, any>;
2683
- senderId: string;
2684
- roomId: string;
2685
- isGroup: boolean;
2686
- text: string | null;
2687
- chatId: string;
2688
- receiverId: string;
2689
- receiverName: string;
2690
- roomName: string;
2691
- senderName: string;
2692
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
2693
- 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";
2694
- timestamp: number;
2695
- mentions: string[];
2696
- links: string[];
2697
- isPrefix: boolean;
2698
- isSpam: boolean;
2699
- isFromMe: boolean;
2700
- isTagMe: boolean;
2701
- isStory: boolean;
2702
- isViewOnce: boolean;
2703
- isEdited: boolean;
2704
- isDeleted: boolean;
2705
- isPinned: boolean;
2706
- isUnPinned: boolean;
2707
- isChannel: boolean;
2708
- isBroadcast: boolean;
2709
- isEphemeral: boolean;
2710
- isForwarded: boolean;
2711
- citation: Record<string, boolean> | null;
2712
- media: z.objectInputType<{
2713
- buffer: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>>;
2714
- stream: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<Readable, z.ZodTypeDef, Readable>>;
2715
- }, z.ZodTypeAny, "passthrough"> | null;
2716
- } | null;
2717
- }>;
2718
-
2719
- export { AdapterDatabaseType, CallsParserBaseType, CitationType, Client, ClientClassesBaseType, ClientClassesType, ContactWorkerBaseType, ContactWorkerOptionsType, DeleteWorkerBaseType, EditWorkerBaseType, EditWorkerOptionsType, type EventCallbackType, EventEnumType, LocationWorkerBaseType, LocationWorkerOptionsType, MediaInputWorkerType, MessagesDeviceEnumType, MessagesEnumType, MessagesMediaType, MessagesParserBaseType, MessagesParserType, MessagesVerifiedPlatformType, MuteWorkerBaseType, MuteWorkerOptionsType, PinWorkerBaseType, PinWorkerOptionsType, PollWorkerBaseType, PollWorkerOptionsType, PresenceWorkerBaseType, PresenceWorkerOptionsType, ProfileWorkerBaseOutputType, ProfileWorkerBaseType, ReactionWorkerBaseType, ReactionWorkerOptionsType, RejectCallWorkerBaseType, TextWorkerBaseType, TextWorkerOptionsType, addRAGType, llmMessagesTable, llmPersonalizationTable, llmRAGTable, type llmsAdapter };
1230
+ export { CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type EventCallbackType, EventEnumType, FakeReplyType, JsonDB, type JsonDBInterface, LimiterType, PluginsType };