@wppconnect/wa-js 3.10.1 → 3.11.0
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 +3 -3
- package/dist/chat/functions/buttonsParser.d.ts +24 -0
- package/dist/chat/functions/deleteMessage.d.ts +2 -8
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/sendEventMessage.d.ts +64 -0
- package/dist/chat/functions/sendFileMessage.d.ts +2 -1
- package/dist/chat/functions/sendScheduledCallMessage.d.ts +5 -8
- package/dist/profile/functions/getMyProfilePicture.d.ts +27 -0
- package/dist/profile/functions/index.d.ts +1 -0
- package/dist/whatsapp/functions/createEventCallLink.d.ts +18 -0
- package/dist/whatsapp/functions/index.d.ts +2 -0
- package/dist/whatsapp/functions/removeStatusMessage.d.ts +19 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +21 -18
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
# 3.11.0 (2024-10-18)
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
###
|
|
4
|
+
### Features
|
|
5
5
|
|
|
6
|
-
*
|
|
6
|
+
* Added WPP.profile.getMyProfilePicture (close [#2327](https://github.com/wppconnect-team/wa-js/issues/2327)) ([b863dcf](https://github.com/wppconnect-team/wa-js/commit/b863dcfe1badacdeaf8bc39ab9a877a42f7ca9bb))
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2022 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 { MsgModel, websocket, Wid } from '../../whatsapp';
|
|
17
|
+
export declare function encryptAndParserMsgButtons<TFunc extends (...args: any[]) => any>(message: {
|
|
18
|
+
type: string;
|
|
19
|
+
data: MsgModel;
|
|
20
|
+
}, proto: {
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}, devices: Wid[], options: {
|
|
23
|
+
[key: string]: any;
|
|
24
|
+
}, reporter: any, groupData: any, func: TFunc): Promise<websocket.WapNode>;
|
|
@@ -17,7 +17,7 @@ import { Wid } from '../../whatsapp';
|
|
|
17
17
|
import { SendMsgResult } from '../../whatsapp/enums';
|
|
18
18
|
export interface DeleteMessageReturn {
|
|
19
19
|
id: string;
|
|
20
|
-
sendMsgResult:
|
|
20
|
+
sendMsgResult: SendMsgResult;
|
|
21
21
|
isRevoked: boolean;
|
|
22
22
|
isDeleted: boolean;
|
|
23
23
|
isSentByMe: boolean;
|
|
@@ -39,10 +39,4 @@ export interface DeleteMessageReturn {
|
|
|
39
39
|
*
|
|
40
40
|
* @category Message
|
|
41
41
|
*/
|
|
42
|
-
export declare function deleteMessage(chatId: string | Wid,
|
|
43
|
-
/**
|
|
44
|
-
* Delete a list of messages
|
|
45
|
-
*
|
|
46
|
-
* @category Message
|
|
47
|
-
*/
|
|
48
|
-
export declare function deleteMessage(chatId: string | Wid, ids: string[], deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn[]>;
|
|
42
|
+
export declare function deleteMessage(chatId: string | Wid, ids: string | string[], deleteMediaInDevice?: boolean, revoke?: boolean): Promise<DeleteMessageReturn | DeleteMessageReturn[]>;
|
|
@@ -57,6 +57,7 @@ export { prepareRawMessage } from './prepareRawMessage';
|
|
|
57
57
|
export { requestPhoneNumber } from './requestPhoneNumber';
|
|
58
58
|
export { OrderItems, OrderMessageOptions, sendChargeMessage, } from './sendChargeMessage';
|
|
59
59
|
export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
|
|
60
|
+
export { sendEventMessage } from './sendEventMessage';
|
|
60
61
|
export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
|
|
61
62
|
export { GroupInviteMessage, sendGroupInviteMessage, } from './sendGroupInviteMessage';
|
|
62
63
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
+
export interface EventMessageOptions extends SendMessageOptions {
|
|
18
|
+
callType?: 'video' | 'voice';
|
|
19
|
+
name: string;
|
|
20
|
+
description?: string;
|
|
21
|
+
startTime: number;
|
|
22
|
+
endTime?: number;
|
|
23
|
+
location?: {
|
|
24
|
+
degreesLatitude: number;
|
|
25
|
+
degreesLongitude: number;
|
|
26
|
+
name: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Send a Event Message
|
|
31
|
+
*
|
|
32
|
+
* @example
|
|
33
|
+
* ```javascript
|
|
34
|
+
* // Simple com start time and end
|
|
35
|
+
* WPP.chat.sendEventMessage('[number]@c.us', {
|
|
36
|
+
* name: "Title of event"
|
|
37
|
+
* description: 'Description of your event',
|
|
38
|
+
* startTime: 1729551600
|
|
39
|
+
* endTime: 1729551900
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* // Event with location
|
|
43
|
+
* WPP.chat.sendEventMessage('[number]@c.us', {
|
|
44
|
+
* name: "Title of event"
|
|
45
|
+
* description: 'Description of your event',
|
|
46
|
+
* startTime: 1729551600
|
|
47
|
+
* location: {
|
|
48
|
+
* degreesLatitude: -22.9518551,
|
|
49
|
+
* degreesLongitude: -43.2108338,
|
|
50
|
+
* name: 'Cristo Redentor - RJ',
|
|
51
|
+
* }
|
|
52
|
+
* });
|
|
53
|
+
*
|
|
54
|
+
* // Event with link for call (use voice or video)
|
|
55
|
+
* WPP.chat.sendEventMessage('[number]@c.us', {
|
|
56
|
+
* name: "Title of event"
|
|
57
|
+
* callType: 'voice',
|
|
58
|
+
* description: 'Description of your event',
|
|
59
|
+
* startTime: 1729551600
|
|
60
|
+
* });
|
|
61
|
+
* ```
|
|
62
|
+
* @category Message
|
|
63
|
+
*/
|
|
64
|
+
export declare function sendEventMessage(chatId: any, options: EventMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
import { Wid } from '../../whatsapp';
|
|
16
17
|
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
18
|
import { MessageButtonsOptions } from '.';
|
|
18
19
|
export interface FileMessageOptions extends SendMessageOptions {
|
|
@@ -180,4 +181,4 @@ export interface VideoMessageOptions extends FileMessageOptions, MessageButtonsO
|
|
|
180
181
|
* @category Message
|
|
181
182
|
* @return {SendMessageReturn} The result
|
|
182
183
|
*/
|
|
183
|
-
export declare function sendFileMessage(chatId:
|
|
184
|
+
export declare function sendFileMessage(chatId: string | Wid, content: string | Blob | File, options: AutoDetectMessageOptions | AudioMessageOptions | DocumentMessageOptions | ImageMessageOptions | VideoMessageOptions | StickerMessageOptions): Promise<SendMessageReturn>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2024 WPPConnect Team
|
|
3
3
|
*
|
|
4
4
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
5
|
* you may not use this file except in compliance with the License.
|
|
@@ -14,15 +14,11 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { SendMessageOptions, SendMessageReturn } from '..';
|
|
17
|
-
export declare enum SCHEDULED_CALL_TYPE {
|
|
18
|
-
UNKNOWN = 0,
|
|
19
|
-
VOICE = 1,
|
|
20
|
-
VIDEO = 2
|
|
21
|
-
}
|
|
22
17
|
export interface ScheduledCallMessageOptions extends SendMessageOptions {
|
|
23
18
|
scheduledTimestampMs: number | string;
|
|
24
|
-
callType: 'video' | 'voice'
|
|
19
|
+
callType: 'video' | 'voice';
|
|
25
20
|
title: string;
|
|
21
|
+
description?: string;
|
|
26
22
|
}
|
|
27
23
|
/**
|
|
28
24
|
* Send a scheduled call message
|
|
@@ -30,7 +26,8 @@ export interface ScheduledCallMessageOptions extends SendMessageOptions {
|
|
|
30
26
|
* @example
|
|
31
27
|
* ```javascript
|
|
32
28
|
* WPP.chat.sendScheduledCallMessage('[number]@c.us', {
|
|
33
|
-
* title: "Title of event"
|
|
29
|
+
* title: "Title of event call"
|
|
30
|
+
* description: 'Description for Call",
|
|
34
31
|
* callType: 'voice'
|
|
35
32
|
* scheduledTimestampMs: 1696084222000
|
|
36
33
|
* });
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
import { ProfilePicThumbModel } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Get your current profile picture
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* await WPP.profile.getMyProfilePicture();
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Profile
|
|
26
|
+
*/
|
|
27
|
+
export declare function getMyProfilePicture(): Promise<ProfilePicThumbModel>;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
export { editBusinessProfile } from './editBusinessProfile';
|
|
17
17
|
export { getMyProfileName } from './getMyProfileName';
|
|
18
|
+
export { getMyProfilePicture } from './getMyProfilePicture';
|
|
18
19
|
export { getMyStatus } from './getMyStatus';
|
|
19
20
|
export { isBusiness } from './isBusiness';
|
|
20
21
|
export { removeMyProfilePicture } from './removeMyProfilePicture';
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
/** @whatsapp 75887
|
|
17
|
+
*/
|
|
18
|
+
export declare function createEventCallLink(eventStartTime: number, type: 'voice' | 'video'): Promise<string>;
|
|
@@ -26,6 +26,7 @@ export * from './changeOptInStatusForExternalWebBeta';
|
|
|
26
26
|
export * from './collections';
|
|
27
27
|
export * from './colorIndexToHex';
|
|
28
28
|
export * from './contactFunctions';
|
|
29
|
+
export * from './createEventCallLink';
|
|
29
30
|
export * from './createFanoutMsgStanza';
|
|
30
31
|
export * from './createGroup';
|
|
31
32
|
export * from './createMsgProtobuf';
|
|
@@ -109,6 +110,7 @@ export * from './queryNewsletterMetadataByJid';
|
|
|
109
110
|
export * from './queryOrder';
|
|
110
111
|
export * from './randomHex';
|
|
111
112
|
export * from './randomId';
|
|
113
|
+
export * from './removeStatusMessage';
|
|
112
114
|
export * from './resetGroupInviteCode';
|
|
113
115
|
export * from './revokeStatus';
|
|
114
116
|
export * from './sendClear';
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebDBMessageDelete
|
|
18
|
+
*/
|
|
19
|
+
export declare function removeStatusMessage(id: string[]): Promise<any>;
|