oxygen-cli 1.27.2 → 1.27.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 (205) hide show
  1. package/build/ox_modules/module-mob/commands/alertAccept.js +8 -3
  2. package/build/ox_modules/module-mob/commands/alertDismiss.js +8 -3
  3. package/build/ox_modules/module-mob/commands/assertAlert.js +8 -3
  4. package/build/ox_modules/module-mob/commands/assertText.js +8 -3
  5. package/build/ox_modules/module-mob/commands/assertTitle.js +8 -3
  6. package/build/ox_modules/module-mob/commands/assertValue.js +8 -3
  7. package/build/ox_modules/module-mob/commands/back.js +8 -3
  8. package/build/ox_modules/module-mob/commands/clear.js +8 -3
  9. package/build/ox_modules/module-mob/commands/click.js +8 -3
  10. package/build/ox_modules/module-mob/commands/clickHidden.js +8 -3
  11. package/build/ox_modules/module-mob/commands/clickLong.js +8 -3
  12. package/build/ox_modules/module-mob/commands/clickMultipleTimes.js +8 -3
  13. package/build/ox_modules/module-mob/commands/closeApp.js +8 -3
  14. package/build/ox_modules/module-mob/commands/debug.js +8 -3
  15. package/build/ox_modules/module-mob/commands/dragAndDrop.js +8 -3
  16. package/build/ox_modules/module-mob/commands/enableNetwork.js +8 -3
  17. package/build/ox_modules/module-mob/commands/execute.js +8 -3
  18. package/build/ox_modules/module-mob/commands/findElement.js +8 -3
  19. package/build/ox_modules/module-mob/commands/findElements.js +8 -3
  20. package/build/ox_modules/module-mob/commands/getAlertText.js +8 -3
  21. package/build/ox_modules/module-mob/commands/getAppiumLogs.js +8 -3
  22. package/build/ox_modules/module-mob/commands/getBrowserLogs.js +8 -3
  23. package/build/ox_modules/module-mob/commands/getCurrentActivity.js +8 -3
  24. package/build/ox_modules/module-mob/commands/getCurrentPackage.js +8 -3
  25. package/build/ox_modules/module-mob/commands/getDeviceLogs.js +8 -3
  26. package/build/ox_modules/module-mob/commands/getDeviceTime.js +8 -3
  27. package/build/ox_modules/module-mob/commands/getLocation.js +8 -3
  28. package/build/ox_modules/module-mob/commands/getSource.js +8 -3
  29. package/build/ox_modules/module-mob/commands/getText.js +8 -3
  30. package/build/ox_modules/module-mob/commands/getTitle.js +8 -3
  31. package/build/ox_modules/module-mob/commands/getUrl.js +8 -3
  32. package/build/ox_modules/module-mob/commands/getValue.js +8 -3
  33. package/build/ox_modules/module-mob/commands/getWindowHandles.js +8 -3
  34. package/build/ox_modules/module-mob/commands/hideKeyboard.js +8 -3
  35. package/build/ox_modules/module-mob/commands/index.js +949 -586
  36. package/build/ox_modules/module-mob/commands/installApp.js +8 -3
  37. package/build/ox_modules/module-mob/commands/isAppInstalled.js +8 -3
  38. package/build/ox_modules/module-mob/commands/isCheckable.js +8 -3
  39. package/build/ox_modules/module-mob/commands/isChecked.js +8 -3
  40. package/build/ox_modules/module-mob/commands/isClickable.js +8 -3
  41. package/build/ox_modules/module-mob/commands/isExist.js +8 -3
  42. package/build/ox_modules/module-mob/commands/isSelected.js +8 -3
  43. package/build/ox_modules/module-mob/commands/isVisible.js +8 -3
  44. package/build/ox_modules/module-mob/commands/isWebViewContext.js +8 -3
  45. package/build/ox_modules/module-mob/commands/launchApp.js +8 -3
  46. package/build/ox_modules/module-mob/commands/longPressKeyCode.js +8 -3
  47. package/build/ox_modules/module-mob/commands/open.js +8 -3
  48. package/build/ox_modules/module-mob/commands/pause.js +8 -3
  49. package/build/ox_modules/module-mob/commands/removeApp.js +8 -3
  50. package/build/ox_modules/module-mob/commands/resetApp.js +8 -3
  51. package/build/ox_modules/module-mob/commands/scrollIntoElement.js +8 -3
  52. package/build/ox_modules/module-mob/commands/scrollIntoView.js +8 -3
  53. package/build/ox_modules/module-mob/commands/select.js +8 -3
  54. package/build/ox_modules/module-mob/commands/selectFrame.js +8 -3
  55. package/build/ox_modules/module-mob/commands/selectWindow.js +8 -3
  56. package/build/ox_modules/module-mob/commands/sendKeys.js +8 -3
  57. package/build/ox_modules/module-mob/commands/setContext.js +8 -3
  58. package/build/ox_modules/module-mob/commands/setNativeContext.js +8 -3
  59. package/build/ox_modules/module-mob/commands/setTimeout.js +8 -3
  60. package/build/ox_modules/module-mob/commands/setWebViewContext.js +8 -3
  61. package/build/ox_modules/module-mob/commands/shake.js +8 -3
  62. package/build/ox_modules/module-mob/commands/smsClickLink.js +8 -3
  63. package/build/ox_modules/module-mob/commands/smsGetText.js +8 -3
  64. package/build/ox_modules/module-mob/commands/swipe.js +8 -3
  65. package/build/ox_modules/module-mob/commands/swipeElement.js +8 -3
  66. package/build/ox_modules/module-mob/commands/swipeScreen.js +12 -7
  67. package/build/ox_modules/module-mob/commands/takeScreenshot.js +8 -3
  68. package/build/ox_modules/module-mob/commands/tap.js +8 -3
  69. package/build/ox_modules/module-mob/commands/type.js +8 -3
  70. package/build/ox_modules/module-mob/commands/unlockPattern.js +8 -3
  71. package/build/ox_modules/module-mob/commands/waitForExist.js +8 -3
  72. package/build/ox_modules/module-mob/commands/waitForInteractable.js +8 -3
  73. package/build/ox_modules/module-mob/commands/waitForVisible.js +8 -3
  74. package/build/ox_modules/module-web/commands/alertAccept.js +8 -3
  75. package/build/ox_modules/module-web/commands/alertDismiss.js +8 -3
  76. package/build/ox_modules/module-web/commands/assertAlert.js +8 -3
  77. package/build/ox_modules/module-web/commands/assertExist.js +8 -3
  78. package/build/ox_modules/module-web/commands/assertSelectedLabel.js +8 -3
  79. package/build/ox_modules/module-web/commands/assertSelectedValue.js +8 -3
  80. package/build/ox_modules/module-web/commands/assertText.js +8 -3
  81. package/build/ox_modules/module-web/commands/assertTextNotPresent.js +8 -3
  82. package/build/ox_modules/module-web/commands/assertTextPresent.js +8 -3
  83. package/build/ox_modules/module-web/commands/assertTitle.js +8 -3
  84. package/build/ox_modules/module-web/commands/assertValue.js +8 -3
  85. package/build/ox_modules/module-web/commands/back.js +8 -3
  86. package/build/ox_modules/module-web/commands/clear.js +8 -3
  87. package/build/ox_modules/module-web/commands/click.js +8 -3
  88. package/build/ox_modules/module-web/commands/clickHidden.js +8 -3
  89. package/build/ox_modules/module-web/commands/closeWindow.js +8 -3
  90. package/build/ox_modules/module-web/commands/debug.js +8 -3
  91. package/build/ox_modules/module-web/commands/deleteCookies.js +8 -3
  92. package/build/ox_modules/module-web/commands/deselect.js +8 -3
  93. package/build/ox_modules/module-web/commands/doubleClick.js +8 -3
  94. package/build/ox_modules/module-web/commands/dragAndDrop.js +8 -3
  95. package/build/ox_modules/module-web/commands/execute.js +8 -3
  96. package/build/ox_modules/module-web/commands/fileBrowse.js +8 -3
  97. package/build/ox_modules/module-web/commands/findElement.js +8 -3
  98. package/build/ox_modules/module-web/commands/findElements.js +8 -3
  99. package/build/ox_modules/module-web/commands/fullscreenWindow.js +8 -3
  100. package/build/ox_modules/module-web/commands/getAlertText.js +8 -3
  101. package/build/ox_modules/module-web/commands/getAttribute.js +8 -3
  102. package/build/ox_modules/module-web/commands/getBrowserLogs.js +8 -3
  103. package/build/ox_modules/module-web/commands/getCookies.js +8 -3
  104. package/build/ox_modules/module-web/commands/getCssValue.js +8 -3
  105. package/build/ox_modules/module-web/commands/getElementCount.js +8 -3
  106. package/build/ox_modules/module-web/commands/getHTML.js +8 -3
  107. package/build/ox_modules/module-web/commands/getSource.js +8 -3
  108. package/build/ox_modules/module-web/commands/getText.js +8 -3
  109. package/build/ox_modules/module-web/commands/getTitle.js +8 -3
  110. package/build/ox_modules/module-web/commands/getUrl.js +8 -3
  111. package/build/ox_modules/module-web/commands/getValue.js +8 -3
  112. package/build/ox_modules/module-web/commands/getWindowHandles.js +8 -3
  113. package/build/ox_modules/module-web/commands/getWindowSize.js +8 -3
  114. package/build/ox_modules/module-web/commands/getXMLPageSource.js +8 -3
  115. package/build/ox_modules/module-web/commands/index.js +1027 -634
  116. package/build/ox_modules/module-web/commands/isAlertPresent.js +8 -3
  117. package/build/ox_modules/module-web/commands/isChecked.js +8 -3
  118. package/build/ox_modules/module-web/commands/isExist.js +8 -3
  119. package/build/ox_modules/module-web/commands/isInteractable.js +8 -3
  120. package/build/ox_modules/module-web/commands/isSelected.js +8 -3
  121. package/build/ox_modules/module-web/commands/isVisible.js +8 -3
  122. package/build/ox_modules/module-web/commands/makeVisible.js +8 -3
  123. package/build/ox_modules/module-web/commands/maximizeWindow.js +8 -3
  124. package/build/ox_modules/module-web/commands/minimizeWindow.js +8 -3
  125. package/build/ox_modules/module-web/commands/newWindow.js +8 -3
  126. package/build/ox_modules/module-web/commands/open.js +8 -3
  127. package/build/ox_modules/module-web/commands/pause.js +8 -3
  128. package/build/ox_modules/module-web/commands/point.js +8 -3
  129. package/build/ox_modules/module-web/commands/pointJS.js +8 -3
  130. package/build/ox_modules/module-web/commands/refresh.js +8 -3
  131. package/build/ox_modules/module-web/commands/rightClick.js +8 -3
  132. package/build/ox_modules/module-web/commands/rightClickActions.js +8 -3
  133. package/build/ox_modules/module-web/commands/scrollToElement.js +8 -3
  134. package/build/ox_modules/module-web/commands/select.js +8 -3
  135. package/build/ox_modules/module-web/commands/selectFrame.js +8 -3
  136. package/build/ox_modules/module-web/commands/selectWindow.js +8 -3
  137. package/build/ox_modules/module-web/commands/sendKeys.js +8 -3
  138. package/build/ox_modules/module-web/commands/setAutoWaitForAngular.js +8 -3
  139. package/build/ox_modules/module-web/commands/setTimeout.js +8 -3
  140. package/build/ox_modules/module-web/commands/setWindowSize.js +8 -3
  141. package/build/ox_modules/module-web/commands/takeScreenshot.js +8 -3
  142. package/build/ox_modules/module-web/commands/type.js +8 -3
  143. package/build/ox_modules/module-web/commands/waitForAngular.js +8 -3
  144. package/build/ox_modules/module-web/commands/waitForExist.js +8 -3
  145. package/build/ox_modules/module-web/commands/waitForInteractable.js +8 -3
  146. package/build/ox_modules/module-web/commands/waitForNotExist.js +8 -3
  147. package/build/ox_modules/module-web/commands/waitForNotText.js +8 -3
  148. package/build/ox_modules/module-web/commands/waitForNotValue.js +8 -3
  149. package/build/ox_modules/module-web/commands/waitForText.js +8 -3
  150. package/build/ox_modules/module-web/commands/waitForValue.js +8 -3
  151. package/build/ox_modules/module-web/commands/waitForVisible.js +8 -3
  152. package/build/ox_modules/module-web/commands/waitForWindow.js +8 -3
  153. package/build/ox_modules/module-win/commands/assertText.js +8 -3
  154. package/build/ox_modules/module-win/commands/assertTitle.js +8 -3
  155. package/build/ox_modules/module-win/commands/assertValue.js +8 -3
  156. package/build/ox_modules/module-win/commands/back.js +8 -3
  157. package/build/ox_modules/module-win/commands/clear.js +8 -3
  158. package/build/ox_modules/module-win/commands/click.js +8 -3
  159. package/build/ox_modules/module-win/commands/clickLong.js +8 -3
  160. package/build/ox_modules/module-win/commands/clickMultipleTimes.js +8 -3
  161. package/build/ox_modules/module-win/commands/findElement.js +8 -3
  162. package/build/ox_modules/module-win/commands/findElements.js +8 -3
  163. package/build/ox_modules/module-win/commands/getAppiumLogs.js +8 -3
  164. package/build/ox_modules/module-win/commands/getCurrentWindowHandle.js +8 -3
  165. package/build/ox_modules/module-win/commands/getLocation.js +8 -3
  166. package/build/ox_modules/module-win/commands/getSource.js +8 -3
  167. package/build/ox_modules/module-win/commands/getText.js +8 -3
  168. package/build/ox_modules/module-win/commands/getValue.js +8 -3
  169. package/build/ox_modules/module-win/commands/getWindowHandles.js +8 -3
  170. package/build/ox_modules/module-win/commands/index.js +468 -290
  171. package/build/ox_modules/module-win/commands/isCheckable.js +8 -3
  172. package/build/ox_modules/module-win/commands/isChecked.js +8 -3
  173. package/build/ox_modules/module-win/commands/isClickable.js +8 -3
  174. package/build/ox_modules/module-win/commands/isExist.js +8 -3
  175. package/build/ox_modules/module-win/commands/isSelected.js +8 -3
  176. package/build/ox_modules/module-win/commands/isVisible.js +8 -3
  177. package/build/ox_modules/module-win/commands/open.js +8 -3
  178. package/build/ox_modules/module-win/commands/pause.js +8 -3
  179. package/build/ox_modules/module-win/commands/rightClick.js +8 -3
  180. package/build/ox_modules/module-win/commands/selectWindow.js +8 -3
  181. package/build/ox_modules/module-win/commands/sendKeys.js +8 -3
  182. package/build/ox_modules/module-win/commands/setTimeout.js +8 -3
  183. package/build/ox_modules/module-win/commands/takeScreenshot.js +8 -3
  184. package/build/ox_modules/module-win/commands/tap.js +8 -3
  185. package/build/ox_modules/module-win/commands/type.js +8 -3
  186. package/build/ox_modules/module-win/commands/waitForExist.js +8 -3
  187. package/build/ox_modules/module-win/commands/waitForInteractable.js +8 -3
  188. package/build/ox_modules/module-win/commands/waitForVisible.js +8 -3
  189. package/build/runners/WorkerProcess.js +40 -13
  190. package/build/runners/oxygen/OxygenWorker.js +7 -3
  191. package/build/runners/oxygen/index.js +80 -80
  192. package/build/runners/oxygen/worker.js +4 -1
  193. package/package.json +11 -2
  194. package/types/index.d.ts +71 -0
  195. package/types/module-eyes.d.ts +39 -0
  196. package/types/module-http.d.ts +163 -0
  197. package/types/module-log.d.ts +35 -0
  198. package/types/module-mob.d.ts +967 -0
  199. package/types/module-pdf.d.ts +41 -0
  200. package/types/module-proxy.d.ts +100 -0
  201. package/types/module-shell.d.ts +24 -0
  202. package/types/module-utils.d.ts +99 -0
  203. package/types/module-web.d.ts +1050 -0
  204. package/types/module-win.d.ts +352 -0
  205. package/types/oxygen.d.ts +53 -0
@@ -0,0 +1,41 @@
1
+ declare namespace Oxygen {
2
+ /**
3
+ * @name pdf
4
+ * @description Provides generic methods for working with PDF files.
5
+ */
6
+ interface ModulePdf {
7
+
8
+ /**
9
+ * @summary Asserts that text is present in a PDF file
10
+ * @function assert
11
+ * @param {String} pdfFilePath - Relative or absolute path to the PDF file.
12
+ * @param {String} text - Text to assert.
13
+ * @param {Number=} pageNum - Page number.
14
+ * @param {String=} message - Message to throw if assertion fails.
15
+ * @param {Boolean=} reverse - Check also reverse variant of string.
16
+ */
17
+ assert(pdfFilePath: string, text: string, pageNum?: number, message?: string, reverse?: boolean): void;
18
+
19
+ /**
20
+ * @summary Asserts that text is not present in a PDF file
21
+ * @function assertNot
22
+ * @param {String} pdfFilePath - Relative or absolute path to the pdf file.
23
+ * @param {String} text - Text to assert.
24
+ * @param {Number=} pageNum - Page number.
25
+ * @param {String=} message - Message to throw if assertion fails.
26
+ * @param {Boolean=} reverse - Check also reverse variant of string.
27
+ */
28
+ assertNot(pdfFilePath: string, text: string, pageNum?: number, message: string, reverse?: boolean): void;
29
+
30
+ /**
31
+ * @summary Count the number of times specified text is present in a PDF file.
32
+ * @function count
33
+ * @param {String} pdfFilePath - Relative or absolute path to the pdf file.
34
+ * @param {String} text - Text to count.
35
+ * @param {Number=} pageNum - Page number.
36
+ * @param {Boolean=} reverse - Check also reverse variant of string.
37
+ * @return {Number} Number of times the specified text was found.
38
+ */
39
+ count(pdfFilePath: string, text: string, pageNum?: number, reverse?: boolean): void;
40
+ }
41
+ }
@@ -0,0 +1,100 @@
1
+ declare namespace Oxygen {
2
+ /**
3
+ * @name proxy
4
+ * @description Provides methods for intercepting network traffic via mitmproxy.
5
+ */
6
+ interface ModuleProxy {
7
+ /**
8
+ * @function init
9
+ * @summary Initializes proxy.
10
+ * @param {Number} proxyPort - Proxy port.
11
+ * @param {Number=} proxyCommPort - Port for internal proxy communication. If specified, then mitmproxy should be launched manually.
12
+ * Otherwise mitmpoxy will be launched automatically.
13
+ * @param {Boolean=} saveRequestBody - Save request bodies.
14
+ * @param {Boolean=} saveResponseBody - Save response bodies.
15
+ * @example <caption>[shell] Launching mitmproxy manually</caption>
16
+ * mitmdump --anticache -s mitmproxy-node\scripts\proxy.py --ssl-insecure --set httpCommPort=8765
17
+ */
18
+ init(proxyPort: number, proxyCommPort?: number | undefined, saveRequestBody?: boolean | undefined, saveResponseBody?: boolean | undefined): boolean;
19
+
20
+ /**
21
+ * @function dispose
22
+ * @summary Disposes this module.
23
+ */
24
+ dispose(status: any): void;
25
+
26
+ /**
27
+ * @summary Begin collecting network requests.
28
+ * @description Any previously collected requests will be discarded.
29
+ * @function start
30
+ * @example <caption>[javascript] Usage example</caption>
31
+ * proxy.init(8080);
32
+ * proxy.start();
33
+ * // print the collected request so far:
34
+ * let requests = proxy.getRequests();
35
+ * for (let req of requests) {
36
+ * log.info(req);
37
+ * }
38
+ * // wait for a request using a verbatim URL match:
39
+ * proxy.waitForUrl('https://www.yourwebsite.com/foo/bar');
40
+ * // wait for a request using a regular expression URL match:
41
+ * proxy.waitForUrl(/https:\/\/.*\/foo\/bar/);
42
+ * // wait for a request using a custom matcher:
43
+ * proxy.waitFor(function (request) {
44
+ * return request.status === '200' && request.url === 'https://www.yourwebsite.com/foo/bar';
45
+ * });
46
+ */
47
+ start(): void;
48
+
49
+ /**
50
+ * @summary Stop collecting network requests.
51
+ * @function stop
52
+ */
53
+ stop(): void;
54
+
55
+ /**
56
+ * @summary Return all the collected network requests so far.
57
+ * @function getRequests
58
+ * @return {Object[]} Array containing network requests.
59
+ */
60
+ getRequests(): any[];
61
+
62
+ /**
63
+ * @summary Wait for a network request matching the specified URL.
64
+ * @function waitForUrl
65
+ * @param {String|RegExp} pattern - An URL to match verbatim or a RegExp.
66
+ * @param {Number=} timeout - Timeout. Default is 60 seconds.
67
+ * @return {Object} Network request details if the network request was found.
68
+ */
69
+ waitForUrl(pattern: string | RegExp, timeout?: number | undefined): any;
70
+
71
+ /**
72
+ * @summary Wait for a network request.
73
+ * @function waitFor
74
+ * @param {Function} matcher - Matching function. Should return true on match, or false otherwise.
75
+ * @param {Number=} timeout - Timeout. Default is 60 seconds.
76
+ * @return {Object} Network request details if the network request was found.
77
+ */
78
+ waitFor(matcher: Function, timeout?: number | undefined): any;
79
+
80
+ /**
81
+ * @summary Assert if network request matching the specified URL.
82
+ * @function assertUrl
83
+ * @param {String|RegExp} url - A request URL to match verbatim or a RegExp.
84
+ * @param {Number=} timeout - Timeout. Default is 60 seconds.
85
+ * @return {Object} Network request details if the network request was found.
86
+ */
87
+ assertUrl(url: string | RegExp, timeout?: number | undefined): any;
88
+
89
+ /**
90
+ * @summary Assert whether HTTP response status code matches the specified value.
91
+ * @function assertStatusCode
92
+ * @param {String|RegExp} url - A request URL to match verbatim or a RegExp.
93
+ * @param {Number} statusCode - A response status code to match verbatim or a RegExp.
94
+ * @param {String=} failureMessage - An optional failure message.
95
+ * @param {Number=} timeout - Timeout. Default is 60 seconds.
96
+ * @return {Object} Network request details if the network request was found.
97
+ */
98
+ assertStatusCode(url: string | RegExp, statusCode: number, failureMessage?: string | undefined, timeout?: number | undefined): any;
99
+ }
100
+ }
@@ -0,0 +1,24 @@
1
+ declare namespace Oxygen {
2
+ /**
3
+ * @name shell
4
+ * @description Provides methods for working with operating system shell.
5
+ */
6
+ interface ModuleShell {
7
+ get name(): string;
8
+ /**
9
+ * @summary Execute command
10
+ * @description Spawn child process
11
+ * @function exec
12
+ * @param {String} command - Shell command to be executed, including arguments, if applicable.
13
+ * @return {String} null | Error | stdout result
14
+ */
15
+ exec(command: string, options?: {}): string;
16
+
17
+ /**
18
+ * @summary Assert whether the shell command output (stdout) is matching the specified pattern.
19
+ * @function assertOutput
20
+ * @param {String} pattern - Pattern to assert.
21
+ */
22
+ assertOutput(pattern: string): boolean;
23
+ }
24
+ }
@@ -0,0 +1,99 @@
1
+ /// <reference types="@types/node" />
2
+ declare namespace Oxygen {
3
+ interface ModuleUtils {
4
+ /**
5
+ * @summary Pause test execution for the given amount of milliseconds.
6
+ * @function pause
7
+ * @param {Number} ms - Milliseconds to pause the execution for.
8
+ */
9
+ pause(ms: number): void;
10
+
11
+ /**
12
+ * @summary Decrypt text
13
+ * @function decrypt
14
+ * @param {String} text - Text
15
+ * @return {Object} DecryptResult Object with getDecryptResult method
16
+ * @example <caption>[javascript] Usage example</caption>
17
+ * // to encrypt plaintext into ciphertext
18
+ * const encrypt = utils.encrypt('https://www.wikipedia.org');
19
+ * log.info(encrypt); // will print b757ba2c2fc50fbb511d596816ca06c4fa56f4e98ce222f30bc58d5251ed635e
20
+ *
21
+ * // to decrypt ciphertext and use it in script
22
+ * const decrypt = utils.decrypt(encrypt);
23
+ * log.info(decrypt); // will print ENCRYPTED
24
+ *
25
+ * web.init();
26
+ * web.open(decrypt); // will open https://www.wikipedia.org
27
+ *
28
+ * // to get original plaintext use getDecryptResult
29
+ * const value = decrypt.getDecryptResult();
30
+ * log.info(value); //will print https://www.wikipedia.org
31
+ */
32
+ decrypt(text: string): any;
33
+
34
+ /**
35
+ * @summary Encrypt text
36
+ * @function encrypt
37
+ * @param {String} text - Text
38
+ * @return {String} Encrypted text
39
+ * @example <caption>[javascript] Usage example</caption>
40
+ * // to encrypt plaintext into ciphertext
41
+ * const encrypt = utils.encrypt('https://www.wikipedia.org');
42
+ * log.info(encrypt); // will print b757ba2c2fc50fbb511d596816ca06c4fa56f4e98ce222f30bc58d5251ed635e
43
+ *
44
+ * // to decrypt ciphertext and use it in script
45
+ * const decrypt = utils.decrypt(encrypt);
46
+ * log.info(decrypt); // will print ENCRYPTED
47
+ *
48
+ * web.init();
49
+ * web.open(decrypt); // will open https://www.wikipedia.org
50
+ *
51
+ * // to get original plaintext use getDecryptResult
52
+ * const value = decrypt.getDecryptResult();
53
+ * log.info(value); //will print https://www.wikipedia.org
54
+ */
55
+ encrypt(text: string): string;
56
+
57
+ /**
58
+ * @summary Reads data from csv file
59
+ * @function readCsv
60
+ * @param {String} filePath - Absolute path to file
61
+ * @param {Object=} options - [Options](https://csv.js.org/parse/options/)
62
+ */
63
+ readCsv(filePath: string, options?: any | undefined): any;
64
+
65
+ /**
66
+ * @summary Writes data into csv file
67
+ * @function writeCsv
68
+ * @param {String} filePath - Absolute path to file
69
+ * @param {Array} data - CSV data in format [{column_name_1: 'foo', column_name_2: 'bar'}]
70
+ * @param {Object=} options - [Options](https://github.com/anton-bot/objects-to-csv#async-todiskfilename-options)
71
+ */
72
+ writeCsv(filePath: string, data: any[], options?: any | undefined): void;
73
+
74
+ /**
75
+ * @summary Reads data from Xlsx file
76
+ * @function readXlsx
77
+ * @param {String} filePath - Absolute path to file
78
+ * @return {Array} - Array of xlsx data
79
+ */
80
+ readXlsx(filePath: string): any[];
81
+
82
+ /**
83
+ * @summary Uses the DNS protocol to resolve a host name
84
+ * @function dnsResolve
85
+ * @param {String} hostname - Host name to resolve.
86
+ * @param {String=} rrType - Resource record type. Default: 'A'.
87
+ * @return {String[] | Object} - Array or Object of resource records. The type and structure of individual results vary based on rrtype
88
+ */
89
+ dnsResolve(hostname: string, rrType?: string | undefined): string[] | any;
90
+
91
+ /**
92
+ * @summary Parse XML data to JS object
93
+ * @function xmlToJson
94
+ * @param {string|Buffer} xmlDataStr - Like <root a="nice" b="very nice" ><a>wow</a></root>
95
+ * @param {boolean|Object} options - [Options](https://github.com/NaturalIntelligence/fast-xml-parser/blob/master/docs/v4/2.XMLparseOptions.md)
96
+ */
97
+ xmlToJson(xmlDataStr: string | Buffer, options?: boolean | any): any;
98
+ }
99
+ }