@open-wa/wa-automate-types-only 4.28.2 → 4.28.6
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
CHANGED
@@ -397,7 +397,7 @@ export declare class Client {
|
|
397
397
|
* Shuts down the page and browser
|
398
398
|
* @returns true
|
399
399
|
*/
|
400
|
-
kill(): Promise<boolean>;
|
400
|
+
kill(reason?: string): Promise<boolean>;
|
401
401
|
/**
|
402
402
|
* This is a convinient method to click the `Use Here` button in the WA web session.
|
403
403
|
*
|
@@ -799,6 +799,12 @@ export declare class Client {
|
|
799
799
|
* @returns Boolean
|
800
800
|
*/
|
801
801
|
isConnected(): Promise<boolean>;
|
802
|
+
/**
|
803
|
+
* Logs out from the session.
|
804
|
+
*
|
805
|
+
* Please be careful when using this as it can exit the whole process depending on your config
|
806
|
+
*/
|
807
|
+
logout(): Promise<boolean>;
|
802
808
|
/**
|
803
809
|
* Retrieves Battery Level
|
804
810
|
* @returns Number
|
@@ -9,4 +9,4 @@ export declare function injectApi(page: Page): Promise<Page>;
|
|
9
9
|
/**
|
10
10
|
* @internal
|
11
11
|
*/
|
12
|
-
export declare const kill: (p: Page, b?: Browser, exit?: boolean, pid?: number) => Promise<void>;
|
12
|
+
export declare const kill: (p: Page, b?: Browser, exit?: boolean, pid?: number, reason?: string) => Promise<void>;
|
package/dist/utils/tools.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { DataURL } from '../api/model';
|
2
2
|
import { AxiosRequestConfig } from 'axios';
|
3
|
+
export declare const timeout: (ms: any) => Promise<unknown>;
|
3
4
|
/**
|
4
5
|
* Use this to generate a more likely valid user agent. It makes sure it has the WA part and replaces any windows or linux os info with mac.
|
5
6
|
* @param useragent Your custom user agent
|
@@ -25,3 +26,4 @@ export declare const getDUrl: (url: string, optionsOverride?: AxiosRequestConfig
|
|
25
26
|
*/
|
26
27
|
export declare const base64MimeType: (dUrl: DataURL) => string;
|
27
28
|
export declare const processSend: (message: string) => void;
|
29
|
+
export declare const processSendData: (data?: any) => void;
|