@awangxcode/qiro-baileys 7.0.0-rc26.2 → 7.0.0
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.
- package/lib/Defaults/index.d.ts +1 -1
- package/lib/Defaults/index.js +3 -3
- package/lib/Extensions/advanced.d.ts +1 -1
- package/lib/Extensions/experimental.d.ts +1 -1
- package/lib/MessageBuilder/index.d.ts +5 -5
- package/lib/MessageBuilder/index.js +2 -2
- package/lib/Signal/Group/group-session-builder.d.ts +3 -3
- package/lib/Signal/Group/group-session-builder.js +4 -4
- package/lib/Signal/Group/group_cipher.d.ts +2 -2
- package/lib/Signal/Group/group_cipher.js +4 -4
- package/lib/Signal/Group/index.d.ts +11 -11
- package/lib/Signal/Group/index.js +11 -11
- package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
- package/lib/Signal/Group/sender-chain-key.js +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-distribution-message.js +1 -1
- package/lib/Signal/Group/sender-key-message.d.ts +1 -1
- package/lib/Signal/Group/sender-key-message.js +1 -1
- package/lib/Signal/Group/sender-key-record.d.ts +1 -1
- package/lib/Signal/Group/sender-key-record.js +2 -2
- package/lib/Signal/Group/sender-key-state.d.ts +2 -2
- package/lib/Signal/Group/sender-key-state.js +2 -2
- package/lib/Signal/libsignal.d.ts +3 -3
- package/lib/Signal/libsignal.js +6 -6
- package/lib/Signal/lid-mapping.d.ts +2 -2
- package/lib/Signal/lid-mapping.js +1 -1
- package/lib/Socket/Client/index.d.ts +2 -2
- package/lib/Socket/Client/index.js +2 -2
- package/lib/Socket/Client/types.d.ts +1 -1
- package/lib/Socket/Client/websocket.d.ts +1 -1
- package/lib/Socket/Client/websocket.js +2 -2
- package/lib/Socket/business.d.ts +77 -77
- package/lib/Socket/business.js +5 -5
- package/lib/Socket/chats.d.ts +16 -16
- package/lib/Socket/chats.js +9 -9
- package/lib/Socket/communities.d.ts +56 -56
- package/lib/Socket/communities.js +5 -5
- package/lib/Socket/groups.d.ts +28 -28
- package/lib/Socket/groups.js +4 -4
- package/lib/Socket/index.d.ts +97 -97
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.d.ts +42 -42
- package/lib/Socket/messages-recv.js +10 -10
- package/lib/Socket/messages-send.d.ts +45 -45
- package/lib/Socket/messages-send.js +9 -9
- package/lib/Socket/mex.d.ts +1 -1
- package/lib/Socket/mex.js +1 -1
- package/lib/Socket/newsletter.d.ts +34 -34
- package/lib/Socket/newsletter.js +5 -5
- package/lib/Socket/socket.d.ts +11 -11
- package/lib/Socket/socket.js +7 -7
- package/lib/Types/Auth.d.ts +2 -2
- package/lib/Types/Chat.d.ts +6 -6
- package/lib/Types/Events.d.ts +9 -9
- package/lib/Types/GroupMetadata.d.ts +2 -2
- package/lib/Types/Message.d.ts +5 -5
- package/lib/Types/Product.d.ts +1 -1
- package/lib/Types/Signal.d.ts +1 -1
- package/lib/Types/Socket.d.ts +5 -5
- package/lib/Types/Socket.js +1 -1
- package/lib/Types/State.d.ts +1 -1
- package/lib/Types/USync.d.ts +2 -2
- package/lib/Types/USync.js +1 -1
- package/lib/Types/index.d.ts +14 -14
- package/lib/Types/index.js +12 -12
- package/lib/Utils/auth-utils.d.ts +2 -2
- package/lib/Utils/auth-utils.js +4 -4
- package/lib/Utils/browser-utils.d.ts +1 -1
- package/lib/Utils/business.d.ts +2 -2
- package/lib/Utils/business.js +3 -3
- package/lib/Utils/chat-utils.d.ts +3 -3
- package/lib/Utils/chat-utils.js +7 -7
- package/lib/Utils/companion-reg-client-utils.d.ts +3 -3
- package/lib/Utils/companion-reg-client-utils.js +1 -1
- package/lib/Utils/crypto.d.ts +1 -1
- package/lib/Utils/crypto.js +1 -1
- package/lib/Utils/decode-wa-message.d.ts +4 -4
- package/lib/Utils/decode-wa-message.js +2 -2
- package/lib/Utils/event-buffer.d.ts +2 -2
- package/lib/Utils/event-buffer.js +4 -4
- package/lib/Utils/generics.d.ts +2 -2
- package/lib/Utils/generics.js +3 -3
- package/lib/Utils/history.d.ts +1 -1
- package/lib/Utils/history.js +5 -5
- package/lib/Utils/identity-change-handler.d.ts +2 -2
- package/lib/Utils/identity-change-handler.js +2 -2
- package/lib/Utils/index.d.ts +21 -21
- package/lib/Utils/index.js +21 -21
- package/lib/Utils/link-preview.d.ts +2 -2
- package/lib/Utils/link-preview.js +2 -2
- package/lib/Utils/message-retry-manager.d.ts +1 -1
- package/lib/Utils/messages-media.d.ts +4 -4
- package/lib/Utils/messages-media.js +4 -4
- package/lib/Utils/messages.d.ts +4 -4
- package/lib/Utils/messages.js +7 -7
- package/lib/Utils/noise-handler.d.ts +3 -3
- package/lib/Utils/noise-handler.js +3 -3
- package/lib/Utils/offline-node-processor.d.ts +1 -1
- package/lib/Utils/pre-key-manager.d.ts +2 -2
- package/lib/Utils/process-message.d.ts +2 -2
- package/lib/Utils/process-message.js +7 -7
- package/lib/Utils/reporting-utils.d.ts +2 -2
- package/lib/Utils/reporting-utils.js +1 -1
- package/lib/Utils/signal.d.ts +4 -4
- package/lib/Utils/signal.js +4 -4
- package/lib/Utils/stanza-ack.d.ts +1 -1
- package/lib/Utils/sync-action-utils.d.ts +2 -2
- package/lib/Utils/sync-action-utils.js +1 -1
- package/lib/Utils/tc-token-utils.d.ts +2 -2
- package/lib/Utils/tc-token-utils.js +1 -1
- package/lib/Utils/use-multi-file-auth-state.d.ts +1 -1
- package/lib/Utils/use-multi-file-auth-state.js +2 -2
- package/lib/Utils/validate-connection.d.ts +2 -2
- package/lib/Utils/validate-connection.js +5 -5
- package/lib/WABinary/decode.d.ts +1 -1
- package/lib/WABinary/decode.js +2 -2
- package/lib/WABinary/encode.d.ts +1 -1
- package/lib/WABinary/encode.js +2 -2
- package/lib/WABinary/generic-utils.d.ts +1 -1
- package/lib/WABinary/generic-utils.js +1 -1
- package/lib/WABinary/index.d.ts +5 -5
- package/lib/WABinary/index.js +5 -5
- package/lib/WABinary/types.d.ts +1 -1
- package/lib/WABinary/types.js +1 -1
- package/lib/WAM/BinaryInfo.d.ts +1 -1
- package/lib/WAM/encode.d.ts +1 -1
- package/lib/WAM/encode.js +2 -2
- package/lib/WAM/index.d.ts +3 -3
- package/lib/WAM/index.js +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +1 -1
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +2 -2
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -3
- package/lib/WAUSync/Protocols/index.d.ts +5 -5
- package/lib/WAUSync/Protocols/index.js +5 -5
- package/lib/WAUSync/USyncQuery.d.ts +3 -3
- package/lib/WAUSync/USyncQuery.js +5 -5
- package/lib/WAUSync/index.d.ts +3 -3
- package/lib/WAUSync/index.js +3 -3
- package/lib/index.d.ts +10 -10
- package/lib/index.js +11 -11
- package/package.json +2 -2
|
@@ -2,17 +2,17 @@ import NodeCache from '@cacheable/node-cache';
|
|
|
2
2
|
import { Boom } from '@hapi/boom';
|
|
3
3
|
import Long from 'long';
|
|
4
4
|
import { proto } from '../../WAProto/index.js';
|
|
5
|
-
import type { MessageReceiptType, MessageRelayOptions, NewChatMessageCapInfo, SocketConfig, WAMessage, WAMessageKey } from '../Types';
|
|
5
|
+
import type { MessageReceiptType, MessageRelayOptions, NewChatMessageCapInfo, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
6
6
|
import { TTLCache } from '../Utils/ttl-cache.js';
|
|
7
|
-
import { type BinaryNode, type JidWithDevice } from '../WABinary';
|
|
7
|
+
import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
|
|
8
8
|
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
9
9
|
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
10
10
|
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
11
11
|
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
12
12
|
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>;
|
|
13
13
|
requestPlaceholderResend: (messageKey: WAMessageKey, msgData?: Partial<WAMessage>) => Promise<string | undefined>;
|
|
14
|
-
messageRetryManager: import("../Utils").MessageRetryManager | null;
|
|
15
|
-
userDevicesCache: import("../Types").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
14
|
+
messageRetryManager: import("../Utils/index.js").MessageRetryManager | null;
|
|
15
|
+
userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
16
16
|
devicesMutex: {
|
|
17
17
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
18
18
|
};
|
|
@@ -22,10 +22,10 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
22
22
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
23
23
|
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
24
24
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
25
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
|
|
25
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types/index.js").MediaConnInfo>;
|
|
26
26
|
getMediaHost: () => string;
|
|
27
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
28
|
-
outboundResendCache: import("../Types").CacheStore | TTLCache<{
|
|
27
|
+
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
28
|
+
outboundResendCache: import("../Types/index.js").CacheStore | TTLCache<{
|
|
29
29
|
jid: string;
|
|
30
30
|
message: proto.IMessage;
|
|
31
31
|
}>;
|
|
@@ -46,7 +46,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
46
46
|
})[]>;
|
|
47
47
|
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
48
48
|
updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
|
|
49
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
49
|
+
sendMessage: (jid: string, content: import("../Types/index.js").AnyMessageContent, options?: import("../Types/index.js").MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
50
50
|
newsletterUpdateUserSetting: (jid: string, type: "FOLLOWER_NOTIFICATIONS" | "ADMIN_NOTIFICATIONS", muted: boolean) => Promise<{
|
|
51
51
|
id: any;
|
|
52
52
|
state: any;
|
|
@@ -181,19 +181,19 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
181
181
|
newsletterRecommended: (options?: any) => Promise<any>;
|
|
182
182
|
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
183
183
|
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
184
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
185
|
-
newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
|
|
184
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
185
|
+
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
186
186
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
187
187
|
subscribers: number;
|
|
188
188
|
}>;
|
|
189
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
|
|
189
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
190
190
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
191
191
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
192
192
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
193
193
|
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
194
194
|
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
195
195
|
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
196
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
|
|
196
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
197
197
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
198
198
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
199
199
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
@@ -238,8 +238,8 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
238
238
|
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
239
239
|
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
240
240
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
241
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
242
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
|
|
241
|
+
groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
242
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
243
243
|
groupLeave: (id: string) => Promise<void>;
|
|
244
244
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
245
245
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
@@ -249,7 +249,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
249
249
|
status: string;
|
|
250
250
|
jid: string | undefined;
|
|
251
251
|
}[]>;
|
|
252
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
252
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
|
|
253
253
|
status: string;
|
|
254
254
|
jid: string | undefined;
|
|
255
255
|
content: BinaryNode;
|
|
@@ -260,13 +260,13 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
260
260
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
261
261
|
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
262
262
|
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
263
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
263
|
+
groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
264
264
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
265
265
|
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
266
266
|
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
267
267
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
268
268
|
groupFetchAllParticipating: () => Promise<{
|
|
269
|
-
[_: string]: import("../Types").GroupMetadata;
|
|
269
|
+
[_: string]: import("../Types/index.js").GroupMetadata;
|
|
270
270
|
}>;
|
|
271
271
|
serverProps: {
|
|
272
272
|
privacyTokenOn1to1: boolean;
|
|
@@ -304,7 +304,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
304
304
|
createCallLink: (type: "audio" | "video", event?: {
|
|
305
305
|
startTime: number;
|
|
306
306
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
307
|
-
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
307
|
+
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
308
308
|
messageMutex: {
|
|
309
309
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
310
310
|
};
|
|
@@ -317,15 +317,15 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
317
317
|
notificationMutex: {
|
|
318
318
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
319
319
|
};
|
|
320
|
-
upsertMessage: (msg: WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
|
|
321
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
|
322
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
|
|
320
|
+
upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
321
|
+
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
322
|
+
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
323
323
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
324
324
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
325
325
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
326
326
|
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
327
327
|
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
328
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
328
|
+
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
329
329
|
width?: number;
|
|
330
330
|
height?: number;
|
|
331
331
|
full?: boolean;
|
|
@@ -336,22 +336,22 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
336
336
|
updateProfileName: (name: string) => Promise<void>;
|
|
337
337
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
338
338
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
339
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
340
|
-
updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
|
|
341
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
342
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
343
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
344
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
345
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
346
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
|
|
339
|
+
updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
|
|
340
|
+
updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
341
|
+
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
342
|
+
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
343
|
+
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
344
|
+
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
345
|
+
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
346
|
+
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
347
347
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
348
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
348
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
349
349
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
350
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
350
|
+
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
351
351
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
352
352
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
353
353
|
removeContact: (jid: string) => Promise<void>;
|
|
354
|
-
placeholderResendCache: import("../Types").CacheStore;
|
|
354
|
+
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
355
355
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
356
356
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
357
357
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -422,7 +422,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
422
422
|
[key: string]: string;
|
|
423
423
|
}>;
|
|
424
424
|
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
425
|
-
reportSpam: (jid: string, options?: import("../Types").SpamReportOptions) => Promise<{
|
|
425
|
+
reportSpam: (jid: string, options?: import("../Types/index.js").SpamReportOptions) => Promise<{
|
|
426
426
|
jid: string | undefined;
|
|
427
427
|
flow: string | undefined;
|
|
428
428
|
reported: boolean;
|
|
@@ -430,8 +430,8 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
430
430
|
}>;
|
|
431
431
|
type: "md";
|
|
432
432
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
433
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
434
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
433
|
+
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
434
|
+
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
435
435
|
buffer(): void;
|
|
436
436
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
437
437
|
flush(): boolean;
|
|
@@ -439,11 +439,11 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
439
439
|
destroy(): void;
|
|
440
440
|
};
|
|
441
441
|
authState: {
|
|
442
|
-
creds: import("../Types").AuthenticationCreds;
|
|
443
|
-
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
442
|
+
creds: import("../Types/index.js").AuthenticationCreds;
|
|
443
|
+
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
444
444
|
};
|
|
445
|
-
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
446
|
-
user: import("../Types").Contact | undefined;
|
|
445
|
+
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
446
|
+
user: import("../Types/index.js").Contact | undefined;
|
|
447
447
|
generateMessageTag: () => string;
|
|
448
448
|
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
449
449
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
@@ -463,7 +463,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
463
463
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
464
464
|
sendUnifiedSession: () => Promise<void>;
|
|
465
465
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
466
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
466
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
467
467
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
468
468
|
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
469
469
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
@@ -482,7 +482,7 @@ export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
|
482
482
|
jid: string;
|
|
483
483
|
username: unknown;
|
|
484
484
|
}[]>;
|
|
485
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
|
|
485
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
486
486
|
fetchNewChatMessageCap: () => Promise<NewChatMessageCapInfo>;
|
|
487
487
|
};
|
|
488
488
|
//# sourceMappingURL=messages-recv.d.ts.map
|
|
@@ -3,17 +3,17 @@ import { Boom } from '@hapi/boom';
|
|
|
3
3
|
import { randomBytes } from 'crypto';
|
|
4
4
|
import Long from 'long';
|
|
5
5
|
import { proto } from '../../WAProto/index.js';
|
|
6
|
-
import { DEFAULT_CACHE_TTLS, DEFAULT_CONNECTION_CONFIG, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT, PLACEHOLDER_MAX_AGE_SECONDS, STATUS_EXPIRY_SECONDS } from '../Defaults';
|
|
7
|
-
import { ReachoutTimelockEnforcementType, WAMessageStatus, WAMessageStubType } from '../Types';
|
|
8
|
-
import { ACCOUNT_RESTRICTED_TEXT, aesDecryptCTR, aesEncryptGCM, cleanMessage, Curve, decodeMediaRetryNode, decodeMessageNode, decryptMessageNode, delay, derivePairingCodeKey, encodeBigEndian, encodeSignedDeviceIdentity, extractAddressingContext, extractE2ESessionFromRetryReceipt, getCallStatusFromNode, getHistoryMsg, getNextPreKeys, getStatusFromReceiptType, handleIdentityChange, hkdf, MISSING_KEYS_ERROR_TEXT, NACK_REASONS, RETRYABLE_ACK_CODES, NO_MESSAGE_FOUND_ERROR_TEXT, SERVER_ERROR_CODES, toNumber, unixTimestampSeconds, xmppPreKey, xmppSignedPreKey } from '../Utils';
|
|
9
|
-
import { makeMutex } from '../Utils/make-mutex';
|
|
6
|
+
import { DEFAULT_CACHE_TTLS, DEFAULT_CONNECTION_CONFIG, KEY_BUNDLE_TYPE, MIN_PREKEY_COUNT, PLACEHOLDER_MAX_AGE_SECONDS, STATUS_EXPIRY_SECONDS } from '../Defaults/index.js';
|
|
7
|
+
import { ReachoutTimelockEnforcementType, WAMessageStatus, WAMessageStubType } from '../Types/index.js';
|
|
8
|
+
import { ACCOUNT_RESTRICTED_TEXT, aesDecryptCTR, aesEncryptGCM, cleanMessage, Curve, decodeMediaRetryNode, decodeMessageNode, decryptMessageNode, delay, derivePairingCodeKey, encodeBigEndian, encodeSignedDeviceIdentity, extractAddressingContext, extractE2ESessionFromRetryReceipt, getCallStatusFromNode, getHistoryMsg, getNextPreKeys, getStatusFromReceiptType, handleIdentityChange, hkdf, MISSING_KEYS_ERROR_TEXT, NACK_REASONS, RETRYABLE_ACK_CODES, NO_MESSAGE_FOUND_ERROR_TEXT, SERVER_ERROR_CODES, toNumber, unixTimestampSeconds, xmppPreKey, xmppSignedPreKey } from '../Utils/index.js';
|
|
9
|
+
import { makeMutex } from '../Utils/make-mutex.js';
|
|
10
10
|
import { TTLCache } from '../Utils/ttl-cache.js';
|
|
11
|
-
import { makeOfflineNodeProcessor } from '../Utils/offline-node-processor';
|
|
12
|
-
import { buildAckStanza } from '../Utils/stanza-ack';
|
|
13
|
-
import { buildMergedTcTokenIndexWrite, isTcTokenExpired, readTcTokenIndex, resolveIssuanceJid, resolveTcTokenJid, storeTcTokensFromIqResult, TC_TOKEN_INDEX_KEY } from '../Utils/tc-token-utils';
|
|
14
|
-
import { areJidsSameUser, binaryNodeToString, getAllBinaryNodeChildren, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildString, getBinaryNodeChildUInt, isJidGroup, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser, jidDecode, jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary';
|
|
15
|
-
import { extractGroupMetadata } from './groups';
|
|
16
|
-
import { makeMessagesSocket } from './messages-send';
|
|
11
|
+
import { makeOfflineNodeProcessor } from '../Utils/offline-node-processor.js';
|
|
12
|
+
import { buildAckStanza } from '../Utils/stanza-ack.js';
|
|
13
|
+
import { buildMergedTcTokenIndexWrite, isTcTokenExpired, readTcTokenIndex, resolveIssuanceJid, resolveTcTokenJid, storeTcTokensFromIqResult, TC_TOKEN_INDEX_KEY } from '../Utils/tc-token-utils.js';
|
|
14
|
+
import { areJidsSameUser, binaryNodeToString, getAllBinaryNodeChildren, getBinaryNodeChild, getBinaryNodeChildBuffer, getBinaryNodeChildren, getBinaryNodeChildString, getBinaryNodeChildUInt, isJidGroup, isJidNewsletter, isJidStatusBroadcast, isLidUser, isPnUser, jidDecode, jidNormalizedUser, S_WHATSAPP_NET } from '../WABinary/index.js';
|
|
15
|
+
import { extractGroupMetadata } from './groups.js';
|
|
16
|
+
import { makeMessagesSocket } from './messages-send.js';
|
|
17
17
|
const ENFORCEMENT_TYPE_VALUES = new Set(Object.values(ReachoutTimelockEnforcementType));
|
|
18
18
|
function isValidEnforcementType(value) {
|
|
19
19
|
return typeof value === 'string' && ENFORCEMENT_TYPE_VALUES.has(value);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import NodeCache from '@cacheable/node-cache';
|
|
2
2
|
import { Boom } from '@hapi/boom';
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types';
|
|
5
|
-
import { MessageRetryManager } from '../Utils';
|
|
4
|
+
import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
5
|
+
import { MessageRetryManager } from '../Utils/index.js';
|
|
6
6
|
import { TTLCache } from '../Utils/ttl-cache.js';
|
|
7
|
-
import { type BinaryNode, type JidWithDevice } from '../WABinary';
|
|
8
|
-
import { USyncQuery } from '../WAUSync';
|
|
7
|
+
import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
|
|
8
|
+
import { USyncQuery } from '../WAUSync/index.js';
|
|
9
9
|
export declare const buildMemberLabelMessage: (jid: string, memberLabel?: string | null) => {
|
|
10
10
|
label: string;
|
|
11
11
|
content: {
|
|
@@ -20,7 +20,7 @@ export declare const buildMemberLabelMessage: (jid: string, memberLabel?: string
|
|
|
20
20
|
node: BinaryNode;
|
|
21
21
|
};
|
|
22
22
|
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
23
|
-
userDevicesCache: import("../Types").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
23
|
+
userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
24
24
|
devicesMutex: {
|
|
25
25
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
26
26
|
};
|
|
@@ -32,8 +32,8 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
32
32
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
33
33
|
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
|
|
34
34
|
getMediaHost: () => string;
|
|
35
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
36
|
-
outboundResendCache: import("../Types").CacheStore | TTLCache<{
|
|
35
|
+
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
36
|
+
outboundResendCache: import("../Types/index.js").CacheStore | TTLCache<{
|
|
37
37
|
jid: string;
|
|
38
38
|
message: proto.IMessage;
|
|
39
39
|
}>;
|
|
@@ -190,19 +190,19 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
190
190
|
newsletterRecommended: (options?: any) => Promise<any>;
|
|
191
191
|
newsletterSimilar: (jid: string, options?: any) => Promise<any>;
|
|
192
192
|
newsletterFollowers: (jid: string, options?: any) => Promise<any>;
|
|
193
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
194
|
-
newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
|
|
193
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
194
|
+
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
195
195
|
newsletterSubscribers: (jid: string) => Promise<{
|
|
196
196
|
subscribers: number;
|
|
197
197
|
}>;
|
|
198
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
|
|
198
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
199
199
|
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
200
200
|
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
201
201
|
newsletterMute: (jid: string) => Promise<unknown>;
|
|
202
202
|
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
203
203
|
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
204
204
|
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
205
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
|
|
205
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
206
206
|
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
207
207
|
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
208
208
|
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
@@ -247,8 +247,8 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
247
247
|
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
248
248
|
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
249
249
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
250
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
251
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
|
|
250
|
+
groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
251
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
252
252
|
groupLeave: (id: string) => Promise<void>;
|
|
253
253
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
254
254
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
@@ -258,7 +258,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
258
258
|
status: string;
|
|
259
259
|
jid: string | undefined;
|
|
260
260
|
}[]>;
|
|
261
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
261
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
|
|
262
262
|
status: string;
|
|
263
263
|
jid: string | undefined;
|
|
264
264
|
content: BinaryNode;
|
|
@@ -269,13 +269,13 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
269
269
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
270
270
|
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
271
271
|
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
272
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
272
|
+
groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
273
273
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
274
274
|
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
275
275
|
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
276
276
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
277
277
|
groupFetchAllParticipating: () => Promise<{
|
|
278
|
-
[_: string]: import("../Types").GroupMetadata;
|
|
278
|
+
[_: string]: import("../Types/index.js").GroupMetadata;
|
|
279
279
|
}>;
|
|
280
280
|
serverProps: {
|
|
281
281
|
privacyTokenOn1to1: boolean;
|
|
@@ -313,7 +313,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
313
313
|
createCallLink: (type: "audio" | "video", event?: {
|
|
314
314
|
startTime: number;
|
|
315
315
|
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
316
|
-
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
316
|
+
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
317
317
|
messageMutex: {
|
|
318
318
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
319
319
|
};
|
|
@@ -326,15 +326,15 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
326
326
|
notificationMutex: {
|
|
327
327
|
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
328
328
|
};
|
|
329
|
-
upsertMessage: (msg: WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
|
|
330
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
|
331
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
|
|
329
|
+
upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
330
|
+
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
331
|
+
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
332
332
|
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
333
333
|
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
334
334
|
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
335
|
-
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
|
|
336
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
|
|
337
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
335
|
+
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
336
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
337
|
+
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
338
338
|
width?: number;
|
|
339
339
|
height?: number;
|
|
340
340
|
full?: boolean;
|
|
@@ -345,22 +345,22 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
345
345
|
updateProfileName: (name: string) => Promise<void>;
|
|
346
346
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
347
347
|
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
348
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
349
|
-
updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
|
|
350
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
351
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
352
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
353
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
354
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
355
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
|
|
348
|
+
updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
|
|
349
|
+
updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
350
|
+
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
351
|
+
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
352
|
+
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
353
|
+
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
354
|
+
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
355
|
+
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
356
356
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
357
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
357
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
358
358
|
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
359
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
359
|
+
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
360
360
|
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
361
361
|
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
362
362
|
removeContact: (jid: string) => Promise<void>;
|
|
363
|
-
placeholderResendCache: import("../Types").CacheStore;
|
|
363
|
+
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
364
364
|
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
365
365
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
366
366
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
@@ -431,7 +431,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
431
431
|
[key: string]: string;
|
|
432
432
|
}>;
|
|
433
433
|
fetchServerLinkPreview: (url: string) => Promise<any>;
|
|
434
|
-
reportSpam: (jid: string, options?: import("../Types").SpamReportOptions) => Promise<{
|
|
434
|
+
reportSpam: (jid: string, options?: import("../Types/index.js").SpamReportOptions) => Promise<{
|
|
435
435
|
jid: string | undefined;
|
|
436
436
|
flow: string | undefined;
|
|
437
437
|
reported: boolean;
|
|
@@ -439,8 +439,8 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
439
439
|
}>;
|
|
440
440
|
type: "md";
|
|
441
441
|
ws: import("./Client/websocket.js").WebSocketClient;
|
|
442
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
443
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
442
|
+
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
443
|
+
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
444
444
|
buffer(): void;
|
|
445
445
|
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
446
446
|
flush(): boolean;
|
|
@@ -448,11 +448,11 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
448
448
|
destroy(): void;
|
|
449
449
|
};
|
|
450
450
|
authState: {
|
|
451
|
-
creds: import("../Types").AuthenticationCreds;
|
|
452
|
-
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
451
|
+
creds: import("../Types/index.js").AuthenticationCreds;
|
|
452
|
+
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
453
453
|
};
|
|
454
|
-
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
455
|
-
user: import("../Types").Contact | undefined;
|
|
454
|
+
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
455
|
+
user: import("../Types/index.js").Contact | undefined;
|
|
456
456
|
generateMessageTag: () => string;
|
|
457
457
|
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
458
458
|
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
@@ -472,9 +472,9 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
472
472
|
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
473
473
|
sendUnifiedSession: () => Promise<void>;
|
|
474
474
|
wamBuffer: import("../index.js").BinaryInfo;
|
|
475
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
475
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
476
476
|
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
477
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>;
|
|
477
|
+
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
|
|
478
478
|
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
479
479
|
jid: string;
|
|
480
480
|
exists: boolean;
|
|
@@ -491,7 +491,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
491
491
|
jid: string;
|
|
492
492
|
username: unknown;
|
|
493
493
|
}[]>;
|
|
494
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types").ReachoutTimelockState>;
|
|
495
|
-
fetchNewChatMessageCap: () => Promise<import("../Types").NewChatMessageCapInfo>;
|
|
494
|
+
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
495
|
+
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
496
496
|
};
|
|
497
497
|
//# sourceMappingURL=messages-send.d.ts.map
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import NodeCache from '@cacheable/node-cache';
|
|
2
2
|
import { Boom } from '@hapi/boom';
|
|
3
3
|
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
import { DEFAULT_CACHE_TTLS, MAX_OUTBOUND_RESEND_ENTRIES, MEMBER_LABEL_MAX_LENGTH, WA_DEFAULT_EPHEMERAL } from '../Defaults';
|
|
5
|
-
import { aggregateMessageKeysNotFromMe, assertMediaContent, assertMeId, bindWaitForEvent, decryptMediaRetryData, DEF_MEDIA_HOST, encodeNewsletterMessage, encodeSignedDeviceIdentity, encodeWAMessage, encryptMediaRetryRequest, extractDeviceJids, generateMessageIDV2, generateParticipantHashV2, generateWAMessage, generateWAMessageFromContent, getStatusCodeForMediaRetry, getUrlFromDirectPath, getWAUploadToServer, MessageRetryManager, normalizeMessageContent, parseAndInjectE2ESessions, unixTimestampSeconds } from '../Utils';
|
|
4
|
+
import { DEFAULT_CACHE_TTLS, MAX_OUTBOUND_RESEND_ENTRIES, MEMBER_LABEL_MAX_LENGTH, WA_DEFAULT_EPHEMERAL } from '../Defaults/index.js';
|
|
5
|
+
import { aggregateMessageKeysNotFromMe, assertMediaContent, assertMeId, bindWaitForEvent, decryptMediaRetryData, DEF_MEDIA_HOST, encodeNewsletterMessage, encodeSignedDeviceIdentity, encodeWAMessage, encryptMediaRetryRequest, extractDeviceJids, generateMessageIDV2, generateParticipantHashV2, generateWAMessage, generateWAMessageFromContent, getStatusCodeForMediaRetry, getUrlFromDirectPath, getWAUploadToServer, MessageRetryManager, normalizeMessageContent, parseAndInjectE2ESessions, unixTimestampSeconds } from '../Utils/index.js';
|
|
6
6
|
import { prepareAudioStickerMessage } from '../Utils/audio-sticker.js';
|
|
7
7
|
import { prepareModernMessageContent } from '../Utils/modern-messages.js';
|
|
8
8
|
import { getChatThemeExamples, isChatThemeExample, prepareChatThemeMessages } from '../Utils/chat-theme.js';
|
|
9
|
-
import { getUrlInfo } from '../Utils/link-preview';
|
|
10
|
-
import { makeKeyedMutex, makeMutex } from '../Utils/make-mutex';
|
|
9
|
+
import { getUrlInfo } from '../Utils/link-preview.js';
|
|
10
|
+
import { makeKeyedMutex, makeMutex } from '../Utils/make-mutex.js';
|
|
11
11
|
import { TTLCache } from '../Utils/ttl-cache.js';
|
|
12
|
-
import { getMessageReportingToken, shouldIncludeReportingToken } from '../Utils/reporting-utils';
|
|
13
|
-
import { buildMergedTcTokenIndexWrite, isTcTokenExpired, resolveIssuanceJid, resolveTcTokenJid, shouldSendNewTcToken, storeTcTokensFromIqResult } from '../Utils/tc-token-utils';
|
|
14
|
-
import { areJidsSameUser, getBinaryNodeChild, getBinaryNodeChildren, buildInteractiveBizNodes, isHostedLidUser, isHostedPnUser, isJidBot, isJidGroup, isJidMetaAI, isLidUser, isPnUser, jidDecode, jidEncode, jidNormalizedUser, PSA_WID, S_WHATSAPP_NET } from '../WABinary';
|
|
15
|
-
import { USyncQuery, USyncUser } from '../WAUSync';
|
|
16
|
-
import { makeNewsletterSocket } from './newsletter';
|
|
12
|
+
import { getMessageReportingToken, shouldIncludeReportingToken } from '../Utils/reporting-utils.js';
|
|
13
|
+
import { buildMergedTcTokenIndexWrite, isTcTokenExpired, resolveIssuanceJid, resolveTcTokenJid, shouldSendNewTcToken, storeTcTokensFromIqResult } from '../Utils/tc-token-utils.js';
|
|
14
|
+
import { areJidsSameUser, getBinaryNodeChild, getBinaryNodeChildren, buildInteractiveBizNodes, isHostedLidUser, isHostedPnUser, isJidBot, isJidGroup, isJidMetaAI, isLidUser, isPnUser, jidDecode, jidEncode, jidNormalizedUser, PSA_WID, S_WHATSAPP_NET } from '../WABinary/index.js';
|
|
15
|
+
import { USyncQuery, USyncUser } from '../WAUSync/index.js';
|
|
16
|
+
import { makeNewsletterSocket } from './newsletter.js';
|
|
17
17
|
export const buildMemberLabelMessage = (jid, memberLabel) => {
|
|
18
18
|
if (!isJidGroup(jid))
|
|
19
19
|
throw new Boom('Member labels can only be applied to group JIDs', { statusCode: 400, data: { jid } });
|
package/lib/Socket/mex.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { BinaryNode } from '../WABinary';
|
|
1
|
+
import type { BinaryNode } from '../WABinary/index.js';
|
|
2
2
|
export declare const executeWMexQuery: <T>(variables: Record<string, unknown>, queryId: string, dataPath: string, query: (node: BinaryNode) => Promise<BinaryNode>, generateMessageTag: () => string) => Promise<T>;
|
|
3
3
|
//# sourceMappingURL=mex.d.ts.map
|
package/lib/Socket/mex.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Boom } from '@hapi/boom';
|
|
2
|
-
import { getBinaryNodeChild, S_WHATSAPP_NET } from '../WABinary';
|
|
2
|
+
import { getBinaryNodeChild, S_WHATSAPP_NET } from '../WABinary/index.js';
|
|
3
3
|
const wMexQuery = (variables, queryId, query, generateMessageTag) => {
|
|
4
4
|
return query({
|
|
5
5
|
tag: 'iq',
|