@wppconnect-team/wppconnect 1.34.2 → 1.35.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 (46) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/api/helpers/download-file.js +2 -2
  3. package/dist/api/helpers/evaluate-and-return.js +2 -2
  4. package/dist/api/helpers/file-to-base64.js +2 -2
  5. package/dist/api/helpers/scrape-img-qr.js +2 -2
  6. package/dist/api/helpers/scrape-login.js +2 -2
  7. package/dist/api/helpers/select-sticker.js +2 -2
  8. package/dist/api/layers/business.layer.js +2 -2
  9. package/dist/api/layers/catalog.layer.js +2 -2
  10. package/dist/api/layers/community.layer.js +2 -2
  11. package/dist/api/layers/controls.layer.js +2 -2
  12. package/dist/api/layers/group.layer.d.ts +2 -1
  13. package/dist/api/layers/group.layer.js +4 -3
  14. package/dist/api/layers/host.layer.d.ts +1 -1
  15. package/dist/api/layers/host.layer.js +4 -4
  16. package/dist/api/layers/labels.layer.js +2 -2
  17. package/dist/api/layers/listener.layer.d.ts +19 -19
  18. package/dist/api/layers/listener.layer.js +5 -5
  19. package/dist/api/layers/newsletter.layer.js +2 -2
  20. package/dist/api/layers/profile.layer.d.ts +5 -0
  21. package/dist/api/layers/profile.layer.js +9 -2
  22. package/dist/api/layers/retriever.layer.d.ts +8 -8
  23. package/dist/api/layers/retriever.layer.js +8 -8
  24. package/dist/api/layers/sender.layer.d.ts +6 -3
  25. package/dist/api/layers/sender.layer.js +2 -2
  26. package/dist/api/layers/status.layer.js +2 -2
  27. package/dist/api/layers/ui.layer.d.ts +1 -1
  28. package/dist/api/layers/ui.layer.js +4 -8
  29. package/dist/api/model/chat.d.ts +6 -0
  30. package/dist/api/model/get-messages-param.d.ts +7 -8
  31. package/dist/api/model/group-metadata.d.ts +16 -2
  32. package/dist/api/model/initializer.d.ts +1 -1
  33. package/dist/api/model/message.d.ts +2 -0
  34. package/dist/api/whatsapp.d.ts +4 -4
  35. package/dist/api/whatsapp.js +7 -7
  36. package/dist/config/create-config.d.ts +18 -0
  37. package/dist/config/create-config.js +2 -1
  38. package/dist/controllers/auth.js +2 -2
  39. package/dist/controllers/browser.d.ts +5 -1
  40. package/dist/controllers/browser.js +28 -18
  41. package/dist/controllers/initializer.js +2 -2
  42. package/dist/controllers/welcome.js +2 -2
  43. package/dist/lib/wapi/wapi.js +1 -1
  44. package/dist/token-store/fileTokenStore.js +2 -2
  45. package/dist/utils/ffmpeg.js +2 -2
  46. package/package.json +24 -23
package/CHANGELOG.md CHANGED
@@ -1,3 +1,11 @@
1
+ ## <small>1.35.1 (2024-10-30)</small>
2
+
3
+ - fix: Upgrade whatsappVersion to 2.3000.10173x ([2b609f5](https://github.com/wppconnect-team/wppconnect/commit/2b609f5))
4
+
5
+ ## 1.35.0 (2024-10-24)
6
+
7
+ - fix(deps): update dependency @wppconnect/wa-version to ^1.5.557 (#2399) ([4bc22a5](https://github.com/wppconnect-team/wppconnect/commit/4bc22a5)), closes [#2399](https://github.com/wppconnect-team/wppconnect/issues/2399)
8
+
1
9
  ## <small>1.34.2 (2024-09-27)</small>
2
10
 
3
11
  - build(deps): update dependency puppeteer to ^23.4.1 (#2349) ([fe16137](https://github.com/wppconnect-team/wppconnect/commit/fe16137)), closes [#2349](https://github.com/wppconnect-team/wppconnect/issues/2349)
@@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25
25
  });
26
26
  };
27
27
  var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
29
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
30
  function verb(n) { return function (v) { return step([n, v]); }; }
31
31
  function step(op) {
32
32
  if (f) throw new TypeError("Generator is already executing.");
@@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25
25
  });
26
26
  };
27
27
  var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
29
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
30
  function verb(n) { return function (v) { return step([n, v]); }; }
31
31
  function step(op) {
32
32
  if (f) throw new TypeError("Generator is already executing.");
@@ -48,8 +48,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
48
48
  });
49
49
  };
50
50
  var __generator = (this && this.__generator) || function (thisArg, body) {
51
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
52
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
51
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
52
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
53
53
  function verb(n) { return function (v) { return step([n, v]); }; }
54
54
  function step(op) {
55
55
  if (f) throw new TypeError("Generator is already executing.");
@@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25
25
  });
26
26
  };
27
27
  var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
29
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
30
  function verb(n) { return function (v) { return step([n, v]); }; }
31
31
  function step(op) {
32
32
  if (f) throw new TypeError("Generator is already executing.");
@@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25
25
  });
26
26
  };
27
27
  var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
29
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
30
  function verb(n) { return function (v) { return step([n, v]); }; }
31
31
  function step(op) {
32
32
  if (f) throw new TypeError("Generator is already executing.");
@@ -25,8 +25,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
25
25
  });
26
26
  };
27
27
  var __generator = (this && this.__generator) || function (thisArg, body) {
28
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
29
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
28
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
29
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
30
30
  function verb(n) { return function (v) { return step([n, v]); }; }
31
31
  function step(op) {
32
32
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -19,7 +19,8 @@ export declare class GroupLayer extends RetrieverLayer {
19
19
  */
20
20
  getGroupMembersIds(groupId: string): Promise<Id[]>;
21
21
  /**
22
- * Returns group members [Contact] objects
22
+ * Returns current group members as [Contact] objects
23
+ * For previous members, see `groupMetadata.pastParticipants`.
23
24
  * @category Group
24
25
  * @param groupId
25
26
  */
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -104,7 +104,8 @@ var GroupLayer = /** @class */ (function (_super) {
104
104
  });
105
105
  };
106
106
  /**
107
- * Returns group members [Contact] objects
107
+ * Returns current group members as [Contact] objects
108
+ * For previous members, see `groupMetadata.pastParticipants`.
108
109
  * @category Group
109
110
  * @param groupId
110
111
  */
@@ -63,7 +63,7 @@ export declare class HostLayer {
63
63
  */
64
64
  getWAJSVersion(): Promise<string>;
65
65
  /**
66
- * Retrieves the connecction state
66
+ * Retrieves the connection state
67
67
  * @category Host
68
68
  */
69
69
  getConnectionState(): Promise<SocketState>;
@@ -36,8 +36,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
36
36
  });
37
37
  };
38
38
  var __generator = (this && this.__generator) || function (thisArg, body) {
39
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
40
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
39
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
40
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
41
41
  function verb(n) { return function (v) { return step([n, v]); }; }
42
42
  function step(op) {
43
43
  if (f) throw new TypeError("Generator is already executing.");
@@ -189,7 +189,7 @@ var HostLayer = /** @class */ (function () {
189
189
  return [2 /*return*/];
190
190
  }
191
191
  this.isStarted = true;
192
- return [4 /*yield*/, (0, browser_1.initWhatsapp)(this.page, null, false, this.options.whatsappVersion, this.log.bind(this))];
192
+ return [4 /*yield*/, (0, browser_1.initWhatsapp)(this.page, null, false, this.options.whatsappVersion, this.options.proxy, this.log.bind(this))];
193
193
  case 1:
194
194
  _a.sent();
195
195
  return [4 /*yield*/, this.page.exposeFunction('checkQrCode', function () { return _this.checkQrCode(); })];
@@ -617,7 +617,7 @@ var HostLayer = /** @class */ (function () {
617
617
  });
618
618
  };
619
619
  /**
620
- * Retrieves the connecction state
620
+ * Retrieves the connection state
621
621
  * @category Host
622
622
  */
623
623
  HostLayer.prototype.getConnectionState = function () {
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -81,43 +81,43 @@ export declare class ListenerLayer extends ProfileLayer {
81
81
  dispose: () => void;
82
82
  };
83
83
  /**
84
- * @event Listens to messages acknowledgement Changes
84
+ * @event Listens to message acknowledgement changes
85
85
  * @returns Disposable object to stop the listening
86
86
  */
87
87
  onAck(callback: (ack: Ack) => void): {
88
88
  dispose: () => void;
89
89
  };
90
90
  /**
91
- * Escuta os eventos de Localização em tempo real de todos os chats
92
- * @event Eventos de Localização em tempo real
93
- * @param callback Função para ser executada quando houver alterações
94
- * @returns Objeto descartável para parar de ouvir
91
+ * Listens to real-time location events of all chats
92
+ * @event Real-time location events
93
+ * @param callback Function to be executed when changes are made
94
+ * @returns Disposable object to stop listening
95
95
  */
96
96
  onLiveLocation(callback: (liveLocationEvent: LiveLocation) => void): {
97
97
  dispose: () => void;
98
98
  };
99
99
  /**
100
- * Escuta os eventos de Localização em tempo real
101
- * @event Eventos de Localização em tempo real
102
- * @param id Único ID ou lista de IDs de contatos para acompanhar a localização
103
- * @param callback Função para ser executada quando houver alterações
104
- * @returns Objeto descartável para parar de ouvir
100
+ * Listens to location events in real time
101
+ * @event Location events in real time
102
+ * @param id Unique ID or list of contact IDs to track location
103
+ * @param callback Function to be executed when changes are made
104
+ * @returns Disposable object to stop listening
105
105
  */
106
106
  onLiveLocation(id: string | string[], callback: (liveLocationEvent: LiveLocation) => void): {
107
107
  dispose: () => void;
108
108
  };
109
109
  /**
110
- * @event Listens to participants changed
111
- * @param to callback
110
+ * @event Listens to participant changes
111
+ * @param callback Function to be executed when participant changes occur
112
112
  * @returns Stream of ParticipantEvent
113
113
  */
114
114
  onParticipantsChanged(callback: (evData: ParticipantEvent) => void): {
115
115
  dispose: () => void;
116
116
  };
117
117
  /**
118
- * @event Listens to participants changed
119
- * @param to group id: xxxxx-yyyy@us.c
120
- * @param to callback
118
+ * @event Listens to participant changes in a certain group
119
+ * @param groupId xxxxx-yyyy@us.c
120
+ * @param callback Function to be executed when participant changes occur
121
121
  * @returns Stream of ParticipantEvent
122
122
  */
123
123
  onParticipantsChanged(groupId: string, callback: (evData: ParticipantEvent) => void): {
@@ -149,8 +149,8 @@ export declare class ListenerLayer extends ProfileLayer {
149
149
  dispose: () => void;
150
150
  };
151
151
  /**
152
- * Listens to presence changed, the callback will triggered only for passed IDs
153
- * @event Listens to presence changed
152
+ * Listens to presence changes, the callback will triggered only for passed IDs
153
+ * @event Listens to presence changes
154
154
  * @param id contact id (xxxxx@c.us) or group id: xxxxx-yyyy@g.us
155
155
  * @param callback Callback of on presence changed
156
156
  * @returns Disposable object to stop the listening
@@ -185,7 +185,7 @@ export declare class ListenerLayer extends ProfileLayer {
185
185
  */
186
186
  unsubscribePresence(id: string | string[]): Promise<number>;
187
187
  /**
188
- * @event Listens to revoked messages
188
+ * @event Listens to message revocation
189
189
  * @returns Disposable object to stop the listening
190
190
  */
191
191
  onRevokedMessage(callback: (data: {
@@ -198,7 +198,7 @@ export declare class ListenerLayer extends ProfileLayer {
198
198
  dispose: () => void;
199
199
  };
200
200
  /**
201
- * @event Listens to reaction messages
201
+ * @event Listens to message reactions
202
202
  * @returns Disposable object to stop the listening
203
203
  */
204
204
  onReactionMessage(callback: (data: {
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -462,7 +462,7 @@ var ListenerLayer = /** @class */ (function (_super) {
462
462
  return this.registerEvent(exposed_enum_1.ExposedFn.onInterfaceChange, callback);
463
463
  };
464
464
  /**
465
- * @event Listens to messages acknowledgement Changes
465
+ * @event Listens to message acknowledgement changes
466
466
  * @returns Disposable object to stop the listening
467
467
  */
468
468
  ListenerLayer.prototype.onAck = function (callback) {
@@ -589,14 +589,14 @@ var ListenerLayer = /** @class */ (function (_super) {
589
589
  });
590
590
  };
591
591
  /**
592
- * @event Listens to revoked messages
592
+ * @event Listens to message revocation
593
593
  * @returns Disposable object to stop the listening
594
594
  */
595
595
  ListenerLayer.prototype.onRevokedMessage = function (callback) {
596
596
  return this.registerEvent('onRevokedMessage', callback);
597
597
  };
598
598
  /**
599
- * @event Listens to reaction messages
599
+ * @event Listens to message reactions
600
600
  * @returns Disposable object to stop the listening
601
601
  */
602
602
  ListenerLayer.prototype.onReactionMessage = function (callback) {
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -24,6 +24,11 @@ export declare class ProfileLayer extends StatusLayer {
24
24
  * @param status
25
25
  */
26
26
  setProfileStatus(status: string): Promise<void>;
27
+ /**
28
+ * Gets current user profile status
29
+ * @category Profile
30
+ */
31
+ getProfileStatus(): Promise<string>;
27
32
  /**
28
33
  * Sets the user's current profile photo
29
34
  * @category Profile
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -126,6 +126,13 @@ var ProfileLayer = /** @class */ (function (_super) {
126
126
  });
127
127
  });
128
128
  };
129
+ /**
130
+ * Gets current user profile status
131
+ * @category Profile
132
+ */
133
+ ProfileLayer.prototype.getProfileStatus = function () {
134
+ return (0, helpers_1.evaluateAndReturn)(this.page, function () { return WPP.profile.getMyStatus(); });
135
+ };
129
136
  /**
130
137
  * Sets the user's current profile photo
131
138
  * @category Profile
@@ -77,7 +77,7 @@ export declare class RetrieverLayer extends SenderLayer {
77
77
  * Checks if a number is a valid WA number
78
78
  * @category Contact
79
79
  * @param contactId, you need to include the @c.us at the end.
80
- * @returns contact detial as promise
80
+ * @returns contact details as promise
81
81
  */
82
82
  checkNumberStatus(contactId: string): Promise<WhatsappProfile>;
83
83
  /**
@@ -108,7 +108,7 @@ export declare class RetrieverLayer extends SenderLayer {
108
108
  * Retrieves contact detail object of given contact id
109
109
  * @category Contact
110
110
  * @param contactId
111
- * @returns contact detial as promise
111
+ * @returns contact details as promise
112
112
  */
113
113
  getContact(contactId: string): Promise<Contact>;
114
114
  /**
@@ -121,17 +121,17 @@ export declare class RetrieverLayer extends SenderLayer {
121
121
  * Retrieves chat object of given contact id
122
122
  * @category Chat
123
123
  * @param contactId
124
- * @returns contact detial as promise
124
+ * @returns chat details as promise
125
125
  */
126
- getChatById(contactId: string): Promise<Chat>;
126
+ getChatById(contactId: string | Wid): Promise<Chat>;
127
127
  /**
128
128
  * Retrieves chat object of given contact id
129
129
  * @category Chat
130
130
  * @param contactId
131
- * @returns contact detial as promise
131
+ * @returns chat details as promise
132
132
  * @deprecated
133
133
  */
134
- getChat(contactId: string): Promise<Chat>;
134
+ getChat(contactId: string | Wid): Promise<Chat>;
135
135
  /**
136
136
  * Retorna dados da imagem do contato
137
137
  * @category Contact
@@ -146,7 +146,7 @@ export declare class RetrieverLayer extends SenderLayer {
146
146
  * @deprecated Depreciado em favor de getMessages
147
147
  * @category Chat
148
148
  * @param contactId
149
- * @returns contact detial as promise
149
+ * @returns contact details as promise
150
150
  */
151
151
  loadEarlierMessages(contactId: string): Promise<import("../model").Message[]>;
152
152
  /**
@@ -162,7 +162,7 @@ export declare class RetrieverLayer extends SenderLayer {
162
162
  * @deprecated Deprecated in favor of checkNumberStatus
163
163
  * @category Contact
164
164
  * @param contactId, you need to include the @c.us at the end.
165
- * @returns contact detial as promise
165
+ * @returns contact details as promise
166
166
  */
167
167
  getNumberProfile(contactId: string): Promise<WhatsappProfile>;
168
168
  /**
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -258,7 +258,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
258
258
  * Checks if a number is a valid WA number
259
259
  * @category Contact
260
260
  * @param contactId, you need to include the @c.us at the end.
261
- * @returns contact detial as promise
261
+ * @returns contact details as promise
262
262
  */
263
263
  RetrieverLayer.prototype.checkNumberStatus = function (contactId) {
264
264
  return __awaiter(this, void 0, void 0, function () {
@@ -350,7 +350,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
350
350
  * Retrieves contact detail object of given contact id
351
351
  * @category Contact
352
352
  * @param contactId
353
- * @returns contact detial as promise
353
+ * @returns contact details as promise
354
354
  */
355
355
  RetrieverLayer.prototype.getContact = function (contactId) {
356
356
  return __awaiter(this, void 0, void 0, function () {
@@ -378,7 +378,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
378
378
  * Retrieves chat object of given contact id
379
379
  * @category Chat
380
380
  * @param contactId
381
- * @returns contact detial as promise
381
+ * @returns chat details as promise
382
382
  */
383
383
  RetrieverLayer.prototype.getChatById = function (contactId) {
384
384
  return __awaiter(this, void 0, void 0, function () {
@@ -391,7 +391,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
391
391
  * Retrieves chat object of given contact id
392
392
  * @category Chat
393
393
  * @param contactId
394
- * @returns contact detial as promise
394
+ * @returns chat details as promise
395
395
  * @deprecated
396
396
  */
397
397
  RetrieverLayer.prototype.getChat = function (contactId) {
@@ -421,7 +421,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
421
421
  * @deprecated Depreciado em favor de getMessages
422
422
  * @category Chat
423
423
  * @param contactId
424
- * @returns contact detial as promise
424
+ * @returns contact details as promise
425
425
  */
426
426
  RetrieverLayer.prototype.loadEarlierMessages = function (contactId) {
427
427
  return __awaiter(this, void 0, void 0, function () {
@@ -466,7 +466,7 @@ var RetrieverLayer = /** @class */ (function (_super) {
466
466
  * @deprecated Deprecated in favor of checkNumberStatus
467
467
  * @category Contact
468
468
  * @param contactId, you need to include the @c.us at the end.
469
- * @returns contact detial as promise
469
+ * @returns contact details as promise
470
470
  */
471
471
  RetrieverLayer.prototype.getNumberProfile = function (contactId) {
472
472
  return __awaiter(this, void 0, void 0, function () {
@@ -1,7 +1,7 @@
1
1
  import type { FileMessageOptions, ListMessageOptions, LocationMessageOptions, SendMessageReturn, TextMessageOptions, PoolMessageOptions, ForwardMessagesOptions, AllMessageOptions } from '@wppconnect/wa-js/dist/chat';
2
2
  import { Page } from 'puppeteer';
3
3
  import { CreateConfig } from '../../config/create-config';
4
- import { Message } from '../model';
4
+ import { Message, Wid } from '../model';
5
5
  import { ChatState } from '../model/enum';
6
6
  import { ListenerLayer } from './listener.layer';
7
7
  import { OrderItems, OrderMessageOptions } from '@wppconnect/wa-js/dist/chat/functions/sendChargeMessage';
@@ -182,7 +182,10 @@ export declare class SenderLayer extends ListenerLayer {
182
182
  *
183
183
  * @example
184
184
  * ```javascript
185
- * // Simple message
185
+ * // File message from a path
186
+ * client.sendFile('<number>@c.us', './someFile.txt');
187
+ * // Simple message from base64
188
+ *
186
189
  * client.sendFile('<number>@c.us', 'data:text/plain;base64,V1BQQ29ubmVjdA==');
187
190
  *
188
191
  * // With buttons
@@ -216,7 +219,7 @@ export declare class SenderLayer extends ListenerLayer {
216
219
  * @param pathOrBase64 File path
217
220
  * @param options
218
221
  */
219
- sendFile(to: string, pathOrBase64: string, options?: FileMessageOptions): any;
222
+ sendFile(to: string | Wid, pathOrBase64: string, options?: FileMessageOptions): any;
220
223
  /**
221
224
  * Sends file from path or base64
222
225
  *
@@ -74,8 +74,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
74
74
  });
75
75
  };
76
76
  var __generator = (this && this.__generator) || function (thisArg, body) {
77
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
78
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
77
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
78
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
79
79
  function verb(n) { return function (v) { return step([n, v]); }; }
80
80
  function step(op) {
81
81
  if (f) throw new TypeError("Generator is already executing.");
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -25,7 +25,7 @@ export declare class UILayer extends GroupLayer {
25
25
  */
26
26
  closeChat(): Promise<boolean>;
27
27
  /**
28
- * Return the current active chat
28
+ * Return the currently active chat (visually open)
29
29
  * @category UI
30
30
  */
31
31
  getActiveChat(): Promise<import("@wppconnect/wa-js/dist/whatsapp").ChatModel>;
@@ -40,8 +40,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
40
40
  });
41
41
  };
42
42
  var __generator = (this && this.__generator) || function (thisArg, body) {
43
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
44
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
43
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
44
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
45
45
  function verb(n) { return function (v) { return step([n, v]); }; }
46
46
  function step(op) {
47
47
  if (f) throw new TypeError("Generator is already executing.");
@@ -116,15 +116,11 @@ var UILayer = /** @class */ (function (_super) {
116
116
  });
117
117
  };
118
118
  /**
119
- * Return the current active chat
119
+ * Return the currently active chat (visually open)
120
120
  * @category UI
121
121
  */
122
122
  UILayer.prototype.getActiveChat = function () {
123
- return __awaiter(this, void 0, void 0, function () {
124
- return __generator(this, function (_a) {
125
- return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function () { return WPP.chat.getActiveChat(); })];
126
- });
127
- });
123
+ return (0, helpers_1.evaluateAndReturn)(this.page, function () { return WPP.chat.getActiveChat(); });
128
124
  };
129
125
  return UILayer;
130
126
  }(group_layer_1.GroupLayer));