@open-wa/wa-automate 4.31.13 → 4.32.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.
- package/dist/api/Client.d.ts +23 -1
- package/dist/api/Client.js +40 -2
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -689,9 +689,13 @@ export declare class Client {
|
|
689
689
|
*/
|
690
690
|
getSnapshot(): Promise<DataURL>;
|
691
691
|
/**
|
692
|
-
* Returns an array of group ids where the host
|
692
|
+
* Returns an array of group ids where the host account is admin
|
693
693
|
*/
|
694
694
|
iAmAdmin(): Promise<GroupChatId[]>;
|
695
|
+
/**
|
696
|
+
* Returns an array of group ids where the host account has been kicked
|
697
|
+
*/
|
698
|
+
getKickedGroups(): Promise<GroupChatId[]>;
|
695
699
|
/**
|
696
700
|
* Syncs contacts with phone. This promise does not resolve so it will instantly return true.
|
697
701
|
*/
|
@@ -1042,6 +1046,24 @@ export declare class Client {
|
|
1042
1046
|
* @returns message object
|
1043
1047
|
*/
|
1044
1048
|
getMyLastMessage(chatId?: ChatId): Promise<Message>;
|
1049
|
+
/**
|
1050
|
+
* Retrieves the starred messages in a given chat
|
1051
|
+
* @param chatId Chat ID to filter starred messages by
|
1052
|
+
* @returns message object
|
1053
|
+
*/
|
1054
|
+
getStarredMessages(chatId?: ChatId): Promise<Message[]>;
|
1055
|
+
/**
|
1056
|
+
* Star a message
|
1057
|
+
* @param messageId Message ID of the message you want to star
|
1058
|
+
* @returns `true`
|
1059
|
+
*/
|
1060
|
+
starMessage(messageId?: ChatId): Promise<boolean>;
|
1061
|
+
/**
|
1062
|
+
* Unstar a message
|
1063
|
+
* @param messageId Message ID of the message you want to unstar
|
1064
|
+
* @returns `true`
|
1065
|
+
*/
|
1066
|
+
unstarMessage(messageId?: ChatId): Promise<boolean>;
|
1045
1067
|
/**
|
1046
1068
|
*
|
1047
1069
|
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
package/dist/api/Client.js
CHANGED
@@ -1148,7 +1148,7 @@ class Client {
|
|
1148
1148
|
*/
|
1149
1149
|
isPhoneDisconnected() {
|
1150
1150
|
return __awaiter(this, void 0, void 0, function* () {
|
1151
|
-
const phoneNotConnected = yield this._page.evaluate(() => WAPI.getLocaledString('
|
1151
|
+
const phoneNotConnected = yield this._page.evaluate(() => WAPI.getLocaledString('active Internet connection'));
|
1152
1152
|
return yield this.pup(`!![...document.querySelectorAll("div")].find(e=>{return e.innerHTML.toLowerCase().includes("${phoneNotConnected.toLowerCase()}")})`);
|
1153
1153
|
});
|
1154
1154
|
}
|
@@ -1665,13 +1665,21 @@ class Client {
|
|
1665
1665
|
});
|
1666
1666
|
}
|
1667
1667
|
/**
|
1668
|
-
* Returns an array of group ids where the host
|
1668
|
+
* Returns an array of group ids where the host account is admin
|
1669
1669
|
*/
|
1670
1670
|
iAmAdmin() {
|
1671
1671
|
return __awaiter(this, void 0, void 0, function* () {
|
1672
1672
|
return yield this.pup(() => WAPI.iAmAdmin());
|
1673
1673
|
});
|
1674
1674
|
}
|
1675
|
+
/**
|
1676
|
+
* Returns an array of group ids where the host account has been kicked
|
1677
|
+
*/
|
1678
|
+
getKickedGroups() {
|
1679
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1680
|
+
return yield this.pup(() => WAPI.getKickedGroups());
|
1681
|
+
});
|
1682
|
+
}
|
1675
1683
|
/**
|
1676
1684
|
* Syncs contacts with phone. This promise does not resolve so it will instantly return true.
|
1677
1685
|
*/
|
@@ -2233,6 +2241,36 @@ class Client {
|
|
2233
2241
|
return yield this.pup(chatId => WAPI.getMyLastMessage(chatId), chatId);
|
2234
2242
|
});
|
2235
2243
|
}
|
2244
|
+
/**
|
2245
|
+
* Retrieves the starred messages in a given chat
|
2246
|
+
* @param chatId Chat ID to filter starred messages by
|
2247
|
+
* @returns message object
|
2248
|
+
*/
|
2249
|
+
getStarredMessages(chatId) {
|
2250
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2251
|
+
return yield this.pup(chatId => WAPI.getStarredMessages(chatId), chatId);
|
2252
|
+
});
|
2253
|
+
}
|
2254
|
+
/**
|
2255
|
+
* Star a message
|
2256
|
+
* @param messageId Message ID of the message you want to star
|
2257
|
+
* @returns `true`
|
2258
|
+
*/
|
2259
|
+
starMessage(messageId) {
|
2260
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2261
|
+
return yield this.pup(messageId => WAPI.starMessage(messageId), messageId);
|
2262
|
+
});
|
2263
|
+
}
|
2264
|
+
/**
|
2265
|
+
* Unstar a message
|
2266
|
+
* @param messageId Message ID of the message you want to unstar
|
2267
|
+
* @returns `true`
|
2268
|
+
*/
|
2269
|
+
unstarMessage(messageId) {
|
2270
|
+
return __awaiter(this, void 0, void 0, function* () {
|
2271
|
+
return yield this.pup(messageId => WAPI.unstarMessage(messageId), messageId);
|
2272
|
+
});
|
2273
|
+
}
|
2236
2274
|
/**
|
2237
2275
|
*
|
2238
2276
|
* [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
|
package/package.json
CHANGED