zaileys 1.1.38 → 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 +221 -1304
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js.map +1 -0
- package/package.json +37 -88
- package/tsconfig.json +19 -0
- package/LICENSE +0 -21
- package/README.md +0 -718
- package/dist/index.d.mts +0 -1364
- package/dist/index.js +0 -2024
- package/dist/index.mjs +0 -1978
package/dist/index.d.ts
CHANGED
|
@@ -1,143 +1,62 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
declare const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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,1185 +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
|
-
|
|
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
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
290
|
-
declare const
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
|
|
416
|
-
|
|
417
|
-
|
|
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
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
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
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
590
|
-
type: z.ZodLiteral<"interactive">;
|
|
591
|
-
text: z.ZodString;
|
|
592
|
-
footer: z.ZodOptional<z.ZodString>;
|
|
593
|
-
buttons: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
594
|
-
type: z.ZodLiteral<"quick_reply">;
|
|
595
|
-
id: z.ZodString;
|
|
596
|
-
text: z.ZodString;
|
|
597
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
598
|
-
type: z.ZodLiteral<"cta_url">;
|
|
599
|
-
id: z.ZodString;
|
|
600
|
-
url: z.ZodURL;
|
|
601
|
-
text: z.ZodString;
|
|
602
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
603
|
-
type: z.ZodLiteral<"cta_copy">;
|
|
604
|
-
id: z.ZodString;
|
|
605
|
-
copy: z.ZodString;
|
|
606
|
-
text: z.ZodString;
|
|
607
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
608
|
-
type: z.ZodLiteral<"cta_call">;
|
|
609
|
-
id: z.ZodString;
|
|
610
|
-
phoneNumber: z.ZodString;
|
|
611
|
-
text: z.ZodString;
|
|
612
|
-
}, z.core.$strip>], "type">>;
|
|
613
|
-
roomId: z.ZodOptional<z.ZodString>;
|
|
614
|
-
}, z.core.$strip>], "type">;
|
|
615
|
-
|
|
616
|
-
declare const RelayGroupCreateType: z.ZodObject<{
|
|
617
|
-
title: z.ZodString;
|
|
618
|
-
members: z.ZodArray<z.ZodString>;
|
|
619
|
-
}, z.core.$strip>;
|
|
620
|
-
|
|
621
|
-
declare const RelayGroupActionType: z.ZodObject<{
|
|
622
|
-
roomId: z.ZodString;
|
|
623
|
-
action: z.ZodEnum<{
|
|
624
|
-
add: "add";
|
|
625
|
-
kick: "kick";
|
|
626
|
-
promote: "promote";
|
|
627
|
-
demote: "demote";
|
|
628
|
-
}>;
|
|
629
|
-
members: z.ZodArray<z.ZodString>;
|
|
630
|
-
}, z.core.$strip>;
|
|
631
|
-
|
|
632
|
-
declare const RelayGroupUpdateType: z.ZodObject<{
|
|
633
|
-
roomId: z.ZodString;
|
|
634
|
-
text: z.ZodString;
|
|
635
|
-
action: z.ZodEnum<{
|
|
636
|
-
subject: "subject";
|
|
637
|
-
description: "description";
|
|
638
|
-
}>;
|
|
639
|
-
}, z.core.$strip>;
|
|
640
|
-
|
|
641
|
-
declare const RelayGroupSettingsType: z.ZodObject<{
|
|
642
|
-
roomId: z.ZodString;
|
|
643
|
-
action: z.ZodEnum<{
|
|
644
|
-
open: "open";
|
|
645
|
-
close: "close";
|
|
646
|
-
lock: "lock";
|
|
647
|
-
unlock: "unlock";
|
|
648
|
-
}>;
|
|
649
|
-
}, z.core.$strip>;
|
|
650
|
-
|
|
651
|
-
declare const RelayGroupLeaveType: z.ZodObject<{
|
|
652
|
-
roomId: z.ZodString;
|
|
653
|
-
}, z.core.$strip>;
|
|
654
|
-
|
|
655
|
-
declare const RelayGroupLinksType: z.ZodObject<{
|
|
656
|
-
roomId: z.ZodString;
|
|
657
|
-
action: z.ZodEnum<{
|
|
658
|
-
get: "get";
|
|
659
|
-
revoke: "revoke";
|
|
660
|
-
}>;
|
|
661
|
-
}, z.core.$strip>;
|
|
662
|
-
|
|
663
|
-
declare const RelayGroupInviteType: z.ZodObject<{
|
|
664
|
-
url: z.ZodURL;
|
|
665
|
-
action: z.ZodEnum<{
|
|
666
|
-
join: "join";
|
|
667
|
-
info: "info";
|
|
668
|
-
}>;
|
|
669
|
-
}, z.core.$strip>;
|
|
670
|
-
|
|
671
|
-
declare const RelayGroupRequestsListType: z.ZodObject<{
|
|
672
|
-
roomId: z.ZodString;
|
|
673
|
-
}, z.core.$strip>;
|
|
674
|
-
declare const RelayGroupRequestsApproveType: z.ZodObject<{
|
|
675
|
-
roomId: z.ZodString;
|
|
676
|
-
members: z.ZodArray<z.ZodString>;
|
|
677
|
-
}, z.core.$strip>;
|
|
678
|
-
declare const RelayGroupRequestsRejectType: z.ZodObject<{
|
|
679
|
-
roomId: z.ZodString;
|
|
680
|
-
members: z.ZodArray<z.ZodString>;
|
|
681
|
-
}, z.core.$strip>;
|
|
682
|
-
|
|
683
|
-
declare const RelayGroupMetadataType: z.ZodObject<{
|
|
684
|
-
roomId: z.ZodString;
|
|
685
|
-
}, z.core.$strip>;
|
|
686
|
-
|
|
687
|
-
declare const RelayPrivacyUpdateType: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
688
|
-
action: z.ZodLiteral<"control">;
|
|
689
|
-
type: z.ZodEnum<{
|
|
690
|
-
block: "block";
|
|
691
|
-
unblock: "unblock";
|
|
692
|
-
}>;
|
|
693
|
-
senderId: z.ZodString;
|
|
694
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
695
|
-
action: z.ZodLiteral<"lastSeen">;
|
|
696
|
-
type: z.ZodEnum<{
|
|
697
|
-
contacts: "contacts";
|
|
698
|
-
all: "all";
|
|
699
|
-
contact_blacklist: "contact_blacklist";
|
|
700
|
-
none: "none";
|
|
701
|
-
}>;
|
|
702
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
703
|
-
action: z.ZodLiteral<"online">;
|
|
704
|
-
type: z.ZodEnum<{
|
|
705
|
-
all: "all";
|
|
706
|
-
match_last_seen: "match_last_seen";
|
|
707
|
-
}>;
|
|
708
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
709
|
-
action: z.ZodLiteral<"avatar">;
|
|
710
|
-
type: z.ZodEnum<{
|
|
711
|
-
contacts: "contacts";
|
|
712
|
-
all: "all";
|
|
713
|
-
contact_blacklist: "contact_blacklist";
|
|
714
|
-
none: "none";
|
|
715
|
-
}>;
|
|
716
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
717
|
-
action: z.ZodLiteral<"story">;
|
|
718
|
-
type: z.ZodEnum<{
|
|
719
|
-
contacts: "contacts";
|
|
720
|
-
all: "all";
|
|
721
|
-
contact_blacklist: "contact_blacklist";
|
|
722
|
-
none: "none";
|
|
723
|
-
}>;
|
|
724
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
725
|
-
action: z.ZodLiteral<"read">;
|
|
726
|
-
type: z.ZodEnum<{
|
|
727
|
-
all: "all";
|
|
728
|
-
none: "none";
|
|
729
|
-
}>;
|
|
730
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
731
|
-
action: z.ZodLiteral<"groupsAdd">;
|
|
732
|
-
type: z.ZodEnum<{
|
|
733
|
-
contacts: "contacts";
|
|
734
|
-
all: "all";
|
|
735
|
-
contact_blacklist: "contact_blacklist";
|
|
736
|
-
}>;
|
|
737
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
738
|
-
action: z.ZodLiteral<"ephemeral">;
|
|
739
|
-
type: z.ZodEnum<{
|
|
740
|
-
remove: "remove";
|
|
741
|
-
"24h": "24h";
|
|
742
|
-
"7d": "7d";
|
|
743
|
-
"90d": "90d";
|
|
744
|
-
}>;
|
|
745
|
-
}, z.core.$strip>], "action">;
|
|
746
|
-
|
|
747
|
-
declare const RelayProfileBioType: z.ZodObject<{
|
|
748
|
-
senderId: z.ZodString;
|
|
749
|
-
}, z.core.$strip>;
|
|
750
|
-
|
|
751
|
-
declare const RelayProfileUpdateType: z.ZodObject<{
|
|
752
|
-
type: z.ZodEnum<{
|
|
753
|
-
name: "name";
|
|
754
|
-
avatar: "avatar";
|
|
755
|
-
bio: "bio";
|
|
756
|
-
}>;
|
|
757
|
-
text: z.ZodOptional<z.ZodString>;
|
|
758
|
-
roomId: z.ZodOptional<z.ZodString>;
|
|
759
|
-
avatar: z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodURL, z.ZodBase64]>, z.ZodCustom<Buffer<ArrayBufferLike>, Buffer<ArrayBufferLike>>]>, z.ZodLiteral<"remove">]>;
|
|
760
|
-
}, z.core.$strip>;
|
|
761
|
-
|
|
762
|
-
declare const RelayProfileCheckType: z.ZodObject<{
|
|
763
|
-
senderId: z.ZodString;
|
|
764
|
-
}, z.core.$strip>;
|
|
765
|
-
|
|
766
|
-
declare class Relay {
|
|
767
|
-
private client;
|
|
768
|
-
private message;
|
|
769
|
-
db: JsonDBInterface;
|
|
770
|
-
ctx: Client & {
|
|
771
|
-
db: JsonDBInterface;
|
|
772
|
-
};
|
|
773
|
-
bind(client: Client, db: JsonDBInterface): void;
|
|
774
|
-
private initial;
|
|
775
|
-
text(props: ExtractZod<typeof RelayTextType>): Promise<{
|
|
776
|
-
chatId: string;
|
|
777
|
-
channelId: string;
|
|
778
|
-
uniqueId: string;
|
|
779
|
-
receiverId: string;
|
|
780
|
-
receiverName: string;
|
|
781
|
-
roomId: string;
|
|
782
|
-
roomName: string;
|
|
783
|
-
senderLid: string;
|
|
784
|
-
senderId: string;
|
|
785
|
-
senderName: string;
|
|
786
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
787
|
-
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";
|
|
788
|
-
timestamp: number;
|
|
789
|
-
mentions: string[];
|
|
790
|
-
links: string[];
|
|
791
|
-
isPrefix: boolean;
|
|
792
|
-
isSpam: boolean;
|
|
793
|
-
isFromMe: boolean;
|
|
794
|
-
isTagMe: boolean;
|
|
795
|
-
isGroup: boolean;
|
|
796
|
-
isStory: boolean;
|
|
797
|
-
isViewOnce: boolean;
|
|
798
|
-
isEdited: boolean;
|
|
799
|
-
isDeleted: boolean;
|
|
800
|
-
isPinned: boolean;
|
|
801
|
-
isUnPinned: boolean;
|
|
802
|
-
isChannel: boolean;
|
|
803
|
-
isBroadcast: boolean;
|
|
804
|
-
isEphemeral: boolean;
|
|
805
|
-
isForwarded: boolean;
|
|
806
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
807
|
-
text?: string;
|
|
808
|
-
citation?: Record<string, boolean>;
|
|
809
|
-
media?: {
|
|
810
|
-
[x: string]: unknown;
|
|
811
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
812
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
813
|
-
};
|
|
814
|
-
replied?: {
|
|
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?: /*elided*/ any;
|
|
854
|
-
};
|
|
855
|
-
}>;
|
|
856
|
-
reply(props: ExtractZod<typeof RelayReplyType>): Promise<{
|
|
857
|
-
chatId: string;
|
|
858
|
-
channelId: string;
|
|
859
|
-
uniqueId: string;
|
|
860
|
-
receiverId: string;
|
|
861
|
-
receiverName: string;
|
|
862
|
-
roomId: string;
|
|
863
|
-
roomName: string;
|
|
864
|
-
senderLid: string;
|
|
865
|
-
senderId: string;
|
|
866
|
-
senderName: string;
|
|
867
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
868
|
-
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";
|
|
869
|
-
timestamp: number;
|
|
870
|
-
mentions: string[];
|
|
871
|
-
links: string[];
|
|
872
|
-
isPrefix: boolean;
|
|
873
|
-
isSpam: boolean;
|
|
874
|
-
isFromMe: boolean;
|
|
875
|
-
isTagMe: boolean;
|
|
876
|
-
isGroup: boolean;
|
|
877
|
-
isStory: boolean;
|
|
878
|
-
isViewOnce: boolean;
|
|
879
|
-
isEdited: boolean;
|
|
880
|
-
isDeleted: boolean;
|
|
881
|
-
isPinned: boolean;
|
|
882
|
-
isUnPinned: boolean;
|
|
883
|
-
isChannel: boolean;
|
|
884
|
-
isBroadcast: boolean;
|
|
885
|
-
isEphemeral: boolean;
|
|
886
|
-
isForwarded: boolean;
|
|
887
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
888
|
-
text?: string;
|
|
889
|
-
citation?: Record<string, boolean>;
|
|
890
|
-
media?: {
|
|
891
|
-
[x: string]: unknown;
|
|
892
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
893
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
894
|
-
};
|
|
895
|
-
replied?: {
|
|
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?: /*elided*/ any;
|
|
935
|
-
};
|
|
936
|
-
}>;
|
|
937
|
-
forward(props: ExtractZod<typeof RelayForwardType>): Promise<{
|
|
938
|
-
chatId: string;
|
|
939
|
-
channelId: string;
|
|
940
|
-
uniqueId: string;
|
|
941
|
-
receiverId: string;
|
|
942
|
-
receiverName: string;
|
|
943
|
-
roomId: string;
|
|
944
|
-
roomName: string;
|
|
945
|
-
senderLid: string;
|
|
946
|
-
senderId: string;
|
|
947
|
-
senderName: string;
|
|
948
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
949
|
-
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";
|
|
950
|
-
timestamp: number;
|
|
951
|
-
mentions: string[];
|
|
952
|
-
links: string[];
|
|
953
|
-
isPrefix: boolean;
|
|
954
|
-
isSpam: boolean;
|
|
955
|
-
isFromMe: boolean;
|
|
956
|
-
isTagMe: boolean;
|
|
957
|
-
isGroup: boolean;
|
|
958
|
-
isStory: boolean;
|
|
959
|
-
isViewOnce: boolean;
|
|
960
|
-
isEdited: boolean;
|
|
961
|
-
isDeleted: boolean;
|
|
962
|
-
isPinned: boolean;
|
|
963
|
-
isUnPinned: boolean;
|
|
964
|
-
isChannel: boolean;
|
|
965
|
-
isBroadcast: boolean;
|
|
966
|
-
isEphemeral: boolean;
|
|
967
|
-
isForwarded: boolean;
|
|
968
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
969
|
-
text?: string;
|
|
970
|
-
citation?: Record<string, boolean>;
|
|
971
|
-
media?: {
|
|
972
|
-
[x: string]: unknown;
|
|
973
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
974
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
975
|
-
};
|
|
976
|
-
replied?: {
|
|
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?: /*elided*/ any;
|
|
1016
|
-
};
|
|
1017
|
-
}>;
|
|
1018
|
-
edit(props: ExtractZod<typeof RelayEditType>): Promise<{
|
|
1019
|
-
chatId: string;
|
|
1020
|
-
channelId: string;
|
|
1021
|
-
uniqueId: string;
|
|
1022
|
-
receiverId: string;
|
|
1023
|
-
receiverName: string;
|
|
1024
|
-
roomId: string;
|
|
1025
|
-
roomName: string;
|
|
1026
|
-
senderLid: string;
|
|
1027
|
-
senderId: string;
|
|
1028
|
-
senderName: string;
|
|
1029
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1030
|
-
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";
|
|
1031
|
-
timestamp: number;
|
|
1032
|
-
mentions: string[];
|
|
1033
|
-
links: string[];
|
|
1034
|
-
isPrefix: boolean;
|
|
1035
|
-
isSpam: boolean;
|
|
1036
|
-
isFromMe: boolean;
|
|
1037
|
-
isTagMe: boolean;
|
|
1038
|
-
isGroup: boolean;
|
|
1039
|
-
isStory: boolean;
|
|
1040
|
-
isViewOnce: boolean;
|
|
1041
|
-
isEdited: boolean;
|
|
1042
|
-
isDeleted: boolean;
|
|
1043
|
-
isPinned: boolean;
|
|
1044
|
-
isUnPinned: boolean;
|
|
1045
|
-
isChannel: boolean;
|
|
1046
|
-
isBroadcast: boolean;
|
|
1047
|
-
isEphemeral: boolean;
|
|
1048
|
-
isForwarded: boolean;
|
|
1049
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1050
|
-
text?: string;
|
|
1051
|
-
citation?: Record<string, boolean>;
|
|
1052
|
-
media?: {
|
|
1053
|
-
[x: string]: unknown;
|
|
1054
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1055
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1056
|
-
};
|
|
1057
|
-
replied?: {
|
|
1058
|
-
chatId: string;
|
|
1059
|
-
channelId: string;
|
|
1060
|
-
uniqueId: string;
|
|
1061
|
-
receiverId: string;
|
|
1062
|
-
receiverName: string;
|
|
1063
|
-
roomId: string;
|
|
1064
|
-
roomName: string;
|
|
1065
|
-
senderLid: string;
|
|
1066
|
-
senderId: string;
|
|
1067
|
-
senderName: string;
|
|
1068
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1069
|
-
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";
|
|
1070
|
-
timestamp: number;
|
|
1071
|
-
mentions: string[];
|
|
1072
|
-
links: string[];
|
|
1073
|
-
isPrefix: boolean;
|
|
1074
|
-
isSpam: boolean;
|
|
1075
|
-
isFromMe: boolean;
|
|
1076
|
-
isTagMe: boolean;
|
|
1077
|
-
isGroup: boolean;
|
|
1078
|
-
isStory: boolean;
|
|
1079
|
-
isViewOnce: boolean;
|
|
1080
|
-
isEdited: boolean;
|
|
1081
|
-
isDeleted: boolean;
|
|
1082
|
-
isPinned: boolean;
|
|
1083
|
-
isUnPinned: boolean;
|
|
1084
|
-
isChannel: boolean;
|
|
1085
|
-
isBroadcast: boolean;
|
|
1086
|
-
isEphemeral: boolean;
|
|
1087
|
-
isForwarded: boolean;
|
|
1088
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1089
|
-
text?: string;
|
|
1090
|
-
citation?: Record<string, boolean>;
|
|
1091
|
-
media?: {
|
|
1092
|
-
[x: string]: unknown;
|
|
1093
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1094
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1095
|
-
};
|
|
1096
|
-
replied?: /*elided*/ any;
|
|
1097
|
-
};
|
|
1098
|
-
}>;
|
|
1099
|
-
delete(props: ExtractZod<typeof RelayDeleteType>): Promise<{
|
|
1100
|
-
chatId: string;
|
|
1101
|
-
channelId: string;
|
|
1102
|
-
uniqueId: string;
|
|
1103
|
-
receiverId: string;
|
|
1104
|
-
receiverName: string;
|
|
1105
|
-
roomId: string;
|
|
1106
|
-
roomName: string;
|
|
1107
|
-
senderLid: string;
|
|
1108
|
-
senderId: string;
|
|
1109
|
-
senderName: string;
|
|
1110
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1111
|
-
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";
|
|
1112
|
-
timestamp: number;
|
|
1113
|
-
mentions: string[];
|
|
1114
|
-
links: string[];
|
|
1115
|
-
isPrefix: boolean;
|
|
1116
|
-
isSpam: boolean;
|
|
1117
|
-
isFromMe: boolean;
|
|
1118
|
-
isTagMe: boolean;
|
|
1119
|
-
isGroup: boolean;
|
|
1120
|
-
isStory: boolean;
|
|
1121
|
-
isViewOnce: boolean;
|
|
1122
|
-
isEdited: boolean;
|
|
1123
|
-
isDeleted: boolean;
|
|
1124
|
-
isPinned: boolean;
|
|
1125
|
-
isUnPinned: boolean;
|
|
1126
|
-
isChannel: boolean;
|
|
1127
|
-
isBroadcast: boolean;
|
|
1128
|
-
isEphemeral: boolean;
|
|
1129
|
-
isForwarded: boolean;
|
|
1130
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1131
|
-
text?: string;
|
|
1132
|
-
citation?: Record<string, boolean>;
|
|
1133
|
-
media?: {
|
|
1134
|
-
[x: string]: unknown;
|
|
1135
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1136
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1137
|
-
};
|
|
1138
|
-
replied?: {
|
|
1139
|
-
chatId: string;
|
|
1140
|
-
channelId: string;
|
|
1141
|
-
uniqueId: string;
|
|
1142
|
-
receiverId: string;
|
|
1143
|
-
receiverName: string;
|
|
1144
|
-
roomId: string;
|
|
1145
|
-
roomName: string;
|
|
1146
|
-
senderLid: string;
|
|
1147
|
-
senderId: string;
|
|
1148
|
-
senderName: string;
|
|
1149
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1150
|
-
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";
|
|
1151
|
-
timestamp: number;
|
|
1152
|
-
mentions: string[];
|
|
1153
|
-
links: string[];
|
|
1154
|
-
isPrefix: boolean;
|
|
1155
|
-
isSpam: boolean;
|
|
1156
|
-
isFromMe: boolean;
|
|
1157
|
-
isTagMe: boolean;
|
|
1158
|
-
isGroup: boolean;
|
|
1159
|
-
isStory: boolean;
|
|
1160
|
-
isViewOnce: boolean;
|
|
1161
|
-
isEdited: boolean;
|
|
1162
|
-
isDeleted: boolean;
|
|
1163
|
-
isPinned: boolean;
|
|
1164
|
-
isUnPinned: boolean;
|
|
1165
|
-
isChannel: boolean;
|
|
1166
|
-
isBroadcast: boolean;
|
|
1167
|
-
isEphemeral: boolean;
|
|
1168
|
-
isForwarded: boolean;
|
|
1169
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1170
|
-
text?: string;
|
|
1171
|
-
citation?: Record<string, boolean>;
|
|
1172
|
-
media?: {
|
|
1173
|
-
[x: string]: unknown;
|
|
1174
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1175
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1176
|
-
};
|
|
1177
|
-
replied?: /*elided*/ any;
|
|
1178
|
-
};
|
|
1179
|
-
}>;
|
|
1180
|
-
reject(props: ExtractZod<typeof RelayRejectType>): Promise<void>;
|
|
1181
|
-
presence(props: ExtractZod<typeof RelayPresenceType>): Promise<void>;
|
|
1182
|
-
reaction(props: ExtractZod<typeof RelayReactionType>): Promise<{
|
|
1183
|
-
chatId: string;
|
|
1184
|
-
channelId: string;
|
|
1185
|
-
uniqueId: string;
|
|
1186
|
-
receiverId: string;
|
|
1187
|
-
receiverName: string;
|
|
1188
|
-
roomId: string;
|
|
1189
|
-
roomName: string;
|
|
1190
|
-
senderLid: string;
|
|
1191
|
-
senderId: string;
|
|
1192
|
-
senderName: string;
|
|
1193
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1194
|
-
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";
|
|
1195
|
-
timestamp: number;
|
|
1196
|
-
mentions: string[];
|
|
1197
|
-
links: string[];
|
|
1198
|
-
isPrefix: boolean;
|
|
1199
|
-
isSpam: boolean;
|
|
1200
|
-
isFromMe: boolean;
|
|
1201
|
-
isTagMe: boolean;
|
|
1202
|
-
isGroup: boolean;
|
|
1203
|
-
isStory: boolean;
|
|
1204
|
-
isViewOnce: boolean;
|
|
1205
|
-
isEdited: boolean;
|
|
1206
|
-
isDeleted: boolean;
|
|
1207
|
-
isPinned: boolean;
|
|
1208
|
-
isUnPinned: boolean;
|
|
1209
|
-
isChannel: boolean;
|
|
1210
|
-
isBroadcast: boolean;
|
|
1211
|
-
isEphemeral: boolean;
|
|
1212
|
-
isForwarded: boolean;
|
|
1213
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1214
|
-
text?: string;
|
|
1215
|
-
citation?: Record<string, boolean>;
|
|
1216
|
-
media?: {
|
|
1217
|
-
[x: string]: unknown;
|
|
1218
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1219
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1220
|
-
};
|
|
1221
|
-
replied?: {
|
|
1222
|
-
chatId: string;
|
|
1223
|
-
channelId: string;
|
|
1224
|
-
uniqueId: string;
|
|
1225
|
-
receiverId: string;
|
|
1226
|
-
receiverName: string;
|
|
1227
|
-
roomId: string;
|
|
1228
|
-
roomName: string;
|
|
1229
|
-
senderLid: string;
|
|
1230
|
-
senderId: string;
|
|
1231
|
-
senderName: string;
|
|
1232
|
-
senderDevice: "unknown" | "android" | "ios" | "desktop" | "web";
|
|
1233
|
-
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";
|
|
1234
|
-
timestamp: number;
|
|
1235
|
-
mentions: string[];
|
|
1236
|
-
links: string[];
|
|
1237
|
-
isPrefix: boolean;
|
|
1238
|
-
isSpam: boolean;
|
|
1239
|
-
isFromMe: boolean;
|
|
1240
|
-
isTagMe: boolean;
|
|
1241
|
-
isGroup: boolean;
|
|
1242
|
-
isStory: boolean;
|
|
1243
|
-
isViewOnce: boolean;
|
|
1244
|
-
isEdited: boolean;
|
|
1245
|
-
isDeleted: boolean;
|
|
1246
|
-
isPinned: boolean;
|
|
1247
|
-
isUnPinned: boolean;
|
|
1248
|
-
isChannel: boolean;
|
|
1249
|
-
isBroadcast: boolean;
|
|
1250
|
-
isEphemeral: boolean;
|
|
1251
|
-
isForwarded: boolean;
|
|
1252
|
-
message: z.core.$InferOuterFunctionType<z.ZodTuple<readonly [], null>, z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
1253
|
-
text?: string;
|
|
1254
|
-
citation?: Record<string, boolean>;
|
|
1255
|
-
media?: {
|
|
1256
|
-
[x: string]: unknown;
|
|
1257
|
-
buffer: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1258
|
-
stream: z.core.$InferOuterFunctionType<z.core.$ZodFunctionArgs, z.core.$ZodFunctionOut>;
|
|
1259
|
-
};
|
|
1260
|
-
replied?: /*elided*/ any;
|
|
1261
|
-
};
|
|
1262
|
-
}>;
|
|
1263
|
-
document(type: ExtractZod<typeof RelayDocumentEnumType>, props: ExtractZod<typeof RelayDocumentType>): Promise<void>;
|
|
1264
|
-
image(type: ExtractZod<typeof RelayImageEnumType>, props: ExtractZod<typeof RelayImageType>): Promise<void>;
|
|
1265
|
-
sticker(type: ExtractZod<typeof RelayStickerEnumType>, props: ExtractZod<typeof RelayStickerType>): Promise<void>;
|
|
1266
|
-
video(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
|
|
1267
|
-
audio(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
|
|
1268
|
-
voice(type: ExtractZod<typeof RelayAudioEnumType>, props: ExtractZod<typeof RelayAudioType>): Promise<void>;
|
|
1269
|
-
note(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
|
|
1270
|
-
gif(type: ExtractZod<typeof RelayVideoEnumType>, props: ExtractZod<typeof RelayVideoType>): Promise<void>;
|
|
1271
|
-
location(type: ExtractZod<typeof RelayLocationEnumType>, props: ExtractZod<typeof RelayLocationType>): Promise<void>;
|
|
1272
|
-
contacts(type: ExtractZod<typeof RelayContactEnumType>, props: ExtractZod<typeof RelayContactType>): Promise<void>;
|
|
1273
|
-
poll(type: ExtractZod<typeof RelayPollEnumType>, props: ExtractZod<typeof RelayPollType>): Promise<void>;
|
|
1274
|
-
button(type: ExtractZod<typeof RelayButtonEnumType>, props: ExtractZod<typeof RelayButtonType>): Promise<void>;
|
|
1275
|
-
group(): {
|
|
1276
|
-
create: (props: ExtractZod<typeof RelayGroupCreateType>) => Promise<baileys.GroupMetadata>;
|
|
1277
|
-
action: (props: ExtractZod<typeof RelayGroupActionType>) => Promise<{
|
|
1278
|
-
status: string;
|
|
1279
|
-
jid: string;
|
|
1280
|
-
content: baileys.BinaryNode;
|
|
1281
|
-
}[]>;
|
|
1282
|
-
update: (props: ExtractZod<typeof RelayGroupUpdateType>) => Promise<void>;
|
|
1283
|
-
settings: (props: ExtractZod<typeof RelayGroupSettingsType>) => Promise<void>;
|
|
1284
|
-
leave: (props: ExtractZod<typeof RelayGroupLeaveType>) => Promise<void>;
|
|
1285
|
-
links: (props: ExtractZod<typeof RelayGroupLinksType>) => Promise<string>;
|
|
1286
|
-
invite: (props: ExtractZod<typeof RelayGroupInviteType>) => Promise<string | baileys.GroupMetadata>;
|
|
1287
|
-
metadata: (props: ExtractZod<typeof RelayGroupMetadataType>) => Promise<baileys.GroupMetadata>;
|
|
1288
|
-
requests: {
|
|
1289
|
-
list: (props: ExtractZod<typeof RelayGroupRequestsListType>) => Promise<{
|
|
1290
|
-
[key: string]: string;
|
|
1291
|
-
}[]>;
|
|
1292
|
-
approve: (props: ExtractZod<typeof RelayGroupRequestsApproveType>) => Promise<{
|
|
1293
|
-
status: string;
|
|
1294
|
-
jid: string;
|
|
1295
|
-
}[]>;
|
|
1296
|
-
reject: (props: ExtractZod<typeof RelayGroupRequestsRejectType>) => Promise<{
|
|
1297
|
-
status: string;
|
|
1298
|
-
jid: string;
|
|
1299
|
-
}[]>;
|
|
1300
|
-
};
|
|
1301
|
-
};
|
|
1302
|
-
privacy(): {
|
|
1303
|
-
update: (props: ExtractZod<typeof RelayPrivacyUpdateType>) => Promise<void>;
|
|
1304
|
-
fetch: {
|
|
1305
|
-
settings: () => Promise<{
|
|
1306
|
-
[_: string]: string;
|
|
1307
|
-
}>;
|
|
1308
|
-
blocklists: () => Promise<string[]>;
|
|
1309
|
-
};
|
|
1310
|
-
};
|
|
1311
|
-
profile(): {
|
|
1312
|
-
bio: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<baileys.USyncQueryResultList[]>;
|
|
1313
|
-
avatar: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<string>;
|
|
1314
|
-
business: (props: ExtractZod<typeof RelayProfileBioType>) => Promise<void | baileys.WABusinessProfile>;
|
|
1315
|
-
update: (props: ExtractZod<typeof RelayProfileUpdateType>) => Promise<void>;
|
|
1316
|
-
check: (props: ExtractZod<typeof RelayProfileCheckType>) => Promise<{
|
|
1317
|
-
jid: string;
|
|
1318
|
-
exists: unknown;
|
|
1319
|
-
lid: unknown;
|
|
1320
|
-
isOnWhatsApp: boolean;
|
|
1321
|
-
avatar: string;
|
|
1322
|
-
bio: baileys.USyncQueryResultList[];
|
|
1323
|
-
} | {
|
|
1324
|
-
isOnWhatsApp: boolean;
|
|
1325
|
-
}>;
|
|
1326
|
-
};
|
|
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>;
|
|
1327
201
|
}
|
|
1328
|
-
|
|
202
|
+
//#endregion
|
|
203
|
+
//#region src/Classes/client.d.ts
|
|
1329
204
|
declare class Client {
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
private connectionTimeout;
|
|
1338
|
-
spinner: nanospinner.Spinner;
|
|
1339
|
-
socket: ReturnType<typeof baileys__default> | undefined;
|
|
1340
|
-
cache: NodeCache;
|
|
1341
|
-
constructor(props: ExtractZod<typeof ClientOptionsType>);
|
|
1342
|
-
initialize(): Promise<void>;
|
|
1343
|
-
private startConnectionTimeout;
|
|
1344
|
-
private handleConnectionTimeout;
|
|
1345
|
-
private autoReload;
|
|
1346
|
-
resetRetryCount(): void;
|
|
1347
|
-
on<T extends ExtractZod<typeof EventEnumType>>(event: T, handler: EventCallbackType[T]): void;
|
|
1348
|
-
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;
|
|
1349
212
|
}
|
|
1350
|
-
|
|
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;
|
|
1351
245
|
}
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
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>;
|
|
1358
256
|
declare const normalizeText: (text?: string) => string;
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
declare const
|
|
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;
|
|
1362
265
|
declare const randomize: (arr: string[]) => string;
|
|
1363
|
-
|
|
1364
|
-
|
|
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
|