epii-types-rpa 1.0.6 → 1.0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/rpa.d.ts +20 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epii-types-rpa",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "rpa-types",
5
5
  "author": "MrRen",
6
6
  "license": "ISC",
package/rpa.d.ts CHANGED
@@ -5,17 +5,24 @@ namespace rpa {
5
5
  function execPuppeteer(script:String, params:Object = {});
6
6
  function error(msg:String, code:number = - 1);
7
7
  function exit();
8
+ function restartAndExecRpa();
9
+ function restartRpa();
10
+
8
11
  function onDialog(callback:Function);
9
12
  namespace http {
10
13
  function get(url:String):Promise;
11
14
  function post(url:String, data:Object):Promise;
12
15
  function getBase64(url:String):Promise;
16
+ namespace api {
17
+ function post(url:String, data:Object):Promise;
18
+ }
13
19
  }
14
20
 
15
21
  namespace ajax {
16
22
  function post(url:String, data:Object|String = "", headers:Object = {}):Promise;
17
23
  function get(url:String, headers:Object = {}):Promise;
18
24
  function getBase64(url:String, headers:Object = {}):Promise;
25
+ function download(url:String, path:String):Promise
19
26
  }
20
27
 
21
28
  namespace console {
@@ -33,7 +40,11 @@ namespace rpa {
33
40
  function download(url:String, path:String):Promise;
34
41
  function sleep(time:Number):Promise;
35
42
  function setInterval(callback:Function,interval:Number):Promise;
36
- function writeFile(filePath, content, isBase64 = false)
43
+ function writeFile(filePath:String, content:String, isBase64 :boolean= false):Promise;
44
+ function forEach(list:Array, callback:Function):Promise;
45
+ function mkdir(path:String):Promise;
46
+ function randomString(len:Number):Promise;
47
+
37
48
  }
38
49
  namespace page {
39
50
 
@@ -46,10 +57,16 @@ namespace rpa {
46
57
  function waitForTimeout(timeout);
47
58
  function script(func, data = {});
48
59
  function newIframeAndEvaluate(url:String,func:Function):Promise;
60
+ function newIframeAndEvaluate(iframeHandler:Function,func:Function):Promise;
61
+
62
+ function download(url:String, path:String):Promise
49
63
 
50
64
  }
51
65
  namespace browser {
52
66
  function newPageAndEvaluate(url:String, func:Function, data:Object = {}):Promise;
67
+ function getNextWindowOpenUrl(beforFunc:Function,cancel:boolean):Promise;
68
+ function getNextWindowOpenUrl(beforFunc:Function):Promise
69
+
53
70
  }
54
71
  namespace runtime {
55
72
  function get(key:String = null):Promise;
@@ -57,4 +74,5 @@ namespace rpa {
57
74
  }
58
75
  }
59
76
 
60
- declare function require(path:String):Promise
77
+ declare function require(path:String):Promise;
78
+ declare let args:Object;