@wppconnect/wa-js 2.16.3 → 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 CHANGED
@@ -1,5 +1 @@
1
- ## 2.16.3 (2022-12-01)
2
-
3
- ### Bug Fixes
4
-
5
- - Fixed buttons/list reply is not flagging chat as unread (fix [#768](https://github.com/wppconnect-team/wa-js/issues/768)) ([3c3cd94](https://github.com/wppconnect-team/wa-js/commit/3c3cd94f5ff92bf1668d3c92a8c3ca0de024c309))
1
+ # 2.17.0 (2022-12-06)
@@ -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;
@@ -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(): any;
20
+ export declare function getHistorySyncProgress(): HistorySyncProgressModel;