@open-wa/wa-automate-types-only 4.33.5 → 4.33.8

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.
@@ -1023,7 +1023,7 @@ export declare class Client {
1023
1023
  * @param {boolean} isHidden Whether or not the product is shown publicly in your catalog
1024
1024
  * @returns product object
1025
1025
  */
1026
- createNewProduct(name: string, price: number, currency: string, images: DataURL[], description: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
1026
+ createNewProduct(name: string, price: number, currency: string, images: string[], description: string, url?: string, internalId?: string, isHidden?: boolean): Promise<Product>;
1027
1027
  /**
1028
1028
  * [REQUIRES AN INSIDERS LICENSE-KEY](https://gum.co/open-wa?tier=Insiders%20Program)
1029
1029
  *
@@ -10,9 +10,25 @@ export declare const timeout: (ms: any) => Promise<unknown>;
10
10
  */
11
11
  export declare const smartUserAgent: (ua: string, version?: string) => string;
12
12
  export declare const getConfigFromProcessEnv: any;
13
+ /**
14
+ * Remove the key from the object and return the rest of the object.
15
+ * @param {JsonObject} obj - The object to be filtered.
16
+ * @param {string} key - The key to discard.
17
+ * @returns The object without the key.
18
+ */
13
19
  export declare const without: any;
14
20
  export declare const camelize: (str: string) => string;
21
+ /**
22
+ * Check if a string is Base64
23
+ * @param str string
24
+ * @returns
25
+ */
15
26
  export declare const isBase64: (str: string) => boolean;
27
+ /**
28
+ * Check if a string is a DataURL
29
+ * @param s string
30
+ * @returns
31
+ */
16
32
  export declare const isDataURL: (s: string) => boolean;
17
33
  /**
18
34
  * @internal
@@ -26,9 +42,45 @@ export declare const getDUrl: (url: string, optionsOverride?: AxiosRequestConfig
26
42
  * Use this to extract the mime type from a [[DataURL]]
27
43
  */
28
44
  export declare const base64MimeType: (dUrl: DataURL) => string;
45
+ /**
46
+ * If process.send is defined, send the message three times
47
+ * @param {string} message - The message to send to the parent process.
48
+ * @returns Nothing.
49
+ */
29
50
  export declare const processSend: (message: string) => void;
51
+ /**
52
+ * Return the performance object if it is available, otherwise return the Date object
53
+ */
30
54
  export declare const perf: () => DateConstructor | import("perf_hooks").Performance;
55
+ /**
56
+ * Return the current time in milliseconds
57
+ */
31
58
  export declare const now: () => number;
59
+ /**
60
+ * `timePromise` returns a promise that resolves to the time it took to run the function passed to it
61
+ * @param fn - the function to be timed.
62
+ * @returns A string.
63
+ */
32
64
  export declare function timePromise(fn: () => Promise<any>): Promise<string>;
65
+ /**
66
+ * It sends a message to the parent process.
67
+ * @param {any} data - The data to be sent to the parent process.
68
+ * @returns Nothing.
69
+ */
33
70
  export declare const processSendData: (data?: any) => void;
71
+ /**
72
+ * It generates a link to the GitHub issue template for the current session
73
+ * @param {ConfigObject} config - the config object
74
+ * @param {SessionInfo} sessionInfo - The sessionInfo object from the CLI
75
+ * @param {any} extras - any
76
+ * @returns A link to the issue tracker for the current session.
77
+ */
34
78
  export declare const generateGHIssueLink: (config: ConfigObject, sessionInfo: SessionInfo, extras?: any) => string;
79
+ /**
80
+ * If the file is a DataURL, return it. If it's a file, convert it to a DataURL. If it's a URL,
81
+ * download it and convert it to a DataURL. If Base64, returns it.
82
+ * @param {string} file - The file to be converted to a DataURL.
83
+ * @param {AxiosRequestConfig} requestConfig - AxiosRequestConfig = {}
84
+ * @returns A DataURL
85
+ */
86
+ export declare const ensureDUrl: (file: string, requestConfig?: AxiosRequestConfig) => Promise<string>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@open-wa/wa-automate-types-only",
3
- "version": "4.33.5",
3
+ "version": "4.33.8",
4
4
  "description": "Types generated from the @open-wa/wa-automate package",
5
5
  "scripts": {
6
6
  "build": "tsc",