@zelynskybail/baileys 0.0.0-stage → 2.6.28

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