epii-types-rpa 1.1.2 → 1.1.5

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 +17 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epii-types-rpa",
3
- "version": "1.1.2",
3
+ "version": "1.1.5",
4
4
  "description": "rpa-types",
5
5
  "author": "MrRen",
6
6
  "license": "ISC",
package/rpa.d.ts CHANGED
@@ -1,4 +1,12 @@
1
+ interface UploadFile{
2
+ postname:String,
3
+ path:String,
4
+ filename:String
5
+ }
6
+
1
7
  namespace rpa {
8
+ function ready(isReady=1);
9
+
2
10
  function args(key,dvalue);
3
11
  function args(key);
4
12
  function setArgs(key,value):Promise;
@@ -6,6 +14,8 @@ namespace rpa {
6
14
  function require(path:String):Promise;
7
15
  function success(data:any, exit:boolean);
8
16
  function exec(script:String, params:Object = {});
17
+ function execScript(script:String, params:Object = {});
18
+
9
19
  function execPuppeteer(script:String, params:Object = {});
10
20
  function error(msg:String, code:number = - 1);
11
21
  function exit();
@@ -14,6 +24,7 @@ namespace rpa {
14
24
 
15
25
  function onDialog(callback:Function);
16
26
  namespace http {
27
+ function uploadFile(url:String, file:UploadFile, params:Object = {}):Promise;
17
28
  function get(url:String):Promise;
18
29
  function post(url:String, data:Object):Promise;
19
30
  function getBase64(url:String):Promise;
@@ -88,6 +99,12 @@ namespace rpa {
88
99
  function evaluateOnNextFrame(invokeFun:Function, func:Function) :Promise;
89
100
 
90
101
  }
102
+ namespace localStorage{
103
+ function setItem( key:String, value) :Promise;
104
+ function getItem( key:String) :Promise;
105
+ function clear( ) :Promise;
106
+ function removeItem( key:String) :Promise;
107
+ }
91
108
  }
92
109
 
93
110
  declare function require(path:String):Promise;