zaileys 1.1.35 → 1.1.37

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 DELETED
@@ -1,1230 +0,0 @@
1
- import * as nanospinner from 'nanospinner';
2
- import * as baileys from 'baileys';
3
- import baileys__default, { AnyMessageContent } from 'baileys';
4
- import NodeCache from 'node-cache';
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';
9
-
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
- }
47
-
48
- declare const ExtractorCallsType: z.ZodObject<{
49
- callId: z.ZodString;
50
- roomId: z.ZodString;
51
- callerId: z.ZodString;
52
- date: z.ZodDate;
53
- offline: z.ZodBoolean;
54
- status: z.ZodEnum<{
55
- accept: "accept";
56
- offer: "offer";
57
- reject: "reject";
58
- ringing: "ringing";
59
- terminate: "terminate";
60
- timeout: "timeout";
61
- }>;
62
- isVideo: z.ZodBoolean;
63
- isGroup: z.ZodBoolean;
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";
290
- }>;
291
- type EventCallbackType = {
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;
296
- };
297
-
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>]>;
304
-
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";
324
- }>;
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";
337
- }>;
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";
349
- }>;
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";
361
- }>;
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>;
366
-
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";
387
- }>;
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";
398
- }>;
399
- declare const RelayLocationType: z.ZodObject<{
400
- latitude: z.ZodNumber;
401
- longitude: z.ZodNumber;
402
- title: z.ZodOptional<z.ZodString>;
403
- footer: z.ZodOptional<z.ZodString>;
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";
412
- }>;
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";
429
- }>;
430
- declare const RelayPollType: z.ZodDiscriminatedUnion<[z.ZodObject<{
431
- action: z.ZodLiteral<"create">;
432
- name: z.ZodString;
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";
442
- }>;
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";
456
- }>;
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<{
462
- id: z.ZodString;
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">;
472
- id: z.ZodString;
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<{
499
- roomId: z.ZodString;
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>;
508
-
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;
654
- channelId: string;
655
- uniqueId: string;
656
- receiverId: string;
657
- receiverName: string;
658
- roomId: string;
659
- roomName: string;
660
- senderLid: string;
661
- senderId: string;
662
- senderName: string;
663
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
665
- timestamp: number;
666
- mentions: string[];
667
- links: string[];
668
- isPrefix: boolean;
669
- isSpam: boolean;
670
- isFromMe: boolean;
671
- isTagMe: boolean;
672
- isGroup: boolean;
673
- isStory: boolean;
674
- isViewOnce: boolean;
675
- isEdited: boolean;
676
- isDeleted: boolean;
677
- isPinned: boolean;
678
- isUnPinned: boolean;
679
- isChannel: boolean;
680
- isBroadcast: boolean;
681
- isEphemeral: boolean;
682
- isForwarded: boolean;
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;
693
- channelId: string;
694
- uniqueId: string;
695
- receiverId: string;
696
- receiverName: string;
697
- roomId: string;
698
- roomName: string;
699
- senderLid: string;
700
- senderId: string;
701
- senderName: string;
702
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
704
- timestamp: number;
705
- mentions: string[];
706
- links: string[];
707
- isPrefix: boolean;
708
- isSpam: boolean;
709
- isFromMe: boolean;
710
- isTagMe: boolean;
711
- isGroup: boolean;
712
- isStory: boolean;
713
- isViewOnce: boolean;
714
- isEdited: boolean;
715
- isDeleted: boolean;
716
- isPinned: boolean;
717
- isUnPinned: boolean;
718
- isChannel: boolean;
719
- isBroadcast: boolean;
720
- isEphemeral: boolean;
721
- isForwarded: boolean;
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;
735
- channelId: string;
736
- uniqueId: string;
737
- receiverId: string;
738
- receiverName: string;
739
- roomId: string;
740
- roomName: string;
741
- senderLid: string;
742
- senderId: string;
743
- senderName: string;
744
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
746
- timestamp: number;
747
- mentions: string[];
748
- links: string[];
749
- isPrefix: boolean;
750
- isSpam: boolean;
751
- isFromMe: boolean;
752
- isTagMe: boolean;
753
- isGroup: boolean;
754
- isStory: boolean;
755
- isViewOnce: boolean;
756
- isEdited: boolean;
757
- isDeleted: boolean;
758
- isPinned: boolean;
759
- isUnPinned: boolean;
760
- isChannel: boolean;
761
- isBroadcast: boolean;
762
- isEphemeral: boolean;
763
- isForwarded: boolean;
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;
774
- channelId: string;
775
- uniqueId: string;
776
- receiverId: string;
777
- receiverName: string;
778
- roomId: string;
779
- roomName: string;
780
- senderLid: string;
781
- senderId: string;
782
- senderName: string;
783
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
785
- timestamp: number;
786
- mentions: string[];
787
- links: string[];
788
- isPrefix: boolean;
789
- isSpam: boolean;
790
- isFromMe: boolean;
791
- isTagMe: boolean;
792
- isGroup: boolean;
793
- isStory: boolean;
794
- isViewOnce: boolean;
795
- isEdited: boolean;
796
- isDeleted: boolean;
797
- isPinned: boolean;
798
- isUnPinned: boolean;
799
- isChannel: boolean;
800
- isBroadcast: boolean;
801
- isEphemeral: boolean;
802
- isForwarded: boolean;
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;
816
- channelId: string;
817
- uniqueId: string;
818
- receiverId: string;
819
- receiverName: string;
820
- roomId: string;
821
- roomName: string;
822
- senderLid: string;
823
- senderId: string;
824
- senderName: string;
825
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
827
- timestamp: number;
828
- mentions: string[];
829
- links: string[];
830
- isPrefix: boolean;
831
- isSpam: boolean;
832
- isFromMe: boolean;
833
- isTagMe: boolean;
834
- isGroup: boolean;
835
- isStory: boolean;
836
- isViewOnce: boolean;
837
- isEdited: boolean;
838
- isDeleted: boolean;
839
- isPinned: boolean;
840
- isUnPinned: boolean;
841
- isChannel: boolean;
842
- isBroadcast: boolean;
843
- isEphemeral: boolean;
844
- isForwarded: boolean;
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;
855
- channelId: string;
856
- uniqueId: string;
857
- receiverId: string;
858
- receiverName: string;
859
- roomId: string;
860
- roomName: string;
861
- senderLid: string;
862
- senderId: string;
863
- senderName: string;
864
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
866
- timestamp: number;
867
- mentions: string[];
868
- links: string[];
869
- isPrefix: boolean;
870
- isSpam: boolean;
871
- isFromMe: boolean;
872
- isTagMe: boolean;
873
- isGroup: boolean;
874
- isStory: boolean;
875
- isViewOnce: boolean;
876
- isEdited: boolean;
877
- isDeleted: boolean;
878
- isPinned: boolean;
879
- isUnPinned: boolean;
880
- isChannel: boolean;
881
- isBroadcast: boolean;
882
- isEphemeral: boolean;
883
- isForwarded: boolean;
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;
897
- channelId: string;
898
- uniqueId: string;
899
- receiverId: string;
900
- receiverName: string;
901
- roomId: string;
902
- roomName: string;
903
- senderLid: string;
904
- senderId: string;
905
- senderName: string;
906
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
908
- timestamp: number;
909
- mentions: string[];
910
- links: string[];
911
- isPrefix: boolean;
912
- isSpam: boolean;
913
- isFromMe: boolean;
914
- isTagMe: boolean;
915
- isGroup: boolean;
916
- isStory: boolean;
917
- isViewOnce: boolean;
918
- isEdited: boolean;
919
- isDeleted: boolean;
920
- isPinned: boolean;
921
- isUnPinned: boolean;
922
- isChannel: boolean;
923
- isBroadcast: boolean;
924
- isEphemeral: boolean;
925
- isForwarded: boolean;
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;
936
- channelId: string;
937
- uniqueId: string;
938
- receiverId: string;
939
- receiverName: string;
940
- roomId: string;
941
- roomName: string;
942
- senderLid: string;
943
- senderId: string;
944
- senderName: string;
945
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
947
- timestamp: number;
948
- mentions: string[];
949
- links: string[];
950
- isPrefix: boolean;
951
- isSpam: boolean;
952
- isFromMe: boolean;
953
- isTagMe: boolean;
954
- isGroup: boolean;
955
- isStory: boolean;
956
- isViewOnce: boolean;
957
- isEdited: boolean;
958
- isDeleted: boolean;
959
- isPinned: boolean;
960
- isUnPinned: boolean;
961
- isChannel: boolean;
962
- isBroadcast: boolean;
963
- isEphemeral: boolean;
964
- isForwarded: boolean;
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;
978
- channelId: string;
979
- uniqueId: string;
980
- receiverId: string;
981
- receiverName: string;
982
- roomId: string;
983
- roomName: string;
984
- senderLid: string;
985
- senderId: string;
986
- senderName: string;
987
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
989
- timestamp: number;
990
- mentions: string[];
991
- links: string[];
992
- isPrefix: boolean;
993
- isSpam: boolean;
994
- isFromMe: boolean;
995
- isTagMe: boolean;
996
- isGroup: boolean;
997
- isStory: boolean;
998
- isViewOnce: boolean;
999
- isEdited: boolean;
1000
- isDeleted: boolean;
1001
- isPinned: boolean;
1002
- isUnPinned: boolean;
1003
- isChannel: boolean;
1004
- isBroadcast: boolean;
1005
- isEphemeral: boolean;
1006
- isForwarded: boolean;
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;
1017
- channelId: string;
1018
- uniqueId: string;
1019
- receiverId: string;
1020
- receiverName: string;
1021
- roomId: string;
1022
- roomName: string;
1023
- senderLid: string;
1024
- senderId: string;
1025
- senderName: string;
1026
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
1028
- timestamp: number;
1029
- mentions: string[];
1030
- links: string[];
1031
- isPrefix: boolean;
1032
- isSpam: boolean;
1033
- isFromMe: boolean;
1034
- isTagMe: boolean;
1035
- isGroup: boolean;
1036
- isStory: boolean;
1037
- isViewOnce: boolean;
1038
- isEdited: boolean;
1039
- isDeleted: boolean;
1040
- isPinned: boolean;
1041
- isUnPinned: boolean;
1042
- isChannel: boolean;
1043
- isBroadcast: boolean;
1044
- isEphemeral: boolean;
1045
- isForwarded: boolean;
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;
1061
- channelId: string;
1062
- uniqueId: string;
1063
- receiverId: string;
1064
- receiverName: string;
1065
- roomId: string;
1066
- roomName: string;
1067
- senderLid: string;
1068
- senderId: string;
1069
- senderName: string;
1070
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
1072
- timestamp: number;
1073
- mentions: string[];
1074
- links: string[];
1075
- isPrefix: boolean;
1076
- isSpam: boolean;
1077
- isFromMe: boolean;
1078
- isTagMe: boolean;
1079
- isGroup: boolean;
1080
- isStory: boolean;
1081
- isViewOnce: boolean;
1082
- isEdited: boolean;
1083
- isDeleted: boolean;
1084
- isPinned: boolean;
1085
- isUnPinned: boolean;
1086
- isChannel: boolean;
1087
- isBroadcast: boolean;
1088
- isEphemeral: boolean;
1089
- isForwarded: boolean;
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;
1100
- channelId: string;
1101
- uniqueId: string;
1102
- receiverId: string;
1103
- receiverName: string;
1104
- roomId: string;
1105
- roomName: string;
1106
- senderLid: string;
1107
- senderId: string;
1108
- senderName: string;
1109
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
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";
1111
- timestamp: number;
1112
- mentions: string[];
1113
- links: string[];
1114
- isPrefix: boolean;
1115
- isSpam: boolean;
1116
- isFromMe: boolean;
1117
- isTagMe: boolean;
1118
- isGroup: boolean;
1119
- isStory: boolean;
1120
- isViewOnce: boolean;
1121
- isEdited: boolean;
1122
- isDeleted: boolean;
1123
- isPinned: boolean;
1124
- isUnPinned: boolean;
1125
- isChannel: boolean;
1126
- isBroadcast: boolean;
1127
- isEphemeral: boolean;
1128
- isForwarded: boolean;
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
- };
1204
- }
1205
-
1206
- declare class Client {
1207
- props: ExtractZod<typeof ClientOptionsType>;
1208
- db: JsonDBInterface;
1209
- private logger;
1210
- private events;
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>);
1219
- initialize(): Promise<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;
1226
- }
1227
- interface Client extends Relay {
1228
- }
1229
-
1230
- export { CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type EventCallbackType, EventEnumType, FakeReplyType, JsonDB, type JsonDBInterface, LimiterType, PluginsType };