@open-wa/wa-automate-types-only 4.31.11 → 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.
package/dist/api/Client.d.ts
CHANGED
@@ -824,10 +824,10 @@ export declare class Client {
|
|
824
824
|
isConnected(): Promise<boolean>;
|
825
825
|
/**
|
826
826
|
* Logs out from the session.
|
827
|
-
*
|
827
|
+
* @param preserveSessionData skip session.data.json file invalidation
|
828
828
|
* Please be careful when using this as it can exit the whole process depending on your config
|
829
829
|
*/
|
830
|
-
logout(): Promise<boolean>;
|
830
|
+
logout(preserveSessionData?: boolean): Promise<boolean>;
|
831
831
|
/**
|
832
832
|
* Retrieves Battery Level
|
833
833
|
* @returns Number
|
@@ -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)
|
@@ -5,7 +5,8 @@ import { QRManager } from './auth';
|
|
5
5
|
export declare let BROWSER_START_TS: number;
|
6
6
|
export declare function initPage(sessionId?: string, config?: ConfigObject, qrManager?: QRManager, customUserAgent?: string, spinner?: Spin, _page?: Page, skipAuth?: boolean): Promise<Page>;
|
7
7
|
export declare const deleteSessionData: (config: ConfigObject) => boolean;
|
8
|
-
export declare const
|
8
|
+
export declare const invalidateSesssionData: (config: ConfigObject) => boolean;
|
9
|
+
export declare const getSessionDataFilePath: (sessionId: string, config: ConfigObject) => string | false;
|
9
10
|
export declare const addScript: (page: Page, js: string) => Promise<unknown>;
|
10
11
|
export declare function injectPreApiScripts(page: Page, spinner?: Spin): Promise<Page>;
|
11
12
|
export declare function injectWapi(page: Page, spinner?: Spin, force?: boolean): Promise<Page>;
|