@intuned/runtime 1.3.16 → 1.3.18-interface.6

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 (295) hide show
  1. package/bin/intuned +0 -0
  2. package/bin/intuned-interface +7 -0
  3. package/dist/chunk-6ZRJOUQS.mjs +16 -0
  4. package/dist/chunk-6ZRJOUQS.mjs.map +1 -0
  5. package/dist/chunk-7YL2JUTE.mjs +146 -0
  6. package/dist/chunk-7YL2JUTE.mjs.map +1 -0
  7. package/dist/chunk-B3T6RXPC.mjs +794 -0
  8. package/dist/chunk-B3T6RXPC.mjs.map +1 -0
  9. package/dist/chunk-FGV5T6SI.mjs +27 -0
  10. package/dist/chunk-FGV5T6SI.mjs.map +1 -0
  11. package/dist/chunk-G4PO5RIV.mjs +85 -0
  12. package/dist/chunk-G4PO5RIV.mjs.map +1 -0
  13. package/dist/chunk-LZOMFHX3.mjs +38 -0
  14. package/dist/chunk-LZOMFHX3.mjs.map +1 -0
  15. package/dist/{common/formatZodError.js → chunk-NDMVGENG.mjs} +9 -9
  16. package/dist/chunk-NDMVGENG.mjs.map +1 -0
  17. package/dist/chunk-W4UX6G4X.mjs +17 -0
  18. package/dist/chunk-W4UX6G4X.mjs.map +1 -0
  19. package/dist/chunk-XC75QGFG.mjs +1106 -0
  20. package/dist/chunk-XC75QGFG.mjs.map +1 -0
  21. package/dist/chunk-XOAZ2MGA.mjs +59 -0
  22. package/dist/chunk-XOAZ2MGA.mjs.map +1 -0
  23. package/dist/commands/interface/run.d.mts +3 -0
  24. package/dist/commands/interface/run.d.ts +3 -1
  25. package/dist/commands/interface/run.js +2060 -178
  26. package/dist/commands/interface/run.js.map +1 -0
  27. package/dist/commands/interface/run.mjs +255 -0
  28. package/dist/commands/interface/run.mjs.map +1 -0
  29. package/dist/common/asyncLocalStorage/index.d.mts +17 -0
  30. package/dist/common/asyncLocalStorage/index.d.ts +9 -8
  31. package/dist/common/asyncLocalStorage/index.js +34 -9
  32. package/dist/common/asyncLocalStorage/index.js.map +1 -0
  33. package/dist/common/asyncLocalStorage/index.mjs +12 -0
  34. package/dist/common/asyncLocalStorage/index.mjs.map +1 -0
  35. package/dist/common/binStartupScript.d.mts +2 -0
  36. package/dist/common/binStartupScript.d.ts +2 -1
  37. package/dist/common/binStartupScript.js +127 -11
  38. package/dist/common/binStartupScript.js.map +1 -0
  39. package/dist/common/binStartupScript.mjs +135 -0
  40. package/dist/common/binStartupScript.mjs.map +1 -0
  41. package/dist/common/cleanEnvironmentVariables.d.mts +3 -0
  42. package/dist/common/cleanEnvironmentVariables.d.ts +3 -1
  43. package/dist/common/cleanEnvironmentVariables.js +30 -7
  44. package/dist/common/cleanEnvironmentVariables.js.map +1 -0
  45. package/dist/common/cleanEnvironmentVariables.mjs +8 -0
  46. package/dist/common/cleanEnvironmentVariables.mjs.map +1 -0
  47. package/dist/common/constants.d.mts +13 -0
  48. package/dist/common/constants.d.ts +13 -10
  49. package/dist/common/constants.js +58 -14
  50. package/dist/common/constants.js.map +1 -0
  51. package/dist/common/constants.mjs +28 -0
  52. package/dist/common/constants.mjs.map +1 -0
  53. package/dist/common/contextStorageStateHelpers.d.mts +24 -0
  54. package/dist/common/contextStorageStateHelpers.d.ts +8 -5
  55. package/dist/common/contextStorageStateHelpers.js +51 -23
  56. package/dist/common/contextStorageStateHelpers.js.map +1 -0
  57. package/dist/common/contextStorageStateHelpers.mjs +10 -0
  58. package/dist/common/contextStorageStateHelpers.mjs.map +1 -0
  59. package/dist/common/jwtTokenManager.d.mts +19 -0
  60. package/dist/common/jwtTokenManager.d.ts +6 -4
  61. package/dist/common/jwtTokenManager.js +112 -40
  62. package/dist/common/jwtTokenManager.js.map +1 -0
  63. package/dist/common/jwtTokenManager.mjs +11 -0
  64. package/dist/common/jwtTokenManager.mjs.map +1 -0
  65. package/dist/common/runApi/index.d.mts +11 -0
  66. package/dist/common/runApi/index.d.ts +10 -10
  67. package/dist/common/runApi/index.js +1776 -93
  68. package/dist/common/runApi/index.js.map +1 -0
  69. package/dist/common/runApi/index.mjs +18 -0
  70. package/dist/common/runApi/index.mjs.map +1 -0
  71. package/dist/common/settingsSchema.d.mts +536 -0
  72. package/dist/common/settingsSchema.d.ts +9 -6
  73. package/dist/common/settingsSchema.js +55 -20
  74. package/dist/common/settingsSchema.js.map +1 -0
  75. package/dist/common/settingsSchema.mjs +10 -0
  76. package/dist/common/settingsSchema.mjs.map +1 -0
  77. package/dist/common/telemetry.d.mts +6 -0
  78. package/dist/common/telemetry.d.ts +6 -3
  79. package/dist/common/telemetry.js +41 -9
  80. package/dist/common/telemetry.js.map +1 -0
  81. package/dist/common/telemetry.mjs +31 -0
  82. package/dist/common/telemetry.mjs.map +1 -0
  83. package/dist/export.d-BAUMB-lG.d.mts +140 -0
  84. package/dist/export.d-BAUMB-lG.d.ts +140 -0
  85. package/dist/index.d.mts +6 -0
  86. package/dist/index.d.ts +6 -5
  87. package/dist/index.js +783 -98
  88. package/dist/index.js.map +1 -0
  89. package/dist/index.mjs +47 -0
  90. package/dist/index.mjs.map +1 -0
  91. package/dist/runtime/index.d.mts +163 -0
  92. package/dist/runtime/index.d.ts +163 -10
  93. package/dist/runtime/index.js +779 -88
  94. package/dist/runtime/index.js.map +1 -0
  95. package/dist/runtime/index.mjs +42 -0
  96. package/dist/runtime/index.mjs.map +1 -0
  97. package/package.json +80 -23
  98. package/.babelrc +0 -21
  99. package/.eslintignore +0 -10
  100. package/.eslintrc.js +0 -39
  101. package/InterfaceTemplate/index.playwright.ts +0 -6
  102. package/InterfaceTemplate/utils.ts +0 -61
  103. package/dist/commands/api/run.d.ts +0 -6
  104. package/dist/commands/api/run.js +0 -123
  105. package/dist/commands/auth-sessions/load.d.ts +0 -2
  106. package/dist/commands/auth-sessions/load.js +0 -35
  107. package/dist/commands/auth-sessions/run-check.d.ts +0 -2
  108. package/dist/commands/auth-sessions/run-check.js +0 -74
  109. package/dist/commands/auth-sessions/run-create.d.ts +0 -2
  110. package/dist/commands/auth-sessions/run-create.js +0 -78
  111. package/dist/commands/browser/save-state.d.ts +0 -2
  112. package/dist/commands/browser/save-state.js +0 -17
  113. package/dist/commands/browser/start-browser.d.ts +0 -2
  114. package/dist/commands/browser/start-browser.js +0 -14
  115. package/dist/commands/build.d.ts +0 -1
  116. package/dist/commands/build.js +0 -84
  117. package/dist/commands/common/browserUtils.d.ts +0 -14
  118. package/dist/commands/common/browserUtils.js +0 -58
  119. package/dist/commands/common/getFirstLineNumber.d.ts +0 -9
  120. package/dist/commands/common/getFirstLineNumber.js +0 -101
  121. package/dist/commands/common/getFirstLineNumber.test.js +0 -228
  122. package/dist/commands/common/projectExclusions.d.ts +0 -2
  123. package/dist/commands/common/projectExclusions.js +0 -8
  124. package/dist/commands/common/sendMessageToClient.d.ts +0 -1
  125. package/dist/commands/common/sendMessageToClient.js +0 -10
  126. package/dist/commands/common/tsNodeImport.d.ts +0 -2
  127. package/dist/commands/common/tsNodeImport.js +0 -34
  128. package/dist/commands/common/utils/fileUtils.d.ts +0 -6
  129. package/dist/commands/common/utils/fileUtils.js +0 -33
  130. package/dist/commands/common/utils/settings.d.ts +0 -2
  131. package/dist/commands/common/utils/settings.js +0 -31
  132. package/dist/commands/common/utils/template.d.ts +0 -2
  133. package/dist/commands/common/utils/template.js +0 -31
  134. package/dist/commands/common/utils/unixSocket.d.ts +0 -23
  135. package/dist/commands/common/utils/unixSocket.js +0 -87
  136. package/dist/commands/get-headless-user-agent.d.ts +0 -1
  137. package/dist/commands/get-headless-user-agent.js +0 -18
  138. package/dist/commands/intuned-cli/commands/attempt.command.d.ts +0 -1
  139. package/dist/commands/intuned-cli/commands/attempt.command.js +0 -8
  140. package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +0 -1
  141. package/dist/commands/intuned-cli/commands/attempt_api.command.js +0 -30
  142. package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +0 -1
  143. package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +0 -8
  144. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +0 -1
  145. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +0 -19
  146. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +0 -1
  147. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +0 -24
  148. package/dist/commands/intuned-cli/commands/authsession.command.d.ts +0 -1
  149. package/dist/commands/intuned-cli/commands/authsession.command.js +0 -8
  150. package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +0 -1
  151. package/dist/commands/intuned-cli/commands/authsession_record.command.js +0 -32
  152. package/dist/commands/intuned-cli/commands/build.command.d.ts +0 -1
  153. package/dist/commands/intuned-cli/commands/build.command.js +0 -12
  154. package/dist/commands/intuned-cli/commands/command.d.ts +0 -2
  155. package/dist/commands/intuned-cli/commands/command.js +0 -9
  156. package/dist/commands/intuned-cli/commands/deploy.command.d.ts +0 -1
  157. package/dist/commands/intuned-cli/commands/deploy.command.js +0 -38
  158. package/dist/commands/intuned-cli/commands/index.d.ts +0 -18
  159. package/dist/commands/intuned-cli/commands/index.js +0 -203
  160. package/dist/commands/intuned-cli/commands/init.command.d.ts +0 -1
  161. package/dist/commands/intuned-cli/commands/init.command.js +0 -13
  162. package/dist/commands/intuned-cli/commands/run.command.d.ts +0 -1
  163. package/dist/commands/intuned-cli/commands/run.command.js +0 -8
  164. package/dist/commands/intuned-cli/commands/run_api.command.d.ts +0 -1
  165. package/dist/commands/intuned-cli/commands/run_api.command.js +0 -46
  166. package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +0 -31
  167. package/dist/commands/intuned-cli/commands/run_authsession.command.js +0 -17
  168. package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +0 -1
  169. package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +0 -35
  170. package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +0 -1
  171. package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +0 -35
  172. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +0 -1
  173. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +0 -33
  174. package/dist/commands/intuned-cli/commands/save.command.d.ts +0 -13
  175. package/dist/commands/intuned-cli/commands/save.command.js +0 -42
  176. package/dist/commands/intuned-cli/commands/types.d.ts +0 -35
  177. package/dist/commands/intuned-cli/commands/types.js +0 -31
  178. package/dist/commands/intuned-cli/constants/index.d.ts +0 -17
  179. package/dist/commands/intuned-cli/constants/index.js +0 -25
  180. package/dist/commands/intuned-cli/controller/__test__/api.test.js +0 -397
  181. package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +0 -1059
  182. package/dist/commands/intuned-cli/controller/api.d.ts +0 -42
  183. package/dist/commands/intuned-cli/controller/api.js +0 -191
  184. package/dist/commands/intuned-cli/controller/authSession.d.ts +0 -209
  185. package/dist/commands/intuned-cli/controller/authSession.js +0 -424
  186. package/dist/commands/intuned-cli/controller/build.d.ts +0 -1
  187. package/dist/commands/intuned-cli/controller/build.js +0 -36
  188. package/dist/commands/intuned-cli/controller/deploy.d.ts +0 -5
  189. package/dist/commands/intuned-cli/controller/deploy.js +0 -276
  190. package/dist/commands/intuned-cli/controller/index.d.ts +0 -1
  191. package/dist/commands/intuned-cli/controller/index.js +0 -46
  192. package/dist/commands/intuned-cli/controller/save.d.ts +0 -17
  193. package/dist/commands/intuned-cli/controller/save.js +0 -351
  194. package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +0 -114
  195. package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +0 -40
  196. package/dist/commands/intuned-cli/helpers/api.d.ts +0 -3
  197. package/dist/commands/intuned-cli/helpers/api.js +0 -19
  198. package/dist/commands/intuned-cli/helpers/auth.d.ts +0 -46
  199. package/dist/commands/intuned-cli/helpers/auth.js +0 -144
  200. package/dist/commands/intuned-cli/helpers/backend.d.ts +0 -8
  201. package/dist/commands/intuned-cli/helpers/backend.js +0 -27
  202. package/dist/commands/intuned-cli/helpers/browser.d.ts +0 -15
  203. package/dist/commands/intuned-cli/helpers/browser.js +0 -64
  204. package/dist/commands/intuned-cli/helpers/context.d.ts +0 -3
  205. package/dist/commands/intuned-cli/helpers/context.js +0 -33
  206. package/dist/commands/intuned-cli/helpers/errors.d.ts +0 -16
  207. package/dist/commands/intuned-cli/helpers/errors.js +0 -44
  208. package/dist/commands/intuned-cli/helpers/index.d.ts +0 -12
  209. package/dist/commands/intuned-cli/helpers/index.js +0 -137
  210. package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +0 -39
  211. package/dist/commands/intuned-cli/helpers/intunedJson.js +0 -20
  212. package/dist/commands/intuned-cli/helpers/proxy.d.ts +0 -5
  213. package/dist/commands/intuned-cli/helpers/proxy.js +0 -23
  214. package/dist/commands/intuned-cli/helpers/terminal.d.ts +0 -5
  215. package/dist/commands/intuned-cli/helpers/terminal.js +0 -13
  216. package/dist/commands/intuned-cli/helpers/timeout.d.ts +0 -1
  217. package/dist/commands/intuned-cli/helpers/timeout.js +0 -23
  218. package/dist/commands/intuned-cli/helpers/traces.d.ts +0 -2
  219. package/dist/commands/intuned-cli/helpers/traces.js +0 -32
  220. package/dist/commands/intuned-cli/helpers/validation.d.ts +0 -2
  221. package/dist/commands/intuned-cli/helpers/validation.js +0 -14
  222. package/dist/commands/intuned-cli/helpers/wrapper.d.ts +0 -2
  223. package/dist/commands/intuned-cli/helpers/wrapper.js +0 -66
  224. package/dist/commands/intuned-cli/index.d.ts +0 -1
  225. package/dist/commands/intuned-cli/index.js +0 -16
  226. package/dist/commands/intuned-cli/main.d.ts +0 -1
  227. package/dist/commands/intuned-cli/main.js +0 -23
  228. package/dist/commands/intuned-cli/types.d.ts +0 -41
  229. package/dist/commands/intuned-cli/types.js +0 -12
  230. package/dist/commands/ts-check.d.ts +0 -2
  231. package/dist/commands/ts-check.js +0 -56
  232. package/dist/common/Logger/Logger/index.d.ts +0 -12
  233. package/dist/common/Logger/Logger/index.js +0 -60
  234. package/dist/common/Logger/Logger/types.d.ts +0 -8
  235. package/dist/common/Logger/Logger/types.js +0 -5
  236. package/dist/common/Logger/index.d.ts +0 -12
  237. package/dist/common/Logger/index.js +0 -60
  238. package/dist/common/Logger/types.d.ts +0 -8
  239. package/dist/common/Logger/types.js +0 -5
  240. package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +0 -1
  241. package/dist/common/backendFunctions/getAuthSessionParameters.js +0 -38
  242. package/dist/common/extension/extensionsHelpers.d.ts +0 -11
  243. package/dist/common/extension/extensionsHelpers.js +0 -147
  244. package/dist/common/extension/intunedExtensionServer.d.ts +0 -24
  245. package/dist/common/extension/intunedExtensionServer.js +0 -178
  246. package/dist/common/extension/types.d.ts +0 -212
  247. package/dist/common/extension/types.js +0 -51
  248. package/dist/common/formatZodError.d.ts +0 -2
  249. package/dist/common/intunedJson.d.ts +0 -229
  250. package/dist/common/intunedJson.js +0 -133
  251. package/dist/common/launchBrowser.d.ts +0 -31
  252. package/dist/common/launchBrowser.js +0 -207
  253. package/dist/common/playwrightContext.d.ts +0 -31
  254. package/dist/common/playwrightContext.js +0 -144
  255. package/dist/common/runApi/errors.d.ts +0 -72
  256. package/dist/common/runApi/errors.js +0 -169
  257. package/dist/common/runApi/importUsingImportFunction.d.ts +0 -9
  258. package/dist/common/runApi/importUsingImportFunction.js +0 -46
  259. package/dist/common/runApi/types.d.ts +0 -830
  260. package/dist/common/runApi/types.js +0 -73
  261. package/dist/common/setupContextHook.d.ts +0 -17
  262. package/dist/common/setupContextHook.js +0 -22
  263. package/dist/runtime/RunError.d.ts +0 -5
  264. package/dist/runtime/RunError.js +0 -19
  265. package/dist/runtime/attemptStore.d.ts +0 -2
  266. package/dist/runtime/attemptStore.js +0 -23
  267. package/dist/runtime/captcha.d.ts +0 -15
  268. package/dist/runtime/captcha.js +0 -191
  269. package/dist/runtime/captcha.test.js +0 -821
  270. package/dist/runtime/downloadDirectory.d.ts +0 -1
  271. package/dist/runtime/downloadDirectory.js +0 -19
  272. package/dist/runtime/enums.d.js +0 -5
  273. package/dist/runtime/enums.d.ts +0 -11
  274. package/dist/runtime/enums.js +0 -18
  275. package/dist/runtime/executionHelpers.test.js +0 -52
  276. package/dist/runtime/export.d.js +0 -5
  277. package/dist/runtime/export.d.ts +0 -284
  278. package/dist/runtime/extendPayload.d.ts +0 -2
  279. package/dist/runtime/extendPayload.js +0 -21
  280. package/dist/runtime/extendTimeout.d.ts +0 -1
  281. package/dist/runtime/extendTimeout.js +0 -23
  282. package/dist/runtime/getAiGatewayConfig.d.ts +0 -10
  283. package/dist/runtime/getAiGatewayConfig.js +0 -16
  284. package/dist/runtime/getAuthSessionParameters.d.ts +0 -1
  285. package/dist/runtime/getAuthSessionParameters.js +0 -20
  286. package/dist/runtime/persistentStore.d.ts +0 -2
  287. package/dist/runtime/persistentStore.js +0 -37
  288. package/dist/runtime/persistentStore.test.js +0 -101
  289. package/dist/runtime/runInfo.d.ts +0 -2
  290. package/dist/runtime/runInfo.js +0 -21
  291. package/template.tsconfig.json +0 -11
  292. package/tsconfig.eslint.json +0 -5
  293. package/tsconfig.json +0 -25
  294. package/typedoc.json +0 -49
  295. /package/dist/common/assets/{browser_scripts.js → assets/browser_scripts.js} +0 -0
@@ -1,830 +0,0 @@
1
- import type { StorageState } from "../contextStorageStateHelpers";
2
- import type { Payload } from "../../runtime/export";
3
- import type { Result } from "neverthrow";
4
- import type { RunAutomationError } from "./errors";
5
- import z from "zod";
6
- export interface PayloadToAppend {
7
- apiName: string;
8
- parameters: Record<string, any>;
9
- }
10
- export interface RunAutomationSuccessResult {
11
- result: any;
12
- status: number;
13
- payloadToAppend: PayloadToAppend[] | null;
14
- session?: StorageState;
15
- }
16
- export interface RunAutomationErrorResult {
17
- error: string;
18
- message: string;
19
- status?: number;
20
- details?: any;
21
- [key: string]: any;
22
- }
23
- export type RunAutomationResult = RunAutomationSuccessResult | RunAutomationErrorResult;
24
- export interface RunAutomationResponse {
25
- status: number;
26
- body: RunAutomationResult;
27
- }
28
- export declare const runApiStorageStateSchema: z.ZodObject<{
29
- cookies: z.ZodArray<z.ZodObject<{
30
- name: z.ZodString;
31
- value: z.ZodString;
32
- domain: z.ZodString;
33
- path: z.ZodString;
34
- expires: z.ZodNumber;
35
- httpOnly: z.ZodBoolean;
36
- secure: z.ZodBoolean;
37
- sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
38
- }, "strip", z.ZodTypeAny, {
39
- path: string;
40
- value: string;
41
- domain: string;
42
- name: string;
43
- expires: number;
44
- httpOnly: boolean;
45
- secure: boolean;
46
- sameSite: "Strict" | "Lax" | "None";
47
- }, {
48
- path: string;
49
- value: string;
50
- domain: string;
51
- name: string;
52
- expires: number;
53
- httpOnly: boolean;
54
- secure: boolean;
55
- sameSite: "Strict" | "Lax" | "None";
56
- }>, "many">;
57
- origins: z.ZodArray<z.ZodObject<{
58
- origin: z.ZodString;
59
- localStorage: z.ZodArray<z.ZodObject<{
60
- name: z.ZodString;
61
- value: z.ZodString;
62
- }, "strip", z.ZodTypeAny, {
63
- value: string;
64
- name: string;
65
- }, {
66
- value: string;
67
- name: string;
68
- }>, "many">;
69
- }, "strip", z.ZodTypeAny, {
70
- origin: string;
71
- localStorage: {
72
- value: string;
73
- name: string;
74
- }[];
75
- }, {
76
- origin: string;
77
- localStorage: {
78
- value: string;
79
- name: string;
80
- }[];
81
- }>, "many">;
82
- sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
83
- origin: z.ZodString;
84
- sessionStorage: z.ZodArray<z.ZodObject<{
85
- name: z.ZodString;
86
- value: z.ZodString;
87
- }, "strip", z.ZodTypeAny, {
88
- value: string;
89
- name: string;
90
- }, {
91
- value: string;
92
- name: string;
93
- }>, "many">;
94
- }, "strip", z.ZodTypeAny, {
95
- origin: string;
96
- sessionStorage: {
97
- value: string;
98
- name: string;
99
- }[];
100
- }, {
101
- origin: string;
102
- sessionStorage: {
103
- value: string;
104
- name: string;
105
- }[];
106
- }>, "many">>;
107
- }, "strip", z.ZodTypeAny, {
108
- cookies: {
109
- path: string;
110
- value: string;
111
- domain: string;
112
- name: string;
113
- expires: number;
114
- httpOnly: boolean;
115
- secure: boolean;
116
- sameSite: "Strict" | "Lax" | "None";
117
- }[];
118
- origins: {
119
- origin: string;
120
- localStorage: {
121
- value: string;
122
- name: string;
123
- }[];
124
- }[];
125
- sessionStorage?: {
126
- origin: string;
127
- sessionStorage: {
128
- value: string;
129
- name: string;
130
- }[];
131
- }[] | undefined;
132
- }, {
133
- cookies: {
134
- path: string;
135
- value: string;
136
- domain: string;
137
- name: string;
138
- expires: number;
139
- httpOnly: boolean;
140
- secure: boolean;
141
- sameSite: "Strict" | "Lax" | "None";
142
- }[];
143
- origins: {
144
- origin: string;
145
- localStorage: {
146
- value: string;
147
- name: string;
148
- }[];
149
- }[];
150
- sessionStorage?: {
151
- origin: string;
152
- sessionStorage: {
153
- value: string;
154
- name: string;
155
- }[];
156
- }[] | undefined;
157
- }>;
158
- export type RunApiStorageState = z.input<typeof runApiStorageStateSchema>;
159
- export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
160
- type: z.ZodLiteral<"file">;
161
- path: z.ZodString;
162
- }, "strip", z.ZodTypeAny, {
163
- path: string;
164
- type: "file";
165
- }, {
166
- path: string;
167
- type: "file";
168
- }>, z.ZodObject<{
169
- type: z.ZodLiteral<"state">;
170
- state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
171
- cookies: z.ZodArray<z.ZodObject<{
172
- name: z.ZodString;
173
- value: z.ZodString;
174
- domain: z.ZodString;
175
- path: z.ZodString;
176
- expires: z.ZodNumber;
177
- httpOnly: z.ZodBoolean;
178
- secure: z.ZodBoolean;
179
- sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
180
- }, "strip", z.ZodTypeAny, {
181
- path: string;
182
- value: string;
183
- domain: string;
184
- name: string;
185
- expires: number;
186
- httpOnly: boolean;
187
- secure: boolean;
188
- sameSite: "Strict" | "Lax" | "None";
189
- }, {
190
- path: string;
191
- value: string;
192
- domain: string;
193
- name: string;
194
- expires: number;
195
- httpOnly: boolean;
196
- secure: boolean;
197
- sameSite: "Strict" | "Lax" | "None";
198
- }>, "many">;
199
- origins: z.ZodArray<z.ZodObject<{
200
- origin: z.ZodString;
201
- localStorage: z.ZodArray<z.ZodObject<{
202
- name: z.ZodString;
203
- value: z.ZodString;
204
- }, "strip", z.ZodTypeAny, {
205
- value: string;
206
- name: string;
207
- }, {
208
- value: string;
209
- name: string;
210
- }>, "many">;
211
- }, "strip", z.ZodTypeAny, {
212
- origin: string;
213
- localStorage: {
214
- value: string;
215
- name: string;
216
- }[];
217
- }, {
218
- origin: string;
219
- localStorage: {
220
- value: string;
221
- name: string;
222
- }[];
223
- }>, "many">;
224
- sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
- origin: z.ZodString;
226
- sessionStorage: z.ZodArray<z.ZodObject<{
227
- name: z.ZodString;
228
- value: z.ZodString;
229
- }, "strip", z.ZodTypeAny, {
230
- value: string;
231
- name: string;
232
- }, {
233
- value: string;
234
- name: string;
235
- }>, "many">;
236
- }, "strip", z.ZodTypeAny, {
237
- origin: string;
238
- sessionStorage: {
239
- value: string;
240
- name: string;
241
- }[];
242
- }, {
243
- origin: string;
244
- sessionStorage: {
245
- value: string;
246
- name: string;
247
- }[];
248
- }>, "many">>;
249
- }, "strip", z.ZodTypeAny, {
250
- cookies: {
251
- path: string;
252
- value: string;
253
- domain: string;
254
- name: string;
255
- expires: number;
256
- httpOnly: boolean;
257
- secure: boolean;
258
- sameSite: "Strict" | "Lax" | "None";
259
- }[];
260
- origins: {
261
- origin: string;
262
- localStorage: {
263
- value: string;
264
- name: string;
265
- }[];
266
- }[];
267
- sessionStorage?: {
268
- origin: string;
269
- sessionStorage: {
270
- value: string;
271
- name: string;
272
- }[];
273
- }[] | undefined;
274
- }, {
275
- cookies: {
276
- path: string;
277
- value: string;
278
- domain: string;
279
- name: string;
280
- expires: number;
281
- httpOnly: boolean;
282
- secure: boolean;
283
- sameSite: "Strict" | "Lax" | "None";
284
- }[];
285
- origins: {
286
- origin: string;
287
- localStorage: {
288
- value: string;
289
- name: string;
290
- }[];
291
- }[];
292
- sessionStorage?: {
293
- origin: string;
294
- sessionStorage: {
295
- value: string;
296
- name: string;
297
- }[];
298
- }[] | undefined;
299
- }>>>;
300
- }, "strip", z.ZodTypeAny, {
301
- type: "state";
302
- state?: {
303
- cookies: {
304
- path: string;
305
- value: string;
306
- domain: string;
307
- name: string;
308
- expires: number;
309
- httpOnly: boolean;
310
- secure: boolean;
311
- sameSite: "Strict" | "Lax" | "None";
312
- }[];
313
- origins: {
314
- origin: string;
315
- localStorage: {
316
- value: string;
317
- name: string;
318
- }[];
319
- }[];
320
- sessionStorage?: {
321
- origin: string;
322
- sessionStorage: {
323
- value: string;
324
- name: string;
325
- }[];
326
- }[] | undefined;
327
- } | null | undefined;
328
- }, {
329
- type: "state";
330
- state?: {
331
- cookies: {
332
- path: string;
333
- value: string;
334
- domain: string;
335
- name: string;
336
- expires: number;
337
- httpOnly: boolean;
338
- secure: boolean;
339
- sameSite: "Strict" | "Lax" | "None";
340
- }[];
341
- origins: {
342
- origin: string;
343
- localStorage: {
344
- value: string;
345
- name: string;
346
- }[];
347
- }[];
348
- sessionStorage?: {
349
- origin: string;
350
- sessionStorage: {
351
- value: string;
352
- name: string;
353
- }[];
354
- }[] | undefined;
355
- } | null | undefined;
356
- }>]>;
357
- export declare const runApiParametersSchema: z.ZodObject<{
358
- automationFunction: z.ZodObject<{
359
- name: z.ZodString;
360
- params: z.ZodOptional<z.ZodAny>;
361
- }, "strip", z.ZodTypeAny, {
362
- name: string;
363
- params?: any;
364
- }, {
365
- name: string;
366
- params?: any;
367
- }>;
368
- tracing: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"enabled", [z.ZodObject<{
369
- enabled: z.ZodLiteral<false>;
370
- }, "strip", z.ZodTypeAny, {
371
- enabled: false;
372
- }, {
373
- enabled: false;
374
- }>, z.ZodObject<{
375
- enabled: z.ZodLiteral<true>;
376
- filePath: z.ZodString;
377
- }, "strip", z.ZodTypeAny, {
378
- enabled: true;
379
- filePath: string;
380
- }, {
381
- enabled: true;
382
- filePath: string;
383
- }>]>>>;
384
- auth: z.ZodOptional<z.ZodObject<{
385
- session: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
386
- type: z.ZodLiteral<"file">;
387
- path: z.ZodString;
388
- }, "strip", z.ZodTypeAny, {
389
- path: string;
390
- type: "file";
391
- }, {
392
- path: string;
393
- type: "file";
394
- }>, z.ZodObject<{
395
- type: z.ZodLiteral<"state">;
396
- state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
397
- cookies: z.ZodArray<z.ZodObject<{
398
- name: z.ZodString;
399
- value: z.ZodString;
400
- domain: z.ZodString;
401
- path: z.ZodString;
402
- expires: z.ZodNumber;
403
- httpOnly: z.ZodBoolean;
404
- secure: z.ZodBoolean;
405
- sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
406
- }, "strip", z.ZodTypeAny, {
407
- path: string;
408
- value: string;
409
- domain: string;
410
- name: string;
411
- expires: number;
412
- httpOnly: boolean;
413
- secure: boolean;
414
- sameSite: "Strict" | "Lax" | "None";
415
- }, {
416
- path: string;
417
- value: string;
418
- domain: string;
419
- name: string;
420
- expires: number;
421
- httpOnly: boolean;
422
- secure: boolean;
423
- sameSite: "Strict" | "Lax" | "None";
424
- }>, "many">;
425
- origins: z.ZodArray<z.ZodObject<{
426
- origin: z.ZodString;
427
- localStorage: z.ZodArray<z.ZodObject<{
428
- name: z.ZodString;
429
- value: z.ZodString;
430
- }, "strip", z.ZodTypeAny, {
431
- value: string;
432
- name: string;
433
- }, {
434
- value: string;
435
- name: string;
436
- }>, "many">;
437
- }, "strip", z.ZodTypeAny, {
438
- origin: string;
439
- localStorage: {
440
- value: string;
441
- name: string;
442
- }[];
443
- }, {
444
- origin: string;
445
- localStorage: {
446
- value: string;
447
- name: string;
448
- }[];
449
- }>, "many">;
450
- sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
451
- origin: z.ZodString;
452
- sessionStorage: z.ZodArray<z.ZodObject<{
453
- name: z.ZodString;
454
- value: z.ZodString;
455
- }, "strip", z.ZodTypeAny, {
456
- value: string;
457
- name: string;
458
- }, {
459
- value: string;
460
- name: string;
461
- }>, "many">;
462
- }, "strip", z.ZodTypeAny, {
463
- origin: string;
464
- sessionStorage: {
465
- value: string;
466
- name: string;
467
- }[];
468
- }, {
469
- origin: string;
470
- sessionStorage: {
471
- value: string;
472
- name: string;
473
- }[];
474
- }>, "many">>;
475
- }, "strip", z.ZodTypeAny, {
476
- cookies: {
477
- path: string;
478
- value: string;
479
- domain: string;
480
- name: string;
481
- expires: number;
482
- httpOnly: boolean;
483
- secure: boolean;
484
- sameSite: "Strict" | "Lax" | "None";
485
- }[];
486
- origins: {
487
- origin: string;
488
- localStorage: {
489
- value: string;
490
- name: string;
491
- }[];
492
- }[];
493
- sessionStorage?: {
494
- origin: string;
495
- sessionStorage: {
496
- value: string;
497
- name: string;
498
- }[];
499
- }[] | undefined;
500
- }, {
501
- cookies: {
502
- path: string;
503
- value: string;
504
- domain: string;
505
- name: string;
506
- expires: number;
507
- httpOnly: boolean;
508
- secure: boolean;
509
- sameSite: "Strict" | "Lax" | "None";
510
- }[];
511
- origins: {
512
- origin: string;
513
- localStorage: {
514
- value: string;
515
- name: string;
516
- }[];
517
- }[];
518
- sessionStorage?: {
519
- origin: string;
520
- sessionStorage: {
521
- value: string;
522
- name: string;
523
- }[];
524
- }[] | undefined;
525
- }>>>;
526
- }, "strip", z.ZodTypeAny, {
527
- type: "state";
528
- state?: {
529
- cookies: {
530
- path: string;
531
- value: string;
532
- domain: string;
533
- name: string;
534
- expires: number;
535
- httpOnly: boolean;
536
- secure: boolean;
537
- sameSite: "Strict" | "Lax" | "None";
538
- }[];
539
- origins: {
540
- origin: string;
541
- localStorage: {
542
- value: string;
543
- name: string;
544
- }[];
545
- }[];
546
- sessionStorage?: {
547
- origin: string;
548
- sessionStorage: {
549
- value: string;
550
- name: string;
551
- }[];
552
- }[] | undefined;
553
- } | null | undefined;
554
- }, {
555
- type: "state";
556
- state?: {
557
- cookies: {
558
- path: string;
559
- value: string;
560
- domain: string;
561
- name: string;
562
- expires: number;
563
- httpOnly: boolean;
564
- secure: boolean;
565
- sameSite: "Strict" | "Lax" | "None";
566
- }[];
567
- origins: {
568
- origin: string;
569
- localStorage: {
570
- value: string;
571
- name: string;
572
- }[];
573
- }[];
574
- sessionStorage?: {
575
- origin: string;
576
- sessionStorage: {
577
- value: string;
578
- name: string;
579
- }[];
580
- }[] | undefined;
581
- } | null | undefined;
582
- }>]>;
583
- }, "strip", z.ZodTypeAny, {
584
- session: {
585
- path: string;
586
- type: "file";
587
- } | {
588
- type: "state";
589
- state?: {
590
- cookies: {
591
- path: string;
592
- value: string;
593
- domain: string;
594
- name: string;
595
- expires: number;
596
- httpOnly: boolean;
597
- secure: boolean;
598
- sameSite: "Strict" | "Lax" | "None";
599
- }[];
600
- origins: {
601
- origin: string;
602
- localStorage: {
603
- value: string;
604
- name: string;
605
- }[];
606
- }[];
607
- sessionStorage?: {
608
- origin: string;
609
- sessionStorage: {
610
- value: string;
611
- name: string;
612
- }[];
613
- }[] | undefined;
614
- } | null | undefined;
615
- };
616
- }, {
617
- session: {
618
- path: string;
619
- type: "file";
620
- } | {
621
- type: "state";
622
- state?: {
623
- cookies: {
624
- path: string;
625
- value: string;
626
- domain: string;
627
- name: string;
628
- expires: number;
629
- httpOnly: boolean;
630
- secure: boolean;
631
- sameSite: "Strict" | "Lax" | "None";
632
- }[];
633
- origins: {
634
- origin: string;
635
- localStorage: {
636
- value: string;
637
- name: string;
638
- }[];
639
- }[];
640
- sessionStorage?: {
641
- origin: string;
642
- sessionStorage: {
643
- value: string;
644
- name: string;
645
- }[];
646
- }[] | undefined;
647
- } | null | undefined;
648
- };
649
- }>>;
650
- runOptions: z.ZodDefault<z.ZodDiscriminatedUnion<"environment", [z.ZodObject<{
651
- environment: z.ZodLiteral<"standalone">;
652
- headless: z.ZodDefault<z.ZodBoolean>;
653
- proxy: z.ZodOptional<z.ZodObject<{
654
- server: z.ZodString;
655
- username: z.ZodString;
656
- password: z.ZodString;
657
- }, "strip", z.ZodTypeAny, {
658
- server: string;
659
- username: string;
660
- password: string;
661
- }, {
662
- server: string;
663
- username: string;
664
- password: string;
665
- }>>;
666
- }, "strip", z.ZodTypeAny, {
667
- environment: "standalone";
668
- headless: boolean;
669
- proxy?: {
670
- server: string;
671
- username: string;
672
- password: string;
673
- } | undefined;
674
- }, {
675
- environment: "standalone";
676
- headless?: boolean | undefined;
677
- proxy?: {
678
- server: string;
679
- username: string;
680
- password: string;
681
- } | undefined;
682
- }>, z.ZodObject<{
683
- environment: z.ZodLiteral<"cdp">;
684
- cdpAddress: z.ZodString;
685
- }, "strip", z.ZodTypeAny, {
686
- environment: "cdp";
687
- cdpAddress: string;
688
- }, {
689
- environment: "cdp";
690
- cdpAddress: string;
691
- }>]>>;
692
- retrieveSession: z.ZodDefault<z.ZodBoolean>;
693
- }, "strip", z.ZodTypeAny, {
694
- automationFunction: {
695
- name: string;
696
- params?: any;
697
- };
698
- tracing: {
699
- enabled: false;
700
- } | {
701
- enabled: true;
702
- filePath: string;
703
- };
704
- runOptions: {
705
- environment: "standalone";
706
- headless: boolean;
707
- proxy?: {
708
- server: string;
709
- username: string;
710
- password: string;
711
- } | undefined;
712
- } | {
713
- environment: "cdp";
714
- cdpAddress: string;
715
- };
716
- retrieveSession: boolean;
717
- auth?: {
718
- session: {
719
- path: string;
720
- type: "file";
721
- } | {
722
- type: "state";
723
- state?: {
724
- cookies: {
725
- path: string;
726
- value: string;
727
- domain: string;
728
- name: string;
729
- expires: number;
730
- httpOnly: boolean;
731
- secure: boolean;
732
- sameSite: "Strict" | "Lax" | "None";
733
- }[];
734
- origins: {
735
- origin: string;
736
- localStorage: {
737
- value: string;
738
- name: string;
739
- }[];
740
- }[];
741
- sessionStorage?: {
742
- origin: string;
743
- sessionStorage: {
744
- value: string;
745
- name: string;
746
- }[];
747
- }[] | undefined;
748
- } | null | undefined;
749
- };
750
- } | undefined;
751
- }, {
752
- automationFunction: {
753
- name: string;
754
- params?: any;
755
- };
756
- tracing?: {
757
- enabled: false;
758
- } | {
759
- enabled: true;
760
- filePath: string;
761
- } | undefined;
762
- auth?: {
763
- session: {
764
- path: string;
765
- type: "file";
766
- } | {
767
- type: "state";
768
- state?: {
769
- cookies: {
770
- path: string;
771
- value: string;
772
- domain: string;
773
- name: string;
774
- expires: number;
775
- httpOnly: boolean;
776
- secure: boolean;
777
- sameSite: "Strict" | "Lax" | "None";
778
- }[];
779
- origins: {
780
- origin: string;
781
- localStorage: {
782
- value: string;
783
- name: string;
784
- }[];
785
- }[];
786
- sessionStorage?: {
787
- origin: string;
788
- sessionStorage: {
789
- value: string;
790
- name: string;
791
- }[];
792
- }[] | undefined;
793
- } | null | undefined;
794
- };
795
- } | undefined;
796
- runOptions?: {
797
- environment: "standalone";
798
- headless?: boolean | undefined;
799
- proxy?: {
800
- server: string;
801
- username: string;
802
- password: string;
803
- } | undefined;
804
- } | {
805
- environment: "cdp";
806
- cdpAddress: string;
807
- } | undefined;
808
- retrieveSession?: boolean | undefined;
809
- }>;
810
- export type RunApiSession = z.infer<typeof runApiSessionSchema>;
811
- export type RunApiParameters = z.input<typeof runApiParametersSchema>;
812
- export type ImportFunctionError = {
813
- type: "not_found";
814
- } | {
815
- type: "other";
816
- error: any;
817
- };
818
- export type ExtendedRunApiParameters = RunApiParameters & {
819
- abortSignal?: AbortSignal;
820
- importFunction: (name: string) => Promise<Result<any, ImportFunctionError>>;
821
- };
822
- export type RunApiResultOk<R = any> = {
823
- result: R;
824
- extendedPayloads?: Payload[];
825
- };
826
- export type RunApiResultWithSessionOk<R = any> = RunApiResultOk<R> & {
827
- session: RunApiStorageState;
828
- };
829
- export type RunApiResult<R = any, FullResult extends RunApiResultOk<R> = RunApiResultOk<R>> = Result<FullResult, RunAutomationError>;
830
- export type { ImportFunction } from "./importUsingImportFunction";