@wppconnect-team/wppconnect 1.13.1 → 1.13.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/CHANGELOG.md
CHANGED
|
@@ -39,7 +39,10 @@ export declare class ControlsLayer extends UILayer {
|
|
|
39
39
|
* @param option {boolean} true or false
|
|
40
40
|
* @returns boolean
|
|
41
41
|
*/
|
|
42
|
-
archiveChat(chatId: string, option?: boolean): Promise<
|
|
42
|
+
archiveChat(chatId: string, option?: boolean): Promise<{
|
|
43
|
+
wid: import("@wppconnect/wa-js/dist/whatsapp").Wid;
|
|
44
|
+
archive: boolean;
|
|
45
|
+
}>;
|
|
43
46
|
/**
|
|
44
47
|
* Pin and Unpin chat messages with true or false
|
|
45
48
|
* @category Chat
|
|
@@ -48,7 +51,10 @@ export declare class ControlsLayer extends UILayer {
|
|
|
48
51
|
* @param nonExistent {boolean} Pin chat, non-existent (optional)
|
|
49
52
|
* @returns object
|
|
50
53
|
*/
|
|
51
|
-
pinChat(chatId: string, option: boolean, nonExistent?: boolean): Promise<
|
|
54
|
+
pinChat(chatId: string, option: boolean, nonExistent?: boolean): Promise<{
|
|
55
|
+
wid: import("@wppconnect/wa-js/dist/whatsapp").Wid;
|
|
56
|
+
pin: boolean;
|
|
57
|
+
}>;
|
|
52
58
|
/**
|
|
53
59
|
* Deletes all messages of given chat
|
|
54
60
|
* @category Chat
|
|
@@ -163,7 +163,7 @@ var ControlsLayer = /** @class */ (function (_super) {
|
|
|
163
163
|
return __generator(this, function (_a) {
|
|
164
164
|
return [2 /*return*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
|
|
165
165
|
var chatId = _a.chatId, option = _a.option;
|
|
166
|
-
return
|
|
166
|
+
return WPP.chat.archive(chatId, option);
|
|
167
167
|
}, { chatId: chatId, option: option })];
|
|
168
168
|
});
|
|
169
169
|
});
|
|
@@ -178,19 +178,22 @@ var ControlsLayer = /** @class */ (function (_super) {
|
|
|
178
178
|
*/
|
|
179
179
|
ControlsLayer.prototype.pinChat = function (chatId, option, nonExistent) {
|
|
180
180
|
return __awaiter(this, void 0, void 0, function () {
|
|
181
|
-
var result;
|
|
182
181
|
return __generator(this, function (_a) {
|
|
183
182
|
switch (_a.label) {
|
|
184
|
-
case 0:
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
183
|
+
case 0:
|
|
184
|
+
if (!nonExistent) return [3 /*break*/, 2];
|
|
185
|
+
return [4 /*yield*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
|
|
186
|
+
var chatId = _a.chatId;
|
|
187
|
+
return WPP.chat.find(chatId);
|
|
188
|
+
}, { chatId: chatId })];
|
|
188
189
|
case 1:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
_a.sent();
|
|
191
|
+
_a.label = 2;
|
|
192
|
+
case 2: return [4 /*yield*/, (0, helpers_1.evaluateAndReturn)(this.page, function (_a) {
|
|
193
|
+
var chatId = _a.chatId, option = _a.option;
|
|
194
|
+
return WPP.chat.pin(chatId, option);
|
|
195
|
+
}, { chatId: chatId, option: option })];
|
|
196
|
+
case 3: return [2 /*return*/, _a.sent()];
|
|
194
197
|
}
|
|
195
198
|
});
|
|
196
199
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const useragentOverride = "
|
|
1
|
+
declare const useragentOverride = "\"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36";
|
|
2
2
|
export { useragentOverride };
|
|
@@ -17,5 +17,5 @@
|
|
|
17
17
|
*/
|
|
18
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
19
19
|
exports.useragentOverride = void 0;
|
|
20
|
-
var useragentOverride = '
|
|
20
|
+
var useragentOverride = '"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36';
|
|
21
21
|
exports.useragentOverride = useragentOverride;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect-team/wppconnect",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
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,30 +58,30 @@
|
|
|
58
58
|
},
|
|
59
59
|
"homepage": "https://github.com/wppconnect-team/wppconnect#readme",
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@babel/core": "^7.
|
|
62
|
-
"@babel/eslint-parser": "^7.
|
|
61
|
+
"@babel/core": "^7.18.2",
|
|
62
|
+
"@babel/eslint-parser": "^7.18.2",
|
|
63
63
|
"@babel/eslint-plugin": "^7.17.7",
|
|
64
|
-
"@babel/preset-env": "^7.
|
|
65
|
-
"@commitlint/cli": "^
|
|
66
|
-
"@commitlint/config-conventional": "^
|
|
67
|
-
"@commitlint/cz-commitlint": "^
|
|
64
|
+
"@babel/preset-env": "^7.18.2",
|
|
65
|
+
"@commitlint/cli": "^17.0.1",
|
|
66
|
+
"@commitlint/config-conventional": "^17.0.0",
|
|
67
|
+
"@commitlint/cz-commitlint": "^17.0.0",
|
|
68
68
|
"@types/atob": "^2.1.2",
|
|
69
|
-
"@types/mime-types": "^2.1.
|
|
69
|
+
"@types/mime-types": "^2.1.1",
|
|
70
70
|
"@types/mocha": "^9.1.1",
|
|
71
|
-
"@types/node": "^
|
|
72
|
-
"@types/rimraf": "^3.0.
|
|
71
|
+
"@types/node": "^16.11.36",
|
|
72
|
+
"@types/rimraf": "^3.0.2",
|
|
73
73
|
"@types/sharp": "^0.30.2",
|
|
74
74
|
"@types/shelljs": "^0.8.11",
|
|
75
75
|
"@types/tmp": "^0.2.3",
|
|
76
76
|
"@types/ws": "^8.5.3",
|
|
77
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
78
|
-
"@typescript-eslint/parser": "^5.
|
|
77
|
+
"@typescript-eslint/eslint-plugin": "^5.26.0",
|
|
78
|
+
"@typescript-eslint/parser": "^5.26.0",
|
|
79
79
|
"babel-loader": "^8.2.5",
|
|
80
|
-
"commitizen": "^4.2.
|
|
81
|
-
"concurrently": "^7.1
|
|
80
|
+
"commitizen": "^4.2.4",
|
|
81
|
+
"concurrently": "^7.2.1",
|
|
82
82
|
"conventional-changelog-cli": "^2.2.2",
|
|
83
|
-
"copy-webpack-plugin": "^
|
|
84
|
-
"eslint": "^8.
|
|
83
|
+
"copy-webpack-plugin": "^11.0.0",
|
|
84
|
+
"eslint": "^8.16.0",
|
|
85
85
|
"eslint-config-prettier": "^8.5.0",
|
|
86
86
|
"eslint-plugin-prettier": "^4.0.0",
|
|
87
87
|
"gulp": "^4.0.2",
|
|
@@ -90,31 +90,31 @@
|
|
|
90
90
|
"mocha": "^10.0.0",
|
|
91
91
|
"prettier": "^2.6.2",
|
|
92
92
|
"pretty-quick": "^3.1.3",
|
|
93
|
-
"regenerator-runtime": "^0.13.
|
|
93
|
+
"regenerator-runtime": "^0.13.9",
|
|
94
94
|
"release-it": "^15.0.0",
|
|
95
95
|
"shx": "^0.3.4",
|
|
96
|
-
"ts-node": "^10.
|
|
96
|
+
"ts-node": "^10.8.0",
|
|
97
97
|
"typedoc": "^0.21.10",
|
|
98
98
|
"typedoc-plugin-pages": "^1.1.0",
|
|
99
|
-
"typescript": "^4.
|
|
100
|
-
"webpack": "^5.72.
|
|
99
|
+
"typescript": "^4.7.2",
|
|
100
|
+
"webpack": "^5.72.1",
|
|
101
101
|
"webpack-cli": "^4.9.2"
|
|
102
102
|
},
|
|
103
103
|
"dependencies": {
|
|
104
|
-
"@wppconnect/wa-js": "^2.
|
|
105
|
-
"@wppconnect/wa-version": "^1.1.
|
|
104
|
+
"@wppconnect/wa-js": "^2.4.0",
|
|
105
|
+
"@wppconnect/wa-version": "^1.1.88",
|
|
106
106
|
"atob": "^2.1.2",
|
|
107
107
|
"axios": "^0.27.2",
|
|
108
108
|
"boxen": "^5.1.2",
|
|
109
|
-
"catch-exit": "^1.
|
|
109
|
+
"catch-exit": "^1.2.2",
|
|
110
110
|
"chalk": "~4.1.2",
|
|
111
111
|
"chrome-launcher": "^0.15.0",
|
|
112
|
-
"execa": "^5.
|
|
112
|
+
"execa": "^5.1.1",
|
|
113
113
|
"file-type": "~16.5.3",
|
|
114
|
-
"futoin-hkdf": "^1.5.
|
|
114
|
+
"futoin-hkdf": "^1.5.1",
|
|
115
115
|
"latest-version": "^5.1.0",
|
|
116
116
|
"logform": "^2.4.0",
|
|
117
|
-
"lookpath": "^1.2.
|
|
117
|
+
"lookpath": "^1.2.2",
|
|
118
118
|
"mime-types": "^2.1.35",
|
|
119
119
|
"puppeteer": "*",
|
|
120
120
|
"puppeteer-extra": "^3.2.3",
|
|
@@ -125,14 +125,14 @@
|
|
|
125
125
|
"reflect-metadata": "^0.1.13",
|
|
126
126
|
"rimraf": "^3.0.2",
|
|
127
127
|
"sanitize-filename": "^1.6.3",
|
|
128
|
-
"sharp": "^0.30.
|
|
128
|
+
"sharp": "^0.30.5",
|
|
129
129
|
"tmp": "^0.2.1",
|
|
130
130
|
"tree-kill": "^1.2.2",
|
|
131
131
|
"winston": "^3.7.2",
|
|
132
|
-
"ws": "^8.
|
|
132
|
+
"ws": "^8.7.0"
|
|
133
133
|
},
|
|
134
134
|
"optionalDependencies": {
|
|
135
|
-
"fsevents": "^2.3.
|
|
135
|
+
"fsevents": "^2.3.2"
|
|
136
136
|
},
|
|
137
137
|
"directories": {
|
|
138
138
|
"doc": "docs",
|