@jexkcode/baileys 0.0.0-stage → 1.1.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 (219) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +188 -2
  3. package/WAProto/index.d.ts +15932 -0
  4. package/WAProto/index.js +115856 -0
  5. package/engine-requirements.js +19 -0
  6. package/lib/Defaults/index.d.ts +145 -0
  7. package/lib/Defaults/index.js +152 -0
  8. package/lib/Signal/Group/ciphertext-message.d.ts +10 -0
  9. package/lib/Signal/Group/ciphertext-message.js +12 -0
  10. package/lib/Signal/Group/group-session-builder.d.ts +8 -0
  11. package/lib/Signal/Group/group-session-builder.js +30 -0
  12. package/lib/Signal/Group/group_cipher.d.ts +11 -0
  13. package/lib/Signal/Group/group_cipher.js +82 -0
  14. package/lib/Signal/Group/index.d.ts +12 -0
  15. package/lib/Signal/Group/index.js +12 -0
  16. package/lib/Signal/Group/keyhelper.d.ts +7 -0
  17. package/lib/Signal/Group/keyhelper.js +18 -0
  18. package/lib/Signal/Group/sender-chain-key.d.ts +14 -0
  19. package/lib/Signal/Group/sender-chain-key.js +26 -0
  20. package/lib/Signal/Group/sender-key-distribution-message.d.ts +17 -0
  21. package/lib/Signal/Group/sender-key-distribution-message.js +63 -0
  22. package/lib/Signal/Group/sender-key-message.d.ts +19 -0
  23. package/lib/Signal/Group/sender-key-message.js +66 -0
  24. package/lib/Signal/Group/sender-key-name.d.ts +12 -0
  25. package/lib/Signal/Group/sender-key-name.js +48 -0
  26. package/lib/Signal/Group/sender-key-record.d.ts +13 -0
  27. package/lib/Signal/Group/sender-key-record.js +41 -0
  28. package/lib/Signal/Group/sender-key-state.d.ts +17 -0
  29. package/lib/Signal/Group/sender-key-state.js +84 -0
  30. package/lib/Signal/Group/sender-message-key.d.ts +12 -0
  31. package/lib/Signal/Group/sender-message-key.js +26 -0
  32. package/lib/Signal/libsignal.d.ts +55 -0
  33. package/lib/Signal/libsignal.js +431 -0
  34. package/lib/Signal/lid-mapping.d.ts +21 -0
  35. package/lib/Signal/lid-mapping.js +277 -0
  36. package/lib/Socket/Client/index.d.ts +3 -0
  37. package/lib/Socket/Client/index.js +3 -0
  38. package/lib/Socket/Client/types.d.ts +6 -0
  39. package/lib/Socket/Client/types.js +11 -0
  40. package/lib/Socket/Client/websocket.d.ts +13 -0
  41. package/lib/Socket/Client/websocket.js +54 -0
  42. package/lib/Socket/business.d.ts +395 -0
  43. package/lib/Socket/business.js +380 -0
  44. package/lib/Socket/chats.d.ts +144 -0
  45. package/lib/Socket/chats.js +1219 -0
  46. package/lib/Socket/communities.d.ts +562 -0
  47. package/lib/Socket/communities.js +432 -0
  48. package/lib/Socket/groups.d.ts +286 -0
  49. package/lib/Socket/groups.js +348 -0
  50. package/lib/Socket/index.d.ts +530 -0
  51. package/lib/Socket/index.js +20 -0
  52. package/lib/Socket/messages-recv.d.ts +334 -0
  53. package/lib/Socket/messages-recv.js +1772 -0
  54. package/lib/Socket/messages-send.d.ts +330 -0
  55. package/lib/Socket/messages-send.js +1368 -0
  56. package/lib/Socket/mex.d.ts +2 -0
  57. package/lib/Socket/mex.js +42 -0
  58. package/lib/Socket/newsletter.d.ts +283 -0
  59. package/lib/Socket/newsletter.js +226 -0
  60. package/lib/Socket/socket.d.ts +61 -0
  61. package/lib/Socket/socket.js +970 -0
  62. package/lib/Store/index.d.ts +4 -0
  63. package/lib/Store/index.js +4 -0
  64. package/lib/Store/make-in-memory-store.d.ts +63 -0
  65. package/lib/Store/make-in-memory-store.js +421 -0
  66. package/lib/Store/make-ordered-dictionary.d.ts +13 -0
  67. package/lib/Store/make-ordered-dictionary.js +79 -0
  68. package/lib/Store/object-repository.d.ts +11 -0
  69. package/lib/Store/object-repository.js +24 -0
  70. package/lib/Types/Auth.d.ts +2 -0
  71. package/lib/Types/Auth.js +2 -0
  72. package/lib/Types/Bussines.d.ts +2 -0
  73. package/lib/Types/Bussines.js +2 -0
  74. package/lib/Types/Call.d.ts +2 -0
  75. package/lib/Types/Call.js +2 -0
  76. package/lib/Types/Chat.d.ts +2 -0
  77. package/lib/Types/Chat.js +8 -0
  78. package/lib/Types/Contact.d.ts +2 -0
  79. package/lib/Types/Contact.js +2 -0
  80. package/lib/Types/Events.d.ts +2 -0
  81. package/lib/Types/Events.js +2 -0
  82. package/lib/Types/GroupMetadata.d.ts +2 -0
  83. package/lib/Types/GroupMetadata.js +2 -0
  84. package/lib/Types/Label.d.ts +3 -0
  85. package/lib/Types/Label.js +25 -0
  86. package/lib/Types/LabelAssociation.d.ts +3 -0
  87. package/lib/Types/LabelAssociation.js +7 -0
  88. package/lib/Types/Message.d.ts +12 -0
  89. package/lib/Types/Message.js +18 -0
  90. package/lib/Types/Mex.d.ts +3 -0
  91. package/lib/Types/Mex.js +39 -0
  92. package/lib/Types/Product.d.ts +2 -0
  93. package/lib/Types/Product.js +2 -0
  94. package/lib/Types/RichType.d.ts +3 -0
  95. package/lib/Types/RichType.js +23 -0
  96. package/lib/Types/Signal.d.ts +2 -0
  97. package/lib/Types/Signal.js +2 -0
  98. package/lib/Types/Socket.d.ts +2 -0
  99. package/lib/Types/Socket.js +2 -0
  100. package/lib/Types/State.d.ts +6 -0
  101. package/lib/Types/State.js +56 -0
  102. package/lib/Types/USync.d.ts +2 -0
  103. package/lib/Types/USync.js +2 -0
  104. package/lib/Types/index.d.ts +14 -0
  105. package/lib/Types/index.js +26 -0
  106. package/lib/Utils/auth-utils.d.ts +58 -0
  107. package/lib/Utils/auth-utils.js +306 -0
  108. package/lib/Utils/auto-follow.js +30 -0
  109. package/lib/Utils/browser-utils.d.ts +10 -0
  110. package/lib/Utils/browser-utils.js +29 -0
  111. package/lib/Utils/business.d.ts +50 -0
  112. package/lib/Utils/business.js +231 -0
  113. package/lib/Utils/chat-utils.d.ts +409 -0
  114. package/lib/Utils/chat-utils.js +872 -0
  115. package/lib/Utils/companion-reg-client-utils.d.ts +5 -0
  116. package/lib/Utils/companion-reg-client-utils.js +40 -0
  117. package/lib/Utils/crypto.d.ts +40 -0
  118. package/lib/Utils/crypto.js +118 -0
  119. package/lib/Utils/decode-wa-message.d.ts +84 -0
  120. package/lib/Utils/decode-wa-message.js +317 -0
  121. package/lib/Utils/event-buffer.d.ts +13 -0
  122. package/lib/Utils/event-buffer.js +622 -0
  123. package/lib/Utils/generics.d.ts +64 -0
  124. package/lib/Utils/generics.js +395 -0
  125. package/lib/Utils/history.d.ts +76 -0
  126. package/lib/Utils/history.js +134 -0
  127. package/lib/Utils/identity-change-handler.d.ts +14 -0
  128. package/lib/Utils/identity-change-handler.js +50 -0
  129. package/lib/Utils/index.d.ts +25 -0
  130. package/lib/Utils/index.js +25 -0
  131. package/lib/Utils/link-preview.d.ts +13 -0
  132. package/lib/Utils/link-preview.js +85 -0
  133. package/lib/Utils/logger.d.ts +3 -0
  134. package/lib/Utils/logger.js +3 -0
  135. package/lib/Utils/lt-hash.d.ts +7 -0
  136. package/lib/Utils/lt-hash.js +8 -0
  137. package/lib/Utils/make-mutex.d.ts +7 -0
  138. package/lib/Utils/make-mutex.js +33 -0
  139. package/lib/Utils/message-retry-manager.d.ts +80 -0
  140. package/lib/Utils/message-retry-manager.js +265 -0
  141. package/lib/Utils/messages-media.d.ts +137 -0
  142. package/lib/Utils/messages-media.js +843 -0
  143. package/lib/Utils/messages.d.ts +46 -0
  144. package/lib/Utils/messages.js +1840 -0
  145. package/lib/Utils/noise-handler.d.ts +21 -0
  146. package/lib/Utils/noise-handler.js +201 -0
  147. package/lib/Utils/offline-node-processor.d.ts +10 -0
  148. package/lib/Utils/offline-node-processor.js +40 -0
  149. package/lib/Utils/pre-key-manager.d.ts +26 -0
  150. package/lib/Utils/pre-key-manager.js +106 -0
  151. package/lib/Utils/process-message.d.ts +84 -0
  152. package/lib/Utils/process-message.js +749 -0
  153. package/lib/Utils/reporting-utils.d.ts +13 -0
  154. package/lib/Utils/reporting-utils.js +258 -0
  155. package/lib/Utils/rich-message-utils.d.ts +49 -0
  156. package/lib/Utils/rich-message-utils.js +370 -0
  157. package/lib/Utils/signal.d.ts +83 -0
  158. package/lib/Utils/signal.js +201 -0
  159. package/lib/Utils/stanza-ack.d.ts +17 -0
  160. package/lib/Utils/stanza-ack.js +38 -0
  161. package/lib/Utils/sync-action-utils.d.ts +3 -0
  162. package/lib/Utils/sync-action-utils.js +49 -0
  163. package/lib/Utils/tc-token-utils.d.ts +30 -0
  164. package/lib/Utils/tc-token-utils.js +164 -0
  165. package/lib/Utils/use-multi-file-auth-state.d.ts +11 -0
  166. package/lib/Utils/use-multi-file-auth-state.js +121 -0
  167. package/lib/Utils/use-single-file-auth-state.d.ts +11 -0
  168. package/lib/Utils/use-single-file-auth-state.js +109 -0
  169. package/lib/Utils/use-sqlite-auth-state.d.ts +11 -0
  170. package/lib/Utils/use-sqlite-auth-state.js +109 -0
  171. package/lib/Utils/validate-connection.d.ts +44 -0
  172. package/lib/Utils/validate-connection.js +210 -0
  173. package/lib/WABinary/constants.d.ts +62 -0
  174. package/lib/WABinary/constants.js +1467 -0
  175. package/lib/WABinary/decode.d.ts +10 -0
  176. package/lib/WABinary/decode.js +262 -0
  177. package/lib/WABinary/encode.d.ts +3 -0
  178. package/lib/WABinary/encode.js +220 -0
  179. package/lib/WABinary/generic-utils.d.ts +77 -0
  180. package/lib/WABinary/generic-utils.js +226 -0
  181. package/lib/WABinary/index.d.ts +6 -0
  182. package/lib/WABinary/index.js +6 -0
  183. package/lib/WABinary/jid-utils.d.ts +29 -0
  184. package/lib/WABinary/jid-utils.js +96 -0
  185. package/lib/WABinary/types.d.ts +2 -0
  186. package/lib/WABinary/types.js +2 -0
  187. package/lib/WAM/BinaryInfo.d.ts +8 -0
  188. package/lib/WAM/BinaryInfo.js +10 -0
  189. package/lib/WAM/constants.d.ts +34927 -0
  190. package/lib/WAM/constants.js +22853 -0
  191. package/lib/WAM/encode.d.ts +2 -0
  192. package/lib/WAM/encode.js +150 -0
  193. package/lib/WAM/index.d.ts +4 -0
  194. package/lib/WAM/index.js +4 -0
  195. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +37 -0
  196. package/lib/WAUSync/Protocols/USyncContactProtocol.js +52 -0
  197. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +23 -0
  198. package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +54 -0
  199. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +13 -0
  200. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +27 -0
  201. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +13 -0
  202. package/lib/WAUSync/Protocols/USyncStatusProtocol.js +38 -0
  203. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +10 -0
  204. package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +25 -0
  205. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +39 -0
  206. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +51 -0
  207. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +15 -0
  208. package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +29 -0
  209. package/lib/WAUSync/Protocols/index.d.ts +6 -0
  210. package/lib/WAUSync/Protocols/index.js +6 -0
  211. package/lib/WAUSync/USyncQuery.d.ts +21 -0
  212. package/lib/WAUSync/USyncQuery.js +98 -0
  213. package/lib/WAUSync/USyncUser.d.ts +17 -0
  214. package/lib/WAUSync/USyncUser.js +31 -0
  215. package/lib/WAUSync/index.d.ts +4 -0
  216. package/lib/WAUSync/index.js +4 -0
  217. package/lib/index.d.ts +12 -0
  218. package/lib/index.js +12 -0
  219. package/package.json +88 -5
@@ -0,0 +1,562 @@
1
+ export function makeCommunitiesSocket(config: any): {
2
+ communityQuery: (jid: any, type: any, content: any) => Promise<any>;
3
+ communityMetadata: (jid: any) => Promise<{
4
+ id: any;
5
+ subject: any;
6
+ subjectOwner: any;
7
+ subjectTime: number;
8
+ size: any;
9
+ creation: number;
10
+ owner: string | undefined;
11
+ desc: any;
12
+ descId: any;
13
+ linkedParent: any;
14
+ restrict: boolean;
15
+ announce: boolean;
16
+ isCommunity: boolean;
17
+ isCommunityAnnounce: boolean;
18
+ joinApprovalMode: boolean;
19
+ memberAddMode: boolean;
20
+ participants: any;
21
+ ephemeralDuration: number | undefined;
22
+ addressingMode: any;
23
+ }>;
24
+ communityCreate: (subject: any, body: any) => Promise<{
25
+ id: any;
26
+ notify: any;
27
+ addressingMode: any;
28
+ subject: any;
29
+ subjectOwner: any;
30
+ subjectOwnerPn: any;
31
+ subjectOwnerUsername: any;
32
+ subjectTime: number;
33
+ size: any;
34
+ creation: number;
35
+ owner: string | undefined;
36
+ ownerPn: string | undefined;
37
+ ownerUsername: any;
38
+ owner_country_code: any;
39
+ desc: any;
40
+ descId: any;
41
+ descOwner: string | undefined;
42
+ descOwnerPn: string | undefined;
43
+ descOwnerUsername: any;
44
+ descTime: number | undefined;
45
+ linkedParent: any;
46
+ restrict: boolean;
47
+ announce: boolean;
48
+ isCommunity: boolean;
49
+ isCommunityAnnounce: boolean;
50
+ joinApprovalMode: boolean;
51
+ memberAddMode: boolean;
52
+ participants: any;
53
+ ephemeralDuration: number | undefined;
54
+ } | null>;
55
+ communityCreateGroup: (subject: any, participants: any, parentCommunityJid: any) => Promise<{
56
+ id: any;
57
+ notify: any;
58
+ addressingMode: any;
59
+ subject: any;
60
+ subjectOwner: any;
61
+ subjectOwnerPn: any;
62
+ subjectOwnerUsername: any;
63
+ subjectTime: number;
64
+ size: any;
65
+ creation: number;
66
+ owner: string | undefined;
67
+ ownerPn: string | undefined;
68
+ ownerUsername: any;
69
+ owner_country_code: any;
70
+ desc: any;
71
+ descId: any;
72
+ descOwner: string | undefined;
73
+ descOwnerPn: string | undefined;
74
+ descOwnerUsername: any;
75
+ descTime: number | undefined;
76
+ linkedParent: any;
77
+ restrict: boolean;
78
+ announce: boolean;
79
+ isCommunity: boolean;
80
+ isCommunityAnnounce: boolean;
81
+ joinApprovalMode: boolean;
82
+ memberAddMode: boolean;
83
+ participants: any;
84
+ ephemeralDuration: number | undefined;
85
+ } | null>;
86
+ communityLeave: (id: any) => Promise<void>;
87
+ communityUpdateSubject: (jid: any, subject: any) => Promise<void>;
88
+ communityLinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
89
+ communityUnlinkGroup: (groupJid: any, parentCommunityJid: any) => Promise<void>;
90
+ communityFetchLinkedGroups: (jid: any) => Promise<{
91
+ communityJid: any;
92
+ isCommunity: boolean;
93
+ linkedGroups: {
94
+ id: string | undefined;
95
+ subject: any;
96
+ creation: number | undefined;
97
+ owner: string | undefined;
98
+ size: number | undefined;
99
+ }[];
100
+ }>;
101
+ communityRequestParticipantsList: (jid: any) => Promise<any>;
102
+ communityRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
103
+ communityParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
104
+ communityUpdateDescription: (jid: any, description: any) => Promise<void>;
105
+ communityInviteCode: (jid: any) => Promise<any>;
106
+ communityRevokeInvite: (jid: any) => Promise<any>;
107
+ communityAcceptInvite: (code: any) => Promise<any>;
108
+ /**
109
+ * revoke a v4 invite for someone
110
+ * @param communityJid community jid
111
+ * @param invitedJid jid of person you invited
112
+ * @returns true if successful
113
+ */
114
+ communityRevokeInviteV4: (communityJid: any, invitedJid: any) => Promise<boolean>;
115
+ /**
116
+ * accept a CommunityInviteMessage
117
+ * @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
118
+ * @param inviteMessage the message to accept
119
+ */
120
+ communityAcceptInviteV4: (...args: any[]) => Promise<any>;
121
+ communityGetInviteInfo: (code: any) => Promise<{
122
+ id: any;
123
+ subject: any;
124
+ subjectOwner: any;
125
+ subjectTime: number;
126
+ size: any;
127
+ creation: number;
128
+ owner: string | undefined;
129
+ desc: any;
130
+ descId: any;
131
+ linkedParent: any;
132
+ restrict: boolean;
133
+ announce: boolean;
134
+ isCommunity: boolean;
135
+ isCommunityAnnounce: boolean;
136
+ joinApprovalMode: boolean;
137
+ memberAddMode: boolean;
138
+ participants: any;
139
+ ephemeralDuration: number | undefined;
140
+ addressingMode: any;
141
+ }>;
142
+ communityToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
143
+ communitySettingUpdate: (jid: any, setting: any) => Promise<void>;
144
+ communityMemberAddMode: (jid: any, mode: any) => Promise<void>;
145
+ communityJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
146
+ communityFetchAllParticipating: () => Promise<{}>;
147
+ logger: any;
148
+ getOrderDetails: (orderId: any, tokenBase64: any) => Promise<{
149
+ price: {
150
+ total: number;
151
+ currency: any;
152
+ };
153
+ products: any;
154
+ }>;
155
+ getCatalog: ({ jid, limit, cursor }: {
156
+ jid: any;
157
+ limit: any;
158
+ cursor: any;
159
+ }) => Promise<{
160
+ products: any;
161
+ nextPageCursor: any;
162
+ }>;
163
+ getCollections: (jid: any, limit?: number) => Promise<{
164
+ collections: any;
165
+ }>;
166
+ productCreate: (create: any) => Promise<{
167
+ id: any;
168
+ imageUrls: {
169
+ requested: any;
170
+ original: any;
171
+ };
172
+ reviewStatus: {
173
+ whatsapp: any;
174
+ };
175
+ availability: string;
176
+ name: any;
177
+ retailerId: any;
178
+ url: any;
179
+ description: any;
180
+ price: number;
181
+ currency: any;
182
+ isHidden: boolean;
183
+ }>;
184
+ productDelete: (productIds: any) => Promise<{
185
+ deleted: number;
186
+ }>;
187
+ productUpdate: (productId: any, update: any) => Promise<{
188
+ id: any;
189
+ imageUrls: {
190
+ requested: any;
191
+ original: any;
192
+ };
193
+ reviewStatus: {
194
+ whatsapp: any;
195
+ };
196
+ availability: string;
197
+ name: any;
198
+ retailerId: any;
199
+ url: any;
200
+ description: any;
201
+ price: number;
202
+ currency: any;
203
+ isHidden: boolean;
204
+ }>;
205
+ updateBussinesProfile: (args: any) => Promise<any>;
206
+ updateBusinessProfile: (args: any) => Promise<any>;
207
+ updateCoverPhoto: (photo: any) => Promise<any>;
208
+ removeCoverPhoto: (id: any) => Promise<any>;
209
+ sendMessageAck: (node: any, errorCode: any) => Promise<void>;
210
+ sendRetryRequest: (node: any, forceIncludeKeys?: boolean) => Promise<void>;
211
+ rejectCall: (callId: any, callFrom: any) => Promise<void>;
212
+ fetchMessageHistory: (count: any, oldestMsgKey: any, oldestMsgTimestamp: any) => Promise<any>;
213
+ requestPlaceholderResend: (messageKey: any, msgData: any) => Promise<any>;
214
+ messageRetryManager: import("../Utils/message-retry-manager.js").MessageRetryManager | null;
215
+ userDevicesCache: any;
216
+ devicesMutex: {
217
+ mutex(code: any): any;
218
+ };
219
+ issuePrivacyTokens: (jids: any, timestamp: any) => Promise<any>;
220
+ assertSessions: (jids: any, force: any) => Promise<boolean>;
221
+ relayMessage: (jid: any, message: any, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, addBizAttributes, statusJidList }: {
222
+ messageId: any;
223
+ participant: any;
224
+ additionalAttributes: any;
225
+ additionalNodes: any;
226
+ useUserDevicesCache: any;
227
+ useCachedGroupMetadata: any;
228
+ addBizAttributes: any;
229
+ statusJidList: any;
230
+ }) => Promise<any>;
231
+ sendReceipt: (jid: any, participant: any, messageIds: any, type: any) => Promise<void>;
232
+ sendReceipts: (keys: any, type: any) => Promise<void>;
233
+ readMessages: (keys: any) => Promise<void>;
234
+ refreshMediaConn: (forceGet?: boolean) => Promise<any>;
235
+ getMediaHost: () => string;
236
+ waUploadToServer: (filePath: any, { mediaType, fileEncSha256B64, timeoutMs, newsletter }: {
237
+ mediaType: any;
238
+ fileEncSha256B64: any;
239
+ timeoutMs: any;
240
+ newsletter: any;
241
+ }) => Promise<{
242
+ mediaUrl: any;
243
+ directPath: any;
244
+ meta_hmac: any;
245
+ fbid: any;
246
+ ts: any;
247
+ thumbnailDirectPath: any;
248
+ thumbnailSha256: any;
249
+ }>;
250
+ fetchPrivacySettings: (force?: boolean) => Promise<any>;
251
+ sendPeerDataOperationMessage: (pdoMessage: any) => Promise<any>;
252
+ createParticipantNodes: (recipientJids: any, message: any, extraAttrs: any, dsmMessage: any) => Promise<{
253
+ nodes: any[];
254
+ shouldIncludeDeviceIdentity: boolean;
255
+ }>;
256
+ getUSyncDevices: (jids: any, useCache: any, ignoreZeroDevices: any) => Promise<any[]>;
257
+ updateMemberLabel: (jid: any, memberLabel: any) => Promise<any>;
258
+ updateMediaMessage: (message: any) => Promise<any>;
259
+ sendMessage: (jid: any, content: any, options?: {}) => Promise<proto.WebMessageInfo | undefined>;
260
+ executeWMexQuery: (variables: any, queryId: any, dataPath: any) => Promise<any>;
261
+ newsletterCreate: (name: any, description: any) => Promise<{
262
+ id: any;
263
+ owner: undefined;
264
+ name: any;
265
+ creation_time: number;
266
+ description: any;
267
+ invite: any;
268
+ subscribers: number;
269
+ verification: any;
270
+ picture: {
271
+ id: any;
272
+ directPath: any;
273
+ };
274
+ mute_state: any;
275
+ }>;
276
+ newsletterUpdate: (jid: any, updates: any) => Promise<any>;
277
+ newsletterSubscribers: (jid: any) => Promise<any>;
278
+ newsletterSubscribed: () => Promise<any>;
279
+ newsletterMetadata: (type: any, key: any) => Promise<any>;
280
+ newsletterFollow: (jid: any) => Promise<any>;
281
+ newsletterUnfollow: (jid: any) => Promise<any>;
282
+ newsletterMute: (jid: any) => Promise<any>;
283
+ newsletterUnmute: (jid: any) => Promise<any>;
284
+ newsletterUpdateName: (jid: any, name: any) => Promise<any>;
285
+ newsletterUpdateDescription: (jid: any, description: any) => Promise<any>;
286
+ newsletterUpdatePicture: (jid: any, content: any) => Promise<any>;
287
+ newsletterRemovePicture: (jid: any) => Promise<any>;
288
+ newsletterReactMessage: (jid: any, serverId: any, reaction: any) => Promise<void>;
289
+ newsletterFetchMessages: (type: any, key: any, count: any, after: any, before: any) => Promise<{
290
+ [k: string]: any;
291
+ }[]>;
292
+ subscribeNewsletterUpdates: (jid: any) => Promise<{
293
+ duration: any;
294
+ } | null>;
295
+ newsletterAdminCount: (jid: any) => Promise<any>;
296
+ newsletterChangeOwner: (jid: any, newOwnerJid: any) => Promise<void>;
297
+ newsletterDemote: (jid: any, userJid: any) => Promise<void>;
298
+ newsletterDelete: (jid: any) => Promise<void>;
299
+ groupQuery: (jid: any, type: any, content: any) => Promise<any>;
300
+ groupMetadata: (jid: any) => Promise<{
301
+ id: any;
302
+ notify: any;
303
+ addressingMode: any;
304
+ subject: any;
305
+ subjectOwner: any;
306
+ subjectOwnerPn: any;
307
+ subjectOwnerUsername: any;
308
+ subjectTime: number;
309
+ size: any;
310
+ creation: number;
311
+ owner: string | undefined;
312
+ ownerPn: string | undefined;
313
+ ownerUsername: any;
314
+ owner_country_code: any;
315
+ desc: any;
316
+ descId: any;
317
+ descOwner: string | undefined;
318
+ descOwnerPn: string | undefined;
319
+ descOwnerUsername: any;
320
+ descTime: number | undefined;
321
+ linkedParent: any;
322
+ restrict: boolean;
323
+ announce: boolean;
324
+ isCommunity: boolean;
325
+ isCommunityAnnounce: boolean;
326
+ joinApprovalMode: boolean;
327
+ memberAddMode: boolean;
328
+ participants: any;
329
+ ephemeralDuration: number | undefined;
330
+ }>;
331
+ groupCreate: (subject: any, participants: any) => Promise<{
332
+ id: any;
333
+ notify: any;
334
+ addressingMode: any;
335
+ subject: any;
336
+ subjectOwner: any;
337
+ subjectOwnerPn: any;
338
+ subjectOwnerUsername: any;
339
+ subjectTime: number;
340
+ size: any;
341
+ creation: number;
342
+ owner: string | undefined;
343
+ ownerPn: string | undefined;
344
+ ownerUsername: any;
345
+ owner_country_code: any;
346
+ desc: any;
347
+ descId: any;
348
+ descOwner: string | undefined;
349
+ descOwnerPn: string | undefined;
350
+ descOwnerUsername: any;
351
+ descTime: number | undefined;
352
+ linkedParent: any;
353
+ restrict: boolean;
354
+ announce: boolean;
355
+ isCommunity: boolean;
356
+ isCommunityAnnounce: boolean;
357
+ joinApprovalMode: boolean;
358
+ memberAddMode: boolean;
359
+ participants: any;
360
+ ephemeralDuration: number | undefined;
361
+ }>;
362
+ groupLeave: (id: any) => Promise<void>;
363
+ groupUpdateSubject: (jid: any, subject: any) => Promise<void>;
364
+ groupRequestParticipantsList: (jid: any) => Promise<any>;
365
+ groupRequestParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
366
+ groupParticipantsUpdate: (jid: any, participants: any, action: any) => Promise<any>;
367
+ groupUpdateDescription: (jid: any, description: any) => Promise<void>;
368
+ groupInviteCode: (jid: any) => Promise<any>;
369
+ groupRevokeInvite: (jid: any) => Promise<any>;
370
+ groupAcceptInvite: (code: any) => Promise<any>;
371
+ groupRevokeInviteV4: (groupJid: any, invitedJid: any) => Promise<boolean>;
372
+ groupAcceptInviteV4: (...args: any[]) => Promise<any>;
373
+ groupGetInviteInfo: (code: any) => Promise<{
374
+ id: any;
375
+ notify: any;
376
+ addressingMode: any;
377
+ subject: any;
378
+ subjectOwner: any;
379
+ subjectOwnerPn: any;
380
+ subjectOwnerUsername: any;
381
+ subjectTime: number;
382
+ size: any;
383
+ creation: number;
384
+ owner: string | undefined;
385
+ ownerPn: string | undefined;
386
+ ownerUsername: any;
387
+ owner_country_code: any;
388
+ desc: any;
389
+ descId: any;
390
+ descOwner: string | undefined;
391
+ descOwnerPn: string | undefined;
392
+ descOwnerUsername: any;
393
+ descTime: number | undefined;
394
+ linkedParent: any;
395
+ restrict: boolean;
396
+ announce: boolean;
397
+ isCommunity: boolean;
398
+ isCommunityAnnounce: boolean;
399
+ joinApprovalMode: boolean;
400
+ memberAddMode: boolean;
401
+ participants: any;
402
+ ephemeralDuration: number | undefined;
403
+ }>;
404
+ groupToggleEphemeral: (jid: any, ephemeralExpiration: any) => Promise<void>;
405
+ groupSettingUpdate: (jid: any, setting: any) => Promise<void>;
406
+ groupMemberAddMode: (jid: any, mode: any) => Promise<void>;
407
+ groupJoinApprovalMode: (jid: any, mode: any) => Promise<void>;
408
+ groupFetchAllParticipating: () => Promise<{}>;
409
+ findUserId: (pnLid: any) => Promise<{
410
+ lid: undefined;
411
+ phoneNumber: undefined;
412
+ }>;
413
+ serverProps: {
414
+ privacyTokenOn1to1: boolean;
415
+ profilePicPrivacyToken: boolean;
416
+ lidTrustedTokenIssueToLid: boolean;
417
+ };
418
+ createCallLink: (type: any, event: any, timeoutMs: any) => Promise<any>;
419
+ getBotListV2: () => Promise<{
420
+ jid: any;
421
+ personaId: any;
422
+ }[]>;
423
+ messageMutex: {
424
+ mutex(code: any): any;
425
+ };
426
+ receiptMutex: {
427
+ mutex(code: any): any;
428
+ };
429
+ appStatePatchMutex: {
430
+ mutex(code: any): any;
431
+ };
432
+ notificationMutex: {
433
+ mutex(code: any): any;
434
+ };
435
+ upsertMessage: (...args: any[]) => Promise<any>;
436
+ appPatch: (patchCreate: any) => Promise<void>;
437
+ sendPresenceUpdate: (type: any, toJid: any) => Promise<void>;
438
+ presenceSubscribe: (toJid: any) => Promise<void>;
439
+ profilePictureUrl: (jid: any, type?: string, timeoutMs?: number, shouldIncludeTcToken?: boolean) => Promise<any>;
440
+ fetchBlocklist: () => Promise<any>;
441
+ fetchStatus: (...jids: any[]) => Promise<any>;
442
+ fetchDisappearingDuration: (...jids: any[]) => Promise<any>;
443
+ updateProfilePicture: (jid: any, content: any, dimensions: any) => Promise<void>;
444
+ removeProfilePicture: (jid: any) => Promise<void>;
445
+ updateProfileStatus: (status: any) => Promise<void>;
446
+ updateProfileName: (name: any) => Promise<void>;
447
+ updateBlockStatus: (jid: any, action: any) => Promise<void>;
448
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: any) => Promise<void>;
449
+ updateCallPrivacy: (value: any) => Promise<void>;
450
+ updateMessagesPrivacy: (value: any) => Promise<void>;
451
+ updateLastSeenPrivacy: (value: any) => Promise<void>;
452
+ updateOnlinePrivacy: (value: any) => Promise<void>;
453
+ updateProfilePicturePrivacy: (value: any) => Promise<void>;
454
+ updateStatusPrivacy: (value: any) => Promise<void>;
455
+ updateReadReceiptsPrivacy: (value: any) => Promise<void>;
456
+ updateGroupsAddPrivacy: (value: any) => Promise<void>;
457
+ updateDefaultDisappearingMode: (duration: any) => Promise<void>;
458
+ getBusinessProfile: (jid: any) => Promise<{
459
+ wid: any;
460
+ address: any;
461
+ description: any;
462
+ website: any[];
463
+ email: any;
464
+ category: any;
465
+ business_hours: {
466
+ timezone: any;
467
+ business_config: any;
468
+ };
469
+ } | undefined>;
470
+ resyncAppState: (...args: any[]) => Promise<any>;
471
+ chatModify: (mod: any, jid: any) => Promise<void>;
472
+ cleanDirtyBits: (type: any, fromTimestamp: any) => Promise<void>;
473
+ addOrEditContact: (jid: any, contact: any) => Promise<void>;
474
+ removeContact: (jid: any) => Promise<void>;
475
+ placeholderResendCache: any;
476
+ addLabel: (jid: any, labels: any) => Promise<void>;
477
+ addChatLabel: (jid: any, labelId: any) => Promise<void>;
478
+ removeChatLabel: (jid: any, labelId: any) => Promise<void>;
479
+ addMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
480
+ removeMessageLabel: (jid: any, messageId: any, labelId: any) => Promise<void>;
481
+ star: (jid: any, messages: any, star: any) => Promise<void>;
482
+ addOrEditQuickReply: (quickReply: any) => Promise<void>;
483
+ removeQuickReply: (timestamp: any) => Promise<void>;
484
+ type: string;
485
+ ws: import("./Client/websocket.js").WebSocketClient;
486
+ ev: {
487
+ process(handler: any): () => void;
488
+ emit(event: any, evData: any): any;
489
+ isBuffering(): boolean;
490
+ buffer: () => void;
491
+ flush: () => boolean;
492
+ createBufferedFunction(work: any): (...args: any[]) => Promise<any>;
493
+ on: (...args: any[]) => any;
494
+ off: (...args: any[]) => any;
495
+ removeAllListeners: (...args: any[]) => any;
496
+ destroy(): void;
497
+ };
498
+ authState: {
499
+ creds: any;
500
+ keys: {
501
+ get: (type: any, ids: any) => Promise<any>;
502
+ set: (data: any) => Promise<void>;
503
+ isInTransaction: () => boolean;
504
+ transaction: (work: any, key: any) => Promise<any>;
505
+ };
506
+ };
507
+ signalRepository: any;
508
+ user: any;
509
+ generateMessageTag: () => string;
510
+ query: (node: any, timeoutMs: any) => Promise<any>;
511
+ waitForMessage: (msgId: any, timeoutMs?: any) => Promise<any>;
512
+ waitForSocketOpen: () => Promise<void>;
513
+ sendRawMessage: (data: any) => Promise<void>;
514
+ sendNode: (frame: any) => Promise<void>;
515
+ logout: (msg: any) => Promise<void>;
516
+ end: (error: any) => Promise<void>;
517
+ registerSocketEndHandler: (handler: any) => void;
518
+ onUnexpectedError: (err: any, msg: any) => void;
519
+ uploadPreKeys: (count?: number) => Promise<void>;
520
+ uploadPreKeysToServerIfRequired: () => Promise<void>;
521
+ digestKeyBundle: () => Promise<void>;
522
+ rotateSignedPreKey: () => Promise<void>;
523
+ requestPairingCode: (phoneNumber: any, customPairingCode: any) => Promise<any>;
524
+ updateServerTimeOffset: ({ attrs }: {
525
+ attrs: any;
526
+ }) => void;
527
+ sendUnifiedSession: () => Promise<void>;
528
+ wamBuffer: import("../index.js").BinaryInfo;
529
+ waitForConnectionUpdate: (check: any, timeoutMs: any) => Promise<void>;
530
+ sendWAMBuffer: (wamBuffer: any) => Promise<any>;
531
+ executeUSyncQuery: (usyncQuery: any) => Promise<any>;
532
+ onWhatsApp: (...phoneNumber: any[]) => Promise<any>;
533
+ fetchAccountReachoutTimelock: () => Promise<{
534
+ isActive: boolean;
535
+ timeEnforcementEnds: Date | undefined;
536
+ enforcementType: any;
537
+ }>;
538
+ fetchNewChatMessageCap: () => Promise<any>;
539
+ };
540
+ export function extractCommunityMetadata(result: any): {
541
+ id: any;
542
+ subject: any;
543
+ subjectOwner: any;
544
+ subjectTime: number;
545
+ size: any;
546
+ creation: number;
547
+ owner: string | undefined;
548
+ desc: any;
549
+ descId: any;
550
+ linkedParent: any;
551
+ restrict: boolean;
552
+ announce: boolean;
553
+ isCommunity: boolean;
554
+ isCommunityAnnounce: boolean;
555
+ joinApprovalMode: boolean;
556
+ memberAddMode: boolean;
557
+ participants: any;
558
+ ephemeralDuration: number | undefined;
559
+ addressingMode: any;
560
+ };
561
+ import { proto } from '../../WAProto/index.js';
562
+ //# sourceMappingURL=communities.d.ts.map