@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,580 @@
1
+ import { Boom } from "@hapi/boom";
2
+ import { proto } from "../../WAProto/index.js";
3
+ import type {
4
+ AnyMessageContent,
5
+ MediaConnInfo,
6
+ MessageReceiptType,
7
+ MessageRelayOptions,
8
+ MiscMessageGenerationOptions,
9
+ SocketConfig,
10
+ WAMessage,
11
+ WAMessageKey,
12
+ } from "../Types/index.js";
13
+ import { MessageRetryManager } from "../Utils/index.js";
14
+ import {
15
+ type RichMessageOptions,
16
+ type CodeBlockOptions,
17
+ type CodeBlockV2Options,
18
+ type TableV2Options,
19
+ type LinkMessageOptions,
20
+ type LinkV2MessageOptions,
21
+ type LatexOptions,
22
+ type LatexImageOptions,
23
+ type LatexRenderFn,
24
+ type MediaUploadFn,
25
+ type CapturedUnifiedResponse,
26
+ } from "../Utils/rich-messages.js";
27
+ import { type BinaryNode, type JidWithDevice } from "../WABinary/index.js";
28
+ import { USyncQuery } from "../WAUSync/index.js";
29
+ import { BibzWhatsEngine } from "./engine.js";
30
+ export declare const makeMessagesSocket: (config: SocketConfig) => {
31
+ getPrivacyTokens: (jids: string[]) => Promise<any>;
32
+ assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
33
+ relayMessage: (
34
+ jid: string,
35
+ message: proto.IMessage,
36
+ {
37
+ messageId: msgId,
38
+ participant,
39
+ additionalAttributes,
40
+ additionalNodes,
41
+ useUserDevicesCache,
42
+ useCachedGroupMetadata,
43
+ statusJidList,
44
+ }: MessageRelayOptions,
45
+ ) => Promise<string>;
46
+ sendReceipt: (
47
+ jid: string,
48
+ participant: string | undefined,
49
+ messageIds: string[],
50
+ type: MessageReceiptType,
51
+ ) => Promise<void>;
52
+ sendReceipts: (
53
+ keys: WAMessageKey[],
54
+ type: MessageReceiptType,
55
+ ) => Promise<void>;
56
+ bibz: BibzWhatsEngine;
57
+ /** alias kompatibilitas ourin-baileys */
58
+ ourin: BibzWhatsEngine;
59
+ readMessages: (keys: WAMessageKey[]) => Promise<void>;
60
+ refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
61
+ waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
62
+ fetchPrivacySettings: (force?: boolean) => Promise<{
63
+ [_: string]: string;
64
+ }>;
65
+ sendPeerDataOperationMessage: (
66
+ pdoMessage: proto.Message.IPeerDataOperationRequestMessage,
67
+ ) => Promise<string>;
68
+ createParticipantNodes: (
69
+ recipientJids: string[],
70
+ message: proto.IMessage,
71
+ extraAttrs?: BinaryNode["attrs"],
72
+ dsmMessage?: proto.IMessage,
73
+ ) => Promise<{
74
+ nodes: BinaryNode[];
75
+ shouldIncludeDeviceIdentity: boolean;
76
+ }>;
77
+ getUSyncDevices: (
78
+ jids: string[],
79
+ useCache: boolean,
80
+ ignoreZeroDevices: boolean,
81
+ ) => Promise<
82
+ (JidWithDevice & {
83
+ jid: string;
84
+ })[]
85
+ >;
86
+ messageRetryManager: MessageRetryManager | null;
87
+ updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
88
+ updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
89
+ sendStatusMention: (content: any, jids?: string[]) => Promise<WAMessage>;
90
+ swgc: (
91
+ jid: string,
92
+ content: any,
93
+ options?: Record<string, any>,
94
+ ) => Promise<any>;
95
+ sendPreview: (
96
+ jid: string,
97
+ preview: {
98
+ caption?: string;
99
+ text?: string;
100
+ url?: string;
101
+ matchedText?: string;
102
+ title?: string;
103
+ description?: string;
104
+ image?: Buffer | string;
105
+ jpegThumbnail?: Buffer;
106
+ previewType?: number;
107
+ thumbnailHeight?: number;
108
+ thumbnailWidth?: number;
109
+ inviteLinkGroupTypeV2?: string;
110
+ },
111
+ options?: {
112
+ quoted?: any;
113
+ contextInfo?: any;
114
+ },
115
+ ) => Promise<any>;
116
+ sendTable: (
117
+ jid: string,
118
+ title: string,
119
+ headers: string[],
120
+ rows: string[][],
121
+ quoted?: any,
122
+ options?: RichMessageOptions,
123
+ ) => Promise<{
124
+ message: any;
125
+ messageId: string;
126
+ }>;
127
+ sendTableV2: (
128
+ jid: string,
129
+ table: string[],
130
+ quoted?: any,
131
+ options?: TableV2Options,
132
+ ) => Promise<{
133
+ message: any;
134
+ messageId: string;
135
+ }>;
136
+ sendList: (
137
+ jid: string,
138
+ title: string,
139
+ items: (string | string[])[],
140
+ quoted?: any,
141
+ options?: RichMessageOptions,
142
+ ) => Promise<{
143
+ message: any;
144
+ messageId: string;
145
+ }>;
146
+ sendCodeBlock: (
147
+ jid: string,
148
+ code: string,
149
+ quoted?: any,
150
+ options?: CodeBlockOptions,
151
+ ) => Promise<{
152
+ message: any;
153
+ messageId: string;
154
+ }>;
155
+ sendCodeBlockV2: (
156
+ jid: string,
157
+ code: string,
158
+ quoted?: any,
159
+ options?: CodeBlockV2Options,
160
+ ) => Promise<{
161
+ message: any;
162
+ messageId: string;
163
+ }>;
164
+ sendLink: (
165
+ jid: string,
166
+ text: string,
167
+ links: (string | { url: string; displayName?: string })[],
168
+ quoted?: any,
169
+ options?: LinkMessageOptions,
170
+ ) => Promise<{
171
+ message: any;
172
+ messageId: string;
173
+ }>;
174
+ sendLinkV2: (
175
+ jid: string,
176
+ text: string,
177
+ links: (
178
+ | string
179
+ | {
180
+ url: string;
181
+ displayName?: string;
182
+ sourceDisplayName?: string;
183
+ sourceSubtitle?: string;
184
+ }
185
+ )[],
186
+ quoted?: any,
187
+ options?: LinkV2MessageOptions,
188
+ ) => Promise<{
189
+ message: any;
190
+ messageId: string;
191
+ }>;
192
+ sendLatex: (
193
+ jid: string,
194
+ quoted: any,
195
+ options: LatexOptions,
196
+ ) => Promise<{
197
+ message: any;
198
+ messageId: string;
199
+ }>;
200
+ sendLatexImage: (
201
+ jid: string,
202
+ quoted: any,
203
+ options: LatexImageOptions,
204
+ renderLatexToPng: LatexRenderFn,
205
+ uploadFn: MediaUploadFn,
206
+ ) => Promise<{
207
+ message: any;
208
+ messageId: string;
209
+ }>;
210
+ sendLatexInlineImage: (
211
+ jid: string,
212
+ quoted: any,
213
+ options: LatexImageOptions,
214
+ renderLatexToPng: LatexRenderFn,
215
+ uploadFn: MediaUploadFn,
216
+ ) => Promise<{
217
+ message: any;
218
+ messageId: string;
219
+ }>;
220
+ captureUnifiedResponse: (
221
+ msg: proto.IMessage,
222
+ ) => CapturedUnifiedResponse | null;
223
+ sendUnifiedResponse: (
224
+ jid: string,
225
+ quoted: any,
226
+ captured: CapturedUnifiedResponse,
227
+ ) => Promise<{
228
+ message: any;
229
+ messageId: string;
230
+ }>;
231
+ sendRichMessage: (
232
+ jid: string,
233
+ submessages: proto.IAIRichResponseSubMessage[],
234
+ quoted?: any,
235
+ options?: {},
236
+ ) => Promise<{
237
+ message: any;
238
+ messageId: string;
239
+ }>;
240
+ sendMessage: (
241
+ jid: string,
242
+ content: AnyMessageContent,
243
+ options?: MiscMessageGenerationOptions,
244
+ ) => Promise<any>;
245
+ newsletterFetchAllSubscribe: () => Promise<unknown>;
246
+ newsletterMultipleFollow: (jids: string) => Promise<void>;
247
+ newsletterAction: (jid: string, type: string) => Promise<void>;
248
+ cekIDSaluran: (url: string) => Promise<{
249
+ id: any;
250
+ state: any;
251
+ creation_time: number;
252
+ name: any;
253
+ description: any;
254
+ invite: any;
255
+ picture: string;
256
+ preview: string;
257
+ subscribers: number;
258
+ verification: any;
259
+ viewer_metadata: any;
260
+ }>;
261
+ newsletterCreate: (
262
+ name: string,
263
+ description?: string,
264
+ ) => Promise<import("../Types/index.js").NewsletterMetadata>;
265
+ newsletterUpdate: (
266
+ jid: string,
267
+ updates: import("../Types/index.js").NewsletterUpdate,
268
+ ) => Promise<unknown>;
269
+ newsletterSubscribers: (jid: string) => Promise<{
270
+ subscribers: number;
271
+ }>;
272
+ newsletterMetadata: (
273
+ type: "invite" | "jid",
274
+ key: string,
275
+ ) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
276
+ newsletterFollow: (jid: string) => Promise<unknown>;
277
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
278
+ newsletterMute: (jid: string) => Promise<unknown>;
279
+ newsletterUnmute: (jid: string) => Promise<unknown>;
280
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
281
+ newsletterUpdateDescription: (
282
+ jid: string,
283
+ description: string,
284
+ ) => Promise<unknown>;
285
+ newsletterUpdatePicture: (
286
+ jid: string,
287
+ content: import("../Types/index.js").WAMediaUpload,
288
+ ) => Promise<unknown>;
289
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
290
+ newsletterReactMessage: (
291
+ jid: string,
292
+ serverId: string,
293
+ reaction?: string,
294
+ ) => Promise<void>;
295
+ newsletterFetchMessages: (
296
+ jid: string,
297
+ count: number,
298
+ since: number,
299
+ after: number,
300
+ ) => Promise<any>;
301
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
302
+ duration: string;
303
+ } | null>;
304
+ newsletterAdminCount: (jid: string) => Promise<number>;
305
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
306
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
307
+ newsletterDelete: (jid: string) => Promise<void>;
308
+ groupMetadata: (
309
+ jid: string,
310
+ ) => Promise<import("../Types/index.js").GroupMetadata>;
311
+ groupCreate: (
312
+ subject: string,
313
+ participants: string[],
314
+ ) => Promise<import("../Types/index.js").GroupMetadata>;
315
+ groupLeave: (id: string) => Promise<void>;
316
+ groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
317
+ groupRequestParticipantsList: (jid: string) => Promise<
318
+ {
319
+ [key: string]: string;
320
+ }[]
321
+ >;
322
+ groupRequestParticipantsUpdate: (
323
+ jid: string,
324
+ participants: string[],
325
+ action: "approve" | "reject",
326
+ ) => Promise<
327
+ {
328
+ status: string;
329
+ jid: string | undefined;
330
+ }[]
331
+ >;
332
+ groupParticipantsUpdate: (
333
+ jid: string,
334
+ participants: string[],
335
+ action: import("../Types/index.js").ParticipantAction,
336
+ ) => Promise<
337
+ {
338
+ status: string;
339
+ jid: string | undefined;
340
+ content: BinaryNode;
341
+ }[]
342
+ >;
343
+ groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
344
+ groupInviteCode: (jid: string) => Promise<string | undefined>;
345
+ groupRevokeInvite: (jid: string) => Promise<string | undefined>;
346
+ groupAcceptInvite: (code: string) => Promise<string | undefined>;
347
+ groupRevokeInviteV4: (
348
+ groupJid: string,
349
+ invitedJid: string,
350
+ ) => Promise<boolean>;
351
+ groupAcceptInviteV4: (
352
+ key: string | WAMessageKey,
353
+ inviteMessage: proto.Message.IGroupInviteMessage,
354
+ ) => Promise<any>;
355
+ groupGetInviteInfo: (
356
+ code: string,
357
+ ) => Promise<import("../Types/index.js").GroupMetadata>;
358
+ groupToggleEphemeral: (
359
+ jid: string,
360
+ ephemeralExpiration: number,
361
+ ) => Promise<void>;
362
+ groupSettingUpdate: (
363
+ jid: string,
364
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
365
+ ) => Promise<void>;
366
+ groupMemberAddMode: (
367
+ jid: string,
368
+ mode: "admin_add" | "all_member_add",
369
+ ) => Promise<void>;
370
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
371
+ groupFetchAllParticipating: () => Promise<{
372
+ [_: string]: import("../Types/index.js").GroupMetadata;
373
+ }>;
374
+ createCallLink: (
375
+ type: "audio" | "video",
376
+ event?: {
377
+ startTime: number;
378
+ },
379
+ timeoutMs?: number,
380
+ ) => Promise<string | undefined>;
381
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
382
+ messageMutex: {
383
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
384
+ };
385
+ receiptMutex: {
386
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
387
+ };
388
+ appStatePatchMutex: {
389
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
390
+ };
391
+ notificationMutex: {
392
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
393
+ };
394
+ upsertMessage: (
395
+ msg: WAMessage,
396
+ type: import("../Types/index.js").MessageUpsertType,
397
+ ) => Promise<void>;
398
+ appPatch: (
399
+ patchCreate: import("../Types/index.js").WAPatchCreate,
400
+ ) => Promise<void>;
401
+ sendPresenceUpdate: (
402
+ type: import("../Types/index.js").WAPresence,
403
+ toJid?: string,
404
+ ) => Promise<void>;
405
+ presenceSubscribe: (toJid: string) => Promise<void>;
406
+ profilePictureUrl: (
407
+ jid: string,
408
+ type?: "preview" | "image",
409
+ timeoutMs?: number,
410
+ ) => Promise<string | undefined>;
411
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
412
+ fetchStatus: (
413
+ ...jids: string[]
414
+ ) => Promise<
415
+ import("../WAUSync/index.js").USyncQueryResultList[] | undefined
416
+ >;
417
+ fetchDisappearingDuration: (
418
+ ...jids: string[]
419
+ ) => Promise<
420
+ import("../WAUSync/index.js").USyncQueryResultList[] | undefined
421
+ >;
422
+ updateProfilePicture: (
423
+ jid: string,
424
+ content: import("../Types/index.js").WAMediaUpload,
425
+ dimensions?: {
426
+ width: number;
427
+ height: number;
428
+ },
429
+ ) => Promise<void>;
430
+ removeProfilePicture: (jid: string) => Promise<void>;
431
+ updateProfileStatus: (status: string) => Promise<void>;
432
+ updateProfileName: (name: string) => Promise<void>;
433
+ updateBlockStatus: (
434
+ jid: string,
435
+ action: "block" | "unblock",
436
+ ) => Promise<void>;
437
+ updateDisableLinkPreviewsPrivacy: (
438
+ isPreviewsDisabled: boolean,
439
+ ) => Promise<void>;
440
+ updateCallPrivacy: (
441
+ value: import("../Types/index.js").WAPrivacyCallValue,
442
+ ) => Promise<void>;
443
+ updateMessagesPrivacy: (
444
+ value: import("../Types/index.js").WAPrivacyMessagesValue,
445
+ ) => Promise<void>;
446
+ updateLastSeenPrivacy: (
447
+ value: import("../Types/index.js").WAPrivacyValue,
448
+ ) => Promise<void>;
449
+ updateOnlinePrivacy: (
450
+ value: import("../Types/index.js").WAPrivacyOnlineValue,
451
+ ) => Promise<void>;
452
+ updateProfilePicturePrivacy: (
453
+ value: import("../Types/index.js").WAPrivacyValue,
454
+ ) => Promise<void>;
455
+ updateStatusPrivacy: (
456
+ value: import("../Types/index.js").WAPrivacyValue,
457
+ ) => Promise<void>;
458
+ updateReadReceiptsPrivacy: (
459
+ value: import("../Types/index.js").WAReadReceiptsValue,
460
+ ) => Promise<void>;
461
+ updateGroupsAddPrivacy: (
462
+ value: import("../Types/index.js").WAPrivacyGroupAddValue,
463
+ ) => Promise<void>;
464
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
465
+ getBusinessProfile: (
466
+ jid: string,
467
+ ) => Promise<import("../Types/index.js").WABusinessProfile | void>;
468
+ resyncAppState: (
469
+ collections: readonly (
470
+ | "critical_unblock_low"
471
+ | "regular_high"
472
+ | "regular_low"
473
+ | "critical_block"
474
+ | "regular"
475
+ )[],
476
+ isInitialSync: boolean,
477
+ ) => Promise<void>;
478
+ chatModify: (
479
+ mod: import("../Types/index.js").ChatModification,
480
+ jid: string,
481
+ ) => Promise<void>;
482
+ cleanDirtyBits: (
483
+ type: "account_sync" | "groups",
484
+ fromTimestamp?: number | string,
485
+ ) => Promise<void>;
486
+ addOrEditContact: (
487
+ jid: string,
488
+ contact: proto.SyncActionValue.IContactAction,
489
+ ) => Promise<void>;
490
+ removeContact: (jid: string) => Promise<void>;
491
+ addLabel: (
492
+ jid: string,
493
+ labels: import("../Types/Label.js").LabelActionBody,
494
+ ) => Promise<void>;
495
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
496
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
497
+ addMessageLabel: (
498
+ jid: string,
499
+ messageId: string,
500
+ labelId: string,
501
+ ) => Promise<void>;
502
+ removeMessageLabel: (
503
+ jid: string,
504
+ messageId: string,
505
+ labelId: string,
506
+ ) => Promise<void>;
507
+ star: (
508
+ jid: string,
509
+ messages: {
510
+ id: string;
511
+ fromMe?: boolean;
512
+ }[],
513
+ star: boolean,
514
+ ) => Promise<void>;
515
+ addOrEditQuickReply: (
516
+ quickReply: import("../Types/Bussines.js").QuickReplyAction,
517
+ ) => Promise<void>;
518
+ removeQuickReply: (timestamp: string) => Promise<void>;
519
+ type: "md";
520
+ ws: import("./Client/websocket.js").WebSocketClient;
521
+ ev: import("../Types/index.js").BaileysEventEmitter & {
522
+ process(
523
+ handler: (
524
+ events: Partial<import("../Types/index.js").BaileysEventMap>,
525
+ ) => void | Promise<void>,
526
+ ): () => void;
527
+ buffer(): void;
528
+ createBufferedFunction<A extends any[], T>(
529
+ work: (...args: A) => Promise<T>,
530
+ ): (...args: A) => Promise<T>;
531
+ flush(): boolean;
532
+ isBuffering(): boolean;
533
+ };
534
+ authState: {
535
+ creds: import("../Types/index.js").AuthenticationCreds;
536
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
537
+ };
538
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
539
+ user: import("../Types/index.js").Contact | undefined;
540
+ generateMessageTag: () => string;
541
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
542
+ waitForMessage: <T>(
543
+ msgId: string,
544
+ timeoutMs?: number | undefined,
545
+ ) => Promise<T | undefined>;
546
+ waitForSocketOpen: () => Promise<void>;
547
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
548
+ sendNode: (frame: BinaryNode) => Promise<void>;
549
+ logout: (msg?: string) => Promise<void>;
550
+ end: (error: Error | undefined) => Promise<void>;
551
+ onUnexpectedError: (err: Error | Boom, msg: string) => void;
552
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
553
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
554
+ digestKeyBundle: () => Promise<void>;
555
+ rotateSignedPreKey: () => Promise<void>;
556
+ requestPairingCode: (
557
+ phoneNumber: string,
558
+ customPairingCode?: string,
559
+ ) => Promise<string>;
560
+ updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
561
+ sendUnifiedSession: () => Promise<void>;
562
+ wamBuffer: import("../index.js").BinaryInfo;
563
+ waitForConnectionUpdate: (
564
+ check: (
565
+ u: Partial<import("../Types/index.js").ConnectionState>,
566
+ ) => Promise<boolean | undefined>,
567
+ timeoutMs?: number,
568
+ ) => Promise<void>;
569
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
570
+ executeUSyncQuery: (
571
+ usyncQuery: USyncQuery,
572
+ ) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
573
+ onWhatsApp: (...phoneNumber: string[]) => Promise<
574
+ | {
575
+ jid: string;
576
+ exists: boolean;
577
+ }[]
578
+ | undefined
579
+ >;
580
+ };