From 4bc67b0f99f150c39366d7c62ae05376c71d60e0 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Mon, 10 Feb 2020 21:53:33 -0400 Subject: [PATCH] chore: mark version v1.0.2 --- docs/Base.html | 6 +-- docs/BusinessContact.html | 6 +-- docs/Chat.html | 6 +-- docs/Client.html | 51 +++++++++++++++++++++---- docs/Client.js.html | 19 ++++++--- docs/ClientInfo.html | 6 +-- docs/Contact.html | 6 +-- docs/GroupChat.html | 6 +-- docs/Location.html | 6 +-- docs/Message.html | 6 +-- docs/MessageMedia.html | 6 +-- docs/PrivateChat.html | 6 +-- docs/PrivateContact.html | 6 +-- docs/Util.html | 6 +-- docs/global.html | 19 +++++++-- docs/index.html | 46 +++++++++++++--------- docs/structures_Base.js.html | 6 +-- docs/structures_BusinessContact.js.html | 6 +-- docs/structures_Chat.js.html | 6 +-- docs/structures_ClientInfo.js.html | 6 +-- docs/structures_Contact.js.html | 6 +-- docs/structures_GroupChat.js.html | 6 +-- docs/structures_Location.js.html | 6 +-- docs/structures_Message.js.html | 6 +-- docs/structures_MessageMedia.js.html | 6 +-- docs/structures_PrivateChat.js.html | 6 +-- docs/structures_PrivateContact.js.html | 6 +-- docs/util_Constants.js.html | 9 +++-- docs/util_Util.js.html | 6 +-- package.json | 2 +- 30 files changed, 180 insertions(+), 110 deletions(-) diff --git a/docs/Base.html b/docs/Base.html index 7ab9d04..b86f4fb 100644 --- a/docs/Base.html +++ b/docs/Base.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Base + whatsapp-web.js 1.0.2 » Class: Base @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -50,7 +50,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/BusinessContact.html b/docs/BusinessContact.html index 82a0d64..8fd9ce2 100644 --- a/docs/BusinessContact.html +++ b/docs/BusinessContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: BusinessContact + whatsapp-web.js 1.0.2 » Class: BusinessContact @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -227,7 +227,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Chat.html b/docs/Chat.html index c4579d2..bbe85fe 100644 --- a/docs/Chat.html +++ b/docs/Chat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Chat + whatsapp-web.js 1.0.2 » Class: Chat @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -190,7 +190,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Client.html b/docs/Client.html index 39ee573..c75c340 100644 --- a/docs/Client.html +++ b/docs/Client.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Client + whatsapp-web.js 1.0.2 » Class: Client @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -26,7 +26,7 @@
class

Client

-

Source: Client.js:32

+

Source: Client.js:33

Starting point for interacting with the WhatsApp Web API

@@ -89,6 +89,9 @@
authenticated
+
change_state
+
+
disconnected
@@ -105,13 +108,13 @@
message_revoke_everyone
+
message_revoke_me
+
+
-
message_revoke_me
-
-
qr
@@ -138,6 +141,7 @@
Client#event:message_revoke_me
Client#event:message_revoke_everyone
Client#event:disconnected
+
Client#event:change_state
@@ -445,6 +449,39 @@
+

change_state

+

Emitted when the connection state changes

+
+

Parameter

+ + + + + + + + + + + + + + + + + +
NameTypeOptionalDescription
+

state

+
+

WAState

+
+

 

+
+

the new connection state

+
+
+
+

disconnected

Emitted when the client has been disconnected

@@ -673,7 +710,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Client.js.html b/docs/Client.js.html index 083658a..60e663b 100644 --- a/docs/Client.js.html +++ b/docs/Client.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: Client.js + whatsapp-web.js 1.0.2 » Source: Client.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -58,6 +58,7 @@ const Location = require('./structures/Location'); * @fires Client#message_revoke_me * @fires Client#message_revoke_everyone * @fires Client#disconnected + * @fires Client#change_state */ class Client extends EventEmitter { constructor(options = {}) { @@ -231,8 +232,16 @@ class Client extends EventEmitter { }); - await page.exposeFunction('onAppStateChangedEvent', (AppState, state) => { - const ACCEPTED_STATES = [WAState.CONNECTED, WAState.OPENING, WAState.PAIRING]; + await page.exposeFunction('onAppStateChangedEvent', (_AppState, state) => { + + /** + * Emitted when the connection state changes + * @event Client#change_state + * @param {WAState} state the new connection state + */ + this.emit(Events.STATE_CHANGED, state); + + const ACCEPTED_STATES = [WAState.CONNECTED, WAState.OPENING, WAState.PAIRING, WAState.TIMEOUT]; if (!ACCEPTED_STATES.includes(state)) { /** * Emitted when the client has been disconnected @@ -387,7 +396,7 @@ module.exports = Client;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/ClientInfo.html b/docs/ClientInfo.html index 9d1dba4..fd16d3c 100644 --- a/docs/ClientInfo.html +++ b/docs/ClientInfo.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: ClientInfo + whatsapp-web.js 1.0.2 » Class: ClientInfo @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -187,7 +187,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Contact.html b/docs/Contact.html index 716a928..be03024 100644 --- a/docs/Contact.html +++ b/docs/Contact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Contact + whatsapp-web.js 1.0.2 » Class: Contact @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -196,7 +196,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/GroupChat.html b/docs/GroupChat.html index cf4faf0..96c2083 100644 --- a/docs/GroupChat.html +++ b/docs/GroupChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: GroupChat + whatsapp-web.js 1.0.2 » Class: GroupChat @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -555,7 +555,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Location.html b/docs/Location.html index 21e8d3e..5a2a0cb 100644 --- a/docs/Location.html +++ b/docs/Location.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Location + whatsapp-web.js 1.0.2 » Class: Location @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -149,7 +149,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Message.html b/docs/Message.html index 5d2efc9..7cc1337 100644 --- a/docs/Message.html +++ b/docs/Message.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Message + whatsapp-web.js 1.0.2 » Class: Message @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -333,7 +333,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/MessageMedia.html b/docs/MessageMedia.html index d8cc2d4..9ffca38 100644 --- a/docs/MessageMedia.html +++ b/docs/MessageMedia.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: MessageMedia + whatsapp-web.js 1.0.2 » Class: MessageMedia @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -152,7 +152,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/PrivateChat.html b/docs/PrivateChat.html index 280a7e4..42d54fc 100644 --- a/docs/PrivateChat.html +++ b/docs/PrivateChat.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: PrivateChat + whatsapp-web.js 1.0.2 » Class: PrivateChat @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -203,7 +203,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/PrivateContact.html b/docs/PrivateContact.html index 3d2b353..ab9de8a 100644 --- a/docs/PrivateContact.html +++ b/docs/PrivateContact.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: PrivateContact + whatsapp-web.js 1.0.2 » Class: PrivateContact @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -220,7 +220,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/Util.html b/docs/Util.html index 5e40de2..7d69ab9 100644 --- a/docs/Util.html +++ b/docs/Util.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Class: Util + whatsapp-web.js 1.0.2 » Class: Util @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -50,7 +50,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/global.html b/docs/global.html index 134674d..c83e3c9 100644 --- a/docs/global.html +++ b/docs/global.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Globals + whatsapp-web.js 1.0.2 » Globals @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -254,6 +254,19 @@ + + +

STATE_CHANGED

+ + +

 

+ + +

 

+ + + +
@@ -683,7 +696,7 @@

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/index.html b/docs/index.html index d721820..3825079 100644 --- a/docs/index.html +++ b/docs/index.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Home + whatsapp-web.js 1.0.2 » Home @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -27,7 +27,7 @@

- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2

@@ -405,12 +405,12 @@ client.initialize();
- Client#event:disconnected + Client#event:change_state
- Client#event:message + Client#event:disconnected
@@ -418,6 +418,11 @@ client.initialize();
+
+ Client#event:message +
+
+
Client#event:message_create
@@ -448,15 +453,15 @@ client.initialize();
+
+
+
+
Client#getChats()
-
-
-
-
Client#getContactById(contactId)
@@ -641,15 +646,15 @@ client.initialize();
-
-
-
-
Events.MESSAGE_CREATE
+
+
+
+
Events.MESSAGE_RECEIVED
@@ -660,10 +665,6 @@ client.initialize();
-
-
-
-
Events.MESSAGE_REVOKED_ME
@@ -674,11 +675,20 @@ client.initialize();
+
+
+
+
Events.READY
+
+ Events.STATE_CHANGED +
+
+
@@ -1393,7 +1403,7 @@ client.initialize();

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_Base.js.html b/docs/structures_Base.js.html index 6ff69f9..d4bccf1 100644 --- a/docs/structures_Base.js.html +++ b/docs/structures_Base.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/Base.js + whatsapp-web.js 1.0.2 » Source: structures/Base.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -60,7 +60,7 @@ module.exports = Base;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_BusinessContact.js.html b/docs/structures_BusinessContact.js.html index fa0a2aa..68a2197 100644 --- a/docs/structures_BusinessContact.js.html +++ b/docs/structures_BusinessContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/BusinessContact.js + whatsapp-web.js 1.0.2 » Source: structures/BusinessContact.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -59,7 +59,7 @@ module.exports = BusinessContact;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_Chat.js.html b/docs/structures_Chat.js.html index 36f43ea..6a711cc 100644 --- a/docs/structures_Chat.js.html +++ b/docs/structures_Chat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/Chat.js + whatsapp-web.js 1.0.2 » Source: structures/Chat.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -105,7 +105,7 @@ module.exports = Chat;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_ClientInfo.js.html b/docs/structures_ClientInfo.js.html index eaf6a0d..bf85f39 100644 --- a/docs/structures_ClientInfo.js.html +++ b/docs/structures_ClientInfo.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/ClientInfo.js + whatsapp-web.js 1.0.2 » Source: structures/ClientInfo.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -89,7 +89,7 @@ module.exports = ClientInfo;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_Contact.js.html b/docs/structures_Contact.js.html index 2484b4f..231c3d1 100644 --- a/docs/structures_Contact.js.html +++ b/docs/structures_Contact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/Contact.js + whatsapp-web.js 1.0.2 » Source: structures/Contact.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -153,7 +153,7 @@ module.exports = Contact;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_GroupChat.js.html b/docs/structures_GroupChat.js.html index 8f2a09d..a892cee 100644 --- a/docs/structures_GroupChat.js.html +++ b/docs/structures_GroupChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/GroupChat.js + whatsapp-web.js 1.0.2 » Source: structures/GroupChat.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -209,7 +209,7 @@ module.exports = GroupChat;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_Location.js.html b/docs/structures_Location.js.html index e58e8e6..1d9862a 100644 --- a/docs/structures_Location.js.html +++ b/docs/structures_Location.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/Location.js + whatsapp-web.js 1.0.2 » Source: structures/Location.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -71,7 +71,7 @@ module.exports = Location;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_Message.js.html b/docs/structures_Message.js.html index e640399..1241b3f 100644 --- a/docs/structures_Message.js.html +++ b/docs/structures_Message.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/Message.js + whatsapp-web.js 1.0.2 » Source: structures/Message.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -246,7 +246,7 @@ module.exports = Message;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_MessageMedia.js.html b/docs/structures_MessageMedia.js.html index a8e1221..bd03685 100644 --- a/docs/structures_MessageMedia.js.html +++ b/docs/structures_MessageMedia.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/MessageMedia.js + whatsapp-web.js 1.0.2 » Source: structures/MessageMedia.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -69,7 +69,7 @@ module.exports = MessageMedia;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_PrivateChat.js.html b/docs/structures_PrivateChat.js.html index 4833152..cdfd321 100644 --- a/docs/structures_PrivateChat.js.html +++ b/docs/structures_PrivateChat.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/PrivateChat.js + whatsapp-web.js 1.0.2 » Source: structures/PrivateChat.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -51,7 +51,7 @@ module.exports = PrivateChat;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/structures_PrivateContact.js.html b/docs/structures_PrivateContact.js.html index 791b44f..06da827 100644 --- a/docs/structures_PrivateContact.js.html +++ b/docs/structures_PrivateContact.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: structures/PrivateContact.js + whatsapp-web.js 1.0.2 » Source: structures/PrivateContact.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -51,7 +51,7 @@ module.exports = PrivateContact;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/util_Constants.js.html b/docs/util_Constants.js.html index d9c3e26..8b48371 100644 --- a/docs/util_Constants.js.html +++ b/docs/util_Constants.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: util/Constants.js + whatsapp-web.js 1.0.2 » Source: util/Constants.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -67,7 +67,8 @@ exports.Events = { MESSAGE_REVOKED_EVERYONE: 'message_revoke_everyone', MESSAGE_REVOKED_ME: 'message_revoke_me', QR_RECEIVED: 'qr', - DISCONNECTED: 'disconnected' + DISCONNECTED: 'disconnected', + STATE_CHANGED: 'change_state' }; /** @@ -129,7 +130,7 @@ exports.WAState = {

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/docs/util_Util.js.html b/docs/util_Util.js.html index de701a5..004fe58 100644 --- a/docs/util_Util.js.html +++ b/docs/util_Util.js.html @@ -4,7 +4,7 @@ - whatsapp-web.js 1.0.1 » Source: util/Util.js + whatsapp-web.js 1.0.2 » Source: util/Util.js @@ -15,7 +15,7 @@
- whatsapp-web.js 1.0.1 + whatsapp-web.js 1.0.2
@@ -73,7 +73,7 @@ module.exports = Util;

- Generated by JSDoc 3.6.3 on February 9, 2020. + Generated by JSDoc 3.6.3 on February 10, 2020.

diff --git a/package.json b/package.json index 5f82609..75cd182 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "whatsapp-web.js", - "version": "1.0.1-post", + "version": "1.0.2", "description": "Library for interacting with the WhatsApp Web API ", "main": "./index.js", "scripts": {