@shipfox/client-workflows 0.2.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 (327) hide show
  1. package/.storybook/main.ts +1 -0
  2. package/.storybook/preview.css +10 -0
  3. package/.storybook/preview.tsx +97 -0
  4. package/.swcrc +42 -0
  5. package/.turbo/turbo-build.log +2 -0
  6. package/.turbo/turbo-type$colon$emit.log +1 -0
  7. package/.turbo/turbo-type.log +1 -0
  8. package/CHANGELOG.md +162 -0
  9. package/LICENSE +21 -0
  10. package/dist/components/identifier/identifier.d.ts +6 -0
  11. package/dist/components/identifier/identifier.d.ts.map +1 -0
  12. package/dist/components/identifier/identifier.js +144 -0
  13. package/dist/components/identifier/identifier.js.map +1 -0
  14. package/dist/components/identifier/index.d.ts +2 -0
  15. package/dist/components/identifier/index.d.ts.map +1 -0
  16. package/dist/components/identifier/index.js +3 -0
  17. package/dist/components/identifier/index.js.map +1 -0
  18. package/dist/components/job-graph/graph-model.d.ts +27 -0
  19. package/dist/components/job-graph/graph-model.d.ts.map +1 -0
  20. package/dist/components/job-graph/graph-model.js +107 -0
  21. package/dist/components/job-graph/graph-model.js.map +1 -0
  22. package/dist/components/job-graph/index.d.ts +3 -0
  23. package/dist/components/job-graph/index.d.ts.map +1 -0
  24. package/dist/components/job-graph/index.js +3 -0
  25. package/dist/components/job-graph/index.js.map +1 -0
  26. package/dist/components/job-graph/job-duration-format.d.ts +4 -0
  27. package/dist/components/job-graph/job-duration-format.d.ts.map +1 -0
  28. package/dist/components/job-graph/job-duration-format.js +41 -0
  29. package/dist/components/job-graph/job-duration-format.js.map +1 -0
  30. package/dist/components/job-graph/job-duration-label.d.ts +5 -0
  31. package/dist/components/job-graph/job-duration-label.d.ts.map +1 -0
  32. package/dist/components/job-graph/job-duration-label.js +33 -0
  33. package/dist/components/job-graph/job-duration-label.js.map +1 -0
  34. package/dist/components/job-graph/job-graph-content.d.ts +9 -0
  35. package/dist/components/job-graph/job-graph-content.d.ts.map +1 -0
  36. package/dist/components/job-graph/job-graph-content.js +181 -0
  37. package/dist/components/job-graph/job-graph-content.js.map +1 -0
  38. package/dist/components/job-graph/job-graph-view.d.ts +11 -0
  39. package/dist/components/job-graph/job-graph-view.d.ts.map +1 -0
  40. package/dist/components/job-graph/job-graph-view.js +24 -0
  41. package/dist/components/job-graph/job-graph-view.js.map +1 -0
  42. package/dist/components/job-graph/job-graph.d.ts +3 -0
  43. package/dist/components/job-graph/job-graph.d.ts.map +1 -0
  44. package/dist/components/job-graph/job-graph.js +21 -0
  45. package/dist/components/job-graph/job-graph.js.map +1 -0
  46. package/dist/components/job-graph/job-node.d.ts +16 -0
  47. package/dist/components/job-graph/job-node.d.ts.map +1 -0
  48. package/dist/components/job-graph/job-node.js +196 -0
  49. package/dist/components/job-graph/job-node.js.map +1 -0
  50. package/dist/components/job-graph/types.d.ts +9 -0
  51. package/dist/components/job-graph/types.d.ts.map +1 -0
  52. package/dist/components/job-graph/types.js +3 -0
  53. package/dist/components/job-graph/types.js.map +1 -0
  54. package/dist/components/step-list/index.d.ts +3 -0
  55. package/dist/components/step-list/index.d.ts.map +1 -0
  56. package/dist/components/step-list/index.js +3 -0
  57. package/dist/components/step-list/index.js.map +1 -0
  58. package/dist/components/step-list/step-list-model.d.ts +36 -0
  59. package/dist/components/step-list/step-list-model.d.ts.map +1 -0
  60. package/dist/components/step-list/step-list-model.js +135 -0
  61. package/dist/components/step-list/step-list-model.js.map +1 -0
  62. package/dist/components/step-list/step-list.d.ts +32 -0
  63. package/dist/components/step-list/step-list.d.ts.map +1 -0
  64. package/dist/components/step-list/step-list.js +409 -0
  65. package/dist/components/step-list/step-list.js.map +1 -0
  66. package/dist/components/workflow-run-duration-label.d.ts +8 -0
  67. package/dist/components/workflow-run-duration-label.d.ts.map +1 -0
  68. package/dist/components/workflow-run-duration-label.js +84 -0
  69. package/dist/components/workflow-run-duration-label.js.map +1 -0
  70. package/dist/components/workflow-run-list/index.d.ts +2 -0
  71. package/dist/components/workflow-run-list/index.d.ts.map +1 -0
  72. package/dist/components/workflow-run-list/index.js +3 -0
  73. package/dist/components/workflow-run-list/index.js.map +1 -0
  74. package/dist/components/workflow-run-list/run-display.d.ts +5 -0
  75. package/dist/components/workflow-run-list/run-display.d.ts.map +1 -0
  76. package/dist/components/workflow-run-list/run-display.js +19 -0
  77. package/dist/components/workflow-run-list/run-display.js.map +1 -0
  78. package/dist/components/workflow-run-list/types.d.ts +21 -0
  79. package/dist/components/workflow-run-list/types.d.ts.map +1 -0
  80. package/dist/components/workflow-run-list/types.js +3 -0
  81. package/dist/components/workflow-run-list/types.js.map +1 -0
  82. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +14 -0
  83. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -0
  84. package/dist/components/workflow-run-list/workflow-run-list-content.js +37 -0
  85. package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -0
  86. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +10 -0
  87. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +1 -0
  88. package/dist/components/workflow-run-list/workflow-run-list-header.js +55 -0
  89. package/dist/components/workflow-run-list/workflow-run-list-header.js.map +1 -0
  90. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +15 -0
  91. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -0
  92. package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -0
  93. package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -0
  94. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +3 -0
  95. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -0
  96. package/dist/components/workflow-run-list/workflow-run-list-view.js +46 -0
  97. package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -0
  98. package/dist/components/workflow-run-list/workflow-run-list.d.ts +3 -0
  99. package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -0
  100. package/dist/components/workflow-run-list/workflow-run-list.js +20 -0
  101. package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -0
  102. package/dist/components/workflow-run-list/workflow-run-row.d.ts +14 -0
  103. package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -0
  104. package/dist/components/workflow-run-list/workflow-run-row.js +172 -0
  105. package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -0
  106. package/dist/components/workflow-run-summary/index.d.ts +2 -0
  107. package/dist/components/workflow-run-summary/index.d.ts.map +1 -0
  108. package/dist/components/workflow-run-summary/index.js +3 -0
  109. package/dist/components/workflow-run-summary/index.js.map +1 -0
  110. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +9 -0
  111. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -0
  112. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +138 -0
  113. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -0
  114. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +20 -0
  115. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -0
  116. package/dist/components/workflow-run-summary/workflow-run-summary.js +252 -0
  117. package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -0
  118. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +7 -0
  119. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -0
  120. package/dist/components/workflow-run-view/agent-config-failure-callout.js +84 -0
  121. package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -0
  122. package/dist/components/workflow-run-view/index.d.ts +3 -0
  123. package/dist/components/workflow-run-view/index.d.ts.map +1 -0
  124. package/dist/components/workflow-run-view/index.js +4 -0
  125. package/dist/components/workflow-run-view/index.js.map +1 -0
  126. package/dist/components/workflow-run-view/job-card.d.ts +17 -0
  127. package/dist/components/workflow-run-view/job-card.d.ts.map +1 -0
  128. package/dist/components/workflow-run-view/job-card.js +476 -0
  129. package/dist/components/workflow-run-view/job-card.js.map +1 -0
  130. package/dist/components/workflow-run-view/job-execution-switcher.d.ts +10 -0
  131. package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -0
  132. package/dist/components/workflow-run-view/job-execution-switcher.js +171 -0
  133. package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -0
  134. package/dist/components/workflow-run-view/job-execution-time-text.d.ts +6 -0
  135. package/dist/components/workflow-run-view/job-execution-time-text.d.ts.map +1 -0
  136. package/dist/components/workflow-run-view/job-execution-time-text.js +24 -0
  137. package/dist/components/workflow-run-view/job-execution-time-text.js.map +1 -0
  138. package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts +9 -0
  139. package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts.map +1 -0
  140. package/dist/components/workflow-run-view/step-attempt-log-panel.js +152 -0
  141. package/dist/components/workflow-run-view/step-attempt-log-panel.js.map +1 -0
  142. package/dist/components/workflow-run-view/workflow-run-selection.d.ts +14 -0
  143. package/dist/components/workflow-run-view/workflow-run-selection.d.ts.map +1 -0
  144. package/dist/components/workflow-run-view/workflow-run-selection.js +56 -0
  145. package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -0
  146. package/dist/components/workflow-run-view/workflow-run-states.d.ts +12 -0
  147. package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -0
  148. package/dist/components/workflow-run-view/workflow-run-states.js +91 -0
  149. package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -0
  150. package/dist/components/workflow-run-view/workflow-run-view.d.ts +15 -0
  151. package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -0
  152. package/dist/components/workflow-run-view/workflow-run-view.js +285 -0
  153. package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -0
  154. package/dist/components/workflow-source-panel/index.d.ts +2 -0
  155. package/dist/components/workflow-source-panel/index.d.ts.map +1 -0
  156. package/dist/components/workflow-source-panel/index.js +3 -0
  157. package/dist/components/workflow-source-panel/index.js.map +1 -0
  158. package/dist/components/workflow-source-panel/workflow-source-panel.d.ts +13 -0
  159. package/dist/components/workflow-source-panel/workflow-source-panel.d.ts.map +1 -0
  160. package/dist/components/workflow-source-panel/workflow-source-panel.js +91 -0
  161. package/dist/components/workflow-source-panel/workflow-source-panel.js.map +1 -0
  162. package/dist/components/workflow-status/status-visuals.d.ts +12 -0
  163. package/dist/components/workflow-status/status-visuals.d.ts.map +1 -0
  164. package/dist/components/workflow-status/status-visuals.js +54 -0
  165. package/dist/components/workflow-status/status-visuals.js.map +1 -0
  166. package/dist/components/workflow-status/workflow-status-icon.d.ts +22 -0
  167. package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -0
  168. package/dist/components/workflow-status/workflow-status-icon.js +100 -0
  169. package/dist/components/workflow-status/workflow-status-icon.js.map +1 -0
  170. package/dist/core/entities/job-execution.d.ts +69 -0
  171. package/dist/core/entities/job-execution.d.ts.map +1 -0
  172. package/dist/core/entities/job-execution.js +83 -0
  173. package/dist/core/entities/job-execution.js.map +1 -0
  174. package/dist/core/entities/job.d.ts +56 -0
  175. package/dist/core/entities/job.d.ts.map +1 -0
  176. package/dist/core/entities/job.js +71 -0
  177. package/dist/core/entities/job.js.map +1 -0
  178. package/dist/core/entities/step-attempt.d.ts +49 -0
  179. package/dist/core/entities/step-attempt.d.ts.map +1 -0
  180. package/dist/core/entities/step-attempt.js +48 -0
  181. package/dist/core/entities/step-attempt.js.map +1 -0
  182. package/dist/core/entities/step.d.ts +41 -0
  183. package/dist/core/entities/step.d.ts.map +1 -0
  184. package/dist/core/entities/step.js +51 -0
  185. package/dist/core/entities/step.js.map +1 -0
  186. package/dist/core/entities/workflow-run-attempt.d.ts +44 -0
  187. package/dist/core/entities/workflow-run-attempt.d.ts.map +1 -0
  188. package/dist/core/entities/workflow-run-attempt.js +51 -0
  189. package/dist/core/entities/workflow-run-attempt.js.map +1 -0
  190. package/dist/core/entities/workflow-run.d.ts +61 -0
  191. package/dist/core/entities/workflow-run.d.ts.map +1 -0
  192. package/dist/core/entities/workflow-run.js +104 -0
  193. package/dist/core/entities/workflow-run.js.map +1 -0
  194. package/dist/core/workflow-run-url-state.d.ts +13 -0
  195. package/dist/core/workflow-run-url-state.d.ts.map +1 -0
  196. package/dist/core/workflow-run-url-state.js +43 -0
  197. package/dist/core/workflow-run-url-state.js.map +1 -0
  198. package/dist/core/workflow-run.d.ts +13 -0
  199. package/dist/core/workflow-run.d.ts.map +1 -0
  200. package/dist/core/workflow-run.js +8 -0
  201. package/dist/core/workflow-run.js.map +1 -0
  202. package/dist/env.d.js +2 -0
  203. package/dist/env.d.js.map +1 -0
  204. package/dist/feature.d.ts +20 -0
  205. package/dist/feature.d.ts.map +1 -0
  206. package/dist/feature.js +27 -0
  207. package/dist/feature.js.map +1 -0
  208. package/dist/hooks/api/workflow-runs.d.ts +109 -0
  209. package/dist/hooks/api/workflow-runs.d.ts.map +1 -0
  210. package/dist/hooks/api/workflow-runs.js +394 -0
  211. package/dist/hooks/api/workflow-runs.js.map +1 -0
  212. package/dist/index.d.ts +5 -0
  213. package/dist/index.d.ts.map +1 -0
  214. package/dist/index.js +5 -0
  215. package/dist/index.js.map +1 -0
  216. package/dist/pages/workflow-run-first-time-use.d.ts +6 -0
  217. package/dist/pages/workflow-run-first-time-use.d.ts.map +1 -0
  218. package/dist/pages/workflow-run-first-time-use.js +17 -0
  219. package/dist/pages/workflow-run-first-time-use.js.map +1 -0
  220. package/dist/pages/workflow-run-page.d.ts +8 -0
  221. package/dist/pages/workflow-run-page.d.ts.map +1 -0
  222. package/dist/pages/workflow-run-page.js +83 -0
  223. package/dist/pages/workflow-run-page.js.map +1 -0
  224. package/dist/routes/run-detail.d.ts +8 -0
  225. package/dist/routes/run-detail.d.ts.map +1 -0
  226. package/dist/routes/run-detail.js +21 -0
  227. package/dist/routes/run-detail.js.map +1 -0
  228. package/dist/routes/runs.d.ts +8 -0
  229. package/dist/routes/runs.d.ts.map +1 -0
  230. package/dist/routes/runs.js +20 -0
  231. package/dist/routes/runs.js.map +1 -0
  232. package/dist/tsconfig.test.tsbuildinfo +1 -0
  233. package/package.json +114 -0
  234. package/src/components/identifier/identifier.tsx +178 -0
  235. package/src/components/identifier/index.ts +1 -0
  236. package/src/components/job-graph/graph-model.test.ts +189 -0
  237. package/src/components/job-graph/graph-model.ts +178 -0
  238. package/src/components/job-graph/index.ts +2 -0
  239. package/src/components/job-graph/job-duration-format.ts +54 -0
  240. package/src/components/job-graph/job-duration-label.tsx +29 -0
  241. package/src/components/job-graph/job-graph-content.tsx +225 -0
  242. package/src/components/job-graph/job-graph-view.test.tsx +298 -0
  243. package/src/components/job-graph/job-graph-view.tsx +45 -0
  244. package/src/components/job-graph/job-graph.stories.tsx +182 -0
  245. package/src/components/job-graph/job-graph.tsx +24 -0
  246. package/src/components/job-graph/job-node.stories.tsx +364 -0
  247. package/src/components/job-graph/job-node.test.tsx +347 -0
  248. package/src/components/job-graph/job-node.tsx +202 -0
  249. package/src/components/job-graph/types.ts +9 -0
  250. package/src/components/step-list/index.ts +6 -0
  251. package/src/components/step-list/step-list-model.test.ts +369 -0
  252. package/src/components/step-list/step-list-model.ts +205 -0
  253. package/src/components/step-list/step-list.stories.tsx +419 -0
  254. package/src/components/step-list/step-list.test.tsx +566 -0
  255. package/src/components/step-list/step-list.tsx +494 -0
  256. package/src/components/workflow-run-duration-label.tsx +118 -0
  257. package/src/components/workflow-run-list/index.ts +1 -0
  258. package/src/components/workflow-run-list/run-display.test.ts +53 -0
  259. package/src/components/workflow-run-list/run-display.ts +22 -0
  260. package/src/components/workflow-run-list/types.ts +22 -0
  261. package/src/components/workflow-run-list/workflow-run-list-content.tsx +58 -0
  262. package/src/components/workflow-run-list/workflow-run-list-header.tsx +53 -0
  263. package/src/components/workflow-run-list/workflow-run-list-states.tsx +86 -0
  264. package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +178 -0
  265. package/src/components/workflow-run-list/workflow-run-list-view.tsx +57 -0
  266. package/src/components/workflow-run-list/workflow-run-list.stories.tsx +111 -0
  267. package/src/components/workflow-run-list/workflow-run-list.tsx +29 -0
  268. package/src/components/workflow-run-list/workflow-run-row.tsx +176 -0
  269. package/src/components/workflow-run-summary/index.ts +1 -0
  270. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +230 -0
  271. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +146 -0
  272. package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +414 -0
  273. package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +354 -0
  274. package/src/components/workflow-run-summary/workflow-run-summary.tsx +295 -0
  275. package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +140 -0
  276. package/src/components/workflow-run-view/agent-config-failure-callout.tsx +93 -0
  277. package/src/components/workflow-run-view/index.ts +2 -0
  278. package/src/components/workflow-run-view/job-card.stories.tsx +788 -0
  279. package/src/components/workflow-run-view/job-card.tsx +566 -0
  280. package/src/components/workflow-run-view/job-execution-switcher.tsx +170 -0
  281. package/src/components/workflow-run-view/job-execution-time-text.tsx +34 -0
  282. package/src/components/workflow-run-view/step-attempt-log-panel.test.tsx +290 -0
  283. package/src/components/workflow-run-view/step-attempt-log-panel.tsx +152 -0
  284. package/src/components/workflow-run-view/workflow-run-selection.test.ts +280 -0
  285. package/src/components/workflow-run-view/workflow-run-selection.ts +89 -0
  286. package/src/components/workflow-run-view/workflow-run-states.tsx +70 -0
  287. package/src/components/workflow-run-view/workflow-run-view.test.tsx +1214 -0
  288. package/src/components/workflow-run-view/workflow-run-view.tsx +341 -0
  289. package/src/components/workflow-source-panel/index.ts +1 -0
  290. package/src/components/workflow-source-panel/workflow-source-panel.stories.tsx +110 -0
  291. package/src/components/workflow-source-panel/workflow-source-panel.test.tsx +96 -0
  292. package/src/components/workflow-source-panel/workflow-source-panel.tsx +136 -0
  293. package/src/components/workflow-status/status-visuals.test.ts +38 -0
  294. package/src/components/workflow-status/status-visuals.ts +36 -0
  295. package/src/components/workflow-status/workflow-status-icon.stories.tsx +90 -0
  296. package/src/components/workflow-status/workflow-status-icon.tsx +135 -0
  297. package/src/core/entities/job-execution.ts +139 -0
  298. package/src/core/entities/job.ts +149 -0
  299. package/src/core/entities/step-attempt.ts +89 -0
  300. package/src/core/entities/step.ts +105 -0
  301. package/src/core/entities/workflow-run-attempt.ts +87 -0
  302. package/src/core/entities/workflow-run.ts +183 -0
  303. package/src/core/workflow-run-url-state.ts +61 -0
  304. package/src/core/workflow-run.test.ts +640 -0
  305. package/src/core/workflow-run.ts +66 -0
  306. package/src/env.d.ts +8 -0
  307. package/src/feature.ts +26 -0
  308. package/src/hooks/api/workflow-runs.test.tsx +410 -0
  309. package/src/hooks/api/workflow-runs.ts +485 -0
  310. package/src/index.ts +45 -0
  311. package/src/page-harness-budget.test.ts +33 -0
  312. package/src/pages/workflow-run-first-time-use.tsx +17 -0
  313. package/src/pages/workflow-run-page.test.tsx +517 -0
  314. package/src/pages/workflow-run-page.tsx +89 -0
  315. package/src/routes/run-detail.tsx +15 -0
  316. package/src/routes/runs.tsx +11 -0
  317. package/test/fixtures/logs.ts +13 -0
  318. package/test/fixtures/workflow-run.ts +311 -0
  319. package/test/pages.tsx +79 -0
  320. package/test/render.tsx +40 -0
  321. package/test/setup.ts +3 -0
  322. package/tsconfig.build.json +9 -0
  323. package/tsconfig.build.tsbuildinfo +1 -0
  324. package/tsconfig.json +3 -0
  325. package/tsconfig.test.json +8 -0
  326. package/vercel.json +8 -0
  327. package/vitest.config.ts +70 -0
@@ -0,0 +1,109 @@
1
+ import type { WorkflowRunRerunModeDto } from '@shipfox/api-workflows-dto';
2
+ import { type InfiniteData } from '@tanstack/react-query';
3
+ import { type WorkflowRun, type WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListPage, type WorkflowRunStatus } from '#core/workflow-run.js';
4
+ export interface WorkflowRunFilters {
5
+ status?: WorkflowRunStatus | undefined;
6
+ definitionId?: string | undefined;
7
+ triggerSource?: string | undefined;
8
+ createdFrom?: string | undefined;
9
+ createdTo?: string | undefined;
10
+ }
11
+ export declare const workflowRunsQueryKeys: {
12
+ all: readonly ["workflow-runs"];
13
+ lists: (projectId: string) => readonly ["workflow-runs", "list", string];
14
+ list: (projectId: string, filters: WorkflowRunFilters) => readonly ["workflow-runs", "list", string, {
15
+ status: "cancelled" | "pending" | "running" | "succeeded" | "failed" | null;
16
+ definitionId: string | null;
17
+ triggerSource: string | null;
18
+ createdFrom: string | null;
19
+ createdTo: string | null;
20
+ }];
21
+ detail: (workflowRunId: string, runAttempt?: number | undefined) => readonly ["workflow-runs", "detail", string, number | null];
22
+ attempts: (workflowRunId: string) => readonly ["workflow-runs", "attempts", string];
23
+ };
24
+ /**
25
+ * Fire the manual trigger of a workflow definition.
26
+ *
27
+ * The server resolves the manual subscription by definition id (workflows
28
+ * may declare at most one manual trigger). `inputs` are forwarded to the
29
+ * run when provided.
30
+ */
31
+ export declare function fireManualWorkflow({ definitionId, inputs, }: {
32
+ definitionId: string;
33
+ inputs?: Record<string, unknown>;
34
+ }): Promise<{
35
+ workflow_run_id: string;
36
+ }>;
37
+ export declare function useWorkflowRunsInfiniteQuery(projectId: string | undefined, filters: WorkflowRunFilters, limit?: number): import("@tanstack/react-query").UseInfiniteQueryResult<InfiniteData<WorkflowRunListPage, string | undefined>, Error>;
38
+ export declare function rerunWorkflowRun({ workflowRunId, mode, }: {
39
+ workflowRunId: string;
40
+ mode: WorkflowRunRerunModeDto;
41
+ }): Promise<{
42
+ id: string;
43
+ project_id: string;
44
+ definition_id: string;
45
+ name: string;
46
+ status: "cancelled" | "pending" | "running" | "succeeded" | "failed";
47
+ current_attempt: number;
48
+ latest_attempt: number;
49
+ trigger_provider: string | null;
50
+ trigger_source: string;
51
+ trigger_event: string;
52
+ trigger_payload: Record<string, unknown>;
53
+ inputs: Record<string, unknown> | null;
54
+ source_snapshot: {
55
+ content: string;
56
+ format: "yaml";
57
+ } | null;
58
+ created_at: string;
59
+ updated_at: string;
60
+ started_at: string | null;
61
+ finished_at: string | null;
62
+ }>;
63
+ export declare function useRerunWorkflowRunMutation(projectId: string): import("@tanstack/react-query").UseMutationResult<{
64
+ id: string;
65
+ project_id: string;
66
+ definition_id: string;
67
+ name: string;
68
+ status: "cancelled" | "pending" | "running" | "succeeded" | "failed";
69
+ current_attempt: number;
70
+ latest_attempt: number;
71
+ trigger_provider: string | null;
72
+ trigger_source: string;
73
+ trigger_event: string;
74
+ trigger_payload: Record<string, unknown>;
75
+ inputs: Record<string, unknown> | null;
76
+ source_snapshot: {
77
+ content: string;
78
+ format: "yaml";
79
+ } | null;
80
+ created_at: string;
81
+ updated_at: string;
82
+ started_at: string | null;
83
+ finished_at: string | null;
84
+ }, Error, {
85
+ workflowRunId: string;
86
+ mode: WorkflowRunRerunModeDto;
87
+ }, unknown>;
88
+ export interface FireManualWorkflowVariables {
89
+ projectId: string;
90
+ definitionId: string;
91
+ inputs?: Record<string, unknown>;
92
+ }
93
+ export declare function useFireManualWorkflowMutation(): import("@tanstack/react-query").UseMutationResult<{
94
+ workflow_run_id: string;
95
+ }, Error, FireManualWorkflowVariables, {
96
+ tempWorkflowRunId: string;
97
+ touchedQueryKeys: (readonly unknown[])[];
98
+ }>;
99
+ export declare function useWorkflowRunQuery(workflowRunId: string | undefined): import("@tanstack/react-query").UseQueryResult<NoInfer<WorkflowRunDetail>, Error>;
100
+ export declare function useWorkflowRunAttemptQuery({ workflowRunId, runAttempt, }: {
101
+ workflowRunId: string | undefined;
102
+ runAttempt?: number | undefined;
103
+ }): import("@tanstack/react-query").UseQueryResult<NoInfer<WorkflowRunDetail>, Error>;
104
+ export declare function useWorkflowRunAttemptsQuery({ workflowRunId, enabled, }: {
105
+ workflowRunId: string | undefined;
106
+ enabled: boolean;
107
+ }): import("@tanstack/react-query").UseQueryResult<NoInfer<WorkflowRunAttempt[]>, Error>;
108
+ export declare function useCancelWorkflowRunMutation(run: WorkflowRun | undefined): import("@tanstack/react-query").UseMutationResult<import("#core/workflow-run.js").WorkflowRunListItem, Error, void, unknown>;
109
+ //# sourceMappingURL=workflow-runs.d.ts.map
@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;;;;;;;;;;;;;;;GAKA;AAED,wBAAgB,2BAA2B,CAAC,SAAS,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;mBAT5C,MAAM;UACf,uBAAuB;YAyB9B;AAsDD,MAAM,WAAW,2BAA2B;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,wBAAgB,6BAA6B;qBAnMD,MAAM;;;;GAsRjD;AAkCD,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,SAAS,qFAEpE;AAED,wBAAgB,0BAA0B,CAAC,EACzC,aAAa,EACb,UAAU,GACX,EAAE;IACD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC,qFAqBA;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,aAAa,EACb,OAAO,GACR,EAAE;IACD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB,wFAYA;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,gIAgBxE"}
@@ -0,0 +1,394 @@
1
+ import { apiRequest } from '@shipfox/client-api';
2
+ import { keepPreviousData, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
3
+ import { isWorkflowRunTerminal, toWorkflowRunAttempt, toWorkflowRunDetail, toWorkflowRunListItem, toWorkflowRunListPage } from '#core/workflow-run.js';
4
+ export const workflowRunsQueryKeys = {
5
+ all: [
6
+ 'workflow-runs'
7
+ ],
8
+ lists: (projectId)=>[
9
+ ...workflowRunsQueryKeys.all,
10
+ 'list',
11
+ projectId
12
+ ],
13
+ list: (projectId, filters)=>[
14
+ ...workflowRunsQueryKeys.lists(projectId),
15
+ normalizeFilters(filters)
16
+ ],
17
+ detail: (workflowRunId, runAttempt)=>[
18
+ ...workflowRunsQueryKeys.all,
19
+ 'detail',
20
+ workflowRunId,
21
+ runAttempt ?? null
22
+ ],
23
+ attempts: (workflowRunId)=>[
24
+ ...workflowRunsQueryKeys.all,
25
+ 'attempts',
26
+ workflowRunId
27
+ ]
28
+ };
29
+ function normalizeFilters(filters) {
30
+ return {
31
+ status: filters.status ?? null,
32
+ definitionId: filters.definitionId ?? null,
33
+ triggerSource: filters.triggerSource ?? null,
34
+ createdFrom: filters.createdFrom ?? null,
35
+ createdTo: filters.createdTo ?? null
36
+ };
37
+ }
38
+ function appendFilters(params, filters) {
39
+ if (filters.status) params.set('status', filters.status);
40
+ if (filters.definitionId) params.set('definition_id', filters.definitionId);
41
+ if (filters.triggerSource) params.set('trigger_source', filters.triggerSource);
42
+ if (filters.createdFrom) params.set('created_from', filters.createdFrom);
43
+ if (filters.createdTo) params.set('created_to', filters.createdTo);
44
+ }
45
+ async function listWorkflowRunsDto({ projectId, filters, limit = 50, cursor, signal }) {
46
+ const params = new URLSearchParams({
47
+ project_id: projectId,
48
+ limit: String(limit)
49
+ });
50
+ if (cursor) params.set('cursor', cursor);
51
+ appendFilters(params, filters);
52
+ return await apiRequest(`/workflows/runs?${params.toString()}`, {
53
+ signal
54
+ });
55
+ }
56
+ /**
57
+ * Fire the manual trigger of a workflow definition.
58
+ *
59
+ * The server resolves the manual subscription by definition id (workflows
60
+ * may declare at most one manual trigger). `inputs` are forwarded to the
61
+ * run when provided.
62
+ */ export async function fireManualWorkflow({ definitionId, inputs }) {
63
+ return await apiRequest(`/workflow-definitions/${definitionId}/fire-manual`, {
64
+ method: 'POST',
65
+ body: inputs ? {
66
+ inputs
67
+ } : {}
68
+ });
69
+ }
70
+ const ACTIVE_POLL_MS = 4_000;
71
+ const IDLE_POLL_MS = 30_000;
72
+ function toWorkflowRunInfiniteData(data) {
73
+ return {
74
+ ...data,
75
+ pages: data.pages.map(toWorkflowRunListPage)
76
+ };
77
+ }
78
+ export function useWorkflowRunsInfiniteQuery(projectId, filters, limit = 50) {
79
+ // Polling is owned by react-query, not the page. Polling fast (4s) while
80
+ // any non-terminal run is visible covers state transitions; polling slow
81
+ // (30s) when idle covers brand-new external runs (webhook/schedule
82
+ // triggers) without leaving the list stale.
83
+ //
84
+ // We disable polling once the user has loaded more than one page. With
85
+ // cursor pagination the cursor that bounds page 1 was computed from
86
+ // page 0's last row; if a refetch shifts that boundary, a small range
87
+ // of rows can drop into a between-pages gap. Users who scrolled into
88
+ // history opted into "reading mode": pause until they refocus, filter,
89
+ // or scroll back.
90
+ return useInfiniteQuery({
91
+ queryKey: projectId ? workflowRunsQueryKeys.list(projectId, filters) : [
92
+ ...workflowRunsQueryKeys.all,
93
+ 'list'
94
+ ],
95
+ enabled: Boolean(projectId),
96
+ initialPageParam: undefined,
97
+ queryFn: ({ pageParam, signal })=>listWorkflowRunsDto({
98
+ projectId: projectId ?? '',
99
+ filters,
100
+ limit,
101
+ cursor: pageParam,
102
+ signal
103
+ }),
104
+ getNextPageParam: (lastPage)=>lastPage.next_cursor ?? undefined,
105
+ select: toWorkflowRunInfiniteData,
106
+ placeholderData: keepPreviousData,
107
+ staleTime: 2_000,
108
+ refetchOnWindowFocus: true,
109
+ refetchInterval: (query)=>{
110
+ const data = query.state.data;
111
+ if (!data || data.pages.length > 1) return false;
112
+ const hasActive = data.pages.some((page)=>page.runs.some((run)=>!isWorkflowRunTerminal(run.status)));
113
+ return hasActive ? ACTIVE_POLL_MS : IDLE_POLL_MS;
114
+ },
115
+ refetchIntervalInBackground: false
116
+ });
117
+ }
118
+ async function getWorkflowRunDto({ workflowRunId, runAttempt, signal }) {
119
+ const params = new URLSearchParams();
120
+ if (runAttempt) params.set('attempt', String(runAttempt));
121
+ const query = params.size > 0 ? `?${params.toString()}` : '';
122
+ return await apiRequest(`/workflows/runs/${workflowRunId}${query}`, {
123
+ signal
124
+ });
125
+ }
126
+ async function getWorkflowRunAttemptsDto({ workflowRunId, signal }) {
127
+ return await apiRequest(`/workflows/runs/${workflowRunId}/attempts`, {
128
+ signal
129
+ });
130
+ }
131
+ async function cancelWorkflowRunDto({ workflowRunId }) {
132
+ return await apiRequest(`/workflows/runs/${workflowRunId}/cancel`, {
133
+ method: 'POST'
134
+ });
135
+ }
136
+ export async function rerunWorkflowRun({ workflowRunId, mode }) {
137
+ return await apiRequest(`/workflows/runs/${workflowRunId}/rerun`, {
138
+ method: 'POST',
139
+ body: {
140
+ mode
141
+ }
142
+ });
143
+ }
144
+ export function useRerunWorkflowRunMutation(projectId) {
145
+ const queryClient = useQueryClient();
146
+ return useMutation({
147
+ mutationFn: rerunWorkflowRun,
148
+ onSuccess: async (_run, variables)=>{
149
+ await Promise.all([
150
+ queryClient.invalidateQueries({
151
+ queryKey: workflowRunsQueryKeys.lists(projectId)
152
+ }),
153
+ queryClient.invalidateQueries({
154
+ queryKey: workflowRunsQueryKeys.detail(variables.workflowRunId)
155
+ }),
156
+ queryClient.invalidateQueries({
157
+ queryKey: workflowRunsQueryKeys.attempts(variables.workflowRunId)
158
+ })
159
+ ]);
160
+ }
161
+ });
162
+ }
163
+ function filtersAcceptManualPendingRun(filters, definitionId, now) {
164
+ if (filters.status && filters.status !== 'pending') return false;
165
+ if (filters.definitionId && filters.definitionId !== definitionId) return false;
166
+ if (filters.triggerSource && filters.triggerSource !== 'manual') return false;
167
+ if (filters.createdFrom && Date.parse(filters.createdFrom) > now.getTime()) return false;
168
+ if (filters.createdTo && Date.parse(filters.createdTo) < now.getTime()) return false;
169
+ return true;
170
+ }
171
+ function buildTempRun({ projectId, definitionId, name, createdAt }) {
172
+ return {
173
+ id: `temp-${cryptoRandomId()}`,
174
+ project_id: projectId,
175
+ definition_id: definitionId,
176
+ name,
177
+ status: 'pending',
178
+ current_attempt: 1,
179
+ latest_attempt: 1,
180
+ trigger_provider: null,
181
+ trigger_source: 'manual',
182
+ trigger_event: 'fire',
183
+ trigger_payload: {
184
+ source: 'manual',
185
+ event: 'fire'
186
+ },
187
+ inputs: null,
188
+ source_snapshot: null,
189
+ created_at: createdAt,
190
+ updated_at: createdAt,
191
+ started_at: null,
192
+ finished_at: null
193
+ };
194
+ }
195
+ function cryptoRandomId() {
196
+ if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {
197
+ return crypto.randomUUID();
198
+ }
199
+ return `${Date.now()}-${Math.random().toString(36).slice(2)}`;
200
+ }
201
+ export function useFireManualWorkflowMutation() {
202
+ const queryClient = useQueryClient();
203
+ return useMutation({
204
+ mutationFn: (variables)=>fireManualWorkflow(variables.inputs ? {
205
+ definitionId: variables.definitionId,
206
+ inputs: variables.inputs
207
+ } : {
208
+ definitionId: variables.definitionId
209
+ }),
210
+ onMutate: (variables)=>{
211
+ const definitionName = lookupDefinitionName(queryClient, variables.projectId, variables.definitionId);
212
+ const createdAt = new Date().toISOString();
213
+ const tempRun = buildTempRun({
214
+ projectId: variables.projectId,
215
+ definitionId: variables.definitionId,
216
+ name: definitionName ?? 'New run',
217
+ createdAt
218
+ });
219
+ const listsKey = workflowRunsQueryKeys.lists(variables.projectId);
220
+ const touchedQueryKeys = [];
221
+ const entries = queryClient.getQueriesData({
222
+ queryKey: listsKey
223
+ });
224
+ const now = new Date(createdAt);
225
+ for (const [queryKey] of entries){
226
+ const filters = readFiltersFromKey(queryKey);
227
+ if (!filters) continue;
228
+ if (!filtersAcceptManualPendingRun(filters, variables.definitionId, now)) continue;
229
+ touchedQueryKeys.push(queryKey);
230
+ queryClient.setQueryData(queryKey, (current)=>{
231
+ if (!current || current.pages.length === 0) return current;
232
+ const firstPage = current.pages[0];
233
+ if (!firstPage) return current;
234
+ const nextFirstPage = {
235
+ ...firstPage,
236
+ runs: [
237
+ tempRun,
238
+ ...firstPage.runs
239
+ ],
240
+ filtered_total_count: firstPage.filtered_total_count != null ? firstPage.filtered_total_count + 1 : null
241
+ };
242
+ return {
243
+ ...current,
244
+ pages: [
245
+ nextFirstPage,
246
+ ...current.pages.slice(1)
247
+ ]
248
+ };
249
+ });
250
+ }
251
+ return {
252
+ tempWorkflowRunId: tempRun.id,
253
+ touchedQueryKeys
254
+ };
255
+ },
256
+ onError: (_error, _variables, context)=>{
257
+ if (!context) return;
258
+ for (const queryKey of context.touchedQueryKeys){
259
+ queryClient.setQueryData(queryKey, (current)=>{
260
+ if (!current) return current;
261
+ let removedCount = 0;
262
+ const pages = current.pages.map((page)=>{
263
+ const runs = page.runs.filter((run)=>{
264
+ if (run.id !== context.tempWorkflowRunId) return true;
265
+ removedCount += 1;
266
+ return false;
267
+ });
268
+ if (runs.length === page.runs.length) return page;
269
+ return {
270
+ ...page,
271
+ runs,
272
+ filtered_total_count: page.filtered_total_count != null ? Math.max(0, page.filtered_total_count - removedCount) : null
273
+ };
274
+ });
275
+ if (removedCount === 0) return current;
276
+ return {
277
+ ...current,
278
+ pages
279
+ };
280
+ });
281
+ }
282
+ },
283
+ onSuccess: (_data, variables)=>{
284
+ void queryClient.invalidateQueries({
285
+ queryKey: workflowRunsQueryKeys.lists(variables.projectId)
286
+ });
287
+ }
288
+ });
289
+ }
290
+ function readFiltersFromKey(queryKey) {
291
+ if (queryKey.length < 4) return null;
292
+ const normalized = queryKey[3];
293
+ if (!normalized || typeof normalized !== 'object') return null;
294
+ const obj = normalized;
295
+ return {
296
+ status: obj.status ?? undefined,
297
+ definitionId: obj.definitionId ?? undefined,
298
+ triggerSource: obj.triggerSource ?? undefined,
299
+ createdFrom: obj.createdFrom ?? undefined,
300
+ createdTo: obj.createdTo ?? undefined
301
+ };
302
+ }
303
+ function lookupDefinitionName(queryClient, projectId, definitionId) {
304
+ const entries = queryClient.getQueriesData({
305
+ queryKey: [
306
+ 'definitions',
307
+ 'list',
308
+ projectId
309
+ ]
310
+ });
311
+ for (const [, data] of entries){
312
+ if (!data) continue;
313
+ for (const page of data.pages){
314
+ const match = page.definitions.find((d)=>d.id === definitionId);
315
+ if (match) return match.name;
316
+ }
317
+ }
318
+ return undefined;
319
+ }
320
+ export function useWorkflowRunQuery(workflowRunId) {
321
+ return useWorkflowRunAttemptQuery({
322
+ workflowRunId,
323
+ runAttempt: undefined
324
+ });
325
+ }
326
+ export function useWorkflowRunAttemptQuery({ workflowRunId, runAttempt }) {
327
+ // Poll a non-terminal run so the open run detail stays live (same cadence as the run
328
+ // list); stop once the run is terminal.
329
+ return useQuery({
330
+ queryKey: workflowRunId ? workflowRunsQueryKeys.detail(workflowRunId, runAttempt) : [
331
+ ...workflowRunsQueryKeys.all,
332
+ 'detail'
333
+ ],
334
+ enabled: Boolean(workflowRunId),
335
+ queryFn: ({ signal })=>getWorkflowRunDto({
336
+ workflowRunId: workflowRunId ?? '',
337
+ runAttempt,
338
+ signal
339
+ }),
340
+ select: toWorkflowRunDetail,
341
+ staleTime: 2_000,
342
+ refetchOnWindowFocus: true,
343
+ refetchInterval: (query)=>{
344
+ const status = query.state.data?.run_attempt.status;
345
+ if (!status) return false;
346
+ return isWorkflowRunTerminal(status) ? false : ACTIVE_POLL_MS;
347
+ },
348
+ refetchIntervalInBackground: false
349
+ });
350
+ }
351
+ export function useWorkflowRunAttemptsQuery({ workflowRunId, enabled }) {
352
+ return useQuery({
353
+ queryKey: workflowRunId ? workflowRunsQueryKeys.attempts(workflowRunId) : [
354
+ ...workflowRunsQueryKeys.all,
355
+ 'attempts'
356
+ ],
357
+ enabled: Boolean(workflowRunId) && enabled,
358
+ queryFn: ({ signal })=>getWorkflowRunAttemptsDto({
359
+ workflowRunId: workflowRunId ?? '',
360
+ signal
361
+ }),
362
+ select: (dto)=>dto.attempts.map(toWorkflowRunAttempt),
363
+ staleTime: 0,
364
+ refetchOnMount: true,
365
+ refetchOnWindowFocus: false
366
+ });
367
+ }
368
+ export function useCancelWorkflowRunMutation(run) {
369
+ const queryClient = useQueryClient();
370
+ return useMutation({
371
+ mutationFn: async ()=>{
372
+ if (!run) throw new Error('Workflow run is not loaded');
373
+ return toWorkflowRunListItem(await cancelWorkflowRunDto({
374
+ workflowRunId: run.id
375
+ }));
376
+ },
377
+ onSuccess: async ()=>{
378
+ if (!run) return;
379
+ await Promise.all([
380
+ queryClient.invalidateQueries({
381
+ queryKey: workflowRunsQueryKeys.detail(run.id)
382
+ }),
383
+ queryClient.invalidateQueries({
384
+ queryKey: workflowRunsQueryKeys.lists(run.projectId)
385
+ }),
386
+ queryClient.invalidateQueries({
387
+ queryKey: workflowRunsQueryKeys.attempts(run.id)
388
+ })
389
+ ]);
390
+ }
391
+ });
392
+ }
393
+
394
+ //# sourceMappingURL=workflow-runs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/hooks/api/workflow-runs.ts"],"sourcesContent":["import type {\n RerunWorkflowRunBodyDto,\n WorkflowRunAttemptsResponseDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunDto,\n WorkflowRunListResponseDto,\n WorkflowRunRerunModeDto,\n WorkflowRunResponseDto,\n} from '@shipfox/api-workflows-dto';\nimport {apiRequest} from '@shipfox/client-api';\nimport {\n type InfiniteData,\n keepPreviousData,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport {\n isWorkflowRunTerminal,\n toWorkflowRunAttempt,\n toWorkflowRunDetail,\n toWorkflowRunListItem,\n toWorkflowRunListPage,\n type WorkflowRun,\n type WorkflowRunAttempt,\n type WorkflowRunDetail,\n type WorkflowRunListPage,\n type WorkflowRunStatus,\n} from '#core/workflow-run.js';\n\nexport interface WorkflowRunFilters {\n status?: WorkflowRunStatus | undefined;\n definitionId?: string | undefined;\n triggerSource?: string | undefined;\n createdFrom?: string | undefined;\n createdTo?: string | undefined;\n}\n\nexport const workflowRunsQueryKeys = {\n all: ['workflow-runs'] as const,\n lists: (projectId: string) => [...workflowRunsQueryKeys.all, 'list', projectId] as const,\n list: (projectId: string, filters: WorkflowRunFilters) =>\n [...workflowRunsQueryKeys.lists(projectId), normalizeFilters(filters)] as const,\n detail: (workflowRunId: string, runAttempt?: number | undefined) =>\n [...workflowRunsQueryKeys.all, 'detail', workflowRunId, runAttempt ?? null] as const,\n attempts: (workflowRunId: string) =>\n [...workflowRunsQueryKeys.all, 'attempts', workflowRunId] as const,\n};\n\nfunction normalizeFilters(filters: WorkflowRunFilters) {\n return {\n status: filters.status ?? null,\n definitionId: filters.definitionId ?? null,\n triggerSource: filters.triggerSource ?? null,\n createdFrom: filters.createdFrom ?? null,\n createdTo: filters.createdTo ?? null,\n };\n}\n\nfunction appendFilters(params: URLSearchParams, filters: WorkflowRunFilters) {\n if (filters.status) params.set('status', filters.status);\n if (filters.definitionId) params.set('definition_id', filters.definitionId);\n if (filters.triggerSource) params.set('trigger_source', filters.triggerSource);\n if (filters.createdFrom) params.set('created_from', filters.createdFrom);\n if (filters.createdTo) params.set('created_to', filters.createdTo);\n}\n\nasync function listWorkflowRunsDto({\n projectId,\n filters,\n limit = 50,\n cursor,\n signal,\n}: {\n projectId: string;\n filters: WorkflowRunFilters;\n limit?: number;\n cursor?: string | undefined;\n signal?: AbortSignal;\n}) {\n const params = new URLSearchParams({project_id: projectId, limit: String(limit)});\n if (cursor) params.set('cursor', cursor);\n appendFilters(params, filters);\n return await apiRequest<WorkflowRunListResponseDto>(`/workflows/runs?${params.toString()}`, {\n signal,\n });\n}\n\n/**\n * Fire the manual trigger of a workflow definition.\n *\n * The server resolves the manual subscription by definition id (workflows\n * may declare at most one manual trigger). `inputs` are forwarded to the\n * run when provided.\n */\nexport async function fireManualWorkflow({\n definitionId,\n inputs,\n}: {\n definitionId: string;\n inputs?: Record<string, unknown>;\n}) {\n return await apiRequest<{workflow_run_id: string}>(\n `/workflow-definitions/${definitionId}/fire-manual`,\n {\n method: 'POST',\n body: inputs ? {inputs} : {},\n },\n );\n}\n\nconst ACTIVE_POLL_MS = 4_000;\nconst IDLE_POLL_MS = 30_000;\n\ntype RunListInfinite = InfiniteData<WorkflowRunListResponseDto, string | undefined>;\n\nfunction toWorkflowRunInfiniteData(\n data: InfiniteData<WorkflowRunListResponseDto, string | undefined>,\n): InfiniteData<WorkflowRunListPage, string | undefined> {\n return {\n ...data,\n pages: data.pages.map(toWorkflowRunListPage),\n };\n}\n\nexport function useWorkflowRunsInfiniteQuery(\n projectId: string | undefined,\n filters: WorkflowRunFilters,\n limit = 50,\n) {\n // Polling is owned by react-query, not the page. Polling fast (4s) while\n // any non-terminal run is visible covers state transitions; polling slow\n // (30s) when idle covers brand-new external runs (webhook/schedule\n // triggers) without leaving the list stale.\n //\n // We disable polling once the user has loaded more than one page. With\n // cursor pagination the cursor that bounds page 1 was computed from\n // page 0's last row; if a refetch shifts that boundary, a small range\n // of rows can drop into a between-pages gap. Users who scrolled into\n // history opted into \"reading mode\": pause until they refocus, filter,\n // or scroll back.\n return useInfiniteQuery({\n queryKey: projectId\n ? workflowRunsQueryKeys.list(projectId, filters)\n : [...workflowRunsQueryKeys.all, 'list'],\n enabled: Boolean(projectId),\n initialPageParam: undefined as string | undefined,\n queryFn: ({pageParam, signal}) =>\n listWorkflowRunsDto({projectId: projectId ?? '', filters, limit, cursor: pageParam, signal}),\n getNextPageParam: (lastPage) => lastPage.next_cursor ?? undefined,\n select: toWorkflowRunInfiniteData,\n placeholderData: keepPreviousData,\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const data = query.state.data;\n if (!data || data.pages.length > 1) return false;\n const hasActive = data.pages.some((page) =>\n page.runs.some((run) => !isWorkflowRunTerminal(run.status)),\n );\n return hasActive ? ACTIVE_POLL_MS : IDLE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nasync function getWorkflowRunDto({\n workflowRunId,\n runAttempt,\n signal,\n}: {\n workflowRunId: string;\n runAttempt?: number | undefined;\n signal?: AbortSignal;\n}) {\n const params = new URLSearchParams();\n if (runAttempt) params.set('attempt', String(runAttempt));\n const query = params.size > 0 ? `?${params.toString()}` : '';\n return await apiRequest<WorkflowRunDetailResponseDto>(\n `/workflows/runs/${workflowRunId}${query}`,\n {\n signal,\n },\n );\n}\n\nasync function getWorkflowRunAttemptsDto({\n workflowRunId,\n signal,\n}: {\n workflowRunId: string;\n signal?: AbortSignal;\n}) {\n return await apiRequest<WorkflowRunAttemptsResponseDto>(\n `/workflows/runs/${workflowRunId}/attempts`,\n {\n signal,\n },\n );\n}\n\nasync function cancelWorkflowRunDto({workflowRunId}: {workflowRunId: string}) {\n return await apiRequest<WorkflowRunDto>(`/workflows/runs/${workflowRunId}/cancel`, {\n method: 'POST',\n });\n}\n\nexport async function rerunWorkflowRun({\n workflowRunId,\n mode,\n}: {\n workflowRunId: string;\n mode: WorkflowRunRerunModeDto;\n}) {\n return await apiRequest<WorkflowRunResponseDto>(`/workflows/runs/${workflowRunId}/rerun`, {\n method: 'POST',\n body: {mode} satisfies RerunWorkflowRunBodyDto,\n });\n}\n\nexport function useRerunWorkflowRunMutation(projectId: string) {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: rerunWorkflowRun,\n onSuccess: async (_run, variables) => {\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(projectId)}),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.detail(variables.workflowRunId),\n }),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.attempts(variables.workflowRunId),\n }),\n ]);\n },\n });\n}\n\nfunction filtersAcceptManualPendingRun(\n filters: WorkflowRunFilters,\n definitionId: string,\n now: Date,\n): boolean {\n if (filters.status && filters.status !== 'pending') return false;\n if (filters.definitionId && filters.definitionId !== definitionId) return false;\n if (filters.triggerSource && filters.triggerSource !== 'manual') return false;\n if (filters.createdFrom && Date.parse(filters.createdFrom) > now.getTime()) return false;\n if (filters.createdTo && Date.parse(filters.createdTo) < now.getTime()) return false;\n return true;\n}\n\nfunction buildTempRun({\n projectId,\n definitionId,\n name,\n createdAt,\n}: {\n projectId: string;\n definitionId: string;\n name: string;\n createdAt: string;\n}): WorkflowRunDto {\n return {\n id: `temp-${cryptoRandomId()}`,\n project_id: projectId,\n definition_id: definitionId,\n name,\n status: 'pending',\n current_attempt: 1,\n latest_attempt: 1,\n trigger_provider: null,\n trigger_source: 'manual',\n trigger_event: 'fire',\n trigger_payload: {source: 'manual', event: 'fire'},\n inputs: null,\n source_snapshot: null,\n created_at: createdAt,\n updated_at: createdAt,\n started_at: null,\n finished_at: null,\n };\n}\n\nfunction cryptoRandomId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n}\n\nexport interface FireManualWorkflowVariables {\n projectId: string;\n definitionId: string;\n inputs?: Record<string, unknown>;\n}\n\nexport function useFireManualWorkflowMutation() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (variables: FireManualWorkflowVariables) =>\n fireManualWorkflow(\n variables.inputs\n ? {definitionId: variables.definitionId, inputs: variables.inputs}\n : {definitionId: variables.definitionId},\n ),\n onMutate: (variables) => {\n const definitionName = lookupDefinitionName(\n queryClient,\n variables.projectId,\n variables.definitionId,\n );\n const createdAt = new Date().toISOString();\n const tempRun = buildTempRun({\n projectId: variables.projectId,\n definitionId: variables.definitionId,\n name: definitionName ?? 'New run',\n createdAt,\n });\n\n const listsKey = workflowRunsQueryKeys.lists(variables.projectId);\n const touchedQueryKeys: Array<readonly unknown[]> = [];\n\n const entries = queryClient.getQueriesData<RunListInfinite>({queryKey: listsKey});\n const now = new Date(createdAt);\n for (const [queryKey] of entries) {\n const filters = readFiltersFromKey(queryKey);\n if (!filters) continue;\n if (!filtersAcceptManualPendingRun(filters, variables.definitionId, now)) continue;\n\n touchedQueryKeys.push(queryKey);\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current || current.pages.length === 0) return current;\n const firstPage = current.pages[0];\n if (!firstPage) return current;\n const nextFirstPage: WorkflowRunListResponseDto = {\n ...firstPage,\n runs: [tempRun, ...firstPage.runs],\n filtered_total_count:\n firstPage.filtered_total_count != null ? firstPage.filtered_total_count + 1 : null,\n };\n return {...current, pages: [nextFirstPage, ...current.pages.slice(1)]};\n });\n }\n\n return {tempWorkflowRunId: tempRun.id, touchedQueryKeys};\n },\n onError: (_error, _variables, context) => {\n if (!context) return;\n for (const queryKey of context.touchedQueryKeys) {\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current) return current;\n let removedCount = 0;\n const pages = current.pages.map((page) => {\n const runs = page.runs.filter((run) => {\n if (run.id !== context.tempWorkflowRunId) return true;\n removedCount += 1;\n return false;\n });\n if (runs.length === page.runs.length) return page;\n return {\n ...page,\n runs,\n filtered_total_count:\n page.filtered_total_count != null\n ? Math.max(0, page.filtered_total_count - removedCount)\n : null,\n };\n });\n if (removedCount === 0) return current;\n return {...current, pages};\n });\n }\n },\n onSuccess: (_data, variables) => {\n void queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.lists(variables.projectId),\n });\n },\n });\n}\n\nfunction readFiltersFromKey(queryKey: readonly unknown[]): WorkflowRunFilters | null {\n if (queryKey.length < 4) return null;\n const normalized = queryKey[3];\n if (!normalized || typeof normalized !== 'object') return null;\n const obj = normalized as Record<string, unknown>;\n return {\n status: (obj.status as WorkflowRunStatus | null) ?? undefined,\n definitionId: (obj.definitionId as string | null) ?? undefined,\n triggerSource: (obj.triggerSource as string | null) ?? undefined,\n createdFrom: (obj.createdFrom as string | null) ?? undefined,\n createdTo: (obj.createdTo as string | null) ?? undefined,\n };\n}\n\nfunction lookupDefinitionName(\n queryClient: ReturnType<typeof useQueryClient>,\n projectId: string,\n definitionId: string,\n): string | undefined {\n const entries = queryClient.getQueriesData<\n InfiniteData<{definitions: Array<{id: string; project_id: string; name: string}>}>\n >({queryKey: ['definitions', 'list', projectId]});\n for (const [, data] of entries) {\n if (!data) continue;\n for (const page of data.pages) {\n const match = page.definitions.find((d) => d.id === definitionId);\n if (match) return match.name;\n }\n }\n return undefined;\n}\n\nexport function useWorkflowRunQuery(workflowRunId: string | undefined) {\n return useWorkflowRunAttemptQuery({workflowRunId, runAttempt: undefined});\n}\n\nexport function useWorkflowRunAttemptQuery({\n workflowRunId,\n runAttempt,\n}: {\n workflowRunId: string | undefined;\n runAttempt?: number | undefined;\n}) {\n // Poll a non-terminal run so the open run detail stays live (same cadence as the run\n // list); stop once the run is terminal.\n return useQuery({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.detail(workflowRunId, runAttempt)\n : [...workflowRunsQueryKeys.all, 'detail'],\n enabled: Boolean(workflowRunId),\n queryFn: ({signal}) =>\n getWorkflowRunDto({workflowRunId: workflowRunId ?? '', runAttempt, signal}),\n select: toWorkflowRunDetail,\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const status: WorkflowRunDetail['runAttempt']['status'] | undefined =\n query.state.data?.run_attempt.status;\n if (!status) return false;\n return isWorkflowRunTerminal(status) ? false : ACTIVE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nexport function useWorkflowRunAttemptsQuery({\n workflowRunId,\n enabled,\n}: {\n workflowRunId: string | undefined;\n enabled: boolean;\n}) {\n return useQuery({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.attempts(workflowRunId)\n : [...workflowRunsQueryKeys.all, 'attempts'],\n enabled: Boolean(workflowRunId) && enabled,\n queryFn: ({signal}) => getWorkflowRunAttemptsDto({workflowRunId: workflowRunId ?? '', signal}),\n select: (dto): WorkflowRunAttempt[] => dto.attempts.map(toWorkflowRunAttempt),\n staleTime: 0,\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n });\n}\n\nexport function useCancelWorkflowRunMutation(run: WorkflowRun | undefined) {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async () => {\n if (!run) throw new Error('Workflow run is not loaded');\n return toWorkflowRunListItem(await cancelWorkflowRunDto({workflowRunId: run.id}));\n },\n onSuccess: async () => {\n if (!run) return;\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.detail(run.id)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(run.projectId)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.attempts(run.id)}),\n ]);\n },\n });\n}\n"],"names":["apiRequest","keepPreviousData","useInfiniteQuery","useMutation","useQuery","useQueryClient","isWorkflowRunTerminal","toWorkflowRunAttempt","toWorkflowRunDetail","toWorkflowRunListItem","toWorkflowRunListPage","workflowRunsQueryKeys","all","lists","projectId","list","filters","normalizeFilters","detail","workflowRunId","runAttempt","attempts","status","definitionId","triggerSource","createdFrom","createdTo","appendFilters","params","set","listWorkflowRunsDto","limit","cursor","signal","URLSearchParams","project_id","String","toString","fireManualWorkflow","inputs","method","body","ACTIVE_POLL_MS","IDLE_POLL_MS","toWorkflowRunInfiniteData","data","pages","map","useWorkflowRunsInfiniteQuery","queryKey","enabled","Boolean","initialPageParam","undefined","queryFn","pageParam","getNextPageParam","lastPage","next_cursor","select","placeholderData","staleTime","refetchOnWindowFocus","refetchInterval","query","state","length","hasActive","some","page","runs","run","refetchIntervalInBackground","getWorkflowRunDto","size","getWorkflowRunAttemptsDto","cancelWorkflowRunDto","rerunWorkflowRun","mode","useRerunWorkflowRunMutation","queryClient","mutationFn","onSuccess","_run","variables","Promise","invalidateQueries","filtersAcceptManualPendingRun","now","Date","parse","getTime","buildTempRun","name","createdAt","id","cryptoRandomId","definition_id","current_attempt","latest_attempt","trigger_provider","trigger_source","trigger_event","trigger_payload","source","event","source_snapshot","created_at","updated_at","started_at","finished_at","crypto","randomUUID","Math","random","slice","useFireManualWorkflowMutation","onMutate","definitionName","lookupDefinitionName","toISOString","tempRun","listsKey","touchedQueryKeys","entries","getQueriesData","readFiltersFromKey","push","setQueryData","current","firstPage","nextFirstPage","filtered_total_count","tempWorkflowRunId","onError","_error","_variables","context","removedCount","filter","max","_data","normalized","obj","match","definitions","find","d","useWorkflowRunQuery","useWorkflowRunAttemptQuery","run_attempt","useWorkflowRunAttemptsQuery","dto","refetchOnMount","useCancelWorkflowRunMutation","Error"],"mappings":"AASA,SAAQA,UAAU,QAAO,sBAAsB;AAC/C,SAEEC,gBAAgB,EAChBC,gBAAgB,EA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;YAAA;QAChF;QACAb,WAAW;YACT,IAAI,CAACX,KAAK;YACV,MAAMc,QAAQzE,GAAG,CAAC;gBAChBoE,YAAYM,iBAAiB,CAAC;oBAACrC,UAAUtC,sBAAsBO,MAAM,CAACqD,IAAIwB,EAAE;gBAAC;gBAC7Ef,YAAYM,iBAAiB,CAAC;oBAACrC,UAAUtC,sBAAsBE,KAAK,CAAC0D,IAAIzD,SAAS;gBAAC;gBACnFkE,YAAYM,iBAAiB,CAAC;oBAACrC,UAAUtC,sBAAsBU,QAAQ,CAACkD,IAAIwB,EAAE;gBAAC;aAChF;QACH;IACF;AACF"}
@@ -0,0 +1,5 @@
1
+ export type { AgentConfigIssue, JobDisplayDuration, JobExecutionDisplayDuration, JobExecutionStatus, JobExecutionTime, JobStatus, Step, StepAttempt, StepAttemptDisplayDuration, StepError, StepErrorCategory, StepErrorReason, StepGateResult, StepSourceLocation, WorkflowRun, WorkflowRunAttempt, WorkflowRunDetail, WorkflowRunListPage, WorkflowRunStatus, WorkflowSourceSnapshot, WorkflowStatus, } from '#core/workflow-run.js';
2
+ export { isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerLabel, } from '#core/workflow-run.js';
3
+ export { type FireManualWorkflowVariables, fireManualWorkflow, useCancelWorkflowRunMutation, useFireManualWorkflowMutation, useWorkflowRunAttemptsQuery, useWorkflowRunQuery, useWorkflowRunsInfiniteQuery, type WorkflowRunFilters, workflowRunsQueryKeys, } from './hooks/api/workflow-runs.js';
4
+ export { WorkflowRunPage } from './pages/workflow-run-page.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,IAAI,EACJ,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,GAAG,EACH,YAAY,EACZ,8BAA8B,EAC9B,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,KAAK,2BAA2B,EAChC,kBAAkB,EAClB,4BAA4B,EAC5B,6BAA6B,EAC7B,2BAA2B,EAC3B,mBAAmB,EACnB,4BAA4B,EAC5B,KAAK,kBAAkB,EACvB,qBAAqB,GACtB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAC,eAAe,EAAC,MAAM,8BAA8B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,5 @@
1
+ export { isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerLabel } from '#core/workflow-run.js';
2
+ export { fireManualWorkflow, useCancelWorkflowRunMutation, useFireManualWorkflowMutation, useWorkflowRunAttemptsQuery, useWorkflowRunQuery, useWorkflowRunsInfiniteQuery, workflowRunsQueryKeys } from './hooks/api/workflow-runs.js';
3
+ export { WorkflowRunPage } from './pages/workflow-run-page.js';
4
+
5
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n AgentConfigIssue,\n JobDisplayDuration,\n JobExecutionDisplayDuration,\n JobExecutionStatus,\n JobExecutionTime,\n JobStatus,\n Step,\n StepAttempt,\n StepAttemptDisplayDuration,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepGateResult,\n StepSourceLocation,\n WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunDetail,\n WorkflowRunListPage,\n WorkflowRunStatus,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from '#core/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n Job,\n JobExecution,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunShortId,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\nexport {\n type FireManualWorkflowVariables,\n fireManualWorkflow,\n useCancelWorkflowRunMutation,\n useFireManualWorkflowMutation,\n useWorkflowRunAttemptsQuery,\n useWorkflowRunQuery,\n useWorkflowRunsInfiniteQuery,\n type WorkflowRunFilters,\n workflowRunsQueryKeys,\n} from './hooks/api/workflow-runs.js';\nexport {WorkflowRunPage} from './pages/workflow-run-page.js';\n"],"names":["isWorkflowRunTerminal","isWorkflowStatus","Job","JobExecution","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunShortId","workflowRunTriggerLabel","fireManualWorkflow","useCancelWorkflowRunMutation","useFireManualWorkflowMutation","useWorkflowRunAttemptsQuery","useWorkflowRunQuery","useWorkflowRunsInfiniteQuery","workflowRunsQueryKeys","WorkflowRunPage"],"mappings":"AAuBA,SACEA,qBAAqB,EACrBC,gBAAgB,EAChBC,GAAG,EACHC,YAAY,EACZC,8BAA8B,EAC9BC,qBAAqB,EACrBC,kBAAkB,EAClBC,uBAAuB,QAClB,wBAAwB;AAC/B,SAEEC,kBAAkB,EAClBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mBAAmB,EACnBC,4BAA4B,EAE5BC,qBAAqB,QAChB,+BAA+B;AACtC,SAAQC,eAAe,QAAO,+BAA+B"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Shown when a project has no workflow runs yet, in place of the empty rail and the
3
+ * perpetual detail skeleton the loading-driven layout would otherwise leave behind.
4
+ */
5
+ export declare function WorkflowRunFirstTimeUse(): import("react").JSX.Element;
6
+ //# sourceMappingURL=workflow-run-first-time-use.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-first-time-use.d.ts","sourceRoot":"","sources":["../../src/pages/workflow-run-first-time-use.tsx"],"names":[],"mappings":"AAEA;;;GAGG;AACH,wBAAgB,uBAAuB,gCAUtC"}
@@ -0,0 +1,17 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { EmptyState } from '@shipfox/react-ui/empty-state';
3
+ /**
4
+ * Shown when a project has no workflow runs yet, in place of the empty rail and the
5
+ * perpetual detail skeleton the loading-driven layout would otherwise leave behind.
6
+ */ export function WorkflowRunFirstTimeUse() {
7
+ return /*#__PURE__*/ _jsx("div", {
8
+ className: "flex min-h-0 flex-1 items-center justify-center p-16",
9
+ children: /*#__PURE__*/ _jsx(EmptyState, {
10
+ icon: "pulseLine",
11
+ title: "No workflow runs yet",
12
+ description: "Runs will appear here once this project's workflows start running."
13
+ })
14
+ });
15
+ }
16
+
17
+ //# sourceMappingURL=workflow-run-first-time-use.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/pages/workflow-run-first-time-use.tsx"],"sourcesContent":["import {EmptyState} from '@shipfox/react-ui/empty-state';\n\n/**\n * Shown when a project has no workflow runs yet, in place of the empty rail and the\n * perpetual detail skeleton the loading-driven layout would otherwise leave behind.\n */\nexport function WorkflowRunFirstTimeUse() {\n return (\n <div className=\"flex min-h-0 flex-1 items-center justify-center p-16\">\n <EmptyState\n icon=\"pulseLine\"\n title=\"No workflow runs yet\"\n description=\"Runs will appear here once this project's workflows start running.\"\n />\n </div>\n );\n}\n"],"names":["EmptyState","WorkflowRunFirstTimeUse","div","className","icon","title","description"],"mappings":";AAAA,SAAQA,UAAU,QAAO,gCAAgC;AAEzD;;;CAGC,GACD,OAAO,SAASC;IACd,qBACE,KAACC;QAAIC,WAAU;kBACb,cAAA,KAACH;YACCI,MAAK;YACLC,OAAM;YACNC,aAAY;;;AAIpB"}
@@ -0,0 +1,8 @@
1
+ interface WorkflowRunPageProps {
2
+ workspaceId: string;
3
+ projectId: string;
4
+ workflowRunId?: string | undefined;
5
+ }
6
+ export declare function WorkflowRunPage({ workspaceId, projectId, workflowRunId }: WorkflowRunPageProps): import("react").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=workflow-run-page.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-page.d.ts","sourceRoot":"","sources":["../../src/pages/workflow-run-page.tsx"],"names":[],"mappings":"AAaA,UAAU,oBAAoB;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACpC;AAoCD,wBAAgB,eAAe,CAAC,EAAC,WAAW,EAAE,SAAS,EAAE,aAAa,EAAC,EAAE,oBAAoB,+BAmC5F"}