@hansaka02/baileys 7.3.2 → 7.3.4
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/README.md +247 -203
- package/lib/Defaults/connection.js +51 -0
- package/lib/Defaults/constants.js +62 -0
- package/lib/Defaults/history.js +17 -0
- package/lib/Defaults/index.js +36 -142
- package/lib/Defaults/media.js +48 -0
- package/lib/Defaults/prefix.js +18 -0
- package/lib/Signal/Group/group-session-builder.js +10 -42
- package/lib/Signal/Group/group_cipher.js +9 -6
- package/lib/Signal/Group/index.js +39 -53
- package/lib/Signal/Group/keyhelper.js +8 -41
- package/lib/Signal/Group/sender-chain-key.js +4 -4
- package/lib/Signal/Group/sender-key-distribution-message.js +5 -5
- package/lib/Signal/Group/sender-key-message.js +12 -8
- package/lib/Signal/Group/sender-key-record.js +7 -7
- package/lib/Signal/Group/sender-key-state.js +4 -4
- package/lib/Signal/Group/sender-message-key.js +2 -2
- package/lib/Signal/libsignal.js +45 -69
- package/lib/Signal/lid-mapping.js +15 -11
- package/lib/Socket/Client/types.js +2 -2
- package/lib/Socket/Client/websocket.js +16 -14
- package/lib/Socket/business.js +41 -32
- package/lib/Socket/chats.js +123 -98
- package/lib/Socket/community.js +50 -40
- package/lib/Socket/groups.js +59 -47
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.js +219 -172
- package/lib/Socket/messages-send.js +187 -143
- package/lib/Socket/newsletter.js +61 -47
- package/lib/Socket/socket.js +133 -90
- package/lib/Socket/usync.js +6 -6
- package/lib/Store/index.js +27 -11
- package/lib/Store/make-cache-manager-store.js +14 -15
- package/lib/Store/make-in-memory-store.js +28 -24
- package/lib/Types/LabelAssociation.js +2 -2
- package/lib/Types/Message.js +6 -6
- package/lib/Types/MexUpdates.js +5 -5
- package/lib/Types/State.js +4 -4
- package/lib/Types/index.js +28 -12
- package/lib/Utils/auth-utils.js +28 -26
- package/lib/Utils/baileys-event-stream.js +68 -69
- package/lib/Utils/business.js +63 -53
- package/lib/Utils/chat-utils.js +81 -71
- package/lib/Utils/crypto.js +25 -45
- package/lib/Utils/decode-wa-message.js +319 -311
- package/lib/Utils/event-buffer.js +21 -22
- package/lib/Utils/generics.js +65 -82
- package/lib/Utils/history.js +21 -21
- package/lib/Utils/index.js +27 -13
- package/lib/Utils/link-preview.js +7 -30
- package/lib/Utils/logger.js +5 -5
- package/lib/Utils/lt-hash.js +3 -3
- package/lib/Utils/message-retry-manager.js +4 -4
- package/lib/Utils/messages-media.js +104 -109
- package/lib/Utils/messages.js +203 -171
- package/lib/Utils/noise-handler.js +28 -19
- package/lib/Utils/process-message.js +111 -96
- package/lib/Utils/signal.js +36 -25
- package/lib/Utils/use-multi-file-auth-state.js +18 -22
- package/lib/Utils/validate-connection.js +52 -45
- package/lib/WABinary/decode.js +6 -32
- package/lib/WABinary/encode.js +3 -29
- package/lib/WABinary/generic-utils.js +4 -4
- package/lib/WABinary/index.js +27 -11
- package/lib/WAM/encode.js +16 -8
- package/lib/WAM/index.js +27 -11
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +20 -16
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +7 -4
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +2 -2
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -2
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +2 -2
- package/lib/WAUSync/Protocols/index.js +27 -11
- package/lib/WAUSync/USyncQuery.js +17 -10
- package/lib/WAUSync/index.js +27 -11
- package/lib/index.js +60 -31
- package/package.json +8 -14
- package/WAProto/AICommon/AICommon.d.ts +0 -11702
- package/WAProto/Adv/Adv.d.ts +0 -643
- package/WAProto/BotMetadata/BotMetadata.d.ts +0 -5654
- package/WAProto/Cert/Cert.d.ts +0 -613
- package/WAProto/ChatLockSettings/ChatLockSettings.d.ts +0 -476
- package/WAProto/CompanionReg/CompanionReg.d.ts +0 -1361
- package/WAProto/DeviceCapabilities/DeviceCapabilities.d.ts +0 -577
- package/WAProto/E2E/E2E.d.ts +0 -41724
- package/WAProto/Ephemeral/Ephemeral.d.ts +0 -114
- package/WAProto/HistorySync/HistorySync.d.ts +0 -51700
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.d.ts +0 -229
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.d.ts +0 -583
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.d.ts +0 -42897
- package/WAProto/MmsRetry/MmsRetry.d.ts +0 -243
- package/WAProto/Protocol/Protocol.d.ts +0 -270
- package/WAProto/Reporting/Reporting.d.ts +0 -371
- package/WAProto/ServerSync/ServerSync.d.ts +0 -1285
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.d.ts +0 -1868
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.d.ts +0 -767
- package/WAProto/StatusAttributions/StatusAttributions.d.ts +0 -1027
- package/WAProto/SyncAction/SyncAction.d.ts +0 -11193
- package/WAProto/UserPassword/UserPassword.d.ts +0 -363
- package/WAProto/VnameCert/VnameCert.d.ts +0 -821
- package/WAProto/Wa6/Wa6.d.ts +0 -2128
- package/WAProto/Web/Web.d.ts +0 -46383
- package/WAProto/index.d.ts +0 -55
- package/lib/Defaults/index.d.ts +0 -77
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -9
- package/lib/Signal/Group/group-session-builder.d.ts +0 -17
- package/lib/Signal/Group/group_cipher.d.ts +0 -19
- package/lib/Signal/Group/index.d.ts +0 -11
- package/lib/Signal/Group/keyhelper.d.ts +0 -16
- package/lib/Signal/Group/sender-chain-key.d.ts +0 -14
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +0 -17
- package/lib/Signal/Group/sender-key-message.d.ts +0 -19
- package/lib/Signal/Group/sender-key-name.d.ts +0 -19
- package/lib/Signal/Group/sender-key-record.d.ts +0 -32
- package/lib/Signal/Group/sender-key-state.d.ts +0 -44
- package/lib/Signal/Group/sender-message-key.d.ts +0 -11
- package/lib/Signal/libsignal.d.ts +0 -8
- package/lib/Signal/lid-mapping.d.ts +0 -28
- package/lib/Socket/Client/index.d.ts +0 -2
- package/lib/Socket/Client/types.d.ts +0 -16
- package/lib/Socket/Client/websocket.d.ts +0 -13
- package/lib/Socket/business.d.ts +0 -187
- package/lib/Socket/chats.d.ts +0 -97
- package/lib/Socket/community.d.ts +0 -129
- package/lib/Socket/groups.d.ts +0 -129
- package/lib/Socket/index.d.ts +0 -191
- package/lib/Socket/messages-recv.d.ts +0 -174
- package/lib/Socket/messages-send.d.ts +0 -165
- package/lib/Socket/newsletter.d.ts +0 -145
- package/lib/Socket/socket.d.ts +0 -45
- package/lib/Socket/usync.d.ts +0 -37
- package/lib/Store/index.d.ts +0 -4
- package/lib/Store/make-cache-manager-store.d.ts +0 -14
- package/lib/Store/make-in-memory-store.d.ts +0 -123
- package/lib/Store/make-ordered-dictionary.d.ts +0 -12
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Types/Auth.d.ts +0 -121
- package/lib/Types/Bussiness.d.ts +0 -28
- package/lib/Types/Call.d.ts +0 -14
- package/lib/Types/Chat.d.ts +0 -143
- package/lib/Types/Contact.d.ts +0 -23
- package/lib/Types/Events.d.ts +0 -226
- package/lib/Types/GroupMetadata.d.ts +0 -66
- package/lib/Types/Label.d.ts +0 -48
- package/lib/Types/LabelAssociation.d.ts +0 -35
- package/lib/Types/Message.d.ts +0 -484
- package/lib/Types/MexUpdates.d.ts +0 -9
- package/lib/Types/Newsletter.d.ts +0 -109
- package/lib/Types/Product.d.ts +0 -92
- package/lib/Types/Signal.d.ts +0 -98
- package/lib/Types/Socket.d.ts +0 -141
- package/lib/Types/State.d.ts +0 -41
- package/lib/Types/USync.d.ts +0 -26
- package/lib/Types/index.d.ts +0 -80
- package/lib/Utils/auth-utils.d.ts +0 -21
- package/lib/Utils/baileys-event-stream.d.ts +0 -18
- package/lib/Utils/business.d.ts +0 -29
- package/lib/Utils/chat-utils.d.ts +0 -82
- package/lib/Utils/crypto.d.ts +0 -56
- package/lib/Utils/decode-wa-message.d.ts +0 -53
- package/lib/Utils/event-buffer.d.ts +0 -39
- package/lib/Utils/generics.d.ts +0 -117
- package/lib/Utils/history.d.ts +0 -23
- package/lib/Utils/index.d.ts +0 -20
- package/lib/Utils/link-preview.d.ts +0 -23
- package/lib/Utils/logger.d.ts +0 -13
- package/lib/Utils/lt-hash.d.ts +0 -14
- package/lib/Utils/make-mutex.d.ts +0 -9
- package/lib/Utils/message-retry-manager.d.ts +0 -88
- package/lib/Utils/messages-media.d.ts +0 -135
- package/lib/Utils/messages.d.ts +0 -105
- package/lib/Utils/noise-handler.d.ts +0 -20
- package/lib/Utils/process-message.d.ts +0 -49
- package/lib/Utils/signal.d.ts +0 -42
- package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
- package/lib/Utils/use-mongo-file-auth-state.js +0 -84
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
- package/lib/Utils/use-single-file-auth-state.js +0 -80
- package/lib/Utils/validate-connection.d.ts +0 -13
- package/lib/WABinary/constants.d.ts +0 -30
- package/lib/WABinary/decode.d.ts +0 -9
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/generic-utils.d.ts +0 -28
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/jid-utils.d.ts +0 -58
- package/lib/WABinary/types.d.ts +0 -22
- package/lib/WAM/BinaryInfo.d.ts +0 -16
- package/lib/WAM/constants.d.ts +0 -47
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/index.d.ts +0 -6
- package/lib/WAUSync/USyncQuery.d.ts +0 -31
- package/lib/WAUSync/USyncUser.d.ts +0 -12
- package/lib/WAUSync/index.d.ts +0 -3
- package/lib/index.d.ts +0 -13
package/lib/Socket/chats.d.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom'
|
|
2
|
-
import { proto } from '../../WAProto'
|
|
3
|
-
import { BotListInfo, ChatModification, ContactAction, MessageUpsertType, SocketConfig, WABusinessProfile, WAMediaUpload, WAPatchCreate, WAPresence, WAPrivacyCallValue, WAPrivacyGroupAddValue, WAPrivacyMessagesValue, WAPrivacyOnlineValue, WAPrivacyValue, WAReadReceiptsValue } from '../Types'
|
|
4
|
-
import { LabelActionBody } from '../Types/Label'
|
|
5
|
-
import { QuickReplyAction } from '../Types/Bussines'
|
|
6
|
-
import { BinaryNode } from '../WABinary'
|
|
7
|
-
import { USyncQuery } from '../WAUSync'
|
|
8
|
-
|
|
9
|
-
export declare const makeChatsSocket: (config: SocketConfig) => {
|
|
10
|
-
processingMutex: {
|
|
11
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
12
|
-
}
|
|
13
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
14
|
-
[_: string]: string
|
|
15
|
-
}>
|
|
16
|
-
upsertMessage: (msg: proto.IWebMessageInfo, type: MessageUpsertType) => Promise<void>
|
|
17
|
-
appPatch: (patchCreate: WAPatchCreate) => Promise<void>
|
|
18
|
-
createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
|
|
19
|
-
sendPresenceUpdate: (type: WAPresence, toJid?: string) => Promise<void>
|
|
20
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer) => Promise<void>
|
|
21
|
-
getBotListV2: () => Promise<BotListInfo[]>
|
|
22
|
-
getLidUser: (jid: string) => Promise<{
|
|
23
|
-
lid: string
|
|
24
|
-
id: string
|
|
25
|
-
}[] | undefined>
|
|
26
|
-
fetchBlocklist: () => Promise<string[]>
|
|
27
|
-
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>
|
|
28
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync").USyncQueryResultList[] | undefined>
|
|
29
|
-
updateProfilePicture: (jid: string, content: WAMediaUpload) => Promise<void>
|
|
30
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
31
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
32
|
-
updateProfileName: (name: string) => Promise<void>
|
|
33
|
-
updateBlockStatus: (jid: string, action: 'block' | 'unblock') => Promise<void>
|
|
34
|
-
updateCallPrivacy: (value: WAPrivacyCallValue) => Promise<void>
|
|
35
|
-
updateMessagesPrivacy: (value: WAPrivacyMessagesValue) => Promise<void>
|
|
36
|
-
updateLastSeenPrivacy: (value: WAPrivacyValue) => Promise<void>
|
|
37
|
-
updateOnlinePrivacy: (value: WAPrivacyOnlineValue) => Promise<void>
|
|
38
|
-
updateProfilePicturePrivacy: (value: WAPrivacyValue) => Promise<void>
|
|
39
|
-
updateStatusPrivacy: (value: WAPrivacyValue) => Promise<void>
|
|
40
|
-
updateReadReceiptsPrivacy: (value: WAReadReceiptsValue) => Promise<void>
|
|
41
|
-
updateGroupsAddPrivacy: (value: WAPrivacyGroupAddValue) => Promise<void>
|
|
42
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
43
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
44
|
-
getBusinessProfile: (jid: string) => Promise<WABusinessProfile | void>
|
|
45
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
46
|
-
chatModify: (mod: ChatModification, jid: string) => Promise<void>
|
|
47
|
-
cleanDirtyBits: (type: 'account_sync' | 'groups', fromTimestamp?: number | string) => Promise<void>
|
|
48
|
-
addLabel: (jid: string, labels: LabelActionBody) => Promise<void>
|
|
49
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
50
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
51
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
52
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
53
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
54
|
-
star: (jid: string, messages: {
|
|
55
|
-
id: string
|
|
56
|
-
fromMe?: boolean
|
|
57
|
-
}[], star: boolean) => Promise<void>
|
|
58
|
-
addOrEditQuickReply: (quickReply: QuickReplyAction) => Promise<void>
|
|
59
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
60
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
61
|
-
removeContact: (jid: string) => Promise<void>
|
|
62
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>
|
|
63
|
-
type: "md"
|
|
64
|
-
ws: import("./Client").WebSocketClient
|
|
65
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
66
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
67
|
-
buffer(): void
|
|
68
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
69
|
-
flush(force?: boolean | undefined): boolean
|
|
70
|
-
isBuffering(): boolean
|
|
71
|
-
}
|
|
72
|
-
authState: {
|
|
73
|
-
creds: import("../Types").AuthenticationCreds
|
|
74
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
75
|
-
}
|
|
76
|
-
signalRepository: import("../Types").SignalRepository
|
|
77
|
-
user: import("../Types").Contact | undefined
|
|
78
|
-
generateMessageTag: () => string
|
|
79
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
80
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
81
|
-
waitForSocketOpen: () => Promise<void>
|
|
82
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
83
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
84
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
85
|
-
end: (error: Error | undefined) => void
|
|
86
|
-
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void
|
|
87
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
88
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
89
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
90
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
91
|
-
/**
|
|
92
|
-
* modify a chat -- mark unread, read etc.
|
|
93
|
-
* lastMessages must be sorted in reverse chronologically
|
|
94
|
-
* requires the last messages till the last message received required for archive & unread
|
|
95
|
-
*/
|
|
96
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
97
|
-
}
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto'
|
|
2
|
-
import { GroupMetadata, ParticipantAction, SocketConfig, ContactAction } from '../Types'
|
|
3
|
-
import { BinaryNode } from '../WABinary'
|
|
4
|
-
|
|
5
|
-
export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
|
6
|
-
communityQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
7
|
-
communityMetadata: (jid: string) => Promise<GroupMetadata>
|
|
8
|
-
communityCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>
|
|
9
|
-
communityLeave: (id: string) => Promise<void>
|
|
10
|
-
communityUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
11
|
-
communityRequestParticipantsList: (jid: string) => Promise<{
|
|
12
|
-
[key: string]: string
|
|
13
|
-
}[]>
|
|
14
|
-
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: 'approve' | 'reject') => Promise<{
|
|
15
|
-
status: string
|
|
16
|
-
jid: string
|
|
17
|
-
}[]>
|
|
18
|
-
communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
|
19
|
-
status: string
|
|
20
|
-
jid: string
|
|
21
|
-
content: BinaryNode
|
|
22
|
-
}[]>
|
|
23
|
-
communityUpdateDescription: (jid: string, description?: string) => Promise<void>
|
|
24
|
-
communityInviteCode: (jid: string) => Promise<string | undefined>
|
|
25
|
-
communityRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
26
|
-
communityAcceptInvite: (code: string) => Promise<string | undefined>
|
|
27
|
-
/**
|
|
28
|
-
* revoke a v4 invite for someone
|
|
29
|
-
* @param communityJid community jid
|
|
30
|
-
* @param invitedJid jid of person you invited
|
|
31
|
-
* @returns true if successful
|
|
32
|
-
*/
|
|
33
|
-
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>
|
|
34
|
-
/**
|
|
35
|
-
* accept a GroupInviteMessage
|
|
36
|
-
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
|
37
|
-
* @param inviteMessage the message to accept
|
|
38
|
-
*/
|
|
39
|
-
communityAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>
|
|
40
|
-
communityGetInviteInfo: (code: string) => Promise<GroupMetadata>
|
|
41
|
-
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
42
|
-
communitySettingUpdate: (jid: string, setting: 'announcement' | 'not_announcement' | 'locked' | 'unlocked') => Promise<void>
|
|
43
|
-
communityMemberAddMode: (jid: string, mode: 'admin_add' | 'all_member_add') => Promise<void>
|
|
44
|
-
communityJoinApprovalMode: (jid: string, mode: 'on' | 'off') => Promise<void>
|
|
45
|
-
communityFetchAllParticipating: () => Promise<{
|
|
46
|
-
[_: string]: GroupMetadata
|
|
47
|
-
}>
|
|
48
|
-
processingMutex: {
|
|
49
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
50
|
-
}
|
|
51
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
52
|
-
[_: string]: string
|
|
53
|
-
}>
|
|
54
|
-
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
55
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
56
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
57
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
58
|
-
getLidUser: (jid: string) => Promise<{
|
|
59
|
-
lid: string
|
|
60
|
-
id: string
|
|
61
|
-
}[] | undefined>
|
|
62
|
-
fetchBlocklist: () => Promise<string[]>
|
|
63
|
-
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
64
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
65
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
66
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
67
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
68
|
-
updateProfileName: (name: string) => Promise<void>
|
|
69
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
70
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
71
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
72
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
73
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
74
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
75
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
76
|
-
updatecommunitysAddPrivacy: (value: import("../Types").WAPrivacycommunityAddValue) => Promise<void>
|
|
77
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
78
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
79
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
80
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
81
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
82
|
-
cleanDirtyBits: (type: "account_sync" | "communitys", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
83
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
84
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
85
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
86
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
87
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
88
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
89
|
-
star: (jid: string, messages: {
|
|
90
|
-
id: string
|
|
91
|
-
fromMe?: boolean | undefined
|
|
92
|
-
}[], star: boolean) => Promise<void>
|
|
93
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
94
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
95
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
96
|
-
removeContact: (jid: string) => Promise<void>
|
|
97
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
98
|
-
type: "md"
|
|
99
|
-
ws: import("./Client").WebSocketClient
|
|
100
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
101
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
102
|
-
buffer(): void
|
|
103
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
104
|
-
flush(force?: boolean | undefined): boolean
|
|
105
|
-
isBuffering(): boolean
|
|
106
|
-
}
|
|
107
|
-
authState: {
|
|
108
|
-
creds: import("../Types").AuthenticationCreds
|
|
109
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
110
|
-
}
|
|
111
|
-
signalRepository: import("../Types").SignalRepository
|
|
112
|
-
user: import("../Types").Contact | undefined
|
|
113
|
-
generateMessageTag: () => string
|
|
114
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
115
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
116
|
-
waitForSocketOpen: () => Promise<void>
|
|
117
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
118
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
119
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
120
|
-
end: (error: Error | undefined) => void
|
|
121
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
122
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
123
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
124
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
125
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
126
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata
|
package/lib/Socket/groups.d.ts
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto'
|
|
2
|
-
import { GroupMetadata, ParticipantAction, SocketConfig, ContactAction } from '../Types'
|
|
3
|
-
import { BinaryNode } from '../WABinary'
|
|
4
|
-
|
|
5
|
-
export declare const makeGroupsSocket: (config: SocketConfig) => {
|
|
6
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
7
|
-
groupMetadata: (jid: string) => Promise<GroupMetadata>
|
|
8
|
-
groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>
|
|
9
|
-
groupLeave: (id: string) => Promise<void>
|
|
10
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
11
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
12
|
-
[key: string]: string
|
|
13
|
-
}[]>
|
|
14
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: 'approve' | 'reject') => Promise<{
|
|
15
|
-
status: string
|
|
16
|
-
jid: string
|
|
17
|
-
}[]>
|
|
18
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
|
19
|
-
status: string
|
|
20
|
-
jid: string
|
|
21
|
-
content: BinaryNode
|
|
22
|
-
}[]>
|
|
23
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>
|
|
24
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
25
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
26
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
27
|
-
/**
|
|
28
|
-
* revoke a v4 invite for someone
|
|
29
|
-
* @param groupJid group jid
|
|
30
|
-
* @param invitedJid jid of person you invited
|
|
31
|
-
* @returns true if successful
|
|
32
|
-
*/
|
|
33
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
34
|
-
/**
|
|
35
|
-
* accept a GroupInviteMessage
|
|
36
|
-
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
|
37
|
-
* @param inviteMessage the message to accept
|
|
38
|
-
*/
|
|
39
|
-
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>
|
|
40
|
-
groupGetInviteInfo: (code: string) => Promise<GroupMetadata>
|
|
41
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
42
|
-
groupSettingUpdate: (jid: string, setting: 'announcement' | 'not_announcement' | 'locked' | 'unlocked') => Promise<void>
|
|
43
|
-
groupMemberAddMode: (jid: string, mode: 'admin_add' | 'all_member_add') => Promise<void>
|
|
44
|
-
groupJoinApprovalMode: (jid: string, mode: 'on' | 'off') => Promise<void>
|
|
45
|
-
groupFetchAllParticipating: () => Promise<{
|
|
46
|
-
[_: string]: GroupMetadata
|
|
47
|
-
}>
|
|
48
|
-
processingMutex: {
|
|
49
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
50
|
-
}
|
|
51
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
52
|
-
[_: string]: string
|
|
53
|
-
}>
|
|
54
|
-
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
55
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
56
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
57
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
58
|
-
getLidUser: (jid: string) => Promise<{
|
|
59
|
-
lid: string
|
|
60
|
-
id: string
|
|
61
|
-
}[] | undefined>
|
|
62
|
-
fetchBlocklist: () => Promise<string[]>
|
|
63
|
-
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
64
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
65
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
66
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
67
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
68
|
-
updateProfileName: (name: string) => Promise<void>
|
|
69
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
70
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
71
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
72
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
73
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
74
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
75
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
76
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
77
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
78
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
79
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
80
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
81
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
82
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
83
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
84
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
85
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
86
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
87
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
88
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
89
|
-
star: (jid: string, messages: {
|
|
90
|
-
id: string
|
|
91
|
-
fromMe?: boolean | undefined
|
|
92
|
-
}[], star: boolean) => Promise<void>
|
|
93
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
94
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
95
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
96
|
-
removeContact: (jid: string) => Promise<void>
|
|
97
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
98
|
-
type: "md"
|
|
99
|
-
ws: import("./Client").WebSocketClient
|
|
100
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
101
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
102
|
-
buffer(): void
|
|
103
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
104
|
-
flush(force?: boolean | undefined): boolean
|
|
105
|
-
isBuffering(): boolean
|
|
106
|
-
}
|
|
107
|
-
authState: {
|
|
108
|
-
creds: import("../Types").AuthenticationCreds
|
|
109
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
110
|
-
}
|
|
111
|
-
signalRepository: import("../Types").SignalRepository
|
|
112
|
-
user: import("../Types").Contact | undefined
|
|
113
|
-
generateMessageTag: () => string
|
|
114
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
115
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
116
|
-
waitForSocketOpen: () => Promise<void>
|
|
117
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
118
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
119
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
120
|
-
end: (error: Error | undefined) => void
|
|
121
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
122
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
123
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
124
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
125
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
126
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
export declare const extractGroupMetadata: (result: BinaryNode) => GroupMetadata
|
package/lib/Socket/index.d.ts
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
import { UserFacingSocketConfig, ContactAction } from '../Types'
|
|
2
|
-
|
|
3
|
-
declare const makeWASocket: (config: UserFacingSocketConfig) => {
|
|
4
|
-
logger: import("../Utils/logger").ILogger
|
|
5
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>
|
|
6
|
-
getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
|
|
7
|
-
products: import("../Types").Product[]
|
|
8
|
-
nextPageCursor: string | undefined
|
|
9
|
-
}>
|
|
10
|
-
getCollections: (jid?: string | undefined, limit?: number) => Promise<{
|
|
11
|
-
collections: import("../Types").CatalogCollection[]
|
|
12
|
-
}>
|
|
13
|
-
productCreate: (create: import("../Types").ProductCreate) => Promise<import("../Types").Product>
|
|
14
|
-
productDelete: (productIds: string[]) => Promise<{
|
|
15
|
-
deleted: number
|
|
16
|
-
}>
|
|
17
|
-
productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>
|
|
18
|
-
updateBussinesProfile: (args: import("../Types").UpdateBussinesProfileProps) => Promise<any>
|
|
19
|
-
updateCoverPhoto: (photo: import("../Types").WAMediaUpload) => Promise<number>
|
|
20
|
-
removeCoverPhoto: (id: string) => Promise<any>
|
|
21
|
-
sendMessageAck: ({ tag, attrs, content }: import("..").BinaryNode, errorCode?: number | undefined) => Promise<void>
|
|
22
|
-
sendRetryRequest: (node: import("..").BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
|
|
23
|
-
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
24
|
-
id: any
|
|
25
|
-
to: string
|
|
26
|
-
}>
|
|
27
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>
|
|
28
|
-
fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAProto.IMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>
|
|
29
|
-
requestPlaceholderResend: (messageKey: import("../Types").WAProto.IMessageKey) => Promise<string | undefined>
|
|
30
|
-
getPrivacyTokens: (jids: string[]) => Promise<import("..").BinaryNode>
|
|
31
|
-
assertSessions: (jids: string[], force: boolean) => Promise<boolean>
|
|
32
|
-
relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>
|
|
33
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
34
|
-
sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
35
|
-
readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>
|
|
36
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
|
|
37
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction
|
|
38
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
39
|
-
[_: string]: string
|
|
40
|
-
}>
|
|
41
|
-
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>
|
|
42
|
-
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
43
|
-
[key: string]: string
|
|
44
|
-
} | undefined) => Promise<{
|
|
45
|
-
nodes: import("..").BinaryNode[]
|
|
46
|
-
shouldIncludeDeviceIdentity: boolean
|
|
47
|
-
}>
|
|
48
|
-
profilePictureUrl: (jids: string) => Promise<string>
|
|
49
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("..").JidWithDevice[]>
|
|
50
|
-
getEphemeralGroup: (jid: string) => Promise<number>
|
|
51
|
-
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
|
|
52
|
-
sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
|
|
53
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
|
|
54
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
55
|
-
duration: string
|
|
56
|
-
}>
|
|
57
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
|
|
58
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
59
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
60
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
61
|
-
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
62
|
-
newsletterUnfollow: (jid: string) => Promise<void>
|
|
63
|
-
newsletterFollow: (jid: string) => Promise<void>
|
|
64
|
-
newsletterUnmute: (jid: string) => Promise<void>
|
|
65
|
-
newsletterMute: (jid: string) => Promise<void>
|
|
66
|
-
newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
|
|
67
|
-
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
68
|
-
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
69
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
|
|
70
|
-
newsletterFetchAllParticipating: () => Promise<{
|
|
71
|
-
[_: string]: import("../Types").NewsletterMetadata
|
|
72
|
-
}>
|
|
73
|
-
newsletterAdminCount: (jid: string) => Promise<number>
|
|
74
|
-
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
75
|
-
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
76
|
-
newsletterDelete: (jid: string) => Promise<void>
|
|
77
|
-
newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
|
|
78
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
79
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
80
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
81
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
82
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
83
|
-
groupLeave: (id: string) => Promise<void>
|
|
84
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
85
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
86
|
-
[key: string]: string
|
|
87
|
-
}[]>
|
|
88
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
89
|
-
status: string
|
|
90
|
-
jid: string
|
|
91
|
-
}[]>
|
|
92
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
93
|
-
status: string
|
|
94
|
-
jid: string
|
|
95
|
-
content: import("..").BinaryNode
|
|
96
|
-
}[]>
|
|
97
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
98
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
99
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
100
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
101
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
102
|
-
groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
|
|
103
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
104
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
105
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
106
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
107
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
108
|
-
groupFetchAllParticipating: () => Promise<{
|
|
109
|
-
[_: string]: import("../Types").GroupMetadata
|
|
110
|
-
}>
|
|
111
|
-
processingMutex: {
|
|
112
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
113
|
-
}
|
|
114
|
-
upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
115
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
116
|
-
createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
|
|
117
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
118
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
119
|
-
getBotListV2: () => Promise<BotListInfo[]>
|
|
120
|
-
getLidUser: (jid: string) => Promise<{
|
|
121
|
-
lid: string
|
|
122
|
-
id: string
|
|
123
|
-
}[] | undefined>
|
|
124
|
-
fetchBlocklist: () => Promise<string[]>
|
|
125
|
-
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
126
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
127
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
128
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
129
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
130
|
-
updateProfileName: (name: string) => Promise<void>
|
|
131
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
132
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
133
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
134
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
135
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
136
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
137
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
138
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
139
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
140
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
141
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
142
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
143
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
144
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
145
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
146
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
147
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
148
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
149
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
150
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
151
|
-
star: (jid: string, messages: {
|
|
152
|
-
id: string
|
|
153
|
-
fromMe?: boolean | undefined
|
|
154
|
-
}[], star: boolean) => Promise<void>
|
|
155
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
156
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
157
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
158
|
-
removeContact: (jid: string) => Promise<void>
|
|
159
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
160
|
-
type: "md"
|
|
161
|
-
ws: import("./Client").WebSocketClient
|
|
162
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
163
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
164
|
-
buffer(): void
|
|
165
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
166
|
-
flush(force?: boolean | undefined): boolean
|
|
167
|
-
isBuffering(): boolean
|
|
168
|
-
}
|
|
169
|
-
authState: {
|
|
170
|
-
creds: import("../Types").AuthenticationCreds
|
|
171
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
172
|
-
}
|
|
173
|
-
signalRepository: import("../Types").SignalRepository
|
|
174
|
-
user: import("../Types").Contact | undefined
|
|
175
|
-
generateMessageTag: () => string
|
|
176
|
-
query: (node: import("..").BinaryNode, timeoutMs?: number | undefined) => Promise<import("..").BinaryNode>
|
|
177
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
178
|
-
waitForSocketOpen: () => Promise<void>
|
|
179
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
180
|
-
sendNode: (frame: import("..").BinaryNode) => Promise<void>
|
|
181
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
182
|
-
end: (error: Error | undefined) => void
|
|
183
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
184
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
185
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
186
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
187
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
188
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<import("..").BinaryNode>
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
export default makeWASocket
|