@open-wa/wa-automate 4.32.11 → 4.32.12

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.
@@ -1,7 +1,7 @@
1
- import { ChatId, GroupChatId } from './aliases';
1
+ import { ContactId, GroupChatId } from './aliases';
2
2
  import { Contact } from './contact';
3
3
  import { GroupMetadata } from './group-metadata';
4
- export interface Chat {
4
+ export interface BaseChat {
5
5
  archive: boolean;
6
6
  changeNumberNewJid: any;
7
7
  changeNumberOldJid: any;
@@ -13,10 +13,6 @@ export interface Chat {
13
13
  * Group metadata for this chat
14
14
  */
15
15
  groupMetadata: GroupMetadata;
16
- /**
17
- * The id of the chat
18
- */
19
- id: ChatId;
20
16
  /**
21
17
  * If the chat is a group chat is restricted
22
18
  */
@@ -29,10 +25,6 @@ export interface Chat {
29
25
  * Whether your host account is able to send messages to this chat
30
26
  */
31
27
  canSend?: boolean;
32
- /**
33
- * Whether the chat is a group chat
34
- */
35
- isGroup: boolean;
36
28
  /**
37
29
  * Whether the chat is a group chat and the group is restricted
38
30
  */
@@ -93,6 +85,27 @@ export interface Chat {
93
85
  */
94
86
  lastSeen?: any;
95
87
  }
88
+ export interface SingleChat extends BaseChat {
89
+ /**
90
+ * The id of the chat
91
+ */
92
+ id: ContactId;
93
+ /**
94
+ * Whether the chat is a group chat
95
+ */
96
+ isGroup: false;
97
+ }
98
+ export interface GroupChat extends BaseChat {
99
+ /**
100
+ * The id of the chat
101
+ */
102
+ id: GroupChatId;
103
+ /**
104
+ * Whether the chat is a group chat
105
+ */
106
+ isGroup: true;
107
+ }
108
+ export declare type Chat = SingleChat | GroupChat;
96
109
  export interface LiveLocationChangedEvent {
97
110
  id: string;
98
111
  lat: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.32.11",
3
+ "version": "4.32.12",
4
4
  "licenseCheckUrl": "https://funcs.openwa.dev/license-check",
5
5
  "brokenMethodReportUrl": "https://funcs.openwa.dev/report-bm",
6
6
  "patches": "https://cdn.openwa.dev/patches.json",