@fer2809fl/baileys 7.0.1 → 7.0.2

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 (273) hide show
  1. package/README.md +259 -595
  2. package/WAProto/WAProto.proto +916 -360
  3. package/WAProto/fix-imports.js +18 -22
  4. package/WAProto/index.d.ts +15471 -8638
  5. package/WAProto/index.js +80576 -45941
  6. package/lib/Defaults/index.d.ts +14 -18
  7. package/lib/Defaults/index.d.ts.map +1 -1
  8. package/lib/Defaults/index.js +110 -115
  9. package/lib/Defaults/index.js.map +1 -1
  10. package/lib/Signal/Group/group_cipher.js.map +1 -1
  11. package/lib/Signal/Group/keyhelper.d.ts.map +1 -1
  12. package/lib/Signal/Group/keyhelper.js.map +1 -1
  13. package/lib/Signal/Group/sender-chain-key.js.map +1 -1
  14. package/lib/Signal/Group/sender-key-message.js.map +1 -1
  15. package/lib/Signal/Group/sender-message-key.js.map +1 -1
  16. package/lib/Signal/libsignal.d.ts.map +1 -1
  17. package/lib/Signal/libsignal.js +17 -45
  18. package/lib/Signal/libsignal.js.map +1 -1
  19. package/lib/Signal/lid-mapping.d.ts +0 -4
  20. package/lib/Signal/lid-mapping.d.ts.map +1 -1
  21. package/lib/Signal/lid-mapping.js +0 -6
  22. package/lib/Signal/lid-mapping.js.map +1 -1
  23. package/lib/Socket/business.d.ts +532 -280
  24. package/lib/Socket/business.d.ts.map +1 -1
  25. package/lib/Socket/business.js +401 -358
  26. package/lib/Socket/chats.d.ts +2 -22
  27. package/lib/Socket/chats.d.ts.map +1 -1
  28. package/lib/Socket/chats.js +43 -314
  29. package/lib/Socket/chats.js.map +1 -1
  30. package/lib/Socket/communities.d.ts +641 -336
  31. package/lib/Socket/communities.d.ts.map +1 -1
  32. package/lib/Socket/communities.js +3 -6
  33. package/lib/Socket/communities.js.map +1 -1
  34. package/lib/Socket/dugong.d.ts +130 -0
  35. package/lib/Socket/dugong.d.ts.map +1 -0
  36. package/lib/Socket/dugong.js +772 -0
  37. package/lib/Socket/dugong.js.map +1 -0
  38. package/lib/Socket/groups.d.ts +2 -23
  39. package/lib/Socket/groups.d.ts.map +1 -1
  40. package/lib/Socket/groups.js +8 -171
  41. package/lib/Socket/groups.js.map +1 -1
  42. package/lib/Socket/index.d.ts +631 -322
  43. package/lib/Socket/index.d.ts.map +1 -1
  44. package/lib/Socket/index.js +12 -9
  45. package/lib/Socket/index.js.map +1 -1
  46. package/lib/Socket/messages-recv.d.ts +52 -84
  47. package/lib/Socket/messages-recv.d.ts.map +1 -1
  48. package/lib/Socket/messages-recv.js +185 -686
  49. package/lib/Socket/messages-recv.js.map +1 -1
  50. package/lib/Socket/messages-send.d.ts +643 -262
  51. package/lib/Socket/messages-send.d.ts.map +1 -1
  52. package/lib/Socket/messages-send.js +1559 -1359
  53. package/lib/Socket/messages-send.js.map +1 -1
  54. package/lib/Socket/mex.d.ts +0 -1
  55. package/lib/Socket/mex.d.ts.map +1 -1
  56. package/lib/Socket/mex.js +8 -22
  57. package/lib/Socket/mex.js.map +1 -1
  58. package/lib/Socket/native-buttons.js +231 -0
  59. package/lib/Socket/newsletter.d.ts +27 -42
  60. package/lib/Socket/newsletter.d.ts.map +1 -1
  61. package/lib/Socket/newsletter.js +439 -402
  62. package/lib/Socket/newsletter.js.map +1 -1
  63. package/lib/Socket/socket.d.ts +2 -6
  64. package/lib/Socket/socket.d.ts.map +1 -1
  65. package/lib/Socket/socket.js +26 -62
  66. package/lib/Socket/socket.js.map +1 -1
  67. package/lib/Types/Auth.d.ts +0 -1
  68. package/lib/Types/Auth.d.ts.map +1 -1
  69. package/lib/Types/Bussines.d.ts +34 -22
  70. package/lib/Types/Call.d.ts +1 -1
  71. package/lib/Types/Call.d.ts.map +1 -1
  72. package/lib/Types/Chat.d.ts +0 -1
  73. package/lib/Types/Chat.d.ts.map +1 -1
  74. package/lib/Types/Contact.d.ts +0 -2
  75. package/lib/Types/Contact.d.ts.map +1 -1
  76. package/lib/Types/Events.d.ts +1 -20
  77. package/lib/Types/Events.d.ts.map +1 -1
  78. package/lib/Types/GroupMetadata.d.ts +1 -4
  79. package/lib/Types/GroupMetadata.d.ts.map +1 -1
  80. package/lib/Types/Message.d.ts +348 -354
  81. package/lib/Types/Message.d.ts.map +1 -1
  82. package/lib/Types/Message.js +0 -4
  83. package/lib/Types/Message.js.map +1 -1
  84. package/lib/Types/{Mex.d.ts → Newsletter.d.ts} +7 -26
  85. package/lib/Types/Newsletter.d.ts.map +1 -0
  86. package/lib/Types/{Mex.js → Newsletter.js} +3 -11
  87. package/lib/Types/Newsletter.js.map +1 -0
  88. package/lib/Types/Signal.d.ts +1 -12
  89. package/lib/Types/Signal.d.ts.map +1 -1
  90. package/lib/Types/Socket.d.ts +148 -135
  91. package/lib/Types/Socket.d.ts.map +1 -1
  92. package/lib/Types/Socket.js.map +1 -1
  93. package/lib/Types/State.d.ts +0 -65
  94. package/lib/Types/State.d.ts.map +1 -1
  95. package/lib/Types/State.js +0 -43
  96. package/lib/Types/State.js.map +1 -1
  97. package/lib/Types/index.d.ts +52 -52
  98. package/lib/Types/index.d.ts.map +1 -1
  99. package/lib/Types/index.js +30 -23
  100. package/lib/Types/index.js.map +1 -1
  101. package/lib/Utils/auth-utils.d.ts +0 -5
  102. package/lib/Utils/auth-utils.d.ts.map +1 -1
  103. package/lib/Utils/auth-utils.js +0 -12
  104. package/lib/Utils/auth-utils.js.map +1 -1
  105. package/lib/Utils/browser-utils.d.ts.map +1 -1
  106. package/lib/Utils/browser-utils.js +0 -1
  107. package/lib/Utils/browser-utils.js.map +1 -1
  108. package/lib/Utils/chat-utils.d.ts +4 -34
  109. package/lib/Utils/chat-utils.d.ts.map +1 -1
  110. package/lib/Utils/chat-utils.js +20 -80
  111. package/lib/Utils/chat-utils.js.map +1 -1
  112. package/lib/Utils/crypto.d.ts +12 -12
  113. package/lib/Utils/crypto.d.ts.map +1 -1
  114. package/lib/Utils/crypto.js.map +1 -1
  115. package/lib/Utils/decode-wa-message.d.ts +0 -18
  116. package/lib/Utils/decode-wa-message.d.ts.map +1 -1
  117. package/lib/Utils/decode-wa-message.js +0 -34
  118. package/lib/Utils/decode-wa-message.js.map +1 -1
  119. package/lib/Utils/event-buffer.d.ts +0 -2
  120. package/lib/Utils/event-buffer.d.ts.map +1 -1
  121. package/lib/Utils/event-buffer.js +1 -49
  122. package/lib/Utils/event-buffer.js.map +1 -1
  123. package/lib/Utils/generics.d.ts +2 -3
  124. package/lib/Utils/generics.d.ts.map +1 -1
  125. package/lib/Utils/generics.js +1 -10
  126. package/lib/Utils/generics.js.map +1 -1
  127. package/lib/Utils/history.d.ts +0 -2
  128. package/lib/Utils/history.d.ts.map +1 -1
  129. package/lib/Utils/history.js +9 -12
  130. package/lib/Utils/history.js.map +1 -1
  131. package/lib/Utils/identity-change-handler.d.ts +0 -7
  132. package/lib/Utils/identity-change-handler.d.ts.map +1 -1
  133. package/lib/Utils/identity-change-handler.js +0 -1
  134. package/lib/Utils/identity-change-handler.js.map +1 -1
  135. package/lib/Utils/index.d.ts +23 -30
  136. package/lib/Utils/index.d.ts.map +1 -1
  137. package/lib/Utils/index.js +2 -9
  138. package/lib/Utils/index.js.map +1 -1
  139. package/lib/Utils/link-preview.js +2 -2
  140. package/lib/Utils/link-preview.js.map +1 -1
  141. package/lib/Utils/message-retry-manager.d.ts +0 -5
  142. package/lib/Utils/message-retry-manager.d.ts.map +1 -1
  143. package/lib/Utils/message-retry-manager.js +0 -40
  144. package/lib/Utils/message-retry-manager.js.map +1 -1
  145. package/lib/Utils/messages-media.d.ts +13 -45
  146. package/lib/Utils/messages-media.d.ts.map +1 -1
  147. package/lib/Utils/messages-media.js +98 -293
  148. package/lib/Utils/messages-media.js.map +1 -1
  149. package/lib/Utils/messages.d.ts +3 -16
  150. package/lib/Utils/messages.d.ts.map +1 -1
  151. package/lib/Utils/messages.js +1123 -1219
  152. package/lib/Utils/messages.js.map +1 -1
  153. package/lib/Utils/noise-handler.d.ts +1 -1
  154. package/lib/Utils/process-message.d.ts.map +1 -1
  155. package/lib/Utils/process-message.js +1 -103
  156. package/lib/Utils/process-message.js.map +1 -1
  157. package/lib/Utils/rich-messages.d.ts +277 -0
  158. package/lib/Utils/rich-messages.d.ts.map +1 -0
  159. package/lib/Utils/rich-messages.js +1144 -0
  160. package/lib/Utils/rich-messages.js.map +1 -0
  161. package/lib/Utils/signal.d.ts +0 -13
  162. package/lib/Utils/signal.d.ts.map +1 -1
  163. package/lib/Utils/signal.js +0 -42
  164. package/lib/Utils/signal.js.map +1 -1
  165. package/lib/Utils/sticker-pack.d.ts +10 -0
  166. package/lib/Utils/sticker-pack.js +111 -0
  167. package/lib/Utils/sync-action-utils.d.ts.map +1 -1
  168. package/lib/Utils/sync-action-utils.js +0 -1
  169. package/lib/Utils/sync-action-utils.js.map +1 -1
  170. package/lib/Utils/tc-token-utils.d.ts +1 -26
  171. package/lib/Utils/tc-token-utils.d.ts.map +1 -1
  172. package/lib/Utils/tc-token-utils.js +5 -151
  173. package/lib/Utils/tc-token-utils.js.map +1 -1
  174. package/lib/Utils/validate-connection.d.ts +0 -1
  175. package/lib/Utils/validate-connection.d.ts.map +1 -1
  176. package/lib/Utils/validate-connection.js +3 -13
  177. package/lib/Utils/validate-connection.js.map +1 -1
  178. package/lib/WABinary/decode.d.ts +1 -1
  179. package/lib/WABinary/decode.d.ts.map +1 -1
  180. package/lib/WABinary/generic-utils.d.ts +3 -1
  181. package/lib/WABinary/generic-utils.d.ts.map +1 -1
  182. package/lib/WABinary/generic-utils.js +78 -0
  183. package/lib/WABinary/generic-utils.js.map +1 -1
  184. package/lib/WABinary/jid-utils.d.ts +0 -11
  185. package/lib/WABinary/jid-utils.d.ts.map +1 -1
  186. package/lib/WABinary/jid-utils.js +0 -33
  187. package/lib/WABinary/jid-utils.js.map +1 -1
  188. package/lib/WAM/encode.d.ts +1 -1
  189. package/lib/WAM/encode.d.ts.map +1 -1
  190. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts.map +1 -1
  191. package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -26
  192. package/lib/WAUSync/Protocols/USyncContactProtocol.js.map +1 -1
  193. package/lib/WAUSync/Protocols/index.d.ts +0 -1
  194. package/lib/WAUSync/Protocols/index.d.ts.map +1 -1
  195. package/lib/WAUSync/Protocols/index.js +0 -1
  196. package/lib/WAUSync/Protocols/index.js.map +1 -1
  197. package/lib/WAUSync/USyncQuery.d.ts +0 -1
  198. package/lib/WAUSync/USyncQuery.d.ts.map +1 -1
  199. package/lib/WAUSync/USyncQuery.js +2 -6
  200. package/lib/WAUSync/USyncQuery.js.map +1 -1
  201. package/lib/WAUSync/USyncUser.d.ts +0 -4
  202. package/lib/WAUSync/USyncUser.d.ts.map +1 -1
  203. package/lib/WAUSync/USyncUser.js +0 -8
  204. package/lib/WAUSync/USyncUser.js.map +1 -1
  205. package/lib/index.d.ts +1 -1
  206. package/lib/index.d.ts.map +1 -1
  207. package/lib/index.js +1 -4
  208. package/lib/index.js.map +1 -1
  209. package/package.json +30 -34
  210. package/LICENSE +0 -21
  211. package/engine-requirements.js +0 -10
  212. package/lib/Socket/smgss.d.ts +0 -119
  213. package/lib/Socket/smgss.d.ts.map +0 -1
  214. package/lib/Socket/smgss.js +0 -453
  215. package/lib/Socket/smgss.js.map +0 -1
  216. package/lib/Store/index.d.ts +0 -4
  217. package/lib/Store/index.d.ts.map +0 -1
  218. package/lib/Store/index.js +0 -4
  219. package/lib/Store/index.js.map +0 -1
  220. package/lib/Store/make-in-memory-store.d.ts +0 -132
  221. package/lib/Store/make-in-memory-store.d.ts.map +0 -1
  222. package/lib/Store/make-in-memory-store.js +0 -450
  223. package/lib/Store/make-in-memory-store.js.map +0 -1
  224. package/lib/Store/make-ordered-dictionary.d.ts +0 -14
  225. package/lib/Store/make-ordered-dictionary.d.ts.map +0 -1
  226. package/lib/Store/make-ordered-dictionary.js +0 -80
  227. package/lib/Store/make-ordered-dictionary.js.map +0 -1
  228. package/lib/Store/object-repository.d.ts +0 -13
  229. package/lib/Store/object-repository.d.ts.map +0 -1
  230. package/lib/Store/object-repository.js +0 -24
  231. package/lib/Store/object-repository.js.map +0 -1
  232. package/lib/Types/Mex.d.ts.map +0 -1
  233. package/lib/Types/Mex.js.map +0 -1
  234. package/lib/Utils/button-handler.d.ts +0 -28
  235. package/lib/Utils/button-handler.d.ts.map +0 -1
  236. package/lib/Utils/button-handler.js +0 -140
  237. package/lib/Utils/button-handler.js.map +0 -1
  238. package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
  239. package/lib/Utils/companion-reg-client-utils.d.ts.map +0 -1
  240. package/lib/Utils/companion-reg-client-utils.js +0 -35
  241. package/lib/Utils/companion-reg-client-utils.js.map +0 -1
  242. package/lib/Utils/interactive.d.ts +0 -60
  243. package/lib/Utils/interactive.d.ts.map +0 -1
  244. package/lib/Utils/interactive.js +0 -224
  245. package/lib/Utils/interactive.js.map +0 -1
  246. package/lib/Utils/message-composer.d.ts +0 -93
  247. package/lib/Utils/message-composer.d.ts.map +0 -1
  248. package/lib/Utils/message-composer.js +0 -311
  249. package/lib/Utils/message-composer.js.map +0 -1
  250. package/lib/Utils/messages-newsletter.d.ts +0 -74
  251. package/lib/Utils/messages-newsletter.d.ts.map +0 -1
  252. package/lib/Utils/messages-newsletter.js +0 -128
  253. package/lib/Utils/messages-newsletter.js.map +0 -1
  254. package/lib/Utils/shortcake-crypto.d.ts +0 -36
  255. package/lib/Utils/shortcake-crypto.d.ts.map +0 -1
  256. package/lib/Utils/shortcake-crypto.js +0 -71
  257. package/lib/Utils/shortcake-crypto.js.map +0 -1
  258. package/lib/Utils/shortcake.d.ts +0 -36
  259. package/lib/Utils/shortcake.d.ts.map +0 -1
  260. package/lib/Utils/shortcake.js +0 -162
  261. package/lib/Utils/shortcake.js.map +0 -1
  262. package/lib/Utils/use-single-file-auth-state.d.ts +0 -6
  263. package/lib/Utils/use-single-file-auth-state.d.ts.map +0 -1
  264. package/lib/Utils/use-single-file-auth-state.js +0 -111
  265. package/lib/Utils/use-single-file-auth-state.js.map +0 -1
  266. package/lib/Utils/use-sqlite-auth-state.d.ts +0 -14
  267. package/lib/Utils/use-sqlite-auth-state.d.ts.map +0 -1
  268. package/lib/Utils/use-sqlite-auth-state.js +0 -107
  269. package/lib/Utils/use-sqlite-auth-state.js.map +0 -1
  270. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
  271. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts.map +0 -1
  272. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -25
  273. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js.map +0 -1
@@ -1,266 +1,647 @@
1
- import NodeCache from '@cacheable/node-cache';
2
- import { Boom } from '@hapi/boom';
3
- import { proto } from '../../WAProto/index.js';
4
- import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
5
- import { type CapturedUnifiedResponse, type LatexExpressionInput, MessageRetryManager, type RichContentOptions } from '../Utils/index.js';
6
- import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
7
- import { USyncQuery } from '../WAUSync/index.js';
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";
8
30
  export declare const makeMessagesSocket: (config: SocketConfig) => {
9
- userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
10
- devicesMutex: {
11
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
12
- };
13
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
14
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
15
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
16
- sendStatusWhatsApp: (content: AnyMessageContent, jids?: string[]) => Promise<WAMessage>;
17
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
18
- sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
19
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
20
- refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
21
- resize: (buf: Buffer, width: number, height: number, opts?: {
22
- quality?: number;
23
- }) => Promise<Buffer>;
24
- convert: (buf: Buffer, opts: {
25
- to: string;
26
- }) => Promise<Buffer>;
27
- toSticker: (buf: Buffer, opts?: {
28
- quality?: number;
29
- }) => Promise<Buffer>;
30
- compress: (buf: Buffer, opts?: {
31
- quality?: number;
32
- }) => Promise<Buffer>;
33
- metadata: (buf: Buffer) => Promise<import("../Utils/index.js").MediaMetadataResult>;
34
- getMediaHost: () => string;
35
- waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
36
- fetchPrivacySettings: (force?: boolean) => Promise<{
37
- [_: string]: string;
38
- }>;
39
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
40
- createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
41
- nodes: BinaryNode[];
42
- shouldIncludeDeviceIdentity: boolean;
43
- }>;
44
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
45
- jid: string;
46
- })[]>;
47
- messageRetryManager: MessageRetryManager | null;
48
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
49
- updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
50
- captureUnifiedResponse: (msg?: proto.IMessage | null) => CapturedUnifiedResponse | null;
51
- sendTable: (jid: string, title: string, headers: string[], rows: unknown[][], quoted?: WAMessage, options?: RichContentOptions) => Promise<{
52
- message: proto.IMessage;
53
- messageId: string;
54
- }>;
55
- sendList: (jid: string, title: string, items: unknown[], quoted?: WAMessage, options?: RichContentOptions) => Promise<{
56
- message: proto.IMessage;
57
- messageId: string;
58
- }>;
59
- sendCodeBlock: (jid: string, code: string, quoted?: WAMessage, options?: RichContentOptions & {
60
- title?: string;
61
- language?: string;
62
- }) => Promise<{
63
- message: proto.IMessage;
64
- messageId: string;
65
- }>;
66
- sendLatex: (jid: string, quoted: WAMessage | undefined, options: RichContentOptions & {
67
- text?: string;
68
- expressions: LatexExpressionInput[];
69
- }) => Promise<{
70
- message: proto.IMessage;
71
- messageId: string;
72
- }>;
73
- sendUnifiedResponse: (jid: string, quoted: WAMessage | undefined, captured: CapturedUnifiedResponse) => Promise<{
74
- message: proto.IMessage;
75
- messageId: string;
76
- }>;
77
- sendRichMessage: (jid: string, submessages: proto.IAIRichResponseSubMessage[], quoted?: WAMessage) => Promise<{
78
- message: proto.IMessage;
79
- messageId: string;
80
- }>;
81
- sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<any>;
82
- newsletterQuery: (jid: string, type: "get" | "set", content: any[]) => Promise<any>;
83
- newsletterCreate: (name: string, description?: string, picture?: import("../Types/index.js").WAMediaUpload) => Promise<import("../Types/index.js").NewsletterMetadata>;
84
- newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
85
- newsletterSubscribers: (jid: string) => Promise<{
86
- subscribers: number;
87
- }>;
88
- newsletterMetadata: (type: "invite" | "jid", key: string, viewRole?: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
89
- newsletterFetchAllParticipating: (viewRole?: string) => Promise<Record<string, import("../Types/index.js").NewsletterMetadata>>;
90
- newsletterFollow: (jid: string) => Promise<void>;
91
- newsletterUnfollow: (jid: string) => Promise<void>;
92
- newsletterMute: (jid: string) => Promise<void>;
93
- newsletterUnmute: (jid: string) => Promise<void>;
94
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
95
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
96
- newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
97
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
98
- newsletterReactionMode: (jid: string, mode: string) => Promise<unknown>;
99
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
100
- newsletterFetchMessages: {
101
- (type: "invite" | "jid", key: string, count: number, after?: number): Promise<any[]>;
102
- (jid: string, count: number, since?: number, after?: number): Promise<any[]>;
103
- };
104
- newsletterFetchUpdates: (jid: string, count: number, opts?: {
105
- since?: number;
106
- after?: number;
107
- decrypt?: boolean;
108
- }) => Promise<any[]>;
109
- subscribeNewsletterUpdates: (jid: string) => Promise<{
110
- duration: string;
111
- } | null>;
112
- newsletterAdminCount: (jid: string) => Promise<number>;
113
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
114
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
115
- newsletterDelete: (jid: string) => Promise<void>;
116
- newsletterAction: (jid: string, type: "follow" | "unfollow" | "mute" | "unmute") => Promise<void>;
117
- groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
118
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
119
- groupLeave: (id: string) => Promise<void>;
120
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
121
- groupRequestParticipantsList: (jid: string) => Promise<{
122
- [key: string]: string;
123
- }[]>;
124
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
125
- status: string;
126
- jid: string | undefined;
127
- }[]>;
128
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
129
- status: string;
130
- jid: string | undefined;
131
- content: BinaryNode;
132
- }[]>;
133
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
134
- groupInviteCode: (jid: string) => Promise<string | undefined>;
135
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
136
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
137
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
138
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
139
- groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
140
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
141
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
142
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
143
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
144
- groupFetchAllParticipating: () => Promise<{
145
- [_: string]: import("../Types/index.js").GroupMetadata;
146
- }>;
147
- getAdminStatus: (groupJid: string, senderJid?: string) => Promise<{
148
- isAdmin: boolean;
149
- isBotAdmin: boolean;
150
- }>;
151
- serverProps: {
152
- privacyTokenOn1to1: boolean;
153
- profilePicPrivacyToken: boolean;
154
- lidTrustedTokenIssueToLid: boolean;
155
- };
156
- createCallLink: (type: "audio" | "video", event?: {
157
- startTime: number;
158
- }, timeoutMs?: number) => Promise<string | undefined>;
159
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
160
- messageMutex: {
161
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
162
- };
163
- receiptMutex: {
164
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
165
- };
166
- appStatePatchMutex: {
167
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
168
- };
169
- notificationMutex: {
170
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
171
- };
172
- upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
173
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
174
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
175
- presenceSubscribe: (toJid: string) => Promise<void>;
176
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
177
- fetchBlocklist: () => Promise<(string | undefined)[]>;
178
- fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
179
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
180
- findUserId: (pnOrLid: string) => Promise<{
181
- phoneNumber: string;
182
- lid: string;
183
- }>;
184
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
185
- width: number;
186
- height: number;
187
- }, options?: {
188
- full?: boolean;
189
- }) => Promise<void>;
190
- removeProfilePicture: (jid: string) => Promise<void>;
191
- updateProfileStatus: (status: string) => Promise<void>;
192
- updateProfileName: (name: string) => Promise<void>;
193
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
194
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
195
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
196
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
197
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
198
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
199
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
200
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
201
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
202
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
203
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
204
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
205
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
206
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
207
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
208
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
209
- removeContact: (jid: string) => Promise<void>;
210
- placeholderResendCache: import("../Types/index.js").CacheStore;
211
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
212
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
213
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
214
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
215
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
216
- star: (jid: string, messages: {
217
- id: string;
218
- fromMe?: boolean;
219
- }[], star: boolean) => Promise<void>;
220
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
221
- removeQuickReply: (timestamp: string) => Promise<void>;
222
- type: "md";
223
- ws: import("./Client/websocket.js").WebSocketClient;
224
- ev: import("../Types/index.js").BaileysEventEmitter & {
225
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
226
- buffer(): void;
227
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
228
- flush(): boolean;
229
- isBuffering(): boolean;
230
- destroy(): void;
231
- };
232
- authState: {
233
- creds: import("../Types/index.js").AuthenticationCreds;
234
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
235
- };
236
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
237
- user: import("../Types/index.js").Contact | undefined;
238
- generateMessageTag: () => string;
239
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
240
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
241
- waitForSocketOpen: () => Promise<void>;
242
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
243
- sendNode: (frame: BinaryNode) => Promise<void>;
244
- logout: (msg?: string) => Promise<void>;
245
- end: (error: Error | undefined) => Promise<void>;
246
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
247
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
248
- uploadPreKeys: (count?: number) => Promise<void>;
249
- uploadPreKeysToServerIfRequired: () => Promise<void>;
250
- digestKeyBundle: () => Promise<void>;
251
- rotateSignedPreKey: () => Promise<void>;
252
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
253
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
254
- sendUnifiedSession: () => Promise<void>;
255
- wamBuffer: import("../index.js").BinaryInfo;
256
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
257
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
258
- executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
259
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
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
+ ourin: 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
+ sendQuickReplyButtons: (
244
+ jid: string,
245
+ text: string,
246
+ replies: { id?: string; text: string }[],
247
+ extra?: Record<string, any>,
248
+ options?: MiscMessageGenerationOptions,
249
+ ) => Promise<any>;
250
+ sendUrlButton: (
251
+ jid: string,
252
+ text: string,
253
+ buttonText: string,
254
+ url: string,
255
+ extra?: Record<string, any>,
256
+ options?: MiscMessageGenerationOptions,
257
+ ) => Promise<any>;
258
+ sendCallButton: (
259
+ jid: string,
260
+ text: string,
261
+ buttonText: string,
262
+ phoneNumber: string,
263
+ extra?: Record<string, any>,
264
+ options?: MiscMessageGenerationOptions,
265
+ ) => Promise<any>;
266
+ sendCopyButton: (
267
+ jid: string,
268
+ text: string,
269
+ buttonText: string,
270
+ copyText: string,
271
+ extra?: Record<string, any>,
272
+ options?: MiscMessageGenerationOptions,
273
+ ) => Promise<any>;
274
+ sendReminderButton: (
275
+ jid: string,
276
+ text: string,
277
+ buttonText: string,
278
+ extra?: Record<string, any>,
279
+ options?: MiscMessageGenerationOptions,
280
+ ) => Promise<any>;
281
+ sendListButton: (
282
+ jid: string,
283
+ text: string,
284
+ buttonText: string,
285
+ sections: {
286
+ title?: string;
287
+ rows: {
288
+ title: string;
289
+ header?: string;
290
+ description?: string;
291
+ id?: string;
292
+ }[];
293
+ }[],
294
+ extra?: Record<string, any>,
295
+ options?: MiscMessageGenerationOptions,
296
+ ) => Promise<any>;
297
+ sendMixedButtons: (
298
+ jid: string,
299
+ text: string,
300
+ rawButtons: { name: string; params: object }[],
301
+ extra?: Record<string, any>,
302
+ options?: MiscMessageGenerationOptions,
303
+ ) => Promise<any>;
304
+ sendLinkPreview: (
305
+ jid: string,
306
+ text: string,
307
+ url?: string,
308
+ extra?: Record<string, any>,
309
+ options?: MiscMessageGenerationOptions,
310
+ ) => Promise<any>;
311
+ newsletterFetchAllSubscribe: () => Promise<unknown>;
312
+ newsletterMultipleFollow: (jids: string) => Promise<void>;
313
+ newsletterAction: (jid: string, type: string) => Promise<void>;
314
+ cekIDSaluran: (url: string) => Promise<{
315
+ id: any;
316
+ state: any;
317
+ creation_time: number;
318
+ name: any;
319
+ description: any;
320
+ invite: any;
321
+ picture: string;
322
+ preview: string;
323
+ subscribers: number;
324
+ verification: any;
325
+ viewer_metadata: any;
326
+ }>;
327
+ newsletterCreate: (
328
+ name: string,
329
+ description?: string,
330
+ ) => Promise<import("../Types/index.js").NewsletterMetadata>;
331
+ newsletterUpdate: (
332
+ jid: string,
333
+ updates: import("../Types/index.js").NewsletterUpdate,
334
+ ) => Promise<unknown>;
335
+ newsletterSubscribers: (jid: string) => Promise<{
336
+ subscribers: number;
337
+ }>;
338
+ newsletterMetadata: (
339
+ type: "invite" | "jid",
340
+ key: string,
341
+ ) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
342
+ newsletterFollow: (jid: string) => Promise<unknown>;
343
+ newsletterUnfollow: (jid: string) => Promise<unknown>;
344
+ newsletterMute: (jid: string) => Promise<unknown>;
345
+ newsletterUnmute: (jid: string) => Promise<unknown>;
346
+ newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
347
+ newsletterUpdateDescription: (
348
+ jid: string,
349
+ description: string,
350
+ ) => Promise<unknown>;
351
+ newsletterUpdatePicture: (
352
+ jid: string,
353
+ content: import("../Types/index.js").WAMediaUpload,
354
+ ) => Promise<unknown>;
355
+ newsletterRemovePicture: (jid: string) => Promise<unknown>;
356
+ newsletterReactMessage: (
357
+ jid: string,
358
+ serverId: string,
359
+ reaction?: string,
360
+ ) => Promise<void>;
361
+ newsletterFetchMessages: (
362
+ jid: string,
363
+ count: number,
364
+ since: number,
365
+ after: number,
366
+ ) => Promise<any>;
367
+ subscribeNewsletterUpdates: (jid: string) => Promise<{
368
+ duration: string;
369
+ } | null>;
370
+ newsletterAdminCount: (jid: string) => Promise<number>;
371
+ newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
372
+ newsletterDemote: (jid: string, userJid: string) => Promise<void>;
373
+ newsletterDelete: (jid: string) => Promise<void>;
374
+ groupMetadata: (
375
+ jid: string,
376
+ ) => Promise<import("../Types/index.js").GroupMetadata>;
377
+ groupCreate: (
378
+ subject: string,
379
+ participants: string[],
380
+ ) => Promise<import("../Types/index.js").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: import("../Types/index.js").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: (
422
+ code: string,
423
+ ) => Promise<import("../Types/index.js").GroupMetadata>;
424
+ groupToggleEphemeral: (
425
+ jid: string,
426
+ ephemeralExpiration: number,
427
+ ) => Promise<void>;
428
+ groupSettingUpdate: (
429
+ jid: string,
430
+ setting: "announcement" | "not_announcement" | "locked" | "unlocked",
431
+ ) => Promise<void>;
432
+ groupMemberAddMode: (
433
+ jid: string,
434
+ mode: "admin_add" | "all_member_add",
435
+ ) => Promise<void>;
436
+ groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
437
+ groupFetchAllParticipating: () => Promise<{
438
+ [_: string]: import("../Types/index.js").GroupMetadata;
439
+ }>;
440
+ createCallLink: (
441
+ type: "audio" | "video",
442
+ event?: {
443
+ startTime: number;
444
+ },
445
+ timeoutMs?: number,
446
+ ) => Promise<string | undefined>;
447
+ getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
448
+ messageMutex: {
449
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
450
+ };
451
+ receiptMutex: {
452
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
453
+ };
454
+ appStatePatchMutex: {
455
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
456
+ };
457
+ notificationMutex: {
458
+ mutex<T>(code: () => Promise<T> | T): Promise<T>;
459
+ };
460
+ upsertMessage: (
461
+ msg: WAMessage,
462
+ type: import("../Types/index.js").MessageUpsertType,
463
+ ) => Promise<void>;
464
+ appPatch: (
465
+ patchCreate: import("../Types/index.js").WAPatchCreate,
466
+ ) => Promise<void>;
467
+ sendPresenceUpdate: (
468
+ type: import("../Types/index.js").WAPresence,
469
+ toJid?: string,
470
+ ) => Promise<void>;
471
+ presenceSubscribe: (toJid: string) => Promise<void>;
472
+ profilePictureUrl: (
473
+ jid: string,
474
+ type?: "preview" | "image",
475
+ timeoutMs?: number,
476
+ ) => Promise<string | undefined>;
477
+ fetchBlocklist: () => Promise<(string | undefined)[]>;
478
+ fetchStatus: (
479
+ ...jids: string[]
480
+ ) => Promise<
481
+ import("../WAUSync/index.js").USyncQueryResultList[] | undefined
482
+ >;
483
+ fetchDisappearingDuration: (
484
+ ...jids: string[]
485
+ ) => Promise<
486
+ import("../WAUSync/index.js").USyncQueryResultList[] | undefined
487
+ >;
488
+ updateProfilePicture: (
489
+ jid: string,
490
+ content: import("../Types/index.js").WAMediaUpload,
491
+ dimensions?: {
492
+ width: number;
493
+ height: number;
494
+ },
495
+ ) => Promise<void>;
496
+ removeProfilePicture: (jid: string) => Promise<void>;
497
+ updateProfileStatus: (status: string) => Promise<void>;
498
+ updateProfileName: (name: string) => Promise<void>;
499
+ updateBlockStatus: (
500
+ jid: string,
501
+ action: "block" | "unblock",
502
+ ) => Promise<void>;
503
+ updateDisableLinkPreviewsPrivacy: (
504
+ isPreviewsDisabled: boolean,
505
+ ) => Promise<void>;
506
+ updateCallPrivacy: (
507
+ value: import("../Types/index.js").WAPrivacyCallValue,
508
+ ) => Promise<void>;
509
+ updateMessagesPrivacy: (
510
+ value: import("../Types/index.js").WAPrivacyMessagesValue,
511
+ ) => Promise<void>;
512
+ updateLastSeenPrivacy: (
513
+ value: import("../Types/index.js").WAPrivacyValue,
514
+ ) => Promise<void>;
515
+ updateOnlinePrivacy: (
516
+ value: import("../Types/index.js").WAPrivacyOnlineValue,
517
+ ) => Promise<void>;
518
+ updateProfilePicturePrivacy: (
519
+ value: import("../Types/index.js").WAPrivacyValue,
520
+ ) => Promise<void>;
521
+ updateStatusPrivacy: (
522
+ value: import("../Types/index.js").WAPrivacyValue,
523
+ ) => Promise<void>;
524
+ updateReadReceiptsPrivacy: (
525
+ value: import("../Types/index.js").WAReadReceiptsValue,
526
+ ) => Promise<void>;
527
+ updateGroupsAddPrivacy: (
528
+ value: import("../Types/index.js").WAPrivacyGroupAddValue,
529
+ ) => Promise<void>;
530
+ updateDefaultDisappearingMode: (duration: number) => Promise<void>;
531
+ getBusinessProfile: (
532
+ jid: string,
533
+ ) => Promise<import("../Types/index.js").WABusinessProfile | void>;
534
+ resyncAppState: (
535
+ collections: readonly (
536
+ | "critical_unblock_low"
537
+ | "regular_high"
538
+ | "regular_low"
539
+ | "critical_block"
540
+ | "regular"
541
+ )[],
542
+ isInitialSync: boolean,
543
+ ) => Promise<void>;
544
+ chatModify: (
545
+ mod: import("../Types/index.js").ChatModification,
546
+ jid: string,
547
+ ) => Promise<void>;
548
+ cleanDirtyBits: (
549
+ type: "account_sync" | "groups",
550
+ fromTimestamp?: number | string,
551
+ ) => Promise<void>;
552
+ addOrEditContact: (
553
+ jid: string,
554
+ contact: proto.SyncActionValue.IContactAction,
555
+ ) => Promise<void>;
556
+ removeContact: (jid: string) => Promise<void>;
557
+ addLabel: (
558
+ jid: string,
559
+ labels: import("../Types/Label.js").LabelActionBody,
560
+ ) => Promise<void>;
561
+ addChatLabel: (jid: string, labelId: string) => Promise<void>;
562
+ removeChatLabel: (jid: string, labelId: string) => Promise<void>;
563
+ addMessageLabel: (
564
+ jid: string,
565
+ messageId: string,
566
+ labelId: string,
567
+ ) => Promise<void>;
568
+ removeMessageLabel: (
569
+ jid: string,
570
+ messageId: string,
571
+ labelId: string,
572
+ ) => Promise<void>;
573
+ star: (
574
+ jid: string,
575
+ messages: {
576
+ id: string;
577
+ fromMe?: boolean;
578
+ }[],
579
+ star: boolean,
580
+ ) => Promise<void>;
581
+ addOrEditQuickReply: (
582
+ quickReply: import("../Types/Bussines.js").QuickReplyAction,
583
+ ) => Promise<void>;
584
+ removeQuickReply: (timestamp: string) => Promise<void>;
585
+ type: "md";
586
+ ws: import("./Client/websocket.js").WebSocketClient;
587
+ ev: import("../Types/index.js").BaileysEventEmitter & {
588
+ process(
589
+ handler: (
590
+ events: Partial<import("../Types/index.js").BaileysEventMap>,
591
+ ) => void | Promise<void>,
592
+ ): () => void;
593
+ buffer(): void;
594
+ createBufferedFunction<A extends any[], T>(
595
+ work: (...args: A) => Promise<T>,
596
+ ): (...args: A) => Promise<T>;
597
+ flush(): boolean;
598
+ isBuffering(): boolean;
599
+ };
600
+ authState: {
601
+ creds: import("../Types/index.js").AuthenticationCreds;
602
+ keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
603
+ };
604
+ signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
605
+ user: import("../Types/index.js").Contact | undefined;
606
+ generateMessageTag: () => string;
607
+ query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
608
+ waitForMessage: <T>(
609
+ msgId: string,
610
+ timeoutMs?: number | undefined,
611
+ ) => Promise<T | undefined>;
612
+ waitForSocketOpen: () => Promise<void>;
613
+ sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
614
+ sendNode: (frame: BinaryNode) => Promise<void>;
615
+ logout: (msg?: string) => Promise<void>;
616
+ end: (error: Error | undefined) => Promise<void>;
617
+ onUnexpectedError: (err: Error | Boom, msg: string) => void;
618
+ uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
619
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
620
+ digestKeyBundle: () => Promise<void>;
621
+ rotateSignedPreKey: () => Promise<void>;
622
+ requestPairingCode: (
623
+ phoneNumber: string,
624
+ customPairingCode?: string,
625
+ ) => Promise<string>;
626
+ updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
627
+ sendUnifiedSession: () => Promise<void>;
628
+ wamBuffer: import("../index.js").BinaryInfo;
629
+ waitForConnectionUpdate: (
630
+ check: (
631
+ u: Partial<import("../Types/index.js").ConnectionState>,
632
+ ) => Promise<boolean | undefined>,
633
+ timeoutMs?: number,
634
+ ) => Promise<void>;
635
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
636
+ executeUSyncQuery: (
637
+ usyncQuery: USyncQuery,
638
+ ) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
639
+ onWhatsApp: (...phoneNumber: string[]) => Promise<
640
+ | {
260
641
  jid: string;
261
642
  exists: boolean;
262
- }[] | undefined>;
263
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
264
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
643
+ }[]
644
+ | undefined
645
+ >;
265
646
  };
266
- //# sourceMappingURL=messages-send.d.ts.map
647
+ //# sourceMappingURL=messages-send.d.ts.map