@xyne/workflow-sdk 1.0.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 (310) hide show
  1. package/README.md +36 -0
  2. package/dist/agents/agent-step.d.ts +152 -0
  3. package/dist/agents/agent-step.d.ts.map +1 -0
  4. package/dist/agents/agent-step.js +403 -0
  5. package/dist/agents/agent-step.js.map +1 -0
  6. package/dist/agents/base-runtime.d.ts +38 -0
  7. package/dist/agents/base-runtime.d.ts.map +1 -0
  8. package/dist/agents/base-runtime.js +21 -0
  9. package/dist/agents/base-runtime.js.map +1 -0
  10. package/dist/agents/index.d.ts +12 -0
  11. package/dist/agents/index.d.ts.map +1 -0
  12. package/dist/agents/index.js +17 -0
  13. package/dist/agents/index.js.map +1 -0
  14. package/dist/agents/interceptor.d.ts +19 -0
  15. package/dist/agents/interceptor.d.ts.map +1 -0
  16. package/dist/agents/interceptor.js +21 -0
  17. package/dist/agents/interceptor.js.map +1 -0
  18. package/dist/agents/interceptors/approval-gate.d.ts +14 -0
  19. package/dist/agents/interceptors/approval-gate.d.ts.map +1 -0
  20. package/dist/agents/interceptors/approval-gate.js +19 -0
  21. package/dist/agents/interceptors/approval-gate.js.map +1 -0
  22. package/dist/agents/interceptors/tool-logger.d.ts +15 -0
  23. package/dist/agents/interceptors/tool-logger.d.ts.map +1 -0
  24. package/dist/agents/interceptors/tool-logger.js +23 -0
  25. package/dist/agents/interceptors/tool-logger.js.map +1 -0
  26. package/dist/agents/pi-mono-runtime.d.ts +88 -0
  27. package/dist/agents/pi-mono-runtime.d.ts.map +1 -0
  28. package/dist/agents/pi-mono-runtime.js +129 -0
  29. package/dist/agents/pi-mono-runtime.js.map +1 -0
  30. package/dist/agents/tool-registry.d.ts +25 -0
  31. package/dist/agents/tool-registry.d.ts.map +1 -0
  32. package/dist/agents/tool-registry.js +47 -0
  33. package/dist/agents/tool-registry.js.map +1 -0
  34. package/dist/agents/tool-types.d.ts +25 -0
  35. package/dist/agents/tool-types.d.ts.map +1 -0
  36. package/dist/agents/tool-types.js +9 -0
  37. package/dist/agents/tool-types.js.map +1 -0
  38. package/dist/agents/types.d.ts +91 -0
  39. package/dist/agents/types.d.ts.map +1 -0
  40. package/dist/agents/types.js +12 -0
  41. package/dist/agents/types.js.map +1 -0
  42. package/dist/builder/index.d.ts +30 -0
  43. package/dist/builder/index.d.ts.map +1 -0
  44. package/dist/builder/index.js +32 -0
  45. package/dist/builder/index.js.map +1 -0
  46. package/dist/client/index.d.ts +19 -0
  47. package/dist/client/index.d.ts.map +1 -0
  48. package/dist/client/index.js +18 -0
  49. package/dist/client/index.js.map +1 -0
  50. package/dist/client/types.d.ts +128 -0
  51. package/dist/client/types.d.ts.map +1 -0
  52. package/dist/client/types.js +10 -0
  53. package/dist/client/types.js.map +1 -0
  54. package/dist/client/workflow-client.d.ts +15 -0
  55. package/dist/client/workflow-client.d.ts.map +1 -0
  56. package/dist/client/workflow-client.js +293 -0
  57. package/dist/client/workflow-client.js.map +1 -0
  58. package/dist/common/attachment.d.ts +31 -0
  59. package/dist/common/attachment.d.ts.map +1 -0
  60. package/dist/common/attachment.js +21 -0
  61. package/dist/common/attachment.js.map +1 -0
  62. package/dist/common/executable-check.d.ts +42 -0
  63. package/dist/common/executable-check.d.ts.map +1 -0
  64. package/dist/common/executable-check.js +115 -0
  65. package/dist/common/executable-check.js.map +1 -0
  66. package/dist/common/index.d.ts +21 -0
  67. package/dist/common/index.d.ts.map +1 -0
  68. package/dist/common/index.js +19 -0
  69. package/dist/common/index.js.map +1 -0
  70. package/dist/common/resume-payload.d.ts +34 -0
  71. package/dist/common/resume-payload.d.ts.map +1 -0
  72. package/dist/common/resume-payload.js +12 -0
  73. package/dist/common/resume-payload.js.map +1 -0
  74. package/dist/engine/available-context.d.ts +29 -0
  75. package/dist/engine/available-context.d.ts.map +1 -0
  76. package/dist/engine/available-context.js +66 -0
  77. package/dist/engine/available-context.js.map +1 -0
  78. package/dist/engine/condition-evaluator.d.ts +13 -0
  79. package/dist/engine/condition-evaluator.d.ts.map +1 -0
  80. package/dist/engine/condition-evaluator.js +92 -0
  81. package/dist/engine/condition-evaluator.js.map +1 -0
  82. package/dist/engine/config-validator.d.ts +25 -0
  83. package/dist/engine/config-validator.d.ts.map +1 -0
  84. package/dist/engine/config-validator.js +316 -0
  85. package/dist/engine/config-validator.js.map +1 -0
  86. package/dist/engine/pause-step.d.ts +20 -0
  87. package/dist/engine/pause-step.d.ts.map +1 -0
  88. package/dist/engine/pause-step.js +24 -0
  89. package/dist/engine/pause-step.js.map +1 -0
  90. package/dist/engine/service-registry.d.ts +49 -0
  91. package/dist/engine/service-registry.d.ts.map +1 -0
  92. package/dist/engine/service-registry.js +76 -0
  93. package/dist/engine/service-registry.js.map +1 -0
  94. package/dist/engine/variable-resolver.d.ts +29 -0
  95. package/dist/engine/variable-resolver.d.ts.map +1 -0
  96. package/dist/engine/variable-resolver.js +130 -0
  97. package/dist/engine/variable-resolver.js.map +1 -0
  98. package/dist/engine/workflow-executor.d.ts +96 -0
  99. package/dist/engine/workflow-executor.d.ts.map +1 -0
  100. package/dist/engine/workflow-executor.js +837 -0
  101. package/dist/engine/workflow-executor.js.map +1 -0
  102. package/dist/index.d.ts +57 -0
  103. package/dist/index.d.ts.map +1 -0
  104. package/dist/index.js +56 -0
  105. package/dist/index.js.map +1 -0
  106. package/dist/persistence/in-memory-adapter.d.ts +138 -0
  107. package/dist/persistence/in-memory-adapter.d.ts.map +1 -0
  108. package/dist/persistence/in-memory-adapter.js +315 -0
  109. package/dist/persistence/in-memory-adapter.js.map +1 -0
  110. package/dist/persistence/types.d.ts +214 -0
  111. package/dist/persistence/types.d.ts.map +1 -0
  112. package/dist/persistence/types.js +8 -0
  113. package/dist/persistence/types.js.map +1 -0
  114. package/dist/router/types.d.ts +57 -0
  115. package/dist/router/types.d.ts.map +1 -0
  116. package/dist/router/types.js +8 -0
  117. package/dist/router/types.js.map +1 -0
  118. package/dist/router/workflow-router.d.ts +26 -0
  119. package/dist/router/workflow-router.d.ts.map +1 -0
  120. package/dist/router/workflow-router.js +611 -0
  121. package/dist/router/workflow-router.js.map +1 -0
  122. package/dist/runtime/execution-event-bus.d.ts +38 -0
  123. package/dist/runtime/execution-event-bus.d.ts.map +1 -0
  124. package/dist/runtime/execution-event-bus.js +87 -0
  125. package/dist/runtime/execution-event-bus.js.map +1 -0
  126. package/dist/runtime/types.d.ts +129 -0
  127. package/dist/runtime/types.d.ts.map +1 -0
  128. package/dist/runtime/types.js +5 -0
  129. package/dist/runtime/types.js.map +1 -0
  130. package/dist/runtime/workflow-runtime.d.ts +256 -0
  131. package/dist/runtime/workflow-runtime.d.ts.map +1 -0
  132. package/dist/runtime/workflow-runtime.js +699 -0
  133. package/dist/runtime/workflow-runtime.js.map +1 -0
  134. package/dist/steps/base-step.d.ts +204 -0
  135. package/dist/steps/base-step.d.ts.map +1 -0
  136. package/dist/steps/base-step.js +69 -0
  137. package/dist/steps/base-step.js.map +1 -0
  138. package/dist/steps/builtin/code.step.d.ts +95 -0
  139. package/dist/steps/builtin/code.step.d.ts.map +1 -0
  140. package/dist/steps/builtin/code.step.js +122 -0
  141. package/dist/steps/builtin/code.step.js.map +1 -0
  142. package/dist/steps/builtin/conditional.step.d.ts +146 -0
  143. package/dist/steps/builtin/conditional.step.d.ts.map +1 -0
  144. package/dist/steps/builtin/conditional.step.js +71 -0
  145. package/dist/steps/builtin/conditional.step.js.map +1 -0
  146. package/dist/steps/builtin/dedup.step.d.ts +65 -0
  147. package/dist/steps/builtin/dedup.step.d.ts.map +1 -0
  148. package/dist/steps/builtin/dedup.step.js +61 -0
  149. package/dist/steps/builtin/dedup.step.js.map +1 -0
  150. package/dist/steps/builtin/http-request.step.d.ts +928 -0
  151. package/dist/steps/builtin/http-request.step.d.ts.map +1 -0
  152. package/dist/steps/builtin/http-request.step.js +570 -0
  153. package/dist/steps/builtin/http-request.step.js.map +1 -0
  154. package/dist/steps/builtin/loop.step.d.ts +100 -0
  155. package/dist/steps/builtin/loop.step.d.ts.map +1 -0
  156. package/dist/steps/builtin/loop.step.js +79 -0
  157. package/dist/steps/builtin/loop.step.js.map +1 -0
  158. package/dist/steps/builtin/parallel.step.d.ts +208 -0
  159. package/dist/steps/builtin/parallel.step.d.ts.map +1 -0
  160. package/dist/steps/builtin/parallel.step.js +249 -0
  161. package/dist/steps/builtin/parallel.step.js.map +1 -0
  162. package/dist/steps/builtin/switch.step.d.ts +200 -0
  163. package/dist/steps/builtin/switch.step.d.ts.map +1 -0
  164. package/dist/steps/builtin/switch.step.js +92 -0
  165. package/dist/steps/builtin/switch.step.js.map +1 -0
  166. package/dist/steps/builtin/transform.step.d.ts +247 -0
  167. package/dist/steps/builtin/transform.step.d.ts.map +1 -0
  168. package/dist/steps/builtin/transform.step.js +135 -0
  169. package/dist/steps/builtin/transform.step.js.map +1 -0
  170. package/dist/steps/builtin/wait.step.d.ts +921 -0
  171. package/dist/steps/builtin/wait.step.d.ts.map +1 -0
  172. package/dist/steps/builtin/wait.step.js +211 -0
  173. package/dist/steps/builtin/wait.step.js.map +1 -0
  174. package/dist/steps/step-registry.d.ts +64 -0
  175. package/dist/steps/step-registry.d.ts.map +1 -0
  176. package/dist/steps/step-registry.js +102 -0
  177. package/dist/steps/step-registry.js.map +1 -0
  178. package/dist/storage/in-memory-adapter.d.ts +25 -0
  179. package/dist/storage/in-memory-adapter.d.ts.map +1 -0
  180. package/dist/storage/in-memory-adapter.js +41 -0
  181. package/dist/storage/in-memory-adapter.js.map +1 -0
  182. package/dist/storage/types.d.ts +53 -0
  183. package/dist/storage/types.d.ts.map +1 -0
  184. package/dist/storage/types.js +13 -0
  185. package/dist/storage/types.js.map +1 -0
  186. package/dist/testing/index.d.ts +10 -0
  187. package/dist/testing/index.d.ts.map +1 -0
  188. package/dist/testing/index.js +10 -0
  189. package/dist/testing/index.js.map +1 -0
  190. package/dist/testing/mock-context.d.ts +13 -0
  191. package/dist/testing/mock-context.d.ts.map +1 -0
  192. package/dist/testing/mock-context.js +21 -0
  193. package/dist/testing/mock-context.js.map +1 -0
  194. package/dist/testing/mock-step-context.d.ts +47 -0
  195. package/dist/testing/mock-step-context.d.ts.map +1 -0
  196. package/dist/testing/mock-step-context.js +59 -0
  197. package/dist/testing/mock-step-context.js.map +1 -0
  198. package/dist/triggers/base-trigger.d.ts +58 -0
  199. package/dist/triggers/base-trigger.d.ts.map +1 -0
  200. package/dist/triggers/base-trigger.js +37 -0
  201. package/dist/triggers/base-trigger.js.map +1 -0
  202. package/dist/triggers/builtin/default-cron-trigger.d.ts +44 -0
  203. package/dist/triggers/builtin/default-cron-trigger.d.ts.map +1 -0
  204. package/dist/triggers/builtin/default-cron-trigger.js +31 -0
  205. package/dist/triggers/builtin/default-cron-trigger.js.map +1 -0
  206. package/dist/triggers/builtin/default-event-trigger.d.ts +32 -0
  207. package/dist/triggers/builtin/default-event-trigger.d.ts.map +1 -0
  208. package/dist/triggers/builtin/default-event-trigger.js +21 -0
  209. package/dist/triggers/builtin/default-event-trigger.js.map +1 -0
  210. package/dist/triggers/builtin/default-manual-trigger.d.ts +119 -0
  211. package/dist/triggers/builtin/default-manual-trigger.d.ts.map +1 -0
  212. package/dist/triggers/builtin/default-manual-trigger.js +64 -0
  213. package/dist/triggers/builtin/default-manual-trigger.js.map +1 -0
  214. package/dist/triggers/builtin/default-webhook-trigger.d.ts +72 -0
  215. package/dist/triggers/builtin/default-webhook-trigger.d.ts.map +1 -0
  216. package/dist/triggers/builtin/default-webhook-trigger.js +91 -0
  217. package/dist/triggers/builtin/default-webhook-trigger.js.map +1 -0
  218. package/dist/triggers/cron-trigger.d.ts +52 -0
  219. package/dist/triggers/cron-trigger.d.ts.map +1 -0
  220. package/dist/triggers/cron-trigger.js +15 -0
  221. package/dist/triggers/cron-trigger.js.map +1 -0
  222. package/dist/triggers/event-trigger.d.ts +14 -0
  223. package/dist/triggers/event-trigger.d.ts.map +1 -0
  224. package/dist/triggers/event-trigger.js +13 -0
  225. package/dist/triggers/event-trigger.js.map +1 -0
  226. package/dist/triggers/manual-trigger.d.ts +11 -0
  227. package/dist/triggers/manual-trigger.d.ts.map +1 -0
  228. package/dist/triggers/manual-trigger.js +10 -0
  229. package/dist/triggers/manual-trigger.js.map +1 -0
  230. package/dist/triggers/trigger-registry.d.ts +48 -0
  231. package/dist/triggers/trigger-registry.d.ts.map +1 -0
  232. package/dist/triggers/trigger-registry.js +81 -0
  233. package/dist/triggers/trigger-registry.js.map +1 -0
  234. package/dist/triggers/webhook-trigger.d.ts +54 -0
  235. package/dist/triggers/webhook-trigger.d.ts.map +1 -0
  236. package/dist/triggers/webhook-trigger.js +13 -0
  237. package/dist/triggers/webhook-trigger.js.map +1 -0
  238. package/dist/types/attachment.d.ts +23 -0
  239. package/dist/types/attachment.d.ts.map +1 -0
  240. package/dist/types/attachment.js +2 -0
  241. package/dist/types/attachment.js.map +1 -0
  242. package/dist/types/categories.d.ts +14 -0
  243. package/dist/types/categories.d.ts.map +1 -0
  244. package/dist/types/categories.js +10 -0
  245. package/dist/types/categories.js.map +1 -0
  246. package/dist/types/context.d.ts +61 -0
  247. package/dist/types/context.d.ts.map +1 -0
  248. package/dist/types/context.js +2 -0
  249. package/dist/types/context.js.map +1 -0
  250. package/dist/types/index.d.ts +18 -0
  251. package/dist/types/index.d.ts.map +1 -0
  252. package/dist/types/index.js +12 -0
  253. package/dist/types/index.js.map +1 -0
  254. package/dist/types/known-types.d.ts +34 -0
  255. package/dist/types/known-types.d.ts.map +1 -0
  256. package/dist/types/known-types.js +49 -0
  257. package/dist/types/known-types.js.map +1 -0
  258. package/dist/types/operators.d.ts +20 -0
  259. package/dist/types/operators.d.ts.map +1 -0
  260. package/dist/types/operators.js +27 -0
  261. package/dist/types/operators.js.map +1 -0
  262. package/dist/types/pause-path.d.ts +23 -0
  263. package/dist/types/pause-path.d.ts.map +1 -0
  264. package/dist/types/pause-path.js +2 -0
  265. package/dist/types/pause-path.js.map +1 -0
  266. package/dist/types/pause-state.d.ts +100 -0
  267. package/dist/types/pause-state.d.ts.map +1 -0
  268. package/dist/types/pause-state.js +15 -0
  269. package/dist/types/pause-state.js.map +1 -0
  270. package/dist/types/resume-payload.d.ts +34 -0
  271. package/dist/types/resume-payload.d.ts.map +1 -0
  272. package/dist/types/resume-payload.js +12 -0
  273. package/dist/types/resume-payload.js.map +1 -0
  274. package/dist/types/status.d.ts +27 -0
  275. package/dist/types/status.d.ts.map +1 -0
  276. package/dist/types/status.js +41 -0
  277. package/dist/types/status.js.map +1 -0
  278. package/dist/types/step-events.d.ts +22 -0
  279. package/dist/types/step-events.d.ts.map +1 -0
  280. package/dist/types/step-events.js +8 -0
  281. package/dist/types/step-events.js.map +1 -0
  282. package/dist/types/step-types.d.ts +12 -0
  283. package/dist/types/step-types.d.ts.map +1 -0
  284. package/dist/types/step-types.js +2 -0
  285. package/dist/types/step-types.js.map +1 -0
  286. package/dist/types/trigger-types.d.ts +12 -0
  287. package/dist/types/trigger-types.d.ts.map +1 -0
  288. package/dist/types/trigger-types.js +2 -0
  289. package/dist/types/trigger-types.js.map +1 -0
  290. package/dist/types/validation.d.ts +19 -0
  291. package/dist/types/validation.d.ts.map +1 -0
  292. package/dist/types/validation.js +11 -0
  293. package/dist/types/validation.js.map +1 -0
  294. package/dist/types/workflow-config.d.ts +122 -0
  295. package/dist/types/workflow-config.d.ts.map +1 -0
  296. package/dist/types/workflow-config.js +71 -0
  297. package/dist/types/workflow-config.js.map +1 -0
  298. package/dist/util/executable-check.d.ts +42 -0
  299. package/dist/util/executable-check.d.ts.map +1 -0
  300. package/dist/util/executable-check.js +115 -0
  301. package/dist/util/executable-check.js.map +1 -0
  302. package/dist/util/schema-convert.d.ts +14 -0
  303. package/dist/util/schema-convert.d.ts.map +1 -0
  304. package/dist/util/schema-convert.js +16 -0
  305. package/dist/util/schema-convert.js.map +1 -0
  306. package/dist/util/variable-ref.d.ts +52 -0
  307. package/dist/util/variable-ref.d.ts.map +1 -0
  308. package/dist/util/variable-ref.js +89 -0
  309. package/dist/util/variable-ref.js.map +1 -0
  310. package/package.json +97 -0
@@ -0,0 +1,928 @@
1
+ /**
2
+ * HTTP_REQUEST step — make HTTP requests to external APIs.
3
+ *
4
+ * Action step that uses the global `fetch` API (Node 20+). Always
5
+ * returns the response — never throws on HTTP error status codes.
6
+ * The consumer can branch on `ok` or `status` via a CONDITIONAL step.
7
+ *
8
+ * ## Body modes (Postman-aligned)
9
+ *
10
+ * `body` is a discriminated union by `mode`. Each mode has its own shape:
11
+ *
12
+ * - `none` — no body
13
+ * - `raw` — single text payload; pick the content-type via `contentType`
14
+ * - `urlencoded` — `application/x-www-form-urlencoded` key/value pairs
15
+ * - `formdata` — `multipart/form-data` with text fields
16
+ *
17
+ * File uploads (multipart file fields, binary bodies) are out of scope for
18
+ * the current iteration. The {@link Attachment} primitive and StorageAdapter
19
+ * are still used by triggers and resume payloads.
20
+ *
21
+ * ## Auth
22
+ *
23
+ * Two auth mechanisms, used together or independently:
24
+ *
25
+ * 1. **Config-level `auth`** — for tokens from variable refs
26
+ * `{{ steps.login.output.token }}`. Fully typed discriminated union.
27
+ *
28
+ * 2. **Credential slots** — for stored secrets from the credential vault.
29
+ * Resolved by the executor at runtime, injected via `ctx.credentials`.
30
+ * Config-level auth takes precedence when both are present.
31
+ *
32
+ * ## Response shape
33
+ *
34
+ * The step's output IS the response:
35
+ *
36
+ * { status, statusText, ok, headers, body, bodyText, size, duration }
37
+ *
38
+ * `body` is the parsed value per `responseType`. `bodyText` is the raw text
39
+ * (always present, empty for `discard`). `size` is bytes received.
40
+ *
41
+ * The author optionally declares `responseBodySchema` (a JSON Schema). When
42
+ * present the step's `resolveOutputJsonSchema(config)` types the `body`
43
+ * field for downstream variable pickers; the runtime behaviour is unchanged.
44
+ */
45
+ import { z } from 'zod';
46
+ import { BaseActionStep } from '../base-step.js';
47
+ import type { StepExecutionContext, CredentialSlot, CredentialTypeSchema } from '../base-step.js';
48
+ import { BuiltinStepType } from '../../types/known-types.js';
49
+ import type { StepCategory } from '../../types/categories.js';
50
+ declare const HttpAuthSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
51
+ type: z.ZodLiteral<"none">;
52
+ }, "strip", z.ZodTypeAny, {
53
+ type: "none";
54
+ }, {
55
+ type: "none";
56
+ }>, z.ZodObject<{
57
+ type: z.ZodLiteral<"bearer">;
58
+ token: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ type: "bearer";
61
+ token: string;
62
+ }, {
63
+ type: "bearer";
64
+ token: string;
65
+ }>, z.ZodObject<{
66
+ type: z.ZodLiteral<"basic">;
67
+ username: z.ZodString;
68
+ password: z.ZodString;
69
+ }, "strip", z.ZodTypeAny, {
70
+ type: "basic";
71
+ password: string;
72
+ username: string;
73
+ }, {
74
+ type: "basic";
75
+ password: string;
76
+ username: string;
77
+ }>, z.ZodObject<{
78
+ type: z.ZodLiteral<"apiKey">;
79
+ key: z.ZodString;
80
+ name: z.ZodDefault<z.ZodString>;
81
+ in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ type: "apiKey";
84
+ name: string;
85
+ key: string;
86
+ in: "header" | "query";
87
+ }, {
88
+ type: "apiKey";
89
+ key: string;
90
+ name?: string | undefined;
91
+ in?: "header" | "query" | undefined;
92
+ }>, z.ZodObject<{
93
+ type: z.ZodLiteral<"customHeader">;
94
+ name: z.ZodString;
95
+ value: z.ZodString;
96
+ }, "strip", z.ZodTypeAny, {
97
+ value: string;
98
+ type: "customHeader";
99
+ name: string;
100
+ }, {
101
+ value: string;
102
+ type: "customHeader";
103
+ name: string;
104
+ }>]>;
105
+ export type HttpAuth = z.infer<typeof HttpAuthSchema>;
106
+ export declare const HttpRawContentTypeSchema: z.ZodEnum<["json", "xml", "html", "text", "javascript", "custom"]>;
107
+ export type HttpRawContentType = z.infer<typeof HttpRawContentTypeSchema>;
108
+ export declare const HttpBodySchema: z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
109
+ mode: z.ZodLiteral<"none">;
110
+ }, "strip", z.ZodTypeAny, {
111
+ mode: "none";
112
+ }, {
113
+ mode: "none";
114
+ }>, z.ZodObject<{
115
+ mode: z.ZodLiteral<"raw">;
116
+ raw: z.ZodString;
117
+ contentType: z.ZodDefault<z.ZodEnum<["json", "xml", "html", "text", "javascript", "custom"]>>;
118
+ customContentType: z.ZodOptional<z.ZodString>;
119
+ }, "strip", z.ZodTypeAny, {
120
+ raw: string;
121
+ mode: "raw";
122
+ contentType: "text" | "custom" | "json" | "xml" | "html" | "javascript";
123
+ customContentType?: string | undefined;
124
+ }, {
125
+ raw: string;
126
+ mode: "raw";
127
+ contentType?: "text" | "custom" | "json" | "xml" | "html" | "javascript" | undefined;
128
+ customContentType?: string | undefined;
129
+ }>, z.ZodObject<{
130
+ mode: z.ZodLiteral<"urlencoded">;
131
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
132
+ key: z.ZodString;
133
+ value: z.ZodString;
134
+ enabled: z.ZodDefault<z.ZodBoolean>;
135
+ }, "strip", z.ZodTypeAny, {
136
+ value: string;
137
+ key: string;
138
+ enabled: boolean;
139
+ }, {
140
+ value: string;
141
+ key: string;
142
+ enabled?: boolean | undefined;
143
+ }>, "many">>;
144
+ }, "strip", z.ZodTypeAny, {
145
+ mode: "urlencoded";
146
+ fields: {
147
+ value: string;
148
+ key: string;
149
+ enabled: boolean;
150
+ }[];
151
+ }, {
152
+ mode: "urlencoded";
153
+ fields?: {
154
+ value: string;
155
+ key: string;
156
+ enabled?: boolean | undefined;
157
+ }[] | undefined;
158
+ }>, z.ZodObject<{
159
+ mode: z.ZodLiteral<"formdata">;
160
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
161
+ key: z.ZodString;
162
+ value: z.ZodString;
163
+ enabled: z.ZodDefault<z.ZodBoolean>;
164
+ }, "strip", z.ZodTypeAny, {
165
+ value: string;
166
+ key: string;
167
+ enabled: boolean;
168
+ }, {
169
+ value: string;
170
+ key: string;
171
+ enabled?: boolean | undefined;
172
+ }>, "many">>;
173
+ }, "strip", z.ZodTypeAny, {
174
+ mode: "formdata";
175
+ fields: {
176
+ value: string;
177
+ key: string;
178
+ enabled: boolean;
179
+ }[];
180
+ }, {
181
+ mode: "formdata";
182
+ fields?: {
183
+ value: string;
184
+ key: string;
185
+ enabled?: boolean | undefined;
186
+ }[] | undefined;
187
+ }>]>;
188
+ export type HttpBody = z.infer<typeof HttpBodySchema>;
189
+ export declare const HttpResponseSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
190
+ type: z.ZodLiteral<"json">;
191
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
192
+ }, "strip", z.ZodTypeAny, {
193
+ type: "json";
194
+ bodySchema?: Record<string, unknown> | undefined;
195
+ }, {
196
+ type: "json";
197
+ bodySchema?: Record<string, unknown> | undefined;
198
+ }>, z.ZodObject<{
199
+ type: z.ZodLiteral<"auto">;
200
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
201
+ }, "strip", z.ZodTypeAny, {
202
+ type: "auto";
203
+ bodySchema?: Record<string, unknown> | undefined;
204
+ }, {
205
+ type: "auto";
206
+ bodySchema?: Record<string, unknown> | undefined;
207
+ }>, z.ZodObject<{
208
+ type: z.ZodLiteral<"text">;
209
+ }, "strict", z.ZodTypeAny, {
210
+ type: "text";
211
+ }, {
212
+ type: "text";
213
+ }>, z.ZodObject<{
214
+ type: z.ZodLiteral<"base64">;
215
+ }, "strict", z.ZodTypeAny, {
216
+ type: "base64";
217
+ }, {
218
+ type: "base64";
219
+ }>, z.ZodObject<{
220
+ type: z.ZodLiteral<"discard">;
221
+ }, "strict", z.ZodTypeAny, {
222
+ type: "discard";
223
+ }, {
224
+ type: "discard";
225
+ }>]>;
226
+ export type HttpResponseConfig = z.infer<typeof HttpResponseSchema>;
227
+ export type HttpResponseType = HttpResponseConfig['type'];
228
+ export declare const HttpMethodSchema: z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>;
229
+ export type HttpMethod = z.infer<typeof HttpMethodSchema>;
230
+ export declare const HttpRequestStepConfigSchema: z.ZodObject<{
231
+ url: z.ZodString;
232
+ method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
233
+ auth: z.ZodDefault<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
234
+ type: z.ZodLiteral<"none">;
235
+ }, "strip", z.ZodTypeAny, {
236
+ type: "none";
237
+ }, {
238
+ type: "none";
239
+ }>, z.ZodObject<{
240
+ type: z.ZodLiteral<"bearer">;
241
+ token: z.ZodString;
242
+ }, "strip", z.ZodTypeAny, {
243
+ type: "bearer";
244
+ token: string;
245
+ }, {
246
+ type: "bearer";
247
+ token: string;
248
+ }>, z.ZodObject<{
249
+ type: z.ZodLiteral<"basic">;
250
+ username: z.ZodString;
251
+ password: z.ZodString;
252
+ }, "strip", z.ZodTypeAny, {
253
+ type: "basic";
254
+ password: string;
255
+ username: string;
256
+ }, {
257
+ type: "basic";
258
+ password: string;
259
+ username: string;
260
+ }>, z.ZodObject<{
261
+ type: z.ZodLiteral<"apiKey">;
262
+ key: z.ZodString;
263
+ name: z.ZodDefault<z.ZodString>;
264
+ in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
265
+ }, "strip", z.ZodTypeAny, {
266
+ type: "apiKey";
267
+ name: string;
268
+ key: string;
269
+ in: "header" | "query";
270
+ }, {
271
+ type: "apiKey";
272
+ key: string;
273
+ name?: string | undefined;
274
+ in?: "header" | "query" | undefined;
275
+ }>, z.ZodObject<{
276
+ type: z.ZodLiteral<"customHeader">;
277
+ name: z.ZodString;
278
+ value: z.ZodString;
279
+ }, "strip", z.ZodTypeAny, {
280
+ value: string;
281
+ type: "customHeader";
282
+ name: string;
283
+ }, {
284
+ value: string;
285
+ type: "customHeader";
286
+ name: string;
287
+ }>]>>;
288
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
289
+ queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
290
+ body: z.ZodDefault<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
291
+ mode: z.ZodLiteral<"none">;
292
+ }, "strip", z.ZodTypeAny, {
293
+ mode: "none";
294
+ }, {
295
+ mode: "none";
296
+ }>, z.ZodObject<{
297
+ mode: z.ZodLiteral<"raw">;
298
+ raw: z.ZodString;
299
+ contentType: z.ZodDefault<z.ZodEnum<["json", "xml", "html", "text", "javascript", "custom"]>>;
300
+ customContentType: z.ZodOptional<z.ZodString>;
301
+ }, "strip", z.ZodTypeAny, {
302
+ raw: string;
303
+ mode: "raw";
304
+ contentType: "text" | "custom" | "json" | "xml" | "html" | "javascript";
305
+ customContentType?: string | undefined;
306
+ }, {
307
+ raw: string;
308
+ mode: "raw";
309
+ contentType?: "text" | "custom" | "json" | "xml" | "html" | "javascript" | undefined;
310
+ customContentType?: string | undefined;
311
+ }>, z.ZodObject<{
312
+ mode: z.ZodLiteral<"urlencoded">;
313
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
314
+ key: z.ZodString;
315
+ value: z.ZodString;
316
+ enabled: z.ZodDefault<z.ZodBoolean>;
317
+ }, "strip", z.ZodTypeAny, {
318
+ value: string;
319
+ key: string;
320
+ enabled: boolean;
321
+ }, {
322
+ value: string;
323
+ key: string;
324
+ enabled?: boolean | undefined;
325
+ }>, "many">>;
326
+ }, "strip", z.ZodTypeAny, {
327
+ mode: "urlencoded";
328
+ fields: {
329
+ value: string;
330
+ key: string;
331
+ enabled: boolean;
332
+ }[];
333
+ }, {
334
+ mode: "urlencoded";
335
+ fields?: {
336
+ value: string;
337
+ key: string;
338
+ enabled?: boolean | undefined;
339
+ }[] | undefined;
340
+ }>, z.ZodObject<{
341
+ mode: z.ZodLiteral<"formdata">;
342
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
343
+ key: z.ZodString;
344
+ value: z.ZodString;
345
+ enabled: z.ZodDefault<z.ZodBoolean>;
346
+ }, "strip", z.ZodTypeAny, {
347
+ value: string;
348
+ key: string;
349
+ enabled: boolean;
350
+ }, {
351
+ value: string;
352
+ key: string;
353
+ enabled?: boolean | undefined;
354
+ }>, "many">>;
355
+ }, "strip", z.ZodTypeAny, {
356
+ mode: "formdata";
357
+ fields: {
358
+ value: string;
359
+ key: string;
360
+ enabled: boolean;
361
+ }[];
362
+ }, {
363
+ mode: "formdata";
364
+ fields?: {
365
+ value: string;
366
+ key: string;
367
+ enabled?: boolean | undefined;
368
+ }[] | undefined;
369
+ }>]>>;
370
+ response: z.ZodDefault<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
371
+ type: z.ZodLiteral<"json">;
372
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ type: "json";
375
+ bodySchema?: Record<string, unknown> | undefined;
376
+ }, {
377
+ type: "json";
378
+ bodySchema?: Record<string, unknown> | undefined;
379
+ }>, z.ZodObject<{
380
+ type: z.ZodLiteral<"auto">;
381
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
382
+ }, "strip", z.ZodTypeAny, {
383
+ type: "auto";
384
+ bodySchema?: Record<string, unknown> | undefined;
385
+ }, {
386
+ type: "auto";
387
+ bodySchema?: Record<string, unknown> | undefined;
388
+ }>, z.ZodObject<{
389
+ type: z.ZodLiteral<"text">;
390
+ }, "strict", z.ZodTypeAny, {
391
+ type: "text";
392
+ }, {
393
+ type: "text";
394
+ }>, z.ZodObject<{
395
+ type: z.ZodLiteral<"base64">;
396
+ }, "strict", z.ZodTypeAny, {
397
+ type: "base64";
398
+ }, {
399
+ type: "base64";
400
+ }>, z.ZodObject<{
401
+ type: z.ZodLiteral<"discard">;
402
+ }, "strict", z.ZodTypeAny, {
403
+ type: "discard";
404
+ }, {
405
+ type: "discard";
406
+ }>]>>;
407
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
408
+ followRedirects: z.ZodDefault<z.ZodBoolean>;
409
+ }, "strip", z.ZodTypeAny, {
410
+ body: {
411
+ mode: "none";
412
+ } | {
413
+ raw: string;
414
+ mode: "raw";
415
+ contentType: "text" | "custom" | "json" | "xml" | "html" | "javascript";
416
+ customContentType?: string | undefined;
417
+ } | {
418
+ mode: "urlencoded";
419
+ fields: {
420
+ value: string;
421
+ key: string;
422
+ enabled: boolean;
423
+ }[];
424
+ } | {
425
+ mode: "formdata";
426
+ fields: {
427
+ value: string;
428
+ key: string;
429
+ enabled: boolean;
430
+ }[];
431
+ };
432
+ timeoutMs: number;
433
+ url: string;
434
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
435
+ auth: {
436
+ type: "none";
437
+ } | {
438
+ type: "bearer";
439
+ token: string;
440
+ } | {
441
+ type: "basic";
442
+ password: string;
443
+ username: string;
444
+ } | {
445
+ type: "apiKey";
446
+ name: string;
447
+ key: string;
448
+ in: "header" | "query";
449
+ } | {
450
+ value: string;
451
+ type: "customHeader";
452
+ name: string;
453
+ };
454
+ response: {
455
+ type: "json";
456
+ bodySchema?: Record<string, unknown> | undefined;
457
+ } | {
458
+ type: "auto";
459
+ bodySchema?: Record<string, unknown> | undefined;
460
+ } | {
461
+ type: "text";
462
+ } | {
463
+ type: "base64";
464
+ } | {
465
+ type: "discard";
466
+ };
467
+ followRedirects: boolean;
468
+ headers?: Record<string, string> | undefined;
469
+ queryParams?: Record<string, string> | undefined;
470
+ }, {
471
+ url: string;
472
+ headers?: Record<string, string> | undefined;
473
+ body?: {
474
+ mode: "none";
475
+ } | {
476
+ raw: string;
477
+ mode: "raw";
478
+ contentType?: "text" | "custom" | "json" | "xml" | "html" | "javascript" | undefined;
479
+ customContentType?: string | undefined;
480
+ } | {
481
+ mode: "urlencoded";
482
+ fields?: {
483
+ value: string;
484
+ key: string;
485
+ enabled?: boolean | undefined;
486
+ }[] | undefined;
487
+ } | {
488
+ mode: "formdata";
489
+ fields?: {
490
+ value: string;
491
+ key: string;
492
+ enabled?: boolean | undefined;
493
+ }[] | undefined;
494
+ } | undefined;
495
+ timeoutMs?: number | undefined;
496
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | undefined;
497
+ auth?: {
498
+ type: "none";
499
+ } | {
500
+ type: "bearer";
501
+ token: string;
502
+ } | {
503
+ type: "basic";
504
+ password: string;
505
+ username: string;
506
+ } | {
507
+ type: "apiKey";
508
+ key: string;
509
+ name?: string | undefined;
510
+ in?: "header" | "query" | undefined;
511
+ } | {
512
+ value: string;
513
+ type: "customHeader";
514
+ name: string;
515
+ } | undefined;
516
+ queryParams?: Record<string, string> | undefined;
517
+ response?: {
518
+ type: "json";
519
+ bodySchema?: Record<string, unknown> | undefined;
520
+ } | {
521
+ type: "auto";
522
+ bodySchema?: Record<string, unknown> | undefined;
523
+ } | {
524
+ type: "text";
525
+ } | {
526
+ type: "base64";
527
+ } | {
528
+ type: "discard";
529
+ } | undefined;
530
+ followRedirects?: boolean | undefined;
531
+ }>;
532
+ export type HttpRequestStepConfig = z.infer<typeof HttpRequestStepConfigSchema>;
533
+ export interface HttpRequestStepOutput extends Record<string, unknown> {
534
+ /** HTTP status code (e.g. 200, 404, 500). */
535
+ status: number;
536
+ /** Status text (e.g. "OK", "Not Found"). */
537
+ statusText: string;
538
+ /** Whether the status is 2xx. */
539
+ ok: boolean;
540
+ /** Response headers as a flat key-value map (lowercase keys). */
541
+ headers: Record<string, string>;
542
+ /**
543
+ * Parsed response body. Shape depends on `responseType`:
544
+ * - `json` → object / array / primitive
545
+ * - `text` → string
546
+ * - `base64` → base64 string of the raw bytes
547
+ * - `auto` → object | string | null (detected from content-type)
548
+ * - `discard` → null
549
+ */
550
+ body: unknown;
551
+ /** Raw response body text — always present, empty for `discard`. */
552
+ bodyText: string;
553
+ /** Response size in bytes. */
554
+ size: number;
555
+ /** Request duration in milliseconds. */
556
+ duration: number;
557
+ }
558
+ export declare class HttpRequestStep extends BaseActionStep<typeof HttpRequestStepConfigSchema, HttpRequestStepOutput> {
559
+ readonly type = BuiltinStepType.HTTP_REQUEST;
560
+ readonly name = "HTTP Request";
561
+ readonly description = "Make HTTP requests to external APIs";
562
+ readonly configSchema: z.ZodObject<{
563
+ url: z.ZodString;
564
+ method: z.ZodDefault<z.ZodEnum<["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS"]>>;
565
+ auth: z.ZodDefault<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
566
+ type: z.ZodLiteral<"none">;
567
+ }, "strip", z.ZodTypeAny, {
568
+ type: "none";
569
+ }, {
570
+ type: "none";
571
+ }>, z.ZodObject<{
572
+ type: z.ZodLiteral<"bearer">;
573
+ token: z.ZodString;
574
+ }, "strip", z.ZodTypeAny, {
575
+ type: "bearer";
576
+ token: string;
577
+ }, {
578
+ type: "bearer";
579
+ token: string;
580
+ }>, z.ZodObject<{
581
+ type: z.ZodLiteral<"basic">;
582
+ username: z.ZodString;
583
+ password: z.ZodString;
584
+ }, "strip", z.ZodTypeAny, {
585
+ type: "basic";
586
+ password: string;
587
+ username: string;
588
+ }, {
589
+ type: "basic";
590
+ password: string;
591
+ username: string;
592
+ }>, z.ZodObject<{
593
+ type: z.ZodLiteral<"apiKey">;
594
+ key: z.ZodString;
595
+ name: z.ZodDefault<z.ZodString>;
596
+ in: z.ZodDefault<z.ZodEnum<["header", "query"]>>;
597
+ }, "strip", z.ZodTypeAny, {
598
+ type: "apiKey";
599
+ name: string;
600
+ key: string;
601
+ in: "header" | "query";
602
+ }, {
603
+ type: "apiKey";
604
+ key: string;
605
+ name?: string | undefined;
606
+ in?: "header" | "query" | undefined;
607
+ }>, z.ZodObject<{
608
+ type: z.ZodLiteral<"customHeader">;
609
+ name: z.ZodString;
610
+ value: z.ZodString;
611
+ }, "strip", z.ZodTypeAny, {
612
+ value: string;
613
+ type: "customHeader";
614
+ name: string;
615
+ }, {
616
+ value: string;
617
+ type: "customHeader";
618
+ name: string;
619
+ }>]>>;
620
+ headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
621
+ queryParams: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
622
+ body: z.ZodDefault<z.ZodDiscriminatedUnion<"mode", [z.ZodObject<{
623
+ mode: z.ZodLiteral<"none">;
624
+ }, "strip", z.ZodTypeAny, {
625
+ mode: "none";
626
+ }, {
627
+ mode: "none";
628
+ }>, z.ZodObject<{
629
+ mode: z.ZodLiteral<"raw">;
630
+ raw: z.ZodString;
631
+ contentType: z.ZodDefault<z.ZodEnum<["json", "xml", "html", "text", "javascript", "custom"]>>;
632
+ customContentType: z.ZodOptional<z.ZodString>;
633
+ }, "strip", z.ZodTypeAny, {
634
+ raw: string;
635
+ mode: "raw";
636
+ contentType: "text" | "custom" | "json" | "xml" | "html" | "javascript";
637
+ customContentType?: string | undefined;
638
+ }, {
639
+ raw: string;
640
+ mode: "raw";
641
+ contentType?: "text" | "custom" | "json" | "xml" | "html" | "javascript" | undefined;
642
+ customContentType?: string | undefined;
643
+ }>, z.ZodObject<{
644
+ mode: z.ZodLiteral<"urlencoded">;
645
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
646
+ key: z.ZodString;
647
+ value: z.ZodString;
648
+ enabled: z.ZodDefault<z.ZodBoolean>;
649
+ }, "strip", z.ZodTypeAny, {
650
+ value: string;
651
+ key: string;
652
+ enabled: boolean;
653
+ }, {
654
+ value: string;
655
+ key: string;
656
+ enabled?: boolean | undefined;
657
+ }>, "many">>;
658
+ }, "strip", z.ZodTypeAny, {
659
+ mode: "urlencoded";
660
+ fields: {
661
+ value: string;
662
+ key: string;
663
+ enabled: boolean;
664
+ }[];
665
+ }, {
666
+ mode: "urlencoded";
667
+ fields?: {
668
+ value: string;
669
+ key: string;
670
+ enabled?: boolean | undefined;
671
+ }[] | undefined;
672
+ }>, z.ZodObject<{
673
+ mode: z.ZodLiteral<"formdata">;
674
+ fields: z.ZodDefault<z.ZodArray<z.ZodObject<{
675
+ key: z.ZodString;
676
+ value: z.ZodString;
677
+ enabled: z.ZodDefault<z.ZodBoolean>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ value: string;
680
+ key: string;
681
+ enabled: boolean;
682
+ }, {
683
+ value: string;
684
+ key: string;
685
+ enabled?: boolean | undefined;
686
+ }>, "many">>;
687
+ }, "strip", z.ZodTypeAny, {
688
+ mode: "formdata";
689
+ fields: {
690
+ value: string;
691
+ key: string;
692
+ enabled: boolean;
693
+ }[];
694
+ }, {
695
+ mode: "formdata";
696
+ fields?: {
697
+ value: string;
698
+ key: string;
699
+ enabled?: boolean | undefined;
700
+ }[] | undefined;
701
+ }>]>>;
702
+ response: z.ZodDefault<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
703
+ type: z.ZodLiteral<"json">;
704
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
705
+ }, "strip", z.ZodTypeAny, {
706
+ type: "json";
707
+ bodySchema?: Record<string, unknown> | undefined;
708
+ }, {
709
+ type: "json";
710
+ bodySchema?: Record<string, unknown> | undefined;
711
+ }>, z.ZodObject<{
712
+ type: z.ZodLiteral<"auto">;
713
+ bodySchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
714
+ }, "strip", z.ZodTypeAny, {
715
+ type: "auto";
716
+ bodySchema?: Record<string, unknown> | undefined;
717
+ }, {
718
+ type: "auto";
719
+ bodySchema?: Record<string, unknown> | undefined;
720
+ }>, z.ZodObject<{
721
+ type: z.ZodLiteral<"text">;
722
+ }, "strict", z.ZodTypeAny, {
723
+ type: "text";
724
+ }, {
725
+ type: "text";
726
+ }>, z.ZodObject<{
727
+ type: z.ZodLiteral<"base64">;
728
+ }, "strict", z.ZodTypeAny, {
729
+ type: "base64";
730
+ }, {
731
+ type: "base64";
732
+ }>, z.ZodObject<{
733
+ type: z.ZodLiteral<"discard">;
734
+ }, "strict", z.ZodTypeAny, {
735
+ type: "discard";
736
+ }, {
737
+ type: "discard";
738
+ }>]>>;
739
+ timeoutMs: z.ZodDefault<z.ZodNumber>;
740
+ followRedirects: z.ZodDefault<z.ZodBoolean>;
741
+ }, "strip", z.ZodTypeAny, {
742
+ body: {
743
+ mode: "none";
744
+ } | {
745
+ raw: string;
746
+ mode: "raw";
747
+ contentType: "text" | "custom" | "json" | "xml" | "html" | "javascript";
748
+ customContentType?: string | undefined;
749
+ } | {
750
+ mode: "urlencoded";
751
+ fields: {
752
+ value: string;
753
+ key: string;
754
+ enabled: boolean;
755
+ }[];
756
+ } | {
757
+ mode: "formdata";
758
+ fields: {
759
+ value: string;
760
+ key: string;
761
+ enabled: boolean;
762
+ }[];
763
+ };
764
+ timeoutMs: number;
765
+ url: string;
766
+ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS";
767
+ auth: {
768
+ type: "none";
769
+ } | {
770
+ type: "bearer";
771
+ token: string;
772
+ } | {
773
+ type: "basic";
774
+ password: string;
775
+ username: string;
776
+ } | {
777
+ type: "apiKey";
778
+ name: string;
779
+ key: string;
780
+ in: "header" | "query";
781
+ } | {
782
+ value: string;
783
+ type: "customHeader";
784
+ name: string;
785
+ };
786
+ response: {
787
+ type: "json";
788
+ bodySchema?: Record<string, unknown> | undefined;
789
+ } | {
790
+ type: "auto";
791
+ bodySchema?: Record<string, unknown> | undefined;
792
+ } | {
793
+ type: "text";
794
+ } | {
795
+ type: "base64";
796
+ } | {
797
+ type: "discard";
798
+ };
799
+ followRedirects: boolean;
800
+ headers?: Record<string, string> | undefined;
801
+ queryParams?: Record<string, string> | undefined;
802
+ }, {
803
+ url: string;
804
+ headers?: Record<string, string> | undefined;
805
+ body?: {
806
+ mode: "none";
807
+ } | {
808
+ raw: string;
809
+ mode: "raw";
810
+ contentType?: "text" | "custom" | "json" | "xml" | "html" | "javascript" | undefined;
811
+ customContentType?: string | undefined;
812
+ } | {
813
+ mode: "urlencoded";
814
+ fields?: {
815
+ value: string;
816
+ key: string;
817
+ enabled?: boolean | undefined;
818
+ }[] | undefined;
819
+ } | {
820
+ mode: "formdata";
821
+ fields?: {
822
+ value: string;
823
+ key: string;
824
+ enabled?: boolean | undefined;
825
+ }[] | undefined;
826
+ } | undefined;
827
+ timeoutMs?: number | undefined;
828
+ method?: "GET" | "POST" | "PUT" | "PATCH" | "DELETE" | "HEAD" | "OPTIONS" | undefined;
829
+ auth?: {
830
+ type: "none";
831
+ } | {
832
+ type: "bearer";
833
+ token: string;
834
+ } | {
835
+ type: "basic";
836
+ password: string;
837
+ username: string;
838
+ } | {
839
+ type: "apiKey";
840
+ key: string;
841
+ name?: string | undefined;
842
+ in?: "header" | "query" | undefined;
843
+ } | {
844
+ value: string;
845
+ type: "customHeader";
846
+ name: string;
847
+ } | undefined;
848
+ queryParams?: Record<string, string> | undefined;
849
+ response?: {
850
+ type: "json";
851
+ bodySchema?: Record<string, unknown> | undefined;
852
+ } | {
853
+ type: "auto";
854
+ bodySchema?: Record<string, unknown> | undefined;
855
+ } | {
856
+ type: "text";
857
+ } | {
858
+ type: "base64";
859
+ } | {
860
+ type: "discard";
861
+ } | undefined;
862
+ followRedirects?: boolean | undefined;
863
+ }>;
864
+ readonly outputSchema: z.ZodObject<{
865
+ status: z.ZodNumber;
866
+ statusText: z.ZodString;
867
+ ok: z.ZodBoolean;
868
+ headers: z.ZodRecord<z.ZodString, z.ZodString>;
869
+ body: z.ZodUnknown;
870
+ bodyText: z.ZodString;
871
+ size: z.ZodNumber;
872
+ duration: z.ZodNumber;
873
+ }, "strip", z.ZodTypeAny, {
874
+ status: number;
875
+ headers: Record<string, string>;
876
+ duration: number;
877
+ statusText: string;
878
+ ok: boolean;
879
+ bodyText: string;
880
+ size: number;
881
+ body?: unknown;
882
+ }, {
883
+ status: number;
884
+ headers: Record<string, string>;
885
+ duration: number;
886
+ statusText: string;
887
+ ok: boolean;
888
+ bodyText: string;
889
+ size: number;
890
+ body?: unknown;
891
+ }>;
892
+ readonly category: StepCategory;
893
+ readonly icon = "globe";
894
+ /**
895
+ * Credential slots — fallback auth when config.auth is 'none'.
896
+ * Resolved by the executor from the credential vault.
897
+ */
898
+ readonly credentialSlots: readonly CredentialSlot[];
899
+ /** Credential type schemas — defines what fields each credential type needs for UI forms. */
900
+ readonly credentialTypeSchemas: readonly CredentialTypeSchema[];
901
+ decorateConfigSchema(jsonSchema: Record<string, unknown>): Record<string, unknown>;
902
+ /**
903
+ * Per-instance output schema. When the author's `response` config provides
904
+ * a `bodySchema` (json/auto), we plug it into `body`. For other response
905
+ * types (`text`, `base64`, `discard`) we set the body's static type since
906
+ * no user shape is involved.
907
+ */
908
+ resolveOutputJsonSchema(config: Record<string, unknown>): Record<string, unknown>;
909
+ private outputBodySchemaFor;
910
+ redactInput(input: Record<string, unknown>): Record<string, unknown>;
911
+ execute(config: HttpRequestStepConfig, ctx: StepExecutionContext): Promise<HttpRequestStepOutput>;
912
+ private buildUrl;
913
+ private applyAuth;
914
+ private applyConfigAuth;
915
+ private applyCredentialAuth;
916
+ /**
917
+ * Encode the request body for the given mode. Mutates `headers` to set
918
+ * the appropriate Content-Type unless the user already supplied one.
919
+ *
920
+ * Returns the `BodyInit` to attach (or `undefined` for empty bodies).
921
+ */
922
+ private encodeBody;
923
+ private decodeText;
924
+ private parseResponseBody;
925
+ private autoParseBody;
926
+ }
927
+ export {};
928
+ //# sourceMappingURL=http-request.step.d.ts.map