@wppconnect/wa-js 3.5.0 → 3.6.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,9 +1,4 @@
1
- # 3.5.0 (2024-07-12)
2
-
3
-
4
- ### Features
5
-
6
- * Added 'conn.logout_reason' event (close [#1899](https://github.com/wppconnect-team/wa-js/issues/1899)) ([2466c30](https://github.com/wppconnect-team/wa-js/commit/2466c30cad19eaa14c2119e476d44b2e2e61d265))
1
+ # 3.6.0 (2024-07-16)
7
2
 
8
3
 
9
4
 
package/README.md CHANGED
@@ -47,6 +47,56 @@ There are a convection name for some exported modules:
47
47
  - `...Collection` - Class for collection of models (`ChatCollection`, `MsgCollection`)
48
48
  - `...Store` - Default and global instance of a collection (`ChatStore`, `MsgStore`)
49
49
 
50
+ ## Some Available functions
51
+ ### General Functions
52
+ `WPP.conn.connect` - Connect to WhatsApp Web
53
+
54
+ `WPP.conn.isAuthenticated` - Check if the connection is authenticated
55
+
56
+ `WPP.conn.logout` - Logout from WhatsApp Web
57
+
58
+ ### Chat Functions
59
+ `WPP.chat.sendTextMessage` - Send a text message
60
+
61
+ `WPP.chat.sendImageMessage` - Send an image message
62
+
63
+ `WPP.chat.sendVideoMessage` - Send a video message
64
+
65
+ `WPP.chat.sendFileMessage` - Send a file message
66
+
67
+ `WPP.chat.sendAudioMessage` - Send an audio message
68
+
69
+ `WPP.chat.getChat` - Get chat details
70
+
71
+ `WPP.chat.deleteMessage` - Delete a message
72
+
73
+ ### Contact Functions
74
+ `WPP.contact.getContact` - Get contact details
75
+
76
+ `WPP.contact.blockContact` - Block a contact
77
+
78
+ `WPP.contact.unblockContact` - Unblock a contact
79
+
80
+ `WPP.contact.getAllContacts` - Get all contacts
81
+
82
+ ### Group Functions
83
+ `WPP.group.createGroup` - Create a new group
84
+
85
+ `WPP.group.addParticipant` - Add a participant to a group
86
+
87
+ `WPP.group.removeParticipant` - Remove a participant from a group.
88
+
89
+ `WPP.group.promoteParticipant` - Promote a participant to admin
90
+
91
+ `WPP.group.demoteParticipant` - Demote a participant from admin.
92
+
93
+ `WPP.group.getGroupInfo` - Get group information.
94
+
95
+ ### Events
96
+ `WPP.chat.on('chat.new_message')` - Event to dispatch on receive a new message
97
+
98
+ To see all events, check: [https://wppconnect.io/wa-js/types/ev.EventTypes.html](https://wppconnect.io/wa-js/types/ev.EventTypes.html)
99
+
50
100
  ## Development
51
101
 
52
102
  Steps to run locally:
@@ -0,0 +1,26 @@
1
+ /*!
2
+ * Copyright 2024 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
+ * Close the chat tab
18
+ *
19
+ * @example
20
+ * ```javascript
21
+ * await WPP.chat.closeChat();
22
+ * ```
23
+ *
24
+ * @category Chat
25
+ */
26
+ export declare function closeChat(): Promise<boolean>;
@@ -18,6 +18,7 @@ export { canMarkPlayed } from './canMarkPlayed';
18
18
  export { canMute } from './canMute';
19
19
  export { canReply } from './canReply';
20
20
  export { clear } from './clear';
21
+ export { closeChat } from './closeChat';
21
22
  export { delete } from './delete';
22
23
  export { deleteMessage, DeleteMessageReturn } from './deleteMessage';
23
24
  export { downloadMedia } from './downloadMedia';