@pontalabs/baileys 1.0.6 → 1.0.7
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/README.md +839 -267
- package/WAProto/GenerateStatics.sh +4 -3
- package/WAProto/WAProto.proto +511 -1215
- package/WAProto/index.d.ts +55 -14017
- package/WAProto/index.js +29 -97689
- package/lib/Defaults/index.d.ts +74 -72
- package/lib/Defaults/index.js +108 -94
- package/lib/Signal/Group/ciphertext-message.d.ts +7 -8
- package/lib/Signal/Group/ciphertext-message.js +16 -9
- package/lib/Signal/Group/group-session-builder.d.ts +13 -11
- package/lib/Signal/Group/group-session-builder.js +61 -19
- package/lib/Signal/Group/group_cipher.d.ts +16 -14
- package/lib/Signal/Group/group_cipher.js +70 -41
- package/lib/Signal/Group/index.d.ts +11 -12
- package/lib/Signal/Group/index.js +61 -12
- package/lib/Signal/Group/keyhelper.d.ts +14 -9
- package/lib/Signal/Group/keyhelper.js +58 -10
- package/lib/Signal/Group/sender-chain-key.d.ts +13 -13
- package/lib/Signal/Group/sender-chain-key.js +34 -13
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +16 -16
- package/lib/Signal/Group/sender-key-distribution-message.js +36 -28
- package/lib/Signal/Group/sender-key-message.d.ts +18 -18
- package/lib/Signal/Group/sender-key-message.js +45 -38
- package/lib/Signal/Group/sender-key-name.d.ts +15 -14
- package/lib/Signal/Group/sender-key-name.js +31 -20
- package/lib/Signal/Group/sender-key-record.d.ts +25 -24
- package/lib/Signal/Group/sender-key-record.js +35 -18
- package/lib/Signal/Group/sender-key-state.d.ts +34 -29
- package/lib/Signal/Group/sender-key-state.js +100 -37
- package/lib/Signal/Group/sender-message-key.d.ts +10 -11
- package/lib/Signal/Group/sender-message-key.js +22 -15
- package/lib/Signal/libsignal.d.ts +8 -5
- package/lib/Signal/libsignal.js +142 -288
- package/lib/Signal/lid-mapping.d.ts +28 -23
- package/lib/Signal/lid-mapping.js +184 -277
- package/lib/Socket/Client/index.d.ts +2 -3
- package/lib/Socket/Client/index.js +22 -3
- package/lib/Socket/Client/types.d.ts +15 -15
- package/lib/Socket/Client/types.js +15 -8
- package/lib/Socket/Client/websocket.d.ts +12 -12
- package/lib/Socket/Client/websocket.js +37 -29
- package/lib/Socket/business.d.ts +178 -208
- package/lib/Socket/business.js +127 -91
- package/lib/Socket/chats.d.ts +93 -120
- package/lib/Socket/chats.js +652 -727
- package/lib/Socket/community.js +10 -2
- package/lib/Socket/groups.d.ts +111 -143
- package/lib/Socket/groups.js +186 -165
- package/lib/Socket/index.d.ts +183 -252
- package/lib/Socket/index.js +18 -38
- package/lib/Socket/messages-recv.d.ts +167 -196
- package/lib/Socket/messages-recv.js +1567 -1443
- package/lib/Socket/messages-send.d.ts +158 -192
- package/lib/Socket/messages-send.js +1208 -1102
- package/lib/Socket/newsletter.d.ts +138 -163
- package/lib/Socket/newsletter.js +249 -153
- package/lib/Socket/socket.d.ts +36 -50
- package/lib/Socket/socket.js +820 -749
- package/lib/Store/index.d.ts +4 -4
- package/lib/Store/index.js +24 -4
- package/lib/Store/make-in-memory-store.d.ts +104 -44
- package/lib/Store/make-in-memory-store.js +213 -199
- package/lib/Store/make-ordered-dictionary.d.ts +12 -13
- package/lib/Store/make-ordered-dictionary.js +45 -38
- package/lib/Store/object-repository.d.ts +10 -11
- package/lib/Store/object-repository.js +16 -9
- package/lib/Types/Auth.d.ts +97 -93
- package/lib/Types/Auth.js +3 -2
- package/lib/Types/Bussines.js +3 -2
- package/lib/Types/Call.d.ts +13 -14
- package/lib/Types/Call.js +3 -2
- package/lib/Types/Chat.d.ts +97 -78
- package/lib/Types/Chat.js +9 -8
- package/lib/Types/Contact.d.ts +9 -12
- package/lib/Types/Contact.js +3 -2
- package/lib/Types/Events.d.ts +176 -206
- package/lib/Types/Events.js +3 -2
- package/lib/Types/GroupMetadata.d.ts +48 -53
- package/lib/Types/GroupMetadata.js +3 -2
- package/lib/Types/Label.d.ts +14 -13
- package/lib/Types/Label.js +30 -24
- package/lib/Types/LabelAssociation.d.ts +20 -15
- package/lib/Types/LabelAssociation.js +12 -6
- package/lib/Types/Message.d.ts +412 -248
- package/lib/Types/Message.js +19 -17
- package/lib/Types/Product.d.ts +71 -58
- package/lib/Types/Product.js +3 -2
- package/lib/Types/Signal.d.ts +82 -71
- package/lib/Types/Signal.js +3 -2
- package/lib/Types/Socket.d.ts +81 -76
- package/lib/Types/Socket.js +3 -3
- package/lib/Types/State.d.ts +19 -75
- package/lib/Types/State.js +14 -56
- package/lib/Types/USync.d.ts +8 -8
- package/lib/Types/USync.js +3 -2
- package/lib/Types/index.d.ts +62 -47
- package/lib/Types/index.js +50 -26
- package/lib/Utils/auth-utils.d.ts +10 -13
- package/lib/Utils/auth-utils.js +472 -213
- package/lib/Utils/business.d.ts +20 -14
- package/lib/Utils/business.js +134 -110
- package/lib/Utils/chat-utils.d.ts +70 -88
- package/lib/Utils/chat-utils.js +403 -466
- package/lib/Utils/crypto.d.ts +46 -27
- package/lib/Utils/crypto.js +188 -117
- package/lib/Utils/decode-wa-message.d.ts +45 -58
- package/lib/Utils/decode-wa-message.js +311 -212
- package/lib/Utils/event-buffer.d.ts +17 -14
- package/lib/Utils/event-buffer.js +296 -321
- package/lib/Utils/generics.d.ts +92 -66
- package/lib/Utils/generics.js +436 -270
- package/lib/Utils/history.d.ts +23 -24
- package/lib/Utils/history.js +76 -106
- package/lib/Utils/index.d.ts +21 -24
- package/lib/Utils/index.js +41 -24
- package/lib/Utils/link-preview.d.ts +14 -12
- package/lib/Utils/link-preview.js +75 -40
- package/lib/Utils/logger.d.ts +11 -10
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +14 -8
- package/lib/Utils/lt-hash.js +53 -3
- package/lib/Utils/make-mutex.d.ts +7 -7
- package/lib/Utils/make-mutex.js +44 -28
- package/lib/Utils/message-retry-manager.d.ts +88 -115
- package/lib/Utils/message-retry-manager.js +160 -265
- package/lib/Utils/messages-media.d.ts +107 -105
- package/lib/Utils/messages-media.js +619 -548
- package/lib/Utils/messages.d.ts +66 -52
- package/lib/Utils/messages.js +1558 -1730
- package/lib/Utils/noise-handler.d.ts +18 -18
- package/lib/Utils/noise-handler.js +130 -176
- package/lib/Utils/process-message.d.ts +32 -43
- package/lib/Utils/process-message.js +282 -484
- package/lib/Utils/rich-message-utils.js +724 -1220
- package/lib/Utils/signal.d.ts +32 -37
- package/lib/Utils/signal.js +105 -140
- package/lib/Utils/use-multi-file-auth-state.d.ts +5 -5
- package/lib/Utils/use-multi-file-auth-state.js +120 -70
- package/lib/Utils/use-single-file-auth-state.d.ts +13 -11
- package/lib/Utils/use-single-file-auth-state.js +66 -92
- package/lib/Utils/validate-connection.d.ts +13 -11
- package/lib/Utils/validate-connection.js +113 -128
- package/lib/WABinary/constants.d.ts +27 -25
- package/lib/WABinary/constants.js +1292 -1451
- package/lib/WABinary/decode.d.ts +9 -7
- package/lib/WABinary/decode.js +189 -163
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +155 -110
- package/lib/WABinary/generic-utils.d.ts +27 -14
- package/lib/WABinary/generic-utils.js +105 -177
- package/lib/WABinary/index.d.ts +5 -6
- package/lib/WABinary/index.js +25 -6
- package/lib/WABinary/jid-utils.d.ts +54 -41
- package/lib/WABinary/jid-utils.js +152 -83
- package/lib/WABinary/types.d.ts +13 -10
- package/lib/WABinary/types.js +3 -2
- package/lib/WAM/BinaryInfo.d.ts +15 -8
- package/lib/WAM/BinaryInfo.js +14 -7
- package/lib/WAM/constants.d.ts +37 -30
- package/lib/WAM/constants.js +11983 -19465
- package/lib/WAM/encode.d.ts +3 -3
- package/lib/WAM/encode.js +109 -95
- package/lib/WAM/index.d.ts +3 -4
- package/lib/WAM/index.js +23 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -9
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +21 -37
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -19
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +26 -18
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -11
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +20 -12
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -11
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +24 -16
- package/lib/WAUSync/Protocols/index.d.ts +6 -6
- package/lib/WAUSync/Protocols/index.js +26 -6
- package/lib/WAUSync/USyncQuery.d.ts +28 -27
- package/lib/WAUSync/USyncQuery.js +62 -68
- package/lib/WAUSync/USyncUser.d.ts +10 -15
- package/lib/WAUSync/USyncUser.js +19 -20
- package/lib/WAUSync/index.d.ts +3 -4
- package/lib/WAUSync/index.js +23 -4
- package/lib/index.d.ts +12 -11
- package/lib/index.js +39 -12
- package/package.json +42 -86
- package/engine-requirements.js +0 -10
|
@@ -1,199 +1,165 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
import { USyncQuery } from '../WAUSync/index.js';
|
|
1
|
+
import { Boom } from '@hapi/boom'
|
|
2
|
+
import { proto } from '../../WAProto'
|
|
3
|
+
import { AnyMessageContent, MediaConnInfo, ContactAction, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types'
|
|
4
|
+
import { BinaryNode, JidWithDevice } from '../WABinary'
|
|
5
|
+
import { USyncQuery } from '../WAUSync'
|
|
6
|
+
|
|
8
7
|
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
18
|
-
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
19
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
|
|
20
|
-
getMediaHost: () => string;
|
|
21
|
-
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
8
|
+
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
|
|
9
|
+
assertSessions: (jids: string[], force: boolean) => Promise<boolean>
|
|
10
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>
|
|
11
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>
|
|
12
|
+
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>
|
|
13
|
+
readMessages: (keys: WAMessageKey[]) => Promise<void>
|
|
14
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>
|
|
15
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction
|
|
22
16
|
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
23
|
-
[_: string]: string
|
|
24
|
-
}
|
|
25
|
-
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string
|
|
26
|
-
createParticipantNodes: (
|
|
27
|
-
nodes: BinaryNode[]
|
|
28
|
-
shouldIncludeDeviceIdentity: boolean
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
37
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
38
|
-
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
39
|
-
newsletterSubscribers: (jid: string) => Promise<{
|
|
40
|
-
subscribers: number;
|
|
41
|
-
}>;
|
|
42
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
43
|
-
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
44
|
-
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
45
|
-
newsletterMute: (jid: string) => Promise<unknown>;
|
|
46
|
-
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
47
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
48
|
-
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
49
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
50
|
-
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
51
|
-
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
52
|
-
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
17
|
+
[_: string]: string
|
|
18
|
+
}>
|
|
19
|
+
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>
|
|
20
|
+
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
|
|
21
|
+
nodes: BinaryNode[]
|
|
22
|
+
shouldIncludeDeviceIdentity: boolean
|
|
23
|
+
}>
|
|
24
|
+
profilePictureUrl: (jid: string) => Promise<string>
|
|
25
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>
|
|
26
|
+
getEphemeralGroup: (jid: string) => Promise<number>
|
|
27
|
+
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>
|
|
28
|
+
sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
|
|
29
|
+
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>
|
|
53
30
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
54
|
-
duration: string
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
31
|
+
duration: string
|
|
32
|
+
}>
|
|
33
|
+
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
|
|
34
|
+
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
35
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
36
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
37
|
+
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
38
|
+
newsletterUnfollow: (jid: string) => Promise<void>
|
|
39
|
+
newsletterFollow: (jid: string) => Promise<void>
|
|
40
|
+
newsletterUnmute: (jid: string) => Promise<void>
|
|
41
|
+
newsletterMute: (jid: string) => Promise<void>
|
|
42
|
+
newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
|
|
43
|
+
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
44
|
+
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
45
|
+
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
|
|
46
|
+
newsletterFetchAllParticipating: () => Promise<{
|
|
47
|
+
[_: string]: import("../Types").NewsletterMetadata
|
|
48
|
+
}>
|
|
49
|
+
newsletterAdminCount: (jid: string) => Promise<number>
|
|
50
|
+
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
51
|
+
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
52
|
+
newsletterDelete: (jid: string) => Promise<void>
|
|
53
|
+
newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
|
|
54
|
+
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
55
|
+
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
56
|
+
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
57
|
+
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
58
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
59
|
+
groupLeave: (id: string) => Promise<void>
|
|
60
|
+
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
64
61
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
65
|
-
[key: string]: string
|
|
66
|
-
}[]
|
|
67
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "
|
|
68
|
-
status: string
|
|
69
|
-
jid: string
|
|
70
|
-
}[]
|
|
71
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types
|
|
72
|
-
status: string
|
|
73
|
-
jid: string
|
|
74
|
-
content: BinaryNode
|
|
75
|
-
}[]
|
|
76
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void
|
|
77
|
-
groupInviteCode: (jid: string) => Promise<string | undefined
|
|
78
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined
|
|
79
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined
|
|
80
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean
|
|
81
|
-
groupAcceptInviteV4: (key: string |
|
|
82
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types
|
|
83
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void
|
|
84
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "
|
|
85
|
-
groupMemberAddMode: (jid: string, mode: "
|
|
86
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void
|
|
62
|
+
[key: string]: string
|
|
63
|
+
}[]>
|
|
64
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
65
|
+
status: string
|
|
66
|
+
jid: string
|
|
67
|
+
}[]>
|
|
68
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
69
|
+
status: string
|
|
70
|
+
jid: string
|
|
71
|
+
content: BinaryNode
|
|
72
|
+
}[]>
|
|
73
|
+
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
74
|
+
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
75
|
+
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
76
|
+
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
77
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
78
|
+
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>
|
|
79
|
+
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
80
|
+
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
81
|
+
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
82
|
+
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
83
|
+
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
87
84
|
groupFetchAllParticipating: () => Promise<{
|
|
88
|
-
[_: string]: import("../Types
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
createCallLink: (type:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
getBotListV2: () => Promise<
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
131
|
-
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
132
|
-
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
133
|
-
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
134
|
-
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
135
|
-
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
136
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
137
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
138
|
-
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
139
|
-
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
140
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
141
|
-
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
142
|
-
removeContact: (jid: string) => Promise<void>;
|
|
143
|
-
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
144
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
145
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
146
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
147
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
148
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
85
|
+
[_: string]: import("../Types").GroupMetadata
|
|
86
|
+
}>
|
|
87
|
+
processingMutex: {
|
|
88
|
+
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
89
|
+
}
|
|
90
|
+
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
91
|
+
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
92
|
+
createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
|
|
93
|
+
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
94
|
+
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
95
|
+
getBotListV2: () => Promise<BotListInfo[]>
|
|
96
|
+
getLidUser: (jid: string) => Promise<{
|
|
97
|
+
lid: string
|
|
98
|
+
id: string
|
|
99
|
+
}[] | undefined>
|
|
100
|
+
fetchBlocklist: () => Promise<string[]>
|
|
101
|
+
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>
|
|
102
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>
|
|
103
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
104
|
+
removeProfilePicture: (jid: string) => Promise<void>
|
|
105
|
+
updateProfileStatus: (status: string) => Promise<void>
|
|
106
|
+
updateProfileName: (name: string) => Promise<void>
|
|
107
|
+
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
108
|
+
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
109
|
+
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
110
|
+
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
111
|
+
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
112
|
+
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
113
|
+
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
114
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
115
|
+
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
116
|
+
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
117
|
+
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
118
|
+
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
119
|
+
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
120
|
+
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
121
|
+
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
122
|
+
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
123
|
+
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
124
|
+
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
125
|
+
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
126
|
+
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
149
127
|
star: (jid: string, messages: {
|
|
150
|
-
id: string
|
|
151
|
-
fromMe?: boolean
|
|
152
|
-
}[], star: boolean) => Promise<void
|
|
153
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines
|
|
154
|
-
removeQuickReply: (timestamp: string) => Promise<void
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
128
|
+
id: string
|
|
129
|
+
fromMe?: boolean | undefined
|
|
130
|
+
}[], star: boolean) => Promise<void>
|
|
131
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
132
|
+
removeQuickReply: (timestamp: string) => Promise<void>
|
|
133
|
+
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
134
|
+
removeContact: (jid: string) => Promise<void>
|
|
135
|
+
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>
|
|
136
|
+
type: "md"
|
|
137
|
+
ws: import("./Client").WebSocketClient
|
|
138
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
139
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
140
|
+
buffer(): void
|
|
141
|
+
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
142
|
+
flush(force?: boolean | undefined): boolean
|
|
143
|
+
isBuffering(): boolean
|
|
144
|
+
}
|
|
165
145
|
authState: {
|
|
166
|
-
creds: import("../Types
|
|
167
|
-
keys: import("../Types
|
|
168
|
-
}
|
|
169
|
-
signalRepository: import("../Types
|
|
170
|
-
user: import("../Types
|
|
171
|
-
generateMessageTag: () => string
|
|
172
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<
|
|
173
|
-
waitForMessage: <
|
|
174
|
-
waitForSocketOpen: () => Promise<void
|
|
175
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void
|
|
176
|
-
sendNode: (frame: BinaryNode) => Promise<void
|
|
177
|
-
logout: (msg?: string) => Promise<void
|
|
178
|
-
end: (error: Error | undefined) =>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
187
|
-
sendUnifiedSession: () => Promise<void>;
|
|
188
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
189
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
190
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
191
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
|
|
192
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
193
|
-
jid: string;
|
|
194
|
-
exists: boolean;
|
|
195
|
-
}[] | undefined>;
|
|
196
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
197
|
-
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
198
|
-
};
|
|
199
|
-
//# sourceMappingURL=messages-send.d.ts.map
|
|
146
|
+
creds: import("../Types").AuthenticationCreds
|
|
147
|
+
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
148
|
+
}
|
|
149
|
+
signalRepository: import("../Types").SignalRepository
|
|
150
|
+
user: import("../Types").Contact | undefined
|
|
151
|
+
generateMessageTag: () => string
|
|
152
|
+
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
153
|
+
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
154
|
+
waitForSocketOpen: () => Promise<void>
|
|
155
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
156
|
+
sendNode: (frame: BinaryNode) => Promise<void>
|
|
157
|
+
logout: (msg?: string | undefined) => Promise<void>
|
|
158
|
+
end: (error: Error | undefined) => void
|
|
159
|
+
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void
|
|
160
|
+
uploadPreKeys: (count?: number) => Promise<void>
|
|
161
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
162
|
+
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
163
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
164
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
165
|
+
}
|