talkyzap-wapp-api 1.0.16 → 1.0.17

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,9 +1,4 @@
1
- ## 3.18.2 (2025-08-29)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * Fixed getMyDeviceId >= 2.3000.1026498050 ([#2869](https://github.com/wppconnect-team/wa-js/issues/2869)) ([56ee7de](https://github.com/wppconnect-team/wa-js/commit/56ee7de458fcd62ef59409cd307b1cc5ef9d76ec))
1
+ ## 3.18.6 (2025-09-26)
7
2
 
8
3
 
9
4
 
@@ -38,6 +38,20 @@ export interface ChatEventTypes {
38
38
  * ```
39
39
  */
40
40
  'chat.new_message': MsgModel;
41
+ 'chat.unread_count_changed': {
42
+ /**
43
+ * Chat that changed the unread count
44
+ */
45
+ chat: ChatModel;
46
+ /**
47
+ * Current unread messages count
48
+ */
49
+ unreadCount: number;
50
+ /**
51
+ * Previous unread messages count
52
+ */
53
+ previousUnreadCount: number;
54
+ };
41
55
  'chat.msg_revoke': {
42
56
  /**
43
57
  * Author of message, only for groups
@@ -23,3 +23,4 @@ import './registerReactionsEvent';
23
23
  import './registerRevokeMessageEvent';
24
24
  import './registerLabelEvent';
25
25
  import './registerEditedMessageEvent';
26
+ import './registerUnreadCountEvent';
@@ -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,23 @@
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
+ import { ChatModel } from '../../whatsapp';
17
+ /**
18
+ * Get all chats that have unread messages
19
+ *
20
+ * @category Chat
21
+ *
22
+ */
23
+ export declare function getUnreadChats(onlyNewUnreads: boolean): Promise<Array<ChatModel>>;
@@ -37,6 +37,7 @@ export { getPlatformFromMessage } from './getPlatformFromMessage';
37
37
  export { getQuotedMsg } from './getQuotedMsg';
38
38
  export { getQuotedMsgKey } from './getQuotedMsgKey';
39
39
  export { getReactions } from './getReactions';
40
+ export { getUnreadChats } from './getUnreadChats';
40
41
  export { getVotes } from './getVotes';
41
42
  export { keepMessage } from './keepMessage';
42
43
  export { ChatListOptions, list } from './list';
@@ -17,7 +17,15 @@ import { Wid } from '..';
17
17
  /**
18
18
  * @whatsapp 247355
19
19
  */
20
- export declare function createGroup(groupName: string, participants: Wid[], ephemeral?: number, parentGroup?: Wid): Promise<{
20
+ export declare function createGroup(options: {
21
+ title: string;
22
+ ephemeralDuration: number;
23
+ restrict: boolean;
24
+ announce: boolean;
25
+ membershipApprovalMode: boolean;
26
+ memberAddMode: boolean;
27
+ parentGroupId?: Wid;
28
+ }, participants: Wid[]): Promise<{
21
29
  wid: Wid;
22
30
  participants: {
23
31
  wid: Wid;
@@ -34,7 +42,9 @@ export declare function createGroup(options: {
34
42
  membershipApprovalMode: boolean;
35
43
  memberAddMode: boolean;
36
44
  parentGroupId?: Wid;
37
- }, participants: Wid[]): Promise<{
45
+ }, participants: {
46
+ phoneNumber: Wid;
47
+ }[]): Promise<{
38
48
  wid: Wid;
39
49
  participants: {
40
50
  wid: Wid;
@@ -16,4 +16,4 @@
16
16
  /**
17
17
  * @whatsapp WAWebLidMigrationUtils >= 2.3000.x
18
18
  */
19
- export declare function isLidMigrated(): boolean;
19
+ export declare function isLidMigrated(): boolean | (() => any);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
2
+ * Copyright 2025 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.
@@ -33,4 +33,5 @@ export declare namespace WidFactory {
33
33
  function userJidToUserWid(wid: string): Wid;
34
34
  function toUserLidOrThrow(wid: Wid): Wid;
35
35
  function toUserWidOrThrow(wid: Wid): Wid;
36
+ function createWid(wid: Wid): Wid;
36
37
  }