@open-wa/wa-automate-types-only 4.28.9 → 4.28.13

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.
@@ -40,6 +40,7 @@ export declare class Client {
40
40
  private _prio;
41
41
  private _pageListeners;
42
42
  private _registeredPageListeners;
43
+ private _onLogoutCallbacks;
43
44
  private _queues;
44
45
  /**
45
46
  * 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.
@@ -111,13 +112,18 @@ export declare class Client {
111
112
  *
112
113
  * @event
113
114
  * @param fn callback
115
+ * @param priority A priority of -1 will mean the callback will be triggered after all the non -1 callbacks
114
116
  * @fires `true`
115
117
  */
116
118
  onLogout(fn: (loggedOut?: boolean) => any, priority?: number): Promise<boolean>;
117
119
  /**
118
120
  * Wait for the webhook queue to become idle. This is useful for ensuring webhooks are cleared before ending a process.
119
121
  */
120
- waitWhQIdle(): Promise<any>;
122
+ waitWhQIdle(): Promise<true | void>;
123
+ /**
124
+ * Wait for all queues to be empty
125
+ */
126
+ waitAllQEmpty(): Promise<true | void[]>;
121
127
  /**
122
128
  * If you have set `onAnyMessage` or `onMessage` with the second parameter (PQueue options) then you may want to inspect their respective PQueue's.
123
129
  */
@@ -794,6 +800,10 @@ export declare class Client {
794
800
  */
795
801
  getAllContacts(): Promise<Contact[]>;
796
802
  getWAVersion(): Promise<string>;
803
+ /**
804
+ * Generate a pre-filled github issue link to easily report a bug
805
+ */
806
+ getIssueLink(): Promise<string>;
797
807
  /**
798
808
  * Retrieves if the phone is online. Please note that this may not be real time.
799
809
  * @returns Boolean
@@ -12,6 +12,9 @@ export interface SessionInfo {
12
12
  NUM_HASH?: string;
13
13
  OW_KEY?: string;
14
14
  INSTANCE_ID?: string;
15
+ LATEST_VERSION?: boolean;
16
+ CLI?: boolean;
17
+ ACC_TYPE?: 'PERSONAL' | 'BUSINESS';
15
18
  }
16
19
  export interface HealthCheck {
17
20
  /**
@@ -1,5 +1,6 @@
1
- import { DataURL } from '../api/model';
1
+ import { ConfigObject, DataURL } from '../api/model';
2
2
  import { AxiosRequestConfig } from 'axios';
3
+ import { SessionInfo } from '../api/model/sessionInfo';
3
4
  export declare const timeout: (ms: any) => Promise<unknown>;
4
5
  /**
5
6
  * 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.
@@ -27,3 +28,4 @@ export declare const getDUrl: (url: string, optionsOverride?: AxiosRequestConfig
27
28
  export declare const base64MimeType: (dUrl: DataURL) => string;
28
29
  export declare const processSend: (message: string) => void;
29
30
  export declare const processSendData: (data?: any) => void;
31
+ export declare const generateGHIssueLink: (config: ConfigObject, sessionInfo: SessionInfo, extras?: any) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.28.9",
3
+ "version": "4.28.13",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",