@mrlegendbot/baileys 1.2.3 → 1.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (212) hide show
  1. package/README.upstream.md +1312 -0
  2. package/WAProto/WAProto.json +1 -0
  3. package/WAProto/WAProto.proto +6275 -0
  4. package/WAProto/compiler.js +550 -0
  5. package/WAProto/index.js +2 -97691
  6. package/lib/Defaults/index.js +89 -92
  7. package/lib/Signal/Group/ciphertext-message.js +9 -10
  8. package/lib/Signal/Group/group-session-builder.js +21 -22
  9. package/lib/Signal/Group/group_cipher.js +75 -69
  10. package/lib/Signal/Group/index.js +0 -1
  11. package/lib/Signal/Group/keyhelper.js +9 -10
  12. package/lib/Signal/Group/sender-chain-key.js +21 -22
  13. package/lib/Signal/Group/sender-key-distribution-message.js +51 -60
  14. package/lib/Signal/Group/sender-key-message.js +56 -62
  15. package/lib/Signal/Group/sender-key-name.js +38 -40
  16. package/lib/Signal/Group/sender-key-record.js +33 -34
  17. package/lib/Signal/Group/sender-key-state.js +72 -76
  18. package/lib/Signal/Group/sender-message-key.js +22 -23
  19. package/lib/Signal/libsignal.js +506 -405
  20. package/lib/Signal/lid-mapping.js +276 -258
  21. package/lib/Socket/Client/index.js +0 -1
  22. package/lib/Socket/Client/types.js +6 -7
  23. package/lib/Socket/Client/websocket.js +48 -49
  24. package/lib/Socket/business.js +349 -369
  25. package/lib/Socket/chats.js +1172 -1148
  26. package/lib/Socket/communities.js +473 -413
  27. package/lib/Socket/groups.js +387 -331
  28. package/lib/Socket/index.js +6 -8
  29. package/lib/Socket/messages-recv.js +1782 -1719
  30. package/lib/Socket/messages-send.js +1503 -2450
  31. package/lib/Socket/mex.js +40 -35
  32. package/lib/Socket/newsletter.js +239 -191
  33. package/lib/Socket/socket.js +992 -923
  34. package/lib/Store/index.js +8 -0
  35. package/lib/Store/keyed-db.js +108 -0
  36. package/lib/Store/make-cache-manager-store.js +70 -0
  37. package/lib/Store/make-in-memory-store.js +417 -0
  38. package/lib/Store/make-ordered-dictionary.js +69 -0
  39. package/lib/Store/object-repository.js +27 -0
  40. package/lib/Types/Auth.js +0 -1
  41. package/lib/Types/Bussines.js +0 -1
  42. package/lib/Types/Call.js +0 -1
  43. package/lib/Types/Chat.js +1 -8
  44. package/lib/Types/Contact.js +0 -1
  45. package/lib/Types/Events.js +1 -2
  46. package/lib/Types/GroupMetadata.js +0 -1
  47. package/lib/Types/Label.js +20 -22
  48. package/lib/Types/LabelAssociation.js +2 -4
  49. package/lib/Types/Message.js +3 -5
  50. package/lib/Types/Mex.js +26 -31
  51. package/lib/Types/Product.js +0 -1
  52. package/lib/Types/Signal.js +1 -2
  53. package/lib/Types/Socket.js +2 -3
  54. package/lib/Types/State.js +4 -52
  55. package/lib/Types/USync.js +0 -1
  56. package/lib/Types/index.js +10 -11
  57. package/lib/Utils/auth-utils.js +240 -277
  58. package/lib/Utils/browser-utils.js +20 -23
  59. package/lib/Utils/business.js +200 -204
  60. package/lib/Utils/chat-utils.js +836 -810
  61. package/lib/Utils/companion-reg-client-utils.js +23 -25
  62. package/lib/Utils/crypto.js +70 -86
  63. package/lib/Utils/decode-wa-message.js +277 -284
  64. package/lib/Utils/event-buffer.js +592 -595
  65. package/lib/Utils/generics.js +312 -335
  66. package/lib/Utils/history.js +123 -115
  67. package/lib/Utils/index.js +1 -2
  68. package/lib/Utils/link-preview.js +74 -73
  69. package/lib/Utils/logger.js +3 -2
  70. package/lib/Utils/lt-hash.js +0 -6
  71. package/lib/Utils/make-mutex.js +27 -27
  72. package/lib/Utils/message-retry-manager.js +213 -254
  73. package/lib/Utils/messages-media.js +741 -715
  74. package/lib/Utils/messages.js +791 -827
  75. package/lib/Utils/noise-handler.js +215 -187
  76. package/lib/Utils/pre-key-manager.js +69 -98
  77. package/lib/Utils/process-message.js +617 -586
  78. package/lib/Utils/reporting-utils.js +553 -234
  79. package/lib/Utils/signal.js +217 -170
  80. package/lib/Utils/stanza-ack.js +27 -35
  81. package/lib/Utils/sync-action-utils.js +37 -41
  82. package/lib/Utils/tc-token-utils.js +120 -141
  83. package/lib/Utils/use-multi-file-auth-state.js +87 -105
  84. package/lib/Utils/use-sqlite-auth-state.js +162 -0
  85. package/lib/Utils/validate-connection.js +190 -188
  86. package/lib/WABinary/constants.js +28 -1294
  87. package/lib/WABinary/decode.js +245 -249
  88. package/lib/WABinary/encode.js +201 -206
  89. package/lib/WABinary/generic-utils.js +86 -89
  90. package/lib/WABinary/index.js +0 -1
  91. package/lib/WABinary/jid-utils.js +68 -77
  92. package/lib/WABinary/types.js +0 -1
  93. package/lib/WAM/BinaryInfo.js +7 -8
  94. package/lib/WAM/constants.js +19892 -22853
  95. package/lib/WAM/encode.js +121 -132
  96. package/lib/WAM/index.js +0 -1
  97. package/lib/WAUSync/Protocols/USyncContactProtocol.js +46 -43
  98. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +47 -48
  99. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +22 -23
  100. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +30 -33
  101. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +19 -20
  102. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -44
  103. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -24
  104. package/lib/WAUSync/Protocols/index.js +0 -1
  105. package/lib/WAUSync/USyncQuery.js +79 -88
  106. package/lib/WAUSync/USyncUser.js +28 -29
  107. package/lib/WAUSync/index.js +0 -1
  108. package/lib/index.js +2 -2
  109. package/package.json +22 -86
  110. package/WAProto/GenerateStatics.sh +0 -3
  111. package/WAProto/fix-imports.js +0 -85
  112. package/WAProto/index.d.ts +0 -14017
  113. package/lib/Defaults/index.d.ts +0 -75
  114. package/lib/Signal/Group/ciphertext-message.d.ts +0 -10
  115. package/lib/Signal/Group/group-session-builder.d.ts +0 -15
  116. package/lib/Signal/Group/group_cipher.d.ts +0 -17
  117. package/lib/Signal/Group/index.d.ts +0 -12
  118. package/lib/Signal/Group/keyhelper.d.ts +0 -11
  119. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  120. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  121. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  122. package/lib/Signal/Group/sender-key-name.d.ts +0 -18
  123. package/lib/Signal/Group/sender-key-record.d.ts +0 -31
  124. package/lib/Signal/Group/sender-key-state.d.ts +0 -39
  125. package/lib/Signal/Group/sender-message-key.d.ts +0 -12
  126. package/lib/Signal/libsignal.d.ts +0 -5
  127. package/lib/Signal/lid-mapping.d.ts +0 -23
  128. package/lib/Socket/Client/index.d.ts +0 -3
  129. package/lib/Socket/Client/types.d.ts +0 -16
  130. package/lib/Socket/Client/websocket.d.ts +0 -13
  131. package/lib/Socket/business.d.ts +0 -217
  132. package/lib/Socket/chats.d.ts +0 -125
  133. package/lib/Socket/communities.d.ts +0 -273
  134. package/lib/Socket/groups.d.ts +0 -161
  135. package/lib/Socket/index.d.ts +0 -260
  136. package/lib/Socket/messages-recv.d.ts +0 -203
  137. package/lib/Socket/messages-send.d.ts +0 -199
  138. package/lib/Socket/mex.d.ts +0 -3
  139. package/lib/Socket/newsletter.d.ts +0 -170
  140. package/lib/Socket/socket.d.ts +0 -59
  141. package/lib/Types/Auth.d.ts +0 -117
  142. package/lib/Types/Bussines.d.ts +0 -25
  143. package/lib/Types/Call.d.ts +0 -15
  144. package/lib/Types/Chat.d.ts +0 -124
  145. package/lib/Types/Contact.d.ts +0 -26
  146. package/lib/Types/Events.d.ts +0 -256
  147. package/lib/Types/GroupMetadata.d.ts +0 -71
  148. package/lib/Types/Label.d.ts +0 -47
  149. package/lib/Types/LabelAssociation.d.ts +0 -30
  150. package/lib/Types/Message.d.ts +0 -320
  151. package/lib/Types/Mex.d.ts +0 -141
  152. package/lib/Types/Product.d.ts +0 -79
  153. package/lib/Types/Signal.d.ts +0 -87
  154. package/lib/Types/Socket.d.ts +0 -136
  155. package/lib/Types/State.d.ts +0 -97
  156. package/lib/Types/USync.d.ts +0 -26
  157. package/lib/Types/index.d.ts +0 -66
  158. package/lib/Utils/auth-utils.d.ts +0 -24
  159. package/lib/Utils/browser-utils.d.ts +0 -4
  160. package/lib/Utils/business.d.ts +0 -23
  161. package/lib/Utils/chat-utils.d.ts +0 -100
  162. package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
  163. package/lib/Utils/crypto.d.ts +0 -37
  164. package/lib/Utils/decode-wa-message.d.ts +0 -66
  165. package/lib/Utils/event-buffer.d.ts +0 -36
  166. package/lib/Utils/generics.d.ts +0 -92
  167. package/lib/Utils/history.d.ts +0 -24
  168. package/lib/Utils/identity-change-handler.d.ts +0 -44
  169. package/lib/Utils/identity-change-handler.js +0 -50
  170. package/lib/Utils/index.d.ts +0 -22
  171. package/lib/Utils/link-preview.d.ts +0 -21
  172. package/lib/Utils/logger.d.ts +0 -12
  173. package/lib/Utils/lt-hash.d.ts +0 -8
  174. package/lib/Utils/make-mutex.d.ts +0 -9
  175. package/lib/Utils/message-retry-manager.d.ts +0 -115
  176. package/lib/Utils/messages-media.d.ts +0 -133
  177. package/lib/Utils/messages.d.ts +0 -91
  178. package/lib/Utils/noise-handler.d.ts +0 -20
  179. package/lib/Utils/offline-node-processor.d.ts +0 -17
  180. package/lib/Utils/offline-node-processor.js +0 -40
  181. package/lib/Utils/pre-key-manager.d.ts +0 -28
  182. package/lib/Utils/process-message.d.ts +0 -60
  183. package/lib/Utils/reporting-utils.d.ts +0 -11
  184. package/lib/Utils/signal.d.ts +0 -47
  185. package/lib/Utils/stanza-ack.d.ts +0 -11
  186. package/lib/Utils/sync-action-utils.d.ts +0 -19
  187. package/lib/Utils/tc-token-utils.d.ts +0 -37
  188. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  189. package/lib/Utils/validate-connection.d.ts +0 -11
  190. package/lib/WABinary/constants.d.ts +0 -28
  191. package/lib/WABinary/decode.d.ts +0 -7
  192. package/lib/WABinary/encode.d.ts +0 -3
  193. package/lib/WABinary/generic-utils.d.ts +0 -15
  194. package/lib/WABinary/index.d.ts +0 -6
  195. package/lib/WABinary/jid-utils.d.ts +0 -48
  196. package/lib/WABinary/types.d.ts +0 -19
  197. package/lib/WAM/BinaryInfo.d.ts +0 -9
  198. package/lib/WAM/constants.d.ts +0 -40
  199. package/lib/WAM/encode.d.ts +0 -3
  200. package/lib/WAM/index.d.ts +0 -4
  201. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
  202. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -23
  203. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -13
  204. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -13
  205. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
  206. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -26
  207. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -10
  208. package/lib/WAUSync/Protocols/index.d.ts +0 -6
  209. package/lib/WAUSync/USyncQuery.d.ts +0 -30
  210. package/lib/WAUSync/USyncUser.d.ts +0 -17
  211. package/lib/WAUSync/index.d.ts +0 -4
  212. package/lib/index.d.ts +0 -12
@@ -1,125 +0,0 @@
1
- import { Boom } from '@hapi/boom';
2
- import { proto } from '../../WAProto/index.js';
3
- import type { BotListInfo, CacheStore, ChatModification, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAMessage, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '../Types/index.js';
4
- import type { QuickReplyAction } from '../Types/Bussines.js';
5
- import type { LabelActionBody } from '../Types/Label.js';
6
- import { type BinaryNode } from '../WABinary/index.js';
7
- import { USyncQuery } from '../WAUSync/index.js';
8
- export declare const buildProfilePictureQueryContent: (type: "preview" | "image", tcTokenContent?: BinaryNode[]) => BinaryNode[];
9
- export declare const makeChatsSocket: (config: SocketConfig) => {
10
- serverProps: {
11
- /** AB prop 10518: gate tctoken on 1:1 messages. Default true (safe: avoids 463). */
12
- privacyTokenOn1to1: boolean;
13
- /** AB prop 9666: gate tctoken on profile picture IQs. WA Web default: true. */
14
- profilePicPrivacyToken: boolean;
15
- /** AB prop 14303: issue tctokens to LID instead of PN. WA Web default: false. */
16
- lidTrustedTokenIssueToLid: boolean;
17
- };
18
- createCallLink: (type: "audio" | "video", event?: {
19
- startTime: number;
20
- }, timeoutMs?: number) => Promise<string | undefined>;
21
- getBotListV2: () => Promise<BotListInfo[]>;
22
- messageMutex: {
23
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
24
- };
25
- receiptMutex: {
26
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
27
- };
28
- appStatePatchMutex: {
29
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
30
- };
31
- notificationMutex: {
32
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
33
- };
34
- fetchPrivacySettings: (force?: boolean) => Promise<{
35
- [_: string]: string;
36
- }>;
37
- upsertMessage: (msg: WAMessage, type: MessageUpsertType) => Promise<void>;
38
- appPatch: (patchCreate: WAPatchCreate) => Promise<void>;
39
- sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise<void>;
40
- presenceSubscribe: (toJid: string) => Promise<void>;
41
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
42
- fetchBlocklist: () => Promise<(string | undefined)[]>;
43
- fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
44
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
45
- updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
46
- width: number;
47
- height: number;
48
- }) => Promise<void>;
49
- removeProfilePicture: (jid: string) => Promise<void>;
50
- updateProfileStatus: (status: string) => Promise<void>;
51
- updateProfileName: (name: string) => Promise<void>;
52
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
53
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
54
- updateCallPrivacy: (value: WAPrivacyCallValue) => Promise<void>;
55
- updateMessagesPrivacy: (value: WAPrivacyMessagesValue) => Promise<void>;
56
- updateLastSeenPrivacy: (value: WAPrivacyValue) => Promise<void>;
57
- updateOnlinePrivacy: (value: WAPrivacyOnlineValue) => Promise<void>;
58
- updateProfilePicturePrivacy: (value: WAPrivacyValue) => Promise<void>;
59
- updateStatusPrivacy: (value: WAPrivacyValue) => Promise<void>;
60
- updateReadReceiptsPrivacy: (value: WAReadReceiptsValue) => Promise<void>;
61
- updateGroupsAddPrivacy: (value: WAPrivacyGroupAddValue) => Promise<void>;
62
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
63
- getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>;
64
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
65
- chatModify: (mod: ChatModification, jid: string) => Promise<void>;
66
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
67
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
68
- removeContact: (jid: string) => Promise<void>;
69
- placeholderResendCache: CacheStore;
70
- addLabel: (jid: string, labels: LabelActionBody) => Promise<void>;
71
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
72
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
73
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
74
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
75
- star: (jid: string, messages: {
76
- id: string;
77
- fromMe?: boolean;
78
- }[], star: boolean) => Promise<void>;
79
- addOrEditQuickReply: (quickReply: QuickReplyAction) => Promise<void>;
80
- removeQuickReply: (timestamp: string) => Promise<void>;
81
- type: "md";
82
- ws: import("./Client/websocket.js").WebSocketClient;
83
- ev: import("../Types/index.js").BaileysEventEmitter & {
84
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
85
- buffer(): void;
86
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
87
- flush(): boolean;
88
- isBuffering(): boolean;
89
- destroy(): void;
90
- };
91
- authState: {
92
- creds: import("../Types/index.js").AuthenticationCreds;
93
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
94
- };
95
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
96
- user: import("../Types/index.js").Contact | undefined;
97
- generateMessageTag: () => string;
98
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
99
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
100
- waitForSocketOpen: () => Promise<void>;
101
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
102
- sendNode: (frame: BinaryNode) => Promise<void>;
103
- logout: (msg?: string) => Promise<void>;
104
- end: (error: Error | undefined) => Promise<void>;
105
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
106
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
107
- uploadPreKeys: (count?: number) => Promise<void>;
108
- uploadPreKeysToServerIfRequired: () => Promise<void>;
109
- digestKeyBundle: () => Promise<void>;
110
- rotateSignedPreKey: () => Promise<void>;
111
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
112
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
113
- sendUnifiedSession: () => Promise<void>;
114
- wamBuffer: import("../index.js").BinaryInfo;
115
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
116
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
117
- executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
118
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
119
- jid: string;
120
- exists: boolean;
121
- }[] | undefined>;
122
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
123
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
124
- };
125
- //# sourceMappingURL=chats.d.ts.map
@@ -1,273 +0,0 @@
1
- import { proto } from '../../WAProto/index.js';
2
- import { type GroupMetadata, type ParticipantAction, type SocketConfig, type WAMessageKey } from '../Types/index.js';
3
- import { type BinaryNode } from '../WABinary/index.js';
4
- export declare const makeCommunitiesSocket: (config: SocketConfig) => {
5
- communityMetadata: (jid: string) => Promise<GroupMetadata>;
6
- communityCreate: (subject: string, body: string) => Promise<GroupMetadata | null>;
7
- communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<GroupMetadata | null>;
8
- communityLeave: (id: string) => Promise<void>;
9
- communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
10
- communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
11
- communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>;
12
- communityFetchLinkedGroups: (jid: string) => Promise<{
13
- communityJid: string;
14
- isCommunity: boolean;
15
- linkedGroups: {
16
- id: string | undefined;
17
- subject: string;
18
- creation: number | undefined;
19
- owner: string | undefined;
20
- size: number | undefined;
21
- }[];
22
- }>;
23
- communityRequestParticipantsList: (jid: string) => Promise<{
24
- [key: string]: string;
25
- }[]>;
26
- communityRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
27
- status: string;
28
- jid: string | undefined;
29
- }[]>;
30
- communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
31
- status: string;
32
- jid: string | undefined;
33
- content: BinaryNode;
34
- }[]>;
35
- communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
36
- communityInviteCode: (jid: string) => Promise<string | undefined>;
37
- communityRevokeInvite: (jid: string) => Promise<string | undefined>;
38
- communityAcceptInvite: (code: string) => Promise<string | undefined>;
39
- /**
40
- * revoke a v4 invite for someone
41
- * @param communityJid community jid
42
- * @param invitedJid jid of person you invited
43
- * @returns true if successful
44
- */
45
- communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
46
- /**
47
- * accept a CommunityInviteMessage
48
- * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
49
- * @param inviteMessage the message to accept
50
- */
51
- communityAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
52
- communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
53
- communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
54
- communitySettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
55
- communityMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
56
- communityJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
57
- communityFetchAllParticipating: () => Promise<{
58
- [_: string]: GroupMetadata;
59
- }>;
60
- logger: import("../Utils/logger.js").ILogger;
61
- getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types/index.js").OrderDetails>;
62
- getCatalog: ({ jid, limit, cursor }: import("../Types/index.js").GetCatalogOptions) => Promise<{
63
- products: import("../Types/index.js").Product[];
64
- nextPageCursor: string | undefined;
65
- }>;
66
- getCollections: (jid?: string, limit?: number) => Promise<{
67
- collections: import("../Types/index.js").CatalogCollection[];
68
- }>;
69
- productCreate: (create: import("../Types/index.js").ProductCreate) => Promise<import("../Types/index.js").Product>;
70
- productDelete: (productIds: string[]) => Promise<{
71
- deleted: number;
72
- }>;
73
- productUpdate: (productId: string, update: import("../Types/index.js").ProductUpdate) => Promise<import("../Types/index.js").Product>;
74
- updateBussinesProfile: (args: import("../Types/Bussines.js").UpdateBussinesProfileProps) => Promise<any>;
75
- updateCoverPhoto: (photo: import("../Types/index.js").WAMediaUpload) => Promise<number>;
76
- removeCoverPhoto: (id: string) => Promise<any>;
77
- sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
78
- sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
79
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
80
- fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
81
- requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<import("../Types/index.js").WAMessage>) => Promise<string | undefined>;
82
- messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
83
- userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../WABinary/index.js").JidWithDevice[]>;
84
- devicesMutex: {
85
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
86
- };
87
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
88
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
89
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types/index.js").MessageRelayOptions) => Promise<string>;
90
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
91
- sendReceipts: (keys: WAMessageKey[], type: import("../Types/index.js").MessageReceiptType) => Promise<void>;
92
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
93
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
94
- getMediaHost: () => string;
95
- waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
96
- fetchPrivacySettings: (force?: boolean) => Promise<{
97
- [_: string]: string;
98
- }>;
99
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
100
- createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
101
- nodes: BinaryNode[];
102
- shouldIncludeDeviceIdentity: boolean;
103
- }>;
104
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../WABinary/index.js").JidWithDevice & {
105
- jid: string;
106
- })[]>;
107
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
108
- updateMediaMessage: (message: import("../Types/index.js").WAMessage) => Promise<import("../Types/index.js").WAMessage>;
109
- sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<import("../Types/index.js").WAMessage | undefined>;
110
- newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
111
- newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
112
- newsletterSubscribers: (jid: string) => Promise<{
113
- subscribers: number;
114
- }>;
115
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
116
- newsletterFollow: (jid: string) => Promise<unknown>;
117
- newsletterUnfollow: (jid: string) => Promise<unknown>;
118
- newsletterMute: (jid: string) => Promise<unknown>;
119
- newsletterUnmute: (jid: string) => Promise<unknown>;
120
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
121
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
122
- newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
123
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
124
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
125
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
126
- subscribeNewsletterUpdates: (jid: string) => Promise<{
127
- duration: string;
128
- } | null>;
129
- newsletterAdminCount: (jid: string) => Promise<number>;
130
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
131
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
132
- newsletterDelete: (jid: string) => Promise<void>;
133
- groupMetadata: (jid: string) => Promise<GroupMetadata>;
134
- groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
135
- groupLeave: (id: string) => Promise<void>;
136
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
137
- groupRequestParticipantsList: (jid: string) => Promise<{
138
- [key: string]: string;
139
- }[]>;
140
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
141
- status: string;
142
- jid: string | undefined;
143
- }[]>;
144
- groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
145
- status: string;
146
- jid: string | undefined;
147
- content: BinaryNode;
148
- }[]>;
149
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
150
- groupInviteCode: (jid: string) => Promise<string | undefined>;
151
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
152
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
153
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
154
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
155
- groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
156
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
157
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
158
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
159
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
160
- groupFetchAllParticipating: () => Promise<{
161
- [_: string]: GroupMetadata;
162
- }>;
163
- serverProps: {
164
- privacyTokenOn1to1: boolean;
165
- profilePicPrivacyToken: boolean;
166
- lidTrustedTokenIssueToLid: boolean;
167
- };
168
- createCallLink: (type: "audio" | "video", event?: {
169
- startTime: number;
170
- }, timeoutMs?: number) => Promise<string | undefined>;
171
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
172
- messageMutex: {
173
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
174
- };
175
- receiptMutex: {
176
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
177
- };
178
- appStatePatchMutex: {
179
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
180
- };
181
- notificationMutex: {
182
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
183
- };
184
- upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
185
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
186
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
187
- presenceSubscribe: (toJid: string) => Promise<void>;
188
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
189
- fetchBlocklist: () => Promise<(string | undefined)[]>;
190
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
191
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
192
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
193
- width: number;
194
- height: number;
195
- }) => Promise<void>;
196
- removeProfilePicture: (jid: string) => Promise<void>;
197
- updateProfileStatus: (status: string) => Promise<void>;
198
- updateProfileName: (name: string) => Promise<void>;
199
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
200
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
201
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
202
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
203
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
204
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
205
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
206
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
207
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
208
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
209
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
210
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
211
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
212
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
213
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
214
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
215
- removeContact: (jid: string) => Promise<void>;
216
- placeholderResendCache: import("../Types/index.js").CacheStore;
217
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
218
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
219
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
220
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
221
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
222
- star: (jid: string, messages: {
223
- id: string;
224
- fromMe?: boolean;
225
- }[], star: boolean) => Promise<void>;
226
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
227
- removeQuickReply: (timestamp: string) => Promise<void>;
228
- type: "md";
229
- ws: import("./Client/websocket.js").WebSocketClient;
230
- ev: import("../Types/index.js").BaileysEventEmitter & {
231
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
232
- buffer(): void;
233
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
234
- flush(): boolean;
235
- isBuffering(): boolean;
236
- destroy(): void;
237
- };
238
- authState: {
239
- creds: import("../Types/index.js").AuthenticationCreds;
240
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
241
- };
242
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
243
- user: import("../Types/index.js").Contact | undefined;
244
- generateMessageTag: () => string;
245
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
246
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
247
- waitForSocketOpen: () => Promise<void>;
248
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
249
- sendNode: (frame: BinaryNode) => Promise<void>;
250
- logout: (msg?: string) => Promise<void>;
251
- end: (error: Error | undefined) => Promise<void>;
252
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
253
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
254
- uploadPreKeys: (count?: number) => Promise<void>;
255
- uploadPreKeysToServerIfRequired: () => Promise<void>;
256
- digestKeyBundle: () => Promise<void>;
257
- rotateSignedPreKey: () => Promise<void>;
258
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
259
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
260
- sendUnifiedSession: () => Promise<void>;
261
- wamBuffer: import("../index.js").BinaryInfo;
262
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
263
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
264
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
265
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
266
- jid: string;
267
- exists: boolean;
268
- }[] | undefined>;
269
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
270
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
271
- };
272
- export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
273
- //# sourceMappingURL=communities.d.ts.map
@@ -1,161 +0,0 @@
1
- import { Boom } from '@hapi/boom';
2
- import { proto } from '../../WAProto/index.js';
3
- import type { GroupMetadata, ParticipantAction, SocketConfig, WAMessageKey } from '../Types/index.js';
4
- import { type BinaryNode } from '../WABinary/index.js';
5
- export declare const makeGroupsSocket: (config: SocketConfig) => {
6
- groupMetadata: (jid: string) => Promise<GroupMetadata>;
7
- groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
8
- groupLeave: (id: string) => Promise<void>;
9
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
10
- groupRequestParticipantsList: (jid: string) => Promise<{
11
- [key: string]: string;
12
- }[]>;
13
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
14
- status: string;
15
- jid: string | undefined;
16
- }[]>;
17
- groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
18
- status: string;
19
- jid: string | undefined;
20
- content: BinaryNode;
21
- }[]>;
22
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
23
- groupInviteCode: (jid: string) => Promise<string | undefined>;
24
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
25
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
26
- /**
27
- * revoke a v4 invite for someone
28
- * @param groupJid group jid
29
- * @param invitedJid jid of person you invited
30
- * @returns true if successful
31
- */
32
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
33
- /**
34
- * accept a GroupInviteMessage
35
- * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
36
- * @param inviteMessage the message to accept
37
- */
38
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
39
- groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
40
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
41
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
42
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
43
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
44
- groupFetchAllParticipating: () => Promise<{
45
- [_: string]: GroupMetadata;
46
- }>;
47
- serverProps: {
48
- privacyTokenOn1to1: boolean;
49
- profilePicPrivacyToken: boolean;
50
- lidTrustedTokenIssueToLid: boolean;
51
- };
52
- createCallLink: (type: "audio" | "video", event?: {
53
- startTime: number;
54
- }, timeoutMs?: number) => Promise<string | undefined>;
55
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
56
- messageMutex: {
57
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
58
- };
59
- receiptMutex: {
60
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
61
- };
62
- appStatePatchMutex: {
63
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
64
- };
65
- notificationMutex: {
66
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
67
- };
68
- fetchPrivacySettings: (force?: boolean) => Promise<{
69
- [_: string]: string;
70
- }>;
71
- upsertMessage: (msg: import("../Types/index.js").WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
72
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
73
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
74
- presenceSubscribe: (toJid: string) => Promise<void>;
75
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
76
- fetchBlocklist: () => Promise<(string | undefined)[]>;
77
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
78
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
79
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
80
- width: number;
81
- height: number;
82
- }) => Promise<void>;
83
- removeProfilePicture: (jid: string) => Promise<void>;
84
- updateProfileStatus: (status: string) => Promise<void>;
85
- updateProfileName: (name: string) => Promise<void>;
86
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
87
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
88
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
89
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
90
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
91
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
92
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
93
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
94
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
95
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
96
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
97
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
98
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
99
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
100
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
101
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
102
- removeContact: (jid: string) => Promise<void>;
103
- placeholderResendCache: import("../Types/index.js").CacheStore;
104
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
105
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
106
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
107
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
108
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
109
- star: (jid: string, messages: {
110
- id: string;
111
- fromMe?: boolean;
112
- }[], star: boolean) => Promise<void>;
113
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
114
- removeQuickReply: (timestamp: string) => Promise<void>;
115
- type: "md";
116
- ws: import("./Client/websocket.js").WebSocketClient;
117
- ev: import("../Types/index.js").BaileysEventEmitter & {
118
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
119
- buffer(): void;
120
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
121
- flush(): boolean;
122
- isBuffering(): boolean;
123
- destroy(): void;
124
- };
125
- authState: {
126
- creds: import("../Types/index.js").AuthenticationCreds;
127
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
128
- };
129
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
130
- user: import("../Types/index.js").Contact | undefined;
131
- generateMessageTag: () => string;
132
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
133
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
134
- waitForSocketOpen: () => Promise<void>;
135
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
136
- sendNode: (frame: BinaryNode) => Promise<void>;
137
- logout: (msg?: string) => Promise<void>;
138
- end: (error: Error | undefined) => Promise<void>;
139
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
140
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
141
- uploadPreKeys: (count?: number) => Promise<void>;
142
- uploadPreKeysToServerIfRequired: () => Promise<void>;
143
- digestKeyBundle: () => Promise<void>;
144
- rotateSignedPreKey: () => Promise<void>;
145
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
146
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
147
- sendUnifiedSession: () => Promise<void>;
148
- wamBuffer: import("../index.js").BinaryInfo;
149
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
150
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
151
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
152
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
153
- jid: string;
154
- exists: boolean;
155
- }[] | undefined>;
156
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
157
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
158
- };
159
- export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata;
160
- export type GroupsSocket = ReturnType<typeof makeGroupsSocket>;
161
- //# sourceMappingURL=groups.d.ts.map