@open-wa/wa-automate 4.35.12 → 4.35.13
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/api/Client.d.ts +5 -0
- package/dist/api/Client.js +13 -0
- package/package.json +1 -1
package/dist/api/Client.d.ts
CHANGED
@@ -705,6 +705,11 @@ export declare class Client {
|
|
705
705
|
* @returns `Promise<DataURL>`
|
706
706
|
*/
|
707
707
|
getSnapshot(chatId?: ChatId): Promise<DataURL>;
|
708
|
+
/**
|
709
|
+
* Returns some metrics of the session/page.
|
710
|
+
* @returns `Promise<any>`
|
711
|
+
*/
|
712
|
+
metrics(): Promise<any>;
|
708
713
|
/**
|
709
714
|
* Returns an array of group ids where the host account is admin
|
710
715
|
*/
|
package/dist/api/Client.js
CHANGED
@@ -1713,6 +1713,19 @@ class Client {
|
|
1713
1713
|
return `data:image/png;base64,${screenshot}`;
|
1714
1714
|
});
|
1715
1715
|
}
|
1716
|
+
/**
|
1717
|
+
* Returns some metrics of the session/page.
|
1718
|
+
* @returns `Promise<any>`
|
1719
|
+
*/
|
1720
|
+
metrics() {
|
1721
|
+
return __awaiter(this, void 0, void 0, function* () {
|
1722
|
+
const metrics = yield this._page.metrics();
|
1723
|
+
const sessionMetrics = yield this.pup(() => WAPI.launchMetrics());
|
1724
|
+
const res = Object.assign(Object.assign({}, (metrics || {})), (sessionMetrics || {}));
|
1725
|
+
logging_1.log.info("Metrics:", res);
|
1726
|
+
return res;
|
1727
|
+
});
|
1728
|
+
}
|
1716
1729
|
/**
|
1717
1730
|
* Returns an array of group ids where the host account is admin
|
1718
1731
|
*/
|
package/package.json
CHANGED