zaileys 1.1.39 → 1.1.40-tx.0

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,143 +1,62 @@
1
- import * as nanospinner from 'nanospinner';
2
- import * as baileys from 'baileys';
3
- import baileys__default, { proto, 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';
1
+ import { AuthenticationState } from "baileys";
2
+ import z$1, { z } from "zod";
9
3
 
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
- declare class JsonDB implements JsonDBInterface {
24
- private session;
25
- private db;
26
- private storeDir;
27
- initialize(session: string): Promise<void>;
28
- private tryRecoverRaw;
29
- private chunks;
30
- private writeChunks;
31
- store(key: string): Store;
32
- upsert(id: string, value: unknown): Promise<void>;
33
- read(id: string): Promise<any>;
34
- remove(id: string): Promise<void>;
35
- clear(): Promise<void>;
36
- delete(): Promise<void>;
37
- }
38
-
39
- declare const ExtractorCallsType: z.ZodObject<{
40
- callId: z.ZodString;
41
- roomId: z.ZodString;
42
- callerId: z.ZodString;
43
- date: z.ZodDate;
44
- offline: z.ZodBoolean;
45
- status: z.ZodEnum<{
46
- accept: "accept";
47
- offer: "offer";
48
- reject: "reject";
49
- ringing: "ringing";
50
- terminate: "terminate";
51
- timeout: "timeout";
52
- }>;
53
- isVideo: z.ZodBoolean;
54
- isGroup: z.ZodBoolean;
55
- }, z.core.$strip>;
56
-
57
- declare const ExtractorConnectionType: z.ZodObject<{
58
- status: z.ZodEnum<{
59
- connecting: "connecting";
60
- open: "open";
61
- close: "close";
62
- }>;
63
- }, z.core.$strip>;
64
-
65
- declare const MessagesMediaType: {
66
- readonly text: "text";
67
- readonly conversation: "text";
68
- readonly imageMessage: "image";
69
- readonly contactMessage: "contact";
70
- readonly locationMessage: "location";
71
- readonly documentMessage: "document";
72
- readonly audioMessage: "audio";
73
- readonly videoMessage: "video";
74
- readonly protocolMessage: "protocol";
75
- readonly contactsArrayMessage: "contacts";
76
- readonly highlyStructuredMessage: "highlyStructured";
77
- readonly sendPaymentMessage: "sendPayment";
78
- readonly liveLocationMessage: "location";
79
- readonly requestPaymentMessage: "requestPayment";
80
- readonly declinePaymentRequestMessage: "declinePaymentRequest";
81
- readonly cancelPaymentRequestMessage: "cancelPaymentRequest";
82
- readonly templateMessage: "template";
83
- readonly stickerMessage: "sticker";
84
- readonly groupInviteMessage: "groupInvite";
85
- readonly templateButtonReplyMessage: "buttons";
86
- readonly productMessage: "product";
87
- readonly deviceSentMessage: "deviceSent";
88
- readonly listMessage: "list";
89
- readonly viewOnceMessage: "viewOnce";
90
- readonly orderMessage: "order";
91
- readonly listResponseMessage: "list";
92
- readonly ephemeralMessage: "ephemeral";
93
- readonly invoiceMessage: "invoice";
94
- readonly buttonsMessage: "buttons";
95
- readonly buttonsResponseMessage: "buttons";
96
- readonly paymentInviteMessage: "paymentInvite";
97
- readonly interactiveMessage: "interactive";
98
- readonly reactionMessage: "reaction";
99
- readonly stickerSyncRmrMessage: "sticker";
100
- readonly interactiveResponseMessage: "interactiveResponse";
101
- readonly pollCreationMessage: "pollCreation";
102
- readonly pollUpdateMessage: "pollUpdate";
103
- readonly keepInChatMessage: "keepInChat";
104
- readonly documentWithCaptionMessage: "document";
105
- readonly requestPhoneNumberMessage: "requestPhoneNumber";
106
- readonly viewOnceMessageV2: "viewOnce";
107
- readonly encReactionMessage: "reaction";
108
- readonly editedMessage: "text";
109
- readonly viewOnceMessageV2Extension: "viewOnce";
110
- readonly pollCreationMessageV2: "pollCreation";
111
- readonly scheduledCallCreationMessage: "scheduledCallCreation";
112
- readonly groupMentionedMessage: "groupMentioned";
113
- readonly pinInChatMessage: "pinInChat";
114
- readonly pollCreationMessageV3: "pollCreation";
115
- readonly scheduledCallEditMessage: "scheduledCallEdit";
116
- readonly ptvMessage: "ptv";
117
- readonly botInvokeMessage: "botInvoke";
118
- readonly callLogMesssage: "callLog";
119
- readonly encCommentMessage: "encComment";
120
- readonly bcallMessage: "bcall";
121
- readonly lottieStickerMessage: "lottieSticker";
122
- readonly eventMessage: "event";
123
- readonly commentMessage: "comment";
124
- readonly newsletterAdminInviteMessage: "text";
125
- readonly extendedTextMessageWithParentKey: "text";
126
- readonly extendedTextMessage: "text";
127
- readonly placeholderMessage: "placeholder";
128
- readonly encEventUpdateMessage: "encEventUpdate";
129
- };
130
- declare const MessagesVerifiedPlatformType: {
131
- readonly whatsapp: "0@s.whatsapp.net";
132
- readonly meta: "13135550002@s.whatsapp.net";
133
- readonly chatgpt: "18002428478@s.whatsapp.net";
134
- readonly copilot: "18772241042@s.whatsapp.net";
135
- readonly instagram: "447723442971@s.whatsapp.net";
136
- readonly tiktok: "6285574670498@s.whatsapp.net";
137
- };
138
- declare const MessagesEnumType: z$1.ZodEnum<{
139
- contacts: "contacts";
140
- event: "event";
4
+ //#region src/Auth/state.d.ts
5
+ declare const useAuthState: (folder: string) => Promise<{
6
+ state: AuthenticationState;
7
+ saveCreds: () => Promise<void>;
8
+ }>;
9
+ //#endregion
10
+ //#region src/Types/calls.d.ts
11
+ declare const ListenerCallsType: z$1.ZodObject<{
12
+ callId: z$1.ZodString;
13
+ roomId: z$1.ZodString;
14
+ callerId: z$1.ZodString;
15
+ date: z$1.ZodDate;
16
+ offline: z$1.ZodBoolean;
17
+ status: z$1.ZodEnum<{
18
+ accept: "accept";
19
+ offer: "offer";
20
+ reject: "reject";
21
+ ringing: "ringing";
22
+ terminate: "terminate";
23
+ timeout: "timeout";
24
+ }>;
25
+ isVideo: z$1.ZodBoolean;
26
+ isGroup: z$1.ZodBoolean;
27
+ }, z$1.core.$strip>;
28
+ //#endregion
29
+ //#region src/Types/connection.d.ts
30
+ declare const ListenerConnectionType: z$1.ZodObject<{
31
+ status: z$1.ZodEnum<{
32
+ connecting: "connecting";
33
+ open: "open";
34
+ close: "close";
35
+ reload: "reload";
36
+ syncing: "syncing";
37
+ }>;
38
+ authType: z$1.ZodEnum<{
39
+ pairing: "pairing";
40
+ qr: "qr";
41
+ }>;
42
+ authTimeout: z$1.ZodOptional<z$1.ZodNumber>;
43
+ syncProgress: z$1.ZodOptional<z$1.ZodNumber>;
44
+ syncCompleted: z$1.ZodOptional<z$1.ZodDefault<z$1.ZodBoolean>>;
45
+ qr: z$1.ZodOptional<z$1.ZodString>;
46
+ code: z$1.ZodOptional<z$1.ZodString>;
47
+ }, z$1.core.$strip>;
48
+ //#endregion
49
+ //#region src/Types/messages.d.ts
50
+
51
+ declare const ListenerMessagesType: z$1.ZodObject<{
52
+ channelId: z$1.ZodString;
53
+ uniqueId: z$1.ZodString;
54
+ chatId: z$1.ZodString;
55
+ chatAddress: z$1.ZodEnum<{
56
+ pn: "pn";
57
+ lid: "lid";
58
+ }>;
59
+ chatType: z$1.ZodEnum<{
141
60
  text: "text";
142
61
  image: "image";
143
62
  contact: "contact";
@@ -146,6 +65,7 @@ declare const MessagesEnumType: z$1.ZodEnum<{
146
65
  audio: "audio";
147
66
  video: "video";
148
67
  protocol: "protocol";
68
+ contacts: "contacts";
149
69
  highlyStructured: "highlyStructured";
150
70
  sendPayment: "sendPayment";
151
71
  requestPayment: "requestPayment";
@@ -154,7 +74,6 @@ declare const MessagesEnumType: z$1.ZodEnum<{
154
74
  template: "template";
155
75
  sticker: "sticker";
156
76
  groupInvite: "groupInvite";
157
- buttons: "buttons";
158
77
  product: "product";
159
78
  deviceSent: "deviceSent";
160
79
  list: "list";
@@ -162,6 +81,7 @@ declare const MessagesEnumType: z$1.ZodEnum<{
162
81
  order: "order";
163
82
  ephemeral: "ephemeral";
164
83
  invoice: "invoice";
84
+ buttons: "buttons";
165
85
  paymentInvite: "paymentInvite";
166
86
  interactive: "interactive";
167
87
  reaction: "reaction";
@@ -180,1268 +100,182 @@ declare const MessagesEnumType: z$1.ZodEnum<{
180
100
  encComment: "encComment";
181
101
  bcall: "bcall";
182
102
  lottieSticker: "lottieSticker";
103
+ event: "event";
183
104
  comment: "comment";
184
105
  placeholder: "placeholder";
185
106
  encEventUpdate: "encEventUpdate";
186
- }>;
187
- declare const MessagesDeviceEnumType: z$1.ZodEnum<{
107
+ }>;
108
+ receiverId: z$1.ZodString;
109
+ receiverName: z$1.ZodString;
110
+ roomId: z$1.ZodString;
111
+ roomName: z$1.ZodString;
112
+ senderLid: z$1.ZodString;
113
+ senderId: z$1.ZodString;
114
+ senderName: z$1.ZodString;
115
+ senderDevice: z$1.ZodEnum<{
188
116
  unknown: "unknown";
189
117
  android: "android";
190
118
  ios: "ios";
191
119
  desktop: "desktop";
192
120
  web: "web";
193
- }>;
194
- declare const ExtractorMessagesType: z$1.ZodObject<{
195
- chatId: z$1.ZodString;
196
- channelId: z$1.ZodString;
197
- uniqueId: z$1.ZodString;
198
- receiverId: z$1.ZodString;
199
- receiverName: z$1.ZodString;
200
- roomId: z$1.ZodString;
201
- roomName: z$1.ZodString;
202
- senderLid: z$1.ZodString;
203
- senderId: z$1.ZodString;
204
- senderName: z$1.ZodString;
205
- senderDevice: z$1.ZodEnum<{
206
- unknown: "unknown";
207
- android: "android";
208
- ios: "ios";
209
- desktop: "desktop";
210
- web: "web";
211
- }>;
212
- chatType: z$1.ZodEnum<{
213
- contacts: "contacts";
214
- event: "event";
215
- text: "text";
216
- image: "image";
217
- contact: "contact";
218
- location: "location";
219
- document: "document";
220
- audio: "audio";
221
- video: "video";
222
- protocol: "protocol";
223
- highlyStructured: "highlyStructured";
224
- sendPayment: "sendPayment";
225
- requestPayment: "requestPayment";
226
- declinePaymentRequest: "declinePaymentRequest";
227
- cancelPaymentRequest: "cancelPaymentRequest";
228
- template: "template";
229
- sticker: "sticker";
230
- groupInvite: "groupInvite";
231
- buttons: "buttons";
232
- product: "product";
233
- deviceSent: "deviceSent";
234
- list: "list";
235
- viewOnce: "viewOnce";
236
- order: "order";
237
- ephemeral: "ephemeral";
238
- invoice: "invoice";
239
- paymentInvite: "paymentInvite";
240
- interactive: "interactive";
241
- reaction: "reaction";
242
- interactiveResponse: "interactiveResponse";
243
- pollCreation: "pollCreation";
244
- pollUpdate: "pollUpdate";
245
- keepInChat: "keepInChat";
246
- requestPhoneNumber: "requestPhoneNumber";
247
- scheduledCallCreation: "scheduledCallCreation";
248
- groupMentioned: "groupMentioned";
249
- pinInChat: "pinInChat";
250
- scheduledCallEdit: "scheduledCallEdit";
251
- ptv: "ptv";
252
- botInvoke: "botInvoke";
253
- callLog: "callLog";
254
- encComment: "encComment";
255
- bcall: "bcall";
256
- lottieSticker: "lottieSticker";
257
- comment: "comment";
258
- placeholder: "placeholder";
259
- encEventUpdate: "encEventUpdate";
260
- }>;
261
- timestamp: z$1.ZodNumber;
262
- text: z$1.ZodNullable<z$1.ZodString>;
263
- mentions: z$1.ZodArray<z$1.ZodString>;
264
- links: z$1.ZodArray<z$1.ZodString>;
265
- isPrefix: z$1.ZodBoolean;
266
- isSpam: z$1.ZodBoolean;
267
- isFromMe: z$1.ZodBoolean;
268
- isTagMe: z$1.ZodBoolean;
269
- isGroup: z$1.ZodBoolean;
270
- isStory: z$1.ZodBoolean;
271
- isViewOnce: z$1.ZodBoolean;
272
- isEdited: z$1.ZodBoolean;
273
- isDeleted: z$1.ZodBoolean;
274
- isPinned: z$1.ZodBoolean;
275
- isUnPinned: z$1.ZodBoolean;
276
- isChannel: z$1.ZodBoolean;
277
- isBroadcast: z$1.ZodBoolean;
278
- isEphemeral: z$1.ZodBoolean;
279
- isForwarded: z$1.ZodBoolean;
280
- citation: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodBoolean>>;
281
- media: z$1.ZodNullable<z$1.ZodObject<{
282
- buffer: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
283
- stream: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
284
- }, z$1.core.$loose>>;
285
- message: z$1.ZodFunction<z$1.ZodTuple<readonly [], null>, z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
286
- replied: z$1.ZodNullable<z$1.ZodObject</*elided*/ any, z$1.core.$strip>>;
121
+ }>;
122
+ timestamp: z$1.ZodNumber;
123
+ text: z$1.ZodNullable<z$1.ZodString>;
124
+ mentions: z$1.ZodArray<z$1.ZodString>;
125
+ links: z$1.ZodArray<z$1.ZodString>;
126
+ isPrefix: z$1.ZodBoolean;
127
+ isSpam: z$1.ZodBoolean;
128
+ isFromMe: z$1.ZodBoolean;
129
+ isTagMe: z$1.ZodBoolean;
130
+ isGroup: z$1.ZodBoolean;
131
+ isNewsletter: z$1.ZodBoolean;
132
+ isStory: z$1.ZodBoolean;
133
+ isViewOnce: z$1.ZodBoolean;
134
+ isEdited: z$1.ZodBoolean;
135
+ isDeleted: z$1.ZodBoolean;
136
+ isPinned: z$1.ZodBoolean;
137
+ isUnPinned: z$1.ZodBoolean;
138
+ isBroadcast: z$1.ZodBoolean;
139
+ isEphemeral: z$1.ZodBoolean;
140
+ isForwarded: z$1.ZodBoolean;
141
+ citation: z$1.ZodNullable<z$1.ZodRecord<z$1.ZodString, z$1.ZodBoolean>>;
142
+ media: z$1.ZodNullable<z$1.ZodObject<{
143
+ buffer: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
144
+ stream: z$1.ZodFunction<z$1.core.$ZodFunctionArgs, z$1.core.$ZodFunctionOut>;
145
+ }, z$1.core.$loose>>;
146
+ message: z$1.ZodFunction<z$1.ZodTuple<readonly [], null>, z$1.ZodRecord<z$1.ZodString, z$1.ZodAny>>;
147
+ replied: z$1.ZodNullable<z$1.ZodObject< /*elided*/any, z$1.core.$strip>>;
287
148
  }, z$1.core.$strip>;
288
-
289
- type ExtractZod<T> = T extends z.ZodTypeAny ? z.infer<T> : never;
290
- declare const defaultBoolean: (state: boolean) => z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
291
- declare const defaultString: (state: string) => z.ZodOptional<z.ZodDefault<z.ZodString>>;
292
- declare const AdsReplyType: z.ZodCustom<proto.ContextInfo.IExternalAdReplyInfo, proto.ContextInfo.IExternalAdReplyInfo>;
293
-
294
- declare const PluginsType: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
295
- necessary: z$2.ZodString;
296
- }, z$2.core.$loose>>>;
297
- declare const LimiterType: z$2.ZodOptional<z$2.ZodObject<{
298
- durationMs: z$2.ZodNumber;
299
- maxMessages: z$2.ZodNumber;
300
- }, z$2.core.$strip>>;
301
- declare const CitationType: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
302
- declare const FakeReplyType: z$2.ZodOptional<z$2.ZodObject<{
303
- provider: z$2.ZodEnum<{
304
- whatsapp: "whatsapp";
305
- meta: "meta";
306
- chatgpt: "chatgpt";
307
- copilot: "copilot";
308
- instagram: "instagram";
309
- tiktok: "tiktok";
310
- }>;
311
- }, z$2.core.$strip>>;
312
- declare const ClientBaseType: z$2.ZodObject<{
313
- session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
314
- prefix: z$2.ZodOptional<z$2.ZodString>;
315
- ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
316
- showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
317
- autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
318
- autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
319
- autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
320
- autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
321
- autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
322
- plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
323
- necessary: z$2.ZodString;
324
- }, z$2.core.$loose>>>;
325
- limiter: z$2.ZodOptional<z$2.ZodObject<{
326
- durationMs: z$2.ZodNumber;
327
- maxMessages: z$2.ZodNumber;
328
- }, z$2.core.$strip>>;
329
- citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
330
- fakeReply: z$2.ZodOptional<z$2.ZodObject<{
331
- provider: z$2.ZodEnum<{
332
- whatsapp: "whatsapp";
333
- meta: "meta";
334
- chatgpt: "chatgpt";
335
- copilot: "copilot";
336
- instagram: "instagram";
337
- tiktok: "tiktok";
338
- }>;
339
- }, z$2.core.$strip>>;
340
- }, z$2.core.$strip>;
341
- declare const ClientAuthPairingType: z$2.ZodObject<{
342
- authType: z$2.ZodLiteral<"pairing">;
343
- phoneNumber: z$2.ZodNumber;
344
- }, z$2.core.$strip>;
345
- declare const ClientAuthQRType: z$2.ZodObject<{
346
- authType: z$2.ZodLiteral<"qr">;
347
- }, z$2.core.$strip>;
348
- declare const ClientOptionsType: z$2.ZodDiscriminatedUnion<[z$2.ZodObject<{
349
- authType: z$2.ZodLiteral<"pairing">;
350
- phoneNumber: z$2.ZodNumber;
351
- session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
352
- prefix: z$2.ZodOptional<z$2.ZodString>;
353
- ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
354
- showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
355
- autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
356
- autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
357
- autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
358
- autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
359
- autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
360
- plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
361
- necessary: z$2.ZodString;
362
- }, z$2.core.$loose>>>;
363
- limiter: z$2.ZodOptional<z$2.ZodObject<{
364
- durationMs: z$2.ZodNumber;
365
- maxMessages: z$2.ZodNumber;
366
- }, z$2.core.$strip>>;
367
- citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
368
- fakeReply: z$2.ZodOptional<z$2.ZodObject<{
369
- provider: z$2.ZodEnum<{
370
- whatsapp: "whatsapp";
371
- meta: "meta";
372
- chatgpt: "chatgpt";
373
- copilot: "copilot";
374
- instagram: "instagram";
375
- tiktok: "tiktok";
376
- }>;
377
- }, z$2.core.$strip>>;
378
- }, z$2.core.$strip>, z$2.ZodObject<{
379
- authType: z$2.ZodLiteral<"qr">;
380
- session: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodString>>;
381
- prefix: z$2.ZodOptional<z$2.ZodString>;
382
- ignoreMe: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
383
- showLogs: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
384
- autoMentions: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
385
- autoOnline: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
386
- autoRead: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
387
- autoPresence: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
388
- autoRejectCall: z$2.ZodOptional<z$2.ZodDefault<z$2.ZodBoolean>>;
389
- plugins: z$2.ZodOptional<z$2.ZodArray<z$2.ZodObject<{
390
- necessary: z$2.ZodString;
391
- }, z$2.core.$loose>>>;
392
- limiter: z$2.ZodOptional<z$2.ZodObject<{
393
- durationMs: z$2.ZodNumber;
394
- maxMessages: z$2.ZodNumber;
395
- }, z$2.core.$strip>>;
396
- citation: z$2.ZodOptional<z$2.ZodRecord<z$2.ZodString & z$2.core.$partial, z$2.ZodArray<z$2.ZodNumber>>>;
397
- fakeReply: z$2.ZodOptional<z$2.ZodObject<{
398
- provider: z$2.ZodEnum<{
399
- whatsapp: "whatsapp";
400
- meta: "meta";
401
- chatgpt: "chatgpt";
402
- copilot: "copilot";
403
- instagram: "instagram";
404
- tiktok: "tiktok";
405
- }>;
406
- }, z$2.core.$strip>>;
407
- }, z$2.core.$strip>], "authType">;
408
- declare const EventEnumType: z$2.ZodEnum<{
409
- connection: "connection";
410
- messages: "messages";
411
- calls: "calls";
412
- webhooks: "webhooks";
149
+ //#endregion
150
+ //#region src/Types/client.d.ts
151
+ declare const ClientOptionsType: z.ZodUnion<readonly [z.ZodObject<{
152
+ authType: z.ZodLiteral<"pairing">;
153
+ phoneNumber: z.ZodNumber;
154
+ session: z.ZodOptional<z.ZodDefault<z.ZodString>>;
155
+ prefix: z.ZodOptional<z.ZodString>;
156
+ ignoreMe: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
157
+ showLogs: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
158
+ syncFullHistory: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
159
+ autoMentions: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
160
+ autoOnline: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
161
+ autoRead: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
162
+ autoPresence: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
163
+ autoRejectCall: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
164
+ }, z.core.$strip>, z.ZodObject<{
165
+ authType: z.ZodLiteral<"qr">;
166
+ session: z.ZodOptional<z.ZodDefault<z.ZodString>>;
167
+ prefix: z.ZodOptional<z.ZodString>;
168
+ ignoreMe: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
169
+ showLogs: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
170
+ syncFullHistory: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
171
+ autoMentions: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
172
+ autoOnline: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
173
+ autoRead: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
174
+ autoPresence: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
175
+ autoRejectCall: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
176
+ }, z.core.$strip>]>;
177
+ declare const EventEnumType: z.ZodEnum<{
178
+ connection: "connection";
179
+ messages: "messages";
180
+ calls: "calls";
413
181
  }>;
414
182
  type EventCallbackType = {
415
- connection: (ctx: ExtractZod<typeof ExtractorConnectionType>) => void;
416
- messages: (ctx: ExtractZod<typeof ExtractorMessagesType>) => void;
417
- calls: (ctx: ExtractZod<typeof ExtractorCallsType>) => void;
418
- webhooks: (ctx: ExtractZod<typeof EventEnumType>) => void;
183
+ connection: (ctx: z.infer<typeof ListenerConnectionType>) => void;
184
+ messages: (ctx: z.infer<typeof ListenerMessagesType>) => void;
185
+ calls: (ctx: z.infer<typeof ListenerCallsType>) => void;
419
186
  };
420
-
421
- declare const RelayTextType: z.ZodUnion<[z.ZodString, z.ZodObject<{
422
- text: z.ZodString;
423
- roomId: z.ZodOptional<z.ZodString>;
424
- options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
425
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
426
- }, z.core.$strip>]>;
427
-
428
- declare const RelayReplyType: z.ZodUnion<[z.ZodString, z.ZodObject<{
429
- text: z.ZodString;
430
- roomId: z.ZodOptional<z.ZodString>;
431
- options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
432
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
433
- }, z.core.$strip>]>;
434
-
435
- declare const RelayForwardType: z.ZodUnion<[z.ZodString, z.ZodObject<{
436
- text: z.ZodString;
437
- isForwardMany: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
438
- roomId: z.ZodOptional<z.ZodString>;
439
- options: z.ZodOptional<z.ZodCustom<AnyMessageContent, AnyMessageContent>>;
440
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
441
- }, z.core.$strip>]>;
442
-
443
- declare const RelayImageEnumType: z.ZodEnum<{
444
- text: "text";
445
- reply: "reply";
446
- forward: "forward";
447
- }>;
448
- declare const RelayImageType: z.ZodObject<{
449
- image: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
450
- text: z.ZodOptional<z.ZodString>;
451
- viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
452
- roomId: z.ZodOptional<z.ZodString>;
453
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
454
- }, z.core.$strip>;
455
-
456
- declare const RelayVideoEnumType: z.ZodEnum<{
457
- text: "text";
458
- reply: "reply";
459
- forward: "forward";
460
- }>;
461
- declare const RelayVideoType: z.ZodObject<{
462
- video: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
463
- text: z.ZodOptional<z.ZodString>;
464
- viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
465
- roomId: z.ZodOptional<z.ZodString>;
466
- }, z.core.$strip>;
467
-
468
- declare const RelayAudioEnumType: z.ZodEnum<{
469
- text: "text";
470
- reply: "reply";
471
- forward: "forward";
472
- }>;
473
- declare const RelayAudioType: z.ZodObject<{
474
- audio: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
475
- viewOnce: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
476
- roomId: z.ZodOptional<z.ZodString>;
477
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
478
- }, z.core.$strip>;
479
-
480
- declare const RelayStickerEnumType: z.ZodEnum<{
481
- text: "text";
482
- reply: "reply";
483
- forward: "forward";
484
- }>;
485
- declare const RelayStickerType: z.ZodObject<{
486
- sticker: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
487
- roomId: z.ZodOptional<z.ZodString>;
488
- }, z.core.$strip>;
489
-
490
- declare const RelayEditType: z.ZodObject<{
491
- text: z.ZodString;
492
- message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
493
- }, z.core.$strip>;
494
-
495
- declare const RelayDeleteType: z.ZodObject<{
496
- message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
497
- }, z.core.$strip>;
498
-
499
- declare const RelayRejectType: zod.ZodObject<{
500
- callId: zod.ZodString;
501
- callerId: zod.ZodString;
502
- }, zod_v4_core.$strip>;
503
-
504
- declare const RelayPresenceType: z.ZodEnum<{
505
- offline: "offline";
506
- typing: "typing";
507
- recording: "recording";
508
- online: "online";
509
- paused: "paused";
510
- }>;
511
-
512
- declare const RelayReactionType: z.ZodUnion<[z.ZodEmoji, z.ZodObject<{
513
- emoticon: z.ZodEmoji;
514
- message: z.ZodOptional<z.ZodFunction<z.ZodTuple<readonly [], null>, z.ZodAny>>;
515
- }, z.core.$strip>]>;
516
-
517
- declare const RelayLocationEnumType: z.ZodEnum<{
518
- text: "text";
519
- reply: "reply";
520
- forward: "forward";
521
- }>;
522
- declare const RelayLocationType: z.ZodObject<{
523
- latitude: z.ZodNumber;
524
- longitude: z.ZodNumber;
525
- title: z.ZodOptional<z.ZodString>;
526
- footer: z.ZodOptional<z.ZodString>;
527
- roomId: z.ZodOptional<z.ZodString>;
528
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
529
- }, z.core.$strip>;
530
-
531
- declare const RelayContactEnumType: z.ZodEnum<{
532
- text: "text";
533
- reply: "reply";
534
- forward: "forward";
535
- }>;
536
- declare const RelayContactType: z.ZodObject<{
537
- title: z.ZodOptional<z.ZodString>;
538
- contacts: z.ZodArray<z.ZodObject<{
539
- fullname: z.ZodString;
540
- nickname: z.ZodOptional<z.ZodString>;
541
- organization: z.ZodOptional<z.ZodString>;
542
- phoneNumber: z.ZodNumber;
543
- website: z.ZodOptional<z.ZodURL>;
544
- }, z.core.$strip>>;
545
- roomId: z.ZodOptional<z.ZodString>;
546
- }, z.core.$strip>;
547
-
548
- declare const RelayPollEnumType: z.ZodEnum<{
549
- text: "text";
550
- reply: "reply";
551
- forward: "forward";
552
- }>;
553
- declare const RelayPollType: z.ZodDiscriminatedUnion<[z.ZodObject<{
554
- action: z.ZodLiteral<"create">;
555
- name: z.ZodString;
556
- answers: z.ZodArray<z.ZodString>;
557
- isMultiple: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
558
- roomId: z.ZodOptional<z.ZodString>;
559
- }, z.core.$strip>], "action">;
560
-
561
- declare const RelayDocumentEnumType: z.ZodEnum<{
562
- text: "text";
563
- reply: "reply";
564
- forward: "forward";
565
- }>;
566
- declare const RelayDocumentType: z.ZodObject<{
567
- document: z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>;
568
- mimetype: z.ZodString;
569
- text: z.ZodOptional<z.ZodString>;
570
- fileName: z.ZodOptional<z.ZodString>;
571
- roomId: z.ZodOptional<z.ZodString>;
572
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
573
- }, z.core.$strip>;
574
-
575
- declare const RelayButtonEnumType: z.ZodEnum<{
576
- text: "text";
577
- reply: "reply";
578
- forward: "forward";
579
- }>;
580
- declare const RelayButtonType: z.ZodDiscriminatedUnion<[z.ZodObject<{
581
- type: z.ZodLiteral<"simple">;
582
- text: z.ZodString;
583
- footer: z.ZodOptional<z.ZodString>;
584
- buttons: z.ZodArray<z.ZodObject<{
585
- id: z.ZodString;
586
- text: z.ZodString;
587
- }, z.core.$strip>>;
588
- roomId: z.ZodOptional<z.ZodString>;
589
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
590
- }, z.core.$strip>, z.ZodObject<{
591
- type: z.ZodLiteral<"interactive">;
592
- text: z.ZodString;
593
- footer: z.ZodOptional<z.ZodString>;
594
- buttons: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
595
- type: z.ZodLiteral<"quick_reply">;
596
- id: z.ZodString;
597
- text: z.ZodString;
598
- }, z.core.$strip>, z.ZodObject<{
599
- type: z.ZodLiteral<"cta_url">;
600
- id: z.ZodString;
601
- url: z.ZodURL;
602
- text: z.ZodString;
603
- }, z.core.$strip>, z.ZodObject<{
604
- type: z.ZodLiteral<"cta_copy">;
605
- id: z.ZodString;
606
- copy: z.ZodString;
607
- text: z.ZodString;
608
- }, z.core.$strip>, z.ZodObject<{
609
- type: z.ZodLiteral<"cta_call">;
610
- id: z.ZodString;
611
- phoneNumber: z.ZodString;
612
- text: z.ZodString;
613
- }, z.core.$strip>], "type">>;
614
- roomId: z.ZodOptional<z.ZodString>;
615
- externalAdReply: z.ZodOptional<z.ZodCustom<baileys.proto.ContextInfo.IExternalAdReplyInfo, baileys.proto.ContextInfo.IExternalAdReplyInfo>>;
616
- }, z.core.$strip>], "type">;
617
-
618
- declare const RelayGroupCreateType: z.ZodObject<{
619
- title: z.ZodString;
620
- members: z.ZodArray<z.ZodString>;
621
- }, z.core.$strip>;
622
-
623
- declare const RelayGroupActionType: z.ZodObject<{
624
- roomId: z.ZodString;
625
- action: z.ZodEnum<{
626
- add: "add";
627
- kick: "kick";
628
- promote: "promote";
629
- demote: "demote";
630
- }>;
631
- members: z.ZodArray<z.ZodString>;
632
- }, z.core.$strip>;
633
-
634
- declare const RelayGroupUpdateType: z.ZodObject<{
635
- roomId: z.ZodString;
636
- text: z.ZodString;
637
- action: z.ZodEnum<{
638
- subject: "subject";
639
- description: "description";
640
- }>;
641
- }, z.core.$strip>;
642
-
643
- declare const RelayGroupSettingsType: z.ZodObject<{
644
- roomId: z.ZodString;
645
- action: z.ZodEnum<{
646
- open: "open";
647
- close: "close";
648
- lock: "lock";
649
- unlock: "unlock";
650
- }>;
651
- }, z.core.$strip>;
652
-
653
- declare const RelayGroupLeaveType: z.ZodObject<{
654
- roomId: z.ZodString;
655
- }, z.core.$strip>;
656
-
657
- declare const RelayGroupLinksType: z.ZodObject<{
658
- roomId: z.ZodString;
659
- action: z.ZodEnum<{
660
- get: "get";
661
- revoke: "revoke";
662
- }>;
663
- }, z.core.$strip>;
664
-
665
- declare const RelayGroupInviteType: z.ZodObject<{
666
- url: z.ZodURL;
667
- action: z.ZodEnum<{
668
- join: "join";
669
- info: "info";
670
- }>;
671
- }, z.core.$strip>;
672
-
673
- declare const RelayGroupRequestsListType: z.ZodObject<{
674
- roomId: z.ZodString;
675
- }, z.core.$strip>;
676
- declare const RelayGroupRequestsApproveType: z.ZodObject<{
677
- roomId: z.ZodString;
678
- members: z.ZodArray<z.ZodString>;
679
- }, z.core.$strip>;
680
- declare const RelayGroupRequestsRejectType: z.ZodObject<{
681
- roomId: z.ZodString;
682
- members: z.ZodArray<z.ZodString>;
683
- }, z.core.$strip>;
684
-
685
- declare const RelayGroupMetadataType: z.ZodObject<{
686
- roomId: z.ZodString;
687
- }, z.core.$strip>;
688
-
689
- declare const RelayPrivacyUpdateType: z.ZodDiscriminatedUnion<[z.ZodObject<{
690
- action: z.ZodLiteral<"control">;
691
- type: z.ZodEnum<{
692
- block: "block";
693
- unblock: "unblock";
694
- }>;
695
- senderId: z.ZodString;
696
- }, z.core.$strip>, z.ZodObject<{
697
- action: z.ZodLiteral<"lastSeen">;
698
- type: z.ZodEnum<{
699
- contacts: "contacts";
700
- all: "all";
701
- contact_blacklist: "contact_blacklist";
702
- none: "none";
703
- }>;
704
- }, z.core.$strip>, z.ZodObject<{
705
- action: z.ZodLiteral<"online">;
706
- type: z.ZodEnum<{
707
- all: "all";
708
- match_last_seen: "match_last_seen";
709
- }>;
710
- }, z.core.$strip>, z.ZodObject<{
711
- action: z.ZodLiteral<"avatar">;
712
- type: z.ZodEnum<{
713
- contacts: "contacts";
714
- all: "all";
715
- contact_blacklist: "contact_blacklist";
716
- none: "none";
717
- }>;
718
- }, z.core.$strip>, z.ZodObject<{
719
- action: z.ZodLiteral<"story">;
720
- type: z.ZodEnum<{
721
- contacts: "contacts";
722
- all: "all";
723
- contact_blacklist: "contact_blacklist";
724
- none: "none";
725
- }>;
726
- }, z.core.$strip>, z.ZodObject<{
727
- action: z.ZodLiteral<"read">;
728
- type: z.ZodEnum<{
729
- all: "all";
730
- none: "none";
731
- }>;
732
- }, z.core.$strip>, z.ZodObject<{
733
- action: z.ZodLiteral<"groupsAdd">;
734
- type: z.ZodEnum<{
735
- contacts: "contacts";
736
- all: "all";
737
- contact_blacklist: "contact_blacklist";
738
- }>;
739
- }, z.core.$strip>, z.ZodObject<{
740
- action: z.ZodLiteral<"ephemeral">;
741
- type: z.ZodEnum<{
742
- remove: "remove";
743
- "24h": "24h";
744
- "7d": "7d";
745
- "90d": "90d";
746
- }>;
747
- }, z.core.$strip>], "action">;
748
-
749
- declare const RelayProfileBioType: z.ZodObject<{
750
- senderId: z.ZodString;
751
- }, z.core.$strip>;
752
-
753
- declare const RelayProfileUpdateType: z.ZodObject<{
754
- type: z.ZodEnum<{
755
- name: "name";
756
- avatar: "avatar";
757
- bio: "bio";
758
- }>;
759
- text: z.ZodOptional<z.ZodString>;
760
- roomId: z.ZodOptional<z.ZodString>;
761
- avatar: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>, z.ZodLiteral<"remove">]>;
762
- }, z.core.$strip>;
763
-
764
- declare const RelayProfileCheckType: z.ZodObject<{
765
- senderId: z.ZodString;
766
- }, z.core.$strip>;
767
-
768
- declare class Relay {
769
- private client;
770
- private message;
771
- db: JsonDBInterface;
772
- ctx: Client & {
773
- db: JsonDBInterface;
774
- };
775
- bind(client: Client, db: JsonDBInterface): void;
776
- private initial;
777
- text(props: ExtractZod<typeof RelayTextType>): Promise<{
778
- chatId: string;
779
- channelId: string;
780
- uniqueId: string;
781
- receiverId: string;
782
- receiverName: string;
783
- roomId: string;
784
- roomName: string;
785
- senderLid: string;
786
- senderId: string;
787
- senderName: string;
788
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
789
- 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";
790
- timestamp: number;
791
- mentions: string[];
792
- links: string[];
793
- isPrefix: boolean;
794
- isSpam: boolean;
795
- isFromMe: boolean;
796
- isTagMe: boolean;
797
- isGroup: boolean;
798
- isStory: boolean;
799
- isViewOnce: boolean;
800
- isEdited: boolean;
801
- isDeleted: boolean;
802
- isPinned: boolean;
803
- isUnPinned: boolean;
804
- isChannel: boolean;
805
- isBroadcast: boolean;
806
- isEphemeral: boolean;
807
- isForwarded: boolean;
808
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
809
- text?: string;
810
- citation?: Record<string, boolean>;
811
- media?: {
812
- [x: string]: unknown;
813
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
814
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
815
- };
816
- replied?: {
817
- chatId: string;
818
- channelId: string;
819
- uniqueId: string;
820
- receiverId: string;
821
- receiverName: string;
822
- roomId: string;
823
- roomName: string;
824
- senderLid: string;
825
- senderId: string;
826
- senderName: string;
827
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
828
- 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";
829
- timestamp: number;
830
- mentions: string[];
831
- links: string[];
832
- isPrefix: boolean;
833
- isSpam: boolean;
834
- isFromMe: boolean;
835
- isTagMe: boolean;
836
- isGroup: boolean;
837
- isStory: boolean;
838
- isViewOnce: boolean;
839
- isEdited: boolean;
840
- isDeleted: boolean;
841
- isPinned: boolean;
842
- isUnPinned: boolean;
843
- isChannel: boolean;
844
- isBroadcast: boolean;
845
- isEphemeral: boolean;
846
- isForwarded: boolean;
847
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
848
- text?: string;
849
- citation?: Record<string, boolean>;
850
- media?: {
851
- [x: string]: unknown;
852
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
853
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
854
- };
855
- replied?: /*elided*/ any;
856
- };
857
- }>;
858
- reply(props: ExtractZod<typeof RelayReplyType>): Promise<{
859
- chatId: string;
860
- channelId: string;
861
- uniqueId: string;
862
- receiverId: string;
863
- receiverName: string;
864
- roomId: string;
865
- roomName: string;
866
- senderLid: string;
867
- senderId: string;
868
- senderName: string;
869
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
870
- 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";
871
- timestamp: number;
872
- mentions: string[];
873
- links: string[];
874
- isPrefix: boolean;
875
- isSpam: boolean;
876
- isFromMe: boolean;
877
- isTagMe: boolean;
878
- isGroup: boolean;
879
- isStory: boolean;
880
- isViewOnce: boolean;
881
- isEdited: boolean;
882
- isDeleted: boolean;
883
- isPinned: boolean;
884
- isUnPinned: boolean;
885
- isChannel: boolean;
886
- isBroadcast: boolean;
887
- isEphemeral: boolean;
888
- isForwarded: boolean;
889
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
890
- text?: string;
891
- citation?: Record<string, boolean>;
892
- media?: {
893
- [x: string]: unknown;
894
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
895
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
896
- };
897
- replied?: {
898
- chatId: string;
899
- channelId: string;
900
- uniqueId: string;
901
- receiverId: string;
902
- receiverName: string;
903
- roomId: string;
904
- roomName: string;
905
- senderLid: string;
906
- senderId: string;
907
- senderName: string;
908
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
909
- 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";
910
- timestamp: number;
911
- mentions: string[];
912
- links: string[];
913
- isPrefix: boolean;
914
- isSpam: boolean;
915
- isFromMe: boolean;
916
- isTagMe: boolean;
917
- isGroup: boolean;
918
- isStory: boolean;
919
- isViewOnce: boolean;
920
- isEdited: boolean;
921
- isDeleted: boolean;
922
- isPinned: boolean;
923
- isUnPinned: boolean;
924
- isChannel: boolean;
925
- isBroadcast: boolean;
926
- isEphemeral: boolean;
927
- isForwarded: boolean;
928
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
929
- text?: string;
930
- citation?: Record<string, boolean>;
931
- media?: {
932
- [x: string]: unknown;
933
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
934
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
935
- };
936
- replied?: /*elided*/ any;
937
- };
938
- }>;
939
- forward(props: ExtractZod<typeof RelayForwardType>): Promise<{
940
- chatId: string;
941
- channelId: string;
942
- uniqueId: string;
943
- receiverId: string;
944
- receiverName: string;
945
- roomId: string;
946
- roomName: string;
947
- senderLid: string;
948
- senderId: string;
949
- senderName: string;
950
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
951
- 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";
952
- timestamp: number;
953
- mentions: string[];
954
- links: string[];
955
- isPrefix: boolean;
956
- isSpam: boolean;
957
- isFromMe: boolean;
958
- isTagMe: boolean;
959
- isGroup: boolean;
960
- isStory: boolean;
961
- isViewOnce: boolean;
962
- isEdited: boolean;
963
- isDeleted: boolean;
964
- isPinned: boolean;
965
- isUnPinned: boolean;
966
- isChannel: boolean;
967
- isBroadcast: boolean;
968
- isEphemeral: boolean;
969
- isForwarded: boolean;
970
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
971
- text?: string;
972
- citation?: Record<string, boolean>;
973
- media?: {
974
- [x: string]: unknown;
975
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
976
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
977
- };
978
- replied?: {
979
- chatId: string;
980
- channelId: string;
981
- uniqueId: string;
982
- receiverId: string;
983
- receiverName: string;
984
- roomId: string;
985
- roomName: string;
986
- senderLid: string;
987
- senderId: string;
988
- senderName: string;
989
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
990
- 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";
991
- timestamp: number;
992
- mentions: string[];
993
- links: string[];
994
- isPrefix: boolean;
995
- isSpam: boolean;
996
- isFromMe: boolean;
997
- isTagMe: boolean;
998
- isGroup: boolean;
999
- isStory: boolean;
1000
- isViewOnce: boolean;
1001
- isEdited: boolean;
1002
- isDeleted: boolean;
1003
- isPinned: boolean;
1004
- isUnPinned: boolean;
1005
- isChannel: boolean;
1006
- isBroadcast: boolean;
1007
- isEphemeral: boolean;
1008
- isForwarded: boolean;
1009
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1010
- text?: string;
1011
- citation?: Record<string, boolean>;
1012
- media?: {
1013
- [x: string]: unknown;
1014
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1015
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1016
- };
1017
- replied?: /*elided*/ any;
1018
- };
1019
- }>;
1020
- edit(props: ExtractZod<typeof RelayEditType>): Promise<{
1021
- chatId: string;
1022
- channelId: string;
1023
- uniqueId: string;
1024
- receiverId: string;
1025
- receiverName: string;
1026
- roomId: string;
1027
- roomName: string;
1028
- senderLid: string;
1029
- senderId: string;
1030
- senderName: string;
1031
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1032
- 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";
1033
- timestamp: number;
1034
- mentions: string[];
1035
- links: string[];
1036
- isPrefix: boolean;
1037
- isSpam: boolean;
1038
- isFromMe: boolean;
1039
- isTagMe: boolean;
1040
- isGroup: boolean;
1041
- isStory: boolean;
1042
- isViewOnce: boolean;
1043
- isEdited: boolean;
1044
- isDeleted: boolean;
1045
- isPinned: boolean;
1046
- isUnPinned: boolean;
1047
- isChannel: boolean;
1048
- isBroadcast: boolean;
1049
- isEphemeral: boolean;
1050
- isForwarded: boolean;
1051
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1052
- text?: string;
1053
- citation?: Record<string, boolean>;
1054
- media?: {
1055
- [x: string]: unknown;
1056
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1057
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1058
- };
1059
- replied?: {
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?: /*elided*/ any;
1099
- };
1100
- }>;
1101
- delete(props: ExtractZod<typeof RelayDeleteType>): Promise<{
1102
- chatId: string;
1103
- channelId: string;
1104
- uniqueId: string;
1105
- receiverId: string;
1106
- receiverName: string;
1107
- roomId: string;
1108
- roomName: string;
1109
- senderLid: string;
1110
- senderId: string;
1111
- senderName: string;
1112
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1113
- 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";
1114
- timestamp: number;
1115
- mentions: string[];
1116
- links: string[];
1117
- isPrefix: boolean;
1118
- isSpam: boolean;
1119
- isFromMe: boolean;
1120
- isTagMe: boolean;
1121
- isGroup: boolean;
1122
- isStory: boolean;
1123
- isViewOnce: boolean;
1124
- isEdited: boolean;
1125
- isDeleted: boolean;
1126
- isPinned: boolean;
1127
- isUnPinned: boolean;
1128
- isChannel: boolean;
1129
- isBroadcast: boolean;
1130
- isEphemeral: boolean;
1131
- isForwarded: boolean;
1132
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1133
- text?: string;
1134
- citation?: Record<string, boolean>;
1135
- media?: {
1136
- [x: string]: unknown;
1137
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1138
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1139
- };
1140
- replied?: {
1141
- chatId: string;
1142
- channelId: string;
1143
- uniqueId: string;
1144
- receiverId: string;
1145
- receiverName: string;
1146
- roomId: string;
1147
- roomName: string;
1148
- senderLid: string;
1149
- senderId: string;
1150
- senderName: string;
1151
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1152
- 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";
1153
- timestamp: number;
1154
- mentions: string[];
1155
- links: string[];
1156
- isPrefix: boolean;
1157
- isSpam: boolean;
1158
- isFromMe: boolean;
1159
- isTagMe: boolean;
1160
- isGroup: boolean;
1161
- isStory: boolean;
1162
- isViewOnce: boolean;
1163
- isEdited: boolean;
1164
- isDeleted: boolean;
1165
- isPinned: boolean;
1166
- isUnPinned: boolean;
1167
- isChannel: boolean;
1168
- isBroadcast: boolean;
1169
- isEphemeral: boolean;
1170
- isForwarded: boolean;
1171
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1172
- text?: string;
1173
- citation?: Record<string, boolean>;
1174
- media?: {
1175
- [x: string]: unknown;
1176
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1177
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1178
- };
1179
- replied?: /*elided*/ any;
1180
- };
1181
- }>;
1182
- reject(props: ExtractZod<typeof RelayRejectType>): Promise<void>;
1183
- presence(props: ExtractZod<typeof RelayPresenceType>): Promise<void>;
1184
- reaction(props: ExtractZod<typeof RelayReactionType>): Promise<{
1185
- chatId: string;
1186
- channelId: string;
1187
- uniqueId: string;
1188
- receiverId: string;
1189
- receiverName: string;
1190
- roomId: string;
1191
- roomName: string;
1192
- senderLid: string;
1193
- senderId: string;
1194
- senderName: string;
1195
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1196
- 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";
1197
- timestamp: number;
1198
- mentions: string[];
1199
- links: string[];
1200
- isPrefix: boolean;
1201
- isSpam: boolean;
1202
- isFromMe: boolean;
1203
- isTagMe: boolean;
1204
- isGroup: boolean;
1205
- isStory: boolean;
1206
- isViewOnce: boolean;
1207
- isEdited: boolean;
1208
- isDeleted: boolean;
1209
- isPinned: boolean;
1210
- isUnPinned: boolean;
1211
- isChannel: boolean;
1212
- isBroadcast: boolean;
1213
- isEphemeral: boolean;
1214
- isForwarded: boolean;
1215
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1216
- text?: string;
1217
- citation?: Record<string, boolean>;
1218
- media?: {
1219
- [x: string]: unknown;
1220
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1221
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1222
- };
1223
- replied?: {
1224
- chatId: string;
1225
- channelId: string;
1226
- uniqueId: string;
1227
- receiverId: string;
1228
- receiverName: string;
1229
- roomId: string;
1230
- roomName: string;
1231
- senderLid: string;
1232
- senderId: string;
1233
- senderName: string;
1234
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1235
- 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";
1236
- timestamp: number;
1237
- mentions: string[];
1238
- links: string[];
1239
- isPrefix: boolean;
1240
- isSpam: boolean;
1241
- isFromMe: boolean;
1242
- isTagMe: boolean;
1243
- isGroup: boolean;
1244
- isStory: boolean;
1245
- isViewOnce: boolean;
1246
- isEdited: boolean;
1247
- isDeleted: boolean;
1248
- isPinned: boolean;
1249
- isUnPinned: boolean;
1250
- isChannel: boolean;
1251
- isBroadcast: boolean;
1252
- isEphemeral: boolean;
1253
- isForwarded: boolean;
1254
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1255
- text?: string;
1256
- citation?: Record<string, boolean>;
1257
- media?: {
1258
- [x: string]: unknown;
1259
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1260
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1261
- };
1262
- replied?: /*elided*/ any;
1263
- };
1264
- }>;
1265
- document(type: ExtractZod<typeof RelayDocumentEnumType>, props: ExtractZod<typeof RelayDocumentType>): Promise<void>;
1266
- image(type: ExtractZod<typeof RelayImageEnumType>, props: ExtractZod<typeof RelayImageType>): Promise<{
1267
- chatId: string;
1268
- channelId: string;
1269
- uniqueId: string;
1270
- receiverId: string;
1271
- receiverName: string;
1272
- roomId: string;
1273
- roomName: string;
1274
- senderLid: string;
1275
- senderId: string;
1276
- senderName: string;
1277
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1278
- 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";
1279
- timestamp: number;
1280
- mentions: string[];
1281
- links: string[];
1282
- isPrefix: boolean;
1283
- isSpam: boolean;
1284
- isFromMe: boolean;
1285
- isTagMe: boolean;
1286
- isGroup: boolean;
1287
- isStory: boolean;
1288
- isViewOnce: boolean;
1289
- isEdited: boolean;
1290
- isDeleted: boolean;
1291
- isPinned: boolean;
1292
- isUnPinned: boolean;
1293
- isChannel: boolean;
1294
- isBroadcast: boolean;
1295
- isEphemeral: boolean;
1296
- isForwarded: boolean;
1297
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1298
- text?: string;
1299
- citation?: Record<string, boolean>;
1300
- media?: {
1301
- [x: string]: unknown;
1302
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1303
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1304
- };
1305
- replied?: {
1306
- chatId: string;
1307
- channelId: string;
1308
- uniqueId: string;
1309
- receiverId: string;
1310
- receiverName: string;
1311
- roomId: string;
1312
- roomName: string;
1313
- senderLid: string;
1314
- senderId: string;
1315
- senderName: string;
1316
- senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
1317
- 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";
1318
- timestamp: number;
1319
- mentions: string[];
1320
- links: string[];
1321
- isPrefix: boolean;
1322
- isSpam: boolean;
1323
- isFromMe: boolean;
1324
- isTagMe: boolean;
1325
- isGroup: boolean;
1326
- isStory: boolean;
1327
- isViewOnce: boolean;
1328
- isEdited: boolean;
1329
- isDeleted: boolean;
1330
- isPinned: boolean;
1331
- isUnPinned: boolean;
1332
- isChannel: boolean;
1333
- isBroadcast: boolean;
1334
- isEphemeral: boolean;
1335
- isForwarded: boolean;
1336
- message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
1337
- text?: string;
1338
- citation?: Record<string, boolean>;
1339
- media?: {
1340
- [x: string]: unknown;
1341
- buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1342
- stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
1343
- };
1344
- replied?: /*elided*/ any;
1345
- };
1346
- }>;
1347
- sticker(type: ExtractZod<typeof RelayStickerEnumType>, props: ExtractZod<typeof RelayStickerType>): Promise<void>;
1348
- video(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1349
- audio(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
1350
- voice(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
1351
- note(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1352
- gif(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
1353
- location(type: ExtractZod<typeof RelayLocationEnumType>, props: ExtractZod<typeof RelayLocationType>): Promise<void>;
1354
- contacts(type: ExtractZod<typeof RelayContactEnumType>, props: ExtractZod<typeof RelayContactType>): Promise<void>;
1355
- poll(type: ExtractZod<typeof RelayPollEnumType>, props: ExtractZod<typeof RelayPollType>): Promise<void>;
1356
- button(type: ExtractZod<typeof RelayButtonEnumType>, props: ExtractZod<typeof RelayButtonType>): Promise<void>;
1357
- group(): {
1358
- create: (props: ExtractZod<typeof RelayGroupCreateType>) => Promise<baileys.GroupMetadata>;
1359
- action: (props: ExtractZod<typeof RelayGroupActionType>) => Promise<{
1360
- status: string;
1361
- jid: string;
1362
- content: baileys.BinaryNode;
1363
- }[]>;
1364
- update: (props: ExtractZod<typeof RelayGroupUpdateType>) => Promise<void>;
1365
- settings: (props: ExtractZod<typeof RelayGroupSettingsType>) => Promise<void>;
1366
- leave: (props: ExtractZod<typeof RelayGroupLeaveType>) => Promise<void>;
1367
- links: (props: ExtractZod<typeof RelayGroupLinksType>) => Promise<string>;
1368
- invite: (props: ExtractZod<typeof RelayGroupInviteType>) => Promise<string | baileys.GroupMetadata>;
1369
- metadata: (props: ExtractZod<typeof RelayGroupMetadataType>) => Promise<baileys.GroupMetadata>;
1370
- requests: {
1371
- list: (props: ExtractZod<typeof RelayGroupRequestsListType>) => Promise<{
1372
- [key: string]: string;
1373
- }[]>;
1374
- approve: (props: ExtractZod<typeof RelayGroupRequestsApproveType>) => Promise<{
1375
- status: string;
1376
- jid: string;
1377
- }[]>;
1378
- reject: (props: ExtractZod<typeof RelayGroupRequestsRejectType>) => Promise<{
1379
- status: string;
1380
- jid: string;
1381
- }[]>;
1382
- };
1383
- };
1384
- privacy(): {
1385
- update: (props: ExtractZod<typeof RelayPrivacyUpdateType>) => Promise<void>;
1386
- fetch: {
1387
- settings: () => Promise<{
1388
- [_: string]: string;
1389
- }>;
1390
- blocklists: () => Promise<string[]>;
1391
- };
1392
- };
1393
- profile(): {
1394
- bio: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<baileys.USyncQueryResultList[]>;
1395
- avatar: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<string>;
1396
- business: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<void | baileys.WABusinessProfile>;
1397
- update: (props: ExtractZod<typeof RelayProfileUpdateType>) => Promise<void>;
1398
- check: (props: ExtractZod<typeof RelayProfileCheckType>) => Promise<{
1399
- jid: string;
1400
- exists: unknown;
1401
- lid: unknown;
1402
- isOnWhatsApp: boolean;
1403
- avatar: string;
1404
- bio: baileys.USyncQueryResultList[];
1405
- } | {
1406
- isOnWhatsApp: boolean;
1407
- }>;
1408
- };
187
+ //#endregion
188
+ //#region src/Types/middleware.d.ts
189
+ type MiddlewareContextType = {
190
+ messages?: Partial<z$1.infer<typeof ListenerMessagesType>>;
191
+ calls?: Partial<z$1.infer<typeof ListenerCallsType>>;
192
+ };
193
+ //#endregion
194
+ //#region src/Classes/middleware.d.ts
195
+ type MiddlewareNext = () => Promise<void> | void;
196
+ type MiddlewareHandler<T> = (ctx: MiddlewareContextType, next: MiddlewareNext) => Promise<void> | void;
197
+ declare class Middleware<T> {
198
+ private stack;
199
+ use(handler: MiddlewareHandler<T>): this;
200
+ run(ctx: MiddlewareContextType): Promise<void>;
1409
201
  }
1410
-
202
+ //#endregion
203
+ //#region src/Classes/client.d.ts
1411
204
  declare class Client {
1412
- props: ExtractZod<typeof ClientOptionsType>;
1413
- db: JsonDBInterface;
1414
- private logger;
1415
- private events;
1416
- private relay;
1417
- private retryCount;
1418
- private maxRetries;
1419
- private connectionTimeout;
1420
- spinner: nanospinner.Spinner;
1421
- socket: ReturnType<typeof baileys__default> | undefined;
1422
- cache: NodeCache;
1423
- constructor(props: ExtractZod<typeof ClientOptionsType>);
1424
- initialize(): Promise<void>;
1425
- private startConnectionTimeout;
1426
- private handleConnectionTimeout;
1427
- private autoReload;
1428
- resetRetryCount(): void;
1429
- on<T extends ExtractZod<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
1430
- emit<T extends ExtractZod<typeof EventEnumType>>(event: T, ...args: Parameters<EventCallbackType[T]>): void;
205
+ options: z$1.infer<typeof ClientOptionsType>;
206
+ middleware: Middleware<any>;
207
+ constructor(options: z$1.infer<typeof ClientOptionsType>);
208
+ initialize(): Promise<void>;
209
+ db(path: string): Lowdb;
210
+ on<T extends z$1.infer<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
211
+ use<T>(handler: MiddlewareHandler<T>): this;
1431
212
  }
1432
- interface Client extends Relay {
213
+ //#endregion
214
+ //#region src/Auth/creds.d.ts
215
+ declare const registerAuthCreds: (client: Client) => Promise<void>;
216
+ //#endregion
217
+ //#region src/Modules/lowdb.d.ts
218
+ type FlushMode = 'manual' | 'sync' | 'debounce';
219
+ declare class Lowdb {
220
+ private data;
221
+ private path;
222
+ private pool;
223
+ private size;
224
+ private chunkDir;
225
+ private replacer;
226
+ private reviver;
227
+ private loaded;
228
+ private flushMode;
229
+ private debounceMs;
230
+ private flushTimer;
231
+ private dirty;
232
+ constructor(path: string, bufferJSON?: any, size?: number, flushMode?: FlushMode, debounceMs?: number);
233
+ private ensureLoaded;
234
+ private scheduleFlush;
235
+ read(): Promise<Map<string, any>>;
236
+ write(): Promise<void>;
237
+ set<T>(key: string, value: T): Promise<void>;
238
+ push<T>(key: string, value: T): Promise<void>;
239
+ get<T>(key: string): Promise<any>;
240
+ delete(key: string): Promise<boolean>;
241
+ private saveChunk;
242
+ private loadChunk;
243
+ private delChunk;
244
+ private isMeta;
1433
245
  }
1434
-
1435
- declare const toJson: (object: unknown) => any;
1436
- declare const toString: (object: unknown) => string;
1437
- declare const shuffleString: (str: string) => string;
1438
- declare const tryAgain: <T>(fn: () => Promise<T>) => Promise<T>;
1439
- declare const findWord: (text?: string, word?: string) => boolean;
246
+ declare const createLowdb: (path: string, options?: {
247
+ BufferJSON?: any;
248
+ size?: number;
249
+ flushMode?: FlushMode;
250
+ debounceMs?: number;
251
+ }) => Lowdb;
252
+ //#endregion
253
+ //#region src/Utils/validate.d.ts
254
+ declare const getLatestLibVersion: () => Promise<any>;
255
+ declare const removeAuthCreds: (session: string) => Promise<void>;
1440
256
  declare const normalizeText: (text?: string) => string;
1441
- declare const extractJids: (text?: string) => string[];
1442
- declare const extractUrls: (text?: string) => string[];
1443
- declare const getMentions: (text?: string) => string[];
257
+ //#endregion
258
+ //#region src/Utils/helper.d.ts
259
+ declare const ignoreLint: (data: any) => any;
260
+ declare const toJson: (object: unknown) => any;
261
+ declare const toString: (object: unknown) => any;
262
+ declare const shuffleString: (str?: string) => any;
263
+ declare const findGlobalWord: (text?: string, word?: string) => any;
264
+ declare const extractUrls: (text?: string) => any;
1444
265
  declare const randomize: (arr: string[]) => string;
1445
- declare const delay: (ms: number) => Promise<unknown>;
1446
-
1447
- export { AdsReplyType, CitationType, Client, ClientAuthPairingType, ClientAuthQRType, ClientBaseType, ClientOptionsType, type EventCallbackType, EventEnumType, type ExtractZod, ExtractorCallsType, ExtractorConnectionType, ExtractorMessagesType, FakeReplyType, JsonDB, type JsonDBInterface, LimiterType, MessagesDeviceEnumType, MessagesEnumType, MessagesMediaType, MessagesVerifiedPlatformType, PluginsType, defaultBoolean, defaultString, delay, extractJids, extractUrls, findWord, getMentions, normalizeText, randomize, shuffleString, toJson, toString, tryAgain };
266
+ declare const pickKeysFromArray: (arr: any[], keys: string[]) => any;
267
+ //#endregion
268
+ export { Client, Lowdb, createLowdb, extractUrls, findGlobalWord, getLatestLibVersion, ignoreLint, normalizeText, pickKeysFromArray, randomize, registerAuthCreds, removeAuthCreds, shuffleString, toJson, toString, useAuthState };
269
+
270
+ /*
271
+ * Copyright (c) 2025 Zeative Media.
272
+ * All rights reserved.
273
+ * Licensed under the MIT License.
274
+ * See LICENSE file for details.
275
+
276
+ * Author: zaadevofc
277
+ * Last build time: 12/5/2025 9:03:37 AM
278
+ *
279
+ * Repository: https://github.com/zeative/zaileys
280
+ */
281
+ //# sourceMappingURL=index.d.ts.map