talkyzap-wapp-api 1.0.2 → 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.
Files changed (37) hide show
  1. package/CHANGELOG.md +6 -1
  2. package/README.md +57 -0
  3. package/dist/call/functions/end.d.ts +5 -5
  4. package/dist/chat/functions/index.d.ts +1 -0
  5. package/dist/chat/functions/sendGroupInviteMessage.d.ts +0 -14
  6. package/dist/chat/functions/sendPixKeyMessage.d.ts +53 -0
  7. package/dist/chat/types.d.ts +3 -0
  8. package/dist/conn/events/eventTypes.d.ts +2 -0
  9. package/dist/conn/events/index.d.ts +1 -0
  10. package/dist/conn/events/registerLogoutReasonEvent.d.ts +16 -0
  11. package/dist/group/functions/ensureGroup.d.ts +1 -1
  12. package/dist/group/functions/getPastParticipants.d.ts +27 -0
  13. package/dist/group/functions/index.d.ts +1 -0
  14. package/dist/order/functions/get.d.ts +3 -3
  15. package/dist/status/functions/index.d.ts +1 -0
  16. package/dist/status/functions/remove.d.ts +17 -0
  17. package/dist/status/functions/sendRawStatus.d.ts +1 -0
  18. package/dist/status/functions/sendTextStatus.d.ts +0 -1
  19. package/dist/whatsapp/enums/LogoutReason.d.ts +25 -8
  20. package/dist/whatsapp/functions/STATUS_JID.d.ts +19 -0
  21. package/dist/whatsapp/functions/canEditCaption.d.ts +20 -0
  22. package/dist/whatsapp/functions/createGroup.d.ts +17 -0
  23. package/dist/whatsapp/functions/createOrUpdateReactions.d.ts +1 -0
  24. package/dist/whatsapp/functions/encryptAndSendStatusMsg.d.ts +35 -0
  25. package/dist/whatsapp/functions/getErrorCodeFromLogoutReason.d.ts +20 -0
  26. package/dist/whatsapp/functions/index.d.ts +7 -0
  27. package/dist/whatsapp/functions/queryOrder.d.ts +32 -0
  28. package/dist/whatsapp/functions/revokeStatus.d.ts +20 -0
  29. package/dist/whatsapp/functions/statusEnable.d.ts +19 -0
  30. package/dist/whatsapp/misc/Cmd.d.ts +17 -2
  31. package/dist/whatsapp/misc/Wid.d.ts +2 -0
  32. package/dist/whatsapp/models/GroupMetadataModel.d.ts +4 -2
  33. package/dist/whatsapp/models/index.d.ts +0 -1
  34. package/dist/wppconnect-wa.js +1 -1
  35. package/dist/wppconnect-wa.js.LICENSE.txt +2 -0
  36. package/package.json +21 -20
  37. package/dist/whatsapp/models/CallParticipantModel.d.ts +0 -50
package/CHANGELOG.md CHANGED
@@ -1,4 +1,9 @@
1
- ## 3.2.6 (2024-05-10)
1
+ # 3.5.0 (2024-07-12)
2
+
3
+
4
+ ### Features
5
+
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))
2
7
 
3
8
 
4
9
 
package/README.md CHANGED
@@ -19,6 +19,13 @@
19
19
  [![WhatsApp Group](https://img.shields.io/badge/WhatsApp-Group-25D366?logo=whatsapp)](https://chat.whatsapp.com/LJaQu6ZyNvnBPNAVRbX00K)
20
20
  [![YouTube](https://img.shields.io/youtube/channel/subscribers/UCD7J9LG08PmGQrF5IS7Yv9A?label=YouTube)](https://www.youtube.com/c/wppconnect)
21
21
 
22
+
23
+ ### Top Contributors (last 45 days) widget
24
+ ---
25
+ ![Top Contributors (Last 45 days) widget](https://embeddables.devactivity.com/orgs/wppconnect-team/508ecbcd-e55e-4e31-a647-6674f134b5bf.svg)
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 2023 WPPConnect Team
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 outcoming call
17
+ * End a call
18
18
  *
19
19
  * @example
20
20
  * ```javascript
21
- * // End any outcoming call
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 outcoming call
28
- * WPP.on('call.outcoming_call', (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';
@@ -35,20 +35,6 @@ export interface GroupInviteMessage extends SendMessageOptions {
35
35
  * groupId: '789@g.us'
36
36
  * }
37
37
  * );
38
- *
39
- * // After a invite
40
- * const result = await WPP.group.addParticipants('789@g.us', '123@c.us');
41
- * const participant = result['123@c.us'];
42
- * if (participant.invite_code) {
43
- * WPP.chat.sendGroupInviteMessage(
44
- * '123@c.us',
45
- * {
46
- * inviteCode: participant.invite_code,
47
- * inviteCodeExpiration: participant.invite_code_exp,
48
- * groupId: '789@g.us'
49
- * }
50
- * );
51
- * }
52
38
  * ```
53
39
  *
54
40
  * @category Message
@@ -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>;
@@ -110,6 +110,9 @@ export interface SendMessageOptions {
110
110
  }
111
111
  export interface SendMessageReturn {
112
112
  id: string;
113
+ from?: string;
114
+ to?: string;
115
+ latestEditMsgKey?: MsgKey;
113
116
  ack: number;
114
117
  sendMsgResult: Promise<SendMsgResult>;
115
118
  }
@@ -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 {};
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Copyright 2021 WPPConnect Team
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.
@@ -0,0 +1,27 @@
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 { Wid } from '../../whatsapp';
17
+ /**
18
+ * Get an array of past participants of a group
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * WPP.group.getPastParticipants('[group-id]@g.us');
23
+ * ```
24
+ *
25
+ * @category Group
26
+ */
27
+ export declare function getPastParticipants(groupId: string | Wid): Promise<import("../../whatsapp").ParticipantModel[]>;
@@ -29,6 +29,7 @@ export { getGroupSizeLimit } from './getGroupSizeLimit';
29
29
  export { getInviteCode } from './getInviteCode';
30
30
  export { getMembershipRequests } from './getMembershipRequests';
31
31
  export { getParticipants } from './getParticipants';
32
+ export { getPastParticipants } from './getPastParticipants';
32
33
  export { iAmAdmin } from './iAmAdmin';
33
34
  export { iAmMember } from './iAmMember';
34
35
  export { iAmRestrictedMember } from './iAmRestrictedMember';
@@ -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 your sended order
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<boolean>;
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
- USER_INITIATED = "user_initiated",
22
- SYNCD_FAILURE = "syncd_failure",
23
- CRITICAL_SYNC_TIMEOUT = "critical_sync_timeout",
24
- UNKNOWN_COMPANION = "unknown_companion",
25
- CLIENT_VERSION_OUTDATED = "client_version_outdated",
26
- SYNCD_ERROR_DURING_BOOTSTRAP = "syncd_error_during_bootstrap",
27
- ACCOUNT_SYNC_ERROR = "account_sync_error",
28
- CLIENT_FATAL_ERROR = "client_fatal_error",
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;
@@ -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 { MsgModel } from '../models';
17
+ /**
18
+ * @whatsapp WAWebMsgActionCapability >= 2.3000.0
19
+ */
20
+ export declare function canEditCaption(msg: MsgModel): boolean;
@@ -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
+ }>;
@@ -25,5 +25,6 @@ export interface ReactionData {
25
25
  }
26
26
  /** @whatsapp 7394
27
27
  * @whatsapp 307394 >= 2.2222.8
28
+ * @whatsapp WAWebReactionsMsgAction >= 2.3000.x
28
29
  */
29
30
  export declare function createOrUpdateReactions(data: ReactionData[]): Promise<any>;
@@ -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;
@@ -18,6 +18,7 @@ export * from './addAndSendMsgToChat';
18
18
  export * from './addToLabelCollection';
19
19
  export * from './blockContact';
20
20
  export * from './calculateFilehashFromBlob';
21
+ export * from './canEditCaption';
21
22
  export * from './canEditMsg';
22
23
  export * from './canReplyMsg';
23
24
  export * from './changeOptInStatusForExternalWebBeta';
@@ -37,6 +38,7 @@ export * from './encodeMaybeMediaType';
37
38
  export * from './encryptAndSendGroupMsg';
38
39
  export * from './encryptAndSendMsg';
39
40
  export * from './encryptAndSendSenderKeyMsg';
41
+ export * from './encryptAndSendStatusMsg';
40
42
  export * from './encryptMsgProtobuf';
41
43
  export * from './fetchLinkPreview';
42
44
  export * from './findChat';
@@ -53,6 +55,7 @@ export * from './getCommunityParticipants';
53
55
  export * from './getCountryShortcodeByPhone';
54
56
  export * from './getCurrentLid';
55
57
  export * from './getEphemeralFields';
58
+ export * from './getErrorCodeFromLogoutReason';
56
59
  export * from './getFanOutList';
57
60
  export * from './getGroupSenderKeyList';
58
61
  export * from './getGroupSizeLimit';
@@ -100,9 +103,11 @@ export * from './profilePic';
100
103
  export * from './queryAllGroups';
101
104
  export * from './queryGroupInviteCode';
102
105
  export * from './queryNewsletterMetadataByJid';
106
+ export * from './queryOrder';
103
107
  export * from './randomHex';
104
108
  export * from './randomId';
105
109
  export * from './resetGroupInviteCode';
110
+ export * from './revokeStatus';
106
111
  export * from './sendClear';
107
112
  export * from './sendCreateCommunity';
108
113
  export * from './sendCreateGroup';
@@ -123,6 +128,8 @@ export * from './setGroup';
123
128
  export * from './setPin';
124
129
  export * from './setPushname';
125
130
  export * from './status';
131
+ export * from './STATUS_JID';
132
+ export * from './statusEnable';
126
133
  export * from './syncABPropsTask';
127
134
  export * from './typeAttributeFromProtobuf';
128
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;