epii-types-rpa 1.0.0

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 +7 -0
  2. package/rpa.d.ts +53 -0
package/package.json ADDED
@@ -0,0 +1,7 @@
1
+ {
2
+ "name": "epii-types-rpa",
3
+ "version": "1.0.0",
4
+ "description": "rpa-types",
5
+ "author": "MrRen",
6
+ "license": "ISC"
7
+ }
package/rpa.d.ts ADDED
@@ -0,0 +1,53 @@
1
+ namespace rpa {
2
+ function success(data:any, exit:boolean);
3
+ function exec(script:String, params:Object = {});
4
+ function execPuppeteer(script:String, params:Object = {});
5
+ function error(msg:String, code:number = - 1);
6
+ function exit();
7
+ function onDialog(callback:Function);
8
+ namespace http {
9
+ function get(url:String):Promise;
10
+ function post(url:String, data:Object):Promise;
11
+ function getBase64(url:String):Promise;
12
+ }
13
+
14
+ namespace ajax {
15
+ function post(url:String, data:Object = {}, headers:Object = {}):Promise;
16
+ function get(url:String, headers:Object = {}):Promise;
17
+ }
18
+
19
+ namespace console {
20
+ function log(object:any):Promise;
21
+ }
22
+ namespace tools {
23
+ function log(object:any):Promise;
24
+
25
+ function getHtml(url:String):Promise;
26
+ function getResponseContentOnPage(pageUrl:String, urlOrurls:String|Array<String>):Promise;
27
+ function waitForResponseContent(url:String):Promise;
28
+ function execSystem(cmd:String):Promise;
29
+ function fileGetContent(path:String):Promise;
30
+ function fileGetContentBase64(path:String):Promise;
31
+ function download(url:String, path:String):Promise;
32
+
33
+ }
34
+ namespace page {
35
+
36
+ function screenshot(options:Object):Promise;
37
+ function pdf(options);
38
+
39
+ function waitForNavigation(options = {});
40
+ function waitForSelector(selector);
41
+ function waitForXPath(xpath);
42
+ function waitForTimeout(timeout);
43
+ function script(func, data = {});
44
+
45
+ }
46
+ namespace browser {
47
+ function newPageAndEvaluate(url:String, func:Function, data:Object = {}):Promise;
48
+ }
49
+ namespace runtime {
50
+ function get(key:String = null):Promise;
51
+ function set(map:Object):Promise;
52
+ }
53
+ }