@pney/whatsapp-web 1.34.6 → 1.34.7-2
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/.env.example +0 -1
- package/.gitattributes +4 -0
- package/.husky/commit-msg +4 -0
- package/.husky/pre-commit +1 -0
- package/.lintstagedrc.json +6 -0
- package/.prettierignore +8 -0
- package/.prettierrc.json +10 -0
- package/README.md +83 -80
- package/commitlint.config.js +29 -0
- package/eslint.config.mjs +67 -0
- package/example.js +151 -71
- package/index.d.ts +982 -734
- package/index.js +4 -4
- package/package.json +3 -3
- package/shell.js +4 -4
- package/src/Client.js +1860 -920
- package/src/authStrategies/BaseAuthStrategy.js +4 -2
- package/src/authStrategies/LocalAuth.js +25 -12
- package/src/authStrategies/NoAuth.js +3 -4
- package/src/authStrategies/RemoteAuth.js +92 -43
- package/src/factories/ChatFactory.js +1 -1
- package/src/factories/ContactFactory.js +2 -2
- package/src/structures/Base.js +5 -3
- package/src/structures/Broadcast.js +1 -2
- package/src/structures/BusinessContact.js +1 -2
- package/src/structures/Buttons.js +14 -10
- package/src/structures/Call.js +10 -6
- package/src/structures/Channel.js +171 -91
- package/src/structures/Chat.js +57 -41
- package/src/structures/ClientInfo.js +1 -1
- package/src/structures/Contact.js +37 -16
- package/src/structures/GroupChat.js +425 -228
- package/src/structures/GroupNotification.js +21 -12
- package/src/structures/Label.js +6 -6
- package/src/structures/List.js +22 -14
- package/src/structures/Location.js +5 -4
- package/src/structures/Message.js +412 -168
- package/src/structures/MessageMedia.js +31 -18
- package/src/structures/Order.js +4 -4
- package/src/structures/Payment.js +6 -3
- package/src/structures/Poll.js +2 -2
- package/src/structures/PollVote.js +9 -6
- package/src/structures/PrivateChat.js +2 -4
- package/src/structures/PrivateContact.js +2 -4
- package/src/structures/Product.js +1 -1
- package/src/structures/ProductMetadata.js +1 -2
- package/src/structures/Reaction.js +2 -4
- package/src/structures/ScheduledEvent.js +22 -10
- package/src/util/Constants.js +8 -6
- package/src/util/Injected/AuthStore/AuthStore.js +7 -3
- package/src/util/Injected/Utils.js +753 -345
- package/src/util/InterfaceController.js +72 -25
- package/src/util/Puppeteer.js +1 -1
- package/src/util/Util.js +28 -15
- package/src/webCache/LocalWebCache.js +7 -5
- package/src/webCache/RemoteWebCache.js +10 -4
- package/src/webCache/WebCache.js +8 -5
- package/src/webCache/WebCacheFactory.js +9 -9
- package/CODE_OF_CONDUCT.md +0 -133
package/index.js
CHANGED
|
@@ -4,7 +4,7 @@ const Constants = require('./src/util/Constants');
|
|
|
4
4
|
|
|
5
5
|
module.exports = {
|
|
6
6
|
Client: require('./src/Client'),
|
|
7
|
-
|
|
7
|
+
|
|
8
8
|
version: require('./package.json').version,
|
|
9
9
|
|
|
10
10
|
// Structures
|
|
@@ -25,11 +25,11 @@ module.exports = {
|
|
|
25
25
|
List: require('./src/structures/List'),
|
|
26
26
|
Buttons: require('./src/structures/Buttons'),
|
|
27
27
|
Broadcast: require('./src/structures/Broadcast'),
|
|
28
|
-
|
|
28
|
+
|
|
29
29
|
// Auth Strategies
|
|
30
30
|
NoAuth: require('./src/authStrategies/NoAuth'),
|
|
31
31
|
LocalAuth: require('./src/authStrategies/LocalAuth'),
|
|
32
32
|
RemoteAuth: require('./src/authStrategies/RemoteAuth'),
|
|
33
|
-
|
|
34
|
-
...Constants
|
|
33
|
+
|
|
34
|
+
...Constants,
|
|
35
35
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pney/whatsapp-web",
|
|
3
|
-
"version": "1.34.
|
|
3
|
+
"version": "1.34.7-2",
|
|
4
4
|
"description": "Library for interacting with the WhatsApp Web API ",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"typings": "./index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
},
|
|
13
13
|
"repository": {
|
|
14
14
|
"type": "git",
|
|
15
|
-
"url": "git+https://github.com/
|
|
15
|
+
"url": "git+https://github.com/wwebjs/whatsapp-web.js.git"
|
|
16
16
|
},
|
|
17
17
|
"keywords": [
|
|
18
18
|
"whatsapp",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"author": "Pedro Lopez",
|
|
26
26
|
"license": "Apache-2.0",
|
|
27
27
|
"bugs": {
|
|
28
|
-
"url": "https://github.com/
|
|
28
|
+
"url": "https://github.com/wwebjs/whatsapp-web.js/issues"
|
|
29
29
|
},
|
|
30
30
|
"homepage": "https://wwebjs.dev/",
|
|
31
31
|
"dependencies": {
|
package/shell.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* ==== wwebjs-shell ====
|
|
3
3
|
* Used for quickly testing library features
|
|
4
|
-
*
|
|
4
|
+
*
|
|
5
5
|
* Running `npm run shell` will start WhatsApp Web with headless=false
|
|
6
|
-
* and then drop you into Node REPL with `client` in its context.
|
|
6
|
+
* and then drop you into Node REPL with `client` in its context.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
const repl = require('repl');
|
|
@@ -11,8 +11,8 @@ const repl = require('repl');
|
|
|
11
11
|
const { Client, LocalAuth } = require('./index');
|
|
12
12
|
|
|
13
13
|
const client = new Client({
|
|
14
|
-
puppeteer: { headless: false },
|
|
15
|
-
authStrategy: new LocalAuth()
|
|
14
|
+
puppeteer: { headless: false },
|
|
15
|
+
authStrategy: new LocalAuth(),
|
|
16
16
|
});
|
|
17
17
|
|
|
18
18
|
console.log('Initializing...');
|