@xbibzlibrary/whatsbibz 1.3.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.
Files changed (260) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/LICENSE +22 -0
  3. package/LICENSE.upstream +21 -0
  4. package/README.md +280 -0
  5. package/VERIFIKASI-IDENTITAS-2026-09-03.md +138 -0
  6. package/WAProto/GenerateStatics.sh +3 -0
  7. package/WAProto/WAProto.proto +6035 -0
  8. package/WAProto/fix-imports.js +81 -0
  9. package/WAProto/index.d.ts +15314 -0
  10. package/WAProto/index.js +132326 -0
  11. package/assets/logo/README.md +21 -0
  12. package/assets/logo/png/banner-1200x360.png +0 -0
  13. package/assets/logo/png/icon-1024.png +0 -0
  14. package/assets/logo/png/icon-128.png +0 -0
  15. package/assets/logo/png/icon-16.png +0 -0
  16. package/assets/logo/png/icon-24.png +0 -0
  17. package/assets/logo/png/icon-256.png +0 -0
  18. package/assets/logo/png/icon-32.png +0 -0
  19. package/assets/logo/png/icon-48.png +0 -0
  20. package/assets/logo/png/icon-512.png +0 -0
  21. package/assets/logo/png/icon-64.png +0 -0
  22. package/assets/logo/png/mark-512.png +0 -0
  23. package/assets/logo/preview.png +0 -0
  24. package/assets/logo/whatsbibz.ico +0 -0
  25. package/lib/BibzWhats/client.d.ts +95 -0
  26. package/lib/BibzWhats/client.js +501 -0
  27. package/lib/BibzWhats/device-identity.d.ts +60 -0
  28. package/lib/BibzWhats/device-identity.js +234 -0
  29. package/lib/BibzWhats/extract.d.ts +29 -0
  30. package/lib/BibzWhats/extract.js +115 -0
  31. package/lib/BibzWhats/index.d.ts +7 -0
  32. package/lib/BibzWhats/index.js +8 -0
  33. package/lib/BibzWhats/jid.d.ts +22 -0
  34. package/lib/BibzWhats/jid.js +98 -0
  35. package/lib/BibzWhats/pairing.d.ts +35 -0
  36. package/lib/BibzWhats/pairing.js +186 -0
  37. package/lib/BibzWhats/send.d.ts +9 -0
  38. package/lib/BibzWhats/send.js +107 -0
  39. package/lib/BibzWhats/version.d.ts +6 -0
  40. package/lib/BibzWhats/version.js +7 -0
  41. package/lib/Defaults/index.d.ts +73 -0
  42. package/lib/Defaults/index.js +141 -0
  43. package/lib/Modded/message_builder.d.ts +15 -0
  44. package/lib/Modded/message_builder.js +2330 -0
  45. package/lib/Signal/Group/ciphertext-message.d.ts +9 -0
  46. package/lib/Signal/Group/ciphertext-message.js +11 -0
  47. package/lib/Signal/Group/group-session-builder.d.ts +14 -0
  48. package/lib/Signal/Group/group-session-builder.js +29 -0
  49. package/lib/Signal/Group/group_cipher.d.ts +16 -0
  50. package/lib/Signal/Group/group_cipher.js +81 -0
  51. package/lib/Signal/Group/index.d.ts +11 -0
  52. package/lib/Signal/Group/index.js +11 -0
  53. package/lib/Signal/Group/keyhelper.d.ts +10 -0
  54. package/lib/Signal/Group/keyhelper.js +17 -0
  55. package/lib/Signal/Group/sender-chain-key.d.ts +13 -0
  56. package/lib/Signal/Group/sender-chain-key.js +25 -0
  57. package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -0
  58. package/lib/Signal/Group/sender-key-distribution-message.js +62 -0
  59. package/lib/Signal/Group/sender-key-message.d.ts +18 -0
  60. package/lib/Signal/Group/sender-key-message.js +65 -0
  61. package/lib/Signal/Group/sender-key-name.d.ts +17 -0
  62. package/lib/Signal/Group/sender-key-name.js +47 -0
  63. package/lib/Signal/Group/sender-key-record.d.ts +30 -0
  64. package/lib/Signal/Group/sender-key-record.js +40 -0
  65. package/lib/Signal/Group/sender-key-state.d.ts +38 -0
  66. package/lib/Signal/Group/sender-key-state.js +83 -0
  67. package/lib/Signal/Group/sender-message-key.d.ts +11 -0
  68. package/lib/Signal/Group/sender-message-key.js +25 -0
  69. package/lib/Signal/libsignal.d.ts +4 -0
  70. package/lib/Signal/libsignal.js +406 -0
  71. package/lib/Signal/lid-mapping.d.ts +18 -0
  72. package/lib/Signal/lid-mapping.js +276 -0
  73. package/lib/Socket/Client/index.d.ts +2 -0
  74. package/lib/Socket/Client/index.js +2 -0
  75. package/lib/Socket/Client/types.d.ts +15 -0
  76. package/lib/Socket/Client/types.js +10 -0
  77. package/lib/Socket/Client/websocket.d.ts +12 -0
  78. package/lib/Socket/Client/websocket.js +53 -0
  79. package/lib/Socket/business.d.ts +537 -0
  80. package/lib/Socket/business.js +421 -0
  81. package/lib/Socket/chats.d.ts +110 -0
  82. package/lib/Socket/chats.js +1006 -0
  83. package/lib/Socket/communities.d.ts +646 -0
  84. package/lib/Socket/communities.js +430 -0
  85. package/lib/Socket/engine.d.ts +129 -0
  86. package/lib/Socket/engine.js +767 -0
  87. package/lib/Socket/groups.d.ts +149 -0
  88. package/lib/Socket/groups.js +326 -0
  89. package/lib/Socket/index.d.ts +637 -0
  90. package/lib/Socket/index.js +14 -0
  91. package/lib/Socket/messages-recv.d.ts +239 -0
  92. package/lib/Socket/messages-recv.js +1307 -0
  93. package/lib/Socket/messages-send.d.ts +580 -0
  94. package/lib/Socket/messages-send.js +1639 -0
  95. package/lib/Socket/mex.d.ts +2 -0
  96. package/lib/Socket/mex.js +47 -0
  97. package/lib/Socket/newsletter.d.ts +176 -0
  98. package/lib/Socket/newsletter.js +456 -0
  99. package/lib/Socket/socket.d.ts +56 -0
  100. package/lib/Socket/socket.js +998 -0
  101. package/lib/Types/Auth.d.ts +115 -0
  102. package/lib/Types/Auth.js +1 -0
  103. package/lib/Types/Bussines.d.ts +36 -0
  104. package/lib/Types/Bussines.js +1 -0
  105. package/lib/Types/Call.d.ts +14 -0
  106. package/lib/Types/Call.js +1 -0
  107. package/lib/Types/Chat.d.ts +124 -0
  108. package/lib/Types/Chat.js +7 -0
  109. package/lib/Types/Contact.d.ts +23 -0
  110. package/lib/Types/Contact.js +1 -0
  111. package/lib/Types/Events.d.ts +241 -0
  112. package/lib/Types/Events.js +1 -0
  113. package/lib/Types/GroupMetadata.d.ts +67 -0
  114. package/lib/Types/GroupMetadata.js +1 -0
  115. package/lib/Types/Label.d.ts +46 -0
  116. package/lib/Types/Label.js +24 -0
  117. package/lib/Types/LabelAssociation.d.ts +29 -0
  118. package/lib/Types/LabelAssociation.js +6 -0
  119. package/lib/Types/Message.d.ts +427 -0
  120. package/lib/Types/Message.js +10 -0
  121. package/lib/Types/Newsletter.d.ts +134 -0
  122. package/lib/Types/Newsletter.js +30 -0
  123. package/lib/Types/Product.d.ts +78 -0
  124. package/lib/Types/Product.js +1 -0
  125. package/lib/Types/Signal.d.ts +77 -0
  126. package/lib/Types/Signal.js +1 -0
  127. package/lib/Types/Socket.d.ts +173 -0
  128. package/lib/Types/Socket.js +2 -0
  129. package/lib/Types/State.d.ts +38 -0
  130. package/lib/Types/State.js +12 -0
  131. package/lib/Types/USync.d.ts +25 -0
  132. package/lib/Types/USync.js +1 -0
  133. package/lib/Types/index.d.ts +75 -0
  134. package/lib/Types/index.js +32 -0
  135. package/lib/Utils/auth-utils.d.ts +18 -0
  136. package/lib/Utils/auth-utils.js +289 -0
  137. package/lib/Utils/browser-utils.d.ts +3 -0
  138. package/lib/Utils/browser-utils.js +47 -0
  139. package/lib/Utils/business.d.ts +22 -0
  140. package/lib/Utils/business.js +230 -0
  141. package/lib/Utils/chat-utils.d.ts +69 -0
  142. package/lib/Utils/chat-utils.js +811 -0
  143. package/lib/Utils/companion-reg-client-utils.d.ts +20 -0
  144. package/lib/Utils/companion-reg-client-utils.js +66 -0
  145. package/lib/Utils/crypto.d.ts +41 -0
  146. package/lib/Utils/crypto.js +117 -0
  147. package/lib/Utils/decode-wa-message.d.ts +47 -0
  148. package/lib/Utils/decode-wa-message.js +282 -0
  149. package/lib/Utils/event-buffer.d.ts +35 -0
  150. package/lib/Utils/event-buffer.js +590 -0
  151. package/lib/Utils/generics.d.ts +90 -0
  152. package/lib/Utils/generics.js +384 -0
  153. package/lib/Utils/history.d.ts +21 -0
  154. package/lib/Utils/history.js +130 -0
  155. package/lib/Utils/identity-change-handler.d.ts +36 -0
  156. package/lib/Utils/identity-change-handler.js +48 -0
  157. package/lib/Utils/index.d.ts +25 -0
  158. package/lib/Utils/index.js +24 -0
  159. package/lib/Utils/link-preview.d.ts +20 -0
  160. package/lib/Utils/link-preview.js +84 -0
  161. package/lib/Utils/logger.d.ts +12 -0
  162. package/lib/Utils/logger.js +2 -0
  163. package/lib/Utils/lt-hash.d.ts +10 -0
  164. package/lib/Utils/lt-hash.js +7 -0
  165. package/lib/Utils/make-mutex.d.ts +8 -0
  166. package/lib/Utils/make-mutex.js +32 -0
  167. package/lib/Utils/message-retry-manager.d.ts +109 -0
  168. package/lib/Utils/message-retry-manager.js +224 -0
  169. package/lib/Utils/messages-media.d.ts +129 -0
  170. package/lib/Utils/messages-media.js +784 -0
  171. package/lib/Utils/messages.d.ts +90 -0
  172. package/lib/Utils/messages.js +1240 -0
  173. package/lib/Utils/noise-handler.d.ts +19 -0
  174. package/lib/Utils/noise-handler.js +200 -0
  175. package/lib/Utils/offline-node-processor.d.ts +16 -0
  176. package/lib/Utils/offline-node-processor.js +39 -0
  177. package/lib/Utils/platform-identity.d.ts +14 -0
  178. package/lib/Utils/platform-identity.js +148 -0
  179. package/lib/Utils/pre-key-manager.d.ts +27 -0
  180. package/lib/Utils/pre-key-manager.js +105 -0
  181. package/lib/Utils/process-message.d.ts +59 -0
  182. package/lib/Utils/process-message.js +544 -0
  183. package/lib/Utils/reporting-utils.d.ts +10 -0
  184. package/lib/Utils/reporting-utils.js +257 -0
  185. package/lib/Utils/rich-messages.d.ts +276 -0
  186. package/lib/Utils/rich-messages.js +1143 -0
  187. package/lib/Utils/signal.d.ts +33 -0
  188. package/lib/Utils/signal.js +158 -0
  189. package/lib/Utils/stanza-ack.d.ts +10 -0
  190. package/lib/Utils/stanza-ack.js +37 -0
  191. package/lib/Utils/sticker-pack.d.ts +10 -0
  192. package/lib/Utils/sticker-pack.js +111 -0
  193. package/lib/Utils/sync-action-utils.d.ts +18 -0
  194. package/lib/Utils/sync-action-utils.js +47 -0
  195. package/lib/Utils/tc-token-utils.d.ts +8 -0
  196. package/lib/Utils/tc-token-utils.js +45 -0
  197. package/lib/Utils/use-multi-file-auth-state.d.ts +12 -0
  198. package/lib/Utils/use-multi-file-auth-state.js +120 -0
  199. package/lib/Utils/validate-connection.d.ts +10 -0
  200. package/lib/Utils/validate-connection.js +222 -0
  201. package/lib/VoIP/audio-feeder.d.ts +15 -0
  202. package/lib/VoIP/audio-feeder.js +136 -0
  203. package/lib/VoIP/index.d.ts +12 -0
  204. package/lib/VoIP/index.js +282 -0
  205. package/lib/VoIP/relay-transport.d.ts +43 -0
  206. package/lib/VoIP/relay-transport.js +559 -0
  207. package/lib/VoIP/signaling.js +603 -0
  208. package/lib/VoIP/types.d.ts +69 -0
  209. package/lib/VoIP/types.js +17 -0
  210. package/lib/VoIP/wasm-engine.d.ts +103 -0
  211. package/lib/VoIP/wasm-engine.js +1214 -0
  212. package/lib/VoIP/worker-bootstrap.js +1042 -0
  213. package/lib/WABinary/constants.d.ts +27 -0
  214. package/lib/WABinary/constants.js +1300 -0
  215. package/lib/WABinary/decode.d.ts +6 -0
  216. package/lib/WABinary/decode.js +261 -0
  217. package/lib/WABinary/encode.d.ts +2 -0
  218. package/lib/WABinary/encode.js +219 -0
  219. package/lib/WABinary/generic-utils.d.ts +16 -0
  220. package/lib/WABinary/generic-utils.js +190 -0
  221. package/lib/WABinary/index.d.ts +5 -0
  222. package/lib/WABinary/index.js +5 -0
  223. package/lib/WABinary/jid-utils.d.ts +47 -0
  224. package/lib/WABinary/jid-utils.js +95 -0
  225. package/lib/WABinary/types.d.ts +18 -0
  226. package/lib/WABinary/types.js +1 -0
  227. package/lib/WAM/BinaryInfo.d.ts +8 -0
  228. package/lib/WAM/BinaryInfo.js +9 -0
  229. package/lib/WAM/constants.d.ts +39 -0
  230. package/lib/WAM/constants.js +22852 -0
  231. package/lib/WAM/encode.d.ts +2 -0
  232. package/lib/WAM/encode.js +149 -0
  233. package/lib/WAM/index.d.ts +3 -0
  234. package/lib/WAM/index.js +3 -0
  235. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
  236. package/lib/WAUSync/Protocols/USyncContactProtocol.js +28 -0
  237. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
  238. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +53 -0
  239. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
  240. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +26 -0
  241. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
  242. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +37 -0
  243. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +25 -0
  244. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +50 -0
  245. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +9 -0
  246. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +28 -0
  247. package/lib/WAUSync/Protocols/index.d.ts +4 -0
  248. package/lib/WAUSync/Protocols/index.js +4 -0
  249. package/lib/WAUSync/USyncQuery.d.ts +28 -0
  250. package/lib/WAUSync/USyncQuery.js +93 -0
  251. package/lib/WAUSync/USyncUser.d.ts +12 -0
  252. package/lib/WAUSync/USyncUser.js +22 -0
  253. package/lib/WAUSync/index.d.ts +3 -0
  254. package/lib/WAUSync/index.js +3 -0
  255. package/lib/assets/wasm/loader.js +5 -0
  256. package/lib/assets/wasm/whatsapp.wasm +0 -0
  257. package/lib/assets/wasm/worker-modules.js +273 -0
  258. package/lib/index.d.ts +21 -0
  259. package/lib/index.js +22 -0
  260. package/package.json +111 -0
@@ -0,0 +1,646 @@
1
+ import { proto } from "../../WAProto/index.js";
2
+ import {
3
+ type GroupMetadata,
4
+ type ParticipantAction,
5
+ type SocketConfig,
6
+ type WAMessageKey,
7
+ } from "../Types/index.js";
8
+ import { type BinaryNode } from "../WABinary/index.js";
9
+ export declare const makeCommunitiesSocket: (config: SocketConfig) => {
10
+ communityMetadata: (jid: string) => Promise<GroupMetadata>;
11
+ communityCreate: (
12
+ subject: string,
13
+ body: string,
14
+ ) => Promise<GroupMetadata | null>;
15
+ communityCreateGroup: (
16
+ subject: string,
17
+ participants: string[],
18
+ parentCommunityJid: string,
19
+ ) => Promise<GroupMetadata | null>;
20
+ communityLeave: (id: string) => Promise<void>;
21
+ communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
22
+ communityLinkGroup: (
23
+ groupJid: string,
24
+ parentCommunityJid: string,
25
+ ) => Promise<void>;
26
+ communityUnlinkGroup: (
27
+ groupJid: string,
28
+ parentCommunityJid: string,
29
+ ) => Promise<void>;
30
+ communityFetchLinkedGroups: (jid: string) => Promise<{
31
+ communityJid: string;
32
+ isCommunity: boolean;
33
+ linkedGroups: {
34
+ id: string | undefined;
35
+ subject: string;
36
+ creation: number | undefined;
37
+ owner: string | undefined;
38
+ size: number | undefined;
39
+ }[];
40
+ }>;
41
+ communityRequestParticipantsList: (jid: string) => Promise<
42
+ {
43
+ [key: string]: string;
44
+ }[]
45
+ >;
46
+ communityRequestParticipantsUpdate: (
47
+ jid: string,
48
+ participants: string[],
49
+ action: "approve" | "reject",
50
+ ) => Promise<
51
+ {
52
+ status: string;
53
+ jid: string | undefined;
54
+ }[]
55
+ >;
56
+ communityParticipantsUpdate: (
57
+ jid: string,
58
+ participants: string[],
59
+ action: ParticipantAction,
60
+ ) => Promise<
61
+ {
62
+ status: string;
63
+ jid: string | undefined;
64
+ content: BinaryNode;
65
+ }[]
66
+ >;
67
+ communityUpdateDescription: (
68
+ jid: string,
69
+ description?: string,
70
+ ) => Promise<void>;
71
+ communityInviteCode: (jid: string) => Promise<string | undefined>;
72
+ communityRevokeInvite: (jid: string) => Promise<string | undefined>;
73
+ communityAcceptInvite: (code: string) => Promise<string | undefined>;
74
+ /**
75
+ * revoke a v4 invite for someone
76
+ * @param communityJid community jid
77
+ * @param invitedJid jid of person you invited
78
+ * @returns true if successful
79
+ */
80
+ communityRevokeInviteV4: (
81
+ communityJid: string,
82
+ invitedJid: string,
83
+ ) => Promise<boolean>;
84
+ /**
85
+ * accept a CommunityInviteMessage
86
+ * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
87
+ * @param inviteMessage the message to accept
88
+ */
89
+ communityAcceptInviteV4: (
90
+ key: string | WAMessageKey,
91
+ inviteMessage: proto.Message.IGroupInviteMessage,
92
+ ) => Promise<any>;
93
+ communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
94
+ communityToggleEphemeral: (
95
+ jid: string,
96
+ ephemeralExpiration: number,
97
+ ) => Promise<void>;
98
+ communitySettingUpdate: (
99
+ jid: string,
100
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
101
+ ) => Promise<void>;
102
+ communityMemberAddMode: (
103
+ jid: string,
104
+ mode: "admin_add" | "all_member_add",
105
+ ) => Promise<void>;
106
+ communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
107
+ communityFetchAllParticipating: () => Promise<{
108
+ [_: string]: GroupMetadata;
109
+ }>;
110
+ logger: import("../Utils/logger.js").ILogger;
111
+ getOrderDetails: (
112
+ orderId: string,
113
+ tokenBase64: string,
114
+ ) => Promise<import("../Types/index.js").OrderDetails>;
115
+ getCatalog: ({
116
+ jid,
117
+ limit,
118
+ cursor,
119
+ }: import("../Types/index.js").GetCatalogOptions) => Promise<{
120
+ products: import("../Types/index.js").Product[];
121
+ nextPageCursor: string | undefined;
122
+ }>;
123
+ getCollections: (
124
+ jid?: string,
125
+ limit?: number,
126
+ ) => Promise<{
127
+ collections: import("../Types/index.js").CatalogCollection[];
128
+ }>;
129
+ productCreate: (
130
+ create: import("../Types/index.js").ProductCreate,
131
+ ) => Promise<import("../Types/index.js").Product>;
132
+ productDelete: (productIds: string[]) => Promise<{
133
+ deleted: number;
134
+ }>;
135
+ productUpdate: (
136
+ productId: string,
137
+ update: import("../Types/index.js").ProductUpdate,
138
+ ) => Promise<import("../Types/index.js").Product>;
139
+ updateBusinessProfile: (
140
+ args: import("../Types/Bussines.js").UpdateBusinessProfileProps,
141
+ ) => Promise<any>;
142
+ updateBussinesProfile: (
143
+ args: import("../Types/Bussines.js").UpdateBussinesProfileProps,
144
+ ) => Promise<any>;
145
+ updateCoverPhoto: (
146
+ photo: import("../Types/index.js").WAMediaUpload,
147
+ ) => Promise<number>;
148
+ removeCoverPhoto: (id: string) => Promise<any>;
149
+ sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
150
+ sendRetryRequest: (
151
+ node: BinaryNode,
152
+ forceIncludeKeys?: boolean,
153
+ ) => Promise<void>;
154
+ rejectCall: (callId: string, callFrom: string) => Promise<void>;
155
+ fetchMessageHistory: (
156
+ count: number,
157
+ oldestMsgKey: WAMessageKey,
158
+ oldestMsgTimestamp: number | import("long").default,
159
+ ) => Promise<string>;
160
+ requestPlaceholderResend: (
161
+ messageKey: WAMessageKey,
162
+ msgData?: Partial<import("../Types/index.js").WAMessage>,
163
+ ) => Promise<string | undefined>;
164
+ messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
165
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
166
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
167
+ relayMessage: (
168
+ jid: string,
169
+ message: proto.IMessage,
170
+ {
171
+ messageId: msgId,
172
+ participant,
173
+ additionalAttributes,
174
+ additionalNodes,
175
+ useUserDevicesCache,
176
+ useCachedGroupMetadata,
177
+ statusJidList,
178
+ }: import("../Types/index.js").MessageRelayOptions,
179
+ ) => Promise<string>;
180
+ sendReceipt: (
181
+ jid: string,
182
+ participant: string | undefined,
183
+ messageIds: string[],
184
+ type: import("../Types/index.js").MessageReceiptType,
185
+ ) => Promise<void>;
186
+ sendReceipts: (
187
+ keys: WAMessageKey[],
188
+ type: import("../Types/index.js").MessageReceiptType,
189
+ ) => Promise<void>;
190
+ bibz: import("./engine.js").BibzWhatsEngine;
191
+ /** alias kompatibilitas ourin-baileys */
192
+ ourin: import("./engine.js").BibzWhatsEngine;
193
+ readMessages: (keys: WAMessageKey[]) => Promise<void>;
194
+ refreshMediaConn: (
195
+ forceGet?: boolean,
196
+ ) => Promise<import("../Types/index.js").MediaConnInfo>;
197
+ waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
198
+ fetchPrivacySettings: (force?: boolean) => Promise<{
199
+ [_: string]: string;
200
+ }>;
201
+ sendPeerDataOperationMessage: (
202
+ pdoMessage: proto.Message.IPeerDataOperationRequestMessage,
203
+ ) => Promise<string>;
204
+ createParticipantNodes: (
205
+ recipientJids: string[],
206
+ message: proto.IMessage,
207
+ extraAttrs?: BinaryNode["attrs"],
208
+ dsmMessage?: proto.IMessage,
209
+ ) => Promise<{
210
+ nodes: BinaryNode[];
211
+ shouldIncludeDeviceIdentity: boolean;
212
+ }>;
213
+ getUSyncDevices: (
214
+ jids: string[],
215
+ useCache: boolean,
216
+ ignoreZeroDevices: boolean,
217
+ ) => Promise<
218
+ (import("../WABinary/index.js").JidWithDevice & {
219
+ jid: string;
220
+ })[]
221
+ >;
222
+ updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
223
+ updateMediaMessage: (
224
+ message: import("../Types/index.js").WAMessage,
225
+ ) => Promise<import("../Types/index.js").WAMessage>;
226
+ sendStatusMention: (
227
+ content: any,
228
+ jids?: string[],
229
+ ) => Promise<import("../Types/index.js").WAMessage>;
230
+ sendTable: (
231
+ jid: string,
232
+ title: string,
233
+ headers: string[],
234
+ rows: string[][],
235
+ quoted?: any,
236
+ options?: import("../Utils/index.js").RichMessageOptions,
237
+ ) => Promise<{
238
+ message: any;
239
+ messageId: string;
240
+ }>;
241
+ sendList: (
242
+ jid: string,
243
+ title: string,
244
+ items: (string | string[])[],
245
+ quoted?: any,
246
+ options?: import("../Utils/index.js").RichMessageOptions,
247
+ ) => Promise<{
248
+ message: any;
249
+ messageId: string;
250
+ }>;
251
+ sendCodeBlock: (
252
+ jid: string,
253
+ code: string,
254
+ quoted?: any,
255
+ options?: import("../Utils/index.js").CodeBlockOptions,
256
+ ) => Promise<{
257
+ message: any;
258
+ messageId: string;
259
+ }>;
260
+ sendLatex: (
261
+ jid: string,
262
+ quoted: any,
263
+ options: import("../Utils/index.js").LatexOptions,
264
+ ) => Promise<{
265
+ message: any;
266
+ messageId: string;
267
+ }>;
268
+ sendLatexImage: (
269
+ jid: string,
270
+ quoted: any,
271
+ options: import("../Utils/index.js").LatexImageOptions,
272
+ renderLatexToPng: import("../Utils/index.js").LatexRenderFn,
273
+ uploadFn: import("../Utils/index.js").MediaUploadFn,
274
+ ) => Promise<{
275
+ message: any;
276
+ messageId: string;
277
+ }>;
278
+ sendLatexInlineImage: (
279
+ jid: string,
280
+ quoted: any,
281
+ options: import("../Utils/index.js").LatexImageOptions,
282
+ renderLatexToPng: import("../Utils/index.js").LatexRenderFn,
283
+ uploadFn: import("../Utils/index.js").MediaUploadFn,
284
+ ) => Promise<{
285
+ message: any;
286
+ messageId: string;
287
+ }>;
288
+ captureUnifiedResponse: (
289
+ msg: proto.IMessage,
290
+ ) => import("../Utils/index.js").CapturedUnifiedResponse | null;
291
+ sendUnifiedResponse: (
292
+ jid: string,
293
+ quoted: any,
294
+ captured: import("../Utils/index.js").CapturedUnifiedResponse,
295
+ ) => Promise<{
296
+ message: any;
297
+ messageId: string;
298
+ }>;
299
+ sendRichMessage: (
300
+ jid: string,
301
+ submessages: proto.IAIRichResponseSubMessage[],
302
+ quoted?: any,
303
+ options?: {},
304
+ ) => Promise<{
305
+ message: any;
306
+ messageId: string;
307
+ }>;
308
+ sendMessage: (
309
+ jid: string,
310
+ content: import("../Types/index.js").AnyMessageContent,
311
+ options?: import("../Types/index.js").MiscMessageGenerationOptions,
312
+ ) => Promise<any>;
313
+ newsletterFetchAllSubscribe: () => Promise<unknown>;
314
+ newsletterMultipleFollow: (jids: string) => Promise<void>;
315
+ newsletterAction: (jid: string, type: string) => Promise<void>;
316
+ cekIDSaluran: (url: string) => Promise<{
317
+ id: any;
318
+ state: any;
319
+ creation_time: number;
320
+ name: any;
321
+ description: any;
322
+ invite: any;
323
+ picture: string;
324
+ preview: string;
325
+ subscribers: number;
326
+ verification: any;
327
+ viewer_metadata: any;
328
+ }>;
329
+ newsletterCreate: (
330
+ name: string,
331
+ description?: string,
332
+ ) => Promise<import("../Types/index.js").NewsletterMetadata>;
333
+ newsletterUpdate: (
334
+ jid: string,
335
+ updates: import("../Types/index.js").NewsletterUpdate,
336
+ ) => Promise<unknown>;
337
+ newsletterSubscribers: (jid: string) => Promise<{
338
+ subscribers: number;
339
+ }>;
340
+ newsletterMetadata: (
341
+ type: "invite" | "jid",
342
+ key: string,
343
+ ) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
344
+ newsletterFollow: (jid: string) => Promise<unknown>;
345
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
346
+ newsletterMute: (jid: string) => Promise<unknown>;
347
+ newsletterUnmute: (jid: string) => Promise<unknown>;
348
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
349
+ newsletterUpdateDescription: (
350
+ jid: string,
351
+ description: string,
352
+ ) => Promise<unknown>;
353
+ newsletterUpdatePicture: (
354
+ jid: string,
355
+ content: import("../Types/index.js").WAMediaUpload,
356
+ ) => Promise<unknown>;
357
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
358
+ newsletterReactMessage: (
359
+ jid: string,
360
+ serverId: string,
361
+ reaction?: string,
362
+ ) => Promise<void>;
363
+ newsletterFetchMessages: (
364
+ jid: string,
365
+ count: number,
366
+ since: number,
367
+ after: number,
368
+ ) => Promise<any>;
369
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
370
+ duration: string;
371
+ } | null>;
372
+ newsletterAdminCount: (jid: string) => Promise<number>;
373
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
374
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
375
+ newsletterDelete: (jid: string) => Promise<void>;
376
+ groupMetadata: (jid: string) => Promise<GroupMetadata>;
377
+ groupCreate: (
378
+ subject: string,
379
+ participants: string[],
380
+ ) => Promise<GroupMetadata>;
381
+ groupLeave: (id: string) => Promise<void>;
382
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
383
+ groupRequestParticipantsList: (jid: string) => Promise<
384
+ {
385
+ [key: string]: string;
386
+ }[]
387
+ >;
388
+ groupRequestParticipantsUpdate: (
389
+ jid: string,
390
+ participants: string[],
391
+ action: "approve" | "reject",
392
+ ) => Promise<
393
+ {
394
+ status: string;
395
+ jid: string | undefined;
396
+ }[]
397
+ >;
398
+ groupParticipantsUpdate: (
399
+ jid: string,
400
+ participants: string[],
401
+ action: ParticipantAction,
402
+ ) => Promise<
403
+ {
404
+ status: string;
405
+ jid: string | undefined;
406
+ content: BinaryNode;
407
+ }[]
408
+ >;
409
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
410
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
411
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
412
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
413
+ groupRevokeInviteV4: (
414
+ groupJid: string,
415
+ invitedJid: string,
416
+ ) => Promise<boolean>;
417
+ groupAcceptInviteV4: (
418
+ key: string | WAMessageKey,
419
+ inviteMessage: proto.Message.IGroupInviteMessage,
420
+ ) => Promise<any>;
421
+ groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
422
+ groupToggleEphemeral: (
423
+ jid: string,
424
+ ephemeralExpiration: number,
425
+ ) => Promise<void>;
426
+ groupSettingUpdate: (
427
+ jid: string,
428
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
429
+ ) => Promise<void>;
430
+ groupMemberAddMode: (
431
+ jid: string,
432
+ mode: "admin_add" | "all_member_add",
433
+ ) => Promise<void>;
434
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
435
+ groupFetchAllParticipating: () => Promise<{
436
+ [_: string]: GroupMetadata;
437
+ }>;
438
+ createCallLink: (
439
+ type: "audio" | "video",
440
+ event?: {
441
+ startTime: number;
442
+ },
443
+ timeoutMs?: number,
444
+ ) => Promise<string | undefined>;
445
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
446
+ messageMutex: {
447
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
448
+ };
449
+ receiptMutex: {
450
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
451
+ };
452
+ appStatePatchMutex: {
453
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
454
+ };
455
+ notificationMutex: {
456
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
457
+ };
458
+ upsertMessage: (
459
+ msg: import("../Types/index.js").WAMessage,
460
+ type: import("../Types/index.js").MessageUpsertType,
461
+ ) => Promise<void>;
462
+ appPatch: (
463
+ patchCreate: import("../Types/index.js").WAPatchCreate,
464
+ ) => Promise<void>;
465
+ sendPresenceUpdate: (
466
+ type: import("../Types/index.js").WAPresence,
467
+ toJid?: string,
468
+ ) => Promise<void>;
469
+ presenceSubscribe: (toJid: string) => Promise<void>;
470
+ profilePictureUrl: (
471
+ jid: string,
472
+ type?: "preview" | "image",
473
+ timeoutMs?: number,
474
+ ) => Promise<string | undefined>;
475
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
476
+ fetchStatus: (
477
+ ...jids: string[]
478
+ ) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
479
+ fetchDisappearingDuration: (
480
+ ...jids: string[]
481
+ ) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
482
+ updateProfilePicture: (
483
+ jid: string,
484
+ content: import("../Types/index.js").WAMediaUpload,
485
+ dimensions?: {
486
+ width: number;
487
+ height: number;
488
+ },
489
+ ) => Promise<void>;
490
+ removeProfilePicture: (jid: string) => Promise<void>;
491
+ updateProfileStatus: (status: string) => Promise<void>;
492
+ updateProfileName: (name: string) => Promise<void>;
493
+ updateBlockStatus: (
494
+ jid: string,
495
+ action: "block" | "unblock",
496
+ ) => Promise<void>;
497
+ updateDisableLinkPreviewsPrivacy: (
498
+ isPreviewsDisabled: boolean,
499
+ ) => Promise<void>;
500
+ updateCallPrivacy: (
501
+ value: import("../Types/index.js").WAPrivacyCallValue,
502
+ ) => Promise<void>;
503
+ updateMessagesPrivacy: (
504
+ value: import("../Types/index.js").WAPrivacyMessagesValue,
505
+ ) => Promise<void>;
506
+ updateLastSeenPrivacy: (
507
+ value: import("../Types/index.js").WAPrivacyValue,
508
+ ) => Promise<void>;
509
+ updateOnlinePrivacy: (
510
+ value: import("../Types/index.js").WAPrivacyOnlineValue,
511
+ ) => Promise<void>;
512
+ updateProfilePicturePrivacy: (
513
+ value: import("../Types/index.js").WAPrivacyValue,
514
+ ) => Promise<void>;
515
+ updateStatusPrivacy: (
516
+ value: import("../Types/index.js").WAPrivacyValue,
517
+ ) => Promise<void>;
518
+ updateReadReceiptsPrivacy: (
519
+ value: import("../Types/index.js").WAReadReceiptsValue,
520
+ ) => Promise<void>;
521
+ updateGroupsAddPrivacy: (
522
+ value: import("../Types/index.js").WAPrivacyGroupAddValue,
523
+ ) => Promise<void>;
524
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
525
+ getBusinessProfile: (
526
+ jid: string,
527
+ ) => Promise<import("../Types/index.js").WABusinessProfile | void>;
528
+ resyncAppState: (
529
+ collections: readonly (
530
+ | "critical_unblock_low"
531
+ | "regular_high"
532
+ | "regular_low"
533
+ | "critical_block"
534
+ | "regular"
535
+ )[],
536
+ isInitialSync: boolean,
537
+ ) => Promise<void>;
538
+ chatModify: (
539
+ mod: import("../Types/index.js").ChatModification,
540
+ jid: string,
541
+ ) => Promise<void>;
542
+ cleanDirtyBits: (
543
+ type: "account_sync" | "groups",
544
+ fromTimestamp?: number | string,
545
+ ) => Promise<void>;
546
+ addOrEditContact: (
547
+ jid: string,
548
+ contact: proto.SyncActionValue.IContactAction,
549
+ ) => Promise<void>;
550
+ removeContact: (jid: string) => Promise<void>;
551
+ addLabel: (
552
+ jid: string,
553
+ labels: import("../Types/Label.js").LabelActionBody,
554
+ ) => Promise<void>;
555
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
556
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
557
+ addMessageLabel: (
558
+ jid: string,
559
+ messageId: string,
560
+ labelId: string,
561
+ ) => Promise<void>;
562
+ removeMessageLabel: (
563
+ jid: string,
564
+ messageId: string,
565
+ labelId: string,
566
+ ) => Promise<void>;
567
+ star: (
568
+ jid: string,
569
+ messages: {
570
+ id: string;
571
+ fromMe?: boolean;
572
+ }[],
573
+ star: boolean,
574
+ ) => Promise<void>;
575
+ addOrEditQuickReply: (
576
+ quickReply: import("../Types/Bussines.js").QuickReplyAction,
577
+ ) => Promise<void>;
578
+ removeQuickReply: (timestamp: string) => Promise<void>;
579
+ type: "md";
580
+ ws: import("./Client/websocket.js").WebSocketClient;
581
+ ev: import("../Types/index.js").BaileysEventEmitter & {
582
+ process(
583
+ handler: (
584
+ events: Partial<import("../Types/index.js").BaileysEventMap>,
585
+ ) => void | Promise<void>,
586
+ ): () => void;
587
+ buffer(): void;
588
+ createBufferedFunction<A extends any[], T>(
589
+ work: (...args: A) => Promise<T>,
590
+ ): (...args: A) => Promise<T>;
591
+ flush(): boolean;
592
+ isBuffering(): boolean;
593
+ };
594
+ authState: {
595
+ creds: import("../Types/index.js").AuthenticationCreds;
596
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
597
+ };
598
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
599
+ user: import("../Types/index.js").Contact | undefined;
600
+ generateMessageTag: () => string;
601
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
602
+ waitForMessage: <T>(
603
+ msgId: string,
604
+ timeoutMs?: number | undefined,
605
+ ) => Promise<T | undefined>;
606
+ waitForSocketOpen: () => Promise<void>;
607
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
608
+ sendNode: (frame: BinaryNode) => Promise<void>;
609
+ logout: (msg?: string) => Promise<void>;
610
+ end: (error: Error | undefined) => Promise<void>;
611
+ onUnexpectedError: (
612
+ err: Error | import("@hapi/boom").Boom,
613
+ msg: string,
614
+ ) => void;
615
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
616
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
617
+ digestKeyBundle: () => Promise<void>;
618
+ rotateSignedPreKey: () => Promise<void>;
619
+ requestPairingCode: (
620
+ phoneNumber: string,
621
+ customPairingCode?: string,
622
+ ) => Promise<string>;
623
+ updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
624
+ sendUnifiedSession: () => Promise<void>;
625
+ wamBuffer: import("../index.js").BinaryInfo;
626
+ waitForConnectionUpdate: (
627
+ check: (
628
+ u: Partial<import("../Types/index.js").ConnectionState>,
629
+ ) => Promise<boolean | undefined>,
630
+ timeoutMs?: number,
631
+ ) => Promise<void>;
632
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
633
+ executeUSyncQuery: (
634
+ usyncQuery: import("../index.js").USyncQuery,
635
+ ) => Promise<import("../index.js").USyncQueryResult | undefined>;
636
+ onWhatsApp: (...phoneNumber: string[]) => Promise<
637
+ | {
638
+ jid: string;
639
+ exists: boolean;
640
+ }[]
641
+ | undefined
642
+ >;
643
+ };
644
+ export declare const extractCommunityMetadata: (
645
+ result: BinaryNode,
646
+ ) => GroupMetadata;