@hansaka02/baileys 7.3.2 → 7.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Defaults/baileys-version.json +2 -2
- package/lib/Defaults/connection.js +51 -0
- package/lib/Defaults/constants.js +74 -0
- package/lib/Defaults/history.js +19 -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 +5 -18
- package/lib/Signal/Group/sender-key-distribution-message.js +7 -7
- package/lib/Signal/Group/sender-key-message.js +12 -8
- package/lib/Signal/Group/sender-key-record.js +7 -16
- package/lib/Signal/Group/sender-key-state.js +15 -61
- package/lib/Signal/Group/sender-message-key.js +2 -2
- package/lib/Signal/libsignal.js +237 -177
- package/lib/Signal/lid-mapping.js +128 -71
- package/lib/Socket/Client/types.js +2 -2
- package/lib/Socket/Client/websocket.js +25 -16
- package/lib/Socket/business.js +46 -33
- package/lib/Socket/chats.js +286 -170
- package/lib/Socket/community.js +215 -77
- package/lib/Socket/groups.js +77 -61
- package/lib/Socket/index.js +4 -4
- package/lib/Socket/messages-recv.js +629 -457
- package/lib/Socket/messages-send.js +645 -656
- package/lib/Socket/mex.js +61 -0
- package/lib/Socket/newsletter.js +166 -245
- package/lib/Socket/socket.js +396 -170
- 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/Newsletter.js +32 -25
- package/lib/Types/State.js +4 -4
- package/lib/Types/index.js +28 -12
- package/lib/Utils/auth-utils.js +212 -375
- package/lib/Utils/baileys-event-stream.js +68 -69
- package/lib/Utils/browser-utils.js +43 -0
- package/lib/Utils/business.js +63 -53
- package/lib/Utils/chat-utils.js +241 -106
- package/lib/Utils/crypto.js +25 -45
- package/lib/Utils/decode-wa-message.js +361 -311
- package/lib/Utils/event-buffer.js +97 -42
- package/lib/Utils/generics.js +90 -207
- package/lib/Utils/history.js +29 -27
- package/lib/Utils/index.js +28 -14
- package/lib/Utils/link-preview.js +24 -62
- package/lib/Utils/logger.js +5 -5
- package/lib/Utils/lt-hash.js +29 -23
- package/lib/Utils/make-mutex.js +26 -28
- package/lib/Utils/message-retry-manager.js +55 -7
- package/lib/Utils/messages-media.js +434 -247
- package/lib/Utils/messages.js +963 -917
- package/lib/Utils/noise-handler.js +60 -20
- package/lib/Utils/pre-key-manager.js +126 -0
- package/lib/Utils/process-message.js +216 -141
- package/lib/Utils/signal.js +75 -37
- package/lib/Utils/use-multi-file-auth-state.js +18 -22
- package/lib/Utils/validate-connection.js +96 -66
- package/lib/WABinary/constants.js +1268 -1268
- package/lib/WABinary/decode.js +62 -34
- package/lib/WABinary/encode.js +57 -36
- package/lib/WABinary/generic-utils.js +4 -4
- package/lib/WABinary/index.js +27 -11
- package/lib/WABinary/jid-utils.js +58 -11
- package/lib/WAM/constants.js +19064 -11563
- package/lib/WAM/encode.js +71 -14
- 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 +51 -28
- package/lib/WAUSync/index.js +27 -11
- package/lib/index.js +60 -31
- package/package.json +12 -17
- 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/Socket/usync.js +0 -83
- 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
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom'
|
|
2
|
-
import { proto } from '../../WAProto'
|
|
3
|
-
import { MessageReceiptType, MessageRelayOptions, SocketConfig, WAMessageKey, ContactAction } from '../Types'
|
|
4
|
-
import { BinaryNode } from '../WABinary'
|
|
5
|
-
|
|
6
|
-
export declare const makeMessagesRecvSocket: (config: SocketConfig) => {
|
|
7
|
-
sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number) => Promise<void>
|
|
8
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
|
|
9
|
-
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
10
|
-
id: any
|
|
11
|
-
to: string
|
|
12
|
-
}>
|
|
13
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>
|
|
14
|
-
fetchMessageHistory: (count: number, oldestMsgKey: WAMessageKey, oldestMsgTimestamp: number | Long) => Promise<string>
|
|
15
|
-
requestPlaceholderResend: (messageKey: WAMessageKey) => Promise<string | undefined>
|
|
16
|
-
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
|
|
17
|
-
assertSessions: (jids: string[], force: boolean) => Promise<boolean>
|
|
18
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>
|
|
19
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>
|
|
20
|
-
sendReceipts: (keys: proto.IMessageKey[], type: MessageReceiptType) => Promise<void>
|
|
21
|
-
readMessages: (keys: proto.IMessageKey[]) => Promise<void>
|
|
22
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
|
|
23
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction
|
|
24
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
25
|
-
[_: string]: string
|
|
26
|
-
}>
|
|
27
|
-
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>
|
|
28
|
-
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
|
|
29
|
-
[key: string]: string
|
|
30
|
-
} | undefined) => Promise<{
|
|
31
|
-
nodes: BinaryNode[]
|
|
32
|
-
shouldIncludeDeviceIdentity: boolean
|
|
33
|
-
}>
|
|
34
|
-
profilePictureUrl: (jid: string) => Promise<string>
|
|
35
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>
|
|
36
|
-
getEphemeralGroup: (jid: string) => Promise<number>
|
|
37
|
-
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>
|
|
38
|
-
sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
|
|
39
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>
|
|
40
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
41
|
-
duration: string
|
|
42
|
-
}>
|
|
43
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
|
|
44
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
45
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
46
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
47
|
-
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
48
|
-
newsletterUnfollow: (jid: string) => Promise<void>
|
|
49
|
-
newsletterFollow: (jid: string) => Promise<void>
|
|
50
|
-
newsletterUnmute: (jid: string) => Promise<void>
|
|
51
|
-
newsletterMute: (jid: string) => Promise<void>
|
|
52
|
-
newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
|
|
53
|
-
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
54
|
-
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
55
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
|
|
56
|
-
newsletterFetchAllParticipating: () => Promise<{
|
|
57
|
-
[_: string]: import("../Types").NewsletterMetadata
|
|
58
|
-
}>
|
|
59
|
-
newsletterAdminCount: (jid: string) => Promise<number>
|
|
60
|
-
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
61
|
-
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
62
|
-
newsletterDelete: (jid: string) => Promise<void>
|
|
63
|
-
newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
|
|
64
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
65
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
66
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
67
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
68
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
69
|
-
groupLeave: (id: string) => Promise<void>
|
|
70
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
71
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
72
|
-
[key: string]: string
|
|
73
|
-
}[]>
|
|
74
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
75
|
-
status: string
|
|
76
|
-
jid: string
|
|
77
|
-
}[]>
|
|
78
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
79
|
-
status: string
|
|
80
|
-
jid: string
|
|
81
|
-
content: BinaryNode
|
|
82
|
-
}[]>
|
|
83
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
84
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
85
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
86
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
87
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
88
|
-
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>
|
|
89
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
90
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
91
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
92
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
93
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
94
|
-
groupFetchAllParticipating: () => Promise<{
|
|
95
|
-
[_: string]: import("../Types").GroupMetadata
|
|
96
|
-
}>
|
|
97
|
-
processingMutex: {
|
|
98
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
99
|
-
}
|
|
100
|
-
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
101
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
102
|
-
createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
|
|
103
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
104
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
105
|
-
getLidUser: (jid: string) => Promise<{
|
|
106
|
-
lid: string
|
|
107
|
-
id: string
|
|
108
|
-
}[] | undefined>
|
|
109
|
-
fetchBlocklist: () => Promise<string[]>
|
|
110
|
-
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
111
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
112
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
113
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
114
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
115
|
-
updateProfileName: (name: string) => Promise<void>
|
|
116
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
117
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
118
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
119
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
120
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
121
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
122
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
123
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
124
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
125
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
126
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
127
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
128
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
129
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
130
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
131
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
132
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
133
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
134
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
135
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
136
|
-
star: (jid: string, messages: {
|
|
137
|
-
id: string
|
|
138
|
-
fromMe?: boolean | undefined
|
|
139
|
-
}[], star: boolean) => Promise<void>
|
|
140
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
141
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
142
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
143
|
-
removeContact: (jid: string) => Promise<void>
|
|
144
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
145
|
-
type: "md"
|
|
146
|
-
ws: import("./Client").WebSocketClient
|
|
147
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
148
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
149
|
-
buffer(): void
|
|
150
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
151
|
-
flush(force?: boolean | undefined): boolean
|
|
152
|
-
isBuffering(): boolean
|
|
153
|
-
}
|
|
154
|
-
authState: {
|
|
155
|
-
creds: import("../Types").AuthenticationCreds
|
|
156
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
157
|
-
}
|
|
158
|
-
signalRepository: import("../Types").SignalRepository
|
|
159
|
-
user: import("../Types").Contact | undefined
|
|
160
|
-
generateMessageTag: () => string
|
|
161
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
162
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
163
|
-
waitForSocketOpen: () => Promise<void>
|
|
164
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
165
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
166
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
167
|
-
end: (error: Error | undefined) => void
|
|
168
|
-
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void
|
|
169
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
170
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
171
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
172
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
173
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
174
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
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
|
-
|
|
7
|
-
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
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
|
|
16
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
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>
|
|
30
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
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>
|
|
61
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
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>
|
|
84
|
-
groupFetchAllParticipating: () => Promise<{
|
|
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>
|
|
127
|
-
star: (jid: string, messages: {
|
|
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
|
-
}
|
|
145
|
-
authState: {
|
|
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
|
-
}
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { SocketConfig, WAMediaUpload, NewsletterMetadata, NewsletterReactionMode, NewsletterViewRole, NewsletterFetchedUpdate, ContactAction } from '../Types'
|
|
2
|
-
import { BinaryNode } from '../WABinary'
|
|
3
|
-
|
|
4
|
-
export declare const makeNewsletterSocket: (config: SocketConfig) => {
|
|
5
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
6
|
-
duration: string
|
|
7
|
-
}>
|
|
8
|
-
newsletterReactionMode: (jid: string, mode: NewsletterReactionMode) => Promise<void>
|
|
9
|
-
newsletterUpdateDescription: (jid: string, description?: string) => Promise<void>
|
|
10
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
11
|
-
newsletterUpdatePicture: (jid: string, content: WAMediaUpload) => Promise<void>
|
|
12
|
-
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
13
|
-
newsletterUnfollow: (jid: string) => Promise<void>
|
|
14
|
-
newsletterFollow: (jid: string) => Promise<void>
|
|
15
|
-
newsletterUnmute: (jid: string) => Promise<void>
|
|
16
|
-
newsletterMute: (jid: string) => Promise<void>
|
|
17
|
-
newsletterCreate: (name: string, description?: string, picture?: WAMediaUpload) => Promise<NewsletterMetadata>
|
|
18
|
-
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
19
|
-
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
20
|
-
newsletterMetadata: (type: 'invite' | 'jid', key: string, role?: NewsletterViewRole) => Promise<NewsletterMetadata>
|
|
21
|
-
newsletterFetchAllParticipating: () => Promise<{
|
|
22
|
-
[_: string]: NewsletterMetadata
|
|
23
|
-
}>
|
|
24
|
-
newsletterAdminCount: (jid: string) => Promise<number>
|
|
25
|
-
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
26
|
-
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
27
|
-
newsletterDelete: (jid: string) => Promise<void>
|
|
28
|
-
/**if code wasn't passed, the reaction will be removed (if is reacted) */
|
|
29
|
-
newsletterReactMessage: (jid: string, server_id: string, code?: string) => Promise<void>
|
|
30
|
-
newsletterFetchMessages: (type: 'invite' | 'jid', key: string, count: number, after?: number) => Promise<NewsletterFetchedUpdate[]>
|
|
31
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number, since?: number) => Promise<NewsletterFetchedUpdate[]>
|
|
32
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
33
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
34
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
35
|
-
groupLeave: (id: string) => Promise<void>
|
|
36
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
37
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
38
|
-
[key: string]: string
|
|
39
|
-
}[]>
|
|
40
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
41
|
-
status: string
|
|
42
|
-
jid: string
|
|
43
|
-
}[]>
|
|
44
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
45
|
-
status: string
|
|
46
|
-
jid: string
|
|
47
|
-
content: BinaryNode
|
|
48
|
-
}[]>
|
|
49
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
50
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
51
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
52
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
53
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
54
|
-
groupAcceptInviteV4: (key: string | import("../Types").WAMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
|
|
55
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
56
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
57
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
58
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
59
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
60
|
-
groupFetchAllParticipating: () => Promise<{
|
|
61
|
-
[_: string]: import("../Types").GroupMetadata
|
|
62
|
-
}>
|
|
63
|
-
processingMutex: {
|
|
64
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
65
|
-
}
|
|
66
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
67
|
-
[_: string]: string
|
|
68
|
-
}>
|
|
69
|
-
upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
70
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
71
|
-
createCallLink: (type: 'audio' | 'video', event?: number, timeoutMs?: number) => Promise<void>
|
|
72
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
73
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
74
|
-
getBotListV2: () => Promise<BotListInfo[]>
|
|
75
|
-
getLidUser: (jid: string) => Promise<{
|
|
76
|
-
lid: string
|
|
77
|
-
id: string
|
|
78
|
-
}[] | undefined>
|
|
79
|
-
fetchBlocklist: () => Promise<string[]>
|
|
80
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index").USyncQueryResultList[] | undefined>
|
|
81
|
-
fetchStatus: (...jids: string[]) => Promise<import("../index").USyncQueryResultList[] | undefined>
|
|
82
|
-
updateProfilePicture: (jid: string, content: WAMediaUpload) => Promise<void>
|
|
83
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
84
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
85
|
-
updateProfileName: (name: string) => Promise<void>
|
|
86
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
87
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
88
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
89
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
90
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
91
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
92
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
93
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
94
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
95
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
96
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
97
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
98
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
99
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
100
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
101
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
102
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
103
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
104
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
105
|
-
star: (jid: string, messages: {
|
|
106
|
-
id: string
|
|
107
|
-
fromMe?: boolean | undefined
|
|
108
|
-
}[], star: boolean) => Promise<void>
|
|
109
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
110
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
111
|
-
addOrEditContact: (jid: string, contact: ContactAction) => Promise<void>
|
|
112
|
-
removeContact: (jid: string) => Promise<void>
|
|
113
|
-
executeUSyncQuery: (usyncQuery: import("../index").USyncQuery) => Promise<import("../index").USyncQueryResult | undefined>
|
|
114
|
-
type: "md"
|
|
115
|
-
ws: any
|
|
116
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
117
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
118
|
-
buffer(): void
|
|
119
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
120
|
-
flush(force?: boolean | undefined): boolean
|
|
121
|
-
isBuffering(): boolean
|
|
122
|
-
}
|
|
123
|
-
authState: {
|
|
124
|
-
creds: import("../Types").AuthenticationCreds
|
|
125
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
126
|
-
}
|
|
127
|
-
signalRepository: import("../Types").SignalRepository
|
|
128
|
-
user: import("../Types").Contact | undefined
|
|
129
|
-
generateMessageTag: () => string
|
|
130
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
131
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
132
|
-
waitForSocketOpen: () => Promise<void>
|
|
133
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
134
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
135
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
136
|
-
end: (error: Error | undefined) => void
|
|
137
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
138
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
139
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
140
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
141
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
142
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
export declare const extractNewsletterMetadata: (node: BinaryNode, isCreate?: boolean) => NewsletterMetadata
|
package/lib/Socket/socket.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom'
|
|
2
|
-
import { SocketConfig } from '../Types'
|
|
3
|
-
import { BinaryNode } from '../WABinary'
|
|
4
|
-
import { WebSocketClient } from './Client'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Connects to WA servers and performs:
|
|
8
|
-
* - simple queries (no retry mechanism, wait for connection establishment)
|
|
9
|
-
* - listen to messages and emit events
|
|
10
|
-
* - query phone connection
|
|
11
|
-
*/
|
|
12
|
-
export declare const makeSocket: (config: SocketConfig) => {
|
|
13
|
-
type: "md"
|
|
14
|
-
ws: WebSocketClient
|
|
15
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
16
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
17
|
-
buffer(): void
|
|
18
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>
|
|
19
|
-
flush(force?: boolean | undefined): boolean
|
|
20
|
-
isBuffering(): boolean
|
|
21
|
-
}
|
|
22
|
-
authState: {
|
|
23
|
-
creds: import("../Types").AuthenticationCreds
|
|
24
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
25
|
-
}
|
|
26
|
-
signalRepository: import("../Types").SignalRepository
|
|
27
|
-
readonly user: import("../Types").Contact | undefined
|
|
28
|
-
generateMessageTag: () => string
|
|
29
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<BinaryNode>
|
|
30
|
-
waitForMessage: <T_1>(msgId: string, timeoutMs?: number | undefined) => Promise<T_1>
|
|
31
|
-
waitForSocketOpen: () => Promise<void>
|
|
32
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
33
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
34
|
-
logout: (msg?: string) => Promise<void>
|
|
35
|
-
end: (error: Error | undefined) => void
|
|
36
|
-
onUnexpectedError: (err: Error | Boom, msg: string) => void
|
|
37
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
38
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
39
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
40
|
-
/** Waits for the connection to WA to reach a state */
|
|
41
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
42
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export type Socket = ReturnType<typeof makeSocket>
|
package/lib/Socket/usync.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom'
|
|
2
|
-
import { SocketConfig } from '../Types'
|
|
3
|
-
import { BinaryNode } from '../WABinary'
|
|
4
|
-
import { USyncQuery } from '../WAUSync'
|
|
5
|
-
|
|
6
|
-
export declare const makeUSyncSocket: (config: SocketConfig) => {
|
|
7
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync").USyncQueryResult | undefined>
|
|
8
|
-
type: "md"
|
|
9
|
-
ws: import("./Client").WebSocketClient
|
|
10
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
11
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
12
|
-
buffer(): void
|
|
13
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>
|
|
14
|
-
flush(force?: boolean | undefined): boolean
|
|
15
|
-
isBuffering(): boolean
|
|
16
|
-
}
|
|
17
|
-
authState: {
|
|
18
|
-
creds: import("../Types").AuthenticationCreds
|
|
19
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
20
|
-
}
|
|
21
|
-
signalRepository: import("../Types").SignalRepository
|
|
22
|
-
user: import("../Types").Contact | undefined
|
|
23
|
-
generateMessageTag: () => string
|
|
24
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
25
|
-
waitForMessage: <T_1>(msgId: string, timeoutMs?: number | undefined) => Promise<T_1>
|
|
26
|
-
waitForSocketOpen: () => Promise<void>
|
|
27
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
28
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
29
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
30
|
-
end: (error: Error | undefined) => void
|
|
31
|
-
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void
|
|
32
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
33
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
34
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
35
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
36
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
37
|
-
}
|