@wppconnect/wa-js 1.1.7 → 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 +36 -0
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/starMessage.d.ts +47 -0
- package/dist/config.d.ts +6 -1
- package/dist/contact/functions/queryExists.d.ts +16 -2
- package/dist/profile/functions/getMyStatus.d.ts +26 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/whatsapp/functions/findFirstWebLink.d.ts +1 -1
- package/dist/whatsapp/misc/Wap.d.ts +31 -0
- package/dist/whatsapp/misc/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 +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
+
## 1.1.11 (2022-01-22)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* Added WPP.profile.getMyStatus function ([7c5975d](https://github.com/wppconnect-team/wa-js/commit/7c5975df3eaacc6a4b98f5e9116574dfbcaf8cfa))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## 1.1.10 (2022-01-22)
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* Fixed getMessageById when the message is from status (wppconnect-team/wppconnect[#823](https://github.com/wppconnect-team/wa-js/issues/823)) ([f075cd2](https://github.com/wppconnect-team/wa-js/commit/f075cd24fd01e33f0322da9f9be321f039b9b6b3))
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
## 1.1.9 (2022-01-21)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Bug Fixes
|
|
23
|
+
|
|
24
|
+
* Fixed live location event register and added a option ([08949a9](https://github.com/wppconnect-team/wa-js/commit/08949a9c3c46274f2ccca7d30e3aeb9c8a4e9851))
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## 1.1.8 (2022-01-21)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Bug Fixes
|
|
32
|
+
|
|
33
|
+
* Fixed WPP.contact.queryExists function (fix wppconnect-team/wppconnect[#803](https://github.com/wppconnect-team/wa-js/issues/803)) ([63a021d](https://github.com/wppconnect-team/wa-js/commit/63a021da96f75b9300f2d8f3409934ab0a0a611a))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
1
37
|
## 1.1.7 (2022-01-20)
|
|
2
38
|
|
|
3
39
|
|
|
@@ -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[]>;
|
package/dist/config.d.ts
CHANGED
|
@@ -20,7 +20,8 @@
|
|
|
20
20
|
* ```javascript
|
|
21
21
|
* // Global variable before injection
|
|
22
22
|
* WPPConfig = {
|
|
23
|
-
* deviceName: 'WPPConnect'
|
|
23
|
+
* deviceName: 'WPPConnect',
|
|
24
|
+
* liveLocationLimit: 10
|
|
24
25
|
* };
|
|
25
26
|
* ```
|
|
26
27
|
*/
|
|
@@ -30,6 +31,10 @@ export interface Config {
|
|
|
30
31
|
* @default 'WPPConnect'
|
|
31
32
|
*/
|
|
32
33
|
deviceName: string | false;
|
|
34
|
+
/**
|
|
35
|
+
* Number of last chats to check live location after a page reload
|
|
36
|
+
*/
|
|
37
|
+
liveLocationLimit: number;
|
|
33
38
|
}
|
|
34
39
|
export declare const defaultConfig: Config;
|
|
35
40
|
export declare const config: Config;
|
|
@@ -14,7 +14,21 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from '../../whatsapp';
|
|
17
|
-
export
|
|
17
|
+
export interface QueryExistsResult {
|
|
18
18
|
wid: Wid;
|
|
19
19
|
biz: boolean;
|
|
20
|
-
|
|
20
|
+
bizInfo?: {
|
|
21
|
+
verifiedName?: {
|
|
22
|
+
isApi: boolean;
|
|
23
|
+
level: string;
|
|
24
|
+
name: string;
|
|
25
|
+
privacyMode: any;
|
|
26
|
+
serial: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
disappearingMode?: {
|
|
30
|
+
duration: number;
|
|
31
|
+
settingTimestamp: number;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export declare function queryExists(contactId: string | Wid): Promise<QueryExistsResult | null>;
|
|
@@ -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>;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
import { Wid } from '.';
|
|
17
|
+
/** @whatsapp 69610 */
|
|
18
|
+
export declare class WapClass {
|
|
19
|
+
queryExist(contactId: string): Promise<{
|
|
20
|
+
status: 200;
|
|
21
|
+
jid: Wid;
|
|
22
|
+
biz?: true;
|
|
23
|
+
}>;
|
|
24
|
+
queryDisappearingMode(contactId: Wid): Promise<{
|
|
25
|
+
status: 200;
|
|
26
|
+
duration: number;
|
|
27
|
+
settingTimestamp: number;
|
|
28
|
+
}>;
|
|
29
|
+
}
|
|
30
|
+
/** @whatsapp 69162 */
|
|
31
|
+
export declare const Wap: WapClass;
|
|
@@ -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;
|