talkyzap-wapp-api 1.0.17 → 1.0.19
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 +1 -1
- package/README.md +78 -26
- package/dist/call/events/eventTypes.d.ts +2 -3
- package/dist/call/events/registerIncomingCallEvent.d.ts +1 -1
- package/dist/chat/functions/forwardMessage.d.ts +4 -4
- package/dist/chat/functions/forwardMessages.d.ts +33 -0
- package/dist/chat/functions/getMessages.d.ts +7 -0
- package/dist/chat/functions/index.d.ts +2 -1
- package/dist/chat/functions/list.d.ts +4 -0
- package/dist/chat/functions/openChatAt.d.ts +3 -1
- package/dist/chat/functions/openChatBottom.d.ts +3 -1
- package/dist/chat/functions/openChatFromUnread.d.ts +3 -1
- package/dist/chat/functions/pinMsg.d.ts +19 -5
- package/dist/chat/functions/sendFileMessage.d.ts +13 -0
- package/dist/chat/functions/sendTextMessage.d.ts +2 -3
- package/dist/chat/index.d.ts +1 -0
- package/dist/chat/types.d.ts +11 -3
- package/dist/chat/util/index.d.ts +16 -0
- package/dist/chat/util/rehydrateMessage.d.ts +17 -0
- package/dist/conn/functions/changeEnviromentDevice.d.ts +19 -0
- package/dist/conn/functions/getBuildConstants.d.ts +37 -0
- package/dist/conn/functions/getMigrationState.d.ts +52 -0
- package/dist/conn/functions/index.d.ts +3 -0
- package/dist/contact/functions/get.d.ts +2 -0
- package/dist/contact/functions/getPnLidEntry.d.ts +59 -0
- package/dist/contact/functions/index.d.ts +1 -0
- package/dist/contact/functions/save.d.ts +3 -3
- package/dist/gtag/Tracker.d.ts +1 -1
- package/dist/order/functions/accept.d.ts +58 -0
- package/dist/order/functions/decline.d.ts +53 -0
- package/dist/order/functions/index.d.ts +3 -0
- package/dist/order/functions/update.d.ts +77 -0
- package/dist/order/index.d.ts +1 -0
- package/dist/order/types.d.ts +119 -0
- package/dist/util/fileHelpers.d.ts +29 -0
- package/dist/util/index.d.ts +1 -0
- package/dist/util/isUrl.d.ts +21 -0
- package/dist/whatsapp/collections/CallCollection.d.ts +16 -6
- package/dist/whatsapp/enums/ACK.d.ts +5 -3
- package/dist/whatsapp/enums/PinExpiryDurationOption.d.ts +25 -0
- package/dist/whatsapp/enums/index.d.ts +1 -0
- package/dist/whatsapp/functions/addAndSendMessageEdit.d.ts +2 -2
- package/dist/whatsapp/functions/addAndSendMsgToChat.d.ts +2 -2
- package/dist/whatsapp/functions/canSaveAsMyContacts.d.ts +7 -1
- package/dist/whatsapp/functions/createChat.d.ts +2 -0
- package/dist/whatsapp/functions/forwardMessages.d.ts +24 -0
- package/dist/whatsapp/functions/getPhoneLangPref.d.ts +25 -0
- package/dist/whatsapp/functions/getUploadLimit.d.ts +24 -0
- package/dist/whatsapp/functions/index.d.ts +4 -0
- package/dist/whatsapp/functions/isLidMigrated.d.ts +1 -1
- package/dist/whatsapp/functions/msgFindQuery.d.ts +4 -2
- package/dist/whatsapp/functions/queryOrder.d.ts +8 -7
- package/dist/whatsapp/functions/saveContactAction.d.ts +3 -1
- package/dist/whatsapp/functions/sendOrderStatusMessageAsMerchant.d.ts +47 -0
- package/dist/whatsapp/functions/sendPinInChatMsg.d.ts +4 -8
- package/dist/whatsapp/functions/updateMessageTable.d.ts +18 -0
- package/dist/whatsapp/index.d.ts +1 -0
- package/dist/whatsapp/misc/Cmd.d.ts +13 -0
- package/dist/whatsapp/misc/Enviroment.d.ts +22 -0
- package/dist/whatsapp/misc/LidPnCache.d.ts +39 -0
- package/dist/whatsapp/misc/MediaGatingUtils.d.ts +29 -0
- package/dist/whatsapp/misc/MediaPrep.d.ts +3 -2
- package/dist/whatsapp/misc/UserPrefs.d.ts +26 -7
- package/dist/whatsapp/misc/Wid.d.ts +8 -0
- package/dist/whatsapp/misc/WidFactory.d.ts +1 -0
- package/dist/whatsapp/misc/index.d.ts +3 -0
- package/dist/whatsapp/models/ChatModel.d.ts +1 -1
- package/dist/whatsapp/models/MsgModel.d.ts +17 -1
- package/dist/whatsapp/types.d.ts +21 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/eslint.config.mjs +108 -0
- package/package.json +21 -23
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 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
|
+
|
|
17
|
+
import eslint from '@eslint/js';
|
|
18
|
+
import headerPlugin from '@tony.ganchev/eslint-plugin-header';
|
|
19
|
+
import prettier from 'eslint-config-prettier';
|
|
20
|
+
import importPlugin from 'eslint-plugin-import';
|
|
21
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
22
|
+
import simpleImportSort from 'eslint-plugin-simple-import-sort';
|
|
23
|
+
import tseslint from 'typescript-eslint';
|
|
24
|
+
|
|
25
|
+
export default [
|
|
26
|
+
// Base recommended configs
|
|
27
|
+
eslint.configs.recommended,
|
|
28
|
+
...tseslint.configs.recommended,
|
|
29
|
+
prettier,
|
|
30
|
+
|
|
31
|
+
// Ignore patterns
|
|
32
|
+
{
|
|
33
|
+
ignores: ['webpack.config.js', 'dist/**/*', 'wa-source/**/*', 'docs/**/*'],
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
// Base config for all TypeScript files
|
|
37
|
+
{
|
|
38
|
+
files: ['**/*.ts', '**/*.tsx'],
|
|
39
|
+
plugins: {
|
|
40
|
+
'@typescript-eslint': tseslint.plugin,
|
|
41
|
+
'simple-import-sort': simpleImportSort,
|
|
42
|
+
import: importPlugin,
|
|
43
|
+
header: headerPlugin,
|
|
44
|
+
prettier: prettierPlugin,
|
|
45
|
+
},
|
|
46
|
+
languageOptions: {
|
|
47
|
+
parser: tseslint.parser,
|
|
48
|
+
parserOptions: {
|
|
49
|
+
ecmaVersion: 'latest',
|
|
50
|
+
sourceType: 'module',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
rules: {
|
|
54
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
55
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
56
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
57
|
+
'@typescript-eslint/no-unused-vars': [
|
|
58
|
+
'error',
|
|
59
|
+
{
|
|
60
|
+
argsIgnorePattern: '^_',
|
|
61
|
+
varsIgnorePattern: '^_',
|
|
62
|
+
caughtErrorsIgnorePattern: '^_',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
'header/header': [
|
|
66
|
+
'error',
|
|
67
|
+
'block',
|
|
68
|
+
[
|
|
69
|
+
'!',
|
|
70
|
+
{
|
|
71
|
+
pattern: '^ \\* Copyright \\d{4} WPPConnect Team$',
|
|
72
|
+
template: ' * Copyright 2022 WPPConnect Team',
|
|
73
|
+
},
|
|
74
|
+
' *',
|
|
75
|
+
' * Licensed under the Apache License, Version 2.0 (the "License");',
|
|
76
|
+
' * you may not use this file except in compliance with the License.',
|
|
77
|
+
' * You may obtain a copy of the License at',
|
|
78
|
+
' *',
|
|
79
|
+
' * http://www.apache.org/licenses/LICENSE-2.0',
|
|
80
|
+
' *',
|
|
81
|
+
' * Unless required by applicable law or agreed to in writing, software',
|
|
82
|
+
' * distributed under the License is distributed on an "AS IS" BASIS,',
|
|
83
|
+
' * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.',
|
|
84
|
+
' * See the License for the specific language governing permissions and',
|
|
85
|
+
' * limitations under the License.',
|
|
86
|
+
' ',
|
|
87
|
+
],
|
|
88
|
+
],
|
|
89
|
+
'import/first': 'error',
|
|
90
|
+
'import/newline-after-import': 'error',
|
|
91
|
+
'import/no-duplicates': 'error',
|
|
92
|
+
'no-empty': ['error', { allowEmptyCatch: true }],
|
|
93
|
+
'simple-import-sort/exports': 'error',
|
|
94
|
+
'simple-import-sort/imports': 'error',
|
|
95
|
+
'prettier/prettier': 'error',
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
|
|
99
|
+
// Override for whatsapp directory
|
|
100
|
+
{
|
|
101
|
+
files: ['src/whatsapp/**/*.ts'],
|
|
102
|
+
rules: {
|
|
103
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
104
|
+
'@typescript-eslint/no-namespace': 'off',
|
|
105
|
+
'@typescript-eslint/no-unsafe-declaration-merging': 'off',
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "talkyzap-wapp-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.19",
|
|
4
4
|
"description": "WPPConnect/WA-JS is an open-source project with the aim of exporting functions from WhatsApp Web",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -35,58 +35,56 @@
|
|
|
35
35
|
"test:prepare": "playwright test --project prepare --headed",
|
|
36
36
|
"update-models-attributes": "ts-node ./src/tools/updateModelsAttributes.ts",
|
|
37
37
|
"update-module-id": "ts-node ./src/tools/updateModuleID.ts",
|
|
38
|
-
"wa-source": "npm run wa-source:clean && npm run wa-source:download",
|
|
39
38
|
"wa-source:clean": "shx rm -rf wa-source",
|
|
40
|
-
"wa-source:download": "ts-node ./src/tools/extractWhatsappSource.ts",
|
|
41
39
|
"wa-source:format": "prettier --write ./wa-source",
|
|
42
40
|
"watch": "webpack watch --devtool inline-source-map --mode development"
|
|
43
41
|
},
|
|
44
42
|
"devDependencies": {
|
|
45
|
-
"@commitlint/cli": "^
|
|
46
|
-
"@commitlint/config-conventional": "^
|
|
47
|
-
"@commitlint/prompt-cli": "^
|
|
48
|
-
"@playwright/test": "^1.
|
|
43
|
+
"@commitlint/cli": "^20.1.0",
|
|
44
|
+
"@commitlint/config-conventional": "^20.0.0",
|
|
45
|
+
"@commitlint/prompt-cli": "^20.1.0",
|
|
46
|
+
"@playwright/test": "^1.56.1",
|
|
47
|
+
"@tony.ganchev/eslint-plugin-header": "^3.1.11",
|
|
49
48
|
"@types/debug": "^4.1.12",
|
|
50
49
|
"@types/node": "^16.18.126",
|
|
51
50
|
"@types/node-fetch": "^2.6.13",
|
|
52
51
|
"@types/parse-data-url": "^3.0.2",
|
|
53
|
-
"@types/prettier": "^3.0.0",
|
|
54
52
|
"@types/shelljs": "^0.8.17",
|
|
55
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
56
|
-
"@typescript-eslint/parser": "^
|
|
57
|
-
"@wppconnect/wa-version": "^1.5.
|
|
53
|
+
"@typescript-eslint/eslint-plugin": "^8.47.0",
|
|
54
|
+
"@typescript-eslint/parser": "^8.47.0",
|
|
55
|
+
"@wppconnect/wa-version": "^1.5.2706",
|
|
58
56
|
"buffer": "^6.0.3",
|
|
59
57
|
"compare-versions": "^6.1.1",
|
|
60
58
|
"compressorjs": "^1.2.1",
|
|
61
|
-
"conventional-changelog-angular": "^8.
|
|
59
|
+
"conventional-changelog-angular": "^8.1.0",
|
|
62
60
|
"conventional-changelog-cli": "^5.0.0",
|
|
63
61
|
"debug": "^4.4.3",
|
|
64
|
-
"eslint": "^
|
|
62
|
+
"eslint": "^9.39.1",
|
|
65
63
|
"eslint-config-prettier": "^10.1.8",
|
|
66
|
-
"eslint-plugin-header": "^3.1.1",
|
|
67
64
|
"eslint-plugin-import": "^2.32.0",
|
|
68
65
|
"eslint-plugin-prettier": "^5.5.4",
|
|
69
66
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
70
67
|
"eventemitter2": "^6.4.9",
|
|
71
68
|
"file-type": "~16.5.4",
|
|
72
69
|
"husky": "^9.1.7",
|
|
73
|
-
"lint-staged": "^16.2.
|
|
70
|
+
"lint-staged": "^16.2.7",
|
|
74
71
|
"node-fetch": "^2.7.0",
|
|
75
72
|
"parse-data-url": "^6.0.0",
|
|
76
|
-
"playwright-chromium": "^1.
|
|
73
|
+
"playwright-chromium": "^1.56.1",
|
|
77
74
|
"prettier": "^3.6.2",
|
|
78
|
-
"release-it": "^19.0.
|
|
75
|
+
"release-it": "^19.0.6",
|
|
79
76
|
"shx": "^0.4.0",
|
|
80
77
|
"terser-webpack-plugin": "^5.3.14",
|
|
81
78
|
"ts-loader": "^9.5.4",
|
|
82
|
-
"ts-morph": "^27.0.
|
|
79
|
+
"ts-morph": "^27.0.2",
|
|
83
80
|
"ts-node": "^10.9.2",
|
|
84
|
-
"typedoc": "^0.28.
|
|
85
|
-
"typedoc-plugin-mdn-links": "^5.0.
|
|
86
|
-
"typedoc-plugin-missing-exports": "^4.1.
|
|
87
|
-
"typescript": "^5.
|
|
81
|
+
"typedoc": "^0.28.14",
|
|
82
|
+
"typedoc-plugin-mdn-links": "^5.0.10",
|
|
83
|
+
"typedoc-plugin-missing-exports": "^4.1.2",
|
|
84
|
+
"typescript": "^5.9.3",
|
|
88
85
|
"typescript-debounce-decorator": "^0.0.18",
|
|
89
|
-
"
|
|
86
|
+
"typescript-eslint": "^8.47.0",
|
|
87
|
+
"webpack": "^5.103.0",
|
|
90
88
|
"webpack-cli": "^6.0.1"
|
|
91
89
|
},
|
|
92
90
|
"engines": {
|