@mrlegendbot/baileys 1.2.3 → 1.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.upstream.md +1312 -0
- package/WAProto/WAProto.json +1 -0
- package/WAProto/WAProto.proto +6275 -0
- package/WAProto/compiler.js +550 -0
- package/WAProto/index.js +2 -97691
- package/lib/Defaults/index.js +89 -92
- package/lib/Signal/Group/ciphertext-message.js +9 -10
- package/lib/Signal/Group/group-session-builder.js +21 -22
- package/lib/Signal/Group/group_cipher.js +75 -69
- package/lib/Signal/Group/index.js +0 -1
- package/lib/Signal/Group/keyhelper.js +9 -10
- package/lib/Signal/Group/sender-chain-key.js +21 -22
- package/lib/Signal/Group/sender-key-distribution-message.js +51 -60
- package/lib/Signal/Group/sender-key-message.js +56 -62
- package/lib/Signal/Group/sender-key-name.js +38 -40
- package/lib/Signal/Group/sender-key-record.js +33 -34
- package/lib/Signal/Group/sender-key-state.js +72 -76
- package/lib/Signal/Group/sender-message-key.js +22 -23
- package/lib/Signal/libsignal.js +506 -405
- package/lib/Signal/lid-mapping.js +276 -258
- package/lib/Socket/Client/index.js +0 -1
- package/lib/Socket/Client/types.js +6 -7
- package/lib/Socket/Client/websocket.js +48 -49
- package/lib/Socket/business.js +349 -369
- package/lib/Socket/chats.js +1172 -1148
- package/lib/Socket/communities.js +473 -413
- package/lib/Socket/groups.js +387 -331
- package/lib/Socket/index.js +6 -8
- package/lib/Socket/messages-recv.js +1782 -1719
- package/lib/Socket/messages-send.js +1554 -2450
- package/lib/Socket/mex.js +40 -35
- package/lib/Socket/newsletter.js +239 -191
- package/lib/Socket/socket.js +992 -923
- package/lib/Store/index.js +8 -0
- package/lib/Store/keyed-db.js +108 -0
- package/lib/Store/make-cache-manager-store.js +70 -0
- package/lib/Store/make-in-memory-store.js +417 -0
- package/lib/Store/make-ordered-dictionary.js +69 -0
- package/lib/Store/object-repository.js +27 -0
- package/lib/Types/Auth.js +0 -1
- package/lib/Types/Bussines.js +0 -1
- package/lib/Types/Call.js +0 -1
- package/lib/Types/Chat.js +1 -8
- package/lib/Types/Contact.js +0 -1
- package/lib/Types/Events.js +1 -2
- package/lib/Types/GroupMetadata.js +0 -1
- package/lib/Types/Label.js +20 -22
- package/lib/Types/LabelAssociation.js +2 -4
- package/lib/Types/Message.js +3 -5
- package/lib/Types/Mex.js +26 -31
- package/lib/Types/Product.js +0 -1
- package/lib/Types/Signal.js +1 -2
- package/lib/Types/Socket.js +2 -3
- package/lib/Types/State.js +4 -52
- package/lib/Types/USync.js +0 -1
- package/lib/Types/index.js +10 -11
- package/lib/Utils/auth-utils.js +240 -277
- package/lib/Utils/browser-utils.js +20 -23
- package/lib/Utils/business.js +200 -204
- package/lib/Utils/chat-utils.js +836 -810
- package/lib/Utils/companion-reg-client-utils.js +23 -25
- package/lib/Utils/crypto.js +70 -86
- package/lib/Utils/decode-wa-message.js +277 -284
- package/lib/Utils/event-buffer.js +592 -595
- package/lib/Utils/generics.js +312 -335
- package/lib/Utils/history.js +123 -115
- package/lib/Utils/index.js +1 -2
- package/lib/Utils/link-preview.js +74 -73
- package/lib/Utils/logger.js +3 -2
- package/lib/Utils/lt-hash.js +0 -6
- package/lib/Utils/make-mutex.js +27 -27
- package/lib/Utils/message-retry-manager.js +213 -254
- package/lib/Utils/messages-media.js +741 -715
- package/lib/Utils/messages.js +791 -827
- package/lib/Utils/noise-handler.js +215 -187
- package/lib/Utils/pre-key-manager.js +69 -98
- package/lib/Utils/process-message.js +617 -586
- package/lib/Utils/reporting-utils.js +553 -234
- package/lib/Utils/signal.js +217 -170
- package/lib/Utils/stanza-ack.js +27 -35
- package/lib/Utils/sync-action-utils.js +37 -41
- package/lib/Utils/tc-token-utils.js +120 -141
- package/lib/Utils/use-multi-file-auth-state.js +87 -105
- package/lib/Utils/use-sqlite-auth-state.js +162 -0
- package/lib/Utils/validate-connection.js +190 -188
- package/lib/WABinary/constants.js +28 -1294
- package/lib/WABinary/decode.js +245 -249
- package/lib/WABinary/encode.js +201 -206
- package/lib/WABinary/generic-utils.js +86 -89
- package/lib/WABinary/index.js +0 -1
- package/lib/WABinary/jid-utils.js +68 -77
- package/lib/WABinary/types.js +0 -1
- package/lib/WAM/BinaryInfo.js +7 -8
- package/lib/WAM/constants.js +19892 -22853
- package/lib/WAM/encode.js +121 -132
- package/lib/WAM/index.js +0 -1
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +46 -43
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +47 -48
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +22 -23
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +30 -33
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +19 -20
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +53 -44
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +24 -24
- package/lib/WAUSync/Protocols/index.js +0 -1
- package/lib/WAUSync/USyncQuery.js +79 -88
- package/lib/WAUSync/USyncUser.js +28 -29
- package/lib/WAUSync/index.js +0 -1
- package/lib/index.js +2 -2
- package/package.json +22 -86
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/fix-imports.js +0 -85
- package/WAProto/index.d.ts +0 -14017
- package/lib/Defaults/index.d.ts +0 -75
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -10
- package/lib/Signal/Group/group-session-builder.d.ts +0 -15
- package/lib/Signal/Group/group_cipher.d.ts +0 -17
- package/lib/Signal/Group/index.d.ts +0 -12
- package/lib/Signal/Group/keyhelper.d.ts +0 -11
- 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 -18
- package/lib/Signal/Group/sender-key-record.d.ts +0 -31
- package/lib/Signal/Group/sender-key-state.d.ts +0 -39
- package/lib/Signal/Group/sender-message-key.d.ts +0 -12
- package/lib/Signal/libsignal.d.ts +0 -5
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Socket/Client/index.d.ts +0 -3
- 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 -217
- package/lib/Socket/chats.d.ts +0 -125
- package/lib/Socket/communities.d.ts +0 -273
- package/lib/Socket/groups.d.ts +0 -161
- package/lib/Socket/index.d.ts +0 -260
- package/lib/Socket/messages-recv.d.ts +0 -203
- package/lib/Socket/messages-send.d.ts +0 -199
- package/lib/Socket/mex.d.ts +0 -3
- package/lib/Socket/newsletter.d.ts +0 -170
- package/lib/Socket/socket.d.ts +0 -59
- package/lib/Types/Auth.d.ts +0 -117
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Call.d.ts +0 -15
- package/lib/Types/Chat.d.ts +0 -124
- package/lib/Types/Contact.d.ts +0 -26
- package/lib/Types/Events.d.ts +0 -256
- package/lib/Types/GroupMetadata.d.ts +0 -71
- package/lib/Types/Label.d.ts +0 -47
- package/lib/Types/LabelAssociation.d.ts +0 -30
- package/lib/Types/Message.d.ts +0 -320
- package/lib/Types/Mex.d.ts +0 -141
- package/lib/Types/Product.d.ts +0 -79
- package/lib/Types/Signal.d.ts +0 -87
- package/lib/Types/Socket.d.ts +0 -136
- package/lib/Types/State.d.ts +0 -97
- package/lib/Types/USync.d.ts +0 -26
- package/lib/Types/index.d.ts +0 -66
- package/lib/Utils/auth-utils.d.ts +0 -24
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/business.d.ts +0 -23
- package/lib/Utils/chat-utils.d.ts +0 -100
- package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
- package/lib/Utils/crypto.d.ts +0 -37
- package/lib/Utils/decode-wa-message.d.ts +0 -66
- package/lib/Utils/event-buffer.d.ts +0 -36
- package/lib/Utils/generics.d.ts +0 -92
- package/lib/Utils/history.d.ts +0 -24
- package/lib/Utils/identity-change-handler.d.ts +0 -44
- package/lib/Utils/identity-change-handler.js +0 -50
- package/lib/Utils/index.d.ts +0 -22
- package/lib/Utils/link-preview.d.ts +0 -21
- package/lib/Utils/logger.d.ts +0 -12
- package/lib/Utils/lt-hash.d.ts +0 -8
- package/lib/Utils/make-mutex.d.ts +0 -9
- package/lib/Utils/message-retry-manager.d.ts +0 -115
- package/lib/Utils/messages-media.d.ts +0 -133
- package/lib/Utils/messages.d.ts +0 -91
- package/lib/Utils/noise-handler.d.ts +0 -20
- package/lib/Utils/offline-node-processor.d.ts +0 -17
- package/lib/Utils/offline-node-processor.js +0 -40
- package/lib/Utils/pre-key-manager.d.ts +0 -28
- package/lib/Utils/process-message.d.ts +0 -60
- package/lib/Utils/reporting-utils.d.ts +0 -11
- package/lib/Utils/signal.d.ts +0 -47
- package/lib/Utils/stanza-ack.d.ts +0 -11
- package/lib/Utils/sync-action-utils.d.ts +0 -19
- package/lib/Utils/tc-token-utils.d.ts +0 -37
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -13
- package/lib/Utils/validate-connection.d.ts +0 -11
- package/lib/WABinary/constants.d.ts +0 -28
- package/lib/WABinary/decode.d.ts +0 -7
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/generic-utils.d.ts +0 -15
- package/lib/WABinary/index.d.ts +0 -6
- package/lib/WABinary/jid-utils.d.ts +0 -48
- package/lib/WABinary/types.d.ts +0 -19
- package/lib/WAM/BinaryInfo.d.ts +0 -9
- package/lib/WAM/constants.d.ts +0 -40
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/index.d.ts +0 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -23
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -13
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -13
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +0 -26
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/index.d.ts +0 -6
- package/lib/WAUSync/USyncQuery.d.ts +0 -30
- package/lib/WAUSync/USyncUser.d.ts +0 -17
- package/lib/WAUSync/index.d.ts +0 -4
- package/lib/index.d.ts +0 -12
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
import NodeCache from '@cacheable/node-cache';
|
|
2
|
-
import { Boom } from '@hapi/boom';
|
|
3
|
-
import { proto } from '../../WAProto/index.js';
|
|
4
|
-
import type { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessage, WAMessageKey } from '../Types/index.js';
|
|
5
|
-
import { MessageRetryManager } from '../Utils/index.js';
|
|
6
|
-
import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
|
|
7
|
-
import { USyncQuery } from '../WAUSync/index.js';
|
|
8
|
-
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
9
|
-
userDevicesCache: import("../Types/index.js").PossiblyExtendedCacheStore | NodeCache<JidWithDevice[]>;
|
|
10
|
-
devicesMutex: {
|
|
11
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
12
|
-
};
|
|
13
|
-
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
14
|
-
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
15
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<string>;
|
|
16
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
17
|
-
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
18
|
-
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
19
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
|
|
20
|
-
getMediaHost: () => string;
|
|
21
|
-
waUploadToServer: import("../Types/index.js").WAMediaUploadFunction;
|
|
22
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
23
|
-
[_: string]: string;
|
|
24
|
-
}>;
|
|
25
|
-
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
26
|
-
createParticipantNodes: (recipientJids: string[], message: proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: proto.IMessage) => Promise<{
|
|
27
|
-
nodes: BinaryNode[];
|
|
28
|
-
shouldIncludeDeviceIdentity: boolean;
|
|
29
|
-
}>;
|
|
30
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(JidWithDevice & {
|
|
31
|
-
jid: string;
|
|
32
|
-
})[]>;
|
|
33
|
-
messageRetryManager: MessageRetryManager | null;
|
|
34
|
-
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
35
|
-
updateMediaMessage: (message: WAMessage) => Promise<WAMessage>;
|
|
36
|
-
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<WAMessage | undefined>;
|
|
37
|
-
newsletterCreate: (name: string, description?: string) => Promise<import("../Types/index.js").NewsletterMetadata>;
|
|
38
|
-
newsletterUpdate: (jid: string, updates: import("../Types/index.js").NewsletterUpdate) => Promise<unknown>;
|
|
39
|
-
newsletterSubscribers: (jid: string) => Promise<{
|
|
40
|
-
subscribers: number;
|
|
41
|
-
}>;
|
|
42
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../Types/index.js").NewsletterMetadata | null>;
|
|
43
|
-
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
44
|
-
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
45
|
-
newsletterMute: (jid: string) => Promise<unknown>;
|
|
46
|
-
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
47
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
48
|
-
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
49
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload) => Promise<unknown>;
|
|
50
|
-
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
51
|
-
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
52
|
-
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
53
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
54
|
-
duration: string;
|
|
55
|
-
} | null>;
|
|
56
|
-
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
57
|
-
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
58
|
-
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
59
|
-
newsletterDelete: (jid: string) => Promise<void>;
|
|
60
|
-
groupMetadata: (jid: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
61
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
62
|
-
groupLeave: (id: string) => Promise<void>;
|
|
63
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
64
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
65
|
-
[key: string]: string;
|
|
66
|
-
}[]>;
|
|
67
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
68
|
-
status: string;
|
|
69
|
-
jid: string | undefined;
|
|
70
|
-
}[]>;
|
|
71
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types/index.js").ParticipantAction) => Promise<{
|
|
72
|
-
status: string;
|
|
73
|
-
jid: string | undefined;
|
|
74
|
-
content: BinaryNode;
|
|
75
|
-
}[]>;
|
|
76
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
77
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
78
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
79
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
80
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
81
|
-
groupAcceptInviteV4: (key: string | WAMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
82
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
83
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
84
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
85
|
-
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
86
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
87
|
-
groupFetchAllParticipating: () => Promise<{
|
|
88
|
-
[_: string]: import("../Types/index.js").GroupMetadata;
|
|
89
|
-
}>;
|
|
90
|
-
serverProps: {
|
|
91
|
-
privacyTokenOn1to1: boolean;
|
|
92
|
-
profilePicPrivacyToken: boolean;
|
|
93
|
-
lidTrustedTokenIssueToLid: boolean;
|
|
94
|
-
};
|
|
95
|
-
createCallLink: (type: "audio" | "video", event?: {
|
|
96
|
-
startTime: number;
|
|
97
|
-
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
98
|
-
getBotListV2: () => Promise<import("../Types/index.js").BotListInfo[]>;
|
|
99
|
-
messageMutex: {
|
|
100
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
101
|
-
};
|
|
102
|
-
receiptMutex: {
|
|
103
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
104
|
-
};
|
|
105
|
-
appStatePatchMutex: {
|
|
106
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
107
|
-
};
|
|
108
|
-
notificationMutex: {
|
|
109
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
110
|
-
};
|
|
111
|
-
upsertMessage: (msg: WAMessage, type: import("../Types/index.js").MessageUpsertType) => Promise<void>;
|
|
112
|
-
appPatch: (patchCreate: import("../Types/index.js").WAPatchCreate) => Promise<void>;
|
|
113
|
-
sendPresenceUpdate: (type: import("../Types/index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
114
|
-
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
115
|
-
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
116
|
-
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
117
|
-
fetchStatus: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
118
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../WAUSync/index.js").USyncQueryResultList[] | undefined>;
|
|
119
|
-
updateProfilePicture: (jid: string, content: import("../Types/index.js").WAMediaUpload, dimensions?: {
|
|
120
|
-
width: number;
|
|
121
|
-
height: number;
|
|
122
|
-
}) => Promise<void>;
|
|
123
|
-
removeProfilePicture: (jid: string) => Promise<void>;
|
|
124
|
-
updateProfileStatus: (status: string) => Promise<void>;
|
|
125
|
-
updateProfileName: (name: string) => Promise<void>;
|
|
126
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
127
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
128
|
-
updateCallPrivacy: (value: import("../Types/index.js").WAPrivacyCallValue) => Promise<void>;
|
|
129
|
-
updateMessagesPrivacy: (value: import("../Types/index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
130
|
-
updateLastSeenPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
131
|
-
updateOnlinePrivacy: (value: import("../Types/index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
132
|
-
updateProfilePicturePrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
133
|
-
updateStatusPrivacy: (value: import("../Types/index.js").WAPrivacyValue) => Promise<void>;
|
|
134
|
-
updateReadReceiptsPrivacy: (value: import("../Types/index.js").WAReadReceiptsValue) => Promise<void>;
|
|
135
|
-
updateGroupsAddPrivacy: (value: import("../Types/index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
136
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
137
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types/index.js").WABusinessProfile | void>;
|
|
138
|
-
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
139
|
-
chatModify: (mod: import("../Types/index.js").ChatModification, jid: string) => Promise<void>;
|
|
140
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
141
|
-
addOrEditContact: (jid: string, contact: proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
142
|
-
removeContact: (jid: string) => Promise<void>;
|
|
143
|
-
placeholderResendCache: import("../Types/index.js").CacheStore;
|
|
144
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
145
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
146
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
147
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
148
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
149
|
-
star: (jid: string, messages: {
|
|
150
|
-
id: string;
|
|
151
|
-
fromMe?: boolean;
|
|
152
|
-
}[], star: boolean) => Promise<void>;
|
|
153
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
154
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
155
|
-
type: "md";
|
|
156
|
-
ws: import("./Client/websocket.js").WebSocketClient;
|
|
157
|
-
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
158
|
-
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
159
|
-
buffer(): void;
|
|
160
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
161
|
-
flush(): boolean;
|
|
162
|
-
isBuffering(): boolean;
|
|
163
|
-
destroy(): void;
|
|
164
|
-
};
|
|
165
|
-
authState: {
|
|
166
|
-
creds: import("../Types/index.js").AuthenticationCreds;
|
|
167
|
-
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
168
|
-
};
|
|
169
|
-
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
170
|
-
user: import("../Types/index.js").Contact | undefined;
|
|
171
|
-
generateMessageTag: () => string;
|
|
172
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
173
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
174
|
-
waitForSocketOpen: () => Promise<void>;
|
|
175
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
176
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
177
|
-
logout: (msg?: string) => Promise<void>;
|
|
178
|
-
end: (error: Error | undefined) => Promise<void>;
|
|
179
|
-
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
180
|
-
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
181
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
182
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
183
|
-
digestKeyBundle: () => Promise<void>;
|
|
184
|
-
rotateSignedPreKey: () => Promise<void>;
|
|
185
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
186
|
-
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
187
|
-
sendUnifiedSession: () => Promise<void>;
|
|
188
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
189
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
190
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
191
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
|
|
192
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
193
|
-
jid: string;
|
|
194
|
-
exists: boolean;
|
|
195
|
-
}[] | undefined>;
|
|
196
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
197
|
-
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
198
|
-
};
|
|
199
|
-
//# sourceMappingURL=messages-send.d.ts.map
|
package/lib/Socket/mex.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { BinaryNode } from '../WABinary/index.js';
|
|
2
|
-
export declare const executeWMexQuery: <T>(variables: Record<string, unknown>, queryId: string, dataPath: string, query: (node: BinaryNode) => Promise<BinaryNode>, generateMessageTag: () => string) => Promise<T>;
|
|
3
|
-
//# sourceMappingURL=mex.d.ts.map
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import type { SocketConfig, WAMediaUpload } from '../Types/index.js';
|
|
2
|
-
import type { NewsletterMetadata, NewsletterUpdate } from '../Types/index.js';
|
|
3
|
-
export declare const makeNewsletterSocket: (config: SocketConfig) => {
|
|
4
|
-
newsletterCreate: (name: string, description?: string) => Promise<NewsletterMetadata>;
|
|
5
|
-
newsletterUpdate: (jid: string, updates: NewsletterUpdate) => Promise<unknown>;
|
|
6
|
-
newsletterSubscribers: (jid: string) => Promise<{
|
|
7
|
-
subscribers: number;
|
|
8
|
-
}>;
|
|
9
|
-
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<NewsletterMetadata | null>;
|
|
10
|
-
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
11
|
-
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
12
|
-
newsletterMute: (jid: string) => Promise<unknown>;
|
|
13
|
-
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
14
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
15
|
-
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
16
|
-
newsletterUpdatePicture: (jid: string, content: WAMediaUpload) => Promise<unknown>;
|
|
17
|
-
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
18
|
-
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
19
|
-
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
20
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
21
|
-
duration: string;
|
|
22
|
-
} | null>;
|
|
23
|
-
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
24
|
-
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
25
|
-
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
26
|
-
newsletterDelete: (jid: string) => Promise<void>;
|
|
27
|
-
groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
28
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
|
|
29
|
-
groupLeave: (id: string) => Promise<void>;
|
|
30
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
31
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
32
|
-
[key: string]: string;
|
|
33
|
-
}[]>;
|
|
34
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
35
|
-
status: string;
|
|
36
|
-
jid: string | undefined;
|
|
37
|
-
}[]>;
|
|
38
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
|
|
39
|
-
status: string;
|
|
40
|
-
jid: string | undefined;
|
|
41
|
-
content: import("../index.js").BinaryNode;
|
|
42
|
-
}[]>;
|
|
43
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
44
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
45
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
46
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
47
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
48
|
-
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
49
|
-
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
50
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
51
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
52
|
-
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
53
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
54
|
-
groupFetchAllParticipating: () => Promise<{
|
|
55
|
-
[_: string]: import("../index.js").GroupMetadata;
|
|
56
|
-
}>;
|
|
57
|
-
serverProps: {
|
|
58
|
-
privacyTokenOn1to1: boolean;
|
|
59
|
-
profilePicPrivacyToken: boolean;
|
|
60
|
-
lidTrustedTokenIssueToLid: boolean;
|
|
61
|
-
};
|
|
62
|
-
createCallLink: (type: "audio" | "video", event?: {
|
|
63
|
-
startTime: number;
|
|
64
|
-
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
65
|
-
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
66
|
-
messageMutex: {
|
|
67
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
68
|
-
};
|
|
69
|
-
receiptMutex: {
|
|
70
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
71
|
-
};
|
|
72
|
-
appStatePatchMutex: {
|
|
73
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
74
|
-
};
|
|
75
|
-
notificationMutex: {
|
|
76
|
-
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
77
|
-
};
|
|
78
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
79
|
-
[_: string]: string;
|
|
80
|
-
}>;
|
|
81
|
-
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
82
|
-
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
|
|
83
|
-
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
84
|
-
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
85
|
-
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
86
|
-
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
87
|
-
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
88
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
89
|
-
updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
|
|
90
|
-
width: number;
|
|
91
|
-
height: number;
|
|
92
|
-
}) => Promise<void>;
|
|
93
|
-
removeProfilePicture: (jid: string) => Promise<void>;
|
|
94
|
-
updateProfileStatus: (status: string) => Promise<void>;
|
|
95
|
-
updateProfileName: (name: string) => Promise<void>;
|
|
96
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
97
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
98
|
-
updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
|
|
99
|
-
updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
100
|
-
updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
101
|
-
updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
102
|
-
updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
103
|
-
updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
104
|
-
updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
|
|
105
|
-
updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
106
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
107
|
-
getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
|
|
108
|
-
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
109
|
-
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
110
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
111
|
-
addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
112
|
-
removeContact: (jid: string) => Promise<void>;
|
|
113
|
-
placeholderResendCache: import("../index.js").CacheStore;
|
|
114
|
-
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
115
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
116
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
117
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
118
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
119
|
-
star: (jid: string, messages: {
|
|
120
|
-
id: string;
|
|
121
|
-
fromMe?: boolean;
|
|
122
|
-
}[], star: boolean) => Promise<void>;
|
|
123
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
124
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
125
|
-
type: "md";
|
|
126
|
-
ws: import("./Client/index.js").WebSocketClient;
|
|
127
|
-
ev: import("../index.js").BaileysEventEmitter & {
|
|
128
|
-
process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
129
|
-
buffer(): void;
|
|
130
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
131
|
-
flush(): boolean;
|
|
132
|
-
isBuffering(): boolean;
|
|
133
|
-
destroy(): void;
|
|
134
|
-
};
|
|
135
|
-
authState: {
|
|
136
|
-
creds: import("../index.js").AuthenticationCreds;
|
|
137
|
-
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
138
|
-
};
|
|
139
|
-
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
140
|
-
user: import("../index.js").Contact | undefined;
|
|
141
|
-
generateMessageTag: () => string;
|
|
142
|
-
query: (node: import("../index.js").BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
143
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
144
|
-
waitForSocketOpen: () => Promise<void>;
|
|
145
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
146
|
-
sendNode: (frame: import("../index.js").BinaryNode) => Promise<void>;
|
|
147
|
-
logout: (msg?: string) => Promise<void>;
|
|
148
|
-
end: (error: Error | undefined) => Promise<void>;
|
|
149
|
-
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
150
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
|
|
151
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
152
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
153
|
-
digestKeyBundle: () => Promise<void>;
|
|
154
|
-
rotateSignedPreKey: () => Promise<void>;
|
|
155
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
156
|
-
updateServerTimeOffset: ({ attrs }: import("../index.js").BinaryNode) => void;
|
|
157
|
-
sendUnifiedSession: () => Promise<void>;
|
|
158
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
159
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
160
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
161
|
-
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
162
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
163
|
-
jid: string;
|
|
164
|
-
exists: boolean;
|
|
165
|
-
}[] | undefined>;
|
|
166
|
-
fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
167
|
-
fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo>;
|
|
168
|
-
};
|
|
169
|
-
export type NewsletterSocket = ReturnType<typeof makeNewsletterSocket>;
|
|
170
|
-
//# sourceMappingURL=newsletter.d.ts.map
|
package/lib/Socket/socket.d.ts
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
import { Boom } from '@hapi/boom';
|
|
2
|
-
import { type NewChatMessageCapInfo, type ReachoutTimelockState, type SocketConfig } from '../Types/index.js';
|
|
3
|
-
import { type BinaryNode } from '../WABinary/index.js';
|
|
4
|
-
import { BinaryInfo } from '../WAM/BinaryInfo.js';
|
|
5
|
-
import { USyncQuery } from '../WAUSync/index.js';
|
|
6
|
-
import { WebSocketClient } from './Client/index.js';
|
|
7
|
-
/**
|
|
8
|
-
* Connects to WA servers and performs:
|
|
9
|
-
* - simple queries (no retry mechanism, wait for connection establishment)
|
|
10
|
-
* - listen to messages and emit events
|
|
11
|
-
* - query phone connection
|
|
12
|
-
*/
|
|
13
|
-
export declare const makeSocket: (config: SocketConfig) => {
|
|
14
|
-
type: "md";
|
|
15
|
-
ws: WebSocketClient;
|
|
16
|
-
ev: import("../Types/index.js").BaileysEventEmitter & {
|
|
17
|
-
process(handler: (events: Partial<import("../Types/index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
18
|
-
buffer(): void;
|
|
19
|
-
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
20
|
-
flush(): boolean;
|
|
21
|
-
isBuffering(): boolean;
|
|
22
|
-
destroy(): void;
|
|
23
|
-
};
|
|
24
|
-
authState: {
|
|
25
|
-
creds: import("../Types/index.js").AuthenticationCreds;
|
|
26
|
-
keys: import("../Types/index.js").SignalKeyStoreWithTransaction;
|
|
27
|
-
};
|
|
28
|
-
signalRepository: import("../Types/index.js").SignalRepositoryWithLIDStore;
|
|
29
|
-
readonly user: import("../Types/index.js").Contact | undefined;
|
|
30
|
-
generateMessageTag: () => string;
|
|
31
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
32
|
-
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
33
|
-
waitForSocketOpen: () => Promise<void>;
|
|
34
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
35
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
36
|
-
logout: (msg?: string) => Promise<void>;
|
|
37
|
-
end: (error: Error | undefined) => Promise<void>;
|
|
38
|
-
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
39
|
-
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
40
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
|
41
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
42
|
-
digestKeyBundle: () => Promise<void>;
|
|
43
|
-
rotateSignedPreKey: () => Promise<void>;
|
|
44
|
-
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
45
|
-
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
46
|
-
sendUnifiedSession: () => Promise<void>;
|
|
47
|
-
wamBuffer: BinaryInfo;
|
|
48
|
-
/** Waits for the connection to WA to reach a state */
|
|
49
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
50
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
51
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
52
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
53
|
-
jid: string;
|
|
54
|
-
exists: boolean;
|
|
55
|
-
}[] | undefined>;
|
|
56
|
-
fetchAccountReachoutTimelock: () => Promise<ReachoutTimelockState>;
|
|
57
|
-
fetchNewChatMessageCap: () => Promise<NewChatMessageCapInfo>;
|
|
58
|
-
};
|
|
59
|
-
//# sourceMappingURL=socket.d.ts.map
|
package/lib/Types/Auth.d.ts
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import type { proto } from '../../WAProto/index.js';
|
|
2
|
-
import type { Contact } from './Contact.js';
|
|
3
|
-
import type { MinimalMessage } from './Message.js';
|
|
4
|
-
export type KeyPair = {
|
|
5
|
-
public: Uint8Array;
|
|
6
|
-
private: Uint8Array;
|
|
7
|
-
};
|
|
8
|
-
export type SignedKeyPair = {
|
|
9
|
-
keyPair: KeyPair;
|
|
10
|
-
signature: Uint8Array;
|
|
11
|
-
keyId: number;
|
|
12
|
-
timestampS?: number;
|
|
13
|
-
};
|
|
14
|
-
export type ProtocolAddress = {
|
|
15
|
-
name: string;
|
|
16
|
-
deviceId: number;
|
|
17
|
-
};
|
|
18
|
-
export type SignalIdentity = {
|
|
19
|
-
identifier: ProtocolAddress;
|
|
20
|
-
identifierKey: Uint8Array;
|
|
21
|
-
};
|
|
22
|
-
export type LIDMapping = {
|
|
23
|
-
pn: string;
|
|
24
|
-
lid: string;
|
|
25
|
-
};
|
|
26
|
-
export type LTHashState = {
|
|
27
|
-
version: number;
|
|
28
|
-
hash: Buffer;
|
|
29
|
-
indexValueMap: {
|
|
30
|
-
[indexMacBase64: string]: {
|
|
31
|
-
valueMac: Uint8Array | Buffer;
|
|
32
|
-
};
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export type SignalCreds = {
|
|
36
|
-
readonly signedIdentityKey: KeyPair;
|
|
37
|
-
readonly signedPreKey: SignedKeyPair;
|
|
38
|
-
readonly registrationId: number;
|
|
39
|
-
};
|
|
40
|
-
export type AccountSettings = {
|
|
41
|
-
/** unarchive chats when a new message is received */
|
|
42
|
-
unarchiveChats: boolean;
|
|
43
|
-
/** the default mode to start new conversations with */
|
|
44
|
-
defaultDisappearingMode?: Pick<proto.IConversation, 'ephemeralExpiration' | 'ephemeralSettingTimestamp'>;
|
|
45
|
-
};
|
|
46
|
-
export type AuthenticationCreds = SignalCreds & {
|
|
47
|
-
readonly noiseKey: KeyPair;
|
|
48
|
-
readonly pairingEphemeralKeyPair: KeyPair;
|
|
49
|
-
advSecretKey: string;
|
|
50
|
-
me?: Contact;
|
|
51
|
-
account?: proto.IADVSignedDeviceIdentity;
|
|
52
|
-
signalIdentities?: SignalIdentity[];
|
|
53
|
-
myAppStateKeyId?: string;
|
|
54
|
-
firstUnuploadedPreKeyId: number;
|
|
55
|
-
nextPreKeyId: number;
|
|
56
|
-
lastAccountSyncTimestamp?: number;
|
|
57
|
-
platform?: string;
|
|
58
|
-
processedHistoryMessages: MinimalMessage[];
|
|
59
|
-
/** number of times history & app state has been synced */
|
|
60
|
-
accountSyncCounter: number;
|
|
61
|
-
accountSettings: AccountSettings;
|
|
62
|
-
registered: boolean;
|
|
63
|
-
pairingCode: string | undefined;
|
|
64
|
-
lastPropHash: string | undefined;
|
|
65
|
-
routingInfo: Buffer | undefined;
|
|
66
|
-
additionalData?: any | undefined;
|
|
67
|
-
};
|
|
68
|
-
export type SignalDataTypeMap = {
|
|
69
|
-
'pre-key': KeyPair;
|
|
70
|
-
session: Uint8Array;
|
|
71
|
-
'sender-key': Uint8Array;
|
|
72
|
-
'sender-key-memory': {
|
|
73
|
-
[jid: string]: boolean;
|
|
74
|
-
};
|
|
75
|
-
'app-state-sync-key': proto.Message.IAppStateSyncKeyData;
|
|
76
|
-
'app-state-sync-version': LTHashState;
|
|
77
|
-
'lid-mapping': string;
|
|
78
|
-
'device-list': string[];
|
|
79
|
-
tctoken: {
|
|
80
|
-
token: Buffer;
|
|
81
|
-
timestamp?: string;
|
|
82
|
-
senderTimestamp?: number;
|
|
83
|
-
};
|
|
84
|
-
'identity-key': Uint8Array;
|
|
85
|
-
};
|
|
86
|
-
export type SignalDataSet = {
|
|
87
|
-
[T in keyof SignalDataTypeMap]?: {
|
|
88
|
-
[id: string]: SignalDataTypeMap[T] | null;
|
|
89
|
-
};
|
|
90
|
-
};
|
|
91
|
-
type Awaitable<T> = T | Promise<T>;
|
|
92
|
-
export type SignalKeyStore = {
|
|
93
|
-
get<T extends keyof SignalDataTypeMap>(type: T, ids: string[]): Awaitable<{
|
|
94
|
-
[id: string]: SignalDataTypeMap[T];
|
|
95
|
-
}>;
|
|
96
|
-
set(data: SignalDataSet): Awaitable<void>;
|
|
97
|
-
/** clear all the data in the store */
|
|
98
|
-
clear?(): Awaitable<void>;
|
|
99
|
-
};
|
|
100
|
-
export type SignalKeyStoreWithTransaction = SignalKeyStore & {
|
|
101
|
-
isInTransaction: () => boolean;
|
|
102
|
-
transaction<T>(exec: () => Promise<T>, key: string): Promise<T>;
|
|
103
|
-
};
|
|
104
|
-
export type TransactionCapabilityOptions = {
|
|
105
|
-
maxCommitRetries: number;
|
|
106
|
-
delayBetweenTriesMs: number;
|
|
107
|
-
};
|
|
108
|
-
export type SignalAuthState = {
|
|
109
|
-
creds: SignalCreds;
|
|
110
|
-
keys: SignalKeyStore | SignalKeyStoreWithTransaction;
|
|
111
|
-
};
|
|
112
|
-
export type AuthenticationState = {
|
|
113
|
-
creds: AuthenticationCreds;
|
|
114
|
-
keys: SignalKeyStore;
|
|
115
|
-
};
|
|
116
|
-
export {};
|
|
117
|
-
//# sourceMappingURL=Auth.d.ts.map
|
package/lib/Types/Bussines.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { proto } from '../../WAProto';
|
|
2
|
-
export type DayOfWeekBussines = 'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat';
|
|
3
|
-
export type HoursDay = {
|
|
4
|
-
day: DayOfWeekBussines;
|
|
5
|
-
mode: 'specific_hours';
|
|
6
|
-
openTimeInMinutes: string;
|
|
7
|
-
closeTimeInMinutes: string;
|
|
8
|
-
} | {
|
|
9
|
-
day: DayOfWeekBussines;
|
|
10
|
-
mode: 'open_24h' | 'appointment_only';
|
|
11
|
-
};
|
|
12
|
-
export type UpdateBussinesProfileProps = {
|
|
13
|
-
address?: string;
|
|
14
|
-
websites?: string[];
|
|
15
|
-
email?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
hours?: {
|
|
18
|
-
timezone: string;
|
|
19
|
-
days: HoursDay[];
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export type QuickReplyAction = proto.SyncActionValue.IQuickReplyAction & {
|
|
23
|
-
timestamp?: string;
|
|
24
|
-
};
|
|
25
|
-
//# sourceMappingURL=Bussines.d.ts.map
|
package/lib/Types/Call.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type WACallUpdateType = 'offer' | 'ringing' | 'preaccept' | 'transport' | 'relaylatency' | 'timeout' | 'reject' | 'accept' | 'terminate';
|
|
2
|
-
export type WACallEvent = {
|
|
3
|
-
chatId: string;
|
|
4
|
-
from: string;
|
|
5
|
-
callerPn?: string;
|
|
6
|
-
isGroup?: boolean;
|
|
7
|
-
groupJid?: string;
|
|
8
|
-
id: string;
|
|
9
|
-
date: Date;
|
|
10
|
-
isVideo?: boolean;
|
|
11
|
-
status: WACallUpdateType;
|
|
12
|
-
offline: boolean;
|
|
13
|
-
latencyMs?: number;
|
|
14
|
-
};
|
|
15
|
-
//# sourceMappingURL=Call.d.ts.map
|