@wppconnect/wa-js 1.1.10 → 1.1.11
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 +9 -0
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/starMessage.d.ts +47 -0
- package/dist/profile/functions/getMyStatus.d.ts +26 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/whatsapp/models/ChatModel.d.ts +1 -1
- package/dist/whatsapp/models/StatusModel.d.ts +1 -1
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -37,4 +37,5 @@ export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
|
37
37
|
export { sendRawMessage } from './sendRawMessage';
|
|
38
38
|
export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
|
|
39
39
|
export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
|
|
40
|
+
export { starMessage, StarMessageReturn } from './starMessage';
|
|
40
41
|
export { unmute } from './unmute';
|
|
@@ -0,0 +1,47 @@
|
|
|
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
|
+
export interface StarMessageReturn {
|
|
17
|
+
id: string;
|
|
18
|
+
star: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Star/Unstar a message
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```javascript
|
|
25
|
+
* // star a message
|
|
26
|
+
* WPP.chat.starMessage('<message id>');
|
|
27
|
+
*
|
|
28
|
+
* // unstar a message
|
|
29
|
+
* WPP.chat.starMessage('<message id>', false);
|
|
30
|
+
* ```
|
|
31
|
+
* @category Message
|
|
32
|
+
*/
|
|
33
|
+
export declare function starMessage(id: string, star: boolean): Promise<StarMessageReturn>;
|
|
34
|
+
/**
|
|
35
|
+
* Star/Unstar messages
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```javascript
|
|
39
|
+
* // star messages
|
|
40
|
+
* WPP.chat.starMessage(['<message id>', '<message id>']);
|
|
41
|
+
*
|
|
42
|
+
* // unstar messages
|
|
43
|
+
* WPP.chat.starMessage(['<message id>', '<message id>'], false);
|
|
44
|
+
* ```
|
|
45
|
+
* @category Message
|
|
46
|
+
*/
|
|
47
|
+
export declare function starMessage(ids: string[], star: boolean): Promise<StarMessageReturn[]>;
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* Get your current text status
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```javascript
|
|
21
|
+
* await WPP.profile.getMyStatus();
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* @category Chat
|
|
25
|
+
*/
|
|
26
|
+
export declare function getMyStatus(): Promise<string | undefined>;
|
|
@@ -138,7 +138,7 @@ export declare class ChatModel extends ModelChatBase {
|
|
|
138
138
|
key?: MsgKey;
|
|
139
139
|
highlightMsg: true;
|
|
140
140
|
};
|
|
141
|
-
sendStarMsgs(
|
|
141
|
+
sendStarMsgs(msgs: MsgModel[], star: boolean): any;
|
|
142
142
|
sendRevokeMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
|
|
143
143
|
sendDeleteMsgs(messages: MsgModel[], deleteMediaInDevice?: boolean): Promise<SendMsgResult>;
|
|
144
144
|
deleteMsgs(e?: any, t?: any): any;
|