@open-wa/wa-automate-types-only 4.42.8 → 4.43.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.
@@ -2,7 +2,7 @@
2
2
  import { Page } from 'puppeteer';
3
3
  import { Chat, LiveLocationChangedEvent, ChatState, ChatMuteDuration, GroupChatCreationResponse, EphemeralDuration } from './model/chat';
4
4
  import { Contact, NumberCheck } from './model/contact';
5
- import { Message } from './model/message';
5
+ import { Message, MessageInfo } from './model/message';
6
6
  import { AxiosRequestConfig } from 'axios';
7
7
  import { ParticipantChangedEventModel } from './model/group-metadata';
8
8
  import { ConfigObject, STATE, LicenseType, Webhook, EventPayload } from './model';
@@ -599,13 +599,17 @@ export declare class Client {
599
599
  */
600
600
  sendMessageWithThumb(thumb: string, url: string, title: string, description: string, text: Content, chatId: ChatId): Promise<MessageId | boolean>;
601
601
  /**
602
+ * Note: `address` and `url` are parameters available to insiders only.
603
+ *
602
604
  * Sends a location message to given chat
603
605
  * @param to chat id: `xxxxx@c.us`
604
606
  * @param lat latitude: '51.5074'
605
607
  * @param lng longitude: '0.1278'
606
608
  * @param loc location text: 'LONDON!'
609
+ * @param address address text: '1 Regents Park!'
610
+ * @param url address text link: 'https://example.com'
607
611
  */
608
- sendLocation(to: ChatId, lat: string, lng: string, loc: string): Promise<boolean | MessageId>;
612
+ sendLocation(to: ChatId, lat: string, lng: string, loc: string, address?: string, url?: string): Promise<boolean | MessageId>;
609
613
  /**
610
614
  * Get the generated user agent, this is so you can send it to the decryption module.
611
615
  * @returns String useragent of wa-web session
@@ -1053,6 +1057,13 @@ export declare class Client {
1053
1057
  * @returns message object
1054
1058
  */
1055
1059
  getMessageById(messageId: MessageId): Promise<Message>;
1060
+ /**
1061
+ * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1062
+ *
1063
+ * Get the detailed message info for a group message sent out by the host account.
1064
+ * @param messageId The message Id
1065
+ */
1066
+ getMessageInfo(messageId: MessageId): Promise<MessageInfo>;
1056
1067
  /**
1057
1068
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1058
1069
  *
@@ -1463,8 +1474,6 @@ export declare class Client {
1463
1474
  */
1464
1475
  setGroupEditToAdminsOnly(groupId: GroupChatId, onlyAdmins: boolean): Promise<boolean>;
1465
1476
  /**
1466
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1467
- *
1468
1477
  * Change the group chant description
1469
1478
  * @param groupId '0000000000-00000000@g.us' the group id.
1470
1479
  * @param description string The new group description
@@ -1499,10 +1508,11 @@ export declare class Client {
1499
1508
  */
1500
1509
  darkMode(activate: boolean): Promise<boolean>;
1501
1510
  /**
1502
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1503
1511
  *
1504
1512
  * Automatically reject calls on the host account device. Please note that the device that is calling you will continue to ring.
1505
1513
  *
1514
+ * Update: Due to the nature of MD, the host account will continue ringing.
1515
+ *
1506
1516
  * @param message optional message to send to the calling account when their call is detected and rejected
1507
1517
  */
1508
1518
  autoReject(message?: string): Promise<boolean>;
@@ -141,6 +141,10 @@ export interface Message {
141
141
  * Is the message a "view once" message
142
142
  */
143
143
  isViewOnce: boolean;
144
+ /**
145
+ * Use this to traverse the quote chain.
146
+ */
147
+ quoteMap: QuoteMap;
144
148
  /**
145
149
  * The URL of the file after being uploaded to the cloud using a cloud upload message preprocessor.
146
150
  */
@@ -163,6 +167,40 @@ export interface Message {
163
167
  "buttonText": string;
164
168
  };
165
169
  }
170
+ export interface QuoteMap {
171
+ [messageId: string]: {
172
+ /**
173
+ * The body of the message
174
+ */
175
+ body: string;
176
+ /**
177
+ * The message ID of the message that was quoted. Null if no message was quoted.
178
+ */
179
+ quotes?: MessageId;
180
+ };
181
+ }
182
+ export interface MessageInfoInteraction {
183
+ /**
184
+ * The contact ID of the contact that interacted with the message.
185
+ */
186
+ id: ContactId;
187
+ /**
188
+ * The timestamp of the interaction. You have to x 1000 to use in a JS Date object.
189
+ */
190
+ t: number;
191
+ }
192
+ export interface MessageInfo {
193
+ deliveryRemaining: number;
194
+ playedRemaining: number;
195
+ readRemaining: number;
196
+ delivery: MessageInfoInteraction[];
197
+ read: MessageInfoInteraction[];
198
+ played: MessageInfoInteraction[];
199
+ /**
200
+ * The ID of the message
201
+ */
202
+ id: MessageId;
203
+ }
166
204
  /**
167
205
  * Message types
168
206
  * @readonly
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.42.8",
3
+ "version": "4.43.2",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",