@wppconnect/wa-js 3.14.1 → 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/findOrCreateLatestChat.d.ts +20 -0
- package/dist/whatsapp/functions/getShouldAppearInList.d.ts +24 -0
- package/dist/whatsapp/functions/index.d.ts +3 -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 +28 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +7 -7
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;
|
|
@@ -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 { Wid } from '../misc';
|
|
17
|
+
import { ChatModel } from '../models';
|
|
18
|
+
/** @whatsapp WAWebFindChatAction
|
|
19
|
+
*/
|
|
20
|
+
export declare function findOrCreateLatestChat(wid: Wid, type?: 'username_contactless_search'): Promise<ChatModel>;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
import { ChatModel } from '../models';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebGetters
|
|
19
|
+
*/
|
|
20
|
+
export declare function getShouldAppearInList(chat: ChatModel): boolean;
|
|
21
|
+
export declare function getPreviewMessage(chat: ChatModel): any[];
|
|
22
|
+
export declare function getShowChangeNumberNotification(chat: ChatModel): boolean;
|
|
23
|
+
export declare function getShouldShowUnreadDivider(chat: ChatModel): boolean;
|
|
24
|
+
export declare function getHasUnread(chat: ChatModel): boolean;
|
|
@@ -47,6 +47,7 @@ export * from './fetchLinkPreview';
|
|
|
47
47
|
export * from './findChat';
|
|
48
48
|
export * from './findCommonGroups';
|
|
49
49
|
export * from './findFirstWebLink';
|
|
50
|
+
export * from './findOrCreateLatestChat';
|
|
50
51
|
export * from './forwardMessagesToChats';
|
|
51
52
|
export * from './frontendFireAndForget';
|
|
52
53
|
export * from './genBotMsgSecretFromMsgSecret';
|
|
@@ -75,6 +76,7 @@ export * from './getPushname';
|
|
|
75
76
|
export * from './getQuotedMsgObj';
|
|
76
77
|
export * from './getReactions';
|
|
77
78
|
export * from './getSearchContext';
|
|
79
|
+
export * from './getShouldAppearInList';
|
|
78
80
|
export * from './getStatusList';
|
|
79
81
|
export * from './getTableVotes';
|
|
80
82
|
export * from './getVotes';
|
|
@@ -86,6 +88,7 @@ export * from './handleSingleMsg';
|
|
|
86
88
|
export * from './initializeAltDeviceLinking';
|
|
87
89
|
export * from './isAnimatedWebp';
|
|
88
90
|
export * from './isAuthenticated';
|
|
91
|
+
export * from './isFilterExcludedFromSearchTreatmentInInboxFlow';
|
|
89
92
|
export * from './isRegistered';
|
|
90
93
|
export * from './isUnreadTypeMsg';
|
|
91
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
|
|
@@ -84,17 +84,45 @@ interface Session extends SessionChatBase {
|
|
|
84
84
|
interface Derived {
|
|
85
85
|
kind?: any;
|
|
86
86
|
isUser: boolean;
|
|
87
|
+
/**
|
|
88
|
+
* Deprecated in favor of getIsUser
|
|
89
|
+
* @deprecated
|
|
90
|
+
*/
|
|
87
91
|
isPSA: boolean;
|
|
92
|
+
/**
|
|
93
|
+
* Deprecated in favor of getIsPSA
|
|
94
|
+
* @deprecated
|
|
95
|
+
*/
|
|
88
96
|
isGroup: boolean;
|
|
89
97
|
isParentGroup: boolean;
|
|
90
98
|
isBroadcast: boolean;
|
|
91
99
|
isNewsletter: boolean;
|
|
92
100
|
canUnread: boolean;
|
|
101
|
+
/**
|
|
102
|
+
* Deprecated in favor of getHasUnread
|
|
103
|
+
* @deprecated
|
|
104
|
+
*/
|
|
93
105
|
hasUnread: boolean;
|
|
94
106
|
optimisticUnreadCount?: any;
|
|
107
|
+
/**
|
|
108
|
+
* Deprecated in favor of getShouldShowUnreadDivider
|
|
109
|
+
* @deprecated
|
|
110
|
+
*/
|
|
95
111
|
shouldShowUnreadDivider?: any;
|
|
112
|
+
/**
|
|
113
|
+
* Deprecated in favor of getShouldAppearInList
|
|
114
|
+
* @deprecated
|
|
115
|
+
*/
|
|
96
116
|
shouldAppearInList?: any;
|
|
117
|
+
/**
|
|
118
|
+
* Deprecated in favor of getPreviewMessage
|
|
119
|
+
* @deprecated
|
|
120
|
+
*/
|
|
97
121
|
previewMessage?: any;
|
|
122
|
+
/**
|
|
123
|
+
* Deprecated in favor of getShowChangeNumberNotification
|
|
124
|
+
* @deprecated
|
|
125
|
+
*/
|
|
98
126
|
showChangeNumberNotification?: any;
|
|
99
127
|
shouldShowUnreadInTitle?: any;
|
|
100
128
|
}
|