@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
package/WAProto/index.d.ts
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { Adv } from './Adv'
|
|
2
|
-
import { AICommon } from 'AICommon'
|
|
3
|
-
import { BotMetadata } from './BotMetadata'
|
|
4
|
-
import { Cert } from './Cert'
|
|
5
|
-
import { WAChatLockSettings } from './ChatLockSettings'
|
|
6
|
-
import { CompanionReg } from './CompanionReg'
|
|
7
|
-
import { DeviceCapabilities } from './DeviceCapabilities'
|
|
8
|
-
import { E2E } from './WAE2E'
|
|
9
|
-
import { Ephemeral } from './Ephemeral'
|
|
10
|
-
import { HistorySync } from './HistorySync'
|
|
11
|
-
import { LidMigrationSyncPayload } from './LidMigrationSyncPayload'
|
|
12
|
-
import { MdStorageChatRowOpaqueData } from './MdStorageChatRowOpaqueData'
|
|
13
|
-
import { MdStorageMsgRowOpaqueData } from './MdStorageMsgRowOpaqueData'
|
|
14
|
-
import { MmsRetry } from './MmsRetry'
|
|
15
|
-
import { Protocol } from './Protocol'
|
|
16
|
-
import { Reporting } from './Reporting'
|
|
17
|
-
import { ServerSync } from './ServerSync'
|
|
18
|
-
import { SignalLocalStorageProtocol } from './SignalLocalStorageProtocol'
|
|
19
|
-
import { SignalWhisperTextProtocol } from './SignalWhisperTextProtocol'
|
|
20
|
-
import { StatusAttributions } from './StatusAttributions'
|
|
21
|
-
import { SyncAction } from './SyncAction'
|
|
22
|
-
import { UserPassword } from './UserPassword'
|
|
23
|
-
import { VnameCert } from './VnameCert'
|
|
24
|
-
import { Wa6 } from './Wa6'
|
|
25
|
-
import { Web } from './Web'
|
|
26
|
-
|
|
27
|
-
const proto = {
|
|
28
|
-
...Adv,
|
|
29
|
-
...AICommon,
|
|
30
|
-
...BotMetadata,
|
|
31
|
-
...Cert,
|
|
32
|
-
...ChatLockSettings,
|
|
33
|
-
...CompanionReg,
|
|
34
|
-
...DeviceCapabilities,
|
|
35
|
-
...E2E,
|
|
36
|
-
...Ephemeral,
|
|
37
|
-
...HistorySync,
|
|
38
|
-
...LidMigrationSyncPayload,
|
|
39
|
-
...MdStorageChatRowOpaqueData,
|
|
40
|
-
...MdStorageMsgRowOpaqueData,
|
|
41
|
-
...MmsRetry,
|
|
42
|
-
...Protocol,
|
|
43
|
-
...Reporting,
|
|
44
|
-
...ServerSync,
|
|
45
|
-
...SignalLocalStorageProtocol,
|
|
46
|
-
...SignalWhisperTextProtocol,
|
|
47
|
-
...StatusAttributions,
|
|
48
|
-
...SyncAction,
|
|
49
|
-
...UserPassword,
|
|
50
|
-
...VnameCert,
|
|
51
|
-
...Wa6,
|
|
52
|
-
...Web
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { proto }
|
package/lib/Defaults/index.d.ts
DELETED
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { proto } from '../../WAProto'
|
|
2
|
-
import type { MediaType, SocketConfig } from '../Types'
|
|
3
|
-
|
|
4
|
-
export declare const UNAUTHORIZED_CODES: number[]
|
|
5
|
-
|
|
6
|
-
export declare const PHONENUMBER_MCC: Record<string, number>
|
|
7
|
-
|
|
8
|
-
export declare const DEFAULT_ORIGIN: "https://web.whatsapp.com"
|
|
9
|
-
|
|
10
|
-
export declare const DEF_CALLBACK_PREFIX: "CB:"
|
|
11
|
-
|
|
12
|
-
export declare const DEF_TAG_PREFIX: "TAG:"
|
|
13
|
-
|
|
14
|
-
export declare const PHONE_CONNECTION_CB: "CB:Pong"
|
|
15
|
-
|
|
16
|
-
export declare const WA_DEFAULT_EPHEMERAL: number
|
|
17
|
-
|
|
18
|
-
export declare const NOISE_MODE: "Noise_XX_25519_AESGCM_SHA256\0\0\0\0"
|
|
19
|
-
|
|
20
|
-
export declare const DICT_VERSION: 3
|
|
21
|
-
|
|
22
|
-
export declare const KEY_BUNDLE_TYPE: Buffer
|
|
23
|
-
|
|
24
|
-
export declare const NOISE_WA_HEADER: Buffer
|
|
25
|
-
|
|
26
|
-
export declare const URL_REGEX: RegExp
|
|
27
|
-
|
|
28
|
-
export declare const WA_CERT_DETAILS: {
|
|
29
|
-
SERIAL: number
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export declare const PROCESSABLE_HISTORY_TYPES: proto.Message.HistorySyncNotification.HistorySyncType[]
|
|
33
|
-
|
|
34
|
-
export declare const DEFAULT_CONNECTION_CONFIG: SocketConfig
|
|
35
|
-
|
|
36
|
-
export declare const MEDIA_PATH_MAP: {
|
|
37
|
-
[T in MediaType]?: string
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
export declare const MEDIA_HKDF_KEY_MAPPING: {
|
|
41
|
-
'audio': string
|
|
42
|
-
'document': string
|
|
43
|
-
'gif': string
|
|
44
|
-
'image': string
|
|
45
|
-
'ppic': string
|
|
46
|
-
'product': string
|
|
47
|
-
'ptt': string
|
|
48
|
-
'sticker': string
|
|
49
|
-
'video': string
|
|
50
|
-
'thumbnail-document': string
|
|
51
|
-
'thumbnail-image': string
|
|
52
|
-
'thumbnail-video': string
|
|
53
|
-
'thumbnail-link': string
|
|
54
|
-
'md-msg-hist': string
|
|
55
|
-
'md-app-state': string
|
|
56
|
-
'product-catalog-image': string
|
|
57
|
-
'payment-bg-image': string
|
|
58
|
-
'ptv': string
|
|
59
|
-
'biz-cover-photo': string
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
export declare const MEDIA_KEYS: (keyof typeof MEDIA_HKDF_KEY_MAPPING)[]
|
|
63
|
-
|
|
64
|
-
export declare const MIN_PREKEY_COUNT: 5
|
|
65
|
-
|
|
66
|
-
export declare const INITIAL_PREKEY_COUNT: 30
|
|
67
|
-
|
|
68
|
-
export declare const UPLOAD_TIMEOUT: 30000
|
|
69
|
-
|
|
70
|
-
export declare const MIN_UPLOAD_INTERVAL: 5000
|
|
71
|
-
|
|
72
|
-
export declare const DEFAULT_CACHE_TTLS: {
|
|
73
|
-
SIGNAL_STORE: number
|
|
74
|
-
MSG_RETRY: number
|
|
75
|
-
CALL_OFFER: number
|
|
76
|
-
USER_DEVICES: number
|
|
77
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare class CiphertextMessage {
|
|
2
|
-
readonly UNSUPPORTED_VERSION: number
|
|
3
|
-
readonly CURRENT_VERSION: number
|
|
4
|
-
readonly WHISPER_TYPE: number
|
|
5
|
-
readonly PREKEY_TYPE: number
|
|
6
|
-
readonly SENDERKEY_TYPE: number
|
|
7
|
-
readonly SENDERKEY_DISTRIBUTION_TYPE: number
|
|
8
|
-
readonly ENCRYPTED_MESSAGE_OVERHEAD: number
|
|
9
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { SenderKeyDistributionMessage } from './sender-key-distribution-message'
|
|
2
|
-
import { SenderKeyName } from './sender-key-name'
|
|
3
|
-
import { SenderKeyRecord } from './sender-key-record'
|
|
4
|
-
|
|
5
|
-
interface SenderKeyStore {
|
|
6
|
-
loadSenderKey(senderKeyName: SenderKeyName): Promise<SenderKeyRecord>
|
|
7
|
-
storeSenderKey(senderKeyName: SenderKeyName, record: SenderKeyRecord): Promise<void>
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export declare class GroupSessionBuilder {
|
|
11
|
-
private readonly senderKeyStore
|
|
12
|
-
constructor(senderKeyStore: SenderKeyStore)
|
|
13
|
-
process(senderKeyName: SenderKeyName, senderKeyDistributionMessage: SenderKeyDistributionMessage): Promise<void>
|
|
14
|
-
create(senderKeyName: SenderKeyName): Promise<SenderKeyDistributionMessage>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export {}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { SenderKeyName } from './sender-key-name'
|
|
2
|
-
import { SenderKeyRecord } from './sender-key-record'
|
|
3
|
-
|
|
4
|
-
export interface SenderKeyStore {
|
|
5
|
-
loadSenderKey(senderKeyName: SenderKeyName): Promise<SenderKeyRecord>
|
|
6
|
-
storeSenderKey(senderKeyName: SenderKeyName, record: SenderKeyRecord): Promise<void>
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export declare class GroupCipher {
|
|
10
|
-
private readonly senderKeyStore
|
|
11
|
-
private readonly senderKeyName
|
|
12
|
-
constructor(senderKeyStore: SenderKeyStore, senderKeyName: SenderKeyName)
|
|
13
|
-
private queueJob
|
|
14
|
-
encrypt(paddedPlaintext: Uint8Array | string): Promise<Uint8Array>
|
|
15
|
-
decrypt(senderKeyMessageBytes: Uint8Array): Promise<Uint8Array>
|
|
16
|
-
private getSenderKey
|
|
17
|
-
private getPlainText
|
|
18
|
-
private getCipherText
|
|
19
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export { GroupSessionBuilder } from './group-session-builder'
|
|
2
|
-
export { SenderKeyDistributionMessage } from './sender-key-distribution-message'
|
|
3
|
-
export { SenderKeyRecord } from './sender-key-record'
|
|
4
|
-
export { SenderKeyName } from './sender-key-name'
|
|
5
|
-
export { GroupCipher } from './group_cipher'
|
|
6
|
-
export { SenderKeyState } from './sender-key-state'
|
|
7
|
-
export { SenderKeyMessage } from './sender-key-message'
|
|
8
|
-
export { SenderMessageKey } from './sender-message-key'
|
|
9
|
-
export { SenderChainKey } from './sender-chain-key'
|
|
10
|
-
export { CiphertextMessage } from './ciphertext-message'
|
|
11
|
-
export * as keyhelper from './keyhelper'
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { generateKeyPair } from '@itsukichan/libsignal-node/src/curve'
|
|
2
|
-
|
|
3
|
-
type KeyPairType = ReturnType<typeof generateKeyPair>
|
|
4
|
-
|
|
5
|
-
export declare function generateSenderKey(): Buffer
|
|
6
|
-
|
|
7
|
-
export declare function generateSenderKeyId(): number
|
|
8
|
-
|
|
9
|
-
export interface SigningKeyPair {
|
|
10
|
-
public: Buffer
|
|
11
|
-
private: Buffer
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export declare function generateSenderSigningKey(key?: KeyPairType): SigningKeyPair
|
|
15
|
-
|
|
16
|
-
export {}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SenderMessageKey } from './sender-message-key'
|
|
2
|
-
|
|
3
|
-
export declare class SenderChainKey {
|
|
4
|
-
private readonly MESSAGE_KEY_SEED
|
|
5
|
-
private readonly CHAIN_KEY_SEED
|
|
6
|
-
private readonly iteration
|
|
7
|
-
private readonly chainKey
|
|
8
|
-
constructor(iteration: number, chainKey: any)
|
|
9
|
-
getIteration(): number
|
|
10
|
-
getSenderMessageKey(): SenderMessageKey
|
|
11
|
-
getNext(): SenderChainKey
|
|
12
|
-
getSeed(): Uint8Array
|
|
13
|
-
private getDerivative
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CiphertextMessage } from './ciphertext-message'
|
|
2
|
-
|
|
3
|
-
export declare class SenderKeyDistributionMessage extends CiphertextMessage {
|
|
4
|
-
private readonly id
|
|
5
|
-
private readonly iteration
|
|
6
|
-
private readonly chainKey
|
|
7
|
-
private readonly signatureKey
|
|
8
|
-
private readonly serialized
|
|
9
|
-
constructor(id?: number | null, iteration?: number | null, chainKey?: Uint8Array | null, signatureKey?: Uint8Array | null, serialized?: Uint8Array | null)
|
|
10
|
-
private intsToByteHighAndLow
|
|
11
|
-
serialize(): Uint8Array
|
|
12
|
-
getType(): number
|
|
13
|
-
getIteration(): number
|
|
14
|
-
getChainKey(): Uint8Array
|
|
15
|
-
getSignatureKey(): Uint8Array
|
|
16
|
-
getId(): number
|
|
17
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { CiphertextMessage } from './ciphertext-message'
|
|
2
|
-
|
|
3
|
-
export declare class SenderKeyMessage extends CiphertextMessage {
|
|
4
|
-
private readonly SIGNATURE_LENGTH
|
|
5
|
-
private readonly messageVersion
|
|
6
|
-
private readonly keyId
|
|
7
|
-
private readonly iteration
|
|
8
|
-
private readonly ciphertext
|
|
9
|
-
private readonly signature
|
|
10
|
-
private readonly serialized
|
|
11
|
-
constructor(keyId?: number | null, iteration?: number | null, ciphertext?: Uint8Array | null, signatureKey?: Uint8Array | null, serialized?: Uint8Array | null)
|
|
12
|
-
getKeyId(): number
|
|
13
|
-
getIteration(): number
|
|
14
|
-
getCipherText(): Uint8Array
|
|
15
|
-
verifySignature(signatureKey: Uint8Array): void
|
|
16
|
-
private getSignature
|
|
17
|
-
serialize(): Uint8Array
|
|
18
|
-
getType(): number
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface Sender {
|
|
2
|
-
id: string
|
|
3
|
-
deviceId: number
|
|
4
|
-
toString(): string
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export declare class SenderKeyName {
|
|
8
|
-
private readonly groupId
|
|
9
|
-
private readonly sender
|
|
10
|
-
constructor(groupId: string, sender: Sender)
|
|
11
|
-
getGroupId(): string
|
|
12
|
-
getSender(): Sender
|
|
13
|
-
serialize(): string
|
|
14
|
-
toString(): string
|
|
15
|
-
equals(other: SenderKeyName | null): boolean
|
|
16
|
-
hashCode(): number
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export {}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { SenderKeyState } from './sender-key-state'
|
|
2
|
-
|
|
3
|
-
export interface SenderKeyStateStructure {
|
|
4
|
-
senderKeyId: number
|
|
5
|
-
senderChainKey: {
|
|
6
|
-
iteration: number
|
|
7
|
-
seed: Uint8Array
|
|
8
|
-
}
|
|
9
|
-
senderSigningKey: {
|
|
10
|
-
public: Uint8Array
|
|
11
|
-
private?: Uint8Array
|
|
12
|
-
}
|
|
13
|
-
senderMessageKeys: Array<{
|
|
14
|
-
iteration: number
|
|
15
|
-
seed: Uint8Array
|
|
16
|
-
}>
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export declare class SenderKeyRecord {
|
|
20
|
-
private readonly MAX_STATES
|
|
21
|
-
private readonly senderKeyStates
|
|
22
|
-
constructor(serialized?: SenderKeyStateStructure[])
|
|
23
|
-
isEmpty(): boolean
|
|
24
|
-
getSenderKeyState(keyId?: number): SenderKeyState | undefined
|
|
25
|
-
addSenderKeyState(id: number, iteration: number, chainKey: Uint8Array, signatureKey: Uint8Array): void
|
|
26
|
-
setSenderKeyState(id: number, iteration: number, chainKey: Uint8Array, keyPair: {
|
|
27
|
-
public: Uint8Array
|
|
28
|
-
private: Uint8Array
|
|
29
|
-
}): void
|
|
30
|
-
serialize(): SenderKeyStateStructure[]
|
|
31
|
-
static deserialize(data: Uint8Array | string | SenderKeyStateStructure[]): SenderKeyRecord
|
|
32
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { SenderChainKey } from './sender-chain-key'
|
|
2
|
-
import { SenderMessageKey } from './sender-message-key'
|
|
3
|
-
|
|
4
|
-
interface SenderChainKeyStructure {
|
|
5
|
-
iteration: number
|
|
6
|
-
seed: Uint8Array
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
interface SenderSigningKeyStructure {
|
|
10
|
-
public: Uint8Array
|
|
11
|
-
private?: Uint8Array
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
interface SenderMessageKeyStructure {
|
|
15
|
-
iteration: number
|
|
16
|
-
seed: Uint8Array
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
interface SenderKeyStateStructure {
|
|
20
|
-
senderKeyId: number
|
|
21
|
-
senderChainKey: SenderChainKeyStructure
|
|
22
|
-
senderSigningKey: SenderSigningKeyStructure
|
|
23
|
-
senderMessageKeys: SenderMessageKeyStructure[]
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export declare class SenderKeyState {
|
|
27
|
-
private readonly MAX_MESSAGE_KEYS
|
|
28
|
-
private readonly senderKeyStateStructure
|
|
29
|
-
constructor(id?: number | null, iteration?: number | null, chainKey?: Uint8Array | null, signatureKeyPair?: {
|
|
30
|
-
public: Uint8Array
|
|
31
|
-
private: Uint8Array
|
|
32
|
-
} | null, signatureKeyPublic?: Uint8Array | null, signatureKeyPrivate?: Uint8Array | null, senderKeyStateStructure?: SenderKeyStateStructure | null)
|
|
33
|
-
getKeyId(): number
|
|
34
|
-
getSenderChainKey(): SenderChainKey
|
|
35
|
-
setSenderChainKey(chainKey: SenderChainKey): void
|
|
36
|
-
getSigningKeyPublic(): Buffer
|
|
37
|
-
getSigningKeyPrivate(): Buffer | undefined
|
|
38
|
-
hasSenderMessageKey(iteration: number): boolean
|
|
39
|
-
addSenderMessageKey(senderMessageKey: SenderMessageKey): void
|
|
40
|
-
removeSenderMessageKey(iteration: number): SenderMessageKey | null
|
|
41
|
-
getStructure(): SenderKeyStateStructure
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
export {}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare class SenderMessageKey {
|
|
2
|
-
private readonly iteration
|
|
3
|
-
private readonly iv
|
|
4
|
-
private readonly cipherKey
|
|
5
|
-
private readonly seed
|
|
6
|
-
constructor(iteration: number, seed: Uint8Array)
|
|
7
|
-
getIteration(): number
|
|
8
|
-
getIv(): Uint8Array
|
|
9
|
-
getCipherKey(): Uint8Array
|
|
10
|
-
getSeed(): Uint8Array
|
|
11
|
-
}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { SignalAuthState } from '../Types'
|
|
2
|
-
import { SignalRepository } from '../Types/Signal'
|
|
3
|
-
|
|
4
|
-
export declare function makeLibSignalRepository(auth: SignalAuthState, onWhatsAppFunc?: (...jids: string[]) => Promise<{
|
|
5
|
-
jid: string
|
|
6
|
-
exists: boolean
|
|
7
|
-
lid: string
|
|
8
|
-
}[] | undefined>): SignalRepository
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { ILogger } from '../Utils/loggerr'
|
|
2
|
-
import { SignalKeyStoreWithTransaction } from '../Types'
|
|
3
|
-
|
|
4
|
-
export declare class LIDMappingStore {
|
|
5
|
-
private readonly mappingCache
|
|
6
|
-
private readonly keys
|
|
7
|
-
private onWhatsAppFunc?
|
|
8
|
-
constructor(keys: SignalKeyStoreWithTransaction, onWhatsAppFunc?: (...jids: string[], logger: ILogger ) => Promise<{
|
|
9
|
-
jid: string
|
|
10
|
-
exists: boolean
|
|
11
|
-
lid: string
|
|
12
|
-
}[] | undefined>)
|
|
13
|
-
/**
|
|
14
|
-
* Store LID-PN mapping - USER LEVEL
|
|
15
|
-
*/
|
|
16
|
-
storeLIDPNMappings(pairs: {
|
|
17
|
-
lid: string;
|
|
18
|
-
pn: string;
|
|
19
|
-
}[]): Promise<void>
|
|
20
|
-
/**
|
|
21
|
-
* Get LID for PN - Returns device-specific LID based on user mapping
|
|
22
|
-
*/
|
|
23
|
-
getLIDForPN(pn: string): Promise<string | null>
|
|
24
|
-
/**
|
|
25
|
-
* Get PN for LID - USER LEVEL with device construction
|
|
26
|
-
*/
|
|
27
|
-
getPNForLID(lid: string): Promise<string | null>
|
|
28
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events'
|
|
2
|
-
import { URL } from 'url'
|
|
3
|
-
import { SocketConfig } from '../../Types'
|
|
4
|
-
|
|
5
|
-
export declare abstract class AbstractSocketClient extends EventEmitter {
|
|
6
|
-
url: URL
|
|
7
|
-
config: SocketConfig
|
|
8
|
-
abstract get isOpen(): boolean
|
|
9
|
-
abstract get isClosed(): boolean
|
|
10
|
-
abstract get isClosing(): boolean
|
|
11
|
-
abstract get isConnecting(): boolean
|
|
12
|
-
constructor(url: URL, config: SocketConfig)
|
|
13
|
-
abstract connect(): Promise<void>
|
|
14
|
-
abstract close(): Promise<void>
|
|
15
|
-
abstract send(str: Uint8Array | string, cb?: (err?: Error) => void): boolean
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import WebSocket from 'ws'
|
|
2
|
-
import { AbstractSocketClient } from './types'
|
|
3
|
-
|
|
4
|
-
export declare class WebSocketClient extends AbstractSocketClient {
|
|
5
|
-
protected socket: WebSocket | null
|
|
6
|
-
get isOpen(): boolean
|
|
7
|
-
get isClosed(): boolean
|
|
8
|
-
get isClosing(): boolean
|
|
9
|
-
get isConnecting(): boolean
|
|
10
|
-
connect(): Promise<void>
|
|
11
|
-
close(): Promise<void>
|
|
12
|
-
send(str: string | Uint8Array, cb?: (err?: Error) => void): boolean
|
|
13
|
-
}
|
package/lib/Socket/business.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, UpdateBussinesProfileProps } from '../Types'
|
|
2
|
-
import { BinaryNode } from '../WABinary'
|
|
3
|
-
|
|
4
|
-
export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
5
|
-
logger: import("../Utils/logger").ILogger
|
|
6
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>
|
|
7
|
-
getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
|
|
8
|
-
products: import("../Types").Product[]
|
|
9
|
-
nextPageCursor: string | undefined
|
|
10
|
-
}>
|
|
11
|
-
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
12
|
-
collections: import("../Types").CatalogCollection[]
|
|
13
|
-
}>
|
|
14
|
-
productCreate: (create: ProductCreate) => Promise<import("../Types").Product>
|
|
15
|
-
productDelete: (productIds: string[]) => Promise<{
|
|
16
|
-
deleted: number
|
|
17
|
-
}>
|
|
18
|
-
productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../Types").Product>
|
|
19
|
-
updateBussinesProfile: (args: UpdateBussinesProfileProps) => Promise<any>
|
|
20
|
-
updateCoverPhoto: (photo: import("../Types").WAMediaUpload) => Promise<number>
|
|
21
|
-
removeCoverPhoto: (id: string) => Promise<any>
|
|
22
|
-
sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number | undefined) => Promise<void>
|
|
23
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
|
|
24
|
-
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
25
|
-
id: any
|
|
26
|
-
to: string
|
|
27
|
-
}>
|
|
28
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>
|
|
29
|
-
fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAProto.IMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>
|
|
30
|
-
requestPlaceholderResend: (messageKey: import("../Types").WAProto.IMessageKey) => Promise<string | undefined>
|
|
31
|
-
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
|
|
32
|
-
assertSessions: (jids: string[], force: boolean) => Promise<boolean>
|
|
33
|
-
relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>
|
|
34
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
35
|
-
sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
36
|
-
readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>
|
|
37
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
|
|
38
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction
|
|
39
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
40
|
-
[_: string]: string
|
|
41
|
-
}>
|
|
42
|
-
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>
|
|
43
|
-
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
44
|
-
[key: string]: string
|
|
45
|
-
} | undefined) => Promise<{
|
|
46
|
-
nodes: BinaryNode[]
|
|
47
|
-
shouldIncludeDeviceIdentity: boolean
|
|
48
|
-
}>
|
|
49
|
-
profilePictureUrl: (jid: string) => Promise<string>
|
|
50
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>
|
|
51
|
-
getEphemeralGroup: (jid: string) => Promise<number>
|
|
52
|
-
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
|
|
53
|
-
sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
|
|
54
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
|
|
55
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
56
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
57
|
-
groupLeave: (id: string) => Promise<void>
|
|
58
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
59
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
60
|
-
[key: string]: string
|
|
61
|
-
}[]>
|
|
62
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
63
|
-
status: string
|
|
64
|
-
jid: string
|
|
65
|
-
}[]>
|
|
66
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
67
|
-
status: string
|
|
68
|
-
jid: string
|
|
69
|
-
content: BinaryNode
|
|
70
|
-
}[]>
|
|
71
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
72
|
-
duration: string
|
|
73
|
-
}>
|
|
74
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
|
|
75
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
76
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
77
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
78
|
-
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
79
|
-
newsletterUnfollow: (jid: string) => Promise<void>
|
|
80
|
-
newsletterFollow: (jid: string) => Promise<void>
|
|
81
|
-
newsletterUnmute: (jid: string) => Promise<void>
|
|
82
|
-
newsletterMute: (jid: string) => Promise<void>
|
|
83
|
-
newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
|
|
84
|
-
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
85
|
-
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
86
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
|
|
87
|
-
newsletterFetchAllParticipating: () => Promise<{
|
|
88
|
-
[_: string]: import("../Types").NewsletterMetadata
|
|
89
|
-
}>
|
|
90
|
-
newsletterAdminCount: (jid: string) => Promise<number>
|
|
91
|
-
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
92
|
-
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
93
|
-
newsletterDelete: (jid: string) => Promise<void>
|
|
94
|
-
newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
|
|
95
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
96
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
97
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
98
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
99
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
100
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
101
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
102
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
103
|
-
groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
|
|
104
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
105
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
106
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
107
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
108
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
109
|
-
groupFetchAllParticipating: () => Promise<{
|
|
110
|
-
[_: string]: import("../Types").GroupMetadata
|
|
111
|
-
}>
|
|
112
|
-
processingMutex: {
|
|
113
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
114
|
-
}
|
|
115
|
-
upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
116
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => 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
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
158
|
-
type: "md"
|
|
159
|
-
ws: import("./Client").WebSocketClient
|
|
160
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
161
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
162
|
-
buffer(): void
|
|
163
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
164
|
-
flush(force?: boolean | undefined): boolean
|
|
165
|
-
isBuffering(): boolean
|
|
166
|
-
}
|
|
167
|
-
authState: {
|
|
168
|
-
creds: import("../Types").AuthenticationCreds
|
|
169
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
170
|
-
}
|
|
171
|
-
signalRepository: import("../Types").SignalRepository
|
|
172
|
-
user: import("../Types").Contact | undefined
|
|
173
|
-
generateMessageTag: () => string
|
|
174
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
175
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
176
|
-
waitForSocketOpen: () => Promise<void>
|
|
177
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
178
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
179
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
180
|
-
end: (error: Error | undefined) => void
|
|
181
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
182
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
183
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
184
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
185
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
186
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
187
|
-
}
|