@alannxd/baileys 6.0.5 → 6.0.9

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 (123) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +341 -286
  3. package/WAProto/WAProto.proto +1782 -359
  4. package/WAProto/index.d.ts +75133 -9893
  5. package/WAProto/index.js +205861 -60606
  6. package/lib/Socket/luxu.js +6 -117
  7. package/lib/Socket/messages-send.js +637 -493
  8. package/lib/Socket/newsletter.js +229 -156
  9. package/lib/Utils/browser-utils.js +26 -6
  10. package/lib/Utils/decode-wa-message.js +33 -0
  11. package/lib/Utils/generics.js +10 -0
  12. package/lib/Utils/index.js +1 -0
  13. package/lib/Utils/message-composer.js +273 -0
  14. package/lib/Utils/messages.js +361 -24
  15. package/lib/WABinary/generic-utils.js +8 -1
  16. package/lib/WABinary/jid-utils.js +2 -0
  17. package/lib/index.js +1 -2
  18. package/package.json +5 -4
  19. package/lib/Defaults/index.d.ts +0 -75
  20. package/lib/Signal/Group/ciphertext-message.d.ts +0 -10
  21. package/lib/Signal/Group/group-session-builder.d.ts +0 -15
  22. package/lib/Signal/Group/group_cipher.d.ts +0 -17
  23. package/lib/Signal/Group/index.d.ts +0 -12
  24. package/lib/Signal/Group/keyhelper.d.ts +0 -11
  25. package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
  26. package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
  27. package/lib/Signal/Group/sender-key-message.d.ts +0 -19
  28. package/lib/Signal/Group/sender-key-name.d.ts +0 -18
  29. package/lib/Signal/Group/sender-key-record.d.ts +0 -31
  30. package/lib/Signal/Group/sender-key-state.d.ts +0 -39
  31. package/lib/Signal/Group/sender-message-key.d.ts +0 -12
  32. package/lib/Signal/libsignal.d.ts +0 -5
  33. package/lib/Signal/lid-mapping.d.ts +0 -23
  34. package/lib/Socket/Client/index.d.ts +0 -3
  35. package/lib/Socket/Client/types.d.ts +0 -16
  36. package/lib/Socket/Client/websocket.d.ts +0 -13
  37. package/lib/Socket/business.d.ts +0 -217
  38. package/lib/Socket/chats.d.ts +0 -124
  39. package/lib/Socket/communities.d.ts +0 -273
  40. package/lib/Socket/groups.d.ts +0 -162
  41. package/lib/Socket/index.d.ts +0 -260
  42. package/lib/Socket/luxu.d.ts +0 -22
  43. package/lib/Socket/messages-recv.d.ts +0 -213
  44. package/lib/Socket/messages-send.d.ts +0 -199
  45. package/lib/Socket/mex.d.ts +0 -3
  46. package/lib/Socket/newsletter.d.ts +0 -170
  47. package/lib/Socket/socket.d.ts +0 -59
  48. package/lib/Store/index.d.ts +0 -10
  49. package/lib/Store/keyed-db.d.ts +0 -22
  50. package/lib/Store/make-cache-manager-store.d.ts +0 -19
  51. package/lib/Store/make-in-memory-store.d.ts +0 -39
  52. package/lib/Store/make-ordered-dictionary.d.ts +0 -14
  53. package/lib/Store/object-repository.d.ts +0 -11
  54. package/lib/Types/Auth.d.ts +0 -117
  55. package/lib/Types/Bussines.d.ts +0 -25
  56. package/lib/Types/Call.d.ts +0 -15
  57. package/lib/Types/Chat.d.ts +0 -124
  58. package/lib/Types/Contact.d.ts +0 -26
  59. package/lib/Types/Events.d.ts +0 -256
  60. package/lib/Types/GroupMetadata.d.ts +0 -71
  61. package/lib/Types/Label.d.ts +0 -47
  62. package/lib/Types/LabelAssociation.d.ts +0 -30
  63. package/lib/Types/Message.d.ts +0 -320
  64. package/lib/Types/Mex.d.ts +0 -141
  65. package/lib/Types/Product.d.ts +0 -79
  66. package/lib/Types/Signal.d.ts +0 -87
  67. package/lib/Types/Socket.d.ts +0 -136
  68. package/lib/Types/State.d.ts +0 -97
  69. package/lib/Types/USync.d.ts +0 -26
  70. package/lib/Types/index.d.ts +0 -65
  71. package/lib/Utils/auth-utils.d.ts +0 -24
  72. package/lib/Utils/browser-utils.d.ts +0 -4
  73. package/lib/Utils/business.d.ts +0 -23
  74. package/lib/Utils/chat-utils.d.ts +0 -100
  75. package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
  76. package/lib/Utils/crypto.d.ts +0 -37
  77. package/lib/Utils/decode-wa-message.d.ts +0 -66
  78. package/lib/Utils/event-buffer.d.ts +0 -36
  79. package/lib/Utils/generics.d.ts +0 -91
  80. package/lib/Utils/history.d.ts +0 -24
  81. package/lib/Utils/identity-change-handler.d.ts +0 -44
  82. package/lib/Utils/index.d.ts +0 -22
  83. package/lib/Utils/link-preview.d.ts +0 -21
  84. package/lib/Utils/logger.d.ts +0 -12
  85. package/lib/Utils/lt-hash.d.ts +0 -8
  86. package/lib/Utils/make-mutex.d.ts +0 -9
  87. package/lib/Utils/message-retry-manager.d.ts +0 -115
  88. package/lib/Utils/messages-media.d.ts +0 -133
  89. package/lib/Utils/messages.d.ts +0 -91
  90. package/lib/Utils/noise-handler.d.ts +0 -20
  91. package/lib/Utils/offline-node-processor.d.ts +0 -17
  92. package/lib/Utils/pre-key-manager.d.ts +0 -28
  93. package/lib/Utils/process-message.d.ts +0 -60
  94. package/lib/Utils/reporting-utils.d.ts +0 -11
  95. package/lib/Utils/signal.d.ts +0 -47
  96. package/lib/Utils/stanza-ack.d.ts +0 -11
  97. package/lib/Utils/sync-action-utils.d.ts +0 -19
  98. package/lib/Utils/tc-token-utils.d.ts +0 -37
  99. package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
  100. package/lib/Utils/validate-connection.d.ts +0 -11
  101. package/lib/WABinary/constants.d.ts +0 -28
  102. package/lib/WABinary/decode.d.ts +0 -7
  103. package/lib/WABinary/encode.d.ts +0 -3
  104. package/lib/WABinary/generic-utils.d.ts +0 -18
  105. package/lib/WABinary/index.d.ts +0 -6
  106. package/lib/WABinary/jid-utils.d.ts +0 -48
  107. package/lib/WABinary/types.d.ts +0 -19
  108. package/lib/WAM/BinaryInfo.d.ts +0 -9
  109. package/lib/WAM/constants.d.ts +0 -40
  110. package/lib/WAM/encode.d.ts +0 -3
  111. package/lib/WAM/index.d.ts +0 -4
  112. package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
  113. package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -23
  114. package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -13
  115. package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -13
  116. package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
  117. package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -26
  118. package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -10
  119. package/lib/WAUSync/Protocols/index.d.ts +0 -6
  120. package/lib/WAUSync/USyncQuery.d.ts +0 -30
  121. package/lib/WAUSync/USyncUser.d.ts +0 -17
  122. package/lib/WAUSync/index.d.ts +0 -4
  123. package/lib/index.d.ts +0 -13
@@ -1,213 +0,0 @@
1
- import NodeCache from '@cacheable/node-cache';
2
- import { Boom } from '@hapi/boom';
3
- import Long from 'long';
4
- import { proto } from '../../WAProto/index.js';
5
- import type { MessageReceiptType, MessageRelayOptions, NewChatMessageCapInfo, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
6
- import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
7
- export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
8
- sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
9
- sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
10
- rejectCall: (callId: string, callFrom: string) => Promise<void>;
11
- sendText: (jid: string, text: string, options?: any, quoted?: any) => Promise<any>
12
- sendImage: (jid: string, image: Buffer | { url: string } | any, caption?: string, options?: any, quoted?: any) => Promise<any>
13
- sendVideo: (jid: string, video: Buffer | { url: string } | any, caption?: string, options?: any, quoted?: any) => Promise<any>
14
- sendDocument: (jid: string, document: Buffer | { url: string } | any, fileName: string, caption?: string, options?: any, quoted?: any) => Promise<any>
15
- sendAudio: (jid: string, audio: Buffer | { url: string } | any, options?: any, quoted?: any) => Promise<any>
16
- sendLocation: (jid: string, name: string, degreesLongitude: number, degreesLatitude: number, url?: string, address?: string, options?: any, quoted?: any) => Promise<any>
17
- sendPoll: (jid: string, name: string, pollVote?: string[], multiSelect?: boolean, options?: any, quoted?: any) => Promise<any>
18
- sendQuiz: (jid: string, name: string, pollVote: string[], answer: string, options?: any, quoted?: any) => Promise<any>
19
- sendPtv: (jid: string, ptv: Buffer | { url: string } | any, options?: any, quoted?: any) => Promise<any>
20
- statusMention: (jid: string, content: any) => Promise<void>
21
- fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
22
- requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<WAMessage>) => Promise<string | undefined>;
23
- messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
24
- userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
25
- devicesMutex: {
26
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
27
- };
28
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
29
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
30
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
31
- sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
32
- sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
33
- readMessages: (keys: WAMessageKey[]) => Promise<void>;
34
- refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
35
- getMediaHost: () => string;
36
- waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
37
- fetchPrivacySettings: (force?: boolean) => Promise<{
38
- [_: string]: string;
39
- }>;
40
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
41
- createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
42
- nodes: BinaryNode[];
43
- shouldIncludeDeviceIdentity: boolean;
44
- }>;
45
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
46
- jid: string;
47
- })[]>;
48
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
49
- updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
50
- sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
51
- newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
52
- newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
53
- newsletterSubscribers: (jid: string) => Promise<{
54
- subscribers: number;
55
- }>;
56
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
57
- newsletterFollow: (jid: string) => Promise<unknown>;
58
- newsletterUnfollow: (jid: string) => Promise<unknown>;
59
- newsletterMute: (jid: string) => Promise<unknown>;
60
- newsletterUnmute: (jid: string) => Promise<unknown>;
61
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
62
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
63
- newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
64
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
65
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
66
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
67
- subscribeNewsletterUpdates: (jid: string) => Promise<{
68
- duration: string;
69
- } | null>;
70
- newsletterAdminCount: (jid: string) => Promise<number>;
71
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
72
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
73
- newsletterDelete: (jid: string) => Promise<void>;
74
- groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
75
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
76
- groupLeave: (id: string) => Promise<void>;
77
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
78
- groupRequestParticipantsList: (jid: string) => Promise<{
79
- [key: string]: string;
80
- }[]>;
81
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
82
- status: string;
83
- jid: string | undefined;
84
- }[]>;
85
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
86
- status: string;
87
- jid: string | undefined;
88
- content: BinaryNode;
89
- }[]>;
90
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
91
- groupInviteCode: (jid: string) => Promise<string | undefined>;
92
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
93
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
94
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
95
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
96
- groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
97
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
98
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
99
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
100
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
101
- groupFetchAllParticipating: () => Promise<{
102
- [_: string]: import("../Types/index.js").GroupMetadata;
103
- }>;
104
- serverProps: {
105
- privacyTokenOn1to1: boolean;
106
- profilePicPrivacyToken: boolean;
107
- lidTrustedTokenIssueToLid: boolean;
108
- };
109
- createCallLink: (type: "audio" | "video", event?: {
110
- startTime: number;
111
- }, timeoutMs?: number) => Promise<string | undefined>;
112
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
113
- messageMutex: {
114
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
115
- };
116
- receiptMutex: {
117
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
118
- };
119
- appStatePatchMutex: {
120
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
121
- };
122
- notificationMutex: {
123
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
124
- };
125
- upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
126
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
127
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
128
- presenceSubscribe: (toJid: string) => Promise<void>;
129
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
130
- fetchBlocklist: () => Promise<(string | undefined)[]>;
131
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
132
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
133
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
134
- width: number;
135
- height: number;
136
- }) => Promise<void>;
137
- removeProfilePicture: (jid: string) => Promise<void>;
138
- updateProfileStatus: (status: string) => Promise<void>;
139
- updateProfileName: (name: string) => Promise<void>;
140
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
141
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
142
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
143
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
144
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
145
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
146
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
147
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
148
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
149
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
150
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
151
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
152
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
153
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
154
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
155
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
156
- removeContact: (jid: string) => Promise<void>;
157
- placeholderResendCache: import("../Types/index.js").CacheStore;
158
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
159
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
160
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
161
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
162
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
163
- star: (jid: string, messages: {
164
- id: string;
165
- fromMe?: boolean;
166
- }[], star: boolean) => Promise<void>;
167
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
168
- removeQuickReply: (timestamp: string) => Promise<void>;
169
- type: "md";
170
- ws: import("./Client/websocket.js").WebSocketClient;
171
- ev: import("../Types/index.js").BaileysEventEmitter & {
172
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
173
- buffer(): void;
174
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
175
- flush(): boolean;
176
- isBuffering(): boolean;
177
- destroy(): void;
178
- };
179
- authState: {
180
- creds: import("../Types/index.js").AuthenticationCreds;
181
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
182
- };
183
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
184
- user: import("../Types/index.js").Contact | undefined;
185
- generateMessageTag: () => string;
186
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
187
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
188
- waitForSocketOpen: () => Promise<void>;
189
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
190
- sendNode: (frame: BinaryNode) => Promise<void>;
191
- logout: (msg?: string) => Promise<void>;
192
- end: (error: Error | undefined) => Promise<void>;
193
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
194
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
195
- uploadPreKeys: (count?: number) => Promise<void>;
196
- uploadPreKeysToServerIfRequired: () => Promise<void>;
197
- digestKeyBundle: () => Promise<void>;
198
- rotateSignedPreKey: () => Promise<void>;
199
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
200
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
201
- sendUnifiedSession: () => Promise<void>;
202
- wamBuffer: import("../index.js").BinaryInfo;
203
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
204
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
205
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
206
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
207
- jid: string;
208
- exists: boolean;
209
- }[] | undefined>;
210
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
211
- fetchNewChatMessageCap: () => Promise<NewChatMessageCapInfo>;
212
- };
213
- //# sourceMappingURL=messages-recv.d.ts.map
@@ -1,199 +0,0 @@
1
- import NodeCache from '@cacheable/node-cache';
2
- import { Boom } from '@hapi/boom';
3
- import { proto } from '../../WAProto/index.js';
4
- import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
5
- import { MessageRetryManager } from '../Utils/index.js';
6
- import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
7
- import { USyncQuery } from '../WAUSync/index.js';
8
- export declare const makeMessagesSocket: (config: SocketConfig) => {
9
- userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
10
- devicesMutex: {
11
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
12
- };
13
- issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
14
- assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
15
- relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
16
- 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>;
19
- refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
20
- getMediaHost: () => string;
21
- waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
22
- fetchPrivacySettings: (force?: boolean) => Promise<{
23
- [_: string]: string;
24
- }>;
25
- sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
26
- createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
27
- nodes: BinaryNode[];
28
- shouldIncludeDeviceIdentity: boolean;
29
- }>;
30
- getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
31
- jid: string;
32
- })[]>;
33
- messageRetryManager: MessageRetryManager | null;
34
- updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
35
- updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
36
- sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
37
- newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
38
- newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
39
- newsletterSubscribers: (jid: string) => Promise<{
40
- subscribers: number;
41
- }>;
42
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
43
- newsletterFollow: (jid: string) => Promise<unknown>;
44
- newsletterUnfollow: (jid: string) => Promise<unknown>;
45
- newsletterMute: (jid: string) => Promise<unknown>;
46
- newsletterUnmute: (jid: string) => Promise<unknown>;
47
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
48
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
49
- newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
50
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
51
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
52
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
53
- subscribeNewsletterUpdates: (jid: string) => Promise<{
54
- duration: string;
55
- } | null>;
56
- newsletterAdminCount: (jid: string) => Promise<number>;
57
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
58
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
59
- newsletterDelete: (jid: string) => Promise<void>;
60
- groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
61
- groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
62
- groupLeave: (id: string) => Promise<void>;
63
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
64
- groupRequestParticipantsList: (jid: string) => Promise<{
65
- [key: string]: string;
66
- }[]>;
67
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
68
- status: string;
69
- jid: string | undefined;
70
- }[]>;
71
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
72
- status: string;
73
- jid: string | undefined;
74
- content: BinaryNode;
75
- }[]>;
76
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
77
- groupInviteCode: (jid: string) => Promise<string | undefined>;
78
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
79
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
80
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
81
- groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
82
- groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
83
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
84
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
85
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
86
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
87
- groupFetchAllParticipating: () => Promise<{
88
- [_: string]: import("../Types/index.js").GroupMetadata;
89
- }>;
90
- serverProps: {
91
- privacyTokenOn1to1: boolean;
92
- profilePicPrivacyToken: boolean;
93
- lidTrustedTokenIssueToLid: boolean;
94
- };
95
- createCallLink: (type: "audio" | "video", event?: {
96
- startTime: number;
97
- }, timeoutMs?: number) => Promise<string | undefined>;
98
- getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
99
- messageMutex: {
100
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
101
- };
102
- receiptMutex: {
103
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
104
- };
105
- appStatePatchMutex: {
106
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
107
- };
108
- notificationMutex: {
109
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
110
- };
111
- upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
112
- appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
113
- sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
114
- presenceSubscribe: (toJid: string) => Promise<void>;
115
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
116
- fetchBlocklist: () => Promise<(string | undefined)[]>;
117
- fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
118
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
119
- updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
120
- width: number;
121
- height: number;
122
- }) => Promise<void>;
123
- removeProfilePicture: (jid: string) => Promise<void>;
124
- updateProfileStatus: (status: string) => Promise<void>;
125
- updateProfileName: (name: string) => Promise<void>;
126
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
127
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
128
- updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
129
- updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
130
- updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
131
- updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
132
- updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
133
- updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
134
- updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
135
- updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
136
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
137
- getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
138
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
139
- chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
140
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
141
- addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
142
- removeContact: (jid: string) => Promise<void>;
143
- placeholderResendCache: import("../Types/index.js").CacheStore;
144
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
145
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
146
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
147
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
148
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
149
- star: (jid: string, messages: {
150
- id: string;
151
- fromMe?: boolean;
152
- }[], star: boolean) => Promise<void>;
153
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
154
- removeQuickReply: (timestamp: string) => Promise<void>;
155
- type: "md";
156
- ws: import("./Client/websocket.js").WebSocketClient;
157
- ev: import("../Types/index.js").BaileysEventEmitter & {
158
- process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
159
- buffer(): void;
160
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
161
- flush(): boolean;
162
- isBuffering(): boolean;
163
- destroy(): void;
164
- };
165
- authState: {
166
- creds: import("../Types/index.js").AuthenticationCreds;
167
- keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
168
- };
169
- signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
170
- user: import("../Types/index.js").Contact | undefined;
171
- generateMessageTag: () => string;
172
- query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
173
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
174
- waitForSocketOpen: () => Promise<void>;
175
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
176
- sendNode: (frame: BinaryNode) => Promise<void>;
177
- logout: (msg?: string) => Promise<void>;
178
- end: (error: Error | undefined) => Promise<void>;
179
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
180
- onUnexpectedError: (err: Error | Boom, msg: string) => void;
181
- uploadPreKeys: (count?: number) => Promise<void>;
182
- uploadPreKeysToServerIfRequired: () => Promise<void>;
183
- digestKeyBundle: () => Promise<void>;
184
- rotateSignedPreKey: () => Promise<void>;
185
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
186
- updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
187
- sendUnifiedSession: () => Promise<void>;
188
- wamBuffer: import("../index.js").BinaryInfo;
189
- waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
190
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
191
- executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
192
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
193
- jid: string;
194
- exists: boolean;
195
- }[] | undefined>;
196
- fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
197
- fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
198
- };
199
- //# sourceMappingURL=messages-send.d.ts.map
@@ -1,3 +0,0 @@
1
- import type { BinaryNode } from '../WABinary/index.js';
2
- export declare const executeWMexQuery: <T>(variables: Record<string, unknown>, queryId: string, dataPath: string, query: (node: BinaryNode) => Promise<BinaryNode>, generateMessageTag: () => string) => Promise<T>;
3
- //# sourceMappingURL=mex.d.ts.map
@@ -1,170 +0,0 @@
1
- import type { SocketConfig, WAMediaUpload } from '../Types/index.js';
2
- import type { NewsletterMetadata, NewsletterUpdate } from '../Types/index.js';
3
- export declare const makeNewsletterSocket: (config: SocketConfig) => {
4
- newsletterCreate: (name: string, description?: string) => Promise<NewsletterMetadata>;
5
- newsletterUpdate: (jid: string, updates: NewsletterUpdate) => Promise<unknown>;
6
- newsletterSubscribers: (jid: string) => Promise<{
7
- subscribers: number;
8
- }>;
9
- newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<NewsletterMetadata | null>;
10
- newsletterFollow: (jid: string) => Promise<unknown>;
11
- newsletterUnfollow: (jid: string) => Promise<unknown>;
12
- newsletterMute: (jid: string) => Promise<unknown>;
13
- newsletterUnmute: (jid: string) => Promise<unknown>;
14
- newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
15
- newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
16
- newsletterUpdatePicture: (jid: string, content: WAMediaUpload) => Promise<unknown>;
17
- newsletterRemovePicture: (jid: string) => Promise<unknown>;
18
- newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
19
- newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
20
- subscribeNewsletterUpdates: (jid: string) => Promise<{
21
- duration: string;
22
- } | null>;
23
- newsletterAdminCount: (jid: string) => Promise<number>;
24
- newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
25
- newsletterDemote: (jid: string, userJid: string) => Promise<void>;
26
- newsletterDelete: (jid: string) => Promise<void>;
27
- groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
28
- groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
29
- groupLeave: (id: string) => Promise<void>;
30
- groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
31
- groupRequestParticipantsList: (jid: string) => Promise<{
32
- [key: string]: string;
33
- }[]>;
34
- groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
35
- status: string;
36
- jid: string | undefined;
37
- }[]>;
38
- groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
39
- status: string;
40
- jid: string | undefined;
41
- content: import("../index.js").BinaryNode;
42
- }[]>;
43
- groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
44
- groupInviteCode: (jid: string) => Promise<string | undefined>;
45
- groupRevokeInvite: (jid: string) => Promise<string | undefined>;
46
- groupAcceptInvite: (code: string) => Promise<string | undefined>;
47
- groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
48
- groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
49
- groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
50
- groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
51
- groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
52
- groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
53
- groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
54
- groupFetchAllParticipating: () => Promise<{
55
- [_: string]: import("../index.js").GroupMetadata;
56
- }>;
57
- serverProps: {
58
- privacyTokenOn1to1: boolean;
59
- profilePicPrivacyToken: boolean;
60
- lidTrustedTokenIssueToLid: boolean;
61
- };
62
- createCallLink: (type: "audio" | "video", event?: {
63
- startTime: number;
64
- }, timeoutMs?: number) => Promise<string | undefined>;
65
- getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
66
- messageMutex: {
67
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
68
- };
69
- receiptMutex: {
70
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
71
- };
72
- appStatePatchMutex: {
73
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
74
- };
75
- notificationMutex: {
76
- mutex<T>(code: () => Promise<T> | T): Promise<T>;
77
- };
78
- fetchPrivacySettings: (force?: boolean) => Promise<{
79
- [_: string]: string;
80
- }>;
81
- upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
82
- appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
83
- sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
84
- presenceSubscribe: (toJid: string) => Promise<void>;
85
- profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
86
- fetchBlocklist: () => Promise<(string | undefined)[]>;
87
- fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
88
- fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
89
- updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
90
- width: number;
91
- height: number;
92
- }) => Promise<void>;
93
- removeProfilePicture: (jid: string) => Promise<void>;
94
- updateProfileStatus: (status: string) => Promise<void>;
95
- updateProfileName: (name: string) => Promise<void>;
96
- updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
97
- updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
98
- updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
99
- updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
100
- updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
101
- updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
102
- updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
103
- updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
104
- updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
105
- updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
106
- updateDefaultDisappearingMode: (duration: number) => Promise<void>;
107
- getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
108
- resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
109
- chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
110
- cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
111
- addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
112
- removeContact: (jid: string) => Promise<void>;
113
- placeholderResendCache: import("../index.js").CacheStore;
114
- addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
115
- addChatLabel: (jid: string, labelId: string) => Promise<void>;
116
- removeChatLabel: (jid: string, labelId: string) => Promise<void>;
117
- addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
118
- removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
119
- star: (jid: string, messages: {
120
- id: string;
121
- fromMe?: boolean;
122
- }[], star: boolean) => Promise<void>;
123
- addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
124
- removeQuickReply: (timestamp: string) => Promise<void>;
125
- type: "md";
126
- ws: import("./Client/index.js").WebSocketClient;
127
- ev: import("../index.js").BaileysEventEmitter & {
128
- process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
129
- buffer(): void;
130
- createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
131
- flush(): boolean;
132
- isBuffering(): boolean;
133
- destroy(): void;
134
- };
135
- authState: {
136
- creds: import("../index.js").AuthenticationCreds;
137
- keys: import("../index.js").SignalKeyStoreWithTransaction;
138
- };
139
- signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
140
- user: import("../index.js").Contact | undefined;
141
- generateMessageTag: () => string;
142
- query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<any>;
143
- waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
144
- waitForSocketOpen: () => Promise<void>;
145
- sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
146
- sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
147
- logout: (msg?: string) => Promise<void>;
148
- end: (error: Error | undefined) => Promise<void>;
149
- registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
150
- onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
151
- uploadPreKeys: (count?: number) => Promise<void>;
152
- uploadPreKeysToServerIfRequired: () => Promise<void>;
153
- digestKeyBundle: () => Promise<void>;
154
- rotateSignedPreKey: () => Promise<void>;
155
- requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
156
- updateServerTimeOffset: ({ attrs }: import("../index.js").BinaryNode) => void;
157
- sendUnifiedSession: () => Promise<void>;
158
- wamBuffer: import("../index.js").BinaryInfo;
159
- waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
160
- sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
161
- executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
162
- onWhatsApp: (...phoneNumber: string[]) => Promise<{
163
- jid: string;
164
- exists: boolean;
165
- }[] | undefined>;
166
- fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
167
- fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo>;
168
- };
169
- export type NewsletterSocket = ReturnType<typeof makeNewsletterSocket>;
170
- //# sourceMappingURL=newsletter.d.ts.map