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