epii-types-rpa 1.3.2 → 1.3.4

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 +22 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "epii-types-rpa",
3
- "version": "1.3.2",
3
+ "version": "1.3.4",
4
4
  "description": "rpa-types",
5
5
  "author": "MrRen",
6
6
  "license": "ISC",
package/rpa.d.ts CHANGED
@@ -22,10 +22,19 @@ type ExtObject = {
22
22
  keys:()=>Promise<Array<string>>,
23
23
  [any:string]:(...params:any[])=>Promise<any>
24
24
  }
25
- namespace rpa {
25
+
26
+ type ReturnBoolFunc = ()=>boolean;
27
+ type ExcelSheetItem = {
28
+ sheetName:string,
29
+ list:Array<Record<string,any>>
30
+ }
31
+
32
+
33
+
34
+ declare namespace rpa {
26
35
  function ext(mName: string):ExtObject;
27
- function ready(isReady = 1);
28
36
 
37
+ function ready(isReady:number = 1);
29
38
  function args(key, dvalue);
30
39
  function args(key);
31
40
  function setArgs(key, value): Promise;
@@ -120,9 +129,9 @@ namespace rpa {
120
129
  function waitForXPath(xpath);
121
130
  function waitForTimeout(timeout);
122
131
  function script(func, data = {});
123
- function newIframeAndEvaluate(url: String, func: Function): Promise;
124
- function newIframeAndEvaluate(iframeHandler: Function, func: Function): Promise;
125
132
 
133
+ function newIframeAndEvaluate(urlOrFunction:String | Function, func: Function,removeOnFinish:boolean = true, loadCountOrLoadCheckFunc:number | ReturnBoolFunc = 1): Promise;
134
+
126
135
  function download(url: String, path: String): Promise;
127
136
  function closeActivated(): Promise;
128
137
  namespace stracing {
@@ -149,14 +158,14 @@ namespace rpa {
149
158
  function set(map: Object): Promise;
150
159
  }
151
160
  namespace frame {
161
+ function newIframeAndEvaluate(urlOrFunction:String | Function, func: Function,removeOnFinish:boolean = true, loadCountOrLoadCheckFunc:number | ReturnBoolFunc = 1): Promise;
152
162
  function newCrossIframeContext(host: String, func: Function, data: Object = {}, removeOnFinish: Boolean = true): Promise;
153
- function newIframeAndevaluateCross(urlOrFunction, func: Function, data = {}, removeOnFinish: Boolean = true): Promise;
163
+ function newIframeAndevaluateCross(urlOrFunction:String | Function, func: Function, data = {}, removeOnFinish: Boolean = true): Promise;
154
164
  function evaluateCross(name: String, func: Function, data = {}): Promise;
155
165
  function evaluate(name: String, func: Function): Promise;
156
166
  function evaluateOnNextFrame(invokeFun: Function, func: Function, remove: boolean): Promise;
157
167
  function evaluateOnNextFrame(invokeFun: Function, func: Function): Promise;
158
168
  function evaluateOnNextFrameCross(invokeFun: Function, func: Function, data: Object = {}, remove: Boolean = false)
159
-
160
169
  }
161
170
  namespace localStorage {
162
171
  function setItem(key: String, value): Promise;
@@ -190,10 +199,16 @@ namespace rpa {
190
199
  }
191
200
 
192
201
  }
202
+ namespace xlsx{
203
+ function parseExcel(filePath:string):Promise<Array<ExcelSheetItem>>;
204
+ function parseExcelSheet(filePath:string, sheetIndex = 0):Promise<Array>;
205
+ function writeExcel(filePath:string, sheets:Array<ExcelSheetItem>):Promise<any>;
206
+
207
+ }
193
208
  }
194
209
 
195
210
  declare function require(path: String, readCache: Boolean = true): Promise;
196
211
  // declare let args: Object;
197
- namespace args {
212
+ declare namespace args {
198
213
  function get(key: String, dvalue: any = null): any;
199
214
  }