@wppconnect/wa-js 2.24.6 → 2.24.8

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,4 @@
1
- ## 2.24.6 (2023-07-07)
1
+ ## 2.24.8 (2023-08-16)
2
+
2
3
 
3
- ### Bug Fixes
4
4
 
5
- - Fixed chat.new_message event for status reply (fix [#1211](https://github.com/wppconnect-team/wa-js/issues/1211)) ([a898151](https://github.com/wppconnect-team/wa-js/commit/a8981518b353b0dda7addefdaae77f8dcf267188))
@@ -18,6 +18,7 @@ export interface ChatListOptions {
18
18
  id?: Wid;
19
19
  count?: number;
20
20
  direction?: 'after' | 'before';
21
+ onlyCommunities?: boolean;
21
22
  onlyGroups?: boolean;
22
23
  onlyUsers?: boolean;
23
24
  onlyWithUnreadMessage?: boolean;
@@ -43,6 +44,9 @@ export interface ChatListOptions {
43
44
  * // Only groups chats
44
45
  * const chats = await WPP.chat.list({onlyGroups: true});
45
46
  *
47
+ * // Only communities chats
48
+ * const chats = await WPP.chat.list({onlyCommunities: true});
49
+ *
46
50
  * // Only with label Text
47
51
  * const chats = await WPP.chat.list({withLabels: ['Test']});
48
52
  *
@@ -39,11 +39,14 @@ import { Wid } from '../../whatsapp';
39
39
  * // How to send a custom invite link
40
40
  * const link = 'https://chat.whatsapp.com/' + result['number@c.us'].invite_code;
41
41
  * console.log(link);
42
+ *
43
+ * // Create a Subgroup for a community
44
+ * const result = await WPP.group.create('Test Group', ['number@c.us'], 'communit@g.us');
42
45
  * ```
43
46
  *
44
47
  * @category Group
45
48
  */
46
- export declare function create(groupName: string, participantsIds: (string | Wid) | (string | Wid)[]): Promise<{
49
+ export declare function create(groupName: string, participantsIds: (string | Wid) | (string | Wid)[], parentGroup: string | Wid): Promise<{
47
50
  gid: Wid;
48
51
  participants: {
49
52
  [key: `${number}@c.us`]: {
@@ -21,7 +21,7 @@ export declare let isInjected: boolean;
21
21
  * Is setted true when the all webpack modules are fully loaded
22
22
  */
23
23
  export declare let isReady: boolean;
24
- export declare function onInjected(listener: () => void): void;
24
+ export declare function onInjected(listener: () => void, delay?: number): void;
25
25
  export declare function onReady(listener: () => void): void;
26
26
  export type SearchModuleCondition = (module: any, moduleId: string) => boolean;
27
27
  export declare let webpackRequire: (<T = any>(moduleId: string) => T) & {
@@ -17,7 +17,7 @@ import { Wid } from '..';
17
17
  /**
18
18
  * @whatsapp 247355
19
19
  */
20
- export declare function createGroup(groupName: string, participants: Wid[], ephemeral?: number, dogfooding?: boolean): Promise<{
20
+ export declare function createGroup(groupName: string, participants: Wid[], ephemeral?: number, parentGroup?: Wid): Promise<{
21
21
  wid: Wid;
22
22
  participants: {
23
23
  wid: Wid;
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { Wid } from '..';
17
17
  /** @whatsapp 79583 */
18
- export declare function sendCreateGroup(groupName: string, participants: Wid[], ephemeral?: number, dogfooding?: boolean): Promise<{
18
+ export declare function sendCreateGroup(groupName: string, participants: Wid[], ephemeral?: number, parentGroup?: Wid): Promise<{
19
19
  gid: Wid;
20
20
  participants: ({
21
21
  [key: `${number}@c.us`]: {
@@ -20,6 +20,8 @@ interface Props {
20
20
  id: Wid;
21
21
  creation?: any;
22
22
  owner?: any;
23
+ subject?: string;
24
+ subjectTime?: any;
23
25
  desc?: string;
24
26
  descId?: string;
25
27
  descTime?: any;
@@ -28,21 +30,49 @@ interface Props {
28
30
  announce?: any;
29
31
  noFrequentlyForwarded?: any;
30
32
  ephemeralDuration?: any;
33
+ membershipApprovalMode?: any;
34
+ growthLockExpiration?: any;
35
+ growthLockType?: any;
36
+ reportToAdminMode?: any;
31
37
  size?: any;
38
+ numSubgroups?: any;
32
39
  support?: any;
40
+ suspended?: any;
41
+ terminated?: any;
33
42
  uniqueShortNameMap?: any;
34
43
  isLidAddressingMode: boolean;
44
+ isParentGroup: boolean;
45
+ isParentGroupClosed: boolean;
46
+ parentGroup?: any;
47
+ defaultSubgroup?: any;
48
+ unjoinedSubgroups?: any;
49
+ joinedSubgroups?: any;
50
+ allowNonAdminSubGroupCreation?: any;
51
+ lastActivityTimestamp?: any;
52
+ lastSeenActivityTimestamp?: any;
53
+ lastReportToAdminTimestamp?: any;
54
+ incognito?: any;
35
55
  }
36
56
  interface Session {
37
57
  stale?: any;
58
+ deviceStale?: any;
38
59
  trusted?: any;
39
60
  inviteCode?: any;
40
61
  groupInviteCodePromise?: any;
41
62
  revokeGroupInvitePromise?: any;
42
- revokeGroupV4AddInvitePromise?: any;
63
+ participantQueryPromise?: any;
64
+ deviceQueryPromise?: any;
65
+ unjoinedSubgroupsQueryPromise?: any;
66
+ displayedDesc?: any;
67
+ revokeGroupsV4AddInvitePromise?: any;
68
+ cachedDeviceCount?: any;
69
+ cachedDeviceSizeBucket?: any;
43
70
  }
44
71
  interface Derived {
45
72
  groupInviteLink?: any;
73
+ groupType?: string;
74
+ isIncognitoCag?: boolean;
75
+ isUnnamed?: boolean;
46
76
  }
47
77
  /** @whatsapp 14423
48
78
  * @whatsapp 614423 >= 2.2222.8