@wppconnect/wa-js 1.2.1 → 1.2.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 +22 -0
- package/dist/chat/eventEmitter.d.ts +4 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +16 -4
- package/dist/whatsapp/functions/isAuthenticated.d.ts +5 -0
- package/dist/whatsapp/models/ChatModel.d.ts +2 -0
- package/dist/whatsapp/models/MsgModel.d.ts +17 -3
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 1.2.4 (2022-03-23)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Working on template buttons support ([ecf0a81](https://github.com/wppconnect-team/wa-js/commit/ecf0a813da0a3c3c811e3d6cf6611ea98ed1f18c))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.2.3 (2022-03-16)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## 1.2.2 (2022-03-12)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* Fixed WPP.chat.deleteMessage for old versions (fix wppconnect-team/wppconnect[#937](https://github.com/wppconnect-team/wa-js/issues/937)) ([a53ec55](https://github.com/wppconnect-team/wa-js/commit/a53ec55a04d3efa117dfd31ec4f1b2131ba85622))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
1
23
|
## 1.2.1 (2022-03-09)
|
|
2
24
|
|
|
3
25
|
|
|
@@ -14,18 +14,30 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { RawMessage } from '..';
|
|
17
|
+
export declare type MessageButtonsTypes = {
|
|
18
|
+
id: string;
|
|
19
|
+
text: string;
|
|
20
|
+
} | {
|
|
21
|
+
phoneNumber: string;
|
|
22
|
+
text: string;
|
|
23
|
+
} | {
|
|
24
|
+
url: string;
|
|
25
|
+
text: string;
|
|
26
|
+
};
|
|
17
27
|
export interface MessageButtonsOptions {
|
|
18
28
|
/**
|
|
19
29
|
* List of buttons, with at least 1 option and a maximum of 3
|
|
20
30
|
*/
|
|
21
|
-
buttons?: Array<
|
|
22
|
-
id: string;
|
|
23
|
-
text: string;
|
|
24
|
-
}>;
|
|
31
|
+
buttons?: Array<MessageButtonsTypes>;
|
|
25
32
|
/**
|
|
26
33
|
* Title for buttons, only for text message
|
|
27
34
|
*/
|
|
28
35
|
title?: string;
|
|
36
|
+
/**
|
|
37
|
+
* Set to use template buttons instead of reply buttons.
|
|
38
|
+
* @default: undefined - auto detect
|
|
39
|
+
*/
|
|
40
|
+
useTemplateButtons?: boolean;
|
|
29
41
|
/**
|
|
30
42
|
* Footer text for buttons
|
|
31
43
|
*/
|
|
@@ -141,6 +141,7 @@ export declare class ChatModel extends ModelChatBase {
|
|
|
141
141
|
};
|
|
142
142
|
sendStarMsgs(msgs: MsgModel[], star: boolean): any;
|
|
143
143
|
sendRevokeMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
|
|
144
|
+
sendRevokeMsgs(messages: MsgModel[], sender: string, deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
|
|
144
145
|
sendDeleteMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
|
|
145
146
|
deleteMsgs(e?: any, t?: any): any;
|
|
146
147
|
deleteMsgsOlderThan(e?: any, t?: any, r?: any): any;
|
|
@@ -195,5 +196,6 @@ export declare class ChatModel extends ModelChatBase {
|
|
|
195
196
|
replaceMsgsCollection(e?: any): any;
|
|
196
197
|
removeMsgsCollection(e?: any): any;
|
|
197
198
|
notifyMsgCollectionMerge(e?: any, t?: any, r?: any, a?: any): any;
|
|
199
|
+
canSenderRevoke(): boolean;
|
|
198
200
|
}
|
|
199
201
|
export {};
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { TextFontStyle } from '../../enums';
|
|
17
|
-
import { ButtonCollection, MsgCollection } from '../collections';
|
|
17
|
+
import { ButtonCollection, MsgCollection, TemplateButtonCollection } from '../collections';
|
|
18
18
|
import { MediaObject, MsgKey, Wid } from '../misc';
|
|
19
19
|
import { ChatModel, MediaDataModel } from '.';
|
|
20
20
|
import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
|
|
@@ -115,8 +115,22 @@ interface Props {
|
|
|
115
115
|
quotedParticipant?: any;
|
|
116
116
|
mentionedJidList?: Wid[];
|
|
117
117
|
footer?: string;
|
|
118
|
-
hydratedButtons?:
|
|
119
|
-
|
|
118
|
+
hydratedButtons?: Array<{
|
|
119
|
+
index?: number;
|
|
120
|
+
quickReplyButton?: {
|
|
121
|
+
displayText: string;
|
|
122
|
+
id: string;
|
|
123
|
+
};
|
|
124
|
+
urlButton?: {
|
|
125
|
+
displayText: string;
|
|
126
|
+
url: string;
|
|
127
|
+
};
|
|
128
|
+
callButton?: {
|
|
129
|
+
displayText: string;
|
|
130
|
+
phoneNumber: string;
|
|
131
|
+
};
|
|
132
|
+
}>;
|
|
133
|
+
buttons?: TemplateButtonCollection;
|
|
120
134
|
selectedId?: any;
|
|
121
135
|
selectedIndex?: any;
|
|
122
136
|
multicast?: any;
|