sanka-baileyss 2.3.2 → 2.3.3

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 (158) hide show
  1. package/WAProto/BotMetadata/BotMetadata.d.ts +594 -1
  2. package/WAProto/BotMetadata/BotMetadata.js +1910 -148
  3. package/WAProto/BotMetadata/BotMetadata.proto +36 -0
  4. package/WAProto/E2E/E2E.d.ts +570 -6
  5. package/WAProto/E2E/E2E.js +1591 -26
  6. package/WAProto/E2E/E2E.proto +10 -1
  7. package/WAProto/HistorySync/HistorySync.d.ts +806 -6
  8. package/WAProto/HistorySync/HistorySync.js +2193 -29
  9. package/WAProto/HistorySync/HistorySync.proto +2 -1
  10. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +570 -6
  11. package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +1591 -26
  12. package/WAProto/StatusAttributions/StatusAttributions.d.ts +2 -1
  13. package/WAProto/StatusAttributions/StatusAttributions.js +7 -0
  14. package/WAProto/StatusAttributions/StatusAttributions.proto +1 -0
  15. package/WAProto/SyncAction/SyncAction.d.ts +230 -0
  16. package/WAProto/SyncAction/SyncAction.js +578 -2
  17. package/WAProto/SyncAction/SyncAction.proto +13 -1
  18. package/WAProto/Web/Web.d.ts +570 -6
  19. package/WAProto/Web/Web.js +1591 -26
  20. package/lib/Defaults/baileys-version.json +2 -2
  21. package/lib/Defaults/index.d.ts +42 -25
  22. package/lib/Defaults/index.js +6 -2
  23. package/lib/Signal/libsignal.d.ts +1 -0
  24. package/lib/Socket/Client/index.js +13 -9
  25. package/lib/Socket/Client/types.d.ts +11 -10
  26. package/lib/Socket/Client/types.js +11 -7
  27. package/lib/Socket/Client/websocket.d.ts +9 -8
  28. package/lib/Socket/Client/websocket.js +52 -47
  29. package/lib/Socket/business.d.ts +185 -182
  30. package/lib/Socket/business.js +258 -249
  31. package/lib/Socket/chats.d.ts +90 -87
  32. package/lib/Socket/chats.js +1095 -888
  33. package/lib/Socket/community.d.ts +131 -0
  34. package/lib/Socket/community.js +369 -0
  35. package/lib/Socket/groups.d.ts +50 -41
  36. package/lib/Socket/groups.js +10 -3
  37. package/lib/Socket/index.d.ts +5 -1
  38. package/lib/Socket/index.js +19 -5
  39. package/lib/Socket/messages-recv.d.ts +6 -2
  40. package/lib/Socket/messages-recv.js +31 -8
  41. package/lib/Socket/messages-send.d.ts +5 -1
  42. package/lib/Socket/messages-send.js +1293 -1351
  43. package/lib/Socket/newsletter.d.ts +142 -135
  44. package/lib/Socket/newsletter.js +274 -230
  45. package/lib/Socket/socket.d.ts +37 -35
  46. package/lib/Socket/usync.d.ts +31 -30
  47. package/lib/Socket/usync.js +74 -62
  48. package/lib/Types/Auth.d.ts +89 -72
  49. package/lib/Types/Auth.js +1 -0
  50. package/lib/Types/Call.d.ts +11 -10
  51. package/lib/Types/Call.js +1 -0
  52. package/lib/Types/Chat.d.ts +85 -62
  53. package/lib/Types/Chat.js +4 -1
  54. package/lib/Types/Contact.js +1 -0
  55. package/lib/Types/Events.d.ts +209 -191
  56. package/lib/Types/Events.js +1 -0
  57. package/lib/Types/GroupMetadata.d.ts +12 -27
  58. package/lib/Types/GroupMetadata.js +1 -0
  59. package/lib/Types/Label.d.ts +41 -39
  60. package/lib/Types/Label.js +24 -21
  61. package/lib/Types/LabelAssociation.d.ts +18 -12
  62. package/lib/Types/LabelAssociation.js +6 -3
  63. package/lib/Types/Message.d.ts +3 -2
  64. package/lib/Types/Message.js +7 -3
  65. package/lib/Types/MexUpdates.d.ts +9 -0
  66. package/lib/Types/MexUpdates.js +18 -0
  67. package/lib/Types/Newsletter.d.ts +84 -67
  68. package/lib/Types/Newsletter.js +30 -23
  69. package/lib/Types/Product.d.ts +70 -56
  70. package/lib/Types/Product.js +1 -0
  71. package/lib/Types/Signal.d.ts +46 -35
  72. package/lib/Types/Signal.js +1 -0
  73. package/lib/Types/Socket.d.ts +105 -101
  74. package/lib/Types/Socket.js +1 -0
  75. package/lib/Types/State.d.ts +37 -23
  76. package/lib/Types/State.js +13 -1
  77. package/lib/Types/USync.d.ts +21 -20
  78. package/lib/Types/USync.js +1 -0
  79. package/lib/Types/index.d.ts +51 -42
  80. package/lib/Types/index.js +25 -19
  81. package/lib/Utils/auth-utils.d.ts +14 -11
  82. package/lib/Utils/auth-utils.js +189 -182
  83. package/lib/Utils/baileys-event-stream.d.ts +12 -10
  84. package/lib/Utils/baileys-event-stream.js +52 -46
  85. package/lib/Utils/business.d.ts +15 -8
  86. package/lib/Utils/business.js +229 -217
  87. package/lib/Utils/chat-utils.d.ts +22 -12
  88. package/lib/Utils/chat-utils.js +57 -27
  89. package/lib/Utils/crypto.d.ts +31 -15
  90. package/lib/Utils/crypto.js +136 -107
  91. package/lib/Utils/decode-wa-message.d.ts +34 -245
  92. package/lib/Utils/decode-wa-message.js +205 -217
  93. package/lib/Utils/event-buffer.d.ts +30 -26
  94. package/lib/Utils/event-buffer.js +519 -515
  95. package/lib/Utils/history.d.ts +2 -8
  96. package/lib/Utils/index.js +13 -9
  97. package/lib/Utils/link-preview.d.ts +16 -14
  98. package/lib/Utils/link-preview.js +100 -92
  99. package/lib/Utils/logger.d.ts +9 -7
  100. package/lib/Utils/logger.js +1 -1
  101. package/lib/Utils/lt-hash.d.ts +10 -8
  102. package/lib/Utils/lt-hash.js +49 -44
  103. package/lib/Utils/make-mutex.d.ts +4 -2
  104. package/lib/Utils/make-mutex.js +43 -39
  105. package/lib/Utils/messages-media.d.ts +75 -50
  106. package/lib/Utils/messages.d.ts +60 -35
  107. package/lib/Utils/messages.js +87 -8
  108. package/lib/Utils/noise-handler.d.ts +13 -12
  109. package/lib/Utils/noise-handler.js +143 -138
  110. package/lib/Utils/process-message.d.ts +32 -24
  111. package/lib/Utils/process-message.js +387 -367
  112. package/lib/Utils/signal.d.ts +24 -15
  113. package/lib/Utils/signal.js +143 -131
  114. package/lib/Utils/use-mongo-file-auth-state.d.ts +3 -2
  115. package/lib/Utils/use-mongo-file-auth-state.js +72 -63
  116. package/lib/Utils/use-multi-file-auth-state.d.ts +9 -8
  117. package/lib/Utils/use-multi-file-auth-state.js +110 -102
  118. package/lib/Utils/use-single-file-auth-state.d.ts +8 -7
  119. package/lib/Utils/use-single-file-auth-state.js +66 -61
  120. package/lib/Utils/validate-connection.d.ts +5 -2
  121. package/lib/Utils/validate-connection.js +7 -6
  122. package/lib/WABinary/constants.d.ts +24 -21
  123. package/lib/WABinary/constants.js +1302 -31
  124. package/lib/WABinary/decode.d.ts +4 -1
  125. package/lib/WABinary/decode.js +267 -234
  126. package/lib/WABinary/encode.d.ts +1 -0
  127. package/lib/WABinary/encode.js +248 -226
  128. package/lib/WABinary/generic-utils.d.ts +13 -1
  129. package/lib/WABinary/generic-utils.js +113 -96
  130. package/lib/WABinary/index.js +13 -9
  131. package/lib/WABinary/jid-utils.d.ts +23 -4
  132. package/lib/WABinary/jid-utils.js +58 -39
  133. package/lib/WABinary/types.d.ts +15 -11
  134. package/lib/WABinary/types.js +1 -0
  135. package/lib/WAM/BinaryInfo.d.ts +14 -14
  136. package/lib/WAM/BinaryInfo.js +11 -8
  137. package/lib/WAM/constants.d.ts +34 -26
  138. package/lib/WAM/constants.js +15358 -15349
  139. package/lib/WAM/encode.d.ts +1 -0
  140. package/lib/WAM/encode.js +153 -144
  141. package/lib/WAM/index.js +13 -9
  142. package/lib/index.js +11 -11
  143. package/package.json +1 -2
  144. package/WASignalGroup/GroupProtocol.js +0 -1771
  145. package/WASignalGroup/ciphertext_message.js +0 -10
  146. package/WASignalGroup/group_cipher.js +0 -103
  147. package/WASignalGroup/group_session_builder.js +0 -39
  148. package/WASignalGroup/index.js +0 -5
  149. package/WASignalGroup/keyhelper.js +0 -17
  150. package/WASignalGroup/protobufs.js +0 -2
  151. package/WASignalGroup/queue_job.js +0 -64
  152. package/WASignalGroup/sender_chain_key.js +0 -38
  153. package/WASignalGroup/sender_key_distribution_message.js +0 -68
  154. package/WASignalGroup/sender_key_message.js +0 -79
  155. package/WASignalGroup/sender_key_name.js +0 -59
  156. package/WASignalGroup/sender_key_record.js +0 -47
  157. package/WASignalGroup/sender_key_state.js +0 -110
  158. package/WASignalGroup/sender_message_key.js +0 -30
@@ -65,6 +65,16 @@ const makeGroupsSocket = (config) => {
65
65
  return data
66
66
  }
67
67
 
68
+ suki.ws.on('CB:ib,,dirty', async (node) => {
69
+ const { attrs } = WABinary_1.getBinaryNodeChild(node, 'dirty')
70
+ if (attrs.type !== 'groups') {
71
+ return
72
+ }
73
+
74
+ await groupFetchAllParticipating()
75
+ await suki.cleanDirtyBits('groups')
76
+ })
77
+
68
78
  return {
69
79
  ...suki,
70
80
  groupQuery,
@@ -308,12 +318,10 @@ const extractGroupMetadata = (result) => {
308
318
  addressingMode: mode,
309
319
  subject: group.attrs.subject,
310
320
  subjectOwner: mode === 'lid' ? group.attrs.s_o_pn : group.attrs.s_o,
311
- subjectOwnerJid: mode === 'lid' ? group.attrs.s_o_pn : group.attrs.s_o,
312
321
  subjectTime: +group.attrs.s_t,
313
322
  size: group.attrs?.size ? +group.attrs.size : WABinary_1.getBinaryNodeChildren(group, 'participant').length,
314
323
  creation: +group.attrs.creation,
315
324
  owner: group.attrs.creator ? WABinary_1.jidNormalizedUser(mode === 'lid' ? group.attrs.creator_pn : group.attrs.creator) : undefined,
316
- ownerJid: group.attrs.creator ? WABinary_1.jidNormalizedUser(mode === 'lid' ? group.attrs.creator_pn : group.attrs.creator) : undefined,
317
325
  ownerCountry: group.attrs.creator_country_code,
318
326
  desc,
319
327
  descId,
@@ -327,7 +335,6 @@ const extractGroupMetadata = (result) => {
327
335
  participants: WABinary_1.getBinaryNodeChildren(group, 'participant').map(({ attrs }) => {
328
336
  return {
329
337
  id: mode === 'lid' ? attrs.phone_number : attrs.jid,
330
- jid: mode === 'lid' ? attrs.phone_number : attrs.jid,
331
338
  lid: mode === 'lid' ? attrs.jid : attrs.lid,
332
339
  admin: (attrs.type || null),
333
340
  }
@@ -47,7 +47,6 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
47
47
  getEphemeralGroup: (jid: string) => Promise<number>
48
48
  updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
49
49
  sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
50
- sendAlbumMessage: (jid: string, medias: import("../Types").WAProto.IMessage, options?: import("../Types").MiscMessageGenerationOptions) => Promise<string>
51
50
  sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
52
51
  subscribeNewsletterUpdates: (jid: string) => Promise<{
53
52
  duration: string
@@ -65,6 +64,9 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
65
64
  newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
66
65
  newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
67
66
  newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
67
+ newsletterFetchAllParticipating: () => Promise<{
68
+ [_: string]: import("../Types").NewsletterMetadata
69
+ }>
68
70
  newsletterAdminCount: (jid: string) => Promise<number>
69
71
  newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
70
72
  newsletterDemote: (jid: string, userLid: string) => Promise<void>
@@ -108,6 +110,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
108
110
  }
109
111
  upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
110
112
  appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
113
+ createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
111
114
  sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
112
115
  presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
113
116
  getBotListV2: () => Promise<BotListInfo[]>
@@ -135,6 +138,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
135
138
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
136
139
  updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
137
140
  updateDefaultDisappearingMode: (duration: number) => Promise<void>
141
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
138
142
  getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
139
143
  resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
140
144
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
@@ -1,10 +1,24 @@
1
1
  "use strict"
2
+
2
3
  Object.defineProperty(exports, "__esModule", { value: true })
4
+
3
5
  const Defaults_1 = require("../Defaults")
4
- const business_1 = require("./business")
6
+ const community_1 = require("./community")
7
+
5
8
  // export the last socket layer
6
- const makeWASocket = (config) => (business_1.makeBusinessSocket({
7
- ...Defaults_1.DEFAULT_CONNECTION_CONFIG,
8
- ...config
9
- }))
9
+ const makeWASocket = (config) => {
10
+ const newConfig = {
11
+ ...Defaults_1.DEFAULT_CONNECTION_CONFIG,
12
+ ...config
13
+ }
14
+
15
+ // If the user hasn't provided their own history sync function,
16
+ // let's create a default one that respects the syncFullHistory flag.
17
+ if (config.shouldSyncHistoryMessage === undefined) {
18
+ newConfig.shouldSyncHistoryMessage = () => !!newConfig.syncFullHistory
19
+ }
20
+
21
+ return community_1.makeCommunitiesSocket(newConfig)
22
+ }
23
+
10
24
  exports.default = makeWASocket
@@ -36,7 +36,6 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
36
36
  getEphemeralGroup: (jid: string) => Promise<number>
37
37
  updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>
38
38
  sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
39
- sendAlbumMessage: (jid: string, medias: import("../Types").WAProto.IMessage, options?: import("../Types").MiscMessageGenerationOptions) => Promise<string>
40
39
  sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>
41
40
  subscribeNewsletterUpdates: (jid: string) => Promise<{
42
41
  duration: string
@@ -54,6 +53,9 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
54
53
  newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
55
54
  newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
56
55
  newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
56
+ newsletterFetchAllParticipating: () => Promise<{
57
+ [_: string]: import("../Types").NewsletterMetadata
58
+ }>
57
59
  newsletterAdminCount: (jid: string) => Promise<number>
58
60
  newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
59
61
  newsletterDemote: (jid: string, userLid: string) => Promise<void>
@@ -97,6 +99,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
97
99
  }
98
100
  upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
99
101
  appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
102
+ createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
100
103
  sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
101
104
  presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
102
105
  getLidUser: (jid: string) => Promise<{
@@ -123,6 +126,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
123
126
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
124
127
  updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
125
128
  updateDefaultDisappearingMode: (duration: number) => Promise<void>
129
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
126
130
  getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
127
131
  resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
128
132
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
@@ -169,4 +173,4 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
169
173
  requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
170
174
  waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
171
175
  sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
172
- }
176
+ }
@@ -944,16 +944,17 @@ const makeMessagesRecvSocket = (config) => {
944
944
  const type_2 = Utils_1.getContentType(content)
945
945
  const message = msg.message[type_2]
946
946
 
947
- if (node?.attrs?.addressing_mode === 'lid') {
947
+ if (node?.attrs?.addressing_mode === 'lid') {
948
948
  const metadata = await groupMetadata(node.attrs.from)
949
949
  let found = metadata.participants.find(p => p.lid === node.attrs.participant)
950
950
 
951
951
  msg.key.participant = found.id
952
952
 
953
953
  if (message?.contextInfo?.participant) {
954
- found = metadata.participants.find(p => p.lid === msg.message[type_2].contextInfo.participant)
954
+ found = metadata.participants.find(p => p.lid === msg.message[type_2].contextInfo.participant)
955
955
  msg.message[type_2].contextInfo.participant = found.id
956
956
  }
957
+
957
958
  if (message?.contextInfo?.mentionedJid?.length > 0) {
958
959
  let mentions = []
959
960
  for (const id of message.contextInfo.mentionedJid) {
@@ -963,16 +964,18 @@ const makeMessagesRecvSocket = (config) => {
963
964
  msg.message[type_2].contextInfo.mentionedJid = mentions
964
965
  }
965
966
  }
966
-
967
+
967
968
  if (!WABinary_1.isJidGroup(node.attrs.from) && WABinary_1.isLidUser(WABinary_1.jidNormalizedUser(node.attrs.from))) {
968
- const senderPn = WABinary_1.jidNormalizedUser(node.attrs.peer_recipient_pn || node.attrs.sender_pn)
969
- msg.key.remoteJid = senderPn
969
+ const senderPn = WABinary_1.jidNormalizedUser(node.attrs.peer_recipient_pn || node.attrs.sender_pn)
970
+ msg.key.remoteJid = senderPn
971
+
970
972
  if (message?.contextInfo?.participant) {
971
- const isMe = msg.message[type_2].contextInfo.participant === WABinary_1.jidNormalizedUser(authState.creds.me.lid)
973
+ const isMe = msg.message[type_2].contextInfo.participant === WABinary_1.jidNormalizedUser(authState.creds.me.lid)
972
974
  msg.message[type_2].contextInfo.participant = isMe ? WABinary_1.jidNormalizedUser(authState.creds.me.id) : senderPn
973
975
  }
976
+
974
977
  if (message?.contextInfo?.mentionedJid?.length > 0) {
975
- msg.message[type_2].contextInfo.mentionedJid = [senderPn]
978
+ msg.message[type_2].contextInfo.mentionedJid = [senderPn]
976
979
  }
977
980
  }
978
981
 
@@ -1074,11 +1077,31 @@ const makeMessagesRecvSocket = (config) => {
1074
1077
  }
1075
1078
 
1076
1079
  const handleCall = async (node) => {
1080
+ let status
1081
+
1077
1082
  const { attrs } = node
1078
1083
  const [infoChild] = WABinary_1.getAllBinaryNodeChildren(node)
1079
1084
  const callId = infoChild.attrs['call-id']
1080
1085
  const from = infoChild.attrs.from || infoChild.attrs['call-creator']
1081
- const status = Utils_1.getCallStatusFromNode(infoChild)
1086
+ status = Utils_1.getCallStatusFromNode(infoChild)
1087
+
1088
+ if (WABinary_1.isLidUser(from) && infoChild.tag === 'relaylatency') {
1089
+ const verify = callOfferCache.get(callId)
1090
+
1091
+ if (!verify) {
1092
+ status = 'offer'
1093
+
1094
+ const callLid = {
1095
+ chatId: attrs.from,
1096
+ from,
1097
+ id: callId,
1098
+ date: new Date(+attrs.t * 1000),
1099
+ offline: !!attrs.offline,
1100
+ status
1101
+ }
1102
+ callOfferCache.set(callId, callLid)
1103
+ }
1104
+ }
1082
1105
 
1083
1106
  const call = {
1084
1107
  chatId: attrs.from,
@@ -26,7 +26,6 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
26
26
  getEphemeralGroup: (jid: string) => Promise<number>
27
27
  updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>
28
28
  sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
29
- sendAlbumMessage: (jid: string, medias: import("../Types").WAProto.IMessage, options?: import("../Types").MiscMessageGenerationOptions) => Promise<string>
30
29
  sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>
31
30
  subscribeNewsletterUpdates: (jid: string) => Promise<{
32
31
  duration: string
@@ -44,6 +43,9 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
44
43
  newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
45
44
  newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
46
45
  newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
46
+ newsletterFetchAllParticipating: () => Promise<{
47
+ [_: string]: import("../Types").NewsletterMetadata
48
+ }>
47
49
  newsletterAdminCount: (jid: string) => Promise<number>
48
50
  newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
49
51
  newsletterDemote: (jid: string, userLid: string) => Promise<void>
@@ -87,6 +89,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
87
89
  }
88
90
  upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
89
91
  appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
92
+ createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
90
93
  sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
91
94
  presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
92
95
  getBotListV2: () => Promise<BotListInfo[]>
@@ -114,6 +117,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
114
117
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
115
118
  updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
116
119
  updateDefaultDisappearingMode: (duration: number) => Promise<void>
120
+ updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
117
121
  getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
118
122
  resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
119
123
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>