@wppconnect/wa-js 3.22.0 → 3.23.0
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/CHANGELOG.md +2 -2
- package/dist/conn/events/eventTypes.d.ts +23 -1
- package/dist/conn/events/index.d.ts +1 -0
- package/dist/conn/events/registerMainReadyEvent.d.ts +1 -1
- package/dist/conn/events/registerStreamEvent.d.ts +16 -0
- package/dist/conn/functions/getStreamData.d.ts +31 -0
- package/dist/conn/functions/index.d.ts +1 -0
- package/dist/eventEmitter/index.d.ts +25 -25
- package/dist/whatsapp/enums/StreamInfo.d.ts +28 -0
- package/dist/whatsapp/enums/StreamMode.d.ts +30 -0
- package/dist/whatsapp/enums/index.d.ts +2 -0
- package/dist/whatsapp/functions/msgFindByDirection.d.ts +11 -4
- package/dist/whatsapp/models/StreamModel.d.ts +8 -10
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
# 3.
|
|
1
|
+
# 3.23.0 (2026-03-04)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* handle case when newAPIAnchor is not provided in getMessages ([#3369](https://github.com/wppconnect-team/wa-js/issues/3369)) ([b4452a2](https://github.com/wppconnect-team/wa-js/commit/b4452a2cdf98cfd5880ab2d1e2f53541f6021a0e))
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { LogoutReason } from '../../whatsapp/enums';
|
|
16
|
+
import { LogoutReason, StreamInfo, StreamMode } from '../../whatsapp/enums';
|
|
17
17
|
import { AuthCode } from '../types';
|
|
18
18
|
export interface ConnEventTypes {
|
|
19
19
|
'conn.auth_code_change': AuthCode | null;
|
|
@@ -91,4 +91,26 @@ export interface ConnEventTypes {
|
|
|
91
91
|
'conn.online': boolean;
|
|
92
92
|
'conn.qrcode_idle': undefined;
|
|
93
93
|
'conn.require_auth': undefined;
|
|
94
|
+
/**
|
|
95
|
+
* Triggered when the stream mode changes
|
|
96
|
+
*
|
|
97
|
+
* @example
|
|
98
|
+
* ```javascript
|
|
99
|
+
* WPP.on('conn.stream_mode', (mode) => {
|
|
100
|
+
* console.log('Stream mode changed to:', mode);
|
|
101
|
+
* });
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
'conn.stream_mode': StreamMode;
|
|
105
|
+
/**
|
|
106
|
+
* Triggered when the stream info changes
|
|
107
|
+
*
|
|
108
|
+
* @example
|
|
109
|
+
* ```javascript
|
|
110
|
+
* WPP.on('conn.stream_info', (info) => {
|
|
111
|
+
* console.log('Stream info changed to:', info);
|
|
112
|
+
* });
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
115
|
+
'conn.stream_info': StreamInfo;
|
|
94
116
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2021 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
import { StreamInfo, StreamMode } from '../../whatsapp/enums';
|
|
17
|
+
export interface StreamData {
|
|
18
|
+
mode: StreamMode;
|
|
19
|
+
info: StreamInfo | undefined;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get current stream mode and info
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```javascript
|
|
26
|
+
* const streamData = WPP.conn.getStreamData();
|
|
27
|
+
* console.log(streamData.mode); // 'MAIN', 'QR', 'SYNCING', etc.
|
|
28
|
+
* console.log(streamData.info); // 'NORMAL', 'OPENING', 'SYNCING', etc.
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function getStreamData(): StreamData;
|
|
@@ -26,6 +26,7 @@ export { getMyUserId } from './getMyUserId';
|
|
|
26
26
|
export { getMyUserLid } from './getMyUserLid';
|
|
27
27
|
export { getMyUserWid } from './getMyUserWid';
|
|
28
28
|
export { getPlatform } from './getPlatform';
|
|
29
|
+
export { getStreamData, StreamData } from './getStreamData';
|
|
29
30
|
export { getTheme, Theme } from './getTheme';
|
|
30
31
|
export { isAuthenticated } from './isAuthenticated';
|
|
31
32
|
export { isIdle } from './isIdle';
|
|
@@ -22,24 +22,24 @@ export declare const ev: EventEmitter<import("./eventTypes").BlocklistEventTypes
|
|
|
22
22
|
beta: (from: number, to: string) => void;
|
|
23
23
|
}>;
|
|
24
24
|
export { EventEmitter };
|
|
25
|
-
export declare const addListener: <Name extends "
|
|
25
|
+
export declare const addListener: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
26
26
|
alfa: string;
|
|
27
27
|
beta: (from: number, to: string) => void;
|
|
28
28
|
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
29
29
|
alfa: string;
|
|
30
30
|
beta: (from: number, to: string) => void;
|
|
31
31
|
}> | import("eventemitter2").Listener;
|
|
32
|
-
export declare const emit: <Name extends "
|
|
32
|
+
export declare const emit: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, ...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
33
33
|
alfa: string;
|
|
34
34
|
beta: (from: number, to: string) => void;
|
|
35
35
|
})[Name]>) => boolean;
|
|
36
|
-
export declare const emitAsync: <Name extends "
|
|
36
|
+
export declare const emitAsync: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, ...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
37
37
|
alfa: string;
|
|
38
38
|
beta: (from: number, to: string) => void;
|
|
39
39
|
})[Name]>) => Promise<any[]>;
|
|
40
|
-
export declare const eventNames: <Name extends "
|
|
40
|
+
export declare const eventNames: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(nsAsArray?: boolean) => Name[];
|
|
41
41
|
export declare const getMaxListeners: () => number;
|
|
42
|
-
export declare const hasListeners: <Name extends "
|
|
42
|
+
export declare const hasListeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => boolean;
|
|
43
43
|
export declare const listenTo: {
|
|
44
44
|
(target: import("eventemitter2").GeneralEventEmitter, events: import("eventemitter2").event | import("eventemitter2").eventNS, options?: import("eventemitter2").ListenToOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
45
45
|
alfa: string;
|
|
@@ -54,17 +54,17 @@ export declare const listenTo: {
|
|
|
54
54
|
beta: (from: number, to: string) => void;
|
|
55
55
|
}>;
|
|
56
56
|
};
|
|
57
|
-
export declare const listenerCount: <Name extends "
|
|
58
|
-
export declare const listeners: <Name extends "
|
|
57
|
+
export declare const listenerCount: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => number;
|
|
58
|
+
export declare const listeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => import("eventemitter2").ListenerFn[];
|
|
59
59
|
export declare const listenersAny: () => import("eventemitter2").ListenerFn[];
|
|
60
60
|
export declare const many: {
|
|
61
|
-
<Name extends "
|
|
61
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
62
62
|
alfa: string;
|
|
63
63
|
beta: (from: number, to: string) => void;
|
|
64
64
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
65
65
|
objectify: true;
|
|
66
66
|
}): import("eventemitter2").Listener;
|
|
67
|
-
<Name extends "
|
|
67
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
68
68
|
alfa: string;
|
|
69
69
|
beta: (from: number, to: string) => void;
|
|
70
70
|
})[Name]>) => void, options?: boolean | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -72,7 +72,7 @@ export declare const many: {
|
|
|
72
72
|
beta: (from: number, to: string) => void;
|
|
73
73
|
}>;
|
|
74
74
|
};
|
|
75
|
-
export declare const off: <Name extends "
|
|
75
|
+
export declare const off: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
76
76
|
alfa: string;
|
|
77
77
|
beta: (from: number, to: string) => void;
|
|
78
78
|
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -84,13 +84,13 @@ export declare const offAny: (listener: import("eventemitter2").ListenerFn) => E
|
|
|
84
84
|
beta: (from: number, to: string) => void;
|
|
85
85
|
}>;
|
|
86
86
|
export declare const on: {
|
|
87
|
-
<Name extends "
|
|
87
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
88
88
|
alfa: string;
|
|
89
89
|
beta: (from: number, to: string) => void;
|
|
90
90
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
91
91
|
objectify: true;
|
|
92
92
|
}): import("eventemitter2").Listener;
|
|
93
|
-
<Name extends "
|
|
93
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
94
94
|
alfa: string;
|
|
95
95
|
beta: (from: number, to: string) => void;
|
|
96
96
|
})[Name]>) => void, options?: boolean | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -103,13 +103,13 @@ export declare const onAny: (listener: import("eventemitter2").EventAndListener)
|
|
|
103
103
|
beta: (from: number, to: string) => void;
|
|
104
104
|
}>;
|
|
105
105
|
export declare const once: {
|
|
106
|
-
<Name extends "
|
|
106
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
107
107
|
alfa: string;
|
|
108
108
|
beta: (from: number, to: string) => void;
|
|
109
109
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
110
110
|
objectify: true;
|
|
111
111
|
}): import("eventemitter2").Listener;
|
|
112
|
-
<Name extends "
|
|
112
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
113
113
|
alfa: string;
|
|
114
114
|
beta: (from: number, to: string) => void;
|
|
115
115
|
})[Name]>) => void, options?: true | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -122,13 +122,13 @@ export declare const prependAny: (listener: import("eventemitter2").EventAndList
|
|
|
122
122
|
beta: (from: number, to: string) => void;
|
|
123
123
|
}>;
|
|
124
124
|
export declare const prependListener: {
|
|
125
|
-
<Name extends "
|
|
125
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
126
126
|
alfa: string;
|
|
127
127
|
beta: (from: number, to: string) => void;
|
|
128
128
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
129
129
|
objectify: true;
|
|
130
130
|
}): import("eventemitter2").Listener;
|
|
131
|
-
<Name extends "
|
|
131
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
132
132
|
alfa: string;
|
|
133
133
|
beta: (from: number, to: string) => void;
|
|
134
134
|
})[Name]>) => void, options?: boolean | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -137,13 +137,13 @@ export declare const prependListener: {
|
|
|
137
137
|
}>;
|
|
138
138
|
};
|
|
139
139
|
export declare const prependMany: {
|
|
140
|
-
<Name extends "
|
|
140
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
141
141
|
alfa: string;
|
|
142
142
|
beta: (from: number, to: string) => void;
|
|
143
143
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
144
144
|
objectify: true;
|
|
145
145
|
}): import("eventemitter2").Listener;
|
|
146
|
-
<Name extends "
|
|
146
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timesToListen: number, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
147
147
|
alfa: string;
|
|
148
148
|
beta: (from: number, to: string) => void;
|
|
149
149
|
})[Name]>) => void, options?: boolean | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -152,13 +152,13 @@ export declare const prependMany: {
|
|
|
152
152
|
}>;
|
|
153
153
|
};
|
|
154
154
|
export declare const prependOnceListener: {
|
|
155
|
-
<Name extends "
|
|
155
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
156
156
|
alfa: string;
|
|
157
157
|
beta: (from: number, to: string) => void;
|
|
158
158
|
})[Name]>) => void, options: import("./eventEmitter").OnOptions & {
|
|
159
159
|
objectify: true;
|
|
160
160
|
}): import("eventemitter2").Listener;
|
|
161
|
-
<Name extends "
|
|
161
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
162
162
|
alfa: string;
|
|
163
163
|
beta: (from: number, to: string) => void;
|
|
164
164
|
})[Name]>) => void, options?: boolean | import("./eventEmitter").OnOptions): EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -166,11 +166,11 @@ export declare const prependOnceListener: {
|
|
|
166
166
|
beta: (from: number, to: string) => void;
|
|
167
167
|
}>;
|
|
168
168
|
};
|
|
169
|
-
export declare const removeAllListeners: <Name extends "
|
|
169
|
+
export declare const removeAllListeners: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event?: Name | undefined) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
170
170
|
alfa: string;
|
|
171
171
|
beta: (from: number, to: string) => void;
|
|
172
172
|
}>;
|
|
173
|
-
export declare const removeListener: <Name extends "
|
|
173
|
+
export declare const removeListener: <Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, listener: (...args: import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
174
174
|
alfa: string;
|
|
175
175
|
beta: (from: number, to: string) => void;
|
|
176
176
|
})[Name]>) => void) => EventEmitter<import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
@@ -180,15 +180,15 @@ export declare const removeListener: <Name extends "config.update" | "blocklist.
|
|
|
180
180
|
export declare const setMaxListeners: (n: number) => void;
|
|
181
181
|
export declare const stopListeningTo: (target?: import("eventemitter2").GeneralEventEmitter, event?: import("eventemitter2").event | import("eventemitter2").eventNS) => boolean;
|
|
182
182
|
export declare const waitFor: {
|
|
183
|
-
<Name extends "
|
|
183
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, timeout?: number): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
184
184
|
alfa: string;
|
|
185
185
|
beta: (from: number, to: string) => void;
|
|
186
186
|
})[Name]>>;
|
|
187
|
-
<Name extends "
|
|
187
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, filter?: import("./eventEmitter").WaitForFilter): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
188
188
|
alfa: string;
|
|
189
189
|
beta: (from: number, to: string) => void;
|
|
190
190
|
})[Name]>>;
|
|
191
|
-
<Name extends "
|
|
191
|
+
<Name extends "blocklist.sync" | "call.incoming_call" | keyof import("./eventTypes").ChatEventTypes | "config.update" | keyof import("./eventTypes").ConnEventTypes | "group.participant_changed" | "order.payment_status" | "status.sync" | keyof import("./eventTypes").WebpackEvents | "alfa" | "beta">(event: Name, options?: import("eventemitter2").WaitForOptions): import("eventemitter2").CancelablePromise<import("./eventEmitter").ListenerType<(import("./eventTypes").BlocklistEventTypes & import("./eventTypes").CallEventTypes & import("./eventTypes").ChatEventTypes & import("./eventTypes").ConfigEventTypes & import("./eventTypes").ConnEventTypes & import("./eventTypes").GroupEventTypes & import("./eventTypes").OrderEventTypes & import("./eventTypes").StatusEventTypes & import("./eventTypes").WebpackEvents & {
|
|
192
192
|
alfa: string;
|
|
193
193
|
beta: (from: number, to: string) => void;
|
|
194
194
|
})[Name]>>;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* StreamInfo represents the internal connection state
|
|
18
|
+
* @whatsapp 2.3000.x
|
|
19
|
+
*/
|
|
20
|
+
export declare enum StreamInfo {
|
|
21
|
+
OFFLINE = "OFFLINE",
|
|
22
|
+
OPENING = "OPENING",
|
|
23
|
+
PAIRING = "PAIRING",
|
|
24
|
+
SYNCING = "SYNCING",
|
|
25
|
+
RESUMING = "RESUMING",
|
|
26
|
+
CONNECTING = "CONNECTING",
|
|
27
|
+
NORMAL = "NORMAL"
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 WPPConnect Team
|
|
3
|
+
*
|
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
* you may not use this file except in compliance with the License.
|
|
6
|
+
* You may obtain a copy of the License at
|
|
7
|
+
*
|
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
*
|
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
* See the License for the specific language governing permissions and
|
|
14
|
+
* limitations under the License.
|
|
15
|
+
*/
|
|
16
|
+
/**
|
|
17
|
+
* StreamMode represents the connection state mode
|
|
18
|
+
* @whatsapp 2.3000.x
|
|
19
|
+
*/
|
|
20
|
+
export declare enum StreamMode {
|
|
21
|
+
QR = "QR",
|
|
22
|
+
MAIN = "MAIN",
|
|
23
|
+
SYNCING = "SYNCING",
|
|
24
|
+
OFFLINE = "OFFLINE",
|
|
25
|
+
CONFLICT = "CONFLICT",
|
|
26
|
+
PROXYBLOCK = "PROXYBLOCK",
|
|
27
|
+
TOS_BLOCK = "TOS_BLOCK",
|
|
28
|
+
SMB_TOS_BLOCK = "SMB_TOS_BLOCK",
|
|
29
|
+
DEPRECATED_VERSION = "DEPRECATED_VERSION"
|
|
30
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2026 WPPConnect Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -19,20 +19,27 @@ export interface MsgFindDirectionParams {
|
|
|
19
19
|
anchor: MsgKey;
|
|
20
20
|
count: number;
|
|
21
21
|
}
|
|
22
|
+
export interface MsgFindDirectionResult {
|
|
23
|
+
messages: ModelPropertiesContructor<MsgModel>[];
|
|
24
|
+
status: number;
|
|
25
|
+
}
|
|
22
26
|
/**
|
|
23
27
|
* Find messages before a specific message
|
|
24
28
|
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
29
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
25
30
|
*/
|
|
26
|
-
export declare function msgFindBefore(params: MsgFindDirectionParams): Promise<
|
|
31
|
+
export declare function msgFindBefore(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
|
|
27
32
|
/**
|
|
28
33
|
* Find messages after a specific message
|
|
29
34
|
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
35
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
30
36
|
*/
|
|
31
|
-
export declare function msgFindAfter(params: MsgFindDirectionParams): Promise<
|
|
37
|
+
export declare function msgFindAfter(params: MsgFindDirectionParams): Promise<MsgFindDirectionResult>;
|
|
32
38
|
/**
|
|
33
39
|
* Find messages by direction (before or after)
|
|
34
40
|
* @whatsapp WAWebDBMessageFindLocal >= 2.3000.1034162388
|
|
41
|
+
* @returns Object with messages array and status code (200 on success, 404 if anchor not found)
|
|
35
42
|
*/
|
|
36
43
|
export declare function msgFindByDirection(params: MsgFindDirectionParams & {
|
|
37
44
|
direction: 'before' | 'after';
|
|
38
|
-
}): Promise<
|
|
45
|
+
}): Promise<MsgFindDirectionResult>;
|
|
@@ -13,25 +13,26 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { StreamInfo, StreamMode } from '../enums';
|
|
16
17
|
import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
|
|
17
18
|
interface Props {
|
|
18
19
|
}
|
|
19
20
|
interface Session {
|
|
20
|
-
info?:
|
|
21
|
-
mode:
|
|
21
|
+
info?: StreamInfo;
|
|
22
|
+
mode: StreamMode;
|
|
22
23
|
obscurity?: any;
|
|
23
24
|
needsUpdate?: any;
|
|
24
|
-
|
|
25
|
-
hardExpired?: any;
|
|
25
|
+
isHardRefresh?: boolean;
|
|
26
26
|
lastSyncStart?: any;
|
|
27
27
|
needsManualDownload?: any;
|
|
28
28
|
couldForce?: any;
|
|
29
29
|
uiActive?: any;
|
|
30
|
+
isInConnectedCall?: boolean;
|
|
30
31
|
available?: any;
|
|
31
32
|
unavailableShiftTimer?: any;
|
|
33
|
+
unavailableAutoLockTimer?: any;
|
|
32
34
|
unavailableLogoutTimer?: any;
|
|
33
35
|
unobscureShiftTimer?: any;
|
|
34
|
-
timeoutEvent?: any;
|
|
35
36
|
resumeCount?: any;
|
|
36
37
|
phoneAuthed?: any;
|
|
37
38
|
}
|
|
@@ -48,16 +49,13 @@ export declare interface StreamModel extends ModelProxy<Props, Session, Derived>
|
|
|
48
49
|
*/
|
|
49
50
|
export declare class StreamModel extends Model {
|
|
50
51
|
constructor(proterties?: ModelPropertiesContructor<StreamModel>, options?: ModelOptions);
|
|
52
|
+
initialize(): void;
|
|
53
|
+
delete(): void;
|
|
51
54
|
markAvailable(): void;
|
|
52
55
|
markUnavailable(e?: any): void;
|
|
53
|
-
onSelfUpdate(): void;
|
|
54
|
-
onSocketUpdate(): void;
|
|
55
56
|
unobscure(): void;
|
|
56
|
-
onPhoneAuthedUpdate(): void;
|
|
57
|
-
onAvailableUpdate(): void;
|
|
58
57
|
sendAvailability(e?: any): void;
|
|
59
58
|
updateCouldForce(): void;
|
|
60
|
-
updateHardExpire(): void;
|
|
61
59
|
logPageResume(): void;
|
|
62
60
|
updateWamLog(): void;
|
|
63
61
|
logModeChange(): void;
|