@wppconnect/wa-js 1.1.19 → 1.2.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 +4 -0
- package/dist/{auth → conn}/eventEmitter.d.ts +37 -3
- package/dist/conn/events/index.d.ts +22 -0
- package/dist/{auth/events/registerChangeEvent.d.ts → conn/events/registerAuthCodeChangeEvent.d.ts} +0 -0
- package/dist/{auth/events/registerIdleEvent.d.ts → conn/events/registerAuthenticatedEvent.d.ts} +0 -0
- package/dist/{auth → conn}/events/registerLogoutEvent.d.ts +0 -0
- package/dist/{auth/functions/poke.d.ts → conn/events/registerMainLoadedEvent.d.ts} +1 -1
- package/dist/conn/events/registerMainReadyEvent.d.ts +16 -0
- package/dist/conn/events/registerQRCodeIdleEvent.d.ts +16 -0
- package/dist/conn/events/registerRequireAuthEvent.d.ts +16 -0
- package/dist/{auth → conn}/functions/getAuthCode.d.ts +0 -0
- package/dist/{auth → conn}/functions/index.d.ts +2 -1
- package/dist/{auth → conn}/functions/isAuthenticated.d.ts +0 -0
- package/dist/{auth → conn}/functions/isIdle.d.ts +0 -0
- package/dist/conn/functions/isMainLoaded.d.ts +24 -0
- package/dist/{auth → conn}/functions/isMultiDevice.d.ts +0 -0
- package/dist/{auth → conn}/functions/logout.d.ts +0 -0
- package/dist/conn/functions/refreshQR.d.ts +28 -0
- package/dist/{auth → conn}/functions/setMultiDevice.d.ts +1 -1
- package/dist/{auth → conn}/index.d.ts +0 -0
- package/dist/{auth → conn}/types.d.ts +0 -0
- package/dist/index.d.ts +1 -1
- package/dist/whatsapp/misc/{State.d.ts → Socket.d.ts} +2 -2
- package/dist/{auth/events/index.d.ts → whatsapp/misc/Stream.d.ts} +3 -3
- package/dist/whatsapp/misc/index.d.ts +2 -1
- package/dist/whatsapp/models/{StateModel.d.ts → SocketModel.d.ts} +3 -3
- package/dist/whatsapp/models/StreamModel.d.ts +61 -0
- package/dist/whatsapp/models/index.d.ts +2 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +12 -17
- package/tests/check-auth.ts +2 -2
- package/tests/prepare.ts +3 -3
- package/dist/internal.d.ts +0 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wppconnect/wa-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"exports": {
|
|
@@ -35,27 +35,27 @@
|
|
|
35
35
|
"wa-source:clean": "shx rm -rf wa-source",
|
|
36
36
|
"wa-source:download": "ts-node ./src/tools/extractWhatsappSource.ts",
|
|
37
37
|
"wa-source:format": "prettier --write ./wa-source",
|
|
38
|
-
"wa-source": "npm run wa-source:clean && npm run wa-source:download
|
|
38
|
+
"wa-source": "npm run wa-source:clean && npm run wa-source:download",
|
|
39
39
|
"watch": "webpack watch --devtool inline-source-map --mode development"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@commitlint/cli": "^16.2.1",
|
|
43
43
|
"@commitlint/config-conventional": "^16.2.1",
|
|
44
|
-
"@commitlint/
|
|
44
|
+
"@commitlint/prompt-cli": "^16.2.1",
|
|
45
45
|
"@playwright/test": "^1.19.2",
|
|
46
46
|
"@types/debug": "^4.1.7",
|
|
47
47
|
"@types/node": "^14.18.12",
|
|
48
48
|
"@types/parse-data-url": "^3.0.0",
|
|
49
|
+
"@types/prettier": "^2.4.4",
|
|
49
50
|
"@types/shelljs": "^0.8.11",
|
|
50
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
51
|
-
"@typescript-eslint/parser": "^5.
|
|
52
|
-
"@wppconnect/wa-version": "^1.1.
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^5.13.0",
|
|
52
|
+
"@typescript-eslint/parser": "^5.13.0",
|
|
53
|
+
"@wppconnect/wa-version": "^1.1.39",
|
|
53
54
|
"buffer": "^6.0.3",
|
|
54
|
-
"commitizen": "^4.2.4",
|
|
55
55
|
"conventional-changelog-cli": "^2.2.2",
|
|
56
56
|
"debug": "^4.3.3",
|
|
57
57
|
"emittery": "^0.10.1",
|
|
58
|
-
"eslint": "^8.
|
|
58
|
+
"eslint": "^8.10.0",
|
|
59
59
|
"eslint-config-prettier": "^8.4.0",
|
|
60
60
|
"eslint-plugin-header": "^3.1.1",
|
|
61
61
|
"eslint-plugin-import": "^2.25.4",
|
|
@@ -69,19 +69,14 @@
|
|
|
69
69
|
"pretty-quick": "^3.1.3",
|
|
70
70
|
"release-it": "^14.12.5",
|
|
71
71
|
"shx": "^0.3.4",
|
|
72
|
-
"ts-loader": "^9.2.
|
|
72
|
+
"ts-loader": "^9.2.7",
|
|
73
73
|
"ts-morph": "^13.0.3",
|
|
74
|
-
"ts-node": "^10.
|
|
75
|
-
"typedoc": "^0.22.
|
|
74
|
+
"ts-node": "^10.6.0",
|
|
75
|
+
"typedoc": "^0.22.12",
|
|
76
76
|
"typedoc-plugin-mdn-links": "^1.0.5",
|
|
77
77
|
"typedoc-plugin-missing-exports": "^0.22.6",
|
|
78
|
-
"typescript": "^4.
|
|
78
|
+
"typescript": "^4.6.2",
|
|
79
79
|
"webpack": "^5.69.1",
|
|
80
80
|
"webpack-cli": "^4.9.2"
|
|
81
|
-
},
|
|
82
|
-
"config": {
|
|
83
|
-
"commitizen": {
|
|
84
|
-
"path": "@commitlint/cz-commitlint"
|
|
85
|
-
}
|
|
86
81
|
}
|
|
87
82
|
}
|
package/tests/check-auth.ts
CHANGED
|
@@ -21,7 +21,7 @@ test('chech is not logged test', async ({ page }) => {
|
|
|
21
21
|
|
|
22
22
|
await expect(title).toHaveText('WhatsApp');
|
|
23
23
|
|
|
24
|
-
const isAuthenticated = await page.evaluate(() => WPP.
|
|
24
|
+
const isAuthenticated = await page.evaluate(() => WPP.conn.isAuthenticated());
|
|
25
25
|
|
|
26
26
|
expect(isAuthenticated).toBe(false);
|
|
27
27
|
});
|
|
@@ -32,7 +32,7 @@ test('chech is logged test', async ({ loggedPage: cleanPage }) => {
|
|
|
32
32
|
await expect(title).toHaveText('WhatsApp');
|
|
33
33
|
|
|
34
34
|
const isAuthenticated = await cleanPage.evaluate(() =>
|
|
35
|
-
WPP.
|
|
35
|
+
WPP.conn.isAuthenticated()
|
|
36
36
|
);
|
|
37
37
|
|
|
38
38
|
expect(isAuthenticated).toBe(true);
|
package/tests/prepare.ts
CHANGED
|
@@ -22,7 +22,7 @@ test('basic setup', async ({ loggedPage }) => {
|
|
|
22
22
|
await expect(title).toHaveText('WhatsApp');
|
|
23
23
|
|
|
24
24
|
let isAuthenticated = await loggedPage.evaluate(() =>
|
|
25
|
-
WPP.
|
|
25
|
+
WPP.conn.isAuthenticated()
|
|
26
26
|
);
|
|
27
27
|
|
|
28
28
|
if (isAuthenticated) {
|
|
@@ -32,9 +32,9 @@ test('basic setup', async ({ loggedPage }) => {
|
|
|
32
32
|
|
|
33
33
|
expect(isAuthenticated).toBe(false);
|
|
34
34
|
|
|
35
|
-
await loggedPage.waitForFunction(() => WPP.
|
|
35
|
+
await loggedPage.waitForFunction(() => WPP.conn.isAuthenticated());
|
|
36
36
|
|
|
37
|
-
isAuthenticated = await loggedPage.evaluate(() => WPP.
|
|
37
|
+
isAuthenticated = await loggedPage.evaluate(() => WPP.conn.isAuthenticated());
|
|
38
38
|
|
|
39
39
|
expect(isAuthenticated).toBe(true);
|
|
40
40
|
});
|
package/dist/internal.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2021 WPPConnect Team
|
|
3
|
-
*
|
|
4
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
* you may not use this file except in compliance with the License.
|
|
6
|
-
* You may obtain a copy of the License at
|
|
7
|
-
*
|
|
8
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
*
|
|
10
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
* See the License for the specific language governing permissions and
|
|
14
|
-
* limitations under the License.
|
|
15
|
-
*/
|
|
16
|
-
export * as auth from './auth';
|
|
17
|
-
export * as blocklist from './blocklist';
|
|
18
|
-
export * as chat from './chat';
|
|
19
|
-
export * as contact from './contact';
|
|
20
|
-
export * as group from './group';
|
|
21
|
-
export * as status from './status';
|