epii-types-rpa 1.1.6 → 1.1.7
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.
- package/package.json +1 -1
- package/rpa.d.ts +77 -70
package/package.json
CHANGED
package/rpa.d.ts
CHANGED
|
@@ -1,119 +1,126 @@
|
|
|
1
|
-
interface UploadFile{
|
|
2
|
-
postname:String,
|
|
3
|
-
path:String,
|
|
4
|
-
filename:String
|
|
1
|
+
interface UploadFile {
|
|
2
|
+
postname: String,
|
|
3
|
+
path: String,
|
|
4
|
+
filename: String
|
|
5
|
+
}
|
|
6
|
+
interface RequestHandler {
|
|
7
|
+
reg: String,
|
|
8
|
+
type: "file" | "content" | "abort",
|
|
9
|
+
file?: String,
|
|
10
|
+
content?: String
|
|
5
11
|
}
|
|
6
12
|
|
|
7
13
|
namespace rpa {
|
|
8
|
-
function ready(isReady=1);
|
|
14
|
+
function ready(isReady = 1);
|
|
9
15
|
|
|
10
|
-
function args(key,dvalue);
|
|
16
|
+
function args(key, dvalue);
|
|
11
17
|
function args(key);
|
|
12
|
-
function setArgs(key,value):Promise;
|
|
13
|
-
function mergeArgs(map:Object):Promise;
|
|
14
|
-
function require(path:String):Promise;
|
|
15
|
-
function success(data:any, exit:boolean);
|
|
16
|
-
function exec(script:String, params:Object = {});
|
|
17
|
-
function execScript(script:String, params:Object = {});
|
|
18
|
-
|
|
19
|
-
function execPuppeteer(script:String, params:Object = {});
|
|
20
|
-
function error(msg:String, code:number = - 1);
|
|
18
|
+
function setArgs(key, value): Promise;
|
|
19
|
+
function mergeArgs(map: Object): Promise;
|
|
20
|
+
function require(path: String): Promise;
|
|
21
|
+
function success(data: any, exit: boolean);
|
|
22
|
+
function exec(script: String, params: Object = {});
|
|
23
|
+
function execScript(script: String, params: Object = {});
|
|
24
|
+
|
|
25
|
+
function execPuppeteer(script: String, params: Object = {});
|
|
26
|
+
function error(msg: String, code: number = - 1);
|
|
21
27
|
function exit();
|
|
22
28
|
function restartAndExecRpa();
|
|
23
29
|
function restartRpa();
|
|
24
30
|
|
|
25
|
-
function onDialog(callback:Function);
|
|
31
|
+
function onDialog(callback: Function);
|
|
26
32
|
namespace http {
|
|
27
|
-
function uploadFile(url:String, file:UploadFile, params:Object = {}):Promise;
|
|
28
|
-
function get(url:String):Promise;
|
|
29
|
-
function post(url:String, data:Object):Promise;
|
|
30
|
-
function getBase64(url:String):Promise;
|
|
33
|
+
function uploadFile(url: String, file: UploadFile, params: Object = {}): Promise;
|
|
34
|
+
function get(url: String): Promise;
|
|
35
|
+
function post(url: String, data: Object): Promise;
|
|
36
|
+
function getBase64(url: String): Promise;
|
|
31
37
|
namespace api {
|
|
32
|
-
|
|
38
|
+
function post(url: String, data: Object): Promise;
|
|
33
39
|
}
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
namespace ajax {
|
|
37
|
-
function post(url:String, data:Object|String = "", headers:Object = {}):Promise;
|
|
38
|
-
function get(url:String, headers:Object = {}):Promise;
|
|
39
|
-
function getBase64(url:String, headers:Object = {}):Promise;
|
|
40
|
-
function download(url:String, path:String):Promise
|
|
43
|
+
function post(url: String, data: Object | String = "", headers: Object = {}): Promise;
|
|
44
|
+
function get(url: String, headers: Object = {}): Promise;
|
|
45
|
+
function getBase64(url: String, headers: Object = {}): Promise;
|
|
46
|
+
function download(url: String, path: String): Promise
|
|
41
47
|
}
|
|
42
48
|
|
|
43
49
|
namespace console {
|
|
44
|
-
function log(object:any):Promise;
|
|
50
|
+
function log(object: any): Promise;
|
|
45
51
|
}
|
|
46
52
|
namespace tools {
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function
|
|
52
|
-
function
|
|
53
|
-
function
|
|
54
|
-
function
|
|
55
|
-
function
|
|
56
|
-
function
|
|
57
|
-
function
|
|
58
|
-
function
|
|
59
|
-
function
|
|
60
|
-
function
|
|
61
|
-
function
|
|
62
|
-
function
|
|
63
|
-
function
|
|
53
|
+
function addRequestHandler(r: RequestHandler): Promise
|
|
54
|
+
function uploadFile(domOrSelector: | String | Element, path: String | Array<String>): Promise
|
|
55
|
+
function log(object: any): Promise;
|
|
56
|
+
function getAbsolutePath(path: String): Promise;
|
|
57
|
+
function getHtml(url: String): Promise;
|
|
58
|
+
function getResponseContentOnPage(pageUrl: String, urlOrurls: String | Array<String>): Promise;
|
|
59
|
+
function waitForResponseContent(url: String): Promise;
|
|
60
|
+
function execSystem(cmd: String): Promise;
|
|
61
|
+
function fileGetContent(path: String): Promise;
|
|
62
|
+
function fileGetContentBase64(path: String): Promise;
|
|
63
|
+
function download(url: String, path: String): Promise;
|
|
64
|
+
function sleep(time: Number): Promise;
|
|
65
|
+
function setInterval(callback: Function, interval: Number): Promise;
|
|
66
|
+
function writeFile(filePath: String, content: String, isBase64: boolean = false): Promise;
|
|
67
|
+
function forEach(list: Array, callback: Function): Promise;
|
|
68
|
+
function mkdir(path: String): Promise;
|
|
69
|
+
function randomString(len: Number): Promise;
|
|
70
|
+
function waitForTrue(func: Function, interval = 500): Promise
|
|
64
71
|
|
|
65
72
|
}
|
|
66
73
|
namespace page {
|
|
67
74
|
|
|
68
|
-
function screenshot(options:Object):Promise;
|
|
75
|
+
function screenshot(options: Object): Promise;
|
|
69
76
|
function pdf(options);
|
|
70
77
|
|
|
71
78
|
function waitForNavigation(options = {});
|
|
72
|
-
function waitForSelector(selector,timeout=30000);
|
|
79
|
+
function waitForSelector(selector, timeout = 30000);
|
|
73
80
|
function waitForXPath(xpath);
|
|
74
81
|
function waitForTimeout(timeout);
|
|
75
82
|
function script(func, data = {});
|
|
76
|
-
function newIframeAndEvaluate(url:String,func:Function):Promise;
|
|
77
|
-
function newIframeAndEvaluate(iframeHandler:Function,func:Function):Promise;
|
|
83
|
+
function newIframeAndEvaluate(url: String, func: Function): Promise;
|
|
84
|
+
function newIframeAndEvaluate(iframeHandler: Function, func: Function): Promise;
|
|
78
85
|
|
|
79
|
-
|
|
86
|
+
function download(url: String, path: String): Promise
|
|
80
87
|
|
|
81
88
|
}
|
|
82
89
|
namespace browser {
|
|
83
|
-
function newPageAndEvaluate(url:String, func:Function, data:Object = {}):Promise;
|
|
84
|
-
function waitOpenedPageAndEvaluate(invokeFun:Function, func:Function, data:Object = {}):Promise;
|
|
85
|
-
function waitOpenedPageAndExec(invokeFun:Function, script:String, params:Object = {}):Promise;
|
|
90
|
+
function newPageAndEvaluate(url: String, func: Function, data: Object = {}): Promise;
|
|
91
|
+
function waitOpenedPageAndEvaluate(invokeFun: Function, func: Function, data: Object = {}): Promise;
|
|
92
|
+
function waitOpenedPageAndExec(invokeFun: Function, script: String, params: Object = {}): Promise;
|
|
86
93
|
|
|
87
|
-
function getNextWindowOpenUrl(beforFunc:Function,cancel:boolean):Promise;
|
|
88
|
-
function getNextWindowOpenUrl(beforFunc:Function):Promise
|
|
94
|
+
function getNextWindowOpenUrl(beforFunc: Function, cancel: boolean): Promise;
|
|
95
|
+
function getNextWindowOpenUrl(beforFunc: Function): Promise
|
|
89
96
|
|
|
90
97
|
}
|
|
91
98
|
namespace runtime {
|
|
92
|
-
function get(key:String = null):Promise;
|
|
93
|
-
function set(map:Object):Promise;
|
|
99
|
+
function get(key: String = null): Promise;
|
|
100
|
+
function set(map: Object): Promise;
|
|
94
101
|
}
|
|
95
102
|
namespace frame {
|
|
96
|
-
function
|
|
97
|
-
function
|
|
98
|
-
function evaluateOnNextFrame(invokeFun:Function, func:Function,remove:boolean)
|
|
99
|
-
function evaluateOnNextFrame(invokeFun:Function, func:Function)
|
|
103
|
+
function evaluateCross(name: String, func: Function, data = {}): Promise;
|
|
104
|
+
function evaluate(name: String, func: Function): Promise;
|
|
105
|
+
function evaluateOnNextFrame(invokeFun: Function, func: Function, remove: boolean): Promise;
|
|
106
|
+
function evaluateOnNextFrame(invokeFun: Function, func: Function): Promise;
|
|
100
107
|
|
|
101
108
|
}
|
|
102
|
-
namespace localStorage{
|
|
103
|
-
function
|
|
104
|
-
function
|
|
105
|
-
function
|
|
106
|
-
function
|
|
109
|
+
namespace localStorage {
|
|
110
|
+
function setItem(key: String, value): Promise;
|
|
111
|
+
function getItem(key: String): Promise;
|
|
112
|
+
function clear(): Promise;
|
|
113
|
+
function removeItem(key: String): Promise;
|
|
107
114
|
}
|
|
108
|
-
namespace view{
|
|
109
|
-
function showConsoleView(title:String = null):Promise;
|
|
115
|
+
namespace view {
|
|
116
|
+
function showConsoleView(title: String = null): Promise;
|
|
110
117
|
function hideConsoleView();
|
|
111
|
-
function console(msg:String,color:String= "#ffffff");
|
|
112
|
-
function showMaskView(title:String = "");
|
|
118
|
+
function console(msg: String, color: String = "#ffffff");
|
|
119
|
+
function showMaskView(title: String = "");
|
|
113
120
|
function hideMaskView();
|
|
114
121
|
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
|
|
118
|
-
declare
|
|
119
|
-
declare
|
|
125
|
+
declare function require(path: String): Promise;
|
|
126
|
+
declare let args: Object;
|