@wppconnect/wa-js 4.1.3-alpha.0 → 4.3.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 +2 -2
- package/CLAUDE.md +124 -0
- package/README.md +246 -0
- package/dist/index.d.ts +1 -0
- package/dist/lists/functions/addChats.d.ts +27 -0
- package/dist/lists/functions/create.d.ts +29 -0
- package/dist/lists/functions/index.d.ts +21 -0
- package/dist/lists/functions/list.d.ts +34 -0
- package/dist/{whatsapp/functions/getErrorCodeFromLogoutReason.d.ts → lists/functions/remove.d.ts} +10 -4
- package/dist/lists/functions/removeChats.d.ts +27 -0
- package/dist/lists/functions/rename.d.ts +26 -0
- package/dist/lists/index.d.ts +16 -0
- package/dist/whatsapp/collections/ButtonCollection.d.ts +3 -1
- package/dist/whatsapp/enums/LogoutReason.d.ts +16 -2
- package/dist/whatsapp/functions/callGetSearchContext.d.ts +19 -0
- package/dist/whatsapp/functions/getSearchContext.d.ts +11 -0
- package/dist/whatsapp/functions/index.d.ts +1 -1
- package/dist/whatsapp/functions/logoutReason.d.ts +24 -0
- package/dist/whatsapp/functions/subscribePresence.d.ts +14 -0
- package/dist/whatsapp/models/CallModel.d.ts +4 -2
- package/dist/whatsapp/models/LabelModel.d.ts +2 -0
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +3 -3
- package/package.json +22 -21
- package/tests/smoke.spec.ts +171 -0
|
@@ -26,3 +26,14 @@ export declare function getSearchContext(chat: ChatModel | string, msg: MsgModel
|
|
|
26
26
|
key?: MsgKey;
|
|
27
27
|
highlightMsg: true;
|
|
28
28
|
};
|
|
29
|
+
export declare function getSearchContext(params: {
|
|
30
|
+
chat: ChatModel | string;
|
|
31
|
+
msgKey: MsgModel | MsgKey | string;
|
|
32
|
+
rootMsg?: MsgModel;
|
|
33
|
+
threadId?: string;
|
|
34
|
+
}): {
|
|
35
|
+
collection: MsgLoad;
|
|
36
|
+
msg?: MsgModel;
|
|
37
|
+
key?: MsgKey;
|
|
38
|
+
highlightMsg: true;
|
|
39
|
+
};
|
|
@@ -70,7 +70,6 @@ export * from './getCountryShortcodeByPhone';
|
|
|
70
70
|
export * from './getCurrentLid';
|
|
71
71
|
export * from './getEnforceCurrentLid';
|
|
72
72
|
export * from './getEphemeralFields';
|
|
73
|
-
export * from './getErrorCodeFromLogoutReason';
|
|
74
73
|
export * from './getExisting';
|
|
75
74
|
export * from './getFanOutList';
|
|
76
75
|
export * from './getGroupSenderKeyList';
|
|
@@ -109,6 +108,7 @@ export * from './isWid';
|
|
|
109
108
|
export * from './joinGroupViaInvite';
|
|
110
109
|
export * from './keepMessage';
|
|
111
110
|
export * from './labelAddAction';
|
|
111
|
+
export * from './logoutReason';
|
|
112
112
|
export * from './markSeen';
|
|
113
113
|
export * from './mediaTypeFromProtobuf';
|
|
114
114
|
export * from './membershipApprovalRequestAction';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Copyright 2026 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 { LOGOUT_REASON_CODE, LogoutReason } from '../enums';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebLogoutReason >= 2.3000.x
|
|
19
|
+
*/
|
|
20
|
+
export declare function getErrorCodeFromLogoutReason(type: LogoutReason): LOGOUT_REASON_CODE | null;
|
|
21
|
+
export declare function setPrevLogoutReasonCode(code: LOGOUT_REASON_CODE | null): void;
|
|
22
|
+
export declare function setPrevCustomLogoutMessage(message: string | null): void;
|
|
23
|
+
export declare function getPrevLogoutReasonCode(): LOGOUT_REASON_CODE | null;
|
|
24
|
+
export declare function getPrevCustomLogoutMessage(): string | null;
|
|
@@ -18,3 +18,17 @@ import { Wid } from '..';
|
|
|
18
18
|
* @whatsapp WAWebContactPresenceBridge
|
|
19
19
|
*/
|
|
20
20
|
export declare function subscribePresence(id: Wid, tcToken?: any): Promise<any>;
|
|
21
|
+
/**
|
|
22
|
+
* Subscribe user presence (individual contact).
|
|
23
|
+
* Replaces subscribePresence in WAWebContactPresenceBridge >= ~2.3000.1039447205
|
|
24
|
+
*
|
|
25
|
+
* @whatsapp WAWebContactPresenceBridge >= 2.3000.1039447205
|
|
26
|
+
*/
|
|
27
|
+
export declare function subscribeUserPresence(id: Wid): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* Subscribe group presence.
|
|
30
|
+
* Added in WAWebContactPresenceBridge >= ~2.3000.1039447205
|
|
31
|
+
*
|
|
32
|
+
* @whatsapp WAWebContactPresenceBridge >= 2.3000.1039447205
|
|
33
|
+
*/
|
|
34
|
+
export declare function subscribeGroupPresence(id: Wid): void;
|
|
@@ -34,13 +34,15 @@ interface Session {
|
|
|
34
34
|
}
|
|
35
35
|
interface Derived {
|
|
36
36
|
}
|
|
37
|
-
/** @whatsapp
|
|
37
|
+
/** @whatsapp WAWebCallModel >= 2.3000.0
|
|
38
|
+
* @whatsapp 36473
|
|
38
39
|
* @whatsapp 40122 >= 2.2204.13
|
|
39
40
|
* @whatsapp 736473 >= 2.2222.8
|
|
40
41
|
*/
|
|
41
42
|
export declare interface CallModel extends ModelProxy<Props, Session, Derived> {
|
|
42
43
|
}
|
|
43
|
-
/** @whatsapp
|
|
44
|
+
/** @whatsapp WAWebCallModel >= 2.3000.0
|
|
45
|
+
* @whatsapp 36473
|
|
44
46
|
* @whatsapp 40122 >= 2.2204.13
|
|
45
47
|
* @whatsapp 736473 >= 2.2222.8
|
|
46
48
|
*/
|