@jkt48connect-corp/baileys 7.2.7 → 7.2.8
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/LICENSE +1 -1
- package/README.md +838 -94
- package/WAProto/WAProto.proto +969 -88
- package/WAProto/index.d.ts +13199 -1260
- package/WAProto/index.js +124901 -74525
- package/lib/Defaults/baileys-version.json +1 -1
- package/lib/Defaults/index.d.ts +7 -8
- package/lib/Defaults/index.js +5 -3
- package/lib/Defaults/phonenumber-mcc.json +221 -221
- package/lib/Signal/libsignal.js +18 -9
- package/lib/Socket/Client/abstract-socket-client.d.ts +0 -2
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -1
- package/lib/Socket/business.d.ts +40 -40
- package/lib/Socket/chats.d.ts +13 -14
- package/lib/Socket/groups.d.ts +20 -21
- package/lib/Socket/groups.js +1 -1
- package/lib/Socket/index.d.ts +49 -49
- package/lib/Socket/messages-recv.d.ts +39 -39
- package/lib/Socket/messages-recv.js +310 -151
- package/lib/Socket/messages-send.d.ts +33 -31
- package/lib/Socket/messages-send.js +269 -36
- package/lib/Socket/newsletter.d.ts +24 -25
- package/lib/Socket/newsletter.js +3 -3
- package/lib/Socket/registration.d.ts +49 -52
- package/lib/Socket/registration.js +7 -7
- package/lib/Socket/socket.d.ts +6 -7
- package/lib/Socket/socket.js +7 -3
- package/lib/Store/make-cache-manager-store.d.ts +1 -0
- package/lib/Store/make-in-memory-store.d.ts +3 -4
- package/lib/Store/make-in-memory-store.js +13 -11
- package/lib/Store/make-ordered-dictionary.d.ts +1 -1
- package/lib/Types/Auth.d.ts +0 -1
- package/lib/Types/Call.d.ts +1 -1
- package/lib/Types/Chat.d.ts +12 -7
- package/lib/Types/Events.d.ts +17 -2
- package/lib/Types/GroupMetadata.d.ts +3 -1
- package/lib/Types/Label.d.ts +11 -0
- package/lib/Types/Label.js +1 -1
- package/lib/Types/LabelAssociation.js +1 -1
- package/lib/Types/Message.d.ts +164 -13
- package/lib/Types/Newsletter.js +3 -3
- package/lib/Types/Socket.d.ts +7 -2
- package/lib/Types/index.d.ts +9 -0
- package/lib/Types/index.js +1 -1
- package/lib/Utils/auth-utils.js +3 -3
- package/lib/Utils/business.d.ts +1 -1
- package/lib/Utils/business.js +2 -2
- package/lib/Utils/chat-utils.d.ts +11 -12
- package/lib/Utils/chat-utils.js +41 -20
- package/lib/Utils/crypto.d.ts +15 -16
- package/lib/Utils/crypto.js +35 -23
- package/lib/Utils/decode-wa-message.d.ts +17 -0
- package/lib/Utils/decode-wa-message.js +43 -15
- package/lib/Utils/generics.d.ts +10 -19
- package/lib/Utils/generics.js +32 -16
- package/lib/Utils/history.d.ts +6 -2
- package/lib/Utils/history.js +3 -0
- package/lib/Utils/index.d.ts +0 -1
- package/lib/Utils/index.js +0 -1
- package/lib/Utils/logger.d.ts +1 -3
- package/lib/Utils/make-mutex.d.ts +2 -2
- package/lib/Utils/messages-media.d.ts +25 -28
- package/lib/Utils/messages-media.js +38 -47
- package/lib/Utils/messages.d.ts +5 -8
- package/lib/Utils/messages.js +430 -12
- package/lib/Utils/noise-handler.d.ts +4 -5
- package/lib/Utils/process-message.js +2 -2
- package/lib/Utils/use-multi-file-auth-state.js +17 -3
- package/lib/Utils/validate-connection.d.ts +2 -2
- package/lib/Utils/validate-connection.js +12 -23
- package/lib/WABinary/decode.d.ts +1 -2
- package/lib/WABinary/decode.js +17 -7
- package/lib/WABinary/encode.d.ts +1 -2
- package/lib/WABinary/encode.js +33 -17
- package/lib/WABinary/generic-utils.d.ts +2 -3
- package/lib/WABinary/generic-utils.js +2 -2
- package/lib/WABinary/jid-utils.d.ts +1 -1
- package/lib/WAM/BinaryInfo.d.ts +2 -11
- package/lib/WAM/encode.d.ts +1 -2
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +9 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +22 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +57 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +30 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +12 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +42 -0
- package/lib/WAUSync/Protocols/index.d.ts +4 -0
- package/lib/WAUSync/Protocols/index.js +20 -0
- package/lib/WAUSync/USyncQuery.d.ts +26 -0
- package/lib/WAUSync/USyncQuery.js +79 -0
- package/lib/WAUSync/USyncUser.d.ts +10 -0
- package/lib/WAUSync/USyncUser.js +22 -0
- package/lib/WAUSync/index.d.ts +3 -0
- package/lib/WAUSync/index.js +19 -0
- package/lib/index.js +4 -1
- package/package.json +15 -10
- package/lib/Socket/community.d.ts +0 -219
- package/lib/Socket/community.js +0 -354
- package/lib/Utils/use-single-file-auth-statev2.d.ts +0 -12
- package/lib/Utils/use-single-file-auth-statev2.js +0 -75
- package/lib/index.d.ts +0 -11
@@ -0,0 +1,22 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.USyncUser = void 0;
|
4
|
+
class USyncUser {
|
5
|
+
withId(id) {
|
6
|
+
this.id = id;
|
7
|
+
return this;
|
8
|
+
}
|
9
|
+
withLid(lid) {
|
10
|
+
this.lid = lid;
|
11
|
+
return this;
|
12
|
+
}
|
13
|
+
withPhone(phone) {
|
14
|
+
this.phone = phone;
|
15
|
+
return this;
|
16
|
+
}
|
17
|
+
withType(type) {
|
18
|
+
this.type = type;
|
19
|
+
return this;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
exports.USyncUser = USyncUser;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
3
|
+
if (k2 === undefined) k2 = k;
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
7
|
+
}
|
8
|
+
Object.defineProperty(o, k2, desc);
|
9
|
+
}) : (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
o[k2] = m[k];
|
12
|
+
}));
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
|
+
};
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
+
__exportStar(require("./Protocols"), exports);
|
18
|
+
__exportStar(require("./USyncQuery"), exports);
|
19
|
+
__exportStar(require("./USyncUser"), exports);
|
package/lib/index.js
CHANGED
@@ -17,7 +17,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
18
18
|
};
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
20
|
-
exports.makeWASocket = void 0;
|
20
|
+
exports.proto = exports.makeWASocket = void 0;
|
21
|
+
const WAProto_1 = require("../WAProto");
|
22
|
+
Object.defineProperty(exports, "proto", { enumerable: true, get: function () { return WAProto_1.proto; } });
|
21
23
|
const Socket_1 = __importDefault(require("./Socket"));
|
22
24
|
exports.makeWASocket = Socket_1.default;
|
23
25
|
__exportStar(require("../WAProto"), exports);
|
@@ -27,4 +29,5 @@ __exportStar(require("./Store"), exports);
|
|
27
29
|
__exportStar(require("./Defaults"), exports);
|
28
30
|
__exportStar(require("./WABinary"), exports);
|
29
31
|
__exportStar(require("./WAM"), exports);
|
32
|
+
__exportStar(require("./WAUSync"), exports);
|
30
33
|
exports.default = Socket_1.default;
|
package/package.json
CHANGED
@@ -1,22 +1,29 @@
|
|
1
1
|
{
|
2
2
|
"name": "@jkt48connect-corp/baileys",
|
3
|
-
"version": "7.2.
|
4
|
-
"description": "WhatsApp
|
3
|
+
"version": "7.2.8",
|
4
|
+
"description": "WhatsApp API",
|
5
5
|
"keywords": [
|
6
|
+
"Baileys",
|
7
|
+
"whiskeysockets/baileys",
|
8
|
+
"whatsapp",
|
9
|
+
"meta",
|
10
|
+
"valzyy",
|
11
|
+
"jkt48connect",
|
6
12
|
"whatsapp",
|
7
13
|
"js-whatsapp",
|
8
14
|
"whatsapp-api",
|
9
15
|
"whatsapp-web",
|
16
|
+
"whatsapp-chat",
|
17
|
+
"whatsapp-group",
|
18
|
+
"automation",
|
10
19
|
"multi-device",
|
11
|
-
"
|
12
|
-
"indraa"
|
20
|
+
"modder"
|
13
21
|
],
|
14
|
-
"homepage": "https://github.com/WhiskeySockets/Baileys",
|
15
22
|
"repository": {
|
16
|
-
"url": "
|
23
|
+
"url": ""
|
17
24
|
},
|
18
25
|
"license": "MIT",
|
19
|
-
"author": "
|
26
|
+
"author": "jkt48connect-corp",
|
20
27
|
"main": "lib/index.js",
|
21
28
|
"types": "lib/index.d.ts",
|
22
29
|
"files": [
|
@@ -36,14 +43,13 @@
|
|
36
43
|
"gen:protobuf": "sh WAProto/GenerateStatics.sh",
|
37
44
|
"lint": "eslint src --ext .js,.ts,.jsx,.tsx",
|
38
45
|
"lint:fix": "eslint src --fix --ext .js,.ts,.jsx,.tsx",
|
39
|
-
"prepack": "tsc",
|
40
|
-
"prepare": "tsc",
|
41
46
|
"release": "release-it",
|
42
47
|
"test": "jest"
|
43
48
|
},
|
44
49
|
"dependencies": {
|
45
50
|
"@adiwajshing/keyed-db": "^0.2.4",
|
46
51
|
"@hapi/boom": "^9.1.3",
|
52
|
+
"async-lock": "^1.4.1",
|
47
53
|
"audio-decode": "^2.1.3",
|
48
54
|
"axios": "^1.3.3",
|
49
55
|
"cache-manager": "4.0.1",
|
@@ -59,7 +65,6 @@
|
|
59
65
|
},
|
60
66
|
"devDependencies": {
|
61
67
|
"@adiwajshing/eslint-config": "github:adiwajshing/eslint-config",
|
62
|
-
"@jkt48connect/cli": "^3.0.12",
|
63
68
|
"@types/got": "^9.6.11",
|
64
69
|
"@types/jest": "^27.5.1",
|
65
70
|
"@types/node": "^16.0.0",
|
@@ -1,219 +0,0 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import { proto } from '../../WAProto';
|
3
|
-
import { GroupMetadata, ParticipantAction, SocketConfig } from '../Types';
|
4
|
-
import { BinaryNode } from '../WABinary';
|
5
|
-
export declare const makeCommunitiesSocket: (config: SocketConfig) => {
|
6
|
-
communityMetadata: (jid: string) => Promise<GroupMetadata>;
|
7
|
-
communityCreate: (subject: any, body: any) => Promise<GroupMetadata | null>;
|
8
|
-
communityLeave: (id: string) => Promise<void>;
|
9
|
-
communityUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
10
|
-
communityRequestParticipantsList: (jid: string) => Promise<{
|
11
|
-
[key: string]: string;
|
12
|
-
}[]>;
|
13
|
-
communityRequestParticipantsUpdate: (jid: string, participants: string[], action: 'approve' | 'reject') => Promise<{
|
14
|
-
status: string;
|
15
|
-
jid: string;
|
16
|
-
}[]>;
|
17
|
-
communityParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
18
|
-
status: string;
|
19
|
-
jid: string;
|
20
|
-
content: BinaryNode;
|
21
|
-
}[]>;
|
22
|
-
communityUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
23
|
-
communityInviteCode: (jid: string) => Promise<string | undefined>;
|
24
|
-
communityRevokeInvite: (jid: string) => Promise<string | undefined>;
|
25
|
-
communityAcceptInvite: (code: string) => Promise<string | undefined>;
|
26
|
-
/**
|
27
|
-
* revoke a v4 invite for someone
|
28
|
-
* @param communityJid community jid
|
29
|
-
* @param invitedJid jid of person you invited
|
30
|
-
* @returns true if successful
|
31
|
-
*/
|
32
|
-
communityRevokeInviteV4: (communityJid: string, invitedJid: string) => Promise<boolean>;
|
33
|
-
/**
|
34
|
-
* accept a CommunityInviteMessage
|
35
|
-
* @param key the key of the invite message, or optionally only provide the jid of the person who sent the invite
|
36
|
-
* @param inviteMessage the message to accept
|
37
|
-
*/
|
38
|
-
communityAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
|
39
|
-
communityGetInviteInfo: (code: string) => Promise<GroupMetadata>;
|
40
|
-
communityToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
41
|
-
communitySettingUpdate: (jid: string, setting: 'announcement' | 'not_announcement' | 'locked' | 'unlocked') => Promise<void>;
|
42
|
-
communityMemberAddMode: (jid: string, mode: 'admin_add' | 'all_member_add') => Promise<void>;
|
43
|
-
communityJoinApprovalMode: (jid: string, mode: 'on' | 'off') => Promise<void>;
|
44
|
-
communityFetchAllParticipating: () => Promise<{
|
45
|
-
[_: string]: GroupMetadata;
|
46
|
-
}>;
|
47
|
-
logger: import("pino").Logger<import("pino").LoggerOptions>;
|
48
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>;
|
49
|
-
getCatalog: ({ jid, limit, cursor }: import("../Types").GetCatalogOptions) => Promise<{
|
50
|
-
products: import("../Types").Product[];
|
51
|
-
nextPageCursor: string | undefined;
|
52
|
-
}>;
|
53
|
-
getCollections: (jid?: string | undefined, limit?: number) => Promise<{
|
54
|
-
collections: import("../Types").CatalogCollection[];
|
55
|
-
}>;
|
56
|
-
productCreate: (create: import("../Types").ProductCreate) => Promise<import("../Types").Product>;
|
57
|
-
productDelete: (productIds: string[]) => Promise<{
|
58
|
-
deleted: number;
|
59
|
-
}>;
|
60
|
-
productUpdate: (productId: string, update: import("../Types").ProductUpdate) => Promise<import("../Types").Product>;
|
61
|
-
sendMessageAck: ({ tag, attrs, content }: BinaryNode) => Promise<void>;
|
62
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
63
|
-
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
64
|
-
id: string;
|
65
|
-
to: string;
|
66
|
-
}>;
|
67
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
68
|
-
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>;
|
69
|
-
assertSessions: (jids: string[], force: boolean) => Promise<boolean>;
|
70
|
-
relayMessage: (jid: string, message: proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, cachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>;
|
71
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
72
|
-
sendReceipts: (keys: proto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>;
|
73
|
-
getButtonArgs: (message: proto.IMessage) => {
|
74
|
-
[key: string]: string;
|
75
|
-
};
|
76
|
-
readMessages: (keys: proto.IMessageKey[]) => Promise<void>;
|
77
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>;
|
78
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>;
|
79
|
-
createParticipantNodes: (jids: string[], message: proto.IMessage, extraAttrs?: {
|
80
|
-
[key: string]: string;
|
81
|
-
} | undefined) => Promise<{
|
82
|
-
nodes: BinaryNode[];
|
83
|
-
shouldIncludeDeviceIdentity: boolean;
|
84
|
-
}>;
|
85
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction;
|
86
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
87
|
-
[_: string]: string;
|
88
|
-
}>;
|
89
|
-
updateMediaMessage: (message: proto.IWebMessageInfo) => Promise<proto.IWebMessageInfo>;
|
90
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<proto.WebMessageInfo | undefined>;
|
91
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
92
|
-
duration: string;
|
93
|
-
}>;
|
94
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>;
|
95
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
96
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>;
|
97
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
98
|
-
newsletterRemovePicture: (jid: string) => Promise<void>;
|
99
|
-
newsletterUnfollow: (jid: string) => Promise<void>;
|
100
|
-
newsletterFollow: (jid: string) => Promise<void>;
|
101
|
-
newsletterUnmute: (jid: string) => Promise<void>;
|
102
|
-
newsletterMute: (jid: string) => Promise<void>;
|
103
|
-
newsletterAction: (jid: string, type: "mute" | "follow" | "unfollow" | "unmute") => Promise<void>;
|
104
|
-
newsletterCreate: (name: string, description: string, reaction_codes: string) => Promise<import("../Types").NewsletterMetadata>;
|
105
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>;
|
106
|
-
newsletterAdminCount: (jid: string) => Promise<number>;
|
107
|
-
newsletterChangeOwner: (jid: string, user: string) => Promise<void>;
|
108
|
-
newsletterDemote: (jid: string, user: string) => Promise<void>;
|
109
|
-
newsletterDelete: (jid: string) => Promise<void>;
|
110
|
-
newsletterReactMessage: (jid: string, serverId: string, code?: string | undefined) => Promise<void>;
|
111
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
112
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>;
|
113
|
-
groupMetadata: (jid: string) => Promise<GroupMetadata>;
|
114
|
-
groupCreate: (subject: string, participants: string[]) => Promise<GroupMetadata>;
|
115
|
-
groupLeave: (id: string) => Promise<void>;
|
116
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
117
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
118
|
-
[key: string]: string;
|
119
|
-
}[]>;
|
120
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
121
|
-
status: string;
|
122
|
-
jid: string;
|
123
|
-
}[]>;
|
124
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: ParticipantAction) => Promise<{
|
125
|
-
status: string;
|
126
|
-
jid: string;
|
127
|
-
content: BinaryNode;
|
128
|
-
}[]>;
|
129
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>;
|
130
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
131
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
132
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
133
|
-
groupAcceptInviteV4: (key: string | proto.IMessageKey, inviteMessage: proto.Message.IGroupInviteMessage) => Promise<string>;
|
134
|
-
groupGetInviteInfo: (code: string) => Promise<GroupMetadata>;
|
135
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
136
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>;
|
137
|
-
/**
|
138
|
-
* revoke a v4 invite for someone
|
139
|
-
* @param communityJid community jid
|
140
|
-
* @param invitedJid jid of person you invited
|
141
|
-
* @returns true if successful
|
142
|
-
*/
|
143
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>;
|
144
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
145
|
-
groupFetchAllParticipating: () => Promise<{
|
146
|
-
[_: string]: GroupMetadata;
|
147
|
-
}>;
|
148
|
-
processingMutex: {
|
149
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>;
|
150
|
-
};
|
151
|
-
upsertMessage: (msg: proto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>;
|
152
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>;
|
153
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>;
|
154
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>;
|
155
|
-
profilePictureUrl: (jid: string, type?: "image" | "preview", timeoutMs?: number | undefined) => Promise<string | undefined>;
|
156
|
-
onWhatsApp: (...jids: string[]) => Promise<{
|
157
|
-
exists: boolean;
|
158
|
-
jid: string;
|
159
|
-
}[]>;
|
160
|
-
fetchBlocklist: () => Promise<string[]>;
|
161
|
-
fetchStatus: (jid: string) => Promise<{
|
162
|
-
status: string | undefined;
|
163
|
-
setAt: Date;
|
164
|
-
} | undefined>;
|
165
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>;
|
166
|
-
removeProfilePicture: (jid: string) => Promise<void>;
|
167
|
-
updateProfileStatus: (status: string) => Promise<void>;
|
168
|
-
updateProfileName: (name: string) => Promise<void>;
|
169
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
170
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
171
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>;
|
172
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
173
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
174
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>;
|
175
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>;
|
176
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
177
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>;
|
178
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
179
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>;
|
180
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>;
|
181
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
182
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
183
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
184
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
185
|
-
star: (jid: string, messages: {
|
186
|
-
id: string;
|
187
|
-
fromMe?: boolean | undefined;
|
188
|
-
}[], star: boolean) => Promise<void>;
|
189
|
-
type: "md";
|
190
|
-
ws: any;
|
191
|
-
ev: import("../Types").BaileysEventEmitter & {
|
192
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void;
|
193
|
-
buffer(): void;
|
194
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>;
|
195
|
-
flush(force?: boolean | undefined): boolean;
|
196
|
-
isBuffering(): boolean;
|
197
|
-
};
|
198
|
-
authState: {
|
199
|
-
creds: import("../Types").AuthenticationCreds;
|
200
|
-
keys: import("../Types").SignalKeyStoreWithTransaction;
|
201
|
-
};
|
202
|
-
signalRepository: import("../Types").SignalRepository;
|
203
|
-
user: import("../Types").Contact | undefined;
|
204
|
-
generateMessageTag: () => string;
|
205
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>;
|
206
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>;
|
207
|
-
waitForSocketOpen: () => Promise<void>;
|
208
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
209
|
-
sendNode: (frame: BinaryNode) => Promise<void>;
|
210
|
-
logout: (msg?: string | undefined) => Promise<void>;
|
211
|
-
end: (error: Error | undefined) => void;
|
212
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void;
|
213
|
-
uploadPreKeys: (count?: number) => Promise<void>;
|
214
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
215
|
-
requestPairingCode: (phoneNumber: string) => Promise<string>;
|
216
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>;
|
217
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>;
|
218
|
-
};
|
219
|
-
export declare const extractCommunityMetadata: (result: BinaryNode) => GroupMetadata;
|