@wppconnect/wa-js 2.11.1 → 2.12.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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
# 2.12.0 (2022-09-17)
|
|
2
2
|
|
|
3
|
-
###
|
|
3
|
+
### Features
|
|
4
4
|
|
|
5
|
-
-
|
|
5
|
+
- Added WPP.conn.markAvailable and WPP.conn.markUnavailable functions ([019bd36](https://github.com/wppconnect-team/wa-js/commit/019bd36d618a5e6bef6ba640573cafb4bcc1c185))
|
package/dist/chat/patch.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export { isMainLoaded } from './isMainLoaded';
|
|
|
23
23
|
export { isMainReady } from './isMainReady';
|
|
24
24
|
export { isMultiDevice } from './isMultiDevice';
|
|
25
25
|
export { logout } from './logout';
|
|
26
|
+
export { markAvailable, markUnavailable } from './markAvailable';
|
|
26
27
|
export { refreshQR } from './refreshQR';
|
|
27
28
|
export { setKeepAlive } from './setKeepAlive';
|
|
28
29
|
export { setMultiDevice } from './setMultiDevice';
|
|
@@ -0,0 +1,33 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Set the online state to online
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* await WPP.conn.markAvailable();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function markAvailable(available?: boolean): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Set the online state to offline
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```javascript
|
|
30
|
+
* await WPP.conn.markUnavailable();
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare function markUnavailable(): Promise<boolean>;
|
|
@@ -14,12 +14,23 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* GroupActionParticipant for @whatsapp >= 2.2234.6
|
|
19
|
+
*/
|
|
20
|
+
export interface GroupActionParticipant {
|
|
21
|
+
id: Wid;
|
|
22
|
+
isAdmin: boolean;
|
|
23
|
+
isSuperAdmin: boolean;
|
|
24
|
+
}
|
|
17
25
|
export interface GroupActionChange {
|
|
18
26
|
action: string;
|
|
19
27
|
actionType: string;
|
|
20
28
|
isInvite?: boolean;
|
|
21
29
|
isLinkedGroupJoin?: boolean;
|
|
22
|
-
|
|
30
|
+
/**
|
|
31
|
+
* GroupActionParticipant for @whatsapp >= 2.2234.6
|
|
32
|
+
*/
|
|
33
|
+
participants: Wid[] | GroupActionParticipant[];
|
|
23
34
|
prevVersion: number;
|
|
24
35
|
version: number;
|
|
25
36
|
}
|