@queenanya/baileys 7.4.7 → 7.4.13

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 (88) hide show
  1. package/README.md +26 -26
  2. package/WAProto/index.js +97194 -67957
  3. package/lib/Defaults/baileys-version.json +1 -1
  4. package/lib/Defaults/index.d.ts +231 -1
  5. package/lib/Defaults/index.js +23 -11
  6. package/lib/Defaults/phonenumber-mcc.json +223 -0
  7. package/lib/Socket/Client/index.d.ts +3 -2
  8. package/lib/Socket/Client/index.js +3 -2
  9. package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
  10. package/lib/Socket/Client/mobile-socket-client.js +65 -0
  11. package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +1 -1
  12. package/lib/Socket/Client/{websocket.js → web-socket-client.js} +2 -2
  13. package/lib/Socket/business.d.ts +22 -29
  14. package/lib/Socket/chats.d.ts +3 -14
  15. package/lib/Socket/chats.js +48 -76
  16. package/lib/Socket/groups.d.ts +4 -21
  17. package/lib/Socket/groups.js +1 -12
  18. package/lib/Socket/index.d.ts +32 -37
  19. package/lib/Socket/index.js +2 -2
  20. package/lib/Socket/messages-recv.d.ts +22 -28
  21. package/lib/Socket/messages-recv.js +180 -291
  22. package/lib/Socket/messages-send.d.ts +13 -23
  23. package/lib/Socket/messages-send.js +76 -110
  24. package/lib/Socket/newsletter.d.ts +7 -17
  25. package/lib/Socket/newsletter.js +54 -67
  26. package/lib/Socket/registration.d.ts +267 -0
  27. package/lib/Socket/registration.js +166 -0
  28. package/lib/Socket/socket.d.ts +1 -3
  29. package/lib/Socket/socket.js +17 -15
  30. package/lib/Store/make-cache-manager-store.d.ts +1 -2
  31. package/lib/Store/make-in-memory-store.js +11 -13
  32. package/lib/Store/make-ordered-dictionary.js +2 -2
  33. package/lib/Types/Auth.d.ts +6 -1
  34. package/lib/Types/Call.d.ts +1 -1
  35. package/lib/Types/Chat.d.ts +7 -12
  36. package/lib/Types/Contact.d.ts +1 -1
  37. package/lib/Types/Events.d.ts +2 -44
  38. package/lib/Types/GroupMetadata.d.ts +1 -3
  39. package/lib/Types/Label.d.ts +0 -11
  40. package/lib/Types/Message.d.ts +30 -37
  41. package/lib/Types/Newsletter.d.ts +13 -0
  42. package/lib/Types/Newsletter.js +15 -1
  43. package/lib/Types/Socket.d.ts +3 -10
  44. package/lib/Types/index.d.ts +0 -8
  45. package/lib/Utils/auth-utils.js +7 -1
  46. package/lib/Utils/chat-utils.d.ts +4 -5
  47. package/lib/Utils/chat-utils.js +20 -41
  48. package/lib/Utils/crypto.d.ts +1 -2
  49. package/lib/Utils/crypto.js +2 -4
  50. package/lib/Utils/decode-wa-message.d.ts +0 -1
  51. package/lib/Utils/decode-wa-message.js +14 -34
  52. package/lib/Utils/event-buffer.js +8 -14
  53. package/lib/Utils/generics.d.ts +13 -37
  54. package/lib/Utils/generics.js +18 -102
  55. package/lib/Utils/history.d.ts +2 -6
  56. package/lib/Utils/history.js +0 -3
  57. package/lib/Utils/index.d.ts +0 -1
  58. package/lib/Utils/index.js +0 -1
  59. package/lib/Utils/link-preview.js +1 -24
  60. package/lib/Utils/logger.d.ts +3 -1
  61. package/lib/Utils/make-mutex.js +0 -1
  62. package/lib/Utils/messages-media.d.ts +2 -3
  63. package/lib/Utils/messages-media.js +32 -17
  64. package/lib/Utils/messages.d.ts +0 -1
  65. package/lib/Utils/messages.js +72 -67
  66. package/lib/Utils/noise-handler.d.ts +3 -3
  67. package/lib/Utils/noise-handler.js +12 -7
  68. package/lib/Utils/process-message.d.ts +2 -3
  69. package/lib/Utils/process-message.js +21 -55
  70. package/lib/Utils/signal.js +16 -23
  71. package/lib/Utils/use-multi-file-auth-state.js +3 -17
  72. package/lib/Utils/validate-connection.d.ts +1 -0
  73. package/lib/Utils/validate-connection.js +44 -10
  74. package/lib/WABinary/constants.js +5 -5
  75. package/lib/WABinary/decode.d.ts +2 -3
  76. package/lib/WABinary/decode.js +4 -6
  77. package/lib/WABinary/encode.d.ts +2 -1
  78. package/lib/WABinary/encode.js +6 -8
  79. package/lib/WABinary/generic-utils.d.ts +0 -1
  80. package/lib/WABinary/jid-utils.d.ts +3 -3
  81. package/lib/WABinary/jid-utils.js +5 -5
  82. package/lib/WAM/BinaryInfo.d.ts +2 -3
  83. package/lib/WAM/constants.d.ts +2 -3
  84. package/lib/WAM/encode.d.ts +0 -1
  85. package/lib/WAM/encode.js +2 -2
  86. package/package.json +37 -39
  87. /package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +0 -0
  88. /package/lib/Socket/Client/{types.js → abstract-socket-client.js} +0 -0
@@ -1,9 +1,9 @@
1
- /// <reference types="long" />
2
- /// <reference types="node" />
3
1
  /// <reference types="node" />
4
2
  import { UserFacingSocketConfig } from '../Types';
5
3
  declare const makeWASocket: (config: UserFacingSocketConfig) => {
6
- logger: import("pino").Logger<never, boolean>;
4
+ register: (code: string) => Promise<import("./registration").ExistsResponse>;
5
+ requestRegistrationCode: (registrationOptions?: import("./registration").RegistrationOptions | undefined) => Promise<import("./registration").ExistsResponse>;
6
+ logger: import("pino").Logger<import("pino").LoggerOptions>;
7
7
  getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
8
8
  getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
9
9
  products: import("../Types").Product[];
@@ -17,30 +17,34 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
17
17
  deleted: number;
18
18
  }>;
19
19
  productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
20
- sendMessageAck: ({ tag, attrs, content }: import("..").BinaryNode) => Promise<void>;
21
- sendRetryRequest: (node: import("..").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
20
+ sendMessageAck: ({ tag, attrs, content }: import("../index").BinaryNode) => Promise<void>;
21
+ sendRetryRequest: (node: import("../index").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
22
+ offerCall: (toJid: string, isVideo?: boolean) => Promise<{
23
+ id: string;
24
+ to: string;
25
+ }>;
22
26
  rejectCall: (callId: string, callFrom: string) => Promise<void>;
23
- fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>;
24
- requestPlaceholderResend: (messageKey: import("../Types").WAMessageKey) => Promise<string | undefined>;
25
- getPrivacyTokens: (jids: string[]) => Promise<import("..").BinaryNode>;
27
+ getPrivacyTokens: (jids: string[]) => Promise<import("../index").BinaryNode>;
26
28
  assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
27
- relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
29
+ relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
28
30
  sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
29
- sendReceipts: (keys: import("../Types").WAMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
30
- readMessages: (keys: import("../Types").WAMessageKey[]) => Promise<void>;
31
+ sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
32
+ getButtonArgs: (message: import("../Types").WAProto.IMessage) => {
33
+ [key: string]: string;
34
+ };
35
+ readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>;
31
36
  refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
32
- waUploadToServer: import("../Types").WAMediaUploadFunction;
33
- fetchPrivacySettings: (force?: boolean) => Promise<{
34
- [_: string]: string;
35
- }>;
36
- sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
37
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../index").JidWithDevice[]>;
37
38
  createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
38
39
  [key: string]: string;
39
40
  } | undefined) => Promise<{
40
- nodes: import("..").BinaryNode[];
41
+ nodes: import("../index").BinaryNode[];
41
42
  shouldIncludeDeviceIdentity: boolean;
42
43
  }>;
43
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("..").JidWithDevice[]>;
44
+ waUploadToServer: import("../Types").WAMediaUploadFunction;
45
+ fetchPrivacySettings: (force?: boolean) => Promise<{
46
+ [_: string]: string;
47
+ }>;
44
48
  updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>;
45
49
  sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>;
46
50
  subscribeNewsletterUpdates: (jid: string) => Promise<{
@@ -55,13 +59,14 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
55
59
  newsletterFollow: (jid: string) => Promise<void>;
56
60
  newsletterUnmute: (jid: string) => Promise<void>;
57
61
  newsletterMute: (jid: string) => Promise<void>;
58
- newsletterCreate: (name: string, description: string) => Promise<import("../Types").NewsletterMetadata>;
62
+ newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
63
+ newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
59
64
  newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
60
65
  newsletterAdminCount: (jid: string) => Promise<number>;
61
66
  newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
62
67
  newsletterDemote: (jid: string, user: string) => Promise<void>;
63
68
  newsletterDelete: (jid: string) => Promise<void>;
64
- newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>;
69
+ newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
65
70
  newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
66
71
  newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
67
72
  groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
@@ -78,14 +83,13 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
78
83
  groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
79
84
  status: string;
80
85
  jid: string;
81
- content: import("..").BinaryNode;
86
+ content: import("../index").BinaryNode;
82
87
  }[]>;
83
88
  groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
84
89
  groupInviteCode: (jid: string) => Promise<string | undefined>;
85
90
  groupRevokeInvite: (jid: string) => Promise<string | undefined>;
86
91
  groupAcceptInvite: (code: string) => Promise<string | undefined>;
87
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
88
- groupAcceptInviteV4: (key: string | import("../Types").WAMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>;
92
+ groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>;
89
93
  groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
90
94
  groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
91
95
  groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
@@ -107,35 +111,26 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
107
111
  jid: string;
108
112
  }[]>;
109
113
  fetchBlocklist: () => Promise<string[]>;
110
- fetchDisappearingDuration: (...jids: string[]) => Promise<{
111
- user: string;
112
- duration: number;
113
- setAt: Date;
114
- }[]>;
115
114
  fetchStatus: (jid: string) => Promise<{
116
115
  status: string | undefined;
117
116
  setAt: Date;
118
117
  } | undefined>;
119
118
  updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
120
- updateProfilePictureFull: (jid: any, content: any) => Promise<void>;
121
- updateProfilePictureFull2: (jid: any, content: any) => Promise<void>;
122
119
  removeProfilePicture: (jid: string) => Promise<void>;
123
120
  updateProfileStatus: (status: string) => Promise<void>;
124
121
  updateProfileName: (name: string) => Promise<void>;
125
122
  updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
126
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
127
123
  updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
128
124
  updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
129
125
  updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
130
126
  updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
131
127
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
132
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
128
+ updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
133
129
  updateDefaultDisappearingMode: (duration: number) => Promise<void>;
134
130
  getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
135
131
  resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
136
132
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
137
133
  cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
138
- addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
139
134
  addChatLabel: (jid: string, labelId: string) => Promise<void>;
140
135
  removeChatLabel: (jid: string, labelId: string) => Promise<void>;
141
136
  addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
@@ -145,7 +140,7 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
145
140
  fromMe?: boolean | undefined;
146
141
  }[], star: boolean) => Promise<void>;
147
142
  type: "md";
148
- ws: import("./Client").WebSocketClient;
143
+ ws: any;
149
144
  ev: import("../Types").BaileysEventEmitter & {
150
145
  process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
151
146
  buffer(): void;
@@ -160,11 +155,11 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
160
155
  signalRepository: import("../Types").SignalRepository;
161
156
  user: import("../Types").Contact | undefined;
162
157
  generateMessageTag: () => string;
163
- query: (node: import("..").BinaryNode, timeoutMs?: number | undefined) => Promise<import("..").BinaryNode>;
158
+ query: (node: import("../index").BinaryNode, timeoutMs?: number | undefined) => Promise<import("../index").BinaryNode>;
164
159
  waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
165
160
  waitForSocketOpen: () => Promise<void>;
166
161
  sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
167
- sendNode: (frame: import("..").BinaryNode) => Promise<void>;
162
+ sendNode: (frame: import("../index").BinaryNode) => Promise<void>;
168
163
  logout: (msg?: string | undefined) => Promise<void>;
169
164
  end: (error: Error | undefined) => void;
170
165
  onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void;
@@ -172,6 +167,6 @@ declare const makeWASocket: (config: UserFacingSocketConfig) => {
172
167
  uploadPreKeysToServerIfRequired: () => Promise<void>;
173
168
  requestPairingCode: (phoneNumber: string) => Promise<string>;
174
169
  waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
175
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("..").BinaryNode>;
170
+ sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("../index").BinaryNode>;
176
171
  };
177
172
  export default makeWASocket;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const Defaults_1 = require("../Defaults");
4
- const business_1 = require("./business");
4
+ const registration_1 = require("./registration");
5
5
  // export the last socket layer
6
- const makeWASocket = (config) => ((0, business_1.makeBusinessSocket)({
6
+ const makeWASocket = (config) => ((0, registration_1.makeRegistrationSocket)({
7
7
  ...Defaults_1.DEFAULT_CONNECTION_CONFIG,
8
8
  ...config
9
9
  }));
@@ -1,34 +1,37 @@
1
1
  /// <reference types="node" />
2
- /// <reference types="node" />
3
2
  import { Boom } from '@hapi/boom';
4
3
  import { proto } from '../../WAProto';
5
- import { MessageReceiptType, MessageRelayOptions, SocketConfig, WAMessageKey } from '../Types';
4
+ import { MessageReceiptType, MessageRelayOptions, SocketConfig } from '../Types';
6
5
  import { BinaryNode } from '../WABinary';
7
6
  export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
8
7
  sendMessageAck: ({ tag, attrs, content }: BinaryNode) => Promise<void>;
9
8
  sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
9
+ offerCall: (toJid: string, isVideo?: boolean) => Promise<{
10
+ id: string;
11
+ to: string;
12
+ }>;
10
13
  rejectCall: (callId: string, callFrom: string) => Promise<void>;
11
- fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
12
- requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>;
13
14
  getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
14
15
  assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
15
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
16
+ relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
16
17
  sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
17
- sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
18
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
18
+ sendReceipts: (keys: proto.IMessageKey[], type: MessageReceiptType) => Promise<void>;
19
+ getButtonArgs: (message: proto.IMessage) => {
20
+ [key: string]: string;
21
+ };
22
+ readMessages: (keys: proto.IMessageKey[]) => Promise<void>;
19
23
  refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
20
- waUploadToServer: import("../Types").WAMediaUploadFunction;
21
- fetchPrivacySettings: (force?: boolean) => Promise<{
22
- [_: string]: string;
23
- }>;
24
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
24
+ getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
25
25
  createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
26
26
  [key: string]: string;
27
27
  } | undefined) => Promise<{
28
28
  nodes: BinaryNode[];
29
29
  shouldIncludeDeviceIdentity: boolean;
30
30
  }>;
31
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
31
+ waUploadToServer: import("../Types").WAMediaUploadFunction;
32
+ fetchPrivacySettings: (force?: boolean) => Promise<{
33
+ [_: string]: string;
34
+ }>;
32
35
  updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
33
36
  sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
34
37
  subscribeNewsletterUpdates: (jid: string) => Promise<{
@@ -43,13 +46,14 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
43
46
  newsletterFollow: (jid: string) => Promise<void>;
44
47
  newsletterUnmute: (jid: string) => Promise<void>;
45
48
  newsletterMute: (jid: string) => Promise<void>;
46
- newsletterCreate: (name: string, description: string) => Promise<import("../Types").NewsletterMetadata>;
49
+ newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
50
+ newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
47
51
  newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
48
52
  newsletterAdminCount: (jid: string) => Promise<number>;
49
53
  newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
50
54
  newsletterDemote: (jid: string, user: string) => Promise<void>;
51
55
  newsletterDelete: (jid: string) => Promise<void>;
52
- newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>;
56
+ newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
53
57
  newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
54
58
  newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
55
59
  groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
@@ -72,8 +76,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
72
76
  groupInviteCode: (jid: string) => Promise<string | undefined>;
73
77
  groupRevokeInvite: (jid: string) => Promise<string | undefined>;
74
78
  groupAcceptInvite: (code: string) => Promise<string | undefined>;
75
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
76
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
79
+ groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
77
80
  groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
78
81
  groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
79
82
  groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
@@ -95,35 +98,26 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
95
98
  jid: string;
96
99
  }[]>;
97
100
  fetchBlocklist: () => Promise<string[]>;
98
- fetchDisappearingDuration: (...jids: string[]) => Promise<{
99
- user: string;
100
- duration: number;
101
- setAt: Date;
102
- }[]>;
103
101
  fetchStatus: (jid: string) => Promise<{
104
102
  status: string | undefined;
105
103
  setAt: Date;
106
104
  } | undefined>;
107
105
  updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
108
- updateProfilePictureFull: (jid: any, content: any) => Promise<void>;
109
- updateProfilePictureFull2: (jid: any, content: any) => Promise<void>;
110
106
  removeProfilePicture: (jid: string) => Promise<void>;
111
107
  updateProfileStatus: (status: string) => Promise<void>;
112
108
  updateProfileName: (name: string) => Promise<void>;
113
109
  updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
114
- updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
115
110
  updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
116
111
  updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
117
112
  updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
118
113
  updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
119
114
  updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
120
- updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
115
+ updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
121
116
  updateDefaultDisappearingMode: (duration: number) => Promise<void>;
122
117
  getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
123
118
  resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
124
119
  chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
125
120
  cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
126
- addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>;
127
121
  addChatLabel: (jid: string, labelId: string) => Promise<void>;
128
122
  removeChatLabel: (jid: string, labelId: string) => Promise<void>;
129
123
  addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
@@ -133,7 +127,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
133
127
  fromMe?: boolean | undefined;
134
128
  }[], star: boolean) => Promise<void>;
135
129
  type: "md";
136
- ws: import("./Client").WebSocketClient;
130
+ ws: any;
137
131
  ev: import("../Types").BaileysEventEmitter & {
138
132
  process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
139
133
  buffer(): void;