@wppconnect-team/wppconnect 1.25.0 → 1.26.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 +2 -0
- package/dist/api/helpers/exposed.enum.js +1 -1
- package/dist/api/layers/sender.layer.js +2 -2
- package/dist/api/model/enum/ack-type.js +1 -1
- package/dist/api/model/enum/chat-state.js +1 -1
- package/dist/api/model/enum/group-notification-type.js +1 -1
- package/dist/api/model/enum/group-property.js +1 -1
- package/dist/api/model/enum/interface-mode.js +1 -1
- package/dist/api/model/enum/interface-state.js +1 -1
- package/dist/api/model/enum/message-type.js +2 -2
- package/dist/api/model/enum/socket-state.js +2 -2
- package/dist/api/model/enum/status-find.js +1 -1
- package/dist/api/whatsapp.d.ts +5 -0
- package/dist/api/whatsapp.js +17 -0
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -30,4 +30,4 @@ var ExposedFn;
|
|
|
30
30
|
ExposedFn["onInterfaceChange"] = "onInterfaceChange";
|
|
31
31
|
ExposedFn["onPresenceChanged"] = "onPresenceChanged";
|
|
32
32
|
ExposedFn["onLiveLocation"] = "onLiveLocation";
|
|
33
|
-
})(ExposedFn
|
|
33
|
+
})(ExposedFn || (exports.ExposedFn = ExposedFn = {}));
|
|
@@ -497,7 +497,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
497
497
|
return __generator(this, function (_a) {
|
|
498
498
|
switch (_a.label) {
|
|
499
499
|
case 0: return [4 /*yield*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
|
|
500
|
-
var to = _a.to, base64 = _a.base64, filename = _a.filename, caption = _a.caption, quotedMessageId = _a.quotedMessageId;
|
|
500
|
+
var to = _a.to, base64 = _a.base64, filename = _a.filename, caption = _a.caption, quotedMessageId = _a.quotedMessageId, messageId = _a.messageId;
|
|
501
501
|
return __awaiter(_this, void 0, void 0, function () {
|
|
502
502
|
var result;
|
|
503
503
|
var _b;
|
|
@@ -524,7 +524,7 @@ var SenderLayer = /** @class */ (function (_super) {
|
|
|
524
524
|
}
|
|
525
525
|
});
|
|
526
526
|
});
|
|
527
|
-
}, { to: to, base64: base64, filename: filename, caption: caption, quotedMessageId: quotedMessageId })];
|
|
527
|
+
}, { to: to, base64: base64, filename: filename, caption: caption, quotedMessageId: quotedMessageId, messageId: messageId })];
|
|
528
528
|
case 1:
|
|
529
529
|
result = _a.sent();
|
|
530
530
|
return [2 /*return*/, result];
|
|
@@ -22,4 +22,4 @@ var ChatState;
|
|
|
22
22
|
ChatState[ChatState["Typing"] = 0] = "Typing";
|
|
23
23
|
ChatState[ChatState["Recording"] = 1] = "Recording";
|
|
24
24
|
ChatState[ChatState["Paused"] = 2] = "Paused";
|
|
25
|
-
})(ChatState
|
|
25
|
+
})(ChatState || (exports.ChatState = ChatState = {}));
|
|
@@ -28,4 +28,4 @@ var GroupNotificationType;
|
|
|
28
28
|
GroupNotificationType["Picture"] = "picture";
|
|
29
29
|
GroupNotificationType["Announce"] = "announce";
|
|
30
30
|
GroupNotificationType["Restrict"] = "restrict";
|
|
31
|
-
})(GroupNotificationType
|
|
31
|
+
})(GroupNotificationType || (exports.GroupNotificationType = GroupNotificationType = {}));
|
|
@@ -51,4 +51,4 @@ var InterfaceState;
|
|
|
51
51
|
* When the whatsapp web couldn't connect to smartphone.
|
|
52
52
|
*/
|
|
53
53
|
InterfaceState["TIMEOUT"] = "TIMEOUT";
|
|
54
|
-
})(InterfaceState
|
|
54
|
+
})(InterfaceState || (exports.InterfaceState = InterfaceState = {}));
|
|
@@ -54,7 +54,7 @@ var MessageType;
|
|
|
54
54
|
MessageType["LIST_RESPONSE"] = "list_response";
|
|
55
55
|
MessageType["BUTTONS_RESPONSE"] = "buttons_response";
|
|
56
56
|
MessageType["UNKNOWN"] = "unknown";
|
|
57
|
-
})(MessageType
|
|
57
|
+
})(MessageType || (exports.MessageType = MessageType = {}));
|
|
58
58
|
var MediaType;
|
|
59
59
|
(function (MediaType) {
|
|
60
60
|
MediaType["IMAGE"] = "Image";
|
|
@@ -63,4 +63,4 @@ var MediaType;
|
|
|
63
63
|
MediaType["PTT"] = "Audio";
|
|
64
64
|
MediaType["DOCUMENT"] = "Document";
|
|
65
65
|
MediaType["STICKER"] = "Image";
|
|
66
|
-
})(MediaType
|
|
66
|
+
})(MediaType || (exports.MediaType = MediaType = {}));
|
|
@@ -70,7 +70,7 @@ var SocketState;
|
|
|
70
70
|
* Disconnected page with expired QRCode
|
|
71
71
|
*/
|
|
72
72
|
SocketState["UNPAIRED_IDLE"] = "UNPAIRED_IDLE";
|
|
73
|
-
})(SocketState
|
|
73
|
+
})(SocketState || (exports.SocketState = SocketState = {}));
|
|
74
74
|
/**
|
|
75
75
|
* SocketStream are the possible states of connection between WhatsApp page and WhatsApp servers.
|
|
76
76
|
*/
|
|
@@ -92,4 +92,4 @@ var SocketStream;
|
|
|
92
92
|
* Receiving data from WhatsApp servers
|
|
93
93
|
*/
|
|
94
94
|
SocketStream["SYNCING"] = "SYNCING";
|
|
95
|
-
})(SocketStream
|
|
95
|
+
})(SocketStream || (exports.SocketStream = SocketStream = {}));
|
package/dist/api/whatsapp.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export declare class Whatsapp extends BusinessLayer {
|
|
|
25
25
|
* @returns The Whatsapp page
|
|
26
26
|
*/
|
|
27
27
|
get waPage(): Page;
|
|
28
|
+
/**
|
|
29
|
+
* Get the puppeteer page screenshot
|
|
30
|
+
* @returns The Whatsapp page screenshot encoded in base64
|
|
31
|
+
*/
|
|
32
|
+
takeScreenshot(): Promise<string>;
|
|
28
33
|
/**
|
|
29
34
|
* Clicks on 'use here' button (When it get unlaunched)
|
|
30
35
|
* This method tracks the class of the button
|
package/dist/api/whatsapp.js
CHANGED
|
@@ -198,6 +198,23 @@ var Whatsapp = /** @class */ (function (_super) {
|
|
|
198
198
|
enumerable: false,
|
|
199
199
|
configurable: true
|
|
200
200
|
});
|
|
201
|
+
/**
|
|
202
|
+
* Get the puppeteer page screenshot
|
|
203
|
+
* @returns The Whatsapp page screenshot encoded in base64
|
|
204
|
+
*/
|
|
205
|
+
Whatsapp.prototype.takeScreenshot = function () {
|
|
206
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
207
|
+
return __generator(this, function (_a) {
|
|
208
|
+
switch (_a.label) {
|
|
209
|
+
case 0:
|
|
210
|
+
if (!this.page) return [3 /*break*/, 2];
|
|
211
|
+
return [4 /*yield*/, this.page.screenshot({ encoding: 'base64' })];
|
|
212
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
213
|
+
case 2: return [2 /*return*/];
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
};
|
|
201
218
|
/**
|
|
202
219
|
* Clicks on 'use here' button (When it get unlaunched)
|
|
203
220
|
* This method tracks the class of the button
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.26.0",
|
|
4
4
|
"description": "WPPConnect is an open source project developed by the JavaScript community with the aim of exporting functions from WhatsApp Web to the node, which can be used to support the creation of any interaction, such as customer service, media sending, intelligence recognition based on phrases artificial and many other things, use your imagination... 😀🤔💭",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"@babel/eslint-parser": "^7.21.8",
|
|
59
59
|
"@babel/eslint-plugin": "^7.19.1",
|
|
60
60
|
"@babel/preset-env": "^7.22.4",
|
|
61
|
-
"@commitlint/cli": "^17.6.
|
|
62
|
-
"@commitlint/config-conventional": "^17.6.
|
|
61
|
+
"@commitlint/cli": "^17.6.5",
|
|
62
|
+
"@commitlint/config-conventional": "^17.6.5",
|
|
63
63
|
"@commitlint/cz-commitlint": "^17.5.0",
|
|
64
64
|
"@knodes/typedoc-plugin-pages": "^0.23.4",
|
|
65
65
|
"@types/atob": "^2.1.2",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"@typescript-eslint/parser": "^5.59.8",
|
|
76
76
|
"babel-loader": "^9.1.2",
|
|
77
77
|
"commitizen": "^4.3.0",
|
|
78
|
-
"concurrently": "^8.0
|
|
78
|
+
"concurrently": "^8.1.0",
|
|
79
79
|
"conventional-changelog-cli": "^2.2.2",
|
|
80
80
|
"eslint": "^8.41.0",
|
|
81
81
|
"eslint-config-prettier": "^8.8.0",
|
|
@@ -90,13 +90,13 @@
|
|
|
90
90
|
"shx": "^0.3.4",
|
|
91
91
|
"ts-node": "^10.9.1",
|
|
92
92
|
"typedoc": "^0.23.28",
|
|
93
|
-
"typescript": "^5.
|
|
94
|
-
"webpack": "^5.
|
|
93
|
+
"typescript": "^5.1.3",
|
|
94
|
+
"webpack": "^5.85.0",
|
|
95
95
|
"webpack-cli": "^5.1.1"
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@wppconnect/wa-js": "^2.24.2",
|
|
99
|
-
"@wppconnect/wa-version": "^1.2.
|
|
99
|
+
"@wppconnect/wa-version": "^1.2.43",
|
|
100
100
|
"atob": "^2.1.2",
|
|
101
101
|
"axios": "^1.4.0",
|
|
102
102
|
"boxen": "^5.1.2",
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"logform": "^2.5.1",
|
|
111
111
|
"lookpath": "^1.2.2",
|
|
112
112
|
"mime-types": "^2.1.35",
|
|
113
|
-
"puppeteer": "^
|
|
113
|
+
"puppeteer": "^20.5.0",
|
|
114
114
|
"puppeteer-extra": "^3.3.6",
|
|
115
115
|
"puppeteer-extra-plugin-stealth": "^2.11.2",
|
|
116
116
|
"puppeteer-extra-plugin-user-data-dir": "^2.4.1",
|