@open-wa/wa-automate-types-only 4.40.0 → 4.40.1

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
  */
@@ -265,7 +275,7 @@ export interface ConfigObject {
265
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.
266
276
  * 2. In order to cancel your License Key, simply stop your membership.
267
277
  */
268
- licenseKey?: string | string[];
278
+ licenseKey?: LicenseKey;
269
279
  /**
270
280
  * You may set a custom user agent. However, due to recent developments, this is not really neccessary any more.
271
281
  */
@@ -771,3 +781,7 @@ export interface ConfigObject {
771
781
  /**@internal */
772
782
  [x: string]: any;
773
783
  }
784
+ export declare type AdvancedConfig = ConfigObject & {
785
+ licenseKey: LicenseKeyConfig;
786
+ };
787
+ export {};
@@ -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 ConfigObject] The extended custom configuration
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>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.40.0",
3
+ "version": "4.40.1",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",