@sixb/server 0.0.1

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 (216) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +123 -0
  3. package/dist/auth/access-token-boundary.d.ts +23 -0
  4. package/dist/auth/access-token-boundary.d.ts.map +1 -0
  5. package/dist/auth/application-access.d.ts +4 -0
  6. package/dist/auth/application-access.d.ts.map +1 -0
  7. package/dist/auth/browser-origin.d.ts +62 -0
  8. package/dist/auth/browser-origin.d.ts.map +1 -0
  9. package/dist/auth/csrf.d.ts +2 -0
  10. package/dist/auth/csrf.d.ts.map +1 -0
  11. package/dist/auth/guard.d.ts +35 -0
  12. package/dist/auth/guard.d.ts.map +1 -0
  13. package/dist/auth/public-routes.d.ts +8 -0
  14. package/dist/auth/public-routes.d.ts.map +1 -0
  15. package/dist/auth/responses.d.ts +11 -0
  16. package/dist/auth/responses.d.ts.map +1 -0
  17. package/dist/auth/return-to.d.ts +3 -0
  18. package/dist/auth/return-to.d.ts.map +1 -0
  19. package/dist/auth/scope.d.ts +43 -0
  20. package/dist/auth/scope.d.ts.map +1 -0
  21. package/dist/auth/session-activity.d.ts +4 -0
  22. package/dist/auth/session-activity.d.ts.map +1 -0
  23. package/dist/auth/session-cookies.d.ts +12 -0
  24. package/dist/auth/session-cookies.d.ts.map +1 -0
  25. package/dist/files/content.d.ts +141 -0
  26. package/dist/files/content.d.ts.map +1 -0
  27. package/dist/index.d.ts +3 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +11522 -0
  30. package/dist/index.js.map +78 -0
  31. package/dist/openapi/security.d.ts +26 -0
  32. package/dist/openapi/security.d.ts.map +1 -0
  33. package/dist/openapi/tags.d.ts +151 -0
  34. package/dist/openapi/tags.d.ts.map +1 -0
  35. package/dist/registerRoutes.d.ts +31 -0
  36. package/dist/registerRoutes.d.ts.map +1 -0
  37. package/dist/routes/action-runs.d.ts +244 -0
  38. package/dist/routes/action-runs.d.ts.map +1 -0
  39. package/dist/routes/actions.d.ts +183 -0
  40. package/dist/routes/actions.d.ts.map +1 -0
  41. package/dist/routes/agent-api-gateway.d.ts +4 -0
  42. package/dist/routes/agent-api-gateway.d.ts.map +1 -0
  43. package/dist/routes/agents.d.ts +1061 -0
  44. package/dist/routes/agents.d.ts.map +1 -0
  45. package/dist/routes/auth.d.ts +1366 -0
  46. package/dist/routes/auth.d.ts.map +1 -0
  47. package/dist/routes/connectors.d.ts +108 -0
  48. package/dist/routes/connectors.d.ts.map +1 -0
  49. package/dist/routes/datasets.d.ts +339 -0
  50. package/dist/routes/datasets.d.ts.map +1 -0
  51. package/dist/routes/events.d.ts +116 -0
  52. package/dist/routes/events.d.ts.map +1 -0
  53. package/dist/routes/files.d.ts +340 -0
  54. package/dist/routes/files.d.ts.map +1 -0
  55. package/dist/routes/links.d.ts +175 -0
  56. package/dist/routes/links.d.ts.map +1 -0
  57. package/dist/routes/logs.d.ts +88 -0
  58. package/dist/routes/logs.d.ts.map +1 -0
  59. package/dist/routes/objects.d.ts +450 -0
  60. package/dist/routes/objects.d.ts.map +1 -0
  61. package/dist/routes/ontology.d.ts +240 -0
  62. package/dist/routes/ontology.d.ts.map +1 -0
  63. package/dist/routes/pipelines.d.ts +399 -0
  64. package/dist/routes/pipelines.d.ts.map +1 -0
  65. package/dist/routes/project.d.ts +56 -0
  66. package/dist/routes/project.d.ts.map +1 -0
  67. package/dist/routes/projections.d.ts +916 -0
  68. package/dist/routes/projections.d.ts.map +1 -0
  69. package/dist/routes/rules.d.ts +165 -0
  70. package/dist/routes/rules.d.ts.map +1 -0
  71. package/dist/routes/status.d.ts +81 -0
  72. package/dist/routes/status.d.ts.map +1 -0
  73. package/dist/routes/syncs.d.ts +294 -0
  74. package/dist/routes/syncs.d.ts.map +1 -0
  75. package/dist/routes/telemetry.d.ts +241 -0
  76. package/dist/routes/telemetry.d.ts.map +1 -0
  77. package/dist/routes/webhook-runs.d.ts +89 -0
  78. package/dist/routes/webhook-runs.d.ts.map +1 -0
  79. package/dist/routes/webhooks.d.ts +60 -0
  80. package/dist/routes/webhooks.d.ts.map +1 -0
  81. package/dist/routes/workflows.d.ts +973 -0
  82. package/dist/routes/workflows.d.ts.map +1 -0
  83. package/dist/routes/ws/agents.d.ts +99 -0
  84. package/dist/routes/ws/agents.d.ts.map +1 -0
  85. package/dist/routes/ws/events.d.ts +89 -0
  86. package/dist/routes/ws/events.d.ts.map +1 -0
  87. package/dist/routes/ws/index.d.ts +31 -0
  88. package/dist/routes/ws/index.d.ts.map +1 -0
  89. package/dist/routes/ws/log-subscription-hub.d.ts +47 -0
  90. package/dist/routes/ws/log-subscription-hub.d.ts.map +1 -0
  91. package/dist/routes/ws/logs.d.ts +110 -0
  92. package/dist/routes/ws/logs.d.ts.map +1 -0
  93. package/dist/schemas/actions.d.ts +644 -0
  94. package/dist/schemas/actions.d.ts.map +1 -0
  95. package/dist/schemas/agents.d.ts +3157 -0
  96. package/dist/schemas/agents.d.ts.map +1 -0
  97. package/dist/schemas/auth.d.ts +2023 -0
  98. package/dist/schemas/auth.d.ts.map +1 -0
  99. package/dist/schemas/common.d.ts +30 -0
  100. package/dist/schemas/common.d.ts.map +1 -0
  101. package/dist/schemas/connectors.d.ts +82 -0
  102. package/dist/schemas/connectors.d.ts.map +1 -0
  103. package/dist/schemas/datasets.d.ts +744 -0
  104. package/dist/schemas/datasets.d.ts.map +1 -0
  105. package/dist/schemas/event-payloads.d.ts +477 -0
  106. package/dist/schemas/event-payloads.d.ts.map +1 -0
  107. package/dist/schemas/events.d.ts +665 -0
  108. package/dist/schemas/events.d.ts.map +1 -0
  109. package/dist/schemas/files.d.ts +241 -0
  110. package/dist/schemas/files.d.ts.map +1 -0
  111. package/dist/schemas/links.d.ts +90 -0
  112. package/dist/schemas/links.d.ts.map +1 -0
  113. package/dist/schemas/logs.d.ts +231 -0
  114. package/dist/schemas/logs.d.ts.map +1 -0
  115. package/dist/schemas/objects.d.ts +288 -0
  116. package/dist/schemas/objects.d.ts.map +1 -0
  117. package/dist/schemas/ontology.d.ts +778 -0
  118. package/dist/schemas/ontology.d.ts.map +1 -0
  119. package/dist/schemas/pipelines.d.ts +1373 -0
  120. package/dist/schemas/pipelines.d.ts.map +1 -0
  121. package/dist/schemas/project.d.ts +9 -0
  122. package/dist/schemas/project.d.ts.map +1 -0
  123. package/dist/schemas/projections.d.ts +6992 -0
  124. package/dist/schemas/projections.d.ts.map +1 -0
  125. package/dist/schemas/rules.d.ts +204 -0
  126. package/dist/schemas/rules.d.ts.map +1 -0
  127. package/dist/schemas/status.d.ts +189 -0
  128. package/dist/schemas/status.d.ts.map +1 -0
  129. package/dist/schemas/syncs.d.ts +538 -0
  130. package/dist/schemas/syncs.d.ts.map +1 -0
  131. package/dist/schemas/telemetry.d.ts +265 -0
  132. package/dist/schemas/telemetry.d.ts.map +1 -0
  133. package/dist/schemas/webhook-runs.d.ts +169 -0
  134. package/dist/schemas/webhook-runs.d.ts.map +1 -0
  135. package/dist/schemas/workflows.d.ts +1720 -0
  136. package/dist/schemas/workflows.d.ts.map +1 -0
  137. package/dist/server.d.ts +64 -0
  138. package/dist/server.d.ts.map +1 -0
  139. package/dist/tsconfig.json +5 -0
  140. package/dist/utils/http.d.ts +23 -0
  141. package/dist/utils/http.d.ts.map +1 -0
  142. package/dist/utils/request-body.d.ts +15 -0
  143. package/dist/utils/request-body.d.ts.map +1 -0
  144. package/dist/utils/ws.d.ts +10 -0
  145. package/dist/utils/ws.d.ts.map +1 -0
  146. package/package.json +68 -0
  147. package/src/auth/access-token-boundary.ts +68 -0
  148. package/src/auth/application-access.ts +16 -0
  149. package/src/auth/browser-origin.ts +367 -0
  150. package/src/auth/csrf.ts +1 -0
  151. package/src/auth/guard.ts +169 -0
  152. package/src/auth/public-routes.ts +87 -0
  153. package/src/auth/responses.ts +54 -0
  154. package/src/auth/return-to.ts +21 -0
  155. package/src/auth/scope.ts +64 -0
  156. package/src/auth/session-activity.ts +19 -0
  157. package/src/auth/session-cookies.ts +43 -0
  158. package/src/files/content.ts +419 -0
  159. package/src/index.ts +2 -0
  160. package/src/openapi/security.ts +37 -0
  161. package/src/openapi/tags.ts +151 -0
  162. package/src/registerRoutes.ts +49 -0
  163. package/src/routes/action-runs.ts +238 -0
  164. package/src/routes/actions.ts +126 -0
  165. package/src/routes/agent-api-gateway.ts +260 -0
  166. package/src/routes/agents.ts +943 -0
  167. package/src/routes/auth.ts +2233 -0
  168. package/src/routes/connectors.ts +69 -0
  169. package/src/routes/datasets.ts +402 -0
  170. package/src/routes/events.ts +55 -0
  171. package/src/routes/files.ts +675 -0
  172. package/src/routes/links.ts +143 -0
  173. package/src/routes/logs.ts +65 -0
  174. package/src/routes/objects.ts +838 -0
  175. package/src/routes/ontology.ts +138 -0
  176. package/src/routes/pipelines.ts +332 -0
  177. package/src/routes/project.ts +16 -0
  178. package/src/routes/projections.ts +251 -0
  179. package/src/routes/rules.ts +124 -0
  180. package/src/routes/status.ts +53 -0
  181. package/src/routes/syncs.ts +243 -0
  182. package/src/routes/telemetry.ts +207 -0
  183. package/src/routes/webhook-runs.ts +81 -0
  184. package/src/routes/webhooks.ts +508 -0
  185. package/src/routes/workflows.ts +1333 -0
  186. package/src/routes/ws/agents.ts +301 -0
  187. package/src/routes/ws/events.ts +278 -0
  188. package/src/routes/ws/index.ts +12 -0
  189. package/src/routes/ws/log-subscription-hub.ts +375 -0
  190. package/src/routes/ws/logs.ts +117 -0
  191. package/src/schemas/actions.ts +123 -0
  192. package/src/schemas/agents.ts +293 -0
  193. package/src/schemas/auth.ts +317 -0
  194. package/src/schemas/common.ts +60 -0
  195. package/src/schemas/connectors.ts +21 -0
  196. package/src/schemas/datasets.ts +107 -0
  197. package/src/schemas/event-payloads.ts +79 -0
  198. package/src/schemas/events.ts +117 -0
  199. package/src/schemas/files.ts +82 -0
  200. package/src/schemas/links.ts +38 -0
  201. package/src/schemas/logs.ts +76 -0
  202. package/src/schemas/objects.ts +759 -0
  203. package/src/schemas/ontology.ts +77 -0
  204. package/src/schemas/pipelines.ts +150 -0
  205. package/src/schemas/project.ts +5 -0
  206. package/src/schemas/projections.ts +144 -0
  207. package/src/schemas/rules.ts +98 -0
  208. package/src/schemas/status.ts +51 -0
  209. package/src/schemas/syncs.ts +83 -0
  210. package/src/schemas/telemetry.ts +59 -0
  211. package/src/schemas/webhook-runs.ts +40 -0
  212. package/src/schemas/workflows.ts +229 -0
  213. package/src/server.ts +383 -0
  214. package/src/utils/http.ts +108 -0
  215. package/src/utils/request-body.ts +62 -0
  216. package/src/utils/ws.ts +59 -0
@@ -0,0 +1,973 @@
1
+ import { type OntologySource, type Sixb } from "@sixb/core";
2
+ import type { Elysia } from "elysia";
3
+ export declare function registerWorkflowRoutes(app: Elysia, sixb: Sixb<readonly OntologySource[]>): Elysia<"", {
4
+ decorator: {};
5
+ store: {};
6
+ derive: {};
7
+ resolve: {};
8
+ }, {
9
+ typebox: {};
10
+ error: {};
11
+ }, {
12
+ schema: {};
13
+ standaloneSchema: {};
14
+ macro: {};
15
+ macroFn: {};
16
+ parser: {};
17
+ response: {};
18
+ }, {
19
+ api: {
20
+ workflows: {
21
+ get: {
22
+ body: unknown;
23
+ params: {};
24
+ query: unknown;
25
+ headers: unknown;
26
+ response: {
27
+ 200: {
28
+ id: string;
29
+ input: Record<string, unknown>;
30
+ triggers: {
31
+ type: "schedule";
32
+ scheduleId: string;
33
+ }[];
34
+ nodes: ({
35
+ type: "step";
36
+ id: string;
37
+ output: Record<string, unknown>;
38
+ key: string;
39
+ input: Record<string, unknown>;
40
+ } | {
41
+ type: "action";
42
+ params: Record<string, unknown>;
43
+ id: string;
44
+ key: string;
45
+ objectTypeId?: string | undefined;
46
+ } | {
47
+ response: Record<string, unknown>;
48
+ type: "intervention";
49
+ id: string;
50
+ key: string;
51
+ input: Record<string, unknown>;
52
+ description?: string | undefined;
53
+ } | {
54
+ agentId: string;
55
+ type: "agent";
56
+ id: string;
57
+ output: Record<string, unknown>;
58
+ key: string;
59
+ input: Record<string, unknown>;
60
+ })[];
61
+ latestRun: {
62
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
63
+ projectId: string;
64
+ id: string;
65
+ startedAt: string;
66
+ input: Record<string, unknown>;
67
+ workflowId: string;
68
+ requestedBy: {
69
+ principalType: "serviceAccount" | "user" | "system";
70
+ principalId: string;
71
+ };
72
+ error?: string | undefined;
73
+ queuedAt?: string | undefined;
74
+ finishedAt?: string | undefined;
75
+ } | null;
76
+ }[];
77
+ 422: {
78
+ type: "validation";
79
+ on: string;
80
+ summary?: string;
81
+ message?: string;
82
+ found?: unknown;
83
+ property?: string;
84
+ expected?: string;
85
+ };
86
+ };
87
+ };
88
+ };
89
+ };
90
+ } & {
91
+ api: {
92
+ workflows: {
93
+ ":workflowId": {
94
+ get: {
95
+ body: unknown;
96
+ params: {
97
+ workflowId: string;
98
+ };
99
+ query: unknown;
100
+ headers: unknown;
101
+ response: {
102
+ 200: {
103
+ id: string;
104
+ input: Record<string, unknown>;
105
+ triggers: {
106
+ type: "schedule";
107
+ scheduleId: string;
108
+ }[];
109
+ nodes: ({
110
+ type: "step";
111
+ id: string;
112
+ output: Record<string, unknown>;
113
+ key: string;
114
+ input: Record<string, unknown>;
115
+ } | {
116
+ type: "action";
117
+ params: Record<string, unknown>;
118
+ id: string;
119
+ key: string;
120
+ objectTypeId?: string | undefined;
121
+ } | {
122
+ response: Record<string, unknown>;
123
+ type: "intervention";
124
+ id: string;
125
+ key: string;
126
+ input: Record<string, unknown>;
127
+ description?: string | undefined;
128
+ } | {
129
+ agentId: string;
130
+ type: "agent";
131
+ id: string;
132
+ output: Record<string, unknown>;
133
+ key: string;
134
+ input: Record<string, unknown>;
135
+ })[];
136
+ latestRun: {
137
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
138
+ projectId: string;
139
+ id: string;
140
+ startedAt: string;
141
+ input: Record<string, unknown>;
142
+ workflowId: string;
143
+ requestedBy: {
144
+ principalType: "serviceAccount" | "user" | "system";
145
+ principalId: string;
146
+ };
147
+ error?: string | undefined;
148
+ queuedAt?: string | undefined;
149
+ finishedAt?: string | undefined;
150
+ } | null;
151
+ };
152
+ 404: {
153
+ error: string;
154
+ };
155
+ 422: {
156
+ type: "validation";
157
+ on: string;
158
+ summary?: string;
159
+ message?: string;
160
+ found?: unknown;
161
+ property?: string;
162
+ expected?: string;
163
+ };
164
+ };
165
+ };
166
+ };
167
+ };
168
+ };
169
+ } & {
170
+ api: {
171
+ "workflow-interventions": {
172
+ get: {
173
+ body: unknown;
174
+ params: {};
175
+ query: {
176
+ status?: "cancelled" | "expired" | "pending" | "submitted" | undefined;
177
+ limit?: string | undefined;
178
+ offset?: string | undefined;
179
+ order?: "asc" | "desc" | undefined;
180
+ workflowId?: string | undefined;
181
+ nodeRunId?: string | undefined;
182
+ nodeId?: string | undefined;
183
+ nodeKey?: string | undefined;
184
+ interventionId?: string | undefined;
185
+ workflowRunId?: string | undefined;
186
+ requestedAfter?: string | undefined;
187
+ requestedBefore?: string | undefined;
188
+ };
189
+ headers: unknown;
190
+ response: {
191
+ 200: {
192
+ hasMore: boolean;
193
+ total: number;
194
+ interventions: {
195
+ status: "cancelled" | "expired" | "pending" | "submitted";
196
+ projectId: string;
197
+ id: string;
198
+ input: Record<string, unknown>;
199
+ workflowId: string;
200
+ nodeRunId: string;
201
+ nodeIndex: number;
202
+ nodeId: string;
203
+ nodeKey: string;
204
+ interventionId: string;
205
+ requestedAt: string;
206
+ workflowRunId: string;
207
+ defaultResponse: Record<string, unknown>;
208
+ response?: Record<string, unknown> | undefined;
209
+ expiresAt?: string | undefined;
210
+ submittedAt?: string | undefined;
211
+ cancelledAt?: string | undefined;
212
+ expiredAt?: string | undefined;
213
+ submittedBy?: {
214
+ principalType: "serviceAccount" | "user" | "system";
215
+ principalId: string;
216
+ } | undefined;
217
+ cancelledBy?: {
218
+ principalType: "serviceAccount" | "user" | "system";
219
+ principalId: string;
220
+ } | undefined;
221
+ }[];
222
+ };
223
+ 400: {
224
+ error: string;
225
+ };
226
+ 501: {
227
+ error: string;
228
+ };
229
+ 422: {
230
+ type: "validation";
231
+ on: string;
232
+ summary?: string;
233
+ message?: string;
234
+ found?: unknown;
235
+ property?: string;
236
+ expected?: string;
237
+ };
238
+ };
239
+ };
240
+ };
241
+ };
242
+ } & {
243
+ api: {
244
+ "workflow-interventions": {
245
+ ":interventionId": {
246
+ get: {
247
+ body: unknown;
248
+ params: {
249
+ interventionId: string;
250
+ };
251
+ query: unknown;
252
+ headers: unknown;
253
+ response: {
254
+ 200: {
255
+ status: "cancelled" | "expired" | "pending" | "submitted";
256
+ projectId: string;
257
+ id: string;
258
+ input: Record<string, unknown>;
259
+ workflowId: string;
260
+ nodeRunId: string;
261
+ nodeIndex: number;
262
+ nodeId: string;
263
+ nodeKey: string;
264
+ interventionId: string;
265
+ requestedAt: string;
266
+ workflowRunId: string;
267
+ defaultResponse: Record<string, unknown>;
268
+ response?: Record<string, unknown> | undefined;
269
+ expiresAt?: string | undefined;
270
+ submittedAt?: string | undefined;
271
+ cancelledAt?: string | undefined;
272
+ expiredAt?: string | undefined;
273
+ submittedBy?: {
274
+ principalType: "serviceAccount" | "user" | "system";
275
+ principalId: string;
276
+ } | undefined;
277
+ cancelledBy?: {
278
+ principalType: "serviceAccount" | "user" | "system";
279
+ principalId: string;
280
+ } | undefined;
281
+ };
282
+ 400: {
283
+ error: string;
284
+ };
285
+ 404: {
286
+ error: string;
287
+ };
288
+ 501: {
289
+ error: string;
290
+ };
291
+ 422: {
292
+ type: "validation";
293
+ on: string;
294
+ summary?: string;
295
+ message?: string;
296
+ found?: unknown;
297
+ property?: string;
298
+ expected?: string;
299
+ };
300
+ };
301
+ };
302
+ };
303
+ };
304
+ };
305
+ } & {
306
+ api: {
307
+ "workflow-interventions": {
308
+ ":interventionId": {
309
+ submit: {
310
+ post: {
311
+ body: {
312
+ response: Record<string, unknown>;
313
+ };
314
+ params: {
315
+ interventionId: string;
316
+ };
317
+ query: unknown;
318
+ headers: unknown;
319
+ response: {
320
+ 200: {
321
+ error: string;
322
+ } | {
323
+ jobId: string;
324
+ intervention: {
325
+ status: "cancelled" | "expired" | "pending" | "submitted";
326
+ projectId: string;
327
+ id: string;
328
+ input: Record<string, unknown>;
329
+ workflowId: string;
330
+ nodeRunId: string;
331
+ nodeIndex: number;
332
+ nodeId: string;
333
+ nodeKey: string;
334
+ interventionId: string;
335
+ requestedAt: string;
336
+ workflowRunId: string;
337
+ defaultResponse: Record<string, unknown>;
338
+ response?: Record<string, unknown> | undefined;
339
+ expiresAt?: string | undefined;
340
+ submittedAt?: string | undefined;
341
+ cancelledAt?: string | undefined;
342
+ expiredAt?: string | undefined;
343
+ submittedBy?: {
344
+ principalType: "serviceAccount" | "user" | "system";
345
+ principalId: string;
346
+ } | undefined;
347
+ cancelledBy?: {
348
+ principalType: "serviceAccount" | "user" | "system";
349
+ principalId: string;
350
+ } | undefined;
351
+ };
352
+ };
353
+ 400: {
354
+ error: string;
355
+ };
356
+ 404: {
357
+ error: string;
358
+ };
359
+ 501: {
360
+ error: string;
361
+ };
362
+ 202: {
363
+ jobId: string;
364
+ intervention: {
365
+ status: "cancelled" | "expired" | "pending" | "submitted";
366
+ projectId: string;
367
+ id: string;
368
+ input: Record<string, unknown>;
369
+ workflowId: string;
370
+ nodeRunId: string;
371
+ nodeIndex: number;
372
+ nodeId: string;
373
+ nodeKey: string;
374
+ interventionId: string;
375
+ requestedAt: string;
376
+ workflowRunId: string;
377
+ defaultResponse: Record<string, unknown>;
378
+ response?: Record<string, unknown> | undefined;
379
+ expiresAt?: string | undefined;
380
+ submittedAt?: string | undefined;
381
+ cancelledAt?: string | undefined;
382
+ expiredAt?: string | undefined;
383
+ submittedBy?: {
384
+ principalType: "serviceAccount" | "user" | "system";
385
+ principalId: string;
386
+ } | undefined;
387
+ cancelledBy?: {
388
+ principalType: "serviceAccount" | "user" | "system";
389
+ principalId: string;
390
+ } | undefined;
391
+ };
392
+ };
393
+ 422: {
394
+ type: "validation";
395
+ on: string;
396
+ summary?: string;
397
+ message?: string;
398
+ found?: unknown;
399
+ property?: string;
400
+ expected?: string;
401
+ };
402
+ };
403
+ };
404
+ };
405
+ };
406
+ };
407
+ };
408
+ } & {
409
+ api: {
410
+ "workflow-interventions": {
411
+ ":interventionId": {
412
+ cancel: {
413
+ post: {
414
+ body: {};
415
+ params: {
416
+ interventionId: string;
417
+ };
418
+ query: unknown;
419
+ headers: unknown;
420
+ response: {
421
+ 200: {
422
+ intervention: {
423
+ status: "cancelled" | "expired" | "pending" | "submitted";
424
+ projectId: string;
425
+ id: string;
426
+ input: Record<string, unknown>;
427
+ workflowId: string;
428
+ nodeRunId: string;
429
+ nodeIndex: number;
430
+ nodeId: string;
431
+ nodeKey: string;
432
+ interventionId: string;
433
+ requestedAt: string;
434
+ workflowRunId: string;
435
+ defaultResponse: Record<string, unknown>;
436
+ response?: Record<string, unknown> | undefined;
437
+ expiresAt?: string | undefined;
438
+ submittedAt?: string | undefined;
439
+ cancelledAt?: string | undefined;
440
+ expiredAt?: string | undefined;
441
+ submittedBy?: {
442
+ principalType: "serviceAccount" | "user" | "system";
443
+ principalId: string;
444
+ } | undefined;
445
+ cancelledBy?: {
446
+ principalType: "serviceAccount" | "user" | "system";
447
+ principalId: string;
448
+ } | undefined;
449
+ };
450
+ };
451
+ 400: {
452
+ error: string;
453
+ };
454
+ 404: {
455
+ error: string;
456
+ };
457
+ 501: {
458
+ error: string;
459
+ };
460
+ 422: {
461
+ type: "validation";
462
+ on: string;
463
+ summary?: string;
464
+ message?: string;
465
+ found?: unknown;
466
+ property?: string;
467
+ expected?: string;
468
+ };
469
+ };
470
+ };
471
+ };
472
+ };
473
+ };
474
+ };
475
+ } & {
476
+ api: {
477
+ "workflow-runs": {
478
+ get: {
479
+ body: unknown;
480
+ params: {};
481
+ query: {
482
+ status?: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting" | undefined;
483
+ limit?: string | undefined;
484
+ offset?: string | undefined;
485
+ order?: "asc" | "desc" | undefined;
486
+ startedAfter?: string | undefined;
487
+ startedBefore?: string | undefined;
488
+ workflowId?: string | undefined;
489
+ };
490
+ headers: unknown;
491
+ response: {
492
+ 200: {
493
+ runs: {
494
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
495
+ projectId: string;
496
+ id: string;
497
+ startedAt: string;
498
+ input: Record<string, unknown>;
499
+ workflowId: string;
500
+ requestedBy: {
501
+ principalType: "serviceAccount" | "user" | "system";
502
+ principalId: string;
503
+ };
504
+ error?: string | undefined;
505
+ queuedAt?: string | undefined;
506
+ finishedAt?: string | undefined;
507
+ }[];
508
+ hasMore: boolean;
509
+ total: number;
510
+ };
511
+ 400: {
512
+ error: string;
513
+ };
514
+ 501: {
515
+ error: string;
516
+ };
517
+ 422: {
518
+ type: "validation";
519
+ on: string;
520
+ summary?: string;
521
+ message?: string;
522
+ found?: unknown;
523
+ property?: string;
524
+ expected?: string;
525
+ };
526
+ };
527
+ };
528
+ };
529
+ };
530
+ } & {
531
+ api: {
532
+ "workflow-runs": {
533
+ ":runId": {
534
+ get: {
535
+ body: unknown;
536
+ params: {
537
+ runId: string;
538
+ };
539
+ query: unknown;
540
+ headers: unknown;
541
+ response: {
542
+ 200: {
543
+ run: {
544
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
545
+ projectId: string;
546
+ id: string;
547
+ startedAt: string;
548
+ input: Record<string, unknown>;
549
+ workflowId: string;
550
+ requestedBy: {
551
+ principalType: "serviceAccount" | "user" | "system";
552
+ principalId: string;
553
+ };
554
+ error?: string | undefined;
555
+ queuedAt?: string | undefined;
556
+ finishedAt?: string | undefined;
557
+ };
558
+ nodes: {
559
+ status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
560
+ projectId: string;
561
+ id: string;
562
+ startedAt: string;
563
+ input: Record<string, unknown>;
564
+ workflowId: string;
565
+ nodeIndex: number;
566
+ nodeType: "action" | "agent" | "step" | "intervention";
567
+ nodeId: string;
568
+ nodeKey: string;
569
+ workflowRunId: string;
570
+ error?: string | undefined;
571
+ finishedAt?: string | undefined;
572
+ output?: Record<string, unknown> | undefined;
573
+ agentExecution?: {
574
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
575
+ agentId: string;
576
+ attempt: number;
577
+ startedAt?: string | undefined;
578
+ completedAt?: string | undefined;
579
+ modelId?: string | undefined;
580
+ finishReason?: string | undefined;
581
+ usage?: Record<string, unknown> | undefined;
582
+ } | undefined;
583
+ }[];
584
+ };
585
+ 400: {
586
+ error: string;
587
+ };
588
+ 404: {
589
+ error: string;
590
+ };
591
+ 501: {
592
+ error: string;
593
+ };
594
+ 422: {
595
+ type: "validation";
596
+ on: string;
597
+ summary?: string;
598
+ message?: string;
599
+ found?: unknown;
600
+ property?: string;
601
+ expected?: string;
602
+ };
603
+ };
604
+ };
605
+ };
606
+ };
607
+ };
608
+ } & {
609
+ api: {
610
+ "workflow-runs": {
611
+ ":runId": {
612
+ nodes: {
613
+ ":nodeKey": {
614
+ "agent-execution": {
615
+ get: {
616
+ body: unknown;
617
+ params: {
618
+ runId: string;
619
+ nodeKey: string;
620
+ };
621
+ query: unknown;
622
+ headers: unknown;
623
+ response: {
624
+ 200: {
625
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
626
+ agentId: string;
627
+ createdAt: string;
628
+ attempt: number;
629
+ nodeRunId: string;
630
+ prompt: string;
631
+ error?: string | undefined;
632
+ startedAt?: string | undefined;
633
+ completedAt?: string | undefined;
634
+ executionPrincipal?: {
635
+ principalType: "serviceAccount" | "user" | "system";
636
+ principalId: string;
637
+ } | undefined;
638
+ modelId?: string | undefined;
639
+ finishReason?: string | undefined;
640
+ usage?: Record<string, unknown> | undefined;
641
+ diagnostics?: unknown[] | undefined;
642
+ trace?: unknown[] | undefined;
643
+ };
644
+ 400: {
645
+ error: string;
646
+ };
647
+ 404: {
648
+ error: string;
649
+ };
650
+ 501: {
651
+ error: string;
652
+ };
653
+ 422: {
654
+ type: "validation";
655
+ on: string;
656
+ summary?: string;
657
+ message?: string;
658
+ found?: unknown;
659
+ property?: string;
660
+ expected?: string;
661
+ };
662
+ };
663
+ };
664
+ };
665
+ };
666
+ };
667
+ };
668
+ };
669
+ };
670
+ } & {
671
+ api: {
672
+ "workflow-runs": {
673
+ ":runId": {
674
+ cancel: {
675
+ post: {
676
+ body: {};
677
+ params: {
678
+ runId: string;
679
+ };
680
+ query: unknown;
681
+ headers: unknown;
682
+ response: {
683
+ 200: {
684
+ run: {
685
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled" | "waiting";
686
+ projectId: string;
687
+ id: string;
688
+ startedAt: string;
689
+ input: Record<string, unknown>;
690
+ workflowId: string;
691
+ requestedBy: {
692
+ principalType: "serviceAccount" | "user" | "system";
693
+ principalId: string;
694
+ };
695
+ error?: string | undefined;
696
+ queuedAt?: string | undefined;
697
+ finishedAt?: string | undefined;
698
+ };
699
+ nodes: {
700
+ status: "running" | "succeeded" | "failed" | "cancelled" | "waiting";
701
+ projectId: string;
702
+ id: string;
703
+ startedAt: string;
704
+ input: Record<string, unknown>;
705
+ workflowId: string;
706
+ nodeIndex: number;
707
+ nodeType: "action" | "agent" | "step" | "intervention";
708
+ nodeId: string;
709
+ nodeKey: string;
710
+ workflowRunId: string;
711
+ error?: string | undefined;
712
+ finishedAt?: string | undefined;
713
+ output?: Record<string, unknown> | undefined;
714
+ agentExecution?: {
715
+ status: "queued" | "running" | "succeeded" | "failed" | "cancelled";
716
+ agentId: string;
717
+ attempt: number;
718
+ startedAt?: string | undefined;
719
+ completedAt?: string | undefined;
720
+ modelId?: string | undefined;
721
+ finishReason?: string | undefined;
722
+ usage?: Record<string, unknown> | undefined;
723
+ } | undefined;
724
+ }[];
725
+ };
726
+ 400: {
727
+ error: string;
728
+ };
729
+ 404: {
730
+ error: string;
731
+ };
732
+ 501: {
733
+ error: string;
734
+ };
735
+ 422: {
736
+ type: "validation";
737
+ on: string;
738
+ summary?: string;
739
+ message?: string;
740
+ found?: unknown;
741
+ property?: string;
742
+ expected?: string;
743
+ };
744
+ };
745
+ };
746
+ };
747
+ };
748
+ };
749
+ };
750
+ } & {
751
+ api: {
752
+ "workflow-runs": {
753
+ ":runId": {
754
+ files: {
755
+ content: {
756
+ get: {
757
+ body: unknown;
758
+ params: {
759
+ runId: string;
760
+ };
761
+ query: {
762
+ path: string;
763
+ disposition?: "inline" | "attachment" | undefined;
764
+ };
765
+ headers: unknown;
766
+ response: {
767
+ 200: Response | {
768
+ readonly error: string;
769
+ };
770
+ 422: {
771
+ type: "validation";
772
+ on: string;
773
+ summary?: string;
774
+ message?: string;
775
+ found?: unknown;
776
+ property?: string;
777
+ expected?: string;
778
+ };
779
+ };
780
+ };
781
+ };
782
+ };
783
+ };
784
+ };
785
+ };
786
+ } & {
787
+ api: {
788
+ "workflow-runs": {
789
+ ":runId": {
790
+ files: {
791
+ content: {
792
+ head: {
793
+ body: unknown;
794
+ params: {
795
+ runId: string;
796
+ };
797
+ query: {
798
+ path: string;
799
+ disposition?: "inline" | "attachment" | undefined;
800
+ };
801
+ headers: unknown;
802
+ response: {
803
+ 200: Response | {
804
+ readonly error: string;
805
+ };
806
+ 422: {
807
+ type: "validation";
808
+ on: string;
809
+ summary?: string;
810
+ message?: string;
811
+ found?: unknown;
812
+ property?: string;
813
+ expected?: string;
814
+ };
815
+ };
816
+ };
817
+ };
818
+ };
819
+ };
820
+ };
821
+ };
822
+ } & {
823
+ api: {
824
+ "workflow-runs": {
825
+ ":runId": {
826
+ nodes: {
827
+ ":nodeKey": {
828
+ files: {
829
+ content: {
830
+ get: {
831
+ body: unknown;
832
+ params: {
833
+ runId: string;
834
+ nodeKey: string;
835
+ };
836
+ query: {
837
+ path: string;
838
+ disposition?: "inline" | "attachment" | undefined;
839
+ };
840
+ headers: unknown;
841
+ response: {
842
+ 200: Response | {
843
+ readonly error: string;
844
+ };
845
+ 422: {
846
+ type: "validation";
847
+ on: string;
848
+ summary?: string;
849
+ message?: string;
850
+ found?: unknown;
851
+ property?: string;
852
+ expected?: string;
853
+ };
854
+ };
855
+ };
856
+ };
857
+ };
858
+ };
859
+ };
860
+ };
861
+ };
862
+ };
863
+ } & {
864
+ api: {
865
+ "workflow-runs": {
866
+ ":runId": {
867
+ nodes: {
868
+ ":nodeKey": {
869
+ files: {
870
+ content: {
871
+ head: {
872
+ body: unknown;
873
+ params: {
874
+ runId: string;
875
+ nodeKey: string;
876
+ };
877
+ query: {
878
+ path: string;
879
+ disposition?: "inline" | "attachment" | undefined;
880
+ };
881
+ headers: unknown;
882
+ response: {
883
+ 200: Response | {
884
+ readonly error: string;
885
+ };
886
+ 422: {
887
+ type: "validation";
888
+ on: string;
889
+ summary?: string;
890
+ message?: string;
891
+ found?: unknown;
892
+ property?: string;
893
+ expected?: string;
894
+ };
895
+ };
896
+ };
897
+ };
898
+ };
899
+ };
900
+ };
901
+ };
902
+ };
903
+ };
904
+ } & {
905
+ api: {
906
+ workflows: {
907
+ ":workflowId": {
908
+ runs: {
909
+ post: {
910
+ body: {
911
+ input?: Record<string, unknown> | undefined;
912
+ };
913
+ params: {
914
+ workflowId: string;
915
+ };
916
+ query: unknown;
917
+ headers: unknown;
918
+ response: {
919
+ 200: {
920
+ error: string;
921
+ } | {
922
+ runId: string;
923
+ queuedAt: string;
924
+ jobId: string;
925
+ workflowId: string;
926
+ };
927
+ 403: {
928
+ error: string;
929
+ };
930
+ 400: {
931
+ error: string;
932
+ };
933
+ 404: {
934
+ error: string;
935
+ };
936
+ 501: {
937
+ error: string;
938
+ };
939
+ 202: {
940
+ runId: string;
941
+ queuedAt: string;
942
+ jobId: string;
943
+ workflowId: string;
944
+ };
945
+ 422: {
946
+ type: "validation";
947
+ on: string;
948
+ summary?: string;
949
+ message?: string;
950
+ found?: unknown;
951
+ property?: string;
952
+ expected?: string;
953
+ };
954
+ };
955
+ };
956
+ };
957
+ };
958
+ };
959
+ };
960
+ }, {
961
+ derive: {};
962
+ resolve: {};
963
+ schema: {};
964
+ standaloneSchema: {};
965
+ response: {};
966
+ }, {
967
+ derive: {};
968
+ resolve: {};
969
+ schema: {};
970
+ standaloneSchema: {};
971
+ response: {};
972
+ }>;
973
+ //# sourceMappingURL=workflows.d.ts.map