@wppconnect/wa-js 3.19.3 → 3.19.5
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
|
@@ -57,6 +57,7 @@ export { pinMsg, unpinMsg } from './pinMsg';
|
|
|
57
57
|
export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
|
|
58
58
|
export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
|
|
59
59
|
export { prepareRawMessage } from './prepareRawMessage';
|
|
60
|
+
export { ButtonReplyOptions, replyToButtonMessage, } from './replyToButtonMessage';
|
|
60
61
|
export { requestPhoneNumber } from './requestPhoneNumber';
|
|
61
62
|
export { sendCatalogMessage } from './sendCatalogMessage';
|
|
62
63
|
export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
|
|
@@ -25,6 +25,7 @@ export interface ChatListOptions {
|
|
|
25
25
|
onlyWithUnreadMessage?: boolean;
|
|
26
26
|
onlyArchived?: boolean;
|
|
27
27
|
withLabels?: string[];
|
|
28
|
+
ignoreGroupMetadata?: boolean;
|
|
28
29
|
}
|
|
29
30
|
/**
|
|
30
31
|
* Return a list of chats
|
|
@@ -63,6 +64,9 @@ export interface ChatListOptions {
|
|
|
63
64
|
*
|
|
64
65
|
* // Only archived chats
|
|
65
66
|
* const chats = await WPP.chat.list({onlyArchived: true});
|
|
67
|
+
*
|
|
68
|
+
* // Ignore group metadata search
|
|
69
|
+
* const chats = await WPP.chat.list({ignoreGroupMetadata: true})
|
|
66
70
|
* ```
|
|
67
71
|
*
|
|
68
72
|
* @category Chat
|
|
@@ -0,0 +1,44 @@
|
|
|
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 interface ButtonReplyOptions {
|
|
17
|
+
/**
|
|
18
|
+
* The index of the button to reply to (0-based)
|
|
19
|
+
* For example: 0 for first button, 1 for second button
|
|
20
|
+
*/
|
|
21
|
+
buttonIndex: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Reply to a button message by clicking a specific button
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```javascript
|
|
28
|
+
* // Reply to the first button (Yes)
|
|
29
|
+
* await WPP.chat.replyToButtonMessage(
|
|
30
|
+
* '[number]@c.us',
|
|
31
|
+
* 'messageId',
|
|
32
|
+
* { buttonIndex: 0 }
|
|
33
|
+
* );
|
|
34
|
+
*
|
|
35
|
+
* // Reply to the second button (No)
|
|
36
|
+
* await WPP.chat.replyToButtonMessage(
|
|
37
|
+
* '[number]@c.us',
|
|
38
|
+
* 'messageId',
|
|
39
|
+
* { buttonIndex: 1 }
|
|
40
|
+
* );
|
|
41
|
+
* ```
|
|
42
|
+
* @category Message
|
|
43
|
+
*/
|
|
44
|
+
export declare function replyToButtonMessage(chatId: any, messageId: string, options: ButtonReplyOptions): Promise<any>;
|