@wppconnect/wa-js 2.3.0 → 2.5.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.
Files changed (32) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/chat/events/eventTypes.d.ts +29 -0
  3. package/dist/chat/events/index.d.ts +1 -0
  4. package/dist/chat/events/registerReactionsEvent.d.ts +16 -0
  5. package/dist/chat/functions/deleteMessage.d.ts +13 -0
  6. package/dist/chat/functions/index.d.ts +2 -0
  7. package/dist/chat/functions/list.d.ts +49 -0
  8. package/dist/chat/functions/sendCreatePollMessage.d.ts +35 -0
  9. package/dist/chat/functions/sendLocationMessage.d.ts +2 -2
  10. package/dist/conn/functions/getMyDeviceId.d.ts +26 -0
  11. package/dist/conn/functions/getMyUserId.d.ts +26 -0
  12. package/dist/conn/functions/index.d.ts +2 -0
  13. package/dist/contact/functions/index.d.ts +1 -0
  14. package/dist/contact/functions/list.d.ts +44 -0
  15. package/dist/whatsapp/collections/AggReactionsCollection.d.ts +22 -0
  16. package/dist/whatsapp/collections/Collection.d.ts +1 -3
  17. package/dist/whatsapp/collections/ReactionsCollection.d.ts +30 -0
  18. package/dist/whatsapp/collections/ReactionsSendersCollection.d.ts +22 -0
  19. package/dist/whatsapp/collections/index.d.ts +3 -0
  20. package/dist/whatsapp/functions/createOrUpdateReactions.d.ts +27 -0
  21. package/dist/whatsapp/functions/index.d.ts +1 -0
  22. package/dist/whatsapp/misc/Cmd.d.ts +6 -2
  23. package/dist/whatsapp/models/AggReactionsModel.d.ts +39 -0
  24. package/dist/whatsapp/models/ContactModel.d.ts +1 -1
  25. package/dist/whatsapp/models/ModelChatBase.d.ts +1 -1
  26. package/dist/whatsapp/models/MsgModel.d.ts +1 -0
  27. package/dist/whatsapp/models/ReactionsModel.d.ts +47 -0
  28. package/dist/whatsapp/models/ReactionsSendersModel.d.ts +47 -0
  29. package/dist/whatsapp/models/index.d.ts +3 -0
  30. package/dist/whatsapp/stores.d.ts +2 -0
  31. package/dist/wppconnect-wa.js +1 -1
  32. package/package.json +9 -9
package/CHANGELOG.md CHANGED
@@ -1,3 +1,30 @@
1
+ # 2.5.0 (2022-06-04)
2
+
3
+
4
+ ### Features
5
+
6
+ * Added option to filter chat and contacts with label (close [#436](https://github.com/wppconnect-team/wa-js/issues/436)) ([bff74df](https://github.com/wppconnect-team/wa-js/commit/bff74df6bc55ce657b97957752e06e0aa5c09d14))
7
+
8
+
9
+
10
+ ## 2.4.1 (2022-05-31)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * Fixed detect mentionedList for invalid wids ([#427](https://github.com/wppconnect-team/wa-js/issues/427)) ([c701dc3](https://github.com/wppconnect-team/wa-js/commit/c701dc3b8b04cce1e51dd5dda12bf5e80e11de2e))
16
+
17
+
18
+
19
+ # 2.4.0 (2022-05-28)
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * Exported related reactions classes ([466ebad](https://github.com/wppconnect-team/wa-js/commit/466ebad34c1545121c681df0196539792b09f7eb))
25
+
26
+
27
+
1
28
  # 2.3.0 (2022-05-27)
2
29
 
3
30
 
@@ -88,6 +88,35 @@ export interface ChatEventTypes {
88
88
  chat: Wid;
89
89
  seq: number;
90
90
  };
91
+ /**
92
+ * Triggered when a new reaction is received
93
+ *
94
+ * @example
95
+ * ```javascript
96
+ * WPP.on('chat.new_reaction', (msg) => {
97
+ * // Your code
98
+ * });
99
+ * ```
100
+ */
101
+ 'chat.new_reaction': {
102
+ /**
103
+ * Reaction ID
104
+ */
105
+ id: MsgKey;
106
+ /**
107
+ * Message ID that received the reaction
108
+ */
109
+ msgId: MsgKey;
110
+ /**
111
+ * The reaction emoji or empty if removed
112
+ */
113
+ reactionText: string;
114
+ read: boolean;
115
+ sender: Wid;
116
+ orphan: number;
117
+ orphanReason: any;
118
+ timestamp: number;
119
+ };
91
120
  /**
92
121
  * On presence change
93
122
  */
@@ -18,3 +18,4 @@ import './registerLiveLocationUpdateEvent';
18
18
  import './registerNewMessageEvent';
19
19
  import './registerPresenceChange';
20
20
  import './registerRevokeMessageEvent';
21
+ import './registerReactionsEvent';
@@ -0,0 +1,16 @@
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 {};
@@ -20,10 +20,23 @@ export interface DeleteMessageReturn {
20
20
  sendMsgResult: Promise<SendMsgResult>;
21
21
  isRevoked: boolean;
22
22
  isDeleted: boolean;
23
+ isSentByMe: boolean;
23
24
  }
24
25
  /**
25
26
  * Delete a message
26
27
  *
28
+ * @example
29
+ * ```javascript
30
+ * // Delete a message
31
+ * WPP.chat.deleteMessage('[number]@callback.us', 'msgid');
32
+ * // Delete a list of messages
33
+ * WPP.chat.deleteMessage('[number]@callback.us', ['msgid1', 'msgid2]);
34
+ * // Delete a message and delete media
35
+ * WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true);
36
+ * // Revoke a message
37
+ * WPP.chat.deleteMessage('[number]@callback.us', 'msgid', true, true);
38
+ * ```
39
+ *
27
40
  * @category Message
28
41
  */
29
42
  export declare function deleteMessage(chatId: string | Wid, id: string, deleteMediaInDevice: boolean, revoke: boolean): Promise<DeleteMessageReturn>;
@@ -24,6 +24,7 @@ export { generateMessageID } from './generateMessageID';
24
24
  export { get } from './get';
25
25
  export { getMessageById } from './getMessageById';
26
26
  export { getMessages, GetMessagesOptions } from './getMessages';
27
+ export { ChatListOptions, list } from './list';
27
28
  export { markIsComposing } from './markIsComposing';
28
29
  export { markIsPaused } from './markIsPaused';
29
30
  export { markIsRead } from './markIsRead';
@@ -37,6 +38,7 @@ export { pin, unpin } from './pin';
37
38
  export { LinkPreviewOptions, prepareLinkPreview } from './prepareLinkPreview';
38
39
  export { MessageButtonsOptions, prepareMessageButtons, } from './prepareMessageButtons';
39
40
  export { prepareRawMessage } from './prepareRawMessage';
41
+ export { PoolMessageOptions, sendCreatePollMessage, } from './sendCreatePollMessage';
40
42
  export { AudioMessageOptions, AutoDetectMessageOptions, DocumentMessageOptions, FileMessageOptions, ImageMessageOptions, sendFileMessage, StickerMessageOptions, VideoMessageOptions, } from './sendFileMessage';
41
43
  export { ListMessageOptions, sendListMessage } from './sendListMessage';
42
44
  export { LocationMessageOptions, sendLocationMessage, } from './sendLocationMessage';
@@ -0,0 +1,49 @@
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 } from '../../whatsapp';
17
+ export interface ChatListOptions {
18
+ onlyGroups?: boolean;
19
+ onlyUsers?: boolean;
20
+ onlyWithUnreadMessage?: boolean;
21
+ withLabels?: string[];
22
+ }
23
+ /**
24
+ * Return a list of chats
25
+ *
26
+ * @example
27
+ * ```javascript
28
+ * // All chats
29
+ * const chats = await WPP.chat.list();
30
+ *
31
+ * // Only users chats
32
+ * const chats = await WPP.chat.list({onlyUsers: true});
33
+ *
34
+ * // Only groups chats
35
+ * const chats = await WPP.chat.list({onlyGroups: true});
36
+ *
37
+ * // Only with label Text
38
+ * const chats = await WPP.chat.list({withLabels: ['Test']});
39
+ *
40
+ * // Only with label id
41
+ * const chats = await WPP.chat.list({withLabels: ['1']});
42
+ *
43
+ * // Only with label with one of text or id
44
+ * const chats = await WPP.chat.list({withLabels: ['Alfa','5']});
45
+ * ```
46
+ *
47
+ * @category Chat
48
+ */
49
+ export declare function list(options?: ChatListOptions): Promise<ChatModel[]>;
@@ -0,0 +1,35 @@
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 { SendMessageOptions, SendMessageReturn } from '..';
17
+ export declare type PoolMessageOptions = SendMessageOptions;
18
+ /**
19
+ * Send a create poll message
20
+ *
21
+ * Note: This only works for groups
22
+ *
23
+ * @example
24
+ * ```javascript
25
+ * // Single pool
26
+ * WPP.chat.sendCreatePollMessage(
27
+ * '[number]@g.us',
28
+ * 'A poll name',
29
+ * ['Option 1', 'Option 2', 'Option 3']
30
+ * );
31
+ * ```
32
+ *
33
+ * @category Message
34
+ */
35
+ export declare function sendCreatePollMessage(chatId: any, name: string, choices: string[], options?: PoolMessageOptions): Promise<SendMessageReturn>;
@@ -19,11 +19,11 @@ export interface LocationMessageOptions extends SendMessageOptions, MessageButto
19
19
  /**
20
20
  * latitude in degrees
21
21
  */
22
- lat: number;
22
+ lat: number | string;
23
23
  /**
24
24
  * longitude in degrees
25
25
  */
26
- lng: number;
26
+ lng: number | string;
27
27
  /**
28
28
  * The full address of place
29
29
  */
@@ -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
+ import { Wid } from '../../whatsapp';
17
+ /**
18
+ * Return the current logged user ID with device id
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const wid = WPP.conn.getMyDeviceId();
23
+ * console.log(wid.toString()); // Output: 123:4@c.us
24
+ * ```
25
+ */
26
+ export declare function getMyDeviceId(): Wid | undefined;
@@ -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
+ import { Wid } from '../../whatsapp';
17
+ /**
18
+ * Return the current logged user ID without device id
19
+ *
20
+ * @example
21
+ * ```javascript
22
+ * const wid = WPP.conn.getMyUserId();
23
+ * console.log(wid.toString()); // Output: 123@c.us
24
+ * ```
25
+ */
26
+ export declare function getMyUserId(): Wid | undefined;
@@ -14,6 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  export { getAuthCode } from './getAuthCode';
17
+ export { getMyDeviceId } from './getMyDeviceId';
18
+ export { getMyUserId } from './getMyUserId';
17
19
  export { isAuthenticated } from './isAuthenticated';
18
20
  export { isIdle } from './isIdle';
19
21
  export { isMainLoaded } from './isMainLoaded';
@@ -15,4 +15,5 @@
15
15
  */
16
16
  export { getProfilePictureUrl } from './getProfilePictureUrl';
17
17
  export { getStatus } from './getStatus';
18
+ export { ContactListOptions, list } from './list';
18
19
  export { queryExists } from './queryExists';
@@ -0,0 +1,44 @@
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 { ContactModel } from '../../whatsapp';
17
+ export interface ContactListOptions {
18
+ onlyMyContacts?: boolean;
19
+ withLabels?: string[];
20
+ }
21
+ /**
22
+ * Return a list of contacts
23
+ *
24
+ * @example
25
+ * ```javascript
26
+ * // All contacts
27
+ * const contats = await WPP.contact.list();
28
+ *
29
+ * // Only my contacts
30
+ * const contacts = await WPP.contact.list({onlyMyContacts: true});
31
+ *
32
+ * // Only with label Text
33
+ * const contacts = await WPP.contact.list({withLabels: ['Test']});
34
+ *
35
+ * // Only with label id
36
+ * const contacts = await WPP.contact.list({withLabels: ['1']});
37
+ *
38
+ * // Only with label with one of text or id
39
+ * const contacts = await WPP.contact.list({withLabels: ['Alfa','5']});
40
+ * ```
41
+ *
42
+ * @category Contact
43
+ */
44
+ export declare function list(options?: ContactListOptions): Promise<ContactModel[]>;
@@ -0,0 +1,22 @@
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 { AggReactionsModel } from '../models';
17
+ import { Collection } from './Collection';
18
+ /** @whatsapp 81130 */
19
+ export declare class AggReactionsCollection extends Collection<AggReactionsModel> {
20
+ static model: AggReactionsModel;
21
+ static comparator(): number;
22
+ }
@@ -32,6 +32,7 @@ export declare class Collection<M, A = M | M[]> extends EventEmitter {
32
32
  constructor(e?: any, t?: {
33
33
  parent: any;
34
34
  });
35
+ get length(): number;
35
36
  add(value: A | WritableProperties<A>, options?: Option): A;
36
37
  set(value: A, options?: Option): A;
37
38
  remove(value: A, options?: {
@@ -47,9 +48,6 @@ export declare class Collection<M, A = M | M[]> extends EventEmitter {
47
48
  get(e: Stringable): M | undefined;
48
49
  assertGet(e: Stringable): M;
49
50
  at(position: number): M | undefined;
50
- get length(): number;
51
- get isCollection(): boolean;
52
- get models(): M[];
53
51
  serialize(): any[];
54
52
  toJSON(): any[];
55
53
  isModel(model: any): model is M;
@@ -0,0 +1,30 @@
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 { ReactionsModel } from '../models';
17
+ import { BaseCollection } from './BaseCollection';
18
+ /** @whatsapp 57162 */
19
+ export declare class ReactionsCollection extends BaseCollection<ReactionsModel> {
20
+ static model: ReactionsModel;
21
+ static comparator(): any;
22
+ addOrUpdateReaction(e?: any): any;
23
+ removeReaction(e?: any): void;
24
+ getAggregateEmojiAndSender(e?: any, t?: any): any;
25
+ markReactionsAsRead(e?: any): void;
26
+ getExistingSenderModelFromReactionDetails(e?: any): any;
27
+ updateFailedPropsForExistingSentReaction(e?: any): void;
28
+ shouldUpdateAck(e?: any): any;
29
+ deleteReactionsByParentMessageKey(e?: any): void;
30
+ }
@@ -0,0 +1,22 @@
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 { ReactionsModel, ReactionsSendersModel } from '../models';
17
+ import { Collection } from './Collection';
18
+ /** @whatsapp 81130 */
19
+ export declare class ReactionsSendersCollection extends Collection<ReactionsModel> {
20
+ static model: ReactionsSendersModel;
21
+ static comparator(): number;
22
+ }
@@ -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 * from './AggReactionsCollection';
16
17
  export * from './BaseCollection';
17
18
  export * from './BlocklistCollection';
18
19
  export * from './BusinessCategoriesResultCollection';
@@ -46,6 +47,8 @@ export * from './ProductImageCollection';
46
47
  export * from './ProductMessageListCollection';
47
48
  export * from './ProfilePicThumbCollection';
48
49
  export * from './QuickReplyCollection';
50
+ export * from './ReactionsCollection';
51
+ export * from './ReactionsSendersCollection';
49
52
  export * from './RecentEmojiCollection';
50
53
  export * from './RecentStickerCollection';
51
54
  export * from './StarredMsgCollection';
@@ -0,0 +1,27 @@
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 ReactionData {
17
+ msgKey: string;
18
+ orphan: number;
19
+ orphanReason: any;
20
+ parentMsgKey: string;
21
+ reactionText: string;
22
+ read: boolean;
23
+ senderUserJid: string;
24
+ timestamp: number;
25
+ }
26
+ /** @whatsapp 7394 */
27
+ export declare function createOrUpdateReactions(data: ReactionData[]): Promise<any>;
@@ -16,6 +16,7 @@
16
16
  export * from './addAndSendMsgToChat';
17
17
  export * from './blockContact';
18
18
  export * from './createMsgProtobuf';
19
+ export * from './createOrUpdateReactions';
19
20
  export * from './encryptAndSendGroupMsg';
20
21
  export * from './encryptAndSendMsg';
21
22
  export * from './fetchLinkPreview';
@@ -14,6 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { ChatModel } from '..';
17
+ import { MsgModel } from '../models';
17
18
  import { EventEmitter } from '.';
18
19
  /** @whatsapp 88102
19
20
  * @whatsapp 81572 >= 2.2218.4
@@ -49,8 +50,11 @@ export declare class CmdClass extends EventEmitter {
49
50
  ephemeralDrawer(e?: any, t?: any): void;
50
51
  sendStarMsgs(e?: any, t?: any, r?: any, n?: any): void;
51
52
  sendUnstarMsgs(e?: any, t?: any, r?: any, n?: any): void;
52
- sendDeleteMsgs(e?: any, t?: any, r?: any, n?: any, i?: any): void;
53
- sendRevokeMsgs(e?: any, t?: any, r?: any, n?: any, i?: any): void;
53
+ sendDeleteMsgs(chat: ChatModel, msgs: MsgModel[], clearMedia?: boolean, toastPosition?: any): void;
54
+ sendRevokeMsgs(chat: ChatModel, msgs: MsgModel[], options?: {
55
+ clearMedia?: boolean;
56
+ toastPosition?: any;
57
+ }): void;
54
58
  _openChat(e?: any, t?: any): void;
55
59
  openChatAt(chat: ChatModel, context: ReturnType<ChatModel['getSearchContext']>): Promise<boolean>;
56
60
  openChatFromUnread(chat: ChatModel): Promise<boolean>;
@@ -0,0 +1,39 @@
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 { ReactionsSendersCollection } from '../collections';
17
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
18
+ interface Props {
19
+ id?: any;
20
+ aggregateEmoji?: any;
21
+ hasReactionByMe: boolean;
22
+ }
23
+ interface Session {
24
+ }
25
+ interface Derived {
26
+ }
27
+ /**
28
+ * @whatsapp 81130
29
+ */
30
+ export declare interface AggReactionsModel extends ModelProxy<Props, Session, Derived> {
31
+ }
32
+ /**
33
+ * @whatsapp 81130
34
+ */
35
+ export declare class AggReactionsModel extends Model {
36
+ constructor(proterties?: ModelPropertiesContructor<AggReactionsModel>, options?: ModelOptions);
37
+ senders: ReactionsSendersCollection;
38
+ }
39
+ export {};
@@ -29,7 +29,7 @@ interface Props {
29
29
  privacyMode?: any;
30
30
  statusMute?: any;
31
31
  sectionHeader?: any;
32
- labels?: any;
32
+ labels?: string[];
33
33
  disappearingModeDuration?: any;
34
34
  disappearingModeSettingTimestamp?: any;
35
35
  }
@@ -20,7 +20,7 @@ import { MsgModel } from './MsgModel';
20
20
  export interface PropsChatBase {
21
21
  id: Wid;
22
22
  pendingMsgs: boolean;
23
- labels: any | undefined;
23
+ labels?: string[];
24
24
  }
25
25
  export interface SessionChatBase {
26
26
  msgChunks: MsgLoad[];
@@ -292,6 +292,7 @@ interface Derived {
292
292
  };
293
293
  isGroupsV4InviteExpired: boolean;
294
294
  isPersistent: boolean;
295
+ isRevokedByMe: boolean;
295
296
  isUnreadType: boolean;
296
297
  isUserCreatedType: boolean;
297
298
  supportsMessageFooter?: any;
@@ -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
+ import { AggReactionsCollection, ReactionsCollection } from '../collections';
17
+ import { MsgKey, Wid } from '../misc';
18
+ import { Model, ModelOptions, ModelPropertiesContructor, ModelProxy } from './Model';
19
+ import { ReactionsSendersModel } from './ReactionsSendersModel';
20
+ interface Props {
21
+ id: Wid;
22
+ reactionByMe?: ReactionsSendersModel;
23
+ }
24
+ interface Session {
25
+ }
26
+ interface Derived {
27
+ }
28
+ /** @whatsapp 80666
29
+ * @whatsapp 81130 >= 2.2220.8
30
+ */
31
+ export declare interface ReactionsModel extends ModelProxy<Props, Session, Derived> {
32
+ }
33
+ /** @whatsapp 80666
34
+ * @whatsapp 81130 >= 2.2220.8
35
+ */
36
+ export declare class ReactionsModel extends Model {
37
+ constructor(proterties?: ModelPropertiesContructor<ReactionsModel>, options?: ModelOptions);
38
+ reactions: AggReactionsCollection;
39
+ unreadSenders(): {
40
+ msgKey: string;
41
+ parentMsgKey: MsgKey;
42
+ reactionText: string;
43
+ senderUserJid: string;
44
+ }[];
45
+ getCollection(): ReactionsCollection;
46
+ }
47
+ export {};