@hbmodsofc/baileys 1.5.0 → 1.7.6
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/LICENSE +1 -1
- package/WAProto/index.js +19671 -152026
- package/engine-requirements.js +4 -4
- package/lib/Defaults/index.d.ts +12 -8
- package/lib/Defaults/index.js +90 -124
- package/lib/Signal/Group/group_cipher.d.ts +0 -1
- package/lib/Signal/Group/group_cipher.js +28 -39
- package/lib/Signal/Group/sender-chain-key.d.ts +1 -1
- package/lib/Signal/Group/sender-chain-key.js +9 -2
- package/lib/Signal/Group/sender-key-distribution-message.js +3 -3
- package/lib/Signal/Group/sender-key-message.js +3 -3
- package/lib/Signal/Group/sender-key-state.d.ts +4 -4
- package/lib/Signal/Group/sender-key-state.js +47 -16
- package/lib/Signal/libsignal.d.ts +7 -3
- package/lib/Signal/libsignal.js +224 -39
- package/lib/Signal/lid-mapping.d.ts +26 -0
- package/lib/Signal/lid-mapping.js +146 -0
- package/lib/Socket/Client/index.d.ts +2 -3
- package/lib/Socket/Client/index.js +2 -3
- package/lib/Socket/Client/{abstract-socket-client.d.ts → types.d.ts} +1 -3
- package/lib/Socket/Client/{web-socket-client.d.ts → websocket.d.ts} +1 -1
- package/lib/Socket/Client/{web-socket-client.js → websocket.js} +10 -16
- package/lib/Socket/business.d.ts +94 -78
- package/lib/Socket/business.js +130 -11
- package/lib/Socket/chats.d.ts +63 -233
- package/lib/Socket/chats.js +234 -184
- package/lib/Socket/communities.d.ts +232 -0
- package/lib/Socket/communities.js +402 -0
- package/lib/Socket/groups.d.ts +62 -41
- package/lib/Socket/groups.js +76 -64
- package/lib/Socket/index.d.ts +129 -83
- package/lib/Socket/index.js +13 -6
- package/lib/Socket/messages-recv.d.ts +59 -48
- package/lib/Socket/messages-recv.js +516 -371
- package/lib/Socket/messages-send.d.ts +86 -67
- package/lib/Socket/messages-send.js +1091 -1
- package/lib/Socket/mex.d.ts +2 -0
- package/lib/Socket/mex.js +45 -0
- package/lib/Socket/newsletter.d.ts +76 -64
- package/lib/Socket/newsletter.js +184 -1
- package/lib/Socket/socket.d.ts +19 -13
- package/lib/Socket/socket.js +805 -1
- package/lib/Types/Auth.d.ts +4 -10
- package/lib/Types/Bussines.d.ts +24 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Call.d.ts +1 -1
- package/lib/Types/Chat.d.ts +29 -9
- package/lib/Types/Chat.js +7 -1
- package/lib/Types/Contact.d.ts +5 -1
- package/lib/Types/Events.d.ts +55 -14
- package/lib/Types/GroupMetadata.d.ts +15 -5
- package/lib/Types/Label.d.ts +11 -0
- package/lib/Types/Label.js +1 -1
- package/lib/Types/LabelAssociation.js +1 -1
- package/lib/Types/Message.d.ts +75 -49
- package/lib/Types/Message.js +10 -7
- package/lib/Types/Newsletter.d.ts +129 -98
- package/lib/Types/Newsletter.js +33 -38
- package/lib/Types/Product.d.ts +1 -1
- package/lib/Types/Signal.d.ts +29 -1
- package/lib/Types/Socket.d.ts +48 -22
- package/lib/Types/State.d.ts +13 -2
- package/lib/Types/State.js +12 -0
- package/lib/Types/USync.d.ts +1 -1
- package/lib/Types/index.d.ts +10 -3
- package/lib/Types/index.js +2 -2
- package/lib/Utils/auth-utils.d.ts +3 -3
- package/lib/Utils/auth-utils.js +378 -102
- package/lib/Utils/baileys-event-stream.js +1 -1
- package/lib/Utils/business.d.ts +2 -2
- package/lib/Utils/business.js +19 -13
- package/lib/Utils/chat-utils.d.ts +21 -22
- package/lib/Utils/chat-utils.js +201 -154
- package/lib/Utils/crypto.d.ts +18 -19
- package/lib/Utils/crypto.js +78 -37
- package/lib/Utils/decode-wa-message.d.ts +34 -7
- package/lib/Utils/decode-wa-message.js +138 -66
- package/lib/Utils/event-buffer.d.ts +6 -8
- package/lib/Utils/event-buffer.js +81 -43
- package/lib/Utils/generics.d.ts +27 -27
- package/lib/Utils/generics.js +128 -133
- package/lib/Utils/history.d.ts +9 -5
- package/lib/Utils/history.js +17 -23
- package/lib/Utils/index.d.ts +2 -0
- package/lib/Utils/index.js +2 -0
- package/lib/Utils/lidToJid-test.d.ts +11 -0
- package/lib/Utils/lidToJid-test.js +27 -0
- package/lib/Utils/link-preview.d.ts +4 -4
- package/lib/Utils/link-preview.js +40 -12
- package/lib/Utils/logger.d.ts +11 -3
- package/lib/Utils/lt-hash.d.ts +8 -8
- package/lib/Utils/lt-hash.js +23 -24
- package/lib/Utils/make-mutex.d.ts +2 -2
- package/lib/Utils/make-mutex.js +3 -2
- package/lib/Utils/message-retry-manager.d.ts +81 -0
- package/lib/Utils/message-retry-manager.js +152 -0
- package/lib/Utils/messages-media.d.ts +37 -41
- package/lib/Utils/messages-media.js +252 -368
- package/lib/Utils/messages.d.ts +13 -15
- package/lib/Utils/messages.js +274 -261
- package/lib/Utils/noise-handler.d.ts +13 -15
- package/lib/Utils/noise-handler.js +20 -26
- package/lib/Utils/process-message.d.ts +9 -8
- package/lib/Utils/process-message.js +157 -93
- package/lib/Utils/signal.d.ts +6 -5
- package/lib/Utils/signal.js +37 -29
- package/lib/Utils/use-multi-file-auth-state.d.ts +1 -2
- package/lib/Utils/use-multi-file-auth-state.js +12 -7
- package/lib/Utils/validate-connection.d.ts +5 -6
- package/lib/Utils/validate-connection.js +39 -97
- package/lib/WABinary/constants.d.ts +24 -27
- package/lib/WABinary/constants.js +1276 -13
- package/lib/WABinary/decode.d.ts +3 -4
- package/lib/WABinary/decode.js +28 -14
- package/lib/WABinary/encode.d.ts +1 -2
- package/lib/WABinary/encode.js +134 -147
- package/lib/WABinary/generic-utils.d.ts +4 -7
- package/lib/WABinary/generic-utils.js +40 -125
- package/lib/WABinary/jid-utils.d.ts +13 -8
- package/lib/WABinary/jid-utils.js +27 -16
- package/lib/WAM/BinaryInfo.d.ts +2 -11
- package/lib/WAM/constants.d.ts +3 -2
- package/lib/WAM/constants.js +2252 -2359
- package/lib/WAM/encode.d.ts +1 -2
- package/lib/WAM/encode.js +8 -11
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +3 -4
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +5 -5
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +5 -5
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +5 -6
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +2 -2
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +1 -1
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +4 -3
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +11 -3
- package/lib/WAUSync/USyncQuery.d.ts +2 -2
- package/lib/WAUSync/USyncQuery.js +19 -15
- package/lib/WAUSync/USyncUser.d.ts +5 -5
- package/lib/WAUSync/index.d.ts +1 -1
- package/lib/WAUSync/index.js +1 -1
- package/package.json +102 -102
- package/lib/Defaults/baileys-version.json +0 -3
- package/lib/Defaults/phonenumber-mcc.json +0 -223
- package/lib/Signal/Group/queue-job.d.ts +0 -1
- package/lib/Signal/Group/queue-job.js +0 -57
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -13
- package/lib/Socket/Client/mobile-socket-client.js +0 -65
- package/lib/Socket/hbmods.d.ts +0 -253
- package/lib/Socket/hbmods.js +0 -1
- package/lib/Socket/registration.d.ts +0 -267
- package/lib/Socket/registration.js +0 -166
- package/lib/Socket/usync.d.ts +0 -36
- package/lib/Socket/usync.js +0 -70
- /package/lib/Socket/Client/{abstract-socket-client.js → types.js} +0 -0
|
@@ -1,51 +1,55 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import { Boom } from '@hapi/boom';
|
|
3
|
-
import { proto } from '../../WAProto';
|
|
4
|
-
import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
|
|
5
|
-
import {
|
|
2
|
+
import { proto } from '../../WAProto/index.js';
|
|
3
|
+
import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
|
|
4
|
+
import { MessageRetryManager } from '../Utils';
|
|
5
|
+
import { type BinaryNode, type JidWithDevice } from '../WABinary';
|
|
6
|
+
import { USyncQuery } from '../WAUSync';
|
|
6
7
|
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
7
|
-
getPrivacyTokens: (jids: string[]) => Promise<
|
|
8
|
+
getPrivacyTokens: (jids: string[]) => Promise<any>;
|
|
8
9
|
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
|
9
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId, participant, additionalAttributes, additionalNodes, useUserDevicesCache,
|
|
10
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
|
|
10
11
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
11
12
|
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
12
13
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
13
14
|
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
|
|
14
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>;
|
|
15
|
-
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
|
|
16
|
-
nodes: BinaryNode[];
|
|
17
|
-
shouldIncludeDeviceIdentity: boolean;
|
|
18
|
-
}>;
|
|
19
15
|
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
20
16
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
21
17
|
[_: string]: string;
|
|
22
18
|
}>;
|
|
23
19
|
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
24
|
-
|
|
20
|
+
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
|
|
21
|
+
nodes: BinaryNode[];
|
|
22
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
23
|
+
}>;
|
|
24
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
|
|
25
|
+
wireJid: string;
|
|
26
|
+
})[]>;
|
|
27
|
+
messageRetryManager: MessageRetryManager | null;
|
|
25
28
|
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
|
26
29
|
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
|
30
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
31
|
+
newsletterUpdate: (jid: string, updates: import("../Types").NewsletterUpdate) => Promise<unknown>;
|
|
32
|
+
newsletterSubscribers: (jid: string) => Promise<{
|
|
33
|
+
subscribers: number;
|
|
34
|
+
}>;
|
|
35
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types").NewsletterMetadata | null>;
|
|
36
|
+
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
37
|
+
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
38
|
+
newsletterMute: (jid: string) => Promise<unknown>;
|
|
39
|
+
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
40
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
41
|
+
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
42
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<unknown>;
|
|
43
|
+
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
44
|
+
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
45
|
+
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
27
46
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
28
47
|
duration: string;
|
|
29
|
-
}>;
|
|
30
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
|
|
31
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
|
32
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>;
|
|
33
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
|
34
|
-
newsletterRemovePicture: (jid: string) => Promise<void>;
|
|
35
|
-
newsletterUnfollow: (jid: string) => Promise<void>;
|
|
36
|
-
newsletterFollow: (jid: string) => Promise<void>;
|
|
37
|
-
newsletterUnmute: (jid: string) => Promise<void>;
|
|
38
|
-
newsletterMute: (jid: string) => Promise<void>;
|
|
39
|
-
newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
|
|
40
|
-
newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
41
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
|
|
48
|
+
} | null>;
|
|
42
49
|
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
43
|
-
newsletterChangeOwner: (jid: string,
|
|
44
|
-
newsletterDemote: (jid: string,
|
|
50
|
+
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
51
|
+
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
45
52
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
46
|
-
newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
|
|
47
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
48
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
49
53
|
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
50
54
|
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
|
|
51
55
|
groupLeave: (id: string) => Promise<void>;
|
|
@@ -53,7 +57,7 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
53
57
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
54
58
|
[key: string]: string;
|
|
55
59
|
}[]>;
|
|
56
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "
|
|
60
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
57
61
|
status: string;
|
|
58
62
|
jid: string;
|
|
59
63
|
}[]>;
|
|
@@ -62,88 +66,103 @@ export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
|
62
66
|
jid: string;
|
|
63
67
|
content: BinaryNode;
|
|
64
68
|
}[]>;
|
|
65
|
-
groupUpdateDescription: (jid: string, description?: string
|
|
69
|
+
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
66
70
|
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
67
71
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
68
72
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
69
|
-
|
|
73
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
74
|
+
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
70
75
|
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
71
76
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
72
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "
|
|
73
|
-
groupMemberAddMode: (jid: string, mode: "
|
|
77
|
+
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
78
|
+
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
74
79
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
75
80
|
groupFetchAllParticipating: () => Promise<{
|
|
76
81
|
[_: string]: import("../Types").GroupMetadata;
|
|
77
82
|
}>;
|
|
83
|
+
createCallLink: (type: "audio" | "video", event?: {
|
|
84
|
+
startTime: number;
|
|
85
|
+
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
86
|
+
getBotListV2: () => Promise<import("../Types").BotListInfo[]>;
|
|
78
87
|
processingMutex: {
|
|
79
|
-
mutex<T>(code: () => T |
|
|
88
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
80
89
|
};
|
|
81
|
-
upsertMessage: (msg:
|
|
90
|
+
upsertMessage: (msg: import("../Types").WAMessage, type: import("../Types").MessageUpsertType) => Promise<void>;
|
|
82
91
|
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
|
83
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string
|
|
84
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer
|
|
85
|
-
profilePictureUrl: (jid: string, type?: "
|
|
86
|
-
onWhatsApp: (...jids: string[]) => Promise<{
|
|
87
|
-
jid: string;
|
|
88
|
-
exists: unknown;
|
|
89
|
-
lid: unknown;
|
|
90
|
-
}[] | undefined>;
|
|
92
|
+
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string) => Promise<void>;
|
|
93
|
+
presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>;
|
|
94
|
+
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
91
95
|
fetchBlocklist: () => Promise<string[]>;
|
|
92
|
-
fetchStatus: (
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
96
|
+
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
|
|
97
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>;
|
|
98
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload, dimensions?: {
|
|
99
|
+
width: number;
|
|
100
|
+
height: number;
|
|
101
|
+
}) => Promise<void>;
|
|
97
102
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
98
103
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
99
104
|
updateProfileName: (name: string) => Promise<void>;
|
|
100
105
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
106
|
+
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
107
|
+
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>;
|
|
108
|
+
updateMessagesPrivacy: (value: import("../Types").WAPrivacyMessagesValue) => Promise<void>;
|
|
101
109
|
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
102
110
|
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
103
111
|
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
104
112
|
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
105
113
|
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
106
|
-
updateGroupsAddPrivacy: (value: import("../Types").
|
|
114
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>;
|
|
107
115
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
108
|
-
getBusinessProfile: (jid: string) => Promise<
|
|
109
|
-
resyncAppState: (collections: readonly ("
|
|
116
|
+
getBusinessProfile: (jid: string) => Promise<import("../Types").WABusinessProfile | void>;
|
|
117
|
+
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
110
118
|
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
111
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?:
|
|
119
|
+
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
120
|
+
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
121
|
+
removeContact: (jid: string) => Promise<void>;
|
|
122
|
+
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
112
123
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
113
124
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
114
125
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
115
126
|
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
116
127
|
star: (jid: string, messages: {
|
|
117
128
|
id: string;
|
|
118
|
-
fromMe?: boolean
|
|
129
|
+
fromMe?: boolean;
|
|
119
130
|
}[], star: boolean) => Promise<void>;
|
|
131
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
132
|
+
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
120
133
|
type: "md";
|
|
121
|
-
ws:
|
|
134
|
+
ws: import("./Client/websocket.js").WebSocketClient;
|
|
122
135
|
ev: import("../Types").BaileysEventEmitter & {
|
|
123
136
|
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
124
137
|
buffer(): void;
|
|
125
|
-
createBufferedFunction<A extends any[],
|
|
126
|
-
flush(
|
|
138
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
139
|
+
flush(): boolean;
|
|
127
140
|
isBuffering(): boolean;
|
|
128
141
|
};
|
|
129
142
|
authState: {
|
|
130
143
|
creds: import("../Types").AuthenticationCreds;
|
|
131
144
|
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
132
145
|
};
|
|
133
|
-
signalRepository: import("../Types").
|
|
146
|
+
signalRepository: import("../Types").SignalRepositoryWithLIDStore;
|
|
134
147
|
user: import("../Types").Contact | undefined;
|
|
135
148
|
generateMessageTag: () => string;
|
|
136
|
-
query: (node: BinaryNode, timeoutMs?: number
|
|
137
|
-
waitForMessage: <
|
|
149
|
+
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
150
|
+
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
138
151
|
waitForSocketOpen: () => Promise<void>;
|
|
139
152
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
140
153
|
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
141
|
-
logout: (msg?: string
|
|
154
|
+
logout: (msg?: string) => Promise<void>;
|
|
142
155
|
end: (error: Error | undefined) => void;
|
|
143
|
-
onUnexpectedError: (err: Error | Boom
|
|
144
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
156
|
+
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
157
|
+
uploadPreKeys: (count?: number, retryCount?: number) => Promise<void>;
|
|
145
158
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
146
|
-
requestPairingCode: (phoneNumber: string) => Promise<string>;
|
|
147
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined
|
|
148
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<
|
|
159
|
+
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
160
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
161
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
162
|
+
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>;
|
|
163
|
+
onWhatsApp: (...jids: string[]) => Promise<{
|
|
164
|
+
jid: string;
|
|
165
|
+
exists: boolean;
|
|
166
|
+
lid: string;
|
|
167
|
+
}[] | undefined>;
|
|
149
168
|
};
|