@wppconnect/wa-js 3.14.2 → 3.15.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 CHANGED
@@ -1,4 +1,4 @@
1
- ## 3.14.2 (2024-11-14)
1
+ ## 3.15.1 (2024-11-19)
2
2
 
3
3
 
4
4
 
@@ -69,6 +69,7 @@ export { sendReactionToMessage } from './sendReactionToMessage';
69
69
  export { ScheduledCallMessageOptions, sendScheduledCallMessage, } from './sendScheduledCallMessage';
70
70
  export { sendTextMessage, TextMessageOptions } from './sendTextMessage';
71
71
  export { sendVCardContactMessage, VCardContact, } from './sendVCardContactMessage';
72
+ export { setChatList } from './setChatList';
72
73
  export { setInputText } from './setInputText';
73
74
  export { setNotes } from './setNotes';
74
75
  export { starMessage, StarMessageReturn } from './starMessage';
@@ -0,0 +1,42 @@
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
+ export declare enum FilterChatListTypes {
17
+ ALL = "all",
18
+ CUSTOM = "custom",
19
+ UNREAD = "unread",
20
+ PERSONAL = "personal",
21
+ NON_CONTACT = "non_contact",
22
+ GROUP = "group",
23
+ FAVORITES = "favorites",
24
+ CONTACT = "contact",
25
+ BUSINESS = "business",
26
+ BROADCAST = "broadcast",
27
+ LABELS = "labels",
28
+ ASSIGNED_TO_YOU = "assigned_to_you"
29
+ }
30
+ export declare function setChatList(type: FilterChatListTypes, ids?: string | string[]): Promise<{
31
+ type: FilterChatListTypes;
32
+ list?: string[];
33
+ }>;
34
+ /**
35
+ * Custom Wrap function with the callback
36
+ *
37
+ * This is not the best way to fix the wrapper for this function;
38
+ * I need to improve it soon. However, the idea is to make it work.
39
+ * Due to the lack of time and the urgency in the WhatsApp groups,
40
+ * I'm committing it this way to provide a quick solution.
41
+ */
42
+ export declare function wrapShouldAppearFunction<TFunc extends (...args: any[]) => any>(func: TFunc, callback: (func: TFunc, ...args: Parameters<TFunc>) => ReturnType<TFunc>): TFunc;
@@ -21,3 +21,4 @@ export declare function getShouldAppearInList(chat: ChatModel): boolean;
21
21
  export declare function getPreviewMessage(chat: ChatModel): any[];
22
22
  export declare function getShowChangeNumberNotification(chat: ChatModel): boolean;
23
23
  export declare function getShouldShowUnreadDivider(chat: ChatModel): boolean;
24
+ export declare function getHasUnread(chat: ChatModel): boolean;
@@ -88,6 +88,7 @@ export * from './handleSingleMsg';
88
88
  export * from './initializeAltDeviceLinking';
89
89
  export * from './isAnimatedWebp';
90
90
  export * from './isAuthenticated';
91
+ export * from './isFilterExcludedFromSearchTreatmentInInboxFlow';
91
92
  export * from './isRegistered';
92
93
  export * from './isUnreadTypeMsg';
93
94
  export * from './isWid';
@@ -0,0 +1,16 @@
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
+ export declare function isFilterExcludedFromSearchTreatmentInInboxFlow(type?: string): void;
@@ -166,6 +166,7 @@ export declare class CmdClass extends EventEmitter {
166
166
  showMerchantDetailsEntityTypePopup(e?: any, t?: any): void;
167
167
  showCountrySelector(e?: any, t?: any, r?: any): void;
168
168
  toggleStickerMaker(): void;
169
+ setActiveFilter(type?: 'unread' | 'favorites' | 'personal' | 'assigned_to_you' | 'labels'): Promise<void>;
169
170
  }
170
171
  /** @whatsapp 88102
171
172
  * @whatsapp 81572 >= 2.2218.4
@@ -94,10 +94,18 @@ interface Derived {
94
94
  * @deprecated
95
95
  */
96
96
  isGroup: boolean;
97
+ /**
98
+ * Deprecated in favor of getIsGroup
99
+ * @deprecated
100
+ */
97
101
  isParentGroup: boolean;
98
102
  isBroadcast: boolean;
99
103
  isNewsletter: boolean;
100
104
  canUnread: boolean;
105
+ /**
106
+ * Deprecated in favor of getHasUnread
107
+ * @deprecated
108
+ */
101
109
  hasUnread: boolean;
102
110
  optimisticUnreadCount?: any;
103
111
  /**