@intuned/runtime-dev 1.3.9-dev8 → 1.3.11-deployment.0

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 (229) hide show
  1. package/InterfaceTemplate/index.playwright.ts +1 -1
  2. package/WebTemplate.zip +0 -0
  3. package/bin/intuned +1 -1
  4. package/bin/intuned-api-run +1 -1
  5. package/bin/intuned-auth-session-check +1 -1
  6. package/bin/intuned-auth-session-create +1 -1
  7. package/bin/intuned-auth-session-load +1 -1
  8. package/dist/commands/intuned-cli/commands/attempt_api.command.js +1 -1
  9. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +1 -1
  10. package/dist/commands/intuned-cli/commands/run_api.command.js +1 -1
  11. package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +3 -0
  12. package/dist/commands/intuned-cli/commands/types.d.ts +4 -0
  13. package/dist/commands/intuned-cli/commands/types.js +5 -3
  14. package/dist/commands/intuned-cli/controller/api.d.ts +1 -1
  15. package/dist/commands/intuned-cli/controller/api.js +4 -2
  16. package/dist/commands/intuned-cli/controller/authSession.d.ts +2 -2
  17. package/dist/commands/intuned-cli/controller/authSession.js +8 -4
  18. package/dist/commands/intuned-cli/controller/deploy.d.ts +1 -0
  19. package/dist/commands/intuned-cli/controller/deploy.js +141 -6
  20. package/dist/commands/intuned-cli/controller/save.d.ts +4 -1
  21. package/dist/commands/intuned-cli/controller/save.js +8 -2
  22. package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +11 -0
  23. package/dist/commands/intuned-cli/helpers/backend.js +1 -1
  24. package/dist/commands/intuned-cli/helpers/browser.d.ts +2 -1
  25. package/dist/commands/intuned-cli/helpers/browser.js +8 -1
  26. package/dist/commands/intuned-cli/helpers/errors.d.ts +3 -0
  27. package/dist/commands/intuned-cli/helpers/errors.js +8 -1
  28. package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +113 -11
  29. package/dist/commands/intuned-cli/helpers/intunedJson.js +19 -3
  30. package/dist/commands/intuned-cli/helpers/wrapper.js +7 -1
  31. package/dist/commands/intuned-cli/main.js +1 -0
  32. package/{package/dist/commands/common/utils/fileUtils.js → dist/common/binStartupScript.js} +26 -25
  33. package/package.json +6 -2
  34. package/bin/common.js +0 -30
  35. package/package/dist/commands/api/run.d.ts +0 -6
  36. package/package/dist/commands/api/run.js +0 -123
  37. package/package/dist/commands/auth-sessions/load.d.ts +0 -2
  38. package/package/dist/commands/auth-sessions/load.js +0 -35
  39. package/package/dist/commands/auth-sessions/run-check.d.ts +0 -2
  40. package/package/dist/commands/auth-sessions/run-check.js +0 -74
  41. package/package/dist/commands/auth-sessions/run-create.d.ts +0 -2
  42. package/package/dist/commands/auth-sessions/run-create.js +0 -78
  43. package/package/dist/commands/browser/save-state.d.ts +0 -2
  44. package/package/dist/commands/browser/save-state.js +0 -17
  45. package/package/dist/commands/browser/start-browser.d.ts +0 -2
  46. package/package/dist/commands/browser/start-browser.js +0 -14
  47. package/package/dist/commands/build.js +0 -84
  48. package/package/dist/commands/common/browserUtils.d.ts +0 -14
  49. package/package/dist/commands/common/browserUtils.js +0 -58
  50. package/package/dist/commands/common/getFirstLineNumber.d.ts +0 -9
  51. package/package/dist/commands/common/getFirstLineNumber.js +0 -101
  52. package/package/dist/commands/common/getFirstLineNumber.test.js +0 -228
  53. package/package/dist/commands/common/projectExclusions.d.ts +0 -2
  54. package/package/dist/commands/common/projectExclusions.js +0 -8
  55. package/package/dist/commands/common/sendMessageToClient.d.ts +0 -1
  56. package/package/dist/commands/common/sendMessageToClient.js +0 -10
  57. package/package/dist/commands/common/tsNodeImport.d.ts +0 -2
  58. package/package/dist/commands/common/tsNodeImport.js +0 -34
  59. package/package/dist/commands/common/utils/fileUtils.d.ts +0 -6
  60. package/package/dist/commands/common/utils/settings.d.ts +0 -2
  61. package/package/dist/commands/common/utils/settings.js +0 -31
  62. package/package/dist/commands/common/utils/template.d.ts +0 -2
  63. package/package/dist/commands/common/utils/template.js +0 -31
  64. package/package/dist/commands/common/utils/unixSocket.d.ts +0 -9
  65. package/package/dist/commands/common/utils/unixSocket.js +0 -44
  66. package/package/dist/commands/interface/run.d.ts +0 -1
  67. package/package/dist/commands/interface/run.js +0 -216
  68. package/package/dist/commands/intuned-cli/commands/attempt.command.d.ts +0 -1
  69. package/package/dist/commands/intuned-cli/commands/attempt.command.js +0 -8
  70. package/package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +0 -1
  71. package/package/dist/commands/intuned-cli/commands/attempt_api.command.js +0 -30
  72. package/package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +0 -1
  73. package/package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +0 -8
  74. package/package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +0 -1
  75. package/package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +0 -19
  76. package/package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +0 -1
  77. package/package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +0 -24
  78. package/package/dist/commands/intuned-cli/commands/authsession.command.d.ts +0 -1
  79. package/package/dist/commands/intuned-cli/commands/authsession.command.js +0 -8
  80. package/package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +0 -1
  81. package/package/dist/commands/intuned-cli/commands/authsession_record.command.js +0 -31
  82. package/package/dist/commands/intuned-cli/commands/build.command.d.ts +0 -1
  83. package/package/dist/commands/intuned-cli/commands/build.command.js +0 -12
  84. package/package/dist/commands/intuned-cli/commands/command.d.ts +0 -2
  85. package/package/dist/commands/intuned-cli/commands/command.js +0 -9
  86. package/package/dist/commands/intuned-cli/commands/deploy.command.d.ts +0 -1
  87. package/package/dist/commands/intuned-cli/commands/deploy.command.js +0 -38
  88. package/package/dist/commands/intuned-cli/commands/index.d.ts +0 -18
  89. package/package/dist/commands/intuned-cli/commands/index.js +0 -203
  90. package/package/dist/commands/intuned-cli/commands/init.command.d.ts +0 -1
  91. package/package/dist/commands/intuned-cli/commands/init.command.js +0 -13
  92. package/package/dist/commands/intuned-cli/commands/run.command.d.ts +0 -1
  93. package/package/dist/commands/intuned-cli/commands/run.command.js +0 -8
  94. package/package/dist/commands/intuned-cli/commands/run_api.command.d.ts +0 -1
  95. package/package/dist/commands/intuned-cli/commands/run_api.command.js +0 -46
  96. package/package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +0 -28
  97. package/package/dist/commands/intuned-cli/commands/run_authsession.command.js +0 -17
  98. package/package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +0 -1
  99. package/package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +0 -35
  100. package/package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +0 -1
  101. package/package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +0 -35
  102. package/package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +0 -1
  103. package/package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +0 -33
  104. package/package/dist/commands/intuned-cli/commands/save.command.d.ts +0 -13
  105. package/package/dist/commands/intuned-cli/commands/save.command.js +0 -42
  106. package/package/dist/commands/intuned-cli/commands/types.d.ts +0 -31
  107. package/package/dist/commands/intuned-cli/commands/types.js +0 -29
  108. package/package/dist/commands/intuned-cli/constants/index.d.ts +0 -17
  109. package/package/dist/commands/intuned-cli/constants/index.js +0 -25
  110. package/package/dist/commands/intuned-cli/controller/__test__/api.test.js +0 -397
  111. package/package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +0 -1059
  112. package/package/dist/commands/intuned-cli/controller/api.d.ts +0 -42
  113. package/package/dist/commands/intuned-cli/controller/api.js +0 -189
  114. package/package/dist/commands/intuned-cli/controller/authSession.d.ts +0 -209
  115. package/package/dist/commands/intuned-cli/controller/authSession.js +0 -420
  116. package/package/dist/commands/intuned-cli/controller/build.d.ts +0 -1
  117. package/package/dist/commands/intuned-cli/controller/build.js +0 -36
  118. package/package/dist/commands/intuned-cli/controller/deploy.d.ts +0 -4
  119. package/package/dist/commands/intuned-cli/controller/deploy.js +0 -139
  120. package/package/dist/commands/intuned-cli/controller/index.d.ts +0 -1
  121. package/package/dist/commands/intuned-cli/controller/index.js +0 -46
  122. package/package/dist/commands/intuned-cli/controller/save.d.ts +0 -14
  123. package/package/dist/commands/intuned-cli/controller/save.js +0 -345
  124. package/package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +0 -103
  125. package/package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +0 -40
  126. package/package/dist/commands/intuned-cli/helpers/api.d.ts +0 -3
  127. package/package/dist/commands/intuned-cli/helpers/api.js +0 -19
  128. package/package/dist/commands/intuned-cli/helpers/auth.d.ts +0 -46
  129. package/package/dist/commands/intuned-cli/helpers/auth.js +0 -144
  130. package/package/dist/commands/intuned-cli/helpers/backend.d.ts +0 -8
  131. package/package/dist/commands/intuned-cli/helpers/backend.js +0 -27
  132. package/package/dist/commands/intuned-cli/helpers/browser.d.ts +0 -14
  133. package/package/dist/commands/intuned-cli/helpers/browser.js +0 -57
  134. package/package/dist/commands/intuned-cli/helpers/context.d.ts +0 -3
  135. package/package/dist/commands/intuned-cli/helpers/context.js +0 -33
  136. package/package/dist/commands/intuned-cli/helpers/errors.d.ts +0 -13
  137. package/package/dist/commands/intuned-cli/helpers/errors.js +0 -37
  138. package/package/dist/commands/intuned-cli/helpers/index.d.ts +0 -12
  139. package/package/dist/commands/intuned-cli/helpers/index.js +0 -137
  140. package/package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +0 -69
  141. package/package/dist/commands/intuned-cli/helpers/intunedJson.js +0 -71
  142. package/package/dist/commands/intuned-cli/helpers/proxy.d.ts +0 -5
  143. package/package/dist/commands/intuned-cli/helpers/proxy.js +0 -23
  144. package/package/dist/commands/intuned-cli/helpers/terminal.d.ts +0 -5
  145. package/package/dist/commands/intuned-cli/helpers/terminal.js +0 -13
  146. package/package/dist/commands/intuned-cli/helpers/timeout.d.ts +0 -1
  147. package/package/dist/commands/intuned-cli/helpers/timeout.js +0 -23
  148. package/package/dist/commands/intuned-cli/helpers/traces.d.ts +0 -2
  149. package/package/dist/commands/intuned-cli/helpers/traces.js +0 -32
  150. package/package/dist/commands/intuned-cli/helpers/validation.d.ts +0 -2
  151. package/package/dist/commands/intuned-cli/helpers/validation.js +0 -14
  152. package/package/dist/commands/intuned-cli/helpers/wrapper.d.ts +0 -2
  153. package/package/dist/commands/intuned-cli/helpers/wrapper.js +0 -60
  154. package/package/dist/commands/intuned-cli/index.d.ts +0 -1
  155. package/package/dist/commands/intuned-cli/index.js +0 -16
  156. package/package/dist/commands/intuned-cli/main.d.ts +0 -1
  157. package/package/dist/commands/intuned-cli/main.js +0 -22
  158. package/package/dist/commands/intuned-cli/types.d.ts +0 -41
  159. package/package/dist/commands/intuned-cli/types.js +0 -12
  160. package/package/dist/commands/ts-check.d.ts +0 -2
  161. package/package/dist/commands/ts-check.js +0 -56
  162. package/package/dist/common/Logger/Logger/index.d.ts +0 -12
  163. package/package/dist/common/Logger/Logger/index.js +0 -60
  164. package/package/dist/common/Logger/Logger/types.d.ts +0 -8
  165. package/package/dist/common/Logger/Logger/types.js +0 -5
  166. package/package/dist/common/Logger/index.d.ts +0 -12
  167. package/package/dist/common/Logger/index.js +0 -60
  168. package/package/dist/common/Logger/types.d.ts +0 -8
  169. package/package/dist/common/Logger/types.js +0 -5
  170. package/package/dist/common/assets/browser_scripts.js +0 -2580
  171. package/package/dist/common/asyncLocalStorage/index.d.ts +0 -16
  172. package/package/dist/common/asyncLocalStorage/index.js +0 -17
  173. package/package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +0 -1
  174. package/package/dist/common/backendFunctions/getAuthSessionParameters.js +0 -38
  175. package/package/dist/common/cleanEnvironmentVariables.d.ts +0 -1
  176. package/package/dist/common/cleanEnvironmentVariables.js +0 -16
  177. package/package/dist/common/constants.d.ts +0 -10
  178. package/package/dist/common/constants.js +0 -16
  179. package/package/dist/common/contextStorageStateHelpers.d.ts +0 -21
  180. package/package/dist/common/contextStorageStateHelpers.js +0 -81
  181. package/package/dist/common/extensionsHelpers.d.ts +0 -8
  182. package/package/dist/common/extensionsHelpers.js +0 -80
  183. package/package/dist/common/formatZodError.d.ts +0 -2
  184. package/package/dist/common/formatZodError.js +0 -18
  185. package/package/dist/common/jwtTokenManager.d.ts +0 -17
  186. package/package/dist/common/jwtTokenManager.js +0 -109
  187. package/package/dist/common/launchBrowser.d.ts +0 -25
  188. package/package/dist/common/launchBrowser.js +0 -172
  189. package/package/dist/common/playwrightContext.d.ts +0 -31
  190. package/package/dist/common/playwrightContext.js +0 -144
  191. package/package/dist/common/runApi/errors.d.ts +0 -72
  192. package/package/dist/common/runApi/errors.js +0 -169
  193. package/package/dist/common/runApi/importUsingImportFunction.d.ts +0 -9
  194. package/package/dist/common/runApi/importUsingImportFunction.js +0 -46
  195. package/package/dist/common/runApi/index.d.ts +0 -11
  196. package/package/dist/common/runApi/index.js +0 -199
  197. package/package/dist/common/runApi/types.d.ts +0 -830
  198. package/package/dist/common/runApi/types.js +0 -73
  199. package/package/dist/common/settingsSchema.d.ts +0 -518
  200. package/package/dist/common/settingsSchema.js +0 -57
  201. package/package/dist/common/setupContextHook.d.ts +0 -17
  202. package/package/dist/common/setupContextHook.js +0 -22
  203. package/package/dist/common/telemetry.d.ts +0 -3
  204. package/package/dist/common/telemetry.js +0 -32
  205. package/package/dist/index.d.ts +0 -4
  206. package/package/dist/index.js +0 -69
  207. package/package/dist/runtime/RunError.d.ts +0 -5
  208. package/package/dist/runtime/RunError.js +0 -19
  209. package/package/dist/runtime/attemptStore.d.ts +0 -2
  210. package/package/dist/runtime/attemptStore.js +0 -23
  211. package/package/dist/runtime/downloadDirectory.d.ts +0 -1
  212. package/package/dist/runtime/downloadDirectory.js +0 -19
  213. package/package/dist/runtime/enums.d.js +0 -5
  214. package/package/dist/runtime/enums.d.ts +0 -11
  215. package/package/dist/runtime/enums.js +0 -18
  216. package/package/dist/runtime/executionHelpers.test.js +0 -52
  217. package/package/dist/runtime/export.d.js +0 -5
  218. package/package/dist/runtime/export.d.ts +0 -228
  219. package/package/dist/runtime/extendPayload.d.ts +0 -2
  220. package/package/dist/runtime/extendPayload.js +0 -21
  221. package/package/dist/runtime/extendTimeout.d.ts +0 -1
  222. package/package/dist/runtime/extendTimeout.js +0 -23
  223. package/package/dist/runtime/getAuthSessionParameters.d.ts +0 -1
  224. package/package/dist/runtime/getAuthSessionParameters.js +0 -20
  225. package/package/dist/runtime/index.d.ts +0 -7
  226. package/package/dist/runtime/index.js +0 -54
  227. package/package/dist/runtime/runInfo.d.ts +0 -2
  228. package/package/dist/runtime/runInfo.js +0 -21
  229. /package/{package/dist/commands/build.d.ts → dist/common/binStartupScript.d.ts} +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
- value: string;
40
- name: string;
41
- path: string;
42
- domain: string;
43
- expires: number;
44
- httpOnly: boolean;
45
- secure: boolean;
46
- sameSite: "Strict" | "Lax" | "None";
47
- }, {
48
- value: string;
49
- name: string;
50
- path: string;
51
- domain: 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
- sessionStorage: {
96
- value: string;
97
- name: string;
98
- }[];
99
- origin: string;
100
- }, {
101
- sessionStorage: {
102
- value: string;
103
- name: string;
104
- }[];
105
- origin: string;
106
- }>, "many">>;
107
- }, "strip", z.ZodTypeAny, {
108
- cookies: {
109
- value: string;
110
- name: string;
111
- path: string;
112
- domain: 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
- sessionStorage: {
127
- value: string;
128
- name: string;
129
- }[];
130
- origin: string;
131
- }[] | undefined;
132
- }, {
133
- cookies: {
134
- value: string;
135
- name: string;
136
- path: string;
137
- domain: 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
- sessionStorage: {
152
- value: string;
153
- name: string;
154
- }[];
155
- origin: string;
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
- value: string;
182
- name: string;
183
- path: string;
184
- domain: string;
185
- expires: number;
186
- httpOnly: boolean;
187
- secure: boolean;
188
- sameSite: "Strict" | "Lax" | "None";
189
- }, {
190
- value: string;
191
- name: string;
192
- path: string;
193
- domain: 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
- sessionStorage: {
238
- value: string;
239
- name: string;
240
- }[];
241
- origin: string;
242
- }, {
243
- sessionStorage: {
244
- value: string;
245
- name: string;
246
- }[];
247
- origin: string;
248
- }>, "many">>;
249
- }, "strip", z.ZodTypeAny, {
250
- cookies: {
251
- value: string;
252
- name: string;
253
- path: string;
254
- domain: 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
- sessionStorage: {
269
- value: string;
270
- name: string;
271
- }[];
272
- origin: string;
273
- }[] | undefined;
274
- }, {
275
- cookies: {
276
- value: string;
277
- name: string;
278
- path: string;
279
- domain: 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
- sessionStorage: {
294
- value: string;
295
- name: string;
296
- }[];
297
- origin: string;
298
- }[] | undefined;
299
- }>>>;
300
- }, "strip", z.ZodTypeAny, {
301
- type: "state";
302
- state?: {
303
- cookies: {
304
- value: string;
305
- name: string;
306
- path: string;
307
- domain: 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
- sessionStorage: {
322
- value: string;
323
- name: string;
324
- }[];
325
- origin: string;
326
- }[] | undefined;
327
- } | null | undefined;
328
- }, {
329
- type: "state";
330
- state?: {
331
- cookies: {
332
- value: string;
333
- name: string;
334
- path: string;
335
- domain: 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
- sessionStorage: {
350
- value: string;
351
- name: string;
352
- }[];
353
- origin: string;
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
- value: string;
408
- name: string;
409
- path: string;
410
- domain: string;
411
- expires: number;
412
- httpOnly: boolean;
413
- secure: boolean;
414
- sameSite: "Strict" | "Lax" | "None";
415
- }, {
416
- value: string;
417
- name: string;
418
- path: string;
419
- domain: 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
- sessionStorage: {
464
- value: string;
465
- name: string;
466
- }[];
467
- origin: string;
468
- }, {
469
- sessionStorage: {
470
- value: string;
471
- name: string;
472
- }[];
473
- origin: string;
474
- }>, "many">>;
475
- }, "strip", z.ZodTypeAny, {
476
- cookies: {
477
- value: string;
478
- name: string;
479
- path: string;
480
- domain: 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
- sessionStorage: {
495
- value: string;
496
- name: string;
497
- }[];
498
- origin: string;
499
- }[] | undefined;
500
- }, {
501
- cookies: {
502
- value: string;
503
- name: string;
504
- path: string;
505
- domain: 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
- sessionStorage: {
520
- value: string;
521
- name: string;
522
- }[];
523
- origin: string;
524
- }[] | undefined;
525
- }>>>;
526
- }, "strip", z.ZodTypeAny, {
527
- type: "state";
528
- state?: {
529
- cookies: {
530
- value: string;
531
- name: string;
532
- path: string;
533
- domain: 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
- sessionStorage: {
548
- value: string;
549
- name: string;
550
- }[];
551
- origin: string;
552
- }[] | undefined;
553
- } | null | undefined;
554
- }, {
555
- type: "state";
556
- state?: {
557
- cookies: {
558
- value: string;
559
- name: string;
560
- path: string;
561
- domain: 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
- sessionStorage: {
576
- value: string;
577
- name: string;
578
- }[];
579
- origin: string;
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
- value: string;
592
- name: string;
593
- path: string;
594
- domain: 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
- sessionStorage: {
609
- value: string;
610
- name: string;
611
- }[];
612
- origin: string;
613
- }[] | undefined;
614
- } | null | undefined;
615
- };
616
- }, {
617
- session: {
618
- path: string;
619
- type: "file";
620
- } | {
621
- type: "state";
622
- state?: {
623
- cookies: {
624
- value: string;
625
- name: string;
626
- path: string;
627
- domain: 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
- sessionStorage: {
642
- value: string;
643
- name: string;
644
- }[];
645
- origin: string;
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
- value: string;
726
- name: string;
727
- path: string;
728
- domain: 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
- sessionStorage: {
743
- value: string;
744
- name: string;
745
- }[];
746
- origin: string;
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
- value: string;
771
- name: string;
772
- path: string;
773
- domain: 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
- sessionStorage: {
788
- value: string;
789
- name: string;
790
- }[];
791
- origin: string;
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";