@open-wa/wa-automate 4.31.13 → 4.32.0

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.
@@ -1042,6 +1042,24 @@ export declare class Client {
1042
1042
  * @returns message object
1043
1043
  */
1044
1044
  getMyLastMessage(chatId?: ChatId): Promise<Message>;
1045
+ /**
1046
+ * Retrieves the starred messages in a given chat
1047
+ * @param chatId Chat ID to filter starred messages by
1048
+ * @returns message object
1049
+ */
1050
+ getStarredMessages(chatId?: ChatId): Promise<Message[]>;
1051
+ /**
1052
+ * Star a message
1053
+ * @param messageId Message ID of the message you want to star
1054
+ * @returns `true`
1055
+ */
1056
+ starMessage(messageId?: ChatId): Promise<boolean>;
1057
+ /**
1058
+ * Unstar a message
1059
+ * @param messageId Message ID of the message you want to unstar
1060
+ * @returns `true`
1061
+ */
1062
+ unstarMessage(messageId?: ChatId): Promise<boolean>;
1045
1063
  /**
1046
1064
  *
1047
1065
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
@@ -2233,6 +2233,36 @@ class Client {
2233
2233
  return yield this.pup(chatId => WAPI.getMyLastMessage(chatId), chatId);
2234
2234
  });
2235
2235
  }
2236
+ /**
2237
+ * Retrieves the starred messages in a given chat
2238
+ * @param chatId Chat ID to filter starred messages by
2239
+ * @returns message object
2240
+ */
2241
+ getStarredMessages(chatId) {
2242
+ return __awaiter(this, void 0, void 0, function* () {
2243
+ return yield this.pup(chatId => WAPI.getStarredMessages(chatId), chatId);
2244
+ });
2245
+ }
2246
+ /**
2247
+ * Star a message
2248
+ * @param messageId Message ID of the message you want to star
2249
+ * @returns `true`
2250
+ */
2251
+ starMessage(messageId) {
2252
+ return __awaiter(this, void 0, void 0, function* () {
2253
+ return yield this.pup(messageId => WAPI.starMessage(messageId), messageId);
2254
+ });
2255
+ }
2256
+ /**
2257
+ * Unstar a message
2258
+ * @param messageId Message ID of the message you want to unstar
2259
+ * @returns `true`
2260
+ */
2261
+ unstarMessage(messageId) {
2262
+ return __awaiter(this, void 0, void 0, function* () {
2263
+ return yield this.pup(messageId => WAPI.unstarMessage(messageId), messageId);
2264
+ });
2265
+ }
2236
2266
  /**
2237
2267
  *
2238
2268
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate",
3
- "version": "4.31.13",
3
+ "version": "4.32.0",
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",