@alannxd/baileys 6.0.5 → 6.0.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/WAProto/fix-import.js +29 -0
- package/WAProto/index.js +160 -201
- package/engine-requirements.js +1 -1
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/index.d.ts +15 -37
- package/lib/Defaults/index.js +136 -119
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Signal/Group/ciphertext-message.d.ts +0 -1
- package/lib/Signal/Group/ciphertext-message.js +5 -2
- package/lib/Signal/Group/group-session-builder.d.ts +3 -4
- package/lib/Signal/Group/group-session-builder.js +41 -7
- package/lib/Signal/Group/group_cipher.d.ts +4 -4
- package/lib/Signal/Group/group_cipher.js +51 -37
- package/lib/Signal/Group/index.d.ts +11 -12
- package/lib/Signal/Group/index.js +57 -12
- package/lib/Signal/Group/keyhelper.d.ts +1 -2
- package/lib/Signal/Group/keyhelper.js +44 -7
- package/lib/Signal/Group/queue-job.d.ts +1 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.d.ts +2 -3
- package/lib/Signal/Group/sender-chain-key.js +15 -7
- package/lib/Signal/Group/sender-key-distribution-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-distribution-message.js +11 -8
- package/lib/Signal/Group/sender-key-message.d.ts +1 -2
- package/lib/Signal/Group/sender-key-message.js +12 -9
- package/lib/Signal/Group/sender-key-name.d.ts +0 -1
- package/lib/Signal/Group/sender-key-name.js +5 -2
- package/lib/Signal/Group/sender-key-record.d.ts +2 -3
- package/lib/Signal/Group/sender-key-record.js +21 -9
- package/lib/Signal/Group/sender-key-state.d.ts +6 -7
- package/lib/Signal/Group/sender-key-state.js +42 -27
- package/lib/Signal/Group/sender-message-key.d.ts +0 -1
- package/lib/Signal/Group/sender-message-key.js +7 -4
- package/lib/Signal/libsignal.d.ts +3 -5
- package/lib/Signal/libsignal.js +90 -347
- package/lib/Socket/Client/{types.d.ts → abstract-socket-client.d.ts} +5 -4
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.d.ts +3 -3
- package/lib/Socket/Client/index.js +19 -3
- package/lib/Socket/Client/mobile-socket-client.d.ts +13 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/{websocket.d.ts → web-socket-client.d.ts} +2 -3
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/business.d.ts +108 -154
- package/lib/Socket/business.js +43 -162
- package/lib/Socket/chats.d.ts +239 -96
- package/lib/Socket/chats.js +427 -627
- package/lib/Socket/communities.d.ts +146 -239
- package/lib/Socket/communities.js +80 -90
- package/lib/Socket/groups.d.ts +57 -104
- package/lib/Socket/groups.js +161 -154
- package/lib/Socket/index.d.ts +115 -202
- package/lib/Socket/index.js +10 -11
- package/lib/Socket/luxu.d.ts +266 -22
- package/lib/Socket/luxu.js +465 -422
- package/lib/Socket/messages-recv.d.ts +84 -136
- package/lib/Socket/messages-recv.js +615 -1421
- package/lib/Socket/messages-send.d.ts +126 -142
- package/lib/Socket/messages-send.js +671 -878
- package/lib/Socket/newsletter.d.ts +85 -121
- package/lib/Socket/newsletter.js +272 -147
- package/lib/Socket/registration.d.ts +267 -0
- package/lib/Socket/registration.js +166 -0
- package/lib/Socket/socket.d.ts +19 -34
- package/lib/Socket/socket.js +313 -544
- package/lib/Socket/usync.d.ts +36 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.d.ts +3 -10
- package/lib/Store/index.js +10 -10
- package/lib/Store/make-cache-manager-store.d.ts +11 -17
- package/lib/Store/make-cache-manager-store.js +41 -43
- package/lib/Store/make-in-memory-store.d.ts +118 -39
- package/lib/Store/make-in-memory-store.js +341 -112
- package/lib/Store/make-ordered-dictionary.d.ts +10 -11
- package/lib/Store/make-ordered-dictionary.js +20 -14
- package/lib/Store/object-repository.d.ts +9 -10
- package/lib/Store/object-repository.js +6 -11
- package/lib/Types/Auth.d.ts +12 -19
- package/lib/Types/Auth.js +2 -2
- package/lib/Types/Call.d.ts +1 -3
- package/lib/Types/Call.js +2 -2
- package/lib/Types/Chat.d.ts +13 -35
- package/lib/Types/Chat.js +4 -8
- package/lib/Types/Contact.d.ts +1 -8
- package/lib/Types/Contact.js +2 -2
- package/lib/Types/Events.d.ts +17 -116
- package/lib/Types/Events.js +2 -2
- package/lib/Types/GroupMetadata.d.ts +5 -21
- package/lib/Types/GroupMetadata.js +2 -2
- package/lib/Types/Label.d.ts +0 -12
- package/lib/Types/Label.js +5 -3
- package/lib/Types/LabelAssociation.d.ts +0 -1
- package/lib/Types/LabelAssociation.js +5 -3
- package/lib/Types/Message.d.ts +58 -105
- package/lib/Types/Message.js +9 -11
- package/lib/Types/Newsletter.d.ts +103 -0
- package/lib/Types/Newsletter.js +38 -0
- package/lib/Types/Product.d.ts +1 -2
- package/lib/Types/Product.js +2 -2
- package/lib/Types/Signal.d.ts +2 -32
- package/lib/Types/Signal.js +2 -2
- package/lib/Types/Socket.d.ts +25 -50
- package/lib/Types/Socket.js +2 -3
- package/lib/Types/State.d.ts +2 -72
- package/lib/Types/State.js +2 -56
- package/lib/Types/USync.d.ts +2 -3
- package/lib/Types/USync.js +2 -2
- package/lib/Types/index.d.ts +14 -22
- package/lib/Types/index.js +31 -15
- package/lib/Utils/auth-utils.d.ts +6 -12
- package/lib/Utils/auth-utils.js +143 -239
- package/lib/Utils/baileys-event-stream.d.ts +16 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/business.d.ts +2 -3
- package/lib/Utils/business.js +69 -66
- package/lib/Utils/chat-utils.d.ts +23 -52
- package/lib/Utils/chat-utils.js +253 -396
- package/lib/Utils/crypto.d.ts +22 -18
- package/lib/Utils/crypto.js +90 -57
- package/lib/Utils/decode-wa-message.d.ts +8 -55
- package/lib/Utils/decode-wa-message.js +84 -203
- package/lib/Utils/event-buffer.d.ts +8 -9
- package/lib/Utils/event-buffer.js +77 -185
- package/lib/Utils/generics.d.ts +29 -28
- package/lib/Utils/generics.js +210 -180
- package/lib/Utils/history.d.ts +9 -18
- package/lib/Utils/history.js +55 -93
- package/lib/Utils/index.d.ts +17 -22
- package/lib/Utils/index.js +33 -22
- package/lib/Utils/link-preview.d.ts +5 -5
- package/lib/Utils/link-preview.js +24 -16
- package/lib/Utils/logger.d.ts +3 -11
- package/lib/Utils/logger.js +7 -3
- package/lib/Utils/lt-hash.d.ts +12 -8
- package/lib/Utils/lt-hash.js +46 -3
- package/lib/Utils/make-mutex.d.ts +2 -4
- package/lib/Utils/make-mutex.js +34 -24
- package/lib/Utils/messages-media.d.ts +44 -61
- package/lib/Utils/messages-media.js +482 -451
- package/lib/Utils/messages.d.ts +18 -32
- package/lib/Utils/messages.js +369 -458
- package/lib/Utils/noise-handler.d.ts +14 -13
- package/lib/Utils/noise-handler.js +99 -145
- package/lib/Utils/process-message.d.ts +12 -31
- package/lib/Utils/process-message.js +150 -459
- package/lib/Utils/signal.d.ts +5 -20
- package/lib/Utils/signal.js +72 -120
- package/lib/Utils/use-multi-file-auth-state.d.ts +2 -2
- package/lib/Utils/use-multi-file-auth-state.js +27 -29
- package/lib/Utils/validate-connection.d.ts +7 -7
- package/lib/Utils/validate-connection.js +99 -73
- package/lib/WABinary/constants.d.ts +27 -25
- package/lib/WABinary/constants.js +20 -1281
- package/lib/WABinary/decode.d.ts +5 -5
- package/lib/WABinary/decode.js +42 -52
- package/lib/WABinary/encode.d.ts +3 -3
- package/lib/WABinary/encode.js +155 -110
- package/lib/WABinary/generic-utils.d.ts +7 -8
- package/lib/WABinary/generic-utils.js +49 -48
- package/lib/WABinary/index.d.ts +5 -6
- package/lib/WABinary/index.js +21 -6
- package/lib/WABinary/jid-utils.d.ts +8 -25
- package/lib/WABinary/jid-utils.js +40 -74
- package/lib/WABinary/types.d.ts +1 -2
- package/lib/WABinary/types.js +2 -2
- package/lib/WAM/BinaryInfo.d.ts +11 -3
- package/lib/WAM/BinaryInfo.js +5 -2
- package/lib/WAM/constants.d.ts +3 -5
- package/lib/WAM/constants.js +11958 -19461
- package/lib/WAM/encode.d.ts +3 -3
- package/lib/WAM/encode.js +22 -17
- package/lib/WAM/index.d.ts +3 -4
- package/lib/WAM/index.js +19 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +13 -33
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +14 -11
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +12 -9
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +2 -3
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +13 -9
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.d.ts +3 -4
- package/lib/WAUSync/Protocols/UsyncBotProfileProtocol.js +22 -20
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.d.ts +3 -5
- package/lib/WAUSync/Protocols/UsyncLIDProtocol.js +8 -13
- package/lib/WAUSync/Protocols/index.d.ts +4 -6
- package/lib/WAUSync/Protocols/index.js +20 -6
- package/lib/WAUSync/USyncQuery.d.ts +4 -6
- package/lib/WAUSync/USyncQuery.js +35 -44
- package/lib/WAUSync/USyncUser.d.ts +5 -10
- package/lib/WAUSync/USyncUser.js +5 -10
- package/lib/WAUSync/index.js +19 -4
- package/lib/index.d.ts +9 -10
- package/lib/index.js +34 -12
- package/package.json +50 -83
- package/WAProto/GenerateStatics.sh +0 -3
- package/WAProto/WAProto.proto +0 -5479
- package/WAProto/fix-imports.js +0 -85
- package/WAProto/index.d.ts +0 -14017
- package/lib/Signal/lid-mapping.d.ts +0 -23
- package/lib/Signal/lid-mapping.js +0 -277
- package/lib/Socket/Client/types.js +0 -11
- package/lib/Socket/Client/websocket.js +0 -54
- package/lib/Socket/mex.d.ts +0 -3
- package/lib/Socket/mex.js +0 -42
- package/lib/Store/keyed-db.d.ts +0 -22
- package/lib/Store/keyed-db.js +0 -108
- package/lib/Types/Bussines.d.ts +0 -25
- package/lib/Types/Bussines.js +0 -2
- package/lib/Types/Mex.d.ts +0 -141
- package/lib/Types/Mex.js +0 -37
- package/lib/Utils/browser-utils.d.ts +0 -4
- package/lib/Utils/browser-utils.js +0 -28
- package/lib/Utils/companion-reg-client-utils.d.ts +0 -17
- package/lib/Utils/companion-reg-client-utils.js +0 -35
- package/lib/Utils/identity-change-handler.d.ts +0 -44
- package/lib/Utils/identity-change-handler.js +0 -50
- package/lib/Utils/message-retry-manager.d.ts +0 -115
- package/lib/Utils/message-retry-manager.js +0 -265
- 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/pre-key-manager.js +0 -106
- package/lib/Utils/reporting-utils.d.ts +0 -11
- package/lib/Utils/reporting-utils.js +0 -258
- package/lib/Utils/stanza-ack.d.ts +0 -11
- package/lib/Utils/stanza-ack.js +0 -38
- package/lib/Utils/sync-action-utils.d.ts +0 -19
- package/lib/Utils/sync-action-utils.js +0 -49
- package/lib/Utils/tc-token-utils.d.ts +0 -37
- package/lib/Utils/tc-token-utils.js +0 -163
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +0 -25
- package/lib/WAUSync/index.d.ts +0 -4
|
@@ -1,199 +1,183 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="node" />
|
|
2
2
|
import { Boom } from '@hapi/boom';
|
|
3
|
-
import { proto } from '../../WAProto
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import { type BinaryNode, type JidWithDevice } from '../WABinary/index.js';
|
|
7
|
-
import { USyncQuery } from '../WAUSync/index.js';
|
|
3
|
+
import { proto } from '../../WAProto';
|
|
4
|
+
import { AnyMessageContent, MediaConnInfo, MessageReceiptType, MessageRelayOptions, MiscMessageGenerationOptions, SocketConfig, WAMessageKey } from '../Types';
|
|
5
|
+
import { BinaryNode, JidWithDevice } from '../WABinary';
|
|
8
6
|
export declare const makeMessagesSocket: (config: SocketConfig) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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>;
|
|
7
|
+
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
|
|
8
|
+
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
|
9
|
+
relayMessage: (jid: string, message: proto.IMessage, { messageId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, useCachedGroupMetadata, statusJidList }: MessageRelayOptions) => Promise<proto.WebMessageInfo>;
|
|
16
10
|
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: MessageReceiptType) => Promise<void>;
|
|
17
11
|
sendReceipts: (keys: WAMessageKey[], type: MessageReceiptType) => Promise<void>;
|
|
18
12
|
readMessages: (keys: WAMessageKey[]) => Promise<void>;
|
|
19
13
|
refreshMediaConn: (forceGet?: boolean) => Promise<MediaConnInfo>;
|
|
20
|
-
|
|
21
|
-
|
|
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<{
|
|
14
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<JidWithDevice[]>;
|
|
15
|
+
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: BinaryNode['attrs']) => Promise<{
|
|
27
16
|
nodes: BinaryNode[];
|
|
28
17
|
shouldIncludeDeviceIdentity: boolean;
|
|
29
18
|
}>;
|
|
30
|
-
|
|
31
|
-
|
|
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;
|
|
19
|
+
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
|
20
|
+
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
21
|
+
[_: string]: string;
|
|
41
22
|
}>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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>;
|
|
23
|
+
sendPeerDataOperationMessage: (pdoMessage: proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
24
|
+
rahmi: any;
|
|
25
|
+
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
|
26
|
+
sendMessage: (jid: string, content: AnyMessageContent, options?: MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
|
53
27
|
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
54
28
|
duration: string;
|
|
55
|
-
}
|
|
29
|
+
}>;
|
|
30
|
+
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
|
|
31
|
+
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
|
32
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<void>;
|
|
33
|
+
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
|
34
|
+
newsletterRemovePicture: (jid: string) => Promise<void>;
|
|
35
|
+
newsletterUnfollow: (jid: string) => Promise<void>;
|
|
36
|
+
newsletterFollow: (jid: string) => Promise<void>;
|
|
37
|
+
newsletterUnmute: (jid: string) => Promise<void>;
|
|
38
|
+
newsletterMute: (jid: string) => Promise<void>;
|
|
39
|
+
newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
|
|
40
|
+
newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
|
|
41
|
+
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
|
|
56
42
|
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
57
|
-
newsletterChangeOwner: (jid: string,
|
|
58
|
-
newsletterDemote: (jid: string,
|
|
43
|
+
newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
|
|
44
|
+
newsletterDemote: (jid: string, user: string) => Promise<void>;
|
|
59
45
|
newsletterDelete: (jid: string) => Promise<void>;
|
|
60
|
-
|
|
61
|
-
|
|
46
|
+
newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
|
|
47
|
+
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
48
|
+
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
|
49
|
+
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>;
|
|
50
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>;
|
|
62
51
|
groupLeave: (id: string) => Promise<void>;
|
|
63
52
|
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
64
53
|
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
65
54
|
[key: string]: string;
|
|
66
55
|
}[]>;
|
|
67
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "
|
|
56
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
68
57
|
status: string;
|
|
69
|
-
jid: string
|
|
58
|
+
jid: string;
|
|
70
59
|
}[]>;
|
|
71
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types
|
|
60
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
72
61
|
status: string;
|
|
73
|
-
jid: string
|
|
62
|
+
jid: string;
|
|
74
63
|
content: BinaryNode;
|
|
75
64
|
}[]>;
|
|
76
|
-
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
65
|
+
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
|
77
66
|
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
78
67
|
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
79
68
|
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types/index.js").GroupMetadata>;
|
|
69
|
+
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
|
|
70
|
+
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>;
|
|
83
71
|
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
84
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "
|
|
85
|
-
groupMemberAddMode: (jid: string, mode: "
|
|
72
|
+
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
|
|
73
|
+
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
|
|
86
74
|
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
87
75
|
groupFetchAllParticipating: () => Promise<{
|
|
88
|
-
[_: string]: import("../Types
|
|
76
|
+
[_: string]: import("../Types").GroupMetadata;
|
|
89
77
|
}>;
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
78
|
+
communityMetadata: (jid: string) => Promise<CommunityMetadata>
|
|
79
|
+
communityCreate: (subject: string, body?: string) => Promise<GroupMetadata | null>
|
|
80
|
+
communityCreateGroup: (subject: string, participants: string[], parentCommunityJid: string) => Promise<GroupMetadata | null>
|
|
81
|
+
communityLeave: (id: string) => Promise<void>
|
|
82
|
+
communityUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
83
|
+
communityLinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>
|
|
84
|
+
communityUnlinkGroup: (groupJid: string, parentCommunityJid: string) => Promise<void>
|
|
85
|
+
communityFetchLinkedGroups: (jid: string) => Promise<CommunityLinkedGroups>
|
|
86
|
+
communityRequestParticipantsList: (jid: string) => Promise<{ [key: string]: string }[]>
|
|
87
|
+
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: 'approve' | 'reject') => Promise<{ status: string, jid: string }[]>
|
|
88
|
+
communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{ status: string, jid: string, content: BinaryNode }[]>
|
|
89
|
+
communityUpdateDescription: (jid: string, description?: string) => Promise<void>
|
|
90
|
+
communityInviteCode: (jid: string) => Promise<string | undefined>
|
|
91
|
+
communityRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
92
|
+
communityAcceptInvite: (code: string) => Promise<string | undefined>
|
|
93
|
+
/**
|
|
94
|
+
* revoke a v4 invite for someone
|
|
95
|
+
* @param communityJid community jid
|
|
96
|
+
* @param invitedJid jid of person you invited
|
|
97
|
+
* @returns true if successful
|
|
98
|
+
*/
|
|
99
|
+
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>
|
|
100
|
+
/**
|
|
101
|
+
* accept a CommunityInviteMessage
|
|
102
|
+
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
|
103
|
+
* @param inviteMessage the message to accept
|
|
104
|
+
*/
|
|
105
|
+
communityAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>
|
|
106
|
+
communityGetInviteInfo: (code: string) => Promise<CommunityMetadata>
|
|
107
|
+
communityToggleEphemeral: (jid: string, ephemeralExpiration?: number) => Promise<void>
|
|
108
|
+
communitySettingUpdate: (jid: string, setting: 'locked' | 'announcement' | 'not_announcement' | 'unlocked') => Promise<void>
|
|
109
|
+
communityMemberAddMode: (jid: string, mode: 'admin_add' | 'all_member_add') => Promise<void>
|
|
110
|
+
communityJoinApprovalMode: (jid: string, mode: 'on' | 'off') => Promise<void>
|
|
111
|
+
communityFetchAllParticipating: () => Promise<{ [_: string]: CommunityMetadata }>
|
|
112
|
+
processingMutex: {
|
|
113
|
+
mutex<T>(code: () => T | Promise<T>): Promise<T>;
|
|
107
114
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
}
|
|
115
|
+
upsertMessage: (msg: proto.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
|
+
profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
|
|
120
|
+
onWhatsApp: (...jids: string[]) => Promise<{
|
|
121
|
+
jid: string;
|
|
122
|
+
exists: unknown;
|
|
123
|
+
lid: unknown;
|
|
124
|
+
}[] | undefined>;
|
|
125
|
+
fetchBlocklist: () => Promise<string[]>;
|
|
126
|
+
fetchStatus: (jid: string) => Promise<{
|
|
127
|
+
status: string | undefined;
|
|
128
|
+
setAt: Date;
|
|
129
|
+
} | undefined>;
|
|
130
|
+
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
|
123
131
|
removeProfilePicture: (jid: string) => Promise<void>;
|
|
124
132
|
updateProfileStatus: (status: string) => Promise<void>;
|
|
125
133
|
updateProfileName: (name: string) => Promise<void>;
|
|
126
134
|
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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>;
|
|
135
|
+
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
136
|
+
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
|
137
|
+
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
138
|
+
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
139
|
+
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
|
140
|
+
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
|
136
141
|
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
137
|
-
getBusinessProfile: (jid: string) => Promise<import("../Types
|
|
138
|
-
resyncAppState: (collections: readonly ("
|
|
139
|
-
chatModify: (mod: import("../Types
|
|
140
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number |
|
|
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>;
|
|
142
|
+
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
|
|
143
|
+
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
144
|
+
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
|
145
|
+
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
|
|
145
146
|
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
146
147
|
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
147
148
|
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
148
149
|
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
149
150
|
star: (jid: string, messages: {
|
|
150
151
|
id: string;
|
|
151
|
-
fromMe?: boolean;
|
|
152
|
+
fromMe?: boolean | undefined;
|
|
152
153
|
}[], star: boolean) => Promise<void>;
|
|
153
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
154
|
-
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
155
154
|
type: "md";
|
|
156
|
-
ws:
|
|
157
|
-
ev: import("../Types
|
|
158
|
-
process(handler: (events: Partial<import("../Types
|
|
155
|
+
ws: any;
|
|
156
|
+
ev: import("../Types").BaileysEventEmitter & {
|
|
157
|
+
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
159
158
|
buffer(): void;
|
|
160
|
-
createBufferedFunction<A extends any[],
|
|
161
|
-
flush(): boolean;
|
|
159
|
+
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
|
|
160
|
+
flush(force?: boolean | undefined): boolean;
|
|
162
161
|
isBuffering(): boolean;
|
|
163
|
-
destroy(): void;
|
|
164
162
|
};
|
|
165
163
|
authState: {
|
|
166
|
-
creds: import("../Types
|
|
167
|
-
keys: import("../Types
|
|
164
|
+
creds: import("../Types").AuthenticationCreds;
|
|
165
|
+
keys: import("../Types").SignalKeyStoreWithTransaction;
|
|
168
166
|
};
|
|
169
|
-
signalRepository: import("../Types
|
|
170
|
-
user: import("../Types
|
|
167
|
+
signalRepository: import("../Types").SignalRepository;
|
|
168
|
+
user: import("../Types").Contact | undefined;
|
|
171
169
|
generateMessageTag: () => string;
|
|
172
|
-
query: (node: BinaryNode, timeoutMs?: number) => Promise<
|
|
173
|
-
waitForMessage: <
|
|
170
|
+
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
|
|
171
|
+
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
|
|
174
172
|
waitForSocketOpen: () => Promise<void>;
|
|
175
173
|
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
176
174
|
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
177
|
-
logout: (msg?: string) => Promise<void>;
|
|
178
|
-
end: (error: Error | undefined) =>
|
|
179
|
-
|
|
180
|
-
onUnexpectedError: (err: Error | Boom, msg: string) => void;
|
|
175
|
+
logout: (msg?: string | undefined) => Promise<void>;
|
|
176
|
+
end: (error: Error | undefined) => void;
|
|
177
|
+
onUnexpectedError: (err: Error | Boom<any>, msg: string) => void;
|
|
181
178
|
uploadPreKeys: (count?: number) => Promise<void>;
|
|
182
179
|
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
187
|
-
sendUnifiedSession: () => Promise<void>;
|
|
188
|
-
wamBuffer: import("../index.js").BinaryInfo;
|
|
189
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types/index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
190
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
191
|
-
executeUSyncQuery: (usyncQuery: USyncQuery) => Promise<import("../WAUSync/index.js").USyncQueryResult | undefined>;
|
|
192
|
-
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
193
|
-
jid: string;
|
|
194
|
-
exists: boolean;
|
|
195
|
-
}[] | undefined>;
|
|
196
|
-
fetchAccountReachoutTimelock: () => Promise<import("../Types/index.js").ReachoutTimelockState>;
|
|
197
|
-
fetchNewChatMessageCap: () => Promise<import("../Types/index.js").NewChatMessageCapInfo>;
|
|
180
|
+
requestPairingCode: (phoneNumber: string) => Promise<string>;
|
|
181
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
|
|
182
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
|
|
198
183
|
};
|
|
199
|
-
//# sourceMappingURL=messages-send.d.ts.map
|