@wppconnect/wa-js 2.16.2 → 2.17.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 +1 -5
- package/dist/conn/events/eventTypes.d.ts +11 -0
- package/dist/conn/events/index.d.ts +1 -0
- package/dist/conn/events/registerMainInit.d.ts +16 -0
- package/dist/conn/functions/getHistorySyncProgress.d.ts +32 -0
- package/dist/conn/functions/index.d.ts +2 -0
- package/dist/conn/functions/isMainInit.d.ts +24 -0
- package/dist/labels/types.d.ts +1 -1
- package/dist/whatsapp/functions/getHistorySyncProgress.d.ts +2 -1
- package/dist/whatsapp/functions/index.d.ts +2 -0
- package/dist/whatsapp/functions/isUnreadTypeMsg.d.ts +20 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +11 -11
package/CHANGELOG.md
CHANGED
|
@@ -28,6 +28,17 @@ export interface ConnEventTypes {
|
|
|
28
28
|
*/
|
|
29
29
|
'conn.authenticated': undefined;
|
|
30
30
|
'conn.logout': undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Triggered when the interface is booting
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```javascript
|
|
36
|
+
* WPP.on('conn.main_init', () => {
|
|
37
|
+
* // Your code
|
|
38
|
+
* });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
'conn.main_init': undefined;
|
|
31
42
|
/**
|
|
32
43
|
* Triggered when the main interface is loaded, but is syncing
|
|
33
44
|
*
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import './registerAuthCodeChangeEvent';
|
|
17
17
|
import './registerAuthenticatedEvent';
|
|
18
18
|
import './registerLogoutEvent';
|
|
19
|
+
import './registerMainInit';
|
|
19
20
|
import './registerMainLoadedEvent';
|
|
20
21
|
import './registerMainReadyEvent';
|
|
21
22
|
import './registerNeedsUpdateEvent';
|
|
@@ -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,32 @@
|
|
|
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 interface HistorySyncProgress {
|
|
17
|
+
progress: number | null;
|
|
18
|
+
paused: boolean;
|
|
19
|
+
inProgress: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Return the current state of syncing old messages progress
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```javascript
|
|
26
|
+
* const info = WPP.conn.getHistorySyncProgress();
|
|
27
|
+
* console.log(info.progress); // Output: 50
|
|
28
|
+
* console.log(info.paused); // Output: false0
|
|
29
|
+
* console.log(info.inProgress); // Output: true
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function getHistorySyncProgress(): HistorySyncProgress;
|
|
@@ -14,11 +14,13 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
export { getAuthCode } from './getAuthCode';
|
|
17
|
+
export { getHistorySyncProgress, HistorySyncProgress, } from './getHistorySyncProgress';
|
|
17
18
|
export { getMyDeviceId } from './getMyDeviceId';
|
|
18
19
|
export { getMyUserId } from './getMyUserId';
|
|
19
20
|
export { getPlatform } from './getPlatform';
|
|
20
21
|
export { isAuthenticated } from './isAuthenticated';
|
|
21
22
|
export { isIdle } from './isIdle';
|
|
23
|
+
export { isMainInit } from './isMainInit';
|
|
22
24
|
export { isMainLoaded } from './isMainLoaded';
|
|
23
25
|
export { isMainReady } from './isMainReady';
|
|
24
26
|
export { isMultiDevice } from './isMultiDevice';
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
* Check is main interface is initializing
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* const isMainInit = WPP.conn.isMainInit();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function isMainInit(): boolean;
|
package/dist/labels/types.d.ts
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { HistorySyncProgressModel } from '../models';
|
|
16
17
|
/**
|
|
17
18
|
* @whatsapp 649959 >= 2.2244.5
|
|
18
19
|
*/
|
|
19
|
-
export declare function getHistorySyncProgress():
|
|
20
|
+
export declare function getHistorySyncProgress(): HistorySyncProgressModel;
|
|
@@ -33,12 +33,14 @@ export * from './genMinimalLinkPreview';
|
|
|
33
33
|
export * from './getFanOutList';
|
|
34
34
|
export * from './getGroupSenderKeyList';
|
|
35
35
|
export * from './getHistorySyncProgress';
|
|
36
|
+
export * from './getQuotedMsgObj';
|
|
36
37
|
export * from './getSearchContext';
|
|
37
38
|
export * from './groupParticipants';
|
|
38
39
|
export * from './handleAck';
|
|
39
40
|
export * from './isAnimatedWebp';
|
|
40
41
|
export * from './isAuthenticated';
|
|
41
42
|
export * from './isRegistered';
|
|
43
|
+
export * from './isUnreadTypeMsg';
|
|
42
44
|
export * from './markSeen';
|
|
43
45
|
export * from './mediaTypeFromProtobuf';
|
|
44
46
|
export * from './msgFindQuery';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 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 { MsgModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 147980 >= 2.2245.9
|
|
19
|
+
*/
|
|
20
|
+
export declare function isUnreadTypeMsg(msg: MsgModel): boolean;
|