epii-types-rpa 1.3.7 → 1.3.9
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 +43 -25
package/package.json
CHANGED
package/rpa.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ interface RequestHandler {
|
|
|
9
9
|
file?: String,
|
|
10
10
|
content?: String,
|
|
11
11
|
getLocation?: (url: string) => string,
|
|
12
|
-
path?:string
|
|
12
|
+
path?: string
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
interface FormItem {
|
|
@@ -19,23 +19,34 @@ interface FormItem {
|
|
|
19
19
|
}
|
|
20
20
|
type RunInPage = "activated" | "incognito" | "newPage" | "opened" | "";
|
|
21
21
|
type ExtObject = {
|
|
22
|
-
getProperty:(key:string)=>Promise<any>,
|
|
23
|
-
keys:()=>Promise<Array<string>>,
|
|
24
|
-
[any:string]:(...params:any[])=>Promise<any>
|
|
22
|
+
getProperty: (key: string) => Promise<any>,
|
|
23
|
+
keys: () => Promise<Array<string>>,
|
|
24
|
+
[any: string]: (...params: any[]) => Promise<any>
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
type ReturnBoolFunc = ()=>boolean;
|
|
27
|
+
type ReturnBoolFunc = () => boolean;
|
|
28
28
|
type ExcelSheetItem = {
|
|
29
|
-
sheetName:string,
|
|
30
|
-
list:Array<Record<string,any>>
|
|
29
|
+
sheetName: string,
|
|
30
|
+
list: Array<Record<string, any>>
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
type PageHander = {
|
|
34
|
+
evaluateFunction: (func: Function, data?: Object) => Promise<any>;
|
|
35
|
+
waitForSelector: (selector: string) => Promise;
|
|
36
|
+
waitForTrue: (func: Function, data?: Object) => Promise;
|
|
37
|
+
waitForOnceLoad: () => Promise;
|
|
38
|
+
execScript: (script: String, params?: Object) => Promise,
|
|
39
|
+
getPageId: () => string;
|
|
40
|
+
goto(url: string): Promise;
|
|
41
|
+
setContent(html:string):Promise;
|
|
42
|
+
};
|
|
43
|
+
|
|
33
44
|
|
|
34
45
|
|
|
35
46
|
declare namespace rpa {
|
|
36
|
-
function ext(mName: string):ExtObject;
|
|
47
|
+
function ext(mName: string): ExtObject;
|
|
37
48
|
|
|
38
|
-
function ready(isReady:number = 1);
|
|
49
|
+
function ready(isReady: number = 1);
|
|
39
50
|
function args(key, dvalue);
|
|
40
51
|
function args(key);
|
|
41
52
|
function setArgs(key, value): Promise;
|
|
@@ -117,16 +128,16 @@ declare namespace rpa {
|
|
|
117
128
|
function arrayBufferToBase64(buffer: String): String;
|
|
118
129
|
function waitForSelector(selectorOrFunction: String | Function): Promise<Element>;
|
|
119
130
|
function waitForSelectors(selectorOrFunction: String | Function): Promise<Array<Element>>
|
|
120
|
-
function getAppDataDir(subDir:string):Promise<string>;
|
|
121
|
-
function unlink(filepath:string):Promise<string>;
|
|
122
|
-
function getChromeExePath():Promise<string>;
|
|
131
|
+
function getAppDataDir(subDir: string): Promise<string>;
|
|
132
|
+
function unlink(filepath: string): Promise<string>;
|
|
133
|
+
function getChromeExePath(): Promise<string>;
|
|
123
134
|
}
|
|
124
135
|
namespace page {
|
|
125
|
-
|
|
126
|
-
function type(selector:string, text:string,options:Object): Promise;
|
|
136
|
+
function setViewport(viewport: Object): Promise
|
|
137
|
+
function type(selector: string, text: string, options: Object): Promise;
|
|
127
138
|
function screenshot(options: Object): Promise;
|
|
128
|
-
function elementScreenshot(selector:string,options: Object): Promise;
|
|
129
|
-
|
|
139
|
+
function elementScreenshot(selector: string, options: Object): Promise;
|
|
140
|
+
|
|
130
141
|
function pdf(options): Promise;
|
|
131
142
|
|
|
132
143
|
function waitForNavigation(options = {});
|
|
@@ -134,18 +145,25 @@ declare namespace rpa {
|
|
|
134
145
|
function waitForXPath(xpath);
|
|
135
146
|
function waitForTimeout(timeout);
|
|
136
147
|
function script(func, data = {});
|
|
148
|
+
function newIframeAndEvaluateOnWindow(win: Window, urlOrFunction: String | Function, func: Function, removeOnFinish: boolean = true, loadCountOrLoadCheckFunc: number | ReturnBoolFunc = 1): Promise;
|
|
149
|
+
function newIframeAndEvaluate(urlOrFunction: String | Function, func: Function, removeOnFinish: boolean = true, loadCountOrLoadCheckFunc: number | ReturnBoolFunc = 1, win: Window | null = null): Promise;
|
|
137
150
|
|
|
138
|
-
function newIframeAndEvaluate(urlOrFunction:String | Function, func: Function,removeOnFinish:boolean = true, loadCountOrLoadCheckFunc:number | ReturnBoolFunc = 1): Promise;
|
|
139
|
-
|
|
140
151
|
function download(url: String, path: String): Promise;
|
|
141
152
|
function closeActivated(): Promise;
|
|
142
153
|
namespace stracing {
|
|
143
154
|
function start(filePath: String): Promise;
|
|
144
155
|
function stop(): Promise;
|
|
145
156
|
}
|
|
157
|
+
function getHandler(): Promise<PageHander>
|
|
158
|
+
function getPageId(): Promise<string>;
|
|
146
159
|
|
|
147
160
|
}
|
|
148
161
|
namespace browser {
|
|
162
|
+
function newPageAndGetHandler(): Promise<PageHander>;
|
|
163
|
+
function getPageHandler(pageId: string): PageHander;
|
|
164
|
+
|
|
165
|
+
function evaluateInPage(ageId: String, func: Function, data?: Object): Promise;
|
|
166
|
+
function execScriptInPage(pageId: String, script: string, params?: Object): Promise;
|
|
149
167
|
function newPageAndDownLoad(url: String, path: String): Promise;
|
|
150
168
|
function newPageAndGetBase64(url: String): Promise;
|
|
151
169
|
function newPageAndEvaluate(url: String, func: Function, data: Object = {}): Promise;
|
|
@@ -155,7 +173,7 @@ declare namespace rpa {
|
|
|
155
173
|
function getNextWindowOpenUrl(beforFunc: Function, cancel: boolean): Promise;
|
|
156
174
|
function getNextWindowOpenUrl(beforFunc: Function): Promise;
|
|
157
175
|
function newIncognitoPageAndEvaluate(url: String, func: Function, data: Object = {}): Promise;
|
|
158
|
-
function download(invokeFun:Function, toFilePathOrExt:string|null = null,timeout:string=20000)
|
|
176
|
+
function download(invokeFun: Function, toFilePathOrExt: string | null = null, timeout: string = 20000): Promise;
|
|
159
177
|
|
|
160
178
|
}
|
|
161
179
|
namespace runtime {
|
|
@@ -163,9 +181,9 @@ declare namespace rpa {
|
|
|
163
181
|
function set(map: Object): Promise;
|
|
164
182
|
}
|
|
165
183
|
namespace frame {
|
|
166
|
-
function newIframeAndEvaluate(urlOrFunction:String | Function, func: Function,removeOnFinish:boolean = true, loadCountOrLoadCheckFunc:number | ReturnBoolFunc
|
|
184
|
+
function newIframeAndEvaluate(urlOrFunction: String | Function, func: Function, removeOnFinish: boolean = true, loadCountOrLoadCheckFunc: number | ReturnBoolFunc = 1): Promise;
|
|
167
185
|
function newCrossIframeContext(host: String, func: Function, data: Object = {}, removeOnFinish: Boolean = true): Promise;
|
|
168
|
-
function newIframeAndevaluateCross(urlOrFunction:String | Function, func: Function, data = {}, removeOnFinish: Boolean = true): Promise;
|
|
186
|
+
function newIframeAndevaluateCross(urlOrFunction: String | Function, func: Function, data = {}, removeOnFinish: Boolean = true): Promise;
|
|
169
187
|
function evaluateCross(name: String, func: Function, data = {}): Promise;
|
|
170
188
|
function evaluate(name: String, func: Function): Promise;
|
|
171
189
|
function evaluateOnNextFrame(invokeFun: Function, func: Function, remove: boolean): Promise;
|
|
@@ -204,10 +222,10 @@ declare namespace rpa {
|
|
|
204
222
|
}
|
|
205
223
|
|
|
206
224
|
}
|
|
207
|
-
namespace xlsx{
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
225
|
+
namespace xlsx {
|
|
226
|
+
function parseExcel(filePath: string): Promise<Array<ExcelSheetItem>>;
|
|
227
|
+
function parseExcelSheet(filePath: string, sheetIndex = 0): Promise<Array>;
|
|
228
|
+
function writeExcel(filePath: string, sheets: Array<ExcelSheetItem>): Promise<any>;
|
|
211
229
|
|
|
212
230
|
}
|
|
213
231
|
}
|