@wppconnect/wa-js 1.2.2 → 1.2.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 +22 -0
- package/dist/chat/functions/prepareMessageButtons.d.ts +16 -4
- package/dist/group/functions/getGroupInfoFromInviteCode.d.ts +3 -3
- package/dist/whatsapp/functions/isAuthenticated.d.ts +5 -0
- package/dist/whatsapp/functions/sendQueryGroupInvite.d.ts +3 -3
- package/dist/whatsapp/models/MsgModel.d.ts +17 -3
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,25 @@
|
|
|
1
|
+
## 1.2.5 (2022-03-25)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* Fixed WPP.group.getGroupInfoFromInviteCode function (fix wppconnect-team/wppconnect[#972](https://github.com/wppconnect-team/wa-js/issues/972)) ([a8bb5cf](https://github.com/wppconnect-team/wa-js/commit/a8bb5cf2846b655dd26d3d9506bc5545dbf64413))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.2.4 (2022-03-23)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Features
|
|
14
|
+
|
|
15
|
+
* Working on template buttons support ([ecf0a81](https://github.com/wppconnect-team/wa-js/commit/ecf0a813da0a3c3c811e3d6cf6611ea98ed1f18c))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 1.2.3 (2022-03-16)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
1
23
|
## 1.2.2 (2022-03-12)
|
|
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
|
*/
|
|
@@ -24,15 +24,15 @@
|
|
|
24
24
|
* @category Group
|
|
25
25
|
*/
|
|
26
26
|
export declare function getGroupInfoFromInviteCode(inviteCode: string): Promise<{
|
|
27
|
-
descOwner: string;
|
|
27
|
+
descOwner: string | undefined;
|
|
28
28
|
id: string;
|
|
29
|
-
owner: string;
|
|
29
|
+
owner: string | undefined;
|
|
30
30
|
participants: {
|
|
31
31
|
id: string;
|
|
32
32
|
isAdmin: boolean;
|
|
33
33
|
isSuperAdmin: boolean;
|
|
34
34
|
}[];
|
|
35
|
-
subjectOwner: string;
|
|
35
|
+
subjectOwner: string | undefined;
|
|
36
36
|
announce: boolean;
|
|
37
37
|
creation: number;
|
|
38
38
|
desc: string;
|
|
@@ -19,11 +19,11 @@ export interface QueryGroupInviteResult {
|
|
|
19
19
|
creation: number;
|
|
20
20
|
desc: string;
|
|
21
21
|
descId: string;
|
|
22
|
-
descOwner
|
|
22
|
+
descOwner?: Wid;
|
|
23
23
|
descTime: number;
|
|
24
24
|
id: Wid;
|
|
25
25
|
noFrequentlyForwarded: boolean;
|
|
26
|
-
owner
|
|
26
|
+
owner?: Wid;
|
|
27
27
|
parent: boolean;
|
|
28
28
|
participants: {
|
|
29
29
|
id: Wid;
|
|
@@ -35,7 +35,7 @@ export interface QueryGroupInviteResult {
|
|
|
35
35
|
size: number;
|
|
36
36
|
status: number;
|
|
37
37
|
subject: string;
|
|
38
|
-
subjectOwner
|
|
38
|
+
subjectOwner?: Wid;
|
|
39
39
|
subjectTime: number;
|
|
40
40
|
support: boolean;
|
|
41
41
|
suspended: boolean;
|
|
@@ -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;
|