epii-types-rpa 1.2.7 → 1.2.9

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rpa.d.ts +11 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epii-types-rpa",
3
- "version": "1.2.7",
3
+ "version": "1.2.9",
4
4
  "description": "rpa-types",
5
5
  "author": "MrRen",
6
6
  "license": "ISC",
package/rpa.d.ts CHANGED
@@ -8,7 +8,7 @@ interface RequestHandler {
8
8
  type: "file" | "content" | "abort" | "redirect",
9
9
  file?: String,
10
10
  content?: String,
11
- getLocation?:(url:string)=>string
11
+ getLocation?: (url: string) => string
12
12
  }
13
13
 
14
14
  interface FormItem {
@@ -17,8 +17,13 @@ interface FormItem {
17
17
  value?: any
18
18
  }
19
19
  type RunInPage = "activated" | "incognito" | "newPage" | "opened" | "";
20
-
20
+ type ExtObject = {
21
+ getProperty:(key:string)=>Promise<any>,
22
+ keys:()=>Promise<Array<string>>,
23
+ [any:string]:(...params:any[])=>Promise<any>
24
+ }
21
25
  namespace rpa {
26
+ function ext(mName: string):ExtObject;
22
27
  function ready(isReady = 1);
23
28
 
24
29
  function args(key, dvalue);
@@ -28,8 +33,8 @@ namespace rpa {
28
33
  function mergeArgs(map: Object): Promise;
29
34
  function require(path: String): Promise;
30
35
  function success(data: any, exit: boolean);
31
- function exec(script: String, params: Object = {},runInPage:RunInPage="");
32
- function execScript(script: String, params: Object = {},runInPage:RunInPage="");
36
+ function exec(script: String, params: Object = {}, runInPage: RunInPage = "");
37
+ function execScript(script: String, params: Object = {}, runInPage: RunInPage = "");
33
38
 
34
39
  function execPuppeteer(script: String, params: Object = {});
35
40
  function error(msg: String, code: number = - 1);
@@ -101,6 +106,7 @@ namespace rpa {
101
106
  function arrayBufferToBase64(buffer: String): String;
102
107
  function waitForSelector(selectorOrFunction: String | Function): Promise<Element>;
103
108
  function waitForSelectors(selectorOrFunction: String | Function): Promise<Array<Element>>
109
+ function getAppDataDir(subDir:string):Promise<string>;
104
110
  }
105
111
  namespace page {
106
112
 
@@ -133,6 +139,7 @@ namespace rpa {
133
139
  function getNextWindowOpenUrl(beforFunc: Function, cancel: boolean): Promise;
134
140
  function getNextWindowOpenUrl(beforFunc: Function): Promise;
135
141
  function newIncognitoPageAndEvaluate(url: String, func: Function, data: Object = {}): Promise;
142
+ function download(invokeFun, toFilePathOrExt = null) : Promise;
136
143
 
137
144
  }
138
145
  namespace runtime {