@open-wa/wa-automate-types-only 4.32.11 → 4.32.14

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.
@@ -43,6 +43,7 @@ export declare class Client {
43
43
  private _onLogoutCallbacks;
44
44
  private _queues;
45
45
  private _autoEmojiSet;
46
+ private _autoEmojiQ;
46
47
  private _onLogoutSet;
47
48
  /**
48
49
  * This is used to track if a listener is already used via webhook. Before, webhooks used to be set once per listener. Now a listener can be set via multiple webhooks, or revoked from a specific webhook.
@@ -28,7 +28,7 @@ export declare type AccountNumber = `${number}`;
28
28
  *
29
29
  * `"447123456789-1445627445@g.us"`
30
30
  */
31
- export declare type GroupChatId = `${AccountNumber}-${number}@${GroupChatServer}`;
31
+ export declare type GroupChatId = `${AccountNumber}-${number}@${GroupChatServer}` | `${number}@${GroupChatServer}`;
32
32
  /**
33
33
  * A contact id ends with `@c.us` and only contains the number of the contact. For example, if the country code of a contact is `44` and their number is `7123456789` then the contact id would be `447123456789@c.us`
34
34
  *
@@ -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;
@@ -707,11 +707,11 @@ export interface ConfigObject {
707
707
  */
708
708
  sessionDataBucketAuth?: string;
709
709
  /**
710
- * Set the automatic emoji detection character. Set this to false to disable auto emoji. Default is `:`.
710
+ * Set the automatic emoji detection character. Set this to `false` to disable auto emoji. Default is `:`.
711
711
  *
712
712
  * @default `:`
713
713
  */
714
- autoEmoji?: string;
714
+ autoEmoji?: string | false;
715
715
  /**
716
716
  * Set the maximum amount of chats to be present in a session.
717
717
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.32.11",
3
+ "version": "4.32.14",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",