@wppconnect/wa-js 2.24.0 → 2.24.2

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,5 +1,5 @@
1
- # 2.24.0 (2023-05-03)
1
+ ## 2.24.2 (2023-05-23)
2
2
 
3
- ### Features
3
+ ### Bug Fixes
4
4
 
5
- - Added WPP.conn.isOnline function (close [#1085](https://github.com/wppconnect-team/wa-js/issues/1085)) ([b2d48c1](https://github.com/wppconnect-team/wa-js/commit/b2d48c116d0d03614dc66fbcf857c72e5fb7fc4f))
5
+ - Fixed WPP.group.addParticipants function for WhatsApp >= 2.2320.4 (fix [#1114](https://github.com/wppconnect-team/wa-js/issues/1114)) ([fb7f4c6](https://github.com/wppconnect-team/wa-js/commit/fb7f4c62dc74e8fe11301cbd5a13a8f265773ce8))
@@ -19,4 +19,4 @@ import { ChatModel, MsgKey, Wid } from '../../whatsapp';
19
19
  *
20
20
  * @category Message
21
21
  */
22
- export declare function generateMessageID(chat: string | ChatModel | Wid): MsgKey;
22
+ export declare function generateMessageID(chat: string | ChatModel | Wid): Promise<MsgKey>;
@@ -14,6 +14,13 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { Wid } from '../../whatsapp';
17
+ declare global {
18
+ interface Window {
19
+ Debug: {
20
+ VERSION: string;
21
+ };
22
+ }
23
+ }
17
24
  /**
18
25
  * Add one or more participants to a group
19
26
  *
@@ -0,0 +1,21 @@
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
+ import { Wid } from '../misc';
17
+ /**
18
+ * @whatsapp 469475 >= 2.2307.10
19
+ * @whatsapp 12643 >= 2.2322.15
20
+ */
21
+ export declare function getCurrentLid(wid: Wid): Wid;
@@ -39,6 +39,7 @@ export * from './genMinimalLinkPreview';
39
39
  export * from './getABPropConfigValue';
40
40
  export * from './getAsMms';
41
41
  export * from './getCommunityParticipants';
42
+ export * from './getCurrentLid';
42
43
  export * from './getEphemeralFields';
43
44
  export * from './getFanOutList';
44
45
  export * from './getGroupSenderKeyList';
@@ -16,5 +16,7 @@
16
16
  /** @whatsapp 65212
17
17
  * @whatsapp 15860 >= 2.2204.13
18
18
  * @whatsapp 465212 >= 2.2222.8
19
+ * @returns Promise for @whatsapp >= 2.2321.4
20
+ * @returns string for @whatsapp < 2.2321.4
19
21
  */
20
- export declare function randomMessageId(): string;
22
+ export declare function randomMessageId(): string | Promise<string>;
@@ -17,7 +17,10 @@ import { Wid } from '..';
17
17
  /**
18
18
  * @whatsapp 437722 >= 2.2222.8
19
19
  */
20
- export declare function sendAddParticipants(group: Wid, participants: Wid[]): Promise<{
20
+ export declare function sendAddParticipants(group: Wid, participants: (Wid | {
21
+ phoneNumber: Wid;
22
+ lid?: Wid;
23
+ })[]): Promise<{
21
24
  participants?: ({
22
25
  [key: `${number}@c.us`]: {
23
26
  code: string;
@@ -31,6 +31,7 @@ interface Props {
31
31
  size?: any;
32
32
  support?: any;
33
33
  uniqueShortNameMap?: any;
34
+ isLidAddressingMode: boolean;
34
35
  }
35
36
  interface Session {
36
37
  stale?: any;