@neelegirl/baileys 1.5.3 → 1.5.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.md +16 -195
- package/index.js +38 -0
- package/package.json +16 -96
- package/LICENSE +0 -21
- package/WAProto/WAProto.proto +0 -5308
- package/WAProto/index.d.ts +0 -61295
- package/WAProto/index.js +0 -189754
- package/lib/Defaults/baileys-version.json +0 -3
- package/lib/Defaults/index.d.ts +0 -78
- package/lib/Defaults/index.js +0 -149
- package/lib/Defaults/phonenumber-mcc.json +0 -223
- package/lib/Signal/WASignalGroup/GroupProtocol.js +0 -1909
- package/lib/Signal/WASignalGroup/ciphertext-message.d.ts +0 -9
- package/lib/Signal/WASignalGroup/ciphertext-message.js +0 -19
- package/lib/Signal/WASignalGroup/ciphertext_message.js +0 -16
- package/lib/Signal/WASignalGroup/generate-proto.sh +0 -1
- package/lib/Signal/WASignalGroup/group-session-builder.d.ts +0 -17
- package/lib/Signal/WASignalGroup/group-session-builder.js +0 -72
- package/lib/Signal/WASignalGroup/group.proto +0 -42
- package/lib/Signal/WASignalGroup/group_cipher.d.ts +0 -19
- package/lib/Signal/WASignalGroup/group_cipher.js +0 -111
- package/lib/Signal/WASignalGroup/group_session_builder.js +0 -46
- package/lib/Signal/WASignalGroup/index.d.ts +0 -11
- package/lib/Signal/WASignalGroup/index.js +0 -61
- package/lib/Signal/WASignalGroup/keyhelper.d.ts +0 -16
- package/lib/Signal/WASignalGroup/keyhelper.js +0 -66
- package/lib/Signal/WASignalGroup/protobufs.js +0 -3
- package/lib/Signal/WASignalGroup/queue_job.js +0 -69
- package/lib/Signal/WASignalGroup/readme.md +0 -6
- package/lib/Signal/WASignalGroup/sender-chain-key.d.ts +0 -14
- package/lib/Signal/WASignalGroup/sender-chain-key.js +0 -47
- package/lib/Signal/WASignalGroup/sender-key-distribution-message.d.ts +0 -17
- package/lib/Signal/WASignalGroup/sender-key-distribution-message.js +0 -71
- package/lib/Signal/WASignalGroup/sender-key-message.d.ts +0 -19
- package/lib/Signal/WASignalGroup/sender-key-message.js +0 -73
- package/lib/Signal/WASignalGroup/sender-key-name.d.ts +0 -19
- package/lib/Signal/WASignalGroup/sender-key-name.js +0 -59
- package/lib/Signal/WASignalGroup/sender-key-record.d.ts +0 -32
- package/lib/Signal/WASignalGroup/sender-key-record.js +0 -58
- package/lib/Signal/WASignalGroup/sender-key-state.d.ts +0 -44
- package/lib/Signal/WASignalGroup/sender-key-state.js +0 -147
- package/lib/Signal/WASignalGroup/sender-message-key.d.ts +0 -11
- package/lib/Signal/WASignalGroup/sender-message-key.js +0 -33
- package/lib/Signal/WASignalGroup/sender_chain_key.js +0 -50
- package/lib/Signal/WASignalGroup/sender_key_distribution_message.js +0 -78
- package/lib/Signal/WASignalGroup/sender_key_message.js +0 -92
- package/lib/Signal/WASignalGroup/sender_key_name.js +0 -70
- package/lib/Signal/WASignalGroup/sender_key_record.js +0 -56
- package/lib/Signal/WASignalGroup/sender_key_state.js +0 -129
- package/lib/Signal/WASignalGroup/sender_message_key.js +0 -39
- package/lib/Signal/libsignal.d.ts +0 -8
- package/lib/Signal/libsignal.js +0 -391
- package/lib/Signal/lid-mapping.d.ts +0 -28
- package/lib/Signal/lid-mapping.js +0 -184
- package/lib/Socket/Client/abstract-socket-client.d.ts +0 -15
- package/lib/Socket/Client/abstract-socket-client.js +0 -13
- package/lib/Socket/Client/index.d.ts +0 -2
- package/lib/Socket/Client/index.js +0 -22
- package/lib/Socket/Client/mobile-socket-client.d.ts +0 -12
- package/lib/Socket/Client/mobile-socket-client.js +0 -65
- package/lib/Socket/Client/types.d.ts +0 -16
- package/lib/Socket/Client/types.js +0 -18
- package/lib/Socket/Client/websocket.d.ts +0 -13
- package/lib/Socket/Client/websocket.js +0 -62
- package/lib/Socket/business.d.ts +0 -187
- package/lib/Socket/business.js +0 -415
- package/lib/Socket/chats.d.ts +0 -97
- package/lib/Socket/chats.js +0 -1118
- package/lib/Socket/communities.d.ts +0 -223
- package/lib/Socket/communities.js +0 -433
- package/lib/Socket/groups.d.ts +0 -129
- package/lib/Socket/groups.js +0 -360
- package/lib/Socket/index.d.ts +0 -191
- package/lib/Socket/index.js +0 -24
- package/lib/Socket/messages-recv.d.ts +0 -174
- package/lib/Socket/messages-recv.js +0 -1506
- package/lib/Socket/messages-send.d.ts +0 -165
- package/lib/Socket/messages-send.js +0 -1785
- package/lib/Socket/mex.d.ts +0 -2
- package/lib/Socket/mex.js +0 -47
- package/lib/Socket/newsletter.d.ts +0 -145
- package/lib/Socket/newsletter.js +0 -295
- package/lib/Socket/socket.d.ts +0 -45
- package/lib/Socket/socket.js +0 -934
- package/lib/Socket/usync.d.ts +0 -37
- package/lib/Socket/usync.js +0 -83
- package/lib/Store/index.d.ts +0 -4
- package/lib/Store/index.js +0 -24
- package/lib/Store/make-cache-manager-store.d.ts +0 -14
- package/lib/Store/make-cache-manager-store.js +0 -90
- package/lib/Store/make-in-memory-store.d.ts +0 -123
- package/lib/Store/make-in-memory-store.js +0 -429
- package/lib/Store/make-ordered-dictionary.d.ts +0 -12
- package/lib/Store/make-ordered-dictionary.js +0 -86
- package/lib/Store/object-repository.d.ts +0 -10
- package/lib/Store/object-repository.js +0 -31
- package/lib/Types/Auth.d.ts +0 -121
- package/lib/Types/Auth.js +0 -3
- package/lib/Types/Bussines.js +0 -3
- package/lib/Types/Bussiness.d.ts +0 -28
- package/lib/Types/Call.d.ts +0 -14
- package/lib/Types/Call.js +0 -3
- package/lib/Types/Chat.d.ts +0 -143
- package/lib/Types/Chat.js +0 -9
- package/lib/Types/Contact.d.ts +0 -23
- package/lib/Types/Contact.js +0 -3
- package/lib/Types/Events.d.ts +0 -226
- package/lib/Types/Events.js +0 -3
- package/lib/Types/GroupMetadata.d.ts +0 -66
- package/lib/Types/GroupMetadata.js +0 -3
- package/lib/Types/Label.d.ts +0 -48
- package/lib/Types/Label.js +0 -31
- package/lib/Types/LabelAssociation.d.ts +0 -35
- package/lib/Types/LabelAssociation.js +0 -13
- package/lib/Types/Message.d.ts +0 -484
- package/lib/Types/Message.js +0 -19
- package/lib/Types/MexUpdates.d.ts +0 -9
- package/lib/Types/MexUpdates.js +0 -18
- package/lib/Types/Newsletter.d.ts +0 -109
- package/lib/Types/Newsletter.js +0 -40
- package/lib/Types/Product.d.ts +0 -92
- package/lib/Types/Product.js +0 -3
- package/lib/Types/Signal.d.ts +0 -98
- package/lib/Types/Signal.js +0 -3
- package/lib/Types/Socket.d.ts +0 -141
- package/lib/Types/Socket.js +0 -3
- package/lib/Types/State.d.ts +0 -41
- package/lib/Types/State.js +0 -14
- package/lib/Types/USync.d.ts +0 -26
- package/lib/Types/USync.js +0 -3
- package/lib/Types/index.d.ts +0 -80
- package/lib/Types/index.js +0 -50
- package/lib/Utils/auth-utils.d.ts +0 -21
- package/lib/Utils/auth-utils.js +0 -528
- package/lib/Utils/baileys-event-stream.d.ts +0 -18
- package/lib/Utils/baileys-event-stream.js +0 -70
- package/lib/Utils/business.d.ts +0 -29
- package/lib/Utils/business.js +0 -255
- package/lib/Utils/chat-utils.d.ts +0 -82
- package/lib/Utils/chat-utils.js +0 -809
- package/lib/Utils/crypto.d.ts +0 -56
- package/lib/Utils/crypto.js +0 -189
- package/lib/Utils/decode-wa-message.d.ts +0 -53
- package/lib/Utils/decode-wa-message.js +0 -323
- package/lib/Utils/event-buffer.d.ts +0 -39
- package/lib/Utils/event-buffer.js +0 -595
- package/lib/Utils/generics.d.ts +0 -131
- package/lib/Utils/generics.js +0 -630
- package/lib/Utils/history.d.ts +0 -23
- package/lib/Utils/history.js +0 -104
- package/lib/Utils/index.d.ts +0 -20
- package/lib/Utils/index.js +0 -40
- package/lib/Utils/link-preview.d.ts +0 -23
- package/lib/Utils/link-preview.js +0 -120
- package/lib/Utils/logger.d.ts +0 -13
- package/lib/Utils/logger.js +0 -7
- package/lib/Utils/lt-hash.d.ts +0 -14
- package/lib/Utils/lt-hash.js +0 -58
- package/lib/Utils/make-mutex.d.ts +0 -9
- package/lib/Utils/make-mutex.js +0 -49
- package/lib/Utils/message-retry-manager.d.ts +0 -88
- package/lib/Utils/message-retry-manager.js +0 -160
- package/lib/Utils/messages-media.d.ts +0 -135
- package/lib/Utils/messages-media.js +0 -869
- package/lib/Utils/messages.d.ts +0 -105
- package/lib/Utils/messages.js +0 -1745
- package/lib/Utils/noise-handler.d.ts +0 -21
- package/lib/Utils/noise-handler.js +0 -165
- package/lib/Utils/process-message.d.ts +0 -49
- package/lib/Utils/process-message.js +0 -427
- package/lib/Utils/signal.d.ts +0 -42
- package/lib/Utils/signal.js +0 -166
- package/lib/Utils/use-mongo-file-auth-state.d.ts +0 -6
- package/lib/Utils/use-mongo-file-auth-state.js +0 -84
- package/lib/Utils/use-multi-file-auth-state.d.ts +0 -18
- package/lib/Utils/use-multi-file-auth-state.js +0 -238
- package/lib/Utils/use-single-file-auth-state.d.ts +0 -13
- package/lib/Utils/use-single-file-auth-state.js +0 -80
- package/lib/Utils/validate-connection.d.ts +0 -13
- package/lib/Utils/validate-connection.js +0 -220
- package/lib/WABinary/constants.d.ts +0 -30
- package/lib/WABinary/constants.js +0 -1316
- package/lib/WABinary/decode.d.ts +0 -9
- package/lib/WABinary/decode.js +0 -288
- package/lib/WABinary/encode.d.ts +0 -3
- package/lib/WABinary/encode.js +0 -265
- package/lib/WABinary/generic-utils.d.ts +0 -28
- package/lib/WABinary/generic-utils.js +0 -142
- package/lib/WABinary/index.d.ts +0 -5
- package/lib/WABinary/index.js +0 -25
- package/lib/WABinary/jid-utils.d.ts +0 -58
- package/lib/WABinary/jid-utils.js +0 -104
- package/lib/WABinary/types.d.ts +0 -22
- package/lib/WABinary/types.js +0 -3
- package/lib/WAM/BinaryInfo.d.ts +0 -16
- package/lib/WAM/BinaryInfo.js +0 -17
- package/lib/WAM/constants.d.ts +0 -47
- package/lib/WAM/constants.js +0 -15371
- package/lib/WAM/encode.d.ts +0 -3
- package/lib/WAM/encode.js +0 -164
- package/lib/WAM/index.d.ts +0 -3
- package/lib/WAM/index.js +0 -23
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.d.ts +0 -28
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +0 -69
- package/lib/WAUSync/Protocols/USyncContactProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +0 -36
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.d.ts +0 -26
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +0 -62
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +0 -35
- package/lib/WAUSync/Protocols/USyncLIDProtocol.d.ts +0 -10
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +0 -38
- package/lib/WAUSync/Protocols/USyncStatusProtocol.d.ts +0 -14
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +0 -46
- package/lib/WAUSync/Protocols/index.d.ts +0 -6
- package/lib/WAUSync/Protocols/index.js +0 -26
- package/lib/WAUSync/USyncQuery.d.ts +0 -31
- package/lib/WAUSync/USyncQuery.js +0 -92
- package/lib/WAUSync/USyncUser.d.ts +0 -12
- package/lib/WAUSync/USyncUser.js +0 -30
- package/lib/WAUSync/index.d.ts +0 -3
- package/lib/WAUSync/index.js +0 -23
- package/lib/index.d.ts +0 -13
- package/lib/index.js +0 -33
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MobileSocketClient = void 0;
|
|
4
|
-
const net_1 = require("net");
|
|
5
|
-
const abstract_socket_client_1 = require("./abstract-socket-client");
|
|
6
|
-
class MobileSocketClient extends abstract_socket_client_1.AbstractSocketClient {
|
|
7
|
-
constructor() {
|
|
8
|
-
super(...arguments);
|
|
9
|
-
this.socket = null;
|
|
10
|
-
}
|
|
11
|
-
get isOpen() {
|
|
12
|
-
var _a;
|
|
13
|
-
return ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === 'open';
|
|
14
|
-
}
|
|
15
|
-
get isClosed() {
|
|
16
|
-
var _a;
|
|
17
|
-
return this.socket === null || ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === 'closed';
|
|
18
|
-
}
|
|
19
|
-
get isClosing() {
|
|
20
|
-
var _a;
|
|
21
|
-
return this.socket === null || ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === 'closed';
|
|
22
|
-
}
|
|
23
|
-
get isConnecting() {
|
|
24
|
-
var _a;
|
|
25
|
-
return ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === 'opening';
|
|
26
|
-
}
|
|
27
|
-
async connect() {
|
|
28
|
-
var _a;
|
|
29
|
-
if (this.socket) {
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (this.config.agent) {
|
|
33
|
-
throw new Error('There are not support for proxy agent for mobile connection');
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
this.socket = (0, net_1.connect)({
|
|
37
|
-
host: this.url.hostname,
|
|
38
|
-
port: Number(this.url.port) || 443
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
this.socket.setMaxListeners(0);
|
|
42
|
-
const events = ['close', 'connect', 'data', 'drain', 'end', 'error', 'lookup', 'ready', 'timeout'];
|
|
43
|
-
for (const event of events) {
|
|
44
|
-
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.on(event, (...args) => this.emit(event, ...args));
|
|
45
|
-
}
|
|
46
|
-
this.socket.on('data', (...args) => this.emit('message', ...args));
|
|
47
|
-
this.socket.on('ready', (...args) => this.emit('open', ...args));
|
|
48
|
-
}
|
|
49
|
-
async close() {
|
|
50
|
-
if (!this.socket) {
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
return new Promise(resolve => {
|
|
54
|
-
this.socket.end(resolve);
|
|
55
|
-
this.socket = null;
|
|
56
|
-
});
|
|
57
|
-
}
|
|
58
|
-
send(str, cb) {
|
|
59
|
-
if (this.socket === null) {
|
|
60
|
-
return false;
|
|
61
|
-
}
|
|
62
|
-
return this.socket.write(str, undefined, cb);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.MobileSocketClient = MobileSocketClient;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from 'events'
|
|
2
|
-
import { URL } from 'url'
|
|
3
|
-
import { SocketConfig } from '@neelegirl/baileys/lib/Types'
|
|
4
|
-
|
|
5
|
-
export declare abstract class AbstractSocketClient extends EventEmitter {
|
|
6
|
-
url: URL
|
|
7
|
-
config: SocketConfig
|
|
8
|
-
abstract get isOpen(): boolean
|
|
9
|
-
abstract get isClosed(): boolean
|
|
10
|
-
abstract get isClosing(): boolean
|
|
11
|
-
abstract get isConnecting(): boolean
|
|
12
|
-
constructor(url: URL, config: SocketConfig)
|
|
13
|
-
abstract connect(): Promise<void>
|
|
14
|
-
abstract close(): Promise<void>
|
|
15
|
-
abstract send(str: Uint8Array | string, cb?: (err?: Error) => void): boolean
|
|
16
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", { value: true })
|
|
4
|
-
|
|
5
|
-
const events_1 = require("events")
|
|
6
|
-
|
|
7
|
-
class AbstractSocketClient extends events_1.EventEmitter {
|
|
8
|
-
constructor(url, config) {
|
|
9
|
-
super()
|
|
10
|
-
this.url = url
|
|
11
|
-
this.config = config
|
|
12
|
-
this.setMaxListeners(0)
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
module.exports = {
|
|
17
|
-
AbstractSocketClient
|
|
18
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import WebSocket from 'ws'
|
|
2
|
-
import { AbstractSocketClient } from '@neelegirl/baileys/lib/Socket/Client/types'
|
|
3
|
-
|
|
4
|
-
export declare class WebSocketClient extends AbstractSocketClient {
|
|
5
|
-
protected socket: WebSocket | null
|
|
6
|
-
get isOpen(): boolean
|
|
7
|
-
get isClosed(): boolean
|
|
8
|
-
get isClosing(): boolean
|
|
9
|
-
get isConnecting(): boolean
|
|
10
|
-
connect(): Promise<void>
|
|
11
|
-
close(): Promise<void>
|
|
12
|
-
send(str: string | Uint8Array, cb?: (err?: Error) => void): boolean
|
|
13
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict"
|
|
2
|
-
|
|
3
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
-
return (mod && mod.__esModule) ? mod : { "default": mod }
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true })
|
|
8
|
-
|
|
9
|
-
const ws_1 = __importDefault(require("ws"))
|
|
10
|
-
const Defaults_1 = require("../../Defaults")
|
|
11
|
-
const types_1 = require("./types")
|
|
12
|
-
|
|
13
|
-
class WebSocketClient extends types_1.AbstractSocketClient {
|
|
14
|
-
constructor() {
|
|
15
|
-
super(...arguments)
|
|
16
|
-
this.socket = null
|
|
17
|
-
}
|
|
18
|
-
get isOpen() {
|
|
19
|
-
return this.socket?.readyState === ws_1.default.OPEN
|
|
20
|
-
}
|
|
21
|
-
get isClosed() {
|
|
22
|
-
return this.socket?.readyState === ws_1.default.CLOSED
|
|
23
|
-
}
|
|
24
|
-
get isClosing() {
|
|
25
|
-
this.socket?.readyState === ws_1.default.CLOSING
|
|
26
|
-
}
|
|
27
|
-
get isConnecting() {
|
|
28
|
-
this.socket?.readyState === ws_1.default.CONNECTING
|
|
29
|
-
}
|
|
30
|
-
async connect() {
|
|
31
|
-
if (this.socket) {
|
|
32
|
-
return
|
|
33
|
-
}
|
|
34
|
-
this.socket = new ws_1.default(this.url, {
|
|
35
|
-
origin: Defaults_1.DEFAULT_ORIGIN,
|
|
36
|
-
headers: this.config.options?.headers,
|
|
37
|
-
handshakeTimeout: this.config.connectTimeoutMs,
|
|
38
|
-
timeout: this.config.connectTimeoutMs,
|
|
39
|
-
agent: this.config.agent,
|
|
40
|
-
})
|
|
41
|
-
this.socket.setMaxListeners(0)
|
|
42
|
-
const events = ['close', 'error', 'upgrade', 'message', 'open', 'ping', 'pong', 'unexpected-response']
|
|
43
|
-
for (const event of events) {
|
|
44
|
-
this.socket?.on(event, (...args) => this.emit(event, ...args))
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
async close() {
|
|
48
|
-
if (!this.socket) {
|
|
49
|
-
return
|
|
50
|
-
}
|
|
51
|
-
this.socket.close()
|
|
52
|
-
this.socket = null
|
|
53
|
-
}
|
|
54
|
-
send(str, cb) {
|
|
55
|
-
this.socket?.send(str, cb)
|
|
56
|
-
return Boolean(this.socket)
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
module.exports = {
|
|
61
|
-
WebSocketClient
|
|
62
|
-
}
|
package/lib/Socket/business.d.ts
DELETED
|
@@ -1,187 +0,0 @@
|
|
|
1
|
-
import { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, UpdateBussinesProfileProps } from '../Types'
|
|
2
|
-
import { BinaryNode } from '../WABinary'
|
|
3
|
-
|
|
4
|
-
export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
5
|
-
logger: import("../Utils/logger").ILogger
|
|
6
|
-
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../Types").OrderDetails>
|
|
7
|
-
getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
|
|
8
|
-
products: import("../Types").Product[]
|
|
9
|
-
nextPageCursor: string | undefined
|
|
10
|
-
}>
|
|
11
|
-
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
12
|
-
collections: import("../Types").CatalogCollection[]
|
|
13
|
-
}>
|
|
14
|
-
productCreate: (create: ProductCreate) => Promise<import("../Types").Product>
|
|
15
|
-
productDelete: (productIds: string[]) => Promise<{
|
|
16
|
-
deleted: number
|
|
17
|
-
}>
|
|
18
|
-
productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../Types").Product>
|
|
19
|
-
updateBussinesProfile: (args: UpdateBussinesProfileProps) => Promise<any>
|
|
20
|
-
updateCoverPhoto: (photo: import("../Types").WAMediaUpload) => Promise<number>
|
|
21
|
-
removeCoverPhoto: (id: string) => Promise<any>
|
|
22
|
-
sendMessageAck: ({ tag, attrs, content }: BinaryNode, errorCode?: number | undefined) => Promise<void>
|
|
23
|
-
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>
|
|
24
|
-
offerCall: (toJid: string, isVideo?: boolean) => Promise<{
|
|
25
|
-
id: any
|
|
26
|
-
to: string
|
|
27
|
-
}>
|
|
28
|
-
rejectCall: (callId: string, callFrom: string) => Promise<void>
|
|
29
|
-
fetchMessageHistory: (count: number, oldestMsgKey: import("../Types").WAProto.IMessageKey, oldestMsgTimestamp: number | import("long").Long) => Promise<string>
|
|
30
|
-
requestPlaceholderResend: (messageKey: import("../Types").WAProto.IMessageKey) => Promise<string | undefined>
|
|
31
|
-
getPrivacyTokens: (jids: string[]) => Promise<BinaryNode>
|
|
32
|
-
assertSessions: (jids: string[], force: boolean) => Promise<boolean>
|
|
33
|
-
relayMessage: (jid: string, message: import("../Types").WAProto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../Types").MessageRelayOptions) => Promise<string>
|
|
34
|
-
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
35
|
-
sendReceipts: (keys: import("../Types").WAProto.IMessageKey[], type: import("../Types").MessageReceiptType) => Promise<void>
|
|
36
|
-
readMessages: (keys: import("../Types").WAProto.IMessageKey[]) => Promise<void>
|
|
37
|
-
refreshMediaConn: (forceGet?: boolean) => Promise<import("../Types").MediaConnInfo>
|
|
38
|
-
waUploadToServer: import("../Types").WAMediaUploadFunction
|
|
39
|
-
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
40
|
-
[_: string]: string
|
|
41
|
-
}>
|
|
42
|
-
sendPeerDataOperationMessage: (pdoMessage: import("../Types").WAProto.Message.IPeerDataOperationRequestMessage) => Promise<string>
|
|
43
|
-
createParticipantNodes: (jids: string[], message: import("../Types").WAProto.IMessage, extraAttrs?: {
|
|
44
|
-
[key: string]: string
|
|
45
|
-
} | undefined) => Promise<{
|
|
46
|
-
nodes: BinaryNode[]
|
|
47
|
-
shouldIncludeDeviceIdentity: boolean
|
|
48
|
-
}>
|
|
49
|
-
profilePictureUrl: (jid: string) => Promise<string>
|
|
50
|
-
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<import("../WABinary").JidWithDevice[]>
|
|
51
|
-
getEphemeralGroup: (jid: string) => Promise<number>
|
|
52
|
-
updateMediaMessage: (message: import("../Types").WAProto.IWebMessageInfo) => Promise<import("../Types").WAProto.IWebMessageInfo>
|
|
53
|
-
sendStatusMentions: (content: import("../Types").WAProto.IMessage, jid: string, Private?: boolean) => Promise<string>
|
|
54
|
-
sendMessage: (jid: string, content: import("../Types").AnyMessageContent, options?: import("../Types").MiscMessageGenerationOptions) => Promise<import("../Types").WAProto.WebMessageInfo | undefined>
|
|
55
|
-
groupMetadata: (jid: string) => Promise<import("../Types").GroupMetadata>
|
|
56
|
-
groupCreate: (subject: string, participants: string[]) => Promise<import("../Types").GroupMetadata>
|
|
57
|
-
groupLeave: (id: string) => Promise<void>
|
|
58
|
-
groupUpdateSubject: (jid: string, subject: string) => Promise<void>
|
|
59
|
-
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
60
|
-
[key: string]: string
|
|
61
|
-
}[]>
|
|
62
|
-
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "reject" | "approve") => Promise<{
|
|
63
|
-
status: string
|
|
64
|
-
jid: string
|
|
65
|
-
}[]>
|
|
66
|
-
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../Types").ParticipantAction) => Promise<{
|
|
67
|
-
status: string
|
|
68
|
-
jid: string
|
|
69
|
-
content: BinaryNode
|
|
70
|
-
}[]>
|
|
71
|
-
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
72
|
-
duration: string
|
|
73
|
-
}>
|
|
74
|
-
newsletterReactionMode: (jid: string, mode: import("../Types").NewsletterReactionMode) => Promise<void>
|
|
75
|
-
newsletterUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
76
|
-
newsletterUpdateName: (jid: string, name: string) => Promise<void>
|
|
77
|
-
newsletterUpdatePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
78
|
-
newsletterRemovePicture: (jid: string) => Promise<void>
|
|
79
|
-
newsletterUnfollow: (jid: string) => Promise<void>
|
|
80
|
-
newsletterFollow: (jid: string) => Promise<void>
|
|
81
|
-
newsletterUnmute: (jid: string) => Promise<void>
|
|
82
|
-
newsletterMute: (jid: string) => Promise<void>
|
|
83
|
-
newsletterCreate: (name: string, description?: string, picture?: import("../Types").WAMediaUpload) => Promise<import("../Types").NewsletterMetadata>
|
|
84
|
-
newsletterQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
85
|
-
newsletterWMexQuery: (jid?: string | undefined, query_id: number, content: BinaryNode) => Promise<BinaryNode>
|
|
86
|
-
newsletterMetadata: (type: "invite" | "jid", key: string, role?: import("../Types").NewsletterViewRole | undefined) => Promise<import("../Types").NewsletterMetadata>
|
|
87
|
-
newsletterFetchAllParticipating: () => Promise<{
|
|
88
|
-
[_: string]: import("../Types").NewsletterMetadata
|
|
89
|
-
}>
|
|
90
|
-
newsletterAdminCount: (jid: string) => Promise<number>
|
|
91
|
-
newsletterChangeOwner: (jid: string, userLid: string) => Promise<void>
|
|
92
|
-
newsletterDemote: (jid: string, userLid: string) => Promise<void>
|
|
93
|
-
newsletterDelete: (jid: string) => Promise<void>
|
|
94
|
-
newsletterReactMessage: (jid: string, server_id: string, code?: string | undefined) => Promise<void>
|
|
95
|
-
newsletterFetchMessages: (type: "invite" | "jid", key: string, count: number, after?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
96
|
-
newsletterFetchUpdates: (jid: string, count: number, after?: number | undefined, since?: number | undefined) => Promise<import("../Types").NewsletterFetchedUpdate[]>
|
|
97
|
-
groupQuery: (jid: string, type: string, content: BinaryNode) => Promise<BinaryNode>
|
|
98
|
-
groupUpdateDescription: (jid: string, description?: string | undefined) => Promise<void>
|
|
99
|
-
groupInviteCode: (jid: string) => Promise<string | undefined>
|
|
100
|
-
groupRevokeInvite: (jid: string) => Promise<string | undefined>
|
|
101
|
-
groupAcceptInvite: (code: string) => Promise<string | undefined>
|
|
102
|
-
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>
|
|
103
|
-
groupAcceptInviteV4: (key: string | import("../Types").WAProto.IMessageKey, inviteMessage: import("../Types").WAProto.Message.IGroupInviteMessage) => Promise<string>
|
|
104
|
-
groupGetInviteInfo: (code: string) => Promise<import("../Types").GroupMetadata>
|
|
105
|
-
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>
|
|
106
|
-
groupSettingUpdate: (jid: string, setting: "announcement" | "locked" | "not_announcement" | "unlocked") => Promise<void>
|
|
107
|
-
groupMemberAddMode: (jid: string, mode: "all_member_add" | "admin_add") => Promise<void>
|
|
108
|
-
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>
|
|
109
|
-
groupFetchAllParticipating: () => Promise<{
|
|
110
|
-
[_: string]: import("../Types").GroupMetadata
|
|
111
|
-
}>
|
|
112
|
-
processingMutex: {
|
|
113
|
-
mutex<T>(code: () => T | Promise<T>): Promise<T>
|
|
114
|
-
}
|
|
115
|
-
upsertMessage: (msg: import("../Types").WAProto.IWebMessageInfo, type: import("../Types").MessageUpsertType) => Promise<void>
|
|
116
|
-
appPatch: (patchCreate: import("../Types").WAPatchCreate) => Promise<void>
|
|
117
|
-
sendPresenceUpdate: (type: import("../Types").WAPresence, toJid?: string | undefined) => Promise<void>
|
|
118
|
-
presenceSubscribe: (toJid: string, tcToken?: Buffer | undefined) => Promise<void>
|
|
119
|
-
getBotListV2: () => Promise<BotListInfo[]>
|
|
120
|
-
getLidUser: (jid: string) => Promise<{
|
|
121
|
-
lid: string
|
|
122
|
-
id: string
|
|
123
|
-
}[] | undefined>
|
|
124
|
-
fetchBlocklist: () => Promise<string[]>
|
|
125
|
-
fetchStatus: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
126
|
-
fetchDisappearingDuration: (...jids: string[]) => Promise<import("..").USyncQueryResultList[] | undefined>
|
|
127
|
-
updateProfilePicture: (jid: string, content: import("../Types").WAMediaUpload) => Promise<void>
|
|
128
|
-
removeProfilePicture: (jid: string) => Promise<void>
|
|
129
|
-
updateProfileStatus: (status: string) => Promise<void>
|
|
130
|
-
updateProfileName: (name: string) => Promise<void>
|
|
131
|
-
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>
|
|
132
|
-
updateCallPrivacy: (value: import("../Types").WAPrivacyCallValue) => Promise<void>
|
|
133
|
-
updateLastSeenPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
134
|
-
updateOnlinePrivacy: (value: import("../Types").WAPrivacyOnlineValue) => Promise<void>
|
|
135
|
-
updateProfilePicturePrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
136
|
-
updateStatusPrivacy: (value: import("../Types").WAPrivacyValue) => Promise<void>
|
|
137
|
-
updateReadReceiptsPrivacy: (value: import("../Types").WAReadReceiptsValue) => Promise<void>
|
|
138
|
-
updateGroupsAddPrivacy: (value: import("../Types").WAPrivacyGroupAddValue) => Promise<void>
|
|
139
|
-
updateDefaultDisappearingMode: (duration: number) => Promise<void>
|
|
140
|
-
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>
|
|
141
|
-
getBusinessProfile: (jid: string) => Promise<void | import("../Types").WABusinessProfile>
|
|
142
|
-
resyncAppState: (collections: readonly ("critical_block" | "critical_unblock_low" | "regular_high" | "regular_low" | "regular")[], isInitialSync: boolean) => Promise<void>
|
|
143
|
-
chatModify: (mod: import("../Types").ChatModification, jid: string) => Promise<void>
|
|
144
|
-
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: string | number | undefined) => Promise<void>
|
|
145
|
-
addLabel: (jid: string, labels: import("../Types/Label").LabelActionBody) => Promise<void>
|
|
146
|
-
addChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
147
|
-
removeChatLabel: (jid: string, labelId: string) => Promise<void>
|
|
148
|
-
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
149
|
-
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>
|
|
150
|
-
clearMessage: (jid: string, key: import("../Types").WAProto.IMessageKey, timeStamp: number | import("long").Long) => Promise<void>
|
|
151
|
-
star: (jid: string, messages: {
|
|
152
|
-
id: string
|
|
153
|
-
fromMe?: boolean | undefined
|
|
154
|
-
}[], star: boolean) => Promise<void>
|
|
155
|
-
addOrEditQuickReply: (quickReply: import("../Types/Bussines").QuickReplyAction) => Promise<void>
|
|
156
|
-
removeQuickReply: (timestamp: string) => Promise<void>
|
|
157
|
-
executeUSyncQuery: (usyncQuery: import("..").USyncQuery) => Promise<import("..").USyncQueryResult | undefined>
|
|
158
|
-
type: "md"
|
|
159
|
-
ws: import("./Client").WebSocketClient
|
|
160
|
-
ev: import("../Types").BaileysEventEmitter & {
|
|
161
|
-
process(handler: (events: Partial<import("../Types").BaileysEventMap>) => void | Promise<void>): () => void
|
|
162
|
-
buffer(): void
|
|
163
|
-
createBufferedFunction<A extends any[], T_1>(work: (...args: A) => Promise<T_1>): (...args: A) => Promise<T_1>
|
|
164
|
-
flush(force?: boolean | undefined): boolean
|
|
165
|
-
isBuffering(): boolean
|
|
166
|
-
}
|
|
167
|
-
authState: {
|
|
168
|
-
creds: import("../Types").AuthenticationCreds
|
|
169
|
-
keys: import("../Types").SignalKeyStoreWithTransaction
|
|
170
|
-
}
|
|
171
|
-
signalRepository: import("../Types").SignalRepository
|
|
172
|
-
user: import("../Types").Contact | undefined
|
|
173
|
-
generateMessageTag: () => string
|
|
174
|
-
query: (node: BinaryNode, timeoutMs?: number | undefined) => Promise<BinaryNode>
|
|
175
|
-
waitForMessage: <T_2>(msgId: string, timeoutMs?: number | undefined) => Promise<T_2>
|
|
176
|
-
waitForSocketOpen: () => Promise<void>
|
|
177
|
-
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>
|
|
178
|
-
sendNode: (frame: BinaryNode) => Promise<void>
|
|
179
|
-
logout: (msg?: string | undefined) => Promise<void>
|
|
180
|
-
end: (error: Error | undefined) => void
|
|
181
|
-
onUnexpectedError: (err: Error | import("@hapi/boom").Boom<any>, msg: string) => void
|
|
182
|
-
uploadPreKeys: (count?: number) => Promise<void>
|
|
183
|
-
uploadPreKeysToServerIfRequired: () => Promise<void>
|
|
184
|
-
requestPairingCode: (phoneNumber: string, code?: string) => Promise<string>
|
|
185
|
-
waitForConnectionUpdate: (check: (u: Partial<import("../Types").ConnectionState>) => boolean | undefined, timeoutMs?: number | undefined) => Promise<void>
|
|
186
|
-
sendWAMBuffer: (wamBuffer: Buffer) => Promise<BinaryNode>
|
|
187
|
-
}
|