@ubedsockets/baileys 1.6.3 → 1.6.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/WAProto/GenerateStatics.sh +3 -4
- package/WAProto/WAProto.proto +1215 -511
- package/WAProto/fix-imports.js +85 -0
- package/WAProto/index.d.ts +14017 -0
- package/WAProto/index.js +65475 -137445
- package/lib/Socket/Client/index.d.ts +3 -0
- package/lib/Socket/Client/index.d.ts.map +1 -0
- package/lib/Socket/Client/index.js +3 -18
- package/lib/Socket/Client/index.js.map +1 -0
- package/lib/Socket/Client/types.d.ts +16 -0
- package/lib/Socket/Client/types.d.ts.map +1 -0
- package/lib/Socket/Client/types.js +4 -6
- package/lib/Socket/Client/types.js.map +1 -0
- package/lib/Socket/Client/websocket.d.ts +13 -0
- package/lib/Socket/Client/websocket.d.ts.map +1 -0
- package/lib/Socket/Client/websocket.js +21 -78
- package/lib/Socket/Client/websocket.js.map +1 -0
- package/lib/Socket/business.d.ts +217 -0
- package/lib/Socket/business.d.ts.map +1 -0
- package/lib/Socket/business.js +162 -43
- package/lib/Socket/business.js.map +1 -0
- package/lib/Socket/chats.d.ts +124 -0
- package/lib/Socket/chats.d.ts.map +1 -0
- package/lib/Socket/chats.js +571 -249
- package/lib/Socket/chats.js.map +1 -0
- package/lib/Socket/communities.d.ts +273 -0
- package/lib/Socket/communities.d.ts.map +1 -0
- package/lib/Socket/communities.js +431 -0
- package/lib/Socket/communities.js.map +1 -0
- package/lib/Socket/groups.d.ts +161 -0
- package/lib/Socket/groups.d.ts.map +1 -0
- package/lib/Socket/groups.js +114 -99
- package/lib/Socket/groups.js.map +1 -0
- package/lib/Socket/index.d.ts +260 -0
- package/lib/Socket/index.d.ts.map +1 -0
- package/lib/Socket/index.js +11 -9
- package/lib/Socket/index.js.map +1 -0
- package/lib/Socket/messages-recv.d.ts +203 -0
- package/lib/Socket/messages-recv.d.ts.map +1 -0
- package/lib/Socket/messages-recv.js +1277 -559
- package/lib/Socket/messages-recv.js.map +1 -0
- package/lib/Socket/messages-send.d.ts +199 -0
- package/lib/Socket/messages-send.d.ts.map +1 -0
- package/lib/Socket/messages-send.js +674 -669
- package/lib/Socket/messages-send.js.map +1 -0
- package/lib/Socket/mex.d.ts +3 -0
- package/lib/Socket/mex.d.ts.map +1 -0
- package/lib/Socket/mex.js +42 -0
- package/lib/Socket/mex.js.map +1 -0
- package/lib/Socket/newsletter.d.ts +170 -0
- package/lib/Socket/newsletter.d.ts.map +1 -0
- package/lib/Socket/newsletter.js +149 -286
- package/lib/Socket/newsletter.js.map +1 -0
- package/lib/Socket/socket.d.ts +59 -0
- package/lib/Socket/socket.d.ts.map +1 -0
- package/lib/Socket/socket.js.map +1 -0
- package/lib/Utils/auth-utils.d.ts +24 -0
- package/lib/Utils/auth-utils.d.ts.map +1 -0
- package/lib/Utils/auth-utils.js +239 -136
- package/lib/Utils/auth-utils.js.map +1 -0
- package/lib/Utils/browser-utils.d.ts +4 -0
- package/lib/Utils/browser-utils.d.ts.map +1 -0
- package/lib/Utils/browser-utils.js +28 -0
- package/lib/Utils/browser-utils.js.map +1 -0
- package/lib/Utils/business.d.ts +23 -0
- package/lib/Utils/business.d.ts.map +1 -0
- package/lib/Utils/business.js +66 -69
- package/lib/Utils/business.js.map +1 -0
- package/lib/Utils/chat-utils.d.ts +100 -0
- package/lib/Utils/chat-utils.d.ts.map +1 -0
- package/lib/Utils/chat-utils.js +380 -238
- package/lib/Utils/chat-utils.js.map +1 -0
- package/lib/Utils/companion-reg-client-utils.d.ts +17 -0
- package/lib/Utils/companion-reg-client-utils.d.ts.map +1 -0
- package/lib/Utils/companion-reg-client-utils.js +35 -0
- package/lib/Utils/companion-reg-client-utils.js.map +1 -0
- package/lib/Utils/crypto.d.ts +37 -0
- package/lib/Utils/crypto.d.ts.map +1 -0
- package/lib/Utils/crypto.js +56 -127
- package/lib/Utils/crypto.js.map +1 -0
- package/lib/Utils/decode-wa-message.d.ts +66 -0
- package/lib/Utils/decode-wa-message.d.ts.map +1 -0
- package/lib/Utils/decode-wa-message.js +173 -63
- package/lib/Utils/decode-wa-message.js.map +1 -0
- package/lib/Utils/event-buffer.d.ts +36 -0
- package/lib/Utils/event-buffer.d.ts.map +1 -0
- package/lib/Utils/event-buffer.js +174 -70
- package/lib/Utils/event-buffer.js.map +1 -0
- package/lib/Utils/generics.d.ts +91 -0
- package/lib/Utils/generics.d.ts.map +1 -0
- package/lib/Utils/generics.js +159 -207
- package/lib/Utils/generics.js.map +1 -0
- package/lib/Utils/history.d.ts +24 -0
- package/lib/Utils/history.d.ts.map +1 -0
- package/lib/Utils/history.js +93 -53
- package/lib/Utils/history.js.map +1 -0
- package/lib/Utils/identity-change-handler.d.ts +44 -0
- package/lib/Utils/identity-change-handler.d.ts.map +1 -0
- package/lib/Utils/identity-change-handler.js +50 -0
- package/lib/Utils/identity-change-handler.js.map +1 -0
- package/lib/Utils/index.d.ts +22 -0
- package/lib/Utils/index.d.ts.map +1 -0
- package/lib/Utils/index.js +22 -33
- package/lib/Utils/index.js.map +1 -0
- package/lib/Utils/link-preview.d.ts +21 -0
- package/lib/Utils/link-preview.d.ts.map +1 -0
- package/lib/Utils/link-preview.js +17 -58
- package/lib/Utils/link-preview.js.map +1 -0
- package/lib/Utils/logger.d.ts +12 -0
- package/lib/Utils/logger.d.ts.map +1 -0
- package/lib/Utils/logger.js +3 -7
- package/lib/Utils/logger.js.map +1 -0
- package/lib/Utils/lt-hash.d.ts +8 -0
- package/lib/Utils/lt-hash.d.ts.map +1 -0
- package/lib/Utils/lt-hash.js +3 -46
- package/lib/Utils/lt-hash.js.map +1 -0
- package/lib/Utils/make-mutex.d.ts +9 -0
- package/lib/Utils/make-mutex.d.ts.map +1 -0
- package/lib/Utils/make-mutex.js +24 -34
- package/lib/Utils/make-mutex.js.map +1 -0
- package/lib/Utils/message-retry-manager.d.ts +115 -0
- package/lib/Utils/message-retry-manager.d.ts.map +1 -0
- package/lib/Utils/message-retry-manager.js +265 -0
- package/lib/Utils/message-retry-manager.js.map +1 -0
- package/lib/Utils/messages-media.d.ts +133 -0
- package/lib/Utils/messages-media.d.ts.map +1 -0
- package/lib/Utils/messages-media.js +483 -744
- package/lib/Utils/messages-media.js.map +1 -0
- package/lib/Utils/messages.d.ts +91 -0
- package/lib/Utils/messages.d.ts.map +1 -0
- package/lib/Utils/messages.js +411 -621
- package/lib/Utils/messages.js.map +1 -0
- package/lib/Utils/noise-handler.d.ts +20 -0
- package/lib/Utils/noise-handler.d.ts.map +1 -0
- package/lib/Utils/noise-handler.js +149 -99
- package/lib/Utils/noise-handler.js.map +1 -0
- package/lib/Utils/offline-node-processor.d.ts +17 -0
- package/lib/Utils/offline-node-processor.d.ts.map +1 -0
- package/lib/Utils/offline-node-processor.js +40 -0
- package/lib/Utils/offline-node-processor.js.map +1 -0
- package/lib/Utils/pre-key-manager.d.ts +28 -0
- package/lib/Utils/pre-key-manager.d.ts.map +1 -0
- package/lib/Utils/pre-key-manager.js +106 -0
- package/lib/Utils/pre-key-manager.js.map +1 -0
- package/lib/Utils/process-message.d.ts +60 -0
- package/lib/Utils/process-message.d.ts.map +1 -0
- package/lib/Utils/process-message.js +459 -150
- package/lib/Utils/process-message.js.map +1 -0
- package/lib/Utils/reporting-utils.d.ts +11 -0
- package/lib/Utils/reporting-utils.d.ts.map +1 -0
- package/lib/Utils/reporting-utils.js +258 -0
- package/lib/Utils/reporting-utils.js.map +1 -0
- package/lib/Utils/signal.d.ts +47 -0
- package/lib/Utils/signal.d.ts.map +1 -0
- package/lib/Utils/signal.js +112 -73
- package/lib/Utils/signal.js.map +1 -0
- package/lib/Utils/stanza-ack.d.ts +11 -0
- package/lib/Utils/stanza-ack.d.ts.map +1 -0
- package/lib/Utils/stanza-ack.js +38 -0
- package/lib/Utils/stanza-ack.js.map +1 -0
- package/lib/Utils/sync-action-utils.d.ts +19 -0
- package/lib/Utils/sync-action-utils.d.ts.map +1 -0
- package/lib/Utils/sync-action-utils.js +49 -0
- package/lib/Utils/sync-action-utils.js.map +1 -0
- package/lib/Utils/tc-token-utils.d.ts +37 -0
- package/lib/Utils/tc-token-utils.d.ts.map +1 -0
- package/lib/Utils/tc-token-utils.js +163 -0
- package/lib/Utils/tc-token-utils.js.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts +13 -0
- package/lib/Utils/use-multi-file-auth-state.d.ts.map +1 -0
- package/lib/Utils/use-multi-file-auth-state.js +23 -27
- package/lib/Utils/use-multi-file-auth-state.js.map +1 -0
- package/lib/Utils/validate-connection.d.ts +11 -0
- package/lib/Utils/validate-connection.d.ts.map +1 -0
- package/lib/Utils/validate-connection.js +74 -104
- package/lib/Utils/validate-connection.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Socket/Client/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
|
@@ -1,18 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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("./types"), exports);
|
|
18
|
-
__exportStar(require("./websocket"), exports);
|
|
1
|
+
export * from './types.js';
|
|
2
|
+
export * from './websocket.js';
|
|
3
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Socket/Client/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA;AACvB,cAAc,aAAa,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { URL } from 'url';
|
|
3
|
+
import type { SocketConfig } from '../../Types/index.js';
|
|
4
|
+
export declare abstract class AbstractSocketClient extends EventEmitter {
|
|
5
|
+
url: URL;
|
|
6
|
+
config: SocketConfig;
|
|
7
|
+
abstract get isOpen(): boolean;
|
|
8
|
+
abstract get isClosed(): boolean;
|
|
9
|
+
abstract get isClosing(): boolean;
|
|
10
|
+
abstract get isConnecting(): boolean;
|
|
11
|
+
constructor(url: URL, config: SocketConfig);
|
|
12
|
+
abstract connect(): void;
|
|
13
|
+
abstract close(): void;
|
|
14
|
+
abstract send(str: Uint8Array | string, cb?: (err?: Error) => void): boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/Socket/Client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AACzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,8BAAsB,oBAAqB,SAAQ,YAAY;IAOtD,GAAG,EAAE,GAAG;IACR,MAAM,EAAE,YAAY;IAP5B,QAAQ,KAAK,MAAM,IAAI,OAAO,CAAA;IAC9B,QAAQ,KAAK,QAAQ,IAAI,OAAO,CAAA;IAChC,QAAQ,KAAK,SAAS,IAAI,OAAO,CAAA;IACjC,QAAQ,KAAK,YAAY,IAAI,OAAO,CAAA;gBAG5B,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,YAAY;IAM5B,QAAQ,CAAC,OAAO,IAAI,IAAI;IACxB,QAAQ,CAAC,KAAK,IAAI,IAAI;IACtB,QAAQ,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,GAAG,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO;CAC5E"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const events_1 = require("events");
|
|
5
|
-
class AbstractSocketClient extends events_1.EventEmitter {
|
|
1
|
+
import { EventEmitter } from 'events';
|
|
2
|
+
import { URL } from 'url';
|
|
3
|
+
export class AbstractSocketClient extends EventEmitter {
|
|
6
4
|
constructor(url, config) {
|
|
7
5
|
super();
|
|
8
6
|
this.url = url;
|
|
@@ -10,4 +8,4 @@ class AbstractSocketClient extends events_1.EventEmitter {
|
|
|
10
8
|
this.setMaxListeners(0);
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
|
-
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/Socket/Client/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AACrC,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAGzB,MAAM,OAAgB,oBAAqB,SAAQ,YAAY;IAM9D,YACQ,GAAQ,EACR,MAAoB;QAE3B,KAAK,EAAE,CAAA;QAHA,QAAG,GAAH,GAAG,CAAK;QACR,WAAM,GAAN,MAAM,CAAc;QAG3B,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;IACxB,CAAC;CAKD"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import WebSocket from 'ws';
|
|
2
|
+
import { AbstractSocketClient } from './types.js';
|
|
3
|
+
export declare class WebSocketClient extends AbstractSocketClient {
|
|
4
|
+
protected socket: WebSocket | null;
|
|
5
|
+
get isOpen(): boolean;
|
|
6
|
+
get isClosed(): boolean;
|
|
7
|
+
get isClosing(): boolean;
|
|
8
|
+
get isConnecting(): boolean;
|
|
9
|
+
connect(): void;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
send(str: string | Uint8Array, cb?: (err?: Error) => void): boolean;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=websocket.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.d.ts","sourceRoot":"","sources":["../../../src/Socket/Client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAA;AAE1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,qBAAa,eAAgB,SAAQ,oBAAoB;IACxD,SAAS,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAAO;IAEzC,IAAI,MAAM,IAAI,OAAO,CAEpB;IACD,IAAI,QAAQ,IAAI,OAAO,CAEtB;IACD,IAAI,SAAS,IAAI,OAAO,CAEvB;IACD,IAAI,YAAY,IAAI,OAAO,CAE1B;IAED,OAAO;IAsBD,KAAK;IAeX,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,EAAE,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,KAAK,IAAI,GAAG,OAAO;CAKnE"}
|
|
@@ -1,111 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.WebSocketClient = void 0;
|
|
7
|
-
const ws_1 = __importDefault(require("ws"));
|
|
8
|
-
const Defaults_1 = require("../../Defaults");
|
|
9
|
-
const types_1 = require("./types");
|
|
10
|
-
class WebSocketClient extends types_1.AbstractSocketClient {
|
|
1
|
+
import WebSocket from 'ws';
|
|
2
|
+
import { DEFAULT_ORIGIN } from '../../Defaults/index.js';
|
|
3
|
+
import { AbstractSocketClient } from './types.js';
|
|
4
|
+
export class WebSocketClient extends AbstractSocketClient {
|
|
11
5
|
constructor() {
|
|
12
6
|
super(...arguments);
|
|
13
7
|
this.socket = null;
|
|
14
|
-
// queue & dispatch variables for throttling outgoing messages to avoid rate limits
|
|
15
|
-
this._queue = [];
|
|
16
|
-
this._isDispatching = false;
|
|
17
|
-
this._lastDispatch = 0;
|
|
18
|
-
this._minSendIntervalMs = (Defaults_1.DEFAULT_CONNECTION_CONFIG && Defaults_1.DEFAULT_CONNECTION_CONFIG.minSendIntervalMs) || 50;
|
|
19
8
|
}
|
|
20
9
|
get isOpen() {
|
|
21
|
-
|
|
22
|
-
return ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === ws_1.default.OPEN;
|
|
10
|
+
return this.socket?.readyState === WebSocket.OPEN;
|
|
23
11
|
}
|
|
24
12
|
get isClosed() {
|
|
25
|
-
|
|
26
|
-
return this.socket === null || ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === ws_1.default.CLOSED;
|
|
13
|
+
return this.socket === null || this.socket?.readyState === WebSocket.CLOSED;
|
|
27
14
|
}
|
|
28
15
|
get isClosing() {
|
|
29
|
-
|
|
30
|
-
return this.socket === null || ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === ws_1.default.CLOSING;
|
|
16
|
+
return this.socket === null || this.socket?.readyState === WebSocket.CLOSING;
|
|
31
17
|
}
|
|
32
18
|
get isConnecting() {
|
|
33
|
-
|
|
34
|
-
return ((_a = this.socket) === null || _a === void 0 ? void 0 : _a.readyState) === ws_1.default.CONNECTING;
|
|
19
|
+
return this.socket?.readyState === WebSocket.CONNECTING;
|
|
35
20
|
}
|
|
36
|
-
|
|
37
|
-
var _a, _b;
|
|
21
|
+
connect() {
|
|
38
22
|
if (this.socket) {
|
|
39
23
|
return;
|
|
40
24
|
}
|
|
41
|
-
this.socket = new
|
|
42
|
-
origin:
|
|
43
|
-
headers:
|
|
25
|
+
this.socket = new WebSocket(this.url, {
|
|
26
|
+
origin: DEFAULT_ORIGIN,
|
|
27
|
+
headers: this.config.options?.headers,
|
|
44
28
|
handshakeTimeout: this.config.connectTimeoutMs,
|
|
45
29
|
timeout: this.config.connectTimeoutMs,
|
|
46
|
-
agent: this.config.agent
|
|
30
|
+
agent: this.config.agent
|
|
47
31
|
});
|
|
48
32
|
this.socket.setMaxListeners(0);
|
|
49
33
|
const events = ['close', 'error', 'upgrade', 'message', 'open', 'ping', 'pong', 'unexpected-response'];
|
|
50
34
|
for (const event of events) {
|
|
51
|
-
|
|
35
|
+
this.socket?.on(event, (...args) => this.emit(event, ...args));
|
|
52
36
|
}
|
|
53
37
|
}
|
|
54
38
|
async close() {
|
|
55
39
|
if (!this.socket) {
|
|
56
40
|
return;
|
|
57
41
|
}
|
|
42
|
+
const closePromise = new Promise(resolve => {
|
|
43
|
+
this.socket?.once('close', resolve);
|
|
44
|
+
});
|
|
58
45
|
this.socket.close();
|
|
46
|
+
await closePromise;
|
|
59
47
|
this.socket = null;
|
|
60
48
|
}
|
|
61
|
-
async restart() {
|
|
62
|
-
if (this.socket) {
|
|
63
|
-
await new Promise(resolve => {
|
|
64
|
-
this.socket.once('close', resolve);
|
|
65
|
-
this.socket.terminate();
|
|
66
|
-
});
|
|
67
|
-
this.socket = null;
|
|
68
|
-
}
|
|
69
|
-
await this.connect();
|
|
70
|
-
}
|
|
71
49
|
send(str, cb) {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
var _a;
|
|
75
|
-
(_a = this.socket) === null || _a === void 0 ? void 0 : _a.send(str, cb);
|
|
76
|
-
return Boolean(this.socket);
|
|
77
|
-
};
|
|
78
|
-
this._queue.push(doSend);
|
|
79
|
-
this._dispatch();
|
|
80
|
-
return true;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
_dispatch() {
|
|
84
|
-
if (this._isDispatching) {
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
this._isDispatching = true;
|
|
88
|
-
const tick = () => {
|
|
89
|
-
const now = Date.now();
|
|
90
|
-
if (this._queue.length === 0) {
|
|
91
|
-
this._isDispatching = false;
|
|
92
|
-
return;
|
|
93
|
-
}
|
|
94
|
-
const delta = now - this._lastDispatch;
|
|
95
|
-
const wait = Math.max(0, this._minSendIntervalMs - delta);
|
|
96
|
-
setTimeout(() => {
|
|
97
|
-
const fn = this._queue.shift();
|
|
98
|
-
this._lastDispatch = Date.now();
|
|
99
|
-
try {
|
|
100
|
-
fn && fn();
|
|
101
|
-
}
|
|
102
|
-
catch (_err) {
|
|
103
|
-
// ignore send errors here; they'll surface elsewhere
|
|
104
|
-
}
|
|
105
|
-
tick();
|
|
106
|
-
}, wait);
|
|
107
|
-
};
|
|
108
|
-
tick();
|
|
50
|
+
this.socket?.send(str, cb);
|
|
51
|
+
return Boolean(this.socket);
|
|
109
52
|
}
|
|
110
53
|
}
|
|
111
|
-
|
|
54
|
+
//# sourceMappingURL=websocket.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"websocket.js","sourceRoot":"","sources":["../../../src/Socket/Client/websocket.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,IAAI,CAAA;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAA;AAE9C,MAAM,OAAO,eAAgB,SAAQ,oBAAoB;IAAzD;;QACW,WAAM,GAAqB,IAAI,CAAA;IAyD1C,CAAC;IAvDA,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,IAAI,CAAA;IAClD,CAAC;IACD,IAAI,QAAQ;QACX,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,MAAM,CAAA;IAC5E,CAAC;IACD,IAAI,SAAS;QACZ,OAAO,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,OAAO,CAAA;IAC7E,CAAC;IACD,IAAI,YAAY;QACf,OAAO,IAAI,CAAC,MAAM,EAAE,UAAU,KAAK,SAAS,CAAC,UAAU,CAAA;IACxD,CAAC;IAED,OAAO;QACN,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YACjB,OAAM;QACP,CAAC;QAED,IAAI,CAAC,MAAM,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE;YACrC,MAAM,EAAE,cAAc;YACtB,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,OAAa;YAC3C,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB;YAC9C,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB;YACrC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK;SACxB,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAA;QAE9B,MAAM,MAAM,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAA;QAEtG,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC5B,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,IAAI,CAAC,CAAC,CAAA;QACtE,CAAC;IACF,CAAC;IAED,KAAK,CAAC,KAAK;QACV,IAAI,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;YAClB,OAAM;QACP,CAAC;QAED,MAAM,YAAY,GAAG,IAAI,OAAO,CAAO,OAAO,CAAC,EAAE;YAChD,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAA;QACpC,CAAC,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAA;QAEnB,MAAM,YAAY,CAAA;QAElB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAA;IACnB,CAAC;IACD,IAAI,CAAC,GAAwB,EAAE,EAA0B;QACxD,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAA;QAE1B,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC5B,CAAC;CACD"}
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import type { GetCatalogOptions, ProductCreate, ProductUpdate, SocketConfig, WAMediaUpload } from '../Types/index.js';
|
|
2
|
+
import type { UpdateBussinesProfileProps } from '../Types/Bussines.js';
|
|
3
|
+
import { type BinaryNode } from '../WABinary/index.js';
|
|
4
|
+
export declare const makeBusinessSocket: (config: SocketConfig) => {
|
|
5
|
+
logger: import("../Utils/logger.js").ILogger;
|
|
6
|
+
getOrderDetails: (orderId: string, tokenBase64: string) => Promise<import("../index.js").OrderDetails>;
|
|
7
|
+
getCatalog: ({ jid, limit, cursor }: GetCatalogOptions) => Promise<{
|
|
8
|
+
products: import("../index.js").Product[];
|
|
9
|
+
nextPageCursor: string | undefined;
|
|
10
|
+
}>;
|
|
11
|
+
getCollections: (jid?: string, limit?: number) => Promise<{
|
|
12
|
+
collections: import("../index.js").CatalogCollection[];
|
|
13
|
+
}>;
|
|
14
|
+
productCreate: (create: ProductCreate) => Promise<import("../index.js").Product>;
|
|
15
|
+
productDelete: (productIds: string[]) => Promise<{
|
|
16
|
+
deleted: number;
|
|
17
|
+
}>;
|
|
18
|
+
productUpdate: (productId: string, update: ProductUpdate) => Promise<import("../index.js").Product>;
|
|
19
|
+
updateBussinesProfile: (args: UpdateBussinesProfileProps) => Promise<any>;
|
|
20
|
+
updateCoverPhoto: (photo: WAMediaUpload) => Promise<number>;
|
|
21
|
+
removeCoverPhoto: (id: string) => Promise<any>;
|
|
22
|
+
sendMessageAck: (node: BinaryNode, errorCode?: number) => Promise<void>;
|
|
23
|
+
sendRetryRequest: (node: BinaryNode, forceIncludeKeys?: boolean) => Promise<void>;
|
|
24
|
+
rejectCall: (callId: string, callFrom: string) => Promise<void>;
|
|
25
|
+
fetchMessageHistory: (count: number, oldestMsgKey: import("../index.js").WAMessageKey, oldestMsgTimestamp: number | import("long").default) => Promise<string>;
|
|
26
|
+
requestPlaceholderResend: (messageKey: import("../index.js").WAMessageKey, msgData?: Partial<import("../index.js").WAMessage>) => Promise<string | undefined>;
|
|
27
|
+
messageRetryManager: import("../index.js").MessageRetryManager | null;
|
|
28
|
+
userDevicesCache: import("../index.js").PossiblyExtendedCacheStore | import("@cacheable/node-cache").NodeCache<import("../index.js").JidWithDevice[]>;
|
|
29
|
+
devicesMutex: {
|
|
30
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
31
|
+
};
|
|
32
|
+
issuePrivacyTokens: (jids: string[], timestamp?: number) => Promise<any>;
|
|
33
|
+
assertSessions: (jids: string[], force?: boolean) => Promise<boolean>;
|
|
34
|
+
relayMessage: (jid: string, message: import("../index.js").proto.IMessage, { messageId: msgId, participant, additionalAttributes, additionalNodes, useUserDevicesCache, useCachedGroupMetadata, statusJidList }: import("../index.js").MessageRelayOptions) => Promise<string>;
|
|
35
|
+
sendReceipt: (jid: string, participant: string | undefined, messageIds: string[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
36
|
+
sendReceipts: (keys: import("../index.js").WAMessageKey[], type: import("../index.js").MessageReceiptType) => Promise<void>;
|
|
37
|
+
readMessages: (keys: import("../index.js").WAMessageKey[]) => Promise<void>;
|
|
38
|
+
refreshMediaConn: (forceGet?: boolean) => Promise<import("../index.js").MediaConnInfo>;
|
|
39
|
+
getMediaHost: () => string;
|
|
40
|
+
waUploadToServer: import("../index.js").WAMediaUploadFunction;
|
|
41
|
+
fetchPrivacySettings: (force?: boolean) => Promise<{
|
|
42
|
+
[_: string]: string;
|
|
43
|
+
}>;
|
|
44
|
+
sendPeerDataOperationMessage: (pdoMessage: import("../index.js").proto.Message.IPeerDataOperationRequestMessage) => Promise<string>;
|
|
45
|
+
createParticipantNodes: (recipientJids: string[], message: import("../index.js").proto.IMessage, extraAttrs?: BinaryNode["attrs"], dsmMessage?: import("../index.js").proto.IMessage) => Promise<{
|
|
46
|
+
nodes: BinaryNode[];
|
|
47
|
+
shouldIncludeDeviceIdentity: boolean;
|
|
48
|
+
}>;
|
|
49
|
+
getUSyncDevices: (jids: string[], useCache: boolean, ignoreZeroDevices: boolean) => Promise<(import("../index.js").JidWithDevice & {
|
|
50
|
+
jid: string;
|
|
51
|
+
})[]>;
|
|
52
|
+
updateMemberLabel: (jid: string, memberLabel: string) => Promise<string>;
|
|
53
|
+
updateMediaMessage: (message: import("../index.js").WAMessage) => Promise<import("../index.js").WAMessage>;
|
|
54
|
+
sendMessage: (jid: string, content: import("../index.js").AnyMessageContent, options?: import("../index.js").MiscMessageGenerationOptions) => Promise<import("../index.js").WAMessage | undefined>;
|
|
55
|
+
newsletterCreate: (name: string, description?: string) => Promise<import("../index.js").NewsletterMetadata>;
|
|
56
|
+
newsletterUpdate: (jid: string, updates: import("../index.js").NewsletterUpdate) => Promise<unknown>;
|
|
57
|
+
newsletterSubscribers: (jid: string) => Promise<{
|
|
58
|
+
subscribers: number;
|
|
59
|
+
}>;
|
|
60
|
+
newsletterMetadata: (type: "invite" | "jid", key: string) => Promise<import("../index.js").NewsletterMetadata | null>;
|
|
61
|
+
newsletterFollow: (jid: string) => Promise<unknown>;
|
|
62
|
+
newsletterUnfollow: (jid: string) => Promise<unknown>;
|
|
63
|
+
newsletterMute: (jid: string) => Promise<unknown>;
|
|
64
|
+
newsletterUnmute: (jid: string) => Promise<unknown>;
|
|
65
|
+
newsletterUpdateName: (jid: string, name: string) => Promise<unknown>;
|
|
66
|
+
newsletterUpdateDescription: (jid: string, description: string) => Promise<unknown>;
|
|
67
|
+
newsletterUpdatePicture: (jid: string, content: WAMediaUpload) => Promise<unknown>;
|
|
68
|
+
newsletterRemovePicture: (jid: string) => Promise<unknown>;
|
|
69
|
+
newsletterReactMessage: (jid: string, serverId: string, reaction?: string) => Promise<void>;
|
|
70
|
+
newsletterFetchMessages: (jid: string, count: number, since: number, after: number) => Promise<any>;
|
|
71
|
+
subscribeNewsletterUpdates: (jid: string) => Promise<{
|
|
72
|
+
duration: string;
|
|
73
|
+
} | null>;
|
|
74
|
+
newsletterAdminCount: (jid: string) => Promise<number>;
|
|
75
|
+
newsletterChangeOwner: (jid: string, newOwnerJid: string) => Promise<void>;
|
|
76
|
+
newsletterDemote: (jid: string, userJid: string) => Promise<void>;
|
|
77
|
+
newsletterDelete: (jid: string) => Promise<void>;
|
|
78
|
+
groupMetadata: (jid: string) => Promise<import("../index.js").GroupMetadata>;
|
|
79
|
+
groupCreate: (subject: string, participants: string[]) => Promise<import("../index.js").GroupMetadata>;
|
|
80
|
+
groupLeave: (id: string) => Promise<void>;
|
|
81
|
+
groupUpdateSubject: (jid: string, subject: string) => Promise<void>;
|
|
82
|
+
groupRequestParticipantsList: (jid: string) => Promise<{
|
|
83
|
+
[key: string]: string;
|
|
84
|
+
}[]>;
|
|
85
|
+
groupRequestParticipantsUpdate: (jid: string, participants: string[], action: "approve" | "reject") => Promise<{
|
|
86
|
+
status: string;
|
|
87
|
+
jid: string | undefined;
|
|
88
|
+
}[]>;
|
|
89
|
+
groupParticipantsUpdate: (jid: string, participants: string[], action: import("../index.js").ParticipantAction) => Promise<{
|
|
90
|
+
status: string;
|
|
91
|
+
jid: string | undefined;
|
|
92
|
+
content: BinaryNode;
|
|
93
|
+
}[]>;
|
|
94
|
+
groupUpdateDescription: (jid: string, description?: string) => Promise<void>;
|
|
95
|
+
groupInviteCode: (jid: string) => Promise<string | undefined>;
|
|
96
|
+
groupRevokeInvite: (jid: string) => Promise<string | undefined>;
|
|
97
|
+
groupAcceptInvite: (code: string) => Promise<string | undefined>;
|
|
98
|
+
groupRevokeInviteV4: (groupJid: string, invitedJid: string) => Promise<boolean>;
|
|
99
|
+
groupAcceptInviteV4: (key: string | import("../index.js").WAMessageKey, inviteMessage: import("../index.js").proto.Message.IGroupInviteMessage) => Promise<any>;
|
|
100
|
+
groupGetInviteInfo: (code: string) => Promise<import("../index.js").GroupMetadata>;
|
|
101
|
+
groupToggleEphemeral: (jid: string, ephemeralExpiration: number) => Promise<void>;
|
|
102
|
+
groupSettingUpdate: (jid: string, setting: "announcement" | "not_announcement" | "locked" | "unlocked") => Promise<void>;
|
|
103
|
+
groupMemberAddMode: (jid: string, mode: "admin_add" | "all_member_add") => Promise<void>;
|
|
104
|
+
groupJoinApprovalMode: (jid: string, mode: "on" | "off") => Promise<void>;
|
|
105
|
+
groupFetchAllParticipating: () => Promise<{
|
|
106
|
+
[_: string]: import("../index.js").GroupMetadata;
|
|
107
|
+
}>;
|
|
108
|
+
serverProps: {
|
|
109
|
+
privacyTokenOn1to1: boolean;
|
|
110
|
+
profilePicPrivacyToken: boolean;
|
|
111
|
+
lidTrustedTokenIssueToLid: boolean;
|
|
112
|
+
};
|
|
113
|
+
createCallLink: (type: "audio" | "video", event?: {
|
|
114
|
+
startTime: number;
|
|
115
|
+
}, timeoutMs?: number) => Promise<string | undefined>;
|
|
116
|
+
getBotListV2: () => Promise<import("../index.js").BotListInfo[]>;
|
|
117
|
+
messageMutex: {
|
|
118
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
119
|
+
};
|
|
120
|
+
receiptMutex: {
|
|
121
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
122
|
+
};
|
|
123
|
+
appStatePatchMutex: {
|
|
124
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
125
|
+
};
|
|
126
|
+
notificationMutex: {
|
|
127
|
+
mutex<T>(code: () => Promise<T> | T): Promise<T>;
|
|
128
|
+
};
|
|
129
|
+
upsertMessage: (msg: import("../index.js").WAMessage, type: import("../index.js").MessageUpsertType) => Promise<void>;
|
|
130
|
+
appPatch: (patchCreate: import("../index.js").WAPatchCreate) => Promise<void>;
|
|
131
|
+
sendPresenceUpdate: (type: import("../index.js").WAPresence, toJid?: string) => Promise<void>;
|
|
132
|
+
presenceSubscribe: (toJid: string) => Promise<void>;
|
|
133
|
+
profilePictureUrl: (jid: string, type?: "preview" | "image", timeoutMs?: number) => Promise<string | undefined>;
|
|
134
|
+
fetchBlocklist: () => Promise<(string | undefined)[]>;
|
|
135
|
+
fetchStatus: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
136
|
+
fetchDisappearingDuration: (...jids: string[]) => Promise<import("../index.js").USyncQueryResultList[] | undefined>;
|
|
137
|
+
updateProfilePicture: (jid: string, content: WAMediaUpload, dimensions?: {
|
|
138
|
+
width: number;
|
|
139
|
+
height: number;
|
|
140
|
+
}) => Promise<void>;
|
|
141
|
+
removeProfilePicture: (jid: string) => Promise<void>;
|
|
142
|
+
updateProfileStatus: (status: string) => Promise<void>;
|
|
143
|
+
updateProfileName: (name: string) => Promise<void>;
|
|
144
|
+
updateBlockStatus: (jid: string, action: "block" | "unblock") => Promise<void>;
|
|
145
|
+
updateDisableLinkPreviewsPrivacy: (isPreviewsDisabled: boolean) => Promise<void>;
|
|
146
|
+
updateCallPrivacy: (value: import("../index.js").WAPrivacyCallValue) => Promise<void>;
|
|
147
|
+
updateMessagesPrivacy: (value: import("../index.js").WAPrivacyMessagesValue) => Promise<void>;
|
|
148
|
+
updateLastSeenPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
149
|
+
updateOnlinePrivacy: (value: import("../index.js").WAPrivacyOnlineValue) => Promise<void>;
|
|
150
|
+
updateProfilePicturePrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
151
|
+
updateStatusPrivacy: (value: import("../index.js").WAPrivacyValue) => Promise<void>;
|
|
152
|
+
updateReadReceiptsPrivacy: (value: import("../index.js").WAReadReceiptsValue) => Promise<void>;
|
|
153
|
+
updateGroupsAddPrivacy: (value: import("../index.js").WAPrivacyGroupAddValue) => Promise<void>;
|
|
154
|
+
updateDefaultDisappearingMode: (duration: number) => Promise<void>;
|
|
155
|
+
getBusinessProfile: (jid: string) => Promise<import("../index.js").WABusinessProfile | void>;
|
|
156
|
+
resyncAppState: (collections: readonly ("critical_unblock_low" | "regular_high" | "regular_low" | "critical_block" | "regular")[], isInitialSync: boolean) => Promise<void>;
|
|
157
|
+
chatModify: (mod: import("../index.js").ChatModification, jid: string) => Promise<void>;
|
|
158
|
+
cleanDirtyBits: (type: "account_sync" | "groups", fromTimestamp?: number | string) => Promise<void>;
|
|
159
|
+
addOrEditContact: (jid: string, contact: import("../index.js").proto.SyncActionValue.IContactAction) => Promise<void>;
|
|
160
|
+
removeContact: (jid: string) => Promise<void>;
|
|
161
|
+
placeholderResendCache: import("../index.js").CacheStore;
|
|
162
|
+
addLabel: (jid: string, labels: import("../Types/Label.js").LabelActionBody) => Promise<void>;
|
|
163
|
+
addChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
164
|
+
removeChatLabel: (jid: string, labelId: string) => Promise<void>;
|
|
165
|
+
addMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
166
|
+
removeMessageLabel: (jid: string, messageId: string, labelId: string) => Promise<void>;
|
|
167
|
+
star: (jid: string, messages: {
|
|
168
|
+
id: string;
|
|
169
|
+
fromMe?: boolean;
|
|
170
|
+
}[], star: boolean) => Promise<void>;
|
|
171
|
+
addOrEditQuickReply: (quickReply: import("../Types/Bussines.js").QuickReplyAction) => Promise<void>;
|
|
172
|
+
removeQuickReply: (timestamp: string) => Promise<void>;
|
|
173
|
+
type: "md";
|
|
174
|
+
ws: import("./Client/index.js").WebSocketClient;
|
|
175
|
+
ev: import("../index.js").BaileysEventEmitter & {
|
|
176
|
+
process(handler: (events: Partial<import("../index.js").BaileysEventMap>) => void | Promise<void>): () => void;
|
|
177
|
+
buffer(): void;
|
|
178
|
+
createBufferedFunction<A extends any[], T>(work: (...args: A) => Promise<T>): (...args: A) => Promise<T>;
|
|
179
|
+
flush(): boolean;
|
|
180
|
+
isBuffering(): boolean;
|
|
181
|
+
destroy(): void;
|
|
182
|
+
};
|
|
183
|
+
authState: {
|
|
184
|
+
creds: import("../index.js").AuthenticationCreds;
|
|
185
|
+
keys: import("../index.js").SignalKeyStoreWithTransaction;
|
|
186
|
+
};
|
|
187
|
+
signalRepository: import("../index.js").SignalRepositoryWithLIDStore;
|
|
188
|
+
user: import("../index.js").Contact | undefined;
|
|
189
|
+
generateMessageTag: () => string;
|
|
190
|
+
query: (node: BinaryNode, timeoutMs?: number) => Promise<any>;
|
|
191
|
+
waitForMessage: <T>(msgId: string, timeoutMs?: number | undefined) => Promise<T | undefined>;
|
|
192
|
+
waitForSocketOpen: () => Promise<void>;
|
|
193
|
+
sendRawMessage: (data: Uint8Array | Buffer) => Promise<void>;
|
|
194
|
+
sendNode: (frame: BinaryNode) => Promise<void>;
|
|
195
|
+
logout: (msg?: string) => Promise<void>;
|
|
196
|
+
end: (error: Error | undefined) => Promise<void>;
|
|
197
|
+
registerSocketEndHandler: (handler: (error: Error | undefined) => void | Promise<void>) => void;
|
|
198
|
+
onUnexpectedError: (err: Error | import("@hapi/boom").Boom, msg: string) => void;
|
|
199
|
+
uploadPreKeys: (count?: number) => Promise<void>;
|
|
200
|
+
uploadPreKeysToServerIfRequired: () => Promise<void>;
|
|
201
|
+
digestKeyBundle: () => Promise<void>;
|
|
202
|
+
rotateSignedPreKey: () => Promise<void>;
|
|
203
|
+
requestPairingCode: (phoneNumber: string, customPairingCode?: string) => Promise<string>;
|
|
204
|
+
updateServerTimeOffset: ({ attrs }: BinaryNode) => void;
|
|
205
|
+
sendUnifiedSession: () => Promise<void>;
|
|
206
|
+
wamBuffer: import("../index.js").BinaryInfo;
|
|
207
|
+
waitForConnectionUpdate: (check: (u: Partial<import("../index.js").ConnectionState>) => Promise<boolean | undefined>, timeoutMs?: number) => Promise<void>;
|
|
208
|
+
sendWAMBuffer: (wamBuffer: Buffer) => Promise<any>;
|
|
209
|
+
executeUSyncQuery: (usyncQuery: import("../index.js").USyncQuery) => Promise<import("../index.js").USyncQueryResult | undefined>;
|
|
210
|
+
onWhatsApp: (...phoneNumber: string[]) => Promise<{
|
|
211
|
+
jid: string;
|
|
212
|
+
exists: boolean;
|
|
213
|
+
}[] | undefined>;
|
|
214
|
+
fetchAccountReachoutTimelock: () => Promise<import("../index.js").ReachoutTimelockState>;
|
|
215
|
+
fetchNewChatMessageCap: () => Promise<import("../index.js").NewChatMessageCapInfo>;
|
|
216
|
+
};
|
|
217
|
+
//# sourceMappingURL=business.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/Socket/business.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAC5G,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAA;AAUnE,OAAO,EAAE,KAAK,UAAU,EAAqC,MAAM,aAAa,CAAA;AAIhF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY;;+BA8Od,MAAM,eAAe,MAAM;yCAjGjB,iBAAiB;;;;2BAmD/B,MAAM;;;4BAkIL,aAAa;gCAwCT,MAAM,EAAE;;;+BA9ET,MAAM,UAAU,aAAa;kCAxR1B,0BAA0B;8BA2E9B,aAAa;2BAoChB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAsSqvnB,CAAC;;;;;;;;;0DAhX9wnB,GAAG,0BAChB,GAAH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8WF,CAAA"}
|