@pney/whatsapp-web 1.34.6 → 1.34.7-1

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.
Files changed (59) hide show
  1. package/.env.example +0 -1
  2. package/.gitattributes +4 -0
  3. package/.husky/commit-msg +4 -0
  4. package/.husky/pre-commit +1 -0
  5. package/.lintstagedrc.json +6 -0
  6. package/.prettierignore +8 -0
  7. package/.prettierrc.json +10 -0
  8. package/README.md +83 -80
  9. package/commitlint.config.js +29 -0
  10. package/eslint.config.mjs +67 -0
  11. package/example.js +151 -71
  12. package/index.d.ts +982 -734
  13. package/index.js +4 -4
  14. package/package.json +3 -3
  15. package/shell.js +4 -4
  16. package/src/Client.js +1860 -920
  17. package/src/authStrategies/BaseAuthStrategy.js +4 -2
  18. package/src/authStrategies/LocalAuth.js +25 -12
  19. package/src/authStrategies/NoAuth.js +3 -4
  20. package/src/authStrategies/RemoteAuth.js +92 -43
  21. package/src/factories/ChatFactory.js +1 -1
  22. package/src/factories/ContactFactory.js +2 -2
  23. package/src/structures/Base.js +5 -3
  24. package/src/structures/Broadcast.js +1 -2
  25. package/src/structures/BusinessContact.js +1 -2
  26. package/src/structures/Buttons.js +14 -10
  27. package/src/structures/Call.js +10 -6
  28. package/src/structures/Channel.js +171 -91
  29. package/src/structures/Chat.js +57 -41
  30. package/src/structures/ClientInfo.js +1 -1
  31. package/src/structures/Contact.js +37 -16
  32. package/src/structures/GroupChat.js +425 -228
  33. package/src/structures/GroupNotification.js +21 -12
  34. package/src/structures/Label.js +6 -6
  35. package/src/structures/List.js +22 -14
  36. package/src/structures/Location.js +5 -4
  37. package/src/structures/Message.js +412 -168
  38. package/src/structures/MessageMedia.js +31 -18
  39. package/src/structures/Order.js +4 -4
  40. package/src/structures/Payment.js +6 -3
  41. package/src/structures/Poll.js +2 -2
  42. package/src/structures/PollVote.js +9 -6
  43. package/src/structures/PrivateChat.js +2 -4
  44. package/src/structures/PrivateContact.js +2 -4
  45. package/src/structures/Product.js +1 -1
  46. package/src/structures/ProductMetadata.js +1 -2
  47. package/src/structures/Reaction.js +2 -4
  48. package/src/structures/ScheduledEvent.js +22 -10
  49. package/src/util/Constants.js +8 -6
  50. package/src/util/Injected/AuthStore/AuthStore.js +7 -3
  51. package/src/util/Injected/Utils.js +753 -345
  52. package/src/util/InterfaceController.js +72 -25
  53. package/src/util/Puppeteer.js +1 -1
  54. package/src/util/Util.js +28 -15
  55. package/src/webCache/LocalWebCache.js +7 -5
  56. package/src/webCache/RemoteWebCache.js +10 -4
  57. package/src/webCache/WebCache.js +8 -5
  58. package/src/webCache/WebCacheFactory.js +9 -9
  59. 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.6",
3
+ "version": "1.34.7-1",
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/pedroslopez/whatsapp-web.js.git"
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/pedroslopez/whatsapp-web.js/issues"
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...');