@open-wa/wa-automate-types-only 4.39.0 → 4.40.2
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.
@@ -34,6 +34,16 @@ export declare enum DIRECTORY_STRATEGY {
|
|
34
34
|
*/
|
35
35
|
DATE_CHAT = "DATE_CHAT"
|
36
36
|
}
|
37
|
+
declare type SessionId = string;
|
38
|
+
declare type LicenseKey = string;
|
39
|
+
declare type HostAccountNumber = `${number}`;
|
40
|
+
declare type HostAccountNumberOrSessionID = HostAccountNumber | SessionId;
|
41
|
+
declare type LicenseKeyConfigObject = {
|
42
|
+
[key: HostAccountNumberOrSessionID]: LicenseKey;
|
43
|
+
};
|
44
|
+
declare type LicenseKeyConfigFunctionReturn = LicenseKeyConfigObject | LicenseKey;
|
45
|
+
declare type LicenseKeyConfigFunction = (sessionId?: SessionId, number?: HostAccountNumber) => LicenseKeyConfigFunctionReturn | Promise<LicenseKeyConfigFunctionReturn>;
|
46
|
+
declare type LicenseKeyConfig = LicenseKeyConfigFunction | LicenseKeyConfigObject | LicenseKey;
|
37
47
|
/**
|
38
48
|
* The available languages for the host security notification
|
39
49
|
*/
|
@@ -98,7 +108,8 @@ export declare enum LicenseType {
|
|
98
108
|
TEXT_STORY = "Text Story License Key",
|
99
109
|
IMAGE_STORY = "Image Story License Key",
|
100
110
|
VIDEO_STORY = "Video Story License Key",
|
101
|
-
PREMIUM = "Premium License Key"
|
111
|
+
PREMIUM = "Premium License Key",
|
112
|
+
NONE = "NONE"
|
102
113
|
}
|
103
114
|
export interface SessionData {
|
104
115
|
WABrowserId?: string;
|
@@ -264,7 +275,7 @@ export interface ConfigObject {
|
|
264
275
|
* 1. You can change the number assigned to that License Key at any time, just message me the new number on the private discord channel.
|
265
276
|
* 2. In order to cancel your License Key, simply stop your membership.
|
266
277
|
*/
|
267
|
-
licenseKey?:
|
278
|
+
licenseKey?: LicenseKey;
|
268
279
|
/**
|
269
280
|
* You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.
|
270
281
|
*/
|
@@ -770,3 +781,7 @@ export interface ConfigObject {
|
|
770
781
|
/**@internal */
|
771
782
|
[x: string]: any;
|
772
783
|
}
|
784
|
+
export declare type AdvancedConfig = ConfigObject & {
|
785
|
+
licenseKey: LicenseKeyConfig;
|
786
|
+
};
|
787
|
+
export {};
|
package/dist/cli/setup.d.ts
CHANGED
@@ -19,7 +19,7 @@ export declare const cliOptionNames: import("type-fest").Simplify<import("type-f
|
|
19
19
|
export declare const meowFlags: () => AnyFlags;
|
20
20
|
export declare const helptext: string;
|
21
21
|
export declare const envArgs: () => JsonObject;
|
22
|
-
export declare const configFile: (config
|
22
|
+
export declare const configFile: (config?: string) => JsonObject;
|
23
23
|
export declare const cli: () => {
|
24
24
|
createConfig: ConfigObject;
|
25
25
|
cliConfig: Merge<ConfigObject, {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { Client } from '../api/Client';
|
2
|
-
import { ConfigObject } from '../api/model/index';
|
2
|
+
import { AdvancedConfig, ConfigObject } from '../api/model/index';
|
3
3
|
export declare const pkg: any, configWithCases: any, timeout: (ms: number) => Promise<unknown>;
|
4
4
|
export declare let screenshot: any;
|
5
5
|
/**
|
@@ -17,6 +17,6 @@ export declare let screenshot: any;
|
|
17
17
|
* ...
|
18
18
|
* })....
|
19
19
|
* ```
|
20
|
-
* @param config
|
20
|
+
* @param config AdvancedConfig The extended custom configuration
|
21
21
|
*/
|
22
|
-
export declare function create(config?: ConfigObject): Promise<Client>;
|
22
|
+
export declare function create(config?: AdvancedConfig | ConfigObject): Promise<Client>;
|