@open-wa/wa-automate-types-only 4.28.11 → 4.30.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
@@ -40,7 +40,10 @@ export declare class Client {
|
|
40
40
|
private _prio;
|
41
41
|
private _pageListeners;
|
42
42
|
private _registeredPageListeners;
|
43
|
+
private _onLogoutCallbacks;
|
43
44
|
private _queues;
|
45
|
+
private _autoEmojiSet;
|
46
|
+
private _onLogoutSet;
|
44
47
|
/**
|
45
48
|
* This is used to track if a listener is already used via webhook. Before, webhooks used to be set once per listener. Now a listener can be set via multiple webhooks, or revoked from a specific webhook.
|
46
49
|
* For this reason, listeners assigned to a webhook are only set once and map through all possible webhooks to and fire only if the specific listener is assigned.
|
@@ -111,13 +114,18 @@ export declare class Client {
|
|
111
114
|
*
|
112
115
|
* @event
|
113
116
|
* @param fn callback
|
117
|
+
* @param priority A priority of -1 will mean the callback will be triggered after all the non -1 callbacks
|
114
118
|
* @fires `true`
|
115
119
|
*/
|
116
120
|
onLogout(fn: (loggedOut?: boolean) => any, priority?: number): Promise<boolean>;
|
117
121
|
/**
|
118
122
|
* Wait for the webhook queue to become idle. This is useful for ensuring webhooks are cleared before ending a process.
|
119
123
|
*/
|
120
|
-
waitWhQIdle(): Promise<
|
124
|
+
waitWhQIdle(): Promise<true | void>;
|
125
|
+
/**
|
126
|
+
* Wait for all queues to be empty
|
127
|
+
*/
|
128
|
+
waitAllQEmpty(): Promise<true | void[]>;
|
121
129
|
/**
|
122
130
|
* If you have set `onAnyMessage` or `onMessage` with the second parameter (PQueue options) then you may want to inspect their respective PQueue's.
|
123
131
|
*/
|
@@ -13,4 +13,20 @@ export declare const isInsideChat: (waPage: Page) => Observable<boolean>;
|
|
13
13
|
export declare const waitForRipeSession: (waPage: Page) => Promise<boolean>;
|
14
14
|
export declare const sessionDataInvalid: (waPage: Page) => Promise<string>;
|
15
15
|
export declare const phoneIsOutOfReach: (waPage: Page) => Promise<boolean>;
|
16
|
-
export declare
|
16
|
+
export declare class QRManager {
|
17
|
+
qrEv: any;
|
18
|
+
qrNum: number;
|
19
|
+
hash: string;
|
20
|
+
config: ConfigObject;
|
21
|
+
firstEmitted: boolean;
|
22
|
+
_internalQrPngLoaded: boolean;
|
23
|
+
qrCheck: string;
|
24
|
+
constructor(config?: any);
|
25
|
+
setConfig(config: any): void;
|
26
|
+
qrEvF(config?: ConfigObject): any;
|
27
|
+
grabAndEmit(qrData: any, waPage: Page, config: ConfigObject, spinner: Spin): Promise<void>;
|
28
|
+
smartQr(waPage: Page, config?: ConfigObject, spinner?: Spin): Promise<boolean | void | string>;
|
29
|
+
emitFirst(waPage: Page, config?: ConfigObject, spinner?: Spin): Promise<void>;
|
30
|
+
waitFirstQr(waPage: Page, config?: ConfigObject, spinner?: Spin): Promise<void>;
|
31
|
+
}
|
32
|
+
export declare const qrManager: QRManager;
|
@@ -6,7 +6,9 @@ export declare function initPage(sessionId?: string, config?: ConfigObject, cust
|
|
6
6
|
export declare const deleteSessionData: (config: ConfigObject) => boolean;
|
7
7
|
export declare const getSessionDataFilePath: (sessionId: string, config: ConfigObject) => string | boolean;
|
8
8
|
export declare const addScript: (page: Page, js: string) => Promise<unknown>;
|
9
|
-
export declare function
|
9
|
+
export declare function injectPreApiScripts(page: Page, spinner?: Spin): Promise<Page>;
|
10
|
+
export declare function injectWapi(page: Page, spinner?: Spin): Promise<Page>;
|
11
|
+
export declare function injectApi(page: Page, spinner?: Spin): Promise<Page>;
|
10
12
|
/**
|
11
13
|
* @internal
|
12
14
|
*/
|
@@ -54,8 +54,10 @@ export declare const ev: EventEmitter2;
|
|
54
54
|
export declare class EvEmitter {
|
55
55
|
sessionId: string;
|
56
56
|
eventNamespace: string;
|
57
|
+
bannedTransports: string[];
|
57
58
|
constructor(sessionId: string, eventNamespace: string);
|
58
59
|
emit(data: unknown, eventNamespaceOverride?: string): void;
|
60
|
+
emitAsync(data: unknown, eventNamespaceOverride?: string): Promise<any>;
|
59
61
|
}
|
60
62
|
/**
|
61
63
|
* @internal
|
package/dist/utils/tools.d.ts
CHANGED
@@ -27,5 +27,6 @@ export declare const getDUrl: (url: string, optionsOverride?: AxiosRequestConfig
|
|
27
27
|
*/
|
28
28
|
export declare const base64MimeType: (dUrl: DataURL) => string;
|
29
29
|
export declare const processSend: (message: string) => void;
|
30
|
+
export declare function timePromise(fn: () => Promise<any>): Promise<string>;
|
30
31
|
export declare const processSendData: (data?: any) => void;
|
31
32
|
export declare const generateGHIssueLink: (config: ConfigObject, sessionInfo: SessionInfo, extras?: any) => string;
|