@hbmodsofc/baileys 2.2.0 → 2.4.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/WAProto/index.js +169661 -0
- package/lib/Defaults/index.js +1 -1
- package/lib/Socket/chats.js +320 -265
- package/lib/Socket/hbmods.d.ts +18 -17
- package/lib/Socket/hbmods.js +480 -1
- package/lib/Socket/messages-send.js +909 -1
- package/lib/Socket/newsletter.js +372 -1
- package/lib/Socket/socket.js +680 -1
- package/lib/Utils/generics.js +9 -4
- package/lib/Utils/generics.js.bak +433 -0
- package/lib/Utils/messages.js +2 -2
- package/lib/Utils/validate-connection.js +2 -0
- package/lib/Utils/validate-connection.js.bak +237 -0
- package/lib/index.js +39 -1
- package/package.json +1 -1
package/lib/Socket/hbmods.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
// dugong.d.ts
|
|
1
2
|
import { proto } from '../../WAProto';
|
|
2
3
|
|
|
3
|
-
declare namespace
|
|
4
|
+
declare namespace hbmodofc {
|
|
4
5
|
interface MediaUploadOptions {
|
|
5
6
|
fileEncSha256?: Buffer;
|
|
6
7
|
mediaType?: string;
|
|
@@ -189,65 +190,65 @@ declare namespace hbmodsofc {
|
|
|
189
190
|
}
|
|
190
191
|
}
|
|
191
192
|
|
|
192
|
-
declare class
|
|
193
|
+
declare class hbmodofc {
|
|
193
194
|
constructor(
|
|
194
|
-
utils:
|
|
195
|
-
waUploadToServer:
|
|
195
|
+
utils: hbmodofc.Utils,
|
|
196
|
+
waUploadToServer: hbmodofc.WAMediaUploadFunction,
|
|
196
197
|
relayMessageFn?: (jid: string, content: any, options?: any) => Promise<any>
|
|
197
198
|
);
|
|
198
199
|
|
|
199
|
-
detectType(content:
|
|
200
|
+
detectType(content: hbmodofc.MessageContent): 'PAYMENT' | 'PRODUCT' | 'INTERACTIVE' | 'ALBUM' | 'EVENT' | 'POLL_RESULT' | 'GROUP_STORY' | null;
|
|
200
201
|
|
|
201
202
|
handlePayment(
|
|
202
|
-
content: { requestPaymentMessage:
|
|
203
|
+
content: { requestPaymentMessage: hbmodofc.PaymentMessage },
|
|
203
204
|
quoted?: proto.IWebMessageInfo
|
|
204
205
|
): Promise<{ requestPaymentMessage: proto.Message.RequestPaymentMessage }>;
|
|
205
206
|
|
|
206
207
|
handleProduct(
|
|
207
|
-
content: { productMessage:
|
|
208
|
+
content: { productMessage: hbmodofc.ProductMessage },
|
|
208
209
|
jid: string,
|
|
209
210
|
quoted?: proto.IWebMessageInfo
|
|
210
211
|
): Promise<{ viewOnceMessage: proto.Message.ViewOnceMessage }>;
|
|
211
212
|
|
|
212
213
|
handleInteractive(
|
|
213
|
-
content: { interactiveMessage:
|
|
214
|
+
content: { interactiveMessage: hbmodofc.InteractiveMessage },
|
|
214
215
|
jid: string,
|
|
215
216
|
quoted?: proto.IWebMessageInfo
|
|
216
217
|
): Promise<{ interactiveMessage: proto.Message.InteractiveMessage }>;
|
|
217
218
|
|
|
218
219
|
handleAlbum(
|
|
219
|
-
content: { albumMessage:
|
|
220
|
+
content: { albumMessage: hbmodofc.AlbumItem[] },
|
|
220
221
|
jid: string,
|
|
221
222
|
quoted?: proto.IWebMessageInfo
|
|
222
223
|
): Promise<any>;
|
|
223
224
|
|
|
224
225
|
handleEvent(
|
|
225
|
-
content: { eventMessage:
|
|
226
|
+
content: { eventMessage: hbmodofc.EventMessage },
|
|
226
227
|
jid: string,
|
|
227
228
|
quoted?: proto.IWebMessageInfo
|
|
228
229
|
): Promise<any>;
|
|
229
230
|
|
|
230
231
|
handlePollResult(
|
|
231
|
-
content: { pollResultMessage:
|
|
232
|
+
content: { pollResultMessage: hbmodofc.PollResultMessage },
|
|
232
233
|
jid: string,
|
|
233
234
|
quoted?: proto.IWebMessageInfo
|
|
234
235
|
): Promise<any>;
|
|
235
236
|
|
|
236
237
|
handleGroupStory(
|
|
237
|
-
content: { groupStatusMessage:
|
|
238
|
+
content: { groupStatusMessage: hbmodofc.GroupStatusMessage },
|
|
238
239
|
jid: string,
|
|
239
240
|
quoted?: proto.IWebMessageInfo
|
|
240
241
|
): Promise<any>;
|
|
241
242
|
|
|
242
243
|
buildMessageContent(
|
|
243
244
|
content: any,
|
|
244
|
-
opts?:
|
|
245
|
+
opts?: hbmodofc.WAMessageContentGenerationOptions
|
|
245
246
|
): Promise<any>;
|
|
246
247
|
|
|
247
|
-
utils:
|
|
248
|
+
utils: hbmodofc.Utils;
|
|
248
249
|
relayMessage: (jid: string, content: any, options?: any) => Promise<any>;
|
|
249
|
-
waUploadToServer:
|
|
250
|
-
bail:
|
|
250
|
+
waUploadToServer: hbmodofc.WAMediaUploadFunction;
|
|
251
|
+
bail: hbmodofc.BailUtils;
|
|
251
252
|
}
|
|
252
253
|
|
|
253
|
-
export =
|
|
254
|
+
export = hbmodofc;
|