@wppconnect/wa-js 3.14.2 → 3.15.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 +1 -1
- package/dist/chat/functions/index.d.ts +1 -0
- package/dist/chat/functions/setChatList.d.ts +42 -0
- package/dist/whatsapp/functions/getShouldAppearInList.d.ts +1 -0
- package/dist/whatsapp/functions/index.d.ts +1 -0
- package/dist/whatsapp/functions/isFilterExcludedFromSearchTreatmentInInboxFlow.d.ts +16 -0
- package/dist/whatsapp/misc/Cmd.d.ts +1 -0
- package/dist/whatsapp/models/ChatModel.d.ts +4 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -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
|