@open-wa/wa-automate-types-only 4.43.2 → 4.43.3

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.
@@ -39,6 +39,7 @@ export declare class Client {
39
39
  private _page;
40
40
  private _currentlyBeingKilled;
41
41
  private _refreshing;
42
+ private _loaded;
42
43
  private _prio;
43
44
  private _pageListeners;
44
45
  private _registeredPageListeners;
@@ -244,19 +245,19 @@ export declare class Client {
244
245
  */
245
246
  onLabel(fn: (label: Label) => void): Promise<Listener | boolean>;
246
247
  /**
247
- *[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
248
+ *{@license:insiders@}
248
249
  *
249
250
  * Listens to new orders. Only works on business accounts
250
251
  */
251
252
  onOrder(fn: (order: Order) => void): Promise<Listener | boolean>;
252
253
  /**
253
- *[REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
254
+ *{@license:insiders@}
254
255
  *
255
256
  * Listens to new orders. Only works on business accounts
256
257
  */
257
258
  onNewProduct(fn: (product: Product) => void): Promise<Listener | boolean>;
258
259
  /**
259
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
260
+ * {@license:insiders@}
260
261
  *
261
262
  * Listens to reaction add and change events
262
263
  *
@@ -266,7 +267,7 @@ export declare class Client {
266
267
  */
267
268
  onReaction(fn: (reactionEvent: ReactionEvent) => void): Promise<Listener | boolean>;
268
269
  /**
269
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
270
+ * {@license:insiders@}
270
271
  *
271
272
  * Listens to chat state, including when a specific user is recording and typing within a group chat.
272
273
  *
@@ -309,7 +310,7 @@ export declare class Client {
309
310
  */
310
311
  onAddedToGroup(fn: (chat: Chat) => any): Promise<Listener | boolean>;
311
312
  /**
312
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
313
+ * {@license:insiders@}
313
314
  *
314
315
  * Fires callback with Chat object every time the host phone is removed to a group.
315
316
  *
@@ -319,7 +320,7 @@ export declare class Client {
319
320
  */
320
321
  onRemovedFromGroup(fn: (chat: Chat) => any): Promise<Listener | boolean>;
321
322
  /**
322
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
323
+ * {@license:insiders@}
323
324
  *
324
325
  * Fires callback with the relevant chat id every time the user clicks on a chat. This will only work in headful mode.
325
326
  *
@@ -329,7 +330,7 @@ export declare class Client {
329
330
  */
330
331
  onChatOpened(fn: (chat: Chat) => any): Promise<Listener | boolean>;
331
332
  /**
332
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
333
+ * {@license:insiders@}
333
334
  *
334
335
  * Fires callback with contact id when a new contact is added on the host phone.
335
336
  *
@@ -373,7 +374,7 @@ export declare class Client {
373
374
  */
374
375
  setMyStatus(newStatus: string): Promise<boolean | void>;
375
376
  /**
376
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
377
+ * {@license:insiders@}
377
378
  *
378
379
  * Adds label from chat, message or contact. Only for business accounts.
379
380
  * @param label: The desired text of the new label. id will be something simple like anhy nnumber from 1-10, name is the label of the label if that makes sense.
@@ -486,6 +487,9 @@ export declare class Client {
486
487
  testButtons(chatId: ChatId): Promise<any>;
487
488
  private link;
488
489
  /**
490
+ *
491
+ * {@license:restricted@}
492
+ *
489
493
  * Sends a text message to given chat
490
494
  * If you need to send a message to new numbers please see [these instructions:](https://docs.openwa.dev/pages/The%20Client/licensed-features.html#sending-messages-to-non-contact-numbers)
491
495
  * @param to chat id: `xxxxx@c.us`
@@ -551,8 +555,6 @@ export declare class Client {
551
555
  /**
552
556
  * {@license:insiders@}
553
557
  *
554
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
555
- *
556
558
  * Send a list message. This will not work when being sent from business accounts!
557
559
  *
558
560
  * @param {ChatId} to
@@ -575,7 +577,7 @@ export declare class Client {
575
577
  */
576
578
  sendReplyWithMentions(to: ChatId, content: Content, replyMessageId: MessageId, hideTags?: boolean, mentions?: ContactId[]): Promise<boolean | MessageId>;
577
579
  /**
578
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
580
+ * {@license:insiders@}
579
581
  *
580
582
  * Tags everyone in the group with a message
581
583
  *
@@ -660,7 +662,7 @@ export declare class Client {
660
662
  */
661
663
  reply(to: ChatId, content: Content, quotedMsgId: MessageId, sendSeen?: boolean): Promise<boolean | MessageId>;
662
664
  /**
663
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
665
+ * {@license:insiders@}
664
666
  *
665
667
  * Check if a recipient has read receipts on.
666
668
  *
@@ -692,7 +694,7 @@ export declare class Client {
692
694
  */
693
695
  sendFile(to: ChatId, file: DataURL | FilePath, filename: string, caption: Content, quotedMsgId?: MessageId, waitForId?: boolean, ptt?: boolean, withoutPreview?: boolean, hideTags?: boolean, viewOnce?: boolean): Promise<MessageId | boolean>;
694
696
  /**
695
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
697
+ * {@license:insiders@}
696
698
  *
697
699
  * Checks whether or not the group id provided is known to be unsafe by the contributors of the library.
698
700
  * @param groupChatId The group chat you want to deteremine is unsafe
@@ -812,7 +814,7 @@ export declare class Client {
812
814
  sendContact(to: ChatId, contactId: ContactId | ContactId[]): Promise<MessageId | boolean>;
813
815
  /**
814
816
  *
815
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
817
+ * {@license:insiders@}
816
818
  *
817
819
  * Sends multiple contacts as a single message
818
820
  *
@@ -848,7 +850,7 @@ export declare class Client {
848
850
  pinChat(id: ChatId, pin: boolean): Promise<boolean>;
849
851
  /**
850
852
  *
851
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
853
+ * {@license:insiders@}
852
854
  *
853
855
  * Mutes a conversation for a given duration. If already muted, this will update the muted duration. Mute durations are relative from when the method is called.
854
856
  * @param chatId The id of the conversation you want to mute
@@ -864,7 +866,7 @@ export declare class Client {
864
866
  isChatMuted(chatId: ChatId): Promise<boolean>;
865
867
  /**
866
868
  *
867
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
869
+ * {@license:insiders@}
868
870
  *
869
871
  * Unmutes a conversation.
870
872
  * @param id The id of the conversation you want to mute
@@ -1000,9 +1002,9 @@ export declare class Client {
1000
1002
  */
1001
1003
  contactBlock(id: ContactId): Promise<boolean>;
1002
1004
  /**
1003
- * Report a contact for spam, block them and attempt to clear chat.
1005
+ * {@license:restricted@}
1004
1006
  *
1005
- * [This is a restricted feature and requires a restricted key.](https://gum.co/open-wa?tier=1%20Restricted%20License%20Key)
1007
+ * Report a contact for spam, block them and attempt to clear chat.
1006
1008
  *
1007
1009
  * @param {string} id '000000000000@c.us'
1008
1010
  */
@@ -1058,14 +1060,14 @@ export declare class Client {
1058
1060
  */
1059
1061
  getMessageById(messageId: MessageId): Promise<Message>;
1060
1062
  /**
1061
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1063
+ * {@license:insiders@}
1062
1064
  *
1063
1065
  * Get the detailed message info for a group message sent out by the host account.
1064
1066
  * @param messageId The message Id
1065
1067
  */
1066
1068
  getMessageInfo(messageId: MessageId): Promise<MessageInfo>;
1067
1069
  /**
1068
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1070
+ * {@license:insiders@}
1069
1071
  *
1070
1072
  * Retrieves an order object
1071
1073
  * @param messageId or OrderId
@@ -1073,7 +1075,7 @@ export declare class Client {
1073
1075
  */
1074
1076
  getOrder(id: MessageId | string): Promise<Order>;
1075
1077
  /**
1076
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1078
+ * {@license:insiders@}
1077
1079
  *
1078
1080
  * Add a product to your catalog
1079
1081
  *
@@ -1089,7 +1091,7 @@ export declare class Client {
1089
1091
  */
1090
1092
  createNewProduct(name: string, price: number, currency: string, images: string[], description: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
1091
1093
  /**
1092
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1094
+ * {@license:insiders@}
1093
1095
  *
1094
1096
  * Edit a product in your catalog
1095
1097
  *
@@ -1106,7 +1108,7 @@ export declare class Client {
1106
1108
  */
1107
1109
  editProduct(productId: string, name?: string, price?: number, currency?: string, images?: DataURL[], description?: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
1108
1110
  /**
1109
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1111
+ * {@license:insiders@}
1110
1112
  *
1111
1113
  * Send a product to a chat
1112
1114
  *
@@ -1126,9 +1128,9 @@ export declare class Client {
1126
1128
  /**
1127
1129
  * Retrieves the last message sent by the host account in any given chat or globally.
1128
1130
  * @param chatId This is optional. If no chat Id is set then the last message sent by the host account will be returned.
1129
- * @returns message object
1131
+ * @returns message object or `undefined` if the host account's last message could not be found.
1130
1132
  */
1131
- getMyLastMessage(chatId?: ChatId): Promise<Message>;
1133
+ getMyLastMessage(chatId?: ChatId): Promise<Message | undefined>;
1132
1134
  /**
1133
1135
  * Retrieves the starred messages in a given chat
1134
1136
  * @param chatId Chat ID to filter starred messages by
@@ -1167,7 +1169,7 @@ export declare class Client {
1167
1169
  getStickerDecryptable(messageId: MessageId): Promise<Message | false>;
1168
1170
  /**
1169
1171
  *
1170
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1172
+ * {@license:insiders@}
1171
1173
  *
1172
1174
  * If a file is old enough, it will 404 if you try to decrypt it. This will allow you to force the host account to re upload the file and return a decryptable message.
1173
1175
  *
@@ -1184,7 +1186,7 @@ export declare class Client {
1184
1186
  */
1185
1187
  getChat(contactId: ContactId): Promise<Chat>;
1186
1188
  /**
1187
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1189
+ * {@license:insiders@}
1188
1190
  *
1189
1191
  * Retrieves the groups that you have in common with a contact
1190
1192
  * @param contactId
@@ -1252,7 +1254,7 @@ export declare class Client {
1252
1254
  }>;
1253
1255
  /**
1254
1256
  *
1255
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1257
+ * {@license:insiders@}
1256
1258
  *
1257
1259
  * Use a Baileys payload within your open-wa session
1258
1260
  *
@@ -1481,7 +1483,7 @@ export declare class Client {
1481
1483
  */
1482
1484
  setGroupDescription(groupId: GroupChatId, description: string): Promise<boolean>;
1483
1485
  /**
1484
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1486
+ * {@license:insiders@}
1485
1487
  *
1486
1488
  * Change the group chat title
1487
1489
  * @param groupId '0000000000-00000000@g.us' the group id.
@@ -1495,7 +1497,7 @@ export declare class Client {
1495
1497
  */
1496
1498
  getGroupAdmins(groupId: GroupChatId): Promise<ContactId[]>;
1497
1499
  /**
1498
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1500
+ * {@license:insiders@}
1499
1501
  *
1500
1502
  * Set the wallpaper background colour
1501
1503
  * @param {string} hex '#FFF123'
@@ -1532,7 +1534,7 @@ export declare class Client {
1532
1534
  */
1533
1535
  sendStickerfromUrl(to: ChatId, url: string, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<string | MessageId | boolean>;
1534
1536
  /**
1535
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1537
+ * {@license:insiders@}
1536
1538
  *
1537
1539
  * Sends a sticker from a given URL
1538
1540
  * @param to The recipient id.
@@ -1544,7 +1546,7 @@ export declare class Client {
1544
1546
  */
1545
1547
  sendStickerfromUrlAsReply(to: ChatId, url: string, messageId: MessageId, requestConfig?: AxiosRequestConfig, stickerMetadata?: StickerMetadata): Promise<MessageId | boolean>;
1546
1548
  /**
1547
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1549
+ * {@license:insiders@}
1548
1550
  *
1549
1551
  * This function takes an image and sends it as a sticker to the recipient as a reply to another message.
1550
1552
  *
@@ -1583,7 +1585,7 @@ export declare class Client {
1583
1585
  *
1584
1586
  * @param to ChatId The chat id you want to send the webp sticker to
1585
1587
  * @param file [[DataURL]], [[Base64]], URL (string GET), Relative filepath (string), or Buffer of the mp4 file
1586
- * @param messageId message id of the message you want this sticker to reply to. [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1588
+ * @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
1587
1589
  */
1588
1590
  sendMp4AsSticker(to: ChatId, file: DataURL | Buffer | Base64 | string, processOptions?: Mp4StickerConversionProcessOptions, stickerMetadata?: StickerMetadata, messageId?: MessageId): Promise<MessageId | string | boolean>;
1589
1591
  /**
@@ -1591,7 +1593,7 @@ export declare class Client {
1591
1593
  *
1592
1594
  * @param to ChatId The chat id you want to send the webp sticker to
1593
1595
  * @param emojiId The discord emoji id without indentifying chars. In discord you would write `:who:`, here use `who`
1594
- * @param messageId message id of the message you want this sticker to reply to. [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1596
+ * @param messageId message id of the message you want this sticker to reply to. {@license:insiders@}
1595
1597
  */
1596
1598
  sendEmoji(to: ChatId, emojiId: string, messageId?: MessageId): Promise<MessageId | boolean | string>;
1597
1599
  /**
@@ -1602,7 +1604,7 @@ export declare class Client {
1602
1604
  */
1603
1605
  sendRawWebpAsSticker(to: ChatId, webpBase64: Base64, animated?: boolean): Promise<MessageId | string | boolean>;
1604
1606
  /**
1605
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1607
+ * {@license:insiders@}
1606
1608
  *
1607
1609
  * You can use this to send a raw webp file.
1608
1610
  * @param to ChatId The chat id you want to send the webp sticker to
@@ -1612,7 +1614,7 @@ export declare class Client {
1612
1614
  */
1613
1615
  sendRawWebpAsStickerAsReply(to: ChatId, messageId: MessageId, webpBase64: Base64, animated?: boolean): Promise<MessageId | string | boolean>;
1614
1616
  /**
1615
- * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1617
+ * {@license:insiders@}
1616
1618
  *
1617
1619
  * Turn the ephemeral setting in a chat to on or off
1618
1620
  * @param chatId The ID of the chat
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.43.2",
3
+ "version": "4.43.3",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",