wa-multi-mongodb 3.10.2 → 3.10.4
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/Defaults/index.js +4 -9
- package/dist/Error/index.js +1 -5
- package/dist/Messaging/index.d.ts +1 -1
- package/dist/Messaging/index.js +123 -137
- package/dist/Profile/index.d.ts +1 -1
- package/dist/Profile/index.js +6 -10
- package/dist/Socket/index.d.ts +160 -1
- package/dist/Socket/index.d.ts.map +1 -1
- package/dist/Socket/index.js +462 -200
- package/dist/Types/index.d.ts +21 -0
- package/dist/Types/index.d.ts.map +1 -1
- package/dist/Types/index.js +1 -2
- package/dist/Types/profile.js +1 -2
- package/dist/Utils/create-delay.js +2 -7
- package/dist/Utils/error.js +1 -4
- package/dist/Utils/group-cache.js +8 -15
- package/dist/Utils/index.d.ts +5 -5
- package/dist/Utils/index.js +5 -21
- package/dist/Utils/is-exist.d.ts +1 -1
- package/dist/Utils/is-exist.js +7 -10
- package/dist/Utils/lid-utils.js +13 -20
- package/dist/Utils/message-status.d.ts +1 -1
- package/dist/Utils/message-status.js +7 -11
- package/dist/Utils/mongo-auth-state.js +10 -13
- package/dist/Utils/phone-to-jid.js +6 -14
- package/dist/Utils/save-media.d.ts +1 -1
- package/dist/Utils/save-media.js +16 -26
- package/dist/cjs/Defaults/index.d.ts +21 -0
- package/dist/cjs/Defaults/index.d.ts.map +1 -0
- package/dist/cjs/Defaults/index.js +31 -0
- package/dist/cjs/Error/index.d.ts +5 -0
- package/dist/cjs/Error/index.d.ts.map +1 -0
- package/dist/cjs/Error/index.js +14 -0
- package/dist/cjs/Messaging/index.d.ts +45 -0
- package/dist/cjs/Messaging/index.d.ts.map +1 -0
- package/dist/cjs/Messaging/index.js +784 -0
- package/dist/cjs/Profile/index.d.ts +9 -0
- package/dist/cjs/Profile/index.d.ts.map +1 -0
- package/dist/cjs/Profile/index.js +34 -0
- package/dist/cjs/Socket/index.d.ts +264 -0
- package/dist/cjs/Socket/index.d.ts.map +1 -0
- package/dist/cjs/Socket/index.js +1210 -0
- package/dist/cjs/Types/index.d.ts +95 -0
- package/dist/cjs/Types/index.d.ts.map +1 -0
- package/dist/cjs/Types/index.js +2 -0
- package/dist/cjs/Types/profile.d.ts +5 -0
- package/dist/cjs/Types/profile.d.ts.map +1 -0
- package/dist/cjs/Types/profile.js +2 -0
- package/dist/cjs/Utils/create-delay.d.ts +17 -0
- package/dist/cjs/Utils/create-delay.d.ts.map +1 -0
- package/dist/cjs/Utils/create-delay.js +38 -0
- package/dist/cjs/Utils/error.d.ts +4 -0
- package/dist/cjs/Utils/error.d.ts.map +1 -0
- package/dist/cjs/Utils/error.js +8 -0
- package/dist/cjs/Utils/group-cache.d.ts +23 -0
- package/dist/cjs/Utils/group-cache.d.ts.map +1 -0
- package/dist/cjs/Utils/group-cache.js +176 -0
- package/dist/cjs/Utils/index.d.ts +6 -0
- package/dist/cjs/Utils/index.d.ts.map +1 -0
- package/dist/cjs/Utils/index.js +23 -0
- package/dist/cjs/Utils/is-exist.d.ts +6 -0
- package/dist/cjs/Utils/is-exist.d.ts.map +1 -0
- package/dist/cjs/Utils/is-exist.js +53 -0
- package/dist/cjs/Utils/lid-utils.d.ts +26 -0
- package/dist/cjs/Utils/lid-utils.d.ts.map +1 -0
- package/dist/cjs/Utils/lid-utils.js +81 -0
- package/dist/cjs/Utils/message-status.d.ts +4 -0
- package/dist/cjs/Utils/message-status.d.ts.map +1 -0
- package/dist/cjs/Utils/message-status.js +18 -0
- package/dist/cjs/Utils/mongo-auth-state.d.ts +15 -0
- package/dist/cjs/Utils/mongo-auth-state.d.ts.map +1 -0
- package/dist/cjs/Utils/mongo-auth-state.js +109 -0
- package/dist/cjs/Utils/phone-to-jid.d.ts +17 -0
- package/dist/cjs/Utils/phone-to-jid.d.ts.map +1 -0
- package/dist/cjs/Utils/phone-to-jid.js +51 -0
- package/dist/cjs/Utils/save-media.d.ts +6 -0
- package/dist/cjs/Utils/save-media.d.ts.map +1 -0
- package/dist/cjs/Utils/save-media.js +55 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +46 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +7 -46
- package/package.json +57 -42
- package/readme.md +170 -3
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { proto } from "baileys";
|
|
2
|
+
import { SendMediaTypes, SendMessageTypes, SendReadTypes, SendTypingTypes, SendMessageWithMentionTypes } from "../Types";
|
|
3
|
+
export declare const sendTextMessage: ({ sessionId, to, text, isGroup, ...props }: SendMessageTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
4
|
+
/**
|
|
5
|
+
* Kirim pesan teks dengan mention
|
|
6
|
+
*
|
|
7
|
+
* @param sessionId - ID sesi WhatsApp
|
|
8
|
+
* @param to - Nomor telepon atau JID tujuan
|
|
9
|
+
* @param text - Teks pesan (bisa mengandung @nomor untuk mention)
|
|
10
|
+
* @param mentions - Array JID yang akan di-mention
|
|
11
|
+
* @param isGroup - Apakah ini adalah grup
|
|
12
|
+
* @param props - Properti tambahan seperti answering
|
|
13
|
+
*/
|
|
14
|
+
export declare const sendTextMessageWithMention: ({ sessionId, to, text, mentions, isGroup, ...props }: SendMessageWithMentionTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
15
|
+
export declare const sendMedia: ({ sessionId, to, media, type, caption, fileName, isGroup, answering, }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
16
|
+
export declare const sendVoiceNote: ({ sessionId, to, isGroup, media, ...props }: Omit<SendMediaTypes, "text">) => Promise<proto.WebMessageInfo | undefined>;
|
|
17
|
+
export declare const sendSticker: ({ sessionId, to, isGroup, media, ...props }: SendMediaTypes) => Promise<proto.WebMessageInfo | undefined>;
|
|
18
|
+
/**
|
|
19
|
+
* Give typing effect to target
|
|
20
|
+
*
|
|
21
|
+
* Looks like human typing
|
|
22
|
+
*
|
|
23
|
+
* @param sessionId - Session ID
|
|
24
|
+
* @param to - Target
|
|
25
|
+
* @param duration - Duration in miliseconds typing effect will appear
|
|
26
|
+
* @param isGroup - Whether the chat is a group
|
|
27
|
+
*/
|
|
28
|
+
export declare const sendTyping: ({ sessionId, to, duration, isGroup, }: SendTypingTypes) => Promise<void>;
|
|
29
|
+
/**
|
|
30
|
+
* Mark message as read
|
|
31
|
+
*
|
|
32
|
+
* @param sessionId - Session ID
|
|
33
|
+
* @param key - Message key to mark as read
|
|
34
|
+
*/
|
|
35
|
+
export declare const readMessage: ({ sessionId, key, }: SendReadTypes) => Promise<void>;
|
|
36
|
+
/**
|
|
37
|
+
* Menghapus pesan yang telah dikirim
|
|
38
|
+
*
|
|
39
|
+
* Dapat digunakan untuk menghapus pesan bot sendiri atau menghapus pesan orang lain (jika bot adalah admin di grup)
|
|
40
|
+
*
|
|
41
|
+
* @param sessionId - Session ID
|
|
42
|
+
* @param key - Message key dari pesan yang akan dihapus
|
|
43
|
+
*/
|
|
44
|
+
export declare const deleteMessage: ({ sessionId, key, }: SendReadTypes) => Promise<void>;
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Messaging/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAqB,MAAM,SAAS,CAAC;AAGnD,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,2BAA2B,EAC5B,MAAM,UAAU,CAAC;AAQlB,eAAO,MAAM,eAAe,GAAU,4CAMnC,gBAAgB,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CA8I7D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,GAAU,sDAO9C,2BAA2B,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CAoKxE,CAAC;AAaF,eAAO,MAAM,SAAS,GAAU,wEAS7B,cAAc,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CAqM3D,CAAC;AAEF,eAAO,MAAM,aAAa,GAAU,6CAMjC,IAAI,CAAC,cAAc,EAAE,MAAM,CAAC,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CA6HzE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAU,6CAM/B,cAAc,KAAG,OAAO,CAAC,KAAK,CAAC,cAAc,GAAG,SAAS,CA2H3D,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,UAAU,GAAU,uCAK9B,eAAe,KAAG,OAAO,CAAC,IAAI,CA4EhC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAU,qBAG/B,aAAa,KAAG,OAAO,CAAC,IAAI,CA6B9B,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAU,qBAGjC,aAAa,KAAG,OAAO,CAAC,IAAI,CAsC9B,CAAC"}
|