@wppconnect/wa-js 4.3.2-alpha.0 → 4.4.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/dist/call/functions/end.d.ts +3 -12
- package/dist/call/functions/offer.d.ts +1 -3
- package/dist/group/functions/join.d.ts +20 -4
- package/dist/whatsapp/functions/getVoipStackInterface.d.ts +19 -0
- package/dist/whatsapp/functions/index.d.ts +5 -0
- package/dist/whatsapp/functions/joinGroupViaInvite.d.ts +6 -1
- package/dist/whatsapp/functions/sendJoinGroupViaInvite.d.ts +12 -1
- package/dist/whatsapp/functions/startWAWebVoipCall.d.ts +20 -0
- package/dist/whatsapp/functions/useExternalBetaOptIn.d.ts +21 -0
- package/dist/whatsapp/functions/voipBackend.d.ts +19 -0
- package/dist/whatsapp/functions/voipGating.d.ts +22 -0
- package/dist/whatsapp/models/ChatModel.d.ts +0 -2
- package/dist/wppconnect-wa.js +1 -1
- package/dist/wppconnect-wa.js.LICENSE.txt +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
##
|
|
1
|
+
## 4.4.0 (2026-07-15)
|
|
2
2
|
|
|
3
|
-
*
|
|
3
|
+
* fix: restore MsgKey._serialized on WhatsApp Web >= 2.3000.1042401057 (#3484) ([dd00bf71ca807b36bddedb0628b139e5d7d70450](https://github.com/wppconnect-team/wa-js/commit/dd00bf71ca807b36bddedb0628b139e5d7d70450)), closes [#3484](https://github.com/wppconnect-team/wa-js/issues/3484)
|
|
@@ -14,23 +14,14 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
/**
|
|
17
|
-
* End a call
|
|
17
|
+
* End a call using the WhatsApp Web native VoIP stack
|
|
18
18
|
*
|
|
19
19
|
* @example
|
|
20
20
|
* ```javascript
|
|
21
21
|
* // End any call
|
|
22
22
|
* WPP.call.end();
|
|
23
|
-
*
|
|
24
|
-
* // End specific call id
|
|
25
|
-
* WPP.call.end(callId);
|
|
26
|
-
*
|
|
27
|
-
* // End any incoming call
|
|
28
|
-
* WPP.on('call.incoming_call', (call) => {
|
|
29
|
-
* WPP.call.end(call.id);
|
|
30
|
-
* });
|
|
31
23
|
* ```
|
|
32
24
|
*
|
|
33
|
-
* @
|
|
34
|
-
* @return {[type]} [return description]
|
|
25
|
+
* @return {Promise<boolean>}
|
|
35
26
|
*/
|
|
36
|
-
export declare function end(
|
|
27
|
+
export declare function end(): Promise<boolean>;
|
|
@@ -18,9 +18,7 @@ export interface CallOfferOptions {
|
|
|
18
18
|
isVideo?: boolean;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Send a call offer
|
|
22
|
-
*
|
|
23
|
-
* This method only will send a call offer, but there are no audio/video
|
|
21
|
+
* Send a call offer using the WhatsApp Web native VoIP stack
|
|
24
22
|
*
|
|
25
23
|
* @example
|
|
26
24
|
* ```javascript
|
|
@@ -13,16 +13,32 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
+
/**
|
|
17
|
+
* Result returned by {@link join}.
|
|
18
|
+
*
|
|
19
|
+
* `pendingApproval` is `true` when the group has `membershipApprovalMode`
|
|
20
|
+
* enabled and the join request was submitted successfully but still requires
|
|
21
|
+
* an admin to approve it before the bot becomes a member.
|
|
22
|
+
*/
|
|
23
|
+
export interface JoinGroupResult {
|
|
24
|
+
id: string;
|
|
25
|
+
pendingApproval: boolean;
|
|
26
|
+
}
|
|
16
27
|
/**
|
|
17
28
|
* Join in a group from an invite code.
|
|
18
29
|
*
|
|
30
|
+
* When the group requires admin approval (`membershipApprovalMode: true`),
|
|
31
|
+
* the method returns `{ id, pendingApproval: true }` instead of throwing
|
|
32
|
+
* `UnexpectedJoinGroupViaInviteResponse` (issues #2221 / #2746).
|
|
33
|
+
*
|
|
19
34
|
* @example
|
|
20
35
|
* ```javascript
|
|
21
|
-
* await WPP.group.join('abcde....');
|
|
36
|
+
* const result = await WPP.group.join('abcde....');
|
|
37
|
+
* if (result.pendingApproval) {
|
|
38
|
+
* console.log('Request sent — waiting for admin approval');
|
|
39
|
+
* }
|
|
22
40
|
* ```
|
|
23
41
|
*
|
|
24
42
|
* @category Group
|
|
25
43
|
*/
|
|
26
|
-
export declare function join(inviteCode: string): Promise<
|
|
27
|
-
id: string;
|
|
28
|
-
}>;
|
|
44
|
+
export declare function join(inviteCode: string): Promise<JoinGroupResult>;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebVoipStackInterface
|
|
18
|
+
*/
|
|
19
|
+
export declare function getVoipStackInterface(): Promise<any>;
|
|
@@ -91,6 +91,7 @@ export * from './getSearchContext';
|
|
|
91
91
|
export * from './getShouldAppearInList';
|
|
92
92
|
export * from './getStatusList';
|
|
93
93
|
export * from './getTableVotes';
|
|
94
|
+
export * from './getVoipStackInterface';
|
|
94
95
|
export * from './getVotes';
|
|
95
96
|
export * from './getWhatsAppWebExternalBetaJoinedIdb';
|
|
96
97
|
export * from './GROUP_JID';
|
|
@@ -165,6 +166,7 @@ export * from './setPin';
|
|
|
165
166
|
export * from './setPrivacyForOneCategory';
|
|
166
167
|
export * from './setPushname';
|
|
167
168
|
export * from './shouldHaveAccountLid';
|
|
169
|
+
export * from './startWAWebVoipCall';
|
|
168
170
|
export * from './status';
|
|
169
171
|
export * from './STATUS_JID';
|
|
170
172
|
export * from './statusEnable';
|
|
@@ -185,4 +187,7 @@ export * from './uploadMedia';
|
|
|
185
187
|
export * from './uploadProductImage';
|
|
186
188
|
export * from './uploadThumbnail';
|
|
187
189
|
export * from './upsertVotes';
|
|
190
|
+
export * from './useExternalBetaOptIn';
|
|
191
|
+
export * from './voipBackend';
|
|
192
|
+
export * from './voipGating';
|
|
188
193
|
export * from './voteFromDbRow';
|
|
@@ -16,7 +16,12 @@
|
|
|
16
16
|
import { Wid } from '..';
|
|
17
17
|
/**
|
|
18
18
|
* @whatsapp 153438 >= 2.2301.5
|
|
19
|
+
*
|
|
20
|
+
* When `membershipApprovalMode` is `false` (default) the server must respond
|
|
21
|
+
* with a `<group>` node; when `true` it must respond with
|
|
22
|
+
* `<membership_approval_request>`. If the wrong node is returned the function
|
|
23
|
+
* throws `UnexpectedJoinGroupViaInviteResponse` (see WAWebBackendErrors).
|
|
19
24
|
*/
|
|
20
|
-
export declare function joinGroupViaInvite(
|
|
25
|
+
export declare function joinGroupViaInvite(code: string, membershipApprovalMode: boolean): Promise<{
|
|
21
26
|
gid: Wid;
|
|
22
27
|
}>;
|
|
@@ -14,7 +14,18 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import { Wid } from '..';
|
|
17
|
+
/**
|
|
18
|
+
* Result shape returned by {@link sendJoinGroupViaInvite}.
|
|
19
|
+
*
|
|
20
|
+
* `membershipApprovalMode` mirrors the flag queried via
|
|
21
|
+
* `getGroupInfoFromInviteCode` and signals whether the bot's join request is
|
|
22
|
+
* pending admin approval (`true`) or the bot joined immediately (`false`).
|
|
23
|
+
*/
|
|
24
|
+
export interface SendJoinGroupViaInviteResult {
|
|
25
|
+
gid: Wid;
|
|
26
|
+
membershipApprovalMode: boolean;
|
|
27
|
+
}
|
|
17
28
|
/** @whatsapp 69586
|
|
18
29
|
* @whatsapp 769586 >= 2.2222.8
|
|
19
30
|
*/
|
|
20
|
-
export declare function sendJoinGroupViaInvite(code: string): Promise<
|
|
31
|
+
export declare function sendJoinGroupViaInvite(code: string): Promise<SendJoinGroupViaInviteResult>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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 { Wid } from '../misc';
|
|
17
|
+
/**
|
|
18
|
+
* @whatsapp WAWebVoipStartCall
|
|
19
|
+
*/
|
|
20
|
+
export declare function startWAWebVoipCall(peerWid: Wid, isVideo: boolean, lobbyEntryPoint: number, channel: number): Promise<any>;
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp 95547
|
|
18
|
+
* @whatsapp 695547 >= 2.2222.8
|
|
19
|
+
* @whatsapp 925080 >= 2.2228.4
|
|
20
|
+
*/
|
|
21
|
+
export declare function useExternalBetaOptIn(value: any): any;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebVoipBackendLoadable
|
|
18
|
+
*/
|
|
19
|
+
export declare function requireVoipJsBackend(): Promise<any>;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
/**
|
|
17
|
+
* @whatsapp WAWebVoipGatingUtils
|
|
18
|
+
*/
|
|
19
|
+
export declare function isCallingEnabled(): boolean;
|
|
20
|
+
export declare function isUnsupportedBrowserForWebCalling(): boolean;
|
|
21
|
+
export declare function isVoipDownloadEnabled(): boolean;
|
|
22
|
+
export declare function getUnsupportedBrowserReason(): string | null;
|
|
@@ -39,8 +39,6 @@ interface Props extends PropsChatBase {
|
|
|
39
39
|
unreadMentionsOfMe?: any;
|
|
40
40
|
msgUnsyncedButtonReplyMsgs?: any;
|
|
41
41
|
endOfHistoryTransferType?: any;
|
|
42
|
-
/** Contact LID for PnLess protocol (Phone Number-less) */
|
|
43
|
-
accountLid?: Wid;
|
|
44
42
|
}
|
|
45
43
|
interface Session extends SessionChatBase {
|
|
46
44
|
stale?: any;
|