@wppconnect/wa-js 2.23.1 → 2.23.2
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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
## 2.23.
|
|
1
|
+
## 2.23.2 (2023-04-13)
|
|
2
2
|
|
|
3
3
|
### Bug Fixes
|
|
4
4
|
|
|
5
|
-
- Fixed
|
|
5
|
+
- Fixed attributes MsgModel ([4ac516f](https://github.com/wppconnect-team/wa-js/commit/4ac516f42479a82b38423f3b25ce0f6e7bb46661))
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
* Get a reply message
|
|
19
|
+
*
|
|
20
|
+
* @category Chat
|
|
21
|
+
*/
|
|
22
|
+
export declare function getQuotedMsg(id: string | MsgKey): Promise<MsgModel>;
|
|
@@ -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.
|
|
@@ -32,6 +32,7 @@ export { getMessageACK } from './getMessageACK';
|
|
|
32
32
|
export { getMessageById } from './getMessageById';
|
|
33
33
|
export { getMessages, GetMessagesOptions } from './getMessages';
|
|
34
34
|
export { getPlatformFromMessage } from './getPlatformFromMessage';
|
|
35
|
+
export { getQuotedMsg } from './getQuotedMsg';
|
|
35
36
|
export { getReactions } from './getReactions';
|
|
36
37
|
export { getVotes } from './getVotes';
|
|
37
38
|
export { ChatListOptions, list } from './list';
|
|
@@ -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,8 +13,11 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ChatModel } from '../../whatsapp';
|
|
16
|
+
import { ChatModel, Wid } from '../../whatsapp';
|
|
17
17
|
export interface ChatListOptions {
|
|
18
|
+
id?: Wid;
|
|
19
|
+
count?: number;
|
|
20
|
+
direction?: 'after' | 'before';
|
|
18
21
|
onlyGroups?: boolean;
|
|
19
22
|
onlyUsers?: boolean;
|
|
20
23
|
onlyWithUnreadMessage?: boolean;
|
|
@@ -28,6 +31,12 @@ export interface ChatListOptions {
|
|
|
28
31
|
* // All chats
|
|
29
32
|
* const chats = await WPP.chat.list();
|
|
30
33
|
*
|
|
34
|
+
* // Some chats
|
|
35
|
+
* const chats = WPP.chat.list({count: 20});
|
|
36
|
+
*
|
|
37
|
+
* // 20 chats before specific chat
|
|
38
|
+
* const chats = WPP.chat.list({count: 20, direction: 'before', id: '[number]@c.us'});
|
|
39
|
+
*
|
|
31
40
|
* // Only users chats
|
|
32
41
|
* const chats = await WPP.chat.list({onlyUsers: true});
|
|
33
42
|
*
|
|
@@ -111,10 +111,14 @@ interface Props {
|
|
|
111
111
|
sessionId?: any;
|
|
112
112
|
recipients?: any;
|
|
113
113
|
broadcast?: any;
|
|
114
|
+
/** @deprecated */
|
|
115
|
+
quotedMsgId?: MsgKey;
|
|
114
116
|
quotedMsg?: MsgModel;
|
|
115
117
|
quotedStanzaID?: any;
|
|
116
118
|
quotedRemoteJid?: any;
|
|
117
119
|
quotedParticipant?: any;
|
|
120
|
+
quotedGroupSubject?: any;
|
|
121
|
+
quotedParentGroupJid?: any;
|
|
118
122
|
mentionedJidList?: Wid[];
|
|
119
123
|
footer?: string;
|
|
120
124
|
hydratedButtons?: Array<{
|
|
@@ -239,14 +243,21 @@ interface Session {
|
|
|
239
243
|
mediaData?: MediaDataModel;
|
|
240
244
|
forwardedFromWeb?: any;
|
|
241
245
|
linksIndexParsed?: any;
|
|
246
|
+
quotedMsgKey?: MsgKey;
|
|
242
247
|
}
|
|
243
248
|
interface Derived {
|
|
249
|
+
/**
|
|
250
|
+
* @deprecated
|
|
251
|
+
*/
|
|
244
252
|
chat?: ChatModel;
|
|
245
253
|
hasTemplateButtons: boolean;
|
|
246
254
|
ephemeralExpirationTimestamp?: any;
|
|
247
255
|
isEphemeral: boolean;
|
|
248
256
|
isQuickReply: boolean;
|
|
249
257
|
isFutureproof: boolean;
|
|
258
|
+
/**
|
|
259
|
+
* @deprecated
|
|
260
|
+
*/
|
|
250
261
|
isGroupMsg: boolean;
|
|
251
262
|
isStatusV3: boolean;
|
|
252
263
|
isPSA: boolean;
|
|
@@ -348,6 +359,7 @@ export declare class MsgModel extends Model {
|
|
|
348
359
|
applyUpdate(e?: any): any;
|
|
349
360
|
waitForPrep(): any;
|
|
350
361
|
/**
|
|
362
|
+
* @deprecated
|
|
351
363
|
* @whatsapp < 2.2245.8
|
|
352
364
|
*/
|
|
353
365
|
quotedMsgObj?(): any;
|