talkyzap-wapp-api 1.0.3 → 1.0.4
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 +3 -3
- package/README.md +57 -0
- package/dist/call/functions/end.d.ts +5 -5
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendPixKeyMessage.d.ts +53 -0
- package/dist/conn/events/eventTypes.d.ts +2 -0
- package/dist/conn/events/index.d.ts +1 -0
- package/dist/conn/events/registerLogoutReasonEvent.d.ts +16 -0
- package/dist/order/functions/get.d.ts +3 -3
- package/dist/status/functions/index.d.ts +1 -0
- package/dist/status/functions/remove.d.ts +17 -0
- package/dist/status/functions/sendRawStatus.d.ts +1 -0
- package/dist/status/functions/sendTextStatus.d.ts +0 -1
- package/dist/whatsapp/enums/LogoutReason.d.ts +25 -8
- package/dist/whatsapp/functions/STATUS_JID.d.ts +19 -0
- package/dist/whatsapp/functions/createGroup.d.ts +17 -0
- package/dist/whatsapp/functions/createOrUpdateReactions.d.ts +1 -0
- package/dist/whatsapp/functions/encryptAndSendStatusMsg.d.ts +35 -0
- package/dist/whatsapp/functions/getErrorCodeFromLogoutReason.d.ts +20 -0
- package/dist/whatsapp/functions/index.d.ts +6 -0
- package/dist/whatsapp/functions/queryOrder.d.ts +32 -0
- package/dist/whatsapp/functions/revokeStatus.d.ts +20 -0
- package/dist/whatsapp/functions/statusEnable.d.ts +19 -0
- package/dist/whatsapp/misc/Wid.d.ts +2 -0
- package/dist/whatsapp/models/index.d.ts +0 -1
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +18 -18
- package/dist/whatsapp/models/CallParticipantModel.d.ts +0 -50
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# 3.5.0 (2024-07-12)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Added 'conn.logout_reason' event (close [#1899](https://github.com/wppconnect-team/wa-js/issues/1899)) ([2466c30](https://github.com/wppconnect-team/wa-js/commit/2466c30cad19eaa14c2119e476d44b2e2e61d265))
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
package/README.md
CHANGED
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
[](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
|
|
20
20
|
[](https://www.youtube.com/c/wppconnect)
|
|
21
21
|
|
|
22
|
+
|
|
23
|
+
### Top Contributors (last 45 days) widget
|
|
24
|
+
---
|
|
25
|
+

|
|
26
|
+
---
|
|
27
|
+
<sup><sub>Check also our [Public Dashboard](https://app.devactivity.com/public/?organizationLogin=wppconnect-team) powered by [devActivity](https://devactivity.com/?ref=public_widget)</sub></sup>
|
|
28
|
+
|
|
22
29
|
## How does it work
|
|
23
30
|
|
|
24
31
|
This project extract some functions of WhatsApp sources, that uses webpack.
|
|
@@ -40,6 +47,56 @@ There are a convection name for some exported modules:
|
|
|
40
47
|
- `...Collection` - Class for collection of models (`ChatCollection`, `MsgCollection`)
|
|
41
48
|
- `...Store` - Default and global instance of a collection (`ChatStore`, `MsgStore`)
|
|
42
49
|
|
|
50
|
+
## Some Available functions
|
|
51
|
+
### General Functions
|
|
52
|
+
`WPP.conn.connect` - Connect to WhatsApp Web
|
|
53
|
+
|
|
54
|
+
`WPP.conn.isAuthenticated` - Check if the connection is authenticated
|
|
55
|
+
|
|
56
|
+
`WPP.conn.logout` - Logout from WhatsApp Web
|
|
57
|
+
|
|
58
|
+
### Chat Functions
|
|
59
|
+
`WPP.chat.sendTextMessage` - Send a text message
|
|
60
|
+
|
|
61
|
+
`WPP.chat.sendImageMessage` - Send an image message
|
|
62
|
+
|
|
63
|
+
`WPP.chat.sendVideoMessage` - Send a video message
|
|
64
|
+
|
|
65
|
+
`WPP.chat.sendFileMessage` - Send a file message
|
|
66
|
+
|
|
67
|
+
`WPP.chat.sendAudioMessage` - Send an audio message
|
|
68
|
+
|
|
69
|
+
`WPP.chat.getChat` - Get chat details
|
|
70
|
+
|
|
71
|
+
`WPP.chat.deleteMessage` - Delete a message
|
|
72
|
+
|
|
73
|
+
### Contact Functions
|
|
74
|
+
`WPP.contact.getContact` - Get contact details
|
|
75
|
+
|
|
76
|
+
`WPP.contact.blockContact` - Block a contact
|
|
77
|
+
|
|
78
|
+
`WPP.contact.unblockContact` - Unblock a contact
|
|
79
|
+
|
|
80
|
+
`WPP.contact.getAllContacts` - Get all contacts
|
|
81
|
+
|
|
82
|
+
### Group Functions
|
|
83
|
+
`WPP.group.createGroup` - Create a new group
|
|
84
|
+
|
|
85
|
+
`WPP.group.addParticipant` - Add a participant to a group
|
|
86
|
+
|
|
87
|
+
`WPP.group.removeParticipant` - Remove a participant from a group.
|
|
88
|
+
|
|
89
|
+
`WPP.group.promoteParticipant` - Promote a participant to admin
|
|
90
|
+
|
|
91
|
+
`WPP.group.demoteParticipant` - Demote a participant from admin.
|
|
92
|
+
|
|
93
|
+
`WPP.group.getGroupInfo` - Get group information.
|
|
94
|
+
|
|
95
|
+
### Events
|
|
96
|
+
`WPP.chat.on('chat.new_message')` - Event to dispatch on receive a new message
|
|
97
|
+
|
|
98
|
+
To see all events, check: [https://wppconnect.io/wa-js/types/ev.EventTypes.html](https://wppconnect.io/wa-js/types/ev.EventTypes.html)
|
|
99
|
+
|
|
43
100
|
## Development
|
|
44
101
|
|
|
45
102
|
Steps to run locally:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2024 WPPConnect Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
-
* End a
|
|
17
|
+
* End a call
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```javascript
|
|
21
|
-
* // End any
|
|
21
|
+
* // End any call
|
|
22
22
|
* WPP.call.end();
|
|
23
23
|
*
|
|
24
24
|
* // End specific call id
|
|
25
25
|
* WPP.call.end(callId);
|
|
26
26
|
*
|
|
27
|
-
* // End any
|
|
28
|
-
* WPP.on('call.
|
|
27
|
+
* // End any incoming call
|
|
28
|
+
* WPP.on('call.incoming_call', (call) => {
|
|
29
29
|
* WPP.call.end(call.id);
|
|
30
30
|
* });
|
|
31
31
|
* ```
|
|
@@ -60,6 +60,7 @@ export { GroupInviteMessage, sendGroupInviteMessage, } from './sendGroupInviteMe
|
|
|
60
60
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
61
61
|
export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMessage';
|
|
62
62
|
export { OrderItems, OrderMessageOptions, sendOrderMessage, } from './sendOrderMessage';
|
|
63
|
+
export { sendPixKeyMessage } from './sendPixKeyMessage';
|
|
63
64
|
export { sendRawMessage } from './sendRawMessage';
|
|
64
65
|
export { sendReactionToMessage } from './sendReactionToMessage';
|
|
65
66
|
export { ScheduledCallMessageOptions, sendScheduledCallMessage, } from './sendScheduledCallMessage';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
+
export interface OrderItems {
|
|
18
|
+
type: 'product' | 'custom';
|
|
19
|
+
id?: number[] | string[];
|
|
20
|
+
name?: string;
|
|
21
|
+
price?: number;
|
|
22
|
+
qnt?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface OrderMessageOptions extends SendMessageOptions {
|
|
25
|
+
notes?: string;
|
|
26
|
+
discount?: number;
|
|
27
|
+
tax?: number;
|
|
28
|
+
shipping?: number;
|
|
29
|
+
offset?: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Send a invoice message
|
|
33
|
+
* To send (prices, tax, shipping or discount), for example: USD 12.90, send them without dots or commas, like: 12900
|
|
34
|
+
*
|
|
35
|
+
* @example
|
|
36
|
+
* ```javascript
|
|
37
|
+
* // Send PIX Key Message (Brazil Pix Key)
|
|
38
|
+
* WPP.chat.sendPixKeyMessage('[number]@c.us', {
|
|
39
|
+
* keyType: 'CNPJ',
|
|
40
|
+
* name: 'WPPCONNECT-TEAM',
|
|
41
|
+
* key: '33460516000178',
|
|
42
|
+
* instructions: 'Pay text for instructions here',
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* ```
|
|
46
|
+
* @category Message
|
|
47
|
+
*/
|
|
48
|
+
export declare function sendPixKeyMessage(chatId: any, params: {
|
|
49
|
+
keyType: 'CNPJ' | 'CPF' | 'PHONE' | 'EMAIL' | 'EVP';
|
|
50
|
+
name: string;
|
|
51
|
+
key: string;
|
|
52
|
+
instructions?: string;
|
|
53
|
+
}, options?: SendMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { LogoutReason } from '../../whatsapp/enums';
|
|
16
17
|
import { AuthCode } from '../types';
|
|
17
18
|
export interface ConnEventTypes {
|
|
18
19
|
'conn.auth_code_change': AuthCode | null;
|
|
@@ -28,6 +29,7 @@ export interface ConnEventTypes {
|
|
|
28
29
|
*/
|
|
29
30
|
'conn.authenticated': undefined;
|
|
30
31
|
'conn.logout': undefined;
|
|
32
|
+
'conn.logout_reason': LogoutReason;
|
|
31
33
|
/**
|
|
32
34
|
* Triggered when the interface is booting
|
|
33
35
|
*
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import './registerAuthCodeChangeEvent';
|
|
17
17
|
import './registerAuthenticatedEvent';
|
|
18
18
|
import './registerLogoutEvent';
|
|
19
|
+
import './registerLogoutReasonEvent';
|
|
19
20
|
import './registerMainInit';
|
|
20
21
|
import './registerMainLoadedEvent';
|
|
21
22
|
import './registerMainReadyEvent';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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 {};
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { MsgKey } from '../../whatsapp';
|
|
16
|
+
import { MsgKey, OrderModel } from '../../whatsapp';
|
|
17
17
|
/**
|
|
18
|
-
* Get info of
|
|
18
|
+
* Get info of a order
|
|
19
19
|
*
|
|
20
20
|
* @example
|
|
21
21
|
* ```javascript
|
|
@@ -24,4 +24,4 @@ import { MsgKey } from '../../whatsapp';
|
|
|
24
24
|
*
|
|
25
25
|
* @return Your current catalog
|
|
26
26
|
*/
|
|
27
|
-
export declare function get(msgId: string | MsgKey): Promise<
|
|
27
|
+
export declare function get(msgId: string | MsgKey): Promise<OrderModel>;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { get } from './get';
|
|
17
17
|
export { getMyStatus } from './getMyStatus';
|
|
18
|
+
export { remove } from './remove';
|
|
18
19
|
export { ImageStatusOptions, sendImageStatus } from './sendImageStatus';
|
|
19
20
|
export { sendRawStatus, SendStatusOptions } from './sendRawStatus';
|
|
20
21
|
export { sendReadStatus } from './sendReadStatus';
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
import { MsgKey } from '../../whatsapp';
|
|
17
|
+
export declare function remove(msgId: string | MsgKey): Promise<boolean>;
|
|
@@ -18,5 +18,6 @@ import { MsgKey } from '../../whatsapp';
|
|
|
18
18
|
export interface SendStatusOptions {
|
|
19
19
|
waitForAck?: boolean;
|
|
20
20
|
messageId?: string | MsgKey;
|
|
21
|
+
caption?: string;
|
|
21
22
|
}
|
|
22
23
|
export declare function sendRawStatus(message: Chat.RawMessage, options?: SendStatusOptions): Promise<Chat.SendMessageReturn>;
|
|
@@ -18,7 +18,6 @@ import { SendStatusOptions } from './sendRawStatus';
|
|
|
18
18
|
export interface TextStatusOptions extends SendStatusOptions {
|
|
19
19
|
font?: TextFontStyle;
|
|
20
20
|
backgroundColor?: string | number;
|
|
21
|
-
textColor?: string | number;
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
23
|
* Send a text message to status stories
|
|
@@ -16,15 +16,32 @@
|
|
|
16
16
|
/** @whatsapp 83578
|
|
17
17
|
* @whatsapp 88950 >= 2.2218.4
|
|
18
18
|
* @whatsapp 788950 >= 2.2222.8
|
|
19
|
+
* @whatsapp WAWebLogoutReasonConstants >= 2.3000.x
|
|
19
20
|
*/
|
|
20
21
|
export declare enum LogoutReason {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
22
|
+
UserInitiated = "user_initiated",
|
|
23
|
+
SyncdFailure = "syncd_failure",
|
|
24
|
+
InvalidAdvStatus = "invalid_adv_status",
|
|
25
|
+
CriticalSyncTimeout = "critical_sync_timeout",
|
|
26
|
+
SyncdTimeout = "syncd_timeout",
|
|
27
|
+
HistorySyncTimeout = "history_sync_timeout",
|
|
28
|
+
AccountSyncTimeout = "account_sync_timeout",
|
|
29
|
+
MDOptOut = "md_opt_out",
|
|
30
|
+
UnknownCompanion = "unknown_companion",
|
|
31
|
+
ClientVersionOutdated = "client_version_outdated",
|
|
32
|
+
SyncdErrorDuringBootstrap = "syncd_error_during_bootstrap",
|
|
33
|
+
AccountSyncError = "account_sync_error",
|
|
34
|
+
ClientFatalError = "client_fatal_error",
|
|
35
|
+
StorageQuotaExceeded = "storage_quota_exceeded",
|
|
36
|
+
PrimaryIdentityKeyChange = "primary_identity_key_change",
|
|
37
|
+
MissingEncSalt = "missing_enc_salt",
|
|
38
|
+
MissingScreenLockSalt = "missing_screen_lock_salt",
|
|
39
|
+
AccountLocked = "account_locked",
|
|
29
40
|
UNKNOWN = "unknown"
|
|
30
41
|
}
|
|
42
|
+
export declare enum LOGOUT_REASON_CODE {
|
|
43
|
+
CLIENT_FATAL = "0",
|
|
44
|
+
SYNC_FAIL = "1",
|
|
45
|
+
INITIAL_HISTORY_SYNC_TIMEOUT = "2",
|
|
46
|
+
ACCOUNT_LOCKED = "3"
|
|
47
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
* @whatsapp WAJids
|
|
18
|
+
*/
|
|
19
|
+
export declare const STATUS_JID: string;
|
|
@@ -26,3 +26,20 @@ export declare function createGroup(groupName: string, participants: Wid[], ephe
|
|
|
26
26
|
invite_code_exp: string | null;
|
|
27
27
|
}[];
|
|
28
28
|
}>;
|
|
29
|
+
export declare function createGroup(options: {
|
|
30
|
+
title: string;
|
|
31
|
+
ephemeralDuration: number;
|
|
32
|
+
restrict: boolean;
|
|
33
|
+
announce: boolean;
|
|
34
|
+
membershipApprovalMode: boolean;
|
|
35
|
+
memberAddMode: boolean;
|
|
36
|
+
parentGroupId?: Wid;
|
|
37
|
+
}, participants: Wid[]): Promise<{
|
|
38
|
+
wid: Wid;
|
|
39
|
+
participants: {
|
|
40
|
+
wid: Wid;
|
|
41
|
+
error: string;
|
|
42
|
+
invite_code: string | null;
|
|
43
|
+
invite_code_exp: string | null;
|
|
44
|
+
}[];
|
|
45
|
+
}>;
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
import { MsgKey, Wid } from '../misc';
|
|
17
|
+
import { MsgModel } from '../models';
|
|
18
|
+
/**
|
|
19
|
+
* @whatsapp WAWebEncryptAndSendStatusMsg
|
|
20
|
+
*/
|
|
21
|
+
export declare function encryptAndSendStatusMsg(msg: {
|
|
22
|
+
msg: {
|
|
23
|
+
type: string;
|
|
24
|
+
data: MsgModel;
|
|
25
|
+
};
|
|
26
|
+
data: {
|
|
27
|
+
ack: number;
|
|
28
|
+
author?: Wid;
|
|
29
|
+
from: Wid;
|
|
30
|
+
id: MsgKey;
|
|
31
|
+
subtype?: string;
|
|
32
|
+
to: Wid;
|
|
33
|
+
type: string;
|
|
34
|
+
};
|
|
35
|
+
}, proto: any, report: any): Promise<any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
import { LOGOUT_REASON_CODE, LogoutReason } from '../enums';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebLogoutReason >= 2.3000.x
|
|
19
|
+
*/
|
|
20
|
+
export declare function getErrorCodeFromLogoutReason(type: LogoutReason): LOGOUT_REASON_CODE | null;
|
|
@@ -38,6 +38,7 @@ export * from './encodeMaybeMediaType';
|
|
|
38
38
|
export * from './encryptAndSendGroupMsg';
|
|
39
39
|
export * from './encryptAndSendMsg';
|
|
40
40
|
export * from './encryptAndSendSenderKeyMsg';
|
|
41
|
+
export * from './encryptAndSendStatusMsg';
|
|
41
42
|
export * from './encryptMsgProtobuf';
|
|
42
43
|
export * from './fetchLinkPreview';
|
|
43
44
|
export * from './findChat';
|
|
@@ -54,6 +55,7 @@ export * from './getCommunityParticipants';
|
|
|
54
55
|
export * from './getCountryShortcodeByPhone';
|
|
55
56
|
export * from './getCurrentLid';
|
|
56
57
|
export * from './getEphemeralFields';
|
|
58
|
+
export * from './getErrorCodeFromLogoutReason';
|
|
57
59
|
export * from './getFanOutList';
|
|
58
60
|
export * from './getGroupSenderKeyList';
|
|
59
61
|
export * from './getGroupSizeLimit';
|
|
@@ -101,9 +103,11 @@ export * from './profilePic';
|
|
|
101
103
|
export * from './queryAllGroups';
|
|
102
104
|
export * from './queryGroupInviteCode';
|
|
103
105
|
export * from './queryNewsletterMetadataByJid';
|
|
106
|
+
export * from './queryOrder';
|
|
104
107
|
export * from './randomHex';
|
|
105
108
|
export * from './randomId';
|
|
106
109
|
export * from './resetGroupInviteCode';
|
|
110
|
+
export * from './revokeStatus';
|
|
107
111
|
export * from './sendClear';
|
|
108
112
|
export * from './sendCreateCommunity';
|
|
109
113
|
export * from './sendCreateGroup';
|
|
@@ -124,6 +128,8 @@ export * from './setGroup';
|
|
|
124
128
|
export * from './setPin';
|
|
125
129
|
export * from './setPushname';
|
|
126
130
|
export * from './status';
|
|
131
|
+
export * from './STATUS_JID';
|
|
132
|
+
export * from './statusEnable';
|
|
127
133
|
export * from './syncABPropsTask';
|
|
128
134
|
export * from './typeAttributeFromProtobuf';
|
|
129
135
|
export * from './unixTime';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
/** @whatsapp WAWebBizQueryOrderJob >= 2.30000.0 */
|
|
17
|
+
export declare function queryOrder(productId: string, imageWidth: number, imageHeight: number, token: string, e?: any): Promise<{
|
|
18
|
+
currency: string;
|
|
19
|
+
createdAt: number;
|
|
20
|
+
products: {
|
|
21
|
+
id: string;
|
|
22
|
+
price: number;
|
|
23
|
+
thumbnailId: string;
|
|
24
|
+
thumbnailUrl: string;
|
|
25
|
+
currency: string;
|
|
26
|
+
name: string;
|
|
27
|
+
quantity: number;
|
|
28
|
+
}[];
|
|
29
|
+
subtotal: number;
|
|
30
|
+
total: number;
|
|
31
|
+
tax: number | null;
|
|
32
|
+
}>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
import { ChatModel, MsgModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebRevokeStatusAction
|
|
19
|
+
*/
|
|
20
|
+
export declare function revokeStatus(chat: ChatModel, msg: MsgModel): Promise<any>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2024 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
|
+
* @whatsapp WAWebStatusSendGatingUtils >= 2.3000.0
|
|
18
|
+
*/
|
|
19
|
+
export declare function primaryFeatureEnabled(key: string): boolean;
|
|
@@ -38,6 +38,7 @@ export declare class Wid {
|
|
|
38
38
|
isPSA(): boolean;
|
|
39
39
|
isServer(): boolean;
|
|
40
40
|
isStatusV3(): boolean;
|
|
41
|
+
isStatus(): boolean;
|
|
41
42
|
isUser(): boolean;
|
|
42
43
|
isLid(): boolean;
|
|
43
44
|
isUserNotPSA(): boolean;
|
|
@@ -60,6 +61,7 @@ export declare class Wid {
|
|
|
60
61
|
static isPSA(wid: string | Wid): boolean;
|
|
61
62
|
static isServer(wid: string | Wid): boolean;
|
|
62
63
|
static isStatusV3(wid: string | Wid): boolean;
|
|
64
|
+
static isStatus(wid: string | Wid): boolean;
|
|
63
65
|
static isUser(wid: string | Wid): boolean;
|
|
64
66
|
static isLid(wid: string | Wid): boolean;
|
|
65
67
|
static isWid(wid: string | Wid): boolean;
|
|
@@ -19,7 +19,6 @@ export * from './BlocklistModel';
|
|
|
19
19
|
export * from './BusinessCategoriesResultModel';
|
|
20
20
|
export * from './BusinessProfileModel';
|
|
21
21
|
export * from './CallModel';
|
|
22
|
-
export * from './CallParticipantModel';
|
|
23
22
|
export * from './CartItemModel';
|
|
24
23
|
export * from './CartModel';
|
|
25
24
|
export * from './CatalogModel';
|