@wppconnect/wa-js 2.28.0 → 2.28.1
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 +1 -1
- package/dist/chat/functions/deleteMessage.d.ts +4 -4
- package/dist/chat/functions/index.d.ts +3 -2
- package/dist/chat/functions/keepMessage.d.ts +30 -0
- package/dist/contact/functions/get.d.ts +27 -0
- package/dist/contact/functions/index.d.ts +2 -1
- package/dist/whatsapp/enums/KIC_ENTRY_POINT_TYP.d.ts +26 -0
- package/dist/whatsapp/enums/index.d.ts +1 -0
- package/dist/whatsapp/functions/GROUP_JID.d.ts +21 -0
- package/dist/whatsapp/functions/forwardMessagesToChats.d.ts +20 -0
- package/dist/whatsapp/functions/index.d.ts +3 -0
- package/dist/whatsapp/functions/keepMessage.d.ts +23 -0
- package/dist/wppconnect-wa.js +1 -1
- package/package.json +27 -27
package/CHANGELOG.md
CHANGED
|
@@ -28,13 +28,13 @@ export interface DeleteMessageReturn {
|
|
|
28
28
|
* @example
|
|
29
29
|
* ```javascript
|
|
30
30
|
* // Delete a message
|
|
31
|
-
* WPP.chat.deleteMessage('[number]@
|
|
31
|
+
* WPP.chat.deleteMessage('[number]@c.us', 'msgid');
|
|
32
32
|
* // Delete a list of messages
|
|
33
|
-
* WPP.chat.deleteMessage('[number]@
|
|
33
|
+
* WPP.chat.deleteMessage('[number]@c.us', ['msgid1', 'msgid2]);
|
|
34
34
|
* // Delete a message and delete media
|
|
35
|
-
* WPP.chat.deleteMessage('[number]@
|
|
35
|
+
* WPP.chat.deleteMessage('[number]@c.us', 'msgid', true);
|
|
36
36
|
* // Revoke a message
|
|
37
|
-
* WPP.chat.deleteMessage('[number]@
|
|
37
|
+
* WPP.chat.deleteMessage('[number]@c.us', 'msgid', true, true);
|
|
38
38
|
* ```
|
|
39
39
|
*
|
|
40
40
|
* @category Message
|
|
@@ -36,6 +36,7 @@ export { getQuotedMsg } from './getQuotedMsg';
|
|
|
36
36
|
export { getQuotedMsgKey } from './getQuotedMsgKey';
|
|
37
37
|
export { getReactions } from './getReactions';
|
|
38
38
|
export { getVotes } from './getVotes';
|
|
39
|
+
export { keepMessage } from './keepMessage';
|
|
39
40
|
export { ChatListOptions, list } from './list';
|
|
40
41
|
export { markIsComposing } from './markIsComposing';
|
|
41
42
|
export { markIsPaused } from './markIsPaused';
|
|
@@ -56,10 +57,10 @@ export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMess
|
|
|
56
57
|
export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
|
|
57
58
|
export { ListMessageOptions, sendListMessage } from './sendListMessage';
|
|
58
59
|
export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMessage';
|
|
59
|
-
export { sendOrderMessage } from './sendOrderMessage';
|
|
60
|
+
export { OrderItems, OrderMessageOptions, sendOrderMessage, } from './sendOrderMessage';
|
|
60
61
|
export { sendRawMessage } from './sendRawMessage';
|
|
61
62
|
export { sendReactionToMessage } from './sendReactionToMessage';
|
|
62
|
-
export { sendScheduledCallMessage } from './sendScheduledCallMessage';
|
|
63
|
+
export { ScheduledCallMessageOptions, sendScheduledCallMessage, } from './sendScheduledCallMessage';
|
|
63
64
|
export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
|
|
64
65
|
export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
|
|
65
66
|
export { starMessage, StarMessageReturn } from './starMessage';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 { MsgKey, MsgModel } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Keep or unkeep a message in a group chat with expiration
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* // To keep a message in chat
|
|
23
|
+
* WPP.chat.keepMessage('true_[number]@c.us_ABCDEF', true);
|
|
24
|
+
*
|
|
25
|
+
* // To unkeep a message in chat
|
|
26
|
+
* WPP.chat.keepMessage('true_[number]@c.us_ABCDEF', false);
|
|
27
|
+
* ```
|
|
28
|
+
* @category Chat
|
|
29
|
+
*/
|
|
30
|
+
export declare function keepMessage(msgId: string | MsgKey, value?: boolean): Promise<MsgModel>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 { ContactModel, Wid } from '../../whatsapp';
|
|
17
|
+
/**
|
|
18
|
+
* Get a contact by id
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```javascript
|
|
22
|
+
* await WPP.contact.get('[number]@c.us');
|
|
23
|
+
* ```
|
|
24
|
+
*
|
|
25
|
+
* @category Contact
|
|
26
|
+
*/
|
|
27
|
+
export declare function get(contactId: string | Wid): Promise<ContactModel | undefined>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* Copyright
|
|
2
|
+
* Copyright 2023 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.
|
|
@@ -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
|
+
export { get } from './get';
|
|
16
17
|
export { getBusinessProfile } from './getBusinessProfile';
|
|
17
18
|
export { getCommonGroups } from './getCommonGroups';
|
|
18
19
|
export { getProfilePictureUrl } from './getProfilePictureUrl';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 982015
|
|
18
|
+
*/
|
|
19
|
+
export declare enum KIC_ENTRY_POINT_TYPE {
|
|
20
|
+
CHAT_INFO = 1,
|
|
21
|
+
SEARCH = 2,
|
|
22
|
+
CHAT = 3,
|
|
23
|
+
MEDIA = 4,
|
|
24
|
+
DOCS = 5,
|
|
25
|
+
LINKS = 6
|
|
26
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 355813
|
|
19
|
+
*/
|
|
20
|
+
export declare function GROUP_JID(jid: Wid): any;
|
|
21
|
+
export declare function CHAT_JID(jid: Wid): any;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { ChatModel, MsgModel } from '../models';
|
|
17
|
+
/** @whatsapp 69951
|
|
18
|
+
* @whatsapp 450192 >= 2.2353.0
|
|
19
|
+
*/
|
|
20
|
+
export declare function forwardMessagesToChats(msgs: MsgModel[], chats: ChatModel[], displayCaptionText?: boolean): Promise<boolean>;
|
|
@@ -41,6 +41,7 @@ export * from './fetchLinkPreview';
|
|
|
41
41
|
export * from './findChat';
|
|
42
42
|
export * from './findCommonGroups';
|
|
43
43
|
export * from './findFirstWebLink';
|
|
44
|
+
export * from './forwardMessagesToChats';
|
|
44
45
|
export * from './frontendFireAndForget';
|
|
45
46
|
export * from './generateVideoThumbsAndDuration';
|
|
46
47
|
export * from './genLinkDeviceCodeForPhoneNumber';
|
|
@@ -64,6 +65,7 @@ export * from './getReactions';
|
|
|
64
65
|
export * from './getSearchContext';
|
|
65
66
|
export * from './getVotes';
|
|
66
67
|
export * from './getWhatsAppWebExternalBetaJoinedIdb';
|
|
68
|
+
export * from './GROUP_JID';
|
|
67
69
|
export * from './groupParticipants';
|
|
68
70
|
export * from './handleAck';
|
|
69
71
|
export * from './handleSingleMsg';
|
|
@@ -73,6 +75,7 @@ export * from './isAuthenticated';
|
|
|
73
75
|
export * from './isRegistered';
|
|
74
76
|
export * from './isUnreadTypeMsg';
|
|
75
77
|
export * from './joinGroupViaInvite';
|
|
78
|
+
export * from './keepMessage';
|
|
76
79
|
export * from './markSeen';
|
|
77
80
|
export * from './mediaTypeFromProtobuf';
|
|
78
81
|
export * from './membershipApprovalRequestAction';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2023 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 } from '..';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp 170235
|
|
19
|
+
*/
|
|
20
|
+
export declare function keepMessage(msg: MsgModel, t: number): Promise<any>;
|
|
21
|
+
export declare function undoKeepMessage(msg: MsgModel, options: {
|
|
22
|
+
deleteExpired: boolean;
|
|
23
|
+
}, n: number): Promise<any>;
|