@wppconnect/wa-js 3.19.2 → 3.19.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 CHANGED
@@ -1,9 +1,4 @@
1
- ## 3.19.2 (2025-11-25)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * contact save and remove functions ([#3093](https://github.com/wppconnect-team/wa-js/issues/3093)) ([285c88b](https://github.com/wppconnect-team/wa-js/commit/285c88b3b2feeb21dccb493d5f7301b5f7fa901f))
1
+ ## 3.19.4 (2026-01-05)
7
2
 
8
3
 
9
4
 
@@ -17,10 +17,10 @@ import { MsgKey } from '../../whatsapp';
17
17
  import { LinkPreviewOptions, SendMessageOptions, SendMessageReturn } from '..';
18
18
  export type EditMessageOptions = SendMessageOptions & LinkPreviewOptions;
19
19
  /**
20
- * Send a text message
20
+ * Edit a message previously sent.
21
21
  *
22
22
  * @example
23
- * WPP.chat.editMessage('[number]@c.us', 'New text for message', {
23
+ * WPP.chat.editMessage('true_[number]@c.us_[msgId]', 'New text for message', {
24
24
  * linkPreview: true,
25
25
  * mentionedJidList: ['5521985232287@c.us']
26
26
  * });
@@ -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';
@@ -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>;
@@ -14,7 +14,9 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ModelPropertiesContructor, MsgModel } from '../models';
17
- import { SendMsgResultObject } from '../types';
18
- /** @whatsapp 375399
17
+ /**
18
+ * @whatsapp >= 2.3000.1027602471
19
+ * @note Since WhatsApp Web version ~2.3000.1027602471, this function no longer returns
20
+ * a send result object. It only returns void after sending the edit message.
19
21
  */
20
- export declare function addAndSendMessageEdit(editMsg: MsgModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResultObject>]>;
22
+ export declare function addAndSendMessageEdit(editMsg: MsgModel, message: ModelPropertiesContructor<MsgModel>): Promise<void>;
@@ -15,8 +15,9 @@
15
15
  */
16
16
  import { ChatModel, ModelPropertiesContructor, MsgModel } from '../models';
17
17
  import { SendMsgResultObject } from '../types';
18
- /** @whatsapp 75887
18
+ /**
19
19
  * @whatsapp 975887 >= 2.2222.8
20
20
  * @whatsapp 623631 >= 2.2228.4
21
+ * @whatsapp >= 2.3000.1030351223
21
22
  */
22
23
  export declare function addAndSendMsgToChat(chat: ChatModel, message: ModelPropertiesContructor<MsgModel>): Promise<[Promise<MsgModel>, Promise<SendMsgResultObject>]>;